@stackloop/ui 4.0.8 → 4.0.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/README.md +6 -5
- package/dist/Input.d.ts +30 -7
- package/dist/assets/index-B5bbIoAj.js +17 -0
- package/dist/assets/index-s9Mdf6_E.css +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.html +2 -2
- package/dist/index.js +1096 -1076
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
- package/dist/assets/index-DHBqG65w.js +0 -17
- package/dist/assets/index-Z5A9fp3I.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
+
import et, { useState as U, useEffect as J, useCallback as ke, useRef as Q, useMemo as Ae, forwardRef as Ee, createContext as Rt, useContext as Lt } from "react";
|
|
3
3
|
import { motion as R, AnimatePresence as de } from "framer-motion";
|
|
4
|
-
import { Loader2 as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
function
|
|
4
|
+
import { Loader2 as dt, Calendar as Tt, ChevronLeft as qe, ChevronDown as we, ChevronRight as Qe, Search as ge, X as oe, EyeOff as zt, Eye as Et, Check as ct, ArrowUp as Pt, ArrowDown as It, ChevronsUpDown as Bt, House as Gt, Plus as Dt, WifiOff as Ze, Wifi as Ye, Info as jt, AlertTriangle as Ft, AlertCircle as Ot, CheckCircle as Vt, Camera as Ut, Upload as Ht, Play as Yt, Pause as Wt, Mic as $t, Square as Kt, Trash2 as _t, Image as Jt, FileText as rt } from "lucide-react";
|
|
5
|
+
import { createPortal as mt } from "react-dom";
|
|
6
|
+
function ut(t) {
|
|
7
7
|
var r, o, a = "";
|
|
8
8
|
if (typeof t == "string" || typeof t == "number") a += t;
|
|
9
9
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
10
10
|
var n = t.length;
|
|
11
|
-
for (r = 0; r < n; r++) t[r] && (o =
|
|
11
|
+
for (r = 0; r < n; r++) t[r] && (o = ut(t[r])) && (a && (a += " "), a += o);
|
|
12
12
|
} else for (o in t) t[o] && (a && (a += " "), a += o);
|
|
13
13
|
return a;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
for (var t, r, o = 0, a = "", n = arguments.length; o < n; o++) (t = arguments[o]) && (r =
|
|
15
|
+
function qt() {
|
|
16
|
+
for (var t, r, o = 0, a = "", n = arguments.length; o < n; o++) (t = arguments[o]) && (r = ut(t)) && (a && (a += " "), a += r);
|
|
17
17
|
return a;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Qt = (t, r) => {
|
|
20
20
|
const o = new Array(t.length + r.length);
|
|
21
21
|
for (let a = 0; a < t.length; a++)
|
|
22
22
|
o[a] = t[a];
|
|
23
23
|
for (let a = 0; a < r.length; a++)
|
|
24
24
|
o[t.length + a] = r[a];
|
|
25
25
|
return o;
|
|
26
|
-
},
|
|
26
|
+
}, Zt = (t, r) => ({
|
|
27
27
|
classGroupId: t,
|
|
28
28
|
validator: r
|
|
29
|
-
}),
|
|
29
|
+
}), pt = (t = /* @__PURE__ */ new Map(), r = null, o) => ({
|
|
30
30
|
nextPart: t,
|
|
31
31
|
validators: r,
|
|
32
32
|
classGroupId: o
|
|
33
|
-
}),
|
|
33
|
+
}), Ve = "-", ot = [], Xt = "arbitrary..", er = (t) => {
|
|
34
34
|
const r = rr(t), {
|
|
35
35
|
conflictingClassGroups: o,
|
|
36
36
|
conflictingClassGroupModifiers: a
|
|
@@ -39,29 +39,29 @@ const Zt = (t, r) => {
|
|
|
39
39
|
getClassGroupId: (i) => {
|
|
40
40
|
if (i.startsWith("[") && i.endsWith("]"))
|
|
41
41
|
return tr(i);
|
|
42
|
-
const c = i.split(
|
|
43
|
-
return
|
|
42
|
+
const c = i.split(Ve), d = c[0] === "" && c.length > 1 ? 1 : 0;
|
|
43
|
+
return bt(c, d, r);
|
|
44
44
|
},
|
|
45
45
|
getConflictingClassGroupIds: (i, c) => {
|
|
46
46
|
if (c) {
|
|
47
47
|
const d = a[i], m = o[i];
|
|
48
|
-
return d ? m ?
|
|
48
|
+
return d ? m ? Qt(m, d) : d : m || ot;
|
|
49
49
|
}
|
|
50
|
-
return o[i] ||
|
|
50
|
+
return o[i] || ot;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
},
|
|
53
|
+
}, bt = (t, r, o) => {
|
|
54
54
|
if (t.length - r === 0)
|
|
55
55
|
return o.classGroupId;
|
|
56
56
|
const n = t[r], l = o.nextPart.get(n);
|
|
57
57
|
if (l) {
|
|
58
|
-
const m =
|
|
58
|
+
const m = bt(t, r + 1, l);
|
|
59
59
|
if (m) return m;
|
|
60
60
|
}
|
|
61
61
|
const i = o.validators;
|
|
62
62
|
if (i === null)
|
|
63
63
|
return;
|
|
64
|
-
const c = r === 0 ? t.join(
|
|
64
|
+
const c = r === 0 ? t.join(Ve) : t.slice(r).join(Ve), d = i.length;
|
|
65
65
|
for (let m = 0; m < d; m++) {
|
|
66
66
|
const u = i[m];
|
|
67
67
|
if (u.validator(c))
|
|
@@ -77,13 +77,13 @@ const Zt = (t, r) => {
|
|
|
77
77
|
} = t;
|
|
78
78
|
return or(o, r);
|
|
79
79
|
}, or = (t, r) => {
|
|
80
|
-
const o =
|
|
80
|
+
const o = pt();
|
|
81
81
|
for (const a in t) {
|
|
82
82
|
const n = t[a];
|
|
83
|
-
|
|
83
|
+
tt(n, o, a, r);
|
|
84
84
|
}
|
|
85
85
|
return o;
|
|
86
|
-
},
|
|
86
|
+
}, tt = (t, r, o, a) => {
|
|
87
87
|
const n = t.length;
|
|
88
88
|
for (let l = 0; l < n; l++) {
|
|
89
89
|
const i = t[l];
|
|
@@ -100,27 +100,27 @@ const Zt = (t, r) => {
|
|
|
100
100
|
}
|
|
101
101
|
sr(t, r, o, a);
|
|
102
102
|
}, nr = (t, r, o) => {
|
|
103
|
-
const a = t === "" ? r :
|
|
103
|
+
const a = t === "" ? r : ht(r, t);
|
|
104
104
|
a.classGroupId = o;
|
|
105
105
|
}, ir = (t, r, o, a) => {
|
|
106
106
|
if (lr(t)) {
|
|
107
|
-
|
|
107
|
+
tt(t(a), r, o, a);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
r.validators === null && (r.validators = []), r.validators.push(
|
|
110
|
+
r.validators === null && (r.validators = []), r.validators.push(Zt(o, t));
|
|
111
111
|
}, sr = (t, r, o, a) => {
|
|
112
112
|
const n = Object.entries(t), l = n.length;
|
|
113
113
|
for (let i = 0; i < l; i++) {
|
|
114
114
|
const [c, d] = n[i];
|
|
115
|
-
|
|
115
|
+
tt(d, ht(r, c), o, a);
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, ht = (t, r) => {
|
|
118
118
|
let o = t;
|
|
119
|
-
const a = r.split(
|
|
119
|
+
const a = r.split(Ve), n = a.length;
|
|
120
120
|
for (let l = 0; l < n; l++) {
|
|
121
121
|
const i = a[l];
|
|
122
122
|
let c = o.nextPart.get(i);
|
|
123
|
-
c || (c =
|
|
123
|
+
c || (c = pt(), o.nextPart.set(i, c)), o = c;
|
|
124
124
|
}
|
|
125
125
|
return o;
|
|
126
126
|
}, lr = (t) => "isThemeGetter" in t && t.isThemeGetter === !0, dr = (t) => {
|
|
@@ -147,7 +147,7 @@ const Zt = (t, r) => {
|
|
|
147
147
|
l in o ? o[l] = i : n(l, i);
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, Xe = "!", at = ":", cr = [], nt = (t, r, o, a, n) => ({
|
|
151
151
|
modifiers: t,
|
|
152
152
|
hasImportantModifier: r,
|
|
153
153
|
baseClassName: o,
|
|
@@ -165,7 +165,7 @@ const Zt = (t, r) => {
|
|
|
165
165
|
for (let N = 0; N < u; N++) {
|
|
166
166
|
const k = n[N];
|
|
167
167
|
if (i === 0 && c === 0) {
|
|
168
|
-
if (k ===
|
|
168
|
+
if (k === at) {
|
|
169
169
|
l.push(n.slice(d, N)), d = N + 1;
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
@@ -177,20 +177,20 @@ const Zt = (t, r) => {
|
|
|
177
177
|
k === "[" ? i++ : k === "]" ? i-- : k === "(" ? c++ : k === ")" && c--;
|
|
178
178
|
}
|
|
179
179
|
const g = l.length === 0 ? n : n.slice(d);
|
|
180
|
-
let
|
|
181
|
-
g.endsWith(
|
|
180
|
+
let v = g, S = !1;
|
|
181
|
+
g.endsWith(Xe) ? (v = g.slice(0, -1), S = !0) : (
|
|
182
182
|
/**
|
|
183
183
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
184
184
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
185
185
|
*/
|
|
186
|
-
g.startsWith(
|
|
186
|
+
g.startsWith(Xe) && (v = g.slice(1), S = !0)
|
|
187
187
|
);
|
|
188
|
-
const
|
|
189
|
-
return
|
|
188
|
+
const E = m && m > d ? m - d : void 0;
|
|
189
|
+
return nt(l, S, v, E);
|
|
190
190
|
};
|
|
191
191
|
if (r) {
|
|
192
|
-
const n = r +
|
|
193
|
-
a = (i) => i.startsWith(n) ? l(i.slice(n.length)) :
|
|
192
|
+
const n = r + at, l = a;
|
|
193
|
+
a = (i) => i.startsWith(n) ? l(i.slice(n.length)) : nt(cr, !1, i, void 0, !0);
|
|
194
194
|
}
|
|
195
195
|
if (o) {
|
|
196
196
|
const n = a;
|
|
@@ -229,35 +229,35 @@ const Zt = (t, r) => {
|
|
|
229
229
|
for (let m = c.length - 1; m >= 0; m -= 1) {
|
|
230
230
|
const u = c[m], {
|
|
231
231
|
isExternal: g,
|
|
232
|
-
modifiers:
|
|
232
|
+
modifiers: v,
|
|
233
233
|
hasImportantModifier: S,
|
|
234
|
-
baseClassName:
|
|
234
|
+
baseClassName: E,
|
|
235
235
|
maybePostfixModifierPosition: N
|
|
236
236
|
} = o(u);
|
|
237
237
|
if (g) {
|
|
238
238
|
d = u + (d.length > 0 ? " " + d : d);
|
|
239
239
|
continue;
|
|
240
240
|
}
|
|
241
|
-
let k = !!N,
|
|
242
|
-
if (!
|
|
241
|
+
let k = !!N, C = a(k ? E.substring(0, N) : E);
|
|
242
|
+
if (!C) {
|
|
243
243
|
if (!k) {
|
|
244
244
|
d = u + (d.length > 0 ? " " + d : d);
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
|
-
if (
|
|
247
|
+
if (C = a(E), !C) {
|
|
248
248
|
d = u + (d.length > 0 ? " " + d : d);
|
|
249
249
|
continue;
|
|
250
250
|
}
|
|
251
251
|
k = !1;
|
|
252
252
|
}
|
|
253
|
-
const I =
|
|
254
|
-
if (i.indexOf(
|
|
253
|
+
const I = v.length === 0 ? "" : v.length === 1 ? v[0] : l(v).join(":"), V = S ? I + Xe : I, D = V + C;
|
|
254
|
+
if (i.indexOf(D) > -1)
|
|
255
255
|
continue;
|
|
256
|
-
i.push(
|
|
257
|
-
const
|
|
258
|
-
for (let
|
|
259
|
-
const
|
|
260
|
-
i.push(
|
|
256
|
+
i.push(D);
|
|
257
|
+
const z = n(C, k);
|
|
258
|
+
for (let j = 0; j < z.length; ++j) {
|
|
259
|
+
const B = z[j];
|
|
260
|
+
i.push(V + B);
|
|
261
261
|
}
|
|
262
262
|
d = u + (d.length > 0 ? " " + d : d);
|
|
263
263
|
}
|
|
@@ -265,14 +265,14 @@ const Zt = (t, r) => {
|
|
|
265
265
|
}, fr = (...t) => {
|
|
266
266
|
let r = 0, o, a, n = "";
|
|
267
267
|
for (; r < t.length; )
|
|
268
|
-
(o = t[r++]) && (a =
|
|
268
|
+
(o = t[r++]) && (a = ft(o)) && (n && (n += " "), n += a);
|
|
269
269
|
return n;
|
|
270
|
-
},
|
|
270
|
+
}, ft = (t) => {
|
|
271
271
|
if (typeof t == "string")
|
|
272
272
|
return t;
|
|
273
273
|
let r, o = "";
|
|
274
274
|
for (let a = 0; a < t.length; a++)
|
|
275
|
-
t[a] && (r =
|
|
275
|
+
t[a] && (r = ft(t[a])) && (o && (o += " "), o += r);
|
|
276
276
|
return o;
|
|
277
277
|
}, gr = (t, ...r) => {
|
|
278
278
|
let o, a, n, l;
|
|
@@ -290,19 +290,19 @@ const Zt = (t, r) => {
|
|
|
290
290
|
}, yr = [], te = (t) => {
|
|
291
291
|
const r = (o) => o[t] || yr;
|
|
292
292
|
return r.isThemeGetter = !0, r;
|
|
293
|
-
},
|
|
293
|
+
}, gt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, xr = /^\d+\/\d+$/, wr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Cr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Nr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, kr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Te = (t) => xr.test(t), H = (t) => !!t && !Number.isNaN(Number(t)), Ne = (t) => !!t && Number.isInteger(Number(t)), We = (t) => t.endsWith("%") && H(t.slice(0, -1)), xe = (t) => wr.test(t), Sr = () => !0, Mr = (t) => (
|
|
294
294
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
295
295
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
296
296
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
297
297
|
vr.test(t) && !Cr.test(t)
|
|
298
|
-
),
|
|
299
|
-
const a =
|
|
298
|
+
), xt = () => !1, Ar = (t) => Nr.test(t), Rr = (t) => kr.test(t), Lr = (t) => !M(t) && !A(t), Tr = (t) => Pe(t, Ct, xt), M = (t) => gt.test(t), Me = (t) => Pe(t, Nt, Mr), $e = (t) => Pe(t, Br, H), it = (t) => Pe(t, wt, xt), zr = (t) => Pe(t, vt, Rr), De = (t) => Pe(t, kt, Ar), A = (t) => yt.test(t), Ge = (t) => Ie(t, Nt), Er = (t) => Ie(t, Gr), st = (t) => Ie(t, wt), Pr = (t) => Ie(t, Ct), Ir = (t) => Ie(t, vt), je = (t) => Ie(t, kt, !0), Pe = (t, r, o) => {
|
|
299
|
+
const a = gt.exec(t);
|
|
300
300
|
return a ? a[1] ? r(a[1]) : o(a[2]) : !1;
|
|
301
|
-
},
|
|
302
|
-
const a =
|
|
301
|
+
}, Ie = (t, r, o = !1) => {
|
|
302
|
+
const a = yt.exec(t);
|
|
303
303
|
return a ? a[1] ? r(a[1]) : o : !1;
|
|
304
|
-
},
|
|
305
|
-
const t = te("color"), r = te("font"), o = te("text"), a = te("font-weight"), n = te("tracking"), l = te("leading"), i = te("breakpoint"), c = te("container"), d = te("spacing"), m = te("radius"), u = te("shadow"), g = te("inset-shadow"),
|
|
304
|
+
}, wt = (t) => t === "position" || t === "percentage", vt = (t) => t === "image" || t === "url", Ct = (t) => t === "length" || t === "size" || t === "bg-size", Nt = (t) => t === "length", Br = (t) => t === "number", Gr = (t) => t === "family-name", kt = (t) => t === "shadow", Dr = () => {
|
|
305
|
+
const t = te("color"), r = te("font"), o = te("text"), a = te("font-weight"), n = te("tracking"), l = te("leading"), i = te("breakpoint"), c = te("container"), d = te("spacing"), m = te("radius"), u = te("shadow"), g = te("inset-shadow"), v = te("text-shadow"), S = te("drop-shadow"), E = te("blur"), N = te("perspective"), k = te("aspect"), C = te("ease"), I = te("animate"), V = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [
|
|
306
306
|
"center",
|
|
307
307
|
"top",
|
|
308
308
|
"bottom",
|
|
@@ -320,15 +320,15 @@ const Zt = (t, r) => {
|
|
|
320
320
|
"bottom-left",
|
|
321
321
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
322
322
|
"left-bottom"
|
|
323
|
-
],
|
|
324
|
-
span: ["full",
|
|
325
|
-
},
|
|
323
|
+
], z = () => [...D(), A, M], j = () => ["auto", "hidden", "clip", "visible", "scroll"], B = () => ["auto", "contain", "none"], h = () => [A, M, d], L = () => [Te, "full", "auto", ...h()], y = () => [Ne, "none", "subgrid", A, M], b = () => ["auto", {
|
|
324
|
+
span: ["full", Ne, A, M]
|
|
325
|
+
}, Ne, A, M], T = () => [Ne, "auto", A, M], P = () => ["auto", "min", "max", "fr", A, M], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], w = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], F = () => ["auto", ...h()], W = () => [Te, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...h()], f = () => [t, A, M], q = () => [...D(), st, it, {
|
|
326
326
|
position: [A, M]
|
|
327
327
|
}], Y = () => ["no-repeat", {
|
|
328
328
|
repeat: ["", "x", "y", "space", "round"]
|
|
329
|
-
}],
|
|
329
|
+
}], $ = () => ["auto", "cover", "contain", Pr, Tr, {
|
|
330
330
|
size: [A, M]
|
|
331
|
-
}],
|
|
331
|
+
}], K = () => [We, Ge, Me], Z = () => [
|
|
332
332
|
// Deprecated since Tailwind CSS v4.0.0
|
|
333
333
|
"",
|
|
334
334
|
"none",
|
|
@@ -336,35 +336,35 @@ const Zt = (t, r) => {
|
|
|
336
336
|
m,
|
|
337
337
|
A,
|
|
338
338
|
M
|
|
339
|
-
], ee = () => ["", H,
|
|
339
|
+
], ee = () => ["", H, Ge, Me], pe = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], X = () => [H, We, st, it], ve = () => [
|
|
340
340
|
// Deprecated since Tailwind CSS v4.0.0
|
|
341
341
|
"",
|
|
342
342
|
"none",
|
|
343
|
-
|
|
343
|
+
E,
|
|
344
344
|
A,
|
|
345
345
|
M
|
|
346
|
-
], ae = () => ["none", H, A, M], ne = () => ["none", H, A, M],
|
|
346
|
+
], ae = () => ["none", H, A, M], ne = () => ["none", H, A, M], ie = () => [H, A, M], re = () => [Te, "full", ...h()];
|
|
347
347
|
return {
|
|
348
348
|
cacheSize: 500,
|
|
349
349
|
theme: {
|
|
350
350
|
animate: ["spin", "ping", "pulse", "bounce"],
|
|
351
351
|
aspect: ["video"],
|
|
352
|
-
blur: [
|
|
353
|
-
breakpoint: [
|
|
352
|
+
blur: [xe],
|
|
353
|
+
breakpoint: [xe],
|
|
354
354
|
color: [Sr],
|
|
355
|
-
container: [
|
|
356
|
-
"drop-shadow": [
|
|
355
|
+
container: [xe],
|
|
356
|
+
"drop-shadow": [xe],
|
|
357
357
|
ease: ["in", "out", "in-out"],
|
|
358
|
-
font: [
|
|
358
|
+
font: [Lr],
|
|
359
359
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
360
|
-
"inset-shadow": [
|
|
360
|
+
"inset-shadow": [xe],
|
|
361
361
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
362
362
|
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
363
|
-
radius: [
|
|
364
|
-
shadow: [
|
|
363
|
+
radius: [xe],
|
|
364
|
+
shadow: [xe],
|
|
365
365
|
spacing: ["px", H],
|
|
366
|
-
text: [
|
|
367
|
-
"text-shadow": [
|
|
366
|
+
text: [xe],
|
|
367
|
+
"text-shadow": [xe],
|
|
368
368
|
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
369
369
|
},
|
|
370
370
|
classGroups: {
|
|
@@ -376,7 +376,7 @@ const Zt = (t, r) => {
|
|
|
376
376
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
377
377
|
*/
|
|
378
378
|
aspect: [{
|
|
379
|
-
aspect: ["auto", "square",
|
|
379
|
+
aspect: ["auto", "square", Te, M, A, k]
|
|
380
380
|
}],
|
|
381
381
|
/**
|
|
382
382
|
* Container
|
|
@@ -396,14 +396,14 @@ const Zt = (t, r) => {
|
|
|
396
396
|
* @see https://tailwindcss.com/docs/break-after
|
|
397
397
|
*/
|
|
398
398
|
"break-after": [{
|
|
399
|
-
"break-after":
|
|
399
|
+
"break-after": V()
|
|
400
400
|
}],
|
|
401
401
|
/**
|
|
402
402
|
* Break Before
|
|
403
403
|
* @see https://tailwindcss.com/docs/break-before
|
|
404
404
|
*/
|
|
405
405
|
"break-before": [{
|
|
406
|
-
"break-before":
|
|
406
|
+
"break-before": V()
|
|
407
407
|
}],
|
|
408
408
|
/**
|
|
409
409
|
* Break Inside
|
|
@@ -467,49 +467,49 @@ const Zt = (t, r) => {
|
|
|
467
467
|
* @see https://tailwindcss.com/docs/object-position
|
|
468
468
|
*/
|
|
469
469
|
"object-position": [{
|
|
470
|
-
object:
|
|
470
|
+
object: z()
|
|
471
471
|
}],
|
|
472
472
|
/**
|
|
473
473
|
* Overflow
|
|
474
474
|
* @see https://tailwindcss.com/docs/overflow
|
|
475
475
|
*/
|
|
476
476
|
overflow: [{
|
|
477
|
-
overflow:
|
|
477
|
+
overflow: j()
|
|
478
478
|
}],
|
|
479
479
|
/**
|
|
480
480
|
* Overflow X
|
|
481
481
|
* @see https://tailwindcss.com/docs/overflow
|
|
482
482
|
*/
|
|
483
483
|
"overflow-x": [{
|
|
484
|
-
"overflow-x":
|
|
484
|
+
"overflow-x": j()
|
|
485
485
|
}],
|
|
486
486
|
/**
|
|
487
487
|
* Overflow Y
|
|
488
488
|
* @see https://tailwindcss.com/docs/overflow
|
|
489
489
|
*/
|
|
490
490
|
"overflow-y": [{
|
|
491
|
-
"overflow-y":
|
|
491
|
+
"overflow-y": j()
|
|
492
492
|
}],
|
|
493
493
|
/**
|
|
494
494
|
* Overscroll Behavior
|
|
495
495
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
496
496
|
*/
|
|
497
497
|
overscroll: [{
|
|
498
|
-
overscroll:
|
|
498
|
+
overscroll: B()
|
|
499
499
|
}],
|
|
500
500
|
/**
|
|
501
501
|
* Overscroll Behavior X
|
|
502
502
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
503
503
|
*/
|
|
504
504
|
"overscroll-x": [{
|
|
505
|
-
"overscroll-x":
|
|
505
|
+
"overscroll-x": B()
|
|
506
506
|
}],
|
|
507
507
|
/**
|
|
508
508
|
* Overscroll Behavior Y
|
|
509
509
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
510
510
|
*/
|
|
511
511
|
"overscroll-y": [{
|
|
512
|
-
"overscroll-y":
|
|
512
|
+
"overscroll-y": B()
|
|
513
513
|
}],
|
|
514
514
|
/**
|
|
515
515
|
* Position
|
|
@@ -521,63 +521,63 @@ const Zt = (t, r) => {
|
|
|
521
521
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
522
522
|
*/
|
|
523
523
|
inset: [{
|
|
524
|
-
inset:
|
|
524
|
+
inset: L()
|
|
525
525
|
}],
|
|
526
526
|
/**
|
|
527
527
|
* Right / Left
|
|
528
528
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
529
529
|
*/
|
|
530
530
|
"inset-x": [{
|
|
531
|
-
"inset-x":
|
|
531
|
+
"inset-x": L()
|
|
532
532
|
}],
|
|
533
533
|
/**
|
|
534
534
|
* Top / Bottom
|
|
535
535
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
536
536
|
*/
|
|
537
537
|
"inset-y": [{
|
|
538
|
-
"inset-y":
|
|
538
|
+
"inset-y": L()
|
|
539
539
|
}],
|
|
540
540
|
/**
|
|
541
541
|
* Start
|
|
542
542
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
543
543
|
*/
|
|
544
544
|
start: [{
|
|
545
|
-
start:
|
|
545
|
+
start: L()
|
|
546
546
|
}],
|
|
547
547
|
/**
|
|
548
548
|
* End
|
|
549
549
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
550
550
|
*/
|
|
551
551
|
end: [{
|
|
552
|
-
end:
|
|
552
|
+
end: L()
|
|
553
553
|
}],
|
|
554
554
|
/**
|
|
555
555
|
* Top
|
|
556
556
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
557
557
|
*/
|
|
558
558
|
top: [{
|
|
559
|
-
top:
|
|
559
|
+
top: L()
|
|
560
560
|
}],
|
|
561
561
|
/**
|
|
562
562
|
* Right
|
|
563
563
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
564
564
|
*/
|
|
565
565
|
right: [{
|
|
566
|
-
right:
|
|
566
|
+
right: L()
|
|
567
567
|
}],
|
|
568
568
|
/**
|
|
569
569
|
* Bottom
|
|
570
570
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
571
571
|
*/
|
|
572
572
|
bottom: [{
|
|
573
|
-
bottom:
|
|
573
|
+
bottom: L()
|
|
574
574
|
}],
|
|
575
575
|
/**
|
|
576
576
|
* Left
|
|
577
577
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
578
578
|
*/
|
|
579
579
|
left: [{
|
|
580
|
-
left:
|
|
580
|
+
left: L()
|
|
581
581
|
}],
|
|
582
582
|
/**
|
|
583
583
|
* Visibility
|
|
@@ -589,7 +589,7 @@ const Zt = (t, r) => {
|
|
|
589
589
|
* @see https://tailwindcss.com/docs/z-index
|
|
590
590
|
*/
|
|
591
591
|
z: [{
|
|
592
|
-
z: [
|
|
592
|
+
z: [Ne, "auto", A, M]
|
|
593
593
|
}],
|
|
594
594
|
// ------------------------
|
|
595
595
|
// --- Flexbox and Grid ---
|
|
@@ -599,7 +599,7 @@ const Zt = (t, r) => {
|
|
|
599
599
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
600
600
|
*/
|
|
601
601
|
basis: [{
|
|
602
|
-
basis: [
|
|
602
|
+
basis: [Te, "full", "auto", c, ...h()]
|
|
603
603
|
}],
|
|
604
604
|
/**
|
|
605
605
|
* Flex Direction
|
|
@@ -620,7 +620,7 @@ const Zt = (t, r) => {
|
|
|
620
620
|
* @see https://tailwindcss.com/docs/flex
|
|
621
621
|
*/
|
|
622
622
|
flex: [{
|
|
623
|
-
flex: [H,
|
|
623
|
+
flex: [H, Te, "auto", "initial", "none", M]
|
|
624
624
|
}],
|
|
625
625
|
/**
|
|
626
626
|
* Flex Grow
|
|
@@ -641,63 +641,63 @@ const Zt = (t, r) => {
|
|
|
641
641
|
* @see https://tailwindcss.com/docs/order
|
|
642
642
|
*/
|
|
643
643
|
order: [{
|
|
644
|
-
order: [
|
|
644
|
+
order: [Ne, "first", "last", "none", A, M]
|
|
645
645
|
}],
|
|
646
646
|
/**
|
|
647
647
|
* Grid Template Columns
|
|
648
648
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
649
649
|
*/
|
|
650
650
|
"grid-cols": [{
|
|
651
|
-
"grid-cols":
|
|
651
|
+
"grid-cols": y()
|
|
652
652
|
}],
|
|
653
653
|
/**
|
|
654
654
|
* Grid Column Start / End
|
|
655
655
|
* @see https://tailwindcss.com/docs/grid-column
|
|
656
656
|
*/
|
|
657
657
|
"col-start-end": [{
|
|
658
|
-
col:
|
|
658
|
+
col: b()
|
|
659
659
|
}],
|
|
660
660
|
/**
|
|
661
661
|
* Grid Column Start
|
|
662
662
|
* @see https://tailwindcss.com/docs/grid-column
|
|
663
663
|
*/
|
|
664
664
|
"col-start": [{
|
|
665
|
-
"col-start":
|
|
665
|
+
"col-start": T()
|
|
666
666
|
}],
|
|
667
667
|
/**
|
|
668
668
|
* Grid Column End
|
|
669
669
|
* @see https://tailwindcss.com/docs/grid-column
|
|
670
670
|
*/
|
|
671
671
|
"col-end": [{
|
|
672
|
-
"col-end":
|
|
672
|
+
"col-end": T()
|
|
673
673
|
}],
|
|
674
674
|
/**
|
|
675
675
|
* Grid Template Rows
|
|
676
676
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
677
677
|
*/
|
|
678
678
|
"grid-rows": [{
|
|
679
|
-
"grid-rows":
|
|
679
|
+
"grid-rows": y()
|
|
680
680
|
}],
|
|
681
681
|
/**
|
|
682
682
|
* Grid Row Start / End
|
|
683
683
|
* @see https://tailwindcss.com/docs/grid-row
|
|
684
684
|
*/
|
|
685
685
|
"row-start-end": [{
|
|
686
|
-
row:
|
|
686
|
+
row: b()
|
|
687
687
|
}],
|
|
688
688
|
/**
|
|
689
689
|
* Grid Row Start
|
|
690
690
|
* @see https://tailwindcss.com/docs/grid-row
|
|
691
691
|
*/
|
|
692
692
|
"row-start": [{
|
|
693
|
-
"row-start":
|
|
693
|
+
"row-start": T()
|
|
694
694
|
}],
|
|
695
695
|
/**
|
|
696
696
|
* Grid Row End
|
|
697
697
|
* @see https://tailwindcss.com/docs/grid-row
|
|
698
698
|
*/
|
|
699
699
|
"row-end": [{
|
|
700
|
-
"row-end":
|
|
700
|
+
"row-end": T()
|
|
701
701
|
}],
|
|
702
702
|
/**
|
|
703
703
|
* Grid Auto Flow
|
|
@@ -711,14 +711,14 @@ const Zt = (t, r) => {
|
|
|
711
711
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
712
712
|
*/
|
|
713
713
|
"auto-cols": [{
|
|
714
|
-
"auto-cols":
|
|
714
|
+
"auto-cols": P()
|
|
715
715
|
}],
|
|
716
716
|
/**
|
|
717
717
|
* Grid Auto Rows
|
|
718
718
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
719
719
|
*/
|
|
720
720
|
"auto-rows": [{
|
|
721
|
-
"auto-rows":
|
|
721
|
+
"auto-rows": P()
|
|
722
722
|
}],
|
|
723
723
|
/**
|
|
724
724
|
* Gap
|
|
@@ -746,35 +746,35 @@ const Zt = (t, r) => {
|
|
|
746
746
|
* @see https://tailwindcss.com/docs/justify-content
|
|
747
747
|
*/
|
|
748
748
|
"justify-content": [{
|
|
749
|
-
justify: [...
|
|
749
|
+
justify: [...G(), "normal"]
|
|
750
750
|
}],
|
|
751
751
|
/**
|
|
752
752
|
* Justify Items
|
|
753
753
|
* @see https://tailwindcss.com/docs/justify-items
|
|
754
754
|
*/
|
|
755
755
|
"justify-items": [{
|
|
756
|
-
"justify-items": [...
|
|
756
|
+
"justify-items": [...w(), "normal"]
|
|
757
757
|
}],
|
|
758
758
|
/**
|
|
759
759
|
* Justify Self
|
|
760
760
|
* @see https://tailwindcss.com/docs/justify-self
|
|
761
761
|
*/
|
|
762
762
|
"justify-self": [{
|
|
763
|
-
"justify-self": ["auto", ...
|
|
763
|
+
"justify-self": ["auto", ...w()]
|
|
764
764
|
}],
|
|
765
765
|
/**
|
|
766
766
|
* Align Content
|
|
767
767
|
* @see https://tailwindcss.com/docs/align-content
|
|
768
768
|
*/
|
|
769
769
|
"align-content": [{
|
|
770
|
-
content: ["normal", ...
|
|
770
|
+
content: ["normal", ...G()]
|
|
771
771
|
}],
|
|
772
772
|
/**
|
|
773
773
|
* Align Items
|
|
774
774
|
* @see https://tailwindcss.com/docs/align-items
|
|
775
775
|
*/
|
|
776
776
|
"align-items": [{
|
|
777
|
-
items: [...
|
|
777
|
+
items: [...w(), {
|
|
778
778
|
baseline: ["", "last"]
|
|
779
779
|
}]
|
|
780
780
|
}],
|
|
@@ -783,7 +783,7 @@ const Zt = (t, r) => {
|
|
|
783
783
|
* @see https://tailwindcss.com/docs/align-self
|
|
784
784
|
*/
|
|
785
785
|
"align-self": [{
|
|
786
|
-
self: ["auto", ...
|
|
786
|
+
self: ["auto", ...w(), {
|
|
787
787
|
baseline: ["", "last"]
|
|
788
788
|
}]
|
|
789
789
|
}],
|
|
@@ -792,21 +792,21 @@ const Zt = (t, r) => {
|
|
|
792
792
|
* @see https://tailwindcss.com/docs/place-content
|
|
793
793
|
*/
|
|
794
794
|
"place-content": [{
|
|
795
|
-
"place-content":
|
|
795
|
+
"place-content": G()
|
|
796
796
|
}],
|
|
797
797
|
/**
|
|
798
798
|
* Place Items
|
|
799
799
|
* @see https://tailwindcss.com/docs/place-items
|
|
800
800
|
*/
|
|
801
801
|
"place-items": [{
|
|
802
|
-
"place-items": [...
|
|
802
|
+
"place-items": [...w(), "baseline"]
|
|
803
803
|
}],
|
|
804
804
|
/**
|
|
805
805
|
* Place Self
|
|
806
806
|
* @see https://tailwindcss.com/docs/place-self
|
|
807
807
|
*/
|
|
808
808
|
"place-self": [{
|
|
809
|
-
"place-self": ["auto", ...
|
|
809
|
+
"place-self": ["auto", ...w()]
|
|
810
810
|
}],
|
|
811
811
|
// Spacing
|
|
812
812
|
/**
|
|
@@ -967,14 +967,14 @@ const Zt = (t, r) => {
|
|
|
967
967
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
968
968
|
*/
|
|
969
969
|
size: [{
|
|
970
|
-
size:
|
|
970
|
+
size: W()
|
|
971
971
|
}],
|
|
972
972
|
/**
|
|
973
973
|
* Width
|
|
974
974
|
* @see https://tailwindcss.com/docs/width
|
|
975
975
|
*/
|
|
976
976
|
w: [{
|
|
977
|
-
w: [c, "screen",
|
|
977
|
+
w: [c, "screen", ...W()]
|
|
978
978
|
}],
|
|
979
979
|
/**
|
|
980
980
|
* Min-Width
|
|
@@ -986,7 +986,7 @@ const Zt = (t, r) => {
|
|
|
986
986
|
"screen",
|
|
987
987
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
988
988
|
"none",
|
|
989
|
-
|
|
989
|
+
...W()
|
|
990
990
|
]
|
|
991
991
|
}],
|
|
992
992
|
/**
|
|
@@ -1004,7 +1004,7 @@ const Zt = (t, r) => {
|
|
|
1004
1004
|
{
|
|
1005
1005
|
screen: [i]
|
|
1006
1006
|
},
|
|
1007
|
-
|
|
1007
|
+
...W()
|
|
1008
1008
|
]
|
|
1009
1009
|
}],
|
|
1010
1010
|
/**
|
|
@@ -1012,21 +1012,21 @@ const Zt = (t, r) => {
|
|
|
1012
1012
|
* @see https://tailwindcss.com/docs/height
|
|
1013
1013
|
*/
|
|
1014
1014
|
h: [{
|
|
1015
|
-
h: ["screen", "lh",
|
|
1015
|
+
h: ["screen", "lh", ...W()]
|
|
1016
1016
|
}],
|
|
1017
1017
|
/**
|
|
1018
1018
|
* Min-Height
|
|
1019
1019
|
* @see https://tailwindcss.com/docs/min-height
|
|
1020
1020
|
*/
|
|
1021
1021
|
"min-h": [{
|
|
1022
|
-
"min-h": ["screen", "lh", "none",
|
|
1022
|
+
"min-h": ["screen", "lh", "none", ...W()]
|
|
1023
1023
|
}],
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Max-Height
|
|
1026
1026
|
* @see https://tailwindcss.com/docs/max-height
|
|
1027
1027
|
*/
|
|
1028
1028
|
"max-h": [{
|
|
1029
|
-
"max-h": ["screen", "lh",
|
|
1029
|
+
"max-h": ["screen", "lh", ...W()]
|
|
1030
1030
|
}],
|
|
1031
1031
|
// ------------------
|
|
1032
1032
|
// --- Typography ---
|
|
@@ -1036,7 +1036,7 @@ const Zt = (t, r) => {
|
|
|
1036
1036
|
* @see https://tailwindcss.com/docs/font-size
|
|
1037
1037
|
*/
|
|
1038
1038
|
"font-size": [{
|
|
1039
|
-
text: ["base", o,
|
|
1039
|
+
text: ["base", o, Ge, Me]
|
|
1040
1040
|
}],
|
|
1041
1041
|
/**
|
|
1042
1042
|
* Font Smoothing
|
|
@@ -1053,14 +1053,14 @@ const Zt = (t, r) => {
|
|
|
1053
1053
|
* @see https://tailwindcss.com/docs/font-weight
|
|
1054
1054
|
*/
|
|
1055
1055
|
"font-weight": [{
|
|
1056
|
-
font: [a, A,
|
|
1056
|
+
font: [a, A, $e]
|
|
1057
1057
|
}],
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Font Stretch
|
|
1060
1060
|
* @see https://tailwindcss.com/docs/font-stretch
|
|
1061
1061
|
*/
|
|
1062
1062
|
"font-stretch": [{
|
|
1063
|
-
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded",
|
|
1063
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", We, M]
|
|
1064
1064
|
}],
|
|
1065
1065
|
/**
|
|
1066
1066
|
* Font Family
|
|
@@ -1111,7 +1111,7 @@ const Zt = (t, r) => {
|
|
|
1111
1111
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
1112
1112
|
*/
|
|
1113
1113
|
"line-clamp": [{
|
|
1114
|
-
"line-clamp": [H, "none", A,
|
|
1114
|
+
"line-clamp": [H, "none", A, $e]
|
|
1115
1115
|
}],
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Line Height
|
|
@@ -1158,14 +1158,14 @@ const Zt = (t, r) => {
|
|
|
1158
1158
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
1159
1159
|
*/
|
|
1160
1160
|
"placeholder-color": [{
|
|
1161
|
-
placeholder:
|
|
1161
|
+
placeholder: f()
|
|
1162
1162
|
}],
|
|
1163
1163
|
/**
|
|
1164
1164
|
* Text Color
|
|
1165
1165
|
* @see https://tailwindcss.com/docs/text-color
|
|
1166
1166
|
*/
|
|
1167
1167
|
"text-color": [{
|
|
1168
|
-
text:
|
|
1168
|
+
text: f()
|
|
1169
1169
|
}],
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Text Decoration
|
|
@@ -1184,14 +1184,14 @@ const Zt = (t, r) => {
|
|
|
1184
1184
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1185
1185
|
*/
|
|
1186
1186
|
"text-decoration-thickness": [{
|
|
1187
|
-
decoration: [H, "from-font", "auto", A,
|
|
1187
|
+
decoration: [H, "from-font", "auto", A, Me]
|
|
1188
1188
|
}],
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Text Decoration Color
|
|
1191
1191
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1192
1192
|
*/
|
|
1193
1193
|
"text-decoration-color": [{
|
|
1194
|
-
decoration:
|
|
1194
|
+
decoration: f()
|
|
1195
1195
|
}],
|
|
1196
1196
|
/**
|
|
1197
1197
|
* Text Underline Offset
|
|
@@ -1295,7 +1295,7 @@ const Zt = (t, r) => {
|
|
|
1295
1295
|
* @see https://tailwindcss.com/docs/background-position
|
|
1296
1296
|
*/
|
|
1297
1297
|
"bg-position": [{
|
|
1298
|
-
bg:
|
|
1298
|
+
bg: q()
|
|
1299
1299
|
}],
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Background Repeat
|
|
@@ -1309,7 +1309,7 @@ const Zt = (t, r) => {
|
|
|
1309
1309
|
* @see https://tailwindcss.com/docs/background-size
|
|
1310
1310
|
*/
|
|
1311
1311
|
"bg-size": [{
|
|
1312
|
-
bg:
|
|
1312
|
+
bg: $()
|
|
1313
1313
|
}],
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Background Image
|
|
@@ -1319,9 +1319,9 @@ const Zt = (t, r) => {
|
|
|
1319
1319
|
bg: ["none", {
|
|
1320
1320
|
linear: [{
|
|
1321
1321
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1322
|
-
},
|
|
1322
|
+
}, Ne, A, M],
|
|
1323
1323
|
radial: ["", A, M],
|
|
1324
|
-
conic: [
|
|
1324
|
+
conic: [Ne, A, M]
|
|
1325
1325
|
}, Ir, zr]
|
|
1326
1326
|
}],
|
|
1327
1327
|
/**
|
|
@@ -1329,49 +1329,49 @@ const Zt = (t, r) => {
|
|
|
1329
1329
|
* @see https://tailwindcss.com/docs/background-color
|
|
1330
1330
|
*/
|
|
1331
1331
|
"bg-color": [{
|
|
1332
|
-
bg:
|
|
1332
|
+
bg: f()
|
|
1333
1333
|
}],
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Gradient Color Stops From Position
|
|
1336
1336
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1337
1337
|
*/
|
|
1338
1338
|
"gradient-from-pos": [{
|
|
1339
|
-
from:
|
|
1339
|
+
from: K()
|
|
1340
1340
|
}],
|
|
1341
1341
|
/**
|
|
1342
1342
|
* Gradient Color Stops Via Position
|
|
1343
1343
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1344
1344
|
*/
|
|
1345
1345
|
"gradient-via-pos": [{
|
|
1346
|
-
via:
|
|
1346
|
+
via: K()
|
|
1347
1347
|
}],
|
|
1348
1348
|
/**
|
|
1349
1349
|
* Gradient Color Stops To Position
|
|
1350
1350
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1351
1351
|
*/
|
|
1352
1352
|
"gradient-to-pos": [{
|
|
1353
|
-
to:
|
|
1353
|
+
to: K()
|
|
1354
1354
|
}],
|
|
1355
1355
|
/**
|
|
1356
1356
|
* Gradient Color Stops From
|
|
1357
1357
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1358
1358
|
*/
|
|
1359
1359
|
"gradient-from": [{
|
|
1360
|
-
from:
|
|
1360
|
+
from: f()
|
|
1361
1361
|
}],
|
|
1362
1362
|
/**
|
|
1363
1363
|
* Gradient Color Stops Via
|
|
1364
1364
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1365
1365
|
*/
|
|
1366
1366
|
"gradient-via": [{
|
|
1367
|
-
via:
|
|
1367
|
+
via: f()
|
|
1368
1368
|
}],
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Gradient Color Stops To
|
|
1371
1371
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1372
1372
|
*/
|
|
1373
1373
|
"gradient-to": [{
|
|
1374
|
-
to:
|
|
1374
|
+
to: f()
|
|
1375
1375
|
}],
|
|
1376
1376
|
// ---------------
|
|
1377
1377
|
// --- Borders ---
|
|
@@ -1381,105 +1381,105 @@ const Zt = (t, r) => {
|
|
|
1381
1381
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1382
1382
|
*/
|
|
1383
1383
|
rounded: [{
|
|
1384
|
-
rounded:
|
|
1384
|
+
rounded: Z()
|
|
1385
1385
|
}],
|
|
1386
1386
|
/**
|
|
1387
1387
|
* Border Radius Start
|
|
1388
1388
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1389
1389
|
*/
|
|
1390
1390
|
"rounded-s": [{
|
|
1391
|
-
"rounded-s":
|
|
1391
|
+
"rounded-s": Z()
|
|
1392
1392
|
}],
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Border Radius End
|
|
1395
1395
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1396
1396
|
*/
|
|
1397
1397
|
"rounded-e": [{
|
|
1398
|
-
"rounded-e":
|
|
1398
|
+
"rounded-e": Z()
|
|
1399
1399
|
}],
|
|
1400
1400
|
/**
|
|
1401
1401
|
* Border Radius Top
|
|
1402
1402
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1403
1403
|
*/
|
|
1404
1404
|
"rounded-t": [{
|
|
1405
|
-
"rounded-t":
|
|
1405
|
+
"rounded-t": Z()
|
|
1406
1406
|
}],
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Border Radius Right
|
|
1409
1409
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1410
1410
|
*/
|
|
1411
1411
|
"rounded-r": [{
|
|
1412
|
-
"rounded-r":
|
|
1412
|
+
"rounded-r": Z()
|
|
1413
1413
|
}],
|
|
1414
1414
|
/**
|
|
1415
1415
|
* Border Radius Bottom
|
|
1416
1416
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1417
1417
|
*/
|
|
1418
1418
|
"rounded-b": [{
|
|
1419
|
-
"rounded-b":
|
|
1419
|
+
"rounded-b": Z()
|
|
1420
1420
|
}],
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Border Radius Left
|
|
1423
1423
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1424
1424
|
*/
|
|
1425
1425
|
"rounded-l": [{
|
|
1426
|
-
"rounded-l":
|
|
1426
|
+
"rounded-l": Z()
|
|
1427
1427
|
}],
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Border Radius Start Start
|
|
1430
1430
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1431
1431
|
*/
|
|
1432
1432
|
"rounded-ss": [{
|
|
1433
|
-
"rounded-ss":
|
|
1433
|
+
"rounded-ss": Z()
|
|
1434
1434
|
}],
|
|
1435
1435
|
/**
|
|
1436
1436
|
* Border Radius Start End
|
|
1437
1437
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1438
1438
|
*/
|
|
1439
1439
|
"rounded-se": [{
|
|
1440
|
-
"rounded-se":
|
|
1440
|
+
"rounded-se": Z()
|
|
1441
1441
|
}],
|
|
1442
1442
|
/**
|
|
1443
1443
|
* Border Radius End End
|
|
1444
1444
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1445
1445
|
*/
|
|
1446
1446
|
"rounded-ee": [{
|
|
1447
|
-
"rounded-ee":
|
|
1447
|
+
"rounded-ee": Z()
|
|
1448
1448
|
}],
|
|
1449
1449
|
/**
|
|
1450
1450
|
* Border Radius End Start
|
|
1451
1451
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1452
1452
|
*/
|
|
1453
1453
|
"rounded-es": [{
|
|
1454
|
-
"rounded-es":
|
|
1454
|
+
"rounded-es": Z()
|
|
1455
1455
|
}],
|
|
1456
1456
|
/**
|
|
1457
1457
|
* Border Radius Top Left
|
|
1458
1458
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1459
1459
|
*/
|
|
1460
1460
|
"rounded-tl": [{
|
|
1461
|
-
"rounded-tl":
|
|
1461
|
+
"rounded-tl": Z()
|
|
1462
1462
|
}],
|
|
1463
1463
|
/**
|
|
1464
1464
|
* Border Radius Top Right
|
|
1465
1465
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1466
1466
|
*/
|
|
1467
1467
|
"rounded-tr": [{
|
|
1468
|
-
"rounded-tr":
|
|
1468
|
+
"rounded-tr": Z()
|
|
1469
1469
|
}],
|
|
1470
1470
|
/**
|
|
1471
1471
|
* Border Radius Bottom Right
|
|
1472
1472
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1473
1473
|
*/
|
|
1474
1474
|
"rounded-br": [{
|
|
1475
|
-
"rounded-br":
|
|
1475
|
+
"rounded-br": Z()
|
|
1476
1476
|
}],
|
|
1477
1477
|
/**
|
|
1478
1478
|
* Border Radius Bottom Left
|
|
1479
1479
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1480
1480
|
*/
|
|
1481
1481
|
"rounded-bl": [{
|
|
1482
|
-
"rounded-bl":
|
|
1482
|
+
"rounded-bl": Z()
|
|
1483
1483
|
}],
|
|
1484
1484
|
/**
|
|
1485
1485
|
* Border Width
|
|
@@ -1587,70 +1587,70 @@ const Zt = (t, r) => {
|
|
|
1587
1587
|
* @see https://tailwindcss.com/docs/border-color
|
|
1588
1588
|
*/
|
|
1589
1589
|
"border-color": [{
|
|
1590
|
-
border:
|
|
1590
|
+
border: f()
|
|
1591
1591
|
}],
|
|
1592
1592
|
/**
|
|
1593
1593
|
* Border Color X
|
|
1594
1594
|
* @see https://tailwindcss.com/docs/border-color
|
|
1595
1595
|
*/
|
|
1596
1596
|
"border-color-x": [{
|
|
1597
|
-
"border-x":
|
|
1597
|
+
"border-x": f()
|
|
1598
1598
|
}],
|
|
1599
1599
|
/**
|
|
1600
1600
|
* Border Color Y
|
|
1601
1601
|
* @see https://tailwindcss.com/docs/border-color
|
|
1602
1602
|
*/
|
|
1603
1603
|
"border-color-y": [{
|
|
1604
|
-
"border-y":
|
|
1604
|
+
"border-y": f()
|
|
1605
1605
|
}],
|
|
1606
1606
|
/**
|
|
1607
1607
|
* Border Color S
|
|
1608
1608
|
* @see https://tailwindcss.com/docs/border-color
|
|
1609
1609
|
*/
|
|
1610
1610
|
"border-color-s": [{
|
|
1611
|
-
"border-s":
|
|
1611
|
+
"border-s": f()
|
|
1612
1612
|
}],
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Border Color E
|
|
1615
1615
|
* @see https://tailwindcss.com/docs/border-color
|
|
1616
1616
|
*/
|
|
1617
1617
|
"border-color-e": [{
|
|
1618
|
-
"border-e":
|
|
1618
|
+
"border-e": f()
|
|
1619
1619
|
}],
|
|
1620
1620
|
/**
|
|
1621
1621
|
* Border Color Top
|
|
1622
1622
|
* @see https://tailwindcss.com/docs/border-color
|
|
1623
1623
|
*/
|
|
1624
1624
|
"border-color-t": [{
|
|
1625
|
-
"border-t":
|
|
1625
|
+
"border-t": f()
|
|
1626
1626
|
}],
|
|
1627
1627
|
/**
|
|
1628
1628
|
* Border Color Right
|
|
1629
1629
|
* @see https://tailwindcss.com/docs/border-color
|
|
1630
1630
|
*/
|
|
1631
1631
|
"border-color-r": [{
|
|
1632
|
-
"border-r":
|
|
1632
|
+
"border-r": f()
|
|
1633
1633
|
}],
|
|
1634
1634
|
/**
|
|
1635
1635
|
* Border Color Bottom
|
|
1636
1636
|
* @see https://tailwindcss.com/docs/border-color
|
|
1637
1637
|
*/
|
|
1638
1638
|
"border-color-b": [{
|
|
1639
|
-
"border-b":
|
|
1639
|
+
"border-b": f()
|
|
1640
1640
|
}],
|
|
1641
1641
|
/**
|
|
1642
1642
|
* Border Color Left
|
|
1643
1643
|
* @see https://tailwindcss.com/docs/border-color
|
|
1644
1644
|
*/
|
|
1645
1645
|
"border-color-l": [{
|
|
1646
|
-
"border-l":
|
|
1646
|
+
"border-l": f()
|
|
1647
1647
|
}],
|
|
1648
1648
|
/**
|
|
1649
1649
|
* Divide Color
|
|
1650
1650
|
* @see https://tailwindcss.com/docs/divide-color
|
|
1651
1651
|
*/
|
|
1652
1652
|
"divide-color": [{
|
|
1653
|
-
divide:
|
|
1653
|
+
divide: f()
|
|
1654
1654
|
}],
|
|
1655
1655
|
/**
|
|
1656
1656
|
* Outline Style
|
|
@@ -1671,14 +1671,14 @@ const Zt = (t, r) => {
|
|
|
1671
1671
|
* @see https://tailwindcss.com/docs/outline-width
|
|
1672
1672
|
*/
|
|
1673
1673
|
"outline-w": [{
|
|
1674
|
-
outline: ["", H,
|
|
1674
|
+
outline: ["", H, Ge, Me]
|
|
1675
1675
|
}],
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Outline Color
|
|
1678
1678
|
* @see https://tailwindcss.com/docs/outline-color
|
|
1679
1679
|
*/
|
|
1680
1680
|
"outline-color": [{
|
|
1681
|
-
outline:
|
|
1681
|
+
outline: f()
|
|
1682
1682
|
}],
|
|
1683
1683
|
// ---------------
|
|
1684
1684
|
// --- Effects ---
|
|
@@ -1693,8 +1693,8 @@ const Zt = (t, r) => {
|
|
|
1693
1693
|
"",
|
|
1694
1694
|
"none",
|
|
1695
1695
|
u,
|
|
1696
|
-
|
|
1697
|
-
|
|
1696
|
+
je,
|
|
1697
|
+
De
|
|
1698
1698
|
]
|
|
1699
1699
|
}],
|
|
1700
1700
|
/**
|
|
@@ -1702,21 +1702,21 @@ const Zt = (t, r) => {
|
|
|
1702
1702
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
1703
1703
|
*/
|
|
1704
1704
|
"shadow-color": [{
|
|
1705
|
-
shadow:
|
|
1705
|
+
shadow: f()
|
|
1706
1706
|
}],
|
|
1707
1707
|
/**
|
|
1708
1708
|
* Inset Box Shadow
|
|
1709
1709
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
1710
1710
|
*/
|
|
1711
1711
|
"inset-shadow": [{
|
|
1712
|
-
"inset-shadow": ["none", g,
|
|
1712
|
+
"inset-shadow": ["none", g, je, De]
|
|
1713
1713
|
}],
|
|
1714
1714
|
/**
|
|
1715
1715
|
* Inset Box Shadow Color
|
|
1716
1716
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
1717
1717
|
*/
|
|
1718
1718
|
"inset-shadow-color": [{
|
|
1719
|
-
"inset-shadow":
|
|
1719
|
+
"inset-shadow": f()
|
|
1720
1720
|
}],
|
|
1721
1721
|
/**
|
|
1722
1722
|
* Ring Width
|
|
@@ -1737,7 +1737,7 @@ const Zt = (t, r) => {
|
|
|
1737
1737
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
1738
1738
|
*/
|
|
1739
1739
|
"ring-color": [{
|
|
1740
|
-
ring:
|
|
1740
|
+
ring: f()
|
|
1741
1741
|
}],
|
|
1742
1742
|
/**
|
|
1743
1743
|
* Ring Offset Width
|
|
@@ -1746,7 +1746,7 @@ const Zt = (t, r) => {
|
|
|
1746
1746
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
1747
1747
|
*/
|
|
1748
1748
|
"ring-offset-w": [{
|
|
1749
|
-
"ring-offset": [H,
|
|
1749
|
+
"ring-offset": [H, Me]
|
|
1750
1750
|
}],
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Ring Offset Color
|
|
@@ -1755,7 +1755,7 @@ const Zt = (t, r) => {
|
|
|
1755
1755
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
1756
1756
|
*/
|
|
1757
1757
|
"ring-offset-color": [{
|
|
1758
|
-
"ring-offset":
|
|
1758
|
+
"ring-offset": f()
|
|
1759
1759
|
}],
|
|
1760
1760
|
/**
|
|
1761
1761
|
* Inset Ring Width
|
|
@@ -1769,21 +1769,21 @@ const Zt = (t, r) => {
|
|
|
1769
1769
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
1770
1770
|
*/
|
|
1771
1771
|
"inset-ring-color": [{
|
|
1772
|
-
"inset-ring":
|
|
1772
|
+
"inset-ring": f()
|
|
1773
1773
|
}],
|
|
1774
1774
|
/**
|
|
1775
1775
|
* Text Shadow
|
|
1776
1776
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
1777
1777
|
*/
|
|
1778
1778
|
"text-shadow": [{
|
|
1779
|
-
"text-shadow": ["none",
|
|
1779
|
+
"text-shadow": ["none", v, je, De]
|
|
1780
1780
|
}],
|
|
1781
1781
|
/**
|
|
1782
1782
|
* Text Shadow Color
|
|
1783
1783
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
1784
1784
|
*/
|
|
1785
1785
|
"text-shadow-color": [{
|
|
1786
|
-
"text-shadow":
|
|
1786
|
+
"text-shadow": f()
|
|
1787
1787
|
}],
|
|
1788
1788
|
/**
|
|
1789
1789
|
* Opacity
|
|
@@ -1834,10 +1834,10 @@ const Zt = (t, r) => {
|
|
|
1834
1834
|
"mask-linear-to": X()
|
|
1835
1835
|
}],
|
|
1836
1836
|
"mask-image-linear-from-color": [{
|
|
1837
|
-
"mask-linear-from":
|
|
1837
|
+
"mask-linear-from": f()
|
|
1838
1838
|
}],
|
|
1839
1839
|
"mask-image-linear-to-color": [{
|
|
1840
|
-
"mask-linear-to":
|
|
1840
|
+
"mask-linear-to": f()
|
|
1841
1841
|
}],
|
|
1842
1842
|
"mask-image-t-from-pos": [{
|
|
1843
1843
|
"mask-t-from": X()
|
|
@@ -1846,10 +1846,10 @@ const Zt = (t, r) => {
|
|
|
1846
1846
|
"mask-t-to": X()
|
|
1847
1847
|
}],
|
|
1848
1848
|
"mask-image-t-from-color": [{
|
|
1849
|
-
"mask-t-from":
|
|
1849
|
+
"mask-t-from": f()
|
|
1850
1850
|
}],
|
|
1851
1851
|
"mask-image-t-to-color": [{
|
|
1852
|
-
"mask-t-to":
|
|
1852
|
+
"mask-t-to": f()
|
|
1853
1853
|
}],
|
|
1854
1854
|
"mask-image-r-from-pos": [{
|
|
1855
1855
|
"mask-r-from": X()
|
|
@@ -1858,10 +1858,10 @@ const Zt = (t, r) => {
|
|
|
1858
1858
|
"mask-r-to": X()
|
|
1859
1859
|
}],
|
|
1860
1860
|
"mask-image-r-from-color": [{
|
|
1861
|
-
"mask-r-from":
|
|
1861
|
+
"mask-r-from": f()
|
|
1862
1862
|
}],
|
|
1863
1863
|
"mask-image-r-to-color": [{
|
|
1864
|
-
"mask-r-to":
|
|
1864
|
+
"mask-r-to": f()
|
|
1865
1865
|
}],
|
|
1866
1866
|
"mask-image-b-from-pos": [{
|
|
1867
1867
|
"mask-b-from": X()
|
|
@@ -1870,10 +1870,10 @@ const Zt = (t, r) => {
|
|
|
1870
1870
|
"mask-b-to": X()
|
|
1871
1871
|
}],
|
|
1872
1872
|
"mask-image-b-from-color": [{
|
|
1873
|
-
"mask-b-from":
|
|
1873
|
+
"mask-b-from": f()
|
|
1874
1874
|
}],
|
|
1875
1875
|
"mask-image-b-to-color": [{
|
|
1876
|
-
"mask-b-to":
|
|
1876
|
+
"mask-b-to": f()
|
|
1877
1877
|
}],
|
|
1878
1878
|
"mask-image-l-from-pos": [{
|
|
1879
1879
|
"mask-l-from": X()
|
|
@@ -1882,10 +1882,10 @@ const Zt = (t, r) => {
|
|
|
1882
1882
|
"mask-l-to": X()
|
|
1883
1883
|
}],
|
|
1884
1884
|
"mask-image-l-from-color": [{
|
|
1885
|
-
"mask-l-from":
|
|
1885
|
+
"mask-l-from": f()
|
|
1886
1886
|
}],
|
|
1887
1887
|
"mask-image-l-to-color": [{
|
|
1888
|
-
"mask-l-to":
|
|
1888
|
+
"mask-l-to": f()
|
|
1889
1889
|
}],
|
|
1890
1890
|
"mask-image-x-from-pos": [{
|
|
1891
1891
|
"mask-x-from": X()
|
|
@@ -1894,10 +1894,10 @@ const Zt = (t, r) => {
|
|
|
1894
1894
|
"mask-x-to": X()
|
|
1895
1895
|
}],
|
|
1896
1896
|
"mask-image-x-from-color": [{
|
|
1897
|
-
"mask-x-from":
|
|
1897
|
+
"mask-x-from": f()
|
|
1898
1898
|
}],
|
|
1899
1899
|
"mask-image-x-to-color": [{
|
|
1900
|
-
"mask-x-to":
|
|
1900
|
+
"mask-x-to": f()
|
|
1901
1901
|
}],
|
|
1902
1902
|
"mask-image-y-from-pos": [{
|
|
1903
1903
|
"mask-y-from": X()
|
|
@@ -1906,10 +1906,10 @@ const Zt = (t, r) => {
|
|
|
1906
1906
|
"mask-y-to": X()
|
|
1907
1907
|
}],
|
|
1908
1908
|
"mask-image-y-from-color": [{
|
|
1909
|
-
"mask-y-from":
|
|
1909
|
+
"mask-y-from": f()
|
|
1910
1910
|
}],
|
|
1911
1911
|
"mask-image-y-to-color": [{
|
|
1912
|
-
"mask-y-to":
|
|
1912
|
+
"mask-y-to": f()
|
|
1913
1913
|
}],
|
|
1914
1914
|
"mask-image-radial": [{
|
|
1915
1915
|
"mask-radial": [A, M]
|
|
@@ -1921,10 +1921,10 @@ const Zt = (t, r) => {
|
|
|
1921
1921
|
"mask-radial-to": X()
|
|
1922
1922
|
}],
|
|
1923
1923
|
"mask-image-radial-from-color": [{
|
|
1924
|
-
"mask-radial-from":
|
|
1924
|
+
"mask-radial-from": f()
|
|
1925
1925
|
}],
|
|
1926
1926
|
"mask-image-radial-to-color": [{
|
|
1927
|
-
"mask-radial-to":
|
|
1927
|
+
"mask-radial-to": f()
|
|
1928
1928
|
}],
|
|
1929
1929
|
"mask-image-radial-shape": [{
|
|
1930
1930
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -1936,7 +1936,7 @@ const Zt = (t, r) => {
|
|
|
1936
1936
|
}]
|
|
1937
1937
|
}],
|
|
1938
1938
|
"mask-image-radial-pos": [{
|
|
1939
|
-
"mask-radial-at":
|
|
1939
|
+
"mask-radial-at": D()
|
|
1940
1940
|
}],
|
|
1941
1941
|
"mask-image-conic-pos": [{
|
|
1942
1942
|
"mask-conic": [H]
|
|
@@ -1948,10 +1948,10 @@ const Zt = (t, r) => {
|
|
|
1948
1948
|
"mask-conic-to": X()
|
|
1949
1949
|
}],
|
|
1950
1950
|
"mask-image-conic-from-color": [{
|
|
1951
|
-
"mask-conic-from":
|
|
1951
|
+
"mask-conic-from": f()
|
|
1952
1952
|
}],
|
|
1953
1953
|
"mask-image-conic-to-color": [{
|
|
1954
|
-
"mask-conic-to":
|
|
1954
|
+
"mask-conic-to": f()
|
|
1955
1955
|
}],
|
|
1956
1956
|
/**
|
|
1957
1957
|
* Mask Mode
|
|
@@ -1972,7 +1972,7 @@ const Zt = (t, r) => {
|
|
|
1972
1972
|
* @see https://tailwindcss.com/docs/mask-position
|
|
1973
1973
|
*/
|
|
1974
1974
|
"mask-position": [{
|
|
1975
|
-
mask:
|
|
1975
|
+
mask: q()
|
|
1976
1976
|
}],
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Mask Repeat
|
|
@@ -1986,7 +1986,7 @@ const Zt = (t, r) => {
|
|
|
1986
1986
|
* @see https://tailwindcss.com/docs/mask-size
|
|
1987
1987
|
*/
|
|
1988
1988
|
"mask-size": [{
|
|
1989
|
-
mask:
|
|
1989
|
+
mask: $()
|
|
1990
1990
|
}],
|
|
1991
1991
|
/**
|
|
1992
1992
|
* Mask Type
|
|
@@ -2023,7 +2023,7 @@ const Zt = (t, r) => {
|
|
|
2023
2023
|
* @see https://tailwindcss.com/docs/blur
|
|
2024
2024
|
*/
|
|
2025
2025
|
blur: [{
|
|
2026
|
-
blur:
|
|
2026
|
+
blur: ve()
|
|
2027
2027
|
}],
|
|
2028
2028
|
/**
|
|
2029
2029
|
* Brightness
|
|
@@ -2049,8 +2049,8 @@ const Zt = (t, r) => {
|
|
|
2049
2049
|
"",
|
|
2050
2050
|
"none",
|
|
2051
2051
|
S,
|
|
2052
|
-
|
|
2053
|
-
|
|
2052
|
+
je,
|
|
2053
|
+
De
|
|
2054
2054
|
]
|
|
2055
2055
|
}],
|
|
2056
2056
|
/**
|
|
@@ -2058,7 +2058,7 @@ const Zt = (t, r) => {
|
|
|
2058
2058
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2059
2059
|
*/
|
|
2060
2060
|
"drop-shadow-color": [{
|
|
2061
|
-
"drop-shadow":
|
|
2061
|
+
"drop-shadow": f()
|
|
2062
2062
|
}],
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Grayscale
|
|
@@ -2113,7 +2113,7 @@ const Zt = (t, r) => {
|
|
|
2113
2113
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2114
2114
|
*/
|
|
2115
2115
|
"backdrop-blur": [{
|
|
2116
|
-
"backdrop-blur":
|
|
2116
|
+
"backdrop-blur": ve()
|
|
2117
2117
|
}],
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Backdrop Brightness
|
|
@@ -2245,7 +2245,7 @@ const Zt = (t, r) => {
|
|
|
2245
2245
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2246
2246
|
*/
|
|
2247
2247
|
ease: [{
|
|
2248
|
-
ease: ["linear", "initial",
|
|
2248
|
+
ease: ["linear", "initial", C, A, M]
|
|
2249
2249
|
}],
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Transition Delay
|
|
@@ -2283,7 +2283,7 @@ const Zt = (t, r) => {
|
|
|
2283
2283
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2284
2284
|
*/
|
|
2285
2285
|
"perspective-origin": [{
|
|
2286
|
-
"perspective-origin":
|
|
2286
|
+
"perspective-origin": z()
|
|
2287
2287
|
}],
|
|
2288
2288
|
/**
|
|
2289
2289
|
* Rotate
|
|
@@ -2351,21 +2351,21 @@ const Zt = (t, r) => {
|
|
|
2351
2351
|
* @see https://tailwindcss.com/docs/skew
|
|
2352
2352
|
*/
|
|
2353
2353
|
skew: [{
|
|
2354
|
-
skew:
|
|
2354
|
+
skew: ie()
|
|
2355
2355
|
}],
|
|
2356
2356
|
/**
|
|
2357
2357
|
* Skew X
|
|
2358
2358
|
* @see https://tailwindcss.com/docs/skew
|
|
2359
2359
|
*/
|
|
2360
2360
|
"skew-x": [{
|
|
2361
|
-
"skew-x":
|
|
2361
|
+
"skew-x": ie()
|
|
2362
2362
|
}],
|
|
2363
2363
|
/**
|
|
2364
2364
|
* Skew Y
|
|
2365
2365
|
* @see https://tailwindcss.com/docs/skew
|
|
2366
2366
|
*/
|
|
2367
2367
|
"skew-y": [{
|
|
2368
|
-
"skew-y":
|
|
2368
|
+
"skew-y": ie()
|
|
2369
2369
|
}],
|
|
2370
2370
|
/**
|
|
2371
2371
|
* Transform
|
|
@@ -2379,7 +2379,7 @@ const Zt = (t, r) => {
|
|
|
2379
2379
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2380
2380
|
*/
|
|
2381
2381
|
"transform-origin": [{
|
|
2382
|
-
origin:
|
|
2382
|
+
origin: z()
|
|
2383
2383
|
}],
|
|
2384
2384
|
/**
|
|
2385
2385
|
* Transform Style
|
|
@@ -2429,7 +2429,7 @@ const Zt = (t, r) => {
|
|
|
2429
2429
|
* @see https://tailwindcss.com/docs/accent-color
|
|
2430
2430
|
*/
|
|
2431
2431
|
accent: [{
|
|
2432
|
-
accent:
|
|
2432
|
+
accent: f()
|
|
2433
2433
|
}],
|
|
2434
2434
|
/**
|
|
2435
2435
|
* Appearance
|
|
@@ -2443,7 +2443,7 @@ const Zt = (t, r) => {
|
|
|
2443
2443
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2444
2444
|
*/
|
|
2445
2445
|
"caret-color": [{
|
|
2446
|
-
caret:
|
|
2446
|
+
caret: f()
|
|
2447
2447
|
}],
|
|
2448
2448
|
/**
|
|
2449
2449
|
* Color Scheme
|
|
@@ -2689,21 +2689,21 @@ const Zt = (t, r) => {
|
|
|
2689
2689
|
* @see https://tailwindcss.com/docs/fill
|
|
2690
2690
|
*/
|
|
2691
2691
|
fill: [{
|
|
2692
|
-
fill: ["none", ...
|
|
2692
|
+
fill: ["none", ...f()]
|
|
2693
2693
|
}],
|
|
2694
2694
|
/**
|
|
2695
2695
|
* Stroke Width
|
|
2696
2696
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
2697
2697
|
*/
|
|
2698
2698
|
"stroke-w": [{
|
|
2699
|
-
stroke: [H,
|
|
2699
|
+
stroke: [H, Ge, Me, $e]
|
|
2700
2700
|
}],
|
|
2701
2701
|
/**
|
|
2702
2702
|
* Stroke
|
|
2703
2703
|
* @see https://tailwindcss.com/docs/stroke
|
|
2704
2704
|
*/
|
|
2705
2705
|
stroke: [{
|
|
2706
|
-
stroke: ["none", ...
|
|
2706
|
+
stroke: ["none", ...f()]
|
|
2707
2707
|
}],
|
|
2708
2708
|
// ---------------------
|
|
2709
2709
|
// --- Accessibility ---
|
|
@@ -2773,12 +2773,12 @@ const Zt = (t, r) => {
|
|
|
2773
2773
|
};
|
|
2774
2774
|
}, jr = /* @__PURE__ */ gr(Dr);
|
|
2775
2775
|
function p(...t) {
|
|
2776
|
-
return jr(
|
|
2776
|
+
return jr(qt(t));
|
|
2777
2777
|
}
|
|
2778
|
-
const
|
|
2778
|
+
const Fe = et.forwardRef(
|
|
2779
2779
|
({ variant: t = "primary", size: r = "md", loading: o, icon: a, animate: n = !0, className: l, children: i, disabled: c, ...d }, m) => {
|
|
2780
|
-
const u = n !== !1, g = "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",
|
|
2781
|
-
primary: "bg-primary text-white hover:bg-primary
|
|
2780
|
+
const u = n !== !1, g = "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", v = {
|
|
2781
|
+
primary: "bg-primary text-white hover:bg-primary/80 active:bg-primary/80 shadow-sm",
|
|
2782
2782
|
secondary: "bg-secondary text-foreground hover:bg-border active:bg-border-dark",
|
|
2783
2783
|
outline: "bg-transparent text-primary border-1 border-primary hover:bg-secondary active:bg-border",
|
|
2784
2784
|
ghost: "bg-transparent text-primary hover:bg-secondary active:bg-border",
|
|
@@ -2793,18 +2793,18 @@ const Ge = qe.forwardRef(
|
|
|
2793
2793
|
{
|
|
2794
2794
|
ref: m,
|
|
2795
2795
|
whileTap: u ? { scale: c || o ? 1 : 0.98 } : void 0,
|
|
2796
|
-
className: p(g,
|
|
2796
|
+
className: p(g, v[t], S[r], l),
|
|
2797
2797
|
disabled: c || o,
|
|
2798
2798
|
...d,
|
|
2799
2799
|
children: [
|
|
2800
|
-
o ? /* @__PURE__ */ e(
|
|
2800
|
+
o ? /* @__PURE__ */ e(dt, { className: p("h-5 w-5", u && "animate-spin") }) : a ? /* @__PURE__ */ e("span", { className: "shrink-0", children: a }) : null,
|
|
2801
2801
|
i
|
|
2802
2802
|
]
|
|
2803
2803
|
}
|
|
2804
2804
|
);
|
|
2805
2805
|
}
|
|
2806
2806
|
);
|
|
2807
|
-
|
|
2807
|
+
Fe.displayName = "Button";
|
|
2808
2808
|
const le = ({
|
|
2809
2809
|
open: t,
|
|
2810
2810
|
anchorRef: r,
|
|
@@ -2814,16 +2814,16 @@ const le = ({
|
|
|
2814
2814
|
offset: l = 8,
|
|
2815
2815
|
matchWidth: i = !0
|
|
2816
2816
|
}) => {
|
|
2817
|
-
const [c, d] =
|
|
2817
|
+
const [c, d] = U(!1), [m, u] = U(null);
|
|
2818
2818
|
J(() => (d(!0), () => d(!1)), []);
|
|
2819
|
-
const g =
|
|
2819
|
+
const g = ke(() => {
|
|
2820
2820
|
if (!t || !r.current) return;
|
|
2821
|
-
const
|
|
2821
|
+
const v = r.current.getBoundingClientRect();
|
|
2822
2822
|
u({
|
|
2823
2823
|
position: "fixed",
|
|
2824
|
-
top: o === "top" ?
|
|
2825
|
-
left:
|
|
2826
|
-
width: i ?
|
|
2824
|
+
top: o === "top" ? v.top - l : v.bottom + l,
|
|
2825
|
+
left: v.left,
|
|
2826
|
+
width: i ? v.width : void 0,
|
|
2827
2827
|
zIndex: 70
|
|
2828
2828
|
});
|
|
2829
2829
|
}, [r, i, l, t, o]);
|
|
@@ -2832,12 +2832,12 @@ const le = ({
|
|
|
2832
2832
|
return g(), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0), () => {
|
|
2833
2833
|
window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
|
|
2834
2834
|
};
|
|
2835
|
-
}, [t, g]), !c || !t || !m ? null :
|
|
2835
|
+
}, [t, g]), !c || !t || !m ? null : mt(
|
|
2836
2836
|
/* @__PURE__ */ e(
|
|
2837
2837
|
"div",
|
|
2838
2838
|
{
|
|
2839
2839
|
style: m,
|
|
2840
|
-
onMouseDown: (
|
|
2840
|
+
onMouseDown: (v) => v.stopPropagation(),
|
|
2841
2841
|
className: p(o === "top" && "-translate-y-full", n),
|
|
2842
2842
|
children: a
|
|
2843
2843
|
}
|
|
@@ -2858,44 +2858,44 @@ const le = ({
|
|
|
2858
2858
|
className: u,
|
|
2859
2859
|
animate: g = !0
|
|
2860
2860
|
}) => {
|
|
2861
|
-
const
|
|
2861
|
+
const v = g !== !1, [S, E] = U(!1), [N, k] = U("bottom"), [C, I] = U(!1), [V, D] = U("bottom"), [z, j] = U(!1), [B, h] = U("bottom"), [L, y] = U(t || /* @__PURE__ */ new Date()), b = Q(null), T = Q(null), P = Q(null), G = Q(null), w = Q(null), F = Q(null);
|
|
2862
2862
|
J(() => {
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2863
|
+
const x = (O) => {
|
|
2864
|
+
b.current && !b.current.contains(O.target) && (E(!1), I(!1), j(!1));
|
|
2865
2865
|
};
|
|
2866
|
-
return S && document.addEventListener("mousedown",
|
|
2867
|
-
document.removeEventListener("mousedown",
|
|
2866
|
+
return S && document.addEventListener("mousedown", x), () => {
|
|
2867
|
+
document.removeEventListener("mousedown", x);
|
|
2868
2868
|
};
|
|
2869
2869
|
}, [S]), J(() => {
|
|
2870
|
-
S || (I(!1),
|
|
2870
|
+
S || (I(!1), j(!1));
|
|
2871
2871
|
}, [S]), J(() => {
|
|
2872
2872
|
if (!S) return;
|
|
2873
|
-
const
|
|
2874
|
-
if (!
|
|
2875
|
-
const
|
|
2876
|
-
if (
|
|
2873
|
+
const x = () => {
|
|
2874
|
+
if (!T.current) return;
|
|
2875
|
+
const O = T.current.getBoundingClientRect(), _ = 430, ye = window.innerHeight - O.bottom - 8, fe = O.top - 8;
|
|
2876
|
+
if (ye >= _) {
|
|
2877
2877
|
k("bottom");
|
|
2878
2878
|
return;
|
|
2879
2879
|
}
|
|
2880
|
-
if (
|
|
2880
|
+
if (fe >= _) {
|
|
2881
2881
|
k("top");
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
2884
|
k("bottom");
|
|
2885
2885
|
};
|
|
2886
|
-
return
|
|
2887
|
-
window.removeEventListener("resize",
|
|
2886
|
+
return x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), () => {
|
|
2887
|
+
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
2888
2888
|
};
|
|
2889
2889
|
}, [S]), J(() => {
|
|
2890
|
-
if (!
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
}, [
|
|
2894
|
-
if (!
|
|
2895
|
-
const
|
|
2896
|
-
F.current?.querySelector(`button[data-year="${
|
|
2897
|
-
}, [
|
|
2898
|
-
const
|
|
2890
|
+
if (!C) return;
|
|
2891
|
+
const x = L.getMonth();
|
|
2892
|
+
G.current?.querySelector(`button[data-month="${x}"]`)?.scrollIntoView({ block: "center" });
|
|
2893
|
+
}, [C, L]), J(() => {
|
|
2894
|
+
if (!z) return;
|
|
2895
|
+
const x = L.getFullYear();
|
|
2896
|
+
F.current?.querySelector(`button[data-year="${x}"]`)?.scrollIntoView({ block: "center" });
|
|
2897
|
+
}, [z, L]);
|
|
2898
|
+
const W = [
|
|
2899
2899
|
"January",
|
|
2900
2900
|
"February",
|
|
2901
2901
|
"March",
|
|
@@ -2908,51 +2908,53 @@ const le = ({
|
|
|
2908
2908
|
"October",
|
|
2909
2909
|
"November",
|
|
2910
2910
|
"December"
|
|
2911
|
-
],
|
|
2912
|
-
const
|
|
2913
|
-
for (let
|
|
2914
|
-
|
|
2915
|
-
for (let
|
|
2916
|
-
|
|
2917
|
-
|
|
2911
|
+
], f = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], q = (x) => {
|
|
2912
|
+
const O = x.getFullYear(), _ = x.getMonth(), ye = new Date(O, _, 1), Se = new Date(O, _ + 1, 0).getDate(), se = ye.getDay(), Be = [];
|
|
2913
|
+
for (let Le = 0; Le < se; Le++)
|
|
2914
|
+
Be.push(null);
|
|
2915
|
+
for (let Le = 1; Le <= Se; Le++)
|
|
2916
|
+
Be.push(new Date(O, _, Le));
|
|
2917
|
+
for (; Be.length % 7 !== 0; )
|
|
2918
|
+
Be.push(null);
|
|
2919
|
+
return Be;
|
|
2918
2920
|
}, Y = () => {
|
|
2919
|
-
|
|
2920
|
-
},
|
|
2921
|
-
|
|
2922
|
-
},
|
|
2923
|
-
|
|
2924
|
-
},
|
|
2925
|
-
|
|
2921
|
+
y(new Date(L.getFullYear(), L.getMonth() - 1, 1));
|
|
2922
|
+
}, $ = () => {
|
|
2923
|
+
y(new Date(L.getFullYear(), L.getMonth() + 1, 1));
|
|
2924
|
+
}, K = (x) => {
|
|
2925
|
+
y(new Date(L.getFullYear(), x, 1)), I(!1);
|
|
2926
|
+
}, Z = (x) => {
|
|
2927
|
+
y(new Date(x, L.getMonth(), 1)), j(!1);
|
|
2926
2928
|
}, ee = () => {
|
|
2927
|
-
if (I(!1), !
|
|
2928
|
-
const
|
|
2929
|
-
h(
|
|
2929
|
+
if (I(!1), !z && w.current) {
|
|
2930
|
+
const x = w.current.getBoundingClientRect(), O = window.innerHeight - x.bottom, _ = x.top;
|
|
2931
|
+
h(O < 220 && _ > O ? "top" : "bottom");
|
|
2930
2932
|
}
|
|
2931
|
-
|
|
2933
|
+
j((x) => !x);
|
|
2932
2934
|
}, pe = () => {
|
|
2933
|
-
if (
|
|
2934
|
-
const
|
|
2935
|
-
|
|
2935
|
+
if (j(!1), !C && P.current) {
|
|
2936
|
+
const x = P.current.getBoundingClientRect(), O = window.innerHeight - x.bottom, _ = x.top;
|
|
2937
|
+
D(O < 220 && _ > O ? "top" : "bottom");
|
|
2936
2938
|
}
|
|
2937
|
-
I((
|
|
2938
|
-
}, be = (
|
|
2939
|
-
r(
|
|
2940
|
-
}, X = (
|
|
2939
|
+
I((x) => !x);
|
|
2940
|
+
}, be = (x) => {
|
|
2941
|
+
r(x), E(!1);
|
|
2942
|
+
}, X = (x) => !!(d && x < d || m && x > m), ve = (x, O) => !x || !O ? !1 : x.getDate() === O.getDate() && x.getMonth() === O.getMonth() && x.getFullYear() === O.getFullYear(), ae = (x) => x ? ve(x, /* @__PURE__ */ new Date()) : !1, ne = (x) => x ? x.toLocaleDateString("en-US", {
|
|
2941
2943
|
year: "numeric",
|
|
2942
2944
|
month: "short",
|
|
2943
2945
|
day: "numeric"
|
|
2944
|
-
}) : "",
|
|
2946
|
+
}) : "", ie = q(L), re = L.getFullYear(), Ce = L.getMonth(), ce = d ? d.getFullYear() : re - 100, me = m ? m.getFullYear() : re + 20, he = Array.from({ length: me - ce + 1 }, (x, O) => ce + O), Re = (x) => {
|
|
2945
2947
|
if (d) {
|
|
2946
|
-
const
|
|
2947
|
-
if (re ===
|
|
2948
|
+
const O = d.getFullYear(), _ = d.getMonth();
|
|
2949
|
+
if (re === O && x < _) return !0;
|
|
2948
2950
|
}
|
|
2949
2951
|
if (m) {
|
|
2950
|
-
const
|
|
2951
|
-
if (re ===
|
|
2952
|
+
const O = m.getFullYear(), _ = m.getMonth();
|
|
2953
|
+
if (re === O && x > _) return !0;
|
|
2952
2954
|
}
|
|
2953
2955
|
return !1;
|
|
2954
|
-
},
|
|
2955
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
2956
|
+
}, He = N === "bottom" ? { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } } : { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } };
|
|
2957
|
+
return /* @__PURE__ */ s("div", { ref: b, className: p("relative w-full", u), children: [
|
|
2956
2958
|
o && /* @__PURE__ */ s("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: [
|
|
2957
2959
|
o,
|
|
2958
2960
|
a && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
@@ -2960,35 +2962,35 @@ const le = ({
|
|
|
2960
2962
|
/* @__PURE__ */ s(
|
|
2961
2963
|
"button",
|
|
2962
2964
|
{
|
|
2963
|
-
ref:
|
|
2965
|
+
ref: T,
|
|
2964
2966
|
type: "button",
|
|
2965
|
-
onClick: () => !c &&
|
|
2967
|
+
onClick: () => !c && E(!S),
|
|
2966
2968
|
disabled: c,
|
|
2967
2969
|
"aria-required": a,
|
|
2968
2970
|
className: p(
|
|
2969
2971
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
2970
2972
|
"bg-background text-left flex items-center justify-between gap-2",
|
|
2971
|
-
"focus:outline-none focus:ring-
|
|
2973
|
+
"focus:outline-none focus:ring-1 focus:ring-primary",
|
|
2972
2974
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
2973
2975
|
"touch-target",
|
|
2974
2976
|
l && "border-error",
|
|
2975
2977
|
!l && "border-border",
|
|
2976
|
-
S && "ring-
|
|
2978
|
+
S && "ring-1 ring-primary"
|
|
2977
2979
|
),
|
|
2978
2980
|
children: [
|
|
2979
2981
|
/* @__PURE__ */ e("span", { className: p("truncate", !t && "text-foreground/50"), children: t ? ne(t) : n }),
|
|
2980
|
-
/* @__PURE__ */ e(
|
|
2982
|
+
/* @__PURE__ */ e(Tt, { className: "w-5 h-5 text-primary shrink-0" })
|
|
2981
2983
|
]
|
|
2982
2984
|
}
|
|
2983
2985
|
),
|
|
2984
|
-
|
|
2986
|
+
v ? /* @__PURE__ */ e(de, { children: S ? /* @__PURE__ */ e(le, { open: S, anchorRef: T, placement: N, matchWidth: !1, children: /* @__PURE__ */ s(
|
|
2985
2987
|
R.div,
|
|
2986
2988
|
{
|
|
2987
|
-
initial:
|
|
2988
|
-
animate:
|
|
2989
|
-
exit:
|
|
2989
|
+
initial: He.initial,
|
|
2990
|
+
animate: He.animate,
|
|
2991
|
+
exit: He.exit,
|
|
2990
2992
|
transition: { duration: 0.2 },
|
|
2991
|
-
className: "z-50 w-
|
|
2993
|
+
className: "z-50 w-72 bg-background rounded-md border border-border shadow-lg p-2.5",
|
|
2992
2994
|
children: [
|
|
2993
2995
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5 border-border mb-3", children: [
|
|
2994
2996
|
/* @__PURE__ */ e(
|
|
@@ -2997,7 +2999,7 @@ const le = ({
|
|
|
2997
2999
|
type: "button",
|
|
2998
3000
|
onClick: Y,
|
|
2999
3001
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3000
|
-
children: /* @__PURE__ */ e(
|
|
3002
|
+
children: /* @__PURE__ */ e(qe, { className: "w-4 h-4 text-primary" })
|
|
3001
3003
|
}
|
|
3002
3004
|
),
|
|
3003
3005
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-center gap-1 min-w-0", children: [
|
|
@@ -3005,48 +3007,48 @@ const le = ({
|
|
|
3005
3007
|
/* @__PURE__ */ s(
|
|
3006
3008
|
"button",
|
|
3007
3009
|
{
|
|
3008
|
-
ref:
|
|
3010
|
+
ref: P,
|
|
3009
3011
|
type: "button",
|
|
3010
3012
|
onClick: pe,
|
|
3011
|
-
className: "h-
|
|
3013
|
+
className: "h-7 w-20 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
3012
3014
|
"aria-label": "Select month",
|
|
3013
3015
|
"aria-haspopup": "listbox",
|
|
3014
|
-
"aria-expanded":
|
|
3016
|
+
"aria-expanded": C,
|
|
3015
3017
|
children: [
|
|
3016
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3017
|
-
/* @__PURE__ */ e(
|
|
3018
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: W[Ce] }),
|
|
3019
|
+
/* @__PURE__ */ e(we, { className: p("w-3 h-3 text-primary transition-transform", C && "rotate-180") })
|
|
3018
3020
|
]
|
|
3019
3021
|
}
|
|
3020
3022
|
),
|
|
3021
|
-
|
|
3023
|
+
C && /* @__PURE__ */ e(
|
|
3022
3024
|
"div",
|
|
3023
3025
|
{
|
|
3024
|
-
ref:
|
|
3026
|
+
ref: G,
|
|
3025
3027
|
role: "listbox",
|
|
3026
3028
|
className: p(
|
|
3027
3029
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3028
|
-
|
|
3030
|
+
V === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3029
3031
|
),
|
|
3030
|
-
children:
|
|
3031
|
-
const
|
|
3032
|
+
children: W.map((x, O) => {
|
|
3033
|
+
const _ = Re(O);
|
|
3032
3034
|
return /* @__PURE__ */ e(
|
|
3033
3035
|
"button",
|
|
3034
3036
|
{
|
|
3035
3037
|
type: "button",
|
|
3036
3038
|
role: "option",
|
|
3037
|
-
"data-month":
|
|
3038
|
-
"aria-selected":
|
|
3039
|
-
onClick: () => !
|
|
3040
|
-
disabled:
|
|
3039
|
+
"data-month": O,
|
|
3040
|
+
"aria-selected": O === Ce,
|
|
3041
|
+
onClick: () => !_ && K(O),
|
|
3042
|
+
disabled: _,
|
|
3041
3043
|
className: p(
|
|
3042
|
-
"w-full px-3 py-2 text-
|
|
3043
|
-
!
|
|
3044
|
-
|
|
3045
|
-
|
|
3044
|
+
"w-full px-3 py-2 text-xs text-left transition-colors",
|
|
3045
|
+
!_ && "hover:bg-secondary",
|
|
3046
|
+
O === Ce && "bg-border text-foreground font-medium",
|
|
3047
|
+
_ && "text-border-dark cursor-not-allowed"
|
|
3046
3048
|
),
|
|
3047
|
-
children:
|
|
3049
|
+
children: x
|
|
3048
3050
|
},
|
|
3049
|
-
|
|
3051
|
+
x
|
|
3050
3052
|
);
|
|
3051
3053
|
})
|
|
3052
3054
|
}
|
|
@@ -3056,43 +3058,43 @@ const le = ({
|
|
|
3056
3058
|
/* @__PURE__ */ s(
|
|
3057
3059
|
"button",
|
|
3058
3060
|
{
|
|
3059
|
-
ref:
|
|
3061
|
+
ref: w,
|
|
3060
3062
|
type: "button",
|
|
3061
3063
|
onClick: ee,
|
|
3062
|
-
className: "h-
|
|
3064
|
+
className: "h-7 w-14 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
3063
3065
|
"aria-label": "Select year",
|
|
3064
3066
|
"aria-haspopup": "listbox",
|
|
3065
|
-
"aria-expanded":
|
|
3067
|
+
"aria-expanded": z,
|
|
3066
3068
|
children: [
|
|
3067
|
-
/* @__PURE__ */ e("span", { children: re }),
|
|
3068
|
-
/* @__PURE__ */ e(
|
|
3069
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: re }),
|
|
3070
|
+
/* @__PURE__ */ e(we, { className: p("w-3 h-3 text-primary transition-transform", z && "rotate-180") })
|
|
3069
3071
|
]
|
|
3070
3072
|
}
|
|
3071
3073
|
),
|
|
3072
|
-
|
|
3074
|
+
z && /* @__PURE__ */ e(
|
|
3073
3075
|
"div",
|
|
3074
3076
|
{
|
|
3075
3077
|
ref: F,
|
|
3076
3078
|
role: "listbox",
|
|
3077
3079
|
className: p(
|
|
3078
3080
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3079
|
-
|
|
3081
|
+
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3080
3082
|
),
|
|
3081
|
-
children: he.map((
|
|
3083
|
+
children: he.map((x) => /* @__PURE__ */ e(
|
|
3082
3084
|
"button",
|
|
3083
3085
|
{
|
|
3084
3086
|
type: "button",
|
|
3085
3087
|
role: "option",
|
|
3086
|
-
"data-year":
|
|
3087
|
-
"aria-selected":
|
|
3088
|
-
onClick: () =>
|
|
3088
|
+
"data-year": x,
|
|
3089
|
+
"aria-selected": x === re,
|
|
3090
|
+
onClick: () => Z(x),
|
|
3089
3091
|
className: p(
|
|
3090
|
-
"w-full px-3 py-2 text-
|
|
3091
|
-
|
|
3092
|
+
"w-full px-3 py-2 text-xs text-left hover:bg-secondary transition-colors",
|
|
3093
|
+
x === re && "bg-border text-foreground font-medium"
|
|
3092
3094
|
),
|
|
3093
|
-
children:
|
|
3095
|
+
children: x
|
|
3094
3096
|
},
|
|
3095
|
-
|
|
3097
|
+
x
|
|
3096
3098
|
))
|
|
3097
3099
|
}
|
|
3098
3100
|
)
|
|
@@ -3102,46 +3104,59 @@ const le = ({
|
|
|
3102
3104
|
"button",
|
|
3103
3105
|
{
|
|
3104
3106
|
type: "button",
|
|
3105
|
-
onClick:
|
|
3107
|
+
onClick: $,
|
|
3106
3108
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3107
|
-
children: /* @__PURE__ */ e(
|
|
3109
|
+
children: /* @__PURE__ */ e(Qe, { className: "w-4 h-4 text-primary" })
|
|
3108
3110
|
}
|
|
3109
3111
|
)
|
|
3110
3112
|
] }),
|
|
3111
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-
|
|
3113
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((x) => /* @__PURE__ */ e(
|
|
3112
3114
|
"div",
|
|
3113
3115
|
{
|
|
3114
|
-
className: "text-center text-[
|
|
3115
|
-
children:
|
|
3116
|
+
className: "text-center text-[10px] font-medium text-foreground/70 py-1",
|
|
3117
|
+
children: x
|
|
3116
3118
|
},
|
|
3117
|
-
|
|
3119
|
+
x
|
|
3118
3120
|
)) }),
|
|
3119
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3121
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((x, O) => {
|
|
3122
|
+
const _ = (O + 1) % 7 === 0, ye = Math.floor(O / 7) === Math.floor((ie.length - 1) / 7);
|
|
3123
|
+
if (!x)
|
|
3124
|
+
return /* @__PURE__ */ e(
|
|
3125
|
+
"div",
|
|
3126
|
+
{
|
|
3127
|
+
className: p(
|
|
3128
|
+
"h-8 bg-background",
|
|
3129
|
+
!_ && "border-r border-border",
|
|
3130
|
+
!ye && "border-b border-border"
|
|
3131
|
+
)
|
|
3132
|
+
},
|
|
3133
|
+
`empty-${O}`
|
|
3134
|
+
);
|
|
3135
|
+
const fe = ve(x, t || null), Se = ae(x), se = X(x);
|
|
3123
3136
|
return /* @__PURE__ */ e(
|
|
3124
3137
|
R.button,
|
|
3125
3138
|
{
|
|
3126
3139
|
type: "button",
|
|
3127
|
-
whileTap:
|
|
3128
|
-
onClick: () => !
|
|
3129
|
-
disabled:
|
|
3140
|
+
whileTap: v ? { scale: se ? 1 : 0.95 } : void 0,
|
|
3141
|
+
onClick: () => !se && be(x),
|
|
3142
|
+
disabled: se,
|
|
3130
3143
|
className: p(
|
|
3131
|
-
"
|
|
3132
|
-
"text-[
|
|
3144
|
+
"h-8 w-full cursor-pointer rounded-none flex items-center justify-center",
|
|
3145
|
+
"text-[10px] font-medium transition-all duration-200",
|
|
3146
|
+
!_ && "border-r border-border",
|
|
3147
|
+
!ye && "border-b border-border",
|
|
3133
3148
|
"hover:bg-secondary",
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
!
|
|
3149
|
+
fe && "bg-primary text-white hover:bg-primary/80",
|
|
3150
|
+
Se && !fe && "border border-primary text-primary",
|
|
3151
|
+
se && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3152
|
+
!fe && !Se && !se && "text-foreground"
|
|
3138
3153
|
),
|
|
3139
|
-
children:
|
|
3154
|
+
children: x.getDate()
|
|
3140
3155
|
},
|
|
3141
|
-
|
|
3156
|
+
x.toISOString()
|
|
3142
3157
|
);
|
|
3143
3158
|
}) }),
|
|
3144
|
-
/* @__PURE__ */ e("div", { className: "mt-1.5
|
|
3159
|
+
/* @__PURE__ */ e("div", { className: "mt-1.5", children: /* @__PURE__ */ e(
|
|
3145
3160
|
"button",
|
|
3146
3161
|
{
|
|
3147
3162
|
type: "button",
|
|
@@ -3152,7 +3167,7 @@ const le = ({
|
|
|
3152
3167
|
) })
|
|
3153
3168
|
]
|
|
3154
3169
|
}
|
|
3155
|
-
) }) : null }) : S && /* @__PURE__ */ e(le, { open: S, anchorRef:
|
|
3170
|
+
) }) : null }) : S && /* @__PURE__ */ e(le, { open: S, anchorRef: T, placement: N, matchWidth: !1, children: /* @__PURE__ */ s("div", { className: "z-50 w-72 bg-background rounded-md border border-border shadow-lg p-2.5", children: [
|
|
3156
3171
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5 mb-3", children: [
|
|
3157
3172
|
/* @__PURE__ */ e(
|
|
3158
3173
|
"button",
|
|
@@ -3160,7 +3175,7 @@ const le = ({
|
|
|
3160
3175
|
type: "button",
|
|
3161
3176
|
onClick: Y,
|
|
3162
3177
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3163
|
-
children: /* @__PURE__ */ e(
|
|
3178
|
+
children: /* @__PURE__ */ e(qe, { className: "w-4 h-4 text-primary" })
|
|
3164
3179
|
}
|
|
3165
3180
|
),
|
|
3166
3181
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-center gap-1 min-w-0", children: [
|
|
@@ -3168,48 +3183,48 @@ const le = ({
|
|
|
3168
3183
|
/* @__PURE__ */ s(
|
|
3169
3184
|
"button",
|
|
3170
3185
|
{
|
|
3171
|
-
ref:
|
|
3186
|
+
ref: P,
|
|
3172
3187
|
type: "button",
|
|
3173
3188
|
onClick: pe,
|
|
3174
|
-
className: "h-
|
|
3189
|
+
className: "h-7 w-20 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
3175
3190
|
"aria-label": "Select month",
|
|
3176
3191
|
"aria-haspopup": "listbox",
|
|
3177
|
-
"aria-expanded":
|
|
3192
|
+
"aria-expanded": C,
|
|
3178
3193
|
children: [
|
|
3179
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3180
|
-
/* @__PURE__ */ e(
|
|
3194
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: W[Ce] }),
|
|
3195
|
+
/* @__PURE__ */ e(we, { className: p("w-3 h-3 text-primary transition-transform", C && "rotate-180") })
|
|
3181
3196
|
]
|
|
3182
3197
|
}
|
|
3183
3198
|
),
|
|
3184
|
-
|
|
3199
|
+
C && /* @__PURE__ */ e(
|
|
3185
3200
|
"div",
|
|
3186
3201
|
{
|
|
3187
|
-
ref:
|
|
3202
|
+
ref: G,
|
|
3188
3203
|
role: "listbox",
|
|
3189
3204
|
className: p(
|
|
3190
3205
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3191
|
-
|
|
3206
|
+
V === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3192
3207
|
),
|
|
3193
|
-
children:
|
|
3194
|
-
const
|
|
3208
|
+
children: W.map((x, O) => {
|
|
3209
|
+
const _ = Re(O);
|
|
3195
3210
|
return /* @__PURE__ */ e(
|
|
3196
3211
|
"button",
|
|
3197
3212
|
{
|
|
3198
3213
|
type: "button",
|
|
3199
3214
|
role: "option",
|
|
3200
|
-
"data-month":
|
|
3201
|
-
"aria-selected":
|
|
3202
|
-
onClick: () => !
|
|
3203
|
-
disabled:
|
|
3215
|
+
"data-month": O,
|
|
3216
|
+
"aria-selected": O === Ce,
|
|
3217
|
+
onClick: () => !_ && K(O),
|
|
3218
|
+
disabled: _,
|
|
3204
3219
|
className: p(
|
|
3205
|
-
"w-full px-3 py-2 text-
|
|
3206
|
-
!
|
|
3207
|
-
|
|
3208
|
-
|
|
3220
|
+
"w-full px-3 py-2 text-xs text-left transition-colors",
|
|
3221
|
+
!_ && "hover:bg-secondary",
|
|
3222
|
+
O === Ce && "bg-border text-foreground font-medium",
|
|
3223
|
+
_ && "text-border-dark cursor-not-allowed"
|
|
3209
3224
|
),
|
|
3210
|
-
children:
|
|
3225
|
+
children: x
|
|
3211
3226
|
},
|
|
3212
|
-
|
|
3227
|
+
x
|
|
3213
3228
|
);
|
|
3214
3229
|
})
|
|
3215
3230
|
}
|
|
@@ -3219,43 +3234,43 @@ const le = ({
|
|
|
3219
3234
|
/* @__PURE__ */ s(
|
|
3220
3235
|
"button",
|
|
3221
3236
|
{
|
|
3222
|
-
ref:
|
|
3237
|
+
ref: w,
|
|
3223
3238
|
type: "button",
|
|
3224
3239
|
onClick: ee,
|
|
3225
|
-
className: "h-
|
|
3240
|
+
className: "h-7 w-14 shrink-0 rounded-md border border-border bg-background px-2 text-[10px] font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary flex items-center justify-between gap-1",
|
|
3226
3241
|
"aria-label": "Select year",
|
|
3227
3242
|
"aria-haspopup": "listbox",
|
|
3228
|
-
"aria-expanded":
|
|
3243
|
+
"aria-expanded": z,
|
|
3229
3244
|
children: [
|
|
3230
|
-
/* @__PURE__ */ e("span", { children: re }),
|
|
3231
|
-
/* @__PURE__ */ e(
|
|
3245
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: re }),
|
|
3246
|
+
/* @__PURE__ */ e(we, { className: p("w-3 h-3 text-primary transition-transform", z && "rotate-180") })
|
|
3232
3247
|
]
|
|
3233
3248
|
}
|
|
3234
3249
|
),
|
|
3235
|
-
|
|
3250
|
+
z && /* @__PURE__ */ e(
|
|
3236
3251
|
"div",
|
|
3237
3252
|
{
|
|
3238
3253
|
ref: F,
|
|
3239
3254
|
role: "listbox",
|
|
3240
3255
|
className: p(
|
|
3241
3256
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3242
|
-
|
|
3257
|
+
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3243
3258
|
),
|
|
3244
|
-
children: he.map((
|
|
3259
|
+
children: he.map((x) => /* @__PURE__ */ e(
|
|
3245
3260
|
"button",
|
|
3246
3261
|
{
|
|
3247
3262
|
type: "button",
|
|
3248
3263
|
role: "option",
|
|
3249
|
-
"data-year":
|
|
3250
|
-
"aria-selected":
|
|
3251
|
-
onClick: () =>
|
|
3264
|
+
"data-year": x,
|
|
3265
|
+
"aria-selected": x === re,
|
|
3266
|
+
onClick: () => Z(x),
|
|
3252
3267
|
className: p(
|
|
3253
|
-
"w-full px-3 py-2 text-
|
|
3254
|
-
|
|
3268
|
+
"w-full px-3 py-2 text-xs text-left hover:bg-secondary transition-colors",
|
|
3269
|
+
x === re && "bg-border text-foreground font-medium"
|
|
3255
3270
|
),
|
|
3256
|
-
children:
|
|
3271
|
+
children: x
|
|
3257
3272
|
},
|
|
3258
|
-
|
|
3273
|
+
x
|
|
3259
3274
|
))
|
|
3260
3275
|
}
|
|
3261
3276
|
)
|
|
@@ -3265,45 +3280,58 @@ const le = ({
|
|
|
3265
3280
|
"button",
|
|
3266
3281
|
{
|
|
3267
3282
|
type: "button",
|
|
3268
|
-
onClick:
|
|
3283
|
+
onClick: $,
|
|
3269
3284
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3270
|
-
children: /* @__PURE__ */ e(
|
|
3285
|
+
children: /* @__PURE__ */ e(Qe, { className: "w-4 h-4 text-primary" })
|
|
3271
3286
|
}
|
|
3272
3287
|
)
|
|
3273
3288
|
] }),
|
|
3274
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-
|
|
3289
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 mb-1", children: f.map((x) => /* @__PURE__ */ e(
|
|
3275
3290
|
"div",
|
|
3276
3291
|
{
|
|
3277
|
-
className: "text-center text-[
|
|
3278
|
-
children:
|
|
3292
|
+
className: "text-center text-[10px] font-medium text-primary/70 py-1",
|
|
3293
|
+
children: x
|
|
3279
3294
|
},
|
|
3280
|
-
|
|
3295
|
+
x
|
|
3281
3296
|
)) }),
|
|
3282
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3297
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-0 border border-border rounded-md overflow-hidden", children: ie.map((x, O) => {
|
|
3298
|
+
const _ = (O + 1) % 7 === 0, ye = Math.floor(O / 7) === Math.floor((ie.length - 1) / 7);
|
|
3299
|
+
if (!x)
|
|
3300
|
+
return /* @__PURE__ */ e(
|
|
3301
|
+
"div",
|
|
3302
|
+
{
|
|
3303
|
+
className: p(
|
|
3304
|
+
"h-8 bg-background",
|
|
3305
|
+
!_ && "border-r border-border",
|
|
3306
|
+
!ye && "border-b border-border"
|
|
3307
|
+
)
|
|
3308
|
+
},
|
|
3309
|
+
`empty-${O}`
|
|
3310
|
+
);
|
|
3311
|
+
const fe = ve(x, t || null), Se = ae(x), se = X(x);
|
|
3286
3312
|
return /* @__PURE__ */ e(
|
|
3287
3313
|
"button",
|
|
3288
3314
|
{
|
|
3289
3315
|
type: "button",
|
|
3290
|
-
onClick: () => !
|
|
3291
|
-
disabled:
|
|
3316
|
+
onClick: () => !se && be(x),
|
|
3317
|
+
disabled: se,
|
|
3292
3318
|
className: p(
|
|
3293
|
-
"
|
|
3294
|
-
"text-[
|
|
3319
|
+
"h-8 w-full rounded-none flex items-center justify-center",
|
|
3320
|
+
"text-[10px] font-medium transition-all duration-200",
|
|
3321
|
+
!_ && "border-r border-border",
|
|
3322
|
+
!ye && "border-b border-border",
|
|
3295
3323
|
"hover:bg-secondary",
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
!
|
|
3324
|
+
fe && "bg-primary text-white hover:bg-primary/80",
|
|
3325
|
+
Se && !fe && "border border-primary text-primary",
|
|
3326
|
+
se && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3327
|
+
!fe && !Se && !se && "text-foreground"
|
|
3300
3328
|
),
|
|
3301
|
-
children:
|
|
3329
|
+
children: x.getDate()
|
|
3302
3330
|
},
|
|
3303
|
-
|
|
3331
|
+
x.toISOString()
|
|
3304
3332
|
);
|
|
3305
3333
|
}) }),
|
|
3306
|
-
/* @__PURE__ */ e("div", { className: "mt-1.5 pt-1.5
|
|
3334
|
+
/* @__PURE__ */ e("div", { className: "mt-1.5 pt-1.5", children: /* @__PURE__ */ e(
|
|
3307
3335
|
"button",
|
|
3308
3336
|
{
|
|
3309
3337
|
type: "button",
|
|
@@ -3316,7 +3344,7 @@ const le = ({
|
|
|
3316
3344
|
l && /* @__PURE__ */ e(
|
|
3317
3345
|
R.p,
|
|
3318
3346
|
{
|
|
3319
|
-
...
|
|
3347
|
+
...v ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3320
3348
|
className: "mt-1.5 text-sm text-error",
|
|
3321
3349
|
children: l
|
|
3322
3350
|
}
|
|
@@ -3566,10 +3594,10 @@ const le = ({
|
|
|
3566
3594
|
{ iso2: "YE", name: "Yemen", dialCode: "+967" },
|
|
3567
3595
|
{ iso2: "ZM", name: "Zambia", dialCode: "+260" },
|
|
3568
3596
|
{ iso2: "ZW", name: "Zimbabwe", dialCode: "+263" }
|
|
3569
|
-
],
|
|
3597
|
+
], Ke = (t) => {
|
|
3570
3598
|
const r = t.toUpperCase().split("").map((o) => 127397 + o.charCodeAt(0));
|
|
3571
3599
|
return String.fromCodePoint(...r);
|
|
3572
|
-
},
|
|
3600
|
+
}, St = ({
|
|
3573
3601
|
value: t,
|
|
3574
3602
|
onChange: r,
|
|
3575
3603
|
onCountryChange: o,
|
|
@@ -3582,49 +3610,49 @@ const le = ({
|
|
|
3582
3610
|
clearable: m = !0,
|
|
3583
3611
|
showFlags: u = !0,
|
|
3584
3612
|
disabled: g,
|
|
3585
|
-
animate:
|
|
3613
|
+
animate: v = !0,
|
|
3586
3614
|
className: S
|
|
3587
3615
|
}) => {
|
|
3588
|
-
const
|
|
3589
|
-
if (!d || !
|
|
3590
|
-
const
|
|
3591
|
-
return ue.filter((
|
|
3592
|
-
}, [
|
|
3616
|
+
const E = v !== !1, [N, k] = U(!1), [C, I] = U(""), [V, D] = U("bottom"), z = Q(null), j = Q(null), B = Ae(() => ue.find((b) => b.iso2 === t), [t]), h = Ae(() => {
|
|
3617
|
+
if (!d || !C.trim()) return ue;
|
|
3618
|
+
const b = C.toLowerCase();
|
|
3619
|
+
return ue.filter((T) => T.name.toLowerCase().includes(b) || T.iso2.toLowerCase().includes(b) || T.dialCode.replace(/\s/g, "").includes(b.replace(/\s/g, "")));
|
|
3620
|
+
}, [C, d]);
|
|
3593
3621
|
J(() => {
|
|
3594
|
-
const
|
|
3595
|
-
|
|
3622
|
+
const b = (T) => {
|
|
3623
|
+
z.current && !z.current.contains(T.target) && (k(!1), I(""));
|
|
3596
3624
|
};
|
|
3597
|
-
return document.addEventListener("mousedown",
|
|
3625
|
+
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
3598
3626
|
}, []), J(() => {
|
|
3599
3627
|
if (!N) return;
|
|
3600
|
-
const
|
|
3601
|
-
if (!
|
|
3602
|
-
const
|
|
3603
|
-
if (
|
|
3604
|
-
|
|
3628
|
+
const b = () => {
|
|
3629
|
+
if (!j.current) return;
|
|
3630
|
+
const T = j.current.getBoundingClientRect(), P = d ? 360 : 300, G = window.innerHeight - T.bottom - 8, w = T.top - 8;
|
|
3631
|
+
if (G >= P) {
|
|
3632
|
+
D("bottom");
|
|
3605
3633
|
return;
|
|
3606
3634
|
}
|
|
3607
|
-
if (
|
|
3608
|
-
|
|
3635
|
+
if (w >= P) {
|
|
3636
|
+
D("top");
|
|
3609
3637
|
return;
|
|
3610
3638
|
}
|
|
3611
|
-
|
|
3639
|
+
D("bottom");
|
|
3612
3640
|
};
|
|
3613
|
-
return
|
|
3614
|
-
window.removeEventListener("resize",
|
|
3641
|
+
return b(), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0), () => {
|
|
3642
|
+
window.removeEventListener("resize", b), window.removeEventListener("scroll", b, !0);
|
|
3615
3643
|
};
|
|
3616
3644
|
}, [N, d]);
|
|
3617
|
-
const
|
|
3618
|
-
r?.(
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3621
|
-
},
|
|
3622
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
3645
|
+
const L = (b) => {
|
|
3646
|
+
r?.(b);
|
|
3647
|
+
const T = ue.find((P) => P.iso2 === b);
|
|
3648
|
+
T && o?.(T), k(!1), I("");
|
|
3649
|
+
}, y = V === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
3650
|
+
return /* @__PURE__ */ s("div", { ref: z, className: p("w-full space-y-1.5", S), children: [
|
|
3623
3651
|
a && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3624
3652
|
a,
|
|
3625
3653
|
n && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
3626
3654
|
] }),
|
|
3627
|
-
/* @__PURE__ */ s("div", { ref:
|
|
3655
|
+
/* @__PURE__ */ s("div", { ref: j, className: "relative", children: [
|
|
3628
3656
|
/* @__PURE__ */ s(
|
|
3629
3657
|
"button",
|
|
3630
3658
|
{
|
|
@@ -3647,11 +3675,11 @@ const le = ({
|
|
|
3647
3675
|
),
|
|
3648
3676
|
children: [
|
|
3649
3677
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
3650
|
-
u &&
|
|
3651
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
3678
|
+
u && B && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: Ke(B.iso2) }),
|
|
3679
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !B && "text-foreground/50"), children: B ? B.name : l })
|
|
3652
3680
|
] }),
|
|
3653
3681
|
/* @__PURE__ */ e(
|
|
3654
|
-
|
|
3682
|
+
we,
|
|
3655
3683
|
{
|
|
3656
3684
|
className: p(
|
|
3657
3685
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
@@ -3662,29 +3690,29 @@ const le = ({
|
|
|
3662
3690
|
]
|
|
3663
3691
|
}
|
|
3664
3692
|
),
|
|
3665
|
-
|
|
3693
|
+
E ? /* @__PURE__ */ e(de, { children: N ? /* @__PURE__ */ e(le, { open: N, anchorRef: j, placement: V, children: /* @__PURE__ */ s(
|
|
3666
3694
|
R.div,
|
|
3667
3695
|
{
|
|
3668
|
-
initial:
|
|
3669
|
-
animate:
|
|
3670
|
-
exit:
|
|
3696
|
+
initial: y.initial,
|
|
3697
|
+
animate: y.animate,
|
|
3698
|
+
exit: y.exit,
|
|
3671
3699
|
transition: { duration: 0.2 },
|
|
3672
3700
|
role: "listbox",
|
|
3673
3701
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
3674
3702
|
children: [
|
|
3675
3703
|
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
3676
|
-
/* @__PURE__ */ e(
|
|
3704
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3677
3705
|
/* @__PURE__ */ e(
|
|
3678
3706
|
"input",
|
|
3679
3707
|
{
|
|
3680
3708
|
type: "text",
|
|
3681
3709
|
placeholder: "Search country or code",
|
|
3682
|
-
value:
|
|
3683
|
-
onChange: (
|
|
3710
|
+
value: C,
|
|
3711
|
+
onChange: (b) => I(b.target.value),
|
|
3684
3712
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
3685
3713
|
}
|
|
3686
3714
|
),
|
|
3687
|
-
|
|
3715
|
+
C && /* @__PURE__ */ e(
|
|
3688
3716
|
"button",
|
|
3689
3717
|
{
|
|
3690
3718
|
type: "button",
|
|
@@ -3702,7 +3730,7 @@ const le = ({
|
|
|
3702
3730
|
type: "button",
|
|
3703
3731
|
role: "option",
|
|
3704
3732
|
"aria-selected": !t,
|
|
3705
|
-
onClick: () =>
|
|
3733
|
+
onClick: () => L(""),
|
|
3706
3734
|
className: p(
|
|
3707
3735
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3708
3736
|
"hover:bg-secondary transition-colors",
|
|
@@ -3712,48 +3740,48 @@ const le = ({
|
|
|
3712
3740
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
3713
3741
|
}
|
|
3714
3742
|
),
|
|
3715
|
-
h.map((
|
|
3743
|
+
h.map((b) => /* @__PURE__ */ s(
|
|
3716
3744
|
"button",
|
|
3717
3745
|
{
|
|
3718
3746
|
type: "button",
|
|
3719
3747
|
role: "option",
|
|
3720
|
-
"aria-selected":
|
|
3721
|
-
onClick: () =>
|
|
3748
|
+
"aria-selected": b.iso2 === B?.iso2,
|
|
3749
|
+
onClick: () => L(b.iso2),
|
|
3722
3750
|
className: p(
|
|
3723
3751
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3724
3752
|
"hover:bg-secondary transition-colors",
|
|
3725
|
-
|
|
3753
|
+
b.iso2 === B?.iso2 && "bg-border text-foreground"
|
|
3726
3754
|
),
|
|
3727
3755
|
children: [
|
|
3728
|
-
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children:
|
|
3729
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children:
|
|
3730
|
-
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children:
|
|
3756
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: Ke(b.iso2) }),
|
|
3757
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: b.name }),
|
|
3758
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: b.dialCode })
|
|
3731
3759
|
]
|
|
3732
3760
|
},
|
|
3733
|
-
|
|
3761
|
+
b.iso2
|
|
3734
3762
|
))
|
|
3735
3763
|
] })
|
|
3736
3764
|
]
|
|
3737
3765
|
}
|
|
3738
|
-
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef:
|
|
3766
|
+
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef: j, placement: V, children: /* @__PURE__ */ s(
|
|
3739
3767
|
"div",
|
|
3740
3768
|
{
|
|
3741
3769
|
role: "listbox",
|
|
3742
3770
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
3743
3771
|
children: [
|
|
3744
3772
|
d && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
3745
|
-
/* @__PURE__ */ e(
|
|
3773
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3746
3774
|
/* @__PURE__ */ e(
|
|
3747
3775
|
"input",
|
|
3748
3776
|
{
|
|
3749
3777
|
type: "text",
|
|
3750
3778
|
placeholder: "Search country or code",
|
|
3751
|
-
value:
|
|
3752
|
-
onChange: (
|
|
3779
|
+
value: C,
|
|
3780
|
+
onChange: (b) => I(b.target.value),
|
|
3753
3781
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
3754
3782
|
}
|
|
3755
3783
|
),
|
|
3756
|
-
|
|
3784
|
+
C && /* @__PURE__ */ e(
|
|
3757
3785
|
"button",
|
|
3758
3786
|
{
|
|
3759
3787
|
type: "button",
|
|
@@ -3771,7 +3799,7 @@ const le = ({
|
|
|
3771
3799
|
type: "button",
|
|
3772
3800
|
role: "option",
|
|
3773
3801
|
"aria-selected": !t,
|
|
3774
|
-
onClick: () =>
|
|
3802
|
+
onClick: () => L(""),
|
|
3775
3803
|
className: p(
|
|
3776
3804
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3777
3805
|
"hover:bg-secondary transition-colors",
|
|
@@ -3781,25 +3809,25 @@ const le = ({
|
|
|
3781
3809
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
3782
3810
|
}
|
|
3783
3811
|
),
|
|
3784
|
-
h.map((
|
|
3812
|
+
h.map((b) => /* @__PURE__ */ s(
|
|
3785
3813
|
"button",
|
|
3786
3814
|
{
|
|
3787
3815
|
type: "button",
|
|
3788
3816
|
role: "option",
|
|
3789
|
-
"aria-selected":
|
|
3790
|
-
onClick: () =>
|
|
3817
|
+
"aria-selected": b.iso2 === B?.iso2,
|
|
3818
|
+
onClick: () => L(b.iso2),
|
|
3791
3819
|
className: p(
|
|
3792
3820
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3793
3821
|
"hover:bg-secondary transition-colors",
|
|
3794
|
-
|
|
3822
|
+
b.iso2 === B?.iso2 && "bg-border text-foreground"
|
|
3795
3823
|
),
|
|
3796
3824
|
children: [
|
|
3797
|
-
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children:
|
|
3798
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children:
|
|
3799
|
-
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children:
|
|
3825
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: Ke(b.iso2) }),
|
|
3826
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: b.name }),
|
|
3827
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: b.dialCode })
|
|
3800
3828
|
]
|
|
3801
3829
|
},
|
|
3802
|
-
|
|
3830
|
+
b.iso2
|
|
3803
3831
|
))
|
|
3804
3832
|
] })
|
|
3805
3833
|
]
|
|
@@ -3809,7 +3837,7 @@ const le = ({
|
|
|
3809
3837
|
i && /* @__PURE__ */ e(
|
|
3810
3838
|
R.p,
|
|
3811
3839
|
{
|
|
3812
|
-
...
|
|
3840
|
+
...E ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3813
3841
|
className: "text-sm text-error",
|
|
3814
3842
|
children: i
|
|
3815
3843
|
}
|
|
@@ -3817,28 +3845,30 @@ const le = ({
|
|
|
3817
3845
|
c && !i && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: c })
|
|
3818
3846
|
] });
|
|
3819
3847
|
};
|
|
3820
|
-
|
|
3821
|
-
const
|
|
3848
|
+
St.displayName = "CountrySelect";
|
|
3849
|
+
const _e = (t) => {
|
|
3822
3850
|
const r = t.toUpperCase().split("").map((o) => 127397 + o.charCodeAt(0));
|
|
3823
3851
|
return String.fromCodePoint(...r);
|
|
3824
3852
|
}, Or = () => {
|
|
3825
3853
|
if (typeof navigator > "u") return null;
|
|
3826
3854
|
const r = (navigator.language || "").match(/[-_](\w{2})$/);
|
|
3827
3855
|
return r ? r[1].toUpperCase() : null;
|
|
3828
|
-
},
|
|
3829
|
-
const
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3856
|
+
}, Oe = (t) => t.replace(/\s/g, ""), Je = (t, r) => {
|
|
3857
|
+
const o = t.replace(/\s/g, ""), a = o.startsWith("00") ? `+${o.slice(2)}` : o;
|
|
3858
|
+
if (!a.startsWith("+")) return;
|
|
3859
|
+
const n = ue.filter((i) => {
|
|
3860
|
+
const c = Oe(i.dialCode);
|
|
3861
|
+
return a.startsWith(c);
|
|
3862
|
+
}), l = r ? n.find((i) => i.iso2 === r.toUpperCase()) : void 0;
|
|
3863
|
+
return l || [...n].sort(
|
|
3864
|
+
(i, c) => Oe(c.dialCode).length - Oe(i.dialCode).length
|
|
3865
|
+
)[0];
|
|
3866
|
+
}, Mt = ({
|
|
3837
3867
|
value: t,
|
|
3838
3868
|
onChange: r,
|
|
3839
3869
|
country: o,
|
|
3840
|
-
defaultCountry: a = "
|
|
3841
|
-
autoDetect: n = !
|
|
3870
|
+
defaultCountry: a = "KE",
|
|
3871
|
+
autoDetect: n = !1,
|
|
3842
3872
|
onCountryChange: l,
|
|
3843
3873
|
label: i,
|
|
3844
3874
|
error: c,
|
|
@@ -3846,78 +3876,78 @@ const We = (t) => {
|
|
|
3846
3876
|
searchable: m = !0,
|
|
3847
3877
|
showFlags: u = !0,
|
|
3848
3878
|
animate: g = !0,
|
|
3849
|
-
disabled:
|
|
3879
|
+
disabled: v,
|
|
3850
3880
|
required: S,
|
|
3851
|
-
className:
|
|
3881
|
+
className: E,
|
|
3852
3882
|
placeholder: N,
|
|
3853
3883
|
...k
|
|
3854
3884
|
}) => {
|
|
3855
|
-
const
|
|
3885
|
+
const C = g !== !1, [I, V] = U(!1), [D, z] = U(""), [j, B] = U(a), [h, L] = U("bottom"), y = Q(null), b = Q(null), T = Q(null), P = Q(!1);
|
|
3856
3886
|
J(() => {
|
|
3857
|
-
o &&
|
|
3887
|
+
o && B(o.toUpperCase());
|
|
3858
3888
|
}, [o]), J(() => {
|
|
3859
3889
|
if (!o && n) {
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3890
|
+
const f = Or();
|
|
3891
|
+
f && B(f);
|
|
3862
3892
|
}
|
|
3863
3893
|
}, [n, o]), J(() => {
|
|
3864
|
-
const
|
|
3865
|
-
|
|
3894
|
+
const f = (q) => {
|
|
3895
|
+
y.current && !y.current.contains(q.target) && (V(!1), z(""));
|
|
3866
3896
|
};
|
|
3867
|
-
return document.addEventListener("mousedown",
|
|
3897
|
+
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
3868
3898
|
}, []);
|
|
3869
|
-
const
|
|
3870
|
-
const
|
|
3899
|
+
const G = Ae(() => {
|
|
3900
|
+
const f = t ? Je(t, o || j) : void 0;
|
|
3871
3901
|
if (o)
|
|
3872
|
-
return ue.find((
|
|
3873
|
-
if (
|
|
3874
|
-
return
|
|
3875
|
-
const
|
|
3876
|
-
return ue.find((Y) => Y.iso2 ===
|
|
3877
|
-
}, [o,
|
|
3902
|
+
return ue.find(($) => $.iso2 === o.toUpperCase()) || f || ue[0];
|
|
3903
|
+
if (f)
|
|
3904
|
+
return f;
|
|
3905
|
+
const q = (j || a).toUpperCase();
|
|
3906
|
+
return ue.find((Y) => Y.iso2 === q) || ue[0];
|
|
3907
|
+
}, [o, j, a, t]);
|
|
3878
3908
|
J(() => {
|
|
3879
3909
|
if (o || !t) return;
|
|
3880
|
-
const
|
|
3881
|
-
|
|
3882
|
-
}, [o, t,
|
|
3883
|
-
|
|
3884
|
-
}, [
|
|
3885
|
-
|
|
3886
|
-
}, [r,
|
|
3910
|
+
const f = Je(t, j);
|
|
3911
|
+
f && f.iso2 !== j && B(f.iso2);
|
|
3912
|
+
}, [o, t, j]), J(() => {
|
|
3913
|
+
G && T.current !== G.iso2 && (T.current = G.iso2, l?.(G));
|
|
3914
|
+
}, [G, l]), J(() => {
|
|
3915
|
+
P.current || r && (t ?? "").trim() === "" && (P.current = !0, r(G.dialCode));
|
|
3916
|
+
}, [r, G.dialCode, t]), J(() => {
|
|
3887
3917
|
if (!I) return;
|
|
3888
|
-
const
|
|
3889
|
-
if (!
|
|
3890
|
-
const
|
|
3891
|
-
if (
|
|
3892
|
-
|
|
3918
|
+
const f = () => {
|
|
3919
|
+
if (!b.current) return;
|
|
3920
|
+
const q = b.current.getBoundingClientRect(), Y = m ? 360 : 300, $ = window.innerHeight - q.bottom - 8, K = q.top - 8;
|
|
3921
|
+
if ($ >= Y) {
|
|
3922
|
+
L("bottom");
|
|
3893
3923
|
return;
|
|
3894
3924
|
}
|
|
3895
|
-
if (
|
|
3896
|
-
|
|
3925
|
+
if (K >= Y) {
|
|
3926
|
+
L("top");
|
|
3897
3927
|
return;
|
|
3898
3928
|
}
|
|
3899
|
-
|
|
3929
|
+
L("bottom");
|
|
3900
3930
|
};
|
|
3901
|
-
return
|
|
3902
|
-
window.removeEventListener("resize",
|
|
3931
|
+
return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
|
|
3932
|
+
window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
|
|
3903
3933
|
};
|
|
3904
3934
|
}, [I, m]);
|
|
3905
|
-
const
|
|
3906
|
-
if (!m || !
|
|
3907
|
-
const
|
|
3908
|
-
return ue.filter((
|
|
3909
|
-
}, [
|
|
3910
|
-
o ||
|
|
3911
|
-
const
|
|
3912
|
-
let
|
|
3913
|
-
|
|
3914
|
-
},
|
|
3915
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
3935
|
+
const w = Ae(() => {
|
|
3936
|
+
if (!m || !D.trim()) return ue;
|
|
3937
|
+
const f = D.toLowerCase();
|
|
3938
|
+
return ue.filter((q) => q.name.toLowerCase().includes(f) || q.iso2.toLowerCase().includes(f) || q.dialCode.replace(/\s/g, "").includes(f.replace(/\s/g, "")));
|
|
3939
|
+
}, [D, m]), F = (f) => {
|
|
3940
|
+
o || B(f.iso2), l?.(f);
|
|
3941
|
+
const q = (t ?? "").replace(/\s/g, ""), Y = Je(q, o || j), $ = Y ? Oe(Y.dialCode) : "";
|
|
3942
|
+
let K = f.dialCode;
|
|
3943
|
+
q && ($ && q.startsWith($) ? K = `${f.dialCode}${q.slice($.length)}` : q.startsWith("+") ? K = `${f.dialCode}${q.replace(/^\+[\d-]*/, "")}` : K = `${f.dialCode}${q}`), r?.(K), V(!1), z("");
|
|
3944
|
+
}, W = h === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
3945
|
+
return /* @__PURE__ */ s("div", { ref: y, className: p("w-full space-y-1.5", E), children: [
|
|
3916
3946
|
i && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3917
3947
|
i,
|
|
3918
3948
|
S && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
3919
3949
|
] }),
|
|
3920
|
-
/* @__PURE__ */ s("div", { ref:
|
|
3950
|
+
/* @__PURE__ */ s("div", { ref: b, className: "relative", children: [
|
|
3921
3951
|
/* @__PURE__ */ s(
|
|
3922
3952
|
"div",
|
|
3923
3953
|
{
|
|
@@ -3932,8 +3962,8 @@ const We = (t) => {
|
|
|
3932
3962
|
"button",
|
|
3933
3963
|
{
|
|
3934
3964
|
type: "button",
|
|
3935
|
-
onClick: () => !
|
|
3936
|
-
disabled:
|
|
3965
|
+
onClick: () => !v && V(!I),
|
|
3966
|
+
disabled: v,
|
|
3937
3967
|
className: p(
|
|
3938
3968
|
"flex items-center gap-2 px-3 py-2 text-left",
|
|
3939
3969
|
"border-r border-border/70",
|
|
@@ -3943,10 +3973,10 @@ const We = (t) => {
|
|
|
3943
3973
|
"aria-haspopup": "listbox",
|
|
3944
3974
|
"aria-expanded": I,
|
|
3945
3975
|
children: [
|
|
3946
|
-
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children:
|
|
3947
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children:
|
|
3976
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: _e(G.iso2) }),
|
|
3977
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G.iso2 }),
|
|
3948
3978
|
/* @__PURE__ */ e(
|
|
3949
|
-
|
|
3979
|
+
we,
|
|
3950
3980
|
{
|
|
3951
3981
|
className: p(
|
|
3952
3982
|
"w-4 h-4 text-primary transition-transform",
|
|
@@ -3963,9 +3993,9 @@ const We = (t) => {
|
|
|
3963
3993
|
type: "tel",
|
|
3964
3994
|
inputMode: "tel",
|
|
3965
3995
|
value: t ?? "",
|
|
3966
|
-
onChange: (
|
|
3967
|
-
placeholder: N || `${
|
|
3968
|
-
disabled:
|
|
3996
|
+
onChange: (f) => r?.(f.target.value),
|
|
3997
|
+
placeholder: N || `${G.dialCode} Phone number`,
|
|
3998
|
+
disabled: v,
|
|
3969
3999
|
required: S,
|
|
3970
4000
|
className: p(
|
|
3971
4001
|
"flex-1 px-4 py-2.5 text-base bg-transparent text-foreground",
|
|
@@ -3978,109 +4008,109 @@ const We = (t) => {
|
|
|
3978
4008
|
]
|
|
3979
4009
|
}
|
|
3980
4010
|
),
|
|
3981
|
-
|
|
4011
|
+
C ? /* @__PURE__ */ e(de, { children: I ? /* @__PURE__ */ e(le, { open: I, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
3982
4012
|
R.div,
|
|
3983
4013
|
{
|
|
3984
|
-
initial:
|
|
3985
|
-
animate:
|
|
3986
|
-
exit:
|
|
4014
|
+
initial: W.initial,
|
|
4015
|
+
animate: W.animate,
|
|
4016
|
+
exit: W.exit,
|
|
3987
4017
|
transition: { duration: 0.2 },
|
|
3988
4018
|
role: "listbox",
|
|
3989
4019
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
3990
4020
|
children: [
|
|
3991
4021
|
m && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
3992
|
-
/* @__PURE__ */ e(
|
|
4022
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
3993
4023
|
/* @__PURE__ */ e(
|
|
3994
4024
|
"input",
|
|
3995
4025
|
{
|
|
3996
4026
|
type: "text",
|
|
3997
4027
|
placeholder: "Search country or code",
|
|
3998
|
-
value:
|
|
3999
|
-
onChange: (
|
|
4028
|
+
value: D,
|
|
4029
|
+
onChange: (f) => z(f.target.value),
|
|
4000
4030
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4001
4031
|
}
|
|
4002
4032
|
),
|
|
4003
|
-
|
|
4033
|
+
D && /* @__PURE__ */ e(
|
|
4004
4034
|
"button",
|
|
4005
4035
|
{
|
|
4006
4036
|
type: "button",
|
|
4007
|
-
onClick: () =>
|
|
4037
|
+
onClick: () => z(""),
|
|
4008
4038
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4009
4039
|
"aria-label": "Clear search",
|
|
4010
4040
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
4011
4041
|
}
|
|
4012
4042
|
)
|
|
4013
4043
|
] }) }),
|
|
4014
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4044
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: w.map((f) => /* @__PURE__ */ s(
|
|
4015
4045
|
"button",
|
|
4016
4046
|
{
|
|
4017
4047
|
type: "button",
|
|
4018
4048
|
role: "option",
|
|
4019
|
-
"aria-selected":
|
|
4020
|
-
onClick: () => F(
|
|
4049
|
+
"aria-selected": f.iso2 === G.iso2,
|
|
4050
|
+
onClick: () => F(f),
|
|
4021
4051
|
className: p(
|
|
4022
4052
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
4023
4053
|
"hover:bg-secondary transition-colors",
|
|
4024
|
-
|
|
4054
|
+
f.iso2 === G.iso2 && "bg-border text-foreground"
|
|
4025
4055
|
),
|
|
4026
4056
|
children: [
|
|
4027
|
-
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children:
|
|
4028
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children:
|
|
4029
|
-
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children:
|
|
4057
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: _e(f.iso2) }),
|
|
4058
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: f.name }),
|
|
4059
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: f.dialCode })
|
|
4030
4060
|
]
|
|
4031
4061
|
},
|
|
4032
|
-
|
|
4062
|
+
f.iso2
|
|
4033
4063
|
)) })
|
|
4034
4064
|
]
|
|
4035
4065
|
}
|
|
4036
|
-
) }) : null }) : I && /* @__PURE__ */ e(le, { open: I, anchorRef:
|
|
4066
|
+
) }) : null }) : I && /* @__PURE__ */ e(le, { open: I, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
4037
4067
|
"div",
|
|
4038
4068
|
{
|
|
4039
4069
|
role: "listbox",
|
|
4040
4070
|
className: "z-50 w-full max-w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden overflow-x-hidden",
|
|
4041
4071
|
children: [
|
|
4042
4072
|
m && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4043
|
-
/* @__PURE__ */ e(
|
|
4073
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4044
4074
|
/* @__PURE__ */ e(
|
|
4045
4075
|
"input",
|
|
4046
4076
|
{
|
|
4047
4077
|
type: "text",
|
|
4048
4078
|
placeholder: "Search country or code",
|
|
4049
|
-
value:
|
|
4050
|
-
onChange: (
|
|
4079
|
+
value: D,
|
|
4080
|
+
onChange: (f) => z(f.target.value),
|
|
4051
4081
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4052
4082
|
}
|
|
4053
4083
|
),
|
|
4054
|
-
|
|
4084
|
+
D && /* @__PURE__ */ e(
|
|
4055
4085
|
"button",
|
|
4056
4086
|
{
|
|
4057
4087
|
type: "button",
|
|
4058
|
-
onClick: () =>
|
|
4088
|
+
onClick: () => z(""),
|
|
4059
4089
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4060
4090
|
"aria-label": "Clear search",
|
|
4061
4091
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
4062
4092
|
}
|
|
4063
4093
|
)
|
|
4064
4094
|
] }) }),
|
|
4065
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4095
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: w.map((f) => /* @__PURE__ */ s(
|
|
4066
4096
|
"button",
|
|
4067
4097
|
{
|
|
4068
4098
|
type: "button",
|
|
4069
4099
|
role: "option",
|
|
4070
|
-
"aria-selected":
|
|
4071
|
-
onClick: () => F(
|
|
4100
|
+
"aria-selected": f.iso2 === G.iso2,
|
|
4101
|
+
onClick: () => F(f),
|
|
4072
4102
|
className: p(
|
|
4073
4103
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
4074
4104
|
"hover:bg-secondary transition-colors",
|
|
4075
|
-
|
|
4105
|
+
f.iso2 === G.iso2 && "bg-border text-foreground"
|
|
4076
4106
|
),
|
|
4077
4107
|
children: [
|
|
4078
|
-
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children:
|
|
4079
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children:
|
|
4080
|
-
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children:
|
|
4108
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: _e(f.iso2) }),
|
|
4109
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: f.name }),
|
|
4110
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: f.dialCode })
|
|
4081
4111
|
]
|
|
4082
4112
|
},
|
|
4083
|
-
|
|
4113
|
+
f.iso2
|
|
4084
4114
|
)) })
|
|
4085
4115
|
]
|
|
4086
4116
|
}
|
|
@@ -4089,7 +4119,7 @@ const We = (t) => {
|
|
|
4089
4119
|
c && /* @__PURE__ */ e(
|
|
4090
4120
|
R.p,
|
|
4091
4121
|
{
|
|
4092
|
-
...
|
|
4122
|
+
...C ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4093
4123
|
className: "text-sm text-error",
|
|
4094
4124
|
children: c
|
|
4095
4125
|
}
|
|
@@ -4097,119 +4127,109 @@ const We = (t) => {
|
|
|
4097
4127
|
d && !c && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: d })
|
|
4098
4128
|
] });
|
|
4099
4129
|
};
|
|
4100
|
-
|
|
4101
|
-
const
|
|
4102
|
-
({
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
hint: o,
|
|
4106
|
-
leftIcon: a,
|
|
4107
|
-
rightIcon: n,
|
|
4108
|
-
animate: l = !0,
|
|
4109
|
-
className: i,
|
|
4110
|
-
type: c,
|
|
4111
|
-
value: d,
|
|
4112
|
-
placeholder: m,
|
|
4113
|
-
disabled: u,
|
|
4114
|
-
required: g,
|
|
4115
|
-
onChange: w,
|
|
4116
|
-
onValueChange: S,
|
|
4117
|
-
...P
|
|
4118
|
-
}, N) => {
|
|
4119
|
-
const k = l !== !1, [x, I] = V(!1), D = (E) => {
|
|
4120
|
-
w?.(E), S?.(E);
|
|
4130
|
+
Mt.displayName = "PhoneInput";
|
|
4131
|
+
const Vr = Ee(
|
|
4132
|
+
(t, r) => {
|
|
4133
|
+
const o = t.animate !== !1, [a, n] = U(!1), l = (y) => {
|
|
4134
|
+
t.onChange?.(y), t.onValueChange?.(y);
|
|
4121
4135
|
};
|
|
4122
|
-
if (
|
|
4136
|
+
if (t.type === "phone" || t.type === "tel") {
|
|
4137
|
+
const { type: y, value: b, onChange: T, onValueChange: P, ...G } = t;
|
|
4123
4138
|
return /* @__PURE__ */ e(
|
|
4124
|
-
|
|
4139
|
+
Mt,
|
|
4125
4140
|
{
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
placeholder: m,
|
|
4130
|
-
disabled: u,
|
|
4131
|
-
required: g,
|
|
4132
|
-
animate: l,
|
|
4133
|
-
value: typeof d == "string" ? d : "",
|
|
4134
|
-
onChange: (E) => D(E),
|
|
4135
|
-
className: i
|
|
4141
|
+
...G,
|
|
4142
|
+
value: typeof b == "string" ? b : "",
|
|
4143
|
+
onChange: (w) => l(w)
|
|
4136
4144
|
}
|
|
4137
4145
|
);
|
|
4138
|
-
|
|
4146
|
+
}
|
|
4147
|
+
if (t.type === "country") {
|
|
4148
|
+
const { type: y, value: b, onChange: T, onValueChange: P, ...G } = t;
|
|
4139
4149
|
return /* @__PURE__ */ e(
|
|
4140
|
-
|
|
4150
|
+
St,
|
|
4141
4151
|
{
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
placeholder: m,
|
|
4146
|
-
disabled: u,
|
|
4147
|
-
required: g,
|
|
4148
|
-
animate: l,
|
|
4149
|
-
value: typeof d == "string" ? d : "",
|
|
4150
|
-
onChange: (E) => D(E),
|
|
4151
|
-
className: i
|
|
4152
|
+
...G,
|
|
4153
|
+
value: typeof b == "string" ? b : "",
|
|
4154
|
+
onChange: (w) => l(w)
|
|
4152
4155
|
}
|
|
4153
4156
|
);
|
|
4154
|
-
|
|
4157
|
+
}
|
|
4158
|
+
if (t.type === "date") {
|
|
4159
|
+
const { type: y, value: b, onChange: T, onValueChange: P, ...G } = t;
|
|
4155
4160
|
return /* @__PURE__ */ e(
|
|
4156
4161
|
Fr,
|
|
4157
4162
|
{
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
placeholder: m,
|
|
4162
|
-
disabled: u,
|
|
4163
|
-
required: g,
|
|
4164
|
-
animate: l,
|
|
4165
|
-
value: d instanceof Date ? d : void 0,
|
|
4166
|
-
onChange: (E) => D(E),
|
|
4167
|
-
className: i
|
|
4163
|
+
...G,
|
|
4164
|
+
value: b instanceof Date ? b : void 0,
|
|
4165
|
+
onChange: (w) => l(w)
|
|
4168
4166
|
}
|
|
4169
4167
|
);
|
|
4170
|
-
|
|
4168
|
+
}
|
|
4169
|
+
const i = t, {
|
|
4170
|
+
label: c,
|
|
4171
|
+
error: d,
|
|
4172
|
+
hint: m,
|
|
4173
|
+
leftIcon: u,
|
|
4174
|
+
rightIcon: g,
|
|
4175
|
+
animate: v,
|
|
4176
|
+
className: S,
|
|
4177
|
+
type: E,
|
|
4178
|
+
value: N,
|
|
4179
|
+
placeholder: k,
|
|
4180
|
+
disabled: C,
|
|
4181
|
+
required: I,
|
|
4182
|
+
onChange: V,
|
|
4183
|
+
onValueChange: D,
|
|
4184
|
+
onWheel: z,
|
|
4185
|
+
...j
|
|
4186
|
+
} = i, B = E === "number", h = E === "password";
|
|
4171
4187
|
return /* @__PURE__ */ s("div", { className: "w-full space-y-1.5", children: [
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4188
|
+
c && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4189
|
+
c,
|
|
4190
|
+
I && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
4175
4191
|
] }),
|
|
4176
4192
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4177
|
-
|
|
4193
|
+
u && /* @__PURE__ */ e("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { left: "14px", top: "50%", transform: "translateY(-50%)" }, children: u }),
|
|
4178
4194
|
/* @__PURE__ */ e(
|
|
4179
4195
|
"input",
|
|
4180
4196
|
{
|
|
4181
|
-
ref:
|
|
4182
|
-
type:
|
|
4197
|
+
ref: r,
|
|
4198
|
+
type: h && a ? "text" : E,
|
|
4183
4199
|
className: p(
|
|
4184
4200
|
"w-full rounded-md border transition-all duration-200",
|
|
4185
4201
|
"bg-background text-foreground placeholder:text-foreground/50",
|
|
4186
4202
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
4187
4203
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
4188
4204
|
"touch-target text-base",
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4205
|
+
B && "number-input",
|
|
4206
|
+
d && "border-error focus:ring-error",
|
|
4207
|
+
!d && "border-border",
|
|
4208
|
+
S
|
|
4192
4209
|
),
|
|
4193
4210
|
style: {
|
|
4194
4211
|
paddingTop: "12px",
|
|
4195
4212
|
paddingBottom: "12px",
|
|
4196
|
-
paddingLeft:
|
|
4197
|
-
paddingRight:
|
|
4213
|
+
paddingLeft: u ? "44px" : "16px",
|
|
4214
|
+
paddingRight: g || h ? "44px" : "16px"
|
|
4198
4215
|
},
|
|
4199
|
-
value:
|
|
4200
|
-
onChange: (
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4216
|
+
value: N,
|
|
4217
|
+
onChange: (y) => l(y.target.value),
|
|
4218
|
+
onWheel: B ? (y) => {
|
|
4219
|
+
y.preventDefault(), z?.(y);
|
|
4220
|
+
} : z,
|
|
4221
|
+
placeholder: k,
|
|
4222
|
+
disabled: C,
|
|
4223
|
+
required: I,
|
|
4224
|
+
...j
|
|
4205
4225
|
}
|
|
4206
4226
|
),
|
|
4207
|
-
|
|
4227
|
+
h && /* @__PURE__ */ e(
|
|
4208
4228
|
R.button,
|
|
4209
4229
|
{
|
|
4210
4230
|
type: "button",
|
|
4211
|
-
onClick: () =>
|
|
4212
|
-
className: "absolute text-primary hover:text-primary
|
|
4231
|
+
onClick: () => n(!a),
|
|
4232
|
+
className: "absolute text-primary hover:text-primary/80 transition-colors",
|
|
4213
4233
|
style: {
|
|
4214
4234
|
right: "14px",
|
|
4215
4235
|
top: "50%",
|
|
@@ -4217,29 +4237,29 @@ const Ur = Le(
|
|
|
4217
4237
|
alignItems: "center",
|
|
4218
4238
|
justifyContent: "center"
|
|
4219
4239
|
},
|
|
4220
|
-
"aria-label":
|
|
4221
|
-
whileTap:
|
|
4240
|
+
"aria-label": a ? "Hide password" : "Show password",
|
|
4241
|
+
whileTap: o ? { scale: 0.9, y: "-50%" } : void 0,
|
|
4222
4242
|
animate: { y: "-50%" },
|
|
4223
|
-
transition:
|
|
4224
|
-
children:
|
|
4243
|
+
transition: o ? { duration: 0.1 } : { duration: 0 },
|
|
4244
|
+
children: a ? /* @__PURE__ */ e(zt, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Et, { className: "w-5 h-5" })
|
|
4225
4245
|
}
|
|
4226
4246
|
),
|
|
4227
|
-
|
|
4247
|
+
g && !h && /* @__PURE__ */ e("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: g })
|
|
4228
4248
|
] }),
|
|
4229
|
-
|
|
4249
|
+
d && /* @__PURE__ */ e(
|
|
4230
4250
|
R.p,
|
|
4231
4251
|
{
|
|
4232
|
-
...
|
|
4252
|
+
...o ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4233
4253
|
className: "text-sm text-error",
|
|
4234
|
-
children:
|
|
4254
|
+
children: d
|
|
4235
4255
|
}
|
|
4236
4256
|
),
|
|
4237
|
-
|
|
4257
|
+
m && !d && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: m })
|
|
4238
4258
|
] });
|
|
4239
4259
|
}
|
|
4240
4260
|
);
|
|
4241
|
-
|
|
4242
|
-
const
|
|
4261
|
+
Vr.displayName = "Input";
|
|
4262
|
+
const Ur = Ee(
|
|
4243
4263
|
({ label: t, error: r, helperText: o, className: a, required: n, animate: l = !0, ...i }, c) => {
|
|
4244
4264
|
const d = l !== !1;
|
|
4245
4265
|
return /* @__PURE__ */ s(
|
|
@@ -4283,10 +4303,10 @@ const Vr = Le(
|
|
|
4283
4303
|
);
|
|
4284
4304
|
}
|
|
4285
4305
|
);
|
|
4286
|
-
|
|
4287
|
-
const
|
|
4306
|
+
Ur.displayName = "Textarea";
|
|
4307
|
+
const ze = Ee(
|
|
4288
4308
|
({ label: t, description: r, className: o, checked: a, defaultChecked: n, onChange: l, animate: i = !0, ...c }, d) => {
|
|
4289
|
-
const m = i !== !1, [u, g] =
|
|
4309
|
+
const m = i !== !1, [u, g] = U(n || !1), v = a !== void 0 ? a : u;
|
|
4290
4310
|
return /* @__PURE__ */ s("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
4291
4311
|
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
4292
4312
|
/* @__PURE__ */ e(
|
|
@@ -4295,9 +4315,9 @@ const Te = Le(
|
|
|
4295
4315
|
ref: d,
|
|
4296
4316
|
type: "checkbox",
|
|
4297
4317
|
className: "sr-only peer",
|
|
4298
|
-
checked:
|
|
4299
|
-
onChange: (
|
|
4300
|
-
a === void 0 && g(
|
|
4318
|
+
checked: v,
|
|
4319
|
+
onChange: (E) => {
|
|
4320
|
+
a === void 0 && g(E.target.checked), l?.(E.target.checked);
|
|
4301
4321
|
},
|
|
4302
4322
|
...c
|
|
4303
4323
|
}
|
|
@@ -4310,13 +4330,13 @@ const Te = Le(
|
|
|
4310
4330
|
"peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2",
|
|
4311
4331
|
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
4312
4332
|
"flex items-center justify-center",
|
|
4313
|
-
|
|
4333
|
+
v ? "bg-primary border-primary" : "border-border bg-secondary",
|
|
4314
4334
|
o
|
|
4315
4335
|
),
|
|
4316
4336
|
whileTap: m ? { scale: 0.95 } : void 0,
|
|
4317
|
-
children: /* @__PURE__ */ e(
|
|
4337
|
+
children: /* @__PURE__ */ e(ct, { className: p(
|
|
4318
4338
|
"w-3 h-3 text-white transition-opacity duration-200",
|
|
4319
|
-
|
|
4339
|
+
v ? "opacity-100" : "opacity-0"
|
|
4320
4340
|
) })
|
|
4321
4341
|
}
|
|
4322
4342
|
)
|
|
@@ -4328,7 +4348,7 @@ const Te = Le(
|
|
|
4328
4348
|
] });
|
|
4329
4349
|
}
|
|
4330
4350
|
);
|
|
4331
|
-
|
|
4351
|
+
ze.displayName = "Checkbox";
|
|
4332
4352
|
const lo = ({
|
|
4333
4353
|
options: t,
|
|
4334
4354
|
value: r,
|
|
@@ -4374,7 +4394,7 @@ const lo = ({
|
|
|
4374
4394
|
)
|
|
4375
4395
|
] }, d.value);
|
|
4376
4396
|
}) });
|
|
4377
|
-
}, Hr =
|
|
4397
|
+
}, Hr = Ee(
|
|
4378
4398
|
({ label: t, description: r, className: o, checked: a, onChange: n, animate: l = !0, ...i }, c) => {
|
|
4379
4399
|
const d = l !== !1;
|
|
4380
4400
|
return /* @__PURE__ */ s("label", { className: "flex items-center justify-between gap-4 cursor-pointer group", children: [
|
|
@@ -4435,7 +4455,7 @@ const co = ({
|
|
|
4435
4455
|
className: m,
|
|
4436
4456
|
animate: u = !0
|
|
4437
4457
|
}) => {
|
|
4438
|
-
const g = u !== !1, [
|
|
4458
|
+
const g = u !== !1, [v, S] = U(!1), E = (t - o) / (a - o) * 100;
|
|
4439
4459
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-2", m), children: [
|
|
4440
4460
|
(l || i) && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
4441
4461
|
l && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-primary", children: l }),
|
|
@@ -4449,9 +4469,9 @@ const co = ({
|
|
|
4449
4469
|
R.div,
|
|
4450
4470
|
{
|
|
4451
4471
|
className: "absolute left-0 top-0 h-full bg-primary rounded-full",
|
|
4452
|
-
style: { width: `${
|
|
4472
|
+
style: { width: `${E}%` },
|
|
4453
4473
|
initial: !1,
|
|
4454
|
-
animate: g ? { width: `${
|
|
4474
|
+
animate: g ? { width: `${E}%` } : void 0,
|
|
4455
4475
|
transition: g ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4456
4476
|
}
|
|
4457
4477
|
) }),
|
|
@@ -4481,8 +4501,8 @@ const co = ({
|
|
|
4481
4501
|
"pointer-events-none",
|
|
4482
4502
|
d && "opacity-50"
|
|
4483
4503
|
),
|
|
4484
|
-
style: { left: `calc(${
|
|
4485
|
-
animate: g ? { scale:
|
|
4504
|
+
style: { left: `calc(${E}% - 12px)` },
|
|
4505
|
+
animate: g ? { scale: v ? 1.2 : 1 } : void 0,
|
|
4486
4506
|
transition: g ? { type: "spring", stiffness: 300, damping: 20 } : { duration: 0 }
|
|
4487
4507
|
}
|
|
4488
4508
|
)
|
|
@@ -4502,9 +4522,9 @@ const co = ({
|
|
|
4502
4522
|
className: u,
|
|
4503
4523
|
animate: g = !0
|
|
4504
4524
|
}) => {
|
|
4505
|
-
const
|
|
4506
|
-
const I = i -
|
|
4507
|
-
o(
|
|
4525
|
+
const v = g !== !1, S = t + r, E = S > 0 ? t / S * 100 : 50, N = S > 0 ? r / S * 100 : 50, k = (C) => {
|
|
4526
|
+
const I = i - C;
|
|
4527
|
+
o(C, Math.max(l, Math.min(i, I)));
|
|
4508
4528
|
};
|
|
4509
4529
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-3", u), children: [
|
|
4510
4530
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
@@ -4521,8 +4541,8 @@ const co = ({
|
|
|
4521
4541
|
{
|
|
4522
4542
|
className: "h-full bg-primary",
|
|
4523
4543
|
initial: !1,
|
|
4524
|
-
animate:
|
|
4525
|
-
transition:
|
|
4544
|
+
animate: v ? { width: `${E}%` } : void 0,
|
|
4545
|
+
transition: v ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4526
4546
|
}
|
|
4527
4547
|
) }),
|
|
4528
4548
|
/* @__PURE__ */ e(
|
|
@@ -4533,7 +4553,7 @@ const co = ({
|
|
|
4533
4553
|
max: i,
|
|
4534
4554
|
step: c,
|
|
4535
4555
|
value: t,
|
|
4536
|
-
onChange: (
|
|
4556
|
+
onChange: (C) => k(Number(C.target.value)),
|
|
4537
4557
|
disabled: m,
|
|
4538
4558
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4539
4559
|
}
|
|
@@ -4554,8 +4574,8 @@ const co = ({
|
|
|
4554
4574
|
{
|
|
4555
4575
|
className: "h-full bg-success",
|
|
4556
4576
|
initial: !1,
|
|
4557
|
-
animate:
|
|
4558
|
-
transition:
|
|
4577
|
+
animate: v ? { width: `${N}%` } : void 0,
|
|
4578
|
+
transition: v ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4559
4579
|
}
|
|
4560
4580
|
) }),
|
|
4561
4581
|
/* @__PURE__ */ e(
|
|
@@ -4566,7 +4586,7 @@ const co = ({
|
|
|
4566
4586
|
max: i,
|
|
4567
4587
|
step: c,
|
|
4568
4588
|
value: r,
|
|
4569
|
-
onChange: (
|
|
4589
|
+
onChange: (C) => k(i - Number(C.target.value)),
|
|
4570
4590
|
disabled: m,
|
|
4571
4591
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4572
4592
|
}
|
|
@@ -4592,44 +4612,44 @@ const co = ({
|
|
|
4592
4612
|
className: m,
|
|
4593
4613
|
animate: u = !0
|
|
4594
4614
|
}) => {
|
|
4595
|
-
const g = u !== !1, [
|
|
4596
|
-
(h) => h.label.toLowerCase().includes(
|
|
4615
|
+
const g = u !== !1, [v, S] = U(!1), [E, N] = U(""), [k, C] = U("bottom"), I = Q(null), V = Q(null), D = t.find((h) => h.value === r), z = i ? t.filter(
|
|
4616
|
+
(h) => h.label.toLowerCase().includes(E.toLowerCase())
|
|
4597
4617
|
) : t;
|
|
4598
4618
|
J(() => {
|
|
4599
|
-
const h = (
|
|
4600
|
-
I.current && !I.current.contains(
|
|
4619
|
+
const h = (L) => {
|
|
4620
|
+
I.current && !I.current.contains(L.target) && (S(!1), N(""));
|
|
4601
4621
|
};
|
|
4602
4622
|
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
4603
4623
|
}, []), J(() => {
|
|
4604
|
-
if (!
|
|
4624
|
+
if (!v) return;
|
|
4605
4625
|
const h = () => {
|
|
4606
|
-
if (!
|
|
4607
|
-
const
|
|
4608
|
-
if (
|
|
4609
|
-
|
|
4626
|
+
if (!V.current) return;
|
|
4627
|
+
const L = V.current.getBoundingClientRect(), y = i ? 360 : 300, b = window.innerHeight - L.bottom - 8, T = L.top - 8;
|
|
4628
|
+
if (b >= y) {
|
|
4629
|
+
C("bottom");
|
|
4610
4630
|
return;
|
|
4611
4631
|
}
|
|
4612
|
-
if (
|
|
4613
|
-
|
|
4632
|
+
if (T >= y) {
|
|
4633
|
+
C("top");
|
|
4614
4634
|
return;
|
|
4615
4635
|
}
|
|
4616
|
-
|
|
4636
|
+
C("bottom");
|
|
4617
4637
|
};
|
|
4618
4638
|
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
4619
4639
|
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
4620
4640
|
};
|
|
4621
|
-
}, [
|
|
4622
|
-
const
|
|
4641
|
+
}, [v, i]);
|
|
4642
|
+
const j = (h) => {
|
|
4623
4643
|
o(h), S(!1), N("");
|
|
4624
|
-
},
|
|
4644
|
+
}, B = k === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
4625
4645
|
return /* @__PURE__ */ s("div", { ref: I, className: p("relative w-full", m), children: [
|
|
4626
4646
|
n && /* @__PURE__ */ e("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: n }),
|
|
4627
4647
|
/* @__PURE__ */ s(
|
|
4628
4648
|
"button",
|
|
4629
4649
|
{
|
|
4630
|
-
ref:
|
|
4650
|
+
ref: V,
|
|
4631
4651
|
type: "button",
|
|
4632
|
-
onClick: () => !d && S(!
|
|
4652
|
+
onClick: () => !d && S(!v),
|
|
4633
4653
|
disabled: d,
|
|
4634
4654
|
className: p(
|
|
4635
4655
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
@@ -4639,47 +4659,47 @@ const co = ({
|
|
|
4639
4659
|
"touch-target",
|
|
4640
4660
|
l && "border-error",
|
|
4641
4661
|
!l && "border-border",
|
|
4642
|
-
|
|
4662
|
+
v && "ring-2 ring-primary"
|
|
4643
4663
|
),
|
|
4644
4664
|
children: [
|
|
4645
4665
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
4646
|
-
|
|
4647
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
4666
|
+
D?.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: D.icon }),
|
|
4667
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !D && "text-foreground/50"), children: D?.label || a })
|
|
4648
4668
|
] }),
|
|
4649
4669
|
/* @__PURE__ */ e(
|
|
4650
|
-
|
|
4670
|
+
we,
|
|
4651
4671
|
{
|
|
4652
4672
|
className: p(
|
|
4653
4673
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
4654
|
-
|
|
4674
|
+
v && "rotate-180"
|
|
4655
4675
|
)
|
|
4656
4676
|
}
|
|
4657
4677
|
)
|
|
4658
4678
|
]
|
|
4659
4679
|
}
|
|
4660
4680
|
),
|
|
4661
|
-
g ? /* @__PURE__ */ e(de, { children:
|
|
4681
|
+
g ? /* @__PURE__ */ e(de, { children: v ? /* @__PURE__ */ e(le, { open: v, anchorRef: V, placement: k, children: /* @__PURE__ */ s(
|
|
4662
4682
|
R.div,
|
|
4663
4683
|
{
|
|
4664
|
-
initial:
|
|
4665
|
-
animate:
|
|
4666
|
-
exit:
|
|
4684
|
+
initial: B.initial,
|
|
4685
|
+
animate: B.animate,
|
|
4686
|
+
exit: B.exit,
|
|
4667
4687
|
transition: { duration: 0.2 },
|
|
4668
4688
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4669
4689
|
children: [
|
|
4670
4690
|
i && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4671
|
-
/* @__PURE__ */ e(
|
|
4691
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4672
4692
|
/* @__PURE__ */ e(
|
|
4673
4693
|
"input",
|
|
4674
4694
|
{
|
|
4675
4695
|
type: "text",
|
|
4676
4696
|
placeholder: "Search...",
|
|
4677
|
-
value:
|
|
4697
|
+
value: E,
|
|
4678
4698
|
onChange: (h) => N(h.target.value),
|
|
4679
4699
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4680
4700
|
}
|
|
4681
4701
|
),
|
|
4682
|
-
|
|
4702
|
+
E && /* @__PURE__ */ e(
|
|
4683
4703
|
"button",
|
|
4684
4704
|
{
|
|
4685
4705
|
onClick: () => N(""),
|
|
@@ -4693,7 +4713,7 @@ const co = ({
|
|
|
4693
4713
|
"button",
|
|
4694
4714
|
{
|
|
4695
4715
|
type: "button",
|
|
4696
|
-
onClick: () =>
|
|
4716
|
+
onClick: () => j(""),
|
|
4697
4717
|
className: p(
|
|
4698
4718
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4699
4719
|
"hover:bg-secondary transition-colors",
|
|
@@ -4703,10 +4723,10 @@ const co = ({
|
|
|
4703
4723
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4704
4724
|
}
|
|
4705
4725
|
),
|
|
4706
|
-
|
|
4726
|
+
z.length > 0 ? z.map((h) => /* @__PURE__ */ s(
|
|
4707
4727
|
"button",
|
|
4708
4728
|
{
|
|
4709
|
-
onClick: () =>
|
|
4729
|
+
onClick: () => j(h.value),
|
|
4710
4730
|
className: p(
|
|
4711
4731
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4712
4732
|
"hover:bg-secondary transition-colors",
|
|
@@ -4722,20 +4742,20 @@ const co = ({
|
|
|
4722
4742
|
] })
|
|
4723
4743
|
]
|
|
4724
4744
|
}
|
|
4725
|
-
) }) : null }) :
|
|
4745
|
+
) }) : null }) : v && /* @__PURE__ */ e(le, { open: v, anchorRef: V, placement: k, children: /* @__PURE__ */ s(R.div, { className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden", children: [
|
|
4726
4746
|
i && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4727
|
-
/* @__PURE__ */ e(
|
|
4747
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4728
4748
|
/* @__PURE__ */ e(
|
|
4729
4749
|
"input",
|
|
4730
4750
|
{
|
|
4731
4751
|
type: "text",
|
|
4732
4752
|
placeholder: "Search...",
|
|
4733
|
-
value:
|
|
4753
|
+
value: E,
|
|
4734
4754
|
onChange: (h) => N(h.target.value),
|
|
4735
4755
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
|
|
4736
4756
|
}
|
|
4737
4757
|
),
|
|
4738
|
-
|
|
4758
|
+
E && /* @__PURE__ */ e(
|
|
4739
4759
|
"button",
|
|
4740
4760
|
{
|
|
4741
4761
|
onClick: () => N(""),
|
|
@@ -4749,7 +4769,7 @@ const co = ({
|
|
|
4749
4769
|
"button",
|
|
4750
4770
|
{
|
|
4751
4771
|
type: "button",
|
|
4752
|
-
onClick: () =>
|
|
4772
|
+
onClick: () => j(""),
|
|
4753
4773
|
className: p(
|
|
4754
4774
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4755
4775
|
"hover:bg-secondary transition-colors",
|
|
@@ -4759,10 +4779,10 @@ const co = ({
|
|
|
4759
4779
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4760
4780
|
}
|
|
4761
4781
|
),
|
|
4762
|
-
|
|
4782
|
+
z.length > 0 ? z.map((h) => /* @__PURE__ */ s(
|
|
4763
4783
|
"button",
|
|
4764
4784
|
{
|
|
4765
|
-
onClick: () =>
|
|
4785
|
+
onClick: () => j(h.value),
|
|
4766
4786
|
className: p(
|
|
4767
4787
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4768
4788
|
"hover:bg-secondary transition-colors",
|
|
@@ -4786,7 +4806,7 @@ const co = ({
|
|
|
4786
4806
|
}
|
|
4787
4807
|
)
|
|
4788
4808
|
] });
|
|
4789
|
-
}, Yr =
|
|
4809
|
+
}, Yr = Ee(
|
|
4790
4810
|
({
|
|
4791
4811
|
options: t,
|
|
4792
4812
|
value: r,
|
|
@@ -4800,44 +4820,44 @@ const co = ({
|
|
|
4800
4820
|
disabled: m,
|
|
4801
4821
|
required: u,
|
|
4802
4822
|
className: g,
|
|
4803
|
-
animate:
|
|
4823
|
+
animate: v = !0
|
|
4804
4824
|
}, S) => {
|
|
4805
|
-
const
|
|
4806
|
-
(
|
|
4825
|
+
const E = v !== !1, [N, k] = U(!1), [C, I] = U(""), [V, D] = U("bottom"), z = Q(null), j = t.find((y) => y.value === r), B = c ? t.filter(
|
|
4826
|
+
(y) => y.label.toLowerCase().includes(C.toLowerCase())
|
|
4807
4827
|
) : t;
|
|
4808
4828
|
J(() => {
|
|
4809
|
-
const
|
|
4810
|
-
|
|
4829
|
+
const y = (b) => {
|
|
4830
|
+
z.current && !z.current.contains(b.target) && (k(!1), I(""));
|
|
4811
4831
|
};
|
|
4812
|
-
return document.addEventListener("mousedown",
|
|
4832
|
+
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
4813
4833
|
}, []), J(() => {
|
|
4814
4834
|
if (!N) return;
|
|
4815
|
-
const
|
|
4816
|
-
if (!
|
|
4817
|
-
const
|
|
4818
|
-
if (
|
|
4819
|
-
|
|
4835
|
+
const y = () => {
|
|
4836
|
+
if (!z.current) return;
|
|
4837
|
+
const b = z.current.getBoundingClientRect(), T = c ? 360 : 300, P = window.innerHeight - b.bottom - 8, G = b.top - 8;
|
|
4838
|
+
if (P >= T) {
|
|
4839
|
+
D("bottom");
|
|
4820
4840
|
return;
|
|
4821
4841
|
}
|
|
4822
|
-
if (
|
|
4823
|
-
|
|
4842
|
+
if (G >= T) {
|
|
4843
|
+
D("top");
|
|
4824
4844
|
return;
|
|
4825
4845
|
}
|
|
4826
|
-
|
|
4846
|
+
D("bottom");
|
|
4827
4847
|
};
|
|
4828
|
-
return
|
|
4829
|
-
window.removeEventListener("resize",
|
|
4848
|
+
return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
|
|
4849
|
+
window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
|
|
4830
4850
|
};
|
|
4831
4851
|
}, [N, c]);
|
|
4832
|
-
const h = (
|
|
4833
|
-
o(
|
|
4834
|
-
},
|
|
4852
|
+
const h = (y) => {
|
|
4853
|
+
o(y), k(!1), I("");
|
|
4854
|
+
}, L = V === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
4835
4855
|
return /* @__PURE__ */ s("div", { ref: S, className: p("w-full space-y-1.5", g), children: [
|
|
4836
4856
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4837
4857
|
n,
|
|
4838
4858
|
u && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
4839
4859
|
] }),
|
|
4840
|
-
/* @__PURE__ */ s("div", { ref:
|
|
4860
|
+
/* @__PURE__ */ s("div", { ref: z, className: "relative", children: [
|
|
4841
4861
|
/* @__PURE__ */ s(
|
|
4842
4862
|
"button",
|
|
4843
4863
|
{
|
|
@@ -4859,11 +4879,11 @@ const co = ({
|
|
|
4859
4879
|
),
|
|
4860
4880
|
children: [
|
|
4861
4881
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
4862
|
-
|
|
4863
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
4882
|
+
j?.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: j.icon }),
|
|
4883
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !j && "text-foreground/50"), children: j?.label || a })
|
|
4864
4884
|
] }),
|
|
4865
4885
|
/* @__PURE__ */ e(
|
|
4866
|
-
|
|
4886
|
+
we,
|
|
4867
4887
|
{
|
|
4868
4888
|
className: p(
|
|
4869
4889
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
@@ -4874,30 +4894,30 @@ const co = ({
|
|
|
4874
4894
|
]
|
|
4875
4895
|
}
|
|
4876
4896
|
),
|
|
4877
|
-
|
|
4897
|
+
E ? /* @__PURE__ */ e(de, { children: N ? /* @__PURE__ */ e(le, { open: N, anchorRef: z, placement: V, children: /* @__PURE__ */ s(
|
|
4878
4898
|
R.div,
|
|
4879
4899
|
{
|
|
4880
|
-
initial:
|
|
4881
|
-
animate:
|
|
4882
|
-
exit:
|
|
4900
|
+
initial: L.initial,
|
|
4901
|
+
animate: L.animate,
|
|
4902
|
+
exit: L.exit,
|
|
4883
4903
|
transition: { duration: 0.2 },
|
|
4884
4904
|
role: "listbox",
|
|
4885
4905
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4886
4906
|
children: [
|
|
4887
4907
|
c && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4888
|
-
/* @__PURE__ */ e(
|
|
4908
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4889
4909
|
/* @__PURE__ */ e(
|
|
4890
4910
|
"input",
|
|
4891
4911
|
{
|
|
4892
4912
|
type: "text",
|
|
4893
4913
|
placeholder: "Search...",
|
|
4894
|
-
value:
|
|
4895
|
-
onChange: (
|
|
4914
|
+
value: C,
|
|
4915
|
+
onChange: (y) => I(y.target.value),
|
|
4896
4916
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
4897
4917
|
"aria-label": "Search options"
|
|
4898
4918
|
}
|
|
4899
4919
|
),
|
|
4900
|
-
|
|
4920
|
+
C && /* @__PURE__ */ e(
|
|
4901
4921
|
"button",
|
|
4902
4922
|
{
|
|
4903
4923
|
type: "button",
|
|
@@ -4925,50 +4945,50 @@ const co = ({
|
|
|
4925
4945
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4926
4946
|
}
|
|
4927
4947
|
),
|
|
4928
|
-
|
|
4948
|
+
B.length > 0 ? B.map((y) => /* @__PURE__ */ s(
|
|
4929
4949
|
"button",
|
|
4930
4950
|
{
|
|
4931
4951
|
type: "button",
|
|
4932
4952
|
role: "option",
|
|
4933
|
-
"aria-selected":
|
|
4934
|
-
onClick: () => !
|
|
4935
|
-
disabled:
|
|
4953
|
+
"aria-selected": y.value === r,
|
|
4954
|
+
onClick: () => !y.disabled && h(y.value),
|
|
4955
|
+
disabled: y.disabled,
|
|
4936
4956
|
className: p(
|
|
4937
4957
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4938
4958
|
"hover:bg-secondary transition-colors",
|
|
4939
4959
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4940
|
-
|
|
4960
|
+
y.value === r && "bg-border text-foreground font-medium"
|
|
4941
4961
|
),
|
|
4942
4962
|
children: [
|
|
4943
|
-
|
|
4944
|
-
/* @__PURE__ */ e("span", { children:
|
|
4963
|
+
y.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: y.icon }),
|
|
4964
|
+
/* @__PURE__ */ e("span", { children: y.label })
|
|
4945
4965
|
]
|
|
4946
4966
|
},
|
|
4947
|
-
|
|
4967
|
+
y.value
|
|
4948
4968
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
4949
4969
|
] })
|
|
4950
4970
|
]
|
|
4951
4971
|
}
|
|
4952
|
-
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef:
|
|
4972
|
+
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef: z, placement: V, children: /* @__PURE__ */ s(
|
|
4953
4973
|
R.div,
|
|
4954
4974
|
{
|
|
4955
4975
|
role: "listbox",
|
|
4956
4976
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4957
4977
|
children: [
|
|
4958
4978
|
c && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4959
|
-
/* @__PURE__ */ e(
|
|
4979
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4960
4980
|
/* @__PURE__ */ e(
|
|
4961
4981
|
"input",
|
|
4962
4982
|
{
|
|
4963
4983
|
type: "text",
|
|
4964
4984
|
placeholder: "Search...",
|
|
4965
|
-
value:
|
|
4966
|
-
onChange: (
|
|
4985
|
+
value: C,
|
|
4986
|
+
onChange: (y) => I(y.target.value),
|
|
4967
4987
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
4968
4988
|
"aria-label": "Search options"
|
|
4969
4989
|
}
|
|
4970
4990
|
),
|
|
4971
|
-
|
|
4991
|
+
C && /* @__PURE__ */ e(
|
|
4972
4992
|
"button",
|
|
4973
4993
|
{
|
|
4974
4994
|
type: "button",
|
|
@@ -4996,26 +5016,26 @@ const co = ({
|
|
|
4996
5016
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4997
5017
|
}
|
|
4998
5018
|
),
|
|
4999
|
-
|
|
5019
|
+
B.length > 0 ? B.map((y) => /* @__PURE__ */ s(
|
|
5000
5020
|
"button",
|
|
5001
5021
|
{
|
|
5002
5022
|
type: "button",
|
|
5003
5023
|
role: "option",
|
|
5004
|
-
"aria-selected":
|
|
5005
|
-
onClick: () => !
|
|
5006
|
-
disabled:
|
|
5024
|
+
"aria-selected": y.value === r,
|
|
5025
|
+
onClick: () => !y.disabled && h(y.value),
|
|
5026
|
+
disabled: y.disabled,
|
|
5007
5027
|
className: p(
|
|
5008
5028
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5009
5029
|
"hover:bg-secondary transition-colors",
|
|
5010
5030
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5011
|
-
|
|
5031
|
+
y.value === r && "bg-border text-foreground font-medium"
|
|
5012
5032
|
),
|
|
5013
5033
|
children: [
|
|
5014
|
-
|
|
5015
|
-
/* @__PURE__ */ e("span", { children:
|
|
5034
|
+
y.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: y.icon }),
|
|
5035
|
+
/* @__PURE__ */ e("span", { children: y.label })
|
|
5016
5036
|
]
|
|
5017
5037
|
},
|
|
5018
|
-
|
|
5038
|
+
y.value
|
|
5019
5039
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5020
5040
|
] })
|
|
5021
5041
|
]
|
|
@@ -5025,7 +5045,7 @@ const co = ({
|
|
|
5025
5045
|
l && /* @__PURE__ */ e(
|
|
5026
5046
|
R.p,
|
|
5027
5047
|
{
|
|
5028
|
-
...
|
|
5048
|
+
...E ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
5029
5049
|
className: "text-sm text-error",
|
|
5030
5050
|
children: l
|
|
5031
5051
|
}
|
|
@@ -5035,7 +5055,7 @@ const co = ({
|
|
|
5035
5055
|
}
|
|
5036
5056
|
);
|
|
5037
5057
|
Yr.displayName = "Select";
|
|
5038
|
-
const
|
|
5058
|
+
const Wr = Ee(
|
|
5039
5059
|
({
|
|
5040
5060
|
options: t,
|
|
5041
5061
|
value: r = [],
|
|
@@ -5049,70 +5069,70 @@ const $r = Le(
|
|
|
5049
5069
|
maxItems: m,
|
|
5050
5070
|
disabled: u,
|
|
5051
5071
|
required: g,
|
|
5052
|
-
className:
|
|
5072
|
+
className: v,
|
|
5053
5073
|
animate: S = !0,
|
|
5054
|
-
chipVariant:
|
|
5074
|
+
chipVariant: E = "primary"
|
|
5055
5075
|
}, N) => {
|
|
5056
|
-
const k = S !== !1, [
|
|
5057
|
-
(
|
|
5076
|
+
const k = S !== !1, [C, I] = U(!1), [V, D] = U(""), [z, j] = U("bottom"), B = Q(null), h = t.filter((w) => r.includes(w.value)), L = c ? t.filter(
|
|
5077
|
+
(w) => w.label.toLowerCase().includes(V.toLowerCase())
|
|
5058
5078
|
) : t;
|
|
5059
5079
|
J(() => {
|
|
5060
|
-
const
|
|
5061
|
-
|
|
5080
|
+
const w = (F) => {
|
|
5081
|
+
B.current && !B.current.contains(F.target) && (I(!1), D(""));
|
|
5062
5082
|
};
|
|
5063
|
-
return document.addEventListener("mousedown",
|
|
5083
|
+
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
5064
5084
|
}, []), J(() => {
|
|
5065
|
-
if (!
|
|
5066
|
-
const
|
|
5067
|
-
if (!
|
|
5068
|
-
const F =
|
|
5069
|
-
if (
|
|
5070
|
-
|
|
5085
|
+
if (!C) return;
|
|
5086
|
+
const w = () => {
|
|
5087
|
+
if (!B.current) return;
|
|
5088
|
+
const F = B.current.getBoundingClientRect(), W = c ? 360 : 300, f = window.innerHeight - F.bottom - 8, q = F.top - 8;
|
|
5089
|
+
if (f >= W) {
|
|
5090
|
+
j("bottom");
|
|
5071
5091
|
return;
|
|
5072
5092
|
}
|
|
5073
|
-
if (
|
|
5074
|
-
|
|
5093
|
+
if (q >= W) {
|
|
5094
|
+
j("top");
|
|
5075
5095
|
return;
|
|
5076
5096
|
}
|
|
5077
|
-
|
|
5097
|
+
j("bottom");
|
|
5078
5098
|
};
|
|
5079
|
-
return
|
|
5080
|
-
window.removeEventListener("resize",
|
|
5099
|
+
return w(), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
|
|
5100
|
+
window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
|
|
5081
5101
|
};
|
|
5082
|
-
}, [
|
|
5083
|
-
const
|
|
5084
|
-
const F = r.includes(
|
|
5102
|
+
}, [C, c]);
|
|
5103
|
+
const y = (w) => {
|
|
5104
|
+
const F = r.includes(w) ? r.filter((W) => W !== w) : m && r.length >= m ? r : [...r, w];
|
|
5085
5105
|
o(F);
|
|
5086
|
-
},
|
|
5087
|
-
const F = r.filter((
|
|
5106
|
+
}, b = (w) => {
|
|
5107
|
+
const F = r.filter((W) => W !== w);
|
|
5088
5108
|
o(F);
|
|
5089
|
-
},
|
|
5109
|
+
}, T = () => {
|
|
5090
5110
|
o([]);
|
|
5091
|
-
},
|
|
5111
|
+
}, P = {
|
|
5092
5112
|
default: "bg-secondary text-primary border border-border hover:bg-border",
|
|
5093
5113
|
primary: "bg-primary/10 text-primary border border-primary/20 hover:bg-primary/20",
|
|
5094
5114
|
success: "bg-success/10 text-success border border-success/20 hover:bg-success/20",
|
|
5095
5115
|
warning: "bg-warning/10 text-warning border border-warning/20 hover:bg-warning/20",
|
|
5096
5116
|
danger: "bg-error/10 text-error border border-error/20 hover:bg-error/20",
|
|
5097
5117
|
info: "bg-info/10 text-info border border-info/20 hover:bg-info/20"
|
|
5098
|
-
},
|
|
5099
|
-
return /* @__PURE__ */ s("div", { ref: N, className: p("w-full space-y-1.5",
|
|
5118
|
+
}, G = z === "top" ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 } } : { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 } };
|
|
5119
|
+
return /* @__PURE__ */ s("div", { ref: N, className: p("w-full space-y-1.5", v), children: [
|
|
5100
5120
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
5101
5121
|
n,
|
|
5102
5122
|
g && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
5103
5123
|
] }),
|
|
5104
|
-
/* @__PURE__ */ s("div", { ref:
|
|
5124
|
+
/* @__PURE__ */ s("div", { ref: B, className: "relative", children: [
|
|
5105
5125
|
/* @__PURE__ */ s(
|
|
5106
5126
|
"div",
|
|
5107
5127
|
{
|
|
5108
5128
|
role: "button",
|
|
5109
5129
|
tabIndex: u ? -1 : 0,
|
|
5110
|
-
onClick: () => !u && I(!
|
|
5111
|
-
onKeyDown: (
|
|
5112
|
-
u || (
|
|
5130
|
+
onClick: () => !u && I(!C),
|
|
5131
|
+
onKeyDown: (w) => {
|
|
5132
|
+
u || (w.key === "Enter" || w.key === " ") && (w.preventDefault(), I((F) => !F));
|
|
5113
5133
|
},
|
|
5114
5134
|
"aria-haspopup": "listbox",
|
|
5115
|
-
"aria-expanded":
|
|
5135
|
+
"aria-expanded": C,
|
|
5116
5136
|
"aria-required": g,
|
|
5117
5137
|
"aria-disabled": u,
|
|
5118
5138
|
className: p(
|
|
@@ -5123,10 +5143,10 @@ const $r = Le(
|
|
|
5123
5143
|
"touch-target text-base min-h-12",
|
|
5124
5144
|
l && "border-error focus:ring-error",
|
|
5125
5145
|
!l && "border-border",
|
|
5126
|
-
|
|
5146
|
+
C && "ring-2 ring-primary"
|
|
5127
5147
|
),
|
|
5128
5148
|
children: [
|
|
5129
|
-
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((
|
|
5149
|
+
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((w) => /* @__PURE__ */ s(
|
|
5130
5150
|
R.div,
|
|
5131
5151
|
{
|
|
5132
5152
|
layout: !0,
|
|
@@ -5135,67 +5155,67 @@ const $r = Le(
|
|
|
5135
5155
|
exit: k ? { opacity: 0, scale: 0.8 } : {},
|
|
5136
5156
|
className: p(
|
|
5137
5157
|
"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-sm font-medium",
|
|
5138
|
-
|
|
5158
|
+
P[E]
|
|
5139
5159
|
),
|
|
5140
5160
|
children: [
|
|
5141
|
-
|
|
5142
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
5161
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5162
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: w.label }),
|
|
5143
5163
|
/* @__PURE__ */ e(
|
|
5144
5164
|
"button",
|
|
5145
5165
|
{
|
|
5146
5166
|
type: "button",
|
|
5147
5167
|
onClick: (F) => {
|
|
5148
|
-
F.stopPropagation(),
|
|
5168
|
+
F.stopPropagation(), b(w.value);
|
|
5149
5169
|
},
|
|
5150
5170
|
className: "shrink-0 ml-0.5 hover:opacity-70 transition-opacity",
|
|
5151
|
-
"aria-label": `Remove ${
|
|
5171
|
+
"aria-label": `Remove ${w.label}`,
|
|
5152
5172
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4" })
|
|
5153
5173
|
}
|
|
5154
5174
|
)
|
|
5155
5175
|
]
|
|
5156
5176
|
},
|
|
5157
|
-
|
|
5177
|
+
w.value
|
|
5158
5178
|
)) }) : /* @__PURE__ */ e("span", { className: p("truncate", "text-foreground/50"), children: a }),
|
|
5159
5179
|
/* @__PURE__ */ e(
|
|
5160
|
-
|
|
5180
|
+
we,
|
|
5161
5181
|
{
|
|
5162
5182
|
className: p(
|
|
5163
5183
|
"w-5 h-5 text-primary transition-transform shrink-0 ml-auto",
|
|
5164
|
-
|
|
5184
|
+
C && "rotate-180"
|
|
5165
5185
|
)
|
|
5166
5186
|
}
|
|
5167
5187
|
)
|
|
5168
5188
|
]
|
|
5169
5189
|
}
|
|
5170
5190
|
),
|
|
5171
|
-
k ? /* @__PURE__ */ e(de, { children:
|
|
5191
|
+
k ? /* @__PURE__ */ e(de, { children: C ? /* @__PURE__ */ e(le, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5172
5192
|
R.div,
|
|
5173
5193
|
{
|
|
5174
|
-
initial:
|
|
5175
|
-
animate:
|
|
5176
|
-
exit:
|
|
5194
|
+
initial: G.initial,
|
|
5195
|
+
animate: G.animate,
|
|
5196
|
+
exit: G.exit,
|
|
5177
5197
|
transition: { duration: 0.2 },
|
|
5178
5198
|
role: "listbox",
|
|
5179
5199
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
5180
5200
|
children: [
|
|
5181
5201
|
c && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
5182
|
-
/* @__PURE__ */ e(
|
|
5202
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
5183
5203
|
/* @__PURE__ */ e(
|
|
5184
5204
|
"input",
|
|
5185
5205
|
{
|
|
5186
5206
|
type: "text",
|
|
5187
5207
|
placeholder: "Search...",
|
|
5188
|
-
value:
|
|
5189
|
-
onChange: (
|
|
5208
|
+
value: V,
|
|
5209
|
+
onChange: (w) => D(w.target.value),
|
|
5190
5210
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
5191
5211
|
"aria-label": "Search options"
|
|
5192
5212
|
}
|
|
5193
5213
|
),
|
|
5194
|
-
|
|
5214
|
+
V && /* @__PURE__ */ e(
|
|
5195
5215
|
"button",
|
|
5196
5216
|
{
|
|
5197
5217
|
type: "button",
|
|
5198
|
-
onClick: () =>
|
|
5218
|
+
onClick: () => D(""),
|
|
5199
5219
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
5200
5220
|
"aria-label": "Clear search",
|
|
5201
5221
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -5208,7 +5228,7 @@ const $r = Le(
|
|
|
5208
5228
|
{
|
|
5209
5229
|
type: "button",
|
|
5210
5230
|
role: "option",
|
|
5211
|
-
onClick: () =>
|
|
5231
|
+
onClick: () => T(),
|
|
5212
5232
|
className: p(
|
|
5213
5233
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5214
5234
|
"hover:bg-secondary transition-colors",
|
|
@@ -5217,69 +5237,69 @@ const $r = Le(
|
|
|
5217
5237
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5218
5238
|
}
|
|
5219
5239
|
),
|
|
5220
|
-
|
|
5221
|
-
const F = r.includes(
|
|
5240
|
+
L.length > 0 ? L.map((w) => {
|
|
5241
|
+
const F = r.includes(w.value), W = w.disabled || m !== void 0 && r.length >= m && !F;
|
|
5222
5242
|
return /* @__PURE__ */ s(
|
|
5223
5243
|
"div",
|
|
5224
5244
|
{
|
|
5225
5245
|
role: "option",
|
|
5226
5246
|
"aria-selected": F,
|
|
5227
|
-
"aria-disabled":
|
|
5228
|
-
onClick: () =>
|
|
5247
|
+
"aria-disabled": W,
|
|
5248
|
+
onClick: () => !W && y(w.value),
|
|
5229
5249
|
className: p(
|
|
5230
5250
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5231
5251
|
"hover:bg-secondary transition-colors",
|
|
5232
5252
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5233
|
-
|
|
5253
|
+
W && "opacity-50 cursor-not-allowed",
|
|
5234
5254
|
F && "bg-border text-foreground font-medium"
|
|
5235
5255
|
),
|
|
5236
5256
|
children: [
|
|
5237
5257
|
/* @__PURE__ */ e(
|
|
5238
|
-
|
|
5258
|
+
ze,
|
|
5239
5259
|
{
|
|
5240
5260
|
checked: F,
|
|
5241
|
-
disabled:
|
|
5242
|
-
onChange: () =>
|
|
5243
|
-
onClick: (
|
|
5261
|
+
disabled: W,
|
|
5262
|
+
onChange: () => !W && y(w.value),
|
|
5263
|
+
onClick: (f) => f.stopPropagation(),
|
|
5244
5264
|
animate: k,
|
|
5245
5265
|
className: "w-5 h-5",
|
|
5246
|
-
"aria-label":
|
|
5266
|
+
"aria-label": w.label
|
|
5247
5267
|
}
|
|
5248
5268
|
),
|
|
5249
|
-
|
|
5250
|
-
/* @__PURE__ */ e("span", { children:
|
|
5269
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5270
|
+
/* @__PURE__ */ e("span", { children: w.label })
|
|
5251
5271
|
]
|
|
5252
5272
|
},
|
|
5253
|
-
|
|
5273
|
+
w.value
|
|
5254
5274
|
);
|
|
5255
5275
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5256
5276
|
] })
|
|
5257
5277
|
]
|
|
5258
5278
|
}
|
|
5259
|
-
) }) : null }) :
|
|
5279
|
+
) }) : null }) : C && /* @__PURE__ */ e(le, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5260
5280
|
R.div,
|
|
5261
5281
|
{
|
|
5262
5282
|
role: "listbox",
|
|
5263
5283
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
5264
5284
|
children: [
|
|
5265
5285
|
c && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
5266
|
-
/* @__PURE__ */ e(
|
|
5286
|
+
/* @__PURE__ */ e(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
5267
5287
|
/* @__PURE__ */ e(
|
|
5268
5288
|
"input",
|
|
5269
5289
|
{
|
|
5270
5290
|
type: "text",
|
|
5271
5291
|
placeholder: "Search...",
|
|
5272
|
-
value:
|
|
5273
|
-
onChange: (
|
|
5292
|
+
value: V,
|
|
5293
|
+
onChange: (w) => D(w.target.value),
|
|
5274
5294
|
className: "w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
5275
5295
|
"aria-label": "Search options"
|
|
5276
5296
|
}
|
|
5277
5297
|
),
|
|
5278
|
-
|
|
5298
|
+
V && /* @__PURE__ */ e(
|
|
5279
5299
|
"button",
|
|
5280
5300
|
{
|
|
5281
5301
|
type: "button",
|
|
5282
|
-
onClick: () =>
|
|
5302
|
+
onClick: () => D(""),
|
|
5283
5303
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
5284
5304
|
"aria-label": "Clear search",
|
|
5285
5305
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -5292,7 +5312,7 @@ const $r = Le(
|
|
|
5292
5312
|
{
|
|
5293
5313
|
type: "button",
|
|
5294
5314
|
role: "option",
|
|
5295
|
-
onClick: () =>
|
|
5315
|
+
onClick: () => T(),
|
|
5296
5316
|
className: p(
|
|
5297
5317
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5298
5318
|
"hover:bg-secondary transition-colors",
|
|
@@ -5301,40 +5321,40 @@ const $r = Le(
|
|
|
5301
5321
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5302
5322
|
}
|
|
5303
5323
|
),
|
|
5304
|
-
|
|
5305
|
-
const F = r.includes(
|
|
5324
|
+
L.length > 0 ? L.map((w) => {
|
|
5325
|
+
const F = r.includes(w.value), W = w.disabled || m !== void 0 && r.length >= m && !F;
|
|
5306
5326
|
return /* @__PURE__ */ s(
|
|
5307
5327
|
"div",
|
|
5308
5328
|
{
|
|
5309
5329
|
role: "option",
|
|
5310
5330
|
"aria-selected": F,
|
|
5311
|
-
"aria-disabled":
|
|
5312
|
-
onClick: () =>
|
|
5331
|
+
"aria-disabled": W,
|
|
5332
|
+
onClick: () => !W && y(w.value),
|
|
5313
5333
|
className: p(
|
|
5314
5334
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5315
5335
|
"hover:bg-secondary transition-colors",
|
|
5316
5336
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5317
|
-
|
|
5337
|
+
W && "opacity-50 cursor-not-allowed",
|
|
5318
5338
|
F && "bg-border text-foreground font-medium"
|
|
5319
5339
|
),
|
|
5320
5340
|
children: [
|
|
5321
5341
|
/* @__PURE__ */ e(
|
|
5322
|
-
|
|
5342
|
+
ze,
|
|
5323
5343
|
{
|
|
5324
5344
|
checked: F,
|
|
5325
|
-
disabled:
|
|
5326
|
-
onChange: () =>
|
|
5327
|
-
onClick: (
|
|
5345
|
+
disabled: W,
|
|
5346
|
+
onChange: () => !W && y(w.value),
|
|
5347
|
+
onClick: (f) => f.stopPropagation(),
|
|
5328
5348
|
animate: k,
|
|
5329
5349
|
className: "w-5 h-5",
|
|
5330
|
-
"aria-label":
|
|
5350
|
+
"aria-label": w.label
|
|
5331
5351
|
}
|
|
5332
5352
|
),
|
|
5333
|
-
|
|
5334
|
-
/* @__PURE__ */ e("span", { children:
|
|
5353
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5354
|
+
/* @__PURE__ */ e("span", { children: w.label })
|
|
5335
5355
|
]
|
|
5336
5356
|
},
|
|
5337
|
-
|
|
5357
|
+
w.value
|
|
5338
5358
|
);
|
|
5339
5359
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5340
5360
|
] })
|
|
@@ -5354,7 +5374,7 @@ const $r = Le(
|
|
|
5354
5374
|
] });
|
|
5355
5375
|
}
|
|
5356
5376
|
);
|
|
5357
|
-
|
|
5377
|
+
Wr.displayName = "MultiSelect";
|
|
5358
5378
|
const po = ({
|
|
5359
5379
|
children: t,
|
|
5360
5380
|
content: r,
|
|
@@ -5368,105 +5388,105 @@ const po = ({
|
|
|
5368
5388
|
className: m,
|
|
5369
5389
|
showArrow: u = !0,
|
|
5370
5390
|
arrowSize: g = 10,
|
|
5371
|
-
arrowClassName:
|
|
5391
|
+
arrowClassName: v
|
|
5372
5392
|
}) => {
|
|
5373
|
-
const [S,
|
|
5393
|
+
const [S, E] = U(!1), [N, k] = U(c), [C, I] = U(o), [V, D] = U("center"), [z, j] = U(null), B = Q(null), h = Q(null), L = Q(null), y = i !== void 0, b = y ? !!i : N, T = ke(
|
|
5374
5394
|
(Y) => {
|
|
5375
|
-
|
|
5395
|
+
y || k(Y), d?.(Y);
|
|
5376
5396
|
},
|
|
5377
|
-
[
|
|
5378
|
-
),
|
|
5379
|
-
|
|
5380
|
-
}, []),
|
|
5381
|
-
l || (
|
|
5382
|
-
|
|
5397
|
+
[y, d]
|
|
5398
|
+
), P = ke(() => {
|
|
5399
|
+
L.current !== null && (window.clearTimeout(L.current), L.current = null);
|
|
5400
|
+
}, []), G = ke(() => {
|
|
5401
|
+
l || (P(), L.current = window.setTimeout(() => {
|
|
5402
|
+
T(!0);
|
|
5383
5403
|
}, Math.max(0, n)));
|
|
5384
|
-
}, [
|
|
5385
|
-
|
|
5386
|
-
}, [
|
|
5387
|
-
if (!
|
|
5388
|
-
const Y =
|
|
5389
|
-
right:
|
|
5390
|
-
left: ee >=
|
|
5391
|
-
top: pe >=
|
|
5392
|
-
bottom: be >=
|
|
5393
|
-
},
|
|
5394
|
-
right:
|
|
5404
|
+
}, [P, n, l, T]), w = ke(() => {
|
|
5405
|
+
P(), T(!1);
|
|
5406
|
+
}, [P, T]), F = ke(() => {
|
|
5407
|
+
if (!b || !B.current || !h.current) return;
|
|
5408
|
+
const Y = B.current.getBoundingClientRect(), $ = h.current.getBoundingClientRect(), K = 8, Z = window.innerWidth - Y.right - K, ee = Y.left - K, pe = Y.top - K, be = window.innerHeight - Y.bottom - K, X = {
|
|
5409
|
+
right: Z >= $.width + a,
|
|
5410
|
+
left: ee >= $.width + a,
|
|
5411
|
+
top: pe >= $.height + a,
|
|
5412
|
+
bottom: be >= $.height + a
|
|
5413
|
+
}, ve = {
|
|
5414
|
+
right: Z,
|
|
5395
5415
|
left: ee,
|
|
5396
5416
|
top: pe,
|
|
5397
5417
|
bottom: be
|
|
5398
5418
|
};
|
|
5399
5419
|
let ae = o;
|
|
5400
|
-
X[ae] || (ae = Object.entries(
|
|
5420
|
+
X[ae] || (ae = Object.entries(ve).sort(
|
|
5401
5421
|
(me, he) => he[1] - me[1]
|
|
5402
5422
|
)[0]?.[0] ?? "bottom");
|
|
5403
|
-
let ne = 0,
|
|
5423
|
+
let ne = 0, ie = 0;
|
|
5404
5424
|
if (ae === "right")
|
|
5405
|
-
ne = Y.right + a,
|
|
5425
|
+
ne = Y.right + a, ie = Y.top + Y.height / 2 - $.height / 2, D("center");
|
|
5406
5426
|
else if (ae === "left")
|
|
5407
|
-
ne = Y.left -
|
|
5427
|
+
ne = Y.left - $.width - a, ie = Y.top + Y.height / 2 - $.height / 2, D("center");
|
|
5408
5428
|
else if (ae === "top") {
|
|
5409
|
-
const ce = Y.left, me = Y.right -
|
|
5410
|
-
he || !he && !
|
|
5429
|
+
const ce = Y.left, me = Y.right - $.width, he = ce >= K && ce + $.width <= window.innerWidth - K, Re = me >= K && me + $.width <= window.innerWidth - K;
|
|
5430
|
+
he || !he && !Re && Z >= ee ? (ne = ce, D("start")) : (ne = me, D("end")), ie = Y.top - $.height - a;
|
|
5411
5431
|
} else {
|
|
5412
|
-
const ce = Y.left, me = Y.right -
|
|
5413
|
-
he || !he && !
|
|
5432
|
+
const ce = Y.left, me = Y.right - $.width, he = ce >= K && ce + $.width <= window.innerWidth - K, Re = me >= K && me + $.width <= window.innerWidth - K;
|
|
5433
|
+
he || !he && !Re && Z >= ee ? (ne = ce, D("start")) : (ne = me, D("end")), ie = Y.bottom + a;
|
|
5414
5434
|
}
|
|
5415
5435
|
const re = Math.min(
|
|
5416
|
-
Math.max(ne,
|
|
5417
|
-
window.innerWidth -
|
|
5418
|
-
),
|
|
5419
|
-
Math.max(
|
|
5420
|
-
window.innerHeight -
|
|
5436
|
+
Math.max(ne, K),
|
|
5437
|
+
window.innerWidth - $.width - K
|
|
5438
|
+
), Ce = Math.min(
|
|
5439
|
+
Math.max(ie, K),
|
|
5440
|
+
window.innerHeight - $.height - K
|
|
5421
5441
|
);
|
|
5422
|
-
I(ae),
|
|
5423
|
-
}, [
|
|
5424
|
-
J(() => (
|
|
5425
|
-
|
|
5426
|
-
}), []), J(() => () =>
|
|
5427
|
-
if (
|
|
5442
|
+
I(ae), j({ left: re, top: Ce });
|
|
5443
|
+
}, [b, a, o]);
|
|
5444
|
+
J(() => (E(!0), () => {
|
|
5445
|
+
E(!1);
|
|
5446
|
+
}), []), J(() => () => P(), [P]), J(() => {
|
|
5447
|
+
if (b)
|
|
5428
5448
|
return F(), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0), () => {
|
|
5429
5449
|
window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
|
|
5430
5450
|
};
|
|
5431
|
-
}, [
|
|
5432
|
-
if (!
|
|
5451
|
+
}, [b, F]), J(() => {
|
|
5452
|
+
if (!b) return;
|
|
5433
5453
|
const Y = window.requestAnimationFrame(F);
|
|
5434
5454
|
return () => window.cancelAnimationFrame(Y);
|
|
5435
|
-
}, [r,
|
|
5436
|
-
const
|
|
5455
|
+
}, [r, b, F]);
|
|
5456
|
+
const W = Ae(
|
|
5437
5457
|
() => ({
|
|
5438
5458
|
position: "fixed",
|
|
5439
5459
|
zIndex: 80,
|
|
5440
|
-
left:
|
|
5441
|
-
top:
|
|
5460
|
+
left: z?.left ?? -9999,
|
|
5461
|
+
top: z?.top ?? -9999,
|
|
5442
5462
|
pointerEvents: "none"
|
|
5443
5463
|
}),
|
|
5444
|
-
[
|
|
5445
|
-
),
|
|
5464
|
+
[z]
|
|
5465
|
+
), f = Ae(
|
|
5446
5466
|
() => ({
|
|
5447
5467
|
width: g,
|
|
5448
5468
|
height: g
|
|
5449
5469
|
}),
|
|
5450
5470
|
[g]
|
|
5451
|
-
),
|
|
5452
|
-
return /* @__PURE__ */ s(
|
|
5471
|
+
), q = Ae(() => C === "right" ? "left-0 top-1/2 -translate-x-1/2 -translate-y-1/2 border-l border-b" : C === "left" ? "right-0 top-1/2 translate-x-1/2 -translate-y-1/2 border-r border-t" : C === "top" ? V === "start" ? "bottom-0 left-4 translate-y-1/2 border-r border-b" : V === "end" ? "bottom-0 right-4 translate-y-1/2 border-r border-b" : "bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 border-r border-b" : V === "start" ? "top-0 left-4 -translate-y-1/2 border-l border-t" : V === "end" ? "top-0 right-4 -translate-y-1/2 border-l border-t" : "top-0 left-1/2 -translate-x-1/2 -translate-y-1/2 border-l border-t", [V, C]);
|
|
5472
|
+
return /* @__PURE__ */ s(Ue, { children: [
|
|
5453
5473
|
/* @__PURE__ */ e(
|
|
5454
5474
|
"span",
|
|
5455
5475
|
{
|
|
5456
|
-
ref:
|
|
5476
|
+
ref: B,
|
|
5457
5477
|
className: "inline-flex",
|
|
5458
|
-
onMouseEnter:
|
|
5459
|
-
onMouseLeave:
|
|
5460
|
-
onFocus:
|
|
5461
|
-
onBlur:
|
|
5478
|
+
onMouseEnter: G,
|
|
5479
|
+
onMouseLeave: w,
|
|
5480
|
+
onFocus: G,
|
|
5481
|
+
onBlur: w,
|
|
5462
5482
|
onKeyDown: (Y) => {
|
|
5463
|
-
Y.key === "Escape" &&
|
|
5483
|
+
Y.key === "Escape" && w();
|
|
5464
5484
|
},
|
|
5465
5485
|
children: t
|
|
5466
5486
|
}
|
|
5467
5487
|
),
|
|
5468
|
-
S &&
|
|
5469
|
-
/* @__PURE__ */ e("div", { style:
|
|
5488
|
+
S && b && !l && mt(
|
|
5489
|
+
/* @__PURE__ */ e("div", { style: W, role: "tooltip", "aria-hidden": !b, children: /* @__PURE__ */ s(
|
|
5470
5490
|
"div",
|
|
5471
5491
|
{
|
|
5472
5492
|
ref: h,
|
|
@@ -5478,11 +5498,11 @@ const po = ({
|
|
|
5478
5498
|
u && /* @__PURE__ */ e(
|
|
5479
5499
|
"span",
|
|
5480
5500
|
{
|
|
5481
|
-
style:
|
|
5501
|
+
style: f,
|
|
5482
5502
|
className: p(
|
|
5483
5503
|
"absolute rotate-45 bg-background border-border",
|
|
5484
|
-
|
|
5485
|
-
|
|
5504
|
+
q,
|
|
5505
|
+
v
|
|
5486
5506
|
)
|
|
5487
5507
|
}
|
|
5488
5508
|
),
|
|
@@ -5551,7 +5571,7 @@ const po = ({
|
|
|
5551
5571
|
document.removeEventListener("keydown", m), document.body.style.overflow = "unset";
|
|
5552
5572
|
};
|
|
5553
5573
|
}, [t, r]);
|
|
5554
|
-
const d = t ? /* @__PURE__ */ s(
|
|
5574
|
+
const d = t ? /* @__PURE__ */ s(Ue, { children: [
|
|
5555
5575
|
/* @__PURE__ */ e(
|
|
5556
5576
|
R.div,
|
|
5557
5577
|
{
|
|
@@ -5603,10 +5623,10 @@ const po = ({
|
|
|
5603
5623
|
className: l,
|
|
5604
5624
|
animate: i = !0
|
|
5605
5625
|
}) => {
|
|
5606
|
-
const c = i !== !1, d =
|
|
5626
|
+
const c = i !== !1, d = Q(null);
|
|
5607
5627
|
J(() => {
|
|
5608
|
-
const g = (
|
|
5609
|
-
|
|
5628
|
+
const g = (v) => {
|
|
5629
|
+
v.key === "Escape" && r();
|
|
5610
5630
|
};
|
|
5611
5631
|
return t && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden"), () => {
|
|
5612
5632
|
document.removeEventListener("keydown", g), document.body.style.overflow = "unset";
|
|
@@ -5679,7 +5699,7 @@ const po = ({
|
|
|
5679
5699
|
document.removeEventListener("keydown", m), document.body.style.overflow = "unset";
|
|
5680
5700
|
};
|
|
5681
5701
|
}, [t, r]);
|
|
5682
|
-
const d = t ? /* @__PURE__ */ s(
|
|
5702
|
+
const d = t ? /* @__PURE__ */ s(Ue, { children: [
|
|
5683
5703
|
/* @__PURE__ */ e(
|
|
5684
5704
|
R.div,
|
|
5685
5705
|
{
|
|
@@ -5732,46 +5752,46 @@ function ko({
|
|
|
5732
5752
|
className: m,
|
|
5733
5753
|
animate: u = !0
|
|
5734
5754
|
}) {
|
|
5735
|
-
const g = u !== !1, [
|
|
5736
|
-
I ||
|
|
5737
|
-
const
|
|
5738
|
-
d?.(
|
|
5739
|
-
},
|
|
5740
|
-
|
|
5741
|
-
},
|
|
5742
|
-
const
|
|
5743
|
-
return
|
|
5744
|
-
}) : t, h = t.length > 0 && t.every((
|
|
5745
|
-
if (
|
|
5746
|
-
|
|
5755
|
+
const g = u !== !1, [v, S] = U(null), [E, N] = U("asc"), [k, C] = U(c), I = i !== void 0, V = I ? i : k, D = new Set(V), z = (b) => {
|
|
5756
|
+
I || C(b);
|
|
5757
|
+
const T = new Set(b), P = t.filter((G) => T.has(n(G)));
|
|
5758
|
+
d?.(b, P);
|
|
5759
|
+
}, j = (b) => {
|
|
5760
|
+
v === b ? N(E === "asc" ? "desc" : "asc") : (S(b), N("asc"));
|
|
5761
|
+
}, B = v ? [...t].sort((b, T) => {
|
|
5762
|
+
const P = b[v], G = T[v];
|
|
5763
|
+
return P < G ? E === "asc" ? -1 : 1 : P > G ? E === "asc" ? 1 : -1 : 0;
|
|
5764
|
+
}) : t, h = t.length > 0 && t.every((b) => D.has(n(b))), L = (b) => {
|
|
5765
|
+
if (b) {
|
|
5766
|
+
z(t.map((T) => n(T)));
|
|
5747
5767
|
return;
|
|
5748
5768
|
}
|
|
5749
|
-
|
|
5750
|
-
},
|
|
5751
|
-
const
|
|
5752
|
-
if (
|
|
5753
|
-
|
|
5769
|
+
z([]);
|
|
5770
|
+
}, y = (b, T) => {
|
|
5771
|
+
const P = n(b);
|
|
5772
|
+
if (T) {
|
|
5773
|
+
D.has(P) || z([...V, P]);
|
|
5754
5774
|
return;
|
|
5755
5775
|
}
|
|
5756
|
-
|
|
5776
|
+
z(V.filter((G) => G !== P));
|
|
5757
5777
|
};
|
|
5758
5778
|
return o ? /* @__PURE__ */ e("div", { className: p("border border-border rounded-lg overflow-hidden", m), children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full", children: [
|
|
5759
5779
|
/* @__PURE__ */ e("thead", { className: "border-b border-border", children: /* @__PURE__ */ s("tr", { children: [
|
|
5760
|
-
l && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (
|
|
5761
|
-
|
|
5780
|
+
l && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ e(
|
|
5781
|
+
ze,
|
|
5762
5782
|
{
|
|
5763
5783
|
checked: h,
|
|
5764
|
-
onChange:
|
|
5784
|
+
onChange: L,
|
|
5765
5785
|
className: "w-5 h-5",
|
|
5766
5786
|
"aria-label": "Select all rows"
|
|
5767
5787
|
}
|
|
5768
5788
|
) }) }),
|
|
5769
|
-
r.map((
|
|
5789
|
+
r.map((b, T) => /* @__PURE__ */ e("th", { className: "px-6 py-4 text-left", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-border rounded w-24", g && "animate-pulse") }) }, T))
|
|
5770
5790
|
] }) }),
|
|
5771
|
-
/* @__PURE__ */ e("tbody", { children: [...Array(5)].map((
|
|
5791
|
+
/* @__PURE__ */ e("tbody", { children: [...Array(5)].map((b, T) => /* @__PURE__ */ s("tr", { className: "border-b border-border", children: [
|
|
5772
5792
|
l && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-secondary rounded", g && "animate-pulse") }) }),
|
|
5773
|
-
r.map((
|
|
5774
|
-
] },
|
|
5793
|
+
r.map((P, G) => /* @__PURE__ */ e("td", { className: "px-6 py-4", children: /* @__PURE__ */ e("div", { className: p("h-4 bg-secondary rounded", g && "animate-pulse") }) }, G))
|
|
5794
|
+
] }, T)) })
|
|
5775
5795
|
] }) }) }) : /* @__PURE__ */ e(
|
|
5776
5796
|
R.div,
|
|
5777
5797
|
{
|
|
@@ -5779,67 +5799,67 @@ function ko({
|
|
|
5779
5799
|
className: p("border border-border rounded-lg overflow-hidden", m),
|
|
5780
5800
|
children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full", children: [
|
|
5781
5801
|
/* @__PURE__ */ e("thead", { className: "border-b border-border", children: /* @__PURE__ */ s("tr", { children: [
|
|
5782
|
-
l && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (
|
|
5783
|
-
|
|
5802
|
+
l && /* @__PURE__ */ e("th", { className: "px-4 py-4 text-left w-14", children: /* @__PURE__ */ e("div", { className: "flex items-center", onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ e(
|
|
5803
|
+
ze,
|
|
5784
5804
|
{
|
|
5785
5805
|
checked: h,
|
|
5786
|
-
onChange:
|
|
5806
|
+
onChange: L,
|
|
5787
5807
|
className: "w-5 h-5",
|
|
5788
5808
|
"aria-label": "Select all rows"
|
|
5789
5809
|
}
|
|
5790
5810
|
) }) }),
|
|
5791
|
-
r.map((
|
|
5811
|
+
r.map((b, T) => /* @__PURE__ */ e(
|
|
5792
5812
|
"th",
|
|
5793
5813
|
{
|
|
5794
5814
|
className: p(
|
|
5795
5815
|
"px-6 py-4 text-left text-sm font-semibold text-foreground",
|
|
5796
|
-
|
|
5797
|
-
|
|
5816
|
+
b.width,
|
|
5817
|
+
b.sortable && "cursor-pointer transition-colors"
|
|
5798
5818
|
),
|
|
5799
|
-
onClick: () =>
|
|
5819
|
+
onClick: () => b.sortable && j(b.key),
|
|
5800
5820
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
5801
|
-
|
|
5802
|
-
|
|
5821
|
+
b.header,
|
|
5822
|
+
b.sortable && /* @__PURE__ */ e("span", { className: "text-primary/50 hover:text-primary transition-colors", children: v === b.key ? E === "asc" ? /* @__PURE__ */ e(Pt, { className: "w-4 h-4" }) : /* @__PURE__ */ e(It, { className: "w-4 h-4" }) : /* @__PURE__ */ e(Bt, { className: "w-4 h-4" }) })
|
|
5803
5823
|
] })
|
|
5804
5824
|
},
|
|
5805
|
-
|
|
5825
|
+
T
|
|
5806
5826
|
))
|
|
5807
5827
|
] }) }),
|
|
5808
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
5828
|
+
/* @__PURE__ */ e("tbody", { children: B.map((b, T) => /* @__PURE__ */ s(
|
|
5809
5829
|
R.tr,
|
|
5810
5830
|
{
|
|
5811
|
-
...g ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2, delay:
|
|
5812
|
-
onClick: () => a && a(
|
|
5831
|
+
...g ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2, delay: T * 0.05 } } : {},
|
|
5832
|
+
onClick: () => a && a(b),
|
|
5813
5833
|
className: p(
|
|
5814
5834
|
"border-b border-border transition-colors",
|
|
5815
5835
|
a && "cursor-pointer hover:bg-secondary"
|
|
5816
5836
|
),
|
|
5817
5837
|
children: [
|
|
5818
|
-
l && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", onClick: (
|
|
5819
|
-
|
|
5838
|
+
l && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
5839
|
+
ze,
|
|
5820
5840
|
{
|
|
5821
|
-
checked:
|
|
5822
|
-
onChange: (
|
|
5841
|
+
checked: D.has(n(b)),
|
|
5842
|
+
onChange: (P) => y(b, P),
|
|
5823
5843
|
className: "w-5 h-5",
|
|
5824
|
-
"aria-label": `Select row ${
|
|
5844
|
+
"aria-label": `Select row ${T + 1}`
|
|
5825
5845
|
}
|
|
5826
5846
|
) }) }),
|
|
5827
|
-
r.map((
|
|
5847
|
+
r.map((P, G) => /* @__PURE__ */ e(
|
|
5828
5848
|
"td",
|
|
5829
5849
|
{
|
|
5830
5850
|
className: p(
|
|
5831
5851
|
"px-6 py-4 text-sm text-foreground/70",
|
|
5832
|
-
|
|
5852
|
+
P.width
|
|
5833
5853
|
),
|
|
5834
|
-
style:
|
|
5835
|
-
title:
|
|
5836
|
-
children:
|
|
5854
|
+
style: P.width ? { width: P.width } : void 0,
|
|
5855
|
+
title: P.truncate && !P.render ? String(b[P.key] ?? "") : void 0,
|
|
5856
|
+
children: P.truncate && !P.render ? /* @__PURE__ */ e("div", { className: "truncate", children: String(b[P.key] ?? "") }) : P.render ? P.render(b) : String(b[P.key] ?? "")
|
|
5837
5857
|
},
|
|
5838
|
-
|
|
5858
|
+
G
|
|
5839
5859
|
))
|
|
5840
5860
|
]
|
|
5841
5861
|
},
|
|
5842
|
-
n(
|
|
5862
|
+
n(b)
|
|
5843
5863
|
)) })
|
|
5844
5864
|
] }) })
|
|
5845
5865
|
}
|
|
@@ -5854,12 +5874,12 @@ const So = ({
|
|
|
5854
5874
|
className: l,
|
|
5855
5875
|
animate: i = !0
|
|
5856
5876
|
}) => {
|
|
5857
|
-
const c = i !== !1, d =
|
|
5877
|
+
const c = i !== !1, d = et.useMemo(() => {
|
|
5858
5878
|
if (r <= 5)
|
|
5859
|
-
return Array.from({ length: r }, (
|
|
5879
|
+
return Array.from({ length: r }, (E, N) => N + 1);
|
|
5860
5880
|
const g = Math.floor(5 / 2);
|
|
5861
|
-
let
|
|
5862
|
-
return S > r && (S = r,
|
|
5881
|
+
let v = Math.max(1, t - g), S = v + 5 - 1;
|
|
5882
|
+
return S > r && (S = r, v = Math.max(1, S - 5 + 1)), Array.from({ length: S - v + 1 }, (E, N) => v + N);
|
|
5863
5883
|
}, [t, r]), m = (u) => {
|
|
5864
5884
|
const g = Math.max(1, Math.min(r, u));
|
|
5865
5885
|
g !== t && o(g);
|
|
@@ -5882,19 +5902,19 @@ const So = ({
|
|
|
5882
5902
|
] }) }),
|
|
5883
5903
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
5884
5904
|
/* @__PURE__ */ e(
|
|
5885
|
-
|
|
5905
|
+
Fe,
|
|
5886
5906
|
{
|
|
5887
5907
|
variant: "secondary",
|
|
5888
5908
|
size: "sm",
|
|
5889
5909
|
disabled: t === 1,
|
|
5890
5910
|
onClick: () => m(t - 1),
|
|
5891
|
-
icon: /* @__PURE__ */ e(
|
|
5911
|
+
icon: /* @__PURE__ */ e(qe, { className: "w-4 h-4" }),
|
|
5892
5912
|
animate: i,
|
|
5893
5913
|
children: "Previous"
|
|
5894
5914
|
}
|
|
5895
5915
|
),
|
|
5896
5916
|
!d.includes(1) && /* @__PURE__ */ e(
|
|
5897
|
-
|
|
5917
|
+
Fe,
|
|
5898
5918
|
{
|
|
5899
5919
|
variant: "secondary",
|
|
5900
5920
|
size: "sm",
|
|
@@ -5924,13 +5944,13 @@ const So = ({
|
|
|
5924
5944
|
);
|
|
5925
5945
|
}) }) }),
|
|
5926
5946
|
/* @__PURE__ */ e(
|
|
5927
|
-
|
|
5947
|
+
Fe,
|
|
5928
5948
|
{
|
|
5929
5949
|
variant: "secondary",
|
|
5930
5950
|
size: "sm",
|
|
5931
5951
|
disabled: t === r,
|
|
5932
5952
|
onClick: () => m(t + 1),
|
|
5933
|
-
icon: /* @__PURE__ */ e(
|
|
5953
|
+
icon: /* @__PURE__ */ e(Qe, { className: "w-4 h-4" }),
|
|
5934
5954
|
animate: i,
|
|
5935
5955
|
children: "Next"
|
|
5936
5956
|
}
|
|
@@ -5939,7 +5959,7 @@ const So = ({
|
|
|
5939
5959
|
]
|
|
5940
5960
|
}
|
|
5941
5961
|
);
|
|
5942
|
-
},
|
|
5962
|
+
}, $r = ({
|
|
5943
5963
|
icon: t,
|
|
5944
5964
|
onClick: r,
|
|
5945
5965
|
label: o,
|
|
@@ -5950,14 +5970,14 @@ const So = ({
|
|
|
5950
5970
|
className: c,
|
|
5951
5971
|
animate: d = !0
|
|
5952
5972
|
}) => {
|
|
5953
|
-
const m = d !== !1, [u, g] =
|
|
5973
|
+
const m = d !== !1, [u, g] = U(!1), v = {
|
|
5954
5974
|
"bottom-right": "fixed bottom-6 right-6",
|
|
5955
5975
|
"bottom-left": "fixed bottom-6 left-6",
|
|
5956
5976
|
"bottom-center": "fixed bottom-6 left-1/2 -translate-x-1/2"
|
|
5957
5977
|
}, S = {
|
|
5958
|
-
primary: "bg-primary text-white hover:bg-primary
|
|
5978
|
+
primary: "bg-primary text-white hover:bg-primary/80 shadow-lg",
|
|
5959
5979
|
secondary: "bg-background text-primary border-2 border-primary hover:bg-secondary shadow-md"
|
|
5960
|
-
},
|
|
5980
|
+
}, E = {
|
|
5961
5981
|
primary: "bg-primary text-white",
|
|
5962
5982
|
success: "bg-success text-white",
|
|
5963
5983
|
danger: "bg-error text-white",
|
|
@@ -5965,7 +5985,7 @@ const So = ({
|
|
|
5965
5985
|
}, N = () => {
|
|
5966
5986
|
a && a.length > 0 ? g(!u) : r && r();
|
|
5967
5987
|
};
|
|
5968
|
-
return /* @__PURE__ */ s("div", { className: p(
|
|
5988
|
+
return /* @__PURE__ */ s("div", { className: p(v[l], "z-50", c), children: [
|
|
5969
5989
|
m ? /* @__PURE__ */ e(de, { children: u && a ? /* @__PURE__ */ e(
|
|
5970
5990
|
R.div,
|
|
5971
5991
|
{
|
|
@@ -5973,13 +5993,13 @@ const So = ({
|
|
|
5973
5993
|
animate: { opacity: 1 },
|
|
5974
5994
|
exit: { opacity: 0 },
|
|
5975
5995
|
className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2",
|
|
5976
|
-
children: a.map((k,
|
|
5996
|
+
children: a.map((k, C) => /* @__PURE__ */ s(
|
|
5977
5997
|
R.div,
|
|
5978
5998
|
{
|
|
5979
5999
|
initial: { opacity: 0, y: 20, scale: 0.8 },
|
|
5980
6000
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
5981
6001
|
exit: { opacity: 0, y: 20, scale: 0.8 },
|
|
5982
|
-
transition: { delay:
|
|
6002
|
+
transition: { delay: C * 0.05 },
|
|
5983
6003
|
className: "flex items-center gap-3",
|
|
5984
6004
|
children: [
|
|
5985
6005
|
/* @__PURE__ */ e(
|
|
@@ -6003,17 +6023,17 @@ const So = ({
|
|
|
6003
6023
|
},
|
|
6004
6024
|
className: p(
|
|
6005
6025
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6006
|
-
|
|
6026
|
+
E[k.variant || "primary"]
|
|
6007
6027
|
),
|
|
6008
6028
|
children: k.icon
|
|
6009
6029
|
}
|
|
6010
6030
|
)
|
|
6011
6031
|
]
|
|
6012
6032
|
},
|
|
6013
|
-
|
|
6033
|
+
C
|
|
6014
6034
|
))
|
|
6015
6035
|
}
|
|
6016
|
-
) : null }) : u && a && /* @__PURE__ */ e("div", { className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2", children: a.map((k,
|
|
6036
|
+
) : null }) : u && a && /* @__PURE__ */ e("div", { className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2", children: a.map((k, C) => /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
6017
6037
|
/* @__PURE__ */ e(
|
|
6018
6038
|
"span",
|
|
6019
6039
|
{
|
|
@@ -6033,12 +6053,12 @@ const So = ({
|
|
|
6033
6053
|
},
|
|
6034
6054
|
className: p(
|
|
6035
6055
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6036
|
-
|
|
6056
|
+
E[k.variant || "primary"]
|
|
6037
6057
|
),
|
|
6038
6058
|
children: k.icon
|
|
6039
6059
|
}
|
|
6040
6060
|
)
|
|
6041
|
-
] },
|
|
6061
|
+
] }, C)) }),
|
|
6042
6062
|
/* @__PURE__ */ s(
|
|
6043
6063
|
R.button,
|
|
6044
6064
|
{
|
|
@@ -6061,7 +6081,7 @@ const So = ({
|
|
|
6061
6081
|
}
|
|
6062
6082
|
)
|
|
6063
6083
|
] });
|
|
6064
|
-
}, Mo =
|
|
6084
|
+
}, Mo = $r, Ao = ({
|
|
6065
6085
|
steps: t,
|
|
6066
6086
|
currentStep: r,
|
|
6067
6087
|
className: o,
|
|
@@ -6071,7 +6091,7 @@ const So = ({
|
|
|
6071
6091
|
return /* @__PURE__ */ s("div", { className: p("w-full", o), children: [
|
|
6072
6092
|
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e("div", { className: "relative flex items-center mb-2", children: t.map((i, c) => {
|
|
6073
6093
|
const d = c < r, m = c === r, u = c > r;
|
|
6074
|
-
return /* @__PURE__ */ s(
|
|
6094
|
+
return /* @__PURE__ */ s(et.Fragment, { children: [
|
|
6075
6095
|
/* @__PURE__ */ s("div", { className: "flex flex-col items-center relative z-10", children: [
|
|
6076
6096
|
/* @__PURE__ */ e(
|
|
6077
6097
|
R.div,
|
|
@@ -6085,7 +6105,7 @@ const So = ({
|
|
|
6085
6105
|
(d || m) && "bg-primary text-white shadow-lg",
|
|
6086
6106
|
u && "bg-border text-muted-foreground"
|
|
6087
6107
|
),
|
|
6088
|
-
children: d ? /* @__PURE__ */ e(
|
|
6108
|
+
children: d ? /* @__PURE__ */ e(ct, { className: "w-6 h-6 stroke-[3]" }) : /* @__PURE__ */ e("span", { children: c + 1 })
|
|
6089
6109
|
}
|
|
6090
6110
|
),
|
|
6091
6111
|
/* @__PURE__ */ s("div", { className: "mt-3 text-center max-w-[120px]", children: [
|
|
@@ -6201,7 +6221,7 @@ const So = ({
|
|
|
6201
6221
|
]
|
|
6202
6222
|
}
|
|
6203
6223
|
);
|
|
6204
|
-
},
|
|
6224
|
+
}, Lo = ({
|
|
6205
6225
|
isOffline: t,
|
|
6206
6226
|
className: r,
|
|
6207
6227
|
animate: o = !0
|
|
@@ -6217,20 +6237,20 @@ const So = ({
|
|
|
6217
6237
|
r
|
|
6218
6238
|
),
|
|
6219
6239
|
children: [
|
|
6220
|
-
/* @__PURE__ */ e(
|
|
6240
|
+
/* @__PURE__ */ e(Ze, { className: "w-4 h-4" }),
|
|
6221
6241
|
/* @__PURE__ */ e("span", { children: "Offline Mode" })
|
|
6222
6242
|
]
|
|
6223
6243
|
}
|
|
6224
6244
|
) : null;
|
|
6225
|
-
},
|
|
6245
|
+
}, To = ({
|
|
6226
6246
|
status: t,
|
|
6227
6247
|
count: r,
|
|
6228
6248
|
className: o,
|
|
6229
6249
|
animate: a = !0
|
|
6230
6250
|
}) => {
|
|
6231
|
-
const n = a !== !1, l = n ? /* @__PURE__ */ e(R.div, { animate: { rotate: 360 }, transition: { repeat: 1 / 0, duration: 1, ease: "linear" }, children: /* @__PURE__ */ e(
|
|
6251
|
+
const n = a !== !1, l = n ? /* @__PURE__ */ e(R.div, { animate: { rotate: 360 }, transition: { repeat: 1 / 0, duration: 1, ease: "linear" }, children: /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }) }) : /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }), c = {
|
|
6232
6252
|
synced: {
|
|
6233
|
-
icon: /* @__PURE__ */ e(
|
|
6253
|
+
icon: /* @__PURE__ */ e(Ye, { className: "w-4 h-4" }),
|
|
6234
6254
|
label: "Synced",
|
|
6235
6255
|
color: "bg-success text-white"
|
|
6236
6256
|
},
|
|
@@ -6240,12 +6260,12 @@ const So = ({
|
|
|
6240
6260
|
color: "bg-info text-white"
|
|
6241
6261
|
},
|
|
6242
6262
|
unsynced: {
|
|
6243
|
-
icon: /* @__PURE__ */ e(
|
|
6263
|
+
icon: /* @__PURE__ */ e(Ze, { className: "w-4 h-4" }),
|
|
6244
6264
|
label: r ? `${r} Unsynced` : "Unsynced",
|
|
6245
6265
|
color: "bg-warning text-white"
|
|
6246
6266
|
},
|
|
6247
6267
|
error: {
|
|
6248
|
-
icon: /* @__PURE__ */ e(
|
|
6268
|
+
icon: /* @__PURE__ */ e(Ze, { className: "w-4 h-4" }),
|
|
6249
6269
|
label: "Sync Error",
|
|
6250
6270
|
color: "bg-error text-white"
|
|
6251
6271
|
}
|
|
@@ -6301,34 +6321,34 @@ const So = ({
|
|
|
6301
6321
|
] });
|
|
6302
6322
|
};
|
|
6303
6323
|
Jr.displayName = "Spinner";
|
|
6304
|
-
const
|
|
6305
|
-
const t =
|
|
6324
|
+
const At = Rt(void 0), zo = () => {
|
|
6325
|
+
const t = Lt(At);
|
|
6306
6326
|
if (!t)
|
|
6307
6327
|
throw new Error("useToast must be used within ToastProvider");
|
|
6308
6328
|
return t;
|
|
6309
|
-
},
|
|
6329
|
+
}, qr = {
|
|
6310
6330
|
success: "bg-success text-white border-success",
|
|
6311
6331
|
error: "bg-error text-white border-error",
|
|
6312
6332
|
warning: "bg-warning text-white border-warning",
|
|
6313
6333
|
info: "bg-info text-white border-info",
|
|
6314
6334
|
loading: "bg-primary text-white border-primary",
|
|
6315
6335
|
default: "bg-background text-foreground border-border"
|
|
6316
|
-
},
|
|
6317
|
-
success:
|
|
6336
|
+
}, Qr = {
|
|
6337
|
+
success: Vt,
|
|
6318
6338
|
error: Ot,
|
|
6319
6339
|
warning: Ft,
|
|
6320
6340
|
info: jt,
|
|
6321
|
-
loading:
|
|
6341
|
+
loading: dt,
|
|
6322
6342
|
default: null
|
|
6323
|
-
},
|
|
6343
|
+
}, Zr = {
|
|
6324
6344
|
"top-left": "top-4 left-4",
|
|
6325
6345
|
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
6326
6346
|
"top-right": "top-4 right-4",
|
|
6327
6347
|
"bottom-left": "bottom-4 left-4",
|
|
6328
6348
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
|
|
6329
6349
|
"bottom-right": "bottom-4 right-4"
|
|
6330
|
-
},
|
|
6331
|
-
const a = o !== !1, n = t.variant || "default", l =
|
|
6350
|
+
}, lt = ({ toast: t, onRemove: r, animate: o = !0 }) => {
|
|
6351
|
+
const a = o !== !1, n = t.variant || "default", l = Qr[n], i = n === "loading", c = typeof t.message == "string" ? t.message : String(t.message), d = a ? R.div : "div";
|
|
6332
6352
|
return /* @__PURE__ */ s(
|
|
6333
6353
|
d,
|
|
6334
6354
|
{
|
|
@@ -6341,7 +6361,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6341
6361
|
} : {},
|
|
6342
6362
|
className: p(
|
|
6343
6363
|
"flex items-start gap-3 p-4 rounded-md border shadow-lg min-w-80 max-w-md",
|
|
6344
|
-
|
|
6364
|
+
qr[n]
|
|
6345
6365
|
),
|
|
6346
6366
|
children: [
|
|
6347
6367
|
l && /* @__PURE__ */ e(l, { className: p("w-5 h-5 shrink-0 mt-0.5", i && "animate-spin") }),
|
|
@@ -6374,24 +6394,24 @@ const St = Rt(void 0), zo = () => {
|
|
|
6374
6394
|
maxToasts: o = 5,
|
|
6375
6395
|
animate: a = !0
|
|
6376
6396
|
}) => {
|
|
6377
|
-
const n = a !== !1, [l, i] =
|
|
6397
|
+
const n = a !== !1, [l, i] = U([]), c = ke((m) => {
|
|
6378
6398
|
i((u) => u.filter((g) => g.id !== m));
|
|
6379
|
-
}, []), d =
|
|
6399
|
+
}, []), d = ke(
|
|
6380
6400
|
(m) => {
|
|
6381
6401
|
if (typeof m.message != "string") {
|
|
6382
6402
|
console.error("Toast message must be a string, received:", m.message);
|
|
6383
6403
|
return;
|
|
6384
6404
|
}
|
|
6385
6405
|
const u = Math.random().toString(36).substring(2, 9), g = m.duration ?? 5e3;
|
|
6386
|
-
i((
|
|
6406
|
+
i((v) => [...v, { ...m, id: u }].slice(-o)), g > 0 && setTimeout(() => {
|
|
6387
6407
|
c(u);
|
|
6388
6408
|
}, g);
|
|
6389
6409
|
},
|
|
6390
6410
|
[o, c]
|
|
6391
6411
|
);
|
|
6392
|
-
return /* @__PURE__ */ s(
|
|
6412
|
+
return /* @__PURE__ */ s(At.Provider, { value: { toasts: l, addToast: d, removeToast: c }, children: [
|
|
6393
6413
|
t,
|
|
6394
|
-
/* @__PURE__ */ e("div", { className: p("fixed z-100 flex flex-col gap-2",
|
|
6414
|
+
/* @__PURE__ */ e("div", { className: p("fixed z-100 flex flex-col gap-2", Zr[r]), children: n ? /* @__PURE__ */ e(de, { mode: "popLayout", children: l.map((m) => /* @__PURE__ */ e(lt, { toast: m, onRemove: c, animate: n }, m.id)) }) : l.map((m) => /* @__PURE__ */ e(lt, { toast: m, onRemove: c, animate: n }, m.id)) })
|
|
6395
6415
|
] });
|
|
6396
6416
|
};
|
|
6397
6417
|
Xr.displayName = "ToastProvider";
|
|
@@ -6404,7 +6424,7 @@ const Eo = ({
|
|
|
6404
6424
|
className: l,
|
|
6405
6425
|
animate: i = !0
|
|
6406
6426
|
}) => {
|
|
6407
|
-
const c = i !== !1, d =
|
|
6427
|
+
const c = i !== !1, d = Q(null), m = (u) => {
|
|
6408
6428
|
const g = u.target.files?.[0];
|
|
6409
6429
|
g && t(g);
|
|
6410
6430
|
};
|
|
@@ -6442,7 +6462,7 @@ const Eo = ({
|
|
|
6442
6462
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
6443
6463
|
),
|
|
6444
6464
|
children: [
|
|
6445
|
-
/* @__PURE__ */ e(
|
|
6465
|
+
/* @__PURE__ */ e(Ut, { className: "w-6 h-6 text-primary" }),
|
|
6446
6466
|
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: "Capture Photo" })
|
|
6447
6467
|
]
|
|
6448
6468
|
}
|
|
@@ -6469,7 +6489,7 @@ const Eo = ({
|
|
|
6469
6489
|
className: l,
|
|
6470
6490
|
animate: i = !0
|
|
6471
6491
|
}) => {
|
|
6472
|
-
const c = i !== !1, d =
|
|
6492
|
+
const c = i !== !1, d = Q(null), m = (u) => {
|
|
6473
6493
|
u && t(Array.from(u));
|
|
6474
6494
|
};
|
|
6475
6495
|
return /* @__PURE__ */ s("div", { className: p("w-full", l), children: [
|
|
@@ -6516,33 +6536,33 @@ const Eo = ({
|
|
|
6516
6536
|
className: n,
|
|
6517
6537
|
animate: l = !0
|
|
6518
6538
|
}) => {
|
|
6519
|
-
const i = l !== !1, [c, d] =
|
|
6539
|
+
const i = l !== !1, [c, d] = U(!1), [m, u] = U(!1), [g, v] = U(0), [S, E] = U(null), N = Q(null), k = Q([]), C = Q(null), I = async () => {
|
|
6520
6540
|
try {
|
|
6521
|
-
const h = await navigator.mediaDevices.getUserMedia({ audio: !0 }),
|
|
6522
|
-
N.current =
|
|
6523
|
-
|
|
6524
|
-
},
|
|
6525
|
-
const
|
|
6526
|
-
|
|
6527
|
-
},
|
|
6528
|
-
|
|
6541
|
+
const h = await navigator.mediaDevices.getUserMedia({ audio: !0 }), L = new MediaRecorder(h);
|
|
6542
|
+
N.current = L, k.current = [], L.ondataavailable = (y) => {
|
|
6543
|
+
y.data.size > 0 && k.current.push(y.data);
|
|
6544
|
+
}, L.onstop = () => {
|
|
6545
|
+
const y = new Blob(k.current, { type: "audio/webm" }), b = URL.createObjectURL(y);
|
|
6546
|
+
E(b), t(y), h.getTracks().forEach((T) => T.stop());
|
|
6547
|
+
}, L.start(), d(!0), v(0), C.current = setInterval(() => {
|
|
6548
|
+
v((y) => y >= o ? (z(), y) : y + 1);
|
|
6529
6549
|
}, 1e3);
|
|
6530
6550
|
} catch (h) {
|
|
6531
6551
|
console.error("Error accessing microphone:", h);
|
|
6532
6552
|
}
|
|
6553
|
+
}, V = () => {
|
|
6554
|
+
N.current?.state === "recording" && (N.current.pause(), u(!0), C.current && clearInterval(C.current));
|
|
6533
6555
|
}, D = () => {
|
|
6534
|
-
N.current?.state === "
|
|
6535
|
-
|
|
6536
|
-
N.current?.state === "paused" && (N.current.resume(), u(!1), x.current = setInterval(() => {
|
|
6537
|
-
w((h) => Math.min(h + 1, o));
|
|
6556
|
+
N.current?.state === "paused" && (N.current.resume(), u(!1), C.current = setInterval(() => {
|
|
6557
|
+
v((h) => Math.min(h + 1, o));
|
|
6538
6558
|
}, 1e3));
|
|
6539
|
-
},
|
|
6540
|
-
N.current && (N.current.stop(), d(!1), u(!1),
|
|
6541
|
-
},
|
|
6542
|
-
|
|
6543
|
-
},
|
|
6544
|
-
const
|
|
6545
|
-
return `${
|
|
6559
|
+
}, z = () => {
|
|
6560
|
+
N.current && (N.current.stop(), d(!1), u(!1), C.current && (clearInterval(C.current), C.current = null));
|
|
6561
|
+
}, j = () => {
|
|
6562
|
+
E(null), v(0);
|
|
6563
|
+
}, B = (h) => {
|
|
6564
|
+
const L = Math.floor(h / 60), y = h % 60;
|
|
6565
|
+
return `${L.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}`;
|
|
6546
6566
|
};
|
|
6547
6567
|
return /* @__PURE__ */ s("div", { className: p("w-full", n), children: [
|
|
6548
6568
|
r && /* @__PURE__ */ e("label", { className: "block mb-2 text-sm font-medium text-primary", children: r }),
|
|
@@ -6554,15 +6574,15 @@ const Eo = ({
|
|
|
6554
6574
|
{
|
|
6555
6575
|
type: "button",
|
|
6556
6576
|
whileTap: i ? { scale: a ? 1 : 0.95 } : void 0,
|
|
6557
|
-
onClick: c ? m ?
|
|
6577
|
+
onClick: c ? m ? D : V : I,
|
|
6558
6578
|
disabled: a,
|
|
6559
6579
|
className: p(
|
|
6560
6580
|
"w-16 h-16 md:w-20 md:h-20 rounded-full flex items-center justify-center",
|
|
6561
6581
|
"transition-all duration-200",
|
|
6562
6582
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
6563
|
-
c ? p("bg-warning text-white", i && "animate-pulse") : "bg-primary text-white hover:bg-primary
|
|
6583
|
+
c ? p("bg-warning text-white", i && "animate-pulse") : "bg-primary text-white hover:bg-primary/80"
|
|
6564
6584
|
),
|
|
6565
|
-
children: c ? m ? /* @__PURE__ */ e(Yt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e(
|
|
6585
|
+
children: c ? m ? /* @__PURE__ */ e(Yt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e(Wt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e($t, { className: "w-6 h-6 md:w-8 md:h-8" })
|
|
6566
6586
|
}
|
|
6567
6587
|
),
|
|
6568
6588
|
c && !m && /* @__PURE__ */ e(
|
|
@@ -6575,7 +6595,7 @@ const Eo = ({
|
|
|
6575
6595
|
)
|
|
6576
6596
|
] }),
|
|
6577
6597
|
/* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
6578
|
-
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children:
|
|
6598
|
+
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children: B(g) }),
|
|
6579
6599
|
/* @__PURE__ */ e("p", { className: "text-xs md:text-sm text-primary/70 mt-1", children: c ? m ? "Paused" : "Recording..." : "Tap to record" })
|
|
6580
6600
|
] }),
|
|
6581
6601
|
c && /* @__PURE__ */ s(
|
|
@@ -6583,7 +6603,7 @@ const Eo = ({
|
|
|
6583
6603
|
{
|
|
6584
6604
|
...i ? { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 } } : {},
|
|
6585
6605
|
type: "button",
|
|
6586
|
-
onClick:
|
|
6606
|
+
onClick: z,
|
|
6587
6607
|
className: "px-4 py-2 text-sm bg-error text-white rounded-full font-medium hover:bg-red-600 flex items-center gap-2",
|
|
6588
6608
|
children: [
|
|
6589
6609
|
/* @__PURE__ */ e(Kt, { className: "w-4 h-4" }),
|
|
@@ -6602,13 +6622,13 @@ const Eo = ({
|
|
|
6602
6622
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
6603
6623
|
/* @__PURE__ */ s("span", { className: "text-sm text-primary/70", children: [
|
|
6604
6624
|
"Duration: ",
|
|
6605
|
-
|
|
6625
|
+
B(g)
|
|
6606
6626
|
] }),
|
|
6607
6627
|
/* @__PURE__ */ s(
|
|
6608
6628
|
"button",
|
|
6609
6629
|
{
|
|
6610
6630
|
type: "button",
|
|
6611
|
-
onClick:
|
|
6631
|
+
onClick: j,
|
|
6612
6632
|
className: "flex items-center gap-2 px-3 py-1.5 text-sm text-error hover:bg-red-50 rounded-lg transition-colors",
|
|
6613
6633
|
children: [
|
|
6614
6634
|
/* @__PURE__ */ e(_t, { className: "w-4 h-4" }),
|
|
@@ -6641,9 +6661,9 @@ const Eo = ({
|
|
|
6641
6661
|
}, m = (u) => {
|
|
6642
6662
|
switch (u) {
|
|
6643
6663
|
case "document":
|
|
6644
|
-
return /* @__PURE__ */ e(
|
|
6664
|
+
return /* @__PURE__ */ e(rt, { className: "w-8 h-8 text-primary" });
|
|
6645
6665
|
case "audio":
|
|
6646
|
-
return /* @__PURE__ */ e(
|
|
6666
|
+
return /* @__PURE__ */ e(rt, { className: "w-8 h-8 text-primary" });
|
|
6647
6667
|
default:
|
|
6648
6668
|
return /* @__PURE__ */ e(Jt, { className: "w-8 h-8 text-primary" });
|
|
6649
6669
|
}
|
|
@@ -6705,7 +6725,7 @@ const Eo = ({
|
|
|
6705
6725
|
textColor: l = "text-gray-400",
|
|
6706
6726
|
className: i = ""
|
|
6707
6727
|
}) => {
|
|
6708
|
-
const c = r ? /* @__PURE__ */ s(
|
|
6728
|
+
const c = r ? /* @__PURE__ */ s(Ue, { children: [
|
|
6709
6729
|
"Built with ",
|
|
6710
6730
|
/* @__PURE__ */ e("span", { className: "text-red-500 mx-1", children: "❤️" }),
|
|
6711
6731
|
" by ",
|
|
@@ -6762,15 +6782,15 @@ export {
|
|
|
6762
6782
|
Io as AudioRecorder,
|
|
6763
6783
|
Ro as Badge,
|
|
6764
6784
|
No as BottomSheet,
|
|
6765
|
-
|
|
6785
|
+
Fe as Button,
|
|
6766
6786
|
Eo as CameraCapture,
|
|
6767
6787
|
bo as Card,
|
|
6768
6788
|
yo as CardContent,
|
|
6769
6789
|
go as CardDescription,
|
|
6770
6790
|
ho as CardHeader,
|
|
6771
6791
|
fo as CardTitle,
|
|
6772
|
-
|
|
6773
|
-
|
|
6792
|
+
ze as Checkbox,
|
|
6793
|
+
St as CountrySelect,
|
|
6774
6794
|
Go as CreditBar,
|
|
6775
6795
|
Fr as DatePicker,
|
|
6776
6796
|
xo as Drawer,
|
|
@@ -6778,23 +6798,23 @@ export {
|
|
|
6778
6798
|
mo as DualSlider,
|
|
6779
6799
|
Mo as FAB,
|
|
6780
6800
|
Po as FileUploader,
|
|
6781
|
-
|
|
6782
|
-
|
|
6801
|
+
$r as FloatingActionButton,
|
|
6802
|
+
Vr as Input,
|
|
6783
6803
|
wo as Modal,
|
|
6784
6804
|
vo as ModalContent,
|
|
6785
6805
|
Co as ModalFooter,
|
|
6786
|
-
|
|
6787
|
-
|
|
6806
|
+
Wr as MultiSelect,
|
|
6807
|
+
Lo as OfflineBadge,
|
|
6788
6808
|
So as Pagination,
|
|
6789
|
-
|
|
6809
|
+
Mt as PhoneInput,
|
|
6790
6810
|
lo as RadioPills,
|
|
6791
6811
|
Yr as Select,
|
|
6792
6812
|
co as Slider,
|
|
6793
6813
|
Jr as Spinner,
|
|
6794
6814
|
Ao as StepProgress,
|
|
6795
|
-
|
|
6815
|
+
To as SyncIndicator,
|
|
6796
6816
|
ko as Table,
|
|
6797
|
-
|
|
6817
|
+
Ur as Textarea,
|
|
6798
6818
|
Bo as ThumbnailGrid,
|
|
6799
6819
|
Xr as ToastProvider,
|
|
6800
6820
|
Hr as Toggle,
|