@@ -17,6 +17,6 @@ import { Card, CardContent } from '@/lib/registry/default/ui/card'
-
+
diff --git a/apps/www/src/lib/registry/default/ui/carousel/Carousel.vue b/apps/www/src/lib/registry/default/ui/carousel/Carousel.vue
index b6147c27a..31fe64f5e 100644
--- a/apps/www/src/lib/registry/default/ui/carousel/Carousel.vue
+++ b/apps/www/src/lib/registry/default/ui/carousel/Carousel.vue
@@ -9,9 +9,17 @@ const props = withDefaults(defineProps(), {
const emits = defineEmits()
-const carouselArgs = useProvideCarousel(props, emits)
-
-defineExpose(carouselArgs)
+const { canScrollNext, canScrollPrev, carouselApi, carouselRef, orientation, scrollNext, scrollPrev } = useProvideCarousel(props, emits)
+
+defineExpose({
+ canScrollNext,
+ canScrollPrev,
+ carouselApi,
+ carouselRef,
+ orientation,
+ scrollNext,
+ scrollPrev,
+})
function onKeyDown(event: KeyboardEvent) {
const prevKey = props.orientation === 'vertical' ? 'ArrowUp' : 'ArrowLeft'
@@ -19,14 +27,14 @@ function onKeyDown(event: KeyboardEvent) {
if (event.key === prevKey) {
event.preventDefault()
- carouselArgs.scrollPrev()
+ scrollPrev()
return
}
if (event.key === nextKey) {
event.preventDefault()
- carouselArgs.scrollNext()
+ scrollNext()
}
}
@@ -39,6 +47,6 @@ function onKeyDown(event: KeyboardEvent) {
tabindex="0"
@keydown="onKeyDown"
>
-
+