@stackloop/ui 2.4.2 → 2.4.3
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.cjs.map +1 -1
- package/dist/index.js +240 -240
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import Le, { forwardRef as
|
|
2
|
+
import Le, { forwardRef as se, useState as L, useRef as Y, useEffect as Z, createContext as er, useCallback as ze, useContext as rr } from "react";
|
|
3
3
|
import { motion as g, AnimatePresence as Q } from "framer-motion";
|
|
4
|
-
import { Loader2 as tr, EyeOff as or, Eye as ar, Check as Oe, ChevronDown as Ee, Search as Fe, X as H, Calendar as
|
|
4
|
+
import { Loader2 as tr, EyeOff as or, Eye as ar, Check as Oe, ChevronDown as Ee, Search as Fe, X as H, Calendar as sr, ChevronLeft as Pe, ChevronRight as Ge, ArrowUp as nr, ArrowDown as ir, ChevronsUpDown as lr, Plus as cr, WifiOff as ge, Wifi as Te, Info as dr, AlertTriangle as mr, AlertCircle as ur, CheckCircle as pr, Camera as br, Upload as fr, Play as hr, Pause as gr, Mic as yr, Square as xr, Trash2 as wr, Image as vr, FileText as Me } from "lucide-react";
|
|
5
5
|
function Be(e) {
|
|
6
6
|
var t, a, o = "";
|
|
7
7
|
if (typeof e == "string" || typeof e == "number") o += e;
|
|
8
8
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
9
|
-
var
|
|
10
|
-
for (t = 0; t <
|
|
9
|
+
var s = e.length;
|
|
10
|
+
for (t = 0; t < s; t++) e[t] && (a = Be(e[t])) && (o && (o += " "), o += a);
|
|
11
11
|
} else for (a in e) e[a] && (o && (o += " "), o += a);
|
|
12
12
|
return o;
|
|
13
13
|
}
|
|
14
14
|
function Nr() {
|
|
15
|
-
for (var e, t, a = 0, o = "",
|
|
15
|
+
for (var e, t, a = 0, o = "", s = arguments.length; a < s; a++) (e = arguments[a]) && (t = Be(e)) && (o && (o += " "), o += t);
|
|
16
16
|
return o;
|
|
17
17
|
}
|
|
18
18
|
const kr = (e, t) => {
|
|
@@ -35,34 +35,34 @@ const kr = (e, t) => {
|
|
|
35
35
|
conflictingClassGroupModifiers: o
|
|
36
36
|
} = e;
|
|
37
37
|
return {
|
|
38
|
-
getClassGroupId: (
|
|
39
|
-
if (
|
|
40
|
-
return Tr(
|
|
41
|
-
const c =
|
|
38
|
+
getClassGroupId: (n) => {
|
|
39
|
+
if (n.startsWith("[") && n.endsWith("]"))
|
|
40
|
+
return Tr(n);
|
|
41
|
+
const c = n.split(ue), i = c[0] === "" && c.length > 1 ? 1 : 0;
|
|
42
42
|
return $e(c, i, t);
|
|
43
43
|
},
|
|
44
|
-
getConflictingClassGroupIds: (
|
|
44
|
+
getConflictingClassGroupIds: (n, c) => {
|
|
45
45
|
if (c) {
|
|
46
|
-
const i = o[
|
|
46
|
+
const i = o[n], m = a[n];
|
|
47
47
|
return i ? m ? kr(m, i) : i : m || Re;
|
|
48
48
|
}
|
|
49
|
-
return a[
|
|
49
|
+
return a[n] || Re;
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}, $e = (e, t, a) => {
|
|
53
53
|
if (e.length - t === 0)
|
|
54
54
|
return a.classGroupId;
|
|
55
|
-
const
|
|
55
|
+
const s = e[t], l = a.nextPart.get(s);
|
|
56
56
|
if (l) {
|
|
57
57
|
const m = $e(e, t + 1, l);
|
|
58
58
|
if (m) return m;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
60
|
+
const n = a.validators;
|
|
61
|
+
if (n === null)
|
|
62
62
|
return;
|
|
63
|
-
const c = t === 0 ? e.join(ue) : e.slice(t).join(ue), i =
|
|
63
|
+
const c = t === 0 ? e.join(ue) : e.slice(t).join(ue), i = n.length;
|
|
64
64
|
for (let m = 0; m < i; m++) {
|
|
65
|
-
const x =
|
|
65
|
+
const x = n[m];
|
|
66
66
|
if (x.validator(c))
|
|
67
67
|
return x.classGroupId;
|
|
68
68
|
}
|
|
@@ -78,15 +78,15 @@ const kr = (e, t) => {
|
|
|
78
78
|
}, Rr = (e, t) => {
|
|
79
79
|
const a = Ue();
|
|
80
80
|
for (const o in e) {
|
|
81
|
-
const
|
|
82
|
-
we(
|
|
81
|
+
const s = e[o];
|
|
82
|
+
we(s, a, o, t);
|
|
83
83
|
}
|
|
84
84
|
return a;
|
|
85
85
|
}, we = (e, t, a, o) => {
|
|
86
|
-
const
|
|
87
|
-
for (let l = 0; l <
|
|
88
|
-
const
|
|
89
|
-
Ar(
|
|
86
|
+
const s = e.length;
|
|
87
|
+
for (let l = 0; l < s; l++) {
|
|
88
|
+
const n = e[l];
|
|
89
|
+
Ar(n, t, a, o);
|
|
90
90
|
}
|
|
91
91
|
}, Ar = (e, t, a, o) => {
|
|
92
92
|
if (typeof e == "string") {
|
|
@@ -108,18 +108,18 @@ const kr = (e, t) => {
|
|
|
108
108
|
}
|
|
109
109
|
t.validators === null && (t.validators = []), t.validators.push(Cr(a, e));
|
|
110
110
|
}, Dr = (e, t, a, o) => {
|
|
111
|
-
const
|
|
112
|
-
for (let
|
|
113
|
-
const [c, i] = n
|
|
111
|
+
const s = Object.entries(e), l = s.length;
|
|
112
|
+
for (let n = 0; n < l; n++) {
|
|
113
|
+
const [c, i] = s[n];
|
|
114
114
|
we(i, _e(t, c), a, o);
|
|
115
115
|
}
|
|
116
116
|
}, _e = (e, t) => {
|
|
117
117
|
let a = e;
|
|
118
|
-
const o = t.split(ue),
|
|
119
|
-
for (let l = 0; l <
|
|
120
|
-
const
|
|
121
|
-
let c = a.nextPart.get(
|
|
122
|
-
c || (c = Ue(), a.nextPart.set(
|
|
118
|
+
const o = t.split(ue), s = o.length;
|
|
119
|
+
for (let l = 0; l < s; l++) {
|
|
120
|
+
const n = o[l];
|
|
121
|
+
let c = a.nextPart.get(n);
|
|
122
|
+
c || (c = Ue(), a.nextPart.set(n, c)), a = c;
|
|
123
123
|
}
|
|
124
124
|
return a;
|
|
125
125
|
}, Lr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Or = (e) => {
|
|
@@ -131,41 +131,41 @@ const kr = (e, t) => {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
let t = 0, a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
134
|
-
const
|
|
135
|
-
a[l] =
|
|
134
|
+
const s = (l, n) => {
|
|
135
|
+
a[l] = n, t++, t > e && (t = 0, o = a, a = /* @__PURE__ */ Object.create(null));
|
|
136
136
|
};
|
|
137
137
|
return {
|
|
138
138
|
get(l) {
|
|
139
|
-
let
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
142
|
-
if ((
|
|
143
|
-
return
|
|
139
|
+
let n = a[l];
|
|
140
|
+
if (n !== void 0)
|
|
141
|
+
return n;
|
|
142
|
+
if ((n = o[l]) !== void 0)
|
|
143
|
+
return s(l, n), n;
|
|
144
144
|
},
|
|
145
|
-
set(l,
|
|
146
|
-
l in a ? a[l] =
|
|
145
|
+
set(l, n) {
|
|
146
|
+
l in a ? a[l] = n : s(l, n);
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
}, ye = "!", Ae = ":", Er = [], Ie = (e, t, a, o,
|
|
149
|
+
}, ye = "!", Ae = ":", Er = [], Ie = (e, t, a, o, s) => ({
|
|
150
150
|
modifiers: e,
|
|
151
151
|
hasImportantModifier: t,
|
|
152
152
|
baseClassName: a,
|
|
153
153
|
maybePostfixModifierPosition: o,
|
|
154
|
-
isExternal:
|
|
154
|
+
isExternal: s
|
|
155
155
|
}), Fr = (e) => {
|
|
156
156
|
const {
|
|
157
157
|
prefix: t,
|
|
158
158
|
experimentalParseClassName: a
|
|
159
159
|
} = e;
|
|
160
|
-
let o = (
|
|
160
|
+
let o = (s) => {
|
|
161
161
|
const l = [];
|
|
162
|
-
let
|
|
163
|
-
const x =
|
|
162
|
+
let n = 0, c = 0, i = 0, m;
|
|
163
|
+
const x = s.length;
|
|
164
164
|
for (let v = 0; v < x; v++) {
|
|
165
|
-
const M =
|
|
166
|
-
if (
|
|
165
|
+
const M = s[v];
|
|
166
|
+
if (n === 0 && c === 0) {
|
|
167
167
|
if (M === Ae) {
|
|
168
|
-
l.push(
|
|
168
|
+
l.push(s.slice(i, v)), i = v + 1;
|
|
169
169
|
continue;
|
|
170
170
|
}
|
|
171
171
|
if (M === "/") {
|
|
@@ -173,9 +173,9 @@ const kr = (e, t) => {
|
|
|
173
173
|
continue;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
M === "[" ?
|
|
176
|
+
M === "[" ? n++ : M === "]" ? n-- : M === "(" ? c++ : M === ")" && c--;
|
|
177
177
|
}
|
|
178
|
-
const y = l.length === 0 ?
|
|
178
|
+
const y = l.length === 0 ? s : s.slice(i);
|
|
179
179
|
let f = y, k = !1;
|
|
180
180
|
y.endsWith(ye) ? (f = y.slice(0, -1), k = !0) : (
|
|
181
181
|
/**
|
|
@@ -188,14 +188,14 @@ const kr = (e, t) => {
|
|
|
188
188
|
return Ie(l, k, f, w);
|
|
189
189
|
};
|
|
190
190
|
if (t) {
|
|
191
|
-
const
|
|
192
|
-
o = (
|
|
191
|
+
const s = t + Ae, l = o;
|
|
192
|
+
o = (n) => n.startsWith(s) ? l(n.slice(s.length)) : Ie(Er, !1, n, void 0, !0);
|
|
193
193
|
}
|
|
194
194
|
if (a) {
|
|
195
|
-
const
|
|
195
|
+
const s = o;
|
|
196
196
|
o = (l) => a({
|
|
197
197
|
className: l,
|
|
198
|
-
parseClassName:
|
|
198
|
+
parseClassName: s
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
return o;
|
|
@@ -205,12 +205,12 @@ const kr = (e, t) => {
|
|
|
205
205
|
t.set(a, 1e6 + o);
|
|
206
206
|
}), (a) => {
|
|
207
207
|
const o = [];
|
|
208
|
-
let
|
|
208
|
+
let s = [];
|
|
209
209
|
for (let l = 0; l < a.length; l++) {
|
|
210
|
-
const
|
|
211
|
-
c || i ? (
|
|
210
|
+
const n = a[l], c = n[0] === "[", i = t.has(n);
|
|
211
|
+
c || i ? (s.length > 0 && (s.sort(), o.push(...s), s = []), o.push(n)) : s.push(n);
|
|
212
212
|
}
|
|
213
|
-
return
|
|
213
|
+
return s.length > 0 && (s.sort(), o.push(...s)), o;
|
|
214
214
|
};
|
|
215
215
|
}, Gr = (e) => ({
|
|
216
216
|
cache: Or(e.cacheSize),
|
|
@@ -221,9 +221,9 @@ const kr = (e, t) => {
|
|
|
221
221
|
const {
|
|
222
222
|
parseClassName: a,
|
|
223
223
|
getClassGroupId: o,
|
|
224
|
-
getConflictingClassGroupIds:
|
|
224
|
+
getConflictingClassGroupIds: s,
|
|
225
225
|
sortModifiers: l
|
|
226
|
-
} = t,
|
|
226
|
+
} = t, n = [], c = e.trim().split(Br);
|
|
227
227
|
let i = "";
|
|
228
228
|
for (let m = c.length - 1; m >= 0; m -= 1) {
|
|
229
229
|
const x = c[m], {
|
|
@@ -250,22 +250,22 @@ const kr = (e, t) => {
|
|
|
250
250
|
M = !1;
|
|
251
251
|
}
|
|
252
252
|
const T = f.length === 0 ? "" : f.length === 1 ? f[0] : l(f).join(":"), O = k ? T + ye : T, G = O + I;
|
|
253
|
-
if (
|
|
253
|
+
if (n.indexOf(G) > -1)
|
|
254
254
|
continue;
|
|
255
|
-
|
|
256
|
-
const z =
|
|
255
|
+
n.push(G);
|
|
256
|
+
const z = s(I, M);
|
|
257
257
|
for (let R = 0; R < z.length; ++R) {
|
|
258
258
|
const F = z[R];
|
|
259
|
-
|
|
259
|
+
n.push(O + F);
|
|
260
260
|
}
|
|
261
261
|
i = x + (i.length > 0 ? " " + i : i);
|
|
262
262
|
}
|
|
263
263
|
return i;
|
|
264
264
|
}, $r = (...e) => {
|
|
265
|
-
let t = 0, a, o,
|
|
265
|
+
let t = 0, a, o, s = "";
|
|
266
266
|
for (; t < e.length; )
|
|
267
|
-
(a = e[t++]) && (o = Ve(a)) && (
|
|
268
|
-
return
|
|
267
|
+
(a = e[t++]) && (o = Ve(a)) && (s && (s += " "), s += o);
|
|
268
|
+
return s;
|
|
269
269
|
}, Ve = (e) => {
|
|
270
270
|
if (typeof e == "string")
|
|
271
271
|
return e;
|
|
@@ -274,18 +274,18 @@ const kr = (e, t) => {
|
|
|
274
274
|
e[o] && (t = Ve(e[o])) && (a && (a += " "), a += t);
|
|
275
275
|
return a;
|
|
276
276
|
}, _r = (e, ...t) => {
|
|
277
|
-
let a, o,
|
|
278
|
-
const
|
|
277
|
+
let a, o, s, l;
|
|
278
|
+
const n = (i) => {
|
|
279
279
|
const m = t.reduce((x, y) => y(x), e());
|
|
280
|
-
return a = Gr(m), o = a.cache.get,
|
|
280
|
+
return a = Gr(m), o = a.cache.get, s = a.cache.set, l = c, c(i);
|
|
281
281
|
}, c = (i) => {
|
|
282
282
|
const m = o(i);
|
|
283
283
|
if (m)
|
|
284
284
|
return m;
|
|
285
285
|
const x = Ur(i, a);
|
|
286
|
-
return
|
|
286
|
+
return s(i, x), x;
|
|
287
287
|
};
|
|
288
|
-
return l =
|
|
288
|
+
return l = n, (...i) => l($r(...i));
|
|
289
289
|
}, Vr = [], A = (e) => {
|
|
290
290
|
const t = (a) => a[e] || Vr;
|
|
291
291
|
return t.isThemeGetter = !0, t;
|
|
@@ -294,14 +294,14 @@ const kr = (e, t) => {
|
|
|
294
294
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
295
295
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
296
296
|
Hr.test(e) && !qr.test(e)
|
|
297
|
-
), He = () => !1, Zr = (e) => Jr.test(e), et = (e) => Qr.test(e), rt = (e) => !p(e) && !b(e), tt = (e) => ee(e, Qe, He), p = (e) => We.test(e), K = (e) => ee(e, Ke, Xr), he = (e) => ee(e, it, S), je = (e) => ee(e, qe, He), ot = (e) => ee(e, Je, et), de = (e) => ee(e, Xe, Zr), b = (e) => Ye.test(e), oe = (e) => re(e, Ke), at = (e) => re(e, lt), De = (e) => re(e, qe),
|
|
297
|
+
), He = () => !1, Zr = (e) => Jr.test(e), et = (e) => Qr.test(e), rt = (e) => !p(e) && !b(e), tt = (e) => ee(e, Qe, He), p = (e) => We.test(e), K = (e) => ee(e, Ke, Xr), he = (e) => ee(e, it, S), je = (e) => ee(e, qe, He), ot = (e) => ee(e, Je, et), de = (e) => ee(e, Xe, Zr), b = (e) => Ye.test(e), oe = (e) => re(e, Ke), at = (e) => re(e, lt), De = (e) => re(e, qe), st = (e) => re(e, Qe), nt = (e) => re(e, Je), me = (e) => re(e, Xe, !0), ee = (e, t, a) => {
|
|
298
298
|
const o = We.exec(e);
|
|
299
299
|
return o ? o[1] ? t(o[1]) : a(o[2]) : !1;
|
|
300
300
|
}, re = (e, t, a = !1) => {
|
|
301
301
|
const o = Ye.exec(e);
|
|
302
302
|
return o ? o[1] ? t(o[1]) : a : !1;
|
|
303
303
|
}, qe = (e) => e === "position" || e === "percentage", Je = (e) => e === "image" || e === "url", Qe = (e) => e === "length" || e === "size" || e === "bg-size", Ke = (e) => e === "length", it = (e) => e === "number", lt = (e) => e === "family-name", Xe = (e) => e === "shadow", ct = () => {
|
|
304
|
-
const e = A("color"), t = A("font"), a = A("text"), o = A("font-weight"),
|
|
304
|
+
const e = A("color"), t = A("font"), a = A("text"), o = A("font-weight"), s = A("tracking"), l = A("leading"), n = A("breakpoint"), c = A("container"), i = A("spacing"), m = A("radius"), x = A("shadow"), y = A("inset-shadow"), f = A("text-shadow"), k = A("drop-shadow"), w = A("blur"), v = A("perspective"), M = A("aspect"), I = A("ease"), T = A("animate"), O = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [
|
|
305
305
|
"center",
|
|
306
306
|
"top",
|
|
307
307
|
"bottom",
|
|
@@ -325,7 +325,7 @@ const kr = (e, t) => {
|
|
|
325
325
|
position: [b, p]
|
|
326
326
|
}], Ne = () => ["no-repeat", {
|
|
327
327
|
repeat: ["", "x", "y", "space", "round"]
|
|
328
|
-
}], ke = () => ["auto", "cover", "contain",
|
|
328
|
+
}], ke = () => ["auto", "cover", "contain", st, tt, {
|
|
329
329
|
size: [b, p]
|
|
330
330
|
}], pe = () => [fe, oe, K], E = () => [
|
|
331
331
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -335,7 +335,7 @@ const kr = (e, t) => {
|
|
|
335
335
|
m,
|
|
336
336
|
b,
|
|
337
337
|
p
|
|
338
|
-
], U = () => ["", S, oe, K],
|
|
338
|
+
], U = () => ["", S, oe, K], ne = () => ["solid", "dashed", "dotted", "double"], Ce = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], D = () => [S, fe, De, je], Se = () => [
|
|
339
339
|
// Deprecated since Tailwind CSS v4.0.0
|
|
340
340
|
"",
|
|
341
341
|
"none",
|
|
@@ -1001,7 +1001,7 @@ const kr = (e, t) => {
|
|
|
1001
1001
|
"prose",
|
|
1002
1002
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1003
1003
|
{
|
|
1004
|
-
screen: [
|
|
1004
|
+
screen: [n]
|
|
1005
1005
|
},
|
|
1006
1006
|
...P()
|
|
1007
1007
|
]
|
|
@@ -1103,7 +1103,7 @@ const kr = (e, t) => {
|
|
|
1103
1103
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1104
1104
|
*/
|
|
1105
1105
|
tracking: [{
|
|
1106
|
-
tracking: [
|
|
1106
|
+
tracking: [s, b, p]
|
|
1107
1107
|
}],
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Line Clamp
|
|
@@ -1176,7 +1176,7 @@ const kr = (e, t) => {
|
|
|
1176
1176
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1177
1177
|
*/
|
|
1178
1178
|
"text-decoration-style": [{
|
|
1179
|
-
decoration: [...
|
|
1179
|
+
decoration: [...ne(), "wavy"]
|
|
1180
1180
|
}],
|
|
1181
1181
|
/**
|
|
1182
1182
|
* Text Decoration Thickness
|
|
@@ -1321,7 +1321,7 @@ const kr = (e, t) => {
|
|
|
1321
1321
|
}, J, b, p],
|
|
1322
1322
|
radial: ["", b, p],
|
|
1323
1323
|
conic: [J, b, p]
|
|
1324
|
-
},
|
|
1324
|
+
}, nt, ot]
|
|
1325
1325
|
}],
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Background Color
|
|
@@ -1572,14 +1572,14 @@ const kr = (e, t) => {
|
|
|
1572
1572
|
* @see https://tailwindcss.com/docs/border-style
|
|
1573
1573
|
*/
|
|
1574
1574
|
"border-style": [{
|
|
1575
|
-
border: [...
|
|
1575
|
+
border: [...ne(), "hidden", "none"]
|
|
1576
1576
|
}],
|
|
1577
1577
|
/**
|
|
1578
1578
|
* Divide Style
|
|
1579
1579
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
1580
1580
|
*/
|
|
1581
1581
|
"divide-style": [{
|
|
1582
|
-
divide: [...
|
|
1582
|
+
divide: [...ne(), "hidden", "none"]
|
|
1583
1583
|
}],
|
|
1584
1584
|
/**
|
|
1585
1585
|
* Border Color
|
|
@@ -1656,7 +1656,7 @@ const kr = (e, t) => {
|
|
|
1656
1656
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1657
1657
|
*/
|
|
1658
1658
|
"outline-style": [{
|
|
1659
|
-
outline: [...
|
|
1659
|
+
outline: [...ne(), "none", "hidden"]
|
|
1660
1660
|
}],
|
|
1661
1661
|
/**
|
|
1662
1662
|
* Outline Offset
|
|
@@ -2775,7 +2775,7 @@ function u(...e) {
|
|
|
2775
2775
|
return dt(Nr(e));
|
|
2776
2776
|
}
|
|
2777
2777
|
const xe = Le.forwardRef(
|
|
2778
|
-
({ variant: e = "primary", size: t = "md", loading: a, icon: o, className:
|
|
2778
|
+
({ variant: e = "primary", size: t = "md", loading: a, icon: o, className: s, children: l, disabled: n, ...c }, i) => {
|
|
2779
2779
|
const m = "inline-flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] flex-shrink-0 whitespace-nowrap", x = {
|
|
2780
2780
|
primary: "bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 shadow-sm",
|
|
2781
2781
|
secondary: "bg-secondary text-foreground hover:bg-border active:bg-border-dark",
|
|
@@ -2791,9 +2791,9 @@ const xe = Le.forwardRef(
|
|
|
2791
2791
|
g.button,
|
|
2792
2792
|
{
|
|
2793
2793
|
ref: i,
|
|
2794
|
-
whileTap: { scale:
|
|
2795
|
-
className: u(m, x[e], y[t],
|
|
2796
|
-
disabled:
|
|
2794
|
+
whileTap: { scale: n || a ? 1 : 0.98 },
|
|
2795
|
+
className: u(m, x[e], y[t], s),
|
|
2796
|
+
disabled: n || a,
|
|
2797
2797
|
...c,
|
|
2798
2798
|
children: [
|
|
2799
2799
|
a ? /* @__PURE__ */ r(tr, { className: "h-5 w-5 animate-spin" }) : o ? /* @__PURE__ */ r("span", { className: "flex-shrink-0", children: o }) : null,
|
|
@@ -2804,9 +2804,9 @@ const xe = Le.forwardRef(
|
|
|
2804
2804
|
}
|
|
2805
2805
|
);
|
|
2806
2806
|
xe.displayName = "Button";
|
|
2807
|
-
const mt =
|
|
2808
|
-
({ label: e, error: t, hint: a, leftIcon: o, rightIcon:
|
|
2809
|
-
const [m, x] = L(!1), y =
|
|
2807
|
+
const mt = se(
|
|
2808
|
+
({ label: e, error: t, hint: a, leftIcon: o, rightIcon: s, className: l, type: n, ...c }, i) => {
|
|
2809
|
+
const [m, x] = L(!1), y = n === "password", f = y && m ? "text" : n;
|
|
2810
2810
|
return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5", children: [
|
|
2811
2811
|
e && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
2812
2812
|
e,
|
|
@@ -2833,7 +2833,7 @@ const mt = ne(
|
|
|
2833
2833
|
paddingTop: "12px",
|
|
2834
2834
|
paddingBottom: "12px",
|
|
2835
2835
|
paddingLeft: o ? "44px" : "16px",
|
|
2836
|
-
paddingRight:
|
|
2836
|
+
paddingRight: s || y ? "44px" : "16px"
|
|
2837
2837
|
},
|
|
2838
2838
|
...c
|
|
2839
2839
|
}
|
|
@@ -2858,7 +2858,7 @@ const mt = ne(
|
|
|
2858
2858
|
children: m ? /* @__PURE__ */ r(or, { className: "w-5 h-5" }) : /* @__PURE__ */ r(ar, { className: "w-5 h-5" })
|
|
2859
2859
|
}
|
|
2860
2860
|
),
|
|
2861
|
-
|
|
2861
|
+
s && !y && /* @__PURE__ */ r("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: s })
|
|
2862
2862
|
] }),
|
|
2863
2863
|
t && /* @__PURE__ */ r(
|
|
2864
2864
|
g.p,
|
|
@@ -2874,8 +2874,8 @@ const mt = ne(
|
|
|
2874
2874
|
}
|
|
2875
2875
|
);
|
|
2876
2876
|
mt.displayName = "Input";
|
|
2877
|
-
const ut =
|
|
2878
|
-
({ label: e, error: t, helperText: a, className: o, required:
|
|
2877
|
+
const ut = se(
|
|
2878
|
+
({ label: e, error: t, helperText: a, className: o, required: s, ...l }, n) => /* @__PURE__ */ d(
|
|
2879
2879
|
g.div,
|
|
2880
2880
|
{
|
|
2881
2881
|
initial: { opacity: 0, y: 10 },
|
|
@@ -2885,12 +2885,12 @@ const ut = ne(
|
|
|
2885
2885
|
children: [
|
|
2886
2886
|
e && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: [
|
|
2887
2887
|
e,
|
|
2888
|
-
|
|
2888
|
+
s && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
|
|
2889
2889
|
] }),
|
|
2890
2890
|
/* @__PURE__ */ r(
|
|
2891
2891
|
"textarea",
|
|
2892
2892
|
{
|
|
2893
|
-
ref:
|
|
2893
|
+
ref: n,
|
|
2894
2894
|
className: u(
|
|
2895
2895
|
"w-full px-4 py-3 bg-background border border-border rounded-md",
|
|
2896
2896
|
"text-foreground placeholder:text-foreground/50",
|
|
@@ -2919,9 +2919,9 @@ const ut = ne(
|
|
|
2919
2919
|
)
|
|
2920
2920
|
);
|
|
2921
2921
|
ut.displayName = "Textarea";
|
|
2922
|
-
const pt =
|
|
2923
|
-
({ label: e, description: t, className: a, checked: o, defaultChecked:
|
|
2924
|
-
const [i, m] = L(
|
|
2922
|
+
const pt = se(
|
|
2923
|
+
({ label: e, description: t, className: a, checked: o, defaultChecked: s, onChange: l, ...n }, c) => {
|
|
2924
|
+
const [i, m] = L(s || !1), x = o !== void 0 ? o : i;
|
|
2925
2925
|
return /* @__PURE__ */ d("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
2926
2926
|
/* @__PURE__ */ d("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
2927
2927
|
/* @__PURE__ */ r(
|
|
@@ -2934,7 +2934,7 @@ const pt = ne(
|
|
|
2934
2934
|
onChange: (f) => {
|
|
2935
2935
|
o === void 0 && m(f.target.checked), l?.(f.target.checked);
|
|
2936
2936
|
},
|
|
2937
|
-
...
|
|
2937
|
+
...n
|
|
2938
2938
|
}
|
|
2939
2939
|
),
|
|
2940
2940
|
/* @__PURE__ */ r(
|
|
@@ -2969,27 +2969,27 @@ const Rt = ({
|
|
|
2969
2969
|
value: t,
|
|
2970
2970
|
onChange: a,
|
|
2971
2971
|
name: o,
|
|
2972
|
-
disabled:
|
|
2972
|
+
disabled: s,
|
|
2973
2973
|
className: l
|
|
2974
|
-
}) => /* @__PURE__ */ r("div", { className: u("flex flex-wrap gap-2", l), children: e.map((
|
|
2975
|
-
const c = t ===
|
|
2974
|
+
}) => /* @__PURE__ */ r("div", { className: u("flex flex-wrap gap-2", l), children: e.map((n) => {
|
|
2975
|
+
const c = t === n.value;
|
|
2976
2976
|
return /* @__PURE__ */ d("label", { className: "relative cursor-pointer", children: [
|
|
2977
2977
|
/* @__PURE__ */ r(
|
|
2978
2978
|
"input",
|
|
2979
2979
|
{
|
|
2980
2980
|
type: "radio",
|
|
2981
2981
|
name: o,
|
|
2982
|
-
value:
|
|
2982
|
+
value: n.value,
|
|
2983
2983
|
checked: c,
|
|
2984
2984
|
onChange: (i) => a?.(i.target.value),
|
|
2985
|
-
disabled:
|
|
2985
|
+
disabled: s,
|
|
2986
2986
|
className: "sr-only peer"
|
|
2987
2987
|
}
|
|
2988
2988
|
),
|
|
2989
2989
|
/* @__PURE__ */ d(
|
|
2990
2990
|
g.div,
|
|
2991
2991
|
{
|
|
2992
|
-
whileTap: { scale:
|
|
2992
|
+
whileTap: { scale: s ? 1 : 0.95 },
|
|
2993
2993
|
className: u(
|
|
2994
2994
|
"px-4 py-2.5 rounded-full border-2 transition-all duration-200",
|
|
2995
2995
|
"flex items-center gap-2 min-h-[2.75rem]",
|
|
@@ -2998,14 +2998,14 @@ const Rt = ({
|
|
|
2998
2998
|
c ? "bg-primary border-primary text-white" : "bg-background border-border text-primary hover:border-border-dark"
|
|
2999
2999
|
),
|
|
3000
3000
|
children: [
|
|
3001
|
-
|
|
3002
|
-
/* @__PURE__ */ r("span", { className: "font-medium text-base", children:
|
|
3001
|
+
n.icon && /* @__PURE__ */ r("span", { className: "flex-shrink-0", children: n.icon }),
|
|
3002
|
+
/* @__PURE__ */ r("span", { className: "font-medium text-base", children: n.label })
|
|
3003
3003
|
]
|
|
3004
3004
|
}
|
|
3005
3005
|
)
|
|
3006
|
-
] },
|
|
3007
|
-
}) }), bt =
|
|
3008
|
-
({ label: e, description: t, className: a, checked: o, onChange:
|
|
3006
|
+
] }, n.value);
|
|
3007
|
+
}) }), bt = se(
|
|
3008
|
+
({ label: e, description: t, className: a, checked: o, onChange: s, ...l }, n) => /* @__PURE__ */ d("label", { className: "flex items-center justify-between gap-4 cursor-pointer group", children: [
|
|
3009
3009
|
(e || t) && /* @__PURE__ */ d("div", { className: "flex-1 space-y-0.5", children: [
|
|
3010
3010
|
e && /* @__PURE__ */ r("div", { className: "text-base font-medium text-foreground", children: e }),
|
|
3011
3011
|
t && /* @__PURE__ */ r("div", { className: "text-sm text-primary/70", children: t })
|
|
@@ -3014,10 +3014,10 @@ const Rt = ({
|
|
|
3014
3014
|
/* @__PURE__ */ r(
|
|
3015
3015
|
"input",
|
|
3016
3016
|
{
|
|
3017
|
-
ref:
|
|
3017
|
+
ref: n,
|
|
3018
3018
|
type: "checkbox",
|
|
3019
3019
|
onChange: (i) => {
|
|
3020
|
-
|
|
3020
|
+
s?.(i.target.checked);
|
|
3021
3021
|
},
|
|
3022
3022
|
className: "sr-only peer",
|
|
3023
3023
|
checked: o,
|
|
@@ -3053,18 +3053,18 @@ const At = ({
|
|
|
3053
3053
|
onChange: t,
|
|
3054
3054
|
min: a = 0,
|
|
3055
3055
|
max: o = 100,
|
|
3056
|
-
step:
|
|
3056
|
+
step: s = 1,
|
|
3057
3057
|
label: l,
|
|
3058
|
-
showValue:
|
|
3058
|
+
showValue: n = !0,
|
|
3059
3059
|
unit: c = "%",
|
|
3060
3060
|
disabled: i,
|
|
3061
3061
|
className: m
|
|
3062
3062
|
}) => {
|
|
3063
3063
|
const [x, y] = L(!1), f = (e - a) / (o - a) * 100;
|
|
3064
3064
|
return /* @__PURE__ */ d("div", { className: u("w-full space-y-2", m), children: [
|
|
3065
|
-
(l ||
|
|
3065
|
+
(l || n) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
3066
3066
|
l && /* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children: l }),
|
|
3067
|
-
|
|
3067
|
+
n && /* @__PURE__ */ d("span", { className: "text-sm font-semibold text-primary", children: [
|
|
3068
3068
|
e,
|
|
3069
3069
|
c
|
|
3070
3070
|
] })
|
|
@@ -3086,7 +3086,7 @@ const At = ({
|
|
|
3086
3086
|
type: "range",
|
|
3087
3087
|
min: a,
|
|
3088
3088
|
max: o,
|
|
3089
|
-
step:
|
|
3089
|
+
step: s,
|
|
3090
3090
|
value: e,
|
|
3091
3091
|
onChange: (k) => t(Number(k.target.value)),
|
|
3092
3092
|
onMouseDown: () => y(!0),
|
|
@@ -3118,17 +3118,17 @@ const At = ({
|
|
|
3118
3118
|
value2: t,
|
|
3119
3119
|
onChange: a,
|
|
3120
3120
|
label1: o,
|
|
3121
|
-
label2:
|
|
3121
|
+
label2: s,
|
|
3122
3122
|
min: l = 0,
|
|
3123
|
-
max:
|
|
3123
|
+
max: n = 100,
|
|
3124
3124
|
step: c = 1,
|
|
3125
3125
|
unit: i = "%",
|
|
3126
3126
|
disabled: m,
|
|
3127
3127
|
className: x
|
|
3128
3128
|
}) => {
|
|
3129
3129
|
const y = e + t, f = y > 0 ? e / y * 100 : 50, k = y > 0 ? t / y * 100 : 50, w = (v) => {
|
|
3130
|
-
const M =
|
|
3131
|
-
a(v, Math.max(l, Math.min(
|
|
3130
|
+
const M = n - v;
|
|
3131
|
+
a(v, Math.max(l, Math.min(n, M)));
|
|
3132
3132
|
};
|
|
3133
3133
|
return /* @__PURE__ */ d("div", { className: u("w-full space-y-3", x), children: [
|
|
3134
3134
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
@@ -3154,7 +3154,7 @@ const At = ({
|
|
|
3154
3154
|
{
|
|
3155
3155
|
type: "range",
|
|
3156
3156
|
min: l,
|
|
3157
|
-
max:
|
|
3157
|
+
max: n,
|
|
3158
3158
|
step: c,
|
|
3159
3159
|
value: e,
|
|
3160
3160
|
onChange: (v) => w(Number(v.target.value)),
|
|
@@ -3166,7 +3166,7 @@ const At = ({
|
|
|
3166
3166
|
] }),
|
|
3167
3167
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
3168
3168
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
3169
|
-
/* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children:
|
|
3169
|
+
/* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children: s }),
|
|
3170
3170
|
/* @__PURE__ */ d("span", { className: "text-sm font-semibold text-success", children: [
|
|
3171
3171
|
t,
|
|
3172
3172
|
i
|
|
@@ -3187,10 +3187,10 @@ const At = ({
|
|
|
3187
3187
|
{
|
|
3188
3188
|
type: "range",
|
|
3189
3189
|
min: l,
|
|
3190
|
-
max:
|
|
3190
|
+
max: n,
|
|
3191
3191
|
step: c,
|
|
3192
3192
|
value: t,
|
|
3193
|
-
onChange: (v) => w(
|
|
3193
|
+
onChange: (v) => w(n - Number(v.target.value)),
|
|
3194
3194
|
disabled: m,
|
|
3195
3195
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
3196
3196
|
}
|
|
@@ -3208,14 +3208,14 @@ const At = ({
|
|
|
3208
3208
|
value: t,
|
|
3209
3209
|
onChange: a,
|
|
3210
3210
|
placeholder: o = "Select an option",
|
|
3211
|
-
label:
|
|
3211
|
+
label: s,
|
|
3212
3212
|
error: l,
|
|
3213
|
-
searchable:
|
|
3213
|
+
searchable: n = !1,
|
|
3214
3214
|
clearable: c = !0,
|
|
3215
3215
|
disabled: i,
|
|
3216
3216
|
className: m
|
|
3217
3217
|
}) => {
|
|
3218
|
-
const [x, y] = L(!1), [f, k] = L(""), w = Y(null), v = e.find((T) => T.value === t), M =
|
|
3218
|
+
const [x, y] = L(!1), [f, k] = L(""), w = Y(null), v = e.find((T) => T.value === t), M = n ? e.filter(
|
|
3219
3219
|
(T) => T.label.toLowerCase().includes(f.toLowerCase())
|
|
3220
3220
|
) : e;
|
|
3221
3221
|
Z(() => {
|
|
@@ -3228,7 +3228,7 @@ const At = ({
|
|
|
3228
3228
|
a(T), y(!1), k("");
|
|
3229
3229
|
};
|
|
3230
3230
|
return /* @__PURE__ */ d("div", { ref: w, className: u("relative w-full", m), children: [
|
|
3231
|
-
|
|
3231
|
+
s && /* @__PURE__ */ r("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: s }),
|
|
3232
3232
|
/* @__PURE__ */ d(
|
|
3233
3233
|
"button",
|
|
3234
3234
|
{
|
|
@@ -3271,7 +3271,7 @@ const At = ({
|
|
|
3271
3271
|
transition: { duration: 0.2 },
|
|
3272
3272
|
className: "absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
3273
3273
|
children: [
|
|
3274
|
-
|
|
3274
|
+
n && /* @__PURE__ */ r("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ d("div", { className: "relative", children: [
|
|
3275
3275
|
/* @__PURE__ */ r(Fe, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3276
3276
|
/* @__PURE__ */ r(
|
|
3277
3277
|
"input",
|
|
@@ -3292,7 +3292,7 @@ const At = ({
|
|
|
3292
3292
|
}
|
|
3293
3293
|
)
|
|
3294
3294
|
] }) }),
|
|
3295
|
-
/* @__PURE__ */ d("div", { className: "overflow-y-auto max-h-64 p-2", children: [
|
|
3295
|
+
/* @__PURE__ */ d("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
3296
3296
|
c && /* @__PURE__ */ r(
|
|
3297
3297
|
"button",
|
|
3298
3298
|
{
|
|
@@ -3337,15 +3337,15 @@ const At = ({
|
|
|
3337
3337
|
}
|
|
3338
3338
|
)
|
|
3339
3339
|
] });
|
|
3340
|
-
}, ft =
|
|
3340
|
+
}, ft = se(
|
|
3341
3341
|
({
|
|
3342
3342
|
options: e,
|
|
3343
3343
|
value: t,
|
|
3344
3344
|
onChange: a,
|
|
3345
3345
|
placeholder: o = "Select an option",
|
|
3346
|
-
label:
|
|
3346
|
+
label: s,
|
|
3347
3347
|
error: l,
|
|
3348
|
-
hint:
|
|
3348
|
+
hint: n,
|
|
3349
3349
|
searchable: c = !1,
|
|
3350
3350
|
clearable: i = !0,
|
|
3351
3351
|
disabled: m,
|
|
@@ -3365,8 +3365,8 @@ const At = ({
|
|
|
3365
3365
|
a(z), w(!1), M("");
|
|
3366
3366
|
};
|
|
3367
3367
|
return /* @__PURE__ */ d("div", { ref: f, className: u("w-full space-y-1.5", y), children: [
|
|
3368
|
-
|
|
3369
|
-
|
|
3368
|
+
s && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3369
|
+
s,
|
|
3370
3370
|
x && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
|
|
3371
3371
|
] }),
|
|
3372
3372
|
/* @__PURE__ */ d("div", { ref: I, className: "relative", children: [
|
|
@@ -3440,7 +3440,7 @@ const At = ({
|
|
|
3440
3440
|
}
|
|
3441
3441
|
)
|
|
3442
3442
|
] }) }),
|
|
3443
|
-
/* @__PURE__ */ d("div", { className: "overflow-y-auto max-h-64 p-2", children: [
|
|
3443
|
+
/* @__PURE__ */ d("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: [
|
|
3444
3444
|
i && /* @__PURE__ */ r(
|
|
3445
3445
|
"button",
|
|
3446
3446
|
{
|
|
@@ -3492,7 +3492,7 @@ const At = ({
|
|
|
3492
3492
|
children: l
|
|
3493
3493
|
}
|
|
3494
3494
|
),
|
|
3495
|
-
|
|
3495
|
+
n && !l && /* @__PURE__ */ r("p", { className: "text-sm text-primary/70", children: n })
|
|
3496
3496
|
] });
|
|
3497
3497
|
}
|
|
3498
3498
|
);
|
|
@@ -3502,9 +3502,9 @@ const Dt = ({
|
|
|
3502
3502
|
onChange: t,
|
|
3503
3503
|
label: a,
|
|
3504
3504
|
placeholder: o = "Select date",
|
|
3505
|
-
error:
|
|
3505
|
+
error: s,
|
|
3506
3506
|
disabled: l,
|
|
3507
|
-
minDate:
|
|
3507
|
+
minDate: n,
|
|
3508
3508
|
maxDate: c,
|
|
3509
3509
|
className: i
|
|
3510
3510
|
}) => {
|
|
@@ -3543,7 +3543,7 @@ const Dt = ({
|
|
|
3543
3543
|
f(new Date(y.getFullYear(), y.getMonth() + 1, 1));
|
|
3544
3544
|
}, O = (C) => {
|
|
3545
3545
|
t(C), x(!1);
|
|
3546
|
-
}, G = (C) => !!(
|
|
3546
|
+
}, G = (C) => !!(n && C < n || c && C > c), z = (C, j) => !C || !j ? !1 : C.getDate() === j.getDate() && C.getMonth() === j.getMonth() && C.getFullYear() === j.getFullYear(), R = (C) => C ? z(C, /* @__PURE__ */ new Date()) : !1, F = (C) => C ? C.toLocaleDateString("en-US", {
|
|
3547
3547
|
year: "numeric",
|
|
3548
3548
|
month: "short",
|
|
3549
3549
|
day: "numeric"
|
|
@@ -3562,13 +3562,13 @@ const Dt = ({
|
|
|
3562
3562
|
"focus:outline-none focus:ring-2 focus:ring-primary",
|
|
3563
3563
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
3564
3564
|
"touch-target",
|
|
3565
|
-
|
|
3566
|
-
!
|
|
3565
|
+
s && "border-error",
|
|
3566
|
+
!s && "border-border",
|
|
3567
3567
|
m && "ring-2 ring-primary"
|
|
3568
3568
|
),
|
|
3569
3569
|
children: [
|
|
3570
3570
|
/* @__PURE__ */ r("span", { className: u("truncate", !e && "text-foreground/50"), children: e ? F(e) : o }),
|
|
3571
|
-
/* @__PURE__ */ r(
|
|
3571
|
+
/* @__PURE__ */ r(sr, { className: "w-5 h-5 text-primary flex-shrink-0" })
|
|
3572
3572
|
]
|
|
3573
3573
|
}
|
|
3574
3574
|
),
|
|
@@ -3651,13 +3651,13 @@ const Dt = ({
|
|
|
3651
3651
|
]
|
|
3652
3652
|
}
|
|
3653
3653
|
) }),
|
|
3654
|
-
|
|
3654
|
+
s && /* @__PURE__ */ r(
|
|
3655
3655
|
g.p,
|
|
3656
3656
|
{
|
|
3657
3657
|
initial: { opacity: 0, y: -5 },
|
|
3658
3658
|
animate: { opacity: 1, y: 0 },
|
|
3659
3659
|
className: "mt-1.5 text-sm text-error",
|
|
3660
|
-
children:
|
|
3660
|
+
children: s
|
|
3661
3661
|
}
|
|
3662
3662
|
)
|
|
3663
3663
|
] });
|
|
@@ -3666,10 +3666,10 @@ const Dt = ({
|
|
|
3666
3666
|
variant: t = "default",
|
|
3667
3667
|
padding: a = "md",
|
|
3668
3668
|
className: o,
|
|
3669
|
-
onClick:
|
|
3669
|
+
onClick: s,
|
|
3670
3670
|
hover: l = !1
|
|
3671
3671
|
}) => {
|
|
3672
|
-
const
|
|
3672
|
+
const n = {
|
|
3673
3673
|
default: "bg-background border border-border",
|
|
3674
3674
|
outlined: "bg-transparent border-2 border-border-dark",
|
|
3675
3675
|
elevated: "bg-background border-2 border-border shadow-card"
|
|
@@ -3678,23 +3678,23 @@ const Dt = ({
|
|
|
3678
3678
|
sm: "p-3",
|
|
3679
3679
|
md: "p-4 sm:p-6",
|
|
3680
3680
|
lg: "p-6 sm:p-8"
|
|
3681
|
-
}, i =
|
|
3681
|
+
}, i = s ? g.button : g.div;
|
|
3682
3682
|
return /* @__PURE__ */ r(
|
|
3683
3683
|
i,
|
|
3684
3684
|
{
|
|
3685
3685
|
initial: { opacity: 0, y: 20 },
|
|
3686
3686
|
animate: { opacity: 1, y: 0 },
|
|
3687
3687
|
transition: { duration: 0.3 },
|
|
3688
|
-
whileHover: l ||
|
|
3689
|
-
whileTap:
|
|
3688
|
+
whileHover: l || s ? { y: -2, boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)" } : void 0,
|
|
3689
|
+
whileTap: s ? { scale: 0.98 } : void 0,
|
|
3690
3690
|
className: u(
|
|
3691
3691
|
"rounded-lg transition-all duration-200",
|
|
3692
|
-
|
|
3692
|
+
n[t],
|
|
3693
3693
|
c[a],
|
|
3694
|
-
|
|
3694
|
+
s && "cursor-pointer w-full text-left",
|
|
3695
3695
|
o
|
|
3696
3696
|
),
|
|
3697
|
-
onClick:
|
|
3697
|
+
onClick: s,
|
|
3698
3698
|
children: e
|
|
3699
3699
|
}
|
|
3700
3700
|
);
|
|
@@ -3703,14 +3703,14 @@ const Dt = ({
|
|
|
3703
3703
|
onClose: t,
|
|
3704
3704
|
children: a,
|
|
3705
3705
|
title: o,
|
|
3706
|
-
position:
|
|
3706
|
+
position: s = "right",
|
|
3707
3707
|
className: l
|
|
3708
3708
|
}) => (Z(() => {
|
|
3709
|
-
const
|
|
3709
|
+
const n = (c) => {
|
|
3710
3710
|
c.key === "Escape" && t();
|
|
3711
3711
|
};
|
|
3712
|
-
return e && (document.addEventListener("keydown",
|
|
3713
|
-
document.removeEventListener("keydown",
|
|
3712
|
+
return e && (document.addEventListener("keydown", n), document.body.style.overflow = "hidden"), () => {
|
|
3713
|
+
document.removeEventListener("keydown", n), document.body.style.overflow = "unset";
|
|
3714
3714
|
};
|
|
3715
3715
|
}, [e, t]), /* @__PURE__ */ r(Q, { children: e && /* @__PURE__ */ d(ae, { children: [
|
|
3716
3716
|
/* @__PURE__ */ r(
|
|
@@ -3727,13 +3727,13 @@ const Dt = ({
|
|
|
3727
3727
|
/* @__PURE__ */ d(
|
|
3728
3728
|
g.div,
|
|
3729
3729
|
{
|
|
3730
|
-
initial: { x:
|
|
3730
|
+
initial: { x: s === "left" ? "-100%" : "100%" },
|
|
3731
3731
|
animate: { x: 0 },
|
|
3732
|
-
exit: { x:
|
|
3732
|
+
exit: { x: s === "left" ? "-100%" : "100%" },
|
|
3733
3733
|
transition: { type: "spring", damping: 30, stiffness: 300 },
|
|
3734
3734
|
className: u(
|
|
3735
3735
|
"fixed top-0 z-50 h-full w-[400px] sm:w-[480px] bg-background shadow-xl",
|
|
3736
|
-
|
|
3736
|
+
s === "left" ? "left-0 border-r" : "right-0 border-l",
|
|
3737
3737
|
"border-border",
|
|
3738
3738
|
l
|
|
3739
3739
|
),
|
|
@@ -3759,10 +3759,10 @@ const Dt = ({
|
|
|
3759
3759
|
onClose: t,
|
|
3760
3760
|
children: a,
|
|
3761
3761
|
title: o,
|
|
3762
|
-
size:
|
|
3762
|
+
size: s = "md",
|
|
3763
3763
|
className: l
|
|
3764
3764
|
}) => {
|
|
3765
|
-
const
|
|
3765
|
+
const n = Y(null);
|
|
3766
3766
|
Z(() => {
|
|
3767
3767
|
const i = (m) => {
|
|
3768
3768
|
m.key === "Escape" && t();
|
|
@@ -3788,14 +3788,14 @@ const Dt = ({
|
|
|
3788
3788
|
children: /* @__PURE__ */ d(
|
|
3789
3789
|
g.div,
|
|
3790
3790
|
{
|
|
3791
|
-
ref:
|
|
3791
|
+
ref: n,
|
|
3792
3792
|
initial: { opacity: 0, scale: 0.95 },
|
|
3793
3793
|
animate: { opacity: 1, scale: 1 },
|
|
3794
3794
|
exit: { opacity: 0, scale: 0.95 },
|
|
3795
3795
|
transition: { duration: 0.2 },
|
|
3796
3796
|
className: u(
|
|
3797
3797
|
"bg-background border border-border rounded-lg shadow-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",
|
|
3798
|
-
c[
|
|
3798
|
+
c[s],
|
|
3799
3799
|
l
|
|
3800
3800
|
),
|
|
3801
3801
|
children: [
|
|
@@ -3828,7 +3828,7 @@ const Dt = ({
|
|
|
3828
3828
|
onClose: t,
|
|
3829
3829
|
title: a,
|
|
3830
3830
|
children: o,
|
|
3831
|
-
showCloseButton:
|
|
3831
|
+
showCloseButton: s = !0,
|
|
3832
3832
|
className: l
|
|
3833
3833
|
}) => (Z(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
3834
3834
|
document.body.style.overflow = "unset";
|
|
@@ -3858,9 +3858,9 @@ const Dt = ({
|
|
|
3858
3858
|
),
|
|
3859
3859
|
children: [
|
|
3860
3860
|
/* @__PURE__ */ r("div", { className: "flex justify-center pt-3 pb-2", children: /* @__PURE__ */ r("div", { className: "w-12 h-1.5 bg-border-dark rounded-full" }) }),
|
|
3861
|
-
(a ||
|
|
3861
|
+
(a || s) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border", children: [
|
|
3862
3862
|
a && /* @__PURE__ */ r("h2", { className: "text-lg font-semibold text-foreground", children: a }),
|
|
3863
|
-
|
|
3863
|
+
s && /* @__PURE__ */ r(
|
|
3864
3864
|
"button",
|
|
3865
3865
|
{
|
|
3866
3866
|
onClick: t,
|
|
@@ -3879,13 +3879,13 @@ function Vt({
|
|
|
3879
3879
|
columns: t,
|
|
3880
3880
|
loading: a = !1,
|
|
3881
3881
|
onRowClick: o,
|
|
3882
|
-
keyExtractor:
|
|
3882
|
+
keyExtractor: s,
|
|
3883
3883
|
className: l
|
|
3884
3884
|
}) {
|
|
3885
|
-
const [
|
|
3886
|
-
|
|
3887
|
-
}, y =
|
|
3888
|
-
const w = f[
|
|
3885
|
+
const [n, c] = L(null), [i, m] = L("asc"), x = (f) => {
|
|
3886
|
+
n === f ? m(i === "asc" ? "desc" : "asc") : (c(f), m("asc"));
|
|
3887
|
+
}, y = n ? [...e].sort((f, k) => {
|
|
3888
|
+
const w = f[n], v = k[n];
|
|
3889
3889
|
return w < v ? i === "asc" ? -1 : 1 : w > v ? i === "asc" ? 1 : -1 : 0;
|
|
3890
3890
|
}) : e;
|
|
3891
3891
|
return a ? /* @__PURE__ */ r("div", { className: u("border border-border rounded-lg overflow-hidden", l), children: /* @__PURE__ */ r("div", { className: "overflow-x-auto", children: /* @__PURE__ */ d("table", { className: "w-full", children: [
|
|
@@ -3910,7 +3910,7 @@ function Vt({
|
|
|
3910
3910
|
onClick: () => f.sortable && x(f.key),
|
|
3911
3911
|
children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
3912
3912
|
f.header,
|
|
3913
|
-
f.sortable && /* @__PURE__ */ r("span", { className: "text-primary/50 hover:text-primary transition-colors", children:
|
|
3913
|
+
f.sortable && /* @__PURE__ */ r("span", { className: "text-primary/50 hover:text-primary transition-colors", children: n === f.key ? i === "asc" ? /* @__PURE__ */ r(nr, { className: "w-4 h-4" }) : /* @__PURE__ */ r(ir, { className: "w-4 h-4" }) : /* @__PURE__ */ r(lr, { className: "w-4 h-4" }) })
|
|
3914
3914
|
] })
|
|
3915
3915
|
},
|
|
3916
3916
|
k
|
|
@@ -3940,7 +3940,7 @@ function Vt({
|
|
|
3940
3940
|
v
|
|
3941
3941
|
))
|
|
3942
3942
|
},
|
|
3943
|
-
|
|
3943
|
+
s(f)
|
|
3944
3944
|
)) })
|
|
3945
3945
|
] }) })
|
|
3946
3946
|
}
|
|
@@ -3951,7 +3951,7 @@ const Wt = ({
|
|
|
3951
3951
|
totalPages: t,
|
|
3952
3952
|
onPageChange: a,
|
|
3953
3953
|
totalItems: o,
|
|
3954
|
-
itemsPerPage:
|
|
3954
|
+
itemsPerPage: s,
|
|
3955
3955
|
className: l
|
|
3956
3956
|
}) => {
|
|
3957
3957
|
const c = Array.from({ length: t }, (i, m) => m + 1).slice(
|
|
@@ -3966,12 +3966,12 @@ const Wt = ({
|
|
|
3966
3966
|
transition: { duration: 0.3 },
|
|
3967
3967
|
className: u("flex items-center justify-between gap-4 flex-wrap", l),
|
|
3968
3968
|
children: [
|
|
3969
|
-
/* @__PURE__ */ r("div", { className: "text-sm text-foreground/70", children: o &&
|
|
3969
|
+
/* @__PURE__ */ r("div", { className: "text-sm text-foreground/70", children: o && s && /* @__PURE__ */ d("span", { children: [
|
|
3970
3970
|
"Showing ",
|
|
3971
|
-
Math.min((e - 1) *
|
|
3971
|
+
Math.min((e - 1) * s + 1, o),
|
|
3972
3972
|
" to",
|
|
3973
3973
|
" ",
|
|
3974
|
-
Math.min(e *
|
|
3974
|
+
Math.min(e * s, o),
|
|
3975
3975
|
" of ",
|
|
3976
3976
|
o,
|
|
3977
3977
|
" results"
|
|
@@ -4050,9 +4050,9 @@ const Wt = ({
|
|
|
4050
4050
|
onClick: t,
|
|
4051
4051
|
label: a,
|
|
4052
4052
|
actions: o,
|
|
4053
|
-
variant:
|
|
4053
|
+
variant: s = "primary",
|
|
4054
4054
|
position: l = "bottom-right",
|
|
4055
|
-
disabled:
|
|
4055
|
+
disabled: n,
|
|
4056
4056
|
className: c
|
|
4057
4057
|
}) => {
|
|
4058
4058
|
const [i, m] = L(!1), x = {
|
|
@@ -4122,15 +4122,15 @@ const Wt = ({
|
|
|
4122
4122
|
/* @__PURE__ */ d(
|
|
4123
4123
|
g.button,
|
|
4124
4124
|
{
|
|
4125
|
-
whileTap: { scale:
|
|
4126
|
-
whileHover: { scale:
|
|
4125
|
+
whileTap: { scale: n ? 1 : 0.9 },
|
|
4126
|
+
whileHover: { scale: n ? 1 : 1.05 },
|
|
4127
4127
|
onClick: k,
|
|
4128
|
-
disabled:
|
|
4128
|
+
disabled: n,
|
|
4129
4129
|
className: u(
|
|
4130
4130
|
"z-30 rounded-full p-4 transition-all duration-200",
|
|
4131
4131
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4132
4132
|
"flex items-center gap-2",
|
|
4133
|
-
y[
|
|
4133
|
+
y[s],
|
|
4134
4134
|
a ? "px-6" : "w-16 h-16 justify-center",
|
|
4135
4135
|
i && "rotate-45"
|
|
4136
4136
|
),
|
|
@@ -4148,8 +4148,8 @@ const Wt = ({
|
|
|
4148
4148
|
}) => {
|
|
4149
4149
|
const o = e[t];
|
|
4150
4150
|
return /* @__PURE__ */ d("div", { className: u("w-full", a), children: [
|
|
4151
|
-
/* @__PURE__ */ r("div", { className: "hidden md:block", children: /* @__PURE__ */ r("div", { className: "relative flex items-center mb-2", children: e.map((
|
|
4152
|
-
const
|
|
4151
|
+
/* @__PURE__ */ r("div", { className: "hidden md:block", children: /* @__PURE__ */ r("div", { className: "relative flex items-center mb-2", children: e.map((s, l) => {
|
|
4152
|
+
const n = l < t, c = l === t, i = l > t;
|
|
4153
4153
|
return /* @__PURE__ */ d(Le.Fragment, { children: [
|
|
4154
4154
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center relative z-10", children: [
|
|
4155
4155
|
/* @__PURE__ */ r(
|
|
@@ -4163,10 +4163,10 @@ const Wt = ({
|
|
|
4163
4163
|
"w-12 h-12 rounded-full flex items-center justify-center",
|
|
4164
4164
|
"font-semibold text-base transition-all duration-300",
|
|
4165
4165
|
"ring-4 ring-white",
|
|
4166
|
-
(
|
|
4166
|
+
(n || c) && "bg-primary text-white shadow-lg",
|
|
4167
4167
|
i && "bg-border text-muted-foreground"
|
|
4168
4168
|
),
|
|
4169
|
-
children:
|
|
4169
|
+
children: n ? /* @__PURE__ */ r(Oe, { className: "w-6 h-6 stroke-[3]" }) : /* @__PURE__ */ r("span", { children: l + 1 })
|
|
4170
4170
|
}
|
|
4171
4171
|
),
|
|
4172
4172
|
/* @__PURE__ */ d("div", { className: "mt-3 text-center max-w-[120px]", children: [
|
|
@@ -4176,22 +4176,22 @@ const Wt = ({
|
|
|
4176
4176
|
className: u(
|
|
4177
4177
|
"text-sm font-semibold block",
|
|
4178
4178
|
c && "text-primary",
|
|
4179
|
-
|
|
4179
|
+
n && "text-primary",
|
|
4180
4180
|
i && "text-primary/50"
|
|
4181
4181
|
),
|
|
4182
|
-
children:
|
|
4182
|
+
children: s.label
|
|
4183
4183
|
}
|
|
4184
4184
|
),
|
|
4185
|
-
|
|
4185
|
+
s.description && /* @__PURE__ */ r(
|
|
4186
4186
|
"p",
|
|
4187
4187
|
{
|
|
4188
4188
|
className: u(
|
|
4189
4189
|
"text-xs mt-1 leading-tight",
|
|
4190
4190
|
c && "text-primary",
|
|
4191
|
-
|
|
4191
|
+
n && "text-primary/70",
|
|
4192
4192
|
i && "text-primary/50"
|
|
4193
4193
|
),
|
|
4194
|
-
children:
|
|
4194
|
+
children: s.description
|
|
4195
4195
|
}
|
|
4196
4196
|
)
|
|
4197
4197
|
] })
|
|
@@ -4210,20 +4210,20 @@ const Wt = ({
|
|
|
4210
4210
|
] }, l);
|
|
4211
4211
|
}) }) }),
|
|
4212
4212
|
/* @__PURE__ */ d("div", { className: "md:hidden", children: [
|
|
4213
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-2 mb-3", children: e.map((
|
|
4214
|
-
const
|
|
4213
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-2 mb-3", children: e.map((s, l) => {
|
|
4214
|
+
const n = l < t, c = l === t;
|
|
4215
4215
|
return /* @__PURE__ */ r(
|
|
4216
4216
|
g.div,
|
|
4217
4217
|
{
|
|
4218
4218
|
initial: !1,
|
|
4219
4219
|
animate: {
|
|
4220
4220
|
scale: c ? 1.2 : 1,
|
|
4221
|
-
backgroundColor:
|
|
4221
|
+
backgroundColor: n || c ? "var(--color-primary)" : "var(--color-border-dark)"
|
|
4222
4222
|
},
|
|
4223
4223
|
className: u(
|
|
4224
4224
|
"rounded-full transition-all duration-300",
|
|
4225
4225
|
c ? "w-3 h-3" : "w-2 h-2",
|
|
4226
|
-
(
|
|
4226
|
+
(n || c) && "shadow-sm"
|
|
4227
4227
|
)
|
|
4228
4228
|
},
|
|
4229
4229
|
l
|
|
@@ -4247,7 +4247,7 @@ const Wt = ({
|
|
|
4247
4247
|
variant: t = "default",
|
|
4248
4248
|
size: a = "md",
|
|
4249
4249
|
className: o,
|
|
4250
|
-
dot:
|
|
4250
|
+
dot: s = !1
|
|
4251
4251
|
}) => {
|
|
4252
4252
|
const l = {
|
|
4253
4253
|
default: "bg-secondary text-primary border border-border",
|
|
@@ -4256,7 +4256,7 @@ const Wt = ({
|
|
|
4256
4256
|
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
4257
4257
|
danger: "bg-error/10 text-error border border-error/20",
|
|
4258
4258
|
info: "bg-info/10 text-info border border-info/20"
|
|
4259
|
-
},
|
|
4259
|
+
}, n = {
|
|
4260
4260
|
sm: "px-2 py-0.5 text-xs",
|
|
4261
4261
|
md: "px-2.5 py-1 text-sm",
|
|
4262
4262
|
lg: "px-3 py-1.5 text-base"
|
|
@@ -4277,11 +4277,11 @@ const Wt = ({
|
|
|
4277
4277
|
className: u(
|
|
4278
4278
|
"inline-flex items-center gap-1.5 rounded-lg font-medium",
|
|
4279
4279
|
l[t],
|
|
4280
|
-
|
|
4280
|
+
n[a],
|
|
4281
4281
|
o
|
|
4282
4282
|
),
|
|
4283
4283
|
children: [
|
|
4284
|
-
|
|
4284
|
+
s && /* @__PURE__ */ r("span", { className: u("w-1.5 h-1.5 rounded-full", c[t]) }),
|
|
4285
4285
|
e
|
|
4286
4286
|
]
|
|
4287
4287
|
}
|
|
@@ -4310,7 +4310,7 @@ const Wt = ({
|
|
|
4310
4310
|
count: t,
|
|
4311
4311
|
className: a
|
|
4312
4312
|
}) => {
|
|
4313
|
-
const
|
|
4313
|
+
const s = {
|
|
4314
4314
|
synced: {
|
|
4315
4315
|
icon: /* @__PURE__ */ r(Te, { className: "w-4 h-4" }),
|
|
4316
4316
|
label: "Synced",
|
|
@@ -4340,12 +4340,12 @@ const Wt = ({
|
|
|
4340
4340
|
className: u(
|
|
4341
4341
|
"inline-flex items-center gap-2 px-3 py-1.5 rounded-full",
|
|
4342
4342
|
"text-sm font-medium shadow-sm",
|
|
4343
|
-
|
|
4343
|
+
s.color,
|
|
4344
4344
|
a
|
|
4345
4345
|
),
|
|
4346
4346
|
children: [
|
|
4347
|
-
|
|
4348
|
-
/* @__PURE__ */ r("span", { children:
|
|
4347
|
+
s.icon,
|
|
4348
|
+
/* @__PURE__ */ r("span", { children: s.label })
|
|
4349
4349
|
]
|
|
4350
4350
|
}
|
|
4351
4351
|
);
|
|
@@ -4410,7 +4410,7 @@ const Ze = er(void 0), Kt = () => {
|
|
|
4410
4410
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
|
|
4411
4411
|
"bottom-right": "bottom-4 right-4"
|
|
4412
4412
|
}, kt = ({ toast: e, onRemove: t }) => {
|
|
4413
|
-
const a = e.variant || "default", o = vt[a],
|
|
4413
|
+
const a = e.variant || "default", o = vt[a], s = typeof e.message == "string" ? e.message : String(e.message);
|
|
4414
4414
|
return /* @__PURE__ */ d(
|
|
4415
4415
|
g.div,
|
|
4416
4416
|
{
|
|
@@ -4426,7 +4426,7 @@ const Ze = er(void 0), Kt = () => {
|
|
|
4426
4426
|
children: [
|
|
4427
4427
|
o && /* @__PURE__ */ r(o, { className: "w-5 h-5 flex-shrink-0 mt-0.5" }),
|
|
4428
4428
|
/* @__PURE__ */ d("div", { className: "flex-1 min-w-0", children: [
|
|
4429
|
-
/* @__PURE__ */ r("p", { className: "text-sm font-medium leading-relaxed", children:
|
|
4429
|
+
/* @__PURE__ */ r("p", { className: "text-sm font-medium leading-relaxed", children: s }),
|
|
4430
4430
|
e.action && /* @__PURE__ */ r(
|
|
4431
4431
|
"button",
|
|
4432
4432
|
{
|
|
@@ -4453,22 +4453,22 @@ const Ze = er(void 0), Kt = () => {
|
|
|
4453
4453
|
position: t = "top-right",
|
|
4454
4454
|
maxToasts: a = 5
|
|
4455
4455
|
}) => {
|
|
4456
|
-
const [o,
|
|
4457
|
-
|
|
4458
|
-
}, []),
|
|
4456
|
+
const [o, s] = L([]), l = ze((c) => {
|
|
4457
|
+
s((i) => i.filter((m) => m.id !== c));
|
|
4458
|
+
}, []), n = ze(
|
|
4459
4459
|
(c) => {
|
|
4460
4460
|
if (typeof c.message != "string") {
|
|
4461
4461
|
console.error("Toast message must be a string, received:", c.message);
|
|
4462
4462
|
return;
|
|
4463
4463
|
}
|
|
4464
4464
|
const i = Math.random().toString(36).substring(2, 9), m = c.duration ?? 5e3;
|
|
4465
|
-
|
|
4465
|
+
s((x) => [...x, { ...c, id: i }].slice(-a)), m > 0 && setTimeout(() => {
|
|
4466
4466
|
l(i);
|
|
4467
4467
|
}, m);
|
|
4468
4468
|
},
|
|
4469
4469
|
[a, l]
|
|
4470
4470
|
);
|
|
4471
|
-
return /* @__PURE__ */ d(Ze.Provider, { value: { toasts: o, addToast:
|
|
4471
|
+
return /* @__PURE__ */ d(Ze.Provider, { value: { toasts: o, addToast: n, removeToast: l }, children: [
|
|
4472
4472
|
e,
|
|
4473
4473
|
/* @__PURE__ */ r("div", { className: u("fixed z-[100] flex flex-col gap-2", Nt[t]), children: /* @__PURE__ */ r(Q, { mode: "popLayout", children: o.map((c) => /* @__PURE__ */ r(kt, { toast: c, onRemove: l }, c.id)) }) })
|
|
4474
4474
|
] });
|
|
@@ -4479,10 +4479,10 @@ const Xt = ({
|
|
|
4479
4479
|
onRemove: t,
|
|
4480
4480
|
preview: a,
|
|
4481
4481
|
label: o = "Take Photo",
|
|
4482
|
-
disabled:
|
|
4482
|
+
disabled: s,
|
|
4483
4483
|
className: l
|
|
4484
4484
|
}) => {
|
|
4485
|
-
const
|
|
4485
|
+
const n = Y(null), c = (i) => {
|
|
4486
4486
|
const m = i.target.files?.[0];
|
|
4487
4487
|
m && e(m);
|
|
4488
4488
|
};
|
|
@@ -4509,9 +4509,9 @@ const Xt = ({
|
|
|
4509
4509
|
g.button,
|
|
4510
4510
|
{
|
|
4511
4511
|
type: "button",
|
|
4512
|
-
whileTap: { scale:
|
|
4513
|
-
onClick: () =>
|
|
4514
|
-
disabled:
|
|
4512
|
+
whileTap: { scale: s ? 1 : 0.98 },
|
|
4513
|
+
onClick: () => n.current?.click(),
|
|
4514
|
+
disabled: s,
|
|
4515
4515
|
className: u(
|
|
4516
4516
|
"w-full p-4 rounded-lg border-2 border-border",
|
|
4517
4517
|
"flex items-center justify-center gap-3",
|
|
@@ -4528,13 +4528,13 @@ const Xt = ({
|
|
|
4528
4528
|
/* @__PURE__ */ r(
|
|
4529
4529
|
"input",
|
|
4530
4530
|
{
|
|
4531
|
-
ref:
|
|
4531
|
+
ref: n,
|
|
4532
4532
|
type: "file",
|
|
4533
4533
|
accept: "image/*",
|
|
4534
4534
|
capture: "environment",
|
|
4535
4535
|
onChange: c,
|
|
4536
4536
|
className: "hidden",
|
|
4537
|
-
disabled:
|
|
4537
|
+
disabled: s
|
|
4538
4538
|
}
|
|
4539
4539
|
)
|
|
4540
4540
|
] });
|
|
@@ -4543,10 +4543,10 @@ const Xt = ({
|
|
|
4543
4543
|
accept: t = "*/*",
|
|
4544
4544
|
multiple: a = !1,
|
|
4545
4545
|
label: o = "Upload Files",
|
|
4546
|
-
disabled:
|
|
4546
|
+
disabled: s,
|
|
4547
4547
|
className: l
|
|
4548
4548
|
}) => {
|
|
4549
|
-
const
|
|
4549
|
+
const n = Y(null), c = (i) => {
|
|
4550
4550
|
i && e(Array.from(i));
|
|
4551
4551
|
};
|
|
4552
4552
|
return /* @__PURE__ */ d("div", { className: u("w-full", l), children: [
|
|
@@ -4555,9 +4555,9 @@ const Xt = ({
|
|
|
4555
4555
|
g.button,
|
|
4556
4556
|
{
|
|
4557
4557
|
type: "button",
|
|
4558
|
-
whileTap: { scale:
|
|
4559
|
-
onClick: () => !
|
|
4560
|
-
disabled:
|
|
4558
|
+
whileTap: { scale: s ? 1 : 0.98 },
|
|
4559
|
+
onClick: () => !s && n.current?.click(),
|
|
4560
|
+
disabled: s,
|
|
4561
4561
|
className: u(
|
|
4562
4562
|
"w-full p-4 rounded-lg border-2 border-border",
|
|
4563
4563
|
"flex items-center justify-center gap-3",
|
|
@@ -4574,13 +4574,13 @@ const Xt = ({
|
|
|
4574
4574
|
/* @__PURE__ */ r(
|
|
4575
4575
|
"input",
|
|
4576
4576
|
{
|
|
4577
|
-
ref:
|
|
4577
|
+
ref: n,
|
|
4578
4578
|
type: "file",
|
|
4579
4579
|
accept: t,
|
|
4580
4580
|
multiple: a,
|
|
4581
4581
|
onChange: (i) => c(i.target.files),
|
|
4582
4582
|
className: "hidden",
|
|
4583
|
-
disabled:
|
|
4583
|
+
disabled: s
|
|
4584
4584
|
}
|
|
4585
4585
|
)
|
|
4586
4586
|
] });
|
|
@@ -4590,9 +4590,9 @@ const Xt = ({
|
|
|
4590
4590
|
maxDuration: a = 300,
|
|
4591
4591
|
// 5 minutes default
|
|
4592
4592
|
disabled: o,
|
|
4593
|
-
className:
|
|
4593
|
+
className: s
|
|
4594
4594
|
}) => {
|
|
4595
|
-
const [l,
|
|
4595
|
+
const [l, n] = L(!1), [c, i] = L(!1), [m, x] = L(0), [y, f] = L(null), k = Y(null), w = Y([]), v = Y(null), M = async () => {
|
|
4596
4596
|
try {
|
|
4597
4597
|
const R = await navigator.mediaDevices.getUserMedia({ audio: !0 }), F = new MediaRecorder(R);
|
|
4598
4598
|
k.current = F, w.current = [], F.ondataavailable = (h) => {
|
|
@@ -4600,7 +4600,7 @@ const Xt = ({
|
|
|
4600
4600
|
}, F.onstop = () => {
|
|
4601
4601
|
const h = new Blob(w.current, { type: "audio/webm" }), C = URL.createObjectURL(h);
|
|
4602
4602
|
f(C), e(h), R.getTracks().forEach((j) => j.stop());
|
|
4603
|
-
}, F.start(),
|
|
4603
|
+
}, F.start(), n(!0), x(0), v.current = setInterval(() => {
|
|
4604
4604
|
x((h) => h >= a ? (O(), h) : h + 1);
|
|
4605
4605
|
}, 1e3);
|
|
4606
4606
|
} catch (R) {
|
|
@@ -4613,14 +4613,14 @@ const Xt = ({
|
|
|
4613
4613
|
x((R) => Math.min(R + 1, a));
|
|
4614
4614
|
}, 1e3));
|
|
4615
4615
|
}, O = () => {
|
|
4616
|
-
k.current && (k.current.stop(),
|
|
4616
|
+
k.current && (k.current.stop(), n(!1), i(!1), v.current && (clearInterval(v.current), v.current = null));
|
|
4617
4617
|
}, G = () => {
|
|
4618
4618
|
f(null), x(0);
|
|
4619
4619
|
}, z = (R) => {
|
|
4620
4620
|
const F = Math.floor(R / 60), h = R % 60;
|
|
4621
4621
|
return `${F.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
|
|
4622
4622
|
};
|
|
4623
|
-
return /* @__PURE__ */ d("div", { className: u("w-full",
|
|
4623
|
+
return /* @__PURE__ */ d("div", { className: u("w-full", s), children: [
|
|
4624
4624
|
t && /* @__PURE__ */ r("label", { className: "block mb-2 text-sm font-medium text-primary", children: t }),
|
|
4625
4625
|
/* @__PURE__ */ d("div", { className: "p-4 md:p-6 bg-background rounded-lg border-2 border-border space-y-4", children: [
|
|
4626
4626
|
!y && /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-4", children: [
|
|
@@ -4705,13 +4705,13 @@ const Xt = ({
|
|
|
4705
4705
|
onRemove: t,
|
|
4706
4706
|
onView: a,
|
|
4707
4707
|
columns: o = 3,
|
|
4708
|
-
className:
|
|
4708
|
+
className: s
|
|
4709
4709
|
}) => {
|
|
4710
4710
|
const l = {
|
|
4711
4711
|
2: "grid-cols-2",
|
|
4712
4712
|
3: "grid-cols-3",
|
|
4713
4713
|
4: "grid-cols-4"
|
|
4714
|
-
},
|
|
4714
|
+
}, n = (i) => {
|
|
4715
4715
|
if (!i) return "";
|
|
4716
4716
|
const m = i / 1024;
|
|
4717
4717
|
return m < 1024 ? `${m.toFixed(1)} KB` : `${(m / 1024).toFixed(1)} MB`;
|
|
@@ -4725,7 +4725,7 @@ const Xt = ({
|
|
|
4725
4725
|
return /* @__PURE__ */ r(vr, { className: "w-8 h-8 text-primary" });
|
|
4726
4726
|
}
|
|
4727
4727
|
};
|
|
4728
|
-
return e.length === 0 ? null : /* @__PURE__ */ r("div", { className: u("w-full",
|
|
4728
|
+
return e.length === 0 ? null : /* @__PURE__ */ r("div", { className: u("w-full", s), children: /* @__PURE__ */ r("div", { className: u("grid gap-3", l[o]), children: e.map((i) => /* @__PURE__ */ d(
|
|
4729
4729
|
g.div,
|
|
4730
4730
|
{
|
|
4731
4731
|
initial: { opacity: 0, scale: 0.8 },
|
|
@@ -4770,7 +4770,7 @@ const Xt = ({
|
|
|
4770
4770
|
),
|
|
4771
4771
|
i.size && /* @__PURE__ */ d("div", { className: "absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1.5 backdrop-blur-sm", children: [
|
|
4772
4772
|
/* @__PURE__ */ r("p", { className: "truncate", children: i.name }),
|
|
4773
|
-
/* @__PURE__ */ r("p", { className: "text-white/70", children:
|
|
4773
|
+
/* @__PURE__ */ r("p", { className: "text-white/70", children: n(i.size) })
|
|
4774
4774
|
] })
|
|
4775
4775
|
]
|
|
4776
4776
|
},
|
|
@@ -4781,9 +4781,9 @@ const Xt = ({
|
|
|
4781
4781
|
showHeart: t = !0,
|
|
4782
4782
|
href: a,
|
|
4783
4783
|
position: o = "fixed",
|
|
4784
|
-
backgroundColor:
|
|
4784
|
+
backgroundColor: s = "bg-gray-900",
|
|
4785
4785
|
textColor: l = "text-gray-400",
|
|
4786
|
-
className:
|
|
4786
|
+
className: n = ""
|
|
4787
4787
|
}) => {
|
|
4788
4788
|
const c = t ? /* @__PURE__ */ d(ae, { children: [
|
|
4789
4789
|
"Built with ",
|
|
@@ -4803,7 +4803,7 @@ const Xt = ({
|
|
|
4803
4803
|
return /* @__PURE__ */ r(
|
|
4804
4804
|
"div",
|
|
4805
4805
|
{
|
|
4806
|
-
className: `${o} bottom-0 left-0 right-0 ${
|
|
4806
|
+
className: `${o} bottom-0 left-0 right-0 ${s} ${n}`,
|
|
4807
4807
|
style: { zIndex: 40 },
|
|
4808
4808
|
children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-2 px-4", children: i })
|
|
4809
4809
|
}
|