tailwind-ux-kit 1.0.96 → 1.0.98
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/lib/tailwind-ux-kit.es.js +101 -101
- package/lib/tailwind-ux-kit.umd.js +7 -7
- package/package.json +1 -1
|
@@ -55,65 +55,65 @@ const ee = {
|
|
|
55
55
|
inputType: h = "",
|
|
56
56
|
inputPattern: v,
|
|
57
57
|
...m
|
|
58
|
-
} = e, [
|
|
59
|
-
(
|
|
60
|
-
const
|
|
61
|
-
|
|
58
|
+
} = e, [w, O] = M("default"), y = T.useCallback(
|
|
59
|
+
(D) => {
|
|
60
|
+
const E = D.target.value, Z = (p == null ? void 0 : p(E)) ?? "default";
|
|
61
|
+
O(Z), u == null || u(D, Z), f == null || f(D);
|
|
62
62
|
},
|
|
63
63
|
[p, u, f]
|
|
64
|
-
),
|
|
65
|
-
() => he(
|
|
66
|
-
[
|
|
67
|
-
), B = z(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = z(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]), F = (
|
|
64
|
+
), L = z(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), I = !!l, C = ee[s] || ee.md, j = te[c] || te.flat, P = z(
|
|
65
|
+
() => he(w, x, g),
|
|
66
|
+
[w, x, g]
|
|
67
|
+
), B = z(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = z(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]), F = (D) => {
|
|
68
68
|
var H;
|
|
69
|
-
const
|
|
70
|
-
!(
|
|
69
|
+
const E = D.key;
|
|
70
|
+
!(D.ctrlKey || D.metaKey || E.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(E)) && (() => {
|
|
71
71
|
const W = /^\d$/, Y = /^[a-zA-Z]$/;
|
|
72
72
|
switch (h) {
|
|
73
73
|
case "numeric":
|
|
74
74
|
case "number":
|
|
75
75
|
case "integer":
|
|
76
|
-
return !W.test(
|
|
76
|
+
return !W.test(E);
|
|
77
77
|
case "decimal":
|
|
78
|
-
return !W.test(
|
|
78
|
+
return !W.test(E) && E !== "." && E !== "Backspace" && E !== "Tab";
|
|
79
79
|
case "alphabetic":
|
|
80
|
-
return !Y.test(
|
|
80
|
+
return !Y.test(E);
|
|
81
81
|
case "custom":
|
|
82
|
-
return v ? !v.test(
|
|
82
|
+
return v ? !v.test(E) : !1;
|
|
83
83
|
default:
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
})() &&
|
|
87
|
-
}, U = (
|
|
86
|
+
})() && D.preventDefault(), (H = m.onKeyDown) == null || H.call(m, D);
|
|
87
|
+
}, U = (D) => {
|
|
88
88
|
var X;
|
|
89
|
-
const
|
|
89
|
+
const E = D.clipboardData.getData("Text");
|
|
90
90
|
(() => {
|
|
91
91
|
const H = /^\d+$/, W = /^\d*\.?\d*$/, Y = /^[a-zA-Z]+$/;
|
|
92
92
|
switch (h) {
|
|
93
93
|
case "numeric":
|
|
94
94
|
case "number":
|
|
95
95
|
case "integer":
|
|
96
|
-
return !H.test(
|
|
96
|
+
return !H.test(E);
|
|
97
97
|
case "decimal":
|
|
98
|
-
return !W.test(
|
|
98
|
+
return !W.test(E);
|
|
99
99
|
case "alphabetic":
|
|
100
|
-
return !Y.test(
|
|
100
|
+
return !Y.test(E);
|
|
101
101
|
case "custom":
|
|
102
|
-
return v ? !v.test(
|
|
102
|
+
return v ? !v.test(E) : !1;
|
|
103
103
|
default:
|
|
104
104
|
return !1;
|
|
105
105
|
}
|
|
106
|
-
})() &&
|
|
106
|
+
})() && D.preventDefault(), (X = m.onPaste) == null || X.call(m, D);
|
|
107
107
|
};
|
|
108
108
|
return /* @__PURE__ */ k(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
|
-
className: `w-full relative ${
|
|
111
|
+
className: `w-full relative ${I ? "z-0" : ""} tailwind-ux-input`,
|
|
112
112
|
children: [
|
|
113
|
-
!
|
|
113
|
+
!I && t && /* @__PURE__ */ i(
|
|
114
114
|
"label",
|
|
115
115
|
{
|
|
116
|
-
htmlFor:
|
|
116
|
+
htmlFor: L,
|
|
117
117
|
className: `block mb-1 text-sm ${x ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${N}`,
|
|
118
118
|
children: t
|
|
119
119
|
}
|
|
@@ -131,22 +131,22 @@ const ee = {
|
|
|
131
131
|
"input",
|
|
132
132
|
{
|
|
133
133
|
...m,
|
|
134
|
-
id:
|
|
134
|
+
id: L,
|
|
135
135
|
ref: n,
|
|
136
|
-
placeholder:
|
|
137
|
-
onChange:
|
|
136
|
+
placeholder: I ? " " : m.placeholder,
|
|
137
|
+
onChange: y,
|
|
138
138
|
onKeyDown: F,
|
|
139
139
|
onPaste: U,
|
|
140
140
|
className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
|
|
141
141
|
${C}
|
|
142
|
-
${
|
|
143
|
-
${_} ${
|
|
142
|
+
${I && l && me[l]}
|
|
143
|
+
${_} ${j} ${P} ${d}`
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
|
|
146
|
+
I && t && l && /* @__PURE__ */ i(
|
|
147
147
|
"label",
|
|
148
148
|
{
|
|
149
|
-
htmlFor:
|
|
149
|
+
htmlFor: L,
|
|
150
150
|
className: `ms-1 ${xe[l]} ${d}`,
|
|
151
151
|
children: t
|
|
152
152
|
}
|
|
@@ -217,15 +217,15 @@ const we = {
|
|
|
217
217
|
feedbackType: $ = "invalid",
|
|
218
218
|
children: S,
|
|
219
219
|
...N
|
|
220
|
-
} = e, [h, v] = M("default"), m = be(),
|
|
220
|
+
} = e, [h, v] = M("default"), m = be(), w = z(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : m), [r, t, m]), O = (B) => {
|
|
221
221
|
const _ = B.target.value, F = (p == null ? void 0 : p(_)) ?? "default";
|
|
222
222
|
v(F), u == null || u(B, F), f == null || f(B);
|
|
223
|
-
},
|
|
224
|
-
return /* @__PURE__ */ k("div", { className: `w-full relative ${
|
|
225
|
-
!
|
|
223
|
+
}, y = !!l, L = we[s], I = ve[c], C = ke(h, x, g);
|
|
224
|
+
return /* @__PURE__ */ k("div", { className: `w-full relative ${y ? "z-0" : ""}`, children: [
|
|
225
|
+
!y && t && /* @__PURE__ */ i(
|
|
226
226
|
"label",
|
|
227
227
|
{
|
|
228
|
-
htmlFor:
|
|
228
|
+
htmlFor: w,
|
|
229
229
|
className: `block mb-1 text-sm ${x ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
|
|
230
230
|
children: t
|
|
231
231
|
}
|
|
@@ -242,20 +242,20 @@ const we = {
|
|
|
242
242
|
"select",
|
|
243
243
|
{
|
|
244
244
|
...N,
|
|
245
|
-
id:
|
|
245
|
+
id: w,
|
|
246
246
|
ref: n,
|
|
247
|
-
onChange:
|
|
247
|
+
onChange: O,
|
|
248
248
|
className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
|
|
249
|
-
${
|
|
250
|
-
${
|
|
251
|
-
${
|
|
249
|
+
${L} ${a && (o === "start" || o === "left") ? "ps-10" : a ? "pe-10" : ""}
|
|
250
|
+
${y && l && Ce[l]}
|
|
251
|
+
${I} ${C} ${d}`,
|
|
252
252
|
children: S
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
|
-
|
|
255
|
+
y && t && l && /* @__PURE__ */ i(
|
|
256
256
|
"label",
|
|
257
257
|
{
|
|
258
|
-
htmlFor:
|
|
258
|
+
htmlFor: w,
|
|
259
259
|
className: `ms-1 ${$e[l]} ${d}`,
|
|
260
260
|
children: t
|
|
261
261
|
}
|
|
@@ -297,13 +297,13 @@ const Ne = {
|
|
|
297
297
|
"soft-info": "btn-soft-info",
|
|
298
298
|
"soft-dark": "btn-soft-dark",
|
|
299
299
|
"soft-light": "btn-soft-light"
|
|
300
|
-
},
|
|
300
|
+
}, Le = {
|
|
301
301
|
xs: "px-3 py-2 text-xs",
|
|
302
302
|
sm: "px-3 py-2 text-sm",
|
|
303
303
|
md: "px-5 py-2.5 text-sm",
|
|
304
304
|
lg: "px-5 py-3 text-base",
|
|
305
305
|
xl: "px-6 py-3.5 text-base"
|
|
306
|
-
},
|
|
306
|
+
}, Ee = {
|
|
307
307
|
flat: "shadow-none",
|
|
308
308
|
rounded: "rounded-sm",
|
|
309
309
|
pill: "rounded-full",
|
|
@@ -322,8 +322,8 @@ const Ne = {
|
|
|
322
322
|
const a = u || p, o = [
|
|
323
323
|
"inline-flex items-center justify-center font-normal transition duration-150",
|
|
324
324
|
Ne[n],
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
Le[t],
|
|
326
|
+
Ee[s],
|
|
327
327
|
s === "flat" ? "shadow-none" : "shadow-sm",
|
|
328
328
|
a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
329
329
|
c
|
|
@@ -521,9 +521,9 @@ const Te = {
|
|
|
521
521
|
checked: l,
|
|
522
522
|
...f
|
|
523
523
|
}, x) => {
|
|
524
|
-
const g = (
|
|
525
|
-
!c && s && s(
|
|
526
|
-
}, b = "mr-2 border flex items-center justify-center transition-all", $ = Te[n], S = Re[t], N = Be[r] ?? "", h = r.startsWith("outline"), v = r.startsWith("soft"),
|
|
524
|
+
const g = (L) => {
|
|
525
|
+
!c && s && s(L.target.checked), f.onChange && f.onChange(L);
|
|
526
|
+
}, b = "mr-2 border flex items-center justify-center transition-all", $ = Te[n], S = Re[t], N = Be[r] ?? "", h = r.startsWith("outline"), v = r.startsWith("soft"), O = `${b} ${$} ${S} ${N} ${l && (h || v || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, y = {
|
|
527
527
|
xs: "w-2 h-2",
|
|
528
528
|
sm: "w-2.5 h-2.5",
|
|
529
529
|
md: "w-3 h-3",
|
|
@@ -548,7 +548,7 @@ const Te = {
|
|
|
548
548
|
...f
|
|
549
549
|
}
|
|
550
550
|
),
|
|
551
|
-
/* @__PURE__ */ i("span", { className:
|
|
551
|
+
/* @__PURE__ */ i("span", { className: O.trim(), children: (l || f.defaultChecked) && (a ?? /* @__PURE__ */ i(Me, { className: `${y[n]}` })) }),
|
|
552
552
|
e || o ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? o }) : null
|
|
553
553
|
]
|
|
554
554
|
}
|
|
@@ -577,33 +577,33 @@ const Ve = ({
|
|
|
577
577
|
center: "left-1/2 transform -translate-x-1/2",
|
|
578
578
|
right: "right-0"
|
|
579
579
|
})[c], [c]), m = A(() => {
|
|
580
|
-
const C = h.current,
|
|
581
|
-
if (!C || !
|
|
582
|
-
const { top:
|
|
580
|
+
const C = h.current, j = N.current;
|
|
581
|
+
if (!C || !j) return;
|
|
582
|
+
const { top: P, bottom: B } = C.getBoundingClientRect(), _ = j.offsetHeight, F = window.innerHeight - B, U = P;
|
|
583
583
|
S(F < _ && U > _);
|
|
584
|
-
}, []),
|
|
585
|
-
var
|
|
586
|
-
!((
|
|
587
|
-
}, []),
|
|
584
|
+
}, []), w = A((C) => {
|
|
585
|
+
var j, P;
|
|
586
|
+
!((j = N.current) != null && j.contains(C.target)) && !((P = h.current) != null && P.contains(C.target)) && b(!1);
|
|
587
|
+
}, []), O = A(() => b((C) => !C), []), y = A(() => b(!1), []);
|
|
588
588
|
R(() => {
|
|
589
589
|
if (g)
|
|
590
590
|
return m(), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), () => {
|
|
591
591
|
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
592
592
|
};
|
|
593
593
|
}, [g, m]);
|
|
594
|
-
const
|
|
594
|
+
const L = K(g);
|
|
595
595
|
R(() => {
|
|
596
|
-
|
|
596
|
+
L.current = g;
|
|
597
597
|
}, [g]), R(() => {
|
|
598
|
-
const C = (
|
|
599
|
-
var
|
|
600
|
-
|
|
598
|
+
const C = (j) => {
|
|
599
|
+
var P;
|
|
600
|
+
j.key === "Escape" && L.current && (b(!1), (P = h.current) == null || P.focus());
|
|
601
601
|
};
|
|
602
602
|
return document.addEventListener("keydown", C), () => {
|
|
603
603
|
document.removeEventListener("keydown", C);
|
|
604
604
|
};
|
|
605
|
-
}, []), R(() => (document.addEventListener("mousedown",
|
|
606
|
-
const
|
|
605
|
+
}, []), R(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
|
|
606
|
+
const I = z(
|
|
607
607
|
() => [
|
|
608
608
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
609
609
|
$ ? "bottom-full mb-2" : "top-full mt-2",
|
|
@@ -620,28 +620,28 @@ const Ve = ({
|
|
|
620
620
|
{
|
|
621
621
|
type: "button",
|
|
622
622
|
ref: h,
|
|
623
|
-
onClick:
|
|
623
|
+
onClick: O,
|
|
624
624
|
"aria-expanded": g,
|
|
625
625
|
"aria-label": l,
|
|
626
626
|
className: "focus:outline-none",
|
|
627
627
|
children: e
|
|
628
628
|
}
|
|
629
629
|
),
|
|
630
|
-
g && /* @__PURE__ */ k("div", { ref: N, role: "menu", className:
|
|
630
|
+
g && /* @__PURE__ */ k("div", { ref: N, role: "menu", className: I, children: [
|
|
631
631
|
n && n,
|
|
632
|
-
t.map((C,
|
|
633
|
-
const
|
|
634
|
-
r && r(C), a &&
|
|
632
|
+
t.map((C, j) => {
|
|
633
|
+
const P = () => {
|
|
634
|
+
r && r(C), a && y();
|
|
635
635
|
};
|
|
636
|
-
return /* @__PURE__ */ i("div", { children: s ? s(C,
|
|
636
|
+
return /* @__PURE__ */ i("div", { children: s ? s(C, P) : /* @__PURE__ */ i(
|
|
637
637
|
"div",
|
|
638
638
|
{
|
|
639
|
-
onClick:
|
|
639
|
+
onClick: P,
|
|
640
640
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
641
641
|
role: "menuitem",
|
|
642
642
|
children: C.label
|
|
643
643
|
}
|
|
644
|
-
) },
|
|
644
|
+
) }, j);
|
|
645
645
|
})
|
|
646
646
|
] })
|
|
647
647
|
] });
|
|
@@ -830,15 +830,15 @@ function nt({
|
|
|
830
830
|
const x = se[c] || se.rounded, g = oe[u] || oe.md, b = K(null), [$, S] = M({});
|
|
831
831
|
R(() => {
|
|
832
832
|
if (!b.current) return;
|
|
833
|
-
const h = e.findIndex((
|
|
833
|
+
const h = e.findIndex((w) => w.value === n);
|
|
834
834
|
if (h === -1) return;
|
|
835
835
|
const m = b.current.querySelectorAll("button")[h];
|
|
836
836
|
if (m) {
|
|
837
|
-
const { offsetLeft:
|
|
837
|
+
const { offsetLeft: w, offsetWidth: O, offsetHeight: y } = m;
|
|
838
838
|
S({
|
|
839
|
-
transform: `translateX(${
|
|
840
|
-
width:
|
|
841
|
-
height:
|
|
839
|
+
transform: `translateX(${w}px)`,
|
|
840
|
+
width: O,
|
|
841
|
+
height: y
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
844
|
}, [n, e, u]);
|
|
@@ -885,8 +885,8 @@ function nt({
|
|
|
885
885
|
"aria-checked": v,
|
|
886
886
|
disabled: m,
|
|
887
887
|
onClick: () => !m && t(h.value),
|
|
888
|
-
onKeyDown: (
|
|
889
|
-
(
|
|
888
|
+
onKeyDown: (w) => {
|
|
889
|
+
(w.key === "Enter" || w.key === " ") && !m && (w.preventDefault(), t(h.value));
|
|
890
890
|
},
|
|
891
891
|
className: `
|
|
892
892
|
relative z-10
|
|
@@ -1001,34 +1001,34 @@ function st({
|
|
|
1001
1001
|
x ? f.closeModal(e) : b(!1), d == null || d();
|
|
1002
1002
|
}, [x, f, e, d]);
|
|
1003
1003
|
return R(() => {
|
|
1004
|
-
const h = document.
|
|
1004
|
+
const h = document.getElementById(e), v = [
|
|
1005
1005
|
"a[href]",
|
|
1006
1006
|
"button:not([disabled])",
|
|
1007
1007
|
"textarea:not([disabled])",
|
|
1008
1008
|
"input:not([disabled])",
|
|
1009
1009
|
"select:not([disabled])",
|
|
1010
1010
|
'[tabindex]:not([tabindex="-1"])'
|
|
1011
|
-
],
|
|
1012
|
-
if (!
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1011
|
+
], m = () => {
|
|
1012
|
+
if (!h) return [];
|
|
1013
|
+
const y = h.querySelectorAll(
|
|
1014
|
+
v.join(",")
|
|
1015
1015
|
);
|
|
1016
|
-
return Array.from(
|
|
1017
|
-
},
|
|
1018
|
-
if (
|
|
1019
|
-
const L =
|
|
1016
|
+
return Array.from(y).filter((L) => L.offsetParent !== null);
|
|
1017
|
+
}, w = (y) => {
|
|
1018
|
+
if (y.key === "Tab") {
|
|
1019
|
+
const L = m();
|
|
1020
1020
|
if (L.length === 0) return;
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1021
|
+
const I = L[0], C = L[L.length - 1];
|
|
1022
|
+
y.shiftKey ? document.activeElement === I && (y.preventDefault(), C.focus()) : document.activeElement === C && (y.preventDefault(), I.focus());
|
|
1023
1023
|
}
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1024
|
+
}, O = (y) => {
|
|
1025
|
+
y.key === "Escape" && !a && N(), w(y);
|
|
1026
1026
|
};
|
|
1027
1027
|
return $ && (document.body.style.overflow = "hidden", setTimeout(() => {
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
}, 0), window.addEventListener("keydown",
|
|
1031
|
-
document.body.style.overflow = "",
|
|
1028
|
+
const y = m();
|
|
1029
|
+
y.length && y[0].focus();
|
|
1030
|
+
}, 0), window.addEventListener("keydown", O)), () => {
|
|
1031
|
+
document.body.style.overflow = "", window.removeEventListener("keydown", O);
|
|
1032
1032
|
};
|
|
1033
1033
|
}, [$, a, N, e]), $ ? /* @__PURE__ */ i(
|
|
1034
1034
|
"div",
|
|
@@ -1131,7 +1131,7 @@ const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1131
1131
|
{
|
|
1132
1132
|
className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
|
|
1133
1133
|
children: n.map((s) => {
|
|
1134
|
-
var a, o, l, f, x, g, b, $, S, N, h, v, m,
|
|
1134
|
+
var a, o, l, f, x, g, b, $, S, N, h, v, m, w;
|
|
1135
1135
|
const c = ((a = s.config) == null ? void 0 : a.icon) || ((o = r.icons) == null ? void 0 : o[s.type]) || Xe(s.type), p = ((l = s.config) == null ? void 0 : l.bgColor) || ((x = (f = r.colors) == null ? void 0 : f[s.type]) == null ? void 0 : x.bg) || "bg-white dark:bg-gray-800", u = ((g = s.config) == null ? void 0 : g.textColor) || (($ = (b = r.colors) == null ? void 0 : b[s.type]) == null ? void 0 : $.text) || "text-gray-700 dark:text-gray-300", d = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(S = s.config) == null ? void 0 : S.iconContainerClass}`;
|
|
1136
1136
|
return /* @__PURE__ */ k(
|
|
1137
1137
|
"div",
|
|
@@ -1150,7 +1150,7 @@ const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1150
1150
|
((m = s.config) == null ? void 0 : m.description) && /* @__PURE__ */ i(
|
|
1151
1151
|
"div",
|
|
1152
1152
|
{
|
|
1153
|
-
className: `text-sm text-gray-500 ${(
|
|
1153
|
+
className: `text-sm text-gray-500 ${(w = s.config) == null ? void 0 : w.subTitleClass}`,
|
|
1154
1154
|
children: s.config.description
|
|
1155
1155
|
}
|
|
1156
1156
|
)
|
|
@@ -1158,7 +1158,7 @@ const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1158
1158
|
/* @__PURE__ */ i(
|
|
1159
1159
|
"button",
|
|
1160
1160
|
{
|
|
1161
|
-
onClick: () => t((
|
|
1161
|
+
onClick: () => t((O) => O.filter((y) => y.id !== s.id)),
|
|
1162
1162
|
className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
|
|
1163
1163
|
"aria-label": "Close",
|
|
1164
1164
|
children: /* @__PURE__ */ i(qe, { size: 18 })
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(function(m,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(m=typeof globalThis<"u"?globalThis:m||self,l(m.TailwindUiKit={},m.jsxRuntime,m.React))})(this,(function(m,l,a){"use strict";"use client";var Q=document.createElement("style");Q.textContent=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media(hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media(hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media(hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media(hover:hover){.btn-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.btn-outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.btn-outline-success:hover{background-color:var(--color-green-50,oklch(98.2% .018 155.826))}}.btn-soft-success{background-color:var(--color-green-100,oklch(96.2% .044 156.743));color:var(--color-green-700,oklch(52.7% .154 150.069))}@media(hover:hover){.btn-soft-success:hover{background-color:var(--color-green-200,oklch(92.5% .084 155.995))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media(hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media(hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-white,#fff)}@media(hover:hover){.btn-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.btn-outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.btn-outline-warning:hover{background-color:var(--color-yellow-50,oklch(98.7% .026 102.212))}}.btn-soft-warning{background-color:var(--color-yellow-100,oklch(97.3% .071 103.193));color:var(--color-yellow-700,oklch(55.4% .135 66.442))}@media(hover:hover){.btn-soft-warning:hover{background-color:var(--color-yellow-200,oklch(94.5% .129 101.54))}}.btn-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media(hover:hover){.btn-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.btn-outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.btn-outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.btn-soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media(hover:hover){.btn-soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.btn-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-white,#fff)}@media(hover:hover){.btn-dark:hover{background-color:var(--color-black,#000)}}.btn-outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.btn-outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-soft-dark{background-color:var(--color-gray-200,oklch(92.8% .006 264.531));color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.btn-soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.btn-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media(hover:hover){.btn-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.btn-outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.btn-soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media(hover:hover){.btn-link:hover{text-decoration-line:underline}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media(hover:hover){.primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}.primary:is(:where(.peer):checked~*):hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.outline-primary:is(:where(.peer):checked~*){color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.outline-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.soft-primary{border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-200,oklch(88.2% .059 254.128));color:var(--color-blue-600,oklch(54.6% .245 262.881))}.soft-primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.soft-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media(hover:hover){.secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media(hover:hover){.success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}.success:is(:where(.peer):checked~*):hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.outline-success:is(:where(.peer):checked~*){color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.outline-success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}}.soft-success{border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-200,oklch(92.5% .084 155.995));color:var(--color-green-600,oklch(62.7% .194 149.214))}.soft-success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.soft-success:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media(hover:hover){.danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}.danger:is(:where(.peer):checked~*):hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.outline-danger:is(:where(.peer):checked~*){color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.outline-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.soft-danger{border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-200,oklch(88.5% .062 18.334));color:var(--color-red-600,oklch(57.7% .245 27.325))}.soft-danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.soft-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-white,#fff)}@media(hover:hover){.warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}.warning:is(:where(.peer):checked~*):hover{background-color:var(--color-yellow-700,oklch(55.4% .135 66.442))}}.outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.outline-warning:is(:where(.peer):checked~*){color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.outline-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.soft-warning{border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-200,oklch(94.5% .129 101.54));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}.soft-warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.soft-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media(hover:hover){.info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media(hover:hover){.soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-700,oklch(37.3% .034 259.733));background-color:var(--color-white,#fff)}.dark:is(:where(.peer):checked~*){border-color:var(--color-black,#000);background-color:var(--color-black,#000);color:var(--color-white,#fff)}@media(hover:hover){.dark:hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark:hover{background-color:color-mix(in oklab,var(--color-black,#000)50%,transparent)}}}.outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));background-color:var(--color-white,#fff)}.outline-dark:is(:where(.peer):checked~*){color:var(--color-black,#000)}@media(hover:hover){.outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.soft-dark{border-color:var(--color-gray-600,oklch(44.6% .03 256.802));background-color:var(--color-gray-500,oklch(55.1% .027 264.364));color:var(--color-black,#000)}.soft-dark:is(:where(.peer):checked~*){border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-black,#000)}@media(hover:hover){.soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media(hover:hover){.light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media(hover:hover){.link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */.toggler-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.toggler-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.toggler-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.toggler-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.toggler-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.toggler-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.toggler-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.toggler-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.toggler-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047))}@media(hover:hover){.toggler-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.toggler-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.toggler-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.toggler-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.toggler-dark:hover{background-color:var(--color-black,#000)}}.toggler-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}@media(hover:hover){.toggler-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Q);const V={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},R={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ur={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},hr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},gr=(r,e,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(e)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},rr=a.forwardRef((r,e)=>{const{label:o,id:t,inputSize:n="md",shape:d="rounded",validate:b,onValidatedChange:h,className:u="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:g,isValid:y,isInvalid:f,feedback:v,iconClasses:S,feedbackType:N="invalid",labelClasses:E="",inputType:k="",inputPattern:C,...p}=r,[
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Q);const V={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},R={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ur={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},hr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},gr=(r,e,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(e)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},rr=a.forwardRef((r,e)=>{const{label:o,id:t,inputSize:n="md",shape:d="rounded",validate:b,onValidatedChange:h,className:u="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:g,isValid:y,isInvalid:f,feedback:v,iconClasses:S,feedbackType:N="invalid",labelClasses:E="",inputType:k="",inputPattern:C,...p}=r,[x,M]=a.useState("default"),w=a.useCallback(j=>{const O=j.target.value,F=(b==null?void 0:b(O))??"default";M(F),h==null||h(j,F),g==null||g(j)},[b,h,g]),L=a.useMemo(()=>t||(typeof o=="string"?`input-${o.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[t,o]),D=!!i,$=V[n]||V.md,I=R[d]||R.flat,P=a.useMemo(()=>gr(x,y,f),[x,y,f]),T=a.useMemo(()=>c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[c]),z=a.useMemo(()=>s?c==="start"||c==="left"?"ps-10":"pe-10":"",[s,c]),A=j=>{var K;const O=j.key;!(j.ctrlKey||j.metaKey||O.length!==1||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(O))&&(()=>{const Z=/^\d$/,J=/^[a-zA-Z]$/;switch(k){case"numeric":case"number":case"integer":return!Z.test(O);case"decimal":return!Z.test(O)&&O!=="."&&O!=="Backspace"&&O!=="Tab";case"alphabetic":return!J.test(O);case"custom":return C?!C.test(O):!1;default:return!1}})()&&j.preventDefault(),(K=p.onKeyDown)==null||K.call(p,j)},X=j=>{var Y;const O=j.clipboardData.getData("Text");(()=>{const K=/^\d+$/,Z=/^\d*\.?\d*$/,J=/^[a-zA-Z]+$/;switch(k){case"numeric":case"number":case"integer":return!K.test(O);case"decimal":return!Z.test(O);case"alphabetic":return!J.test(O);case"custom":return C?!C.test(O):!1;default:return!1}})()&&j.preventDefault(),(Y=p.onPaste)==null||Y.call(p,j)};return l.jsxs("div",{className:`w-full relative ${D?"z-0":""} tailwind-ux-input`,children:[!D&&o&&l.jsx("label",{htmlFor:L,className:`block mb-1 text-sm ${y?"text-green-700 dark:text-green-500":f?"text-red-700 dark:text-red-500":"text-gray-700"} ${E}`,children:o}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${T} ${S}`,"aria-hidden":"true",children:s}),l.jsx("input",{...p,id:L,ref:e,placeholder:D?" ":p.placeholder,onChange:w,onKeyDown:A,onPaste:X,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
|
|
3
3
|
${$}
|
|
4
|
-
${
|
|
5
|
-
${z} ${
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
${O} ${$} ${u}`,children:N}),L&&o&&i&&l.jsx("label",{htmlFor:w,className:`ms-1 ${pr[i]} ${u}`,children:o})]}),v&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:v})]})});or.displayName="Select";const kr={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},wr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},mr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},xr=({children:r,variant:e="primary",size:o="md",type:t="button",shape:n="rounded",className:d="",isLoading:b=!1,disabled:h=!1,...u})=>{const s=h||b,c=["inline-flex items-center justify-center font-normal transition duration-150",kr[e],wr[o],mr[n],n==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",d].filter(Boolean).join(" ");return l.jsxs("button",{type:t,className:c,disabled:s,...u,children:[b&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var er={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},tr=a.createContext&&a.createContext(er),Cr=["attr","size","title"];function $r(r,e){if(r==null)return{};var o=Sr(r,e),t,n;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(n=0;n<d.length;n++)t=d[n],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function Sr(r,e){if(r==null)return{};var o={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;o[t]=r[t]}return o}function _(){return _=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},_.apply(this,arguments)}function lr(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),o.push.apply(o,t)}return o}function B(r){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(o),!0).forEach(function(t){Nr(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):lr(Object(o)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))})}return r}function Nr(r,e,o){return e=Er(e),e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o,r}function Er(r){var e=Lr(r,"string");return typeof e=="symbol"?e:e+""}function Lr(r,e){if(typeof r!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var t=o.call(r,e);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function nr(r){return r&&r.map((e,o)=>a.createElement(e.tag,B({key:o},e.attr),nr(e.child)))}function H(r){return e=>a.createElement(Or,_({attr:B({},r.attr)},e),nr(r.child))}function Or(r){var e=o=>{var{attr:t,size:n,title:d}=r,b=$r(r,Cr),h=n||o.size||"1em",u;return o.className&&(u=o.className),r.className&&(u=(u?u+" ":"")+r.className),a.createElement("svg",_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,t,b,{className:u,style:B(B({color:r.color||o.color},o.style),r.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),d&&a.createElement("title",null,d),r.children)};return tr!==void 0?a.createElement(tr.Consumer,null,o=>e(o)):e(er)}function Mr(r){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(r)}const Pr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},Ir={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},jr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},ar=a.forwardRef(({label:r,boxSize:e="md",shape:o="rounded",variant:t="success",onSelectionChange:n,disabled:d=!1,className:b="",id:h,value:u,icon:s,children:c,checked:i,...g},y)=>{const f=x=>{!d&&n&&n(x.target.checked),g.onChange&&g.onChange(x)},v="mr-2 border flex items-center justify-center transition-all",S=Pr[e],N=Ir[o],E=jr[t]??"",k=t.startsWith("outline"),C=t.startsWith("soft"),j=`${v} ${S} ${N} ${E} ${i&&(k||C||t==="link")?"peer-checked:bg-current peer-checked:text-white":i?"peer-checked:bg-current":""}`,L={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${d?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${b}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:i,onChange:f,disabled:d,id:h,value:u,ref:y,...g}),l.jsx("span",{className:j.trim(),children:(i||g.defaultChecked)&&(s??l.jsx(Mr,{className:`${L[e]}`}))}),r||c?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??c}):null]})});ar.displayName="Checkbox";const Dr=({label:r,header:e,items:o=[],onSelect:t,renderItem:n,position:d="right",className:b="",menuClassName:h="",width:u="w-48",closeOnSelect:s=!1,transition:c=!0,ariaLabel:i="Dropdown menu",forceCloseDropdown:g,...y})=>{const[f,v]=a.useState(!1),[S,N]=a.useState(!1),E=a.useRef(null),k=a.useRef(null),C=a.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),p=a.useCallback(()=>{const $=k.current,M=E.current;if(!$||!M)return;const{top:I,bottom:T}=$.getBoundingClientRect(),z=M.offsetHeight,A=window.innerHeight-T,X=I;N(A<z&&X>z)},[]),w=a.useCallback($=>{var M,I;!((M=E.current)!=null&&M.contains($.target))&&!((I=k.current)!=null&&I.contains($.target))&&v(!1)},[]),j=a.useCallback(()=>v($=>!$),[]),L=a.useCallback(()=>v(!1),[]);a.useEffect(()=>{if(f)return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[f,p]);const x=a.useRef(f);a.useEffect(()=>{x.current=f},[f]),a.useEffect(()=>{const $=M=>{var I;M.key==="Escape"&&x.current&&(v(!1),(I=k.current)==null||I.focus())};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[]),a.useEffect(()=>(document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)),[w]);const O=a.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",S?"bottom-full mb-2":"top-full mt-2",C,u,c&&"transition-all duration-200 ease-out",h].filter(Boolean).join(" "),[S,C,u,c,h]);return l.jsxs("div",{className:`relative inline-block ${b}`,...y,children:[l.jsx("button",{type:"button",ref:k,onClick:j,"aria-expanded":f,"aria-label":i,className:"focus:outline-none",children:r}),f&&l.jsxs("div",{ref:E,role:"menu",className:O,children:[e&&e,o.map(($,M)=>{const I=()=>{t&&t($),s&&L()};return l.jsx("div",{children:n?n($,I):l.jsx("div",{onClick:I,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:$.label})},M)})]})]})},Tr=({children:r,content:e,position:o="top",className:t="",tooltipClass:n="",tooltipStyle:d={}})=>{const b=a.useRef(null),h=a.useRef(null);a.useEffect(()=>{const s=b.current,c=h.current;if(!s||!c)return;const i=()=>{c.style.opacity="1",c.style.visibility="visible"},g=()=>{c.style.opacity="0",c.style.visibility="hidden"};return s.addEventListener("mouseenter",i),s.addEventListener("mouseleave",g),()=>{s.removeEventListener("mouseenter",i),s.removeEventListener("mouseleave",g)}},[]);const u=s=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return l.jsxs("div",{ref:b,className:`relative inline-block ${t}`,children:[r,l.jsx("div",{ref:h,role:"tooltip",className:n,style:{...u(o),...d},children:e})]})},zr={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Ar={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},_r={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Br=({label:r,variant:e="primary",size:o="sm",shape:t="rounded",icon:n,dismissible:d,onDismiss:b,className:h="",...u})=>{const s=!r&&!!n,c=`inline-flex items-center font-medium ${zr[e]||""} ${Ar[o]||""} ${_r[t]||""} ${s?"justify-center p-2 w-8 h-8":""} `+h;return l.jsxs("span",{className:c.trim(),...u,children:[n&&l.jsx("span",{className:r?"mr-1":"",children:n}),r,d&&l.jsx("button",{type:"button",onClick:b,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})},cr={rounded:"rounded-md",pill:"rounded-full",flat:"rounded-none"},sr={xs:{button:"px-2 py-1 text-xs"},sm:{button:"px-3 py-1.5 text-sm"},md:{button:"px-4 py-2 text-sm"},lg:{button:"px-5 py-3 text-base"},xl:{button:"px-6 py-4 text-lg"}};function Fr({options:r,selected:e,onChange:o,label:t,disabled:n=!1,shape:d="rounded",variant:b="primary",size:h="md",className:u="",classNames:s={},id:c,name:i,renderOption:g}){const y=cr[d]||cr.rounded,f=sr[h]||sr.md,v=a.useRef(null),[S,N]=a.useState({});a.useEffect(()=>{if(!v.current)return;const k=r.findIndex(w=>w.value===e);if(k===-1)return;const p=v.current.querySelectorAll("button")[k];if(p){const{offsetLeft:w,offsetWidth:j,offsetHeight:L}=p;N({transform:`translateX(${w}px)`,width:j,height:L})}},[e,r,h]);const E=`toggler-${b}`;return l.jsxs("div",{className:`flex flex-col gap-2 w-fit ${u} ${s.root??""}`,id:c,children:[t&&l.jsx("span",{className:`text-sm font-medium select-none ${s.label??""}`,children:t}),l.jsxs("div",{ref:v,role:"radiogroup","aria-disabled":n,className:`relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${y} ${n?"opacity-50 cursor-not-allowed":""} ${s.group??""}`,children:[l.jsx("div",{className:`absolute top-0 left-0 transition-transform duration-300 ease-in-out ${y} ${E}`,style:{...S,zIndex:0},"aria-hidden":"true"}),r.map(k=>{const C=e===k.value,p=n||k.disabled;return l.jsx("button",{role:"radio",name:i,"aria-checked":C,disabled:p,onClick:()=>!p&&o(k.value),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&!p&&(w.preventDefault(),o(k.value))},className:`
|
|
4
|
+
${D&&i&&ur[i]}
|
|
5
|
+
${z} ${I} ${P} ${u}`}),D&&o&&i&&l.jsx("label",{htmlFor:L,className:`ms-1 ${hr[i]} ${u}`,children:o})]}),v&&l.jsx("p",{className:`mt-1 text-xs ${N==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:N==="invalid"?"alert":void 0,children:v})]})});rr.displayName="Input";const br={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},fr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},vr={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},pr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},yr=(r,e,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(e)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const t="focus:ring focus:border";switch(r){case"error":return`${t}-red-500 border-red-500 bg-red-50`;case"warning":return`${t}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${t}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},or=a.forwardRef((r,e)=>{const{label:o,id:t,inputSize:n="md",shape:d="rounded",validate:b,onValidatedChange:h,className:u="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:g,isValid:y,isInvalid:f,feedback:v,feedbackType:S="invalid",children:N,...E}=r,[k,C]=a.useState("default"),p=a.useId(),x=a.useMemo(()=>t||(typeof o=="string"?`select-${o.toLowerCase().replace(/\s+/g,"-")}`:p),[t,o,p]),M=T=>{const z=T.target.value,A=(b==null?void 0:b(z))??"default";C(A),h==null||h(T,A),g==null||g(T)},w=!!i,L=br[n],D=fr[d],$=yr(k,y,f),I=s&&(c==="start"||c==="left")?"ps-10":s?"pe-10":"",P=c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${w?"z-0":""}`,children:[!w&&o&&l.jsx("label",{htmlFor:x,className:`block mb-1 text-sm ${y?"text-green-700":f?"text-red-700":"text-gray-700"}`,children:o}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${P}`,children:l.jsx("span",{className:"text-gray-500",children:s})}),l.jsx("select",{...E,id:x,ref:e,onChange:M,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
|
|
6
|
+
${L} ${I}
|
|
7
|
+
${w&&i&&vr[i]}
|
|
8
|
+
${D} ${$} ${u}`,children:N}),w&&o&&i&&l.jsx("label",{htmlFor:x,className:`ms-1 ${pr[i]} ${u}`,children:o})]}),v&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:v})]})});or.displayName="Select";const kr={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},wr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},mr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},xr=({children:r,variant:e="primary",size:o="md",type:t="button",shape:n="rounded",className:d="",isLoading:b=!1,disabled:h=!1,...u})=>{const s=h||b,c=["inline-flex items-center justify-center font-normal transition duration-150",kr[e],wr[o],mr[n],n==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",d].filter(Boolean).join(" ");return l.jsxs("button",{type:t,className:c,disabled:s,...u,children:[b&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var er={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},tr=a.createContext&&a.createContext(er),Cr=["attr","size","title"];function $r(r,e){if(r==null)return{};var o=Sr(r,e),t,n;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(n=0;n<d.length;n++)t=d[n],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function Sr(r,e){if(r==null)return{};var o={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;o[t]=r[t]}return o}function _(){return _=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},_.apply(this,arguments)}function lr(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),o.push.apply(o,t)}return o}function B(r){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(o),!0).forEach(function(t){Nr(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):lr(Object(o)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))})}return r}function Nr(r,e,o){return e=Er(e),e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o,r}function Er(r){var e=Lr(r,"string");return typeof e=="symbol"?e:e+""}function Lr(r,e){if(typeof r!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var t=o.call(r,e);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function nr(r){return r&&r.map((e,o)=>a.createElement(e.tag,B({key:o},e.attr),nr(e.child)))}function H(r){return e=>a.createElement(Or,_({attr:B({},r.attr)},e),nr(r.child))}function Or(r){var e=o=>{var{attr:t,size:n,title:d}=r,b=$r(r,Cr),h=n||o.size||"1em",u;return o.className&&(u=o.className),r.className&&(u=(u?u+" ":"")+r.className),a.createElement("svg",_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,t,b,{className:u,style:B(B({color:r.color||o.color},o.style),r.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),d&&a.createElement("title",null,d),r.children)};return tr!==void 0?a.createElement(tr.Consumer,null,o=>e(o)):e(er)}function Mr(r){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(r)}const Pr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},Ir={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},jr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},ar=a.forwardRef(({label:r,boxSize:e="md",shape:o="rounded",variant:t="success",onSelectionChange:n,disabled:d=!1,className:b="",id:h,value:u,icon:s,children:c,checked:i,...g},y)=>{const f=L=>{!d&&n&&n(L.target.checked),g.onChange&&g.onChange(L)},v="mr-2 border flex items-center justify-center transition-all",S=Pr[e],N=Ir[o],E=jr[t]??"",k=t.startsWith("outline"),C=t.startsWith("soft"),M=`${v} ${S} ${N} ${E} ${i&&(k||C||t==="link")?"peer-checked:bg-current peer-checked:text-white":i?"peer-checked:bg-current":""}`,w={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${d?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${b}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:i,onChange:f,disabled:d,id:h,value:u,ref:y,...g}),l.jsx("span",{className:M.trim(),children:(i||g.defaultChecked)&&(s??l.jsx(Mr,{className:`${w[e]}`}))}),r||c?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??c}):null]})});ar.displayName="Checkbox";const Dr=({label:r,header:e,items:o=[],onSelect:t,renderItem:n,position:d="right",className:b="",menuClassName:h="",width:u="w-48",closeOnSelect:s=!1,transition:c=!0,ariaLabel:i="Dropdown menu",forceCloseDropdown:g,...y})=>{const[f,v]=a.useState(!1),[S,N]=a.useState(!1),E=a.useRef(null),k=a.useRef(null),C=a.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),p=a.useCallback(()=>{const $=k.current,I=E.current;if(!$||!I)return;const{top:P,bottom:T}=$.getBoundingClientRect(),z=I.offsetHeight,A=window.innerHeight-T,X=P;N(A<z&&X>z)},[]),x=a.useCallback($=>{var I,P;!((I=E.current)!=null&&I.contains($.target))&&!((P=k.current)!=null&&P.contains($.target))&&v(!1)},[]),M=a.useCallback(()=>v($=>!$),[]),w=a.useCallback(()=>v(!1),[]);a.useEffect(()=>{if(f)return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[f,p]);const L=a.useRef(f);a.useEffect(()=>{L.current=f},[f]),a.useEffect(()=>{const $=I=>{var P;I.key==="Escape"&&L.current&&(v(!1),(P=k.current)==null||P.focus())};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[]),a.useEffect(()=>(document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)),[x]);const D=a.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",S?"bottom-full mb-2":"top-full mt-2",C,u,c&&"transition-all duration-200 ease-out",h].filter(Boolean).join(" "),[S,C,u,c,h]);return l.jsxs("div",{className:`relative inline-block ${b}`,...y,children:[l.jsx("button",{type:"button",ref:k,onClick:M,"aria-expanded":f,"aria-label":i,className:"focus:outline-none",children:r}),f&&l.jsxs("div",{ref:E,role:"menu",className:D,children:[e&&e,o.map(($,I)=>{const P=()=>{t&&t($),s&&w()};return l.jsx("div",{children:n?n($,P):l.jsx("div",{onClick:P,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:$.label})},I)})]})]})},Tr=({children:r,content:e,position:o="top",className:t="",tooltipClass:n="",tooltipStyle:d={}})=>{const b=a.useRef(null),h=a.useRef(null);a.useEffect(()=>{const s=b.current,c=h.current;if(!s||!c)return;const i=()=>{c.style.opacity="1",c.style.visibility="visible"},g=()=>{c.style.opacity="0",c.style.visibility="hidden"};return s.addEventListener("mouseenter",i),s.addEventListener("mouseleave",g),()=>{s.removeEventListener("mouseenter",i),s.removeEventListener("mouseleave",g)}},[]);const u=s=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return l.jsxs("div",{ref:b,className:`relative inline-block ${t}`,children:[r,l.jsx("div",{ref:h,role:"tooltip",className:n,style:{...u(o),...d},children:e})]})},zr={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Ar={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},_r={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Br=({label:r,variant:e="primary",size:o="sm",shape:t="rounded",icon:n,dismissible:d,onDismiss:b,className:h="",...u})=>{const s=!r&&!!n,c=`inline-flex items-center font-medium ${zr[e]||""} ${Ar[o]||""} ${_r[t]||""} ${s?"justify-center p-2 w-8 h-8":""} `+h;return l.jsxs("span",{className:c.trim(),...u,children:[n&&l.jsx("span",{className:r?"mr-1":"",children:n}),r,d&&l.jsx("button",{type:"button",onClick:b,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})},cr={rounded:"rounded-md",pill:"rounded-full",flat:"rounded-none"},sr={xs:{button:"px-2 py-1 text-xs"},sm:{button:"px-3 py-1.5 text-sm"},md:{button:"px-4 py-2 text-sm"},lg:{button:"px-5 py-3 text-base"},xl:{button:"px-6 py-4 text-lg"}};function Fr({options:r,selected:e,onChange:o,label:t,disabled:n=!1,shape:d="rounded",variant:b="primary",size:h="md",className:u="",classNames:s={},id:c,name:i,renderOption:g}){const y=cr[d]||cr.rounded,f=sr[h]||sr.md,v=a.useRef(null),[S,N]=a.useState({});a.useEffect(()=>{if(!v.current)return;const k=r.findIndex(x=>x.value===e);if(k===-1)return;const p=v.current.querySelectorAll("button")[k];if(p){const{offsetLeft:x,offsetWidth:M,offsetHeight:w}=p;N({transform:`translateX(${x}px)`,width:M,height:w})}},[e,r,h]);const E=`toggler-${b}`;return l.jsxs("div",{className:`flex flex-col gap-2 w-fit ${u} ${s.root??""}`,id:c,children:[t&&l.jsx("span",{className:`text-sm font-medium select-none ${s.label??""}`,children:t}),l.jsxs("div",{ref:v,role:"radiogroup","aria-disabled":n,className:`relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${y} ${n?"opacity-50 cursor-not-allowed":""} ${s.group??""}`,children:[l.jsx("div",{className:`absolute top-0 left-0 transition-transform duration-300 ease-in-out ${y} ${E}`,style:{...S,zIndex:0},"aria-hidden":"true"}),r.map(k=>{const C=e===k.value,p=n||k.disabled;return l.jsx("button",{role:"radio",name:i,"aria-checked":C,disabled:p,onClick:()=>!p&&o(k.value),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&!p&&(x.preventDefault(),o(k.value))},className:`
|
|
9
9
|
relative z-10
|
|
10
10
|
transition-colors duration-200 focus:outline-none
|
|
11
11
|
${f.button}
|
|
12
12
|
${C?`text-white toggler-text-${b}`:"text-gray-700 hover:bg-gray-200"}
|
|
13
13
|
${s.option??""}
|
|
14
14
|
${C?s.selectedOption??"":""}
|
|
15
|
-
`,children:g?g(k,C):k.label},String(k.value))})]})]})}function Kr(r){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(r)}const Zr=({items:r,allowMultipleOpen:e=!1,className:o="",tileClasses:t="",open:n,onChange:d,renderTitle:b,renderContent:h,showArrowIcon:u=!0,panelClasses:s=""})=>{const[c,i]=a.useState(new Set),g=a.useMemo(()=>n?new Set(n):c,[n,c]),y=a.useCallback(f=>{const v=new Set(g);v.has(f)?v.delete(f):(e||v.clear(),v.add(f)),n&&d?d(Array.from(v)):i(v)},[g,n,d,e]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":e,children:r.map(f=>{const v=g.has(f.id),S=`accordion-heading-${f.id}`,N=`accordion-panel-${f.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${o}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":v,"aria-controls":N,onClick:()=>y(f.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${t}`,children:[b?b(f,v):f.title,u?l.jsx(Kr,{}):null]}),l.jsx("div",{id:N,role:"region","aria-labelledby":S,hidden:!v,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:h?h(f,v):f.content})]},f.id)})})},ir=a.createContext(null),W=()=>{const r=a.useContext(ir);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},dr=a.createContext(null),q=()=>a.useContext(dr);function Hr({id:r,title:e,children:o,standalone:t=!1,showFloatingClose:n=!1,containerClasses:d="",headerClasses:b="",bodyClasses:h="",onClose:u,disableEscapeClose:s=!1,closeBtnStyle:c}){const i=q(),g=W(),y=!t&&!!i&&!!g,[f,v]=a.useState(!1),S=y?i.isOpen(r):f,N=y?i.getModalData(r):null,E=a.useCallback(()=>{y?g.closeModal(r):v(!1),u==null||u()},[y,g,r,u]);return a.useEffect(()=>{const k=document.
|
|
15
|
+
`,children:g?g(k,C):k.label},String(k.value))})]})]})}function Kr(r){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(r)}const Zr=({items:r,allowMultipleOpen:e=!1,className:o="",tileClasses:t="",open:n,onChange:d,renderTitle:b,renderContent:h,showArrowIcon:u=!0,panelClasses:s=""})=>{const[c,i]=a.useState(new Set),g=a.useMemo(()=>n?new Set(n):c,[n,c]),y=a.useCallback(f=>{const v=new Set(g);v.has(f)?v.delete(f):(e||v.clear(),v.add(f)),n&&d?d(Array.from(v)):i(v)},[g,n,d,e]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":e,children:r.map(f=>{const v=g.has(f.id),S=`accordion-heading-${f.id}`,N=`accordion-panel-${f.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${o}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":v,"aria-controls":N,onClick:()=>y(f.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${t}`,children:[b?b(f,v):f.title,u?l.jsx(Kr,{}):null]}),l.jsx("div",{id:N,role:"region","aria-labelledby":S,hidden:!v,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:h?h(f,v):f.content})]},f.id)})})},ir=a.createContext(null),W=()=>{const r=a.useContext(ir);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},dr=a.createContext(null),q=()=>a.useContext(dr);function Hr({id:r,title:e,children:o,standalone:t=!1,showFloatingClose:n=!1,containerClasses:d="",headerClasses:b="",bodyClasses:h="",onClose:u,disableEscapeClose:s=!1,closeBtnStyle:c}){const i=q(),g=W(),y=!t&&!!i&&!!g,[f,v]=a.useState(!1),S=y?i.isOpen(r):f,N=y?i.getModalData(r):null,E=a.useCallback(()=>{y?g.closeModal(r):v(!1),u==null||u()},[y,g,r,u]);return a.useEffect(()=>{const k=document.getElementById(r),C=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],p=()=>{if(!k)return[];const w=k.querySelectorAll(C.join(","));return Array.from(w).filter(L=>L.offsetParent!==null)},x=w=>{if(w.key==="Tab"){const L=p();if(L.length===0)return;const D=L[0],$=L[L.length-1];w.shiftKey?document.activeElement===D&&(w.preventDefault(),$.focus()):document.activeElement===$&&(w.preventDefault(),D.focus())}},M=w=>{w.key==="Escape"&&!s&&E(),x(w)};return S&&(document.body.style.overflow="hidden",setTimeout(()=>{const w=p();w.length&&w[0].focus()},0),window.addEventListener("keydown",M)),()=>{document.body.style.overflow="",window.removeEventListener("keydown",M)}},[S,s,E,r]),S?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,children:[l.jsxs("div",{className:`flex justify-between items-center relative ${b}`,children:[e&&l.jsx("h2",{className:"text-lg font-semibold",children:e}),n&&l.jsx("button",{onClick:E,className:`text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${c}`,"aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{className:h,children:typeof o=="function"?o({modalData:N}):o})]})}):null}function Wr({children:r}){const[e,o]=a.useState({}),[t,n]=a.useState({}),d=a.useCallback((i,g)=>{o(y=>({...y,[i]:!0})),g&&n(y=>({...y,[i]:g}))},[]),b=a.useCallback(i=>{o(g=>({...g,[i]:!1})),n(g=>{const y={...g};return delete y[i],y})},[]),h=a.useCallback(i=>!!e[i],[e]),u=a.useCallback(i=>t[i],[t]),s=a.useMemo(()=>({openModal:d,closeModal:b}),[d,b]),c=a.useMemo(()=>({isOpen:h,getModalData:u}),[h,u]);return l.jsx(ir.Provider,{value:s,children:l.jsx(dr.Provider,{value:c,children:r})})}function qr(r){const{openModal:e,closeModal:o}=W(),{isOpen:t,getModalData:n}=q();return{open:d=>e(r,d),close:()=>o(r),isOpen:t(r),data:n(r)}}let G=null,U={};function Gr(r){G=r}function Ur(r){U={...U,...r}}function Xr(){return U}function Yr(r,e,o=3e3,t){G?G(r,e,o,t):console.warn("Toast system is not mounted")}function Jr(r){return H({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(r)}const Qr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)}),Vr=({containerStyle:r=""})=>{const[e,o]=a.useState([]);a.useEffect(()=>{Gr((n,d,b,h)=>{const u=Qr();o(s=>[...s,{id:u,type:n,message:d,config:h}]),setTimeout(()=>{o(s=>s.filter(c=>c.id!==u))},b)})},[]);const t=Xr();return l.jsx("div",{className:`fixed top-5 right-5 z-9999 flex flex-col gap-2 ${r}`,children:e.map(n=>{var s,c,i,g,y,f,v,S,N,E,k,C,p,x;const d=((s=n.config)==null?void 0:s.icon)||((c=t.icons)==null?void 0:c[n.type])||Rr(n.type),b=((i=n.config)==null?void 0:i.bgColor)||((y=(g=t.colors)==null?void 0:g[n.type])==null?void 0:y.bg)||"bg-white dark:bg-gray-800",h=((f=n.config)==null?void 0:f.textColor)||((S=(v=t.colors)==null?void 0:v[n.type])==null?void 0:S.text)||"text-gray-700 dark:text-gray-300",u=`w-8 h-8 mr-3 text-xl flex items-center justify-center ${(N=n.config)==null?void 0:N.iconContainerClass}`;return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${b} ${h} ${(E=n.config)==null?void 0:E.containerBody}`,children:[d&&l.jsx("div",{className:u,children:d}),l.jsxs("div",{className:"flex-1",children:[((k=n.config)==null?void 0:k.title)&&l.jsx("div",{className:`font-semibold text-black ${(C=n.config)==null?void 0:C.titleClass}`,children:n.config.title}),((p=n.config)==null?void 0:p.description)&&l.jsx("div",{className:`text-sm text-gray-500 ${(x=n.config)==null?void 0:x.subTitleClass}`,children:n.config.description})]}),l.jsx("button",{onClick:()=>o(M=>M.filter(w=>w.id!==n.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Jr,{size:18})})]},n.id)})})};function Rr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}m.Accordion=Zr,m.Badge=Br,m.Button=xr,m.Checkbox=ar,m.Dropdown=Dr,m.Input=rr,m.Modal=Hr,m.ModalProvider=Wr,m.Select=or,m.Toast=Vr,m.Toggler=Fr,m.Tooltip=Tr,m.setToastDefaults=Ur,m.showToast=Yr,m.useModalActions=W,m.useModalInstance=qr,m.useModalState=q,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|