@hanzo/ui 5.3.35 → 5.3.36

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.
Files changed (254) hide show
  1. package/bin/create-registry.js +0 -0
  2. package/bin/npx-registry-mcp.js +0 -0
  3. package/bin/registry-mcp-wrapper.sh +0 -0
  4. package/bin/registry-mcp.js +0 -0
  5. package/bin/start-mcp-server.sh +0 -0
  6. package/bin/test-mcp.sh +0 -0
  7. package/dist/3d/button.js +1 -297
  8. package/dist/3d/button.mjs +1 -272
  9. package/dist/3d/card.js +1 -233
  10. package/dist/3d/card.mjs +1 -206
  11. package/dist/3d/carousel.js +1 -370
  12. package/dist/3d/carousel.mjs +1 -343
  13. package/dist/3d/grid.js +1 -361
  14. package/dist/3d/grid.mjs +1 -336
  15. package/dist/3d/index.js +1 -1517
  16. package/dist/3d/index.mjs +1 -1471
  17. package/dist/3d/marquee.js +1 -351
  18. package/dist/3d/marquee.mjs +1 -326
  19. package/dist/3d/pin.js +1 -45
  20. package/dist/3d/pin.mjs +1 -23
  21. package/dist/accordion.js +1 -79
  22. package/dist/accordion.mjs +1 -54
  23. package/dist/alert-dialog.js +1 -224
  24. package/dist/alert-dialog.mjs +1 -191
  25. package/dist/alert.js +1 -97
  26. package/dist/alert.mjs +1 -91
  27. package/dist/animation/animated-background.js +1 -423
  28. package/dist/animation/animated-background.mjs +1 -417
  29. package/dist/animation/animated-beam.js +1 -118
  30. package/dist/animation/animated-beam.mjs +1 -96
  31. package/dist/animation/animated-cursor.js +1 -274
  32. package/dist/animation/animated-cursor.mjs +1 -269
  33. package/dist/animation/animated-icon.js +2 -356
  34. package/dist/animation/animated-icon.mjs +2 -350
  35. package/dist/animation/animated-list.js +1 -338
  36. package/dist/animation/animated-list.mjs +1 -332
  37. package/dist/animation/animated-number.js +1 -282
  38. package/dist/animation/animated-number.mjs +1 -276
  39. package/dist/animation/animated-testimonials.js +1 -96
  40. package/dist/animation/animated-testimonials.mjs +1 -74
  41. package/dist/animation/animated-tooltip.js +1 -66
  42. package/dist/animation/animated-tooltip.mjs +1 -44
  43. package/dist/animation/apple-cards-carousel.js +1 -307
  44. package/dist/animation/apple-cards-carousel.mjs +1 -284
  45. package/dist/animation/apple-hello-effect.js +1 -59
  46. package/dist/animation/apple-hello-effect.mjs +1 -37
  47. package/dist/animation/index.js +2 -1951
  48. package/dist/animation/index.mjs +2 -1920
  49. package/dist/avatar.js +1 -70
  50. package/dist/avatar.mjs +1 -46
  51. package/dist/badge.js +1 -60
  52. package/dist/badge.mjs +1 -54
  53. package/dist/blocks/index.js +2 -1684
  54. package/dist/blocks/index.mjs +2 -1645
  55. package/dist/breadcrumb.js +1 -106
  56. package/dist/breadcrumb.mjs +1 -98
  57. package/dist/calendar-ext/index.js +1 -207
  58. package/dist/calendar-ext/index.mjs +1 -169
  59. package/dist/calendar.js +1 -193
  60. package/dist/calendar.mjs +1 -168
  61. package/dist/carousel.js +1 -282
  62. package/dist/carousel.mjs +1 -253
  63. package/dist/charts/index.js +6 -5840
  64. package/dist/charts/index.mjs +6 -5749
  65. package/dist/checkbox.js +1 -59
  66. package/dist/checkbox.mjs +1 -34
  67. package/dist/code/block.js +2 -225
  68. package/dist/code/block.mjs +2 -202
  69. package/dist/code/compare.js +5 -444
  70. package/dist/code/compare.mjs +5 -421
  71. package/dist/code/diff.js +12 -429
  72. package/dist/code/diff.mjs +11 -405
  73. package/dist/code/editor.js +1 -242
  74. package/dist/code/editor.mjs +1 -217
  75. package/dist/code/explorer.js +1 -290
  76. package/dist/code/explorer.mjs +1 -267
  77. package/dist/code/index.js +26 -2514
  78. package/dist/code/index.mjs +24 -2471
  79. package/dist/code/preview.js +6 -363
  80. package/dist/code/preview.mjs +6 -340
  81. package/dist/code/snippet.js +2 -273
  82. package/dist/code/snippet.mjs +2 -249
  83. package/dist/code/tabs.js +1 -74
  84. package/dist/code/tabs.mjs +1 -52
  85. package/dist/code/terminal.js +3 -436
  86. package/dist/code/terminal.mjs +3 -413
  87. package/dist/collapsible.js +1 -32
  88. package/dist/collapsible.mjs +1 -8
  89. package/dist/command.js +1 -282
  90. package/dist/command.mjs +1 -251
  91. package/dist/context-menu.js +1 -206
  92. package/dist/context-menu.mjs +1 -170
  93. package/dist/desktop/hooks.js +1 -223
  94. package/dist/desktop/hooks.mjs +1 -198
  95. package/dist/desktop/index.js +1 -685
  96. package/dist/desktop/index.mjs +1 -657
  97. package/dist/desktop/spotlight.js +1 -260
  98. package/dist/desktop/spotlight.mjs +1 -235
  99. package/dist/desktop/window.js +1 -273
  100. package/dist/desktop/window.mjs +1 -247
  101. package/dist/device/index.js +1 -2
  102. package/dist/device/index.mjs +0 -1
  103. package/dist/dialog.js +1 -245
  104. package/dist/dialog.mjs +1 -213
  105. package/dist/dock/basic.js +1 -173
  106. package/dist/dock/basic.mjs +1 -150
  107. package/dist/dock/index.js +1 -647
  108. package/dist/dock/index.mjs +1 -620
  109. package/dist/dock/limelight-nav.js +1 -314
  110. package/dist/dock/limelight-nav.mjs +1 -293
  111. package/dist/dock/macos.js +1 -140
  112. package/dist/dock/macos.mjs +1 -117
  113. package/dist/dock/menu.js +1 -69
  114. package/dist/dock/menu.mjs +1 -47
  115. package/dist/dock/message.js +1 -148
  116. package/dist/dock/message.mjs +1 -126
  117. package/dist/drawer.js +1 -114
  118. package/dist/drawer.mjs +1 -102
  119. package/dist/dropdown-menu.js +1 -201
  120. package/dist/dropdown-menu.mjs +1 -165
  121. package/dist/finance/AdvancedChart.js +2 -47
  122. package/dist/finance/AdvancedChart.mjs +2 -45
  123. package/dist/finance/CompanyProfile.js +2 -47
  124. package/dist/finance/CompanyProfile.mjs +2 -45
  125. package/dist/finance/CryptoScreener.js +2 -44
  126. package/dist/finance/CryptoScreener.mjs +2 -42
  127. package/dist/finance/Financials.js +2 -51
  128. package/dist/finance/Financials.mjs +2 -49
  129. package/dist/finance/ForexScreener.js +2 -45
  130. package/dist/finance/ForexScreener.mjs +2 -43
  131. package/dist/finance/MarketOverview.js +2 -103
  132. package/dist/finance/MarketOverview.mjs +2 -101
  133. package/dist/finance/NewsTimeline.js +2 -43
  134. package/dist/finance/NewsTimeline.mjs +2 -41
  135. package/dist/finance/OrderEntry.js +1 -130
  136. package/dist/finance/OrderEntry.mjs +1 -128
  137. package/dist/finance/OrdersHistory.js +1 -63
  138. package/dist/finance/OrdersHistory.mjs +1 -61
  139. package/dist/finance/PositionsList.js +1 -79
  140. package/dist/finance/PositionsList.mjs +1 -77
  141. package/dist/finance/StockScreener.js +2 -45
  142. package/dist/finance/StockScreener.mjs +2 -43
  143. package/dist/finance/SymbolInfo.js +2 -45
  144. package/dist/finance/SymbolInfo.mjs +2 -43
  145. package/dist/finance/TechnicalAnalysis.js +2 -53
  146. package/dist/finance/TechnicalAnalysis.mjs +2 -51
  147. package/dist/finance/TickerTape.js +2 -55
  148. package/dist/finance/TickerTape.mjs +2 -53
  149. package/dist/finance/TradingPanel.js +1 -190
  150. package/dist/finance/TradingPanel.mjs +1 -188
  151. package/dist/finance/index.js +2 -929
  152. package/dist/finance/index.mjs +2 -913
  153. package/dist/form/index.js +1 -153
  154. package/dist/form/index.mjs +1 -123
  155. package/dist/form.js +1 -171
  156. package/dist/form.mjs +1 -141
  157. package/dist/hover-card.js +1 -57
  158. package/dist/hover-card.mjs +1 -33
  159. package/dist/index.js +192 -9618
  160. package/dist/index.mjs +192 -9202
  161. package/dist/input-otp.js +1 -78
  162. package/dist/input-otp.mjs +1 -53
  163. package/dist/kanban/index.js +1 -593
  164. package/dist/kanban/index.mjs +1 -571
  165. package/dist/lib/utils.js +1 -28
  166. package/dist/lib/utils.mjs +1 -24
  167. package/dist/mermaid/index.js +1 -280
  168. package/dist/mermaid/index.mjs +1 -253
  169. package/dist/navigation/index.js +1 -97
  170. package/dist/navigation/index.mjs +1 -78
  171. package/dist/navigation-menu.js +1 -148
  172. package/dist/navigation-menu.mjs +1 -115
  173. package/dist/pattern/grid-pattern.js +3 -325
  174. package/dist/pattern/grid-pattern.mjs +3 -302
  175. package/dist/pattern/index.js +3 -325
  176. package/dist/pattern/index.mjs +3 -302
  177. package/dist/popover.js +1 -62
  178. package/dist/popover.mjs +1 -36
  179. package/dist/progress.js +1 -61
  180. package/dist/progress.mjs +1 -36
  181. package/dist/project/gantt.js +1 -64
  182. package/dist/project/gantt.mjs +1 -42
  183. package/dist/project/index.js +1 -635
  184. package/dist/project/index.mjs +1 -610
  185. package/dist/project/kanban.js +1 -596
  186. package/dist/project/kanban.mjs +1 -571
  187. package/dist/project/list.js +1 -34
  188. package/dist/project/list.mjs +1 -11
  189. package/dist/radio-group.js +1 -67
  190. package/dist/radio-group.mjs +1 -44
  191. package/dist/resizable.js +1 -71
  192. package/dist/resizable.mjs +1 -47
  193. package/dist/scroll-area.js +1 -88
  194. package/dist/scroll-area.mjs +1 -65
  195. package/dist/select.js +1 -139
  196. package/dist/select.mjs +1 -110
  197. package/dist/separator.js +1 -58
  198. package/dist/separator.mjs +1 -33
  199. package/dist/sheet.js +1 -147
  200. package/dist/sheet.mjs +1 -116
  201. package/dist/skeleton.js +1 -31
  202. package/dist/skeleton.mjs +1 -26
  203. package/dist/slider.js +1 -98
  204. package/dist/slider.mjs +1 -72
  205. package/dist/sonner.js +1 -33
  206. package/dist/sonner.mjs +1 -28
  207. package/dist/spline/index.js +1 -210
  208. package/dist/spline/index.mjs +1 -201
  209. package/dist/spline/media-stack.js +1 -192
  210. package/dist/spline/media-stack.mjs +1 -184
  211. package/dist/spline/player.js +1 -36
  212. package/dist/spline/player.mjs +1 -30
  213. package/dist/switch.js +1 -61
  214. package/dist/switch.mjs +1 -36
  215. package/dist/table.js +1 -109
  216. package/dist/table.mjs +1 -100
  217. package/dist/tabs.js +1 -127
  218. package/dist/tabs.mjs +1 -101
  219. package/dist/tailwind/index.mjs +1 -2011
  220. package/dist/textarea.js +1 -77
  221. package/dist/textarea.mjs +1 -55
  222. package/dist/toggle-group.js +1 -117
  223. package/dist/toggle-group.mjs +1 -92
  224. package/dist/toggle.js +1 -70
  225. package/dist/toggle.mjs +1 -47
  226. package/dist/tooltip.js +1 -66
  227. package/dist/tooltip.mjs +1 -39
  228. package/dist/types/index.mjs +1 -51
  229. package/dist/ui/announcement.js +1 -133
  230. package/dist/ui/announcement.mjs +1 -111
  231. package/dist/ui/avatar-group.js +1 -87
  232. package/dist/ui/avatar-group.mjs +1 -64
  233. package/dist/ui/banner.js +1 -84
  234. package/dist/ui/banner.mjs +1 -61
  235. package/dist/ui/cursor.js +1 -77
  236. package/dist/ui/cursor.mjs +1 -55
  237. package/dist/ui/index.js +1 -494
  238. package/dist/ui/index.mjs +1 -461
  239. package/dist/ui/marquee.js +1 -73
  240. package/dist/ui/marquee.mjs +1 -51
  241. package/dist/ui/pill.js +1 -84
  242. package/dist/ui/pill.mjs +1 -61
  243. package/dist/ui/spinner.js +1 -27
  244. package/dist/ui/spinner.mjs +1 -25
  245. package/dist/ui/tags.js +1 -116
  246. package/dist/ui/tags.mjs +1 -94
  247. package/dist/ui/ticker.js +1 -72
  248. package/dist/ui/ticker.mjs +1 -50
  249. package/dist/util/index.mjs +1 -404
  250. package/package.json +28 -27
  251. package/dist/primitives/index.js +0 -9619
  252. package/dist/primitives/index.mjs +0 -9203
  253. package/dist/primitives-export.js +0 -9619
  254. package/dist/primitives-export.mjs +0 -9203
