From c33acba4ffa94bd645cc7960956af3ab6ea0ed7c Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Mon, 15 Jan 2024 18:55:22 +0330 Subject: [PATCH] fix: prevent page zoom while tapping carousel buttons (#274) * fix: prevent page zoom while tapping carousel buttons choose shadcn-ui icons and sizes for buttons * docs: fix carousel page responsive issues and ordering docs as shadcn-ui --- .../theme/components/ComponentPreview.vue | 2 +- .../src/content/docs/components/carousel.md | 25 +++++------ .../registry/default/example/CarouselApi.vue | 4 +- .../registry/default/example/CarouselDemo.vue | 32 +++++++------- .../default/example/CarouselOrientation.vue | 44 +++++++++---------- .../default/example/CarouselPlugin.vue | 42 +++++++++--------- .../registry/default/example/CarouselSize.vue | 42 +++++++++--------- .../default/example/CarouselSpacing.vue | 42 +++++++++--------- .../default/ui/carousel/CarouselNext.vue | 6 +-- .../default/ui/carousel/CarouselPrevious.vue | 6 +-- .../registry/new-york/example/CarouselApi.vue | 4 +- .../new-york/example/CarouselDemo.vue | 32 +++++++------- .../new-york/example/CarouselOrientation.vue | 44 +++++++++---------- .../new-york/example/CarouselPlugin.vue | 42 +++++++++--------- .../new-york/example/CarouselSize.vue | 42 +++++++++--------- .../new-york/example/CarouselSpacing.vue | 42 +++++++++--------- .../new-york/ui/carousel/CarouselNext.vue | 6 +-- .../new-york/ui/carousel/CarouselPrevious.vue | 6 +-- 18 files changed, 221 insertions(+), 242 deletions(-) diff --git a/apps/www/.vitepress/theme/components/ComponentPreview.vue b/apps/www/.vitepress/theme/components/ComponentPreview.vue index 8653daa95..7620e0da3 100644 --- a/apps/www/.vitepress/theme/components/ComponentPreview.vue +++ b/apps/www/.vitepress/theme/components/ComponentPreview.vue @@ -52,7 +52,7 @@ const { style } = useConfigStore()
- -```vue - - ... - -``` - ### Sizes To set the size of the items, you can use the `basis` utility class on the ``. @@ -151,6 +139,17 @@ Responsive ``` +### Orientation + +Use the `orientation` prop to set the orientation of the carousel. + + + +```vue + + ... + +``` ## Options @@ -280,4 +279,4 @@ import Autoplay from 'embla-carousel-autoplay' -See the [Embla Carousel docs](https://www.embla-carousel.com/api/plugins/) for more information on using plugins. \ No newline at end of file +See the [Embla Carousel docs](https://www.embla-carousel.com/api/plugins/) for more information on using plugins. diff --git a/apps/www/src/lib/registry/default/example/CarouselApi.vue b/apps/www/src/lib/registry/default/example/CarouselApi.vue index 0b25dc948..521d0e0a3 100644 --- a/apps/www/src/lib/registry/default/example/CarouselApi.vue +++ b/apps/www/src/lib/registry/default/example/CarouselApi.vue @@ -27,8 +27,8 @@ watchOnce(api, (api) => {