@hanzo/ui 5.3.19 → 5.3.22

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 -1
  2. package/dist/3d/button.mjs +273 -1
  3. package/dist/3d/card.js +234 -1
  4. package/dist/3d/card.mjs +207 -1
  5. package/dist/3d/carousel.js +371 -1
  6. package/dist/3d/carousel.mjs +344 -1
  7. package/dist/3d/grid.js +362 -1
  8. package/dist/3d/grid.mjs +337 -1
  9. package/dist/3d/index.js +1518 -1
  10. package/dist/3d/index.mjs +1472 -1
  11. package/dist/3d/marquee.js +352 -1
  12. package/dist/3d/marquee.mjs +327 -1
  13. package/dist/3d/pin.js +46 -1
  14. package/dist/3d/pin.mjs +24 -1
  15. package/dist/accordion.js +80 -1
  16. package/dist/accordion.mjs +55 -1
  17. package/dist/alert-dialog.js +220 -1
  18. package/dist/alert-dialog.mjs +187 -1
  19. package/dist/alert.js +68 -1
  20. package/dist/alert.mjs +64 -1
  21. package/dist/animation/animated-background.js +424 -1
  22. package/dist/animation/animated-background.mjs +418 -1
  23. package/dist/animation/animated-beam.js +119 -1
  24. package/dist/animation/animated-beam.mjs +97 -1
  25. package/dist/animation/animated-cursor.js +275 -1
  26. package/dist/animation/animated-cursor.mjs +270 -1
  27. package/dist/animation/animated-icon.js +357 -2
  28. package/dist/animation/animated-icon.mjs +351 -2
  29. package/dist/animation/animated-list.js +339 -1
  30. package/dist/animation/animated-list.mjs +333 -1
  31. package/dist/animation/animated-number.js +283 -1
  32. package/dist/animation/animated-number.mjs +277 -1
  33. package/dist/animation/animated-testimonials.js +97 -1
  34. package/dist/animation/animated-testimonials.mjs +75 -1
  35. package/dist/animation/animated-tooltip.js +67 -1
  36. package/dist/animation/animated-tooltip.mjs +45 -1
  37. package/dist/animation/apple-cards-carousel.js +308 -1
  38. package/dist/animation/apple-cards-carousel.mjs +285 -1
  39. package/dist/animation/apple-hello-effect.js +60 -1
  40. package/dist/animation/apple-hello-effect.mjs +38 -1
  41. package/dist/animation/index.js +1952 -2
  42. package/dist/animation/index.mjs +1921 -2
  43. package/dist/avatar.js +71 -1
  44. package/dist/avatar.mjs +47 -1
  45. package/dist/badge.js +66 -1
  46. package/dist/badge.mjs +40 -1
  47. package/dist/blocks/index.js +1665 -2
  48. package/dist/blocks/index.mjs +1626 -2
  49. package/dist/breadcrumb.js +107 -1
  50. package/dist/breadcrumb.mjs +99 -1
  51. package/dist/calendar.js +189 -1
  52. package/dist/calendar.mjs +164 -1
  53. package/dist/carousel.js +278 -1
  54. package/dist/carousel.mjs +249 -1
  55. package/dist/checkbox.js +60 -1
  56. package/dist/checkbox.mjs +35 -1
  57. package/dist/code/block.js +226 -2
  58. package/dist/code/block.mjs +203 -2
  59. package/dist/code/compare.js +445 -5
  60. package/dist/code/compare.mjs +422 -5
  61. package/dist/code/diff.js +430 -12
  62. package/dist/code/diff.mjs +406 -11
  63. package/dist/code/editor.js +243 -1
  64. package/dist/code/editor.mjs +218 -1
  65. package/dist/code/explorer.js +291 -1
  66. package/dist/code/explorer.mjs +268 -1
  67. package/dist/code/index.js +2515 -26
  68. package/dist/code/index.mjs +2472 -24
  69. package/dist/code/preview.js +364 -6
  70. package/dist/code/preview.mjs +341 -6
  71. package/dist/code/snippet.js +274 -2
  72. package/dist/code/snippet.mjs +250 -2
  73. package/dist/code/tabs.js +75 -1
  74. package/dist/code/tabs.mjs +53 -1
  75. package/dist/code/terminal.js +437 -3
  76. package/dist/code/terminal.mjs +414 -3
  77. package/dist/collapsible.js +33 -1
  78. package/dist/collapsible.mjs +9 -1
  79. package/dist/command.js +262 -1
  80. package/dist/command.mjs +232 -1
  81. package/dist/context-menu.js +207 -1
  82. package/dist/context-menu.mjs +171 -1
  83. package/dist/device/index.js +3 -1
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -1
  86. package/dist/dialog.mjs +121 -1
  87. package/dist/dock/basic.js +174 -1
  88. package/dist/dock/basic.mjs +151 -1
  89. package/dist/dock/index.js +628 -1
  90. package/dist/dock/index.mjs +601 -1
  91. package/dist/dock/limelight-nav.js +295 -1
  92. package/dist/dock/limelight-nav.mjs +274 -1
  93. package/dist/dock/macos.js +141 -1
  94. package/dist/dock/macos.mjs +118 -1
  95. package/dist/dock/menu.js +70 -1
  96. package/dist/dock/menu.mjs +48 -1
  97. package/dist/dock/message.js +144 -1
  98. package/dist/dock/message.mjs +122 -1
  99. package/dist/drawer.js +115 -1
  100. package/dist/drawer.mjs +103 -1
  101. package/dist/dropdown-menu.js +202 -1
  102. package/dist/dropdown-menu.mjs +166 -1
  103. package/dist/finance/AdvancedChart.js +48 -2
  104. package/dist/finance/AdvancedChart.mjs +46 -2
  105. package/dist/finance/CompanyProfile.js +48 -2
  106. package/dist/finance/CompanyProfile.mjs +46 -2
  107. package/dist/finance/CryptoScreener.js +45 -2
  108. package/dist/finance/CryptoScreener.mjs +43 -2
  109. package/dist/finance/Financials.js +52 -2
  110. package/dist/finance/Financials.mjs +50 -2
  111. package/dist/finance/ForexScreener.js +46 -2
  112. package/dist/finance/ForexScreener.mjs +44 -2
  113. package/dist/finance/MarketOverview.js +104 -2
  114. package/dist/finance/MarketOverview.mjs +102 -2
  115. package/dist/finance/NewsTimeline.js +44 -2
  116. package/dist/finance/NewsTimeline.mjs +42 -2
  117. package/dist/finance/OrderEntry.js +131 -1
  118. package/dist/finance/OrderEntry.mjs +129 -1
  119. package/dist/finance/OrdersHistory.js +64 -1
  120. package/dist/finance/OrdersHistory.mjs +62 -1
  121. package/dist/finance/PositionsList.js +80 -1
  122. package/dist/finance/PositionsList.mjs +78 -1
  123. package/dist/finance/StockScreener.js +46 -2
  124. package/dist/finance/StockScreener.mjs +44 -2
  125. package/dist/finance/SymbolInfo.js +46 -2
  126. package/dist/finance/SymbolInfo.mjs +44 -2
  127. package/dist/finance/TechnicalAnalysis.js +54 -2
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -2
  129. package/dist/finance/TickerTape.js +56 -2
  130. package/dist/finance/TickerTape.mjs +54 -2
  131. package/dist/finance/TradingPanel.js +191 -1
  132. package/dist/finance/TradingPanel.mjs +189 -1
  133. package/dist/finance/index.js +930 -2
  134. package/dist/finance/index.mjs +914 -2
  135. package/dist/form/index.js +155 -1
  136. package/dist/form/index.mjs +125 -1
  137. package/dist/form.js +172 -1
  138. package/dist/form.mjs +142 -1
  139. package/dist/hover-card.js +58 -1
  140. package/dist/hover-card.mjs +34 -1
  141. package/dist/index.js +8467 -192
  142. package/dist/index.mjs +8087 -192
  143. package/dist/input-otp.js +79 -1
  144. package/dist/input-otp.mjs +54 -1
  145. package/dist/lib/utils.js +28 -1
  146. package/dist/lib/utils.mjs +24 -1
  147. package/dist/navigation/index.js +98 -1
  148. package/dist/navigation/index.mjs +79 -1
  149. package/dist/navigation-menu.js +149 -1
  150. package/dist/navigation-menu.mjs +116 -1
  151. package/dist/pattern/grid-pattern.js +326 -3
  152. package/dist/pattern/grid-pattern.mjs +303 -3
  153. package/dist/pattern/index.js +326 -3
  154. package/dist/pattern/index.mjs +303 -3
  155. package/dist/popover.js +63 -1
  156. package/dist/popover.mjs +37 -1
  157. package/dist/primitives/index.js +8467 -192
  158. package/dist/primitives/index.mjs +8087 -192
  159. package/dist/primitives-export.js +8467 -192
  160. package/dist/primitives-export.mjs +8087 -192
  161. package/dist/progress.js +62 -1
  162. package/dist/progress.mjs +37 -1
  163. package/dist/project/gantt.js +65 -1
  164. package/dist/project/gantt.mjs +43 -1
  165. package/dist/project/index.js +636 -1
  166. package/dist/project/index.mjs +611 -1
  167. package/dist/project/kanban.js +597 -1
  168. package/dist/project/kanban.mjs +572 -1
  169. package/dist/project/list.js +35 -1
  170. package/dist/project/list.mjs +12 -1
  171. package/dist/radio-group.js +68 -1
  172. package/dist/radio-group.mjs +45 -1
  173. package/dist/resizable.js +72 -1
  174. package/dist/resizable.mjs +48 -1
  175. package/dist/scroll-area.js +89 -1
  176. package/dist/scroll-area.mjs +66 -1
  177. package/dist/select.js +140 -1
  178. package/dist/select.mjs +111 -1
  179. package/dist/separator.js +59 -1
  180. package/dist/separator.mjs +34 -1
  181. package/dist/sheet.js +148 -1
  182. package/dist/sheet.mjs +117 -1
  183. package/dist/skeleton.js +32 -1
  184. package/dist/skeleton.mjs +27 -1
  185. package/dist/slider.js +99 -1
  186. package/dist/slider.mjs +73 -1
  187. package/dist/sonner.js +34 -1
  188. package/dist/sonner.mjs +29 -1
  189. package/dist/switch.js +62 -1
  190. package/dist/switch.mjs +37 -1
  191. package/dist/table.js +110 -1
  192. package/dist/table.mjs +101 -1
  193. package/dist/tabs.js +82 -1
  194. package/dist/tabs.mjs +57 -1
  195. package/dist/tailwind/index.js +2023 -1
  196. package/dist/tailwind/index.mjs +2011 -1
  197. package/dist/textarea.js +78 -1
  198. package/dist/textarea.mjs +56 -1
  199. package/dist/toggle-group.js +118 -1
  200. package/dist/toggle-group.mjs +93 -1
  201. package/dist/toggle.js +71 -1
  202. package/dist/toggle.mjs +48 -1
  203. package/dist/tooltip.js +67 -1
  204. package/dist/tooltip.mjs +40 -1
  205. package/dist/types/index.js +57 -1
  206. package/dist/types/index.mjs +51 -1
  207. package/dist/ui/announcement.js +129 -1
  208. package/dist/ui/announcement.mjs +107 -1
  209. package/dist/ui/avatar-group.js +88 -1
  210. package/dist/ui/avatar-group.mjs +65 -1
  211. package/dist/ui/banner.js +85 -1
  212. package/dist/ui/banner.mjs +62 -1
  213. package/dist/ui/cursor.js +78 -1
  214. package/dist/ui/cursor.mjs +56 -1
  215. package/dist/ui/index.js +475 -1
  216. package/dist/ui/index.mjs +442 -1
  217. package/dist/ui/marquee.js +74 -1
  218. package/dist/ui/marquee.mjs +52 -1
  219. package/dist/ui/pill.js +85 -1
  220. package/dist/ui/pill.mjs +62 -1
  221. package/dist/ui/spinner.js +28 -1
  222. package/dist/ui/spinner.mjs +26 -1
  223. package/dist/ui/tags.js +101 -1
  224. package/dist/ui/tags.mjs +79 -1
  225. package/dist/ui/ticker.js +73 -1
  226. package/dist/ui/ticker.mjs +51 -1
  227. package/dist/util/index.js +457 -1
  228. package/dist/util/index.mjs +399 -1
  229. package/package.json +1 -1
@@ -1 +1,285 @@
1
- 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
+ "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 };
@@ -1 +1,60 @@
1
- '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
+ "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;
@@ -1 +1,38 @@
1
- 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};
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 };