chore: refresh generated ui artifacts
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
type CarouselAPI,
|
||||
type CarouselProps,
|
||||
type EmblaContext,
|
||||
setEmblaContext,
|
||||
} from "./context.js";
|
||||
import { cn, type WithElementRef } from "$lib/utils.js";
|
||||
setEmblaContext
|
||||
} from './context.js';
|
||||
import { cn, type WithElementRef } from '$lib/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
opts = {},
|
||||
plugins = [],
|
||||
setApi = () => {},
|
||||
orientation = "horizontal",
|
||||
orientation = 'horizontal',
|
||||
class: className,
|
||||
children,
|
||||
...restProps
|
||||
@@ -32,7 +32,7 @@
|
||||
onInit,
|
||||
scrollSnaps: [],
|
||||
selectedIndex: 0,
|
||||
scrollTo,
|
||||
scrollTo
|
||||
});
|
||||
|
||||
setEmblaContext(carouselState);
|
||||
@@ -57,10 +57,10 @@
|
||||
}
|
||||
|
||||
function handleKeyDown(e: KeyboardEvent) {
|
||||
if (e.key === "ArrowLeft") {
|
||||
if (e.key === 'ArrowLeft') {
|
||||
e.preventDefault();
|
||||
scrollPrev();
|
||||
} else if (e.key === "ArrowRight") {
|
||||
} else if (e.key === 'ArrowRight') {
|
||||
e.preventDefault();
|
||||
scrollNext();
|
||||
}
|
||||
@@ -71,13 +71,13 @@
|
||||
setApi(carouselState.api);
|
||||
|
||||
carouselState.scrollSnaps = carouselState.api.scrollSnapList();
|
||||
carouselState.api.on("select", onSelect);
|
||||
carouselState.api.on('select', onSelect);
|
||||
onSelect();
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
return () => {
|
||||
carouselState.api?.off("select", onSelect);
|
||||
carouselState.api?.off('select', onSelect);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
@@ -85,7 +85,7 @@
|
||||
<div
|
||||
bind:this={ref}
|
||||
data-slot="carousel"
|
||||
class={cn("relative", className)}
|
||||
class={cn('relative', className)}
|
||||
role="region"
|
||||
aria-roledescription="carousel"
|
||||
{...restProps}
|
||||
|
||||
Reference in New Issue
Block a user