@hanzo/ui 3.4.1 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -70,6 +70,7 @@
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@hookform/resolvers": "^3.3.2",
73
+ "embla-carousel": "^8.0.1",
73
74
  "lucide-react": "^0.344.0",
74
75
  "next": "14.1.3",
75
76
  "next-themes": "^0.2.1",
@@ -88,6 +89,7 @@
88
89
  "@types/mdx": "^2.0.9",
89
90
  "@types/react": "^18.2.64",
90
91
  "@types/react-dom": "^18.2.18",
92
+ "embla-carousel": "^8.0.1",
91
93
  "tailwindcss": "^3.4.1",
92
94
  "typescript": "5.3.3"
93
95
  }
@@ -1,7 +1,8 @@
1
1
  'use client'
2
2
 
3
3
  import * as React from 'react'
4
- import useEmblaCarousel, { type EmblaOptionsType, type EmblaCarouselType } from 'embla-carousel-react'
4
+ import useEmblaCarousel from 'embla-carousel-react'
5
+ import type { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'
5
6
  import { ArrowLeft, ArrowRight } from 'lucide-react'
6
7
 
7
8
  import { cn } from '../util'
@@ -17,7 +18,7 @@ type CarouselProps = {
17
18
  plugins?: CarouselPlugins
18
19
  orientation?: 'horizontal' | 'vertical'
19
20
  setApi?: (api: CarouselApi) => void
20
- onSelect?: (api: CarouselApi) => void
21
+ onCarouselSelect?: (api: CarouselApi) => void
21
22
  }
22
23
 
23
24
  type CarouselContextProps = {
@@ -56,7 +57,7 @@ const Carousel = React.forwardRef<
56
57
  plugins,
57
58
  className,
58
59
  children,
59
- onSelect: _onSelect,
60
+ onCarouselSelect,
60
61
  ...props
61
62
  },
62
63
  ref
@@ -78,8 +79,8 @@ const Carousel = React.forwardRef<
78
79
 
79
80
  setCanScrollPrev(api.canScrollPrev())
80
81
  setCanScrollNext(api.canScrollNext())
81
- if (_onSelect) {
82
- _onSelect(api)
82
+ if (onCarouselSelect) {
83
+ onCarouselSelect(api)
83
84
  }
84
85
  }, [])
85
86
 
@@ -153,7 +153,6 @@ export {
153
153
  CarouselItem,
154
154
  CarouselNext,
155
155
  CarouselPrevious,
156
- CarouselAutoplayPlugin,
157
156
  } from './carousel'
158
157
 
159
158
  export { Toggle, toggleVariants } from './toggle'