@stackloop/ui 4.0.8 → 4.0.9
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 -2
- package/dist/Input.d.ts +30 -7
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +874 -882
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e, Fragment as Fe } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import Ze, { useState as U, useEffect as q, useCallback as Ne, useRef as Q, useMemo as Se, forwardRef as Le, createContext as Rt, useContext as Tt } from "react";
|
|
3
3
|
import { motion as R, AnimatePresence as de } from "framer-motion";
|
|
4
|
-
import { Loader2 as st, Calendar as Lt, ChevronLeft as _e, ChevronDown as xe, ChevronRight as
|
|
4
|
+
import { Loader2 as st, Calendar as Lt, ChevronLeft as _e, ChevronDown as xe, ChevronRight as qe, Search as fe, X as oe, EyeOff as zt, Eye as Et, Check as lt, ArrowUp as Pt, ArrowDown as It, ChevronsUpDown as Bt, House as Gt, Plus as Dt, WifiOff as Je, Wifi as Ue, 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 qt, FileText as et } from "lucide-react";
|
|
5
5
|
import { createPortal as dt } from "react-dom";
|
|
6
6
|
function ct(t) {
|
|
7
7
|
var r, o, a = "";
|
|
@@ -12,18 +12,18 @@ function ct(t) {
|
|
|
12
12
|
} else for (o in t) t[o] && (a && (a += " "), a += o);
|
|
13
13
|
return a;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Jt() {
|
|
16
16
|
for (var t, r, o = 0, a = "", n = arguments.length; o < n; o++) (t = arguments[o]) && (r = ct(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
|
}), mt = (t = /* @__PURE__ */ new Map(), r = null, o) => ({
|
|
@@ -45,7 +45,7 @@ const Zt = (t, r) => {
|
|
|
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 || tt;
|
|
49
49
|
}
|
|
50
50
|
return o[i] || tt;
|
|
51
51
|
}
|
|
@@ -107,7 +107,7 @@ const Zt = (t, r) => {
|
|
|
107
107
|
Xe(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++) {
|
|
@@ -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
|
+
}, Qe = "!", rt = ":", cr = [], ot = (t, r, o, a, n) => ({
|
|
151
151
|
modifiers: t,
|
|
152
152
|
hasImportantModifier: r,
|
|
153
153
|
baseClassName: o,
|
|
@@ -177,16 +177,16 @@ 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(Qe) ? (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(Qe) && (v = g.slice(1), S = !0)
|
|
187
187
|
);
|
|
188
|
-
const
|
|
189
|
-
return ot(l, S,
|
|
188
|
+
const E = m && m > d ? m - d : void 0;
|
|
189
|
+
return ot(l, S, v, E);
|
|
190
190
|
};
|
|
191
191
|
if (r) {
|
|
192
192
|
const n = r + rt, l = 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(":"), O = S ? I + Qe : I, D = O + 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(O + B);
|
|
261
261
|
}
|
|
262
262
|
d = u + (d.length > 0 ? " " + d : d);
|
|
263
263
|
}
|
|
@@ -302,7 +302,7 @@ const Zt = (t, r) => {
|
|
|
302
302
|
const a = ft.exec(t);
|
|
303
303
|
return a ? a[1] ? r(a[1]) : o : !1;
|
|
304
304
|
}, yt = (t) => t === "position" || t === "percentage", xt = (t) => t === "image" || t === "url", wt = (t) => t === "length" || t === "size" || t === "bg-size", vt = (t) => t === "length", Br = (t) => t === "number", Gr = (t) => t === "family-name", Ct = (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"),
|
|
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"), O = () => ["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
|
-
],
|
|
323
|
+
], z = () => [...D(), A, M], j = () => ["auto", "hidden", "clip", "visible", "scroll"], B = () => ["auto", "contain", "none"], h = () => [A, M, d], T = () => [Re, "full", "auto", ...h()], y = () => [Ce, "none", "subgrid", A, M], b = () => ["auto", {
|
|
324
324
|
span: ["full", Ce, A, M]
|
|
325
|
-
}, Ce, A, M],
|
|
325
|
+
}, Ce, A, M], L = () => [Ce, "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 = () => [Re, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...h()], f = () => [t, A, M], J = () => [...D(), nt, at, {
|
|
326
326
|
position: [A, M]
|
|
327
327
|
}], Y = () => ["no-repeat", {
|
|
328
328
|
repeat: ["", "x", "y", "space", "round"]
|
|
329
329
|
}], K = () => ["auto", "cover", "contain", Pr, Lr, {
|
|
330
330
|
size: [A, M]
|
|
331
|
-
}], _ = () => [He, Pe, ke],
|
|
331
|
+
}], _ = () => [He, Pe, ke], Z = () => [
|
|
332
332
|
// Deprecated since Tailwind CSS v4.0.0
|
|
333
333
|
"",
|
|
334
334
|
"none",
|
|
@@ -340,7 +340,7 @@ const Zt = (t, r) => {
|
|
|
340
340
|
// Deprecated since Tailwind CSS v4.0.0
|
|
341
341
|
"",
|
|
342
342
|
"none",
|
|
343
|
-
|
|
343
|
+
E,
|
|
344
344
|
A,
|
|
345
345
|
M
|
|
346
346
|
], ae = () => ["none", H, A, M], ne = () => ["none", H, A, M], se = () => [H, A, M], re = () => [Re, "full", ...h()];
|
|
@@ -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": O()
|
|
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": O()
|
|
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
|
|
@@ -648,56 +648,56 @@ const Zt = (t, r) => {
|
|
|
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": L()
|
|
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": L()
|
|
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": L()
|
|
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": L()
|
|
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 ---
|
|
@@ -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
|
|
@@ -1191,7 +1191,7 @@ const Zt = (t, r) => {
|
|
|
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: J()
|
|
1299
1299
|
}],
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Background Repeat
|
|
@@ -1329,7 +1329,7 @@ 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
|
|
@@ -1357,21 +1357,21 @@ const Zt = (t, r) => {
|
|
|
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
|
|
@@ -1678,7 +1678,7 @@ const Zt = (t, r) => {
|
|
|
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 ---
|
|
@@ -1702,7 +1702,7 @@ 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
|
|
@@ -1716,7 +1716,7 @@ const Zt = (t, r) => {
|
|
|
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
|
|
@@ -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, Be, Ie]
|
|
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: J()
|
|
1976
1976
|
}],
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Mask Repeat
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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,7 +2689,7 @@ 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
|
|
@@ -2703,7 +2703,7 @@ const Zt = (t, r) => {
|
|
|
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,11 +2773,11 @@ const Zt = (t, r) => {
|
|
|
2773
2773
|
};
|
|
2774
2774
|
}, jr = /* @__PURE__ */ gr(Dr);
|
|
2775
2775
|
function p(...t) {
|
|
2776
|
-
return jr(
|
|
2776
|
+
return jr(Jt(t));
|
|
2777
2777
|
}
|
|
2778
|
-
const Ge =
|
|
2778
|
+
const Ge = Ze.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",
|
|
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
2781
|
primary: "bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 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",
|
|
@@ -2793,7 +2793,7 @@ 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: [
|
|
@@ -2814,20 +2814,20 @@ const le = ({
|
|
|
2814
2814
|
offset: l = 8,
|
|
2815
2815
|
matchWidth: i = !0
|
|
2816
2816
|
}) => {
|
|
2817
|
-
const [c, d] =
|
|
2818
|
-
|
|
2817
|
+
const [c, d] = U(!1), [m, u] = U(null);
|
|
2818
|
+
q(() => (d(!0), () => d(!1)), []);
|
|
2819
2819
|
const g = Ne(() => {
|
|
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]);
|
|
2830
|
-
return
|
|
2830
|
+
return q(() => {
|
|
2831
2831
|
if (t)
|
|
2832
2832
|
return g(), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0), () => {
|
|
2833
2833
|
window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
|
|
@@ -2837,7 +2837,7 @@ const le = ({
|
|
|
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
|
|
2862
|
-
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2861
|
+
const v = g !== !1, [S, E] = U(!1), [N, k] = U("bottom"), [C, I] = U(!1), [O, D] = U("bottom"), [z, j] = U(!1), [B, h] = U("bottom"), [T, y] = U(t || /* @__PURE__ */ new Date()), b = Q(null), L = Q(null), P = Q(null), G = Q(null), w = Q(null), F = Q(null);
|
|
2862
|
+
q(() => {
|
|
2863
|
+
const x = (V) => {
|
|
2864
|
+
b.current && !b.current.contains(V.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
|
-
}, [S]),
|
|
2870
|
-
S || (I(!1),
|
|
2871
|
-
}, [S]),
|
|
2869
|
+
}, [S]), q(() => {
|
|
2870
|
+
S || (I(!1), j(!1));
|
|
2871
|
+
}, [S]), q(() => {
|
|
2872
2872
|
if (!S) return;
|
|
2873
|
-
const
|
|
2874
|
-
if (!
|
|
2875
|
-
const
|
|
2876
|
-
if (ge >=
|
|
2873
|
+
const x = () => {
|
|
2874
|
+
if (!L.current) return;
|
|
2875
|
+
const V = L.current.getBoundingClientRect(), $ = 430, ge = window.innerHeight - V.bottom - 8, ie = V.top - 8;
|
|
2876
|
+
if (ge >= $) {
|
|
2877
2877
|
k("bottom");
|
|
2878
2878
|
return;
|
|
2879
2879
|
}
|
|
2880
|
-
if (ie >=
|
|
2880
|
+
if (ie >= $) {
|
|
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
|
-
}, [S]),
|
|
2890
|
-
if (!
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
}, [
|
|
2894
|
-
if (!
|
|
2895
|
-
const
|
|
2896
|
-
F.current?.querySelector(`button[data-year="${
|
|
2897
|
-
}, [
|
|
2898
|
-
const
|
|
2889
|
+
}, [S]), q(() => {
|
|
2890
|
+
if (!C) return;
|
|
2891
|
+
const x = T.getMonth();
|
|
2892
|
+
G.current?.querySelector(`button[data-month="${x}"]`)?.scrollIntoView({ block: "center" });
|
|
2893
|
+
}, [C, T]), q(() => {
|
|
2894
|
+
if (!z) return;
|
|
2895
|
+
const x = T.getFullYear();
|
|
2896
|
+
F.current?.querySelector(`button[data-year="${x}"]`)?.scrollIntoView({ block: "center" });
|
|
2897
|
+
}, [z, T]);
|
|
2898
|
+
const W = [
|
|
2899
2899
|
"January",
|
|
2900
2900
|
"February",
|
|
2901
2901
|
"March",
|
|
@@ -2908,51 +2908,51 @@ const le = ({
|
|
|
2908
2908
|
"October",
|
|
2909
2909
|
"November",
|
|
2910
2910
|
"December"
|
|
2911
|
-
],
|
|
2912
|
-
const
|
|
2911
|
+
], f = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], J = (x) => {
|
|
2912
|
+
const V = x.getFullYear(), $ = x.getMonth(), ge = new Date(V, $, 1), Mt = new Date(V, $ + 1, 0).getDate(), At = ge.getDay(), Ve = [];
|
|
2913
2913
|
for (let Ae = 0; Ae < At; Ae++)
|
|
2914
|
-
|
|
2914
|
+
Ve.push(null);
|
|
2915
2915
|
for (let Ae = 1; Ae <= Mt; Ae++)
|
|
2916
|
-
|
|
2917
|
-
return
|
|
2916
|
+
Ve.push(new Date(V, $, Ae));
|
|
2917
|
+
return Ve;
|
|
2918
2918
|
}, Y = () => {
|
|
2919
|
-
|
|
2919
|
+
y(new Date(T.getFullYear(), T.getMonth() - 1, 1));
|
|
2920
2920
|
}, K = () => {
|
|
2921
|
-
|
|
2922
|
-
}, _ = (
|
|
2923
|
-
|
|
2924
|
-
},
|
|
2925
|
-
|
|
2921
|
+
y(new Date(T.getFullYear(), T.getMonth() + 1, 1));
|
|
2922
|
+
}, _ = (x) => {
|
|
2923
|
+
y(new Date(T.getFullYear(), x, 1)), I(!1);
|
|
2924
|
+
}, Z = (x) => {
|
|
2925
|
+
y(new Date(x, T.getMonth(), 1)), j(!1);
|
|
2926
2926
|
}, ee = () => {
|
|
2927
|
-
if (I(!1), !
|
|
2928
|
-
const
|
|
2929
|
-
h(
|
|
2927
|
+
if (I(!1), !z && w.current) {
|
|
2928
|
+
const x = w.current.getBoundingClientRect(), V = window.innerHeight - x.bottom, $ = x.top;
|
|
2929
|
+
h(V < 220 && $ > V ? "top" : "bottom");
|
|
2930
2930
|
}
|
|
2931
|
-
|
|
2931
|
+
j((x) => !x);
|
|
2932
2932
|
}, pe = () => {
|
|
2933
|
-
if (
|
|
2934
|
-
const
|
|
2935
|
-
|
|
2933
|
+
if (j(!1), !C && P.current) {
|
|
2934
|
+
const x = P.current.getBoundingClientRect(), V = window.innerHeight - x.bottom, $ = x.top;
|
|
2935
|
+
D(V < 220 && $ > V ? "top" : "bottom");
|
|
2936
2936
|
}
|
|
2937
|
-
I((
|
|
2938
|
-
}, be = (
|
|
2939
|
-
r(
|
|
2940
|
-
}, X = (
|
|
2937
|
+
I((x) => !x);
|
|
2938
|
+
}, be = (x) => {
|
|
2939
|
+
r(x), E(!1);
|
|
2940
|
+
}, X = (x) => !!(d && x < d || m && x > m), we = (x, V) => !x || !V ? !1 : x.getDate() === V.getDate() && x.getMonth() === V.getMonth() && x.getFullYear() === V.getFullYear(), ae = (x) => x ? we(x, /* @__PURE__ */ new Date()) : !1, ne = (x) => x ? x.toLocaleDateString("en-US", {
|
|
2941
2941
|
year: "numeric",
|
|
2942
2942
|
month: "short",
|
|
2943
2943
|
day: "numeric"
|
|
2944
|
-
}) : "", se =
|
|
2944
|
+
}) : "", se = J(T), re = T.getFullYear(), ve = T.getMonth(), ce = d ? d.getFullYear() : re - 100, me = m ? m.getFullYear() : re + 20, he = Array.from({ length: me - ce + 1 }, (x, V) => ce + V), Me = (x) => {
|
|
2945
2945
|
if (d) {
|
|
2946
|
-
const
|
|
2947
|
-
if (re ===
|
|
2946
|
+
const V = d.getFullYear(), $ = d.getMonth();
|
|
2947
|
+
if (re === V && x < $) return !0;
|
|
2948
2948
|
}
|
|
2949
2949
|
if (m) {
|
|
2950
|
-
const
|
|
2951
|
-
if (re ===
|
|
2950
|
+
const V = m.getFullYear(), $ = m.getMonth();
|
|
2951
|
+
if (re === V && x > $) return !0;
|
|
2952
2952
|
}
|
|
2953
2953
|
return !1;
|
|
2954
2954
|
}, Oe = 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 } };
|
|
2955
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
2955
|
+
return /* @__PURE__ */ s("div", { ref: b, className: p("relative w-full", u), children: [
|
|
2956
2956
|
o && /* @__PURE__ */ s("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: [
|
|
2957
2957
|
o,
|
|
2958
2958
|
a && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
@@ -2960,9 +2960,9 @@ const le = ({
|
|
|
2960
2960
|
/* @__PURE__ */ s(
|
|
2961
2961
|
"button",
|
|
2962
2962
|
{
|
|
2963
|
-
ref:
|
|
2963
|
+
ref: L,
|
|
2964
2964
|
type: "button",
|
|
2965
|
-
onClick: () => !c &&
|
|
2965
|
+
onClick: () => !c && E(!S),
|
|
2966
2966
|
disabled: c,
|
|
2967
2967
|
"aria-required": a,
|
|
2968
2968
|
className: p(
|
|
@@ -2981,7 +2981,7 @@ const le = ({
|
|
|
2981
2981
|
]
|
|
2982
2982
|
}
|
|
2983
2983
|
),
|
|
2984
|
-
|
|
2984
|
+
v ? /* @__PURE__ */ e(de, { children: S ? /* @__PURE__ */ e(le, { open: S, anchorRef: L, placement: N, matchWidth: !1, children: /* @__PURE__ */ s(
|
|
2985
2985
|
R.div,
|
|
2986
2986
|
{
|
|
2987
2987
|
initial: Oe.initial,
|
|
@@ -3005,48 +3005,48 @@ const le = ({
|
|
|
3005
3005
|
/* @__PURE__ */ s(
|
|
3006
3006
|
"button",
|
|
3007
3007
|
{
|
|
3008
|
-
ref:
|
|
3008
|
+
ref: P,
|
|
3009
3009
|
type: "button",
|
|
3010
3010
|
onClick: pe,
|
|
3011
3011
|
className: "h-8 min-w-24 max-w-28 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground focus:outline-none focus:ring-2 focus:ring-primary flex items-center justify-between gap-1",
|
|
3012
3012
|
"aria-label": "Select month",
|
|
3013
3013
|
"aria-haspopup": "listbox",
|
|
3014
|
-
"aria-expanded":
|
|
3014
|
+
"aria-expanded": C,
|
|
3015
3015
|
children: [
|
|
3016
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3017
|
-
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform",
|
|
3016
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: W[ve] }),
|
|
3017
|
+
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform", C && "rotate-180") })
|
|
3018
3018
|
]
|
|
3019
3019
|
}
|
|
3020
3020
|
),
|
|
3021
|
-
|
|
3021
|
+
C && /* @__PURE__ */ e(
|
|
3022
3022
|
"div",
|
|
3023
3023
|
{
|
|
3024
|
-
ref:
|
|
3024
|
+
ref: G,
|
|
3025
3025
|
role: "listbox",
|
|
3026
3026
|
className: p(
|
|
3027
3027
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3028
|
-
|
|
3028
|
+
O === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3029
3029
|
),
|
|
3030
|
-
children:
|
|
3031
|
-
const
|
|
3030
|
+
children: W.map((x, V) => {
|
|
3031
|
+
const $ = Me(V);
|
|
3032
3032
|
return /* @__PURE__ */ e(
|
|
3033
3033
|
"button",
|
|
3034
3034
|
{
|
|
3035
3035
|
type: "button",
|
|
3036
3036
|
role: "option",
|
|
3037
|
-
"data-month":
|
|
3038
|
-
"aria-selected":
|
|
3039
|
-
onClick: () =>
|
|
3040
|
-
disabled:
|
|
3037
|
+
"data-month": V,
|
|
3038
|
+
"aria-selected": V === ve,
|
|
3039
|
+
onClick: () => !$ && _(V),
|
|
3040
|
+
disabled: $,
|
|
3041
3041
|
className: p(
|
|
3042
3042
|
"w-full px-3 py-2 text-sm text-left transition-colors",
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3043
|
+
!$ && "hover:bg-secondary",
|
|
3044
|
+
V === ve && "bg-border text-foreground font-medium",
|
|
3045
|
+
$ && "text-border-dark cursor-not-allowed"
|
|
3046
3046
|
),
|
|
3047
|
-
children:
|
|
3047
|
+
children: x
|
|
3048
3048
|
},
|
|
3049
|
-
|
|
3049
|
+
x
|
|
3050
3050
|
);
|
|
3051
3051
|
})
|
|
3052
3052
|
}
|
|
@@ -3056,43 +3056,43 @@ const le = ({
|
|
|
3056
3056
|
/* @__PURE__ */ s(
|
|
3057
3057
|
"button",
|
|
3058
3058
|
{
|
|
3059
|
-
ref:
|
|
3059
|
+
ref: w,
|
|
3060
3060
|
type: "button",
|
|
3061
3061
|
onClick: ee,
|
|
3062
3062
|
className: "h-8 min-w-20 max-w-24 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground focus:outline-none focus:ring-2 focus:ring-primary flex items-center justify-between gap-1",
|
|
3063
3063
|
"aria-label": "Select year",
|
|
3064
3064
|
"aria-haspopup": "listbox",
|
|
3065
|
-
"aria-expanded":
|
|
3065
|
+
"aria-expanded": z,
|
|
3066
3066
|
children: [
|
|
3067
3067
|
/* @__PURE__ */ e("span", { children: re }),
|
|
3068
|
-
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform",
|
|
3068
|
+
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform", z && "rotate-180") })
|
|
3069
3069
|
]
|
|
3070
3070
|
}
|
|
3071
3071
|
),
|
|
3072
|
-
|
|
3072
|
+
z && /* @__PURE__ */ e(
|
|
3073
3073
|
"div",
|
|
3074
3074
|
{
|
|
3075
3075
|
ref: F,
|
|
3076
3076
|
role: "listbox",
|
|
3077
3077
|
className: p(
|
|
3078
3078
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3079
|
-
|
|
3079
|
+
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3080
3080
|
),
|
|
3081
|
-
children: he.map((
|
|
3081
|
+
children: he.map((x) => /* @__PURE__ */ e(
|
|
3082
3082
|
"button",
|
|
3083
3083
|
{
|
|
3084
3084
|
type: "button",
|
|
3085
3085
|
role: "option",
|
|
3086
|
-
"data-year":
|
|
3087
|
-
"aria-selected":
|
|
3088
|
-
onClick: () =>
|
|
3086
|
+
"data-year": x,
|
|
3087
|
+
"aria-selected": x === re,
|
|
3088
|
+
onClick: () => Z(x),
|
|
3089
3089
|
className: p(
|
|
3090
3090
|
"w-full px-3 py-2 text-sm text-left hover:bg-secondary transition-colors",
|
|
3091
|
-
|
|
3091
|
+
x === re && "bg-border text-foreground font-medium"
|
|
3092
3092
|
),
|
|
3093
|
-
children:
|
|
3093
|
+
children: x
|
|
3094
3094
|
},
|
|
3095
|
-
|
|
3095
|
+
x
|
|
3096
3096
|
))
|
|
3097
3097
|
}
|
|
3098
3098
|
)
|
|
@@ -3104,41 +3104,41 @@ const le = ({
|
|
|
3104
3104
|
type: "button",
|
|
3105
3105
|
onClick: K,
|
|
3106
3106
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3107
|
-
children: /* @__PURE__ */ e(
|
|
3107
|
+
children: /* @__PURE__ */ e(qe, { className: "w-5 h-5 text-primary" })
|
|
3108
3108
|
}
|
|
3109
3109
|
)
|
|
3110
3110
|
] }),
|
|
3111
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-1 pb-1 border-b border-border", children:
|
|
3111
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-1 pb-1 border-b border-border", children: f.map((x) => /* @__PURE__ */ e(
|
|
3112
3112
|
"div",
|
|
3113
3113
|
{
|
|
3114
3114
|
className: "text-center text-[11px] font-medium text-foreground/70 py-1",
|
|
3115
|
-
children:
|
|
3115
|
+
children: x
|
|
3116
3116
|
},
|
|
3117
|
-
|
|
3117
|
+
x
|
|
3118
3118
|
)) }),
|
|
3119
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: se.map((
|
|
3120
|
-
if (!
|
|
3121
|
-
return /* @__PURE__ */ e("div", { className: "aspect-square" }, `empty-${
|
|
3122
|
-
const
|
|
3119
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: se.map((x, V) => {
|
|
3120
|
+
if (!x)
|
|
3121
|
+
return /* @__PURE__ */ e("div", { className: "aspect-square" }, `empty-${V}`);
|
|
3122
|
+
const $ = we(x, t || null), ge = ae(x), ie = X(x);
|
|
3123
3123
|
return /* @__PURE__ */ e(
|
|
3124
3124
|
R.button,
|
|
3125
3125
|
{
|
|
3126
3126
|
type: "button",
|
|
3127
|
-
whileTap:
|
|
3128
|
-
onClick: () => !ie && be(
|
|
3127
|
+
whileTap: v ? { scale: ie ? 1 : 0.95 } : void 0,
|
|
3128
|
+
onClick: () => !ie && be(x),
|
|
3129
3129
|
disabled: ie,
|
|
3130
3130
|
className: p(
|
|
3131
3131
|
"aspect-square cursor-pointer rounded-lg flex items-center justify-center",
|
|
3132
3132
|
"text-[11px] font-medium transition-all duration-200",
|
|
3133
3133
|
"hover:bg-secondary",
|
|
3134
|
-
|
|
3135
|
-
ge &&
|
|
3134
|
+
$ && "bg-primary text-white hover:bg-primary-dark",
|
|
3135
|
+
ge && !$ && "border-2 border-primary text-primary",
|
|
3136
3136
|
ie && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3137
|
-
|
|
3137
|
+
!$ && !ge && !ie && "text-foreground"
|
|
3138
3138
|
),
|
|
3139
|
-
children:
|
|
3139
|
+
children: x.getDate()
|
|
3140
3140
|
},
|
|
3141
|
-
|
|
3141
|
+
x.toISOString()
|
|
3142
3142
|
);
|
|
3143
3143
|
}) }),
|
|
3144
3144
|
/* @__PURE__ */ e("div", { className: "mt-1.5 pt-1.5 border-t border-border", children: /* @__PURE__ */ e(
|
|
@@ -3152,7 +3152,7 @@ const le = ({
|
|
|
3152
3152
|
) })
|
|
3153
3153
|
]
|
|
3154
3154
|
}
|
|
3155
|
-
) }) : null }) : S && /* @__PURE__ */ e(le, { open: S, anchorRef:
|
|
3155
|
+
) }) : null }) : S && /* @__PURE__ */ e(le, { open: S, anchorRef: L, placement: N, matchWidth: !1, children: /* @__PURE__ */ s("div", { className: "z-50 w-80 bg-background rounded-md border border-border shadow-lg p-3", children: [
|
|
3156
3156
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr_auto] items-center gap-1.5 mb-3", children: [
|
|
3157
3157
|
/* @__PURE__ */ e(
|
|
3158
3158
|
"button",
|
|
@@ -3168,48 +3168,48 @@ const le = ({
|
|
|
3168
3168
|
/* @__PURE__ */ s(
|
|
3169
3169
|
"button",
|
|
3170
3170
|
{
|
|
3171
|
-
ref:
|
|
3171
|
+
ref: P,
|
|
3172
3172
|
type: "button",
|
|
3173
3173
|
onClick: pe,
|
|
3174
3174
|
className: "h-8 min-w-24 max-w-28 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground focus:outline-none focus:ring-2 focus:ring-primary flex items-center justify-between gap-1",
|
|
3175
3175
|
"aria-label": "Select month",
|
|
3176
3176
|
"aria-haspopup": "listbox",
|
|
3177
|
-
"aria-expanded":
|
|
3177
|
+
"aria-expanded": C,
|
|
3178
3178
|
children: [
|
|
3179
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3180
|
-
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform",
|
|
3179
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: W[ve] }),
|
|
3180
|
+
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform", C && "rotate-180") })
|
|
3181
3181
|
]
|
|
3182
3182
|
}
|
|
3183
3183
|
),
|
|
3184
|
-
|
|
3184
|
+
C && /* @__PURE__ */ e(
|
|
3185
3185
|
"div",
|
|
3186
3186
|
{
|
|
3187
|
-
ref:
|
|
3187
|
+
ref: G,
|
|
3188
3188
|
role: "listbox",
|
|
3189
3189
|
className: p(
|
|
3190
3190
|
"absolute z-60 w-36 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3191
|
-
|
|
3191
|
+
O === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3192
3192
|
),
|
|
3193
|
-
children:
|
|
3194
|
-
const
|
|
3193
|
+
children: W.map((x, V) => {
|
|
3194
|
+
const $ = Me(V);
|
|
3195
3195
|
return /* @__PURE__ */ e(
|
|
3196
3196
|
"button",
|
|
3197
3197
|
{
|
|
3198
3198
|
type: "button",
|
|
3199
3199
|
role: "option",
|
|
3200
|
-
"data-month":
|
|
3201
|
-
"aria-selected":
|
|
3202
|
-
onClick: () =>
|
|
3203
|
-
disabled:
|
|
3200
|
+
"data-month": V,
|
|
3201
|
+
"aria-selected": V === ve,
|
|
3202
|
+
onClick: () => !$ && _(V),
|
|
3203
|
+
disabled: $,
|
|
3204
3204
|
className: p(
|
|
3205
3205
|
"w-full px-3 py-2 text-sm text-left transition-colors",
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3206
|
+
!$ && "hover:bg-secondary",
|
|
3207
|
+
V === ve && "bg-border text-foreground font-medium",
|
|
3208
|
+
$ && "text-border-dark cursor-not-allowed"
|
|
3209
3209
|
),
|
|
3210
|
-
children:
|
|
3210
|
+
children: x
|
|
3211
3211
|
},
|
|
3212
|
-
|
|
3212
|
+
x
|
|
3213
3213
|
);
|
|
3214
3214
|
})
|
|
3215
3215
|
}
|
|
@@ -3219,43 +3219,43 @@ const le = ({
|
|
|
3219
3219
|
/* @__PURE__ */ s(
|
|
3220
3220
|
"button",
|
|
3221
3221
|
{
|
|
3222
|
-
ref:
|
|
3222
|
+
ref: w,
|
|
3223
3223
|
type: "button",
|
|
3224
3224
|
onClick: ee,
|
|
3225
3225
|
className: "h-8 min-w-20 max-w-24 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground focus:outline-none focus:ring-2 focus:ring-primary flex items-center justify-between gap-1",
|
|
3226
3226
|
"aria-label": "Select year",
|
|
3227
3227
|
"aria-haspopup": "listbox",
|
|
3228
|
-
"aria-expanded":
|
|
3228
|
+
"aria-expanded": z,
|
|
3229
3229
|
children: [
|
|
3230
3230
|
/* @__PURE__ */ e("span", { children: re }),
|
|
3231
|
-
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform",
|
|
3231
|
+
/* @__PURE__ */ e(xe, { className: p("w-4 h-4 text-primary transition-transform", z && "rotate-180") })
|
|
3232
3232
|
]
|
|
3233
3233
|
}
|
|
3234
3234
|
),
|
|
3235
|
-
|
|
3235
|
+
z && /* @__PURE__ */ e(
|
|
3236
3236
|
"div",
|
|
3237
3237
|
{
|
|
3238
3238
|
ref: F,
|
|
3239
3239
|
role: "listbox",
|
|
3240
3240
|
className: p(
|
|
3241
3241
|
"absolute z-60 w-28 rounded-md border border-border bg-background shadow-lg py-1 max-h-56 overflow-y-auto",
|
|
3242
|
-
|
|
3242
|
+
B === "bottom" ? "top-full mt-1" : "bottom-full mb-1"
|
|
3243
3243
|
),
|
|
3244
|
-
children: he.map((
|
|
3244
|
+
children: he.map((x) => /* @__PURE__ */ e(
|
|
3245
3245
|
"button",
|
|
3246
3246
|
{
|
|
3247
3247
|
type: "button",
|
|
3248
3248
|
role: "option",
|
|
3249
|
-
"data-year":
|
|
3250
|
-
"aria-selected":
|
|
3251
|
-
onClick: () =>
|
|
3249
|
+
"data-year": x,
|
|
3250
|
+
"aria-selected": x === re,
|
|
3251
|
+
onClick: () => Z(x),
|
|
3252
3252
|
className: p(
|
|
3253
3253
|
"w-full px-3 py-2 text-sm text-left hover:bg-secondary transition-colors",
|
|
3254
|
-
|
|
3254
|
+
x === re && "bg-border text-foreground font-medium"
|
|
3255
3255
|
),
|
|
3256
|
-
children:
|
|
3256
|
+
children: x
|
|
3257
3257
|
},
|
|
3258
|
-
|
|
3258
|
+
x
|
|
3259
3259
|
))
|
|
3260
3260
|
}
|
|
3261
3261
|
)
|
|
@@ -3267,40 +3267,40 @@ const le = ({
|
|
|
3267
3267
|
type: "button",
|
|
3268
3268
|
onClick: K,
|
|
3269
3269
|
className: "h-8 w-8 inline-flex items-center justify-center hover:bg-secondary rounded-lg transition-colors",
|
|
3270
|
-
children: /* @__PURE__ */ e(
|
|
3270
|
+
children: /* @__PURE__ */ e(qe, { className: "w-5 h-5 text-primary" })
|
|
3271
3271
|
}
|
|
3272
3272
|
)
|
|
3273
3273
|
] }),
|
|
3274
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-1 pb-1 border-b border-border", children:
|
|
3274
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-1 pb-1 border-b border-border", children: f.map((x) => /* @__PURE__ */ e(
|
|
3275
3275
|
"div",
|
|
3276
3276
|
{
|
|
3277
3277
|
className: "text-center text-[11px] font-medium text-primary/70 py-1",
|
|
3278
|
-
children:
|
|
3278
|
+
children: x
|
|
3279
3279
|
},
|
|
3280
|
-
|
|
3280
|
+
x
|
|
3281
3281
|
)) }),
|
|
3282
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: se.map((
|
|
3283
|
-
if (!
|
|
3284
|
-
return /* @__PURE__ */ e("div", { className: "aspect-square" }, `empty-${
|
|
3285
|
-
const
|
|
3282
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: se.map((x, V) => {
|
|
3283
|
+
if (!x)
|
|
3284
|
+
return /* @__PURE__ */ e("div", { className: "aspect-square" }, `empty-${V}`);
|
|
3285
|
+
const $ = we(x, t || null), ge = ae(x), ie = X(x);
|
|
3286
3286
|
return /* @__PURE__ */ e(
|
|
3287
3287
|
"button",
|
|
3288
3288
|
{
|
|
3289
3289
|
type: "button",
|
|
3290
|
-
onClick: () => !ie && be(
|
|
3290
|
+
onClick: () => !ie && be(x),
|
|
3291
3291
|
disabled: ie,
|
|
3292
3292
|
className: p(
|
|
3293
3293
|
"aspect-square rounded-lg flex items-center justify-center",
|
|
3294
3294
|
"text-[11px] font-medium transition-all duration-200",
|
|
3295
3295
|
"hover:bg-secondary",
|
|
3296
|
-
|
|
3297
|
-
ge &&
|
|
3296
|
+
$ && "bg-primary text-white hover:bg-primary-dark",
|
|
3297
|
+
ge && !$ && "border-2 border-primary text-primary",
|
|
3298
3298
|
ie && "text-border-dark cursor-not-allowed hover:bg-transparent",
|
|
3299
|
-
|
|
3299
|
+
!$ && !ge && !ie && "text-foreground"
|
|
3300
3300
|
),
|
|
3301
|
-
children:
|
|
3301
|
+
children: x.getDate()
|
|
3302
3302
|
},
|
|
3303
|
-
|
|
3303
|
+
x.toISOString()
|
|
3304
3304
|
);
|
|
3305
3305
|
}) }),
|
|
3306
3306
|
/* @__PURE__ */ e("div", { className: "mt-1.5 pt-1.5 border-t border-border", children: /* @__PURE__ */ e(
|
|
@@ -3316,7 +3316,7 @@ const le = ({
|
|
|
3316
3316
|
l && /* @__PURE__ */ e(
|
|
3317
3317
|
R.p,
|
|
3318
3318
|
{
|
|
3319
|
-
...
|
|
3319
|
+
...v ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3320
3320
|
className: "mt-1.5 text-sm text-error",
|
|
3321
3321
|
children: l
|
|
3322
3322
|
}
|
|
@@ -3566,7 +3566,7 @@ const le = ({
|
|
|
3566
3566
|
{ iso2: "YE", name: "Yemen", dialCode: "+967" },
|
|
3567
3567
|
{ iso2: "ZM", name: "Zambia", dialCode: "+260" },
|
|
3568
3568
|
{ iso2: "ZW", name: "Zimbabwe", dialCode: "+263" }
|
|
3569
|
-
],
|
|
3569
|
+
], We = (t) => {
|
|
3570
3570
|
const r = t.toUpperCase().split("").map((o) => 127397 + o.charCodeAt(0));
|
|
3571
3571
|
return String.fromCodePoint(...r);
|
|
3572
3572
|
}, Nt = ({
|
|
@@ -3582,49 +3582,49 @@ const le = ({
|
|
|
3582
3582
|
clearable: m = !0,
|
|
3583
3583
|
showFlags: u = !0,
|
|
3584
3584
|
disabled: g,
|
|
3585
|
-
animate:
|
|
3585
|
+
animate: v = !0,
|
|
3586
3586
|
className: S
|
|
3587
3587
|
}) => {
|
|
3588
|
-
const
|
|
3589
|
-
if (!d || !
|
|
3590
|
-
const
|
|
3591
|
-
return ue.filter((
|
|
3592
|
-
}, [
|
|
3593
|
-
|
|
3594
|
-
const
|
|
3595
|
-
|
|
3588
|
+
const E = v !== !1, [N, k] = U(!1), [C, I] = U(""), [O, D] = U("bottom"), z = Q(null), j = Q(null), B = Se(() => ue.find((b) => b.iso2 === t), [t]), h = Se(() => {
|
|
3589
|
+
if (!d || !C.trim()) return ue;
|
|
3590
|
+
const b = C.toLowerCase();
|
|
3591
|
+
return ue.filter((L) => L.name.toLowerCase().includes(b) || L.iso2.toLowerCase().includes(b) || L.dialCode.replace(/\s/g, "").includes(b.replace(/\s/g, "")));
|
|
3592
|
+
}, [C, d]);
|
|
3593
|
+
q(() => {
|
|
3594
|
+
const b = (L) => {
|
|
3595
|
+
z.current && !z.current.contains(L.target) && (k(!1), I(""));
|
|
3596
3596
|
};
|
|
3597
|
-
return document.addEventListener("mousedown",
|
|
3598
|
-
}, []),
|
|
3597
|
+
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
3598
|
+
}, []), q(() => {
|
|
3599
3599
|
if (!N) return;
|
|
3600
|
-
const
|
|
3601
|
-
if (!
|
|
3602
|
-
const
|
|
3603
|
-
if (
|
|
3604
|
-
|
|
3600
|
+
const b = () => {
|
|
3601
|
+
if (!j.current) return;
|
|
3602
|
+
const L = j.current.getBoundingClientRect(), P = d ? 360 : 300, G = window.innerHeight - L.bottom - 8, w = L.top - 8;
|
|
3603
|
+
if (G >= P) {
|
|
3604
|
+
D("bottom");
|
|
3605
3605
|
return;
|
|
3606
3606
|
}
|
|
3607
|
-
if (
|
|
3608
|
-
|
|
3607
|
+
if (w >= P) {
|
|
3608
|
+
D("top");
|
|
3609
3609
|
return;
|
|
3610
3610
|
}
|
|
3611
|
-
|
|
3611
|
+
D("bottom");
|
|
3612
3612
|
};
|
|
3613
|
-
return
|
|
3614
|
-
window.removeEventListener("resize",
|
|
3613
|
+
return b(), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0), () => {
|
|
3614
|
+
window.removeEventListener("resize", b), window.removeEventListener("scroll", b, !0);
|
|
3615
3615
|
};
|
|
3616
3616
|
}, [N, d]);
|
|
3617
|
-
const T = (
|
|
3618
|
-
r?.(
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3621
|
-
},
|
|
3622
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
3617
|
+
const T = (b) => {
|
|
3618
|
+
r?.(b);
|
|
3619
|
+
const L = ue.find((P) => P.iso2 === b);
|
|
3620
|
+
L && o?.(L), k(!1), I("");
|
|
3621
|
+
}, y = O === "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 } };
|
|
3622
|
+
return /* @__PURE__ */ s("div", { ref: z, className: p("w-full space-y-1.5", S), children: [
|
|
3623
3623
|
a && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3624
3624
|
a,
|
|
3625
3625
|
n && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
3626
3626
|
] }),
|
|
3627
|
-
/* @__PURE__ */ s("div", { ref:
|
|
3627
|
+
/* @__PURE__ */ s("div", { ref: j, className: "relative", children: [
|
|
3628
3628
|
/* @__PURE__ */ s(
|
|
3629
3629
|
"button",
|
|
3630
3630
|
{
|
|
@@ -3647,8 +3647,8 @@ const le = ({
|
|
|
3647
3647
|
),
|
|
3648
3648
|
children: [
|
|
3649
3649
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
3650
|
-
u &&
|
|
3651
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
3650
|
+
u && B && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: We(B.iso2) }),
|
|
3651
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !B && "text-foreground/50"), children: B ? B.name : l })
|
|
3652
3652
|
] }),
|
|
3653
3653
|
/* @__PURE__ */ e(
|
|
3654
3654
|
xe,
|
|
@@ -3662,12 +3662,12 @@ const le = ({
|
|
|
3662
3662
|
]
|
|
3663
3663
|
}
|
|
3664
3664
|
),
|
|
3665
|
-
|
|
3665
|
+
E ? /* @__PURE__ */ e(de, { children: N ? /* @__PURE__ */ e(le, { open: N, anchorRef: j, placement: O, children: /* @__PURE__ */ s(
|
|
3666
3666
|
R.div,
|
|
3667
3667
|
{
|
|
3668
|
-
initial:
|
|
3669
|
-
animate:
|
|
3670
|
-
exit:
|
|
3668
|
+
initial: y.initial,
|
|
3669
|
+
animate: y.animate,
|
|
3670
|
+
exit: y.exit,
|
|
3671
3671
|
transition: { duration: 0.2 },
|
|
3672
3672
|
role: "listbox",
|
|
3673
3673
|
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",
|
|
@@ -3679,12 +3679,12 @@ const le = ({
|
|
|
3679
3679
|
{
|
|
3680
3680
|
type: "text",
|
|
3681
3681
|
placeholder: "Search country or code",
|
|
3682
|
-
value:
|
|
3683
|
-
onChange: (
|
|
3682
|
+
value: C,
|
|
3683
|
+
onChange: (b) => I(b.target.value),
|
|
3684
3684
|
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
3685
|
}
|
|
3686
3686
|
),
|
|
3687
|
-
|
|
3687
|
+
C && /* @__PURE__ */ e(
|
|
3688
3688
|
"button",
|
|
3689
3689
|
{
|
|
3690
3690
|
type: "button",
|
|
@@ -3712,30 +3712,30 @@ const le = ({
|
|
|
3712
3712
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
3713
3713
|
}
|
|
3714
3714
|
),
|
|
3715
|
-
h.map((
|
|
3715
|
+
h.map((b) => /* @__PURE__ */ s(
|
|
3716
3716
|
"button",
|
|
3717
3717
|
{
|
|
3718
3718
|
type: "button",
|
|
3719
3719
|
role: "option",
|
|
3720
|
-
"aria-selected":
|
|
3721
|
-
onClick: () => T(
|
|
3720
|
+
"aria-selected": b.iso2 === B?.iso2,
|
|
3721
|
+
onClick: () => T(b.iso2),
|
|
3722
3722
|
className: p(
|
|
3723
3723
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3724
3724
|
"hover:bg-secondary transition-colors",
|
|
3725
|
-
|
|
3725
|
+
b.iso2 === B?.iso2 && "bg-border text-foreground"
|
|
3726
3726
|
),
|
|
3727
3727
|
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:
|
|
3728
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: We(b.iso2) }),
|
|
3729
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: b.name }),
|
|
3730
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: b.dialCode })
|
|
3731
3731
|
]
|
|
3732
3732
|
},
|
|
3733
|
-
|
|
3733
|
+
b.iso2
|
|
3734
3734
|
))
|
|
3735
3735
|
] })
|
|
3736
3736
|
]
|
|
3737
3737
|
}
|
|
3738
|
-
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef:
|
|
3738
|
+
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef: j, placement: O, children: /* @__PURE__ */ s(
|
|
3739
3739
|
"div",
|
|
3740
3740
|
{
|
|
3741
3741
|
role: "listbox",
|
|
@@ -3748,12 +3748,12 @@ const le = ({
|
|
|
3748
3748
|
{
|
|
3749
3749
|
type: "text",
|
|
3750
3750
|
placeholder: "Search country or code",
|
|
3751
|
-
value:
|
|
3752
|
-
onChange: (
|
|
3751
|
+
value: C,
|
|
3752
|
+
onChange: (b) => I(b.target.value),
|
|
3753
3753
|
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
3754
|
}
|
|
3755
3755
|
),
|
|
3756
|
-
|
|
3756
|
+
C && /* @__PURE__ */ e(
|
|
3757
3757
|
"button",
|
|
3758
3758
|
{
|
|
3759
3759
|
type: "button",
|
|
@@ -3781,25 +3781,25 @@ const le = ({
|
|
|
3781
3781
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
3782
3782
|
}
|
|
3783
3783
|
),
|
|
3784
|
-
h.map((
|
|
3784
|
+
h.map((b) => /* @__PURE__ */ s(
|
|
3785
3785
|
"button",
|
|
3786
3786
|
{
|
|
3787
3787
|
type: "button",
|
|
3788
3788
|
role: "option",
|
|
3789
|
-
"aria-selected":
|
|
3790
|
-
onClick: () => T(
|
|
3789
|
+
"aria-selected": b.iso2 === B?.iso2,
|
|
3790
|
+
onClick: () => T(b.iso2),
|
|
3791
3791
|
className: p(
|
|
3792
3792
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
3793
3793
|
"hover:bg-secondary transition-colors",
|
|
3794
|
-
|
|
3794
|
+
b.iso2 === B?.iso2 && "bg-border text-foreground"
|
|
3795
3795
|
),
|
|
3796
3796
|
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:
|
|
3797
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: We(b.iso2) }),
|
|
3798
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: b.name }),
|
|
3799
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: b.dialCode })
|
|
3800
3800
|
]
|
|
3801
3801
|
},
|
|
3802
|
-
|
|
3802
|
+
b.iso2
|
|
3803
3803
|
))
|
|
3804
3804
|
] })
|
|
3805
3805
|
]
|
|
@@ -3809,7 +3809,7 @@ const le = ({
|
|
|
3809
3809
|
i && /* @__PURE__ */ e(
|
|
3810
3810
|
R.p,
|
|
3811
3811
|
{
|
|
3812
|
-
...
|
|
3812
|
+
...E ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
3813
3813
|
className: "text-sm text-error",
|
|
3814
3814
|
children: i
|
|
3815
3815
|
}
|
|
@@ -3818,26 +3818,28 @@ const le = ({
|
|
|
3818
3818
|
] });
|
|
3819
3819
|
};
|
|
3820
3820
|
Nt.displayName = "CountrySelect";
|
|
3821
|
-
const
|
|
3821
|
+
const $e = (t) => {
|
|
3822
3822
|
const r = t.toUpperCase().split("").map((o) => 127397 + o.charCodeAt(0));
|
|
3823
3823
|
return String.fromCodePoint(...r);
|
|
3824
3824
|
}, Or = () => {
|
|
3825
3825
|
if (typeof navigator > "u") return null;
|
|
3826
3826
|
const r = (navigator.language || "").match(/[-_](\w{2})$/);
|
|
3827
3827
|
return r ? r[1].toUpperCase() : null;
|
|
3828
|
-
}, De = (t) => t.replace(/\s/g, ""), Ke = (t) => {
|
|
3829
|
-
const
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3828
|
+
}, De = (t) => t.replace(/\s/g, ""), Ke = (t, r) => {
|
|
3829
|
+
const o = t.replace(/\s/g, ""), a = o.startsWith("00") ? `+${o.slice(2)}` : o;
|
|
3830
|
+
if (!a.startsWith("+")) return;
|
|
3831
|
+
const n = ue.filter((i) => {
|
|
3832
|
+
const c = De(i.dialCode);
|
|
3833
|
+
return a.startsWith(c);
|
|
3834
|
+
}), l = r ? n.find((i) => i.iso2 === r.toUpperCase()) : void 0;
|
|
3835
|
+
return l || [...n].sort(
|
|
3836
|
+
(i, c) => De(c.dialCode).length - De(i.dialCode).length
|
|
3837
|
+
)[0];
|
|
3836
3838
|
}, kt = ({
|
|
3837
3839
|
value: t,
|
|
3838
3840
|
onChange: r,
|
|
3839
3841
|
country: o,
|
|
3840
|
-
defaultCountry: a = "
|
|
3842
|
+
defaultCountry: a = "KE",
|
|
3841
3843
|
autoDetect: n = !0,
|
|
3842
3844
|
onCountryChange: l,
|
|
3843
3845
|
label: i,
|
|
@@ -3846,48 +3848,48 @@ const We = (t) => {
|
|
|
3846
3848
|
searchable: m = !0,
|
|
3847
3849
|
showFlags: u = !0,
|
|
3848
3850
|
animate: g = !0,
|
|
3849
|
-
disabled:
|
|
3851
|
+
disabled: v,
|
|
3850
3852
|
required: S,
|
|
3851
|
-
className:
|
|
3853
|
+
className: E,
|
|
3852
3854
|
placeholder: N,
|
|
3853
3855
|
...k
|
|
3854
3856
|
}) => {
|
|
3855
|
-
const
|
|
3856
|
-
|
|
3857
|
-
o &&
|
|
3858
|
-
}, [o]),
|
|
3857
|
+
const C = g !== !1, [I, O] = U(!1), [D, z] = U(""), [j, B] = U(a), [h, T] = U("bottom"), y = Q(null), b = Q(null), L = Q(null), P = Q(!1);
|
|
3858
|
+
q(() => {
|
|
3859
|
+
o && B(o.toUpperCase());
|
|
3860
|
+
}, [o]), q(() => {
|
|
3859
3861
|
if (!o && n) {
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3862
|
+
const f = Or();
|
|
3863
|
+
f && B(f);
|
|
3862
3864
|
}
|
|
3863
|
-
}, [n, o]),
|
|
3864
|
-
const
|
|
3865
|
-
|
|
3865
|
+
}, [n, o]), q(() => {
|
|
3866
|
+
const f = (J) => {
|
|
3867
|
+
y.current && !y.current.contains(J.target) && (O(!1), z(""));
|
|
3866
3868
|
};
|
|
3867
|
-
return document.addEventListener("mousedown",
|
|
3869
|
+
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
3868
3870
|
}, []);
|
|
3869
|
-
const
|
|
3870
|
-
const
|
|
3871
|
+
const G = Se(() => {
|
|
3872
|
+
const f = t ? Ke(t, o || j) : void 0;
|
|
3871
3873
|
if (o)
|
|
3872
|
-
return ue.find((K) => K.iso2 === o.toUpperCase()) ||
|
|
3873
|
-
if (
|
|
3874
|
-
return
|
|
3875
|
-
const
|
|
3876
|
-
return ue.find((Y) => Y.iso2 ===
|
|
3877
|
-
}, [o,
|
|
3878
|
-
|
|
3874
|
+
return ue.find((K) => K.iso2 === o.toUpperCase()) || f || ue[0];
|
|
3875
|
+
if (f)
|
|
3876
|
+
return f;
|
|
3877
|
+
const J = (j || a).toUpperCase();
|
|
3878
|
+
return ue.find((Y) => Y.iso2 === J) || ue[0];
|
|
3879
|
+
}, [o, j, a, t]);
|
|
3880
|
+
q(() => {
|
|
3879
3881
|
if (o || !t) return;
|
|
3880
|
-
const
|
|
3881
|
-
|
|
3882
|
-
}, [o, t,
|
|
3883
|
-
|
|
3884
|
-
}, [
|
|
3885
|
-
|
|
3886
|
-
}, [r,
|
|
3882
|
+
const f = Ke(t, j);
|
|
3883
|
+
f && f.iso2 !== j && B(f.iso2);
|
|
3884
|
+
}, [o, t, j]), q(() => {
|
|
3885
|
+
G && L.current !== G.iso2 && (L.current = G.iso2, l?.(G));
|
|
3886
|
+
}, [G, l]), q(() => {
|
|
3887
|
+
P.current || r && (t ?? "").trim() === "" && (P.current = !0, r(G.dialCode));
|
|
3888
|
+
}, [r, G.dialCode, t]), q(() => {
|
|
3887
3889
|
if (!I) return;
|
|
3888
|
-
const
|
|
3889
|
-
if (!
|
|
3890
|
-
const
|
|
3890
|
+
const f = () => {
|
|
3891
|
+
if (!b.current) return;
|
|
3892
|
+
const J = b.current.getBoundingClientRect(), Y = m ? 360 : 300, K = window.innerHeight - J.bottom - 8, _ = J.top - 8;
|
|
3891
3893
|
if (K >= Y) {
|
|
3892
3894
|
T("bottom");
|
|
3893
3895
|
return;
|
|
@@ -3898,26 +3900,26 @@ const We = (t) => {
|
|
|
3898
3900
|
}
|
|
3899
3901
|
T("bottom");
|
|
3900
3902
|
};
|
|
3901
|
-
return
|
|
3902
|
-
window.removeEventListener("resize",
|
|
3903
|
+
return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
|
|
3904
|
+
window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
|
|
3903
3905
|
};
|
|
3904
3906
|
}, [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:
|
|
3907
|
+
const w = Se(() => {
|
|
3908
|
+
if (!m || !D.trim()) return ue;
|
|
3909
|
+
const f = D.toLowerCase();
|
|
3910
|
+
return ue.filter((J) => J.name.toLowerCase().includes(f) || J.iso2.toLowerCase().includes(f) || J.dialCode.replace(/\s/g, "").includes(f.replace(/\s/g, "")));
|
|
3911
|
+
}, [D, m]), F = (f) => {
|
|
3912
|
+
o || B(f.iso2), l?.(f);
|
|
3913
|
+
const J = (t ?? "").replace(/\s/g, ""), Y = Ke(J, o || j), K = Y ? De(Y.dialCode) : "";
|
|
3914
|
+
let _ = f.dialCode;
|
|
3915
|
+
J && (K && J.startsWith(K) ? _ = `${f.dialCode}${J.slice(K.length)}` : J.startsWith("+") ? _ = `${f.dialCode}${J.replace(/^\+[\d-]*/, "")}` : _ = `${f.dialCode}${J}`), r?.(_), O(!1), z("");
|
|
3916
|
+
}, 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 } };
|
|
3917
|
+
return /* @__PURE__ */ s("div", { ref: y, className: p("w-full space-y-1.5", E), children: [
|
|
3916
3918
|
i && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
3917
3919
|
i,
|
|
3918
3920
|
S && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
3919
3921
|
] }),
|
|
3920
|
-
/* @__PURE__ */ s("div", { ref:
|
|
3922
|
+
/* @__PURE__ */ s("div", { ref: b, className: "relative", children: [
|
|
3921
3923
|
/* @__PURE__ */ s(
|
|
3922
3924
|
"div",
|
|
3923
3925
|
{
|
|
@@ -3932,8 +3934,8 @@ const We = (t) => {
|
|
|
3932
3934
|
"button",
|
|
3933
3935
|
{
|
|
3934
3936
|
type: "button",
|
|
3935
|
-
onClick: () => !
|
|
3936
|
-
disabled:
|
|
3937
|
+
onClick: () => !v && O(!I),
|
|
3938
|
+
disabled: v,
|
|
3937
3939
|
className: p(
|
|
3938
3940
|
"flex items-center gap-2 px-3 py-2 text-left",
|
|
3939
3941
|
"border-r border-border/70",
|
|
@@ -3943,8 +3945,8 @@ const We = (t) => {
|
|
|
3943
3945
|
"aria-haspopup": "listbox",
|
|
3944
3946
|
"aria-expanded": I,
|
|
3945
3947
|
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:
|
|
3948
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: $e(G.iso2) }),
|
|
3949
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G.iso2 }),
|
|
3948
3950
|
/* @__PURE__ */ e(
|
|
3949
3951
|
xe,
|
|
3950
3952
|
{
|
|
@@ -3963,9 +3965,9 @@ const We = (t) => {
|
|
|
3963
3965
|
type: "tel",
|
|
3964
3966
|
inputMode: "tel",
|
|
3965
3967
|
value: t ?? "",
|
|
3966
|
-
onChange: (
|
|
3967
|
-
placeholder: N || `${
|
|
3968
|
-
disabled:
|
|
3968
|
+
onChange: (f) => r?.(f.target.value),
|
|
3969
|
+
placeholder: N || `${G.dialCode} Phone number`,
|
|
3970
|
+
disabled: v,
|
|
3969
3971
|
required: S,
|
|
3970
3972
|
className: p(
|
|
3971
3973
|
"flex-1 px-4 py-2.5 text-base bg-transparent text-foreground",
|
|
@@ -3978,12 +3980,12 @@ const We = (t) => {
|
|
|
3978
3980
|
]
|
|
3979
3981
|
}
|
|
3980
3982
|
),
|
|
3981
|
-
|
|
3983
|
+
C ? /* @__PURE__ */ e(de, { children: I ? /* @__PURE__ */ e(le, { open: I, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
3982
3984
|
R.div,
|
|
3983
3985
|
{
|
|
3984
|
-
initial:
|
|
3985
|
-
animate:
|
|
3986
|
-
exit:
|
|
3986
|
+
initial: W.initial,
|
|
3987
|
+
animate: W.animate,
|
|
3988
|
+
exit: W.exit,
|
|
3987
3989
|
transition: { duration: 0.2 },
|
|
3988
3990
|
role: "listbox",
|
|
3989
3991
|
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",
|
|
@@ -3995,45 +3997,45 @@ const We = (t) => {
|
|
|
3995
3997
|
{
|
|
3996
3998
|
type: "text",
|
|
3997
3999
|
placeholder: "Search country or code",
|
|
3998
|
-
value:
|
|
3999
|
-
onChange: (
|
|
4000
|
+
value: D,
|
|
4001
|
+
onChange: (f) => z(f.target.value),
|
|
4000
4002
|
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
4003
|
}
|
|
4002
4004
|
),
|
|
4003
|
-
|
|
4005
|
+
D && /* @__PURE__ */ e(
|
|
4004
4006
|
"button",
|
|
4005
4007
|
{
|
|
4006
4008
|
type: "button",
|
|
4007
|
-
onClick: () =>
|
|
4009
|
+
onClick: () => z(""),
|
|
4008
4010
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4009
4011
|
"aria-label": "Clear search",
|
|
4010
4012
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
4011
4013
|
}
|
|
4012
4014
|
)
|
|
4013
4015
|
] }) }),
|
|
4014
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4016
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: w.map((f) => /* @__PURE__ */ s(
|
|
4015
4017
|
"button",
|
|
4016
4018
|
{
|
|
4017
4019
|
type: "button",
|
|
4018
4020
|
role: "option",
|
|
4019
|
-
"aria-selected":
|
|
4020
|
-
onClick: () => F(
|
|
4021
|
+
"aria-selected": f.iso2 === G.iso2,
|
|
4022
|
+
onClick: () => F(f),
|
|
4021
4023
|
className: p(
|
|
4022
4024
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
4023
4025
|
"hover:bg-secondary transition-colors",
|
|
4024
|
-
|
|
4026
|
+
f.iso2 === G.iso2 && "bg-border text-foreground"
|
|
4025
4027
|
),
|
|
4026
4028
|
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:
|
|
4029
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: $e(f.iso2) }),
|
|
4030
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: f.name }),
|
|
4031
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: f.dialCode })
|
|
4030
4032
|
]
|
|
4031
4033
|
},
|
|
4032
|
-
|
|
4034
|
+
f.iso2
|
|
4033
4035
|
)) })
|
|
4034
4036
|
]
|
|
4035
4037
|
}
|
|
4036
|
-
) }) : null }) : I && /* @__PURE__ */ e(le, { open: I, anchorRef:
|
|
4038
|
+
) }) : null }) : I && /* @__PURE__ */ e(le, { open: I, anchorRef: b, placement: h, children: /* @__PURE__ */ s(
|
|
4037
4039
|
"div",
|
|
4038
4040
|
{
|
|
4039
4041
|
role: "listbox",
|
|
@@ -4046,41 +4048,41 @@ const We = (t) => {
|
|
|
4046
4048
|
{
|
|
4047
4049
|
type: "text",
|
|
4048
4050
|
placeholder: "Search country or code",
|
|
4049
|
-
value:
|
|
4050
|
-
onChange: (
|
|
4051
|
+
value: D,
|
|
4052
|
+
onChange: (f) => z(f.target.value),
|
|
4051
4053
|
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
4054
|
}
|
|
4053
4055
|
),
|
|
4054
|
-
|
|
4056
|
+
D && /* @__PURE__ */ e(
|
|
4055
4057
|
"button",
|
|
4056
4058
|
{
|
|
4057
4059
|
type: "button",
|
|
4058
|
-
onClick: () =>
|
|
4060
|
+
onClick: () => z(""),
|
|
4059
4061
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
4060
4062
|
"aria-label": "Clear search",
|
|
4061
4063
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
4062
4064
|
}
|
|
4063
4065
|
)
|
|
4064
4066
|
] }) }),
|
|
4065
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children:
|
|
4067
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-64 p-2 space-y-1", children: w.map((f) => /* @__PURE__ */ s(
|
|
4066
4068
|
"button",
|
|
4067
4069
|
{
|
|
4068
4070
|
type: "button",
|
|
4069
4071
|
role: "option",
|
|
4070
|
-
"aria-selected":
|
|
4071
|
-
onClick: () => F(
|
|
4072
|
+
"aria-selected": f.iso2 === G.iso2,
|
|
4073
|
+
onClick: () => F(f),
|
|
4072
4074
|
className: p(
|
|
4073
4075
|
"w-full px-3 py-2 text-left flex items-start gap-2 rounded-sm cursor-pointer",
|
|
4074
4076
|
"hover:bg-secondary transition-colors",
|
|
4075
|
-
|
|
4077
|
+
f.iso2 === G.iso2 && "bg-border text-foreground"
|
|
4076
4078
|
),
|
|
4077
4079
|
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:
|
|
4080
|
+
u && /* @__PURE__ */ e("span", { className: "text-base", "aria-hidden": !0, children: $e(f.iso2) }),
|
|
4081
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground wrap-break-word whitespace-normal", children: f.name }),
|
|
4082
|
+
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-primary/70", children: f.dialCode })
|
|
4081
4083
|
]
|
|
4082
4084
|
},
|
|
4083
|
-
|
|
4085
|
+
f.iso2
|
|
4084
4086
|
)) })
|
|
4085
4087
|
]
|
|
4086
4088
|
}
|
|
@@ -4089,7 +4091,7 @@ const We = (t) => {
|
|
|
4089
4091
|
c && /* @__PURE__ */ e(
|
|
4090
4092
|
R.p,
|
|
4091
4093
|
{
|
|
4092
|
-
...
|
|
4094
|
+
...C ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4093
4095
|
className: "text-sm text-error",
|
|
4094
4096
|
children: c
|
|
4095
4097
|
}
|
|
@@ -4098,117 +4100,107 @@ const We = (t) => {
|
|
|
4098
4100
|
] });
|
|
4099
4101
|
};
|
|
4100
4102
|
kt.displayName = "PhoneInput";
|
|
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);
|
|
4103
|
+
const Vr = Le(
|
|
4104
|
+
(t, r) => {
|
|
4105
|
+
const o = t.animate !== !1, [a, n] = U(!1), l = (y) => {
|
|
4106
|
+
t.onChange?.(y), t.onValueChange?.(y);
|
|
4121
4107
|
};
|
|
4122
|
-
if (
|
|
4108
|
+
if (t.type === "phone" || t.type === "tel") {
|
|
4109
|
+
const { type: y, value: b, onChange: L, onValueChange: P, ...G } = t;
|
|
4123
4110
|
return /* @__PURE__ */ e(
|
|
4124
4111
|
kt,
|
|
4125
4112
|
{
|
|
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
|
|
4113
|
+
...G,
|
|
4114
|
+
value: typeof b == "string" ? b : "",
|
|
4115
|
+
onChange: (w) => l(w)
|
|
4136
4116
|
}
|
|
4137
4117
|
);
|
|
4138
|
-
|
|
4118
|
+
}
|
|
4119
|
+
if (t.type === "country") {
|
|
4120
|
+
const { type: y, value: b, onChange: L, onValueChange: P, ...G } = t;
|
|
4139
4121
|
return /* @__PURE__ */ e(
|
|
4140
4122
|
Nt,
|
|
4141
4123
|
{
|
|
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
|
|
4124
|
+
...G,
|
|
4125
|
+
value: typeof b == "string" ? b : "",
|
|
4126
|
+
onChange: (w) => l(w)
|
|
4152
4127
|
}
|
|
4153
4128
|
);
|
|
4154
|
-
|
|
4129
|
+
}
|
|
4130
|
+
if (t.type === "date") {
|
|
4131
|
+
const { type: y, value: b, onChange: L, onValueChange: P, ...G } = t;
|
|
4155
4132
|
return /* @__PURE__ */ e(
|
|
4156
4133
|
Fr,
|
|
4157
4134
|
{
|
|
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
|
|
4135
|
+
...G,
|
|
4136
|
+
value: b instanceof Date ? b : void 0,
|
|
4137
|
+
onChange: (w) => l(w)
|
|
4168
4138
|
}
|
|
4169
4139
|
);
|
|
4170
|
-
|
|
4140
|
+
}
|
|
4141
|
+
const i = t, {
|
|
4142
|
+
label: c,
|
|
4143
|
+
error: d,
|
|
4144
|
+
hint: m,
|
|
4145
|
+
leftIcon: u,
|
|
4146
|
+
rightIcon: g,
|
|
4147
|
+
animate: v,
|
|
4148
|
+
className: S,
|
|
4149
|
+
type: E,
|
|
4150
|
+
value: N,
|
|
4151
|
+
placeholder: k,
|
|
4152
|
+
disabled: C,
|
|
4153
|
+
required: I,
|
|
4154
|
+
onChange: O,
|
|
4155
|
+
onValueChange: D,
|
|
4156
|
+
onWheel: z,
|
|
4157
|
+
...j
|
|
4158
|
+
} = i, B = E === "number", h = E === "password";
|
|
4171
4159
|
return /* @__PURE__ */ s("div", { className: "w-full space-y-1.5", children: [
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4160
|
+
c && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4161
|
+
c,
|
|
4162
|
+
I && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
4175
4163
|
] }),
|
|
4176
4164
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4177
|
-
|
|
4165
|
+
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
4166
|
/* @__PURE__ */ e(
|
|
4179
4167
|
"input",
|
|
4180
4168
|
{
|
|
4181
|
-
ref:
|
|
4182
|
-
type:
|
|
4169
|
+
ref: r,
|
|
4170
|
+
type: h && a ? "text" : E,
|
|
4183
4171
|
className: p(
|
|
4184
4172
|
"w-full rounded-md border transition-all duration-200",
|
|
4185
4173
|
"bg-background text-foreground placeholder:text-foreground/50",
|
|
4186
4174
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
4187
4175
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
4188
4176
|
"touch-target text-base",
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4177
|
+
B && "number-input",
|
|
4178
|
+
d && "border-error focus:ring-error",
|
|
4179
|
+
!d && "border-border",
|
|
4180
|
+
S
|
|
4192
4181
|
),
|
|
4193
4182
|
style: {
|
|
4194
4183
|
paddingTop: "12px",
|
|
4195
4184
|
paddingBottom: "12px",
|
|
4196
|
-
paddingLeft:
|
|
4197
|
-
paddingRight:
|
|
4185
|
+
paddingLeft: u ? "44px" : "16px",
|
|
4186
|
+
paddingRight: g || h ? "44px" : "16px"
|
|
4198
4187
|
},
|
|
4199
|
-
value:
|
|
4200
|
-
onChange: (
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4188
|
+
value: N,
|
|
4189
|
+
onChange: (y) => l(y.target.value),
|
|
4190
|
+
onWheel: B ? (y) => {
|
|
4191
|
+
y.preventDefault(), z?.(y);
|
|
4192
|
+
} : z,
|
|
4193
|
+
placeholder: k,
|
|
4194
|
+
disabled: C,
|
|
4195
|
+
required: I,
|
|
4196
|
+
...j
|
|
4205
4197
|
}
|
|
4206
4198
|
),
|
|
4207
|
-
|
|
4199
|
+
h && /* @__PURE__ */ e(
|
|
4208
4200
|
R.button,
|
|
4209
4201
|
{
|
|
4210
4202
|
type: "button",
|
|
4211
|
-
onClick: () =>
|
|
4203
|
+
onClick: () => n(!a),
|
|
4212
4204
|
className: "absolute text-primary hover:text-primary-dark transition-colors",
|
|
4213
4205
|
style: {
|
|
4214
4206
|
right: "14px",
|
|
@@ -4217,29 +4209,29 @@ const Ur = Le(
|
|
|
4217
4209
|
alignItems: "center",
|
|
4218
4210
|
justifyContent: "center"
|
|
4219
4211
|
},
|
|
4220
|
-
"aria-label":
|
|
4221
|
-
whileTap:
|
|
4212
|
+
"aria-label": a ? "Hide password" : "Show password",
|
|
4213
|
+
whileTap: o ? { scale: 0.9, y: "-50%" } : void 0,
|
|
4222
4214
|
animate: { y: "-50%" },
|
|
4223
|
-
transition:
|
|
4224
|
-
children:
|
|
4215
|
+
transition: o ? { duration: 0.1 } : { duration: 0 },
|
|
4216
|
+
children: a ? /* @__PURE__ */ e(zt, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Et, { className: "w-5 h-5" })
|
|
4225
4217
|
}
|
|
4226
4218
|
),
|
|
4227
|
-
|
|
4219
|
+
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
4220
|
] }),
|
|
4229
|
-
|
|
4221
|
+
d && /* @__PURE__ */ e(
|
|
4230
4222
|
R.p,
|
|
4231
4223
|
{
|
|
4232
|
-
...
|
|
4224
|
+
...o ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
4233
4225
|
className: "text-sm text-error",
|
|
4234
|
-
children:
|
|
4226
|
+
children: d
|
|
4235
4227
|
}
|
|
4236
4228
|
),
|
|
4237
|
-
|
|
4229
|
+
m && !d && /* @__PURE__ */ e("p", { className: "text-sm text-primary/70", children: m })
|
|
4238
4230
|
] });
|
|
4239
4231
|
}
|
|
4240
4232
|
);
|
|
4241
|
-
|
|
4242
|
-
const
|
|
4233
|
+
Vr.displayName = "Input";
|
|
4234
|
+
const Ur = Le(
|
|
4243
4235
|
({ label: t, error: r, helperText: o, className: a, required: n, animate: l = !0, ...i }, c) => {
|
|
4244
4236
|
const d = l !== !1;
|
|
4245
4237
|
return /* @__PURE__ */ s(
|
|
@@ -4283,10 +4275,10 @@ const Vr = Le(
|
|
|
4283
4275
|
);
|
|
4284
4276
|
}
|
|
4285
4277
|
);
|
|
4286
|
-
|
|
4278
|
+
Ur.displayName = "Textarea";
|
|
4287
4279
|
const Te = Le(
|
|
4288
4280
|
({ label: t, description: r, className: o, checked: a, defaultChecked: n, onChange: l, animate: i = !0, ...c }, d) => {
|
|
4289
|
-
const m = i !== !1, [u, g] =
|
|
4281
|
+
const m = i !== !1, [u, g] = U(n || !1), v = a !== void 0 ? a : u;
|
|
4290
4282
|
return /* @__PURE__ */ s("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
4291
4283
|
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
4292
4284
|
/* @__PURE__ */ e(
|
|
@@ -4295,9 +4287,9 @@ const Te = Le(
|
|
|
4295
4287
|
ref: d,
|
|
4296
4288
|
type: "checkbox",
|
|
4297
4289
|
className: "sr-only peer",
|
|
4298
|
-
checked:
|
|
4299
|
-
onChange: (
|
|
4300
|
-
a === void 0 && g(
|
|
4290
|
+
checked: v,
|
|
4291
|
+
onChange: (E) => {
|
|
4292
|
+
a === void 0 && g(E.target.checked), l?.(E.target.checked);
|
|
4301
4293
|
},
|
|
4302
4294
|
...c
|
|
4303
4295
|
}
|
|
@@ -4310,13 +4302,13 @@ const Te = Le(
|
|
|
4310
4302
|
"peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2",
|
|
4311
4303
|
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
4312
4304
|
"flex items-center justify-center",
|
|
4313
|
-
|
|
4305
|
+
v ? "bg-primary border-primary" : "border-border bg-secondary",
|
|
4314
4306
|
o
|
|
4315
4307
|
),
|
|
4316
4308
|
whileTap: m ? { scale: 0.95 } : void 0,
|
|
4317
4309
|
children: /* @__PURE__ */ e(lt, { className: p(
|
|
4318
4310
|
"w-3 h-3 text-white transition-opacity duration-200",
|
|
4319
|
-
|
|
4311
|
+
v ? "opacity-100" : "opacity-0"
|
|
4320
4312
|
) })
|
|
4321
4313
|
}
|
|
4322
4314
|
)
|
|
@@ -4435,7 +4427,7 @@ const co = ({
|
|
|
4435
4427
|
className: m,
|
|
4436
4428
|
animate: u = !0
|
|
4437
4429
|
}) => {
|
|
4438
|
-
const g = u !== !1, [
|
|
4430
|
+
const g = u !== !1, [v, S] = U(!1), E = (t - o) / (a - o) * 100;
|
|
4439
4431
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-2", m), children: [
|
|
4440
4432
|
(l || i) && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
4441
4433
|
l && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-primary", children: l }),
|
|
@@ -4449,9 +4441,9 @@ const co = ({
|
|
|
4449
4441
|
R.div,
|
|
4450
4442
|
{
|
|
4451
4443
|
className: "absolute left-0 top-0 h-full bg-primary rounded-full",
|
|
4452
|
-
style: { width: `${
|
|
4444
|
+
style: { width: `${E}%` },
|
|
4453
4445
|
initial: !1,
|
|
4454
|
-
animate: g ? { width: `${
|
|
4446
|
+
animate: g ? { width: `${E}%` } : void 0,
|
|
4455
4447
|
transition: g ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4456
4448
|
}
|
|
4457
4449
|
) }),
|
|
@@ -4481,8 +4473,8 @@ const co = ({
|
|
|
4481
4473
|
"pointer-events-none",
|
|
4482
4474
|
d && "opacity-50"
|
|
4483
4475
|
),
|
|
4484
|
-
style: { left: `calc(${
|
|
4485
|
-
animate: g ? { scale:
|
|
4476
|
+
style: { left: `calc(${E}% - 12px)` },
|
|
4477
|
+
animate: g ? { scale: v ? 1.2 : 1 } : void 0,
|
|
4486
4478
|
transition: g ? { type: "spring", stiffness: 300, damping: 20 } : { duration: 0 }
|
|
4487
4479
|
}
|
|
4488
4480
|
)
|
|
@@ -4502,9 +4494,9 @@ const co = ({
|
|
|
4502
4494
|
className: u,
|
|
4503
4495
|
animate: g = !0
|
|
4504
4496
|
}) => {
|
|
4505
|
-
const
|
|
4506
|
-
const I = i -
|
|
4507
|
-
o(
|
|
4497
|
+
const v = g !== !1, S = t + r, E = S > 0 ? t / S * 100 : 50, N = S > 0 ? r / S * 100 : 50, k = (C) => {
|
|
4498
|
+
const I = i - C;
|
|
4499
|
+
o(C, Math.max(l, Math.min(i, I)));
|
|
4508
4500
|
};
|
|
4509
4501
|
return /* @__PURE__ */ s("div", { className: p("w-full space-y-3", u), children: [
|
|
4510
4502
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
@@ -4521,8 +4513,8 @@ const co = ({
|
|
|
4521
4513
|
{
|
|
4522
4514
|
className: "h-full bg-primary",
|
|
4523
4515
|
initial: !1,
|
|
4524
|
-
animate:
|
|
4525
|
-
transition:
|
|
4516
|
+
animate: v ? { width: `${E}%` } : void 0,
|
|
4517
|
+
transition: v ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4526
4518
|
}
|
|
4527
4519
|
) }),
|
|
4528
4520
|
/* @__PURE__ */ e(
|
|
@@ -4533,7 +4525,7 @@ const co = ({
|
|
|
4533
4525
|
max: i,
|
|
4534
4526
|
step: c,
|
|
4535
4527
|
value: t,
|
|
4536
|
-
onChange: (
|
|
4528
|
+
onChange: (C) => k(Number(C.target.value)),
|
|
4537
4529
|
disabled: m,
|
|
4538
4530
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4539
4531
|
}
|
|
@@ -4554,8 +4546,8 @@ const co = ({
|
|
|
4554
4546
|
{
|
|
4555
4547
|
className: "h-full bg-success",
|
|
4556
4548
|
initial: !1,
|
|
4557
|
-
animate:
|
|
4558
|
-
transition:
|
|
4549
|
+
animate: v ? { width: `${N}%` } : void 0,
|
|
4550
|
+
transition: v ? { type: "spring", stiffness: 300, damping: 30 } : { duration: 0 }
|
|
4559
4551
|
}
|
|
4560
4552
|
) }),
|
|
4561
4553
|
/* @__PURE__ */ e(
|
|
@@ -4566,7 +4558,7 @@ const co = ({
|
|
|
4566
4558
|
max: i,
|
|
4567
4559
|
step: c,
|
|
4568
4560
|
value: r,
|
|
4569
|
-
onChange: (
|
|
4561
|
+
onChange: (C) => k(i - Number(C.target.value)),
|
|
4570
4562
|
disabled: m,
|
|
4571
4563
|
className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
|
|
4572
4564
|
}
|
|
@@ -4592,44 +4584,44 @@ const co = ({
|
|
|
4592
4584
|
className: m,
|
|
4593
4585
|
animate: u = !0
|
|
4594
4586
|
}) => {
|
|
4595
|
-
const g = u !== !1, [
|
|
4596
|
-
(h) => h.label.toLowerCase().includes(
|
|
4587
|
+
const g = u !== !1, [v, S] = U(!1), [E, N] = U(""), [k, C] = U("bottom"), I = Q(null), O = Q(null), D = t.find((h) => h.value === r), z = i ? t.filter(
|
|
4588
|
+
(h) => h.label.toLowerCase().includes(E.toLowerCase())
|
|
4597
4589
|
) : t;
|
|
4598
|
-
|
|
4590
|
+
q(() => {
|
|
4599
4591
|
const h = (T) => {
|
|
4600
4592
|
I.current && !I.current.contains(T.target) && (S(!1), N(""));
|
|
4601
4593
|
};
|
|
4602
4594
|
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
4603
|
-
}, []),
|
|
4604
|
-
if (!
|
|
4595
|
+
}, []), q(() => {
|
|
4596
|
+
if (!v) return;
|
|
4605
4597
|
const h = () => {
|
|
4606
|
-
if (!
|
|
4607
|
-
const T =
|
|
4608
|
-
if (
|
|
4609
|
-
|
|
4598
|
+
if (!O.current) return;
|
|
4599
|
+
const T = O.current.getBoundingClientRect(), y = i ? 360 : 300, b = window.innerHeight - T.bottom - 8, L = T.top - 8;
|
|
4600
|
+
if (b >= y) {
|
|
4601
|
+
C("bottom");
|
|
4610
4602
|
return;
|
|
4611
4603
|
}
|
|
4612
|
-
if (
|
|
4613
|
-
|
|
4604
|
+
if (L >= y) {
|
|
4605
|
+
C("top");
|
|
4614
4606
|
return;
|
|
4615
4607
|
}
|
|
4616
|
-
|
|
4608
|
+
C("bottom");
|
|
4617
4609
|
};
|
|
4618
4610
|
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
4619
4611
|
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
4620
4612
|
};
|
|
4621
|
-
}, [
|
|
4622
|
-
const
|
|
4613
|
+
}, [v, i]);
|
|
4614
|
+
const j = (h) => {
|
|
4623
4615
|
o(h), S(!1), N("");
|
|
4624
|
-
},
|
|
4616
|
+
}, 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
4617
|
return /* @__PURE__ */ s("div", { ref: I, className: p("relative w-full", m), children: [
|
|
4626
4618
|
n && /* @__PURE__ */ e("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: n }),
|
|
4627
4619
|
/* @__PURE__ */ s(
|
|
4628
4620
|
"button",
|
|
4629
4621
|
{
|
|
4630
|
-
ref:
|
|
4622
|
+
ref: O,
|
|
4631
4623
|
type: "button",
|
|
4632
|
-
onClick: () => !d && S(!
|
|
4624
|
+
onClick: () => !d && S(!v),
|
|
4633
4625
|
disabled: d,
|
|
4634
4626
|
className: p(
|
|
4635
4627
|
"w-full px-4 py-3 rounded-md border transition-all duration-200",
|
|
@@ -4639,31 +4631,31 @@ const co = ({
|
|
|
4639
4631
|
"touch-target",
|
|
4640
4632
|
l && "border-error",
|
|
4641
4633
|
!l && "border-border",
|
|
4642
|
-
|
|
4634
|
+
v && "ring-2 ring-primary"
|
|
4643
4635
|
),
|
|
4644
4636
|
children: [
|
|
4645
4637
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
4646
|
-
|
|
4647
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
4638
|
+
D?.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: D.icon }),
|
|
4639
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !D && "text-foreground/50"), children: D?.label || a })
|
|
4648
4640
|
] }),
|
|
4649
4641
|
/* @__PURE__ */ e(
|
|
4650
4642
|
xe,
|
|
4651
4643
|
{
|
|
4652
4644
|
className: p(
|
|
4653
4645
|
"w-5 h-5 text-primary transition-transform shrink-0",
|
|
4654
|
-
|
|
4646
|
+
v && "rotate-180"
|
|
4655
4647
|
)
|
|
4656
4648
|
}
|
|
4657
4649
|
)
|
|
4658
4650
|
]
|
|
4659
4651
|
}
|
|
4660
4652
|
),
|
|
4661
|
-
g ? /* @__PURE__ */ e(de, { children:
|
|
4653
|
+
g ? /* @__PURE__ */ e(de, { children: v ? /* @__PURE__ */ e(le, { open: v, anchorRef: O, placement: k, children: /* @__PURE__ */ s(
|
|
4662
4654
|
R.div,
|
|
4663
4655
|
{
|
|
4664
|
-
initial:
|
|
4665
|
-
animate:
|
|
4666
|
-
exit:
|
|
4656
|
+
initial: B.initial,
|
|
4657
|
+
animate: B.animate,
|
|
4658
|
+
exit: B.exit,
|
|
4667
4659
|
transition: { duration: 0.2 },
|
|
4668
4660
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
4669
4661
|
children: [
|
|
@@ -4674,12 +4666,12 @@ const co = ({
|
|
|
4674
4666
|
{
|
|
4675
4667
|
type: "text",
|
|
4676
4668
|
placeholder: "Search...",
|
|
4677
|
-
value:
|
|
4669
|
+
value: E,
|
|
4678
4670
|
onChange: (h) => N(h.target.value),
|
|
4679
4671
|
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
4672
|
}
|
|
4681
4673
|
),
|
|
4682
|
-
|
|
4674
|
+
E && /* @__PURE__ */ e(
|
|
4683
4675
|
"button",
|
|
4684
4676
|
{
|
|
4685
4677
|
onClick: () => N(""),
|
|
@@ -4693,7 +4685,7 @@ const co = ({
|
|
|
4693
4685
|
"button",
|
|
4694
4686
|
{
|
|
4695
4687
|
type: "button",
|
|
4696
|
-
onClick: () =>
|
|
4688
|
+
onClick: () => j(""),
|
|
4697
4689
|
className: p(
|
|
4698
4690
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4699
4691
|
"hover:bg-secondary transition-colors",
|
|
@@ -4703,10 +4695,10 @@ const co = ({
|
|
|
4703
4695
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4704
4696
|
}
|
|
4705
4697
|
),
|
|
4706
|
-
|
|
4698
|
+
z.length > 0 ? z.map((h) => /* @__PURE__ */ s(
|
|
4707
4699
|
"button",
|
|
4708
4700
|
{
|
|
4709
|
-
onClick: () =>
|
|
4701
|
+
onClick: () => j(h.value),
|
|
4710
4702
|
className: p(
|
|
4711
4703
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4712
4704
|
"hover:bg-secondary transition-colors",
|
|
@@ -4722,7 +4714,7 @@ const co = ({
|
|
|
4722
4714
|
] })
|
|
4723
4715
|
]
|
|
4724
4716
|
}
|
|
4725
|
-
) }) : null }) :
|
|
4717
|
+
) }) : null }) : v && /* @__PURE__ */ e(le, { open: v, anchorRef: O, 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
4718
|
i && /* @__PURE__ */ e("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4727
4719
|
/* @__PURE__ */ e(fe, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
|
|
4728
4720
|
/* @__PURE__ */ e(
|
|
@@ -4730,12 +4722,12 @@ const co = ({
|
|
|
4730
4722
|
{
|
|
4731
4723
|
type: "text",
|
|
4732
4724
|
placeholder: "Search...",
|
|
4733
|
-
value:
|
|
4725
|
+
value: E,
|
|
4734
4726
|
onChange: (h) => N(h.target.value),
|
|
4735
4727
|
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
4728
|
}
|
|
4737
4729
|
),
|
|
4738
|
-
|
|
4730
|
+
E && /* @__PURE__ */ e(
|
|
4739
4731
|
"button",
|
|
4740
4732
|
{
|
|
4741
4733
|
onClick: () => N(""),
|
|
@@ -4749,7 +4741,7 @@ const co = ({
|
|
|
4749
4741
|
"button",
|
|
4750
4742
|
{
|
|
4751
4743
|
type: "button",
|
|
4752
|
-
onClick: () =>
|
|
4744
|
+
onClick: () => j(""),
|
|
4753
4745
|
className: p(
|
|
4754
4746
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4755
4747
|
"hover:bg-secondary transition-colors",
|
|
@@ -4759,10 +4751,10 @@ const co = ({
|
|
|
4759
4751
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4760
4752
|
}
|
|
4761
4753
|
),
|
|
4762
|
-
|
|
4754
|
+
z.length > 0 ? z.map((h) => /* @__PURE__ */ s(
|
|
4763
4755
|
"button",
|
|
4764
4756
|
{
|
|
4765
|
-
onClick: () =>
|
|
4757
|
+
onClick: () => j(h.value),
|
|
4766
4758
|
className: p(
|
|
4767
4759
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4768
4760
|
"hover:bg-secondary transition-colors",
|
|
@@ -4800,44 +4792,44 @@ const co = ({
|
|
|
4800
4792
|
disabled: m,
|
|
4801
4793
|
required: u,
|
|
4802
4794
|
className: g,
|
|
4803
|
-
animate:
|
|
4795
|
+
animate: v = !0
|
|
4804
4796
|
}, S) => {
|
|
4805
|
-
const
|
|
4806
|
-
(
|
|
4797
|
+
const E = v !== !1, [N, k] = U(!1), [C, I] = U(""), [O, D] = U("bottom"), z = Q(null), j = t.find((y) => y.value === r), B = c ? t.filter(
|
|
4798
|
+
(y) => y.label.toLowerCase().includes(C.toLowerCase())
|
|
4807
4799
|
) : t;
|
|
4808
|
-
|
|
4809
|
-
const
|
|
4810
|
-
|
|
4800
|
+
q(() => {
|
|
4801
|
+
const y = (b) => {
|
|
4802
|
+
z.current && !z.current.contains(b.target) && (k(!1), I(""));
|
|
4811
4803
|
};
|
|
4812
|
-
return document.addEventListener("mousedown",
|
|
4813
|
-
}, []),
|
|
4804
|
+
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
4805
|
+
}, []), q(() => {
|
|
4814
4806
|
if (!N) return;
|
|
4815
|
-
const
|
|
4816
|
-
if (!
|
|
4817
|
-
const
|
|
4818
|
-
if (
|
|
4819
|
-
|
|
4807
|
+
const y = () => {
|
|
4808
|
+
if (!z.current) return;
|
|
4809
|
+
const b = z.current.getBoundingClientRect(), L = c ? 360 : 300, P = window.innerHeight - b.bottom - 8, G = b.top - 8;
|
|
4810
|
+
if (P >= L) {
|
|
4811
|
+
D("bottom");
|
|
4820
4812
|
return;
|
|
4821
4813
|
}
|
|
4822
|
-
if (
|
|
4823
|
-
|
|
4814
|
+
if (G >= L) {
|
|
4815
|
+
D("top");
|
|
4824
4816
|
return;
|
|
4825
4817
|
}
|
|
4826
|
-
|
|
4818
|
+
D("bottom");
|
|
4827
4819
|
};
|
|
4828
|
-
return
|
|
4829
|
-
window.removeEventListener("resize",
|
|
4820
|
+
return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
|
|
4821
|
+
window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
|
|
4830
4822
|
};
|
|
4831
4823
|
}, [N, c]);
|
|
4832
|
-
const h = (
|
|
4833
|
-
o(
|
|
4834
|
-
}, T =
|
|
4824
|
+
const h = (y) => {
|
|
4825
|
+
o(y), k(!1), I("");
|
|
4826
|
+
}, T = O === "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
4827
|
return /* @__PURE__ */ s("div", { ref: S, className: p("w-full space-y-1.5", g), children: [
|
|
4836
4828
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
4837
4829
|
n,
|
|
4838
4830
|
u && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
4839
4831
|
] }),
|
|
4840
|
-
/* @__PURE__ */ s("div", { ref:
|
|
4832
|
+
/* @__PURE__ */ s("div", { ref: z, className: "relative", children: [
|
|
4841
4833
|
/* @__PURE__ */ s(
|
|
4842
4834
|
"button",
|
|
4843
4835
|
{
|
|
@@ -4859,8 +4851,8 @@ const co = ({
|
|
|
4859
4851
|
),
|
|
4860
4852
|
children: [
|
|
4861
4853
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
4862
|
-
|
|
4863
|
-
/* @__PURE__ */ e("span", { className: p("truncate", !
|
|
4854
|
+
j?.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: j.icon }),
|
|
4855
|
+
/* @__PURE__ */ e("span", { className: p("truncate", !j && "text-foreground/50"), children: j?.label || a })
|
|
4864
4856
|
] }),
|
|
4865
4857
|
/* @__PURE__ */ e(
|
|
4866
4858
|
xe,
|
|
@@ -4874,7 +4866,7 @@ const co = ({
|
|
|
4874
4866
|
]
|
|
4875
4867
|
}
|
|
4876
4868
|
),
|
|
4877
|
-
|
|
4869
|
+
E ? /* @__PURE__ */ e(de, { children: N ? /* @__PURE__ */ e(le, { open: N, anchorRef: z, placement: O, children: /* @__PURE__ */ s(
|
|
4878
4870
|
R.div,
|
|
4879
4871
|
{
|
|
4880
4872
|
initial: T.initial,
|
|
@@ -4891,13 +4883,13 @@ const co = ({
|
|
|
4891
4883
|
{
|
|
4892
4884
|
type: "text",
|
|
4893
4885
|
placeholder: "Search...",
|
|
4894
|
-
value:
|
|
4895
|
-
onChange: (
|
|
4886
|
+
value: C,
|
|
4887
|
+
onChange: (y) => I(y.target.value),
|
|
4896
4888
|
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
4889
|
"aria-label": "Search options"
|
|
4898
4890
|
}
|
|
4899
4891
|
),
|
|
4900
|
-
|
|
4892
|
+
C && /* @__PURE__ */ e(
|
|
4901
4893
|
"button",
|
|
4902
4894
|
{
|
|
4903
4895
|
type: "button",
|
|
@@ -4925,31 +4917,31 @@ const co = ({
|
|
|
4925
4917
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4926
4918
|
}
|
|
4927
4919
|
),
|
|
4928
|
-
|
|
4920
|
+
B.length > 0 ? B.map((y) => /* @__PURE__ */ s(
|
|
4929
4921
|
"button",
|
|
4930
4922
|
{
|
|
4931
4923
|
type: "button",
|
|
4932
4924
|
role: "option",
|
|
4933
|
-
"aria-selected":
|
|
4934
|
-
onClick: () => !
|
|
4935
|
-
disabled:
|
|
4925
|
+
"aria-selected": y.value === r,
|
|
4926
|
+
onClick: () => !y.disabled && h(y.value),
|
|
4927
|
+
disabled: y.disabled,
|
|
4936
4928
|
className: p(
|
|
4937
4929
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
4938
4930
|
"hover:bg-secondary transition-colors",
|
|
4939
4931
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4940
|
-
|
|
4932
|
+
y.value === r && "bg-border text-foreground font-medium"
|
|
4941
4933
|
),
|
|
4942
4934
|
children: [
|
|
4943
|
-
|
|
4944
|
-
/* @__PURE__ */ e("span", { children:
|
|
4935
|
+
y.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: y.icon }),
|
|
4936
|
+
/* @__PURE__ */ e("span", { children: y.label })
|
|
4945
4937
|
]
|
|
4946
4938
|
},
|
|
4947
|
-
|
|
4939
|
+
y.value
|
|
4948
4940
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
4949
4941
|
] })
|
|
4950
4942
|
]
|
|
4951
4943
|
}
|
|
4952
|
-
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef:
|
|
4944
|
+
) }) : null }) : N && /* @__PURE__ */ e(le, { open: N, anchorRef: z, placement: O, children: /* @__PURE__ */ s(
|
|
4953
4945
|
R.div,
|
|
4954
4946
|
{
|
|
4955
4947
|
role: "listbox",
|
|
@@ -4962,13 +4954,13 @@ const co = ({
|
|
|
4962
4954
|
{
|
|
4963
4955
|
type: "text",
|
|
4964
4956
|
placeholder: "Search...",
|
|
4965
|
-
value:
|
|
4966
|
-
onChange: (
|
|
4957
|
+
value: C,
|
|
4958
|
+
onChange: (y) => I(y.target.value),
|
|
4967
4959
|
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
4960
|
"aria-label": "Search options"
|
|
4969
4961
|
}
|
|
4970
4962
|
),
|
|
4971
|
-
|
|
4963
|
+
C && /* @__PURE__ */ e(
|
|
4972
4964
|
"button",
|
|
4973
4965
|
{
|
|
4974
4966
|
type: "button",
|
|
@@ -4996,26 +4988,26 @@ const co = ({
|
|
|
4996
4988
|
children: /* @__PURE__ */ e("span", { children: "None" })
|
|
4997
4989
|
}
|
|
4998
4990
|
),
|
|
4999
|
-
|
|
4991
|
+
B.length > 0 ? B.map((y) => /* @__PURE__ */ s(
|
|
5000
4992
|
"button",
|
|
5001
4993
|
{
|
|
5002
4994
|
type: "button",
|
|
5003
4995
|
role: "option",
|
|
5004
|
-
"aria-selected":
|
|
5005
|
-
onClick: () => !
|
|
5006
|
-
disabled:
|
|
4996
|
+
"aria-selected": y.value === r,
|
|
4997
|
+
onClick: () => !y.disabled && h(y.value),
|
|
4998
|
+
disabled: y.disabled,
|
|
5007
4999
|
className: p(
|
|
5008
5000
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5009
5001
|
"hover:bg-secondary transition-colors",
|
|
5010
5002
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5011
|
-
|
|
5003
|
+
y.value === r && "bg-border text-foreground font-medium"
|
|
5012
5004
|
),
|
|
5013
5005
|
children: [
|
|
5014
|
-
|
|
5015
|
-
/* @__PURE__ */ e("span", { children:
|
|
5006
|
+
y.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: y.icon }),
|
|
5007
|
+
/* @__PURE__ */ e("span", { children: y.label })
|
|
5016
5008
|
]
|
|
5017
5009
|
},
|
|
5018
|
-
|
|
5010
|
+
y.value
|
|
5019
5011
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5020
5012
|
] })
|
|
5021
5013
|
]
|
|
@@ -5025,7 +5017,7 @@ const co = ({
|
|
|
5025
5017
|
l && /* @__PURE__ */ e(
|
|
5026
5018
|
R.p,
|
|
5027
5019
|
{
|
|
5028
|
-
...
|
|
5020
|
+
...E ? { initial: { opacity: 0, y: -5 }, animate: { opacity: 1, y: 0 } } : {},
|
|
5029
5021
|
className: "text-sm text-error",
|
|
5030
5022
|
children: l
|
|
5031
5023
|
}
|
|
@@ -5035,7 +5027,7 @@ const co = ({
|
|
|
5035
5027
|
}
|
|
5036
5028
|
);
|
|
5037
5029
|
Yr.displayName = "Select";
|
|
5038
|
-
const
|
|
5030
|
+
const Wr = Le(
|
|
5039
5031
|
({
|
|
5040
5032
|
options: t,
|
|
5041
5033
|
value: r = [],
|
|
@@ -5049,70 +5041,70 @@ const $r = Le(
|
|
|
5049
5041
|
maxItems: m,
|
|
5050
5042
|
disabled: u,
|
|
5051
5043
|
required: g,
|
|
5052
|
-
className:
|
|
5044
|
+
className: v,
|
|
5053
5045
|
animate: S = !0,
|
|
5054
|
-
chipVariant:
|
|
5046
|
+
chipVariant: E = "primary"
|
|
5055
5047
|
}, N) => {
|
|
5056
|
-
const k = S !== !1, [
|
|
5057
|
-
(
|
|
5048
|
+
const k = S !== !1, [C, I] = U(!1), [O, D] = U(""), [z, j] = U("bottom"), B = Q(null), h = t.filter((w) => r.includes(w.value)), T = c ? t.filter(
|
|
5049
|
+
(w) => w.label.toLowerCase().includes(O.toLowerCase())
|
|
5058
5050
|
) : t;
|
|
5059
|
-
|
|
5060
|
-
const
|
|
5061
|
-
|
|
5051
|
+
q(() => {
|
|
5052
|
+
const w = (F) => {
|
|
5053
|
+
B.current && !B.current.contains(F.target) && (I(!1), D(""));
|
|
5062
5054
|
};
|
|
5063
|
-
return document.addEventListener("mousedown",
|
|
5064
|
-
}, []),
|
|
5065
|
-
if (!
|
|
5066
|
-
const
|
|
5067
|
-
if (!
|
|
5068
|
-
const F =
|
|
5069
|
-
if (
|
|
5070
|
-
|
|
5055
|
+
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
5056
|
+
}, []), q(() => {
|
|
5057
|
+
if (!C) return;
|
|
5058
|
+
const w = () => {
|
|
5059
|
+
if (!B.current) return;
|
|
5060
|
+
const F = B.current.getBoundingClientRect(), W = c ? 360 : 300, f = window.innerHeight - F.bottom - 8, J = F.top - 8;
|
|
5061
|
+
if (f >= W) {
|
|
5062
|
+
j("bottom");
|
|
5071
5063
|
return;
|
|
5072
5064
|
}
|
|
5073
|
-
if (
|
|
5074
|
-
|
|
5065
|
+
if (J >= W) {
|
|
5066
|
+
j("top");
|
|
5075
5067
|
return;
|
|
5076
5068
|
}
|
|
5077
|
-
|
|
5069
|
+
j("bottom");
|
|
5078
5070
|
};
|
|
5079
|
-
return
|
|
5080
|
-
window.removeEventListener("resize",
|
|
5071
|
+
return w(), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
|
|
5072
|
+
window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
|
|
5081
5073
|
};
|
|
5082
|
-
}, [
|
|
5083
|
-
const
|
|
5084
|
-
const F = r.includes(
|
|
5074
|
+
}, [C, c]);
|
|
5075
|
+
const y = (w) => {
|
|
5076
|
+
const F = r.includes(w) ? r.filter((W) => W !== w) : m && r.length >= m ? r : [...r, w];
|
|
5085
5077
|
o(F);
|
|
5086
|
-
},
|
|
5087
|
-
const F = r.filter((
|
|
5078
|
+
}, b = (w) => {
|
|
5079
|
+
const F = r.filter((W) => W !== w);
|
|
5088
5080
|
o(F);
|
|
5089
|
-
},
|
|
5081
|
+
}, L = () => {
|
|
5090
5082
|
o([]);
|
|
5091
|
-
},
|
|
5083
|
+
}, P = {
|
|
5092
5084
|
default: "bg-secondary text-primary border border-border hover:bg-border",
|
|
5093
5085
|
primary: "bg-primary/10 text-primary border border-primary/20 hover:bg-primary/20",
|
|
5094
5086
|
success: "bg-success/10 text-success border border-success/20 hover:bg-success/20",
|
|
5095
5087
|
warning: "bg-warning/10 text-warning border border-warning/20 hover:bg-warning/20",
|
|
5096
5088
|
danger: "bg-error/10 text-error border border-error/20 hover:bg-error/20",
|
|
5097
5089
|
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",
|
|
5090
|
+
}, 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 } };
|
|
5091
|
+
return /* @__PURE__ */ s("div", { ref: N, className: p("w-full space-y-1.5", v), children: [
|
|
5100
5092
|
n && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-foreground", children: [
|
|
5101
5093
|
n,
|
|
5102
5094
|
g && /* @__PURE__ */ e("span", { className: "text-error ml-1", children: "*" })
|
|
5103
5095
|
] }),
|
|
5104
|
-
/* @__PURE__ */ s("div", { ref:
|
|
5096
|
+
/* @__PURE__ */ s("div", { ref: B, className: "relative", children: [
|
|
5105
5097
|
/* @__PURE__ */ s(
|
|
5106
5098
|
"div",
|
|
5107
5099
|
{
|
|
5108
5100
|
role: "button",
|
|
5109
5101
|
tabIndex: u ? -1 : 0,
|
|
5110
|
-
onClick: () => !u && I(!
|
|
5111
|
-
onKeyDown: (
|
|
5112
|
-
u || (
|
|
5102
|
+
onClick: () => !u && I(!C),
|
|
5103
|
+
onKeyDown: (w) => {
|
|
5104
|
+
u || (w.key === "Enter" || w.key === " ") && (w.preventDefault(), I((F) => !F));
|
|
5113
5105
|
},
|
|
5114
5106
|
"aria-haspopup": "listbox",
|
|
5115
|
-
"aria-expanded":
|
|
5107
|
+
"aria-expanded": C,
|
|
5116
5108
|
"aria-required": g,
|
|
5117
5109
|
"aria-disabled": u,
|
|
5118
5110
|
className: p(
|
|
@@ -5123,10 +5115,10 @@ const $r = Le(
|
|
|
5123
5115
|
"touch-target text-base min-h-12",
|
|
5124
5116
|
l && "border-error focus:ring-error",
|
|
5125
5117
|
!l && "border-border",
|
|
5126
|
-
|
|
5118
|
+
C && "ring-2 ring-primary"
|
|
5127
5119
|
),
|
|
5128
5120
|
children: [
|
|
5129
|
-
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((
|
|
5121
|
+
r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 w-full", children: h.map((w) => /* @__PURE__ */ s(
|
|
5130
5122
|
R.div,
|
|
5131
5123
|
{
|
|
5132
5124
|
layout: !0,
|
|
@@ -5135,45 +5127,45 @@ const $r = Le(
|
|
|
5135
5127
|
exit: k ? { opacity: 0, scale: 0.8 } : {},
|
|
5136
5128
|
className: p(
|
|
5137
5129
|
"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-sm font-medium",
|
|
5138
|
-
|
|
5130
|
+
P[E]
|
|
5139
5131
|
),
|
|
5140
5132
|
children: [
|
|
5141
|
-
|
|
5142
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
5133
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5134
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: w.label }),
|
|
5143
5135
|
/* @__PURE__ */ e(
|
|
5144
5136
|
"button",
|
|
5145
5137
|
{
|
|
5146
5138
|
type: "button",
|
|
5147
5139
|
onClick: (F) => {
|
|
5148
|
-
F.stopPropagation(),
|
|
5140
|
+
F.stopPropagation(), b(w.value);
|
|
5149
5141
|
},
|
|
5150
5142
|
className: "shrink-0 ml-0.5 hover:opacity-70 transition-opacity",
|
|
5151
|
-
"aria-label": `Remove ${
|
|
5143
|
+
"aria-label": `Remove ${w.label}`,
|
|
5152
5144
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4" })
|
|
5153
5145
|
}
|
|
5154
5146
|
)
|
|
5155
5147
|
]
|
|
5156
5148
|
},
|
|
5157
|
-
|
|
5149
|
+
w.value
|
|
5158
5150
|
)) }) : /* @__PURE__ */ e("span", { className: p("truncate", "text-foreground/50"), children: a }),
|
|
5159
5151
|
/* @__PURE__ */ e(
|
|
5160
5152
|
xe,
|
|
5161
5153
|
{
|
|
5162
5154
|
className: p(
|
|
5163
5155
|
"w-5 h-5 text-primary transition-transform shrink-0 ml-auto",
|
|
5164
|
-
|
|
5156
|
+
C && "rotate-180"
|
|
5165
5157
|
)
|
|
5166
5158
|
}
|
|
5167
5159
|
)
|
|
5168
5160
|
]
|
|
5169
5161
|
}
|
|
5170
5162
|
),
|
|
5171
|
-
k ? /* @__PURE__ */ e(de, { children:
|
|
5163
|
+
k ? /* @__PURE__ */ e(de, { children: C ? /* @__PURE__ */ e(le, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5172
5164
|
R.div,
|
|
5173
5165
|
{
|
|
5174
|
-
initial:
|
|
5175
|
-
animate:
|
|
5176
|
-
exit:
|
|
5166
|
+
initial: G.initial,
|
|
5167
|
+
animate: G.animate,
|
|
5168
|
+
exit: G.exit,
|
|
5177
5169
|
transition: { duration: 0.2 },
|
|
5178
5170
|
role: "listbox",
|
|
5179
5171
|
className: "z-50 w-full bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
|
|
@@ -5185,17 +5177,17 @@ const $r = Le(
|
|
|
5185
5177
|
{
|
|
5186
5178
|
type: "text",
|
|
5187
5179
|
placeholder: "Search...",
|
|
5188
|
-
value:
|
|
5189
|
-
onChange: (
|
|
5180
|
+
value: O,
|
|
5181
|
+
onChange: (w) => D(w.target.value),
|
|
5190
5182
|
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
5183
|
"aria-label": "Search options"
|
|
5192
5184
|
}
|
|
5193
5185
|
),
|
|
5194
|
-
|
|
5186
|
+
O && /* @__PURE__ */ e(
|
|
5195
5187
|
"button",
|
|
5196
5188
|
{
|
|
5197
5189
|
type: "button",
|
|
5198
|
-
onClick: () =>
|
|
5190
|
+
onClick: () => D(""),
|
|
5199
5191
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
5200
5192
|
"aria-label": "Clear search",
|
|
5201
5193
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -5208,7 +5200,7 @@ const $r = Le(
|
|
|
5208
5200
|
{
|
|
5209
5201
|
type: "button",
|
|
5210
5202
|
role: "option",
|
|
5211
|
-
onClick: () =>
|
|
5203
|
+
onClick: () => L(),
|
|
5212
5204
|
className: p(
|
|
5213
5205
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5214
5206
|
"hover:bg-secondary transition-colors",
|
|
@@ -5217,20 +5209,20 @@ const $r = Le(
|
|
|
5217
5209
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5218
5210
|
}
|
|
5219
5211
|
),
|
|
5220
|
-
T.length > 0 ? T.map((
|
|
5221
|
-
const F = r.includes(
|
|
5212
|
+
T.length > 0 ? T.map((w) => {
|
|
5213
|
+
const F = r.includes(w.value), W = w.disabled || m !== void 0 && r.length >= m && !F;
|
|
5222
5214
|
return /* @__PURE__ */ s(
|
|
5223
5215
|
"div",
|
|
5224
5216
|
{
|
|
5225
5217
|
role: "option",
|
|
5226
5218
|
"aria-selected": F,
|
|
5227
|
-
"aria-disabled":
|
|
5228
|
-
onClick: () =>
|
|
5219
|
+
"aria-disabled": W,
|
|
5220
|
+
onClick: () => !W && y(w.value),
|
|
5229
5221
|
className: p(
|
|
5230
5222
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5231
5223
|
"hover:bg-secondary transition-colors",
|
|
5232
5224
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5233
|
-
|
|
5225
|
+
W && "opacity-50 cursor-not-allowed",
|
|
5234
5226
|
F && "bg-border text-foreground font-medium"
|
|
5235
5227
|
),
|
|
5236
5228
|
children: [
|
|
@@ -5238,25 +5230,25 @@ const $r = Le(
|
|
|
5238
5230
|
Te,
|
|
5239
5231
|
{
|
|
5240
5232
|
checked: F,
|
|
5241
|
-
disabled:
|
|
5242
|
-
onChange: () =>
|
|
5243
|
-
onClick: (
|
|
5233
|
+
disabled: W,
|
|
5234
|
+
onChange: () => !W && y(w.value),
|
|
5235
|
+
onClick: (f) => f.stopPropagation(),
|
|
5244
5236
|
animate: k,
|
|
5245
5237
|
className: "w-5 h-5",
|
|
5246
|
-
"aria-label":
|
|
5238
|
+
"aria-label": w.label
|
|
5247
5239
|
}
|
|
5248
5240
|
),
|
|
5249
|
-
|
|
5250
|
-
/* @__PURE__ */ e("span", { children:
|
|
5241
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5242
|
+
/* @__PURE__ */ e("span", { children: w.label })
|
|
5251
5243
|
]
|
|
5252
5244
|
},
|
|
5253
|
-
|
|
5245
|
+
w.value
|
|
5254
5246
|
);
|
|
5255
5247
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5256
5248
|
] })
|
|
5257
5249
|
]
|
|
5258
5250
|
}
|
|
5259
|
-
) }) : null }) :
|
|
5251
|
+
) }) : null }) : C && /* @__PURE__ */ e(le, { open: C, anchorRef: B, placement: z, children: /* @__PURE__ */ s(
|
|
5260
5252
|
R.div,
|
|
5261
5253
|
{
|
|
5262
5254
|
role: "listbox",
|
|
@@ -5269,17 +5261,17 @@ const $r = Le(
|
|
|
5269
5261
|
{
|
|
5270
5262
|
type: "text",
|
|
5271
5263
|
placeholder: "Search...",
|
|
5272
|
-
value:
|
|
5273
|
-
onChange: (
|
|
5264
|
+
value: O,
|
|
5265
|
+
onChange: (w) => D(w.target.value),
|
|
5274
5266
|
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
5267
|
"aria-label": "Search options"
|
|
5276
5268
|
}
|
|
5277
5269
|
),
|
|
5278
|
-
|
|
5270
|
+
O && /* @__PURE__ */ e(
|
|
5279
5271
|
"button",
|
|
5280
5272
|
{
|
|
5281
5273
|
type: "button",
|
|
5282
|
-
onClick: () =>
|
|
5274
|
+
onClick: () => D(""),
|
|
5283
5275
|
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
5284
5276
|
"aria-label": "Clear search",
|
|
5285
5277
|
children: /* @__PURE__ */ e(oe, { className: "w-4 h-4 text-primary/50 hover:text-primary" })
|
|
@@ -5292,7 +5284,7 @@ const $r = Le(
|
|
|
5292
5284
|
{
|
|
5293
5285
|
type: "button",
|
|
5294
5286
|
role: "option",
|
|
5295
|
-
onClick: () =>
|
|
5287
|
+
onClick: () => L(),
|
|
5296
5288
|
className: p(
|
|
5297
5289
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5298
5290
|
"hover:bg-secondary transition-colors",
|
|
@@ -5301,20 +5293,20 @@ const $r = Le(
|
|
|
5301
5293
|
children: /* @__PURE__ */ e("span", { children: "Clear all" })
|
|
5302
5294
|
}
|
|
5303
5295
|
),
|
|
5304
|
-
T.length > 0 ? T.map((
|
|
5305
|
-
const F = r.includes(
|
|
5296
|
+
T.length > 0 ? T.map((w) => {
|
|
5297
|
+
const F = r.includes(w.value), W = w.disabled || m !== void 0 && r.length >= m && !F;
|
|
5306
5298
|
return /* @__PURE__ */ s(
|
|
5307
5299
|
"div",
|
|
5308
5300
|
{
|
|
5309
5301
|
role: "option",
|
|
5310
5302
|
"aria-selected": F,
|
|
5311
|
-
"aria-disabled":
|
|
5312
|
-
onClick: () =>
|
|
5303
|
+
"aria-disabled": W,
|
|
5304
|
+
onClick: () => !W && y(w.value),
|
|
5313
5305
|
className: p(
|
|
5314
5306
|
"w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer",
|
|
5315
5307
|
"hover:bg-secondary transition-colors",
|
|
5316
5308
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5317
|
-
|
|
5309
|
+
W && "opacity-50 cursor-not-allowed",
|
|
5318
5310
|
F && "bg-border text-foreground font-medium"
|
|
5319
5311
|
),
|
|
5320
5312
|
children: [
|
|
@@ -5322,19 +5314,19 @@ const $r = Le(
|
|
|
5322
5314
|
Te,
|
|
5323
5315
|
{
|
|
5324
5316
|
checked: F,
|
|
5325
|
-
disabled:
|
|
5326
|
-
onChange: () =>
|
|
5327
|
-
onClick: (
|
|
5317
|
+
disabled: W,
|
|
5318
|
+
onChange: () => !W && y(w.value),
|
|
5319
|
+
onClick: (f) => f.stopPropagation(),
|
|
5328
5320
|
animate: k,
|
|
5329
5321
|
className: "w-5 h-5",
|
|
5330
|
-
"aria-label":
|
|
5322
|
+
"aria-label": w.label
|
|
5331
5323
|
}
|
|
5332
5324
|
),
|
|
5333
|
-
|
|
5334
|
-
/* @__PURE__ */ e("span", { children:
|
|
5325
|
+
w.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: w.icon }),
|
|
5326
|
+
/* @__PURE__ */ e("span", { children: w.label })
|
|
5335
5327
|
]
|
|
5336
5328
|
},
|
|
5337
|
-
|
|
5329
|
+
w.value
|
|
5338
5330
|
);
|
|
5339
5331
|
}) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-primary/70 text-sm", children: "No options found" })
|
|
5340
5332
|
] })
|
|
@@ -5354,7 +5346,7 @@ const $r = Le(
|
|
|
5354
5346
|
] });
|
|
5355
5347
|
}
|
|
5356
5348
|
);
|
|
5357
|
-
|
|
5349
|
+
Wr.displayName = "MultiSelect";
|
|
5358
5350
|
const po = ({
|
|
5359
5351
|
children: t,
|
|
5360
5352
|
content: r,
|
|
@@ -5368,30 +5360,30 @@ const po = ({
|
|
|
5368
5360
|
className: m,
|
|
5369
5361
|
showArrow: u = !0,
|
|
5370
5362
|
arrowSize: g = 10,
|
|
5371
|
-
arrowClassName:
|
|
5363
|
+
arrowClassName: v
|
|
5372
5364
|
}) => {
|
|
5373
|
-
const [S,
|
|
5365
|
+
const [S, E] = U(!1), [N, k] = U(c), [C, I] = U(o), [O, D] = U("center"), [z, j] = U(null), B = Q(null), h = Q(null), T = Q(null), y = i !== void 0, b = y ? !!i : N, L = Ne(
|
|
5374
5366
|
(Y) => {
|
|
5375
|
-
|
|
5367
|
+
y || k(Y), d?.(Y);
|
|
5376
5368
|
},
|
|
5377
|
-
[
|
|
5378
|
-
),
|
|
5369
|
+
[y, d]
|
|
5370
|
+
), P = Ne(() => {
|
|
5379
5371
|
T.current !== null && (window.clearTimeout(T.current), T.current = null);
|
|
5380
|
-
}, []),
|
|
5381
|
-
l || (
|
|
5382
|
-
|
|
5372
|
+
}, []), G = Ne(() => {
|
|
5373
|
+
l || (P(), T.current = window.setTimeout(() => {
|
|
5374
|
+
L(!0);
|
|
5383
5375
|
}, Math.max(0, n)));
|
|
5384
|
-
}, [
|
|
5385
|
-
|
|
5386
|
-
}, [
|
|
5387
|
-
if (!
|
|
5388
|
-
const Y =
|
|
5389
|
-
right:
|
|
5376
|
+
}, [P, n, l, L]), w = Ne(() => {
|
|
5377
|
+
P(), L(!1);
|
|
5378
|
+
}, [P, L]), F = Ne(() => {
|
|
5379
|
+
if (!b || !B.current || !h.current) return;
|
|
5380
|
+
const Y = B.current.getBoundingClientRect(), K = h.current.getBoundingClientRect(), _ = 8, Z = window.innerWidth - Y.right - _, ee = Y.left - _, pe = Y.top - _, be = window.innerHeight - Y.bottom - _, X = {
|
|
5381
|
+
right: Z >= K.width + a,
|
|
5390
5382
|
left: ee >= K.width + a,
|
|
5391
5383
|
top: pe >= K.height + a,
|
|
5392
5384
|
bottom: be >= K.height + a
|
|
5393
5385
|
}, we = {
|
|
5394
|
-
right:
|
|
5386
|
+
right: Z,
|
|
5395
5387
|
left: ee,
|
|
5396
5388
|
top: pe,
|
|
5397
5389
|
bottom: be
|
|
@@ -5402,15 +5394,15 @@ const po = ({
|
|
|
5402
5394
|
)[0]?.[0] ?? "bottom");
|
|
5403
5395
|
let ne = 0, se = 0;
|
|
5404
5396
|
if (ae === "right")
|
|
5405
|
-
ne = Y.right + a, se = Y.top + Y.height / 2 - K.height / 2,
|
|
5397
|
+
ne = Y.right + a, se = Y.top + Y.height / 2 - K.height / 2, D("center");
|
|
5406
5398
|
else if (ae === "left")
|
|
5407
|
-
ne = Y.left - K.width - a, se = Y.top + Y.height / 2 - K.height / 2,
|
|
5399
|
+
ne = Y.left - K.width - a, se = Y.top + Y.height / 2 - K.height / 2, D("center");
|
|
5408
5400
|
else if (ae === "top") {
|
|
5409
5401
|
const ce = Y.left, me = Y.right - K.width, he = ce >= _ && ce + K.width <= window.innerWidth - _, Me = me >= _ && me + K.width <= window.innerWidth - _;
|
|
5410
|
-
he || !he && !Me &&
|
|
5402
|
+
he || !he && !Me && Z >= ee ? (ne = ce, D("start")) : (ne = me, D("end")), se = Y.top - K.height - a;
|
|
5411
5403
|
} else {
|
|
5412
5404
|
const ce = Y.left, me = Y.right - K.width, he = ce >= _ && ce + K.width <= window.innerWidth - _, Me = me >= _ && me + K.width <= window.innerWidth - _;
|
|
5413
|
-
he || !he && !Me &&
|
|
5405
|
+
he || !he && !Me && Z >= ee ? (ne = ce, D("start")) : (ne = me, D("end")), se = Y.bottom + a;
|
|
5414
5406
|
}
|
|
5415
5407
|
const re = Math.min(
|
|
5416
5408
|
Math.max(ne, _),
|
|
@@ -5419,54 +5411,54 @@ const po = ({
|
|
|
5419
5411
|
Math.max(se, _),
|
|
5420
5412
|
window.innerHeight - K.height - _
|
|
5421
5413
|
);
|
|
5422
|
-
I(ae),
|
|
5423
|
-
}, [
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
}), []),
|
|
5427
|
-
if (
|
|
5414
|
+
I(ae), j({ left: re, top: ve });
|
|
5415
|
+
}, [b, a, o]);
|
|
5416
|
+
q(() => (E(!0), () => {
|
|
5417
|
+
E(!1);
|
|
5418
|
+
}), []), q(() => () => P(), [P]), q(() => {
|
|
5419
|
+
if (b)
|
|
5428
5420
|
return F(), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0), () => {
|
|
5429
5421
|
window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
|
|
5430
5422
|
};
|
|
5431
|
-
}, [
|
|
5432
|
-
if (!
|
|
5423
|
+
}, [b, F]), q(() => {
|
|
5424
|
+
if (!b) return;
|
|
5433
5425
|
const Y = window.requestAnimationFrame(F);
|
|
5434
5426
|
return () => window.cancelAnimationFrame(Y);
|
|
5435
|
-
}, [r,
|
|
5436
|
-
const
|
|
5427
|
+
}, [r, b, F]);
|
|
5428
|
+
const W = Se(
|
|
5437
5429
|
() => ({
|
|
5438
5430
|
position: "fixed",
|
|
5439
5431
|
zIndex: 80,
|
|
5440
|
-
left:
|
|
5441
|
-
top:
|
|
5432
|
+
left: z?.left ?? -9999,
|
|
5433
|
+
top: z?.top ?? -9999,
|
|
5442
5434
|
pointerEvents: "none"
|
|
5443
5435
|
}),
|
|
5444
|
-
[
|
|
5445
|
-
),
|
|
5436
|
+
[z]
|
|
5437
|
+
), f = Se(
|
|
5446
5438
|
() => ({
|
|
5447
5439
|
width: g,
|
|
5448
5440
|
height: g
|
|
5449
5441
|
}),
|
|
5450
5442
|
[g]
|
|
5451
|
-
),
|
|
5443
|
+
), J = Se(() => 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" ? O === "start" ? "bottom-0 left-4 translate-y-1/2 border-r border-b" : O === "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" : O === "start" ? "top-0 left-4 -translate-y-1/2 border-l border-t" : O === "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", [O, C]);
|
|
5452
5444
|
return /* @__PURE__ */ s(Fe, { children: [
|
|
5453
5445
|
/* @__PURE__ */ e(
|
|
5454
5446
|
"span",
|
|
5455
5447
|
{
|
|
5456
|
-
ref:
|
|
5448
|
+
ref: B,
|
|
5457
5449
|
className: "inline-flex",
|
|
5458
|
-
onMouseEnter:
|
|
5459
|
-
onMouseLeave:
|
|
5460
|
-
onFocus:
|
|
5461
|
-
onBlur:
|
|
5450
|
+
onMouseEnter: G,
|
|
5451
|
+
onMouseLeave: w,
|
|
5452
|
+
onFocus: G,
|
|
5453
|
+
onBlur: w,
|
|
5462
5454
|
onKeyDown: (Y) => {
|
|
5463
|
-
Y.key === "Escape" &&
|
|
5455
|
+
Y.key === "Escape" && w();
|
|
5464
5456
|
},
|
|
5465
5457
|
children: t
|
|
5466
5458
|
}
|
|
5467
5459
|
),
|
|
5468
|
-
S &&
|
|
5469
|
-
/* @__PURE__ */ e("div", { style:
|
|
5460
|
+
S && b && !l && dt(
|
|
5461
|
+
/* @__PURE__ */ e("div", { style: W, role: "tooltip", "aria-hidden": !b, children: /* @__PURE__ */ s(
|
|
5470
5462
|
"div",
|
|
5471
5463
|
{
|
|
5472
5464
|
ref: h,
|
|
@@ -5478,11 +5470,11 @@ const po = ({
|
|
|
5478
5470
|
u && /* @__PURE__ */ e(
|
|
5479
5471
|
"span",
|
|
5480
5472
|
{
|
|
5481
|
-
style:
|
|
5473
|
+
style: f,
|
|
5482
5474
|
className: p(
|
|
5483
5475
|
"absolute rotate-45 bg-background border-border",
|
|
5484
|
-
|
|
5485
|
-
|
|
5476
|
+
J,
|
|
5477
|
+
v
|
|
5486
5478
|
)
|
|
5487
5479
|
}
|
|
5488
5480
|
),
|
|
@@ -5543,7 +5535,7 @@ const po = ({
|
|
|
5543
5535
|
animate: i = !0
|
|
5544
5536
|
}) => {
|
|
5545
5537
|
const c = i !== !1;
|
|
5546
|
-
|
|
5538
|
+
q(() => {
|
|
5547
5539
|
const m = (u) => {
|
|
5548
5540
|
u.key === "Escape" && r();
|
|
5549
5541
|
};
|
|
@@ -5603,10 +5595,10 @@ const po = ({
|
|
|
5603
5595
|
className: l,
|
|
5604
5596
|
animate: i = !0
|
|
5605
5597
|
}) => {
|
|
5606
|
-
const c = i !== !1, d =
|
|
5607
|
-
|
|
5608
|
-
const g = (
|
|
5609
|
-
|
|
5598
|
+
const c = i !== !1, d = Q(null);
|
|
5599
|
+
q(() => {
|
|
5600
|
+
const g = (v) => {
|
|
5601
|
+
v.key === "Escape" && r();
|
|
5610
5602
|
};
|
|
5611
5603
|
return t && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden"), () => {
|
|
5612
5604
|
document.removeEventListener("keydown", g), document.body.style.overflow = "unset";
|
|
@@ -5671,7 +5663,7 @@ const po = ({
|
|
|
5671
5663
|
animate: i = !0
|
|
5672
5664
|
}) => {
|
|
5673
5665
|
const c = i !== !1;
|
|
5674
|
-
|
|
5666
|
+
q(() => {
|
|
5675
5667
|
const m = (u) => {
|
|
5676
5668
|
u.key === "Escape" && r();
|
|
5677
5669
|
};
|
|
@@ -5732,32 +5724,32 @@ function ko({
|
|
|
5732
5724
|
className: m,
|
|
5733
5725
|
animate: u = !0
|
|
5734
5726
|
}) {
|
|
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
|
-
|
|
5727
|
+
const g = u !== !1, [v, S] = U(null), [E, N] = U("asc"), [k, C] = U(c), I = i !== void 0, O = I ? i : k, D = new Set(O), z = (b) => {
|
|
5728
|
+
I || C(b);
|
|
5729
|
+
const L = new Set(b), P = t.filter((G) => L.has(n(G)));
|
|
5730
|
+
d?.(b, P);
|
|
5731
|
+
}, j = (b) => {
|
|
5732
|
+
v === b ? N(E === "asc" ? "desc" : "asc") : (S(b), N("asc"));
|
|
5733
|
+
}, B = v ? [...t].sort((b, L) => {
|
|
5734
|
+
const P = b[v], G = L[v];
|
|
5735
|
+
return P < G ? E === "asc" ? -1 : 1 : P > G ? E === "asc" ? 1 : -1 : 0;
|
|
5736
|
+
}) : t, h = t.length > 0 && t.every((b) => D.has(n(b))), T = (b) => {
|
|
5737
|
+
if (b) {
|
|
5738
|
+
z(t.map((L) => n(L)));
|
|
5747
5739
|
return;
|
|
5748
5740
|
}
|
|
5749
|
-
|
|
5750
|
-
},
|
|
5751
|
-
const
|
|
5752
|
-
if (
|
|
5753
|
-
|
|
5741
|
+
z([]);
|
|
5742
|
+
}, y = (b, L) => {
|
|
5743
|
+
const P = n(b);
|
|
5744
|
+
if (L) {
|
|
5745
|
+
D.has(P) || z([...O, P]);
|
|
5754
5746
|
return;
|
|
5755
5747
|
}
|
|
5756
|
-
|
|
5748
|
+
z(O.filter((G) => G !== P));
|
|
5757
5749
|
};
|
|
5758
5750
|
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
5751
|
/* @__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: (
|
|
5752
|
+
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(
|
|
5761
5753
|
Te,
|
|
5762
5754
|
{
|
|
5763
5755
|
checked: h,
|
|
@@ -5766,12 +5758,12 @@ function ko({
|
|
|
5766
5758
|
"aria-label": "Select all rows"
|
|
5767
5759
|
}
|
|
5768
5760
|
) }) }),
|
|
5769
|
-
r.map((
|
|
5761
|
+
r.map((b, L) => /* @__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") }) }, L))
|
|
5770
5762
|
] }) }),
|
|
5771
|
-
/* @__PURE__ */ e("tbody", { children: [...Array(5)].map((
|
|
5763
|
+
/* @__PURE__ */ e("tbody", { children: [...Array(5)].map((b, L) => /* @__PURE__ */ s("tr", { className: "border-b border-border", children: [
|
|
5772
5764
|
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
|
-
] },
|
|
5765
|
+
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))
|
|
5766
|
+
] }, L)) })
|
|
5775
5767
|
] }) }) }) : /* @__PURE__ */ e(
|
|
5776
5768
|
R.div,
|
|
5777
5769
|
{
|
|
@@ -5779,7 +5771,7 @@ function ko({
|
|
|
5779
5771
|
className: p("border border-border rounded-lg overflow-hidden", m),
|
|
5780
5772
|
children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full", children: [
|
|
5781
5773
|
/* @__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: (
|
|
5774
|
+
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(
|
|
5783
5775
|
Te,
|
|
5784
5776
|
{
|
|
5785
5777
|
checked: h,
|
|
@@ -5788,58 +5780,58 @@ function ko({
|
|
|
5788
5780
|
"aria-label": "Select all rows"
|
|
5789
5781
|
}
|
|
5790
5782
|
) }) }),
|
|
5791
|
-
r.map((
|
|
5783
|
+
r.map((b, L) => /* @__PURE__ */ e(
|
|
5792
5784
|
"th",
|
|
5793
5785
|
{
|
|
5794
5786
|
className: p(
|
|
5795
5787
|
"px-6 py-4 text-left text-sm font-semibold text-foreground",
|
|
5796
|
-
|
|
5797
|
-
|
|
5788
|
+
b.width,
|
|
5789
|
+
b.sortable && "cursor-pointer transition-colors"
|
|
5798
5790
|
),
|
|
5799
|
-
onClick: () =>
|
|
5791
|
+
onClick: () => b.sortable && j(b.key),
|
|
5800
5792
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
5801
|
-
|
|
5802
|
-
|
|
5793
|
+
b.header,
|
|
5794
|
+
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
5795
|
] })
|
|
5804
5796
|
},
|
|
5805
|
-
|
|
5797
|
+
L
|
|
5806
5798
|
))
|
|
5807
5799
|
] }) }),
|
|
5808
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
5800
|
+
/* @__PURE__ */ e("tbody", { children: B.map((b, L) => /* @__PURE__ */ s(
|
|
5809
5801
|
R.tr,
|
|
5810
5802
|
{
|
|
5811
|
-
...g ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2, delay:
|
|
5812
|
-
onClick: () => a && a(
|
|
5803
|
+
...g ? { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.2, delay: L * 0.05 } } : {},
|
|
5804
|
+
onClick: () => a && a(b),
|
|
5813
5805
|
className: p(
|
|
5814
5806
|
"border-b border-border transition-colors",
|
|
5815
5807
|
a && "cursor-pointer hover:bg-secondary"
|
|
5816
5808
|
),
|
|
5817
5809
|
children: [
|
|
5818
|
-
l && /* @__PURE__ */ e("td", { className: "px-4 py-4 w-14", onClick: (
|
|
5810
|
+
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(
|
|
5819
5811
|
Te,
|
|
5820
5812
|
{
|
|
5821
|
-
checked:
|
|
5822
|
-
onChange: (
|
|
5813
|
+
checked: D.has(n(b)),
|
|
5814
|
+
onChange: (P) => y(b, P),
|
|
5823
5815
|
className: "w-5 h-5",
|
|
5824
|
-
"aria-label": `Select row ${
|
|
5816
|
+
"aria-label": `Select row ${L + 1}`
|
|
5825
5817
|
}
|
|
5826
5818
|
) }) }),
|
|
5827
|
-
r.map((
|
|
5819
|
+
r.map((P, G) => /* @__PURE__ */ e(
|
|
5828
5820
|
"td",
|
|
5829
5821
|
{
|
|
5830
5822
|
className: p(
|
|
5831
5823
|
"px-6 py-4 text-sm text-foreground/70",
|
|
5832
|
-
|
|
5824
|
+
P.width
|
|
5833
5825
|
),
|
|
5834
|
-
style:
|
|
5835
|
-
title:
|
|
5836
|
-
children:
|
|
5826
|
+
style: P.width ? { width: P.width } : void 0,
|
|
5827
|
+
title: P.truncate && !P.render ? String(b[P.key] ?? "") : void 0,
|
|
5828
|
+
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
5829
|
},
|
|
5838
|
-
|
|
5830
|
+
G
|
|
5839
5831
|
))
|
|
5840
5832
|
]
|
|
5841
5833
|
},
|
|
5842
|
-
n(
|
|
5834
|
+
n(b)
|
|
5843
5835
|
)) })
|
|
5844
5836
|
] }) })
|
|
5845
5837
|
}
|
|
@@ -5854,12 +5846,12 @@ const So = ({
|
|
|
5854
5846
|
className: l,
|
|
5855
5847
|
animate: i = !0
|
|
5856
5848
|
}) => {
|
|
5857
|
-
const c = i !== !1, d =
|
|
5849
|
+
const c = i !== !1, d = Ze.useMemo(() => {
|
|
5858
5850
|
if (r <= 5)
|
|
5859
|
-
return Array.from({ length: r }, (
|
|
5851
|
+
return Array.from({ length: r }, (E, N) => N + 1);
|
|
5860
5852
|
const g = Math.floor(5 / 2);
|
|
5861
|
-
let
|
|
5862
|
-
return S > r && (S = r,
|
|
5853
|
+
let v = Math.max(1, t - g), S = v + 5 - 1;
|
|
5854
|
+
return S > r && (S = r, v = Math.max(1, S - 5 + 1)), Array.from({ length: S - v + 1 }, (E, N) => v + N);
|
|
5863
5855
|
}, [t, r]), m = (u) => {
|
|
5864
5856
|
const g = Math.max(1, Math.min(r, u));
|
|
5865
5857
|
g !== t && o(g);
|
|
@@ -5930,7 +5922,7 @@ const So = ({
|
|
|
5930
5922
|
size: "sm",
|
|
5931
5923
|
disabled: t === r,
|
|
5932
5924
|
onClick: () => m(t + 1),
|
|
5933
|
-
icon: /* @__PURE__ */ e(
|
|
5925
|
+
icon: /* @__PURE__ */ e(qe, { className: "w-4 h-4" }),
|
|
5934
5926
|
animate: i,
|
|
5935
5927
|
children: "Next"
|
|
5936
5928
|
}
|
|
@@ -5939,7 +5931,7 @@ const So = ({
|
|
|
5939
5931
|
]
|
|
5940
5932
|
}
|
|
5941
5933
|
);
|
|
5942
|
-
},
|
|
5934
|
+
}, $r = ({
|
|
5943
5935
|
icon: t,
|
|
5944
5936
|
onClick: r,
|
|
5945
5937
|
label: o,
|
|
@@ -5950,14 +5942,14 @@ const So = ({
|
|
|
5950
5942
|
className: c,
|
|
5951
5943
|
animate: d = !0
|
|
5952
5944
|
}) => {
|
|
5953
|
-
const m = d !== !1, [u, g] =
|
|
5945
|
+
const m = d !== !1, [u, g] = U(!1), v = {
|
|
5954
5946
|
"bottom-right": "fixed bottom-6 right-6",
|
|
5955
5947
|
"bottom-left": "fixed bottom-6 left-6",
|
|
5956
5948
|
"bottom-center": "fixed bottom-6 left-1/2 -translate-x-1/2"
|
|
5957
5949
|
}, S = {
|
|
5958
5950
|
primary: "bg-primary text-white hover:bg-primary-dark shadow-lg",
|
|
5959
5951
|
secondary: "bg-background text-primary border-2 border-primary hover:bg-secondary shadow-md"
|
|
5960
|
-
},
|
|
5952
|
+
}, E = {
|
|
5961
5953
|
primary: "bg-primary text-white",
|
|
5962
5954
|
success: "bg-success text-white",
|
|
5963
5955
|
danger: "bg-error text-white",
|
|
@@ -5965,7 +5957,7 @@ const So = ({
|
|
|
5965
5957
|
}, N = () => {
|
|
5966
5958
|
a && a.length > 0 ? g(!u) : r && r();
|
|
5967
5959
|
};
|
|
5968
|
-
return /* @__PURE__ */ s("div", { className: p(
|
|
5960
|
+
return /* @__PURE__ */ s("div", { className: p(v[l], "z-50", c), children: [
|
|
5969
5961
|
m ? /* @__PURE__ */ e(de, { children: u && a ? /* @__PURE__ */ e(
|
|
5970
5962
|
R.div,
|
|
5971
5963
|
{
|
|
@@ -5973,13 +5965,13 @@ const So = ({
|
|
|
5973
5965
|
animate: { opacity: 1 },
|
|
5974
5966
|
exit: { opacity: 0 },
|
|
5975
5967
|
className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2",
|
|
5976
|
-
children: a.map((k,
|
|
5968
|
+
children: a.map((k, C) => /* @__PURE__ */ s(
|
|
5977
5969
|
R.div,
|
|
5978
5970
|
{
|
|
5979
5971
|
initial: { opacity: 0, y: 20, scale: 0.8 },
|
|
5980
5972
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
5981
5973
|
exit: { opacity: 0, y: 20, scale: 0.8 },
|
|
5982
|
-
transition: { delay:
|
|
5974
|
+
transition: { delay: C * 0.05 },
|
|
5983
5975
|
className: "flex items-center gap-3",
|
|
5984
5976
|
children: [
|
|
5985
5977
|
/* @__PURE__ */ e(
|
|
@@ -6003,17 +5995,17 @@ const So = ({
|
|
|
6003
5995
|
},
|
|
6004
5996
|
className: p(
|
|
6005
5997
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6006
|
-
|
|
5998
|
+
E[k.variant || "primary"]
|
|
6007
5999
|
),
|
|
6008
6000
|
children: k.icon
|
|
6009
6001
|
}
|
|
6010
6002
|
)
|
|
6011
6003
|
]
|
|
6012
6004
|
},
|
|
6013
|
-
|
|
6005
|
+
C
|
|
6014
6006
|
))
|
|
6015
6007
|
}
|
|
6016
|
-
) : null }) : u && a && /* @__PURE__ */ e("div", { className: "absolute bottom-20 right-0 flex flex-col gap-3 mb-2", children: a.map((k,
|
|
6008
|
+
) : 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
6009
|
/* @__PURE__ */ e(
|
|
6018
6010
|
"span",
|
|
6019
6011
|
{
|
|
@@ -6033,12 +6025,12 @@ const So = ({
|
|
|
6033
6025
|
},
|
|
6034
6026
|
className: p(
|
|
6035
6027
|
"w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",
|
|
6036
|
-
|
|
6028
|
+
E[k.variant || "primary"]
|
|
6037
6029
|
),
|
|
6038
6030
|
children: k.icon
|
|
6039
6031
|
}
|
|
6040
6032
|
)
|
|
6041
|
-
] },
|
|
6033
|
+
] }, C)) }),
|
|
6042
6034
|
/* @__PURE__ */ s(
|
|
6043
6035
|
R.button,
|
|
6044
6036
|
{
|
|
@@ -6061,7 +6053,7 @@ const So = ({
|
|
|
6061
6053
|
}
|
|
6062
6054
|
)
|
|
6063
6055
|
] });
|
|
6064
|
-
}, Mo =
|
|
6056
|
+
}, Mo = $r, Ao = ({
|
|
6065
6057
|
steps: t,
|
|
6066
6058
|
currentStep: r,
|
|
6067
6059
|
className: o,
|
|
@@ -6071,7 +6063,7 @@ const So = ({
|
|
|
6071
6063
|
return /* @__PURE__ */ s("div", { className: p("w-full", o), children: [
|
|
6072
6064
|
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e("div", { className: "relative flex items-center mb-2", children: t.map((i, c) => {
|
|
6073
6065
|
const d = c < r, m = c === r, u = c > r;
|
|
6074
|
-
return /* @__PURE__ */ s(
|
|
6066
|
+
return /* @__PURE__ */ s(Ze.Fragment, { children: [
|
|
6075
6067
|
/* @__PURE__ */ s("div", { className: "flex flex-col items-center relative z-10", children: [
|
|
6076
6068
|
/* @__PURE__ */ e(
|
|
6077
6069
|
R.div,
|
|
@@ -6217,7 +6209,7 @@ const So = ({
|
|
|
6217
6209
|
r
|
|
6218
6210
|
),
|
|
6219
6211
|
children: [
|
|
6220
|
-
/* @__PURE__ */ e(
|
|
6212
|
+
/* @__PURE__ */ e(Je, { className: "w-4 h-4" }),
|
|
6221
6213
|
/* @__PURE__ */ e("span", { children: "Offline Mode" })
|
|
6222
6214
|
]
|
|
6223
6215
|
}
|
|
@@ -6228,9 +6220,9 @@ const So = ({
|
|
|
6228
6220
|
className: o,
|
|
6229
6221
|
animate: a = !0
|
|
6230
6222
|
}) => {
|
|
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(
|
|
6223
|
+
const n = a !== !1, l = n ? /* @__PURE__ */ e(R.div, { animate: { rotate: 360 }, transition: { repeat: 1 / 0, duration: 1, ease: "linear" }, children: /* @__PURE__ */ e(Ue, { className: "w-4 h-4" }) }) : /* @__PURE__ */ e(Ue, { className: "w-4 h-4" }), c = {
|
|
6232
6224
|
synced: {
|
|
6233
|
-
icon: /* @__PURE__ */ e(
|
|
6225
|
+
icon: /* @__PURE__ */ e(Ue, { className: "w-4 h-4" }),
|
|
6234
6226
|
label: "Synced",
|
|
6235
6227
|
color: "bg-success text-white"
|
|
6236
6228
|
},
|
|
@@ -6240,12 +6232,12 @@ const So = ({
|
|
|
6240
6232
|
color: "bg-info text-white"
|
|
6241
6233
|
},
|
|
6242
6234
|
unsynced: {
|
|
6243
|
-
icon: /* @__PURE__ */ e(
|
|
6235
|
+
icon: /* @__PURE__ */ e(Je, { className: "w-4 h-4" }),
|
|
6244
6236
|
label: r ? `${r} Unsynced` : "Unsynced",
|
|
6245
6237
|
color: "bg-warning text-white"
|
|
6246
6238
|
},
|
|
6247
6239
|
error: {
|
|
6248
|
-
icon: /* @__PURE__ */ e(
|
|
6240
|
+
icon: /* @__PURE__ */ e(Je, { className: "w-4 h-4" }),
|
|
6249
6241
|
label: "Sync Error",
|
|
6250
6242
|
color: "bg-error text-white"
|
|
6251
6243
|
}
|
|
@@ -6275,7 +6267,7 @@ const So = ({
|
|
|
6275
6267
|
primary: "border-primary border-t-transparent",
|
|
6276
6268
|
secondary: "border-secondary border-t-transparent",
|
|
6277
6269
|
white: "border-white border-t-transparent"
|
|
6278
|
-
},
|
|
6270
|
+
}, qr = ({
|
|
6279
6271
|
size: t = "md",
|
|
6280
6272
|
variant: r = "primary",
|
|
6281
6273
|
className: o,
|
|
@@ -6300,27 +6292,27 @@ const So = ({
|
|
|
6300
6292
|
a && /* @__PURE__ */ e("span", { className: "text-sm text-foreground/70", children: a })
|
|
6301
6293
|
] });
|
|
6302
6294
|
};
|
|
6303
|
-
|
|
6295
|
+
qr.displayName = "Spinner";
|
|
6304
6296
|
const St = Rt(void 0), zo = () => {
|
|
6305
6297
|
const t = Tt(St);
|
|
6306
6298
|
if (!t)
|
|
6307
6299
|
throw new Error("useToast must be used within ToastProvider");
|
|
6308
6300
|
return t;
|
|
6309
|
-
},
|
|
6301
|
+
}, Jr = {
|
|
6310
6302
|
success: "bg-success text-white border-success",
|
|
6311
6303
|
error: "bg-error text-white border-error",
|
|
6312
6304
|
warning: "bg-warning text-white border-warning",
|
|
6313
6305
|
info: "bg-info text-white border-info",
|
|
6314
6306
|
loading: "bg-primary text-white border-primary",
|
|
6315
6307
|
default: "bg-background text-foreground border-border"
|
|
6316
|
-
},
|
|
6317
|
-
success:
|
|
6308
|
+
}, Qr = {
|
|
6309
|
+
success: Vt,
|
|
6318
6310
|
error: Ot,
|
|
6319
6311
|
warning: Ft,
|
|
6320
6312
|
info: jt,
|
|
6321
6313
|
loading: st,
|
|
6322
6314
|
default: null
|
|
6323
|
-
},
|
|
6315
|
+
}, Zr = {
|
|
6324
6316
|
"top-left": "top-4 left-4",
|
|
6325
6317
|
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
6326
6318
|
"top-right": "top-4 right-4",
|
|
@@ -6328,7 +6320,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6328
6320
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
|
|
6329
6321
|
"bottom-right": "bottom-4 right-4"
|
|
6330
6322
|
}, it = ({ toast: t, onRemove: r, animate: o = !0 }) => {
|
|
6331
|
-
const a = o !== !1, n = t.variant || "default", l =
|
|
6323
|
+
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
6324
|
return /* @__PURE__ */ s(
|
|
6333
6325
|
d,
|
|
6334
6326
|
{
|
|
@@ -6341,7 +6333,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6341
6333
|
} : {},
|
|
6342
6334
|
className: p(
|
|
6343
6335
|
"flex items-start gap-3 p-4 rounded-md border shadow-lg min-w-80 max-w-md",
|
|
6344
|
-
|
|
6336
|
+
Jr[n]
|
|
6345
6337
|
),
|
|
6346
6338
|
children: [
|
|
6347
6339
|
l && /* @__PURE__ */ e(l, { className: p("w-5 h-5 shrink-0 mt-0.5", i && "animate-spin") }),
|
|
@@ -6374,7 +6366,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6374
6366
|
maxToasts: o = 5,
|
|
6375
6367
|
animate: a = !0
|
|
6376
6368
|
}) => {
|
|
6377
|
-
const n = a !== !1, [l, i] =
|
|
6369
|
+
const n = a !== !1, [l, i] = U([]), c = Ne((m) => {
|
|
6378
6370
|
i((u) => u.filter((g) => g.id !== m));
|
|
6379
6371
|
}, []), d = Ne(
|
|
6380
6372
|
(m) => {
|
|
@@ -6383,7 +6375,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6383
6375
|
return;
|
|
6384
6376
|
}
|
|
6385
6377
|
const u = Math.random().toString(36).substring(2, 9), g = m.duration ?? 5e3;
|
|
6386
|
-
i((
|
|
6378
|
+
i((v) => [...v, { ...m, id: u }].slice(-o)), g > 0 && setTimeout(() => {
|
|
6387
6379
|
c(u);
|
|
6388
6380
|
}, g);
|
|
6389
6381
|
},
|
|
@@ -6391,7 +6383,7 @@ const St = Rt(void 0), zo = () => {
|
|
|
6391
6383
|
);
|
|
6392
6384
|
return /* @__PURE__ */ s(St.Provider, { value: { toasts: l, addToast: d, removeToast: c }, children: [
|
|
6393
6385
|
t,
|
|
6394
|
-
/* @__PURE__ */ e("div", { className: p("fixed z-100 flex flex-col gap-2",
|
|
6386
|
+
/* @__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(it, { toast: m, onRemove: c, animate: n }, m.id)) }) : l.map((m) => /* @__PURE__ */ e(it, { toast: m, onRemove: c, animate: n }, m.id)) })
|
|
6395
6387
|
] });
|
|
6396
6388
|
};
|
|
6397
6389
|
Xr.displayName = "ToastProvider";
|
|
@@ -6404,7 +6396,7 @@ const Eo = ({
|
|
|
6404
6396
|
className: l,
|
|
6405
6397
|
animate: i = !0
|
|
6406
6398
|
}) => {
|
|
6407
|
-
const c = i !== !1, d =
|
|
6399
|
+
const c = i !== !1, d = Q(null), m = (u) => {
|
|
6408
6400
|
const g = u.target.files?.[0];
|
|
6409
6401
|
g && t(g);
|
|
6410
6402
|
};
|
|
@@ -6442,7 +6434,7 @@ const Eo = ({
|
|
|
6442
6434
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
6443
6435
|
),
|
|
6444
6436
|
children: [
|
|
6445
|
-
/* @__PURE__ */ e(
|
|
6437
|
+
/* @__PURE__ */ e(Ut, { className: "w-6 h-6 text-primary" }),
|
|
6446
6438
|
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: "Capture Photo" })
|
|
6447
6439
|
]
|
|
6448
6440
|
}
|
|
@@ -6469,7 +6461,7 @@ const Eo = ({
|
|
|
6469
6461
|
className: l,
|
|
6470
6462
|
animate: i = !0
|
|
6471
6463
|
}) => {
|
|
6472
|
-
const c = i !== !1, d =
|
|
6464
|
+
const c = i !== !1, d = Q(null), m = (u) => {
|
|
6473
6465
|
u && t(Array.from(u));
|
|
6474
6466
|
};
|
|
6475
6467
|
return /* @__PURE__ */ s("div", { className: p("w-full", l), children: [
|
|
@@ -6516,33 +6508,33 @@ const Eo = ({
|
|
|
6516
6508
|
className: n,
|
|
6517
6509
|
animate: l = !0
|
|
6518
6510
|
}) => {
|
|
6519
|
-
const i = l !== !1, [c, d] =
|
|
6511
|
+
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
6512
|
try {
|
|
6521
6513
|
const h = await navigator.mediaDevices.getUserMedia({ audio: !0 }), T = new MediaRecorder(h);
|
|
6522
|
-
N.current = T, k.current = [], T.ondataavailable = (
|
|
6523
|
-
|
|
6514
|
+
N.current = T, k.current = [], T.ondataavailable = (y) => {
|
|
6515
|
+
y.data.size > 0 && k.current.push(y.data);
|
|
6524
6516
|
}, T.onstop = () => {
|
|
6525
|
-
const
|
|
6526
|
-
|
|
6527
|
-
}, T.start(), d(!0),
|
|
6528
|
-
|
|
6517
|
+
const y = new Blob(k.current, { type: "audio/webm" }), b = URL.createObjectURL(y);
|
|
6518
|
+
E(b), t(y), h.getTracks().forEach((L) => L.stop());
|
|
6519
|
+
}, T.start(), d(!0), v(0), C.current = setInterval(() => {
|
|
6520
|
+
v((y) => y >= o ? (z(), y) : y + 1);
|
|
6529
6521
|
}, 1e3);
|
|
6530
6522
|
} catch (h) {
|
|
6531
6523
|
console.error("Error accessing microphone:", h);
|
|
6532
6524
|
}
|
|
6525
|
+
}, O = () => {
|
|
6526
|
+
N.current?.state === "recording" && (N.current.pause(), u(!0), C.current && clearInterval(C.current));
|
|
6533
6527
|
}, 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));
|
|
6528
|
+
N.current?.state === "paused" && (N.current.resume(), u(!1), C.current = setInterval(() => {
|
|
6529
|
+
v((h) => Math.min(h + 1, o));
|
|
6538
6530
|
}, 1e3));
|
|
6539
|
-
},
|
|
6540
|
-
N.current && (N.current.stop(), d(!1), u(!1),
|
|
6541
|
-
},
|
|
6542
|
-
|
|
6543
|
-
},
|
|
6544
|
-
const T = Math.floor(h / 60),
|
|
6545
|
-
return `${T.toString().padStart(2, "0")}:${
|
|
6531
|
+
}, z = () => {
|
|
6532
|
+
N.current && (N.current.stop(), d(!1), u(!1), C.current && (clearInterval(C.current), C.current = null));
|
|
6533
|
+
}, j = () => {
|
|
6534
|
+
E(null), v(0);
|
|
6535
|
+
}, B = (h) => {
|
|
6536
|
+
const T = Math.floor(h / 60), y = h % 60;
|
|
6537
|
+
return `${T.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}`;
|
|
6546
6538
|
};
|
|
6547
6539
|
return /* @__PURE__ */ s("div", { className: p("w-full", n), children: [
|
|
6548
6540
|
r && /* @__PURE__ */ e("label", { className: "block mb-2 text-sm font-medium text-primary", children: r }),
|
|
@@ -6554,7 +6546,7 @@ const Eo = ({
|
|
|
6554
6546
|
{
|
|
6555
6547
|
type: "button",
|
|
6556
6548
|
whileTap: i ? { scale: a ? 1 : 0.95 } : void 0,
|
|
6557
|
-
onClick: c ? m ?
|
|
6549
|
+
onClick: c ? m ? D : O : I,
|
|
6558
6550
|
disabled: a,
|
|
6559
6551
|
className: p(
|
|
6560
6552
|
"w-16 h-16 md:w-20 md:h-20 rounded-full flex items-center justify-center",
|
|
@@ -6562,7 +6554,7 @@ const Eo = ({
|
|
|
6562
6554
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
6563
6555
|
c ? p("bg-warning text-white", i && "animate-pulse") : "bg-primary text-white hover:bg-primary-dark"
|
|
6564
6556
|
),
|
|
6565
|
-
children: c ? m ? /* @__PURE__ */ e(Yt, { className: "w-6 h-6 md:w-8 md:h-8" }) : /* @__PURE__ */ e(
|
|
6557
|
+
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
6558
|
}
|
|
6567
6559
|
),
|
|
6568
6560
|
c && !m && /* @__PURE__ */ e(
|
|
@@ -6575,7 +6567,7 @@ const Eo = ({
|
|
|
6575
6567
|
)
|
|
6576
6568
|
] }),
|
|
6577
6569
|
/* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
6578
|
-
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children:
|
|
6570
|
+
/* @__PURE__ */ e("p", { className: "text-xl md:text-2xl font-mono font-semibold text-foreground", children: B(g) }),
|
|
6579
6571
|
/* @__PURE__ */ e("p", { className: "text-xs md:text-sm text-primary/70 mt-1", children: c ? m ? "Paused" : "Recording..." : "Tap to record" })
|
|
6580
6572
|
] }),
|
|
6581
6573
|
c && /* @__PURE__ */ s(
|
|
@@ -6583,7 +6575,7 @@ const Eo = ({
|
|
|
6583
6575
|
{
|
|
6584
6576
|
...i ? { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 } } : {},
|
|
6585
6577
|
type: "button",
|
|
6586
|
-
onClick:
|
|
6578
|
+
onClick: z,
|
|
6587
6579
|
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
6580
|
children: [
|
|
6589
6581
|
/* @__PURE__ */ e(Kt, { className: "w-4 h-4" }),
|
|
@@ -6602,13 +6594,13 @@ const Eo = ({
|
|
|
6602
6594
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
6603
6595
|
/* @__PURE__ */ s("span", { className: "text-sm text-primary/70", children: [
|
|
6604
6596
|
"Duration: ",
|
|
6605
|
-
|
|
6597
|
+
B(g)
|
|
6606
6598
|
] }),
|
|
6607
6599
|
/* @__PURE__ */ s(
|
|
6608
6600
|
"button",
|
|
6609
6601
|
{
|
|
6610
6602
|
type: "button",
|
|
6611
|
-
onClick:
|
|
6603
|
+
onClick: j,
|
|
6612
6604
|
className: "flex items-center gap-2 px-3 py-1.5 text-sm text-error hover:bg-red-50 rounded-lg transition-colors",
|
|
6613
6605
|
children: [
|
|
6614
6606
|
/* @__PURE__ */ e(_t, { className: "w-4 h-4" }),
|
|
@@ -6645,7 +6637,7 @@ const Eo = ({
|
|
|
6645
6637
|
case "audio":
|
|
6646
6638
|
return /* @__PURE__ */ e(et, { className: "w-8 h-8 text-primary" });
|
|
6647
6639
|
default:
|
|
6648
|
-
return /* @__PURE__ */ e(
|
|
6640
|
+
return /* @__PURE__ */ e(qt, { className: "w-8 h-8 text-primary" });
|
|
6649
6641
|
}
|
|
6650
6642
|
};
|
|
6651
6643
|
return t.length === 0 ? null : /* @__PURE__ */ e("div", { className: p("w-full", n), children: /* @__PURE__ */ e("div", { className: p("grid gap-3", c[a]), children: t.map((u) => /* @__PURE__ */ s(
|
|
@@ -6778,23 +6770,23 @@ export {
|
|
|
6778
6770
|
mo as DualSlider,
|
|
6779
6771
|
Mo as FAB,
|
|
6780
6772
|
Po as FileUploader,
|
|
6781
|
-
|
|
6782
|
-
|
|
6773
|
+
$r as FloatingActionButton,
|
|
6774
|
+
Vr as Input,
|
|
6783
6775
|
wo as Modal,
|
|
6784
6776
|
vo as ModalContent,
|
|
6785
6777
|
Co as ModalFooter,
|
|
6786
|
-
|
|
6778
|
+
Wr as MultiSelect,
|
|
6787
6779
|
To as OfflineBadge,
|
|
6788
6780
|
So as Pagination,
|
|
6789
6781
|
kt as PhoneInput,
|
|
6790
6782
|
lo as RadioPills,
|
|
6791
6783
|
Yr as Select,
|
|
6792
6784
|
co as Slider,
|
|
6793
|
-
|
|
6785
|
+
qr as Spinner,
|
|
6794
6786
|
Ao as StepProgress,
|
|
6795
6787
|
Lo as SyncIndicator,
|
|
6796
6788
|
ko as Table,
|
|
6797
|
-
|
|
6789
|
+
Ur as Textarea,
|
|
6798
6790
|
Bo as ThumbnailGrid,
|
|
6799
6791
|
Xr as ToastProvider,
|
|
6800
6792
|
Hr as Toggle,
|