@hanzo/ui 5.3.28 → 5.3.29

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 (229) hide show
  1. package/dist/3d/button.js +298 -0
  2. package/dist/3d/button.mjs +273 -0
  3. package/dist/3d/card.js +234 -0
  4. package/dist/3d/card.mjs +207 -0
  5. package/dist/3d/carousel.js +371 -0
  6. package/dist/3d/carousel.mjs +344 -0
  7. package/dist/3d/grid.js +362 -0
  8. package/dist/3d/grid.mjs +337 -0
  9. package/dist/3d/index.js +1518 -0
  10. package/dist/3d/index.mjs +1472 -0
  11. package/dist/3d/marquee.js +352 -0
  12. package/dist/3d/marquee.mjs +327 -0
  13. package/dist/3d/pin.js +46 -0
  14. package/dist/3d/pin.mjs +24 -0
  15. package/dist/accordion.js +80 -0
  16. package/dist/accordion.mjs +55 -0
  17. package/dist/alert-dialog.js +220 -0
  18. package/dist/alert-dialog.mjs +187 -0
  19. package/dist/alert.js +68 -0
  20. package/dist/alert.mjs +64 -0
  21. package/dist/animation/animated-background.js +424 -0
  22. package/dist/animation/animated-background.mjs +418 -0
  23. package/dist/animation/animated-beam.js +119 -0
  24. package/dist/animation/animated-beam.mjs +97 -0
  25. package/dist/animation/animated-cursor.js +275 -0
  26. package/dist/animation/animated-cursor.mjs +270 -0
  27. package/dist/animation/animated-icon.js +357 -0
  28. package/dist/animation/animated-icon.mjs +351 -0
  29. package/dist/animation/animated-list.js +339 -0
  30. package/dist/animation/animated-list.mjs +333 -0
  31. package/dist/animation/animated-number.js +283 -0
  32. package/dist/animation/animated-number.mjs +277 -0
  33. package/dist/animation/animated-testimonials.js +97 -0
  34. package/dist/animation/animated-testimonials.mjs +75 -0
  35. package/dist/animation/animated-tooltip.js +67 -0
  36. package/dist/animation/animated-tooltip.mjs +45 -0
  37. package/dist/animation/apple-cards-carousel.js +308 -0
  38. package/dist/animation/apple-cards-carousel.mjs +285 -0
  39. package/dist/animation/apple-hello-effect.js +60 -0
  40. package/dist/animation/apple-hello-effect.mjs +38 -0
  41. package/dist/animation/index.js +1952 -0
  42. package/dist/animation/index.mjs +1921 -0
  43. package/dist/avatar.js +71 -0
  44. package/dist/avatar.mjs +47 -0
  45. package/dist/badge.js +66 -0
  46. package/dist/badge.mjs +40 -0
  47. package/dist/blocks/index.js +1665 -0
  48. package/dist/blocks/index.mjs +1626 -0
  49. package/dist/breadcrumb.js +107 -0
  50. package/dist/breadcrumb.mjs +99 -0
  51. package/dist/calendar.js +189 -0
  52. package/dist/calendar.mjs +164 -0
  53. package/dist/carousel.js +278 -0
  54. package/dist/carousel.mjs +249 -0
  55. package/dist/checkbox.js +60 -0
  56. package/dist/checkbox.mjs +35 -0
  57. package/dist/code/block.js +226 -0
  58. package/dist/code/block.mjs +203 -0
  59. package/dist/code/compare.js +446 -0
  60. package/dist/code/compare.mjs +423 -0
  61. package/dist/code/diff.js +430 -0
  62. package/dist/code/diff.mjs +407 -0
  63. package/dist/code/editor.js +243 -0
  64. package/dist/code/editor.mjs +218 -0
  65. package/dist/code/explorer.js +291 -0
  66. package/dist/code/explorer.mjs +268 -0
  67. package/dist/code/index.js +2551 -0
  68. package/dist/code/index.mjs +2510 -0
  69. package/dist/code/preview.js +400 -0
  70. package/dist/code/preview.mjs +377 -0
  71. package/dist/code/snippet.js +274 -0
  72. package/dist/code/snippet.mjs +250 -0
  73. package/dist/code/tabs.js +75 -0
  74. package/dist/code/tabs.mjs +53 -0
  75. package/dist/code/terminal.js +437 -0
  76. package/dist/code/terminal.mjs +414 -0
  77. package/dist/collapsible.js +33 -0
  78. package/dist/collapsible.mjs +9 -0
  79. package/dist/command.js +262 -0
  80. package/dist/command.mjs +232 -0
  81. package/dist/context-menu.js +207 -0
  82. package/dist/context-menu.mjs +171 -0
  83. package/dist/device/index.js +3 -0
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -0
  86. package/dist/dialog.mjs +121 -0
  87. package/dist/dock/basic.js +174 -0
  88. package/dist/dock/basic.mjs +151 -0
  89. package/dist/dock/index.js +628 -0
  90. package/dist/dock/index.mjs +601 -0
  91. package/dist/dock/limelight-nav.js +295 -0
  92. package/dist/dock/limelight-nav.mjs +274 -0
  93. package/dist/dock/macos.js +141 -0
  94. package/dist/dock/macos.mjs +118 -0
  95. package/dist/dock/menu.js +70 -0
  96. package/dist/dock/menu.mjs +48 -0
  97. package/dist/dock/message.js +144 -0
  98. package/dist/dock/message.mjs +122 -0
  99. package/dist/drawer.js +115 -0
  100. package/dist/drawer.mjs +103 -0
  101. package/dist/dropdown-menu.js +202 -0
  102. package/dist/dropdown-menu.mjs +166 -0
  103. package/dist/finance/AdvancedChart.js +48 -0
  104. package/dist/finance/AdvancedChart.mjs +46 -0
  105. package/dist/finance/CompanyProfile.js +48 -0
  106. package/dist/finance/CompanyProfile.mjs +46 -0
  107. package/dist/finance/CryptoScreener.js +45 -0
  108. package/dist/finance/CryptoScreener.mjs +43 -0
  109. package/dist/finance/Financials.js +52 -0
  110. package/dist/finance/Financials.mjs +50 -0
  111. package/dist/finance/ForexScreener.js +46 -0
  112. package/dist/finance/ForexScreener.mjs +44 -0
  113. package/dist/finance/MarketOverview.js +104 -0
  114. package/dist/finance/MarketOverview.mjs +102 -0
  115. package/dist/finance/NewsTimeline.js +44 -0
  116. package/dist/finance/NewsTimeline.mjs +42 -0
  117. package/dist/finance/OrderEntry.js +131 -0
  118. package/dist/finance/OrderEntry.mjs +129 -0
  119. package/dist/finance/OrdersHistory.js +64 -0
  120. package/dist/finance/OrdersHistory.mjs +62 -0
  121. package/dist/finance/PositionsList.js +80 -0
  122. package/dist/finance/PositionsList.mjs +78 -0
  123. package/dist/finance/StockScreener.js +46 -0
  124. package/dist/finance/StockScreener.mjs +44 -0
  125. package/dist/finance/SymbolInfo.js +46 -0
  126. package/dist/finance/SymbolInfo.mjs +44 -0
  127. package/dist/finance/TechnicalAnalysis.js +54 -0
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -0
  129. package/dist/finance/TickerTape.js +56 -0
  130. package/dist/finance/TickerTape.mjs +54 -0
  131. package/dist/finance/TradingPanel.js +191 -0
  132. package/dist/finance/TradingPanel.mjs +189 -0
  133. package/dist/finance/index.js +930 -0
  134. package/dist/finance/index.mjs +914 -0
  135. package/dist/form/index.js +155 -0
  136. package/dist/form/index.mjs +125 -0
  137. package/dist/form.js +172 -0
  138. package/dist/form.mjs +142 -0
  139. package/dist/hover-card.js +58 -0
  140. package/dist/hover-card.mjs +34 -0
  141. package/dist/index.js +10179 -0
  142. package/dist/index.mjs +9785 -0
  143. package/dist/input-otp.js +79 -0
  144. package/dist/input-otp.mjs +54 -0
  145. package/dist/lib/utils.js +28 -0
  146. package/dist/lib/utils.mjs +24 -0
  147. package/dist/navigation/index.js +98 -0
  148. package/dist/navigation/index.mjs +79 -0
  149. package/dist/navigation-menu.js +149 -0
  150. package/dist/navigation-menu.mjs +116 -0
  151. package/dist/pattern/grid-pattern.js +333 -0
  152. package/dist/pattern/grid-pattern.mjs +310 -0
  153. package/dist/pattern/index.js +333 -0
  154. package/dist/pattern/index.mjs +310 -0
  155. package/dist/popover.js +63 -0
  156. package/dist/popover.mjs +37 -0
  157. package/dist/primitives/index.js +10179 -0
  158. package/dist/primitives/index.mjs +9785 -0
  159. package/dist/primitives-export.js +10179 -0
  160. package/dist/primitives-export.mjs +9785 -0
  161. package/dist/progress.js +62 -0
  162. package/dist/progress.mjs +37 -0
  163. package/dist/project/gantt.js +65 -0
  164. package/dist/project/gantt.mjs +43 -0
  165. package/dist/project/index.js +636 -0
  166. package/dist/project/index.mjs +611 -0
  167. package/dist/project/kanban.js +597 -0
  168. package/dist/project/kanban.mjs +572 -0
  169. package/dist/project/list.js +35 -0
  170. package/dist/project/list.mjs +12 -0
  171. package/dist/radio-group.js +68 -0
  172. package/dist/radio-group.mjs +45 -0
  173. package/dist/resizable.js +72 -0
  174. package/dist/resizable.mjs +48 -0
  175. package/dist/scroll-area.js +89 -0
  176. package/dist/scroll-area.mjs +66 -0
  177. package/dist/select.js +140 -0
  178. package/dist/select.mjs +111 -0
  179. package/dist/separator.js +59 -0
  180. package/dist/separator.mjs +34 -0
  181. package/dist/sheet.js +148 -0
  182. package/dist/sheet.mjs +117 -0
  183. package/dist/skeleton.js +32 -0
  184. package/dist/skeleton.mjs +27 -0
  185. package/dist/slider.js +99 -0
  186. package/dist/slider.mjs +73 -0
  187. package/dist/sonner.js +34 -0
  188. package/dist/sonner.mjs +29 -0
  189. package/dist/switch.js +62 -0
  190. package/dist/switch.mjs +37 -0
  191. package/dist/table.js +110 -0
  192. package/dist/table.mjs +101 -0
  193. package/dist/tabs.js +82 -0
  194. package/dist/tabs.mjs +57 -0
  195. package/dist/tailwind/index.js +2023 -0
  196. package/dist/tailwind/index.mjs +2011 -0
  197. package/dist/textarea.js +78 -0
  198. package/dist/textarea.mjs +56 -0
  199. package/dist/toggle-group.js +118 -0
  200. package/dist/toggle-group.mjs +93 -0
  201. package/dist/toggle.js +71 -0
  202. package/dist/toggle.mjs +48 -0
  203. package/dist/tooltip.js +67 -0
  204. package/dist/tooltip.mjs +40 -0
  205. package/dist/types/index.js +57 -0
  206. package/dist/types/index.mjs +51 -0
  207. package/dist/ui/announcement.js +129 -0
  208. package/dist/ui/announcement.mjs +107 -0
  209. package/dist/ui/avatar-group.js +88 -0
  210. package/dist/ui/avatar-group.mjs +65 -0
  211. package/dist/ui/banner.js +85 -0
  212. package/dist/ui/banner.mjs +62 -0
  213. package/dist/ui/cursor.js +78 -0
  214. package/dist/ui/cursor.mjs +56 -0
  215. package/dist/ui/index.js +475 -0
  216. package/dist/ui/index.mjs +442 -0
  217. package/dist/ui/marquee.js +74 -0
  218. package/dist/ui/marquee.mjs +52 -0
  219. package/dist/ui/pill.js +85 -0
  220. package/dist/ui/pill.mjs +62 -0
  221. package/dist/ui/spinner.js +28 -0
  222. package/dist/ui/spinner.mjs +26 -0
  223. package/dist/ui/tags.js +101 -0
  224. package/dist/ui/tags.mjs +79 -0
  225. package/dist/ui/ticker.js +73 -0
  226. package/dist/ui/ticker.mjs +51 -0
  227. package/dist/util/index.js +463 -0
  228. package/dist/util/index.mjs +404 -0
  229. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { AnimatePresence, motion } from 'motion/react';