@@ -1,285 +1,2 @@
1
1
  "use client";
2
- import * as React from 'react';
3
- import { useMotionValue, AnimatePresence, motion, useTransform } from 'framer-motion';
4
- import { ChevronLeft, ChevronRight } from 'lucide-react';
5
- import { cn } from '@hanzo/ui/lib/utils';
6
- import { Card, Button } from '@hanzo/ui';
7
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function AppleCardsCarousel({
12
- cards,
13
- autoPlay = false,
14
- autoPlayInterval = 5e3,
15
- className,
16
- cardClassName,
17
- showArrows = true,
18
- showDots = true,
19
- parallaxOffset = 50,
20
- stackOffset = 10,
21
- stackScale = 0.95,
22
- swipeThreshold = 50
23
- }) {
24
- const [currentIndex, setCurrentIndex] = React.useState(0);
25
- const [isAutoPlaying, setIsAutoPlaying] = React.useState(autoPlay);
26
- const containerRef = React.useRef(null);
27
- const dragX = useMotionValue(0);
28
- const getCardStyle = /* @__PURE__ */ __name((index) => {
29
- const offset = index - currentIndex;
30
- const absOffset = Math.abs(offset);
31
- if (absOffset > 2) {
32
- return {
33
- display: "none",
34
- x: 0,
35
- scale: 1,
36
- opacity: 0,
37
- zIndex: 0
38
- };
39
- }
40
- const baseX = offset * stackOffset;
41
- const scale = Math.pow(stackScale, absOffset);
42
- const opacity = Math.max(0, 1 - absOffset * 0.3);
43
- const zIndex = cards.length - absOffset;
44
- return {
45
- display: "block",
46
- x: baseX,
47
- scale,
48
- opacity,
49
- zIndex
50
- };
51
- }, "getCardStyle");
52
- const goToNext = React.useCallback(() => {
53
- setCurrentIndex((prev) => (prev + 1) % cards.length);
54
- }, [cards.length]);
55
- const goToPrevious = React.useCallback(() => {
56
- setCurrentIndex((prev) => (prev - 1 + cards.length) % cards.length);
57
- }, [cards.length]);
58
- const goToCard = React.useCallback((index) => {
59
- setCurrentIndex(index);
60
- }, []);
61
- const handleDragEnd = React.useCallback(
62
- (event, info) => {
63
- const { offset, velocity } = info;
64
- if (Math.abs(offset.x) > swipeThreshold || Math.abs(velocity.x) > 500) {
65
- if (offset.x > 0) {
66
- goToPrevious();
67
- } else {
68
- goToNext();
69
- }
70
- }
71
- },
72
- [goToNext, goToPrevious, swipeThreshold]
73
- );
74
- React.useEffect(() => {
75
- if (!isAutoPlaying) return;
76
- const interval = setInterval(goToNext, autoPlayInterval);
77
- return () => clearInterval(interval);
78
- }, [isAutoPlaying, goToNext, autoPlayInterval]);
79
- const handleMouseEnter = React.useCallback(() => {
80
- if (autoPlay) {
81
- setIsAutoPlaying(false);
82
- }
83
- }, [autoPlay]);
84
- const handleMouseLeave = React.useCallback(() => {
85
- if (autoPlay) {
86
- setIsAutoPlaying(true);
87
- }
88
- }, [autoPlay]);
89
- React.useEffect(() => {
90
- const handleKeyDown = /* @__PURE__ */ __name((e) => {
91
- if (e.key === "ArrowLeft") {
92
- goToPrevious();
93
- } else if (e.key === "ArrowRight") {
94
- goToNext();
95
- }
96
- }, "handleKeyDown");
97
- window.addEventListener("keydown", handleKeyDown);
98
- return () => window.removeEventListener("keydown", handleKeyDown);
99
- }, [goToNext, goToPrevious]);
100
- return /* @__PURE__ */ jsxs(
101
- "div",
102
- {
103
- ref: containerRef,
104
- className: cn("relative w-full max-w-6xl mx-auto px-4 py-8", className),
105
- onMouseEnter: handleMouseEnter,
106
- onMouseLeave: handleMouseLeave,
107
- children: [
108
- /* @__PURE__ */ jsx("div", { className: "relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: cards.map((card, index) => {
109
- const style = getCardStyle(index);
110
- const isActive = index === currentIndex;
111
- return /* @__PURE__ */ jsx(
112
- motion.div,
113
- {
114
- className: cn(
115
- "absolute inset-0 w-full h-full",
116
- !isActive && "pointer-events-none"
117
- ),
118
- initial: false,
119
- animate: {
120
- x: style.x,
121
- scale: style.scale,
122
- opacity: style.opacity,
123
- zIndex: style.zIndex
124
- },
125
- transition: {
126
- type: "spring",
127
- stiffness: 300,
128
- damping: 30
129
- },
130
- drag: isActive ? "x" : false,
131
- dragSnapToOrigin: true,
132
- dragElastic: 0.2,
133
- onDragEnd: handleDragEnd,
134
- whileDrag: { cursor: "grabbing" },
135
- style: {
136
- x: dragX,
137
- display: style.display
138
- },
139
- children: /* @__PURE__ */ jsxs(
140
- Card,
141
- {
142
- className: cn(
143
- "relative w-full h-full overflow-hidden cursor-grab",
144
- "bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950",
145
- "shadow-2xl hover:shadow-3xl transition-shadow duration-300",
146
- cardClassName
147
- ),
148
- style: {
149
- background: card.gradient
150
- },
151
- children: [
152
- card.image && /* @__PURE__ */ jsxs(
153
- motion.div,
154
- {
155
- className: "absolute inset-0 w-full h-full",
156
- style: {
157
- x: useTransform(
158
- dragX,
159
- [-200, 0, 200],
160
- [parallaxOffset, 0, -parallaxOffset]
161
- )
162
- },
163
- children: [
164
- /* @__PURE__ */ jsx(
165
- "img",
166
- {
167
- src: card.image,
168
- alt: card.title,
169
- className: "w-full h-full object-cover"
170
- }
171
- ),
172
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent" })
173
- ]
174
- }
175
- ),
176
- /* @__PURE__ */ jsx("div", { className: "relative z-10 flex flex-col justify-end h-full p-8 md:p-12", children: card.content ? card.content : /* @__PURE__ */ jsxs(Fragment, { children: [
177
- /* @__PURE__ */ jsx(
178
- motion.h3,
179
- {
180
- className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",
181
- initial: { opacity: 0, y: 20 },
182
- animate: { opacity: isActive ? 1 : 0.7, y: 0 },
183
- transition: { delay: 0.1 },
184
- children: card.title
185
- }
186
- ),
187
- card.subtitle && /* @__PURE__ */ jsx(
188
- motion.p,
189
- {
190
- className: "text-xl md:text-2xl text-white/80 mb-4",
191
- initial: { opacity: 0, y: 20 },
192
- animate: { opacity: isActive ? 1 : 0.7, y: 0 },
193
- transition: { delay: 0.2 },
194
- children: card.subtitle
195
- }
196
- ),
197
- card.description && /* @__PURE__ */ jsx(
198
- motion.p,
199
- {
200
- className: "text-base md:text-lg text-white/70 max-w-2xl",
201
- initial: { opacity: 0, y: 20 },
202
- animate: { opacity: isActive ? 1 : 0.7, y: 0 },
203
- transition: { delay: 0.3 },
204
- children: card.description
205
- }
206
- )
207
- ] }) })
208
- ]
209
- }
210
- )
211
- },
212
- card.id
213
- );
214
- }) }) }),
215
- showArrows && /* @__PURE__ */ jsxs(Fragment, { children: [
216
- /* @__PURE__ */ jsxs(
217
- Button,
218
- {
219
- variant: "ghost",
220
- size: "icon",
221
- className: cn(
222
- "absolute left-4 top-1/2 -translate-y-1/2 z-20",
223
- "bg-white/10 backdrop-blur-md hover:bg-white/20",
224
- "text-white border border-white/20",
225
- "hidden md:flex"
226
- ),
227
- onClick: goToPrevious,
228
- children: [
229
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-6 w-6" }),
230
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous card" })
231
- ]
232
- }
233
- ),
234
- /* @__PURE__ */ jsxs(
235
- Button,
236
- {
237
- variant: "ghost",
238
- size: "icon",
239
- className: cn(
240
- "absolute right-4 top-1/2 -translate-y-1/2 z-20",
241
- "bg-white/10 backdrop-blur-md hover:bg-white/20",
242
- "text-white border border-white/20",
243
- "hidden md:flex"
244
- ),
245
- onClick: goToNext,
246
- children: [
247
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-6 w-6" }),
248
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next card" })
249
- ]
250
- }
251
- )
252
- ] }),
253
- showDots && /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2", children: cards.map((_, index) => /* @__PURE__ */ jsx(
254
- "button",
255
- {
256
- className: cn(
257
- "w-2 h-2 rounded-full transition-all duration-300",
258
- "bg-white/40 hover:bg-white/60",
259
- index === currentIndex && "w-8 bg-white"
260
- ),
261
- onClick: () => goToCard(index),
262
- children: /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
263
- "Go to card ",
264
- index + 1
265
- ] })
266
- },
267
- index
268
- )) })
269
- ]
270
- }
271
- );
272
- }
273
- __name(AppleCardsCarousel, "AppleCardsCarousel");
274
- var gradientPresets = {
275
- sunset: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
276
- ocean: "linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",
277
- fire: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
278
- forest: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
279
- galaxy: "linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",
280
- aurora: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",
281
- peach: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
282
- lavender: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"
283
- };
284
-
285
- export { AppleCardsCarousel, gradientPresets };
2
+ import*as n from'react';import {useMotionValue,AnimatePresence,motion,useTransform}from'framer-motion';import {ChevronLeft,ChevronRight}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {Card,Button}from'@hanzo/ui';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var X=Object.defineProperty;var g=(o,l)=>X(o,"name",{value:l,configurable:true});function ee({cards:o,autoPlay:l=false,autoPlayInterval:p=5e3,className:N,cardClassName:R,showArrows:E=true,showDots:M=true,parallaxOffset:h=50,stackOffset:A=10,stackScale:I=.95,swipeThreshold:x=50}){let[m,b]=n.useState(0),[y,v]=n.useState(l),z=n.useRef(null),w=useMotionValue(0),P=g(e=>{let t=e-m,s=Math.abs(t);if(s>2)return {display:"none",x:0,scale:1,opacity:0,zIndex:0};let B=t*A,O=Math.pow(I,s),j=Math.max(0,1-s*.3),K=o.length-s;return {display:"block",x:B,scale:O,opacity:j,zIndex:K}},"getCardStyle"),c=n.useCallback(()=>{b(e=>(e+1)%o.length);},[o.length]),f=n.useCallback(()=>{b(e=>(e-1+o.length)%o.length);},[o.length]),L=n.useCallback(e=>{b(e);},[]),T=n.useCallback((e,t)=>{let{offset:s,velocity:i}=t;(Math.abs(s.x)>x||Math.abs(i.x)>500)&&(s.x>0?f():c());},[c,f,x]);n.useEffect(()=>{if(!y)return;let e=setInterval(c,p);return ()=>clearInterval(e)},[y,c,p]);let D=n.useCallback(()=>{l&&v(false);},[l]),S=n.useCallback(()=>{l&&v(true);},[l]);return n.useEffect(()=>{let e=g(t=>{t.key==="ArrowLeft"?f():t.key==="ArrowRight"&&c();},"handleKeyDown");return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,f]),jsxs("div",{ref:z,className:cn("relative w-full max-w-6xl mx-auto px-4 py-8",N),onMouseEnter:D,onMouseLeave:S,children:[jsx("div",{className:"relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center",children:jsx(AnimatePresence,{mode:"popLayout",children:o.map((e,t)=>{let s=P(t),i=t===m;return jsx(motion.div,{className:cn("absolute inset-0 w-full h-full",!i&&"pointer-events-none"),initial:false,animate:{x:s.x,scale:s.scale,opacity:s.opacity,zIndex:s.zIndex},transition:{type:"spring",stiffness:300,damping:30},drag:i?"x":false,dragSnapToOrigin:true,dragElastic:.2,onDragEnd:T,whileDrag:{cursor:"grabbing"},style:{x:w,display:s.display},children:jsxs(Card,{className:cn("relative w-full h-full overflow-hidden cursor-grab","bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950","shadow-2xl hover:shadow-3xl transition-shadow duration-300",R),style:{background:e.gradient},children:[e.image&&jsxs(motion.div,{className:"absolute inset-0 w-full h-full",style:{x:useTransform(w,[-200,0,200],[h,0,-h])},children:[jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover"}),jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"})]}),jsx("div",{className:"relative z-10 flex flex-col justify-end h-full p-8 md:p-12",children:e.content?e.content:jsxs(Fragment,{children:[jsx(motion.h3,{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",initial:{opacity:0,y:20},animate:{opacity:i?1:.7,y:0},transition:{delay:.1},children:e.title}),e.subtitle&&jsx(motion.p,{className:"text-xl md:text-2xl text-white/80 mb-4",initial:{opacity:0,y:20},animate:{opacity:i?1:.7,y:0},transition:{delay:.2},children:e.subtitle}),e.description&&jsx(motion.p,{className:"text-base md:text-lg text-white/70 max-w-2xl",initial:{opacity:0,y:20},animate:{opacity:i?1:.7,y:0},transition:{delay:.3},children:e.description})]})})]})},e.id)})})}),E&&jsxs(Fragment,{children:[jsxs(Button,{variant:"ghost",size:"icon",className:cn("absolute left-4 top-1/2 -translate-y-1/2 z-20","bg-white/10 backdrop-blur-md hover:bg-white/20","text-white border border-white/20","hidden md:flex"),onClick:f,children:[jsx(ChevronLeft,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Previous card"})]}),jsxs(Button,{variant:"ghost",size:"icon",className:cn("absolute right-4 top-1/2 -translate-y-1/2 z-20","bg-white/10 backdrop-blur-md hover:bg-white/20","text-white border border-white/20","hidden md:flex"),onClick:c,children:[jsx(ChevronRight,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Next card"})]})]}),M&&jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:o.map((e,t)=>jsx("button",{className:cn("w-2 h-2 rounded-full transition-all duration-300","bg-white/40 hover:bg-white/60",t===m&&"w-8 bg-white"),onClick:()=>L(t),children:jsxs("span",{className:"sr-only",children:["Go to card ",t+1]})},t))})]})}g(ee,"AppleCardsCarousel");var te={sunset:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",ocean:"linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",fire:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",forest:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",galaxy:"linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",aurora:"linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",peach:"linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",lavender:"linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"};export{ee as AppleCardsCarousel,te as gradientPresets};
@@ -1,60 +1,2 @@
1
1
  "use client";
2
- 'use strict';
3
-
4
- var React = require('react');
5
- var framerMotion = require('framer-motion');
6
- var utils = require('@hanzo/ui/lib/utils');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n.default = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
-
29
- var AppleHelloEffect = React__namespace.forwardRef(({ className, text = "Hello", duration = 2, ...props }, ref) => {
30
- const letters = text.split("");
31
- return /* @__PURE__ */ jsxRuntime.jsx(
32
- "div",
33
- {
34
- ref,
35
- className: utils.cn(
36
- "relative flex items-center justify-center text-6xl font-bold",
37
- className
38
- ),
39
- ...props,
40
- children: letters.map((letter, index) => /* @__PURE__ */ jsxRuntime.jsx(
41
- framerMotion.motion.span,
42
- {
43
- initial: { opacity: 0, y: 50 },
44
- animate: { opacity: 1, y: 0 },
45
- transition: {
46
- duration,
47
- delay: index * 0.1,
48
- ease: [0.215, 0.61, 0.355, 1]
49
- },
50
- className: "inline-block",
51
- children: letter
52
- },
53
- index
54
- ))
55
- }
56
- );
57
- });
58
- AppleHelloEffect.displayName = "AppleHelloEffect";
59
-
60
- exports.AppleHelloEffect = AppleHelloEffect;
2
+ 'use strict';var l=require('react'),framerMotion=require('framer-motion'),utils=require('@hanzo/ui/lib/utils'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var l__namespace=/*#__PURE__*/_interopNamespace(l);var m=l__namespace.forwardRef(({className:o,text:i="Hello",duration:a=2,...n},r)=>{let p=i.split("");return jsxRuntime.jsx("div",{ref:r,className:utils.cn("relative flex items-center justify-center text-6xl font-bold",o),...n,children:p.map((s,e)=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:a,delay:e*.1,ease:[.215,.61,.355,1]},className:"inline-block",children:s},e))})});m.displayName="AppleHelloEffect";exports.AppleHelloEffect=m;
@@ -1,38 +1,2 @@
1
1
  "use client";
2
- import * as React from 'react';
3
- import { motion } from 'framer-motion';
4
- import { cn } from '@hanzo/ui/lib/utils';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var AppleHelloEffect = React.forwardRef(({ className, text = "Hello", duration = 2, ...props }, ref) => {
8
- const letters = text.split("");
9
- return /* @__PURE__ */ jsx(
10
- "div",
11
- {
12
- ref,
13
- className: cn(
14
- "relative flex items-center justify-center text-6xl font-bold",
15
- className
16
- ),
17
- ...props,
18
- children: letters.map((letter, index) => /* @__PURE__ */ jsx(
19
- motion.span,
20
- {
21
- initial: { opacity: 0, y: 50 },
22
- animate: { opacity: 1, y: 0 },
23
- transition: {
24
- duration,
25
- delay: index * 0.1,
26
- ease: [0.215, 0.61, 0.355, 1]
27
- },
28
- className: "inline-block",
29
- children: letter
30
- },
31
- index
32
- ))
33
- }
34
- );
35
- });
36
- AppleHelloEffect.displayName = "AppleHelloEffect";
37
-
38
- export { AppleHelloEffect };
2
+ import*as l from'react';import {motion}from'framer-motion';import {cn}from'@hanzo/ui/lib/utils';import {jsx}from'react/jsx-runtime';var m=l.forwardRef(({className:o,text:i="Hello",duration:a=2,...n},r)=>{let p=i.split("");return jsx("div",{ref:r,className:cn("relative flex items-center justify-center text-6xl font-bold",o),...n,children:p.map((s,e)=>jsx(motion.span,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:a,delay:e*.1,ease:[.215,.61,.355,1]},className:"inline-block",children:s},e))})});m.displayName="AppleHelloEffect";export{m as AppleHelloEffect};