tailwind-ux-kit 1.0.73 → 1.0.75
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.
|
@@ -21,6 +21,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChan
|
|
|
21
21
|
isInvalid?: boolean;
|
|
22
22
|
feedback?: string;
|
|
23
23
|
feedbackType?: "valid" | "invalid";
|
|
24
|
+
labelClasses?: string;
|
|
24
25
|
}
|
|
25
26
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
27
|
export default Input;
|
|
@@ -9,7 +9,8 @@ type ModalProps = {
|
|
|
9
9
|
showFloatingClose?: boolean;
|
|
10
10
|
containerClasses?: string;
|
|
11
11
|
disableEscapeClose?: boolean;
|
|
12
|
+
closeBtnStyle?: boolean;
|
|
12
13
|
onClose?: () => void;
|
|
13
14
|
};
|
|
14
|
-
export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, disableEscapeClose, }: ModalProps): ReactElement | null;
|
|
15
|
+
export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, disableEscapeClose, closeBtnStyle, }: ModalProps): ReactElement | null;
|
|
15
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as k, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import z, { forwardRef as Y, useState as A, useMemo as P, useId as oe, useRef as F, useCallback as j, useEffect as _, createContext as J, useContext as Q } from "react";
|
|
4
4
|
const K = {
|
|
5
5
|
xs: "text-xs px-2 py-1",
|
|
6
6
|
sm: "text-sm px-3 py-1.5",
|
|
@@ -38,80 +38,81 @@ const K = {
|
|
|
38
38
|
label: r,
|
|
39
39
|
id: t,
|
|
40
40
|
inputSize: o = "md",
|
|
41
|
-
shape:
|
|
42
|
-
validate:
|
|
43
|
-
onValidatedChange:
|
|
44
|
-
className:
|
|
45
|
-
icon:
|
|
41
|
+
shape: c = "rounded",
|
|
42
|
+
validate: d,
|
|
43
|
+
onValidatedChange: u,
|
|
44
|
+
className: f = "",
|
|
45
|
+
icon: l,
|
|
46
46
|
iconPosition: s = "left",
|
|
47
|
-
floatingLabelStyle:
|
|
47
|
+
floatingLabelStyle: a,
|
|
48
48
|
onChange: p,
|
|
49
49
|
isValid: b,
|
|
50
50
|
isInvalid: g,
|
|
51
51
|
feedback: m,
|
|
52
|
-
iconClasses:
|
|
53
|
-
feedbackType:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
iconClasses: C,
|
|
53
|
+
feedbackType: w = "invalid",
|
|
54
|
+
labelClasses: N = "",
|
|
55
|
+
...S
|
|
56
|
+
} = e, [v, E] = A("default"), L = z.useCallback(
|
|
57
|
+
(I) => {
|
|
58
|
+
const D = I.target.value, T = (d == null ? void 0 : d(D)) ?? "default";
|
|
59
|
+
E(T), u == null || u(I, T), p == null || p(I);
|
|
59
60
|
},
|
|
60
|
-
[
|
|
61
|
-
), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]),
|
|
62
|
-
() => ie(
|
|
63
|
-
[
|
|
64
|
-
),
|
|
65
|
-
return /* @__PURE__ */
|
|
61
|
+
[d, u, p]
|
|
62
|
+
), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), h = !!a, y = K[o] || K.md, $ = U[c] || U.flat, O = P(
|
|
63
|
+
() => ie(v, b, g),
|
|
64
|
+
[v, b, g]
|
|
65
|
+
), B = P(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), M = P(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]);
|
|
66
|
+
return /* @__PURE__ */ k(
|
|
66
67
|
"div",
|
|
67
68
|
{
|
|
68
|
-
className: `w-full relative ${
|
|
69
|
+
className: `w-full relative ${h ? "z-0" : ""} tailwind-ux-input`,
|
|
69
70
|
children: [
|
|
70
|
-
!
|
|
71
|
+
!h && r && /* @__PURE__ */ i(
|
|
71
72
|
"label",
|
|
72
73
|
{
|
|
73
74
|
htmlFor: x,
|
|
74
|
-
className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
|
|
75
|
+
className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${N}`,
|
|
75
76
|
children: r
|
|
76
77
|
}
|
|
77
78
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
79
|
+
/* @__PURE__ */ k("div", { className: "relative w-full", children: [
|
|
80
|
+
l && /* @__PURE__ */ i(
|
|
80
81
|
"div",
|
|
81
82
|
{
|
|
82
|
-
className: `absolute inset-y-0 flex items-center ${
|
|
83
|
+
className: `absolute inset-y-0 flex items-center ${B} ${C}`,
|
|
83
84
|
"aria-hidden": "true",
|
|
84
|
-
children:
|
|
85
|
+
children: l
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ i(
|
|
88
89
|
"input",
|
|
89
90
|
{
|
|
90
|
-
...
|
|
91
|
+
...S,
|
|
91
92
|
id: x,
|
|
92
93
|
ref: n,
|
|
93
|
-
placeholder:
|
|
94
|
-
onChange:
|
|
94
|
+
placeholder: h ? " " : S.placeholder,
|
|
95
|
+
onChange: L,
|
|
95
96
|
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
|
|
96
|
-
${
|
|
97
|
-
${
|
|
98
|
-
${
|
|
97
|
+
${y}
|
|
98
|
+
${h && a && ae[a]}
|
|
99
|
+
${M} ${$} ${O} ${f}`
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
|
-
|
|
102
|
+
h && r && a && /* @__PURE__ */ i(
|
|
102
103
|
"label",
|
|
103
104
|
{
|
|
104
105
|
htmlFor: x,
|
|
105
|
-
className: `ms-1 ${le[
|
|
106
|
+
className: `ms-1 ${le[a]} ${f}`,
|
|
106
107
|
children: r
|
|
107
108
|
}
|
|
108
109
|
)
|
|
109
110
|
] }),
|
|
110
|
-
m && /* @__PURE__ */
|
|
111
|
+
m && /* @__PURE__ */ i(
|
|
111
112
|
"p",
|
|
112
113
|
{
|
|
113
|
-
className: `mt-1 text-xs ${
|
|
114
|
-
role:
|
|
114
|
+
className: `mt-1 text-xs ${w === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
|
|
115
|
+
role: w === "invalid" ? "alert" : void 0,
|
|
115
116
|
children: m
|
|
116
117
|
}
|
|
117
118
|
)
|
|
@@ -158,68 +159,68 @@ const de = {
|
|
|
158
159
|
label: r,
|
|
159
160
|
id: t,
|
|
160
161
|
inputSize: o = "md",
|
|
161
|
-
shape:
|
|
162
|
-
validate:
|
|
163
|
-
onValidatedChange:
|
|
164
|
-
className:
|
|
165
|
-
icon:
|
|
162
|
+
shape: c = "rounded",
|
|
163
|
+
validate: d,
|
|
164
|
+
onValidatedChange: u,
|
|
165
|
+
className: f = "",
|
|
166
|
+
icon: l,
|
|
166
167
|
iconPosition: s = "left",
|
|
167
|
-
floatingLabelStyle:
|
|
168
|
+
floatingLabelStyle: a,
|
|
168
169
|
onChange: p,
|
|
169
170
|
isValid: b,
|
|
170
171
|
isInvalid: g,
|
|
171
172
|
feedback: m,
|
|
172
|
-
feedbackType:
|
|
173
|
-
children:
|
|
173
|
+
feedbackType: C = "invalid",
|
|
174
|
+
children: w,
|
|
174
175
|
...N
|
|
175
|
-
} = e, [S, v] =
|
|
176
|
-
const D =
|
|
177
|
-
v(
|
|
178
|
-
},
|
|
179
|
-
return /* @__PURE__ */
|
|
180
|
-
!
|
|
176
|
+
} = e, [S, v] = A("default"), E = oe(), L = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : E), [t, r, E]), x = (I) => {
|
|
177
|
+
const D = I.target.value, T = (d == null ? void 0 : d(D)) ?? "default";
|
|
178
|
+
v(T), u == null || u(I, T), p == null || p(I);
|
|
179
|
+
}, h = !!a, y = de[o], $ = ue[c], O = ge(S, b, g);
|
|
180
|
+
return /* @__PURE__ */ k("div", { className: `w-full relative ${h ? "z-0" : ""}`, children: [
|
|
181
|
+
!h && r && /* @__PURE__ */ i(
|
|
181
182
|
"label",
|
|
182
183
|
{
|
|
183
|
-
htmlFor:
|
|
184
|
+
htmlFor: L,
|
|
184
185
|
className: `block mb-1 text-sm ${b ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
|
|
185
186
|
children: r
|
|
186
187
|
}
|
|
187
188
|
),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
|
|
189
|
+
/* @__PURE__ */ k("div", { className: "relative w-full", children: [
|
|
190
|
+
l && /* @__PURE__ */ i(
|
|
190
191
|
"div",
|
|
191
192
|
{
|
|
192
193
|
className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
|
|
194
195
|
}
|
|
195
196
|
),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ i(
|
|
197
198
|
"select",
|
|
198
199
|
{
|
|
199
200
|
...N,
|
|
200
|
-
id:
|
|
201
|
+
id: L,
|
|
201
202
|
ref: n,
|
|
202
|
-
onChange:
|
|
203
|
+
onChange: x,
|
|
203
204
|
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
|
|
204
|
-
${
|
|
205
|
-
${
|
|
206
|
-
${
|
|
207
|
-
children:
|
|
205
|
+
${y} ${l && (s === "start" || s === "left") ? "ps-10" : l ? "pe-10" : ""}
|
|
206
|
+
${h && a && fe[a]}
|
|
207
|
+
${$} ${O} ${f}`,
|
|
208
|
+
children: w
|
|
208
209
|
}
|
|
209
210
|
),
|
|
210
|
-
|
|
211
|
+
h && r && a && /* @__PURE__ */ i(
|
|
211
212
|
"label",
|
|
212
213
|
{
|
|
213
|
-
htmlFor:
|
|
214
|
-
className: `ms-1 ${pe[
|
|
214
|
+
htmlFor: L,
|
|
215
|
+
className: `ms-1 ${pe[a]} ${f}`,
|
|
215
216
|
children: r
|
|
216
217
|
}
|
|
217
218
|
)
|
|
218
219
|
] }),
|
|
219
|
-
m && /* @__PURE__ */
|
|
220
|
+
m && /* @__PURE__ */ i(
|
|
220
221
|
"p",
|
|
221
222
|
{
|
|
222
|
-
className: `mt-1 text-xs ${
|
|
223
|
+
className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
|
|
223
224
|
children: m
|
|
224
225
|
}
|
|
225
226
|
)
|
|
@@ -269,22 +270,22 @@ const me = {
|
|
|
269
270
|
size: r = "md",
|
|
270
271
|
type: t = "button",
|
|
271
272
|
shape: o = "rounded",
|
|
272
|
-
className:
|
|
273
|
-
isLoading:
|
|
274
|
-
disabled:
|
|
275
|
-
...
|
|
273
|
+
className: c = "",
|
|
274
|
+
isLoading: d = !1,
|
|
275
|
+
disabled: u = !1,
|
|
276
|
+
...f
|
|
276
277
|
}) => {
|
|
277
|
-
const
|
|
278
|
+
const l = u || d, s = [
|
|
278
279
|
"inline-flex items-center justify-center font-normal transition duration-150",
|
|
279
280
|
me[n],
|
|
280
281
|
xe[r],
|
|
281
282
|
he[o],
|
|
282
283
|
o === "flat" ? "shadow-none" : "shadow-sm",
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
285
|
+
c
|
|
285
286
|
].filter(Boolean).join(" ");
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
|
|
287
|
+
return /* @__PURE__ */ k("button", { type: t, className: s, disabled: l, ...f, children: [
|
|
288
|
+
d && /* @__PURE__ */ k(
|
|
288
289
|
"svg",
|
|
289
290
|
{
|
|
290
291
|
"aria-hidden": "true",
|
|
@@ -294,14 +295,14 @@ const me = {
|
|
|
294
295
|
fill: "none",
|
|
295
296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
296
297
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ i(
|
|
298
299
|
"path",
|
|
299
300
|
{
|
|
300
301
|
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",
|
|
301
302
|
fill: "currentColor"
|
|
302
303
|
}
|
|
303
304
|
),
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ i(
|
|
305
306
|
"path",
|
|
306
307
|
{
|
|
307
308
|
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",
|
|
@@ -320,14 +321,14 @@ var V = {
|
|
|
320
321
|
className: void 0,
|
|
321
322
|
style: void 0,
|
|
322
323
|
attr: void 0
|
|
323
|
-
}, q =
|
|
324
|
+
}, q = z.createContext && /* @__PURE__ */ z.createContext(V), ye = ["attr", "size", "title"];
|
|
324
325
|
function we(e, n) {
|
|
325
326
|
if (e == null) return {};
|
|
326
327
|
var r = ve(e, n), t, o;
|
|
327
328
|
if (Object.getOwnPropertySymbols) {
|
|
328
|
-
var
|
|
329
|
-
for (o = 0; o <
|
|
330
|
-
t =
|
|
329
|
+
var c = Object.getOwnPropertySymbols(e);
|
|
330
|
+
for (o = 0; o < c.length; o++)
|
|
331
|
+
t = c[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
331
332
|
}
|
|
332
333
|
return r;
|
|
333
334
|
}
|
|
@@ -341,15 +342,15 @@ function ve(e, n) {
|
|
|
341
342
|
}
|
|
342
343
|
return r;
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
345
|
+
function R() {
|
|
346
|
+
return R = Object.assign ? Object.assign.bind() : function(e) {
|
|
346
347
|
for (var n = 1; n < arguments.length; n++) {
|
|
347
348
|
var r = arguments[n];
|
|
348
349
|
for (var t in r)
|
|
349
350
|
Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
350
351
|
}
|
|
351
352
|
return e;
|
|
352
|
-
},
|
|
353
|
+
}, R.apply(this, arguments);
|
|
353
354
|
}
|
|
354
355
|
function X(e, n) {
|
|
355
356
|
var r = Object.keys(e);
|
|
@@ -361,7 +362,7 @@ function X(e, n) {
|
|
|
361
362
|
}
|
|
362
363
|
return r;
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
+
function H(e) {
|
|
365
366
|
for (var n = 1; n < arguments.length; n++) {
|
|
366
367
|
var r = arguments[n] != null ? arguments[n] : {};
|
|
367
368
|
n % 2 ? X(Object(r), !0).forEach(function(t) {
|
|
@@ -390,13 +391,13 @@ function Ne(e, n) {
|
|
|
390
391
|
return (n === "string" ? String : Number)(e);
|
|
391
392
|
}
|
|
392
393
|
function ee(e) {
|
|
393
|
-
return e && e.map((n, r) => /* @__PURE__ */
|
|
394
|
+
return e && e.map((n, r) => /* @__PURE__ */ z.createElement(n.tag, H({
|
|
394
395
|
key: r
|
|
395
396
|
}, n.attr), ee(n.child)));
|
|
396
397
|
}
|
|
397
|
-
function
|
|
398
|
-
return (n) => /* @__PURE__ */
|
|
399
|
-
attr:
|
|
398
|
+
function G(e) {
|
|
399
|
+
return (n) => /* @__PURE__ */ z.createElement(Se, R({
|
|
400
|
+
attr: H({}, e.attr)
|
|
400
401
|
}, n), ee(e.child));
|
|
401
402
|
}
|
|
402
403
|
function Se(e) {
|
|
@@ -404,26 +405,26 @@ function Se(e) {
|
|
|
404
405
|
var {
|
|
405
406
|
attr: t,
|
|
406
407
|
size: o,
|
|
407
|
-
title:
|
|
408
|
-
} = e,
|
|
409
|
-
return r.className && (
|
|
408
|
+
title: c
|
|
409
|
+
} = e, d = we(e, ye), u = o || r.size || "1em", f;
|
|
410
|
+
return r.className && (f = r.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", R({
|
|
410
411
|
stroke: "currentColor",
|
|
411
412
|
fill: "currentColor",
|
|
412
413
|
strokeWidth: "0"
|
|
413
|
-
}, r.attr, t,
|
|
414
|
-
className:
|
|
415
|
-
style:
|
|
414
|
+
}, r.attr, t, d, {
|
|
415
|
+
className: f,
|
|
416
|
+
style: H(H({
|
|
416
417
|
color: e.color || r.color
|
|
417
418
|
}, r.style), e.style),
|
|
418
|
-
height:
|
|
419
|
-
width:
|
|
419
|
+
height: u,
|
|
420
|
+
width: u,
|
|
420
421
|
xmlns: "http://www.w3.org/2000/svg"
|
|
421
|
-
}),
|
|
422
|
+
}), c && /* @__PURE__ */ z.createElement("title", null, c), e.children);
|
|
422
423
|
};
|
|
423
|
-
return q !== void 0 ? /* @__PURE__ */
|
|
424
|
+
return q !== void 0 ? /* @__PURE__ */ z.createElement(q.Consumer, null, (r) => n(r)) : n(V);
|
|
424
425
|
}
|
|
425
426
|
function $e(e) {
|
|
426
|
-
return
|
|
427
|
+
return G({ 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);
|
|
427
428
|
}
|
|
428
429
|
const Ee = {
|
|
429
430
|
xs: "w-3 h-3 text-[10px]",
|
|
@@ -460,51 +461,51 @@ const Ee = {
|
|
|
460
461
|
"soft-info": "soft-info",
|
|
461
462
|
"soft-dark": "soft-dark",
|
|
462
463
|
"soft-light": "soft-light"
|
|
463
|
-
}, Pe =
|
|
464
|
+
}, Pe = z.forwardRef(
|
|
464
465
|
({
|
|
465
466
|
label: e,
|
|
466
467
|
boxSize: n = "md",
|
|
467
468
|
shape: r = "rounded",
|
|
468
469
|
variant: t = "success",
|
|
469
470
|
onSelectionChange: o,
|
|
470
|
-
disabled:
|
|
471
|
-
className:
|
|
472
|
-
id:
|
|
473
|
-
value:
|
|
474
|
-
icon:
|
|
471
|
+
disabled: c = !1,
|
|
472
|
+
className: d = "",
|
|
473
|
+
id: u,
|
|
474
|
+
value: f,
|
|
475
|
+
icon: l,
|
|
475
476
|
children: s,
|
|
476
|
-
checked:
|
|
477
|
+
checked: a,
|
|
477
478
|
...p
|
|
478
479
|
}, b) => {
|
|
479
|
-
const g = (
|
|
480
|
-
!
|
|
481
|
-
}, m = "mr-2 border flex items-center justify-center transition-all",
|
|
480
|
+
const g = (y) => {
|
|
481
|
+
!c && o && o(y.target.checked), p.onChange && p.onChange(y);
|
|
482
|
+
}, m = "mr-2 border flex items-center justify-center transition-all", C = Ee[n], w = Le[r], N = Oe[t] ?? "", S = t.startsWith("outline"), v = t.startsWith("soft"), x = `${m} ${C} ${w} ${N} ${a && (S || v || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, h = {
|
|
482
483
|
xs: "w-2 h-2",
|
|
483
484
|
sm: "w-2.5 h-2.5",
|
|
484
485
|
md: "w-3 h-3",
|
|
485
486
|
lg: "w-3.5 h-3.5"
|
|
486
487
|
};
|
|
487
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ k(
|
|
488
489
|
"label",
|
|
489
490
|
{
|
|
490
|
-
className: `flex items-center ${
|
|
491
|
+
className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
|
|
491
492
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ i(
|
|
493
494
|
"input",
|
|
494
495
|
{
|
|
495
496
|
type: "checkbox",
|
|
496
497
|
className: "peer hidden",
|
|
497
|
-
checked:
|
|
498
|
+
checked: a,
|
|
498
499
|
onChange: g,
|
|
499
|
-
disabled:
|
|
500
|
-
id:
|
|
501
|
-
value:
|
|
500
|
+
disabled: c,
|
|
501
|
+
id: u,
|
|
502
|
+
value: f,
|
|
502
503
|
ref: b,
|
|
503
504
|
...p
|
|
504
505
|
}
|
|
505
506
|
),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
e || s ? /* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ i("span", { className: x.trim(), children: (a || p.defaultChecked) && (l ?? /* @__PURE__ */ i($e, { className: `${h[n]}` })) }),
|
|
508
|
+
e || s ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
|
|
508
509
|
]
|
|
509
510
|
}
|
|
510
511
|
);
|
|
@@ -517,73 +518,73 @@ const We = ({
|
|
|
517
518
|
items: r = [],
|
|
518
519
|
onSelect: t,
|
|
519
520
|
renderItem: o,
|
|
520
|
-
position:
|
|
521
|
-
className:
|
|
522
|
-
menuClassName:
|
|
523
|
-
width:
|
|
524
|
-
closeOnSelect:
|
|
521
|
+
position: c = "right",
|
|
522
|
+
className: d = "",
|
|
523
|
+
menuClassName: u = "",
|
|
524
|
+
width: f = "w-48",
|
|
525
|
+
closeOnSelect: l = !1,
|
|
525
526
|
transition: s = !0,
|
|
526
|
-
ariaLabel:
|
|
527
|
+
ariaLabel: a = "Dropdown menu",
|
|
527
528
|
...p
|
|
528
529
|
}) => {
|
|
529
|
-
const [b, g] =
|
|
530
|
+
const [b, g] = A(!1), [m, C] = A(!1), w = F(null), N = F(null), S = P(() => ({
|
|
530
531
|
left: "left-0",
|
|
531
532
|
center: "left-1/2 transform -translate-x-1/2",
|
|
532
533
|
right: "right-0"
|
|
533
|
-
})[
|
|
534
|
-
const
|
|
535
|
-
if (!
|
|
536
|
-
const { top: O, bottom:
|
|
537
|
-
|
|
538
|
-
}, []),
|
|
539
|
-
var
|
|
540
|
-
!((
|
|
541
|
-
}, []),
|
|
542
|
-
|
|
534
|
+
})[c], [c]), v = j(() => {
|
|
535
|
+
const y = N.current, $ = w.current;
|
|
536
|
+
if (!y || !$) return;
|
|
537
|
+
const { top: O, bottom: B } = y.getBoundingClientRect(), M = $.offsetHeight, I = window.innerHeight - B, D = O;
|
|
538
|
+
C(I < M && D > M);
|
|
539
|
+
}, []), E = j((y) => {
|
|
540
|
+
var $, O;
|
|
541
|
+
!(($ = w.current) != null && $.contains(y.target)) && !((O = N.current) != null && O.contains(y.target)) && g(!1);
|
|
542
|
+
}, []), L = j(() => g((y) => !y), []), x = j(() => g(!1), []);
|
|
543
|
+
_(() => {
|
|
543
544
|
if (b)
|
|
544
545
|
return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
|
|
545
546
|
window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
|
|
546
547
|
};
|
|
547
|
-
}, [b, v]),
|
|
548
|
-
const
|
|
548
|
+
}, [b, v]), _(() => (document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E)), [E]);
|
|
549
|
+
const h = P(
|
|
549
550
|
() => [
|
|
550
551
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
551
552
|
m ? "bottom-full mb-2" : "top-full mt-2",
|
|
552
553
|
S,
|
|
553
|
-
|
|
554
|
+
f,
|
|
554
555
|
s && "transition-all duration-200 ease-out",
|
|
555
|
-
|
|
556
|
+
u
|
|
556
557
|
].filter(Boolean).join(" "),
|
|
557
|
-
[m, S,
|
|
558
|
+
[m, S, f, s, u]
|
|
558
559
|
);
|
|
559
|
-
return /* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ k("div", { className: `relative inline-block ${d}`, ...p, children: [
|
|
561
|
+
/* @__PURE__ */ i(
|
|
561
562
|
"button",
|
|
562
563
|
{
|
|
563
564
|
type: "button",
|
|
564
565
|
ref: N,
|
|
565
|
-
onClick:
|
|
566
|
+
onClick: L,
|
|
566
567
|
"aria-expanded": b,
|
|
567
|
-
"aria-label":
|
|
568
|
+
"aria-label": a,
|
|
568
569
|
className: "focus:outline-none",
|
|
569
570
|
children: e
|
|
570
571
|
}
|
|
571
572
|
),
|
|
572
|
-
b && /* @__PURE__ */
|
|
573
|
+
b && /* @__PURE__ */ k("div", { ref: w, role: "menu", className: h, children: [
|
|
573
574
|
n && n,
|
|
574
|
-
r.map((
|
|
575
|
+
r.map((y, $) => {
|
|
575
576
|
const O = () => {
|
|
576
|
-
t && t(
|
|
577
|
+
t && t(y), l && x();
|
|
577
578
|
};
|
|
578
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ i("div", { children: o ? o(y, O) : /* @__PURE__ */ i(
|
|
579
580
|
"div",
|
|
580
581
|
{
|
|
581
582
|
onClick: O,
|
|
582
583
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
583
584
|
role: "menuitem",
|
|
584
|
-
children:
|
|
585
|
+
children: y.label
|
|
585
586
|
}
|
|
586
|
-
) },
|
|
587
|
+
) }, $);
|
|
587
588
|
})
|
|
588
589
|
] })
|
|
589
590
|
] });
|
|
@@ -593,22 +594,22 @@ const We = ({
|
|
|
593
594
|
position: r = "top",
|
|
594
595
|
className: t = "",
|
|
595
596
|
tooltipClass: o = "",
|
|
596
|
-
tooltipStyle:
|
|
597
|
+
tooltipStyle: c = {}
|
|
597
598
|
}) => {
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
if (!
|
|
602
|
-
const
|
|
599
|
+
const d = F(null), u = F(null);
|
|
600
|
+
_(() => {
|
|
601
|
+
const l = d.current, s = u.current;
|
|
602
|
+
if (!l || !s) return;
|
|
603
|
+
const a = () => {
|
|
603
604
|
s.style.opacity = "1", s.style.visibility = "visible";
|
|
604
605
|
}, p = () => {
|
|
605
606
|
s.style.opacity = "0", s.style.visibility = "hidden";
|
|
606
607
|
};
|
|
607
|
-
return
|
|
608
|
-
|
|
608
|
+
return l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", p), () => {
|
|
609
|
+
l.removeEventListener("mouseenter", a), l.removeEventListener("mouseleave", p);
|
|
609
610
|
};
|
|
610
611
|
}, []);
|
|
611
|
-
const
|
|
612
|
+
const f = (l) => {
|
|
612
613
|
const s = {
|
|
613
614
|
position: "absolute",
|
|
614
615
|
opacity: 0,
|
|
@@ -626,7 +627,7 @@ const We = ({
|
|
|
626
627
|
zIndex: 9999,
|
|
627
628
|
width: "max-content"
|
|
628
629
|
};
|
|
629
|
-
switch (
|
|
630
|
+
switch (l) {
|
|
630
631
|
case "top":
|
|
631
632
|
return {
|
|
632
633
|
...s,
|
|
@@ -663,17 +664,17 @@ const We = ({
|
|
|
663
664
|
return s;
|
|
664
665
|
}
|
|
665
666
|
};
|
|
666
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ k("div", { ref: d, className: `relative inline-block ${t}`, children: [
|
|
667
668
|
e,
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ i(
|
|
669
670
|
"div",
|
|
670
671
|
{
|
|
671
|
-
ref:
|
|
672
|
+
ref: u,
|
|
672
673
|
role: "tooltip",
|
|
673
674
|
className: o,
|
|
674
675
|
style: {
|
|
675
|
-
...
|
|
676
|
-
...
|
|
676
|
+
...f(r),
|
|
677
|
+
...c
|
|
677
678
|
},
|
|
678
679
|
children: n
|
|
679
680
|
}
|
|
@@ -714,20 +715,20 @@ const We = ({
|
|
|
714
715
|
size: r = "sm",
|
|
715
716
|
shape: t = "rounded",
|
|
716
717
|
icon: o,
|
|
717
|
-
dismissible:
|
|
718
|
-
onDismiss:
|
|
719
|
-
className:
|
|
720
|
-
...
|
|
718
|
+
dismissible: c,
|
|
719
|
+
onDismiss: d,
|
|
720
|
+
className: u = "",
|
|
721
|
+
...f
|
|
721
722
|
}) => {
|
|
722
|
-
const
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
o && /* @__PURE__ */
|
|
723
|
+
const l = !e && !!o, s = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + u;
|
|
724
|
+
return /* @__PURE__ */ k("span", { className: s.trim(), ...f, children: [
|
|
725
|
+
o && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: o }),
|
|
725
726
|
e,
|
|
726
|
-
|
|
727
|
+
c && /* @__PURE__ */ i(
|
|
727
728
|
"button",
|
|
728
729
|
{
|
|
729
730
|
type: "button",
|
|
730
|
-
onClick:
|
|
731
|
+
onClick: d,
|
|
731
732
|
className: "ml-2 text-xs font-bold leading-none focus:outline-none",
|
|
732
733
|
children: "×"
|
|
733
734
|
}
|
|
@@ -735,7 +736,7 @@ const We = ({
|
|
|
735
736
|
] });
|
|
736
737
|
};
|
|
737
738
|
function Ae(e) {
|
|
738
|
-
return
|
|
739
|
+
return G({ 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);
|
|
739
740
|
}
|
|
740
741
|
const Ke = ({
|
|
741
742
|
items: e,
|
|
@@ -743,56 +744,56 @@ const Ke = ({
|
|
|
743
744
|
className: r = "",
|
|
744
745
|
tileClasses: t = "",
|
|
745
746
|
open: o,
|
|
746
|
-
onChange:
|
|
747
|
-
renderTitle:
|
|
748
|
-
renderContent:
|
|
749
|
-
showArrowIcon:
|
|
750
|
-
panelClasses:
|
|
747
|
+
onChange: c,
|
|
748
|
+
renderTitle: d,
|
|
749
|
+
renderContent: u,
|
|
750
|
+
showArrowIcon: f = !0,
|
|
751
|
+
panelClasses: l = ""
|
|
751
752
|
}) => {
|
|
752
|
-
const [s,
|
|
753
|
+
const [s, a] = A(/* @__PURE__ */ new Set()), p = P(() => o ? new Set(o) : s, [o, s]), b = j(
|
|
753
754
|
(g) => {
|
|
754
755
|
const m = new Set(p);
|
|
755
|
-
m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o &&
|
|
756
|
+
m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && c ? c(Array.from(m)) : a(m);
|
|
756
757
|
},
|
|
757
|
-
[p, o,
|
|
758
|
+
[p, o, c, n]
|
|
758
759
|
);
|
|
759
|
-
return /* @__PURE__ */
|
|
760
|
+
return /* @__PURE__ */ i(
|
|
760
761
|
"div",
|
|
761
762
|
{
|
|
762
763
|
className: "accordion",
|
|
763
764
|
role: "region",
|
|
764
765
|
"aria-multiselectable": n,
|
|
765
766
|
children: e.map((g) => {
|
|
766
|
-
const m = p.has(g.id),
|
|
767
|
-
return /* @__PURE__ */
|
|
767
|
+
const m = p.has(g.id), C = `accordion-heading-${g.id}`, w = `accordion-panel-${g.id}`;
|
|
768
|
+
return /* @__PURE__ */ k(
|
|
768
769
|
"div",
|
|
769
770
|
{
|
|
770
771
|
className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${r}`,
|
|
771
772
|
children: [
|
|
772
|
-
/* @__PURE__ */
|
|
773
|
+
/* @__PURE__ */ k(
|
|
773
774
|
"button",
|
|
774
775
|
{
|
|
775
|
-
id:
|
|
776
|
+
id: C,
|
|
776
777
|
type: "button",
|
|
777
778
|
"aria-expanded": m,
|
|
778
|
-
"aria-controls":
|
|
779
|
+
"aria-controls": w,
|
|
779
780
|
onClick: () => b(g.id),
|
|
780
781
|
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}`,
|
|
781
782
|
children: [
|
|
782
|
-
|
|
783
|
-
|
|
783
|
+
d ? d(g, m) : g.title,
|
|
784
|
+
f ? /* @__PURE__ */ i(Ae, {}) : null
|
|
784
785
|
]
|
|
785
786
|
}
|
|
786
787
|
),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ i(
|
|
788
789
|
"div",
|
|
789
790
|
{
|
|
790
|
-
id:
|
|
791
|
+
id: w,
|
|
791
792
|
role: "region",
|
|
792
|
-
"aria-labelledby":
|
|
793
|
+
"aria-labelledby": C,
|
|
793
794
|
hidden: !m,
|
|
794
|
-
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${
|
|
795
|
-
children:
|
|
795
|
+
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
|
|
796
|
+
children: u ? u(g, m) : g.content
|
|
796
797
|
}
|
|
797
798
|
)
|
|
798
799
|
]
|
|
@@ -816,66 +817,67 @@ function Ue({
|
|
|
816
817
|
children: r,
|
|
817
818
|
standalone: t = !1,
|
|
818
819
|
showFloatingClose: o = !1,
|
|
819
|
-
containerClasses:
|
|
820
|
-
onClose:
|
|
821
|
-
disableEscapeClose:
|
|
820
|
+
containerClasses: c = "",
|
|
821
|
+
onClose: d,
|
|
822
|
+
disableEscapeClose: u = !1,
|
|
823
|
+
closeBtnStyle: f
|
|
822
824
|
}) {
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
}, [
|
|
826
|
-
return
|
|
827
|
-
const
|
|
825
|
+
const l = se(), s = re(), a = !t && !!l && !!s, [p, b] = A(!1), g = a ? l.isOpen(e) : p, m = a ? l.getModalData(e) : null, C = j(() => {
|
|
826
|
+
a ? s.closeModal(e) : b(!1), d == null || d();
|
|
827
|
+
}, [a, s, e, d]);
|
|
828
|
+
return _(() => {
|
|
829
|
+
const w = document.activeElement, N = document.getElementById(e), S = [
|
|
828
830
|
"a[href]",
|
|
829
831
|
"button:not([disabled])",
|
|
830
832
|
"textarea:not([disabled])",
|
|
831
833
|
"input:not([disabled])",
|
|
832
834
|
"select:not([disabled])",
|
|
833
835
|
'[tabindex]:not([tabindex="-1"])'
|
|
834
|
-
],
|
|
835
|
-
if (!
|
|
836
|
-
const x =
|
|
837
|
-
|
|
836
|
+
], v = () => {
|
|
837
|
+
if (!N) return [];
|
|
838
|
+
const x = N.querySelectorAll(
|
|
839
|
+
S.join(",")
|
|
838
840
|
);
|
|
839
|
-
return Array.from(x).filter((
|
|
840
|
-
},
|
|
841
|
+
return Array.from(x).filter((h) => h.offsetParent !== null);
|
|
842
|
+
}, E = (x) => {
|
|
841
843
|
if (x.key === "Tab") {
|
|
842
|
-
const
|
|
843
|
-
if (
|
|
844
|
-
const
|
|
845
|
-
x.shiftKey ? document.activeElement ===
|
|
844
|
+
const h = v();
|
|
845
|
+
if (h.length === 0) return;
|
|
846
|
+
const y = h[0], $ = h[h.length - 1];
|
|
847
|
+
x.shiftKey ? document.activeElement === y && (x.preventDefault(), $.focus()) : document.activeElement === $ && (x.preventDefault(), y.focus());
|
|
846
848
|
}
|
|
847
|
-
},
|
|
848
|
-
x.key === "Escape" && !
|
|
849
|
+
}, L = (x) => {
|
|
850
|
+
x.key === "Escape" && !u && C(), E(x);
|
|
849
851
|
};
|
|
850
|
-
return
|
|
851
|
-
const x =
|
|
852
|
+
return g && (document.body.style.overflow = "hidden", setTimeout(() => {
|
|
853
|
+
const x = v();
|
|
852
854
|
x.length && x[0].focus();
|
|
853
|
-
}, 0), window.addEventListener("keydown",
|
|
854
|
-
document.body.style.overflow = "",
|
|
855
|
+
}, 0), window.addEventListener("keydown", L)), () => {
|
|
856
|
+
document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", L);
|
|
855
857
|
};
|
|
856
|
-
}, [
|
|
858
|
+
}, [g, u, C, e]), g ? /* @__PURE__ */ i(
|
|
857
859
|
"div",
|
|
858
860
|
{
|
|
859
861
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
|
|
860
862
|
id: e,
|
|
861
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ k(
|
|
862
864
|
"div",
|
|
863
865
|
{
|
|
864
|
-
className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${
|
|
866
|
+
className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
|
|
865
867
|
children: [
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
n && /* @__PURE__ */
|
|
868
|
-
o && /* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ k("div", { className: "flex justify-between items-center relative", children: [
|
|
869
|
+
n && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: n }),
|
|
870
|
+
o && /* @__PURE__ */ i(
|
|
869
871
|
"button",
|
|
870
872
|
{
|
|
871
|
-
onClick:
|
|
872
|
-
className:
|
|
873
|
+
onClick: C,
|
|
874
|
+
className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${f}`,
|
|
873
875
|
"aria-label": "Close modal",
|
|
874
876
|
children: "✕"
|
|
875
877
|
}
|
|
876
878
|
)
|
|
877
879
|
] }),
|
|
878
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ i("div", { children: typeof r == "function" ? r({ modalData: m }) : r })
|
|
879
881
|
]
|
|
880
882
|
}
|
|
881
883
|
)
|
|
@@ -885,85 +887,85 @@ function Ue({
|
|
|
885
887
|
function qe({
|
|
886
888
|
children: e
|
|
887
889
|
}) {
|
|
888
|
-
const [n, r] =
|
|
889
|
-
r((b) => ({ ...b, [
|
|
890
|
-
}, []),
|
|
891
|
-
r((p) => ({ ...p, [
|
|
890
|
+
const [n, r] = A({}), [t, o] = A({}), c = j((a, p) => {
|
|
891
|
+
r((b) => ({ ...b, [a]: !0 })), p && o((b) => ({ ...b, [a]: p }));
|
|
892
|
+
}, []), d = j((a) => {
|
|
893
|
+
r((p) => ({ ...p, [a]: !1 })), o((p) => {
|
|
892
894
|
const b = { ...p };
|
|
893
|
-
return delete b[
|
|
895
|
+
return delete b[a], b;
|
|
894
896
|
});
|
|
895
|
-
}, []),
|
|
896
|
-
(
|
|
897
|
+
}, []), u = j((a) => !!n[a], [n]), f = j(
|
|
898
|
+
(a) => t[a],
|
|
897
899
|
[t]
|
|
898
|
-
),
|
|
899
|
-
() => ({ openModal:
|
|
900
|
-
[
|
|
900
|
+
), l = P(
|
|
901
|
+
() => ({ openModal: c, closeModal: d }),
|
|
902
|
+
[c, d]
|
|
901
903
|
), s = P(
|
|
902
|
-
() => ({ isOpen:
|
|
903
|
-
[
|
|
904
|
+
() => ({ isOpen: u, getModalData: f }),
|
|
905
|
+
[u, f]
|
|
904
906
|
);
|
|
905
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ i(te.Provider, { value: l, children: /* @__PURE__ */ i(ne.Provider, { value: s, children: e }) });
|
|
906
908
|
}
|
|
907
909
|
function Xe(e) {
|
|
908
910
|
const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: o } = se();
|
|
909
911
|
return {
|
|
910
|
-
open: (
|
|
912
|
+
open: (c) => n(e, c),
|
|
911
913
|
close: () => r(e),
|
|
912
914
|
isOpen: t(e),
|
|
913
915
|
data: o(e)
|
|
914
916
|
};
|
|
915
917
|
}
|
|
916
|
-
let
|
|
918
|
+
let W = null, Z = {};
|
|
917
919
|
function Me(e) {
|
|
918
|
-
|
|
920
|
+
W = e;
|
|
919
921
|
}
|
|
920
922
|
function Ye(e) {
|
|
921
|
-
|
|
923
|
+
Z = { ...Z, ...e };
|
|
922
924
|
}
|
|
923
925
|
function De() {
|
|
924
|
-
return
|
|
926
|
+
return Z;
|
|
925
927
|
}
|
|
926
928
|
function Je(e, n, r = 3e3, t) {
|
|
927
|
-
|
|
929
|
+
W ? W(e, n, r, t) : console.warn("Toast system is not mounted");
|
|
928
930
|
}
|
|
929
931
|
function Te(e) {
|
|
930
|
-
return
|
|
932
|
+
return G({ 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);
|
|
931
933
|
}
|
|
932
934
|
const _e = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
933
935
|
const n = Math.random() * 16 | 0;
|
|
934
936
|
return (e === "x" ? n : n & 3 | 8).toString(16);
|
|
935
937
|
}), Qe = () => {
|
|
936
|
-
const [e, n] =
|
|
937
|
-
|
|
938
|
-
Me((t, o,
|
|
939
|
-
const
|
|
940
|
-
n((
|
|
941
|
-
n((
|
|
942
|
-
},
|
|
938
|
+
const [e, n] = A([]);
|
|
939
|
+
_(() => {
|
|
940
|
+
Me((t, o, c, d) => {
|
|
941
|
+
const u = _e();
|
|
942
|
+
n((f) => [...f, { id: u, type: t, message: o, config: d }]), setTimeout(() => {
|
|
943
|
+
n((f) => f.filter((l) => l.id !== u));
|
|
944
|
+
}, c);
|
|
943
945
|
});
|
|
944
946
|
}, []);
|
|
945
947
|
const r = De();
|
|
946
|
-
return /* @__PURE__ */
|
|
947
|
-
var
|
|
948
|
-
const o = ((
|
|
949
|
-
return /* @__PURE__ */
|
|
948
|
+
return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
|
|
949
|
+
var f, l, s, a, p, b, g, m, C, w, N, S, v;
|
|
950
|
+
const o = ((f = t.config) == null ? void 0 : f.icon) || ((l = r.icons) == null ? void 0 : l[t.type]) || Be(t.type), c = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (a = r.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 = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", u = ((C = t.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
|
|
951
|
+
return /* @__PURE__ */ k(
|
|
950
952
|
"div",
|
|
951
953
|
{
|
|
952
|
-
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${
|
|
954
|
+
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${c} ${d}`,
|
|
953
955
|
children: [
|
|
954
|
-
/* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
((
|
|
957
|
-
((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */
|
|
958
|
-
!((S = t.config) != null && S.title) && !((v = t.config) != null && v.description) && /* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ i("div", { className: u, children: o }),
|
|
957
|
+
/* @__PURE__ */ k("div", { className: "flex-1 me-3", children: [
|
|
958
|
+
((w = t.config) == null ? void 0 : w.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
|
|
959
|
+
((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
|
|
960
|
+
!((S = t.config) != null && S.title) && !((v = t.config) != null && v.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
|
|
959
961
|
] }),
|
|
960
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ i(
|
|
961
963
|
"button",
|
|
962
964
|
{
|
|
963
|
-
onClick: () => n((
|
|
965
|
+
onClick: () => n((E) => E.filter((L) => L.id !== t.id)),
|
|
964
966
|
className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
|
|
965
967
|
"aria-label": "Close",
|
|
966
|
-
children: /* @__PURE__ */
|
|
968
|
+
children: /* @__PURE__ */ i(Te, { size: 18 })
|
|
967
969
|
}
|
|
968
970
|
)
|
|
969
971
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(w,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):(w=typeof globalThis<"u"?globalThis:w||self,l(w.TailwindUiKit={},w.jsxRuntime,w.React))})(this,function(w,l,n){"use strict";"use client";var W=document.createElement("style");W.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
|
-
${
|
|
5
|
-
${
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
${O} ${M} ${i}`,children:m}),L&&e&&d&&l.jsx("label",{htmlFor:y,className:`ms-1 ${cr[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});K.displayName="Select";const ir={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"},dr={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"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:h="",isLoading:u=!1,disabled:b=!1,...i})=>{const s=b||u,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:s,...i,children:[u&&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 U={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},X=n.createContext&&n.createContext(U),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(c=0;c<h.length;c++)o=h[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(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 T(){return T=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},T.apply(this,arguments)}function Y(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 A(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Y(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Y(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(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 J(r){return r&&r.map((t,e)=>n.createElement(t.tag,A({key:e},t.attr),J(t.child)))}function D(r){return t=>n.createElement(wr,T({attr:A({},r.attr)},t),J(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:h}=r,u=fr(r,br),b=c||e.size||"1em",i;return e.className&&(i=e.className),r.className&&(i=(i?i+" ":"")+r.className),n.createElement("svg",T({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,u,{className:i,style:A(A({color:r.color||e.color},e.style),r.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),h&&n.createElement("title",null,h),r.children)};return X!==void 0?n.createElement(X.Consumer,null,e=>t(e)):t(U)}function kr(r){return D({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 mr={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"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={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"},Q=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:h=!1,className:u="",id:b,value:i,icon:s,children:a,checked:d,...f},v)=>{const g=k=>{!h&&c&&c(k.target.checked),f.onChange&&f.onChange(k)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],m=xr[e],N=Cr[o]??"",$=o.startsWith("outline"),C=o.startsWith("soft"),x=`${p} ${S} ${m} ${N} ${d&&($||C||o==="link")?"peer-checked:bg-current peer-checked:text-white":d?"peer-checked:bg-current":""}`,L={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${u}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:d,onChange:g,disabled:h,id:b,value:i,ref:v,...f}),l.jsx("span",{className:x.trim(),children:(d||f.defaultChecked)&&(s??l.jsx(kr,{className:`${L[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});Q.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:h="right",className:u="",menuClassName:b="",width:i="w-48",closeOnSelect:s=!1,transition:a=!0,ariaLabel:d="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),m=n.useRef(null),N=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),C=n.useCallback(()=>{const k=N.current,O=m.current;if(!k||!O)return;const{top:M,bottom:z}=k.getBoundingClientRect(),j=O.offsetHeight,P=window.innerHeight-z,I=M;S(P<j&&I>j)},[]),E=n.useCallback(k=>{var O,M;!((O=m.current)!=null&&O.contains(k.target))&&!((M=N.current)!=null&&M.contains(k.target))&&g(!1)},[]),y=n.useCallback(()=>g(k=>!k),[]),x=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[v,C]),n.useEffect(()=>(document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)),[E]);const L=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",$,i,a&&"transition-all duration-200 ease-out",b].filter(Boolean).join(" "),[p,$,i,a,b]);return l.jsxs("div",{className:`relative inline-block ${u}`,...f,children:[l.jsx("button",{type:"button",ref:N,onClick:y,"aria-expanded":v,"aria-label":d,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:m,role:"menu",className:L,children:[t&&t,e.map((k,O)=>{const M=()=>{o&&o(k),s&&x()};return l.jsx("div",{children:c?c(k,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:k.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:h={}})=>{const u=n.useRef(null),b=n.useRef(null);n.useEffect(()=>{const s=u.current,a=b.current;if(!s||!a)return;const d=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return s.addEventListener("mouseenter",d),s.addEventListener("mouseleave",f),()=>{s.removeEventListener("mouseenter",d),s.removeEventListener("mouseleave",f)}},[]);const i=s=>{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(s){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:u,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:b,role:"tooltip",className:c,style:{...i(e),...h},children:t})]})},$r={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"},Er={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"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:h,onDismiss:u,className:b="",...i})=>{const s=!r&&!!c,a=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${s?"justify-center p-2 w-8 h-8":""} `+b;return l.jsxs("span",{className:a.trim(),...i,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,h&&l.jsx("button",{type:"button",onClick:u,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return D({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 jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:h,renderTitle:u,renderContent:b,showArrowIcon:i=!0,panelClasses:s=""})=>{const[a,d]=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&&h?h(Array.from(p)):d(p)},[f,c,h,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,m=`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:S,type:"button","aria-expanded":p,"aria-controls":m,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:[u?u(g,p):g.title,i?l.jsx(Mr,{}):null]}),l.jsx("div",{id:m,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:b?b(g,p):g.content})]},g.id)})})},V=n.createContext(null),_=()=>{const r=n.useContext(V);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},R=n.createContext(null),B=()=>n.useContext(R);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:h="",onClose:u,disableEscapeClose:b=!1}){const i=B(),s=_(),a=!o&&!!i&&!!s,[d,f]=n.useState(!1),v=a?i.isOpen(r):d,g=a?i.getModalData(r):null,p=n.useCallback(()=>{a?s.closeModal(r):f(!1),u==null||u()},[a,s,r,u]);return n.useEffect(()=>{const S=document.activeElement,m=document.getElementById(r),N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!m)return[];const y=m.querySelectorAll(N.join(","));return Array.from(y).filter(x=>x.offsetParent!==null)},C=y=>{if(y.key==="Tab"){const x=$();if(x.length===0)return;const L=x[0],k=x[x.length-1];y.shiftKey?document.activeElement===L&&(y.preventDefault(),k.focus()):document.activeElement===k&&(y.preventDefault(),L.focus())}},E=y=>{y.key==="Escape"&&!b&&p(),C(y)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const y=$();y.length&&y[0].focus()},0),window.addEventListener("keydown",E)),()=>{document.body.style.overflow="",S&&S.focus(),window.removeEventListener("keydown",E)}},[v,b,p,r]),v?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 ${h}`,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:p,className:"text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:g}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),h=n.useCallback((d,f)=>{e(v=>({...v,[d]:!0})),f&&c(v=>({...v,[d]:f}))},[]),u=n.useCallback(d=>{e(f=>({...f,[d]:!1})),c(f=>{const v={...f};return delete v[d],v})},[]),b=n.useCallback(d=>!!t[d],[t]),i=n.useCallback(d=>o[d],[o]),s=n.useMemo(()=>({openModal:h,closeModal:u}),[h,u]),a=n.useMemo(()=>({isOpen:b,getModalData:i}),[b,i]);return l.jsx(V.Provider,{value:s,children:l.jsx(R.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=_(),{isOpen:o,getModalData:c}=B();return{open:h=>t(r,h),close:()=>e(r),isOpen:o(r),data:c(r)}}let F=null,H={};function Tr(r){F=r}function Ar(r){H={...H,...r}}function Dr(){return H}function _r(r,t,e=3e3,o){F?F(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return D({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 Fr=()=>"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)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,h,u)=>{const b=Fr();t(i=>[...i,{id:b,type:o,message:c,config:u}]),setTimeout(()=>{t(i=>i.filter(s=>s.id!==b))},h)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var i,s,a,d,f,v,g,p,S,m,N,$,C;const c=((i=o.config)==null?void 0:i.icon)||((s=e.icons)==null?void 0:s[o.type])||Wr(o.type),h=((a=o.config)==null?void 0:a.bgColor)||((f=(d=e.colors)==null?void 0:d[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",u=((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",b=((S=o.config)==null?void 0:S.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 ${h} ${u}`,children:[l.jsx("div",{className:b,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((m=o.config)==null?void 0:m.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((N=o.config)==null?void 0:N.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!(($=o.config)!=null&&$.title)&&!((C=o.config)!=null&&C.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(E=>E.filter(y=>y.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(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}w.Accordion=jr,w.Badge=Or,w.Button=ur,w.Checkbox=Q,w.Dropdown=Sr,w.Input=q,w.Modal=Pr,w.ModalProvider=Ir,w.Select=K,w.Toast=Hr,w.Tooltip=Nr,w.setToastDefaults=Ar,w.showToast=_r,w.useModalActions=_,w.useModalInstance=zr,w.useModalState=B,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
|
|
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 Z=document.createElement("style");Z.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(Z);const G={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"},q={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={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"},er={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"},tr=(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"}},K=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:S,feedbackType:x="invalid",labelClasses:$="",...N}=r,[C,L]=n.useState("default"),O=n.useCallback(j=>{const z=j.target.value,T=(h==null?void 0:h(z))??"default";L(T),u==null||u(j,T),f==null||f(j)},[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]),k=!!s,m=G[c]||G.md,E=q[d]||q.flat,M=n.useMemo(()=>tr(C,v,g),[C,v,g]),I=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),P=n.useMemo(()=>i?a==="start"||a==="left"?"ps-10":"pe-10":"",[i,a]);return l.jsxs("div",{className:`w-full relative ${k?"z-0":""} tailwind-ux-input`,children:[!k&&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"} ${$}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I} ${S}`,"aria-hidden":"true",children:i}),l.jsx("input",{...N,id:w,ref:t,placeholder:k?" ":N.placeholder,onChange:O,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
|
+
${m}
|
|
4
|
+
${k&&s&&or[s]}
|
|
5
|
+
${P} ${E} ${M} ${b}`}),k&&e&&s&&l.jsx("label",{htmlFor:w,className:`ms-1 ${er[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${x==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:x==="invalid"?"alert":void 0,children:p})]})});K.displayName="Input";const lr={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"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={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"},cr={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"},sr=(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"}},U=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:S="invalid",children:x,...$}=r,[N,C]=n.useState("default"),L=n.useId(),O=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:L),[o,e,L]),w=j=>{const z=j.target.value,T=(h==null?void 0:h(z))??"default";C(T),u==null||u(j,T),f==null||f(j)},k=!!s,m=lr[c],E=nr[d],M=sr(N,v,g),I=i&&(a==="start"||a==="left")?"ps-10":i?"pe-10":"",P=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${k?"z-0":""}`,children:[!k&&e&&l.jsx("label",{htmlFor:O,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 ${P}`,children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("select",{...$,id:O,ref:t,onChange:w,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
|
+
${m} ${I}
|
|
7
|
+
${k&&s&&ar[s]}
|
|
8
|
+
${E} ${M} ${b}`,children:x}),k&&e&&s&&l.jsx("label",{htmlFor:O,className:`ms-1 ${cr[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});U.displayName="Select";const ir={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"},dr={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"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({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",ir[t],dr[e],hr[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 X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=n.createContext&&n.createContext(X),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(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 gr(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 A(){return A=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},A.apply(this,arguments)}function J(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 D(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?J(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(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 Q(r){return r&&r.map((t,e)=>n.createElement(t.tag,D({key:e},t.attr),Q(t.child)))}function _(r){return t=>n.createElement(wr,A({attr:D({},r.attr)},t),Q(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:d}=r,h=fr(r,br),u=c||e.size||"1em",b;return e.className&&(b=e.className),r.className&&(b=(b?b+" ":"")+r.className),n.createElement("svg",A({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,h,{className:b,style:D(D({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 Y!==void 0?n.createElement(Y.Consumer,null,e=>t(e)):t(X)}function kr(r){return _({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 mr={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"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={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"},V=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=m=>{!d&&c&&c(m.target.checked),f.onChange&&f.onChange(m)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],x=xr[e],$=Cr[o]??"",N=o.startsWith("outline"),C=o.startsWith("soft"),w=`${p} ${S} ${x} ${$} ${s&&(N||C||o==="link")?"peer-checked:bg-current peer-checked:text-white":s?"peer-checked:bg-current":""}`,k={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:w.trim(),children:(s||f.defaultChecked)&&(i??l.jsx(kr,{className:`${k[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});V.displayName="Checkbox";const Sr=({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,S]=n.useState(!1),x=n.useRef(null),$=n.useRef(null),N=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),C=n.useCallback(()=>{const m=$.current,E=x.current;if(!m||!E)return;const{top:M,bottom:I}=m.getBoundingClientRect(),P=E.offsetHeight,j=window.innerHeight-I,z=M;S(j<P&&z>P)},[]),L=n.useCallback(m=>{var E,M;!((E=x.current)!=null&&E.contains(m.target))&&!((M=$.current)!=null&&M.contains(m.target))&&g(!1)},[]),O=n.useCallback(()=>g(m=>!m),[]),w=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[v,C]),n.useEffect(()=>(document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)),[L]);const k=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",N,b,a&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[p,N,b,a,u]);return l.jsxs("div",{className:`relative inline-block ${h}`,...f,children:[l.jsx("button",{type:"button",ref:$,onClick:O,"aria-expanded":v,"aria-label":s,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:x,role:"menu",className:k,children:[t&&t,e.map((m,E)=>{const M=()=>{o&&o(m),i&&w()};return l.jsx("div",{children:c?c(m,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:m.label})},E)})]})]})},$r=({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})]})},Nr={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"},Er={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"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({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 ${Nr[t]||""} ${Er[e]||""} ${Lr[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 Mr(r){return _({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 jr=({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),S=`accordion-heading-${g.id}`,x=`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:S,type:"button","aria-expanded":p,"aria-controls":x,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(Mr,{}):null]}),l.jsx("div",{id:x,role:"region","aria-labelledby":S,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)})})},R=n.createContext(null),B=()=>{const r=n.useContext(R);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},rr=n.createContext(null),F=()=>n.useContext(rr);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:d="",onClose:h,disableEscapeClose:u=!1,closeBtnStyle:b}){const i=F(),a=B(),s=!o&&!!i&&!!a,[f,v]=n.useState(!1),g=s?i.isOpen(r):f,p=s?i.getModalData(r):null,S=n.useCallback(()=>{s?a.closeModal(r):v(!1),h==null||h()},[s,a,r,h]);return n.useEffect(()=>{const x=document.activeElement,$=document.getElementById(r),N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],C=()=>{if(!$)return[];const w=$.querySelectorAll(N.join(","));return Array.from(w).filter(k=>k.offsetParent!==null)},L=w=>{if(w.key==="Tab"){const k=C();if(k.length===0)return;const m=k[0],E=k[k.length-1];w.shiftKey?document.activeElement===m&&(w.preventDefault(),E.focus()):document.activeElement===E&&(w.preventDefault(),m.focus())}},O=w=>{w.key==="Escape"&&!u&&S(),L(w)};return g&&(document.body.style.overflow="hidden",setTimeout(()=>{const w=C();w.length&&w[0].focus()},0),window.addEventListener("keydown",O)),()=>{document.body.style.overflow="",x&&x.focus(),window.removeEventListener("keydown",O)}},[g,u,S,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:S,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 Ir({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(R.Provider,{value:i,children:l.jsx(rr.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=B(),{isOpen:o,getModalData:c}=F();return{open:d=>t(r,d),close:()=>e(r),isOpen:o(r),data:c(r)}}let H=null,W={};function Tr(r){H=r}function Ar(r){W={...W,...r}}function Dr(){return W}function _r(r,t,e=3e3,o){H?H(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return _({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 Fr=()=>"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)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,d,h)=>{const u=Fr();t(b=>[...b,{id:u,type:o,message:c,config:h}]),setTimeout(()=>{t(b=>b.filter(i=>i.id!==u))},d)})},[]);const e=Dr();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,S,x,$,N,C;const c=((b=o.config)==null?void 0:b.icon)||((i=e.icons)==null?void 0:i[o.type])||Wr(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=((S=o.config)==null?void 0:S.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:[((x=o.config)==null?void 0:x.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),(($=o.config)==null?void 0:$.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!((N=o.config)!=null&&N.title)&&!((C=o.config)!=null&&C.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(L=>L.filter(O=>O.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(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=jr,y.Badge=Or,y.Button=ur,y.Checkbox=V,y.Dropdown=Sr,y.Input=K,y.Modal=Pr,y.ModalProvider=Ir,y.Select=U,y.Toast=Hr,y.Tooltip=$r,y.setToastDefaults=Ar,y.showToast=_r,y.useModalActions=B,y.useModalInstance=zr,y.useModalState=F,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|