4
+ import { cn } from '@hanzo/ui/lib/utils';
5
+ import { Avatar, AvatarImage, AvatarFallback } from '@hanzo/ui/primitives/avatar';
6
+ import { Card, CardContent } from '@hanzo/ui';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+
9
+ var AnimatedTestimonials = React.forwardRef(
10
+ ({ className, testimonials, autoPlay = true, duration = 5e3, ...props }, ref) => {
11
+ const [activeIndex, setActiveIndex] = React.useState(0);
12
+ React.useEffect(() => {
13
+ if (!autoPlay) return;
14
+ const interval = setInterval(() => {
15
+ setActiveIndex((prev) => (prev + 1) % testimonials.length);
16
+ }, duration);
17
+ return () => clearInterval(interval);
18
+ }, [autoPlay, duration, testimonials.length]);
19
+ return /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ ref,
23
+ className: cn("relative min-h-[200px]", className),
24
+ ...props,
25
+ children: [
26
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
27
+ motion.div,
28
+ {
29
+ initial: { opacity: 0, y: 20 },
30
+ animate: { opacity: 1, y: 0 },
31
+ exit: { opacity: 0, y: -20 },
32
+ transition: { duration: 0.5 },
33
+ children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "pt-6", children: /* @__PURE__ */ jsxs("blockquote", { className: "space-y-4", children: [
34
+ /* @__PURE__ */ jsxs("p", { className: "text-lg italic", children: [
35
+ '"',
36
+ testimonials[activeIndex].content,
37
+ '"'
38
+ ] }),
39
+ /* @__PURE__ */ jsxs("footer", { className: "flex items-center gap-4", children: [
40
+ /* @__PURE__ */ jsxs(Avatar, { children: [
41
+ /* @__PURE__ */ jsx(AvatarImage, { src: testimonials[activeIndex].avatar }),
42
+ /* @__PURE__ */ jsx(AvatarFallback, { children: testimonials[activeIndex].author.slice(0, 2).toUpperCase() })
43
+ ] }),
44
+ /* @__PURE__ */ jsxs("div", { children: [
45
+ /* @__PURE__ */ jsx("cite", { className: "not-italic font-medium", children: testimonials[activeIndex].author }),
46
+ testimonials[activeIndex].role && /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
47
+ testimonials[activeIndex].role,
48
+ testimonials[activeIndex].company && `, ${testimonials[activeIndex].company}`
49
+ ] })
50
+ ] })
51
+ ] })
52
+ ] }) }) })
53
+ },
54
+ activeIndex
55
+ ) }),
56
+ /* @__PURE__ */ jsx("div", { className: "mt-4 flex justify-center gap-2", children: testimonials.map((_, index) => /* @__PURE__ */ jsx(
57
+ "button",
58
+ {
59
+ onClick: () => setActiveIndex(index),
60
+ className: cn(
61
+ "h-2 w-2 rounded-full transition-all",
62
+ index === activeIndex ? "w-8 bg-primary" : "bg-muted hover:bg-muted-foreground"
63
+ ),
64
+ "aria-label": `Go to testimonial ${index + 1}`
65
+ },
66
+ index
67
+ )) })
68
+ ]
69
+ }
70
+ );
71
+ }
72
+ );
73
+ AnimatedTestimonials.displayName = "AnimatedTestimonials";
74
+
75
+ export { AnimatedTestimonials };
@@ -0,0 +1,67 @@
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 AnimatedTooltip = React__namespace.forwardRef(
30
+ ({ className, content, children, delay = 0, ...props }, ref) => {
31
+ const [isVisible, setIsVisible] = React__namespace.useState(false);
32
+ return /* @__PURE__ */ jsxRuntime.jsxs(
33
+ "div",
34
+ {
35
+ ref,
36
+ className: utils.cn("relative inline-block", className),
37
+ onMouseEnter: () => setIsVisible(true),
38
+ onMouseLeave: () => setIsVisible(false),
39
+ ...props,
40
+ children: [
41
+ children,
42
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isVisible && /* @__PURE__ */ jsxRuntime.jsxs(
43
+ framerMotion.motion.div,
44
+ {
45
+ initial: { opacity: 0, y: 10, scale: 0.95 },
46
+ animate: { opacity: 1, y: 0, scale: 1 },
47
+ exit: { opacity: 0, y: 10, scale: 0.95 },
48
+ transition: {
49
+ duration: 0.2,
50
+ delay: delay / 1e3,
51
+ ease: "easeOut"
52
+ },
53
+ className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",
54
+ children: [
55
+ content,
56
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover" })
57
+ ]
58
+ }
59
+ ) })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ );
65
+ AnimatedTooltip.displayName = "AnimatedTooltip";
66
+
67
+ exports.AnimatedTooltip = AnimatedTooltip;
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { AnimatePresence, motion } from 'framer-motion';
4
+ import { cn } from '@hanzo/ui/lib/utils';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var AnimatedTooltip = React.forwardRef(
8
+ ({ className, content, children, delay = 0, ...props }, ref) => {
9
+ const [isVisible, setIsVisible] = React.useState(false);
10
+ return /* @__PURE__ */ jsxs(
11
+ "div",
12
+ {
13
+ ref,
14
+ className: cn("relative inline-block", className),
15
+ onMouseEnter: () => setIsVisible(true),
16
+ onMouseLeave: () => setIsVisible(false),
17
+ ...props,
18
+ children: [
19
+ children,
20
+ /* @__PURE__ */ jsx(AnimatePresence, { children: isVisible && /* @__PURE__ */ jsxs(
21
+ motion.div,
22
+ {
23
+ initial: { opacity: 0, y: 10, scale: 0.95 },
24
+ animate: { opacity: 1, y: 0, scale: 1 },
25
+ exit: { opacity: 0, y: 10, scale: 0.95 },
26
+ transition: {
27
+ duration: 0.2,
28
+ delay: delay / 1e3,
29
+ ease: "easeOut"
30
+ },
31
+ className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",
32
+ children: [
33
+ content,
34
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover" })
35
+ ]
36
+ }
37
+ ) })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ );
43
+ AnimatedTooltip.displayName = "AnimatedTooltip";
44
+
45
+ export { AnimatedTooltip };
@@ -0,0 +1,308 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var framerMotion = require('framer-motion');
6
+ var lucideReact = require('lucide-react');
7
+ var utils = require('@hanzo/ui/lib/utils');
8
+ var ui = require('@hanzo/ui');
9
+ var jsxRuntime = require('react/jsx-runtime');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
+
31
+ var __defProp = Object.defineProperty;
32
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
33
+ function AppleCardsCarousel({
34
+ cards,
35
+ autoPlay = false,
36
+ autoPlayInterval = 5e3,
37
+ className,
38
+ cardClassName,
39
+ showArrows = true,
40
+ showDots = true,
41
+ parallaxOffset = 50,
42
+ stackOffset = 10,
43
+ stackScale = 0.95,
44
+ swipeThreshold = 50
45
+ }) {
46
+ const [currentIndex, setCurrentIndex] = React__namespace.useState(0);
47
+ const [isAutoPlaying, setIsAutoPlaying] = React__namespace.useState(autoPlay);
48
+ const containerRef = React__namespace.useRef(null);
49
+ const dragX = framerMotion.useMotionValue(0);
50
+ const getCardStyle = /* @__PURE__ */ __name((index) => {
51
+ const offset = index - currentIndex;
52
+ const absOffset = Math.abs(offset);
53
+ if (absOffset > 2) {
54
+ return {
55
+ display: "none",
56
+ x: 0,
57
+ scale: 1,
58
+ opacity: 0,
59
+ zIndex: 0
60
+ };
61
+ }
62
+ const baseX = offset * stackOffset;
63
+ const scale = Math.pow(stackScale, absOffset);
64
+ const opacity = Math.max(0, 1 - absOffset * 0.3);
65
+ const zIndex = cards.length - absOffset;
66
+ return {
67
+ display: "block",
68
+ x: baseX,
69
+ scale,
70
+ opacity,
71
+ zIndex
72
+ };
73
+ }, "getCardStyle");
74
+ const goToNext = React__namespace.useCallback(() => {
75
+ setCurrentIndex((prev) => (prev + 1) % cards.length);
76
+ }, [cards.length]);
77
+ const goToPrevious = React__namespace.useCallback(() => {
78
+ setCurrentIndex((prev) => (prev - 1 + cards.length) % cards.length);
79
+ }, [cards.length]);
80
+ const goToCard = React__namespace.useCallback((index) => {
81
+ setCurrentIndex(index);
82
+ }, []);
83
+ const handleDragEnd = React__namespace.useCallback(
84
+ (event, info) => {
85
+ const { offset, velocity } = info;
86
+ if (Math.abs(offset.x) > swipeThreshold || Math.abs(velocity.x) > 500) {
87
+ if (offset.x > 0) {
88
+ goToPrevious();
89
+ } else {
90
+ goToNext();
91
+ }
92
+ }
93
+ },
94
+ [goToNext, goToPrevious, swipeThreshold]
95
+ );
96
+ React__namespace.useEffect(() => {
97
+ if (!isAutoPlaying) return;
98
+ const interval = setInterval(goToNext, autoPlayInterval);
99
+ return () => clearInterval(interval);
100
+ }, [isAutoPlaying, goToNext, autoPlayInterval]);
101
+ const handleMouseEnter = React__namespace.useCallback(() => {
102
+ if (autoPlay) {
103
+ setIsAutoPlaying(false);
104
+ }
105
+ }, [autoPlay]);
106
+ const handleMouseLeave = React__namespace.useCallback(() => {
107
+ if (autoPlay) {
108
+ setIsAutoPlaying(true);
109
+ }
110
+ }, [autoPlay]);
111
+ React__namespace.useEffect(() => {
112
+ const handleKeyDown = /* @__PURE__ */ __name((e) => {
113
+ if (e.key === "ArrowLeft") {
114
+ goToPrevious();
115
+ } else if (e.key === "ArrowRight") {
116
+ goToNext();
117
+ }
118
+ }, "handleKeyDown");
119
+ window.addEventListener("keydown", handleKeyDown);
120
+ return () => window.removeEventListener("keydown", handleKeyDown);
121
+ }, [goToNext, goToPrevious]);
122
+ return /* @__PURE__ */ jsxRuntime.jsxs(
123
+ "div",
124
+ {
125
+ ref: containerRef,
126
+ className: utils.cn("relative w-full max-w-6xl mx-auto px-4 py-8", className),
127
+ onMouseEnter: handleMouseEnter,
128
+ onMouseLeave: handleMouseLeave,
129
+ children: [
130
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", children: cards.map((card, index) => {
131
+ const style = getCardStyle(index);
132
+ const isActive = index === currentIndex;
133
+ return /* @__PURE__ */ jsxRuntime.jsx(
134
+ framerMotion.motion.div,
135
+ {
136
+ className: utils.cn(
137
+ "absolute inset-0 w-full h-full",
138
+ !isActive && "pointer-events-none"
139
+ ),
140
+ initial: false,
141
+ animate: {
142
+ x: style.x,
143
+ scale: style.scale,
144
+ opacity: style.opacity,
145
+ zIndex: style.zIndex
146
+ },
147
+ transition: {
148
+ type: "spring",
149
+ stiffness: 300,
150
+ damping: 30
151
+ },
152
+ drag: isActive ? "x" : false,
153
+ dragSnapToOrigin: true,
154
+ dragElastic: 0.2,
155
+ onDragEnd: handleDragEnd,
156
+ whileDrag: { cursor: "grabbing" },
157
+ style: {
158
+ x: dragX,
159
+ display: style.display
160
+ },
161
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
162
+ ui.Card,
163
+ {
164
+ className: utils.cn(
165
+ "relative w-full h-full overflow-hidden cursor-grab",
166
+ "bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950",
167
+ "shadow-2xl hover:shadow-3xl transition-shadow duration-300",
168
+ cardClassName
169
+ ),
170
+ style: {
171
+ background: card.gradient
172
+ },
173
+ children: [
174
+ card.image && /* @__PURE__ */ jsxRuntime.jsxs(
175
+ framerMotion.motion.div,
176
+ {
177
+ className: "absolute inset-0 w-full h-full",
178
+ style: {
179
+ x: framerMotion.useTransform(
180
+ dragX,
181
+ [-200, 0, 200],
182
+ [parallaxOffset, 0, -parallaxOffset]
183
+ )
184
+ },
185
+ children: [
186
+ /* @__PURE__ */ jsxRuntime.jsx(
187
+ "img",
188
+ {
189
+ src: card.image,
190
+ alt: card.title,
191
+ className: "w-full h-full object-cover"
192
+ }
193
+ ),
194
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent" })
195
+ ]
196
+ }
197
+ ),
198
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 flex flex-col justify-end h-full p-8 md:p-12", children: card.content ? card.content : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
199
+ /* @__PURE__ */ jsxRuntime.jsx(
200
+ framerMotion.motion.h3,
201
+ {
202
+ className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",
203
+ initial: { opacity: 0, y: 20 },
204
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
205
+ transition: { delay: 0.1 },
206
+ children: card.title
207
+ }
208
+ ),
209
+ card.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
210
+ framerMotion.motion.p,
211
+ {
212
+ className: "text-xl md:text-2xl text-white/80 mb-4",
213
+ initial: { opacity: 0, y: 20 },
214
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
215
+ transition: { delay: 0.2 },
216
+ children: card.subtitle
217
+ }
218
+ ),
219
+ card.description && /* @__PURE__ */ jsxRuntime.jsx(
220
+ framerMotion.motion.p,
221
+ {
222
+ className: "text-base md:text-lg text-white/70 max-w-2xl",
223
+ initial: { opacity: 0, y: 20 },
224
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
225
+ transition: { delay: 0.3 },
226
+ children: card.description
227
+ }
228
+ )
229
+ ] }) })
230
+ ]
231
+ }
232
+ )
233
+ },
234
+ card.id
235
+ );
236
+ }) }) }),
237
+ showArrows && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
238
+ /* @__PURE__ */ jsxRuntime.jsxs(
239
+ ui.Button,
240
+ {
241
+ variant: "ghost",
242
+ size: "icon",
243
+ className: utils.cn(
244
+ "absolute left-4 top-1/2 -translate-y-1/2 z-20",
245
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
246
+ "text-white border border-white/20",
247
+ "hidden md:flex"
248
+ ),
249
+ onClick: goToPrevious,
250
+ children: [
251
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-6 w-6" }),
252
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous card" })
253
+ ]
254
+ }
255
+ ),
256
+ /* @__PURE__ */ jsxRuntime.jsxs(
257
+ ui.Button,
258
+ {
259
+ variant: "ghost",
260
+ size: "icon",
261
+ className: utils.cn(
262
+ "absolute right-4 top-1/2 -translate-y-1/2 z-20",
263
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
264
+ "text-white border border-white/20",
265
+ "hidden md:flex"
266
+ ),
267
+ onClick: goToNext,
268
+ children: [
269
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-6 w-6" }),
270
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next card" })
271
+ ]
272
+ }
273
+ )
274
+ ] }),
275
+ showDots && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2", children: cards.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
276
+ "button",
277
+ {
278
+ className: utils.cn(
279
+ "w-2 h-2 rounded-full transition-all duration-300",
280
+ "bg-white/40 hover:bg-white/60",
281
+ index === currentIndex && "w-8 bg-white"
282
+ ),
283
+ onClick: () => goToCard(index),
284
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
285
+ "Go to card ",
286
+ index + 1
287
+ ] })
288
+ },
289
+ index
290
+ )) })
291
+ ]
292
+ }
293
+ );
294
+ }
295
+ __name(AppleCardsCarousel, "AppleCardsCarousel");
296
+ var gradientPresets = {
297
+ sunset: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
298
+ ocean: "linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",
299
+ fire: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
300
+ forest: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
301
+ galaxy: "linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",
302
+ aurora: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",
303
+ peach: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
304
+ lavender: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"
305
+ };
306
+
307
+ exports.AppleCardsCarousel = AppleCardsCarousel;
308
+ exports.gradientPresets = gradientPresets;