@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.
- package/dist/3d/button.js +298 -0
- package/dist/3d/button.mjs +273 -0
- package/dist/3d/card.js +234 -0
- package/dist/3d/card.mjs +207 -0
- package/dist/3d/carousel.js +371 -0
- package/dist/3d/carousel.mjs +344 -0
- package/dist/3d/grid.js +362 -0
- package/dist/3d/grid.mjs +337 -0
- package/dist/3d/index.js +1518 -0
- package/dist/3d/index.mjs +1472 -0
- package/dist/3d/marquee.js +352 -0
- package/dist/3d/marquee.mjs +327 -0
- package/dist/3d/pin.js +46 -0
- package/dist/3d/pin.mjs +24 -0
- package/dist/accordion.js +80 -0
- package/dist/accordion.mjs +55 -0
- package/dist/alert-dialog.js +220 -0
- package/dist/alert-dialog.mjs +187 -0
- package/dist/alert.js +68 -0
- package/dist/alert.mjs +64 -0
- package/dist/animation/animated-background.js +424 -0
- package/dist/animation/animated-background.mjs +418 -0
- package/dist/animation/animated-beam.js +119 -0
- package/dist/animation/animated-beam.mjs +97 -0
- package/dist/animation/animated-cursor.js +275 -0
- package/dist/animation/animated-cursor.mjs +270 -0
- package/dist/animation/animated-icon.js +357 -0
- package/dist/animation/animated-icon.mjs +351 -0
- package/dist/animation/animated-list.js +339 -0
- package/dist/animation/animated-list.mjs +333 -0
- package/dist/animation/animated-number.js +283 -0
- package/dist/animation/animated-number.mjs +277 -0
- package/dist/animation/animated-testimonials.js +97 -0
- package/dist/animation/animated-testimonials.mjs +75 -0
- package/dist/animation/animated-tooltip.js +67 -0
- package/dist/animation/animated-tooltip.mjs +45 -0
- package/dist/animation/apple-cards-carousel.js +308 -0
- package/dist/animation/apple-cards-carousel.mjs +285 -0
- package/dist/animation/apple-hello-effect.js +60 -0
- package/dist/animation/apple-hello-effect.mjs +38 -0
- package/dist/animation/index.js +1952 -0
- package/dist/animation/index.mjs +1921 -0
- package/dist/avatar.js +71 -0
- package/dist/avatar.mjs +47 -0
- package/dist/badge.js +66 -0
- package/dist/badge.mjs +40 -0
- package/dist/blocks/index.js +1665 -0
- package/dist/blocks/index.mjs +1626 -0
- package/dist/breadcrumb.js +107 -0
- package/dist/breadcrumb.mjs +99 -0
- package/dist/calendar.js +189 -0
- package/dist/calendar.mjs +164 -0
- package/dist/carousel.js +278 -0
- package/dist/carousel.mjs +249 -0
- package/dist/checkbox.js +60 -0
- package/dist/checkbox.mjs +35 -0
- package/dist/code/block.js +226 -0
- package/dist/code/block.mjs +203 -0
- package/dist/code/compare.js +446 -0
- package/dist/code/compare.mjs +423 -0
- package/dist/code/diff.js +430 -0
- package/dist/code/diff.mjs +407 -0
- package/dist/code/editor.js +243 -0
- package/dist/code/editor.mjs +218 -0
- package/dist/code/explorer.js +291 -0
- package/dist/code/explorer.mjs +268 -0
- package/dist/code/index.js +2551 -0
- package/dist/code/index.mjs +2510 -0
- package/dist/code/preview.js +400 -0
- package/dist/code/preview.mjs +377 -0
- package/dist/code/snippet.js +274 -0
- package/dist/code/snippet.mjs +250 -0
- package/dist/code/tabs.js +75 -0
- package/dist/code/tabs.mjs +53 -0
- package/dist/code/terminal.js +437 -0
- package/dist/code/terminal.mjs +414 -0
- package/dist/collapsible.js +33 -0
- package/dist/collapsible.mjs +9 -0
- package/dist/command.js +262 -0
- package/dist/command.mjs +232 -0
- package/dist/context-menu.js +207 -0
- package/dist/context-menu.mjs +171 -0
- package/dist/device/index.js +3 -0
- package/dist/device/index.mjs +2 -0
- package/dist/dialog.js +151 -0
- package/dist/dialog.mjs +121 -0
- package/dist/dock/basic.js +174 -0
- package/dist/dock/basic.mjs +151 -0
- package/dist/dock/index.js +628 -0
- package/dist/dock/index.mjs +601 -0
- package/dist/dock/limelight-nav.js +295 -0
- package/dist/dock/limelight-nav.mjs +274 -0
- package/dist/dock/macos.js +141 -0
- package/dist/dock/macos.mjs +118 -0
- package/dist/dock/menu.js +70 -0
- package/dist/dock/menu.mjs +48 -0
- package/dist/dock/message.js +144 -0
- package/dist/dock/message.mjs +122 -0
- package/dist/drawer.js +115 -0
- package/dist/drawer.mjs +103 -0
- package/dist/dropdown-menu.js +202 -0
- package/dist/dropdown-menu.mjs +166 -0
- package/dist/finance/AdvancedChart.js +48 -0
- package/dist/finance/AdvancedChart.mjs +46 -0
- package/dist/finance/CompanyProfile.js +48 -0
- package/dist/finance/CompanyProfile.mjs +46 -0
- package/dist/finance/CryptoScreener.js +45 -0
- package/dist/finance/CryptoScreener.mjs +43 -0
- package/dist/finance/Financials.js +52 -0
- package/dist/finance/Financials.mjs +50 -0
- package/dist/finance/ForexScreener.js +46 -0
- package/dist/finance/ForexScreener.mjs +44 -0
- package/dist/finance/MarketOverview.js +104 -0
- package/dist/finance/MarketOverview.mjs +102 -0
- package/dist/finance/NewsTimeline.js +44 -0
- package/dist/finance/NewsTimeline.mjs +42 -0
- package/dist/finance/OrderEntry.js +131 -0
- package/dist/finance/OrderEntry.mjs +129 -0
- package/dist/finance/OrdersHistory.js +64 -0
- package/dist/finance/OrdersHistory.mjs +62 -0
- package/dist/finance/PositionsList.js +80 -0
- package/dist/finance/PositionsList.mjs +78 -0
- package/dist/finance/StockScreener.js +46 -0
- package/dist/finance/StockScreener.mjs +44 -0
- package/dist/finance/SymbolInfo.js +46 -0
- package/dist/finance/SymbolInfo.mjs +44 -0
- package/dist/finance/TechnicalAnalysis.js +54 -0
- package/dist/finance/TechnicalAnalysis.mjs +52 -0
- package/dist/finance/TickerTape.js +56 -0
- package/dist/finance/TickerTape.mjs +54 -0
- package/dist/finance/TradingPanel.js +191 -0
- package/dist/finance/TradingPanel.mjs +189 -0
- package/dist/finance/index.js +930 -0
- package/dist/finance/index.mjs +914 -0
- package/dist/form/index.js +155 -0
- package/dist/form/index.mjs +125 -0
- package/dist/form.js +172 -0
- package/dist/form.mjs +142 -0
- package/dist/hover-card.js +58 -0
- package/dist/hover-card.mjs +34 -0
- package/dist/index.js +10179 -0
- package/dist/index.mjs +9785 -0
- package/dist/input-otp.js +79 -0
- package/dist/input-otp.mjs +54 -0
- package/dist/lib/utils.js +28 -0
- package/dist/lib/utils.mjs +24 -0
- package/dist/navigation/index.js +98 -0
- package/dist/navigation/index.mjs +79 -0
- package/dist/navigation-menu.js +149 -0
- package/dist/navigation-menu.mjs +116 -0
- package/dist/pattern/grid-pattern.js +333 -0
- package/dist/pattern/grid-pattern.mjs +310 -0
- package/dist/pattern/index.js +333 -0
- package/dist/pattern/index.mjs +310 -0
- package/dist/popover.js +63 -0
- package/dist/popover.mjs +37 -0
- package/dist/primitives/index.js +10179 -0
- package/dist/primitives/index.mjs +9785 -0
- package/dist/primitives-export.js +10179 -0
- package/dist/primitives-export.mjs +9785 -0
- package/dist/progress.js +62 -0
- package/dist/progress.mjs +37 -0
- package/dist/project/gantt.js +65 -0
- package/dist/project/gantt.mjs +43 -0
- package/dist/project/index.js +636 -0
- package/dist/project/index.mjs +611 -0
- package/dist/project/kanban.js +597 -0
- package/dist/project/kanban.mjs +572 -0
- package/dist/project/list.js +35 -0
- package/dist/project/list.mjs +12 -0
- package/dist/radio-group.js +68 -0
- package/dist/radio-group.mjs +45 -0
- package/dist/resizable.js +72 -0
- package/dist/resizable.mjs +48 -0
- package/dist/scroll-area.js +89 -0
- package/dist/scroll-area.mjs +66 -0
- package/dist/select.js +140 -0
- package/dist/select.mjs +111 -0
- package/dist/separator.js +59 -0
- package/dist/separator.mjs +34 -0
- package/dist/sheet.js +148 -0
- package/dist/sheet.mjs +117 -0
- package/dist/skeleton.js +32 -0
- package/dist/skeleton.mjs +27 -0
- package/dist/slider.js +99 -0
- package/dist/slider.mjs +73 -0
- package/dist/sonner.js +34 -0
- package/dist/sonner.mjs +29 -0
- package/dist/switch.js +62 -0
- package/dist/switch.mjs +37 -0
- package/dist/table.js +110 -0
- package/dist/table.mjs +101 -0
- package/dist/tabs.js +82 -0
- package/dist/tabs.mjs +57 -0
- package/dist/tailwind/index.js +2023 -0
- package/dist/tailwind/index.mjs +2011 -0
- package/dist/textarea.js +78 -0
- package/dist/textarea.mjs +56 -0
- package/dist/toggle-group.js +118 -0
- package/dist/toggle-group.mjs +93 -0
- package/dist/toggle.js +71 -0
- package/dist/toggle.mjs +48 -0
- package/dist/tooltip.js +67 -0
- package/dist/tooltip.mjs +40 -0
- package/dist/types/index.js +57 -0
- package/dist/types/index.mjs +51 -0
- package/dist/ui/announcement.js +129 -0
- package/dist/ui/announcement.mjs +107 -0
- package/dist/ui/avatar-group.js +88 -0
- package/dist/ui/avatar-group.mjs +65 -0
- package/dist/ui/banner.js +85 -0
- package/dist/ui/banner.mjs +62 -0
- package/dist/ui/cursor.js +78 -0
- package/dist/ui/cursor.mjs +56 -0
- package/dist/ui/index.js +475 -0
- package/dist/ui/index.mjs +442 -0
- package/dist/ui/marquee.js +74 -0
- package/dist/ui/marquee.mjs +52 -0
- package/dist/ui/pill.js +85 -0
- package/dist/ui/pill.mjs +62 -0
- package/dist/ui/spinner.js +28 -0
- package/dist/ui/spinner.mjs +26 -0
- package/dist/ui/tags.js +101 -0
- package/dist/ui/tags.mjs +79 -0
- package/dist/ui/ticker.js +73 -0
- package/dist/ui/ticker.mjs +51 -0
- package/dist/util/index.js +463 -0
- package/dist/util/index.mjs +404 -0
- package/package.json +1 -1
|
@@ -0,0 +1,285 @@
|
|
|
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 };
|
|
@@ -0,0 +1,60 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 };
|