@jameskyeong/uix 0.1.7 → 0.1.10
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.cjs +1 -1
- package/dist/index.d.ts +4 -12
- package/dist/index.js +675 -732
- package/dist/styles.css +14 -13
- package/package.json +14 -6
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as H, Fragment as xe } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as J } from "clsx";
|
|
3
|
-
import { AnimatePresence as It, motion as
|
|
4
|
-
import i, { forwardRef as
|
|
3
|
+
import { AnimatePresence as It, motion as j, useInView as Ut } from "motion/react";
|
|
4
|
+
import i, { forwardRef as N, createContext as yt, useState as nt, useContext as wt, useEffect as lt, useRef as mt, useLayoutEffect as be, useCallback as ge, useId as he } from "react";
|
|
5
5
|
import { twMerge as ve } from "tailwind-merge";
|
|
6
|
-
import { Check as ye, Copy as we, Upload as Ne, ChevronUp as
|
|
7
|
-
import { codeToHtml as
|
|
8
|
-
import
|
|
6
|
+
import { Check as ye, Copy as we, Upload as Ne, ChevronUp as Te } from "lucide-react";
|
|
7
|
+
import { codeToHtml as ke } from "shiki";
|
|
8
|
+
import Ee, { createPortal as Se } from "react-dom";
|
|
9
9
|
const Wt = yt(null), Kt = yt(null), Gt = () => {
|
|
10
10
|
const n = wt(Wt);
|
|
11
11
|
if (!n)
|
|
@@ -16,25 +16,25 @@ const Wt = yt(null), Kt = yt(null), Gt = () => {
|
|
|
16
16
|
if (!n)
|
|
17
17
|
throw new Error("AccordionTrigger/Content must be used within an AccordionItem");
|
|
18
18
|
return n;
|
|
19
|
-
}, De =
|
|
20
|
-
({ children: n, className: s, multiple: t = !0, defaultValue: a = [], ...l },
|
|
21
|
-
const [c, d] =
|
|
22
|
-
d((
|
|
23
|
-
const e = new Set(
|
|
19
|
+
}, De = N(
|
|
20
|
+
({ children: n, className: s, multiple: t = !0, defaultValue: a = [], ...l }, o) => {
|
|
21
|
+
const [c, d] = nt(() => new Set(a)), p = (u) => {
|
|
22
|
+
d((m) => {
|
|
23
|
+
const e = new Set(m);
|
|
24
24
|
return e.has(u) ? e.delete(u) : (t || e.clear(), e.add(u)), e;
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ r(Wt.Provider, { value: { openItems: c, toggle: p, multiple: t }, children: /* @__PURE__ */ r("div", { ref: o, className: J("space-y-2", s), ...l, children: n }) });
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
De.displayName = "Accordion";
|
|
31
|
-
const Ce =
|
|
32
|
-
({ children: n, className: s, value: t, disabled: a = !1, ...l },
|
|
31
|
+
const Ce = N(
|
|
32
|
+
({ children: n, className: s, value: t, disabled: a = !1, ...l }, o) => {
|
|
33
33
|
const { openItems: c } = Gt(), d = c.has(t);
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ r(Kt.Provider, { value: { value: t, isOpen: d, disabled: a }, children: /* @__PURE__ */ r(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
37
|
+
ref: o,
|
|
38
38
|
className: J(
|
|
39
39
|
"border border-black/5 dark:border-white/5 rounded-xl overflow-hidden",
|
|
40
40
|
a && "opacity-50",
|
|
@@ -47,16 +47,16 @@ const Ce = T(
|
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
Ce.displayName = "AccordionItem";
|
|
50
|
-
const Ie =
|
|
50
|
+
const Ie = N(
|
|
51
51
|
({ children: n, className: s, ...t }, a) => {
|
|
52
|
-
const { toggle: l } = Gt(), { value:
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
const { toggle: l } = Gt(), { value: o, isOpen: c, disabled: d } = qt();
|
|
53
|
+
return /* @__PURE__ */ r(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
56
|
ref: a,
|
|
57
57
|
type: "button",
|
|
58
58
|
disabled: d,
|
|
59
|
-
onClick: () => !d && l(
|
|
59
|
+
onClick: () => !d && l(o),
|
|
60
60
|
className: J(
|
|
61
61
|
"w-full flex items-center justify-between px-4 py-3 text-left transition-colors",
|
|
62
62
|
c ? "bg-uix-surface-200/50" : "hover:bg-uix-surface-200/30",
|
|
@@ -65,8 +65,8 @@ const Ie = T(
|
|
|
65
65
|
),
|
|
66
66
|
"aria-expanded": c,
|
|
67
67
|
...t,
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ H("div", { className: "flex items-center gap-3", children: [
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
70
|
"svg",
|
|
71
71
|
{
|
|
72
72
|
className: J(
|
|
@@ -78,7 +78,7 @@ const Ie = T(
|
|
|
78
78
|
stroke: "currentColor",
|
|
79
79
|
strokeWidth: 2,
|
|
80
80
|
"aria-hidden": "true",
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
n
|
|
@@ -88,45 +88,45 @@ const Ie = T(
|
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
Ie.displayName = "AccordionTrigger";
|
|
91
|
-
const
|
|
91
|
+
const Me = N(
|
|
92
92
|
({ children: n, className: s, ...t }, a) => {
|
|
93
93
|
const { isOpen: l } = qt();
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
94
|
+
return /* @__PURE__ */ r(It, { initial: !1, children: l && /* @__PURE__ */ r(
|
|
95
|
+
j.div,
|
|
96
96
|
{
|
|
97
97
|
ref: a,
|
|
98
98
|
initial: { height: 0, opacity: 0 },
|
|
99
99
|
animate: { height: "auto", opacity: 1 },
|
|
100
100
|
exit: { height: 0, opacity: 0 },
|
|
101
101
|
transition: { duration: 0.2, ease: "easeInOut" },
|
|
102
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ r("div", { className: J("px-4 pb-4 pt-2", s), ...t, children: n })
|
|
103
103
|
}
|
|
104
104
|
) });
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
Me.displayName = "AccordionContent";
|
|
108
108
|
function x(...n) {
|
|
109
109
|
return ve(J(n));
|
|
110
110
|
}
|
|
111
|
-
const Qt =
|
|
112
|
-
({ className: n, variant: s = "default", size: t = "sm", children: a, ...l },
|
|
111
|
+
const Qt = N(
|
|
112
|
+
({ className: n, variant: s = "default", size: t = "sm", children: a, ...l }, o) => {
|
|
113
113
|
const c = s === "default" ? "uix-convex-colored-sm" : "uix-convex-sm", d = {
|
|
114
114
|
default: "bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",
|
|
115
115
|
secondary: "bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",
|
|
116
116
|
outline: "border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"
|
|
117
|
-
},
|
|
117
|
+
}, p = {
|
|
118
118
|
sm: "px-2 py-0.5 text-xs",
|
|
119
119
|
md: "px-2.5 py-1 text-sm"
|
|
120
|
-
}, { onDrag: u, onDragStart:
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
|
|
120
|
+
}, { onDrag: u, onDragStart: m, onDragEnd: e, ...f } = l;
|
|
121
|
+
return /* @__PURE__ */ r(
|
|
122
|
+
j.span,
|
|
123
123
|
{
|
|
124
|
-
ref:
|
|
124
|
+
ref: o,
|
|
125
125
|
className: x(
|
|
126
126
|
"inline-flex items-center rounded-xl font-medium",
|
|
127
127
|
c,
|
|
128
128
|
d[s],
|
|
129
|
-
|
|
129
|
+
p[t],
|
|
130
130
|
n
|
|
131
131
|
),
|
|
132
132
|
whileHover: { scale: 1.05 },
|
|
@@ -143,9 +143,9 @@ const Qt = T(
|
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
Qt.displayName = "Badge";
|
|
146
|
-
const
|
|
147
|
-
({ className: n, variant: s, color: t = "prime", size: a = "md", children: l, ...
|
|
148
|
-
const
|
|
146
|
+
const Re = N(
|
|
147
|
+
({ className: n, variant: s, color: t = "prime", size: a = "md", children: l, ...o }, c) => {
|
|
148
|
+
const p = `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 ${s === "filled" ? "uix-convex-colored-sm" : "uix-convex-sm"}`, u = "bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80", m = {
|
|
149
149
|
prime: "bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",
|
|
150
150
|
sub1: "bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",
|
|
151
151
|
sub2: "bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"
|
|
@@ -157,20 +157,20 @@ const Me = T(
|
|
|
157
157
|
prime: "bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",
|
|
158
158
|
sub1: "bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",
|
|
159
159
|
sub2: "bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"
|
|
160
|
-
},
|
|
161
|
-
filled:
|
|
160
|
+
}, y = {
|
|
161
|
+
filled: m[t],
|
|
162
162
|
outline: e[t],
|
|
163
163
|
ghost: f[t]
|
|
164
164
|
}, k = {
|
|
165
165
|
sm: "px-4 py-2 text-sm",
|
|
166
166
|
md: "px-6 py-3 text-base",
|
|
167
167
|
lg: "px-8 py-4 text-lg"
|
|
168
|
-
},
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
|
|
168
|
+
}, q = s ? y[s] : u;
|
|
169
|
+
return /* @__PURE__ */ r(
|
|
170
|
+
j.button,
|
|
171
171
|
{
|
|
172
172
|
ref: c,
|
|
173
|
-
className: x(
|
|
173
|
+
className: x(p, q, k[a], n),
|
|
174
174
|
whileHover: {
|
|
175
175
|
scale: 1.03,
|
|
176
176
|
y: -1
|
|
@@ -182,23 +182,23 @@ const Me = T(
|
|
|
182
182
|
duration: 0.06,
|
|
183
183
|
ease: [0, 0, 1, 1]
|
|
184
184
|
},
|
|
185
|
-
...
|
|
185
|
+
...o,
|
|
186
186
|
children: l
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
({ className: n, children: s, hover: t = !0, accentColor: a = "none", accentPosition: l = "none", ...
|
|
191
|
+
Re.displayName = "Button";
|
|
192
|
+
const Ae = N(
|
|
193
|
+
({ className: n, children: s, hover: t = !0, accentColor: a = "none", accentPosition: l = "none", ...o }, c) => {
|
|
194
194
|
const d = {
|
|
195
195
|
prime: "bg-uix-prime-300",
|
|
196
196
|
sub1: "bg-uix-sub1-300",
|
|
197
197
|
sub2: "bg-uix-sub2-300",
|
|
198
198
|
none: ""
|
|
199
199
|
};
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
|
|
200
|
+
return /* @__PURE__ */ H(
|
|
201
|
+
j.div,
|
|
202
202
|
{
|
|
203
203
|
ref: c,
|
|
204
204
|
className: x(
|
|
@@ -215,27 +215,27 @@ const Re = T(
|
|
|
215
215
|
duration: 0.15,
|
|
216
216
|
ease: "linear"
|
|
217
217
|
},
|
|
218
|
-
...
|
|
218
|
+
...o,
|
|
219
219
|
children: [
|
|
220
|
-
l === "top" && a !== "none" && /* @__PURE__ */
|
|
221
|
-
l === "left" && a !== "none" && /* @__PURE__ */
|
|
220
|
+
l === "top" && a !== "none" && /* @__PURE__ */ r("div", { className: x("absolute top-0 left-0 right-0 h-1", d[a]) }),
|
|
221
|
+
l === "left" && a !== "none" && /* @__PURE__ */ r("div", { className: x("absolute top-0 left-0 bottom-0 w-1", d[a]) }),
|
|
222
222
|
s
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
227
|
);
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
228
|
+
Ae.displayName = "Card";
|
|
229
|
+
const Be = N(
|
|
230
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("p-6 xl:p-8", n), ...t, children: s })
|
|
231
231
|
);
|
|
232
|
-
|
|
233
|
-
const _e =
|
|
234
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
232
|
+
Be.displayName = "CardContent";
|
|
233
|
+
const _e = N(
|
|
234
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("flex items-center gap-4 mb-4", n), ...t, children: s })
|
|
235
235
|
);
|
|
236
236
|
_e.displayName = "CardHeader";
|
|
237
|
-
const Le =
|
|
238
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
237
|
+
const Le = N(
|
|
238
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
|
|
239
239
|
"h3",
|
|
240
240
|
{
|
|
241
241
|
ref: a,
|
|
@@ -246,49 +246,49 @@ const Le = T(
|
|
|
246
246
|
)
|
|
247
247
|
);
|
|
248
248
|
Le.displayName = "CardTitle";
|
|
249
|
-
const He =
|
|
250
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
249
|
+
const He = N(
|
|
250
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("p", { ref: a, className: x("text-uix-gray-200 leading-relaxed", n), ...t, children: s })
|
|
251
251
|
);
|
|
252
252
|
He.displayName = "CardDescription";
|
|
253
|
-
const Pe =
|
|
254
|
-
({ className: n, code: s, language: t = "tsx", showLineNumbers: a = !1, ...l },
|
|
255
|
-
const [c, d] =
|
|
256
|
-
|
|
253
|
+
const Pe = N(
|
|
254
|
+
({ className: n, code: s, language: t = "tsx", showLineNumbers: a = !1, ...l }, o) => {
|
|
255
|
+
const [c, d] = nt(!1), [p, u] = nt("");
|
|
256
|
+
lt(() => {
|
|
257
257
|
(async () => {
|
|
258
|
-
const f = await
|
|
258
|
+
const f = await ke(s.trim(), {
|
|
259
259
|
lang: t,
|
|
260
260
|
theme: "github-dark"
|
|
261
261
|
});
|
|
262
262
|
u(f);
|
|
263
263
|
})();
|
|
264
264
|
}, [s, t]);
|
|
265
|
-
const
|
|
265
|
+
const m = async () => {
|
|
266
266
|
await navigator.clipboard.writeText(s.trim()), d(!0), setTimeout(() => d(!1), 2e3);
|
|
267
267
|
};
|
|
268
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ H(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
|
-
ref:
|
|
271
|
+
ref: o,
|
|
272
272
|
className: x(
|
|
273
273
|
"relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",
|
|
274
274
|
n
|
|
275
275
|
),
|
|
276
276
|
...l,
|
|
277
277
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ H("div", { className: "flex items-center justify-between px-4 py-2 border-b border-uix-black-200", children: [
|
|
279
|
+
/* @__PURE__ */ r(Qt, { variant: "secondary", size: "sm", children: t }),
|
|
280
|
+
/* @__PURE__ */ r(
|
|
281
281
|
"button",
|
|
282
282
|
{
|
|
283
283
|
type: "button",
|
|
284
|
-
onClick:
|
|
284
|
+
onClick: m,
|
|
285
285
|
className: "p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors",
|
|
286
286
|
"aria-label": "Copy code",
|
|
287
|
-
children: c ? /* @__PURE__ */
|
|
287
|
+
children: c ? /* @__PURE__ */ r(ye, { size: 14, className: "text-green-400" }) : /* @__PURE__ */ r(we, { size: 14, className: "text-uix-gray-100" })
|
|
288
288
|
}
|
|
289
289
|
)
|
|
290
290
|
] }),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ r(
|
|
292
292
|
"div",
|
|
293
293
|
{
|
|
294
294
|
className: x(
|
|
@@ -297,7 +297,7 @@ const Pe = T(
|
|
|
297
297
|
"[&_code]:!bg-transparent",
|
|
298
298
|
a && "[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"
|
|
299
299
|
),
|
|
300
|
-
dangerouslySetInnerHTML: { __html:
|
|
300
|
+
dangerouslySetInnerHTML: { __html: p }
|
|
301
301
|
}
|
|
302
302
|
)
|
|
303
303
|
]
|
|
@@ -321,25 +321,25 @@ function Ks({
|
|
|
321
321
|
color: t = "prime",
|
|
322
322
|
gradient: a = !1,
|
|
323
323
|
delay: l = 0,
|
|
324
|
-
charDelay:
|
|
324
|
+
charDelay: o = 0.04
|
|
325
325
|
}) {
|
|
326
|
-
const c = mt(null), d = Ut(c, { once: !0, margin: "-50px" }), [
|
|
327
|
-
return
|
|
328
|
-
if (a && d && !
|
|
329
|
-
const
|
|
326
|
+
const c = mt(null), d = Ut(c, { once: !0, margin: "-50px" }), [p, u] = nt(!1), m = 1, e = n.length, f = m + l + e * o + 0.25;
|
|
327
|
+
return lt(() => {
|
|
328
|
+
if (a && d && !p) {
|
|
329
|
+
const y = setTimeout(() => {
|
|
330
330
|
u(!0);
|
|
331
331
|
}, f * 1e3);
|
|
332
|
-
return () => clearTimeout(
|
|
332
|
+
return () => clearTimeout(y);
|
|
333
333
|
}
|
|
334
|
-
}, [a, d,
|
|
334
|
+
}, [a, d, p, f]), a && p ? /* @__PURE__ */ r(
|
|
335
335
|
"span",
|
|
336
336
|
{
|
|
337
337
|
ref: c,
|
|
338
338
|
className: `inline-block bg-clip-text text-transparent ${Oe[t]} ${s}`,
|
|
339
339
|
children: n
|
|
340
340
|
}
|
|
341
|
-
) : /* @__PURE__ */
|
|
342
|
-
|
|
341
|
+
) : /* @__PURE__ */ r("span", { ref: c, className: `inline-block ${s}`, children: n.split("").map((y, k) => /* @__PURE__ */ r(
|
|
342
|
+
j.span,
|
|
343
343
|
{
|
|
344
344
|
className: "inline-block",
|
|
345
345
|
style: { color: "var(--uix-text-100)" },
|
|
@@ -348,10 +348,10 @@ function Ks({
|
|
|
348
348
|
} : {},
|
|
349
349
|
transition: {
|
|
350
350
|
duration: 0.25,
|
|
351
|
-
delay:
|
|
351
|
+
delay: m + l + k * o,
|
|
352
352
|
ease: [0.1, 0.1, 0.9, 0.9]
|
|
353
353
|
},
|
|
354
|
-
children:
|
|
354
|
+
children: y === " " ? " " : y
|
|
355
355
|
},
|
|
356
356
|
k
|
|
357
357
|
)) });
|
|
@@ -370,14 +370,14 @@ function Gs({
|
|
|
370
370
|
className: a,
|
|
371
371
|
...l
|
|
372
372
|
}) {
|
|
373
|
-
const [
|
|
374
|
-
c(
|
|
373
|
+
const [o, c] = nt(!1), d = mt(null), p = s ?? o, u = (m) => {
|
|
374
|
+
c(m), t == null || t(m);
|
|
375
375
|
};
|
|
376
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ r(Zt.Provider, { value: { open: p, setOpen: u, triggerRef: d }, children: /* @__PURE__ */ r("div", { className: J("relative inline-block", a), ...l, children: n }) });
|
|
377
377
|
}
|
|
378
378
|
function qs({ children: n, className: s, onClick: t, ...a }) {
|
|
379
|
-
const { open: l, setOpen:
|
|
380
|
-
return /* @__PURE__ */
|
|
379
|
+
const { open: l, setOpen: o, triggerRef: c } = _t();
|
|
380
|
+
return /* @__PURE__ */ H(
|
|
381
381
|
"button",
|
|
382
382
|
{
|
|
383
383
|
ref: c,
|
|
@@ -389,14 +389,14 @@ function qs({ children: n, className: s, onClick: t, ...a }) {
|
|
|
389
389
|
s
|
|
390
390
|
),
|
|
391
391
|
onClick: (d) => {
|
|
392
|
-
|
|
392
|
+
o(!l), t == null || t(d);
|
|
393
393
|
},
|
|
394
394
|
"aria-expanded": l,
|
|
395
395
|
"aria-haspopup": "true",
|
|
396
396
|
...a,
|
|
397
397
|
children: [
|
|
398
398
|
n,
|
|
399
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ r(
|
|
400
400
|
"svg",
|
|
401
401
|
{
|
|
402
402
|
className: J("w-3.5 h-3.5 transition-transform duration-200", l && "rotate-180"),
|
|
@@ -405,7 +405,7 @@ function qs({ children: n, className: s, onClick: t, ...a }) {
|
|
|
405
405
|
stroke: "currentColor",
|
|
406
406
|
strokeWidth: 2,
|
|
407
407
|
"aria-hidden": "true",
|
|
408
|
-
children: /* @__PURE__ */
|
|
408
|
+
children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
|
|
409
409
|
}
|
|
410
410
|
)
|
|
411
411
|
]
|
|
@@ -413,43 +413,43 @@ function qs({ children: n, className: s, onClick: t, ...a }) {
|
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
function Qs({ children: n, className: s, align: t = "start" }) {
|
|
416
|
-
const { open: a, setOpen: l, triggerRef:
|
|
416
|
+
const { open: a, setOpen: l, triggerRef: o } = _t(), c = mt(null), [d, p] = nt({ top: 0, left: 0 });
|
|
417
417
|
be(() => {
|
|
418
|
-
if (!a || !
|
|
419
|
-
const
|
|
420
|
-
var
|
|
421
|
-
const e = (
|
|
418
|
+
if (!a || !o.current) return;
|
|
419
|
+
const m = () => {
|
|
420
|
+
var y;
|
|
421
|
+
const e = (y = o.current) == null ? void 0 : y.getBoundingClientRect();
|
|
422
422
|
if (!e) return;
|
|
423
423
|
let f = e.left;
|
|
424
|
-
t === "center" ? f = e.left + e.width / 2 : t === "end" && (f = e.right),
|
|
424
|
+
t === "center" ? f = e.left + e.width / 2 : t === "end" && (f = e.right), p({
|
|
425
425
|
top: e.bottom + 8,
|
|
426
426
|
// mt-2 equivalent
|
|
427
427
|
left: f
|
|
428
428
|
});
|
|
429
429
|
};
|
|
430
|
-
return
|
|
431
|
-
window.removeEventListener("scroll",
|
|
430
|
+
return m(), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
|
|
431
|
+
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
|
|
432
432
|
};
|
|
433
|
-
}, [a,
|
|
433
|
+
}, [a, o, t]), lt(() => {
|
|
434
434
|
if (!a) return;
|
|
435
|
-
const
|
|
436
|
-
c.current && !c.current.contains(f.target) &&
|
|
435
|
+
const m = (f) => {
|
|
436
|
+
c.current && !c.current.contains(f.target) && o.current && !o.current.contains(f.target) && l(!1);
|
|
437
437
|
}, e = (f) => {
|
|
438
|
-
var
|
|
439
|
-
f.key === "Escape" && (l(!1), (
|
|
438
|
+
var y;
|
|
439
|
+
f.key === "Escape" && (l(!1), (y = o.current) == null || y.focus());
|
|
440
440
|
};
|
|
441
|
-
return document.addEventListener("mousedown",
|
|
442
|
-
document.removeEventListener("mousedown",
|
|
441
|
+
return document.addEventListener("mousedown", m), document.addEventListener("keydown", e), () => {
|
|
442
|
+
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", e);
|
|
443
443
|
};
|
|
444
|
-
}, [a, l,
|
|
444
|
+
}, [a, l, o]);
|
|
445
445
|
const u = {
|
|
446
446
|
start: { transform: "translateX(0)" },
|
|
447
447
|
center: { transform: "translateX(-50%)" },
|
|
448
448
|
end: { transform: "translateX(-100%)" }
|
|
449
449
|
};
|
|
450
|
-
return typeof document > "u" ? null :
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
|
|
450
|
+
return typeof document > "u" ? null : Se(
|
|
451
|
+
/* @__PURE__ */ r(It, { children: a && /* @__PURE__ */ r(
|
|
452
|
+
j.div,
|
|
453
453
|
{
|
|
454
454
|
ref: c,
|
|
455
455
|
initial: { opacity: 0, y: -8 },
|
|
@@ -486,8 +486,8 @@ function Zs({
|
|
|
486
486
|
onClick: a,
|
|
487
487
|
...l
|
|
488
488
|
}) {
|
|
489
|
-
const { setOpen:
|
|
490
|
-
return /* @__PURE__ */
|
|
489
|
+
const { setOpen: o } = _t();
|
|
490
|
+
return /* @__PURE__ */ r(
|
|
491
491
|
"button",
|
|
492
492
|
{
|
|
493
493
|
type: "button",
|
|
@@ -500,7 +500,7 @@ function Zs({
|
|
|
500
500
|
s
|
|
501
501
|
),
|
|
502
502
|
onClick: (c) => {
|
|
503
|
-
t || (a == null || a(c),
|
|
503
|
+
t || (a == null || a(c), o(!1));
|
|
504
504
|
},
|
|
505
505
|
...l,
|
|
506
506
|
children: n
|
|
@@ -508,7 +508,7 @@ function Zs({
|
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
510
|
function Js({ className: n, ...s }) {
|
|
511
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ r("hr", { className: J("my-1.5 h-px border-0 bg-white/15", n), ...s });
|
|
512
512
|
}
|
|
513
513
|
const je = ({
|
|
514
514
|
onFileSelect: n,
|
|
@@ -516,118 +516,111 @@ const je = ({
|
|
|
516
516
|
accept: t = "image/*",
|
|
517
517
|
maxSizeMB: a = 10,
|
|
518
518
|
multiple: l = !1,
|
|
519
|
-
disabled:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
onError: f
|
|
519
|
+
disabled: o = !1,
|
|
520
|
+
size: c = "md",
|
|
521
|
+
icon: d,
|
|
522
|
+
title: p,
|
|
523
|
+
description: u,
|
|
524
|
+
className: m,
|
|
525
|
+
onError: e
|
|
527
526
|
}) => {
|
|
528
|
-
const
|
|
529
|
-
const
|
|
530
|
-
return
|
|
531
|
-
},
|
|
532
|
-
if (!
|
|
533
|
-
const
|
|
534
|
-
for (const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
},
|
|
544
|
-
|
|
545
|
-
},
|
|
546
|
-
if (
|
|
547
|
-
const
|
|
548
|
-
for (const
|
|
549
|
-
if (
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
527
|
+
const f = mt(null), [y, k] = nt(!1), q = (g) => {
|
|
528
|
+
const z = a * 1024 * 1024;
|
|
529
|
+
return g.size > z ? (e == null || e(`파일 크기는 ${a}MB 이하여야 합니다`), !1) : !0;
|
|
530
|
+
}, V = (g) => {
|
|
531
|
+
if (!g || g.length === 0) return;
|
|
532
|
+
const z = [];
|
|
533
|
+
for (const F of Array.from(g))
|
|
534
|
+
q(F) && z.push(F);
|
|
535
|
+
z.length !== 0 && (l && s ? s(z) : n(z[0]));
|
|
536
|
+
}, v = (g) => {
|
|
537
|
+
V(g.target.files), g.target.value = "";
|
|
538
|
+
}, U = (g) => {
|
|
539
|
+
g.preventDefault(), k(!1), !o && V(g.dataTransfer.files);
|
|
540
|
+
}, h = (g) => {
|
|
541
|
+
g.preventDefault(), o || k(!0);
|
|
542
|
+
}, E = () => {
|
|
543
|
+
k(!1);
|
|
544
|
+
}, I = (g) => {
|
|
545
|
+
if (o) return;
|
|
546
|
+
const z = g.clipboardData.items, F = [];
|
|
547
|
+
for (const T of Array.from(z))
|
|
548
|
+
if (T.type.startsWith("image/") || t === "*") {
|
|
549
|
+
const A = T.getAsFile();
|
|
550
|
+
if (A && q(A) && (F.push(A), !l))
|
|
552
551
|
break;
|
|
553
552
|
}
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
var
|
|
557
|
-
|
|
558
|
-
},
|
|
559
|
-
(
|
|
560
|
-
},
|
|
553
|
+
F.length > 0 && (l && s ? s(F) : n(F[0]));
|
|
554
|
+
}, S = () => {
|
|
555
|
+
var g;
|
|
556
|
+
o || (g = f.current) == null || g.click();
|
|
557
|
+
}, P = (g) => {
|
|
558
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), S());
|
|
559
|
+
}, C = {
|
|
561
560
|
sm: "p-6",
|
|
562
561
|
md: "p-10",
|
|
563
562
|
lg: "p-14"
|
|
564
|
-
},
|
|
563
|
+
}, _ = {
|
|
565
564
|
sm: "w-8 h-8",
|
|
566
565
|
md: "w-12 h-12",
|
|
567
566
|
lg: "w-16 h-16"
|
|
568
|
-
},
|
|
567
|
+
}, R = x(
|
|
569
568
|
"relative rounded-3xl text-center cursor-pointer transition-all duration-200",
|
|
569
|
+
"uix-glass uix-glass-border uix-convex",
|
|
570
|
+
"border-2 border-dashed",
|
|
570
571
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
),
|
|
578
|
-
glass: x(
|
|
579
|
-
"border-2 border-dashed uix-glass uix-convex",
|
|
580
|
-
k ? "border-uix-prime-300 bg-uix-prime-500/10" : "border-uix-border-100 hover:border-uix-prime-300/50"
|
|
581
|
-
)
|
|
582
|
-
}, _ = u ?? "파일을 선택하거나 드래그하세요", F = p ?? "클릭, 드래그 앤 드롭, 또는 붙여넣기";
|
|
583
|
-
return /* @__PURE__ */ P(
|
|
584
|
-
O.div,
|
|
572
|
+
C[c],
|
|
573
|
+
y ? "border-uix-prime-300 bg-uix-prime-500/10" : "border-uix-border-100 hover:border-uix-prime-300/50",
|
|
574
|
+
o && "opacity-50 cursor-not-allowed"
|
|
575
|
+
), W = p ?? "파일을 선택하거나 드래그하세요", Y = u ?? "클릭, 드래그 앤 드롭, 또는 붙여넣기";
|
|
576
|
+
return /* @__PURE__ */ H(
|
|
577
|
+
j.div,
|
|
585
578
|
{
|
|
586
|
-
className: x(
|
|
587
|
-
onClick:
|
|
588
|
-
onDrop:
|
|
589
|
-
onDragOver:
|
|
590
|
-
onDragLeave:
|
|
591
|
-
onPaste:
|
|
592
|
-
onKeyDown:
|
|
593
|
-
tabIndex:
|
|
579
|
+
className: x(R, m),
|
|
580
|
+
onClick: S,
|
|
581
|
+
onDrop: U,
|
|
582
|
+
onDragOver: h,
|
|
583
|
+
onDragLeave: E,
|
|
584
|
+
onPaste: I,
|
|
585
|
+
onKeyDown: P,
|
|
586
|
+
tabIndex: o ? -1 : 0,
|
|
594
587
|
role: "button",
|
|
595
|
-
"aria-label":
|
|
596
|
-
"aria-disabled":
|
|
597
|
-
whileHover:
|
|
598
|
-
whileTap:
|
|
588
|
+
"aria-label": W,
|
|
589
|
+
"aria-disabled": o,
|
|
590
|
+
whileHover: o ? void 0 : { scale: 1.01 },
|
|
591
|
+
whileTap: o ? void 0 : { scale: 0.99 },
|
|
599
592
|
transition: { duration: 0.1 },
|
|
600
593
|
children: [
|
|
601
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ r(
|
|
602
595
|
"input",
|
|
603
596
|
{
|
|
604
|
-
ref:
|
|
597
|
+
ref: f,
|
|
605
598
|
type: "file",
|
|
606
599
|
accept: t,
|
|
607
600
|
multiple: l,
|
|
608
|
-
onChange:
|
|
609
|
-
disabled:
|
|
601
|
+
onChange: v,
|
|
602
|
+
disabled: o,
|
|
610
603
|
className: "hidden",
|
|
611
604
|
tabIndex: -1
|
|
612
605
|
}
|
|
613
606
|
),
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ H("div", { className: "space-y-3", children: [
|
|
608
|
+
/* @__PURE__ */ r("div", { className: "flex justify-center", children: d ?? /* @__PURE__ */ r(
|
|
616
609
|
Ne,
|
|
617
610
|
{
|
|
618
611
|
className: x(
|
|
619
|
-
|
|
612
|
+
_[c],
|
|
620
613
|
"transition-colors",
|
|
621
|
-
|
|
614
|
+
y ? "text-uix-prime-300" : "text-uix-text-300"
|
|
622
615
|
),
|
|
623
616
|
strokeWidth: 1.5
|
|
624
617
|
}
|
|
625
618
|
) }),
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ H("div", { children: [
|
|
620
|
+
/* @__PURE__ */ r("p", { className: "text-uix-text-100 font-medium mb-1", children: W }),
|
|
621
|
+
/* @__PURE__ */ r("p", { className: "text-sm text-uix-text-200", children: Y })
|
|
629
622
|
] }),
|
|
630
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ H("p", { className: "text-xs text-uix-text-300", children: [
|
|
631
624
|
"최대 ",
|
|
632
625
|
a,
|
|
633
626
|
"MB"
|
|
@@ -644,93 +637,84 @@ const Ve = ({
|
|
|
644
637
|
onChange: t,
|
|
645
638
|
disabled: a = !1,
|
|
646
639
|
error: l = !1,
|
|
647
|
-
mask:
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
autoFocus: p = !0
|
|
640
|
+
mask: o = !1,
|
|
641
|
+
size: c = "md",
|
|
642
|
+
type: d = "numeric",
|
|
643
|
+
className: p,
|
|
644
|
+
autoFocus: u = !0
|
|
653
645
|
}) => {
|
|
654
|
-
const [
|
|
655
|
-
|
|
656
|
-
var
|
|
657
|
-
|
|
658
|
-
}, [
|
|
659
|
-
const
|
|
660
|
-
t == null || t(
|
|
661
|
-
}, [
|
|
662
|
-
const
|
|
663
|
-
var
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
},
|
|
667
|
-
var
|
|
668
|
-
if (
|
|
669
|
-
if (!
|
|
670
|
-
(
|
|
671
|
-
const
|
|
672
|
-
|
|
646
|
+
const [m, e] = nt(Array(n).fill("")), f = mt([]);
|
|
647
|
+
lt(() => {
|
|
648
|
+
var h;
|
|
649
|
+
u && ((h = f.current[0]) == null || h.focus());
|
|
650
|
+
}, [u]), lt(() => {
|
|
651
|
+
const h = m.join("");
|
|
652
|
+
t == null || t(h), h.length === n && m.every((E) => E !== "") && s(h);
|
|
653
|
+
}, [m, n, s, t]);
|
|
654
|
+
const y = (h) => d === "numeric" ? h.replace(/\D/g, "") : h.replace(/[^a-zA-Z0-9]/g, ""), k = (h, E) => {
|
|
655
|
+
var P;
|
|
656
|
+
const I = y(E).slice(-1), S = [...m];
|
|
657
|
+
S[h] = I, e(S), I && h < n - 1 && ((P = f.current[h + 1]) == null || P.focus());
|
|
658
|
+
}, q = (h, E) => {
|
|
659
|
+
var I, S, P;
|
|
660
|
+
if (E.key === "Backspace")
|
|
661
|
+
if (!m[h] && h > 0) {
|
|
662
|
+
(I = f.current[h - 1]) == null || I.focus();
|
|
663
|
+
const C = [...m];
|
|
664
|
+
C[h - 1] = "", e(C);
|
|
673
665
|
} else {
|
|
674
|
-
const
|
|
675
|
-
|
|
666
|
+
const C = [...m];
|
|
667
|
+
C[h] = "", e(C);
|
|
676
668
|
}
|
|
677
|
-
else
|
|
678
|
-
},
|
|
679
|
-
var
|
|
680
|
-
|
|
681
|
-
const
|
|
682
|
-
if (
|
|
683
|
-
const
|
|
684
|
-
for (let
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
const
|
|
688
|
-
(
|
|
669
|
+
else E.key === "ArrowLeft" && h > 0 ? (S = f.current[h - 1]) == null || S.focus() : E.key === "ArrowRight" && h < n - 1 && ((P = f.current[h + 1]) == null || P.focus());
|
|
670
|
+
}, V = (h) => {
|
|
671
|
+
var I;
|
|
672
|
+
h.preventDefault();
|
|
673
|
+
const E = y(h.clipboardData.getData("text")).slice(0, n);
|
|
674
|
+
if (E) {
|
|
675
|
+
const S = [...m];
|
|
676
|
+
for (let C = 0; C < E.length; C++)
|
|
677
|
+
S[C] = E[C];
|
|
678
|
+
e(S);
|
|
679
|
+
const P = Math.min(E.length, n - 1);
|
|
680
|
+
(I = f.current[P]) == null || I.focus();
|
|
689
681
|
}
|
|
690
|
-
},
|
|
682
|
+
}, v = {
|
|
691
683
|
sm: { input: "w-10 h-11 text-lg", gap: "gap-2" },
|
|
692
684
|
md: { input: "w-12 h-14 text-xl", gap: "gap-3" },
|
|
693
685
|
lg: { input: "w-14 h-16 text-2xl", gap: "gap-3" }
|
|
694
|
-
},
|
|
695
|
-
default: x(
|
|
696
|
-
"bg-uix-surface-100/80 border uix-glass-border",
|
|
697
|
-
l ? "border-uix-sub1-400 focus:ring-uix-sub1-300/30" : "border-uix-border-200 focus:border-uix-prime-300 focus:ring-uix-prime-300/20"
|
|
698
|
-
),
|
|
699
|
-
glass: x(
|
|
700
|
-
"uix-glass border uix-glass-border",
|
|
701
|
-
l ? "border-uix-sub1-400 focus:ring-uix-sub1-300/30" : "border-uix-border-100 focus:border-uix-prime-300 focus:ring-uix-prime-300/20"
|
|
702
|
-
)
|
|
703
|
-
}, rt = x(
|
|
686
|
+
}, U = x(
|
|
704
687
|
"text-center font-semibold rounded-2xl outline-none transition-all",
|
|
688
|
+
"uix-glass uix-glass-border",
|
|
705
689
|
"focus:ring-2 text-uix-text-100",
|
|
706
690
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
707
|
-
|
|
708
|
-
|
|
691
|
+
v[c].input,
|
|
692
|
+
l ? "border-uix-sub1-400 focus:ring-uix-sub1-300/30" : "focus:border-uix-prime-300 focus:ring-uix-prime-300/20"
|
|
709
693
|
);
|
|
710
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ r("div", { className: x("flex justify-center", v[c].gap, p), children: m.map((h, E) => /* @__PURE__ */ r(
|
|
711
695
|
"input",
|
|
712
696
|
{
|
|
713
|
-
ref: (
|
|
714
|
-
|
|
697
|
+
ref: (I) => {
|
|
698
|
+
f.current[E] = I;
|
|
715
699
|
},
|
|
716
|
-
type:
|
|
717
|
-
inputMode:
|
|
700
|
+
type: o ? "password" : "text",
|
|
701
|
+
inputMode: d === "numeric" ? "numeric" : "text",
|
|
718
702
|
maxLength: 1,
|
|
719
|
-
value:
|
|
720
|
-
onChange: (
|
|
721
|
-
onKeyDown: (
|
|
722
|
-
onPaste:
|
|
703
|
+
value: h,
|
|
704
|
+
onChange: (I) => k(E, I.target.value),
|
|
705
|
+
onKeyDown: (I) => q(E, I),
|
|
706
|
+
onPaste: V,
|
|
723
707
|
disabled: a,
|
|
724
|
-
className:
|
|
708
|
+
className: U,
|
|
725
709
|
autoComplete: "one-time-code",
|
|
726
|
-
"aria-label": `PIN 입력 ${
|
|
710
|
+
"aria-label": `PIN 입력 ${E + 1}/${n}`
|
|
727
711
|
},
|
|
728
|
-
|
|
712
|
+
E
|
|
729
713
|
)) });
|
|
730
714
|
};
|
|
731
715
|
Ve.displayName = "PinInput";
|
|
732
|
-
const Jt =
|
|
733
|
-
({ className: n, orientation: s = "vertical", children: t, ...a }, l) => /* @__PURE__ */
|
|
716
|
+
const Jt = N(
|
|
717
|
+
({ className: n, orientation: s = "vertical", children: t, ...a }, l) => /* @__PURE__ */ r(
|
|
734
718
|
"div",
|
|
735
719
|
{
|
|
736
720
|
ref: l,
|
|
@@ -756,18 +740,18 @@ const Jt = T(
|
|
|
756
740
|
);
|
|
757
741
|
Jt.displayName = "ScrollArea";
|
|
758
742
|
function tn({ threshold: n = 500, className: s }) {
|
|
759
|
-
const [t, a] =
|
|
760
|
-
|
|
761
|
-
const
|
|
743
|
+
const [t, a] = nt(!1);
|
|
744
|
+
lt(() => {
|
|
745
|
+
const o = () => {
|
|
762
746
|
a(window.scrollY > n);
|
|
763
747
|
};
|
|
764
|
-
return window.addEventListener("scroll",
|
|
748
|
+
return window.addEventListener("scroll", o, { passive: !0 }), () => window.removeEventListener("scroll", o);
|
|
765
749
|
}, [n]);
|
|
766
750
|
const l = () => {
|
|
767
751
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
768
752
|
};
|
|
769
|
-
return /* @__PURE__ */
|
|
770
|
-
|
|
753
|
+
return /* @__PURE__ */ r(It, { children: t && /* @__PURE__ */ r(
|
|
754
|
+
j.button,
|
|
771
755
|
{
|
|
772
756
|
initial: { opacity: 0, scale: 0.5, y: 20 },
|
|
773
757
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
@@ -792,28 +776,28 @@ function tn({ threshold: n = 500, className: s }) {
|
|
|
792
776
|
s
|
|
793
777
|
),
|
|
794
778
|
"aria-label": "Scroll to top",
|
|
795
|
-
children: /* @__PURE__ */
|
|
779
|
+
children: /* @__PURE__ */ r(Te, { size: 24 })
|
|
796
780
|
}
|
|
797
781
|
) });
|
|
798
782
|
}
|
|
799
|
-
const $e =
|
|
800
|
-
({ className: n, children: s, variant: t = "default", container: a = !0, animate: l = !0, id:
|
|
801
|
-
const
|
|
802
|
-
default: `bg-uix-surface-200/50 ${
|
|
803
|
-
secondary: `bg-uix-surface-300/50 ${
|
|
804
|
-
accent: `bg-uix-prime-300/60 ${
|
|
805
|
-
}, f = a ? /* @__PURE__ */
|
|
806
|
-
return /* @__PURE__ */
|
|
783
|
+
const $e = N(
|
|
784
|
+
({ className: n, children: s, variant: t = "default", container: a = !0, animate: l = !0, id: o, ...c }, d) => {
|
|
785
|
+
const p = mt(null), u = Ut(p, { once: !0, margin: "-100px" }), m = "backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex", e = {
|
|
786
|
+
default: `bg-uix-surface-200/50 ${m}`,
|
|
787
|
+
secondary: `bg-uix-surface-300/50 ${m}`,
|
|
788
|
+
accent: `bg-uix-prime-300/60 ${m} text-uix-white-100`
|
|
789
|
+
}, f = a ? /* @__PURE__ */ r("div", { className: "max-w-4xl mx-auto px-6 xl:px-12", children: s }) : s;
|
|
790
|
+
return /* @__PURE__ */ r(
|
|
807
791
|
"section",
|
|
808
792
|
{
|
|
809
|
-
ref: (
|
|
810
|
-
|
|
793
|
+
ref: (y) => {
|
|
794
|
+
p.current = y, typeof d == "function" ? d(y) : d && (d.current = y);
|
|
811
795
|
},
|
|
812
|
-
id:
|
|
796
|
+
id: o,
|
|
813
797
|
className: x("relative py-16 xl:py-24 rounded-[2.5rem]", e[t], n),
|
|
814
798
|
...c,
|
|
815
|
-
children: l ? /* @__PURE__ */
|
|
816
|
-
|
|
799
|
+
children: l ? /* @__PURE__ */ r(
|
|
800
|
+
j.div,
|
|
817
801
|
{
|
|
818
802
|
initial: { opacity: 0, y: 40 },
|
|
819
803
|
animate: u ? { opacity: 1, y: 0 } : { opacity: 0, y: 40 },
|
|
@@ -831,9 +815,9 @@ const $e = T(
|
|
|
831
815
|
}
|
|
832
816
|
);
|
|
833
817
|
$e.displayName = "Section";
|
|
834
|
-
const Ye =
|
|
835
|
-
({ className: n, children: s, subtitle: t, ...a }, l) => /* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
818
|
+
const Ye = N(
|
|
819
|
+
({ className: n, children: s, subtitle: t, ...a }, l) => /* @__PURE__ */ H("div", { className: "text-center mb-14 xl:mb-20", children: [
|
|
820
|
+
/* @__PURE__ */ r(
|
|
837
821
|
"h2",
|
|
838
822
|
{
|
|
839
823
|
ref: l,
|
|
@@ -845,7 +829,7 @@ const Ye = T(
|
|
|
845
829
|
children: s
|
|
846
830
|
}
|
|
847
831
|
),
|
|
848
|
-
t && /* @__PURE__ */
|
|
832
|
+
t && /* @__PURE__ */ r("p", { className: "text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed", children: t })
|
|
849
833
|
] })
|
|
850
834
|
);
|
|
851
835
|
Ye.displayName = "SectionTitle";
|
|
@@ -854,18 +838,18 @@ const te = yt(null), Fe = () => {
|
|
|
854
838
|
if (!n)
|
|
855
839
|
throw new Error("Sheet components must be used within a Sheet provider");
|
|
856
840
|
return n;
|
|
857
|
-
}, Xe = ({ open: n, onOpenChange: s, children: t }) => (
|
|
841
|
+
}, Xe = ({ open: n, onOpenChange: s, children: t }) => (lt(() => {
|
|
858
842
|
const a = (l) => {
|
|
859
843
|
l.key === "Escape" && n && s(!1);
|
|
860
844
|
};
|
|
861
845
|
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
862
|
-
}, [n, s]),
|
|
846
|
+
}, [n, s]), lt(() => (n ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
863
847
|
document.body.style.overflow = "";
|
|
864
|
-
}), [n]), /* @__PURE__ */
|
|
848
|
+
}), [n]), /* @__PURE__ */ r(te.Provider, { value: { open: n, onOpenChange: s }, children: t }));
|
|
865
849
|
Xe.displayName = "Sheet";
|
|
866
|
-
const Ue =
|
|
850
|
+
const Ue = N(
|
|
867
851
|
({ className: n, side: s = "left", children: t }, a) => {
|
|
868
|
-
const { open: l, onOpenChange:
|
|
852
|
+
const { open: l, onOpenChange: o } = Fe(), c = {
|
|
869
853
|
left: {
|
|
870
854
|
initial: { x: "-100%" },
|
|
871
855
|
animate: { x: 0 },
|
|
@@ -880,20 +864,20 @@ const Ue = T(
|
|
|
880
864
|
left: "left-0",
|
|
881
865
|
right: "right-0"
|
|
882
866
|
};
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
|
|
867
|
+
return /* @__PURE__ */ r(It, { children: l && /* @__PURE__ */ H(xe, { children: [
|
|
868
|
+
/* @__PURE__ */ r(
|
|
869
|
+
j.div,
|
|
886
870
|
{
|
|
887
871
|
initial: { opacity: 0 },
|
|
888
872
|
animate: { opacity: 1 },
|
|
889
873
|
exit: { opacity: 0 },
|
|
890
874
|
transition: { duration: 0.2 },
|
|
891
875
|
className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
892
|
-
onClick: () =>
|
|
876
|
+
onClick: () => o(!1)
|
|
893
877
|
}
|
|
894
878
|
),
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
|
|
879
|
+
/* @__PURE__ */ r(
|
|
880
|
+
j.div,
|
|
897
881
|
{
|
|
898
882
|
ref: a,
|
|
899
883
|
initial: c[s].initial,
|
|
@@ -912,8 +896,8 @@ const Ue = T(
|
|
|
912
896
|
}
|
|
913
897
|
);
|
|
914
898
|
Ue.displayName = "SheetContent";
|
|
915
|
-
const We =
|
|
916
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
899
|
+
const We = N(
|
|
900
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
|
|
917
901
|
"div",
|
|
918
902
|
{
|
|
919
903
|
ref: a,
|
|
@@ -927,11 +911,11 @@ const We = T(
|
|
|
927
911
|
)
|
|
928
912
|
);
|
|
929
913
|
We.displayName = "SheetHeader";
|
|
930
|
-
const Ke =
|
|
931
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
914
|
+
const Ke = N(
|
|
915
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("h2", { ref: a, className: x("text-lg font-semibold text-uix-text-100", n), ...t, children: s })
|
|
932
916
|
);
|
|
933
917
|
Ke.displayName = "SheetTitle";
|
|
934
|
-
const Ge = "relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl", qe =
|
|
918
|
+
const Ge = "relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl", qe = N(({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
|
|
935
919
|
"aside",
|
|
936
920
|
{
|
|
937
921
|
ref: a,
|
|
@@ -941,20 +925,20 @@ const Ge = "relative uix-glass uix-glass-border uix-convex uix-glass-noise round
|
|
|
941
925
|
}
|
|
942
926
|
));
|
|
943
927
|
qe.displayName = "Sidebar";
|
|
944
|
-
const Qe =
|
|
945
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
928
|
+
const Qe = N(
|
|
929
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("flex flex-col gap-1 p-6", n), ...t, children: s })
|
|
946
930
|
);
|
|
947
931
|
Qe.displayName = "SidebarHeader";
|
|
948
|
-
const Ze =
|
|
949
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
932
|
+
const Ze = N(
|
|
933
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(Jt, { ref: a, className: x("flex-1 p-4", n), ...t, children: s })
|
|
950
934
|
);
|
|
951
935
|
Ze.displayName = "SidebarContent";
|
|
952
|
-
const Je =
|
|
953
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
936
|
+
const Je = N(
|
|
937
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("mb-6", n), ...t, children: s })
|
|
954
938
|
);
|
|
955
939
|
Je.displayName = "SidebarGroup";
|
|
956
|
-
const ts =
|
|
957
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
940
|
+
const ts = N(
|
|
941
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
|
|
958
942
|
"div",
|
|
959
943
|
{
|
|
960
944
|
ref: a,
|
|
@@ -968,19 +952,19 @@ const ts = T(
|
|
|
968
952
|
)
|
|
969
953
|
);
|
|
970
954
|
ts.displayName = "SidebarGroupLabel";
|
|
971
|
-
const es =
|
|
972
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
955
|
+
const es = N(
|
|
956
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("ul", { ref: a, className: x("space-y-1", n), ...t, children: s })
|
|
973
957
|
);
|
|
974
958
|
es.displayName = "SidebarMenu";
|
|
975
|
-
const ss =
|
|
976
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
959
|
+
const ss = N(
|
|
960
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("li", { ref: a, className: x("", n), ...t, children: s })
|
|
977
961
|
);
|
|
978
962
|
ss.displayName = "SidebarMenuItem";
|
|
979
|
-
const ns =
|
|
963
|
+
const ns = N(
|
|
980
964
|
({ className: n, isActive: s = !1, children: t, ...a }, l) => {
|
|
981
|
-
const { onDrag:
|
|
982
|
-
return /* @__PURE__ */
|
|
983
|
-
|
|
965
|
+
const { onDrag: o, onDragStart: c, onDragEnd: d, ...p } = a;
|
|
966
|
+
return /* @__PURE__ */ H(
|
|
967
|
+
j.button,
|
|
984
968
|
{
|
|
985
969
|
ref: l,
|
|
986
970
|
type: "button",
|
|
@@ -996,10 +980,10 @@ const ns = T(
|
|
|
996
980
|
duration: 0.08,
|
|
997
981
|
ease: [0, 0, 1, 1]
|
|
998
982
|
},
|
|
999
|
-
...
|
|
983
|
+
...p,
|
|
1000
984
|
children: [
|
|
1001
|
-
s && /* @__PURE__ */
|
|
1002
|
-
|
|
985
|
+
s && /* @__PURE__ */ r(
|
|
986
|
+
j.span,
|
|
1003
987
|
{
|
|
1004
988
|
className: "absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",
|
|
1005
989
|
layoutId: "sidebar-active-indicator",
|
|
@@ -1024,177 +1008,173 @@ const as = ({
|
|
|
1024
1008
|
min: t = 0,
|
|
1025
1009
|
max: a = 100,
|
|
1026
1010
|
step: l = 1,
|
|
1027
|
-
disabled:
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
className: k
|
|
1011
|
+
disabled: o = !1,
|
|
1012
|
+
size: c = "md",
|
|
1013
|
+
color: d = "prime",
|
|
1014
|
+
showValue: p = !1,
|
|
1015
|
+
showMinMax: u = !1,
|
|
1016
|
+
marks: m,
|
|
1017
|
+
label: e,
|
|
1018
|
+
description: f,
|
|
1019
|
+
className: y
|
|
1037
1020
|
}) => {
|
|
1038
|
-
const
|
|
1039
|
-
(
|
|
1040
|
-
if (
|
|
1041
|
-
const
|
|
1042
|
-
return Math.max(t, Math.min(a,
|
|
1021
|
+
const k = mt(null), [q, V] = nt(!1), v = (n - t) / (a - t) * 100, U = ge(
|
|
1022
|
+
(_) => {
|
|
1023
|
+
if (!k.current) return n;
|
|
1024
|
+
const R = k.current.getBoundingClientRect(), W = Math.max(0, Math.min(1, (_ - R.left) / R.width)), Y = t + W * (a - t), g = Math.round(Y / l) * l;
|
|
1025
|
+
return Math.max(t, Math.min(a, g));
|
|
1043
1026
|
},
|
|
1044
1027
|
[t, a, l, n]
|
|
1045
|
-
),
|
|
1046
|
-
if (
|
|
1047
|
-
|
|
1048
|
-
const
|
|
1049
|
-
s(
|
|
1050
|
-
const
|
|
1051
|
-
const
|
|
1052
|
-
s(
|
|
1053
|
-
},
|
|
1054
|
-
|
|
1028
|
+
), h = (_) => {
|
|
1029
|
+
if (o) return;
|
|
1030
|
+
_.preventDefault(), V(!0);
|
|
1031
|
+
const R = U(_.clientX);
|
|
1032
|
+
s(R);
|
|
1033
|
+
const W = (g) => {
|
|
1034
|
+
const z = U(g.clientX);
|
|
1035
|
+
s(z);
|
|
1036
|
+
}, Y = () => {
|
|
1037
|
+
V(!1), document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", Y);
|
|
1055
1038
|
};
|
|
1056
|
-
document.addEventListener("mousemove",
|
|
1057
|
-
},
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
s(
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1064
|
-
s(
|
|
1065
|
-
},
|
|
1066
|
-
|
|
1039
|
+
document.addEventListener("mousemove", W), document.addEventListener("mouseup", Y);
|
|
1040
|
+
}, E = (_) => {
|
|
1041
|
+
if (o) return;
|
|
1042
|
+
V(!0);
|
|
1043
|
+
const R = _.touches[0], W = U(R.clientX);
|
|
1044
|
+
s(W);
|
|
1045
|
+
const Y = (z) => {
|
|
1046
|
+
const F = z.touches[0], T = U(F.clientX);
|
|
1047
|
+
s(T);
|
|
1048
|
+
}, g = () => {
|
|
1049
|
+
V(!1), document.removeEventListener("touchmove", Y), document.removeEventListener("touchend", g);
|
|
1067
1050
|
};
|
|
1068
|
-
document.addEventListener("touchmove",
|
|
1069
|
-
},
|
|
1070
|
-
if (
|
|
1071
|
-
let
|
|
1072
|
-
switch (
|
|
1051
|
+
document.addEventListener("touchmove", Y), document.addEventListener("touchend", g);
|
|
1052
|
+
}, I = (_) => {
|
|
1053
|
+
if (o) return;
|
|
1054
|
+
let R = n;
|
|
1055
|
+
switch (_.key) {
|
|
1073
1056
|
case "ArrowRight":
|
|
1074
1057
|
case "ArrowUp":
|
|
1075
|
-
|
|
1058
|
+
R = Math.min(a, n + l);
|
|
1076
1059
|
break;
|
|
1077
1060
|
case "ArrowLeft":
|
|
1078
1061
|
case "ArrowDown":
|
|
1079
|
-
|
|
1062
|
+
R = Math.max(t, n - l);
|
|
1080
1063
|
break;
|
|
1081
1064
|
case "Home":
|
|
1082
|
-
|
|
1065
|
+
R = t;
|
|
1083
1066
|
break;
|
|
1084
1067
|
case "End":
|
|
1085
|
-
|
|
1068
|
+
R = a;
|
|
1086
1069
|
break;
|
|
1087
1070
|
default:
|
|
1088
1071
|
return;
|
|
1089
1072
|
}
|
|
1090
|
-
|
|
1091
|
-
},
|
|
1073
|
+
_.preventDefault(), s(R);
|
|
1074
|
+
}, S = {
|
|
1092
1075
|
sm: { track: "h-1.5", thumb: "w-4 h-4" },
|
|
1093
1076
|
md: { track: "h-2", thumb: "w-5 h-5" },
|
|
1094
1077
|
lg: { track: "h-3", thumb: "w-6 h-6" }
|
|
1095
|
-
},
|
|
1078
|
+
}, P = {
|
|
1096
1079
|
prime: "bg-uix-prime-400",
|
|
1097
1080
|
sub1: "bg-uix-sub1-400",
|
|
1098
1081
|
sub2: "bg-uix-sub2-400"
|
|
1099
|
-
},
|
|
1082
|
+
}, C = {
|
|
1100
1083
|
prime: "bg-uix-prime-300",
|
|
1101
1084
|
sub1: "bg-uix-sub1-300",
|
|
1102
1085
|
sub2: "bg-uix-sub2-300"
|
|
1103
|
-
}, L = {
|
|
1104
|
-
default: "bg-uix-surface-300",
|
|
1105
|
-
glass: "uix-glass"
|
|
1106
1086
|
};
|
|
1107
|
-
return /* @__PURE__ */
|
|
1108
|
-
(
|
|
1109
|
-
|
|
1110
|
-
|
|
1087
|
+
return /* @__PURE__ */ H("div", { className: x("w-full", y), children: [
|
|
1088
|
+
(e || p) && /* @__PURE__ */ H("div", { className: "flex items-center justify-between mb-2", children: [
|
|
1089
|
+
e && /* @__PURE__ */ r("span", { className: "text-sm font-medium text-uix-text-100", children: e }),
|
|
1090
|
+
p && /* @__PURE__ */ r("span", { className: "text-sm font-semibold text-uix-text-200", children: n })
|
|
1111
1091
|
] }),
|
|
1112
|
-
|
|
1113
|
-
/* @__PURE__ */
|
|
1092
|
+
f && /* @__PURE__ */ r("p", { className: "text-sm text-uix-text-300 mb-3", children: f }),
|
|
1093
|
+
/* @__PURE__ */ H(
|
|
1114
1094
|
"div",
|
|
1115
1095
|
{
|
|
1116
|
-
ref:
|
|
1096
|
+
ref: k,
|
|
1117
1097
|
className: x(
|
|
1118
1098
|
"relative w-full rounded-full cursor-pointer",
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1099
|
+
"uix-glass uix-glass-border",
|
|
1100
|
+
S[c].track,
|
|
1101
|
+
o && "opacity-50 cursor-not-allowed"
|
|
1122
1102
|
),
|
|
1123
|
-
onMouseDown:
|
|
1124
|
-
onTouchStart:
|
|
1103
|
+
onMouseDown: h,
|
|
1104
|
+
onTouchStart: E,
|
|
1125
1105
|
role: "slider",
|
|
1126
1106
|
"aria-valuemin": t,
|
|
1127
1107
|
"aria-valuemax": a,
|
|
1128
1108
|
"aria-valuenow": n,
|
|
1129
|
-
"aria-disabled":
|
|
1130
|
-
tabIndex:
|
|
1131
|
-
onKeyDown:
|
|
1109
|
+
"aria-disabled": o,
|
|
1110
|
+
tabIndex: o ? -1 : 0,
|
|
1111
|
+
onKeyDown: I,
|
|
1132
1112
|
children: [
|
|
1133
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ r(
|
|
1134
1114
|
"div",
|
|
1135
1115
|
{
|
|
1136
|
-
className: x("absolute left-0 top-0 h-full rounded-full",
|
|
1137
|
-
style: { width: `${
|
|
1116
|
+
className: x("absolute left-0 top-0 h-full rounded-full", P[d]),
|
|
1117
|
+
style: { width: `${v}%` }
|
|
1138
1118
|
}
|
|
1139
1119
|
),
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
return /* @__PURE__ */
|
|
1120
|
+
m == null ? void 0 : m.map((_) => {
|
|
1121
|
+
const R = (_.value - t) / (a - t) * 100;
|
|
1122
|
+
return /* @__PURE__ */ H(
|
|
1143
1123
|
"div",
|
|
1144
1124
|
{
|
|
1145
1125
|
className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2",
|
|
1146
|
-
style: { left: `${
|
|
1126
|
+
style: { left: `${R}%` },
|
|
1147
1127
|
children: [
|
|
1148
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ r(
|
|
1149
1129
|
"div",
|
|
1150
1130
|
{
|
|
1151
1131
|
className: x(
|
|
1152
1132
|
"w-2 h-2 rounded-full",
|
|
1153
|
-
|
|
1133
|
+
_.value <= n ? C[d] : "bg-uix-surface-400"
|
|
1154
1134
|
)
|
|
1155
1135
|
}
|
|
1156
1136
|
),
|
|
1157
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ r("span", { className: "absolute top-4 left-1/2 -translate-x-1/2 text-xs text-uix-text-300 whitespace-nowrap", children: _.label })
|
|
1158
1138
|
]
|
|
1159
1139
|
},
|
|
1160
|
-
|
|
1140
|
+
_.value
|
|
1161
1141
|
);
|
|
1162
1142
|
}),
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
|
|
1143
|
+
/* @__PURE__ */ r(
|
|
1144
|
+
j.div,
|
|
1165
1145
|
{
|
|
1166
1146
|
className: x(
|
|
1167
1147
|
"absolute top-1/2 -translate-y-1/2 -translate-x-1/2 rounded-full",
|
|
1168
1148
|
"uix-convex-colored shadow-lg",
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
!
|
|
1149
|
+
S[c].thumb,
|
|
1150
|
+
C[d],
|
|
1151
|
+
!o && "cursor-grab active:cursor-grabbing"
|
|
1172
1152
|
),
|
|
1173
|
-
style: { left: `${
|
|
1153
|
+
style: { left: `${v}%` },
|
|
1174
1154
|
animate: {
|
|
1175
|
-
scale:
|
|
1155
|
+
scale: q ? 1.15 : 1
|
|
1176
1156
|
},
|
|
1177
|
-
whileHover:
|
|
1157
|
+
whileHover: o ? void 0 : { scale: 1.1 },
|
|
1178
1158
|
transition: { duration: 0.1 }
|
|
1179
1159
|
}
|
|
1180
1160
|
)
|
|
1181
1161
|
]
|
|
1182
1162
|
}
|
|
1183
1163
|
),
|
|
1184
|
-
|
|
1185
|
-
/* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1164
|
+
u && /* @__PURE__ */ H("div", { className: "flex justify-between mt-2 text-xs text-uix-text-300", children: [
|
|
1165
|
+
/* @__PURE__ */ r("span", { children: t }),
|
|
1166
|
+
/* @__PURE__ */ r("span", { children: a })
|
|
1187
1167
|
] })
|
|
1188
1168
|
] });
|
|
1189
1169
|
};
|
|
1190
1170
|
as.displayName = "Slider";
|
|
1191
|
-
const
|
|
1192
|
-
({ className: n, variant: s = "default", rounded: t = "3xl", children: a, ...l },
|
|
1171
|
+
const os = N(
|
|
1172
|
+
({ className: n, variant: s = "default", rounded: t = "3xl", children: a, ...l }, o) => {
|
|
1193
1173
|
const c = "relative uix-glass uix-glass-border uix-convex uix-glass-noise", d = {
|
|
1194
1174
|
default: "",
|
|
1195
1175
|
subtle: "uix-convex-subtle",
|
|
1196
1176
|
strong: "uix-convex-lg"
|
|
1197
|
-
},
|
|
1177
|
+
}, p = {
|
|
1198
1178
|
none: "rounded-none",
|
|
1199
1179
|
sm: "rounded-lg",
|
|
1200
1180
|
md: "rounded-xl",
|
|
@@ -1204,32 +1184,32 @@ const rs = T(
|
|
|
1204
1184
|
"3xl": "rounded-3xl",
|
|
1205
1185
|
full: "rounded-full"
|
|
1206
1186
|
};
|
|
1207
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ r(
|
|
1208
1188
|
"div",
|
|
1209
1189
|
{
|
|
1210
|
-
ref:
|
|
1211
|
-
className: x(c, d[s],
|
|
1190
|
+
ref: o,
|
|
1191
|
+
className: x(c, d[s], p[t], n),
|
|
1212
1192
|
...l,
|
|
1213
1193
|
children: a
|
|
1214
1194
|
}
|
|
1215
1195
|
);
|
|
1216
1196
|
}
|
|
1217
1197
|
);
|
|
1218
|
-
|
|
1198
|
+
os.displayName = "Surface";
|
|
1219
1199
|
const ee = yt(null), se = () => {
|
|
1220
1200
|
const n = wt(ee);
|
|
1221
1201
|
if (!n)
|
|
1222
1202
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
1223
1203
|
return n;
|
|
1224
|
-
},
|
|
1204
|
+
}, rs = N(
|
|
1225
1205
|
({ className: n, defaultValue: s, children: t, ...a }, l) => {
|
|
1226
|
-
const [
|
|
1227
|
-
return /* @__PURE__ */
|
|
1206
|
+
const [o, c] = nt(s), d = he();
|
|
1207
|
+
return /* @__PURE__ */ r(ee.Provider, { value: { activeTab: o, setActiveTab: c, tabsId: d }, children: /* @__PURE__ */ r("div", { ref: l, className: x("w-full", n), ...a, children: t }) });
|
|
1228
1208
|
}
|
|
1229
1209
|
);
|
|
1230
|
-
|
|
1231
|
-
const is =
|
|
1232
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
1210
|
+
rs.displayName = "Tabs";
|
|
1211
|
+
const is = N(
|
|
1212
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
|
|
1233
1213
|
"div",
|
|
1234
1214
|
{
|
|
1235
1215
|
ref: a,
|
|
@@ -1243,11 +1223,11 @@ const is = T(
|
|
|
1243
1223
|
)
|
|
1244
1224
|
);
|
|
1245
1225
|
is.displayName = "TabsList";
|
|
1246
|
-
const ls =
|
|
1226
|
+
const ls = N(
|
|
1247
1227
|
({ className: n, value: s, children: t, ...a }, l) => {
|
|
1248
|
-
const { activeTab:
|
|
1249
|
-
return /* @__PURE__ */
|
|
1250
|
-
|
|
1228
|
+
const { activeTab: o, setActiveTab: c, tabsId: d } = se(), p = o === s, { onDrag: u, onDragStart: m, onDragEnd: e, ...f } = a;
|
|
1229
|
+
return /* @__PURE__ */ H(
|
|
1230
|
+
j.button,
|
|
1251
1231
|
{
|
|
1252
1232
|
ref: l,
|
|
1253
1233
|
type: "button",
|
|
@@ -1255,7 +1235,7 @@ const ls = T(
|
|
|
1255
1235
|
className: x(
|
|
1256
1236
|
"relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl",
|
|
1257
1237
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",
|
|
1258
|
-
|
|
1238
|
+
p ? "text-uix-text-100" : "text-uix-text-300 hover:text-uix-text-100",
|
|
1259
1239
|
n
|
|
1260
1240
|
),
|
|
1261
1241
|
whileHover: { scale: 1.02 },
|
|
@@ -1266,8 +1246,8 @@ const ls = T(
|
|
|
1266
1246
|
},
|
|
1267
1247
|
...f,
|
|
1268
1248
|
children: [
|
|
1269
|
-
|
|
1270
|
-
|
|
1249
|
+
p && /* @__PURE__ */ r(
|
|
1250
|
+
j.span,
|
|
1271
1251
|
{
|
|
1272
1252
|
layoutId: `tabs-indicator-${d}`,
|
|
1273
1253
|
className: "absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",
|
|
@@ -1279,22 +1259,22 @@ const ls = T(
|
|
|
1279
1259
|
}
|
|
1280
1260
|
}
|
|
1281
1261
|
),
|
|
1282
|
-
/* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ r("span", { className: "relative z-10", children: t })
|
|
1283
1263
|
]
|
|
1284
1264
|
}
|
|
1285
1265
|
);
|
|
1286
1266
|
}
|
|
1287
1267
|
);
|
|
1288
1268
|
ls.displayName = "TabsTrigger";
|
|
1289
|
-
const cs =
|
|
1290
|
-
({ className: n, children: s, ...t }, a) => /* @__PURE__ */
|
|
1269
|
+
const cs = N(
|
|
1270
|
+
({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("relative mt-4", n), ...t, children: /* @__PURE__ */ r("div", { className: "grid [&>*]:col-start-1 [&>*]:row-start-1", children: s }) })
|
|
1291
1271
|
);
|
|
1292
1272
|
cs.displayName = "TabsPanels";
|
|
1293
|
-
const ds =
|
|
1273
|
+
const ds = N(
|
|
1294
1274
|
({ className: n, value: s, children: t, ...a }, l) => {
|
|
1295
|
-
const { activeTab:
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
|
|
1275
|
+
const { activeTab: o } = se(), c = o === s;
|
|
1276
|
+
return /* @__PURE__ */ r(
|
|
1277
|
+
j.div,
|
|
1298
1278
|
{
|
|
1299
1279
|
ref: l,
|
|
1300
1280
|
className: x(n),
|
|
@@ -1312,7 +1292,7 @@ const ds = T(
|
|
|
1312
1292
|
mass: 0.8
|
|
1313
1293
|
},
|
|
1314
1294
|
"aria-hidden": !c,
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1295
|
+
children: /* @__PURE__ */ r("div", { ...a, children: t })
|
|
1316
1296
|
}
|
|
1317
1297
|
);
|
|
1318
1298
|
}
|
|
@@ -1416,7 +1396,7 @@ const ms = (n) => {
|
|
|
1416
1396
|
return document.addEventListener("visibilitychange", t), () => window.removeEventListener("visibilitychange", t);
|
|
1417
1397
|
}, []), n;
|
|
1418
1398
|
};
|
|
1419
|
-
let
|
|
1399
|
+
let Bt = 1;
|
|
1420
1400
|
class ws {
|
|
1421
1401
|
constructor() {
|
|
1422
1402
|
this.subscribe = (s) => (this.subscribers.push(s), () => {
|
|
@@ -1431,24 +1411,24 @@ class ws {
|
|
|
1431
1411
|
];
|
|
1432
1412
|
}, this.create = (s) => {
|
|
1433
1413
|
var t;
|
|
1434
|
-
const { message: a, ...l } = s,
|
|
1435
|
-
return this.dismissedToasts.has(
|
|
1436
|
-
...
|
|
1414
|
+
const { message: a, ...l } = s, o = typeof (s == null ? void 0 : s.id) == "number" || ((t = s.id) == null ? void 0 : t.length) > 0 ? s.id : Bt++, c = this.toasts.find((p) => p.id === o), d = s.dismissible === void 0 ? !0 : s.dismissible;
|
|
1415
|
+
return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), c ? this.toasts = this.toasts.map((p) => p.id === o ? (this.publish({
|
|
1416
|
+
...p,
|
|
1437
1417
|
...s,
|
|
1438
|
-
id:
|
|
1418
|
+
id: o,
|
|
1439
1419
|
title: a
|
|
1440
1420
|
}), {
|
|
1441
|
-
...
|
|
1421
|
+
...p,
|
|
1442
1422
|
...s,
|
|
1443
|
-
id:
|
|
1423
|
+
id: o,
|
|
1444
1424
|
dismissible: d,
|
|
1445
1425
|
title: a
|
|
1446
|
-
}) :
|
|
1426
|
+
}) : p) : this.addToast({
|
|
1447
1427
|
title: a,
|
|
1448
1428
|
...l,
|
|
1449
1429
|
dismissible: d,
|
|
1450
|
-
id:
|
|
1451
|
-
}),
|
|
1430
|
+
id: o
|
|
1431
|
+
}), o;
|
|
1452
1432
|
}, this.dismiss = (s) => (s ? (this.dismissedToasts.add(s), requestAnimationFrame(() => this.subscribers.forEach((t) => t({
|
|
1453
1433
|
id: s,
|
|
1454
1434
|
dismiss: !0
|
|
@@ -1492,19 +1472,19 @@ class ws {
|
|
|
1492
1472
|
description: typeof t.description != "function" ? t.description : void 0
|
|
1493
1473
|
}));
|
|
1494
1474
|
const l = Promise.resolve(s instanceof Function ? s() : s);
|
|
1495
|
-
let
|
|
1475
|
+
let o = a !== void 0, c;
|
|
1496
1476
|
const d = l.then(async (u) => {
|
|
1497
1477
|
if (c = [
|
|
1498
1478
|
"resolve",
|
|
1499
1479
|
u
|
|
1500
1480
|
], i.isValidElement(u))
|
|
1501
|
-
|
|
1481
|
+
o = !1, this.create({
|
|
1502
1482
|
id: a,
|
|
1503
1483
|
type: "default",
|
|
1504
1484
|
message: u
|
|
1505
1485
|
});
|
|
1506
|
-
else if (
|
|
1507
|
-
|
|
1486
|
+
else if (Ts(u) && !u.ok) {
|
|
1487
|
+
o = !1;
|
|
1508
1488
|
const e = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description, k = typeof e == "object" && !i.isValidElement(e) ? e : {
|
|
1509
1489
|
message: e
|
|
1510
1490
|
};
|
|
@@ -1515,7 +1495,7 @@ class ws {
|
|
|
1515
1495
|
...k
|
|
1516
1496
|
});
|
|
1517
1497
|
} else if (u instanceof Error) {
|
|
1518
|
-
|
|
1498
|
+
o = !1;
|
|
1519
1499
|
const e = typeof t.error == "function" ? await t.error(u) : t.error, f = typeof t.description == "function" ? await t.description(u) : t.description, k = typeof e == "object" && !i.isValidElement(e) ? e : {
|
|
1520
1500
|
message: e
|
|
1521
1501
|
};
|
|
@@ -1526,7 +1506,7 @@ class ws {
|
|
|
1526
1506
|
...k
|
|
1527
1507
|
});
|
|
1528
1508
|
} else if (t.success !== void 0) {
|
|
1529
|
-
|
|
1509
|
+
o = !1;
|
|
1530
1510
|
const e = typeof t.success == "function" ? await t.success(u) : t.success, f = typeof t.description == "function" ? await t.description(u) : t.description, k = typeof e == "object" && !i.isValidElement(e) ? e : {
|
|
1531
1511
|
message: e
|
|
1532
1512
|
};
|
|
@@ -1542,27 +1522,27 @@ class ws {
|
|
|
1542
1522
|
"reject",
|
|
1543
1523
|
u
|
|
1544
1524
|
], t.error !== void 0) {
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1547
|
-
message:
|
|
1525
|
+
o = !1;
|
|
1526
|
+
const m = typeof t.error == "function" ? await t.error(u) : t.error, e = typeof t.description == "function" ? await t.description(u) : t.description, y = typeof m == "object" && !i.isValidElement(m) ? m : {
|
|
1527
|
+
message: m
|
|
1548
1528
|
};
|
|
1549
1529
|
this.create({
|
|
1550
1530
|
id: a,
|
|
1551
1531
|
type: "error",
|
|
1552
1532
|
description: e,
|
|
1553
|
-
...
|
|
1533
|
+
...y
|
|
1554
1534
|
});
|
|
1555
1535
|
}
|
|
1556
1536
|
}).finally(() => {
|
|
1557
|
-
|
|
1558
|
-
}),
|
|
1537
|
+
o && (this.dismiss(a), a = void 0), t.finally == null || t.finally.call(t);
|
|
1538
|
+
}), p = () => new Promise((u, m) => d.then(() => c[0] === "reject" ? m(c[1]) : u(c[1])).catch(m));
|
|
1559
1539
|
return typeof a != "string" && typeof a != "number" ? {
|
|
1560
|
-
unwrap:
|
|
1540
|
+
unwrap: p
|
|
1561
1541
|
} : Object.assign(a, {
|
|
1562
|
-
unwrap:
|
|
1542
|
+
unwrap: p
|
|
1563
1543
|
});
|
|
1564
1544
|
}, this.custom = (s, t) => {
|
|
1565
|
-
const a = (t == null ? void 0 : t.id) ||
|
|
1545
|
+
const a = (t == null ? void 0 : t.id) || Bt++;
|
|
1566
1546
|
return this.create({
|
|
1567
1547
|
jsx: s(a),
|
|
1568
1548
|
id: a,
|
|
@@ -1572,13 +1552,13 @@ class ws {
|
|
|
1572
1552
|
}
|
|
1573
1553
|
}
|
|
1574
1554
|
const X = new ws(), Ns = (n, s) => {
|
|
1575
|
-
const t = (s == null ? void 0 : s.id) ||
|
|
1555
|
+
const t = (s == null ? void 0 : s.id) || Bt++;
|
|
1576
1556
|
return X.addToast({
|
|
1577
1557
|
title: n,
|
|
1578
1558
|
...s,
|
|
1579
1559
|
id: t
|
|
1580
1560
|
}), t;
|
|
1581
|
-
},
|
|
1561
|
+
}, Ts = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", ks = Ns, Es = () => X.toasts, Ss = () => X.getActiveToasts(), en = Object.assign(ks, {
|
|
1582
1562
|
success: X.success,
|
|
1583
1563
|
info: X.info,
|
|
1584
1564
|
warning: X.warning,
|
|
@@ -1589,15 +1569,15 @@ const X = new ws(), Ns = (n, s) => {
|
|
|
1589
1569
|
dismiss: X.dismiss,
|
|
1590
1570
|
loading: X.loading
|
|
1591
1571
|
}, {
|
|
1592
|
-
getHistory:
|
|
1593
|
-
getToasts:
|
|
1572
|
+
getHistory: Es,
|
|
1573
|
+
getToasts: Ss
|
|
1594
1574
|
});
|
|
1595
1575
|
us("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
1596
1576
|
function Ct(n) {
|
|
1597
1577
|
return n.label !== void 0;
|
|
1598
1578
|
}
|
|
1599
|
-
const Ds = 3, Cs = "24px", Is = "16px", Ft = 4e3,
|
|
1600
|
-
function
|
|
1579
|
+
const Ds = 3, Cs = "24px", Is = "16px", Ft = 4e3, Ms = 356, Rs = 14, As = 45, Bs = 200;
|
|
1580
|
+
function at(...n) {
|
|
1601
1581
|
return n.filter(Boolean).join(" ");
|
|
1602
1582
|
}
|
|
1603
1583
|
function _s(n) {
|
|
@@ -1605,9 +1585,9 @@ function _s(n) {
|
|
|
1605
1585
|
return s && a.push(s), t && a.push(t), a;
|
|
1606
1586
|
}
|
|
1607
1587
|
const Ls = (n) => {
|
|
1608
|
-
var s, t, a, l,
|
|
1609
|
-
const { invert:
|
|
1610
|
-
|
|
1588
|
+
var s, t, a, l, o, c, d, p, u;
|
|
1589
|
+
const { invert: m, toast: e, unstyled: f, interacting: y, setHeights: k, visibleToasts: q, heights: V, index: v, toasts: U, expanded: h, removeToast: E, defaultRichColors: I, closeButton: S, style: P, cancelButtonStyle: C, actionButtonStyle: _, className: R = "", descriptionClassName: W = "", duration: Y, position: g, gap: z, expandByDefault: F, classNames: T, icons: A, closeButtonAriaLabel: rt = "Close toast" } = n, [ct, tt] = i.useState(null), [dt, Nt] = i.useState(null), [w, B] = i.useState(!1), [M, Q] = i.useState(!1), [ft, D] = i.useState(!1), [pt, Tt] = i.useState(!1), [kt, xt] = i.useState(!1), [ne, Mt] = i.useState(0), [ae, Lt] = i.useState(0), vt = i.useRef(e.duration || Y || Ft), Ht = i.useRef(null), ot = i.useRef(null), oe = v === 0, re = v + 1 <= q, K = e.type, bt = e.dismissible !== !1, ie = e.className || "", le = e.descriptionClassName || "", Et = i.useMemo(() => V.findIndex((b) => b.toastId === e.id) || 0, [
|
|
1590
|
+
V,
|
|
1611
1591
|
e.id
|
|
1612
1592
|
]), ce = i.useMemo(() => {
|
|
1613
1593
|
var b;
|
|
@@ -1615,56 +1595,56 @@ const Ls = (n) => {
|
|
|
1615
1595
|
}, [
|
|
1616
1596
|
e.closeButton,
|
|
1617
1597
|
S
|
|
1618
|
-
]), Pt = i.useMemo(() => e.duration ||
|
|
1598
|
+
]), Pt = i.useMemo(() => e.duration || Y || Ft, [
|
|
1619
1599
|
e.duration,
|
|
1620
|
-
|
|
1621
|
-
]),
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
]), jt = ys(), me = e.invert ||
|
|
1625
|
-
gt.current = i.useMemo(() =>
|
|
1626
|
-
|
|
1600
|
+
Y
|
|
1601
|
+
]), Rt = i.useRef(0), gt = i.useRef(0), zt = i.useRef(0), ht = i.useRef(null), [de, ue] = g.split("-"), Ot = i.useMemo(() => V.reduce((b, L, $) => $ >= Et ? b : b + L.height, 0), [
|
|
1602
|
+
V,
|
|
1603
|
+
Et
|
|
1604
|
+
]), jt = ys(), me = e.invert || m, At = K === "loading";
|
|
1605
|
+
gt.current = i.useMemo(() => Et * z + Ot, [
|
|
1606
|
+
Et,
|
|
1627
1607
|
Ot
|
|
1628
1608
|
]), i.useEffect(() => {
|
|
1629
1609
|
vt.current = Pt;
|
|
1630
1610
|
}, [
|
|
1631
1611
|
Pt
|
|
1632
1612
|
]), i.useEffect(() => {
|
|
1633
|
-
|
|
1613
|
+
B(!0);
|
|
1634
1614
|
}, []), i.useEffect(() => {
|
|
1635
|
-
const b =
|
|
1615
|
+
const b = ot.current;
|
|
1636
1616
|
if (b) {
|
|
1637
|
-
const
|
|
1638
|
-
return Lt(
|
|
1617
|
+
const L = b.getBoundingClientRect().height;
|
|
1618
|
+
return Lt(L), k(($) => [
|
|
1639
1619
|
{
|
|
1640
1620
|
toastId: e.id,
|
|
1641
|
-
height:
|
|
1621
|
+
height: L,
|
|
1642
1622
|
position: e.position
|
|
1643
1623
|
},
|
|
1644
|
-
|
|
1645
|
-
]), () => k((
|
|
1624
|
+
...$
|
|
1625
|
+
]), () => k(($) => $.filter((G) => G.toastId !== e.id));
|
|
1646
1626
|
}
|
|
1647
1627
|
}, [
|
|
1648
1628
|
k,
|
|
1649
1629
|
e.id
|
|
1650
1630
|
]), i.useLayoutEffect(() => {
|
|
1651
|
-
if (!
|
|
1652
|
-
const b =
|
|
1631
|
+
if (!w) return;
|
|
1632
|
+
const b = ot.current, L = b.style.height;
|
|
1653
1633
|
b.style.height = "auto";
|
|
1654
|
-
const
|
|
1655
|
-
b.style.height =
|
|
1656
|
-
...
|
|
1657
|
-
height:
|
|
1658
|
-
} :
|
|
1634
|
+
const $ = b.getBoundingClientRect().height;
|
|
1635
|
+
b.style.height = L, Lt($), k((G) => G.find((O) => O.toastId === e.id) ? G.map((O) => O.toastId === e.id ? {
|
|
1636
|
+
...O,
|
|
1637
|
+
height: $
|
|
1638
|
+
} : O) : [
|
|
1659
1639
|
{
|
|
1660
1640
|
toastId: e.id,
|
|
1661
|
-
height:
|
|
1641
|
+
height: $,
|
|
1662
1642
|
position: e.position
|
|
1663
1643
|
},
|
|
1664
1644
|
...G
|
|
1665
1645
|
]);
|
|
1666
1646
|
}, [
|
|
1667
|
-
|
|
1647
|
+
w,
|
|
1668
1648
|
e.title,
|
|
1669
1649
|
e.description,
|
|
1670
1650
|
k,
|
|
@@ -1673,181 +1653,181 @@ const Ls = (n) => {
|
|
|
1673
1653
|
e.action,
|
|
1674
1654
|
e.cancel
|
|
1675
1655
|
]);
|
|
1676
|
-
const
|
|
1677
|
-
Q(!0),
|
|
1678
|
-
|
|
1679
|
-
},
|
|
1656
|
+
const it = i.useCallback(() => {
|
|
1657
|
+
Q(!0), Mt(gt.current), k((b) => b.filter((L) => L.toastId !== e.id)), setTimeout(() => {
|
|
1658
|
+
E(e);
|
|
1659
|
+
}, Bs);
|
|
1680
1660
|
}, [
|
|
1681
1661
|
e,
|
|
1682
|
-
|
|
1662
|
+
E,
|
|
1683
1663
|
k,
|
|
1684
1664
|
gt
|
|
1685
1665
|
]);
|
|
1686
1666
|
i.useEffect(() => {
|
|
1687
1667
|
if (e.promise && K === "loading" || e.duration === 1 / 0 || e.type === "loading") return;
|
|
1688
1668
|
let b;
|
|
1689
|
-
return
|
|
1690
|
-
if (zt.current <
|
|
1691
|
-
const G = (/* @__PURE__ */ new Date()).getTime() -
|
|
1669
|
+
return h || y || jt ? (() => {
|
|
1670
|
+
if (zt.current < Rt.current) {
|
|
1671
|
+
const G = (/* @__PURE__ */ new Date()).getTime() - Rt.current;
|
|
1692
1672
|
vt.current = vt.current - G;
|
|
1693
1673
|
}
|
|
1694
1674
|
zt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
1695
1675
|
})() : (() => {
|
|
1696
|
-
vt.current !== 1 / 0 && (
|
|
1697
|
-
e.onAutoClose == null || e.onAutoClose.call(e, e),
|
|
1676
|
+
vt.current !== 1 / 0 && (Rt.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
|
|
1677
|
+
e.onAutoClose == null || e.onAutoClose.call(e, e), it();
|
|
1698
1678
|
}, vt.current));
|
|
1699
1679
|
})(), () => clearTimeout(b);
|
|
1700
1680
|
}, [
|
|
1701
|
-
|
|
1702
|
-
|
|
1681
|
+
h,
|
|
1682
|
+
y,
|
|
1703
1683
|
e,
|
|
1704
1684
|
K,
|
|
1705
1685
|
jt,
|
|
1706
|
-
|
|
1686
|
+
it
|
|
1707
1687
|
]), i.useEffect(() => {
|
|
1708
|
-
e.delete && (
|
|
1688
|
+
e.delete && (it(), e.onDismiss == null || e.onDismiss.call(e, e));
|
|
1709
1689
|
}, [
|
|
1710
|
-
|
|
1690
|
+
it,
|
|
1711
1691
|
e.delete
|
|
1712
1692
|
]);
|
|
1713
1693
|
function fe() {
|
|
1714
1694
|
var b;
|
|
1715
|
-
if (
|
|
1716
|
-
var
|
|
1695
|
+
if (A != null && A.loading) {
|
|
1696
|
+
var L;
|
|
1717
1697
|
return /* @__PURE__ */ i.createElement("div", {
|
|
1718
|
-
className:
|
|
1698
|
+
className: at(T == null ? void 0 : T.loader, e == null || (L = e.classNames) == null ? void 0 : L.loader, "sonner-loader"),
|
|
1719
1699
|
"data-visible": K === "loading"
|
|
1720
|
-
},
|
|
1700
|
+
}, A.loading);
|
|
1721
1701
|
}
|
|
1722
1702
|
return /* @__PURE__ */ i.createElement(ps, {
|
|
1723
|
-
className:
|
|
1703
|
+
className: at(T == null ? void 0 : T.loader, e == null || (b = e.classNames) == null ? void 0 : b.loader),
|
|
1724
1704
|
visible: K === "loading"
|
|
1725
1705
|
});
|
|
1726
1706
|
}
|
|
1727
|
-
const pe = e.icon || (
|
|
1707
|
+
const pe = e.icon || (A == null ? void 0 : A[K]) || ms(K);
|
|
1728
1708
|
var Vt, $t;
|
|
1729
1709
|
return /* @__PURE__ */ i.createElement("li", {
|
|
1730
1710
|
tabIndex: 0,
|
|
1731
|
-
ref:
|
|
1732
|
-
className:
|
|
1711
|
+
ref: ot,
|
|
1712
|
+
className: at(R, ie, T == null ? void 0 : T.toast, e == null || (s = e.classNames) == null ? void 0 : s.toast, T == null ? void 0 : T.default, T == null ? void 0 : T[K], e == null || (t = e.classNames) == null ? void 0 : t[K]),
|
|
1733
1713
|
"data-sonner-toast": "",
|
|
1734
|
-
"data-rich-colors": (Vt = e.richColors) != null ? Vt :
|
|
1714
|
+
"data-rich-colors": (Vt = e.richColors) != null ? Vt : I,
|
|
1735
1715
|
"data-styled": !(e.jsx || e.unstyled || f),
|
|
1736
|
-
"data-mounted":
|
|
1716
|
+
"data-mounted": w,
|
|
1737
1717
|
"data-promise": !!e.promise,
|
|
1738
|
-
"data-swiped":
|
|
1739
|
-
"data-removed":
|
|
1740
|
-
"data-visible":
|
|
1718
|
+
"data-swiped": kt,
|
|
1719
|
+
"data-removed": M,
|
|
1720
|
+
"data-visible": re,
|
|
1741
1721
|
"data-y-position": de,
|
|
1742
1722
|
"data-x-position": ue,
|
|
1743
1723
|
"data-index": v,
|
|
1744
|
-
"data-front":
|
|
1724
|
+
"data-front": oe,
|
|
1745
1725
|
"data-swiping": ft,
|
|
1746
1726
|
"data-dismissible": bt,
|
|
1747
1727
|
"data-type": K,
|
|
1748
1728
|
"data-invert": me,
|
|
1749
1729
|
"data-swipe-out": pt,
|
|
1750
1730
|
"data-swipe-direction": dt,
|
|
1751
|
-
"data-expanded": !!(
|
|
1731
|
+
"data-expanded": !!(h || F && w),
|
|
1752
1732
|
"data-testid": e.testId,
|
|
1753
1733
|
style: {
|
|
1754
1734
|
"--index": v,
|
|
1755
1735
|
"--toasts-before": v,
|
|
1756
|
-
"--z-index":
|
|
1757
|
-
"--offset": `${
|
|
1758
|
-
"--initial-height":
|
|
1759
|
-
...
|
|
1736
|
+
"--z-index": U.length - v,
|
|
1737
|
+
"--offset": `${M ? ne : gt.current}px`,
|
|
1738
|
+
"--initial-height": F ? "auto" : `${ae}px`,
|
|
1739
|
+
...P,
|
|
1760
1740
|
...e.style
|
|
1761
1741
|
},
|
|
1762
1742
|
onDragEnd: () => {
|
|
1763
|
-
|
|
1743
|
+
D(!1), tt(null), ht.current = null;
|
|
1764
1744
|
},
|
|
1765
1745
|
onPointerDown: (b) => {
|
|
1766
|
-
b.button !== 2 && (
|
|
1746
|
+
b.button !== 2 && (At || !bt || (Ht.current = /* @__PURE__ */ new Date(), Mt(gt.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (D(!0), ht.current = {
|
|
1767
1747
|
x: b.clientX,
|
|
1768
1748
|
y: b.clientY
|
|
1769
1749
|
})));
|
|
1770
1750
|
},
|
|
1771
1751
|
onPointerUp: () => {
|
|
1772
|
-
var b,
|
|
1752
|
+
var b, L, $;
|
|
1773
1753
|
if (pt || !bt) return;
|
|
1774
1754
|
ht.current = null;
|
|
1775
|
-
const G = Number(((b =
|
|
1776
|
-
if (Math.abs(Z) >=
|
|
1777
|
-
|
|
1755
|
+
const G = Number(((b = ot.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), St = Number(((L = ot.current) == null ? void 0 : L.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), O = (/* @__PURE__ */ new Date()).getTime() - (($ = Ht.current) == null ? void 0 : $.getTime()), Z = ct === "x" ? G : St, Dt = Math.abs(Z) / O;
|
|
1756
|
+
if (Math.abs(Z) >= As || Dt > 0.11) {
|
|
1757
|
+
Mt(gt.current), e.onDismiss == null || e.onDismiss.call(e, e), Nt(ct === "x" ? G > 0 ? "right" : "left" : St > 0 ? "down" : "up"), it(), Tt(!0);
|
|
1778
1758
|
return;
|
|
1779
1759
|
} else {
|
|
1780
|
-
var
|
|
1781
|
-
(
|
|
1760
|
+
var et, st;
|
|
1761
|
+
(et = ot.current) == null || et.style.setProperty("--swipe-amount-x", "0px"), (st = ot.current) == null || st.style.setProperty("--swipe-amount-y", "0px");
|
|
1782
1762
|
}
|
|
1783
|
-
xt(!1),
|
|
1763
|
+
xt(!1), D(!1), tt(null);
|
|
1784
1764
|
},
|
|
1785
1765
|
onPointerMove: (b) => {
|
|
1786
|
-
var
|
|
1787
|
-
if (!ht.current || !bt || ((
|
|
1788
|
-
const
|
|
1766
|
+
var L, $, G;
|
|
1767
|
+
if (!ht.current || !bt || ((L = window.getSelection()) == null ? void 0 : L.toString().length) > 0) return;
|
|
1768
|
+
const O = b.clientY - ht.current.y, Z = b.clientX - ht.current.x;
|
|
1789
1769
|
var Dt;
|
|
1790
|
-
const
|
|
1791
|
-
!
|
|
1792
|
-
let
|
|
1770
|
+
const et = (Dt = n.swipeDirections) != null ? Dt : _s(g);
|
|
1771
|
+
!ct && (Math.abs(Z) > 1 || Math.abs(O) > 1) && tt(Math.abs(Z) > Math.abs(O) ? "x" : "y");
|
|
1772
|
+
let st = {
|
|
1793
1773
|
x: 0,
|
|
1794
1774
|
y: 0
|
|
1795
1775
|
};
|
|
1796
1776
|
const Yt = (ut) => 1 / (1.5 + Math.abs(ut) / 20);
|
|
1797
|
-
if (
|
|
1798
|
-
if (
|
|
1799
|
-
if (
|
|
1800
|
-
|
|
1777
|
+
if (ct === "y") {
|
|
1778
|
+
if (et.includes("top") || et.includes("bottom"))
|
|
1779
|
+
if (et.includes("top") && O < 0 || et.includes("bottom") && O > 0)
|
|
1780
|
+
st.y = O;
|
|
1801
1781
|
else {
|
|
1802
|
-
const ut =
|
|
1803
|
-
|
|
1782
|
+
const ut = O * Yt(O);
|
|
1783
|
+
st.y = Math.abs(ut) < Math.abs(O) ? ut : O;
|
|
1804
1784
|
}
|
|
1805
|
-
} else if (
|
|
1806
|
-
if (
|
|
1807
|
-
|
|
1785
|
+
} else if (ct === "x" && (et.includes("left") || et.includes("right")))
|
|
1786
|
+
if (et.includes("left") && Z < 0 || et.includes("right") && Z > 0)
|
|
1787
|
+
st.x = Z;
|
|
1808
1788
|
else {
|
|
1809
1789
|
const ut = Z * Yt(Z);
|
|
1810
|
-
|
|
1790
|
+
st.x = Math.abs(ut) < Math.abs(Z) ? ut : Z;
|
|
1811
1791
|
}
|
|
1812
|
-
(Math.abs(
|
|
1792
|
+
(Math.abs(st.x) > 0 || Math.abs(st.y) > 0) && xt(!0), ($ = ot.current) == null || $.style.setProperty("--swipe-amount-x", `${st.x}px`), (G = ot.current) == null || G.style.setProperty("--swipe-amount-y", `${st.y}px`);
|
|
1813
1793
|
}
|
|
1814
1794
|
}, ce && !e.jsx && K !== "loading" ? /* @__PURE__ */ i.createElement("button", {
|
|
1815
|
-
"aria-label":
|
|
1816
|
-
"data-disabled":
|
|
1795
|
+
"aria-label": rt,
|
|
1796
|
+
"data-disabled": At,
|
|
1817
1797
|
"data-close-button": !0,
|
|
1818
|
-
onClick:
|
|
1798
|
+
onClick: At || !bt ? () => {
|
|
1819
1799
|
} : () => {
|
|
1820
|
-
|
|
1800
|
+
it(), e.onDismiss == null || e.onDismiss.call(e, e);
|
|
1821
1801
|
},
|
|
1822
|
-
className:
|
|
1823
|
-
}, ($t =
|
|
1802
|
+
className: at(T == null ? void 0 : T.closeButton, e == null || (a = e.classNames) == null ? void 0 : a.closeButton)
|
|
1803
|
+
}, ($t = A == null ? void 0 : A.close) != null ? $t : vs) : null, (K || e.icon || e.promise) && e.icon !== null && ((A == null ? void 0 : A[K]) !== null || e.icon) ? /* @__PURE__ */ i.createElement("div", {
|
|
1824
1804
|
"data-icon": "",
|
|
1825
|
-
className:
|
|
1805
|
+
className: at(T == null ? void 0 : T.icon, e == null || (l = e.classNames) == null ? void 0 : l.icon)
|
|
1826
1806
|
}, e.promise || e.type === "loading" && !e.icon ? e.icon || fe() : null, e.type !== "loading" ? pe : null) : null, /* @__PURE__ */ i.createElement("div", {
|
|
1827
1807
|
"data-content": "",
|
|
1828
|
-
className:
|
|
1808
|
+
className: at(T == null ? void 0 : T.content, e == null || (o = e.classNames) == null ? void 0 : o.content)
|
|
1829
1809
|
}, /* @__PURE__ */ i.createElement("div", {
|
|
1830
1810
|
"data-title": "",
|
|
1831
|
-
className:
|
|
1811
|
+
className: at(T == null ? void 0 : T.title, e == null || (c = e.classNames) == null ? void 0 : c.title)
|
|
1832
1812
|
}, e.jsx ? e.jsx : typeof e.title == "function" ? e.title() : e.title), e.description ? /* @__PURE__ */ i.createElement("div", {
|
|
1833
1813
|
"data-description": "",
|
|
1834
|
-
className:
|
|
1814
|
+
className: at(W, le, T == null ? void 0 : T.description, e == null || (d = e.classNames) == null ? void 0 : d.description)
|
|
1835
1815
|
}, typeof e.description == "function" ? e.description() : e.description) : null), /* @__PURE__ */ i.isValidElement(e.cancel) ? e.cancel : e.cancel && Ct(e.cancel) ? /* @__PURE__ */ i.createElement("button", {
|
|
1836
1816
|
"data-button": !0,
|
|
1837
1817
|
"data-cancel": !0,
|
|
1838
|
-
style: e.cancelButtonStyle ||
|
|
1818
|
+
style: e.cancelButtonStyle || C,
|
|
1839
1819
|
onClick: (b) => {
|
|
1840
|
-
Ct(e.cancel) && bt && (e.cancel.onClick == null || e.cancel.onClick.call(e.cancel, b),
|
|
1820
|
+
Ct(e.cancel) && bt && (e.cancel.onClick == null || e.cancel.onClick.call(e.cancel, b), it());
|
|
1841
1821
|
},
|
|
1842
|
-
className:
|
|
1822
|
+
className: at(T == null ? void 0 : T.cancelButton, e == null || (p = e.classNames) == null ? void 0 : p.cancelButton)
|
|
1843
1823
|
}, e.cancel.label) : null, /* @__PURE__ */ i.isValidElement(e.action) ? e.action : e.action && Ct(e.action) ? /* @__PURE__ */ i.createElement("button", {
|
|
1844
1824
|
"data-button": !0,
|
|
1845
1825
|
"data-action": !0,
|
|
1846
|
-
style: e.actionButtonStyle ||
|
|
1826
|
+
style: e.actionButtonStyle || _,
|
|
1847
1827
|
onClick: (b) => {
|
|
1848
|
-
Ct(e.action) && (e.action.onClick == null || e.action.onClick.call(e.action, b), !b.defaultPrevented &&
|
|
1828
|
+
Ct(e.action) && (e.action.onClick == null || e.action.onClick.call(e.action, b), !b.defaultPrevented && it());
|
|
1849
1829
|
},
|
|
1850
|
-
className:
|
|
1830
|
+
className: at(T == null ? void 0 : T.actionButton, e == null || (u = e.classNames) == null ? void 0 : u.actionButton)
|
|
1851
1831
|
}, e.action.label) : null);
|
|
1852
1832
|
};
|
|
1853
1833
|
function Xt() {
|
|
@@ -1861,69 +1841,69 @@ function Hs(n, s) {
|
|
|
1861
1841
|
n,
|
|
1862
1842
|
s
|
|
1863
1843
|
].forEach((a, l) => {
|
|
1864
|
-
const
|
|
1865
|
-
function
|
|
1844
|
+
const o = l === 1, c = o ? "--mobile-offset" : "--offset", d = o ? Is : Cs;
|
|
1845
|
+
function p(u) {
|
|
1866
1846
|
[
|
|
1867
1847
|
"top",
|
|
1868
1848
|
"right",
|
|
1869
1849
|
"bottom",
|
|
1870
1850
|
"left"
|
|
1871
|
-
].forEach((
|
|
1872
|
-
t[`${c}-${
|
|
1851
|
+
].forEach((m) => {
|
|
1852
|
+
t[`${c}-${m}`] = typeof u == "number" ? `${u}px` : u;
|
|
1873
1853
|
});
|
|
1874
1854
|
}
|
|
1875
|
-
typeof a == "number" || typeof a == "string" ?
|
|
1855
|
+
typeof a == "number" || typeof a == "string" ? p(a) : typeof a == "object" ? [
|
|
1876
1856
|
"top",
|
|
1877
1857
|
"right",
|
|
1878
1858
|
"bottom",
|
|
1879
1859
|
"left"
|
|
1880
1860
|
].forEach((u) => {
|
|
1881
1861
|
a[u] === void 0 ? t[`${c}-${u}`] = d : t[`${c}-${u}`] = typeof a[u] == "number" ? `${a[u]}px` : a[u];
|
|
1882
|
-
}) :
|
|
1862
|
+
}) : p(d);
|
|
1883
1863
|
}), t;
|
|
1884
1864
|
}
|
|
1885
1865
|
const Ps = /* @__PURE__ */ i.forwardRef(function(s, t) {
|
|
1886
|
-
const { id: a, invert: l, position:
|
|
1866
|
+
const { id: a, invert: l, position: o = "bottom-right", hotkey: c = [
|
|
1887
1867
|
"altKey",
|
|
1888
1868
|
"KeyT"
|
|
1889
|
-
], expand: d, closeButton:
|
|
1869
|
+
], expand: d, closeButton: p, className: u, offset: m, mobileOffset: e, theme: f = "light", richColors: y, duration: k, style: q, visibleToasts: V = Ds, toastOptions: v, dir: U = Xt(), gap: h = Rs, icons: E, containerAriaLabel: I = "Notifications" } = s, [S, P] = i.useState([]), C = i.useMemo(() => a ? S.filter((w) => w.toasterId === a) : S.filter((w) => !w.toasterId), [
|
|
1890
1870
|
S,
|
|
1891
1871
|
a
|
|
1892
|
-
]),
|
|
1893
|
-
|
|
1894
|
-
].concat(
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
]), [
|
|
1898
|
-
|
|
1899
|
-
var
|
|
1900
|
-
return (
|
|
1872
|
+
]), _ = i.useMemo(() => Array.from(new Set([
|
|
1873
|
+
o
|
|
1874
|
+
].concat(C.filter((w) => w.position).map((w) => w.position)))), [
|
|
1875
|
+
C,
|
|
1876
|
+
o
|
|
1877
|
+
]), [R, W] = i.useState([]), [Y, g] = i.useState(!1), [z, F] = i.useState(!1), [T, A] = i.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), rt = i.useRef(null), ct = c.join("+").replace(/Key/g, "").replace(/Digit/g, ""), tt = i.useRef(null), dt = i.useRef(!1), Nt = i.useCallback((w) => {
|
|
1878
|
+
P((B) => {
|
|
1879
|
+
var M;
|
|
1880
|
+
return (M = B.find((Q) => Q.id === w.id)) != null && M.delete || X.dismiss(w.id), B.filter(({ id: Q }) => Q !== w.id);
|
|
1901
1881
|
});
|
|
1902
1882
|
}, []);
|
|
1903
|
-
return i.useEffect(() => X.subscribe((
|
|
1904
|
-
if (
|
|
1883
|
+
return i.useEffect(() => X.subscribe((w) => {
|
|
1884
|
+
if (w.dismiss) {
|
|
1905
1885
|
requestAnimationFrame(() => {
|
|
1906
|
-
|
|
1907
|
-
...
|
|
1886
|
+
P((B) => B.map((M) => M.id === w.id ? {
|
|
1887
|
+
...M,
|
|
1908
1888
|
delete: !0
|
|
1909
|
-
} :
|
|
1889
|
+
} : M));
|
|
1910
1890
|
});
|
|
1911
1891
|
return;
|
|
1912
1892
|
}
|
|
1913
1893
|
setTimeout(() => {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
const
|
|
1917
|
-
return
|
|
1918
|
-
...
|
|
1894
|
+
Ee.flushSync(() => {
|
|
1895
|
+
P((B) => {
|
|
1896
|
+
const M = B.findIndex((Q) => Q.id === w.id);
|
|
1897
|
+
return M !== -1 ? [
|
|
1898
|
+
...B.slice(0, M),
|
|
1919
1899
|
{
|
|
1920
|
-
...M
|
|
1921
|
-
...
|
|
1900
|
+
...B[M],
|
|
1901
|
+
...w
|
|
1922
1902
|
},
|
|
1923
|
-
...
|
|
1903
|
+
...B.slice(M + 1)
|
|
1924
1904
|
] : [
|
|
1925
|
-
|
|
1926
|
-
...
|
|
1905
|
+
w,
|
|
1906
|
+
...B
|
|
1927
1907
|
];
|
|
1928
1908
|
});
|
|
1929
1909
|
});
|
|
@@ -1932,19 +1912,19 @@ const Ps = /* @__PURE__ */ i.forwardRef(function(s, t) {
|
|
|
1932
1912
|
S
|
|
1933
1913
|
]), i.useEffect(() => {
|
|
1934
1914
|
if (f !== "system") {
|
|
1935
|
-
|
|
1915
|
+
A(f);
|
|
1936
1916
|
return;
|
|
1937
1917
|
}
|
|
1938
|
-
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
1939
|
-
const
|
|
1918
|
+
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? A("dark") : A("light")), typeof window > "u") return;
|
|
1919
|
+
const w = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1940
1920
|
try {
|
|
1941
|
-
|
|
1942
|
-
|
|
1921
|
+
w.addEventListener("change", ({ matches: B }) => {
|
|
1922
|
+
A(B ? "dark" : "light");
|
|
1943
1923
|
});
|
|
1944
1924
|
} catch {
|
|
1945
|
-
|
|
1925
|
+
w.addListener(({ matches: M }) => {
|
|
1946
1926
|
try {
|
|
1947
|
-
|
|
1927
|
+
A(M ? "dark" : "light");
|
|
1948
1928
|
} catch (Q) {
|
|
1949
1929
|
console.error(Q);
|
|
1950
1930
|
}
|
|
@@ -1953,93 +1933,93 @@ const Ps = /* @__PURE__ */ i.forwardRef(function(s, t) {
|
|
|
1953
1933
|
}, [
|
|
1954
1934
|
f
|
|
1955
1935
|
]), i.useEffect(() => {
|
|
1956
|
-
S.length <= 1 &&
|
|
1936
|
+
S.length <= 1 && g(!1);
|
|
1957
1937
|
}, [
|
|
1958
1938
|
S
|
|
1959
1939
|
]), i.useEffect(() => {
|
|
1960
|
-
const
|
|
1961
|
-
var
|
|
1962
|
-
if (c.every((
|
|
1940
|
+
const w = (B) => {
|
|
1941
|
+
var M;
|
|
1942
|
+
if (c.every((D) => B[D] || B.code === D)) {
|
|
1963
1943
|
var ft;
|
|
1964
|
-
|
|
1944
|
+
g(!0), (ft = rt.current) == null || ft.focus();
|
|
1965
1945
|
}
|
|
1966
|
-
|
|
1946
|
+
B.code === "Escape" && (document.activeElement === rt.current || (M = rt.current) != null && M.contains(document.activeElement)) && g(!1);
|
|
1967
1947
|
};
|
|
1968
|
-
return document.addEventListener("keydown",
|
|
1948
|
+
return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
1969
1949
|
}, [
|
|
1970
1950
|
c
|
|
1971
1951
|
]), i.useEffect(() => {
|
|
1972
|
-
if (
|
|
1952
|
+
if (rt.current)
|
|
1973
1953
|
return () => {
|
|
1974
|
-
|
|
1954
|
+
tt.current && (tt.current.focus({
|
|
1975
1955
|
preventScroll: !0
|
|
1976
|
-
}),
|
|
1956
|
+
}), tt.current = null, dt.current = !1);
|
|
1977
1957
|
};
|
|
1978
1958
|
}, [
|
|
1979
|
-
|
|
1959
|
+
rt.current
|
|
1980
1960
|
]), // Remove item from normal navigation flow, only available via hotkey
|
|
1981
1961
|
/* @__PURE__ */ i.createElement("section", {
|
|
1982
1962
|
ref: t,
|
|
1983
|
-
"aria-label": `${
|
|
1963
|
+
"aria-label": `${I} ${ct}`,
|
|
1984
1964
|
tabIndex: -1,
|
|
1985
1965
|
"aria-live": "polite",
|
|
1986
1966
|
"aria-relevant": "additions text",
|
|
1987
1967
|
"aria-atomic": "false",
|
|
1988
1968
|
suppressHydrationWarning: !0
|
|
1989
|
-
},
|
|
1990
|
-
var
|
|
1991
|
-
const [Q, ft] =
|
|
1992
|
-
return
|
|
1993
|
-
key:
|
|
1994
|
-
dir:
|
|
1969
|
+
}, _.map((w, B) => {
|
|
1970
|
+
var M;
|
|
1971
|
+
const [Q, ft] = w.split("-");
|
|
1972
|
+
return C.length ? /* @__PURE__ */ i.createElement("ol", {
|
|
1973
|
+
key: w,
|
|
1974
|
+
dir: U === "auto" ? Xt() : U,
|
|
1995
1975
|
tabIndex: -1,
|
|
1996
|
-
ref:
|
|
1976
|
+
ref: rt,
|
|
1997
1977
|
className: u,
|
|
1998
1978
|
"data-sonner-toaster": !0,
|
|
1999
|
-
"data-sonner-theme":
|
|
1979
|
+
"data-sonner-theme": T,
|
|
2000
1980
|
"data-y-position": Q,
|
|
2001
1981
|
"data-x-position": ft,
|
|
2002
1982
|
style: {
|
|
2003
|
-
"--front-toast-height": `${((
|
|
2004
|
-
"--width": `${
|
|
2005
|
-
"--gap": `${
|
|
2006
|
-
|
|
2007
|
-
...Hs(
|
|
1983
|
+
"--front-toast-height": `${((M = R[0]) == null ? void 0 : M.height) || 0}px`,
|
|
1984
|
+
"--width": `${Ms}px`,
|
|
1985
|
+
"--gap": `${h}px`,
|
|
1986
|
+
...q,
|
|
1987
|
+
...Hs(m, e)
|
|
2008
1988
|
},
|
|
2009
|
-
onBlur: (
|
|
2010
|
-
dt.current && !
|
|
1989
|
+
onBlur: (D) => {
|
|
1990
|
+
dt.current && !D.currentTarget.contains(D.relatedTarget) && (dt.current = !1, tt.current && (tt.current.focus({
|
|
2011
1991
|
preventScroll: !0
|
|
2012
|
-
}),
|
|
1992
|
+
}), tt.current = null));
|
|
2013
1993
|
},
|
|
2014
|
-
onFocus: (
|
|
2015
|
-
|
|
1994
|
+
onFocus: (D) => {
|
|
1995
|
+
D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || dt.current || (dt.current = !0, tt.current = D.relatedTarget);
|
|
2016
1996
|
},
|
|
2017
|
-
onMouseEnter: () =>
|
|
2018
|
-
onMouseMove: () =>
|
|
1997
|
+
onMouseEnter: () => g(!0),
|
|
1998
|
+
onMouseMove: () => g(!0),
|
|
2019
1999
|
onMouseLeave: () => {
|
|
2020
|
-
|
|
2000
|
+
z || g(!1);
|
|
2021
2001
|
},
|
|
2022
|
-
onDragEnd: () =>
|
|
2023
|
-
onPointerDown: (
|
|
2024
|
-
|
|
2002
|
+
onDragEnd: () => g(!1),
|
|
2003
|
+
onPointerDown: (D) => {
|
|
2004
|
+
D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || F(!0);
|
|
2025
2005
|
},
|
|
2026
|
-
onPointerUp: () =>
|
|
2027
|
-
},
|
|
2028
|
-
var
|
|
2006
|
+
onPointerUp: () => F(!1)
|
|
2007
|
+
}, C.filter((D) => !D.position && B === 0 || D.position === w).map((D, pt) => {
|
|
2008
|
+
var Tt, kt;
|
|
2029
2009
|
return /* @__PURE__ */ i.createElement(Ls, {
|
|
2030
|
-
key:
|
|
2031
|
-
icons:
|
|
2010
|
+
key: D.id,
|
|
2011
|
+
icons: E,
|
|
2032
2012
|
index: pt,
|
|
2033
|
-
toast:
|
|
2034
|
-
defaultRichColors:
|
|
2035
|
-
duration: (
|
|
2013
|
+
toast: D,
|
|
2014
|
+
defaultRichColors: y,
|
|
2015
|
+
duration: (Tt = v == null ? void 0 : v.duration) != null ? Tt : k,
|
|
2036
2016
|
className: v == null ? void 0 : v.className,
|
|
2037
2017
|
descriptionClassName: v == null ? void 0 : v.descriptionClassName,
|
|
2038
2018
|
invert: l,
|
|
2039
|
-
visibleToasts:
|
|
2040
|
-
closeButton: (
|
|
2041
|
-
interacting:
|
|
2042
|
-
position:
|
|
2019
|
+
visibleToasts: V,
|
|
2020
|
+
closeButton: (kt = v == null ? void 0 : v.closeButton) != null ? kt : p,
|
|
2021
|
+
interacting: z,
|
|
2022
|
+
position: w,
|
|
2043
2023
|
style: v == null ? void 0 : v.style,
|
|
2044
2024
|
unstyled: v == null ? void 0 : v.unstyled,
|
|
2045
2025
|
classNames: v == null ? void 0 : v.classNames,
|
|
@@ -2047,85 +2027,48 @@ const Ps = /* @__PURE__ */ i.forwardRef(function(s, t) {
|
|
|
2047
2027
|
actionButtonStyle: v == null ? void 0 : v.actionButtonStyle,
|
|
2048
2028
|
closeButtonAriaLabel: v == null ? void 0 : v.closeButtonAriaLabel,
|
|
2049
2029
|
removeToast: Nt,
|
|
2050
|
-
toasts:
|
|
2051
|
-
heights:
|
|
2052
|
-
setHeights:
|
|
2030
|
+
toasts: C.filter((xt) => xt.position == D.position),
|
|
2031
|
+
heights: R.filter((xt) => xt.position == D.position),
|
|
2032
|
+
setHeights: W,
|
|
2053
2033
|
expandByDefault: d,
|
|
2054
|
-
gap:
|
|
2055
|
-
expanded:
|
|
2034
|
+
gap: h,
|
|
2035
|
+
expanded: Y,
|
|
2056
2036
|
swipeDirections: s.swipeDirections
|
|
2057
2037
|
});
|
|
2058
2038
|
})) : null;
|
|
2059
2039
|
}));
|
|
2060
|
-
}), zs = ({
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2040
|
+
}), zs = ({ position: n = "bottom-center", theme: s = "system", toasterProps: t }) => /* @__PURE__ */ r(
|
|
2041
|
+
Ps,
|
|
2042
|
+
{
|
|
2043
|
+
position: n,
|
|
2044
|
+
theme: s,
|
|
2045
|
+
toastOptions: {
|
|
2046
|
+
unstyled: !0,
|
|
2047
|
+
classNames: {
|
|
2048
|
+
toast: "p-4 flex items-center gap-3 rounded-2xl shadow-lg uix-glass-border uix-convex bg-uix-surface-200/60 backdrop-blur-2xl backdrop-saturate-150",
|
|
2049
|
+
title: "text-uix-text-100 font-medium text-sm",
|
|
2050
|
+
description: "text-uix-text-200 text-sm",
|
|
2051
|
+
actionButton: "px-3 py-1.5 bg-uix-prime-400 text-white text-sm font-medium rounded-xl hover:bg-uix-prime-500 transition-colors",
|
|
2052
|
+
cancelButton: "px-3 py-1.5 bg-uix-surface-300/50 text-uix-text-200 text-sm font-medium rounded-xl hover:bg-uix-surface-400/50 transition-colors",
|
|
2053
|
+
success: "[&>svg]:text-green-500",
|
|
2054
|
+
error: "[&>svg]:text-uix-sub1-400",
|
|
2055
|
+
warning: "[&>svg]:text-amber-500",
|
|
2056
|
+
info: "[&>svg]:text-uix-prime-400"
|
|
2057
|
+
}
|
|
2077
2058
|
},
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
description: "text-uix-text-200",
|
|
2082
|
-
actionButton: "bg-uix-prime-300 text-white rounded-xl hover:bg-uix-prime-400",
|
|
2083
|
-
cancelButton: "bg-uix-surface-300/50 text-uix-text-200 rounded-xl hover:bg-uix-surface-400/50",
|
|
2084
|
-
success: "text-green-500",
|
|
2085
|
-
error: "text-uix-sub1-400",
|
|
2086
|
-
warning: "text-amber-500",
|
|
2087
|
-
info: "text-uix-prime-400"
|
|
2088
|
-
}
|
|
2089
|
-
}[s];
|
|
2090
|
-
return /* @__PURE__ */ o(
|
|
2091
|
-
Ps,
|
|
2092
|
-
{
|
|
2093
|
-
position: n,
|
|
2094
|
-
theme: t,
|
|
2095
|
-
toastOptions: {
|
|
2096
|
-
unstyled: !0,
|
|
2097
|
-
classNames: {
|
|
2098
|
-
toast: r.toast,
|
|
2099
|
-
title: r.title,
|
|
2100
|
-
description: r.description,
|
|
2101
|
-
actionButton: r.actionButton,
|
|
2102
|
-
cancelButton: r.cancelButton,
|
|
2103
|
-
success: r.success,
|
|
2104
|
-
error: r.error,
|
|
2105
|
-
warning: r.warning,
|
|
2106
|
-
info: r.info
|
|
2107
|
-
},
|
|
2108
|
-
style: {
|
|
2109
|
-
padding: "16px",
|
|
2110
|
-
gap: "8px",
|
|
2111
|
-
display: "flex",
|
|
2112
|
-
alignItems: "center"
|
|
2113
|
-
}
|
|
2114
|
-
},
|
|
2115
|
-
...a
|
|
2116
|
-
}
|
|
2117
|
-
);
|
|
2118
|
-
};
|
|
2059
|
+
...t
|
|
2060
|
+
}
|
|
2061
|
+
);
|
|
2119
2062
|
zs.displayName = "Toaster";
|
|
2120
2063
|
export {
|
|
2121
2064
|
De as Accordion,
|
|
2122
|
-
|
|
2065
|
+
Me as AccordionContent,
|
|
2123
2066
|
Ce as AccordionItem,
|
|
2124
2067
|
Ie as AccordionTrigger,
|
|
2125
2068
|
Qt as Badge,
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2069
|
+
Re as Button,
|
|
2070
|
+
Ae as Card,
|
|
2071
|
+
Be as CardContent,
|
|
2129
2072
|
He as CardDescription,
|
|
2130
2073
|
_e as CardHeader,
|
|
2131
2074
|
Le as CardTitle,
|
|
@@ -2155,8 +2098,8 @@ export {
|
|
|
2155
2098
|
ns as SidebarMenuButton,
|
|
2156
2099
|
ss as SidebarMenuItem,
|
|
2157
2100
|
as as Slider,
|
|
2158
|
-
|
|
2159
|
-
|
|
2101
|
+
os as Surface,
|
|
2102
|
+
rs as Tabs,
|
|
2160
2103
|
ds as TabsContent,
|
|
2161
2104
|
is as TabsList,
|
|
2162
2105
|
cs as TabsPanels,
|