@jameskyeong/uix 0.1.6

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/index.js ADDED
@@ -0,0 +1,868 @@
1
+ import { jsx as s, jsxs as v, Fragment as M } from "react/jsx-runtime";
2
+ import { motion as f, useInView as D, AnimatePresence as k } from "motion/react";
3
+ import { forwardRef as c, useState as y, useEffect as w, useRef as S, createContext as T, useLayoutEffect as R, useContext as C, useId as V } from "react";
4
+ import { clsx as h } from "clsx";
5
+ import { twMerge as A } from "tailwind-merge";
6
+ import { Check as $, Copy as j, ChevronUp as G } from "lucide-react";
7
+ import { codeToHtml as X } from "shiki";
8
+ import { createPortal as O } from "react-dom";
9
+ function u(...e) {
10
+ return A(h(e));
11
+ }
12
+ const L = c(
13
+ ({ className: e, variant: t = "default", size: r = "sm", children: i, ...n }, o) => {
14
+ const a = t === "default" ? "uix-convex-colored-sm" : "uix-convex-sm", l = {
15
+ default: "bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",
16
+ secondary: "bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",
17
+ outline: "border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"
18
+ }, x = {
19
+ sm: "px-2 py-0.5 text-xs",
20
+ md: "px-2.5 py-1 text-sm"
21
+ }, { onDrag: g, onDragStart: d, onDragEnd: b, ...m } = n;
22
+ return /* @__PURE__ */ s(
23
+ f.span,
24
+ {
25
+ ref: o,
26
+ className: u(
27
+ "inline-flex items-center rounded-xl font-medium",
28
+ a,
29
+ l[t],
30
+ x[r],
31
+ e
32
+ ),
33
+ whileHover: { scale: 1.05 },
34
+ whileTap: { scale: 0.97 },
35
+ transition: {
36
+ type: "tween",
37
+ duration: 0.1,
38
+ ease: "linear"
39
+ },
40
+ ...m,
41
+ children: i
42
+ }
43
+ );
44
+ }
45
+ );
46
+ L.displayName = "Badge";
47
+ const F = c(
48
+ ({ className: e, variant: t, color: r = "prime", size: i = "md", children: n, ...o }, a) => {
49
+ const x = `inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${t === "filled" ? "uix-convex-colored-sm" : "uix-convex-sm"}`, g = "bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80", d = {
50
+ prime: "bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",
51
+ sub1: "bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",
52
+ sub2: "bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"
53
+ }, b = {
54
+ prime: "border border-uix-prime-300/50 text-uix-prime-300 bg-uix-surface-100/20 hover:bg-uix-prime-300 hover:text-uix-white-100 hover:border-transparent",
55
+ sub1: "border border-uix-sub1-300/50 text-uix-sub1-300 bg-uix-surface-100/20 hover:bg-uix-sub1-300 hover:text-uix-white-100 hover:border-transparent",
56
+ sub2: "border border-uix-sub2-300/50 text-uix-sub2-400 bg-uix-surface-100/20 hover:bg-uix-sub2-300 hover:text-uix-black-300 hover:border-transparent"
57
+ }, m = {
58
+ prime: "bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",
59
+ sub1: "bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",
60
+ sub2: "bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"
61
+ }, p = {
62
+ filled: d[r],
63
+ outline: b[r],
64
+ ghost: m[r]
65
+ }, N = {
66
+ sm: "px-4 py-2 text-sm",
67
+ md: "px-6 py-3 text-base",
68
+ lg: "px-8 py-4 text-lg"
69
+ }, _ = t ? p[t] : g;
70
+ return /* @__PURE__ */ s(
71
+ f.button,
72
+ {
73
+ ref: a,
74
+ className: u(x, _, N[i], e),
75
+ whileHover: {
76
+ scale: 1.03,
77
+ y: -1
78
+ },
79
+ whileTap: {
80
+ scale: 0.96
81
+ },
82
+ transition: {
83
+ duration: 0.06,
84
+ ease: [0, 0, 1, 1]
85
+ },
86
+ ...o,
87
+ children: n
88
+ }
89
+ );
90
+ }
91
+ );
92
+ F.displayName = "Button";
93
+ const U = c(
94
+ ({ className: e, children: t, hover: r = !0, accentColor: i = "none", accentPosition: n = "none", ...o }, a) => {
95
+ const l = {
96
+ prime: "bg-uix-prime-300",
97
+ sub1: "bg-uix-sub1-300",
98
+ sub2: "bg-uix-sub2-300",
99
+ none: ""
100
+ };
101
+ return /* @__PURE__ */ v(
102
+ f.div,
103
+ {
104
+ ref: a,
105
+ className: u(
106
+ "relative bg-uix-surface-100/80 backdrop-blur-xl backdrop-saturate-150 uix-glass-border rounded-[2rem] overflow-hidden uix-convex",
107
+ e
108
+ ),
109
+ initial: !1,
110
+ whileHover: r ? {
111
+ y: -4,
112
+ scale: 1.01
113
+ } : void 0,
114
+ transition: {
115
+ type: "tween",
116
+ duration: 0.15,
117
+ ease: "linear"
118
+ },
119
+ ...o,
120
+ children: [
121
+ n === "top" && i !== "none" && /* @__PURE__ */ s("div", { className: u("absolute top-0 left-0 right-0 h-1", l[i]) }),
122
+ n === "left" && i !== "none" && /* @__PURE__ */ s("div", { className: u("absolute top-0 left-0 bottom-0 w-1", l[i]) }),
123
+ t
124
+ ]
125
+ }
126
+ );
127
+ }
128
+ );
129
+ U.displayName = "Card";
130
+ const W = c(
131
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("p-6 xl:p-8", e), ...r, children: t })
132
+ );
133
+ W.displayName = "CardContent";
134
+ const Y = c(
135
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("flex items-center gap-4 mb-4", e), ...r, children: t })
136
+ );
137
+ Y.displayName = "CardHeader";
138
+ const q = c(
139
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
140
+ "h3",
141
+ {
142
+ ref: i,
143
+ className: u("text-xl xl:text-2xl font-bold text-uix-text-100", e),
144
+ ...r,
145
+ children: t
146
+ }
147
+ )
148
+ );
149
+ q.displayName = "CardTitle";
150
+ const J = c(
151
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("p", { ref: i, className: u("text-uix-gray-200 leading-relaxed", e), ...r, children: t })
152
+ );
153
+ J.displayName = "CardDescription";
154
+ const K = c(
155
+ ({ className: e, code: t, language: r = "tsx", showLineNumbers: i = !1, ...n }, o) => {
156
+ const [a, l] = y(!1), [x, g] = y("");
157
+ w(() => {
158
+ (async () => {
159
+ const m = await X(t.trim(), {
160
+ lang: r,
161
+ theme: "github-dark"
162
+ });
163
+ g(m);
164
+ })();
165
+ }, [t, r]);
166
+ const d = async () => {
167
+ await navigator.clipboard.writeText(t.trim()), l(!0), setTimeout(() => l(!1), 2e3);
168
+ };
169
+ return /* @__PURE__ */ v(
170
+ "div",
171
+ {
172
+ ref: o,
173
+ className: u(
174
+ "relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",
175
+ e
176
+ ),
177
+ ...n,
178
+ children: [
179
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between px-4 py-2 border-b border-uix-black-200", children: [
180
+ /* @__PURE__ */ s(L, { variant: "secondary", size: "sm", children: r }),
181
+ /* @__PURE__ */ s(
182
+ "button",
183
+ {
184
+ type: "button",
185
+ onClick: d,
186
+ className: "p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors",
187
+ "aria-label": "Copy code",
188
+ children: a ? /* @__PURE__ */ s($, { size: 14, className: "text-green-400" }) : /* @__PURE__ */ s(j, { size: 14, className: "text-uix-gray-100" })
189
+ }
190
+ )
191
+ ] }),
192
+ /* @__PURE__ */ s(
193
+ "div",
194
+ {
195
+ className: u(
196
+ "p-4 overflow-x-auto text-sm",
197
+ "[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0",
198
+ "[&_code]:!bg-transparent",
199
+ i && "[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"
200
+ ),
201
+ dangerouslySetInnerHTML: { __html: x }
202
+ }
203
+ )
204
+ ]
205
+ }
206
+ );
207
+ }
208
+ );
209
+ K.displayName = "CodeBlock";
210
+ const Q = {
211
+ prime: "var(--uix-prime-300)",
212
+ sub1: "var(--uix-sub1-300)",
213
+ sub2: "var(--uix-sub2-300)"
214
+ }, Z = {
215
+ prime: "bg-gradient-to-br from-uix-prime-400 via-uix-prime-300 to-uix-prime-400",
216
+ sub1: "bg-gradient-to-br from-uix-sub1-400 via-uix-sub1-300 to-uix-sub1-400",
217
+ sub2: "bg-gradient-to-br from-uix-sub2-400 via-uix-sub2-300 to-uix-sub2-400"
218
+ };
219
+ function He({
220
+ children: e,
221
+ className: t = "",
222
+ color: r = "prime",
223
+ gradient: i = !1,
224
+ delay: n = 0,
225
+ charDelay: o = 0.04
226
+ }) {
227
+ const a = S(null), l = D(a, { once: !0, margin: "-50px" }), [x, g] = y(!1), d = 1, b = e.length, m = d + n + b * o + 0.25;
228
+ return w(() => {
229
+ if (i && l && !x) {
230
+ const p = setTimeout(() => {
231
+ g(!0);
232
+ }, m * 1e3);
233
+ return () => clearTimeout(p);
234
+ }
235
+ }, [i, l, x, m]), i && x ? /* @__PURE__ */ s(
236
+ "span",
237
+ {
238
+ ref: a,
239
+ className: `inline-block bg-clip-text text-transparent ${Z[r]} ${t}`,
240
+ children: e
241
+ }
242
+ ) : /* @__PURE__ */ s("span", { ref: a, className: `inline-block ${t}`, children: e.split("").map((p, N) => /* @__PURE__ */ s(
243
+ f.span,
244
+ {
245
+ className: "inline-block",
246
+ style: { color: "var(--uix-text-100)" },
247
+ animate: l ? {
248
+ color: Q[r]
249
+ } : {},
250
+ transition: {
251
+ duration: 0.25,
252
+ delay: d + n + N * o,
253
+ ease: [0.1, 0.1, 0.9, 0.9]
254
+ },
255
+ children: p === " " ? " " : p
256
+ },
257
+ N
258
+ )) });
259
+ }
260
+ const H = T(null);
261
+ function E() {
262
+ const e = C(H);
263
+ if (!e)
264
+ throw new Error("Dropdown components must be used within a Dropdown");
265
+ return e;
266
+ }
267
+ function ze({
268
+ children: e,
269
+ open: t,
270
+ onOpenChange: r,
271
+ className: i,
272
+ ...n
273
+ }) {
274
+ const [o, a] = y(!1), l = S(null), x = t ?? o, g = (d) => {
275
+ a(d), r == null || r(d);
276
+ };
277
+ return /* @__PURE__ */ s(H.Provider, { value: { open: x, setOpen: g, triggerRef: l }, children: /* @__PURE__ */ s("div", { className: h("relative inline-block", i), ...n, children: e }) });
278
+ }
279
+ function Ie({ children: e, className: t, onClick: r, ...i }) {
280
+ const { open: n, setOpen: o, triggerRef: a } = E();
281
+ return /* @__PURE__ */ v(
282
+ "button",
283
+ {
284
+ ref: a,
285
+ type: "button",
286
+ className: h(
287
+ "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-sm font-medium",
288
+ "uix-glass uix-glass-border uix-convex-sm",
289
+ "text-uix-text-200 hover:text-uix-text-100 transition-colors",
290
+ t
291
+ ),
292
+ onClick: (l) => {
293
+ o(!n), r == null || r(l);
294
+ },
295
+ "aria-expanded": n,
296
+ "aria-haspopup": "true",
297
+ ...i,
298
+ children: [
299
+ e,
300
+ /* @__PURE__ */ s(
301
+ "svg",
302
+ {
303
+ className: h("w-3.5 h-3.5 transition-transform duration-200", n && "rotate-180"),
304
+ fill: "none",
305
+ viewBox: "0 0 24 24",
306
+ stroke: "currentColor",
307
+ strokeWidth: 2,
308
+ "aria-hidden": "true",
309
+ children: /* @__PURE__ */ s("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
310
+ }
311
+ )
312
+ ]
313
+ }
314
+ );
315
+ }
316
+ function Pe({ children: e, className: t, align: r = "start" }) {
317
+ const { open: i, setOpen: n, triggerRef: o } = E(), a = S(null), [l, x] = y({ top: 0, left: 0 });
318
+ R(() => {
319
+ if (!i || !o.current) return;
320
+ const d = () => {
321
+ var p;
322
+ const b = (p = o.current) == null ? void 0 : p.getBoundingClientRect();
323
+ if (!b) return;
324
+ let m = b.left;
325
+ r === "center" ? m = b.left + b.width / 2 : r === "end" && (m = b.right), x({
326
+ top: b.bottom + 8,
327
+ // mt-2 equivalent
328
+ left: m
329
+ });
330
+ };
331
+ return d(), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
332
+ window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
333
+ };
334
+ }, [i, o, r]), w(() => {
335
+ if (!i) return;
336
+ const d = (m) => {
337
+ a.current && !a.current.contains(m.target) && o.current && !o.current.contains(m.target) && n(!1);
338
+ }, b = (m) => {
339
+ var p;
340
+ m.key === "Escape" && (n(!1), (p = o.current) == null || p.focus());
341
+ };
342
+ return document.addEventListener("mousedown", d), document.addEventListener("keydown", b), () => {
343
+ document.removeEventListener("mousedown", d), document.removeEventListener("keydown", b);
344
+ };
345
+ }, [i, n, o]);
346
+ const g = {
347
+ start: { transform: "translateX(0)" },
348
+ center: { transform: "translateX(-50%)" },
349
+ end: { transform: "translateX(-100%)" }
350
+ };
351
+ return typeof document > "u" ? null : O(
352
+ /* @__PURE__ */ s(k, { children: i && /* @__PURE__ */ s(
353
+ f.div,
354
+ {
355
+ ref: a,
356
+ initial: { opacity: 0, y: -8 },
357
+ animate: { opacity: 1, y: 0 },
358
+ exit: { opacity: 0, y: -8 },
359
+ transition: {
360
+ type: "spring",
361
+ stiffness: 400,
362
+ damping: 25,
363
+ mass: 0.8
364
+ },
365
+ className: h(
366
+ "fixed z-50 min-w-[180px]",
367
+ "uix-glass uix-glass-border uix-convex uix-glass-noise rounded-2xl",
368
+ "p-1.5 shadow-xl",
369
+ t
370
+ ),
371
+ style: {
372
+ top: l.top,
373
+ left: l.left,
374
+ ...g[r]
375
+ },
376
+ role: "menu",
377
+ children: e
378
+ }
379
+ ) }),
380
+ document.body
381
+ );
382
+ }
383
+ function Be({
384
+ children: e,
385
+ className: t,
386
+ disabled: r,
387
+ onClick: i,
388
+ ...n
389
+ }) {
390
+ const { setOpen: o } = E();
391
+ return /* @__PURE__ */ s(
392
+ "button",
393
+ {
394
+ type: "button",
395
+ role: "menuitem",
396
+ disabled: r,
397
+ className: h(
398
+ "w-full flex items-center gap-2 px-3 py-2 rounded-xl text-sm text-left",
399
+ "transition-colors duration-100",
400
+ r ? "text-uix-text-300 cursor-not-allowed" : "text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",
401
+ t
402
+ ),
403
+ onClick: (a) => {
404
+ r || (i == null || i(a), o(!1));
405
+ },
406
+ ...n,
407
+ children: e
408
+ }
409
+ );
410
+ }
411
+ function _e({ className: e, ...t }) {
412
+ return /* @__PURE__ */ s("hr", { className: h("my-1.5 h-px border-0 bg-uix-border-100", e), ...t });
413
+ }
414
+ const z = c(
415
+ ({ className: e, orientation: t = "vertical", children: r, ...i }, n) => /* @__PURE__ */ s(
416
+ "div",
417
+ {
418
+ ref: n,
419
+ className: u(
420
+ "relative",
421
+ {
422
+ vertical: "overflow-y-auto overflow-x-hidden",
423
+ horizontal: "overflow-x-auto overflow-y-hidden",
424
+ both: "overflow-auto"
425
+ }[t],
426
+ // Custom scrollbar styling
427
+ "[&::-webkit-scrollbar]:w-2",
428
+ "[&::-webkit-scrollbar-track]:bg-transparent",
429
+ "[&::-webkit-scrollbar-thumb]:bg-uix-gray-300/50",
430
+ "[&::-webkit-scrollbar-thumb]:rounded-full",
431
+ "[&::-webkit-scrollbar-thumb]:hover:bg-uix-gray-300",
432
+ e
433
+ ),
434
+ ...i,
435
+ children: r
436
+ }
437
+ )
438
+ );
439
+ z.displayName = "ScrollArea";
440
+ function Me({ threshold: e = 500, className: t }) {
441
+ const [r, i] = y(!1);
442
+ w(() => {
443
+ const o = () => {
444
+ i(window.scrollY > e);
445
+ };
446
+ return window.addEventListener("scroll", o, { passive: !0 }), () => window.removeEventListener("scroll", o);
447
+ }, [e]);
448
+ const n = () => {
449
+ window.scrollTo({ top: 0, behavior: "smooth" });
450
+ };
451
+ return /* @__PURE__ */ s(k, { children: r && /* @__PURE__ */ s(
452
+ f.button,
453
+ {
454
+ initial: { opacity: 0, scale: 0.5, y: 20 },
455
+ animate: { opacity: 1, scale: 1, y: 0 },
456
+ exit: { opacity: 0, scale: 0.5, y: 20 },
457
+ whileHover: { scale: 1.1, y: -2 },
458
+ whileTap: { scale: 0.9 },
459
+ transition: {
460
+ default: {
461
+ type: "spring",
462
+ stiffness: 300,
463
+ damping: 20,
464
+ mass: 0.8
465
+ },
466
+ scale: {
467
+ duration: 0.06,
468
+ ease: [0, 0, 1, 1]
469
+ }
470
+ },
471
+ onClick: n,
472
+ className: u(
473
+ "fixed bottom-6 right-6 z-50 p-3 rounded-full bg-uix-prime-300 backdrop-blur-sm text-uix-white-100 hover:bg-uix-prime-400 cursor-pointer uix-convex-colored",
474
+ t
475
+ ),
476
+ "aria-label": "Scroll to top",
477
+ children: /* @__PURE__ */ s(G, { size: 24 })
478
+ }
479
+ ) });
480
+ }
481
+ const ee = c(
482
+ ({ className: e, children: t, variant: r = "default", container: i = !0, animate: n = !0, id: o, ...a }, l) => {
483
+ const x = S(null), g = D(x, { once: !0, margin: "-100px" }), d = "backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex", b = {
484
+ default: `bg-uix-surface-200/50 ${d}`,
485
+ secondary: `bg-uix-surface-300/50 ${d}`,
486
+ accent: `bg-uix-prime-300/60 ${d} text-uix-white-100`
487
+ }, m = i ? /* @__PURE__ */ s("div", { className: "max-w-4xl mx-auto px-6 xl:px-12", children: t }) : t;
488
+ return /* @__PURE__ */ s(
489
+ "section",
490
+ {
491
+ ref: (p) => {
492
+ x.current = p, typeof l == "function" ? l(p) : l && (l.current = p);
493
+ },
494
+ id: o,
495
+ className: u("relative py-16 xl:py-24 rounded-[2.5rem]", b[r], e),
496
+ ...a,
497
+ children: n ? /* @__PURE__ */ s(
498
+ f.div,
499
+ {
500
+ initial: { opacity: 0, y: 40 },
501
+ animate: g ? { opacity: 1, y: 0 } : { opacity: 0, y: 40 },
502
+ transition: {
503
+ type: "spring",
504
+ stiffness: 200,
505
+ damping: 25,
506
+ mass: 1
507
+ },
508
+ children: m
509
+ }
510
+ ) : m
511
+ }
512
+ );
513
+ }
514
+ );
515
+ ee.displayName = "Section";
516
+ const te = c(
517
+ ({ className: e, children: t, subtitle: r, ...i }, n) => /* @__PURE__ */ v("div", { className: "text-center mb-14 xl:mb-20", children: [
518
+ /* @__PURE__ */ s(
519
+ "h2",
520
+ {
521
+ ref: n,
522
+ className: u(
523
+ "text-4xl xl:text-6xl font-bold text-uix-text-100 mb-6 tracking-tight",
524
+ e
525
+ ),
526
+ ...i,
527
+ children: t
528
+ }
529
+ ),
530
+ r && /* @__PURE__ */ s("p", { className: "text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed", children: r })
531
+ ] })
532
+ );
533
+ te.displayName = "SectionTitle";
534
+ const I = T(null), re = () => {
535
+ const e = C(I);
536
+ if (!e)
537
+ throw new Error("Sheet components must be used within a Sheet provider");
538
+ return e;
539
+ }, ie = ({ open: e, onOpenChange: t, children: r }) => (w(() => {
540
+ const i = (n) => {
541
+ n.key === "Escape" && e && t(!1);
542
+ };
543
+ return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
544
+ }, [e, t]), w(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
545
+ document.body.style.overflow = "";
546
+ }), [e]), /* @__PURE__ */ s(I.Provider, { value: { open: e, onOpenChange: t }, children: r }));
547
+ ie.displayName = "Sheet";
548
+ const se = c(
549
+ ({ className: e, side: t = "left", children: r }, i) => {
550
+ const { open: n, onOpenChange: o } = re(), a = {
551
+ left: {
552
+ initial: { x: "-100%" },
553
+ animate: { x: 0 },
554
+ exit: { x: "-100%" }
555
+ },
556
+ right: {
557
+ initial: { x: "100%" },
558
+ animate: { x: 0 },
559
+ exit: { x: "100%" }
560
+ }
561
+ }, l = {
562
+ left: "left-0",
563
+ right: "right-0"
564
+ };
565
+ return /* @__PURE__ */ s(k, { children: n && /* @__PURE__ */ v(M, { children: [
566
+ /* @__PURE__ */ s(
567
+ f.div,
568
+ {
569
+ initial: { opacity: 0 },
570
+ animate: { opacity: 1 },
571
+ exit: { opacity: 0 },
572
+ transition: { duration: 0.2 },
573
+ className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
574
+ onClick: () => o(!1)
575
+ }
576
+ ),
577
+ /* @__PURE__ */ s(
578
+ f.div,
579
+ {
580
+ ref: i,
581
+ initial: a[t].initial,
582
+ animate: a[t].animate,
583
+ exit: a[t].exit,
584
+ transition: { type: "spring", damping: 25, stiffness: 300 },
585
+ className: u(
586
+ "fixed top-0 z-50 h-full w-72 bg-uix-surface-100/90 backdrop-blur-xl backdrop-saturate-150 border-r border-black/[0.3] dark:border-white/[0.03] rounded-r-3xl uix-convex-lg",
587
+ l[t],
588
+ e
589
+ ),
590
+ children: r
591
+ }
592
+ )
593
+ ] }) });
594
+ }
595
+ );
596
+ se.displayName = "SheetContent";
597
+ const ne = c(
598
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
599
+ "div",
600
+ {
601
+ ref: i,
602
+ className: u("flex flex-col gap-2 p-6 border-b border-uix-border-100", e),
603
+ ...r,
604
+ children: t
605
+ }
606
+ )
607
+ );
608
+ ne.displayName = "SheetHeader";
609
+ const oe = c(
610
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("h2", { ref: i, className: u("text-lg font-semibold text-uix-text-100", e), ...r, children: t })
611
+ );
612
+ oe.displayName = "SheetTitle";
613
+ const ae = "relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl", le = c(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
614
+ "aside",
615
+ {
616
+ ref: i,
617
+ className: u("hidden xl:flex flex-col w-60 h-full", ae, e),
618
+ ...r,
619
+ children: t
620
+ }
621
+ ));
622
+ le.displayName = "Sidebar";
623
+ const ue = c(
624
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("flex flex-col gap-1 p-6", e), ...r, children: t })
625
+ );
626
+ ue.displayName = "SidebarHeader";
627
+ const ce = c(
628
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(z, { ref: i, className: u("flex-1 p-4", e), ...r, children: t })
629
+ );
630
+ ce.displayName = "SidebarContent";
631
+ const de = c(
632
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("mb-6", e), ...r, children: t })
633
+ );
634
+ de.displayName = "SidebarGroup";
635
+ const xe = c(
636
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
637
+ "div",
638
+ {
639
+ ref: i,
640
+ className: u(
641
+ "px-3 mb-3 text-xs font-semibold uppercase tracking-widest text-uix-sub1-300/80",
642
+ e
643
+ ),
644
+ ...r,
645
+ children: t
646
+ }
647
+ )
648
+ );
649
+ xe.displayName = "SidebarGroupLabel";
650
+ const me = c(
651
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("ul", { ref: i, className: u("space-y-1", e), ...r, children: t })
652
+ );
653
+ me.displayName = "SidebarMenu";
654
+ const be = c(
655
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("li", { ref: i, className: u("", e), ...r, children: t })
656
+ );
657
+ be.displayName = "SidebarMenuItem";
658
+ const pe = c(
659
+ ({ className: e, isActive: t = !1, children: r, ...i }, n) => {
660
+ const { onDrag: o, onDragStart: a, onDragEnd: l, ...x } = i;
661
+ return /* @__PURE__ */ v(
662
+ f.button,
663
+ {
664
+ ref: n,
665
+ type: "button",
666
+ className: u(
667
+ "relative flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-base font-medium",
668
+ "hover:bg-uix-surface-300/50 hover:text-uix-text-100",
669
+ t ? "text-uix-prime-300 bg-uix-prime-100/15" : "text-uix-text-300",
670
+ e
671
+ ),
672
+ whileHover: { x: 4, scale: 1.01 },
673
+ whileTap: { scale: 0.97 },
674
+ transition: {
675
+ duration: 0.08,
676
+ ease: [0, 0, 1, 1]
677
+ },
678
+ ...x,
679
+ children: [
680
+ t && /* @__PURE__ */ s(
681
+ f.span,
682
+ {
683
+ className: "absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",
684
+ layoutId: "sidebar-active-indicator",
685
+ transition: {
686
+ type: "spring",
687
+ stiffness: 300,
688
+ damping: 20,
689
+ mass: 0.8
690
+ }
691
+ }
692
+ ),
693
+ r
694
+ ]
695
+ }
696
+ );
697
+ }
698
+ );
699
+ pe.displayName = "SidebarMenuButton";
700
+ const fe = c(
701
+ ({ className: e, variant: t = "default", rounded: r = "3xl", children: i, ...n }, o) => {
702
+ const a = "relative uix-glass uix-glass-border uix-convex uix-glass-noise", l = {
703
+ default: "",
704
+ subtle: "uix-convex-subtle",
705
+ strong: "uix-convex-lg"
706
+ }, x = {
707
+ none: "rounded-none",
708
+ sm: "rounded-lg",
709
+ md: "rounded-xl",
710
+ lg: "rounded-2xl",
711
+ xl: "rounded-[1.5rem]",
712
+ "2xl": "rounded-[2rem]",
713
+ "3xl": "rounded-3xl",
714
+ full: "rounded-full"
715
+ };
716
+ return /* @__PURE__ */ s(
717
+ "div",
718
+ {
719
+ ref: o,
720
+ className: u(a, l[t], x[r], e),
721
+ ...n,
722
+ children: i
723
+ }
724
+ );
725
+ }
726
+ );
727
+ fe.displayName = "Surface";
728
+ const P = T(null), B = () => {
729
+ const e = C(P);
730
+ if (!e)
731
+ throw new Error("Tabs components must be used within a Tabs provider");
732
+ return e;
733
+ }, ge = c(
734
+ ({ className: e, defaultValue: t, children: r, ...i }, n) => {
735
+ const [o, a] = y(t), l = V();
736
+ return /* @__PURE__ */ s(P.Provider, { value: { activeTab: o, setActiveTab: a, tabsId: l }, children: /* @__PURE__ */ s("div", { ref: n, className: u("w-full", e), ...i, children: r }) });
737
+ }
738
+ );
739
+ ge.displayName = "Tabs";
740
+ const ve = c(
741
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
742
+ "div",
743
+ {
744
+ ref: i,
745
+ className: u(
746
+ "inline-flex items-center gap-1 rounded-2xl bg-uix-surface-300/50 backdrop-blur-xl backdrop-saturate-150 uix-glass-border p-1.5 uix-convex",
747
+ e
748
+ ),
749
+ ...r,
750
+ children: t
751
+ }
752
+ )
753
+ );
754
+ ve.displayName = "TabsList";
755
+ const ye = c(
756
+ ({ className: e, value: t, children: r, ...i }, n) => {
757
+ const { activeTab: o, setActiveTab: a, tabsId: l } = B(), x = o === t, { onDrag: g, onDragStart: d, onDragEnd: b, ...m } = i;
758
+ return /* @__PURE__ */ v(
759
+ f.button,
760
+ {
761
+ ref: n,
762
+ type: "button",
763
+ onClick: () => a(t),
764
+ className: u(
765
+ "relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl",
766
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",
767
+ x ? "text-uix-text-100" : "text-uix-text-300 hover:text-uix-text-100",
768
+ e
769
+ ),
770
+ whileHover: { scale: 1.02 },
771
+ whileTap: { scale: 0.96 },
772
+ transition: {
773
+ duration: 0.06,
774
+ ease: [0, 0, 1, 1]
775
+ },
776
+ ...m,
777
+ children: [
778
+ x && /* @__PURE__ */ s(
779
+ f.span,
780
+ {
781
+ layoutId: `tabs-indicator-${l}`,
782
+ className: "absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",
783
+ transition: {
784
+ type: "spring",
785
+ stiffness: 300,
786
+ damping: 20,
787
+ mass: 0.8
788
+ }
789
+ }
790
+ ),
791
+ /* @__PURE__ */ s("span", { className: "relative z-10", children: r })
792
+ ]
793
+ }
794
+ );
795
+ }
796
+ );
797
+ ye.displayName = "TabsTrigger";
798
+ const he = c(
799
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("relative mt-4", e), ...r, children: /* @__PURE__ */ s("div", { className: "grid [&>*]:col-start-1 [&>*]:row-start-1", children: t }) })
800
+ );
801
+ he.displayName = "TabsPanels";
802
+ const we = c(
803
+ ({ className: e, value: t, children: r, ...i }, n) => {
804
+ const { activeTab: o } = B(), a = o === t;
805
+ return /* @__PURE__ */ s(
806
+ f.div,
807
+ {
808
+ ref: n,
809
+ className: u(e),
810
+ initial: !1,
811
+ animate: {
812
+ opacity: a ? 1 : 0,
813
+ scale: a ? 1 : 0.98,
814
+ y: a ? 0 : 8,
815
+ visibility: a ? "visible" : "hidden"
816
+ },
817
+ transition: {
818
+ type: "spring",
819
+ stiffness: 400,
820
+ damping: 25,
821
+ mass: 0.8
822
+ },
823
+ "aria-hidden": !a,
824
+ children: /* @__PURE__ */ s("div", { ...i, children: r })
825
+ }
826
+ );
827
+ }
828
+ );
829
+ we.displayName = "TabsContent";
830
+ export {
831
+ L as Badge,
832
+ F as Button,
833
+ U as Card,
834
+ W as CardContent,
835
+ J as CardDescription,
836
+ Y as CardHeader,
837
+ q as CardTitle,
838
+ K as CodeBlock,
839
+ He as ColorSwipeText,
840
+ ze as Dropdown,
841
+ Pe as DropdownContent,
842
+ Be as DropdownItem,
843
+ _e as DropdownSeparator,
844
+ Ie as DropdownTrigger,
845
+ z as ScrollArea,
846
+ Me as ScrollToTop,
847
+ ee as Section,
848
+ te as SectionTitle,
849
+ ie as Sheet,
850
+ se as SheetContent,
851
+ ne as SheetHeader,
852
+ oe as SheetTitle,
853
+ le as Sidebar,
854
+ ce as SidebarContent,
855
+ de as SidebarGroup,
856
+ xe as SidebarGroupLabel,
857
+ ue as SidebarHeader,
858
+ me as SidebarMenu,
859
+ pe as SidebarMenuButton,
860
+ be as SidebarMenuItem,
861
+ fe as Surface,
862
+ ge as Tabs,
863
+ we as TabsContent,
864
+ ve as TabsList,
865
+ he as TabsPanels,
866
+ ye as TabsTrigger,
867
+ u as cn
868
+ };