tailwind-ux-kit 1.0.77 → 1.0.79
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 +100 -99
- package/lib/tailwind-ux-kit.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import A, { forwardRef as
|
|
4
|
-
const
|
|
2
|
+
import { jsxs as S, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import A, { forwardRef as se, useState as D, useMemo as I, useId as ge, useRef as W, useCallback as z, useEffect as _, createContext as oe, useContext as ae } from "react";
|
|
4
|
+
const ee = {
|
|
5
5
|
xs: "text-xs px-2 py-1",
|
|
6
6
|
sm: "text-sm px-3 py-1.5",
|
|
7
7
|
md: "text-sm px-3 py-3",
|
|
8
8
|
lg: "text-lg px-5 py-3"
|
|
9
|
-
},
|
|
9
|
+
}, te = {
|
|
10
10
|
flat: "rounded-none",
|
|
11
11
|
rounded: "rounded-sm",
|
|
12
12
|
pill: "rounded-full"
|
|
@@ -33,7 +33,7 @@ const V = {
|
|
|
33
33
|
default:
|
|
34
34
|
return "border-gray-300 focus:ring-blue-500";
|
|
35
35
|
}
|
|
36
|
-
}, he =
|
|
36
|
+
}, he = se((e, r) => {
|
|
37
37
|
const {
|
|
38
38
|
label: n,
|
|
39
39
|
id: t,
|
|
@@ -56,59 +56,60 @@ const V = {
|
|
|
56
56
|
inputPattern: h,
|
|
57
57
|
...y
|
|
58
58
|
} = e, [O, w] = D("default"), $ = A.useCallback(
|
|
59
|
-
(
|
|
60
|
-
const
|
|
61
|
-
w(
|
|
59
|
+
(P) => {
|
|
60
|
+
const N = P.target.value, K = (d == null ? void 0 : d(N)) ?? "default";
|
|
61
|
+
w(K), u == null || u(P, K), p == null || p(P);
|
|
62
62
|
},
|
|
63
63
|
[d, u, p]
|
|
64
|
-
), x = I(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!a,
|
|
64
|
+
), x = I(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!a, j = ee[o] || ee.md, B = te[c] || te.flat, T = I(
|
|
65
65
|
() => xe(O, b, g),
|
|
66
66
|
[O, b, g]
|
|
67
|
-
), M = I(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), R = I(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]),
|
|
68
|
-
var
|
|
69
|
-
const
|
|
70
|
-
(() => {
|
|
71
|
-
const
|
|
67
|
+
), M = I(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), R = I(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]), F = (P) => {
|
|
68
|
+
var Z;
|
|
69
|
+
const N = P.key;
|
|
70
|
+
!(P.ctrlKey || P.metaKey || N.length !== 1) && (() => {
|
|
71
|
+
const H = /^\d$/, X = /^[a-zA-Z]$/, Y = /^[a-zA-Z0-9]$/;
|
|
72
72
|
switch (L) {
|
|
73
73
|
case "numeric":
|
|
74
74
|
case "number":
|
|
75
75
|
case "integer":
|
|
76
|
-
return !
|
|
76
|
+
return !H.test(N);
|
|
77
77
|
case "decimal":
|
|
78
|
-
return !
|
|
78
|
+
return !H.test(N) && N !== "." && N !== "Backspace" && N !== "Tab";
|
|
79
79
|
case "alphabetic":
|
|
80
|
-
return !
|
|
80
|
+
return !X.test(N);
|
|
81
81
|
case "string":
|
|
82
|
-
return !
|
|
82
|
+
return !Y.test(N);
|
|
83
83
|
case "custom":
|
|
84
|
-
return h ? !h.test(
|
|
84
|
+
return h ? !h.test(N) : !1;
|
|
85
85
|
default:
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
})() &&
|
|
89
|
-
},
|
|
90
|
-
var
|
|
91
|
-
const
|
|
88
|
+
})() && P.preventDefault(), (Z = y.onKeyDown) == null || Z.call(y, P);
|
|
89
|
+
}, pe = (P) => {
|
|
90
|
+
var q;
|
|
91
|
+
const N = P.clipboardData.getData("Text");
|
|
92
92
|
(() => {
|
|
93
|
-
const
|
|
93
|
+
const Z = /^\d+$/, H = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/, Y = /^[a-zA-Z0-9]+$/;
|
|
94
94
|
switch (L) {
|
|
95
95
|
case "numeric":
|
|
96
96
|
case "number":
|
|
97
|
-
|
|
97
|
+
case "integer":
|
|
98
|
+
return !Z.test(N);
|
|
98
99
|
case "decimal":
|
|
99
|
-
return !
|
|
100
|
+
return !H.test(N);
|
|
100
101
|
case "alphabetic":
|
|
101
|
-
return !X.test(
|
|
102
|
+
return !X.test(N);
|
|
102
103
|
case "string":
|
|
103
|
-
return !
|
|
104
|
+
return !Y.test(N);
|
|
104
105
|
case "custom":
|
|
105
|
-
return h ? !h.test(
|
|
106
|
+
return h ? !h.test(N) : !1;
|
|
106
107
|
default:
|
|
107
108
|
return !1;
|
|
108
109
|
}
|
|
109
|
-
})() &&
|
|
110
|
+
})() && P.preventDefault(), (q = y.onPaste) == null || q.call(y, P);
|
|
110
111
|
};
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ S(
|
|
112
113
|
"div",
|
|
113
114
|
{
|
|
114
115
|
className: `w-full relative ${C ? "z-0" : ""} tailwind-ux-input`,
|
|
@@ -121,7 +122,7 @@ const V = {
|
|
|
121
122
|
children: n
|
|
122
123
|
}
|
|
123
124
|
),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ S("div", { className: "relative w-full", children: [
|
|
125
126
|
l && /* @__PURE__ */ i(
|
|
126
127
|
"div",
|
|
127
128
|
{
|
|
@@ -138,12 +139,12 @@ const V = {
|
|
|
138
139
|
ref: r,
|
|
139
140
|
placeholder: C ? " " : y.placeholder,
|
|
140
141
|
onChange: $,
|
|
141
|
-
onKeyDown:
|
|
142
|
-
onPaste:
|
|
142
|
+
onKeyDown: F,
|
|
143
|
+
onPaste: pe,
|
|
143
144
|
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
|
|
144
|
-
${
|
|
145
|
+
${j}
|
|
145
146
|
${C && a && be[a]}
|
|
146
|
-
${R} ${
|
|
147
|
+
${R} ${B} ${T} ${f}`
|
|
147
148
|
}
|
|
148
149
|
),
|
|
149
150
|
C && n && a && /* @__PURE__ */ i(
|
|
@@ -201,7 +202,7 @@ const ye = {
|
|
|
201
202
|
default:
|
|
202
203
|
return "border-gray-300 focus:ring-blue-500";
|
|
203
204
|
}
|
|
204
|
-
}, $e =
|
|
205
|
+
}, $e = se((e, r) => {
|
|
205
206
|
const {
|
|
206
207
|
label: n,
|
|
207
208
|
id: t,
|
|
@@ -221,10 +222,10 @@ const ye = {
|
|
|
221
222
|
children: v,
|
|
222
223
|
...E
|
|
223
224
|
} = e, [L, h] = D("default"), y = ge(), O = I(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : y), [t, n, y]), w = (M) => {
|
|
224
|
-
const R = M.target.value,
|
|
225
|
-
h(
|
|
226
|
-
}, $ = !!a, x = ye[o], C = we[c],
|
|
227
|
-
return /* @__PURE__ */
|
|
225
|
+
const R = M.target.value, F = (d == null ? void 0 : d(R)) ?? "default";
|
|
226
|
+
h(F), u == null || u(M, F), p == null || p(M);
|
|
227
|
+
}, $ = !!a, x = ye[o], C = we[c], j = ke(L, b, g);
|
|
228
|
+
return /* @__PURE__ */ S("div", { className: `w-full relative ${$ ? "z-0" : ""}`, children: [
|
|
228
229
|
!$ && n && /* @__PURE__ */ i(
|
|
229
230
|
"label",
|
|
230
231
|
{
|
|
@@ -233,7 +234,7 @@ const ye = {
|
|
|
233
234
|
children: n
|
|
234
235
|
}
|
|
235
236
|
),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ S("div", { className: "relative w-full", children: [
|
|
237
238
|
l && /* @__PURE__ */ i(
|
|
238
239
|
"div",
|
|
239
240
|
{
|
|
@@ -251,7 +252,7 @@ const ye = {
|
|
|
251
252
|
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
|
|
252
253
|
${x} ${l && (s === "start" || s === "left") ? "ps-10" : l ? "pe-10" : ""}
|
|
253
254
|
${$ && a && ve[a]}
|
|
254
|
-
${C} ${
|
|
255
|
+
${C} ${j} ${f}`,
|
|
255
256
|
children: v
|
|
256
257
|
}
|
|
257
258
|
),
|
|
@@ -331,8 +332,8 @@ const Ne = {
|
|
|
331
332
|
l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
332
333
|
c
|
|
333
334
|
].filter(Boolean).join(" ");
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
d && /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ S("button", { type: t, className: s, disabled: l, ...f, children: [
|
|
336
|
+
d && /* @__PURE__ */ S(
|
|
336
337
|
"svg",
|
|
337
338
|
{
|
|
338
339
|
"aria-hidden": "true",
|
|
@@ -362,13 +363,13 @@ const Ne = {
|
|
|
362
363
|
e
|
|
363
364
|
] });
|
|
364
365
|
};
|
|
365
|
-
var
|
|
366
|
+
var le = {
|
|
366
367
|
color: void 0,
|
|
367
368
|
size: void 0,
|
|
368
369
|
className: void 0,
|
|
369
370
|
style: void 0,
|
|
370
371
|
attr: void 0
|
|
371
|
-
},
|
|
372
|
+
}, ne = A.createContext && /* @__PURE__ */ A.createContext(le), Le = ["attr", "size", "title"];
|
|
372
373
|
function Oe(e, r) {
|
|
373
374
|
if (e == null) return {};
|
|
374
375
|
var n = Pe(e, r), t, o;
|
|
@@ -399,7 +400,7 @@ function G() {
|
|
|
399
400
|
return e;
|
|
400
401
|
}, G.apply(this, arguments);
|
|
401
402
|
}
|
|
402
|
-
function
|
|
403
|
+
function re(e, r) {
|
|
403
404
|
var n = Object.keys(e);
|
|
404
405
|
if (Object.getOwnPropertySymbols) {
|
|
405
406
|
var t = Object.getOwnPropertySymbols(e);
|
|
@@ -412,9 +413,9 @@ function ne(e, r) {
|
|
|
412
413
|
function U(e) {
|
|
413
414
|
for (var r = 1; r < arguments.length; r++) {
|
|
414
415
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
415
|
-
r % 2 ?
|
|
416
|
+
r % 2 ? re(Object(n), !0).forEach(function(t) {
|
|
416
417
|
je(e, t, n[t]);
|
|
417
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
418
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : re(Object(n)).forEach(function(t) {
|
|
418
419
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
419
420
|
});
|
|
420
421
|
}
|
|
@@ -437,15 +438,15 @@ function ze(e, r) {
|
|
|
437
438
|
}
|
|
438
439
|
return (r === "string" ? String : Number)(e);
|
|
439
440
|
}
|
|
440
|
-
function
|
|
441
|
+
function ie(e) {
|
|
441
442
|
return e && e.map((r, n) => /* @__PURE__ */ A.createElement(r.tag, U({
|
|
442
443
|
key: n
|
|
443
|
-
}, r.attr),
|
|
444
|
+
}, r.attr), ie(r.child)));
|
|
444
445
|
}
|
|
445
|
-
function
|
|
446
|
+
function V(e) {
|
|
446
447
|
return (r) => /* @__PURE__ */ A.createElement(Ae, G({
|
|
447
448
|
attr: U({}, e.attr)
|
|
448
|
-
}, r),
|
|
449
|
+
}, r), ie(e.child));
|
|
449
450
|
}
|
|
450
451
|
function Ae(e) {
|
|
451
452
|
var r = (n) => {
|
|
@@ -468,10 +469,10 @@ function Ae(e) {
|
|
|
468
469
|
xmlns: "http://www.w3.org/2000/svg"
|
|
469
470
|
}), c && /* @__PURE__ */ A.createElement("title", null, c), e.children);
|
|
470
471
|
};
|
|
471
|
-
return
|
|
472
|
+
return ne !== void 0 ? /* @__PURE__ */ A.createElement(ne.Consumer, null, (n) => r(n)) : r(le);
|
|
472
473
|
}
|
|
473
474
|
function De(e) {
|
|
474
|
-
return
|
|
475
|
+
return V({ 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: [] }] })(e);
|
|
475
476
|
}
|
|
476
477
|
const Me = {
|
|
477
478
|
xs: "w-3 h-3 text-[10px]",
|
|
@@ -532,7 +533,7 @@ const Me = {
|
|
|
532
533
|
md: "w-3 h-3",
|
|
533
534
|
lg: "w-3.5 h-3.5"
|
|
534
535
|
};
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
+
return /* @__PURE__ */ S(
|
|
536
537
|
"label",
|
|
537
538
|
{
|
|
538
539
|
className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
|
|
@@ -581,18 +582,18 @@ const Qe = ({
|
|
|
581
582
|
})[c], [c]), h = z(() => {
|
|
582
583
|
const x = E.current, C = v.current;
|
|
583
584
|
if (!x || !C) return;
|
|
584
|
-
const { top:
|
|
585
|
+
const { top: j, bottom: B } = x.getBoundingClientRect(), T = C.offsetHeight, M = window.innerHeight - B, R = j;
|
|
585
586
|
k(M < T && R > T);
|
|
586
587
|
}, []), y = z((x) => {
|
|
587
|
-
var C,
|
|
588
|
-
!((C = v.current) != null && C.contains(x.target)) && !((
|
|
588
|
+
var C, j;
|
|
589
|
+
!((C = v.current) != null && C.contains(x.target)) && !((j = E.current) != null && j.contains(x.target)) && g(!1);
|
|
589
590
|
}, []), O = z(() => g((x) => !x), []), w = z(() => g(!1), []);
|
|
590
|
-
|
|
591
|
+
_(() => {
|
|
591
592
|
if (b)
|
|
592
593
|
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
593
594
|
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
594
595
|
};
|
|
595
|
-
}, [b, h]),
|
|
596
|
+
}, [b, h]), _(() => (document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y)), [y]);
|
|
596
597
|
const $ = I(
|
|
597
598
|
() => [
|
|
598
599
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
@@ -604,7 +605,7 @@ const Qe = ({
|
|
|
604
605
|
].filter(Boolean).join(" "),
|
|
605
606
|
[m, L, f, s, u]
|
|
606
607
|
);
|
|
607
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ S("div", { className: `relative inline-block ${d}`, ...p, children: [
|
|
608
609
|
/* @__PURE__ */ i(
|
|
609
610
|
"button",
|
|
610
611
|
{
|
|
@@ -617,16 +618,16 @@ const Qe = ({
|
|
|
617
618
|
children: e
|
|
618
619
|
}
|
|
619
620
|
),
|
|
620
|
-
b && /* @__PURE__ */
|
|
621
|
+
b && /* @__PURE__ */ S("div", { ref: v, role: "menu", className: $, children: [
|
|
621
622
|
r && r,
|
|
622
623
|
n.map((x, C) => {
|
|
623
|
-
const
|
|
624
|
+
const j = () => {
|
|
624
625
|
t && t(x), l && w();
|
|
625
626
|
};
|
|
626
|
-
return /* @__PURE__ */ i("div", { children: o ? o(x,
|
|
627
|
+
return /* @__PURE__ */ i("div", { children: o ? o(x, j) : /* @__PURE__ */ i(
|
|
627
628
|
"div",
|
|
628
629
|
{
|
|
629
|
-
onClick:
|
|
630
|
+
onClick: j,
|
|
630
631
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
631
632
|
role: "menuitem",
|
|
632
633
|
children: x.label
|
|
@@ -644,7 +645,7 @@ const Qe = ({
|
|
|
644
645
|
tooltipStyle: c = {}
|
|
645
646
|
}) => {
|
|
646
647
|
const d = W(null), u = W(null);
|
|
647
|
-
|
|
648
|
+
_(() => {
|
|
648
649
|
const l = d.current, s = u.current;
|
|
649
650
|
if (!l || !s) return;
|
|
650
651
|
const a = () => {
|
|
@@ -711,7 +712,7 @@ const Qe = ({
|
|
|
711
712
|
return s;
|
|
712
713
|
}
|
|
713
714
|
};
|
|
714
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ S("div", { ref: d, className: `relative inline-block ${t}`, children: [
|
|
715
716
|
e,
|
|
716
717
|
/* @__PURE__ */ i(
|
|
717
718
|
"div",
|
|
@@ -751,7 +752,7 @@ const Qe = ({
|
|
|
751
752
|
md: "text-base px-3 py-1",
|
|
752
753
|
lg: "text-lg px-3.5 py-1.5",
|
|
753
754
|
xl: "text-xl px-4 py-2"
|
|
754
|
-
},
|
|
755
|
+
}, Ke = {
|
|
755
756
|
flat: "rounded-none",
|
|
756
757
|
rounded: "rounded-sm",
|
|
757
758
|
pill: "rounded-full",
|
|
@@ -767,8 +768,8 @@ const Qe = ({
|
|
|
767
768
|
className: u = "",
|
|
768
769
|
...f
|
|
769
770
|
}) => {
|
|
770
|
-
const l = !e && !!o, s = `inline-flex items-center font-medium ${Be[r] || ""} ${Fe[n] || ""} ${
|
|
771
|
-
return /* @__PURE__ */
|
|
771
|
+
const l = !e && !!o, s = `inline-flex items-center font-medium ${Be[r] || ""} ${Fe[n] || ""} ${Ke[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + u;
|
|
772
|
+
return /* @__PURE__ */ S("span", { className: s.trim(), ...f, children: [
|
|
772
773
|
o && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: o }),
|
|
773
774
|
e,
|
|
774
775
|
c && /* @__PURE__ */ i(
|
|
@@ -782,8 +783,8 @@ const Qe = ({
|
|
|
782
783
|
)
|
|
783
784
|
] });
|
|
784
785
|
};
|
|
785
|
-
function
|
|
786
|
-
return
|
|
786
|
+
function Ze(e) {
|
|
787
|
+
return V({ 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: [] }] })(e);
|
|
787
788
|
}
|
|
788
789
|
const tt = ({
|
|
789
790
|
items: e,
|
|
@@ -812,12 +813,12 @@ const tt = ({
|
|
|
812
813
|
"aria-multiselectable": r,
|
|
813
814
|
children: e.map((g) => {
|
|
814
815
|
const m = p.has(g.id), k = `accordion-heading-${g.id}`, v = `accordion-panel-${g.id}`;
|
|
815
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ S(
|
|
816
817
|
"div",
|
|
817
818
|
{
|
|
818
819
|
className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${n}`,
|
|
819
820
|
children: [
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ S(
|
|
821
822
|
"button",
|
|
822
823
|
{
|
|
823
824
|
id: k,
|
|
@@ -828,7 +829,7 @@ const tt = ({
|
|
|
828
829
|
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}`,
|
|
829
830
|
children: [
|
|
830
831
|
d ? d(g, m) : g.title,
|
|
831
|
-
f ? /* @__PURE__ */ i(
|
|
832
|
+
f ? /* @__PURE__ */ i(Ze, {}) : null
|
|
832
833
|
]
|
|
833
834
|
}
|
|
834
835
|
),
|
|
@@ -850,14 +851,14 @@ const tt = ({
|
|
|
850
851
|
})
|
|
851
852
|
}
|
|
852
853
|
);
|
|
853
|
-
},
|
|
854
|
-
const e =
|
|
854
|
+
}, ce = oe(null), de = () => {
|
|
855
|
+
const e = ae(ce);
|
|
855
856
|
if (!e)
|
|
856
857
|
throw new Error(
|
|
857
858
|
"useModalActions must be used within a ModalActionProvider"
|
|
858
859
|
);
|
|
859
860
|
return e;
|
|
860
|
-
},
|
|
861
|
+
}, ue = oe(null), fe = () => ae(ue);
|
|
861
862
|
function nt({
|
|
862
863
|
id: e,
|
|
863
864
|
title: r,
|
|
@@ -869,10 +870,10 @@ function nt({
|
|
|
869
870
|
disableEscapeClose: u = !1,
|
|
870
871
|
closeBtnStyle: f
|
|
871
872
|
}) {
|
|
872
|
-
const l =
|
|
873
|
+
const l = fe(), s = de(), a = !t && !!l && !!s, [p, b] = D(!1), g = a ? l.isOpen(e) : p, m = a ? l.getModalData(e) : null, k = z(() => {
|
|
873
874
|
a ? s.closeModal(e) : b(!1), d == null || d();
|
|
874
875
|
}, [a, s, e, d]);
|
|
875
|
-
return
|
|
876
|
+
return _(() => {
|
|
876
877
|
const v = document.activeElement, E = document.getElementById(e), L = [
|
|
877
878
|
"a[href]",
|
|
878
879
|
"button:not([disabled])",
|
|
@@ -907,12 +908,12 @@ function nt({
|
|
|
907
908
|
{
|
|
908
909
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
|
|
909
910
|
id: e,
|
|
910
|
-
children: /* @__PURE__ */
|
|
911
|
+
children: /* @__PURE__ */ S(
|
|
911
912
|
"div",
|
|
912
913
|
{
|
|
913
914
|
className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
|
|
914
915
|
children: [
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ S("div", { className: "flex justify-between items-center relative", children: [
|
|
916
917
|
r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
|
|
917
918
|
o && /* @__PURE__ */ i(
|
|
918
919
|
"button",
|
|
@@ -951,10 +952,10 @@ function rt({
|
|
|
951
952
|
() => ({ isOpen: u, getModalData: f }),
|
|
952
953
|
[u, f]
|
|
953
954
|
);
|
|
954
|
-
return /* @__PURE__ */ i(
|
|
955
|
+
return /* @__PURE__ */ i(ce.Provider, { value: l, children: /* @__PURE__ */ i(ue.Provider, { value: s, children: e }) });
|
|
955
956
|
}
|
|
956
957
|
function st(e) {
|
|
957
|
-
const { openModal: r, closeModal: n } =
|
|
958
|
+
const { openModal: r, closeModal: n } = de(), { isOpen: t, getModalData: o } = fe();
|
|
958
959
|
return {
|
|
959
960
|
open: (c) => r(e, c),
|
|
960
961
|
close: () => n(e),
|
|
@@ -962,29 +963,29 @@ function st(e) {
|
|
|
962
963
|
data: o(e)
|
|
963
964
|
};
|
|
964
965
|
}
|
|
965
|
-
let
|
|
966
|
-
function
|
|
967
|
-
|
|
966
|
+
let J = null, Q = {};
|
|
967
|
+
function He(e) {
|
|
968
|
+
J = e;
|
|
968
969
|
}
|
|
969
970
|
function ot(e) {
|
|
970
|
-
|
|
971
|
+
Q = { ...Q, ...e };
|
|
971
972
|
}
|
|
972
973
|
function We() {
|
|
973
|
-
return
|
|
974
|
+
return Q;
|
|
974
975
|
}
|
|
975
976
|
function at(e, r, n = 3e3, t) {
|
|
976
|
-
|
|
977
|
+
J ? J(e, r, n, t) : console.warn("Toast system is not mounted");
|
|
977
978
|
}
|
|
978
979
|
function Ge(e) {
|
|
979
|
-
return
|
|
980
|
+
return V({ 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: [] }] })(e);
|
|
980
981
|
}
|
|
981
982
|
const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
982
983
|
const r = Math.random() * 16 | 0;
|
|
983
984
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
984
985
|
}), lt = () => {
|
|
985
986
|
const [e, r] = D([]);
|
|
986
|
-
|
|
987
|
-
|
|
987
|
+
_(() => {
|
|
988
|
+
He((t, o, c, d) => {
|
|
988
989
|
const u = Ue();
|
|
989
990
|
r((f) => [...f, { id: u, type: t, message: o, config: d }]), setTimeout(() => {
|
|
990
991
|
r((f) => f.filter((l) => l.id !== u));
|
|
@@ -995,13 +996,13 @@ const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
995
996
|
return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
|
|
996
997
|
var f, l, s, a, p, b, g, m, k, v, E, L, h;
|
|
997
998
|
const o = ((f = t.config) == null ? void 0 : f.icon) || ((l = n.icons) == null ? void 0 : l[t.type]) || qe(t.type), c = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (a = n.colors) == null ? void 0 : a[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", d = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = n.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", u = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
|
|
998
|
-
return /* @__PURE__ */
|
|
999
|
+
return /* @__PURE__ */ S(
|
|
999
1000
|
"div",
|
|
1000
1001
|
{
|
|
1001
1002
|
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${c} ${d}`,
|
|
1002
1003
|
children: [
|
|
1003
1004
|
/* @__PURE__ */ i("div", { className: u, children: o }),
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ S("div", { className: "flex-1 me-3", children: [
|
|
1005
1006
|
((v = t.config) == null ? void 0 : v.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
|
|
1006
1007
|
((E = t.config) == null ? void 0 : E.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
|
|
1007
1008
|
!((L = t.config) != null && L.title) && !((h = t.config) != null && h.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
|
|
@@ -1047,7 +1048,7 @@ export {
|
|
|
1047
1048
|
Ve as Tooltip,
|
|
1048
1049
|
ot as setToastDefaults,
|
|
1049
1050
|
at as showToast,
|
|
1050
|
-
|
|
1051
|
+
de as useModalActions,
|
|
1051
1052
|
st as useModalInstance,
|
|
1052
|
-
|
|
1053
|
+
fe as useModalState
|
|
1053
1054
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(y,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):(y=typeof globalThis<"u"?globalThis:y||self,l(y.TailwindUiKit={},y.jsxRuntime,y.React))})(this,function(y,l,n){"use strict";"use client";var J=document.createElement("style");J.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}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@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}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
3
|
-
${
|
|
4
|
-
${S&&s&&
|
|
5
|
-
${T} ${A} ${z} ${b}`}),S&&e&&s&&l.jsx("label",{htmlFor:w,className:`ms-1 ${
|
|
1
|
+
(function(y,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):(y=typeof globalThis<"u"?globalThis:y||self,l(y.TailwindUiKit={},y.jsxRuntime,y.React))})(this,function(y,l,n){"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}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@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}
|
|
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"},ir={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"},dr={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"},hr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)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=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:d="rounded",validate:h,onValidatedChange:u,className:b="",icon:i,iconPosition:a="left",floatingLabelStyle:s,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:$,feedbackType:C="invalid",labelClasses:L="",inputType:O="string",inputPattern:k,...m}=r,[M,x]=n.useState("default"),N=n.useCallback(P=>{const E=P.target.value,F=(h==null?void 0:h(E))??"default";x(F),u==null||u(P,F),f==null||f(P)},[h,u,f]),w=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),S=!!s,j=V[c]||V.md,A=R[d]||R.flat,z=n.useMemo(()=>hr(M,v,g),[M,v,g]),I=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),T=n.useMemo(()=>i?a==="start"||a==="left"?"ps-10":"pe-10":"",[i,a]),B=P=>{var K;const E=P.key;!(P.ctrlKey||P.metaKey||E.length!==1)&&(()=>{const Z=/^\d$/,Y=/^[a-zA-Z]$/,J=/^[a-zA-Z0-9]$/;switch(O){case"numeric":case"number":case"integer":return!Z.test(E);case"decimal":return!Z.test(E)&&E!=="."&&E!=="Backspace"&&E!=="Tab";case"alphabetic":return!Y.test(E);case"string":return!J.test(E);case"custom":return k?!k.test(E):!1;default:return!1}})()&&P.preventDefault(),(K=m.onKeyDown)==null||K.call(m,P)},Qr=P=>{var X;const E=P.clipboardData.getData("Text");(()=>{const K=/^\d+$/,Z=/^\d*\.?\d*$/,Y=/^[a-zA-Z]+$/,J=/^[a-zA-Z0-9]+$/;switch(O){case"numeric":case"number":case"integer":return!K.test(E);case"decimal":return!Z.test(E);case"alphabetic":return!Y.test(E);case"string":return!J.test(E);case"custom":return k?!k.test(E):!1;default:return!1}})()&&P.preventDefault(),(X=m.onPaste)==null||X.call(m,P)};return l.jsxs("div",{className:`w-full relative ${S?"z-0":""} tailwind-ux-input`,children:[!S&&e&&l.jsx("label",{htmlFor:w,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"} ${L}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I} ${$}`,"aria-hidden":"true",children:i}),l.jsx("input",{...m,id:w,ref:t,placeholder:S?" ":m.placeholder,onChange:N,onKeyDown:B,onPaste:Qr,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
|
+
${j}
|
|
4
|
+
${S&&s&&ir[s]}
|
|
5
|
+
${T} ${A} ${z} ${b}`}),S&&e&&s&&l.jsx("label",{htmlFor:w,className:`ms-1 ${dr[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${C==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:C==="invalid"?"alert":void 0,children:p})]})});rr.displayName="Input";const ur={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"},br={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},fr={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"},gr={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"},vr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},or=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:d="rounded",validate:h,onValidatedChange:u,className:b="",icon:i,iconPosition:a="left",floatingLabelStyle:s,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:$="invalid",children:C,...L}=r,[O,k]=n.useState("default"),m=n.useId(),M=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:m),[o,e,m]),x=I=>{const T=I.target.value,B=(h==null?void 0:h(T))??"default";k(B),u==null||u(I,B),f==null||f(I)},N=!!s,w=ur[c],S=br[d],j=vr(O,v,g),A=i&&(a==="start"||a==="left")?"ps-10":i?"pe-10":"",z=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${N?"z-0":""}`,children:[!N&&e&&l.jsx("label",{htmlFor:M,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${z}`,children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("select",{...L,id:M,ref:t,onChange:x,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
6
|
${w} ${A}
|
|
7
|
-
${N&&s&&
|
|
8
|
-
${S} ${P} ${b}`,children:C}),N&&e&&s&&l.jsx("label",{htmlFor:M,className:`ms-1 ${fr[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${$==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});rr.displayName="Select";const vr={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"},pr={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"},yr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},wr=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:d="",isLoading:h=!1,disabled:u=!1,...b})=>{const i=u||h,a=["inline-flex items-center justify-center font-normal transition duration-150",vr[t],pr[e],yr[c],c==="flat"?"shadow-none":"shadow-sm",i?"opacity-50 cursor-not-allowed":"cursor-pointer",d].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:i,...b,children:[h&&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 or={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},er=n.createContext&&n.createContext(or),kr=["attr","size","title"];function mr(r,t){if(r==null)return{};var e=xr(r,t),o,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(c=0;c<d.length;c++)o=d[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function xr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function _(){return _=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},_.apply(this,arguments)}function tr(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function B(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?tr(Object(e),!0).forEach(function(o){Cr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):tr(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function Cr(r,t,e){return t=Sr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Sr(r){var t=$r(r,"string");return typeof t=="symbol"?t:t+""}function $r(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function lr(r){return r&&r.map((t,e)=>n.createElement(t.tag,B({key:e},t.attr),lr(t.child)))}function H(r){return t=>n.createElement(Nr,_({attr:B({},r.attr)},t),lr(r.child))}function Nr(r){var t=e=>{var{attr:o,size:c,title:d}=r,h=mr(r,kr),u=c||e.size||"1em",b;return e.className&&(b=e.className),r.className&&(b=(b?b+" ":"")+r.className),n.createElement("svg",_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,h,{className:b,style:B(B({color:r.color||e.color},e.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),d&&n.createElement("title",null,d),r.children)};return er!==void 0?n.createElement(er.Consumer,null,e=>t(e)):t(or)}function Er(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 Lr={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"},Or={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Mr={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"},nr=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:d=!1,className:h="",id:u,value:b,icon:i,children:a,checked:s,...f},v)=>{const g=w=>{!d&&c&&c(w.target.checked),f.onChange&&f.onChange(w)},p="mr-2 border flex items-center justify-center transition-all",$=Lr[t],C=Or[e],L=Mr[o]??"",O=o.startsWith("outline"),k=o.startsWith("soft"),x=`${p} ${$} ${C} ${L} ${s&&(O||k||o==="link")?"peer-checked:bg-current peer-checked:text-white":s?"peer-checked:bg-current":""}`,N={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 ${h}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:s,onChange:g,disabled:d,id:u,value:b,ref:v,...f}),l.jsx("span",{className:x.trim(),children:(s||f.defaultChecked)&&(i??l.jsx(Er,{className:`${N[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});nr.displayName="Checkbox";const Pr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:d="right",className:h="",menuClassName:u="",width:b="w-48",closeOnSelect:i=!1,transition:a=!0,ariaLabel:s="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,$]=n.useState(!1),C=n.useRef(null),L=n.useRef(null),O=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),k=n.useCallback(()=>{const w=L.current,S=C.current;if(!w||!S)return;const{top:P,bottom:A}=w.getBoundingClientRect(),z=S.offsetHeight,I=window.innerHeight-A,T=P;$(I<z&&T>z)},[]),m=n.useCallback(w=>{var S,P;!((S=C.current)!=null&&S.contains(w.target))&&!((P=L.current)!=null&&P.contains(w.target))&&g(!1)},[]),M=n.useCallback(()=>g(w=>!w),[]),x=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,!0)}},[v,k]),n.useEffect(()=>(document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)),[m]);const N=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",O,b,a&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[p,O,b,a,u]);return l.jsxs("div",{className:`relative inline-block ${h}`,...f,children:[l.jsx("button",{type:"button",ref:L,onClick:M,"aria-expanded":v,"aria-label":s,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:C,role:"menu",className:N,children:[t&&t,e.map((w,S)=>{const P=()=>{o&&o(w),i&&x()};return l.jsx("div",{children:c?c(w,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:w.label})},S)})]})]})},jr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:d={}})=>{const h=n.useRef(null),u=n.useRef(null);n.useEffect(()=>{const i=h.current,a=u.current;if(!i||!a)return;const s=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return i.addEventListener("mouseenter",s),i.addEventListener("mouseleave",f),()=>{i.removeEventListener("mouseenter",s),i.removeEventListener("mouseleave",f)}},[]);const b=i=>{const a={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(i){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:h,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:u,role:"tooltip",className:c,style:{...b(e),...d},children:t})]})},Ir={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"},zr={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"},Ar={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Tr=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:d,onDismiss:h,className:u="",...b})=>{const i=!r&&!!c,a=`inline-flex items-center font-medium ${Ir[t]||""} ${zr[e]||""} ${Ar[o]||""} ${i?"justify-center p-2 w-8 h-8":""} `+u;return l.jsxs("span",{className:a.trim(),...b,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,d&&l.jsx("button",{type:"button",onClick:h,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Dr(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 _r=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:d,renderTitle:h,renderContent:u,showArrowIcon:b=!0,panelClasses:i=""})=>{const[a,s]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&d?d(Array.from(p)):s(p)},[f,c,d,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),$=`accordion-heading-${g.id}`,C=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:$,type:"button","aria-expanded":p,"aria-controls":C,onClick:()=>v(g.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 ${o}`,children:[h?h(g,p):g.title,b?l.jsx(Dr,{}):null]}),l.jsx("div",{id:C,role:"region","aria-labelledby":$,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,children:u?u(g,p):g.content})]},g.id)})})},ar=n.createContext(null),W=()=>{const r=n.useContext(ar);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},cr=n.createContext(null),G=()=>n.useContext(cr);function Br({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:d="",onClose:h,disableEscapeClose:u=!1,closeBtnStyle:b}){const i=G(),a=W(),s=!o&&!!i&&!!a,[f,v]=n.useState(!1),g=s?i.isOpen(r):f,p=s?i.getModalData(r):null,$=n.useCallback(()=>{s?a.closeModal(r):v(!1),h==null||h()},[s,a,r,h]);return n.useEffect(()=>{const C=document.activeElement,L=document.getElementById(r),O=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],k=()=>{if(!L)return[];const x=L.querySelectorAll(O.join(","));return Array.from(x).filter(N=>N.offsetParent!==null)},m=x=>{if(x.key==="Tab"){const N=k();if(N.length===0)return;const w=N[0],S=N[N.length-1];x.shiftKey?document.activeElement===w&&(x.preventDefault(),S.focus()):document.activeElement===S&&(x.preventDefault(),w.focus())}},M=x=>{x.key==="Escape"&&!u&&$(),m(x)};return g&&(document.body.style.overflow="hidden",setTimeout(()=>{const x=k();x.length&&x[0].focus()},0),window.addEventListener("keydown",M)),()=>{document.body.style.overflow="",C&&C.focus(),window.removeEventListener("keydown",M)}},[g,u,$,r]),g?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",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:$,className:`text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${b}`,"aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:p}):e})]})}):null}function Fr({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),d=n.useCallback((s,f)=>{e(v=>({...v,[s]:!0})),f&&c(v=>({...v,[s]:f}))},[]),h=n.useCallback(s=>{e(f=>({...f,[s]:!1})),c(f=>{const v={...f};return delete v[s],v})},[]),u=n.useCallback(s=>!!t[s],[t]),b=n.useCallback(s=>o[s],[o]),i=n.useMemo(()=>({openModal:d,closeModal:h}),[d,h]),a=n.useMemo(()=>({isOpen:u,getModalData:b}),[u,b]);return l.jsx(ar.Provider,{value:i,children:l.jsx(cr.Provider,{value:a,children:r})})}function Zr(r){const{openModal:t,closeModal:e}=W(),{isOpen:o,getModalData:c}=G();return{open:d=>t(r,d),close:()=>e(r),isOpen:o(r),data:c(r)}}let q=null,U={};function Kr(r){q=r}function Hr(r){U={...U,...r}}function Wr(){return U}function Gr(r,t,e=3e3,o){q?q(r,t,e,o):console.warn("Toast system is not mounted")}function qr(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 Ur=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Xr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Kr((o,c,d,h)=>{const u=Ur();t(b=>[...b,{id:u,type:o,message:c,config:h}]),setTimeout(()=>{t(b=>b.filter(i=>i.id!==u))},d)})},[]);const e=Wr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var b,i,a,s,f,v,g,p,$,C,L,O,k;const c=((b=o.config)==null?void 0:b.icon)||((i=e.icons)==null?void 0:i[o.type])||Yr(o.type),d=((a=o.config)==null?void 0:a.bgColor)||((f=(s=e.colors)==null?void 0:s[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",h=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",u=(($=o.config)==null?void 0:$.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${h}`,children:[l.jsx("div",{className:u,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((C=o.config)==null?void 0:C.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((L=o.config)==null?void 0:L.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!((O=o.config)!=null&&O.title)&&!((k=o.config)!=null&&k.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(m=>m.filter(M=>M.id!==o.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(qr,{size:18})})]},o.id)})})};function Yr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=_r,y.Badge=Tr,y.Button=wr,y.Checkbox=nr,y.Dropdown=Pr,y.Input=R,y.Modal=Br,y.ModalProvider=Fr,y.Select=rr,y.Toast=Xr,y.Tooltip=jr,y.setToastDefaults=Hr,y.showToast=Gr,y.useModalActions=W,y.useModalInstance=Zr,y.useModalState=G,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
${N&&s&&fr[s]}
|
|
8
|
+
${S} ${j} ${b}`,children:C}),N&&e&&s&&l.jsx("label",{htmlFor:M,className:`ms-1 ${gr[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${$==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});or.displayName="Select";const pr={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"},yr={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"},wr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},kr=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:d="",isLoading:h=!1,disabled:u=!1,...b})=>{const i=u||h,a=["inline-flex items-center justify-center font-normal transition duration-150",pr[t],yr[e],wr[c],c==="flat"?"shadow-none":"shadow-sm",i?"opacity-50 cursor-not-allowed":"cursor-pointer",d].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:i,...b,children:[h&&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=n.createContext&&n.createContext(er),mr=["attr","size","title"];function xr(r,t){if(r==null)return{};var e=Cr(r,t),o,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(c=0;c<d.length;c++)o=d[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function Cr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function D(){return D=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},D.apply(this,arguments)}function lr(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function _(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?lr(Object(e),!0).forEach(function(o){Sr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):lr(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function Sr(r,t,e){return t=$r(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function $r(r){var t=Nr(r,"string");return typeof t=="symbol"?t:t+""}function Nr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function nr(r){return r&&r.map((t,e)=>n.createElement(t.tag,_({key:e},t.attr),nr(t.child)))}function H(r){return t=>n.createElement(Er,D({attr:_({},r.attr)},t),nr(r.child))}function Er(r){var t=e=>{var{attr:o,size:c,title:d}=r,h=xr(r,mr),u=c||e.size||"1em",b;return e.className&&(b=e.className),r.className&&(b=(b?b+" ":"")+r.className),n.createElement("svg",D({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,h,{className:b,style:_(_({color:r.color||e.color},e.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),d&&n.createElement("title",null,d),r.children)};return tr!==void 0?n.createElement(tr.Consumer,null,e=>t(e)):t(er)}function Lr(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 Or={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"},Mr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Pr={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=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:d=!1,className:h="",id:u,value:b,icon:i,children:a,checked:s,...f},v)=>{const g=w=>{!d&&c&&c(w.target.checked),f.onChange&&f.onChange(w)},p="mr-2 border flex items-center justify-center transition-all",$=Or[t],C=Mr[e],L=Pr[o]??"",O=o.startsWith("outline"),k=o.startsWith("soft"),x=`${p} ${$} ${C} ${L} ${s&&(O||k||o==="link")?"peer-checked:bg-current peer-checked:text-white":s?"peer-checked:bg-current":""}`,N={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 ${h}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:s,onChange:g,disabled:d,id:u,value:b,ref:v,...f}),l.jsx("span",{className:x.trim(),children:(s||f.defaultChecked)&&(i??l.jsx(Lr,{className:`${N[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});ar.displayName="Checkbox";const jr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:d="right",className:h="",menuClassName:u="",width:b="w-48",closeOnSelect:i=!1,transition:a=!0,ariaLabel:s="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,$]=n.useState(!1),C=n.useRef(null),L=n.useRef(null),O=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),k=n.useCallback(()=>{const w=L.current,S=C.current;if(!w||!S)return;const{top:j,bottom:A}=w.getBoundingClientRect(),z=S.offsetHeight,I=window.innerHeight-A,T=j;$(I<z&&T>z)},[]),m=n.useCallback(w=>{var S,j;!((S=C.current)!=null&&S.contains(w.target))&&!((j=L.current)!=null&&j.contains(w.target))&&g(!1)},[]),M=n.useCallback(()=>g(w=>!w),[]),x=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,!0)}},[v,k]),n.useEffect(()=>(document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)),[m]);const N=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",O,b,a&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[p,O,b,a,u]);return l.jsxs("div",{className:`relative inline-block ${h}`,...f,children:[l.jsx("button",{type:"button",ref:L,onClick:M,"aria-expanded":v,"aria-label":s,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:C,role:"menu",className:N,children:[t&&t,e.map((w,S)=>{const j=()=>{o&&o(w),i&&x()};return l.jsx("div",{children:c?c(w,j):l.jsx("div",{onClick:j,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:w.label})},S)})]})]})},Ir=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:d={}})=>{const h=n.useRef(null),u=n.useRef(null);n.useEffect(()=>{const i=h.current,a=u.current;if(!i||!a)return;const s=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return i.addEventListener("mouseenter",s),i.addEventListener("mouseleave",f),()=>{i.removeEventListener("mouseenter",s),i.removeEventListener("mouseleave",f)}},[]);const b=i=>{const a={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(i){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:h,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:u,role:"tooltip",className:c,style:{...b(e),...d},children:t})]})},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"},Tr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Dr=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:d,onDismiss:h,className:u="",...b})=>{const i=!r&&!!c,a=`inline-flex items-center font-medium ${zr[t]||""} ${Ar[e]||""} ${Tr[o]||""} ${i?"justify-center p-2 w-8 h-8":""} `+u;return l.jsxs("span",{className:a.trim(),...b,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,d&&l.jsx("button",{type:"button",onClick:h,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function _r(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 Br=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:d,renderTitle:h,renderContent:u,showArrowIcon:b=!0,panelClasses:i=""})=>{const[a,s]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&d?d(Array.from(p)):s(p)},[f,c,d,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),$=`accordion-heading-${g.id}`,C=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:$,type:"button","aria-expanded":p,"aria-controls":C,onClick:()=>v(g.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 ${o}`,children:[h?h(g,p):g.title,b?l.jsx(_r,{}):null]}),l.jsx("div",{id:C,role:"region","aria-labelledby":$,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,children:u?u(g,p):g.content})]},g.id)})})},cr=n.createContext(null),W=()=>{const r=n.useContext(cr);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},sr=n.createContext(null),G=()=>n.useContext(sr);function Fr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:d="",onClose:h,disableEscapeClose:u=!1,closeBtnStyle:b}){const i=G(),a=W(),s=!o&&!!i&&!!a,[f,v]=n.useState(!1),g=s?i.isOpen(r):f,p=s?i.getModalData(r):null,$=n.useCallback(()=>{s?a.closeModal(r):v(!1),h==null||h()},[s,a,r,h]);return n.useEffect(()=>{const C=document.activeElement,L=document.getElementById(r),O=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],k=()=>{if(!L)return[];const x=L.querySelectorAll(O.join(","));return Array.from(x).filter(N=>N.offsetParent!==null)},m=x=>{if(x.key==="Tab"){const N=k();if(N.length===0)return;const w=N[0],S=N[N.length-1];x.shiftKey?document.activeElement===w&&(x.preventDefault(),S.focus()):document.activeElement===S&&(x.preventDefault(),w.focus())}},M=x=>{x.key==="Escape"&&!u&&$(),m(x)};return g&&(document.body.style.overflow="hidden",setTimeout(()=>{const x=k();x.length&&x[0].focus()},0),window.addEventListener("keydown",M)),()=>{document.body.style.overflow="",C&&C.focus(),window.removeEventListener("keydown",M)}},[g,u,$,r]),g?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",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:$,className:`text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${b}`,"aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:p}):e})]})}):null}function Kr({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),d=n.useCallback((s,f)=>{e(v=>({...v,[s]:!0})),f&&c(v=>({...v,[s]:f}))},[]),h=n.useCallback(s=>{e(f=>({...f,[s]:!1})),c(f=>{const v={...f};return delete v[s],v})},[]),u=n.useCallback(s=>!!t[s],[t]),b=n.useCallback(s=>o[s],[o]),i=n.useMemo(()=>({openModal:d,closeModal:h}),[d,h]),a=n.useMemo(()=>({isOpen:u,getModalData:b}),[u,b]);return l.jsx(cr.Provider,{value:i,children:l.jsx(sr.Provider,{value:a,children:r})})}function Zr(r){const{openModal:t,closeModal:e}=W(),{isOpen:o,getModalData:c}=G();return{open:d=>t(r,d),close:()=>e(r),isOpen:o(r),data:c(r)}}let q=null,U={};function Hr(r){q=r}function Wr(r){U={...U,...r}}function Gr(){return U}function qr(r,t,e=3e3,o){q?q(r,t,e,o):console.warn("Toast system is not mounted")}function Ur(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 Xr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Yr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Hr((o,c,d,h)=>{const u=Xr();t(b=>[...b,{id:u,type:o,message:c,config:h}]),setTimeout(()=>{t(b=>b.filter(i=>i.id!==u))},d)})},[]);const e=Gr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var b,i,a,s,f,v,g,p,$,C,L,O,k;const c=((b=o.config)==null?void 0:b.icon)||((i=e.icons)==null?void 0:i[o.type])||Jr(o.type),d=((a=o.config)==null?void 0:a.bgColor)||((f=(s=e.colors)==null?void 0:s[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",h=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",u=(($=o.config)==null?void 0:$.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${h}`,children:[l.jsx("div",{className:u,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((C=o.config)==null?void 0:C.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((L=o.config)==null?void 0:L.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!((O=o.config)!=null&&O.title)&&!((k=o.config)!=null&&k.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(m=>m.filter(M=>M.id!==o.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(Ur,{size:18})})]},o.id)})})};function Jr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=Br,y.Badge=Dr,y.Button=kr,y.Checkbox=ar,y.Dropdown=jr,y.Input=rr,y.Modal=Fr,y.ModalProvider=Kr,y.Select=or,y.Toast=Yr,y.Tooltip=Ir,y.setToastDefaults=Wr,y.showToast=qr,y.useModalActions=W,y.useModalInstance=Zr,y.useModalState=G,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|