tailwind-ux-kit 1.0.81 → 1.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Switch.d.ts +9 -4
- package/lib/components/Toggler/Toggler.d.ts +32 -0
- package/lib/components/modal/Modal.d.ts +3 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/tailwind-ux-kit.es.js +532 -407
- package/lib/tailwind-ux-kit.umd.js +15 -8
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as S, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import A, { forwardRef as oe, useState as D, useMemo as j, useId as be, useRef as F, useCallback as z, useEffect as R, createContext as ae, useContext as le } from "react";
|
|
4
4
|
const V = {
|
|
5
5
|
xs: "text-xs px-2 py-1",
|
|
6
6
|
sm: "text-sm px-3 py-1.5",
|
|
@@ -10,15 +10,15 @@ const V = {
|
|
|
10
10
|
flat: "rounded-none",
|
|
11
11
|
rounded: "rounded-sm",
|
|
12
12
|
pill: "rounded-full"
|
|
13
|
-
},
|
|
13
|
+
}, me = {
|
|
14
14
|
filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
|
|
15
15
|
outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
|
|
16
16
|
standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
|
|
17
|
-
},
|
|
17
|
+
}, xe = {
|
|
18
18
|
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",
|
|
19
19
|
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",
|
|
20
20
|
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"
|
|
21
|
-
},
|
|
21
|
+
}, he = (e, r, n) => {
|
|
22
22
|
if (n)
|
|
23
23
|
return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
|
|
24
24
|
if (r)
|
|
@@ -33,79 +33,79 @@ const V = {
|
|
|
33
33
|
default:
|
|
34
34
|
return "border-gray-300 focus:ring-blue-500";
|
|
35
35
|
}
|
|
36
|
-
},
|
|
36
|
+
}, ye = oe((e, r) => {
|
|
37
37
|
const {
|
|
38
38
|
label: n,
|
|
39
39
|
id: t,
|
|
40
|
-
inputSize:
|
|
41
|
-
shape:
|
|
42
|
-
validate:
|
|
40
|
+
inputSize: s = "md",
|
|
41
|
+
shape: d = "rounded",
|
|
42
|
+
validate: p,
|
|
43
43
|
onValidatedChange: u,
|
|
44
|
-
className:
|
|
45
|
-
icon:
|
|
46
|
-
iconPosition:
|
|
47
|
-
floatingLabelStyle:
|
|
48
|
-
onChange:
|
|
49
|
-
isValid:
|
|
50
|
-
isInvalid:
|
|
51
|
-
feedback:
|
|
44
|
+
className: c = "",
|
|
45
|
+
icon: a,
|
|
46
|
+
iconPosition: o = "left",
|
|
47
|
+
floatingLabelStyle: l,
|
|
48
|
+
onChange: f,
|
|
49
|
+
isValid: g,
|
|
50
|
+
isInvalid: b,
|
|
51
|
+
feedback: x,
|
|
52
52
|
iconClasses: k,
|
|
53
|
-
feedbackType:
|
|
54
|
-
labelClasses:
|
|
55
|
-
inputType:
|
|
53
|
+
feedbackType: $ = "invalid",
|
|
54
|
+
labelClasses: N = "",
|
|
55
|
+
inputType: w = "",
|
|
56
56
|
inputPattern: h,
|
|
57
57
|
...y
|
|
58
|
-
} = e, [
|
|
58
|
+
} = e, [v, I] = D("default"), E = A.useCallback(
|
|
59
59
|
(P) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const L = P.target.value, Z = (p == null ? void 0 : p(L)) ?? "default";
|
|
61
|
+
I(Z), u == null || u(P, Z), f == null || f(P);
|
|
62
62
|
},
|
|
63
|
-
[
|
|
64
|
-
),
|
|
65
|
-
() =>
|
|
66
|
-
[
|
|
67
|
-
),
|
|
68
|
-
var
|
|
69
|
-
const
|
|
70
|
-
!(P.ctrlKey || P.metaKey ||
|
|
71
|
-
const
|
|
72
|
-
switch (
|
|
63
|
+
[p, u, f]
|
|
64
|
+
), m = j(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!l, O = V[s] || V.md, M = ee[d] || ee.flat, B = j(
|
|
65
|
+
() => he(v, g, b),
|
|
66
|
+
[v, g, b]
|
|
67
|
+
), T = j(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = j(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]), K = (P) => {
|
|
68
|
+
var H;
|
|
69
|
+
const L = P.key;
|
|
70
|
+
!(P.ctrlKey || P.metaKey || L.length !== 1) && (() => {
|
|
71
|
+
const W = /^\d$/, X = /^[a-zA-Z]$/;
|
|
72
|
+
switch (w) {
|
|
73
73
|
case "numeric":
|
|
74
74
|
case "number":
|
|
75
75
|
case "integer":
|
|
76
|
-
return !
|
|
76
|
+
return !W.test(L);
|
|
77
77
|
case "decimal":
|
|
78
|
-
return !
|
|
78
|
+
return !W.test(L) && L !== "." && L !== "Backspace" && L !== "Tab";
|
|
79
79
|
case "alphabetic":
|
|
80
|
-
return !X.test(
|
|
80
|
+
return !X.test(L);
|
|
81
81
|
case "custom":
|
|
82
|
-
return h ? !h.test(
|
|
82
|
+
return h ? !h.test(L) : !1;
|
|
83
83
|
default:
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
})() && P.preventDefault(), (
|
|
87
|
-
},
|
|
88
|
-
var
|
|
89
|
-
const
|
|
86
|
+
})() && P.preventDefault(), (H = y.onKeyDown) == null || H.call(y, P);
|
|
87
|
+
}, ge = (P) => {
|
|
88
|
+
var U;
|
|
89
|
+
const L = P.clipboardData.getData("Text");
|
|
90
90
|
(() => {
|
|
91
|
-
const
|
|
92
|
-
switch (
|
|
91
|
+
const H = /^\d+$/, W = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
|
|
92
|
+
switch (w) {
|
|
93
93
|
case "numeric":
|
|
94
94
|
case "number":
|
|
95
95
|
case "integer":
|
|
96
|
-
return !
|
|
96
|
+
return !H.test(L);
|
|
97
97
|
case "decimal":
|
|
98
|
-
return !
|
|
98
|
+
return !W.test(L);
|
|
99
99
|
case "alphabetic":
|
|
100
|
-
return !X.test(
|
|
100
|
+
return !X.test(L);
|
|
101
101
|
case "custom":
|
|
102
|
-
return h ? !h.test(
|
|
102
|
+
return h ? !h.test(L) : !1;
|
|
103
103
|
default:
|
|
104
104
|
return !1;
|
|
105
105
|
}
|
|
106
|
-
})() && P.preventDefault(), (
|
|
106
|
+
})() && P.preventDefault(), (U = y.onPaste) == null || U.call(y, P);
|
|
107
107
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ S(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
111
|
className: `w-full relative ${C ? "z-0" : ""} tailwind-ux-input`,
|
|
@@ -113,76 +113,76 @@ const V = {
|
|
|
113
113
|
!C && n && /* @__PURE__ */ i(
|
|
114
114
|
"label",
|
|
115
115
|
{
|
|
116
|
-
htmlFor:
|
|
117
|
-
className: `block mb-1 text-sm ${
|
|
116
|
+
htmlFor: m,
|
|
117
|
+
className: `block mb-1 text-sm ${g ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${N}`,
|
|
118
118
|
children: n
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
121
|
+
/* @__PURE__ */ S("div", { className: "relative w-full", children: [
|
|
122
|
+
a && /* @__PURE__ */ i(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
|
-
className: `absolute inset-y-0 flex items-center ${
|
|
125
|
+
className: `absolute inset-y-0 flex items-center ${T} ${k}`,
|
|
126
126
|
"aria-hidden": "true",
|
|
127
|
-
children:
|
|
127
|
+
children: a
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
130
|
/* @__PURE__ */ i(
|
|
131
131
|
"input",
|
|
132
132
|
{
|
|
133
133
|
...y,
|
|
134
|
-
id:
|
|
134
|
+
id: m,
|
|
135
135
|
ref: r,
|
|
136
136
|
placeholder: C ? " " : y.placeholder,
|
|
137
|
-
onChange:
|
|
138
|
-
onKeyDown:
|
|
139
|
-
onPaste:
|
|
137
|
+
onChange: E,
|
|
138
|
+
onKeyDown: K,
|
|
139
|
+
onPaste: ge,
|
|
140
140
|
className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
|
|
141
|
-
${
|
|
142
|
-
${C &&
|
|
143
|
-
${
|
|
141
|
+
${O}
|
|
142
|
+
${C && l && me[l]}
|
|
143
|
+
${_} ${M} ${B} ${c}`
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
C && n &&
|
|
146
|
+
C && n && l && /* @__PURE__ */ i(
|
|
147
147
|
"label",
|
|
148
148
|
{
|
|
149
|
-
htmlFor:
|
|
150
|
-
className: `ms-1 ${
|
|
149
|
+
htmlFor: m,
|
|
150
|
+
className: `ms-1 ${xe[l]} ${c}`,
|
|
151
151
|
children: n
|
|
152
152
|
}
|
|
153
153
|
)
|
|
154
154
|
] }),
|
|
155
|
-
|
|
155
|
+
x && /* @__PURE__ */ i(
|
|
156
156
|
"p",
|
|
157
157
|
{
|
|
158
|
-
className: `mt-1 text-xs ${
|
|
159
|
-
role:
|
|
160
|
-
children:
|
|
158
|
+
className: `mt-1 text-xs ${$ === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
|
|
159
|
+
role: $ === "invalid" ? "alert" : void 0,
|
|
160
|
+
children: x
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
);
|
|
166
166
|
});
|
|
167
|
-
|
|
168
|
-
const
|
|
167
|
+
ye.displayName = "Input";
|
|
168
|
+
const we = {
|
|
169
169
|
xs: "text-xs px-2 py-1",
|
|
170
170
|
sm: "text-sm px-3 py-1.5",
|
|
171
171
|
md: "text-sm px-3 py-3",
|
|
172
172
|
lg: "text-lg px-5 py-3"
|
|
173
|
-
},
|
|
173
|
+
}, ve = {
|
|
174
174
|
flat: "rounded-none",
|
|
175
175
|
rounded: "rounded-sm",
|
|
176
176
|
pill: "rounded-full"
|
|
177
|
-
},
|
|
177
|
+
}, Ce = {
|
|
178
178
|
filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
|
|
179
179
|
outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
|
|
180
180
|
standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
|
|
181
|
-
},
|
|
181
|
+
}, $e = {
|
|
182
182
|
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",
|
|
183
183
|
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",
|
|
184
184
|
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"
|
|
185
|
-
},
|
|
185
|
+
}, ke = (e, r, n) => {
|
|
186
186
|
if (n)
|
|
187
187
|
return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
|
|
188
188
|
if (r)
|
|
@@ -198,80 +198,80 @@ const he = {
|
|
|
198
198
|
default:
|
|
199
199
|
return "border-gray-300 focus:ring-blue-500";
|
|
200
200
|
}
|
|
201
|
-
},
|
|
201
|
+
}, Se = oe((e, r) => {
|
|
202
202
|
const {
|
|
203
203
|
label: n,
|
|
204
204
|
id: t,
|
|
205
|
-
inputSize:
|
|
206
|
-
shape:
|
|
207
|
-
validate:
|
|
205
|
+
inputSize: s = "md",
|
|
206
|
+
shape: d = "rounded",
|
|
207
|
+
validate: p,
|
|
208
208
|
onValidatedChange: u,
|
|
209
|
-
className:
|
|
210
|
-
icon:
|
|
211
|
-
iconPosition:
|
|
212
|
-
floatingLabelStyle:
|
|
213
|
-
onChange:
|
|
214
|
-
isValid:
|
|
215
|
-
isInvalid:
|
|
216
|
-
feedback:
|
|
209
|
+
className: c = "",
|
|
210
|
+
icon: a,
|
|
211
|
+
iconPosition: o = "left",
|
|
212
|
+
floatingLabelStyle: l,
|
|
213
|
+
onChange: f,
|
|
214
|
+
isValid: g,
|
|
215
|
+
isInvalid: b,
|
|
216
|
+
feedback: x,
|
|
217
217
|
feedbackType: k = "invalid",
|
|
218
|
-
children:
|
|
219
|
-
...
|
|
220
|
-
} = e, [
|
|
221
|
-
const
|
|
222
|
-
h(
|
|
223
|
-
},
|
|
224
|
-
return /* @__PURE__ */
|
|
225
|
-
|
|
218
|
+
children: $,
|
|
219
|
+
...N
|
|
220
|
+
} = e, [w, h] = D("default"), y = be(), v = j(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : y), [t, n, y]), I = (T) => {
|
|
221
|
+
const _ = T.target.value, K = (p == null ? void 0 : p(_)) ?? "default";
|
|
222
|
+
h(K), u == null || u(T, K), f == null || f(T);
|
|
223
|
+
}, E = !!l, m = we[s], C = ve[d], O = ke(w, g, b);
|
|
224
|
+
return /* @__PURE__ */ S("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
|
|
225
|
+
!E && n && /* @__PURE__ */ i(
|
|
226
226
|
"label",
|
|
227
227
|
{
|
|
228
|
-
htmlFor:
|
|
229
|
-
className: `block mb-1 text-sm ${
|
|
228
|
+
htmlFor: v,
|
|
229
|
+
className: `block mb-1 text-sm ${g ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
|
|
230
230
|
children: n
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
|
|
233
|
+
/* @__PURE__ */ S("div", { className: "relative w-full", children: [
|
|
234
|
+
a && /* @__PURE__ */ i(
|
|
235
235
|
"div",
|
|
236
236
|
{
|
|
237
|
-
className: `absolute inset-y-0 flex items-center ${
|
|
238
|
-
children: /* @__PURE__ */ i("span", { className: "text-gray-500", children:
|
|
237
|
+
className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
|
|
238
|
+
children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: a })
|
|
239
239
|
}
|
|
240
240
|
),
|
|
241
241
|
/* @__PURE__ */ i(
|
|
242
242
|
"select",
|
|
243
243
|
{
|
|
244
|
-
...
|
|
245
|
-
id:
|
|
244
|
+
...N,
|
|
245
|
+
id: v,
|
|
246
246
|
ref: r,
|
|
247
|
-
onChange:
|
|
247
|
+
onChange: I,
|
|
248
248
|
className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
|
|
249
|
-
${
|
|
250
|
-
${
|
|
251
|
-
${C} ${
|
|
252
|
-
children:
|
|
249
|
+
${m} ${a && (o === "start" || o === "left") ? "ps-10" : a ? "pe-10" : ""}
|
|
250
|
+
${E && l && Ce[l]}
|
|
251
|
+
${C} ${O} ${c}`,
|
|
252
|
+
children: $
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
|
-
|
|
255
|
+
E && n && l && /* @__PURE__ */ i(
|
|
256
256
|
"label",
|
|
257
257
|
{
|
|
258
|
-
htmlFor:
|
|
259
|
-
className: `ms-1 ${
|
|
258
|
+
htmlFor: v,
|
|
259
|
+
className: `ms-1 ${$e[l]} ${c}`,
|
|
260
260
|
children: n
|
|
261
261
|
}
|
|
262
262
|
)
|
|
263
263
|
] }),
|
|
264
|
-
|
|
264
|
+
x && /* @__PURE__ */ i(
|
|
265
265
|
"p",
|
|
266
266
|
{
|
|
267
267
|
className: `mt-1 text-xs ${k === "invalid" ? "text-red-600" : "text-green-600"}`,
|
|
268
|
-
children:
|
|
268
|
+
children: x
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
] });
|
|
272
272
|
});
|
|
273
|
-
|
|
274
|
-
const
|
|
273
|
+
Se.displayName = "Select";
|
|
274
|
+
const Ne = {
|
|
275
275
|
primary: "btn-primary",
|
|
276
276
|
secondary: "btn-secondary",
|
|
277
277
|
success: "btn-success",
|
|
@@ -297,39 +297,39 @@ const $e = {
|
|
|
297
297
|
"soft-info": "btn-soft-info",
|
|
298
298
|
"soft-dark": "btn-soft-dark",
|
|
299
299
|
"soft-light": "btn-soft-light"
|
|
300
|
-
},
|
|
300
|
+
}, Ee = {
|
|
301
301
|
xs: "px-3 py-2 text-xs",
|
|
302
302
|
sm: "px-3 py-2 text-sm",
|
|
303
303
|
md: "px-5 py-2.5 text-sm",
|
|
304
304
|
lg: "px-5 py-3 text-base",
|
|
305
305
|
xl: "px-6 py-3.5 text-base"
|
|
306
|
-
},
|
|
306
|
+
}, Le = {
|
|
307
307
|
flat: "shadow-none",
|
|
308
308
|
rounded: "rounded-sm",
|
|
309
309
|
pill: "rounded-full",
|
|
310
310
|
circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
|
|
311
|
-
},
|
|
311
|
+
}, Qe = ({
|
|
312
312
|
children: e,
|
|
313
313
|
variant: r = "primary",
|
|
314
314
|
size: n = "md",
|
|
315
315
|
type: t = "button",
|
|
316
|
-
shape:
|
|
317
|
-
className:
|
|
318
|
-
isLoading:
|
|
316
|
+
shape: s = "rounded",
|
|
317
|
+
className: d = "",
|
|
318
|
+
isLoading: p = !1,
|
|
319
319
|
disabled: u = !1,
|
|
320
|
-
...
|
|
320
|
+
...c
|
|
321
321
|
}) => {
|
|
322
|
-
const
|
|
322
|
+
const a = u || p, o = [
|
|
323
323
|
"inline-flex items-center justify-center font-normal transition duration-150",
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
Ne[r],
|
|
325
|
+
Ee[n],
|
|
326
|
+
Le[s],
|
|
327
|
+
s === "flat" ? "shadow-none" : "shadow-sm",
|
|
328
|
+
a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
329
|
+
d
|
|
330
330
|
].filter(Boolean).join(" ");
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
|
|
331
|
+
return /* @__PURE__ */ S("button", { type: t, className: o, disabled: a, ...c, children: [
|
|
332
|
+
p && /* @__PURE__ */ S(
|
|
333
333
|
"svg",
|
|
334
334
|
{
|
|
335
335
|
"aria-hidden": "true",
|
|
@@ -359,24 +359,24 @@ const $e = {
|
|
|
359
359
|
e
|
|
360
360
|
] });
|
|
361
361
|
};
|
|
362
|
-
var
|
|
362
|
+
var ie = {
|
|
363
363
|
color: void 0,
|
|
364
364
|
size: void 0,
|
|
365
365
|
className: void 0,
|
|
366
366
|
style: void 0,
|
|
367
367
|
attr: void 0
|
|
368
|
-
}, te =
|
|
369
|
-
function
|
|
368
|
+
}, te = A.createContext && /* @__PURE__ */ A.createContext(ie), Oe = ["attr", "size", "title"];
|
|
369
|
+
function Pe(e, r) {
|
|
370
370
|
if (e == null) return {};
|
|
371
|
-
var n =
|
|
371
|
+
var n = Ie(e, r), t, s;
|
|
372
372
|
if (Object.getOwnPropertySymbols) {
|
|
373
|
-
var
|
|
374
|
-
for (
|
|
375
|
-
t =
|
|
373
|
+
var d = Object.getOwnPropertySymbols(e);
|
|
374
|
+
for (s = 0; s < d.length; s++)
|
|
375
|
+
t = d[s], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
|
|
376
376
|
}
|
|
377
377
|
return n;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Ie(e, r) {
|
|
380
380
|
if (e == null) return {};
|
|
381
381
|
var n = {};
|
|
382
382
|
for (var t in e)
|
|
@@ -400,31 +400,31 @@ function ne(e, r) {
|
|
|
400
400
|
var n = Object.keys(e);
|
|
401
401
|
if (Object.getOwnPropertySymbols) {
|
|
402
402
|
var t = Object.getOwnPropertySymbols(e);
|
|
403
|
-
r && (t = t.filter(function(
|
|
404
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
403
|
+
r && (t = t.filter(function(s) {
|
|
404
|
+
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
405
405
|
})), n.push.apply(n, t);
|
|
406
406
|
}
|
|
407
407
|
return n;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function q(e) {
|
|
410
410
|
for (var r = 1; r < arguments.length; r++) {
|
|
411
411
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
412
412
|
r % 2 ? ne(Object(n), !0).forEach(function(t) {
|
|
413
|
-
|
|
413
|
+
je(e, t, n[t]);
|
|
414
414
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ne(Object(n)).forEach(function(t) {
|
|
415
415
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return r =
|
|
420
|
+
function je(e, r, n) {
|
|
421
|
+
return r = ze(r), r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
var r =
|
|
423
|
+
function ze(e) {
|
|
424
|
+
var r = De(e, "string");
|
|
425
425
|
return typeof r == "symbol" ? r : r + "";
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function De(e, r) {
|
|
428
428
|
if (typeof e != "object" || !e) return e;
|
|
429
429
|
var n = e[Symbol.toPrimitive];
|
|
430
430
|
if (n !== void 0) {
|
|
@@ -434,52 +434,52 @@ function Ie(e, r) {
|
|
|
434
434
|
}
|
|
435
435
|
return (r === "string" ? String : Number)(e);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return e && e.map((r, n) => /* @__PURE__ */
|
|
437
|
+
function ce(e) {
|
|
438
|
+
return e && e.map((r, n) => /* @__PURE__ */ A.createElement(r.tag, q({
|
|
439
439
|
key: n
|
|
440
|
-
}, r.attr),
|
|
440
|
+
}, r.attr), ce(r.child)));
|
|
441
441
|
}
|
|
442
442
|
function Q(e) {
|
|
443
|
-
return (r) => /* @__PURE__ */
|
|
444
|
-
attr:
|
|
445
|
-
}, r),
|
|
443
|
+
return (r) => /* @__PURE__ */ A.createElement(Ae, G({
|
|
444
|
+
attr: q({}, e.attr)
|
|
445
|
+
}, r), ce(e.child));
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Ae(e) {
|
|
448
448
|
var r = (n) => {
|
|
449
449
|
var {
|
|
450
450
|
attr: t,
|
|
451
|
-
size:
|
|
452
|
-
title:
|
|
453
|
-
} = e,
|
|
454
|
-
return n.className && (
|
|
451
|
+
size: s,
|
|
452
|
+
title: d
|
|
453
|
+
} = e, p = Pe(e, Oe), u = s || n.size || "1em", c;
|
|
454
|
+
return n.className && (c = n.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", G({
|
|
455
455
|
stroke: "currentColor",
|
|
456
456
|
fill: "currentColor",
|
|
457
457
|
strokeWidth: "0"
|
|
458
|
-
}, n.attr, t,
|
|
459
|
-
className:
|
|
460
|
-
style:
|
|
458
|
+
}, n.attr, t, p, {
|
|
459
|
+
className: c,
|
|
460
|
+
style: q(q({
|
|
461
461
|
color: e.color || n.color
|
|
462
462
|
}, n.style), e.style),
|
|
463
463
|
height: u,
|
|
464
464
|
width: u,
|
|
465
465
|
xmlns: "http://www.w3.org/2000/svg"
|
|
466
|
-
}),
|
|
466
|
+
}), d && /* @__PURE__ */ A.createElement("title", null, d), e.children);
|
|
467
467
|
};
|
|
468
|
-
return te !== void 0 ? /* @__PURE__ */
|
|
468
|
+
return te !== void 0 ? /* @__PURE__ */ A.createElement(te.Consumer, null, (n) => r(n)) : r(ie);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Me(e) {
|
|
471
471
|
return Q({ 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);
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const Te = {
|
|
474
474
|
xs: "w-3 h-3 text-[10px]",
|
|
475
475
|
sm: "w-4 h-4 text-xs",
|
|
476
476
|
md: "w-5 h-5 text-sm",
|
|
477
477
|
lg: "w-6 h-6 text-base"
|
|
478
|
-
},
|
|
478
|
+
}, Re = {
|
|
479
479
|
flat: "rounded-none",
|
|
480
480
|
rounded: "rounded-sm",
|
|
481
481
|
pill: "rounded-full"
|
|
482
|
-
},
|
|
482
|
+
}, Be = {
|
|
483
483
|
primary: "primary",
|
|
484
484
|
secondary: "secondary",
|
|
485
485
|
success: "success",
|
|
@@ -505,156 +505,156 @@ const Ae = {
|
|
|
505
505
|
"soft-info": "soft-info",
|
|
506
506
|
"soft-dark": "soft-dark",
|
|
507
507
|
"soft-light": "soft-light"
|
|
508
|
-
},
|
|
508
|
+
}, _e = A.forwardRef(
|
|
509
509
|
({
|
|
510
510
|
label: e,
|
|
511
511
|
boxSize: r = "md",
|
|
512
512
|
shape: n = "rounded",
|
|
513
513
|
variant: t = "success",
|
|
514
|
-
onSelectionChange:
|
|
515
|
-
disabled:
|
|
516
|
-
className:
|
|
514
|
+
onSelectionChange: s,
|
|
515
|
+
disabled: d = !1,
|
|
516
|
+
className: p = "",
|
|
517
517
|
id: u,
|
|
518
|
-
value:
|
|
519
|
-
icon:
|
|
520
|
-
children:
|
|
521
|
-
checked:
|
|
522
|
-
...
|
|
523
|
-
},
|
|
524
|
-
const
|
|
525
|
-
!
|
|
526
|
-
},
|
|
518
|
+
value: c,
|
|
519
|
+
icon: a,
|
|
520
|
+
children: o,
|
|
521
|
+
checked: l,
|
|
522
|
+
...f
|
|
523
|
+
}, g) => {
|
|
524
|
+
const b = (m) => {
|
|
525
|
+
!d && s && s(m.target.checked), f.onChange && f.onChange(m);
|
|
526
|
+
}, x = "mr-2 border flex items-center justify-center transition-all", k = Te[r], $ = Re[n], N = Be[t] ?? "", w = t.startsWith("outline"), h = t.startsWith("soft"), I = `${x} ${k} ${$} ${N} ${l && (w || h || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, E = {
|
|
527
527
|
xs: "w-2 h-2",
|
|
528
528
|
sm: "w-2.5 h-2.5",
|
|
529
529
|
md: "w-3 h-3",
|
|
530
530
|
lg: "w-3.5 h-3.5"
|
|
531
531
|
};
|
|
532
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ S(
|
|
533
533
|
"label",
|
|
534
534
|
{
|
|
535
|
-
className: `flex items-center ${
|
|
535
|
+
className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${p}`,
|
|
536
536
|
children: [
|
|
537
537
|
/* @__PURE__ */ i(
|
|
538
538
|
"input",
|
|
539
539
|
{
|
|
540
540
|
type: "checkbox",
|
|
541
541
|
className: "peer hidden",
|
|
542
|
-
checked:
|
|
543
|
-
onChange:
|
|
544
|
-
disabled:
|
|
542
|
+
checked: l,
|
|
543
|
+
onChange: b,
|
|
544
|
+
disabled: d,
|
|
545
545
|
id: u,
|
|
546
|
-
value:
|
|
547
|
-
ref:
|
|
548
|
-
...
|
|
546
|
+
value: c,
|
|
547
|
+
ref: g,
|
|
548
|
+
...f
|
|
549
549
|
}
|
|
550
550
|
),
|
|
551
|
-
/* @__PURE__ */ i("span", { className:
|
|
552
|
-
e ||
|
|
551
|
+
/* @__PURE__ */ i("span", { className: I.trim(), children: (l || f.defaultChecked) && (a ?? /* @__PURE__ */ i(Me, { className: `${E[r]}` })) }),
|
|
552
|
+
e || o ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? o }) : null
|
|
553
553
|
]
|
|
554
554
|
}
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
557
|
);
|
|
558
|
-
|
|
559
|
-
const
|
|
558
|
+
_e.displayName = "Checkbox";
|
|
559
|
+
const Ve = ({
|
|
560
560
|
label: e,
|
|
561
561
|
header: r,
|
|
562
562
|
items: n = [],
|
|
563
563
|
onSelect: t,
|
|
564
|
-
renderItem:
|
|
565
|
-
position:
|
|
566
|
-
className:
|
|
564
|
+
renderItem: s,
|
|
565
|
+
position: d = "right",
|
|
566
|
+
className: p = "",
|
|
567
567
|
menuClassName: u = "",
|
|
568
|
-
width:
|
|
569
|
-
closeOnSelect:
|
|
570
|
-
transition:
|
|
571
|
-
ariaLabel:
|
|
572
|
-
...
|
|
568
|
+
width: c = "w-48",
|
|
569
|
+
closeOnSelect: a = !1,
|
|
570
|
+
transition: o = !0,
|
|
571
|
+
ariaLabel: l = "Dropdown menu",
|
|
572
|
+
...f
|
|
573
573
|
}) => {
|
|
574
|
-
const [
|
|
574
|
+
const [g, b] = D(!1), [x, k] = D(!1), $ = F(null), N = F(null), w = j(() => ({
|
|
575
575
|
left: "left-0",
|
|
576
576
|
center: "left-1/2 transform -translate-x-1/2",
|
|
577
577
|
right: "right-0"
|
|
578
|
-
})[
|
|
579
|
-
const
|
|
580
|
-
if (!
|
|
581
|
-
const { top:
|
|
582
|
-
k(
|
|
583
|
-
}, []), y = z((
|
|
584
|
-
var C,
|
|
585
|
-
!((C =
|
|
586
|
-
}, []),
|
|
587
|
-
|
|
588
|
-
if (
|
|
578
|
+
})[d], [d]), h = z(() => {
|
|
579
|
+
const m = N.current, C = $.current;
|
|
580
|
+
if (!m || !C) return;
|
|
581
|
+
const { top: O, bottom: M } = m.getBoundingClientRect(), B = C.offsetHeight, T = window.innerHeight - M, _ = O;
|
|
582
|
+
k(T < B && _ > B);
|
|
583
|
+
}, []), y = z((m) => {
|
|
584
|
+
var C, O;
|
|
585
|
+
!((C = $.current) != null && C.contains(m.target)) && !((O = N.current) != null && O.contains(m.target)) && b(!1);
|
|
586
|
+
}, []), v = z(() => b((m) => !m), []), I = z(() => b(!1), []);
|
|
587
|
+
R(() => {
|
|
588
|
+
if (g)
|
|
589
589
|
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
590
590
|
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
591
591
|
};
|
|
592
|
-
}, [
|
|
593
|
-
const
|
|
592
|
+
}, [g, h]), R(() => (document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y)), [y]);
|
|
593
|
+
const E = j(
|
|
594
594
|
() => [
|
|
595
595
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
596
|
+
x ? "bottom-full mb-2" : "top-full mt-2",
|
|
597
|
+
w,
|
|
598
|
+
c,
|
|
599
|
+
o && "transition-all duration-200 ease-out",
|
|
600
600
|
u
|
|
601
601
|
].filter(Boolean).join(" "),
|
|
602
|
-
[
|
|
602
|
+
[x, w, c, o, u]
|
|
603
603
|
);
|
|
604
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ S("div", { className: `relative inline-block ${p}`, ...f, children: [
|
|
605
605
|
/* @__PURE__ */ i(
|
|
606
606
|
"button",
|
|
607
607
|
{
|
|
608
608
|
type: "button",
|
|
609
|
-
ref:
|
|
610
|
-
onClick:
|
|
611
|
-
"aria-expanded":
|
|
612
|
-
"aria-label":
|
|
609
|
+
ref: N,
|
|
610
|
+
onClick: v,
|
|
611
|
+
"aria-expanded": g,
|
|
612
|
+
"aria-label": l,
|
|
613
613
|
className: "focus:outline-none",
|
|
614
614
|
children: e
|
|
615
615
|
}
|
|
616
616
|
),
|
|
617
|
-
|
|
617
|
+
g && /* @__PURE__ */ S("div", { ref: $, role: "menu", className: E, children: [
|
|
618
618
|
r && r,
|
|
619
|
-
n.map((
|
|
620
|
-
const
|
|
621
|
-
t && t(
|
|
619
|
+
n.map((m, C) => {
|
|
620
|
+
const O = () => {
|
|
621
|
+
t && t(m), a && I();
|
|
622
622
|
};
|
|
623
|
-
return /* @__PURE__ */ i("div", { children:
|
|
623
|
+
return /* @__PURE__ */ i("div", { children: s ? s(m, O) : /* @__PURE__ */ i(
|
|
624
624
|
"div",
|
|
625
625
|
{
|
|
626
|
-
onClick:
|
|
626
|
+
onClick: O,
|
|
627
627
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
628
628
|
role: "menuitem",
|
|
629
|
-
children:
|
|
629
|
+
children: m.label
|
|
630
630
|
}
|
|
631
631
|
) }, C);
|
|
632
632
|
})
|
|
633
633
|
] })
|
|
634
634
|
] });
|
|
635
|
-
},
|
|
635
|
+
}, et = ({
|
|
636
636
|
children: e,
|
|
637
637
|
content: r,
|
|
638
638
|
position: n = "top",
|
|
639
639
|
className: t = "",
|
|
640
|
-
tooltipClass:
|
|
641
|
-
tooltipStyle:
|
|
640
|
+
tooltipClass: s = "",
|
|
641
|
+
tooltipStyle: d = {}
|
|
642
642
|
}) => {
|
|
643
|
-
const
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
if (!
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
},
|
|
650
|
-
|
|
643
|
+
const p = F(null), u = F(null);
|
|
644
|
+
R(() => {
|
|
645
|
+
const a = p.current, o = u.current;
|
|
646
|
+
if (!a || !o) return;
|
|
647
|
+
const l = () => {
|
|
648
|
+
o.style.opacity = "1", o.style.visibility = "visible";
|
|
649
|
+
}, f = () => {
|
|
650
|
+
o.style.opacity = "0", o.style.visibility = "hidden";
|
|
651
651
|
};
|
|
652
|
-
return
|
|
653
|
-
|
|
652
|
+
return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", f), () => {
|
|
653
|
+
a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", f);
|
|
654
654
|
};
|
|
655
655
|
}, []);
|
|
656
|
-
const
|
|
657
|
-
const
|
|
656
|
+
const c = (a) => {
|
|
657
|
+
const o = {
|
|
658
658
|
position: "absolute",
|
|
659
659
|
opacity: 0,
|
|
660
660
|
visibility: "hidden",
|
|
@@ -671,10 +671,10 @@ const Je = ({
|
|
|
671
671
|
zIndex: 9999,
|
|
672
672
|
width: "max-content"
|
|
673
673
|
};
|
|
674
|
-
switch (
|
|
674
|
+
switch (a) {
|
|
675
675
|
case "top":
|
|
676
676
|
return {
|
|
677
|
-
...
|
|
677
|
+
...o,
|
|
678
678
|
bottom: "100%",
|
|
679
679
|
left: "50%",
|
|
680
680
|
transform: "translateX(-50%)",
|
|
@@ -682,7 +682,7 @@ const Je = ({
|
|
|
682
682
|
};
|
|
683
683
|
case "bottom":
|
|
684
684
|
return {
|
|
685
|
-
...
|
|
685
|
+
...o,
|
|
686
686
|
top: "100%",
|
|
687
687
|
left: "50%",
|
|
688
688
|
transform: "translateX(-50%)",
|
|
@@ -690,7 +690,7 @@ const Je = ({
|
|
|
690
690
|
};
|
|
691
691
|
case "left":
|
|
692
692
|
return {
|
|
693
|
-
...
|
|
693
|
+
...o,
|
|
694
694
|
right: "100%",
|
|
695
695
|
top: "50%",
|
|
696
696
|
transform: "translateY(-50%)",
|
|
@@ -698,33 +698,33 @@ const Je = ({
|
|
|
698
698
|
};
|
|
699
699
|
case "right":
|
|
700
700
|
return {
|
|
701
|
-
...
|
|
701
|
+
...o,
|
|
702
702
|
left: "100%",
|
|
703
703
|
top: "50%",
|
|
704
704
|
transform: "translateY(-50%)",
|
|
705
705
|
marginLeft: "8px"
|
|
706
706
|
};
|
|
707
707
|
default:
|
|
708
|
-
return
|
|
708
|
+
return o;
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ S("div", { ref: p, className: `relative inline-block ${t}`, children: [
|
|
712
712
|
e,
|
|
713
713
|
/* @__PURE__ */ i(
|
|
714
714
|
"div",
|
|
715
715
|
{
|
|
716
716
|
ref: u,
|
|
717
717
|
role: "tooltip",
|
|
718
|
-
className:
|
|
718
|
+
className: s,
|
|
719
719
|
style: {
|
|
720
|
-
...
|
|
721
|
-
...
|
|
720
|
+
...c(n),
|
|
721
|
+
...d
|
|
722
722
|
},
|
|
723
723
|
children: r
|
|
724
724
|
}
|
|
725
725
|
)
|
|
726
726
|
] });
|
|
727
|
-
},
|
|
727
|
+
}, Fe = {
|
|
728
728
|
primary: "bg-blue-500 text-white",
|
|
729
729
|
secondary: "bg-gray-500 text-white",
|
|
730
730
|
success: "bg-green-500 text-white",
|
|
@@ -742,64 +742,180 @@ const Je = ({
|
|
|
742
742
|
"outline-info": "border border-cyan-500 text-cyan-500 bg-transparent",
|
|
743
743
|
"outline-dark": "border border-black text-black bg-transparent",
|
|
744
744
|
"outline-light": "border border-gray-100 text-gray-800 bg-transparent"
|
|
745
|
-
},
|
|
745
|
+
}, Ke = {
|
|
746
746
|
xs: "text-xs px-2 py-0.5",
|
|
747
747
|
sm: "text-sm px-2.5 py-0.5",
|
|
748
748
|
md: "text-base px-3 py-1",
|
|
749
749
|
lg: "text-lg px-3.5 py-1.5",
|
|
750
750
|
xl: "text-xl px-4 py-2"
|
|
751
|
-
},
|
|
751
|
+
}, Ze = {
|
|
752
752
|
flat: "rounded-none",
|
|
753
753
|
rounded: "rounded-sm",
|
|
754
754
|
pill: "rounded-full",
|
|
755
755
|
circle: "rounded-full p-2 w-8 h-8 justify-center"
|
|
756
|
-
},
|
|
756
|
+
}, tt = ({
|
|
757
757
|
label: e,
|
|
758
758
|
variant: r = "primary",
|
|
759
759
|
size: n = "sm",
|
|
760
760
|
shape: t = "rounded",
|
|
761
|
-
icon:
|
|
762
|
-
dismissible:
|
|
763
|
-
onDismiss:
|
|
761
|
+
icon: s,
|
|
762
|
+
dismissible: d,
|
|
763
|
+
onDismiss: p,
|
|
764
764
|
className: u = "",
|
|
765
|
-
...
|
|
765
|
+
...c
|
|
766
766
|
}) => {
|
|
767
|
-
const
|
|
768
|
-
return /* @__PURE__ */
|
|
769
|
-
|
|
767
|
+
const a = !e && !!s, o = `inline-flex items-center font-medium ${Fe[r] || ""} ${Ke[n] || ""} ${Ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + u;
|
|
768
|
+
return /* @__PURE__ */ S("span", { className: o.trim(), ...c, children: [
|
|
769
|
+
s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
|
|
770
770
|
e,
|
|
771
|
-
|
|
771
|
+
d && /* @__PURE__ */ i(
|
|
772
772
|
"button",
|
|
773
773
|
{
|
|
774
774
|
type: "button",
|
|
775
|
-
onClick:
|
|
775
|
+
onClick: p,
|
|
776
776
|
className: "ml-2 text-xs font-bold leading-none focus:outline-none",
|
|
777
777
|
children: "×"
|
|
778
778
|
}
|
|
779
779
|
)
|
|
780
780
|
] });
|
|
781
|
+
}, re = {
|
|
782
|
+
rounded: "rounded-md",
|
|
783
|
+
pill: "rounded-full",
|
|
784
|
+
flat: "rounded-none"
|
|
785
|
+
}, se = {
|
|
786
|
+
xs: {
|
|
787
|
+
button: "px-2 py-1 text-xs"
|
|
788
|
+
},
|
|
789
|
+
sm: {
|
|
790
|
+
button: "px-3 py-1.5 text-sm"
|
|
791
|
+
},
|
|
792
|
+
md: {
|
|
793
|
+
button: "px-4 py-2 text-sm"
|
|
794
|
+
},
|
|
795
|
+
lg: {
|
|
796
|
+
button: "px-5 py-3 text-base"
|
|
797
|
+
},
|
|
798
|
+
xl: {
|
|
799
|
+
button: "px-6 py-4 text-lg"
|
|
800
|
+
}
|
|
781
801
|
};
|
|
782
|
-
function
|
|
802
|
+
function nt({
|
|
803
|
+
options: e,
|
|
804
|
+
selected: r,
|
|
805
|
+
onChange: n,
|
|
806
|
+
label: t,
|
|
807
|
+
disabled: s = !1,
|
|
808
|
+
shape: d = "rounded",
|
|
809
|
+
variant: p = "primary",
|
|
810
|
+
size: u = "md",
|
|
811
|
+
className: c = "",
|
|
812
|
+
classNames: a = {},
|
|
813
|
+
id: o,
|
|
814
|
+
name: l,
|
|
815
|
+
renderOption: f
|
|
816
|
+
}) {
|
|
817
|
+
const g = re[d] || re.rounded, b = se[u] || se.md, x = F(null), [k, $] = D({});
|
|
818
|
+
R(() => {
|
|
819
|
+
if (!x.current) return;
|
|
820
|
+
const w = e.findIndex((v) => v.value === r);
|
|
821
|
+
if (w === -1) return;
|
|
822
|
+
const y = x.current.querySelectorAll("button")[w];
|
|
823
|
+
if (y) {
|
|
824
|
+
const { offsetLeft: v, offsetWidth: I, offsetHeight: E } = y;
|
|
825
|
+
$({
|
|
826
|
+
transform: `translateX(${v}px)`,
|
|
827
|
+
width: I,
|
|
828
|
+
height: E
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}, [r, e, u]);
|
|
832
|
+
const N = `toggler-${p}`;
|
|
833
|
+
return /* @__PURE__ */ S(
|
|
834
|
+
"div",
|
|
835
|
+
{
|
|
836
|
+
className: `flex flex-col gap-2 w-fit ${c} ${a.root ?? ""}`,
|
|
837
|
+
id: o,
|
|
838
|
+
children: [
|
|
839
|
+
t && /* @__PURE__ */ i(
|
|
840
|
+
"span",
|
|
841
|
+
{
|
|
842
|
+
className: `text-sm font-medium select-none ${a.label ?? ""}`,
|
|
843
|
+
children: t
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
/* @__PURE__ */ S(
|
|
847
|
+
"div",
|
|
848
|
+
{
|
|
849
|
+
ref: x,
|
|
850
|
+
role: "radiogroup",
|
|
851
|
+
"aria-disabled": s,
|
|
852
|
+
className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${g} ${s ? "opacity-50 cursor-not-allowed" : ""} ${a.group ?? ""}`,
|
|
853
|
+
children: [
|
|
854
|
+
/* @__PURE__ */ i(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${g} ${N}`,
|
|
858
|
+
style: {
|
|
859
|
+
...k,
|
|
860
|
+
zIndex: 0
|
|
861
|
+
},
|
|
862
|
+
"aria-hidden": "true"
|
|
863
|
+
}
|
|
864
|
+
),
|
|
865
|
+
e.map((w) => {
|
|
866
|
+
const h = r === w.value, y = s || w.disabled;
|
|
867
|
+
return /* @__PURE__ */ i(
|
|
868
|
+
"button",
|
|
869
|
+
{
|
|
870
|
+
role: "radio",
|
|
871
|
+
name: l,
|
|
872
|
+
"aria-checked": h,
|
|
873
|
+
disabled: y,
|
|
874
|
+
onClick: () => !y && n(w.value),
|
|
875
|
+
onKeyDown: (v) => {
|
|
876
|
+
(v.key === "Enter" || v.key === " ") && !y && (v.preventDefault(), n(w.value));
|
|
877
|
+
},
|
|
878
|
+
className: `
|
|
879
|
+
relative z-10
|
|
880
|
+
transition-colors duration-200 focus:outline-none
|
|
881
|
+
${b.button}
|
|
882
|
+
${h ? `text-white toggler-text-${p}` : "text-gray-700 hover:bg-gray-200"}
|
|
883
|
+
${a.option ?? ""}
|
|
884
|
+
${h ? a.selectedOption ?? "" : ""}
|
|
885
|
+
`,
|
|
886
|
+
children: f ? f(w, h) : w.label
|
|
887
|
+
},
|
|
888
|
+
String(w.value)
|
|
889
|
+
);
|
|
890
|
+
})
|
|
891
|
+
]
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
function He(e) {
|
|
783
899
|
return Q({ 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);
|
|
784
900
|
}
|
|
785
|
-
const
|
|
901
|
+
const rt = ({
|
|
786
902
|
items: e,
|
|
787
903
|
allowMultipleOpen: r = !1,
|
|
788
904
|
className: n = "",
|
|
789
905
|
tileClasses: t = "",
|
|
790
|
-
open:
|
|
791
|
-
onChange:
|
|
792
|
-
renderTitle:
|
|
906
|
+
open: s,
|
|
907
|
+
onChange: d,
|
|
908
|
+
renderTitle: p,
|
|
793
909
|
renderContent: u,
|
|
794
|
-
showArrowIcon:
|
|
795
|
-
panelClasses:
|
|
910
|
+
showArrowIcon: c = !0,
|
|
911
|
+
panelClasses: a = ""
|
|
796
912
|
}) => {
|
|
797
|
-
const [
|
|
798
|
-
(
|
|
799
|
-
const
|
|
800
|
-
|
|
913
|
+
const [o, l] = D(/* @__PURE__ */ new Set()), f = j(() => s ? new Set(s) : o, [s, o]), g = z(
|
|
914
|
+
(b) => {
|
|
915
|
+
const x = new Set(f);
|
|
916
|
+
x.has(b) ? x.delete(b) : (r || x.clear(), x.add(b)), s && d ? d(Array.from(x)) : l(x);
|
|
801
917
|
},
|
|
802
|
-
[
|
|
918
|
+
[f, s, d, r]
|
|
803
919
|
);
|
|
804
920
|
return /* @__PURE__ */ i(
|
|
805
921
|
"div",
|
|
@@ -807,209 +923,217 @@ const et = ({
|
|
|
807
923
|
className: "accordion",
|
|
808
924
|
role: "region",
|
|
809
925
|
"aria-multiselectable": r,
|
|
810
|
-
children: e.map((
|
|
811
|
-
const
|
|
812
|
-
return /* @__PURE__ */
|
|
926
|
+
children: e.map((b) => {
|
|
927
|
+
const x = f.has(b.id), k = `accordion-heading-${b.id}`, $ = `accordion-panel-${b.id}`;
|
|
928
|
+
return /* @__PURE__ */ S(
|
|
813
929
|
"div",
|
|
814
930
|
{
|
|
815
931
|
className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${n}`,
|
|
816
932
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
933
|
+
/* @__PURE__ */ S(
|
|
818
934
|
"button",
|
|
819
935
|
{
|
|
820
936
|
id: k,
|
|
821
937
|
type: "button",
|
|
822
|
-
"aria-expanded":
|
|
823
|
-
"aria-controls":
|
|
824
|
-
onClick: () => b
|
|
938
|
+
"aria-expanded": x,
|
|
939
|
+
"aria-controls": $,
|
|
940
|
+
onClick: () => g(b.id),
|
|
825
941
|
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}`,
|
|
826
942
|
children: [
|
|
827
|
-
|
|
828
|
-
|
|
943
|
+
p ? p(b, x) : b.title,
|
|
944
|
+
c ? /* @__PURE__ */ i(He, {}) : null
|
|
829
945
|
]
|
|
830
946
|
}
|
|
831
947
|
),
|
|
832
948
|
/* @__PURE__ */ i(
|
|
833
949
|
"div",
|
|
834
950
|
{
|
|
835
|
-
id:
|
|
951
|
+
id: $,
|
|
836
952
|
role: "region",
|
|
837
953
|
"aria-labelledby": k,
|
|
838
|
-
hidden: !
|
|
839
|
-
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${
|
|
840
|
-
children: u ? u(
|
|
954
|
+
hidden: !x,
|
|
955
|
+
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
|
|
956
|
+
children: u ? u(b, x) : b.content
|
|
841
957
|
}
|
|
842
958
|
)
|
|
843
959
|
]
|
|
844
960
|
},
|
|
845
|
-
|
|
961
|
+
b.id
|
|
846
962
|
);
|
|
847
963
|
})
|
|
848
964
|
}
|
|
849
965
|
);
|
|
850
|
-
},
|
|
851
|
-
const e =
|
|
966
|
+
}, de = ae(null), ue = () => {
|
|
967
|
+
const e = le(de);
|
|
852
968
|
if (!e)
|
|
853
969
|
throw new Error(
|
|
854
970
|
"useModalActions must be used within a ModalActionProvider"
|
|
855
971
|
);
|
|
856
972
|
return e;
|
|
857
|
-
},
|
|
858
|
-
function
|
|
973
|
+
}, fe = ae(null), pe = () => le(fe);
|
|
974
|
+
function st({
|
|
859
975
|
id: e,
|
|
860
976
|
title: r,
|
|
861
977
|
children: n,
|
|
862
978
|
standalone: t = !1,
|
|
863
|
-
showFloatingClose:
|
|
864
|
-
containerClasses:
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
979
|
+
showFloatingClose: s = !1,
|
|
980
|
+
containerClasses: d = "",
|
|
981
|
+
headerClasses: p = "",
|
|
982
|
+
bodyClasses: u = "",
|
|
983
|
+
onClose: c,
|
|
984
|
+
disableEscapeClose: a = !1,
|
|
985
|
+
closeBtnStyle: o
|
|
868
986
|
}) {
|
|
869
|
-
const l =
|
|
870
|
-
|
|
871
|
-
}, [
|
|
872
|
-
return
|
|
873
|
-
const
|
|
987
|
+
const l = pe(), f = ue(), g = !t && !!l && !!f, [b, x] = D(!1), k = g ? l.isOpen(e) : b, $ = g ? l.getModalData(e) : null, N = z(() => {
|
|
988
|
+
g ? f.closeModal(e) : x(!1), c == null || c();
|
|
989
|
+
}, [g, f, e, c]);
|
|
990
|
+
return R(() => {
|
|
991
|
+
const w = document.activeElement, h = document.getElementById(e), y = [
|
|
874
992
|
"a[href]",
|
|
875
993
|
"button:not([disabled])",
|
|
876
994
|
"textarea:not([disabled])",
|
|
877
995
|
"input:not([disabled])",
|
|
878
996
|
"select:not([disabled])",
|
|
879
997
|
'[tabindex]:not([tabindex="-1"])'
|
|
880
|
-
],
|
|
881
|
-
if (!
|
|
882
|
-
const
|
|
883
|
-
|
|
998
|
+
], v = () => {
|
|
999
|
+
if (!h) return [];
|
|
1000
|
+
const m = h.querySelectorAll(
|
|
1001
|
+
y.join(",")
|
|
884
1002
|
);
|
|
885
|
-
return Array.from(
|
|
886
|
-
},
|
|
887
|
-
if (
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
|
|
1003
|
+
return Array.from(m).filter((C) => C.offsetParent !== null);
|
|
1004
|
+
}, I = (m) => {
|
|
1005
|
+
if (m.key === "Tab") {
|
|
1006
|
+
const C = v();
|
|
1007
|
+
if (C.length === 0) return;
|
|
1008
|
+
const O = C[0], M = C[C.length - 1];
|
|
1009
|
+
m.shiftKey ? document.activeElement === O && (m.preventDefault(), M.focus()) : document.activeElement === M && (m.preventDefault(), O.focus());
|
|
892
1010
|
}
|
|
893
|
-
},
|
|
894
|
-
|
|
1011
|
+
}, E = (m) => {
|
|
1012
|
+
m.key === "Escape" && !a && N(), I(m);
|
|
895
1013
|
};
|
|
896
|
-
return
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
}, 0), window.addEventListener("keydown",
|
|
900
|
-
document.body.style.overflow = "",
|
|
1014
|
+
return k && (document.body.style.overflow = "hidden", setTimeout(() => {
|
|
1015
|
+
const m = v();
|
|
1016
|
+
m.length && m[0].focus();
|
|
1017
|
+
}, 0), window.addEventListener("keydown", E)), () => {
|
|
1018
|
+
document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", E);
|
|
901
1019
|
};
|
|
902
|
-
}, [
|
|
1020
|
+
}, [k, a, N, e]), k ? /* @__PURE__ */ i(
|
|
903
1021
|
"div",
|
|
904
1022
|
{
|
|
905
1023
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
|
|
906
1024
|
id: e,
|
|
907
|
-
children: /* @__PURE__ */
|
|
1025
|
+
children: /* @__PURE__ */ S(
|
|
908
1026
|
"div",
|
|
909
1027
|
{
|
|
910
|
-
className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${
|
|
1028
|
+
className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
|
|
911
1029
|
children: [
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1030
|
+
/* @__PURE__ */ S(
|
|
1031
|
+
"div",
|
|
1032
|
+
{
|
|
1033
|
+
className: `flex justify-between items-center relative ${p}`,
|
|
1034
|
+
children: [
|
|
1035
|
+
r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
|
|
1036
|
+
s && /* @__PURE__ */ i(
|
|
1037
|
+
"button",
|
|
1038
|
+
{
|
|
1039
|
+
onClick: N,
|
|
1040
|
+
className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${o}`,
|
|
1041
|
+
"aria-label": "Close modal",
|
|
1042
|
+
children: "✕"
|
|
1043
|
+
}
|
|
1044
|
+
)
|
|
1045
|
+
]
|
|
1046
|
+
}
|
|
1047
|
+
),
|
|
1048
|
+
/* @__PURE__ */ i("div", { className: u, children: typeof n == "function" ? n({ modalData: $ }) : n })
|
|
925
1049
|
]
|
|
926
1050
|
}
|
|
927
1051
|
)
|
|
928
1052
|
}
|
|
929
1053
|
) : null;
|
|
930
1054
|
}
|
|
931
|
-
function
|
|
1055
|
+
function ot({
|
|
932
1056
|
children: e
|
|
933
1057
|
}) {
|
|
934
|
-
const [r, n] =
|
|
935
|
-
n((
|
|
936
|
-
}, []),
|
|
937
|
-
n((
|
|
938
|
-
const
|
|
939
|
-
return delete
|
|
1058
|
+
const [r, n] = D({}), [t, s] = D({}), d = z((l, f) => {
|
|
1059
|
+
n((g) => ({ ...g, [l]: !0 })), f && s((g) => ({ ...g, [l]: f }));
|
|
1060
|
+
}, []), p = z((l) => {
|
|
1061
|
+
n((f) => ({ ...f, [l]: !1 })), s((f) => {
|
|
1062
|
+
const g = { ...f };
|
|
1063
|
+
return delete g[l], g;
|
|
940
1064
|
});
|
|
941
|
-
}, []), u = z((
|
|
942
|
-
(
|
|
1065
|
+
}, []), u = z((l) => !!r[l], [r]), c = z(
|
|
1066
|
+
(l) => t[l],
|
|
943
1067
|
[t]
|
|
944
|
-
),
|
|
945
|
-
() => ({ openModal:
|
|
946
|
-
[
|
|
947
|
-
),
|
|
948
|
-
() => ({ isOpen: u, getModalData:
|
|
949
|
-
[u,
|
|
1068
|
+
), a = j(
|
|
1069
|
+
() => ({ openModal: d, closeModal: p }),
|
|
1070
|
+
[d, p]
|
|
1071
|
+
), o = j(
|
|
1072
|
+
() => ({ isOpen: u, getModalData: c }),
|
|
1073
|
+
[u, c]
|
|
950
1074
|
);
|
|
951
|
-
return /* @__PURE__ */ i(
|
|
1075
|
+
return /* @__PURE__ */ i(de.Provider, { value: a, children: /* @__PURE__ */ i(fe.Provider, { value: o, children: e }) });
|
|
952
1076
|
}
|
|
953
|
-
function
|
|
954
|
-
const { openModal: r, closeModal: n } =
|
|
1077
|
+
function at(e) {
|
|
1078
|
+
const { openModal: r, closeModal: n } = ue(), { isOpen: t, getModalData: s } = pe();
|
|
955
1079
|
return {
|
|
956
|
-
open: (
|
|
1080
|
+
open: (d) => r(e, d),
|
|
957
1081
|
close: () => n(e),
|
|
958
1082
|
isOpen: t(e),
|
|
959
|
-
data:
|
|
1083
|
+
data: s(e)
|
|
960
1084
|
};
|
|
961
1085
|
}
|
|
962
1086
|
let Y = null, J = {};
|
|
963
|
-
function
|
|
1087
|
+
function We(e) {
|
|
964
1088
|
Y = e;
|
|
965
1089
|
}
|
|
966
|
-
function
|
|
1090
|
+
function lt(e) {
|
|
967
1091
|
J = { ...J, ...e };
|
|
968
1092
|
}
|
|
969
|
-
function
|
|
1093
|
+
function Ge() {
|
|
970
1094
|
return J;
|
|
971
1095
|
}
|
|
972
|
-
function
|
|
1096
|
+
function it(e, r, n = 3e3, t) {
|
|
973
1097
|
Y ? Y(e, r, n, t) : console.warn("Toast system is not mounted");
|
|
974
1098
|
}
|
|
975
|
-
function
|
|
1099
|
+
function qe(e) {
|
|
976
1100
|
return Q({ 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);
|
|
977
1101
|
}
|
|
978
|
-
const
|
|
1102
|
+
const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
979
1103
|
const r = Math.random() * 16 | 0;
|
|
980
1104
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
981
|
-
}),
|
|
982
|
-
const [e, r] =
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
const u =
|
|
986
|
-
r((
|
|
987
|
-
r((
|
|
988
|
-
},
|
|
1105
|
+
}), ct = () => {
|
|
1106
|
+
const [e, r] = D([]);
|
|
1107
|
+
R(() => {
|
|
1108
|
+
We((t, s, d, p) => {
|
|
1109
|
+
const u = Ue();
|
|
1110
|
+
r((c) => [...c, { id: u, type: t, message: s, config: p }]), setTimeout(() => {
|
|
1111
|
+
r((c) => c.filter((a) => a.id !== u));
|
|
1112
|
+
}, d);
|
|
989
1113
|
});
|
|
990
1114
|
}, []);
|
|
991
|
-
const n =
|
|
1115
|
+
const n = Ge();
|
|
992
1116
|
return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
|
|
993
|
-
var
|
|
994
|
-
const
|
|
995
|
-
return /* @__PURE__ */
|
|
1117
|
+
var c, a, o, l, f, g, b, x, k, $, N, w, h;
|
|
1118
|
+
const s = ((c = t.config) == null ? void 0 : c.icon) || ((a = n.icons) == null ? void 0 : a[t.type]) || Xe(t.type), d = ((o = t.config) == null ? void 0 : o.bgColor) || ((f = (l = n.colors) == null ? void 0 : l[t.type]) == null ? void 0 : f.bg) || "bg-white dark:bg-gray-800", p = ((g = t.config) == null ? void 0 : g.textColor) || ((x = (b = n.colors) == null ? void 0 : b[t.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", u = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
|
|
1119
|
+
return /* @__PURE__ */ S(
|
|
996
1120
|
"div",
|
|
997
1121
|
{
|
|
998
|
-
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${
|
|
1122
|
+
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${p}`,
|
|
999
1123
|
children: [
|
|
1000
|
-
/* @__PURE__ */ i("div", { className: u, children:
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
((
|
|
1003
|
-
((
|
|
1004
|
-
!((
|
|
1124
|
+
/* @__PURE__ */ i("div", { className: u, children: s }),
|
|
1125
|
+
/* @__PURE__ */ S("div", { className: "flex-1 me-3", children: [
|
|
1126
|
+
(($ = t.config) == null ? void 0 : $.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
|
|
1127
|
+
((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
|
|
1128
|
+
!((w = t.config) != null && w.title) && !((h = t.config) != null && h.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
|
|
1005
1129
|
] }),
|
|
1006
1130
|
/* @__PURE__ */ i(
|
|
1007
1131
|
"button",
|
|
1008
1132
|
{
|
|
1009
|
-
onClick: () => r((y) => y.filter((
|
|
1133
|
+
onClick: () => r((y) => y.filter((v) => v.id !== t.id)),
|
|
1010
1134
|
className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
|
|
1011
1135
|
"aria-label": "Close",
|
|
1012
|
-
children: /* @__PURE__ */ i(
|
|
1136
|
+
children: /* @__PURE__ */ i(qe, { size: 18 })
|
|
1013
1137
|
}
|
|
1014
1138
|
)
|
|
1015
1139
|
]
|
|
@@ -1018,7 +1142,7 @@ const Ge = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1018
1142
|
);
|
|
1019
1143
|
}) });
|
|
1020
1144
|
};
|
|
1021
|
-
function
|
|
1145
|
+
function Xe(e) {
|
|
1022
1146
|
switch (e) {
|
|
1023
1147
|
case "success":
|
|
1024
1148
|
return "✅";
|
|
@@ -1031,20 +1155,21 @@ function Ue(e) {
|
|
|
1031
1155
|
}
|
|
1032
1156
|
}
|
|
1033
1157
|
export {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1158
|
+
rt as Accordion,
|
|
1159
|
+
tt as Badge,
|
|
1160
|
+
Qe as Button,
|
|
1161
|
+
_e as Checkbox,
|
|
1162
|
+
Ve as Dropdown,
|
|
1163
|
+
ye as Input,
|
|
1164
|
+
st as Modal,
|
|
1165
|
+
ot as ModalProvider,
|
|
1166
|
+
Se as Select,
|
|
1167
|
+
ct as Toast,
|
|
1168
|
+
nt as Toggler,
|
|
1169
|
+
et as Tooltip,
|
|
1170
|
+
lt as setToastDefaults,
|
|
1171
|
+
it as showToast,
|
|
1172
|
+
ue as useModalActions,
|
|
1173
|
+
at as useModalInstance,
|
|
1174
|
+
pe as useModalState
|
|
1050
1175
|
};
|