tailwind-ux-kit 1.0.103 → 1.0.106
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/modal/Modal.d.ts +3 -1
- package/lib/index.css +1 -1
- package/lib/tailwind-ux-kit.es.js +452 -401
- package/lib/tailwind-ux-kit.umd.js +49 -14
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as E, jsx as
|
|
3
|
-
import K, { forwardRef as ie, useState as z, useMemo as _, useId as he, useRef as F, useCallback as
|
|
4
|
-
import { createPortal as
|
|
2
|
+
import { jsxs as E, jsx as d, Fragment as me } from "react/jsx-runtime";
|
|
3
|
+
import K, { forwardRef as ie, useState as z, useMemo as _, useId as he, useRef as F, useCallback as I, useEffect as B, createContext as V, useContext as ee } from "react";
|
|
4
|
+
import { createPortal as ye } from "react-dom";
|
|
5
5
|
const ne = {
|
|
6
6
|
xs: "text-xs px-2 py-1",
|
|
7
7
|
sm: "text-sm px-3 py-1.5",
|
|
@@ -11,7 +11,7 @@ const ne = {
|
|
|
11
11
|
flat: "rounded-none",
|
|
12
12
|
rounded: "rounded-sm",
|
|
13
13
|
pill: "rounded-full"
|
|
14
|
-
},
|
|
14
|
+
}, xe = {
|
|
15
15
|
filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
|
|
16
16
|
outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
|
|
17
17
|
standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
|
|
@@ -39,38 +39,38 @@ const ne = {
|
|
|
39
39
|
label: t,
|
|
40
40
|
id: r,
|
|
41
41
|
inputSize: o = "md",
|
|
42
|
-
shape:
|
|
43
|
-
validate:
|
|
44
|
-
onValidatedChange:
|
|
45
|
-
className:
|
|
42
|
+
shape: u = "rounded",
|
|
43
|
+
validate: g,
|
|
44
|
+
onValidatedChange: c,
|
|
45
|
+
className: f = "",
|
|
46
46
|
icon: a,
|
|
47
47
|
iconPosition: s = "left",
|
|
48
48
|
floatingLabelStyle: l,
|
|
49
|
-
onChange:
|
|
50
|
-
isValid:
|
|
51
|
-
isInvalid:
|
|
49
|
+
onChange: i,
|
|
50
|
+
isValid: y,
|
|
51
|
+
isInvalid: p,
|
|
52
52
|
feedback: b,
|
|
53
|
-
iconClasses:
|
|
54
|
-
feedbackType:
|
|
55
|
-
labelClasses:
|
|
56
|
-
inputType:
|
|
57
|
-
inputPattern:
|
|
58
|
-
...
|
|
59
|
-
} = e, [
|
|
53
|
+
iconClasses: $,
|
|
54
|
+
feedbackType: C = "invalid",
|
|
55
|
+
labelClasses: O = "",
|
|
56
|
+
inputType: x = "",
|
|
57
|
+
inputPattern: v,
|
|
58
|
+
...h
|
|
59
|
+
} = e, [w, N] = z("default"), k = K.useCallback(
|
|
60
60
|
(M) => {
|
|
61
|
-
const A = M.target.value, Y = (
|
|
62
|
-
|
|
61
|
+
const A = M.target.value, Y = (g == null ? void 0 : g(A)) ?? "default";
|
|
62
|
+
N(Y), c == null || c(M, Y), i == null || i(M);
|
|
63
63
|
},
|
|
64
|
-
[
|
|
65
|
-
),
|
|
66
|
-
() => ve(
|
|
67
|
-
[
|
|
68
|
-
),
|
|
64
|
+
[g, c, i]
|
|
65
|
+
), P = _(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), j = !!l, m = ne[o] || ne.md, L = re[u] || re.flat, D = _(
|
|
66
|
+
() => ve(w, y, p),
|
|
67
|
+
[w, y, p]
|
|
68
|
+
), S = _(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), T = _(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]), R = (M) => {
|
|
69
69
|
var Z;
|
|
70
70
|
const A = M.key;
|
|
71
71
|
!(M.ctrlKey || M.metaKey || A.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(A)) && (() => {
|
|
72
72
|
const W = /^\d$/, X = /^[a-zA-Z]$/;
|
|
73
|
-
switch (
|
|
73
|
+
switch (x) {
|
|
74
74
|
case "numeric":
|
|
75
75
|
case "number":
|
|
76
76
|
case "integer":
|
|
@@ -80,17 +80,17 @@ const ne = {
|
|
|
80
80
|
case "alphabetic":
|
|
81
81
|
return !X.test(A);
|
|
82
82
|
case "custom":
|
|
83
|
-
return
|
|
83
|
+
return v ? !v.test(A) : !1;
|
|
84
84
|
default:
|
|
85
85
|
return !1;
|
|
86
86
|
}
|
|
87
|
-
})() && M.preventDefault(), (Z =
|
|
87
|
+
})() && M.preventDefault(), (Z = h.onKeyDown) == null || Z.call(h, M);
|
|
88
88
|
}, H = (M) => {
|
|
89
89
|
var q;
|
|
90
90
|
const A = M.clipboardData.getData("Text");
|
|
91
91
|
(() => {
|
|
92
92
|
const Z = /^\d+$/, W = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
|
|
93
|
-
switch (
|
|
93
|
+
switch (x) {
|
|
94
94
|
case "numeric":
|
|
95
95
|
case "number":
|
|
96
96
|
case "integer":
|
|
@@ -100,64 +100,64 @@ const ne = {
|
|
|
100
100
|
case "alphabetic":
|
|
101
101
|
return !X.test(A);
|
|
102
102
|
case "custom":
|
|
103
|
-
return
|
|
103
|
+
return v ? !v.test(A) : !1;
|
|
104
104
|
default:
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
|
-
})() && M.preventDefault(), (q =
|
|
107
|
+
})() && M.preventDefault(), (q = h.onPaste) == null || q.call(h, M);
|
|
108
108
|
};
|
|
109
109
|
return /* @__PURE__ */ E(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
className: `w-full relative ${
|
|
112
|
+
className: `w-full relative ${j ? "z-0" : ""} tailwind-ux-input`,
|
|
113
113
|
children: [
|
|
114
|
-
!
|
|
114
|
+
!j && t && /* @__PURE__ */ d(
|
|
115
115
|
"label",
|
|
116
116
|
{
|
|
117
|
-
htmlFor:
|
|
118
|
-
className: `block mb-1 text-sm ${
|
|
117
|
+
htmlFor: P,
|
|
118
|
+
className: `block mb-1 text-sm ${y ? "text-green-700 dark:text-green-500" : p ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${O}`,
|
|
119
119
|
children: t
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
122
|
/* @__PURE__ */ E("div", { className: "relative w-full", children: [
|
|
123
|
-
a && /* @__PURE__ */
|
|
123
|
+
a && /* @__PURE__ */ d(
|
|
124
124
|
"div",
|
|
125
125
|
{
|
|
126
|
-
className: `absolute inset-y-0 flex items-center ${
|
|
126
|
+
className: `absolute inset-y-0 flex items-center ${S} ${$}`,
|
|
127
127
|
"aria-hidden": "true",
|
|
128
128
|
children: a
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ d(
|
|
132
132
|
"input",
|
|
133
133
|
{
|
|
134
|
-
...
|
|
135
|
-
id:
|
|
134
|
+
...h,
|
|
135
|
+
id: P,
|
|
136
136
|
ref: n,
|
|
137
|
-
placeholder:
|
|
138
|
-
onChange:
|
|
137
|
+
placeholder: j ? " " : h.placeholder,
|
|
138
|
+
onChange: k,
|
|
139
139
|
onKeyDown: R,
|
|
140
140
|
onPaste: H,
|
|
141
141
|
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
|
|
142
|
-
${
|
|
143
|
-
${
|
|
144
|
-
${
|
|
142
|
+
${m}
|
|
143
|
+
${j && l && xe[l]}
|
|
144
|
+
${T} ${L} ${D} ${f}`
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
|
-
|
|
147
|
+
j && t && l && /* @__PURE__ */ d(
|
|
148
148
|
"label",
|
|
149
149
|
{
|
|
150
|
-
htmlFor:
|
|
151
|
-
className: `ms-1 ${we[l]} ${
|
|
150
|
+
htmlFor: P,
|
|
151
|
+
className: `ms-1 ${we[l]} ${f}`,
|
|
152
152
|
children: t
|
|
153
153
|
}
|
|
154
154
|
)
|
|
155
155
|
] }),
|
|
156
|
-
b && /* @__PURE__ */
|
|
156
|
+
b && /* @__PURE__ */ d(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
|
-
className: `mt-1 text-xs ${
|
|
160
|
-
role:
|
|
159
|
+
className: `mt-1 text-xs ${C === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
|
|
160
|
+
role: C === "invalid" ? "alert" : void 0,
|
|
161
161
|
children: b
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -183,7 +183,7 @@ const $e = {
|
|
|
183
183
|
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",
|
|
184
184
|
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",
|
|
185
185
|
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"
|
|
186
|
-
},
|
|
186
|
+
}, Le = (e, n, t) => {
|
|
187
187
|
if (t)
|
|
188
188
|
return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
|
|
189
189
|
if (n)
|
|
@@ -199,79 +199,79 @@ const $e = {
|
|
|
199
199
|
default:
|
|
200
200
|
return "border-gray-300 focus:ring-blue-500";
|
|
201
201
|
}
|
|
202
|
-
},
|
|
202
|
+
}, Ee = ie((e, n) => {
|
|
203
203
|
const {
|
|
204
204
|
label: t,
|
|
205
205
|
id: r,
|
|
206
206
|
inputSize: o = "md",
|
|
207
|
-
shape:
|
|
208
|
-
validate:
|
|
209
|
-
onValidatedChange:
|
|
210
|
-
className:
|
|
207
|
+
shape: u = "rounded",
|
|
208
|
+
validate: g,
|
|
209
|
+
onValidatedChange: c,
|
|
210
|
+
className: f = "",
|
|
211
211
|
icon: a,
|
|
212
212
|
iconPosition: s = "left",
|
|
213
213
|
floatingLabelStyle: l,
|
|
214
|
-
onChange:
|
|
215
|
-
isValid:
|
|
216
|
-
isInvalid:
|
|
214
|
+
onChange: i,
|
|
215
|
+
isValid: y,
|
|
216
|
+
isInvalid: p,
|
|
217
217
|
feedback: b,
|
|
218
|
-
feedbackType:
|
|
219
|
-
children:
|
|
220
|
-
...
|
|
221
|
-
} = e, [
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
return /* @__PURE__ */ E("div", { className: `w-full relative ${
|
|
226
|
-
!
|
|
218
|
+
feedbackType: $ = "invalid",
|
|
219
|
+
children: C,
|
|
220
|
+
...O
|
|
221
|
+
} = e, [x, v] = z("default"), h = he(), w = _(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : h), [r, t, h]), N = (S) => {
|
|
222
|
+
const T = S.target.value, R = (g == null ? void 0 : g(T)) ?? "default";
|
|
223
|
+
v(R), c == null || c(S, R), i == null || i(S);
|
|
224
|
+
}, k = !!l, P = $e[o], j = ke[u], m = Le(x, y, p);
|
|
225
|
+
return /* @__PURE__ */ E("div", { className: `w-full relative ${k ? "z-0" : ""}`, children: [
|
|
226
|
+
!k && t && /* @__PURE__ */ d(
|
|
227
227
|
"label",
|
|
228
228
|
{
|
|
229
|
-
htmlFor:
|
|
230
|
-
className: `block mb-1 text-sm ${
|
|
229
|
+
htmlFor: w,
|
|
230
|
+
className: `block mb-1 text-sm ${y ? "text-green-700" : p ? "text-red-700" : "text-gray-700"}`,
|
|
231
231
|
children: t
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
234
|
/* @__PURE__ */ E("div", { className: "relative w-full", children: [
|
|
235
|
-
a && /* @__PURE__ */
|
|
235
|
+
a && /* @__PURE__ */ d(
|
|
236
236
|
"div",
|
|
237
237
|
{
|
|
238
238
|
className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
|
|
239
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ d("span", { className: "text-gray-500", children: a })
|
|
240
240
|
}
|
|
241
241
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ d(
|
|
243
243
|
"select",
|
|
244
244
|
{
|
|
245
|
-
...
|
|
246
|
-
id:
|
|
245
|
+
...O,
|
|
246
|
+
id: w,
|
|
247
247
|
ref: n,
|
|
248
|
-
onChange:
|
|
248
|
+
onChange: N,
|
|
249
249
|
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
|
|
250
|
-
${
|
|
251
|
-
${
|
|
252
|
-
${
|
|
253
|
-
children:
|
|
250
|
+
${P} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
|
|
251
|
+
${k && l && Se[l]}
|
|
252
|
+
${j} ${m} ${f}`,
|
|
253
|
+
children: C
|
|
254
254
|
}
|
|
255
255
|
),
|
|
256
|
-
|
|
256
|
+
k && t && l && /* @__PURE__ */ d(
|
|
257
257
|
"label",
|
|
258
258
|
{
|
|
259
|
-
htmlFor:
|
|
260
|
-
className: `ms-1 ${Ne[l]} ${
|
|
259
|
+
htmlFor: w,
|
|
260
|
+
className: `ms-1 ${Ne[l]} ${f}`,
|
|
261
261
|
children: t
|
|
262
262
|
}
|
|
263
263
|
)
|
|
264
264
|
] }),
|
|
265
|
-
b && /* @__PURE__ */
|
|
265
|
+
b && /* @__PURE__ */ d(
|
|
266
266
|
"p",
|
|
267
267
|
{
|
|
268
|
-
className: `mt-1 text-xs ${
|
|
268
|
+
className: `mt-1 text-xs ${$ === "invalid" ? "text-red-600" : "text-green-600"}`,
|
|
269
269
|
children: b
|
|
270
270
|
}
|
|
271
271
|
)
|
|
272
272
|
] });
|
|
273
273
|
});
|
|
274
|
-
|
|
274
|
+
Ee.displayName = "Select";
|
|
275
275
|
const Pe = {
|
|
276
276
|
primary: "btn-primary",
|
|
277
277
|
secondary: "btn-secondary",
|
|
@@ -315,22 +315,22 @@ const Pe = {
|
|
|
315
315
|
size: t = "md",
|
|
316
316
|
type: r = "button",
|
|
317
317
|
shape: o = "rounded",
|
|
318
|
-
className:
|
|
319
|
-
isLoading:
|
|
320
|
-
disabled:
|
|
321
|
-
...
|
|
318
|
+
className: u = "",
|
|
319
|
+
isLoading: g = !1,
|
|
320
|
+
disabled: c = !1,
|
|
321
|
+
...f
|
|
322
322
|
}) => {
|
|
323
|
-
const a =
|
|
323
|
+
const a = c || g, s = [
|
|
324
324
|
"inline-flex items-center justify-center font-normal transition duration-150",
|
|
325
325
|
Pe[n],
|
|
326
326
|
Oe[t],
|
|
327
327
|
De[o],
|
|
328
328
|
o === "flat" ? "shadow-none" : "shadow-sm",
|
|
329
329
|
a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
330
|
-
|
|
330
|
+
u
|
|
331
331
|
].filter(Boolean).join(" ");
|
|
332
|
-
return /* @__PURE__ */ E("button", { type: r, className: s, disabled: a, ...
|
|
333
|
-
|
|
332
|
+
return /* @__PURE__ */ E("button", { type: r, className: s, disabled: a, ...f, children: [
|
|
333
|
+
g && /* @__PURE__ */ E(
|
|
334
334
|
"svg",
|
|
335
335
|
{
|
|
336
336
|
"aria-hidden": "true",
|
|
@@ -340,14 +340,14 @@ const Pe = {
|
|
|
340
340
|
fill: "none",
|
|
341
341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
342
342
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ d(
|
|
344
344
|
"path",
|
|
345
345
|
{
|
|
346
346
|
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",
|
|
347
347
|
fill: "currentColor"
|
|
348
348
|
}
|
|
349
349
|
),
|
|
350
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ d(
|
|
351
351
|
"path",
|
|
352
352
|
{
|
|
353
353
|
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",
|
|
@@ -367,17 +367,17 @@ var ce = {
|
|
|
367
367
|
style: void 0,
|
|
368
368
|
attr: void 0
|
|
369
369
|
}, oe = K.createContext && /* @__PURE__ */ K.createContext(ce), Ae = ["attr", "size", "title"];
|
|
370
|
-
function
|
|
370
|
+
function je(e, n) {
|
|
371
371
|
if (e == null) return {};
|
|
372
|
-
var t =
|
|
372
|
+
var t = Ie(e, n), r, o;
|
|
373
373
|
if (Object.getOwnPropertySymbols) {
|
|
374
|
-
var
|
|
375
|
-
for (o = 0; o <
|
|
376
|
-
r =
|
|
374
|
+
var u = Object.getOwnPropertySymbols(e);
|
|
375
|
+
for (o = 0; o < u.length; o++)
|
|
376
|
+
r = u[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
|
|
377
377
|
}
|
|
378
378
|
return t;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Ie(e, n) {
|
|
381
381
|
if (e == null) return {};
|
|
382
382
|
var t = {};
|
|
383
383
|
for (var r in e)
|
|
@@ -450,21 +450,21 @@ function Te(e) {
|
|
|
450
450
|
var {
|
|
451
451
|
attr: r,
|
|
452
452
|
size: o,
|
|
453
|
-
title:
|
|
454
|
-
} = e,
|
|
455
|
-
return t.className && (
|
|
453
|
+
title: u
|
|
454
|
+
} = e, g = je(e, Ae), c = o || t.size || "1em", f;
|
|
455
|
+
return t.className && (f = t.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ K.createElement("svg", G({
|
|
456
456
|
stroke: "currentColor",
|
|
457
457
|
fill: "currentColor",
|
|
458
458
|
strokeWidth: "0"
|
|
459
|
-
}, t.attr, r,
|
|
460
|
-
className:
|
|
459
|
+
}, t.attr, r, g, {
|
|
460
|
+
className: f,
|
|
461
461
|
style: U(U({
|
|
462
462
|
color: e.color || t.color
|
|
463
463
|
}, t.style), e.style),
|
|
464
|
-
height:
|
|
465
|
-
width:
|
|
464
|
+
height: c,
|
|
465
|
+
width: c,
|
|
466
466
|
xmlns: "http://www.w3.org/2000/svg"
|
|
467
|
-
}),
|
|
467
|
+
}), u && /* @__PURE__ */ K.createElement("title", null, u), e.children);
|
|
468
468
|
};
|
|
469
469
|
return oe !== void 0 ? /* @__PURE__ */ K.createElement(oe.Consumer, null, (t) => n(t)) : n(ce);
|
|
470
470
|
}
|
|
@@ -513,18 +513,18 @@ const _e = {
|
|
|
513
513
|
shape: t = "rounded",
|
|
514
514
|
variant: r = "success",
|
|
515
515
|
onSelectionChange: o,
|
|
516
|
-
disabled:
|
|
517
|
-
className:
|
|
518
|
-
id:
|
|
519
|
-
value:
|
|
516
|
+
disabled: u = !1,
|
|
517
|
+
className: g = "",
|
|
518
|
+
id: c,
|
|
519
|
+
value: f,
|
|
520
520
|
icon: a,
|
|
521
521
|
children: s,
|
|
522
522
|
checked: l,
|
|
523
|
-
...
|
|
524
|
-
},
|
|
525
|
-
const
|
|
526
|
-
!
|
|
527
|
-
}, b = "mr-2 border flex items-center justify-center transition-all",
|
|
523
|
+
...i
|
|
524
|
+
}, y) => {
|
|
525
|
+
const p = (P) => {
|
|
526
|
+
!u && o && o(P.target.checked), i.onChange && i.onChange(P);
|
|
527
|
+
}, b = "mr-2 border flex items-center justify-center transition-all", $ = _e[n], C = Fe[t], O = Ke[r] ?? "", x = r.startsWith("outline"), v = r.startsWith("soft"), N = `${b} ${$} ${C} ${O} ${l && (x || v || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, k = {
|
|
528
528
|
xs: "w-2 h-2",
|
|
529
529
|
sm: "w-2.5 h-2.5",
|
|
530
530
|
md: "w-3 h-3",
|
|
@@ -533,24 +533,24 @@ const _e = {
|
|
|
533
533
|
return /* @__PURE__ */ E(
|
|
534
534
|
"label",
|
|
535
535
|
{
|
|
536
|
-
className: `flex items-center ${
|
|
536
|
+
className: `flex items-center ${u ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${g}`,
|
|
537
537
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ d(
|
|
539
539
|
"input",
|
|
540
540
|
{
|
|
541
541
|
type: "checkbox",
|
|
542
542
|
className: "peer hidden",
|
|
543
543
|
checked: l,
|
|
544
|
-
onChange:
|
|
545
|
-
disabled:
|
|
546
|
-
id:
|
|
547
|
-
value:
|
|
548
|
-
ref:
|
|
549
|
-
...
|
|
544
|
+
onChange: p,
|
|
545
|
+
disabled: u,
|
|
546
|
+
id: c,
|
|
547
|
+
value: f,
|
|
548
|
+
ref: y,
|
|
549
|
+
...i
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
e || s ? /* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ d("span", { className: N.trim(), children: (l || i.defaultChecked) && (a ?? /* @__PURE__ */ d(Re, { className: `${k[n]}` })) }),
|
|
553
|
+
e || s ? /* @__PURE__ */ d("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
);
|
|
@@ -563,86 +563,86 @@ const ot = ({
|
|
|
563
563
|
items: t = [],
|
|
564
564
|
onSelect: r,
|
|
565
565
|
renderItem: o,
|
|
566
|
-
position:
|
|
567
|
-
className:
|
|
568
|
-
menuClassName:
|
|
569
|
-
width:
|
|
566
|
+
position: u = "right",
|
|
567
|
+
className: g = "",
|
|
568
|
+
menuClassName: c = "",
|
|
569
|
+
width: f = "w-48",
|
|
570
570
|
closeOnSelect: a = !1,
|
|
571
571
|
transition: s = !0,
|
|
572
572
|
ariaLabel: l = "Dropdown menu",
|
|
573
|
-
forceCloseDropdown:
|
|
574
|
-
...
|
|
573
|
+
forceCloseDropdown: i,
|
|
574
|
+
...y
|
|
575
575
|
}) => {
|
|
576
|
-
const [
|
|
576
|
+
const [p, b] = z(!1), [$, C] = z(!1), O = F(null), x = F(null), v = _(() => ({
|
|
577
577
|
left: "left-0",
|
|
578
578
|
center: "left-1/2 transform -translate-x-1/2",
|
|
579
579
|
right: "right-0"
|
|
580
|
-
})[
|
|
581
|
-
const
|
|
582
|
-
if (
|
|
583
|
-
const { top:
|
|
584
|
-
|
|
585
|
-
}, []),
|
|
586
|
-
var
|
|
587
|
-
!((
|
|
588
|
-
}, []),
|
|
589
|
-
|
|
590
|
-
if (
|
|
591
|
-
return
|
|
592
|
-
window.removeEventListener("resize",
|
|
580
|
+
})[u], [u]), h = I(() => {
|
|
581
|
+
const m = x.current, L = O.current;
|
|
582
|
+
if (!m || !L) return;
|
|
583
|
+
const { top: D, bottom: S } = m.getBoundingClientRect(), T = L.offsetHeight, R = window.innerHeight - S, H = D;
|
|
584
|
+
C(R < T && H > T);
|
|
585
|
+
}, []), w = I((m) => {
|
|
586
|
+
var L, D;
|
|
587
|
+
!((L = O.current) != null && L.contains(m.target)) && !((D = x.current) != null && D.contains(m.target)) && b(!1);
|
|
588
|
+
}, []), N = I(() => b((m) => !m), []), k = I(() => b(!1), []);
|
|
589
|
+
B(() => {
|
|
590
|
+
if (p)
|
|
591
|
+
return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
|
|
592
|
+
window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
593
593
|
};
|
|
594
|
-
}, [
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}, [
|
|
599
|
-
const
|
|
600
|
-
var
|
|
601
|
-
|
|
594
|
+
}, [p, h]);
|
|
595
|
+
const P = F(p);
|
|
596
|
+
B(() => {
|
|
597
|
+
P.current = p;
|
|
598
|
+
}, [p]), B(() => {
|
|
599
|
+
const m = (L) => {
|
|
600
|
+
var D;
|
|
601
|
+
L.key === "Escape" && P.current && (b(!1), (D = x.current) == null || D.focus());
|
|
602
602
|
};
|
|
603
|
-
return document.addEventListener("keydown",
|
|
604
|
-
document.removeEventListener("keydown",
|
|
603
|
+
return document.addEventListener("keydown", m), () => {
|
|
604
|
+
document.removeEventListener("keydown", m);
|
|
605
605
|
};
|
|
606
|
-
}, []),
|
|
607
|
-
const
|
|
606
|
+
}, []), B(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
|
|
607
|
+
const j = _(
|
|
608
608
|
() => [
|
|
609
609
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
$ ? "bottom-full mb-2" : "top-full mt-2",
|
|
611
|
+
v,
|
|
612
|
+
f,
|
|
613
613
|
s && "transition-all duration-200 ease-out",
|
|
614
|
-
|
|
614
|
+
c
|
|
615
615
|
].filter(Boolean).join(" "),
|
|
616
|
-
[
|
|
616
|
+
[$, v, f, s, c]
|
|
617
617
|
);
|
|
618
|
-
return /* @__PURE__ */ E("div", { className: `relative inline-block ${
|
|
619
|
-
/* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ E("div", { className: `relative inline-block ${g}`, ...y, children: [
|
|
619
|
+
/* @__PURE__ */ d(
|
|
620
620
|
"button",
|
|
621
621
|
{
|
|
622
622
|
type: "button",
|
|
623
|
-
ref:
|
|
624
|
-
onClick:
|
|
625
|
-
"aria-expanded":
|
|
623
|
+
ref: x,
|
|
624
|
+
onClick: N,
|
|
625
|
+
"aria-expanded": p,
|
|
626
626
|
"aria-label": l,
|
|
627
627
|
className: "focus:outline-none",
|
|
628
628
|
children: e
|
|
629
629
|
}
|
|
630
630
|
),
|
|
631
|
-
|
|
631
|
+
p && /* @__PURE__ */ E("div", { ref: O, role: "menu", className: j, children: [
|
|
632
632
|
n && n,
|
|
633
|
-
t.map((
|
|
634
|
-
const
|
|
635
|
-
r && r(
|
|
633
|
+
t.map((m, L) => {
|
|
634
|
+
const D = () => {
|
|
635
|
+
r && r(m), a && k();
|
|
636
636
|
};
|
|
637
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ d("div", { children: o ? o(m, D) : /* @__PURE__ */ d(
|
|
638
638
|
"div",
|
|
639
639
|
{
|
|
640
|
-
onClick:
|
|
640
|
+
onClick: D,
|
|
641
641
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
642
642
|
role: "menuitem",
|
|
643
|
-
children:
|
|
643
|
+
children: m.label
|
|
644
644
|
}
|
|
645
|
-
) },
|
|
645
|
+
) }, L);
|
|
646
646
|
})
|
|
647
647
|
] })
|
|
648
648
|
] });
|
|
@@ -652,22 +652,22 @@ const ot = ({
|
|
|
652
652
|
position: t = "top",
|
|
653
653
|
className: r = "",
|
|
654
654
|
tooltipClass: o = "",
|
|
655
|
-
tooltipStyle:
|
|
655
|
+
tooltipStyle: u = {}
|
|
656
656
|
}) => {
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
const a =
|
|
657
|
+
const g = F(null), c = F(null);
|
|
658
|
+
B(() => {
|
|
659
|
+
const a = g.current, s = c.current;
|
|
660
660
|
if (!a || !s) return;
|
|
661
661
|
const l = () => {
|
|
662
662
|
s.style.opacity = "1", s.style.visibility = "visible";
|
|
663
|
-
},
|
|
663
|
+
}, i = () => {
|
|
664
664
|
s.style.opacity = "0", s.style.visibility = "hidden";
|
|
665
665
|
};
|
|
666
|
-
return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave",
|
|
667
|
-
a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave",
|
|
666
|
+
return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", i), () => {
|
|
667
|
+
a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", i);
|
|
668
668
|
};
|
|
669
669
|
}, []);
|
|
670
|
-
const
|
|
670
|
+
const f = (a) => {
|
|
671
671
|
const s = {
|
|
672
672
|
position: "absolute",
|
|
673
673
|
opacity: 0,
|
|
@@ -722,17 +722,17 @@ const ot = ({
|
|
|
722
722
|
return s;
|
|
723
723
|
}
|
|
724
724
|
};
|
|
725
|
-
return /* @__PURE__ */ E("div", { ref:
|
|
725
|
+
return /* @__PURE__ */ E("div", { ref: g, className: `relative inline-block ${r}`, children: [
|
|
726
726
|
e,
|
|
727
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ d(
|
|
728
728
|
"div",
|
|
729
729
|
{
|
|
730
|
-
ref:
|
|
730
|
+
ref: c,
|
|
731
731
|
role: "tooltip",
|
|
732
732
|
className: o,
|
|
733
733
|
style: {
|
|
734
|
-
...
|
|
735
|
-
...
|
|
734
|
+
...f(t),
|
|
735
|
+
...u
|
|
736
736
|
},
|
|
737
737
|
children: n
|
|
738
738
|
}
|
|
@@ -773,20 +773,20 @@ const ot = ({
|
|
|
773
773
|
size: t = "sm",
|
|
774
774
|
shape: r = "rounded",
|
|
775
775
|
icon: o,
|
|
776
|
-
dismissible:
|
|
777
|
-
onDismiss:
|
|
778
|
-
className:
|
|
779
|
-
...
|
|
776
|
+
dismissible: u,
|
|
777
|
+
onDismiss: g,
|
|
778
|
+
className: c = "",
|
|
779
|
+
...f
|
|
780
780
|
}) => {
|
|
781
|
-
const a = !e && !!o, s = `inline-flex items-center font-medium ${Ye[n] || ""} ${Ze[t] || ""} ${We[r] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` +
|
|
782
|
-
return /* @__PURE__ */ E("span", { className: s.trim(), ...
|
|
783
|
-
o && /* @__PURE__ */
|
|
781
|
+
const a = !e && !!o, s = `inline-flex items-center font-medium ${Ye[n] || ""} ${Ze[t] || ""} ${We[r] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + c;
|
|
782
|
+
return /* @__PURE__ */ E("span", { className: s.trim(), ...f, children: [
|
|
783
|
+
o && /* @__PURE__ */ d("span", { className: e ? "mr-1" : "", children: o }),
|
|
784
784
|
e,
|
|
785
|
-
|
|
785
|
+
u && /* @__PURE__ */ d(
|
|
786
786
|
"button",
|
|
787
787
|
{
|
|
788
788
|
type: "button",
|
|
789
|
-
onClick:
|
|
789
|
+
onClick: g,
|
|
790
790
|
className: "ml-2 text-xs font-bold leading-none focus:outline-none",
|
|
791
791
|
children: "×"
|
|
792
792
|
}
|
|
@@ -819,38 +819,38 @@ function lt({
|
|
|
819
819
|
onChange: t,
|
|
820
820
|
label: r,
|
|
821
821
|
disabled: o = !1,
|
|
822
|
-
shape:
|
|
823
|
-
variant:
|
|
824
|
-
size:
|
|
825
|
-
className:
|
|
822
|
+
shape: u = "rounded",
|
|
823
|
+
variant: g = "primary",
|
|
824
|
+
size: c = "md",
|
|
825
|
+
className: f = "",
|
|
826
826
|
classNames: a = {},
|
|
827
827
|
id: s,
|
|
828
828
|
name: l,
|
|
829
|
-
renderOption:
|
|
829
|
+
renderOption: i
|
|
830
830
|
}) {
|
|
831
|
-
const
|
|
832
|
-
|
|
831
|
+
const y = ae[u] || ae.rounded, p = le[c] || le.md, b = F(null), [$, C] = z({});
|
|
832
|
+
B(() => {
|
|
833
833
|
if (!b.current) return;
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
838
|
-
const { offsetLeft:
|
|
839
|
-
|
|
840
|
-
transform: `translateX(${
|
|
841
|
-
width:
|
|
842
|
-
height:
|
|
834
|
+
const x = e.findIndex((w) => w.value === n);
|
|
835
|
+
if (x === -1) return;
|
|
836
|
+
const h = b.current.querySelectorAll("button")[x];
|
|
837
|
+
if (h) {
|
|
838
|
+
const { offsetLeft: w, offsetWidth: N, offsetHeight: k } = h;
|
|
839
|
+
C({
|
|
840
|
+
transform: `translateX(${w}px)`,
|
|
841
|
+
width: N,
|
|
842
|
+
height: k
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
|
-
}, [n, e,
|
|
846
|
-
const
|
|
845
|
+
}, [n, e, c]);
|
|
846
|
+
const O = `toggler-${g}`;
|
|
847
847
|
return /* @__PURE__ */ E(
|
|
848
848
|
"div",
|
|
849
849
|
{
|
|
850
|
-
className: `flex flex-col gap-2 w-fit ${
|
|
850
|
+
className: `flex flex-col gap-2 w-fit ${f} ${a.root ?? ""}`,
|
|
851
851
|
id: s,
|
|
852
852
|
children: [
|
|
853
|
-
r && /* @__PURE__ */
|
|
853
|
+
r && /* @__PURE__ */ d(
|
|
854
854
|
"span",
|
|
855
855
|
{
|
|
856
856
|
className: `text-sm font-medium select-none ${a.label ?? ""}`,
|
|
@@ -863,43 +863,43 @@ function lt({
|
|
|
863
863
|
ref: b,
|
|
864
864
|
role: "radiogroup",
|
|
865
865
|
"aria-disabled": o,
|
|
866
|
-
className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${
|
|
866
|
+
className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${y} ${o ? "opacity-50 cursor-not-allowed" : ""} ${a.group ?? ""}`,
|
|
867
867
|
children: [
|
|
868
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ d(
|
|
869
869
|
"div",
|
|
870
870
|
{
|
|
871
|
-
className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${
|
|
871
|
+
className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${y} ${O}`,
|
|
872
872
|
style: {
|
|
873
|
-
|
|
873
|
+
...$,
|
|
874
874
|
zIndex: 0
|
|
875
875
|
},
|
|
876
876
|
"aria-hidden": "true"
|
|
877
877
|
}
|
|
878
878
|
),
|
|
879
|
-
e.map((
|
|
880
|
-
const
|
|
881
|
-
return /* @__PURE__ */
|
|
879
|
+
e.map((x) => {
|
|
880
|
+
const v = n === x.value, h = o || x.disabled;
|
|
881
|
+
return /* @__PURE__ */ d(
|
|
882
882
|
"button",
|
|
883
883
|
{
|
|
884
884
|
role: "radio",
|
|
885
885
|
name: l,
|
|
886
|
-
"aria-checked":
|
|
887
|
-
disabled:
|
|
888
|
-
onClick: () => !
|
|
889
|
-
onKeyDown: (
|
|
890
|
-
(
|
|
886
|
+
"aria-checked": v,
|
|
887
|
+
disabled: h,
|
|
888
|
+
onClick: () => !h && t(x.value),
|
|
889
|
+
onKeyDown: (w) => {
|
|
890
|
+
(w.key === "Enter" || w.key === " ") && !h && (w.preventDefault(), t(x.value));
|
|
891
891
|
},
|
|
892
892
|
className: `
|
|
893
893
|
relative z-10
|
|
894
894
|
transition-colors duration-200 focus:outline-none
|
|
895
|
-
${
|
|
896
|
-
${
|
|
895
|
+
${p.button}
|
|
896
|
+
${v ? `text-white toggler-text-${g}` : "text-gray-700 hover:bg-gray-200"}
|
|
897
897
|
${a.option ?? ""}
|
|
898
|
-
${
|
|
898
|
+
${v ? a.selectedOption ?? "" : ""}
|
|
899
899
|
`,
|
|
900
|
-
children:
|
|
900
|
+
children: i ? i(x, v) : x.label
|
|
901
901
|
},
|
|
902
|
-
String(
|
|
902
|
+
String(x.value)
|
|
903
903
|
);
|
|
904
904
|
})
|
|
905
905
|
]
|
|
@@ -915,22 +915,22 @@ const ue = V(
|
|
|
915
915
|
function it({
|
|
916
916
|
children: e
|
|
917
917
|
}) {
|
|
918
|
-
const [n, t] = z([]), r =
|
|
919
|
-
t((
|
|
920
|
-
}, []), o =
|
|
921
|
-
t((
|
|
922
|
-
}, []),
|
|
918
|
+
const [n, t] = z([]), r = I((c) => {
|
|
919
|
+
t((f) => f.includes(c) ? f : [...f, c]);
|
|
920
|
+
}, []), o = I((c) => {
|
|
921
|
+
t((f) => f.filter((a) => a !== c));
|
|
922
|
+
}, []), u = I(() => {
|
|
923
923
|
t([]);
|
|
924
|
-
}, []),
|
|
924
|
+
}, []), g = _(
|
|
925
925
|
() => ({
|
|
926
926
|
showBottomSheet: r,
|
|
927
927
|
closeBottomSheet: o,
|
|
928
|
-
closeAllBottomSheet:
|
|
928
|
+
closeAllBottomSheet: u,
|
|
929
929
|
activeSheets: n
|
|
930
930
|
}),
|
|
931
|
-
[r, o,
|
|
931
|
+
[r, o, u, n]
|
|
932
932
|
);
|
|
933
|
-
return /* @__PURE__ */
|
|
933
|
+
return /* @__PURE__ */ d(ue.Provider, { value: g, children: e });
|
|
934
934
|
}
|
|
935
935
|
function Ge() {
|
|
936
936
|
const e = ee(ue);
|
|
@@ -944,93 +944,93 @@ function ct({
|
|
|
944
944
|
initialSnap: t = "half",
|
|
945
945
|
snapPoints: r,
|
|
946
946
|
className: o = "",
|
|
947
|
-
overlayClassName:
|
|
948
|
-
closeOnBackdrop:
|
|
949
|
-
lockScroll:
|
|
950
|
-
zIndex:
|
|
947
|
+
overlayClassName: u = "",
|
|
948
|
+
closeOnBackdrop: g = !0,
|
|
949
|
+
lockScroll: c = !0,
|
|
950
|
+
zIndex: f = 1e3
|
|
951
951
|
}) {
|
|
952
|
-
const { activeSheets: a, closeBottomSheet: s } = Ge(), l = a.includes(e),
|
|
953
|
-
(
|
|
954
|
-
if (
|
|
955
|
-
switch (
|
|
952
|
+
const { activeSheets: a, closeBottomSheet: s } = Ge(), l = a.includes(e), i = !!r, [y, p] = z(!1), [b, $] = z(100), [C, O] = z(!1), x = F(0), v = F(0), h = F(null), w = typeof window < "u" ? window.innerHeight : 0, N = r ? (1 - r.full) * 100 : 0, k = r ? (1 - r.half) * 100 : 0, P = I(
|
|
953
|
+
(S) => {
|
|
954
|
+
if (i)
|
|
955
|
+
switch (S) {
|
|
956
956
|
case "full":
|
|
957
|
-
|
|
957
|
+
$(N);
|
|
958
958
|
break;
|
|
959
959
|
case "half":
|
|
960
|
-
|
|
960
|
+
$(k);
|
|
961
961
|
break;
|
|
962
962
|
default:
|
|
963
|
-
|
|
963
|
+
$(100);
|
|
964
964
|
}
|
|
965
965
|
},
|
|
966
|
-
[
|
|
966
|
+
[N, k, i]
|
|
967
967
|
);
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}, []),
|
|
968
|
+
B(() => {
|
|
969
|
+
p(!0);
|
|
970
|
+
}, []), B(() => {
|
|
971
971
|
if (!l) {
|
|
972
|
-
|
|
972
|
+
$(100);
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
|
|
976
|
-
}, [l, t,
|
|
977
|
-
if (
|
|
975
|
+
i ? P(t) : $(0);
|
|
976
|
+
}, [l, t, P, i]), B(() => {
|
|
977
|
+
if (c)
|
|
978
978
|
return l ? (document.body.style.overflow = "hidden", document.body.style.touchAction = "none") : (document.body.style.overflow = "", document.body.style.touchAction = ""), () => {
|
|
979
979
|
document.body.style.overflow = "", document.body.style.touchAction = "";
|
|
980
980
|
};
|
|
981
|
-
}, [l,
|
|
981
|
+
}, [l, c]), B(() => {
|
|
982
982
|
if (!l) return;
|
|
983
|
-
const
|
|
984
|
-
|
|
983
|
+
const S = (T) => {
|
|
984
|
+
T.key === "Escape" && s(e);
|
|
985
985
|
};
|
|
986
|
-
return window.addEventListener("keydown",
|
|
987
|
-
window.removeEventListener("keydown",
|
|
986
|
+
return window.addEventListener("keydown", S), () => {
|
|
987
|
+
window.removeEventListener("keydown", S);
|
|
988
988
|
};
|
|
989
989
|
}, [s, e, l]);
|
|
990
|
-
const
|
|
991
|
-
var
|
|
992
|
-
|
|
993
|
-
},
|
|
994
|
-
if (!
|
|
995
|
-
const R = (
|
|
996
|
-
|
|
997
|
-
},
|
|
998
|
-
if (!
|
|
999
|
-
if (
|
|
990
|
+
const j = (S) => {
|
|
991
|
+
var T, R;
|
|
992
|
+
i && (O(!0), x.current = S.clientY, v.current = b, (R = (T = S.target).setPointerCapture) == null || R.call(T, S.pointerId));
|
|
993
|
+
}, m = (S) => {
|
|
994
|
+
if (!C || !i) return;
|
|
995
|
+
const R = (S.clientY - x.current) / w * 100, H = v.current + R;
|
|
996
|
+
$(Math.min(Math.max(H, N), 100));
|
|
997
|
+
}, L = () => {
|
|
998
|
+
if (!i) return;
|
|
999
|
+
if (O(!1), b > 75) {
|
|
1000
1000
|
s(e);
|
|
1001
1001
|
return;
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1004
|
-
b <=
|
|
1003
|
+
const S = (k + N) / 2;
|
|
1004
|
+
b <= S ? P("full") : P("half");
|
|
1005
1005
|
};
|
|
1006
|
-
if (!
|
|
1007
|
-
const
|
|
1006
|
+
if (!y) return null;
|
|
1007
|
+
const D = {
|
|
1008
1008
|
transform: `translate3d(0, ${b}%, 0)`,
|
|
1009
|
-
transition:
|
|
1009
|
+
transition: C ? "none" : "transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",
|
|
1010
1010
|
willChange: "transform",
|
|
1011
|
-
zIndex:
|
|
1011
|
+
zIndex: f,
|
|
1012
1012
|
// height: hasSnapPoints ? "92dvh" : `${contentHeight}px`,
|
|
1013
1013
|
maxHeight: "100dvh"
|
|
1014
1014
|
};
|
|
1015
|
-
return
|
|
1015
|
+
return ye(
|
|
1016
1016
|
/* @__PURE__ */ E(me, { children: [
|
|
1017
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ d(
|
|
1018
1018
|
"button",
|
|
1019
1019
|
{
|
|
1020
1020
|
type: "button",
|
|
1021
1021
|
"aria-label": "Close bottom sheet",
|
|
1022
1022
|
onClick: () => {
|
|
1023
|
-
|
|
1023
|
+
g && s(e);
|
|
1024
1024
|
},
|
|
1025
|
-
className: `fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${l ? "opacity-100" : "pointer-events-none opacity-0"} ${
|
|
1026
|
-
style: { zIndex:
|
|
1025
|
+
className: `fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${l ? "opacity-100" : "pointer-events-none opacity-0"} ${u}`,
|
|
1026
|
+
style: { zIndex: f }
|
|
1027
1027
|
}
|
|
1028
1028
|
),
|
|
1029
1029
|
/* @__PURE__ */ E(
|
|
1030
1030
|
"div",
|
|
1031
1031
|
{
|
|
1032
|
-
ref:
|
|
1033
|
-
style:
|
|
1032
|
+
ref: h,
|
|
1033
|
+
style: D,
|
|
1034
1034
|
className: `
|
|
1035
1035
|
fixed inset-x-0 bottom-0
|
|
1036
1036
|
rounded-t-3xl
|
|
@@ -1045,21 +1045,21 @@ function ct({
|
|
|
1045
1045
|
${o}
|
|
1046
1046
|
`,
|
|
1047
1047
|
children: [
|
|
1048
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ d(
|
|
1049
1049
|
"div",
|
|
1050
1050
|
{
|
|
1051
|
-
onPointerDown:
|
|
1052
|
-
onPointerMove:
|
|
1053
|
-
onPointerUp:
|
|
1051
|
+
onPointerDown: j,
|
|
1052
|
+
onPointerMove: m,
|
|
1053
|
+
onPointerUp: L,
|
|
1054
1054
|
className: `
|
|
1055
1055
|
flex justify-center py-2.5
|
|
1056
|
-
${
|
|
1056
|
+
${i ? "cursor-grab active:cursor-grabbing" : ""}
|
|
1057
1057
|
select-none touch-none bg-gray-50
|
|
1058
1058
|
`,
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1059
|
+
children: /* @__PURE__ */ d("div", { className: "h-1 w-14 rounded-full bg-gray-500" })
|
|
1060
1060
|
}
|
|
1061
1061
|
),
|
|
1062
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ d("div", { className: "flex-1 overflow-y-auto p-4", children: n })
|
|
1063
1063
|
]
|
|
1064
1064
|
}
|
|
1065
1065
|
)
|
|
@@ -1076,27 +1076,27 @@ const dt = ({
|
|
|
1076
1076
|
className: t = "",
|
|
1077
1077
|
tileClasses: r = "",
|
|
1078
1078
|
open: o,
|
|
1079
|
-
onChange:
|
|
1080
|
-
renderTitle:
|
|
1081
|
-
renderContent:
|
|
1082
|
-
showArrowIcon:
|
|
1079
|
+
onChange: u,
|
|
1080
|
+
renderTitle: g,
|
|
1081
|
+
renderContent: c,
|
|
1082
|
+
showArrowIcon: f = !0,
|
|
1083
1083
|
panelClasses: a = ""
|
|
1084
1084
|
}) => {
|
|
1085
|
-
const [s, l] = z(/* @__PURE__ */ new Set()),
|
|
1086
|
-
(
|
|
1087
|
-
const b = new Set(
|
|
1088
|
-
b.has(
|
|
1085
|
+
const [s, l] = z(/* @__PURE__ */ new Set()), i = _(() => o ? new Set(o) : s, [o, s]), y = I(
|
|
1086
|
+
(p) => {
|
|
1087
|
+
const b = new Set(i);
|
|
1088
|
+
b.has(p) ? b.delete(p) : (n || b.clear(), b.add(p)), o && u ? u(Array.from(b)) : l(b);
|
|
1089
1089
|
},
|
|
1090
|
-
[
|
|
1090
|
+
[i, o, u, n]
|
|
1091
1091
|
);
|
|
1092
|
-
return /* @__PURE__ */
|
|
1092
|
+
return /* @__PURE__ */ d(
|
|
1093
1093
|
"div",
|
|
1094
1094
|
{
|
|
1095
1095
|
className: "accordion",
|
|
1096
1096
|
role: "region",
|
|
1097
1097
|
"aria-multiselectable": n,
|
|
1098
|
-
children: e.map((
|
|
1099
|
-
const b =
|
|
1098
|
+
children: e.map((p) => {
|
|
1099
|
+
const b = i.has(p.id), $ = `accordion-heading-${p.id}`, C = `accordion-panel-${p.id}`;
|
|
1100
1100
|
return /* @__PURE__ */ E(
|
|
1101
1101
|
"div",
|
|
1102
1102
|
{
|
|
@@ -1105,32 +1105,32 @@ const dt = ({
|
|
|
1105
1105
|
/* @__PURE__ */ E(
|
|
1106
1106
|
"button",
|
|
1107
1107
|
{
|
|
1108
|
-
id:
|
|
1108
|
+
id: $,
|
|
1109
1109
|
type: "button",
|
|
1110
1110
|
"aria-expanded": b,
|
|
1111
|
-
"aria-controls":
|
|
1112
|
-
onClick: () =>
|
|
1111
|
+
"aria-controls": C,
|
|
1112
|
+
onClick: () => y(p.id),
|
|
1113
1113
|
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 ${r}`,
|
|
1114
1114
|
children: [
|
|
1115
|
-
|
|
1116
|
-
|
|
1115
|
+
g ? g(p, b) : p.title,
|
|
1116
|
+
f ? /* @__PURE__ */ d(Ue, {}) : null
|
|
1117
1117
|
]
|
|
1118
1118
|
}
|
|
1119
1119
|
),
|
|
1120
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ d(
|
|
1121
1121
|
"div",
|
|
1122
1122
|
{
|
|
1123
|
-
id:
|
|
1123
|
+
id: C,
|
|
1124
1124
|
role: "region",
|
|
1125
|
-
"aria-labelledby":
|
|
1125
|
+
"aria-labelledby": $,
|
|
1126
1126
|
hidden: !b,
|
|
1127
1127
|
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
|
|
1128
|
-
children:
|
|
1128
|
+
children: c ? c(p, b) : p.content
|
|
1129
1129
|
}
|
|
1130
1130
|
)
|
|
1131
1131
|
]
|
|
1132
1132
|
},
|
|
1133
|
-
|
|
1133
|
+
p.id
|
|
1134
1134
|
);
|
|
1135
1135
|
})
|
|
1136
1136
|
}
|
|
@@ -1145,81 +1145,132 @@ const dt = ({
|
|
|
1145
1145
|
}, ge = V(null), be = () => ee(ge);
|
|
1146
1146
|
function ut({
|
|
1147
1147
|
id: e,
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1148
|
+
variant: n = "center",
|
|
1149
|
+
title: t,
|
|
1150
|
+
children: r,
|
|
1151
|
+
standalone: o = !1,
|
|
1152
|
+
showFloatingClose: u = !1,
|
|
1153
|
+
containerClasses: g = "",
|
|
1154
|
+
headerClasses: c = "",
|
|
1155
|
+
bodyClasses: f = "",
|
|
1156
|
+
onClose: a,
|
|
1157
|
+
disableEscapeClose: s = !1,
|
|
1158
|
+
closeBtnStyle: l
|
|
1158
1159
|
}) {
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
}, [
|
|
1162
|
-
return
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1160
|
+
const i = be(), y = pe(), p = !o && !!i && !!y, [b, $] = z(!1), C = p ? i.isOpen(e) : b, O = p ? i.getModalData(e) : null, x = n === "bottom-sheet", v = I(() => {
|
|
1161
|
+
p ? y.closeModal(e) : $(!1), a == null || a();
|
|
1162
|
+
}, [p, y, e, a]), h = F(null);
|
|
1163
|
+
return B(() => {
|
|
1164
|
+
if (!C) return;
|
|
1165
|
+
const w = window.scrollY, N = {
|
|
1166
|
+
position: document.body.style.position,
|
|
1167
|
+
top: document.body.style.top,
|
|
1168
|
+
width: document.body.style.width
|
|
1169
|
+
};
|
|
1170
|
+
document.body.style.position = "fixed", document.body.style.top = `-${w}px`, document.body.style.width = "100%";
|
|
1171
|
+
const k = (P) => {
|
|
1172
|
+
P.preventDefault();
|
|
1173
|
+
};
|
|
1174
|
+
return document.addEventListener("touchmove", k, {
|
|
1175
|
+
passive: !1
|
|
1176
|
+
}), () => {
|
|
1177
|
+
document.body.style.position = N.position, document.body.style.top = N.top, document.body.style.width = N.width, document.removeEventListener("touchmove", k), window.scrollTo(0, w);
|
|
1178
|
+
};
|
|
1179
|
+
}, [C]), B(() => {
|
|
1180
|
+
C && (h.current = document.activeElement);
|
|
1181
|
+
const w = document.getElementById(e), N = [
|
|
1165
1182
|
"a[href]",
|
|
1166
1183
|
"button:not([disabled])",
|
|
1167
1184
|
"textarea:not([disabled])",
|
|
1168
1185
|
"input:not([disabled])",
|
|
1169
1186
|
"select:not([disabled])",
|
|
1170
1187
|
'[tabindex]:not([tabindex="-1"])'
|
|
1171
|
-
],
|
|
1172
|
-
if (!
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1188
|
+
], k = () => {
|
|
1189
|
+
if (!w) return [];
|
|
1190
|
+
const m = w.querySelectorAll(
|
|
1191
|
+
N.join(",")
|
|
1175
1192
|
);
|
|
1176
|
-
return Array.from(
|
|
1177
|
-
}, P = (
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
x.key === "Escape" && !a && S(), P(x);
|
|
1193
|
+
return Array.from(m).filter((L) => L.offsetParent !== null);
|
|
1194
|
+
}, P = (m) => {
|
|
1195
|
+
if (m.key !== "Tab") return;
|
|
1196
|
+
const L = k();
|
|
1197
|
+
if (!L.length) return;
|
|
1198
|
+
const D = L[0], S = L[L.length - 1];
|
|
1199
|
+
m.shiftKey ? document.activeElement === D && (m.preventDefault(), S.focus()) : document.activeElement === S && (m.preventDefault(), D.focus());
|
|
1200
|
+
}, j = (m) => {
|
|
1201
|
+
m.key === "Escape" && !s && v(), P(m);
|
|
1186
1202
|
};
|
|
1187
|
-
return
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
}, 0)
|
|
1191
|
-
var
|
|
1192
|
-
|
|
1203
|
+
return C && (window.addEventListener("keydown", j), setTimeout(() => {
|
|
1204
|
+
const m = k();
|
|
1205
|
+
m.length && m[0].focus();
|
|
1206
|
+
}, 0)), () => {
|
|
1207
|
+
var m;
|
|
1208
|
+
window.removeEventListener("keydown", j), (m = h.current) == null || m.focus();
|
|
1193
1209
|
};
|
|
1194
|
-
}, [
|
|
1210
|
+
}, [C, v, s, e]), C ? /* @__PURE__ */ d(
|
|
1195
1211
|
"div",
|
|
1196
1212
|
{
|
|
1197
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
|
|
1198
1213
|
id: e,
|
|
1214
|
+
className: `
|
|
1215
|
+
fixed inset-0 z-50
|
|
1216
|
+
bg-black/60 backdrop-blur-[2px]
|
|
1217
|
+
flex
|
|
1218
|
+
${x ? "items-end justify-center" : "items-center justify-center"}
|
|
1219
|
+
`,
|
|
1199
1220
|
children: /* @__PURE__ */ E(
|
|
1200
1221
|
"div",
|
|
1201
1222
|
{
|
|
1202
|
-
className: `
|
|
1223
|
+
className: `
|
|
1224
|
+
bg-white shadow-lg
|
|
1225
|
+
transform transition-all duration-300
|
|
1226
|
+
|
|
1227
|
+
${x ? `
|
|
1228
|
+
w-full
|
|
1229
|
+
rounded-t-3xl
|
|
1230
|
+
max-h-[92dvh]
|
|
1231
|
+
overflow-y-auto
|
|
1232
|
+
animate-slide-up
|
|
1233
|
+
p-4
|
|
1234
|
+
` : `
|
|
1235
|
+
w-full max-w-md
|
|
1236
|
+
rounded-lg
|
|
1237
|
+
p-4
|
|
1238
|
+
`}
|
|
1239
|
+
|
|
1240
|
+
${g}
|
|
1241
|
+
`,
|
|
1203
1242
|
children: [
|
|
1204
1243
|
/* @__PURE__ */ E(
|
|
1205
1244
|
"div",
|
|
1206
1245
|
{
|
|
1207
|
-
className: `
|
|
1246
|
+
className: `
|
|
1247
|
+
flex justify-between
|
|
1248
|
+
items-center relative
|
|
1249
|
+
${c}
|
|
1250
|
+
`,
|
|
1208
1251
|
children: [
|
|
1209
|
-
|
|
1210
|
-
|
|
1252
|
+
t && /* @__PURE__ */ d("h2", { className: "text-lg font-semibold", children: t }),
|
|
1253
|
+
u && /* @__PURE__ */ d(
|
|
1211
1254
|
"button",
|
|
1212
1255
|
{
|
|
1213
|
-
onClick:
|
|
1214
|
-
className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${s}`,
|
|
1256
|
+
onClick: v,
|
|
1215
1257
|
"aria-label": "Close modal",
|
|
1258
|
+
className: `
|
|
1259
|
+
text-gray-500 hover:text-black
|
|
1260
|
+
absolute top-0 right-3
|
|
1261
|
+
hover:bg-gray-200
|
|
1262
|
+
rounded-full
|
|
1263
|
+
w-8 aspect-square
|
|
1264
|
+
|
|
1265
|
+
${l}
|
|
1266
|
+
`,
|
|
1216
1267
|
children: "✕"
|
|
1217
1268
|
}
|
|
1218
1269
|
)
|
|
1219
1270
|
]
|
|
1220
1271
|
}
|
|
1221
1272
|
),
|
|
1222
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ d("div", { className: f, children: typeof r == "function" ? r({ modalData: O }) : r })
|
|
1223
1274
|
]
|
|
1224
1275
|
}
|
|
1225
1276
|
)
|
|
@@ -1229,29 +1280,29 @@ function ut({
|
|
|
1229
1280
|
function ft({
|
|
1230
1281
|
children: e
|
|
1231
1282
|
}) {
|
|
1232
|
-
const [n, t] = z({}), [r, o] = z({}),
|
|
1233
|
-
t((
|
|
1234
|
-
}, []),
|
|
1235
|
-
t((
|
|
1236
|
-
const
|
|
1237
|
-
return delete
|
|
1283
|
+
const [n, t] = z({}), [r, o] = z({}), u = I((l, i) => {
|
|
1284
|
+
t((y) => ({ ...y, [l]: !0 })), i && o((y) => ({ ...y, [l]: i }));
|
|
1285
|
+
}, []), g = I((l) => {
|
|
1286
|
+
t((i) => ({ ...i, [l]: !1 })), o((i) => {
|
|
1287
|
+
const y = { ...i };
|
|
1288
|
+
return delete y[l], y;
|
|
1238
1289
|
});
|
|
1239
|
-
}, []),
|
|
1290
|
+
}, []), c = I((l) => !!n[l], [n]), f = I(
|
|
1240
1291
|
(l) => r[l],
|
|
1241
1292
|
[r]
|
|
1242
1293
|
), a = _(
|
|
1243
|
-
() => ({ openModal:
|
|
1244
|
-
[
|
|
1294
|
+
() => ({ openModal: u, closeModal: g }),
|
|
1295
|
+
[u, g]
|
|
1245
1296
|
), s = _(
|
|
1246
|
-
() => ({ isOpen:
|
|
1247
|
-
[
|
|
1297
|
+
() => ({ isOpen: c, getModalData: f }),
|
|
1298
|
+
[c, f]
|
|
1248
1299
|
);
|
|
1249
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ d(fe.Provider, { value: a, children: /* @__PURE__ */ d(ge.Provider, { value: s, children: e }) });
|
|
1250
1301
|
}
|
|
1251
1302
|
function pt(e) {
|
|
1252
1303
|
const { openModal: n, closeModal: t } = pe(), { isOpen: r, getModalData: o } = be();
|
|
1253
1304
|
return {
|
|
1254
|
-
open: (
|
|
1305
|
+
open: (u) => n(e, u),
|
|
1255
1306
|
close: () => t(e),
|
|
1256
1307
|
isOpen: r(e),
|
|
1257
1308
|
data: o(e)
|
|
@@ -1278,51 +1329,51 @@ const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1278
1329
|
return (e === "x" ? n : n & 3 | 8).toString(16);
|
|
1279
1330
|
}), mt = ({ containerStyle: e = "" }) => {
|
|
1280
1331
|
const [n, t] = z([]);
|
|
1281
|
-
|
|
1282
|
-
qe((o,
|
|
1283
|
-
const
|
|
1284
|
-
t((a) => [...a, { id:
|
|
1285
|
-
t((a) => a.filter((s) => s.id !==
|
|
1286
|
-
},
|
|
1332
|
+
B(() => {
|
|
1333
|
+
qe((o, u, g, c) => {
|
|
1334
|
+
const f = Qe();
|
|
1335
|
+
t((a) => [...a, { id: f, type: o, message: u, config: c }]), setTimeout(() => {
|
|
1336
|
+
t((a) => a.filter((s) => s.id !== f));
|
|
1337
|
+
}, g);
|
|
1287
1338
|
});
|
|
1288
1339
|
}, []);
|
|
1289
1340
|
const r = Xe();
|
|
1290
|
-
return /* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ d(
|
|
1291
1342
|
"div",
|
|
1292
1343
|
{
|
|
1293
1344
|
className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
|
|
1294
1345
|
children: n.map((o) => {
|
|
1295
|
-
var a, s, l,
|
|
1296
|
-
const
|
|
1346
|
+
var a, s, l, i, y, p, b, $, C, O, x, v, h, w;
|
|
1347
|
+
const u = ((a = o.config) == null ? void 0 : a.icon) || ((s = r.icons) == null ? void 0 : s[o.type]) || Ve(o.type), g = ((l = o.config) == null ? void 0 : l.bgColor) || ((y = (i = r.colors) == null ? void 0 : i[o.type]) == null ? void 0 : y.bg) || "bg-white dark:bg-gray-800", c = ((p = o.config) == null ? void 0 : p.textColor) || (($ = (b = r.colors) == null ? void 0 : b[o.type]) == null ? void 0 : $.text) || "text-gray-700 dark:text-gray-300", f = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(C = o.config) == null ? void 0 : C.iconContainerClass}`;
|
|
1297
1348
|
return /* @__PURE__ */ E(
|
|
1298
1349
|
"div",
|
|
1299
1350
|
{
|
|
1300
|
-
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${
|
|
1351
|
+
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${c} ${(O = o.config) == null ? void 0 : O.containerBody}`,
|
|
1301
1352
|
children: [
|
|
1302
|
-
|
|
1353
|
+
u && /* @__PURE__ */ d("div", { className: f, children: u }),
|
|
1303
1354
|
/* @__PURE__ */ E("div", { className: "flex-1", children: [
|
|
1304
|
-
((
|
|
1355
|
+
((x = o.config) == null ? void 0 : x.title) && /* @__PURE__ */ d(
|
|
1305
1356
|
"div",
|
|
1306
1357
|
{
|
|
1307
|
-
className: `font-semibold text-black ${(
|
|
1358
|
+
className: `font-semibold text-black ${(v = o.config) == null ? void 0 : v.titleClass}`,
|
|
1308
1359
|
children: o.config.title
|
|
1309
1360
|
}
|
|
1310
1361
|
),
|
|
1311
|
-
((
|
|
1362
|
+
((h = o.config) == null ? void 0 : h.description) && /* @__PURE__ */ d(
|
|
1312
1363
|
"div",
|
|
1313
1364
|
{
|
|
1314
|
-
className: `text-sm text-gray-500 ${(
|
|
1365
|
+
className: `text-sm text-gray-500 ${(w = o.config) == null ? void 0 : w.subTitleClass}`,
|
|
1315
1366
|
children: o.config.description
|
|
1316
1367
|
}
|
|
1317
1368
|
)
|
|
1318
1369
|
] }),
|
|
1319
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ d(
|
|
1320
1371
|
"button",
|
|
1321
1372
|
{
|
|
1322
|
-
onClick: () => t((
|
|
1373
|
+
onClick: () => t((N) => N.filter((k) => k.id !== o.id)),
|
|
1323
1374
|
className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
|
|
1324
1375
|
"aria-label": "Close",
|
|
1325
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ d(Je, { size: 18 })
|
|
1326
1377
|
}
|
|
1327
1378
|
)
|
|
1328
1379
|
]
|
|
@@ -1356,7 +1407,7 @@ export {
|
|
|
1356
1407
|
Ce as Input,
|
|
1357
1408
|
ut as Modal,
|
|
1358
1409
|
ft as ModalProvider,
|
|
1359
|
-
|
|
1410
|
+
Ee as Select,
|
|
1360
1411
|
mt as Toast,
|
|
1361
1412
|
lt as Toggler,
|
|
1362
1413
|
st as Tooltip,
|