tailwind-ux-kit 1.0.110 → 1.0.113
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.
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
const
|
|
2
|
+
import { jsxs as O, jsx as c, Fragment as ye } from "react/jsx-runtime";
|
|
3
|
+
import _, { forwardRef as ie, useState as j, useMemo as A, useId as xe, useRef as R, useCallback as I, useEffect as M, memo as ce, useLayoutEffect as we, createContext as te, useContext as ne } from "react";
|
|
4
|
+
import { createPortal as ve } from "react-dom";
|
|
5
|
+
const oe = {
|
|
6
6
|
xs: "text-xs px-2 py-1",
|
|
7
7
|
sm: "text-sm px-3 py-1.5",
|
|
8
8
|
md: "text-sm px-3 py-3",
|
|
9
9
|
lg: "text-lg px-5 py-3"
|
|
10
|
-
},
|
|
10
|
+
}, se = {
|
|
11
11
|
flat: "rounded-none",
|
|
12
12
|
rounded: "rounded-sm",
|
|
13
13
|
pill: "rounded-full"
|
|
14
|
-
},
|
|
14
|
+
}, Ce = {
|
|
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"
|
|
18
|
-
},
|
|
18
|
+
}, $e = {
|
|
19
19
|
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",
|
|
20
20
|
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",
|
|
21
21
|
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"
|
|
22
|
-
},
|
|
22
|
+
}, ke = (e, n, t) => {
|
|
23
23
|
if (t)
|
|
24
24
|
return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
|
|
25
25
|
if (n)
|
|
@@ -34,156 +34,151 @@ const ne = {
|
|
|
34
34
|
default:
|
|
35
35
|
return "border-gray-300 focus:ring-blue-500";
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, Se = ie((e, n) => {
|
|
38
38
|
const {
|
|
39
39
|
label: t,
|
|
40
40
|
id: r,
|
|
41
41
|
inputSize: o = "md",
|
|
42
|
-
shape:
|
|
42
|
+
shape: l = "rounded",
|
|
43
43
|
validate: f,
|
|
44
|
-
onValidatedChange:
|
|
45
|
-
className:
|
|
46
|
-
icon:
|
|
47
|
-
iconPosition:
|
|
48
|
-
floatingLabelStyle:
|
|
49
|
-
onChange:
|
|
50
|
-
isValid:
|
|
51
|
-
isInvalid:
|
|
52
|
-
feedback:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
onValidatedChange: d,
|
|
45
|
+
className: p = "",
|
|
46
|
+
icon: s,
|
|
47
|
+
iconPosition: a = "left",
|
|
48
|
+
floatingLabelStyle: u,
|
|
49
|
+
onChange: g,
|
|
50
|
+
isValid: b,
|
|
51
|
+
isInvalid: i,
|
|
52
|
+
feedback: x,
|
|
53
|
+
feedbackType: E = "invalid",
|
|
54
|
+
labelClasses: w = "",
|
|
55
|
+
inputType: $ = "",
|
|
56
|
+
inputPattern: k,
|
|
57
|
+
leftIcon: y,
|
|
58
|
+
rightIcon: v,
|
|
59
|
+
...h
|
|
60
|
+
} = e, [D, N] = j("default"), B = _.useCallback(
|
|
61
|
+
(C) => {
|
|
62
|
+
const L = C.target.value, H = (f == null ? void 0 : f(L)) ?? "default";
|
|
63
|
+
N(H), d == null || d(C, H), g == null || g(C);
|
|
63
64
|
},
|
|
64
|
-
[f,
|
|
65
|
-
),
|
|
66
|
-
() =>
|
|
67
|
-
[
|
|
68
|
-
),
|
|
65
|
+
[f, d, g]
|
|
66
|
+
), T = A(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), m = !!u, S = oe[o] || oe.md, P = se[l] || se.flat, z = A(
|
|
67
|
+
() => ke(D, b, i),
|
|
68
|
+
[D, b, i]
|
|
69
|
+
), F = A(() => s ? a === "start" || a === "left" ? "ps-10" : "pe-10" : "", [s, a]), K = (C) => {
|
|
69
70
|
var Z;
|
|
70
|
-
const
|
|
71
|
-
!(
|
|
72
|
-
const W = /^\d$/,
|
|
73
|
-
switch (
|
|
71
|
+
const L = C.key;
|
|
72
|
+
!(C.ctrlKey || C.metaKey || L.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(L)) && (() => {
|
|
73
|
+
const W = /^\d$/, Q = /^[a-zA-Z]$/;
|
|
74
|
+
switch ($) {
|
|
74
75
|
case "numeric":
|
|
75
76
|
case "number":
|
|
76
77
|
case "integer":
|
|
77
|
-
return !W.test(
|
|
78
|
+
return !W.test(L);
|
|
78
79
|
case "decimal":
|
|
79
|
-
return !W.test(
|
|
80
|
+
return !W.test(L) && L !== "." && L !== "Backspace" && L !== "Tab";
|
|
80
81
|
case "alphabetic":
|
|
81
|
-
return !
|
|
82
|
+
return !Q.test(L);
|
|
82
83
|
case "custom":
|
|
83
|
-
return
|
|
84
|
+
return k ? !k.test(L) : !1;
|
|
84
85
|
default:
|
|
85
86
|
return !1;
|
|
86
87
|
}
|
|
87
|
-
})() &&
|
|
88
|
-
},
|
|
89
|
-
var
|
|
90
|
-
const
|
|
88
|
+
})() && C.preventDefault(), (Z = h.onKeyDown) == null || Z.call(h, C);
|
|
89
|
+
}, Y = (C) => {
|
|
90
|
+
var G;
|
|
91
|
+
const L = C.clipboardData.getData("Text");
|
|
91
92
|
(() => {
|
|
92
|
-
const Z = /^\d+$/, W = /^\d*\.?\d*$/,
|
|
93
|
-
switch (
|
|
93
|
+
const Z = /^\d+$/, W = /^\d*\.?\d*$/, Q = /^[a-zA-Z]+$/;
|
|
94
|
+
switch ($) {
|
|
94
95
|
case "numeric":
|
|
95
96
|
case "number":
|
|
96
97
|
case "integer":
|
|
97
|
-
return !Z.test(
|
|
98
|
+
return !Z.test(L);
|
|
98
99
|
case "decimal":
|
|
99
|
-
return !W.test(
|
|
100
|
+
return !W.test(L);
|
|
100
101
|
case "alphabetic":
|
|
101
|
-
return !
|
|
102
|
+
return !Q.test(L);
|
|
102
103
|
case "custom":
|
|
103
|
-
return
|
|
104
|
+
return k ? !k.test(L) : !1;
|
|
104
105
|
default:
|
|
105
106
|
return !1;
|
|
106
107
|
}
|
|
107
|
-
})() &&
|
|
108
|
-
};
|
|
109
|
-
return /* @__PURE__ */
|
|
108
|
+
})() && C.preventDefault(), (G = h.onPaste) == null || G.call(h, C);
|
|
109
|
+
}, q = !!y, J = !!v;
|
|
110
|
+
return /* @__PURE__ */ O(
|
|
110
111
|
"div",
|
|
111
112
|
{
|
|
112
|
-
className: `w-full relative ${
|
|
113
|
+
className: `w-full relative ${m ? "z-0" : ""} tailwind-ux-input`,
|
|
113
114
|
children: [
|
|
114
|
-
!
|
|
115
|
+
!m && t && /* @__PURE__ */ c(
|
|
115
116
|
"label",
|
|
116
117
|
{
|
|
117
|
-
htmlFor:
|
|
118
|
-
className: `block mb-1 text-sm ${
|
|
118
|
+
htmlFor: T,
|
|
119
|
+
className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : i ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${w}`,
|
|
119
120
|
children: t
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
className: `absolute inset-y-0 flex items-center ${k} ${C}`,
|
|
127
|
-
"aria-hidden": "true",
|
|
128
|
-
children: a
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
/* @__PURE__ */ d(
|
|
123
|
+
/* @__PURE__ */ O("div", { className: "relative w-full", children: [
|
|
124
|
+
q && /* @__PURE__ */ c("div", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5", children: y }),
|
|
125
|
+
J && /* @__PURE__ */ c("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3.5", children: v }),
|
|
126
|
+
/* @__PURE__ */ c(
|
|
132
127
|
"input",
|
|
133
128
|
{
|
|
134
|
-
...
|
|
135
|
-
id:
|
|
129
|
+
...h,
|
|
130
|
+
id: T,
|
|
136
131
|
ref: n,
|
|
137
|
-
placeholder:
|
|
138
|
-
onChange:
|
|
139
|
-
onKeyDown:
|
|
140
|
-
onPaste:
|
|
132
|
+
placeholder: m ? " " : h.placeholder,
|
|
133
|
+
onChange: B,
|
|
134
|
+
onKeyDown: K,
|
|
135
|
+
onPaste: Y,
|
|
141
136
|
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
|
-
${
|
|
137
|
+
${S}
|
|
138
|
+
${m && u && Ce[u]}
|
|
139
|
+
${F} ${P} ${z} ${p}`
|
|
145
140
|
}
|
|
146
141
|
),
|
|
147
|
-
|
|
142
|
+
m && t && u && /* @__PURE__ */ c(
|
|
148
143
|
"label",
|
|
149
144
|
{
|
|
150
|
-
htmlFor:
|
|
151
|
-
className: `ms-1 ${
|
|
145
|
+
htmlFor: T,
|
|
146
|
+
className: `ms-1 ${$e[u]} ${p}`,
|
|
152
147
|
children: t
|
|
153
148
|
}
|
|
154
149
|
)
|
|
155
150
|
] }),
|
|
156
|
-
|
|
151
|
+
x && /* @__PURE__ */ c(
|
|
157
152
|
"p",
|
|
158
153
|
{
|
|
159
|
-
className: `mt-1 text-xs ${
|
|
160
|
-
role:
|
|
161
|
-
children:
|
|
154
|
+
className: `mt-1 text-xs ${E === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
|
|
155
|
+
role: E === "invalid" ? "alert" : void 0,
|
|
156
|
+
children: x
|
|
162
157
|
}
|
|
163
158
|
)
|
|
164
159
|
]
|
|
165
160
|
}
|
|
166
161
|
);
|
|
167
162
|
});
|
|
168
|
-
|
|
169
|
-
const
|
|
163
|
+
Se.displayName = "Input";
|
|
164
|
+
const Ne = {
|
|
170
165
|
xs: "text-xs px-2 py-1",
|
|
171
166
|
sm: "text-sm px-3 py-1.5",
|
|
172
167
|
md: "text-sm px-3 py-3",
|
|
173
168
|
lg: "text-lg px-5 py-3"
|
|
174
|
-
},
|
|
169
|
+
}, Le = {
|
|
175
170
|
flat: "rounded-none",
|
|
176
171
|
rounded: "rounded-sm",
|
|
177
172
|
pill: "rounded-full"
|
|
178
|
-
},
|
|
173
|
+
}, Ee = {
|
|
179
174
|
filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
|
|
180
175
|
outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
|
|
181
176
|
standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
|
|
182
|
-
},
|
|
177
|
+
}, Pe = {
|
|
183
178
|
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
179
|
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
180
|
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
|
-
},
|
|
181
|
+
}, Oe = (e, n, t) => {
|
|
187
182
|
if (t)
|
|
188
183
|
return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
|
|
189
184
|
if (n)
|
|
@@ -199,80 +194,80 @@ const ke = {
|
|
|
199
194
|
default:
|
|
200
195
|
return "border-gray-300 focus:ring-blue-500";
|
|
201
196
|
}
|
|
202
|
-
},
|
|
197
|
+
}, De = ie((e, n) => {
|
|
203
198
|
const {
|
|
204
199
|
label: t,
|
|
205
200
|
id: r,
|
|
206
201
|
inputSize: o = "md",
|
|
207
|
-
shape:
|
|
202
|
+
shape: l = "rounded",
|
|
208
203
|
validate: f,
|
|
209
|
-
onValidatedChange:
|
|
210
|
-
className:
|
|
211
|
-
icon:
|
|
212
|
-
iconPosition:
|
|
213
|
-
floatingLabelStyle:
|
|
214
|
-
onChange:
|
|
215
|
-
isValid:
|
|
216
|
-
isInvalid:
|
|
217
|
-
feedback:
|
|
218
|
-
feedbackType:
|
|
219
|
-
children:
|
|
220
|
-
|
|
221
|
-
} = e, [
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
|
|
204
|
+
onValidatedChange: d,
|
|
205
|
+
className: p = "",
|
|
206
|
+
icon: s,
|
|
207
|
+
iconPosition: a = "left",
|
|
208
|
+
floatingLabelStyle: u,
|
|
209
|
+
onChange: g,
|
|
210
|
+
isValid: b,
|
|
211
|
+
isInvalid: i,
|
|
212
|
+
feedback: x,
|
|
213
|
+
feedbackType: E = "invalid",
|
|
214
|
+
children: w,
|
|
215
|
+
...$
|
|
216
|
+
} = e, [k, y] = j("default"), v = xe(), h = A(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : v), [r, t, v]), D = (z) => {
|
|
217
|
+
const F = z.target.value, K = (f == null ? void 0 : f(F)) ?? "default";
|
|
218
|
+
y(K), d == null || d(z, K), g == null || g(z);
|
|
219
|
+
}, N = !!u, B = Ne[o], T = Le[l], m = Oe(k, b, i);
|
|
220
|
+
return /* @__PURE__ */ O("div", { className: `w-full relative ${N ? "z-0" : ""}`, children: [
|
|
221
|
+
!N && t && /* @__PURE__ */ c(
|
|
227
222
|
"label",
|
|
228
223
|
{
|
|
229
|
-
htmlFor:
|
|
230
|
-
className: `block mb-1 text-sm ${
|
|
224
|
+
htmlFor: h,
|
|
225
|
+
className: `block mb-1 text-sm ${b ? "text-green-700" : i ? "text-red-700" : "text-gray-700"}`,
|
|
231
226
|
children: t
|
|
232
227
|
}
|
|
233
228
|
),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
|
|
229
|
+
/* @__PURE__ */ O("div", { className: "relative w-full", children: [
|
|
230
|
+
s && /* @__PURE__ */ c(
|
|
236
231
|
"div",
|
|
237
232
|
{
|
|
238
|
-
className: `absolute inset-y-0 flex items-center ${
|
|
239
|
-
children: /* @__PURE__ */
|
|
233
|
+
className: `absolute inset-y-0 flex items-center ${a === "start" || a === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
|
|
234
|
+
children: /* @__PURE__ */ c("span", { className: "text-gray-500", children: s })
|
|
240
235
|
}
|
|
241
236
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ c(
|
|
243
238
|
"select",
|
|
244
239
|
{
|
|
245
|
-
|
|
246
|
-
id:
|
|
240
|
+
...$,
|
|
241
|
+
id: h,
|
|
247
242
|
ref: n,
|
|
248
|
-
onChange:
|
|
243
|
+
onChange: D,
|
|
249
244
|
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:
|
|
245
|
+
${B} ${s && (a === "start" || a === "left") ? "ps-10" : s ? "pe-10" : ""}
|
|
246
|
+
${N && u && Ee[u]}
|
|
247
|
+
${T} ${m} ${p}`,
|
|
248
|
+
children: w
|
|
254
249
|
}
|
|
255
250
|
),
|
|
256
|
-
|
|
251
|
+
N && t && u && /* @__PURE__ */ c(
|
|
257
252
|
"label",
|
|
258
253
|
{
|
|
259
|
-
htmlFor:
|
|
260
|
-
className: `ms-1 ${
|
|
254
|
+
htmlFor: h,
|
|
255
|
+
className: `ms-1 ${Pe[u]} ${p}`,
|
|
261
256
|
children: t
|
|
262
257
|
}
|
|
263
258
|
)
|
|
264
259
|
] }),
|
|
265
|
-
|
|
260
|
+
x && /* @__PURE__ */ c(
|
|
266
261
|
"p",
|
|
267
262
|
{
|
|
268
|
-
className: `mt-1 text-xs ${
|
|
269
|
-
children:
|
|
263
|
+
className: `mt-1 text-xs ${E === "invalid" ? "text-red-600" : "text-green-600"}`,
|
|
264
|
+
children: x
|
|
270
265
|
}
|
|
271
266
|
)
|
|
272
267
|
] });
|
|
273
268
|
});
|
|
274
|
-
|
|
275
|
-
const
|
|
269
|
+
De.displayName = "Select";
|
|
270
|
+
const Ie = {
|
|
276
271
|
primary: "btn-primary",
|
|
277
272
|
secondary: "btn-secondary",
|
|
278
273
|
success: "btn-success",
|
|
@@ -298,7 +293,7 @@ const Oe = {
|
|
|
298
293
|
"soft-info": "btn-soft-info",
|
|
299
294
|
"soft-dark": "btn-soft-dark",
|
|
300
295
|
"soft-light": "btn-soft-light"
|
|
301
|
-
},
|
|
296
|
+
}, Be = {
|
|
302
297
|
xs: "px-3 py-2 text-xs",
|
|
303
298
|
sm: "px-3 py-2 text-sm",
|
|
304
299
|
md: "px-5 py-2.5 text-sm",
|
|
@@ -309,28 +304,28 @@ const Oe = {
|
|
|
309
304
|
rounded: "rounded-sm",
|
|
310
305
|
pill: "rounded-full",
|
|
311
306
|
circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
|
|
312
|
-
},
|
|
307
|
+
}, dt = ({
|
|
313
308
|
children: e,
|
|
314
309
|
variant: n = "primary",
|
|
315
310
|
size: t = "md",
|
|
316
311
|
type: r = "button",
|
|
317
312
|
shape: o = "rounded",
|
|
318
|
-
className:
|
|
313
|
+
className: l = "",
|
|
319
314
|
isLoading: f = !1,
|
|
320
|
-
disabled:
|
|
321
|
-
...
|
|
315
|
+
disabled: d = !1,
|
|
316
|
+
...p
|
|
322
317
|
}) => {
|
|
323
|
-
const
|
|
318
|
+
const s = d || f, a = [
|
|
324
319
|
"inline-flex items-center justify-center font-normal transition duration-150",
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
Ie[n],
|
|
321
|
+
Be[t],
|
|
327
322
|
Te[o],
|
|
328
323
|
o === "flat" ? "shadow-none" : "shadow-sm",
|
|
329
|
-
|
|
330
|
-
|
|
324
|
+
s ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
325
|
+
l
|
|
331
326
|
].filter(Boolean).join(" ");
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
f && /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ O("button", { type: r, className: a, disabled: s, ...p, children: [
|
|
328
|
+
f && /* @__PURE__ */ O(
|
|
334
329
|
"svg",
|
|
335
330
|
{
|
|
336
331
|
"aria-hidden": "true",
|
|
@@ -340,14 +335,14 @@ const Oe = {
|
|
|
340
335
|
fill: "none",
|
|
341
336
|
xmlns: "http://www.w3.org/2000/svg",
|
|
342
337
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ c(
|
|
344
339
|
"path",
|
|
345
340
|
{
|
|
346
341
|
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
342
|
fill: "currentColor"
|
|
348
343
|
}
|
|
349
344
|
),
|
|
350
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ c(
|
|
351
346
|
"path",
|
|
352
347
|
{
|
|
353
348
|
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",
|
|
@@ -360,24 +355,24 @@ const Oe = {
|
|
|
360
355
|
e
|
|
361
356
|
] });
|
|
362
357
|
};
|
|
363
|
-
var
|
|
358
|
+
var de = {
|
|
364
359
|
color: void 0,
|
|
365
360
|
size: void 0,
|
|
366
361
|
className: void 0,
|
|
367
362
|
style: void 0,
|
|
368
363
|
attr: void 0
|
|
369
|
-
},
|
|
364
|
+
}, ae = _.createContext && /* @__PURE__ */ _.createContext(de), je = ["attr", "size", "title"];
|
|
370
365
|
function Ae(e, n) {
|
|
371
366
|
if (e == null) return {};
|
|
372
|
-
var t =
|
|
367
|
+
var t = ze(e, n), r, o;
|
|
373
368
|
if (Object.getOwnPropertySymbols) {
|
|
374
|
-
var
|
|
375
|
-
for (o = 0; o <
|
|
376
|
-
r =
|
|
369
|
+
var l = Object.getOwnPropertySymbols(e);
|
|
370
|
+
for (o = 0; o < l.length; o++)
|
|
371
|
+
r = l[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
|
|
377
372
|
}
|
|
378
373
|
return t;
|
|
379
374
|
}
|
|
380
|
-
function
|
|
375
|
+
function ze(e, n) {
|
|
381
376
|
if (e == null) return {};
|
|
382
377
|
var t = {};
|
|
383
378
|
for (var r in e)
|
|
@@ -387,17 +382,17 @@ function Be(e, n) {
|
|
|
387
382
|
}
|
|
388
383
|
return t;
|
|
389
384
|
}
|
|
390
|
-
function
|
|
391
|
-
return
|
|
385
|
+
function X() {
|
|
386
|
+
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
392
387
|
for (var n = 1; n < arguments.length; n++) {
|
|
393
388
|
var t = arguments[n];
|
|
394
389
|
for (var r in t)
|
|
395
390
|
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
396
391
|
}
|
|
397
392
|
return e;
|
|
398
|
-
},
|
|
393
|
+
}, X.apply(this, arguments);
|
|
399
394
|
}
|
|
400
|
-
function
|
|
395
|
+
function le(e, n) {
|
|
401
396
|
var t = Object.keys(e);
|
|
402
397
|
if (Object.getOwnPropertySymbols) {
|
|
403
398
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -410,22 +405,22 @@ function se(e, n) {
|
|
|
410
405
|
function U(e) {
|
|
411
406
|
for (var n = 1; n < arguments.length; n++) {
|
|
412
407
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
413
|
-
n % 2 ?
|
|
414
|
-
|
|
415
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
408
|
+
n % 2 ? le(Object(t), !0).forEach(function(r) {
|
|
409
|
+
Me(e, r, t[r]);
|
|
410
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : le(Object(t)).forEach(function(r) {
|
|
416
411
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
417
412
|
});
|
|
418
413
|
}
|
|
419
414
|
return e;
|
|
420
415
|
}
|
|
421
|
-
function
|
|
422
|
-
return n =
|
|
416
|
+
function Me(e, n, t) {
|
|
417
|
+
return n = Re(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
423
418
|
}
|
|
424
|
-
function
|
|
425
|
-
var n =
|
|
419
|
+
function Re(e) {
|
|
420
|
+
var n = _e(e, "string");
|
|
426
421
|
return typeof n == "symbol" ? n : n + "";
|
|
427
422
|
}
|
|
428
|
-
function
|
|
423
|
+
function _e(e, n) {
|
|
429
424
|
if (typeof e != "object" || !e) return e;
|
|
430
425
|
var t = e[Symbol.toPrimitive];
|
|
431
426
|
if (t !== void 0) {
|
|
@@ -435,52 +430,52 @@ function Me(e, n) {
|
|
|
435
430
|
}
|
|
436
431
|
return (n === "string" ? String : Number)(e);
|
|
437
432
|
}
|
|
438
|
-
function
|
|
439
|
-
return e && e.map((n, t) => /* @__PURE__ */
|
|
433
|
+
function ue(e) {
|
|
434
|
+
return e && e.map((n, t) => /* @__PURE__ */ _.createElement(n.tag, U({
|
|
440
435
|
key: t
|
|
441
|
-
}, n.attr),
|
|
436
|
+
}, n.attr), ue(n.child)));
|
|
442
437
|
}
|
|
443
|
-
function
|
|
444
|
-
return (n) => /* @__PURE__ */
|
|
438
|
+
function re(e) {
|
|
439
|
+
return (n) => /* @__PURE__ */ _.createElement(Fe, X({
|
|
445
440
|
attr: U({}, e.attr)
|
|
446
|
-
}, n),
|
|
441
|
+
}, n), ue(e.child));
|
|
447
442
|
}
|
|
448
|
-
function
|
|
443
|
+
function Fe(e) {
|
|
449
444
|
var n = (t) => {
|
|
450
445
|
var {
|
|
451
446
|
attr: r,
|
|
452
447
|
size: o,
|
|
453
|
-
title:
|
|
454
|
-
} = e, f = Ae(e, je),
|
|
455
|
-
return t.className && (
|
|
448
|
+
title: l
|
|
449
|
+
} = e, f = Ae(e, je), d = o || t.size || "1em", p;
|
|
450
|
+
return t.className && (p = t.className), e.className && (p = (p ? p + " " : "") + e.className), /* @__PURE__ */ _.createElement("svg", X({
|
|
456
451
|
stroke: "currentColor",
|
|
457
452
|
fill: "currentColor",
|
|
458
453
|
strokeWidth: "0"
|
|
459
454
|
}, t.attr, r, f, {
|
|
460
|
-
className:
|
|
455
|
+
className: p,
|
|
461
456
|
style: U(U({
|
|
462
457
|
color: e.color || t.color
|
|
463
458
|
}, t.style), e.style),
|
|
464
|
-
height:
|
|
465
|
-
width:
|
|
459
|
+
height: d,
|
|
460
|
+
width: d,
|
|
466
461
|
xmlns: "http://www.w3.org/2000/svg"
|
|
467
|
-
}),
|
|
462
|
+
}), l && /* @__PURE__ */ _.createElement("title", null, l), e.children);
|
|
468
463
|
};
|
|
469
|
-
return
|
|
464
|
+
return ae !== void 0 ? /* @__PURE__ */ _.createElement(ae.Consumer, null, (t) => n(t)) : n(de);
|
|
470
465
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
466
|
+
function Ke(e) {
|
|
467
|
+
return re({ 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);
|
|
473
468
|
}
|
|
474
|
-
const
|
|
469
|
+
const He = {
|
|
475
470
|
xs: "w-3 h-3 text-[10px]",
|
|
476
471
|
sm: "w-4 h-4 text-xs",
|
|
477
472
|
md: "w-5 h-5 text-sm",
|
|
478
473
|
lg: "w-6 h-6 text-base"
|
|
479
|
-
},
|
|
474
|
+
}, We = {
|
|
480
475
|
flat: "rounded-none",
|
|
481
476
|
rounded: "rounded-sm",
|
|
482
477
|
pill: "rounded-full"
|
|
483
|
-
},
|
|
478
|
+
}, Ze = {
|
|
484
479
|
primary: "primary",
|
|
485
480
|
secondary: "secondary",
|
|
486
481
|
success: "success",
|
|
@@ -506,169 +501,169 @@ const Fe = {
|
|
|
506
501
|
"soft-info": "soft-info",
|
|
507
502
|
"soft-dark": "soft-dark",
|
|
508
503
|
"soft-light": "soft-light"
|
|
509
|
-
}, Ye =
|
|
504
|
+
}, Ye = _.forwardRef(
|
|
510
505
|
({
|
|
511
506
|
label: e,
|
|
512
507
|
boxSize: n = "md",
|
|
513
508
|
shape: t = "rounded",
|
|
514
509
|
variant: r = "success",
|
|
515
510
|
onSelectionChange: o,
|
|
516
|
-
disabled:
|
|
511
|
+
disabled: l = !1,
|
|
517
512
|
className: f = "",
|
|
518
|
-
id:
|
|
519
|
-
value:
|
|
520
|
-
icon:
|
|
521
|
-
children:
|
|
522
|
-
checked:
|
|
523
|
-
...
|
|
524
|
-
},
|
|
525
|
-
const
|
|
526
|
-
!
|
|
527
|
-
},
|
|
513
|
+
id: d,
|
|
514
|
+
value: p,
|
|
515
|
+
icon: s,
|
|
516
|
+
children: a,
|
|
517
|
+
checked: u,
|
|
518
|
+
...g
|
|
519
|
+
}, b) => {
|
|
520
|
+
const i = (B) => {
|
|
521
|
+
!l && o && o(B.target.checked), g.onChange && g.onChange(B);
|
|
522
|
+
}, x = "mr-2 border flex items-center justify-center transition-all", E = He[n], w = We[t], $ = Ze[r] ?? "", k = r.startsWith("outline"), y = r.startsWith("soft"), D = `${x} ${E} ${w} ${$} ${u && (k || y || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : u ? "peer-checked:bg-current" : ""}`, N = {
|
|
528
523
|
xs: "w-2 h-2",
|
|
529
524
|
sm: "w-2.5 h-2.5",
|
|
530
525
|
md: "w-3 h-3",
|
|
531
526
|
lg: "w-3.5 h-3.5"
|
|
532
527
|
};
|
|
533
|
-
return /* @__PURE__ */
|
|
528
|
+
return /* @__PURE__ */ O(
|
|
534
529
|
"label",
|
|
535
530
|
{
|
|
536
|
-
className: `flex items-center ${
|
|
531
|
+
className: `flex items-center ${l ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${f}`,
|
|
537
532
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ c(
|
|
539
534
|
"input",
|
|
540
535
|
{
|
|
541
536
|
type: "checkbox",
|
|
542
537
|
className: "peer hidden",
|
|
543
|
-
checked:
|
|
544
|
-
onChange:
|
|
545
|
-
disabled:
|
|
546
|
-
id:
|
|
547
|
-
value:
|
|
548
|
-
ref:
|
|
549
|
-
...
|
|
538
|
+
checked: u,
|
|
539
|
+
onChange: i,
|
|
540
|
+
disabled: l,
|
|
541
|
+
id: d,
|
|
542
|
+
value: p,
|
|
543
|
+
ref: b,
|
|
544
|
+
...g
|
|
550
545
|
}
|
|
551
546
|
),
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
e ||
|
|
547
|
+
/* @__PURE__ */ c("span", { className: D.trim(), children: (u || g.defaultChecked) && (s ?? /* @__PURE__ */ c(Ke, { className: `${N[n]}` })) }),
|
|
548
|
+
e || a ? /* @__PURE__ */ c("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? a }) : null
|
|
554
549
|
]
|
|
555
550
|
}
|
|
556
551
|
);
|
|
557
552
|
}
|
|
558
553
|
);
|
|
559
554
|
Ye.displayName = "Checkbox";
|
|
560
|
-
const
|
|
555
|
+
const ut = ({
|
|
561
556
|
label: e,
|
|
562
557
|
header: n,
|
|
563
558
|
items: t = [],
|
|
564
559
|
onSelect: r,
|
|
565
560
|
renderItem: o,
|
|
566
|
-
position:
|
|
561
|
+
position: l = "right",
|
|
567
562
|
className: f = "",
|
|
568
|
-
menuClassName:
|
|
569
|
-
width:
|
|
570
|
-
closeOnSelect:
|
|
571
|
-
transition:
|
|
572
|
-
ariaLabel:
|
|
573
|
-
forceCloseDropdown:
|
|
574
|
-
...
|
|
563
|
+
menuClassName: d = "",
|
|
564
|
+
width: p = "w-48",
|
|
565
|
+
closeOnSelect: s = !1,
|
|
566
|
+
transition: a = !0,
|
|
567
|
+
ariaLabel: u = "Dropdown menu",
|
|
568
|
+
forceCloseDropdown: g,
|
|
569
|
+
...b
|
|
575
570
|
}) => {
|
|
576
|
-
const [
|
|
571
|
+
const [i, x] = j(!1), [E, w] = j(!1), $ = R(null), k = R(null), y = A(() => ({
|
|
577
572
|
left: "left-0",
|
|
578
573
|
center: "left-1/2 transform -translate-x-1/2",
|
|
579
574
|
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",
|
|
575
|
+
})[l], [l]), v = I(() => {
|
|
576
|
+
const m = k.current, S = $.current;
|
|
577
|
+
if (!m || !S) return;
|
|
578
|
+
const { top: P, bottom: z } = m.getBoundingClientRect(), F = S.offsetHeight, K = window.innerHeight - z, Y = P;
|
|
579
|
+
w(K < F && Y > F);
|
|
580
|
+
}, []), h = I((m) => {
|
|
581
|
+
var S, P;
|
|
582
|
+
!((S = $.current) != null && S.contains(m.target)) && !((P = k.current) != null && P.contains(m.target)) && x(!1);
|
|
583
|
+
}, []), D = I(() => x((m) => !m), []), N = I(() => x(!1), []);
|
|
584
|
+
M(() => {
|
|
585
|
+
if (i)
|
|
586
|
+
return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
|
|
587
|
+
window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
|
|
593
588
|
};
|
|
594
|
-
}, [
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}, [
|
|
599
|
-
const
|
|
600
|
-
var
|
|
601
|
-
|
|
589
|
+
}, [i, v]);
|
|
590
|
+
const B = R(i);
|
|
591
|
+
M(() => {
|
|
592
|
+
B.current = i;
|
|
593
|
+
}, [i]), M(() => {
|
|
594
|
+
const m = (S) => {
|
|
595
|
+
var P;
|
|
596
|
+
S.key === "Escape" && B.current && (x(!1), (P = k.current) == null || P.focus());
|
|
602
597
|
};
|
|
603
|
-
return document.addEventListener("keydown",
|
|
604
|
-
document.removeEventListener("keydown",
|
|
598
|
+
return document.addEventListener("keydown", m), () => {
|
|
599
|
+
document.removeEventListener("keydown", m);
|
|
605
600
|
};
|
|
606
|
-
}, []),
|
|
607
|
-
const
|
|
601
|
+
}, []), M(() => (document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h)), [h]);
|
|
602
|
+
const T = A(
|
|
608
603
|
() => [
|
|
609
604
|
"absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
605
|
+
E ? "bottom-full mb-2" : "top-full mt-2",
|
|
606
|
+
y,
|
|
607
|
+
p,
|
|
608
|
+
a && "transition-all duration-200 ease-out",
|
|
609
|
+
d
|
|
615
610
|
].filter(Boolean).join(" "),
|
|
616
|
-
[
|
|
611
|
+
[E, y, p, a, d]
|
|
617
612
|
);
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
613
|
+
return /* @__PURE__ */ O("div", { className: `relative inline-block ${f}`, ...b, children: [
|
|
614
|
+
/* @__PURE__ */ c(
|
|
620
615
|
"button",
|
|
621
616
|
{
|
|
622
617
|
type: "button",
|
|
623
|
-
ref:
|
|
624
|
-
onClick:
|
|
625
|
-
"aria-expanded":
|
|
626
|
-
"aria-label":
|
|
618
|
+
ref: k,
|
|
619
|
+
onClick: D,
|
|
620
|
+
"aria-expanded": i,
|
|
621
|
+
"aria-label": u,
|
|
627
622
|
className: "focus:outline-none",
|
|
628
623
|
children: e
|
|
629
624
|
}
|
|
630
625
|
),
|
|
631
|
-
|
|
626
|
+
i && /* @__PURE__ */ O("div", { ref: $, role: "menu", className: T, children: [
|
|
632
627
|
n && n,
|
|
633
|
-
t.map((
|
|
634
|
-
const
|
|
635
|
-
r && r(
|
|
628
|
+
t.map((m, S) => {
|
|
629
|
+
const P = () => {
|
|
630
|
+
r && r(m), s && N();
|
|
636
631
|
};
|
|
637
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ c("div", { children: o ? o(m, P) : /* @__PURE__ */ c(
|
|
638
633
|
"div",
|
|
639
634
|
{
|
|
640
|
-
onClick:
|
|
635
|
+
onClick: P,
|
|
641
636
|
className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
|
|
642
637
|
role: "menuitem",
|
|
643
|
-
children:
|
|
638
|
+
children: m.label
|
|
644
639
|
}
|
|
645
|
-
) },
|
|
640
|
+
) }, S);
|
|
646
641
|
})
|
|
647
642
|
] })
|
|
648
643
|
] });
|
|
649
|
-
},
|
|
644
|
+
}, ft = ({
|
|
650
645
|
children: e,
|
|
651
646
|
content: n,
|
|
652
647
|
position: t = "top",
|
|
653
648
|
className: r = "",
|
|
654
649
|
tooltipClass: o = "",
|
|
655
|
-
tooltipStyle:
|
|
650
|
+
tooltipStyle: l = {}
|
|
656
651
|
}) => {
|
|
657
|
-
const f =
|
|
658
|
-
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
661
|
-
const
|
|
662
|
-
|
|
663
|
-
},
|
|
664
|
-
|
|
652
|
+
const f = R(null), d = R(null);
|
|
653
|
+
M(() => {
|
|
654
|
+
const s = f.current, a = d.current;
|
|
655
|
+
if (!s || !a) return;
|
|
656
|
+
const u = () => {
|
|
657
|
+
a.style.opacity = "1", a.style.visibility = "visible";
|
|
658
|
+
}, g = () => {
|
|
659
|
+
a.style.opacity = "0", a.style.visibility = "hidden";
|
|
665
660
|
};
|
|
666
|
-
return
|
|
667
|
-
|
|
661
|
+
return s.addEventListener("mouseenter", u), s.addEventListener("mouseleave", g), () => {
|
|
662
|
+
s.removeEventListener("mouseenter", u), s.removeEventListener("mouseleave", g);
|
|
668
663
|
};
|
|
669
664
|
}, []);
|
|
670
|
-
const
|
|
671
|
-
const
|
|
665
|
+
const p = (s) => {
|
|
666
|
+
const a = {
|
|
672
667
|
position: "absolute",
|
|
673
668
|
opacity: 0,
|
|
674
669
|
visibility: "hidden",
|
|
@@ -685,10 +680,10 @@ const ct = ({
|
|
|
685
680
|
zIndex: 9999,
|
|
686
681
|
width: "max-content"
|
|
687
682
|
};
|
|
688
|
-
switch (
|
|
683
|
+
switch (s) {
|
|
689
684
|
case "top":
|
|
690
685
|
return {
|
|
691
|
-
...
|
|
686
|
+
...a,
|
|
692
687
|
bottom: "100%",
|
|
693
688
|
left: "50%",
|
|
694
689
|
transform: "translateX(-50%)",
|
|
@@ -696,7 +691,7 @@ const ct = ({
|
|
|
696
691
|
};
|
|
697
692
|
case "bottom":
|
|
698
693
|
return {
|
|
699
|
-
...
|
|
694
|
+
...a,
|
|
700
695
|
top: "100%",
|
|
701
696
|
left: "50%",
|
|
702
697
|
transform: "translateX(-50%)",
|
|
@@ -704,7 +699,7 @@ const ct = ({
|
|
|
704
699
|
};
|
|
705
700
|
case "left":
|
|
706
701
|
return {
|
|
707
|
-
...
|
|
702
|
+
...a,
|
|
708
703
|
right: "100%",
|
|
709
704
|
top: "50%",
|
|
710
705
|
transform: "translateY(-50%)",
|
|
@@ -712,33 +707,33 @@ const ct = ({
|
|
|
712
707
|
};
|
|
713
708
|
case "right":
|
|
714
709
|
return {
|
|
715
|
-
...
|
|
710
|
+
...a,
|
|
716
711
|
left: "100%",
|
|
717
712
|
top: "50%",
|
|
718
713
|
transform: "translateY(-50%)",
|
|
719
714
|
marginLeft: "8px"
|
|
720
715
|
};
|
|
721
716
|
default:
|
|
722
|
-
return
|
|
717
|
+
return a;
|
|
723
718
|
}
|
|
724
719
|
};
|
|
725
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ O("div", { ref: f, className: `relative inline-block ${r}`, children: [
|
|
726
721
|
e,
|
|
727
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ c(
|
|
728
723
|
"div",
|
|
729
724
|
{
|
|
730
|
-
ref:
|
|
725
|
+
ref: d,
|
|
731
726
|
role: "tooltip",
|
|
732
727
|
className: o,
|
|
733
728
|
style: {
|
|
734
|
-
...
|
|
735
|
-
...
|
|
729
|
+
...p(t),
|
|
730
|
+
...l
|
|
736
731
|
},
|
|
737
732
|
children: n
|
|
738
733
|
}
|
|
739
734
|
)
|
|
740
735
|
] });
|
|
741
|
-
},
|
|
736
|
+
}, Ge = {
|
|
742
737
|
primary: "bg-blue-500 text-white",
|
|
743
738
|
secondary: "bg-gray-500 text-white",
|
|
744
739
|
success: "bg-green-500 text-white",
|
|
@@ -756,33 +751,33 @@ const ct = ({
|
|
|
756
751
|
"outline-info": "border border-cyan-500 text-cyan-500 bg-transparent",
|
|
757
752
|
"outline-dark": "border border-black text-black bg-transparent",
|
|
758
753
|
"outline-light": "border border-gray-100 text-gray-800 bg-transparent"
|
|
759
|
-
},
|
|
754
|
+
}, Xe = {
|
|
760
755
|
xs: "text-xs px-2 py-0.5",
|
|
761
756
|
sm: "text-sm px-2.5 py-0.5",
|
|
762
757
|
md: "text-base px-3 py-1",
|
|
763
758
|
lg: "text-lg px-3.5 py-1.5",
|
|
764
759
|
xl: "text-xl px-4 py-2"
|
|
765
|
-
},
|
|
760
|
+
}, Ue = {
|
|
766
761
|
flat: "rounded-none",
|
|
767
762
|
rounded: "rounded-sm",
|
|
768
763
|
pill: "rounded-full",
|
|
769
764
|
circle: "rounded-full p-2 w-8 h-8 justify-center"
|
|
770
|
-
},
|
|
765
|
+
}, pt = ({
|
|
771
766
|
label: e,
|
|
772
767
|
variant: n = "primary",
|
|
773
768
|
size: t = "sm",
|
|
774
769
|
shape: r = "rounded",
|
|
775
770
|
icon: o,
|
|
776
|
-
dismissible:
|
|
771
|
+
dismissible: l,
|
|
777
772
|
onDismiss: f,
|
|
778
|
-
className:
|
|
779
|
-
...
|
|
773
|
+
className: d = "",
|
|
774
|
+
...p
|
|
780
775
|
}) => {
|
|
781
|
-
const
|
|
782
|
-
return /* @__PURE__ */
|
|
783
|
-
o && /* @__PURE__ */
|
|
776
|
+
const s = !e && !!o, a = `inline-flex items-center font-medium ${Ge[n] || ""} ${Xe[t] || ""} ${Ue[r] || ""} ${s ? "justify-center p-2 w-8 h-8" : ""} ` + d;
|
|
777
|
+
return /* @__PURE__ */ O("span", { className: a.trim(), ...p, children: [
|
|
778
|
+
o && /* @__PURE__ */ c("span", { className: e ? "mr-1" : "", children: o }),
|
|
784
779
|
e,
|
|
785
|
-
|
|
780
|
+
l && /* @__PURE__ */ c(
|
|
786
781
|
"button",
|
|
787
782
|
{
|
|
788
783
|
type: "button",
|
|
@@ -792,308 +787,321 @@ const ct = ({
|
|
|
792
787
|
}
|
|
793
788
|
)
|
|
794
789
|
] });
|
|
795
|
-
},
|
|
790
|
+
}, qe = {
|
|
796
791
|
rounded: "rounded-md",
|
|
797
792
|
pill: "rounded-full",
|
|
798
793
|
flat: "rounded-none"
|
|
799
|
-
},
|
|
794
|
+
}, Je = {
|
|
800
795
|
xs: "px-2 py-1 text-xs",
|
|
801
796
|
sm: "px-3 py-1.5 text-sm",
|
|
802
797
|
md: "px-4 py-2 text-sm",
|
|
803
798
|
lg: "px-5 py-3 text-base",
|
|
804
799
|
xl: "px-6 py-4 text-lg"
|
|
805
800
|
};
|
|
806
|
-
function
|
|
801
|
+
function Qe({
|
|
807
802
|
option: e,
|
|
808
803
|
selected: n,
|
|
809
804
|
disabled: t,
|
|
810
805
|
variant: r,
|
|
811
806
|
sizeClass: o,
|
|
812
|
-
classNames:
|
|
807
|
+
classNames: l,
|
|
813
808
|
onSelect: f,
|
|
814
|
-
renderOption:
|
|
815
|
-
buttonRef:
|
|
809
|
+
renderOption: d,
|
|
810
|
+
buttonRef: p
|
|
816
811
|
}) {
|
|
817
|
-
const
|
|
812
|
+
const s = I(() => {
|
|
818
813
|
t || f(e.value);
|
|
819
|
-
}, [t, f, e.value]),
|
|
820
|
-
(
|
|
821
|
-
(
|
|
814
|
+
}, [t, f, e.value]), a = I(
|
|
815
|
+
(u) => {
|
|
816
|
+
(u.key === "Enter" || u.key === " ") && !t && (u.preventDefault(), f(e.value));
|
|
822
817
|
},
|
|
823
818
|
[t, f, e.value]
|
|
824
819
|
);
|
|
825
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ c(
|
|
826
821
|
"button",
|
|
827
822
|
{
|
|
828
|
-
ref:
|
|
823
|
+
ref: p,
|
|
829
824
|
type: "button",
|
|
830
825
|
role: "radio",
|
|
831
826
|
"aria-checked": n,
|
|
832
827
|
disabled: t,
|
|
833
|
-
onClick:
|
|
834
|
-
onKeyDown:
|
|
828
|
+
onClick: s,
|
|
829
|
+
onKeyDown: a,
|
|
835
830
|
className: `relative z-10 transition-colors duration-200 focus:outline-none w-full ${o}
|
|
836
831
|
${n ? `text-white toggler-${r}` : "text-gray-700 hover:bg-gray-200"}
|
|
837
|
-
${
|
|
838
|
-
${n ?
|
|
832
|
+
${l.option ?? ""}
|
|
833
|
+
${n ? l.selectedOption ?? "" : ""}
|
|
839
834
|
`,
|
|
840
|
-
children:
|
|
835
|
+
children: d ? d(e, n) : e.label
|
|
841
836
|
}
|
|
842
837
|
);
|
|
843
838
|
}
|
|
844
|
-
const
|
|
845
|
-
|
|
839
|
+
const Ve = ce(
|
|
840
|
+
Qe
|
|
846
841
|
);
|
|
847
|
-
function
|
|
842
|
+
function fe({
|
|
848
843
|
options: e,
|
|
849
844
|
selected: n,
|
|
850
845
|
onChange: t,
|
|
851
846
|
label: r,
|
|
852
847
|
disabled: o = !1,
|
|
853
|
-
shape:
|
|
848
|
+
shape: l = "rounded",
|
|
854
849
|
variant: f = "primary",
|
|
855
|
-
size:
|
|
856
|
-
className:
|
|
857
|
-
classNames:
|
|
858
|
-
id:
|
|
859
|
-
name:
|
|
860
|
-
renderOption:
|
|
850
|
+
size: d = "md",
|
|
851
|
+
className: p = "",
|
|
852
|
+
classNames: s = {},
|
|
853
|
+
id: a,
|
|
854
|
+
name: u,
|
|
855
|
+
renderOption: g
|
|
861
856
|
}) {
|
|
862
|
-
const
|
|
863
|
-
() => e.findIndex((
|
|
857
|
+
const b = R([]), [i, x] = j({}), E = A(() => qe[l], [l]), w = A(() => Je[d], [d]), $ = A(
|
|
858
|
+
() => e.findIndex((y) => y.value === n),
|
|
864
859
|
[e, n]
|
|
865
860
|
);
|
|
866
|
-
|
|
867
|
-
if (
|
|
861
|
+
we(() => {
|
|
862
|
+
if ($ < 0)
|
|
868
863
|
return;
|
|
869
|
-
const
|
|
870
|
-
if (!
|
|
864
|
+
const y = b.current[$];
|
|
865
|
+
if (!y)
|
|
871
866
|
return;
|
|
872
|
-
const
|
|
873
|
-
transform: `translateX(${
|
|
874
|
-
width:
|
|
875
|
-
height:
|
|
867
|
+
const v = {
|
|
868
|
+
transform: `translateX(${y.offsetLeft}px)`,
|
|
869
|
+
width: y.offsetWidth,
|
|
870
|
+
height: y.offsetHeight
|
|
876
871
|
};
|
|
877
|
-
|
|
878
|
-
}, [
|
|
879
|
-
const
|
|
880
|
-
(
|
|
881
|
-
|
|
872
|
+
x((h) => h.transform === v.transform && h.width === v.width && h.height === v.height ? h : v);
|
|
873
|
+
}, [$, e]);
|
|
874
|
+
const k = I(
|
|
875
|
+
(y) => {
|
|
876
|
+
y !== n && t(y);
|
|
882
877
|
},
|
|
883
878
|
[t, n]
|
|
884
879
|
);
|
|
885
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ O(
|
|
886
881
|
"div",
|
|
887
882
|
{
|
|
888
|
-
id:
|
|
889
|
-
className: `flex w-fit flex-col gap-2 ${
|
|
883
|
+
id: a,
|
|
884
|
+
className: `flex w-fit flex-col gap-2 ${p} ${s.root ?? ""}`,
|
|
890
885
|
children: [
|
|
891
|
-
r ? /* @__PURE__ */
|
|
886
|
+
r ? /* @__PURE__ */ c(
|
|
892
887
|
"span",
|
|
893
888
|
{
|
|
894
|
-
className: `select-none text-sm font-medium ${
|
|
889
|
+
className: `select-none text-sm font-medium ${s.label ?? ""}`,
|
|
895
890
|
children: r
|
|
896
891
|
}
|
|
897
892
|
) : null,
|
|
898
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ O(
|
|
899
894
|
"div",
|
|
900
895
|
{
|
|
901
896
|
role: "radiogroup",
|
|
902
897
|
"aria-disabled": o,
|
|
903
898
|
"aria-label": typeof r == "string" ? r : void 0,
|
|
904
|
-
className: `relative
|
|
899
|
+
className: `relative flex overflow-hidden border border-gray-300 bg-gray-100 ${E}
|
|
905
900
|
${o ? "cursor-not-allowed opacity-50" : ""}
|
|
906
|
-
${
|
|
901
|
+
${s.group ?? ""}
|
|
907
902
|
`,
|
|
908
903
|
children: [
|
|
909
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ c(
|
|
910
905
|
"div",
|
|
911
906
|
{
|
|
912
907
|
"aria-hidden": "true",
|
|
913
|
-
style:
|
|
908
|
+
style: i,
|
|
914
909
|
className: `absolute left-0 top-0 z-0 transition-all duration-300 ease-in-out toggler-${f}`
|
|
915
910
|
}
|
|
916
911
|
),
|
|
917
|
-
e.map((
|
|
918
|
-
const
|
|
919
|
-
return /* @__PURE__ */
|
|
920
|
-
|
|
912
|
+
e.map((y, v) => {
|
|
913
|
+
const h = n === y.value, D = o || !!y.disabled;
|
|
914
|
+
return /* @__PURE__ */ c(
|
|
915
|
+
Ve,
|
|
921
916
|
{
|
|
922
|
-
option:
|
|
923
|
-
selected:
|
|
924
|
-
disabled:
|
|
917
|
+
option: y,
|
|
918
|
+
selected: h,
|
|
919
|
+
disabled: D,
|
|
925
920
|
variant: f,
|
|
926
|
-
sizeClass:
|
|
927
|
-
classNames:
|
|
928
|
-
onSelect:
|
|
929
|
-
renderOption:
|
|
930
|
-
buttonRef: (
|
|
931
|
-
|
|
921
|
+
sizeClass: w,
|
|
922
|
+
classNames: s,
|
|
923
|
+
onSelect: k,
|
|
924
|
+
renderOption: g,
|
|
925
|
+
buttonRef: (N) => {
|
|
926
|
+
b.current[v] = N;
|
|
932
927
|
}
|
|
933
928
|
},
|
|
934
|
-
String(
|
|
929
|
+
String(y.value)
|
|
935
930
|
);
|
|
936
931
|
})
|
|
937
932
|
]
|
|
938
933
|
}
|
|
939
934
|
),
|
|
940
|
-
|
|
935
|
+
u ? /* @__PURE__ */ c("input", { type: "hidden", name: u, value: String(n) }) : null
|
|
941
936
|
]
|
|
942
937
|
}
|
|
943
938
|
);
|
|
944
939
|
}
|
|
945
|
-
|
|
946
|
-
const
|
|
940
|
+
fe.displayName = "Toggler";
|
|
941
|
+
const gt = ce(fe), pe = te(
|
|
947
942
|
null
|
|
948
943
|
);
|
|
949
|
-
function
|
|
944
|
+
function mt({
|
|
950
945
|
children: e
|
|
951
946
|
}) {
|
|
952
|
-
const [n, t] =
|
|
953
|
-
t((
|
|
954
|
-
}, []), o =
|
|
955
|
-
t((
|
|
956
|
-
}, []),
|
|
947
|
+
const [n, t] = j([]), r = I((d) => {
|
|
948
|
+
t((p) => p.includes(d) ? p : [...p, d]);
|
|
949
|
+
}, []), o = I((d) => {
|
|
950
|
+
t((p) => p.filter((s) => s !== d));
|
|
951
|
+
}, []), l = I(() => {
|
|
957
952
|
t([]);
|
|
958
|
-
}, []), f =
|
|
953
|
+
}, []), f = A(
|
|
959
954
|
() => ({
|
|
960
955
|
showBottomSheet: r,
|
|
961
956
|
closeBottomSheet: o,
|
|
962
|
-
closeAllBottomSheet:
|
|
957
|
+
closeAllBottomSheet: l,
|
|
963
958
|
activeSheets: n
|
|
964
959
|
}),
|
|
965
|
-
[r, o,
|
|
960
|
+
[r, o, l, n]
|
|
966
961
|
);
|
|
967
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ c(pe.Provider, { value: f, children: e });
|
|
968
963
|
}
|
|
969
|
-
function
|
|
970
|
-
const e =
|
|
964
|
+
function et() {
|
|
965
|
+
const e = ne(pe);
|
|
971
966
|
if (!e)
|
|
972
967
|
throw new Error("useBottomSheet must be used inside BottomSheetProvider");
|
|
973
968
|
return e;
|
|
974
969
|
}
|
|
975
|
-
function
|
|
970
|
+
function bt({
|
|
976
971
|
id: e,
|
|
977
972
|
children: n,
|
|
978
973
|
initialSnap: t = "half",
|
|
979
974
|
snapPoints: r,
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
975
|
+
position: o = "bottom",
|
|
976
|
+
showNotchIndicator: l = !0,
|
|
977
|
+
className: f = "",
|
|
978
|
+
overlayClassName: d = "",
|
|
979
|
+
closeOnBackdrop: p = !0,
|
|
980
|
+
lockScroll: s = !0,
|
|
981
|
+
zIndex: a = 1e3
|
|
985
982
|
}) {
|
|
986
|
-
const { activeSheets:
|
|
987
|
-
(
|
|
988
|
-
if (
|
|
989
|
-
switch (
|
|
983
|
+
const { activeSheets: u, closeBottomSheet: g } = et(), b = u.includes(e), i = !!r, [x, E] = j(!1), [w, $] = j(100), [k, y] = j(!1), v = R(0), h = R(0), D = R(null), N = typeof window < "u" ? window.innerHeight : 0, B = typeof window < "u" ? window.innerWidth : 0, T = r ? (1 - r.full) * 100 : 0, m = r ? (1 - r.half) * 100 : 0, S = I(
|
|
984
|
+
(C) => {
|
|
985
|
+
if (i)
|
|
986
|
+
switch (C) {
|
|
990
987
|
case "full":
|
|
991
|
-
|
|
988
|
+
$(T);
|
|
992
989
|
break;
|
|
993
990
|
case "half":
|
|
994
|
-
|
|
991
|
+
$(m);
|
|
995
992
|
break;
|
|
996
993
|
default:
|
|
997
|
-
|
|
994
|
+
$(100);
|
|
998
995
|
}
|
|
999
996
|
},
|
|
1000
|
-
[
|
|
997
|
+
[T, m, i]
|
|
1001
998
|
);
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}, []),
|
|
1005
|
-
if (!
|
|
1006
|
-
|
|
999
|
+
M(() => {
|
|
1000
|
+
E(!0);
|
|
1001
|
+
}, []), M(() => {
|
|
1002
|
+
if (!b) {
|
|
1003
|
+
$(100);
|
|
1007
1004
|
return;
|
|
1008
1005
|
}
|
|
1009
|
-
|
|
1010
|
-
}, [
|
|
1011
|
-
if (
|
|
1012
|
-
return
|
|
1006
|
+
i ? S(t) : $(0);
|
|
1007
|
+
}, [b, t, S, i]), M(() => {
|
|
1008
|
+
if (s)
|
|
1009
|
+
return b ? (document.body.style.overflow = "hidden", document.body.style.touchAction = "none") : (document.body.style.overflow = "", document.body.style.touchAction = ""), () => {
|
|
1013
1010
|
document.body.style.overflow = "", document.body.style.touchAction = "";
|
|
1014
1011
|
};
|
|
1015
|
-
}, [
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1012
|
+
}, [b, s]), M(() => {
|
|
1013
|
+
if (!b) return;
|
|
1014
|
+
const C = (L) => {
|
|
1015
|
+
L.key === "Escape" && g(e);
|
|
1019
1016
|
};
|
|
1020
|
-
return window.addEventListener("keydown",
|
|
1021
|
-
window.removeEventListener("keydown",
|
|
1017
|
+
return window.addEventListener("keydown", C), () => {
|
|
1018
|
+
window.removeEventListener("keydown", C);
|
|
1022
1019
|
};
|
|
1023
|
-
}, [
|
|
1024
|
-
const
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1027
|
-
},
|
|
1028
|
-
if (!
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
if (
|
|
1034
|
-
|
|
1020
|
+
}, [g, e, b]);
|
|
1021
|
+
const P = o === "left" || o === "right", z = (C) => {
|
|
1022
|
+
var L, H;
|
|
1023
|
+
i && (y(!0), v.current = P ? C.clientX : C.clientY, h.current = w, (H = (L = C.target).setPointerCapture) == null || H.call(L, C.pointerId));
|
|
1024
|
+
}, F = (C) => {
|
|
1025
|
+
if (!k || !i) return;
|
|
1026
|
+
const Z = ((P ? C.clientX : C.clientY) - v.current) / (P ? B : N) * 100;
|
|
1027
|
+
let W = h.current;
|
|
1028
|
+
o === "right" || o === "bottom" ? W += Z : W -= Z, $(Math.min(Math.max(W, T), 100));
|
|
1029
|
+
}, K = () => {
|
|
1030
|
+
if (!i) return;
|
|
1031
|
+
if (y(!1), w > 75) {
|
|
1032
|
+
g(e);
|
|
1035
1033
|
return;
|
|
1036
1034
|
}
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1035
|
+
const C = (m + T) / 2;
|
|
1036
|
+
w <= C ? S("full") : S("half");
|
|
1039
1037
|
};
|
|
1040
1038
|
if (!x) return null;
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
|
|
1039
|
+
const Y = {
|
|
1040
|
+
bottom: `translate3d(0, ${w}%, 0)`,
|
|
1041
|
+
top: `translate3d(0, -${w}%, 0)`,
|
|
1042
|
+
left: `translate3d(-${w}%, 0, 0)`,
|
|
1043
|
+
right: `translate3d(${w}%, 0, 0)`
|
|
1044
|
+
}, q = {
|
|
1045
|
+
bottom: "inset-x-0 bottom-0 rounded-t-xl max-h-[100dvh]",
|
|
1046
|
+
top: "inset-x-0 rounded-b-xl top-0 max-h-[100dvh]",
|
|
1047
|
+
left: "left-0 top-0 h-full",
|
|
1048
|
+
right: "right-0 top-0 h-full"
|
|
1049
|
+
}, J = {
|
|
1050
|
+
transform: Y[o],
|
|
1051
|
+
transition: k ? "none" : "transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",
|
|
1044
1052
|
willChange: "transform",
|
|
1045
|
-
zIndex:
|
|
1046
|
-
// height: hasSnapPoints ? "92dvh" : `${contentHeight}px`,
|
|
1047
|
-
maxHeight: "100dvh"
|
|
1053
|
+
zIndex: a
|
|
1048
1054
|
};
|
|
1049
|
-
return
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1055
|
+
return ve(
|
|
1056
|
+
/* @__PURE__ */ O(ye, { children: [
|
|
1057
|
+
/* @__PURE__ */ c(
|
|
1052
1058
|
"button",
|
|
1053
1059
|
{
|
|
1054
1060
|
type: "button",
|
|
1055
|
-
"aria-label": "Close
|
|
1061
|
+
"aria-label": "Close sheet",
|
|
1056
1062
|
onClick: () => {
|
|
1057
|
-
|
|
1063
|
+
p && g(e);
|
|
1058
1064
|
},
|
|
1059
|
-
className: `
|
|
1060
|
-
|
|
1065
|
+
className: `
|
|
1066
|
+
fixed inset-0
|
|
1067
|
+
bg-black/45
|
|
1068
|
+
backdrop-blur-[2px]
|
|
1069
|
+
transition-opacity
|
|
1070
|
+
duration-200
|
|
1071
|
+
${b ? "opacity-100" : "pointer-events-none opacity-0"}
|
|
1072
|
+
${d}
|
|
1073
|
+
`,
|
|
1074
|
+
style: { zIndex: a }
|
|
1061
1075
|
}
|
|
1062
1076
|
),
|
|
1063
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ O(
|
|
1064
1078
|
"div",
|
|
1065
1079
|
{
|
|
1066
|
-
ref:
|
|
1067
|
-
style:
|
|
1068
|
-
className: `
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
bg-white
|
|
1072
|
-
overflow-hidden
|
|
1073
|
-
text-white
|
|
1074
|
-
shadow-2xl
|
|
1075
|
-
flex flex-col
|
|
1076
|
-
overscroll-contain
|
|
1077
|
-
touch-pan-y
|
|
1078
|
-
pb-[env(safe-area-inset-bottom)]
|
|
1079
|
-
${o}
|
|
1080
|
+
ref: D,
|
|
1081
|
+
style: J,
|
|
1082
|
+
className: `fixed bg-white overflow-hidden flex flex-col overscroll-contain touch-pan-y pb-[env(safe-area-inset-bottom)]
|
|
1083
|
+
${q[o]}
|
|
1084
|
+
${f}
|
|
1080
1085
|
`,
|
|
1081
1086
|
children: [
|
|
1082
|
-
/* @__PURE__ */
|
|
1087
|
+
l && /* @__PURE__ */ c(
|
|
1083
1088
|
"div",
|
|
1084
1089
|
{
|
|
1085
|
-
onPointerDown:
|
|
1086
|
-
onPointerMove:
|
|
1087
|
-
onPointerUp:
|
|
1088
|
-
className: `
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1090
|
+
onPointerDown: z,
|
|
1091
|
+
onPointerMove: F,
|
|
1092
|
+
onPointerUp: K,
|
|
1093
|
+
className: `flex justify-center items-center py-2.5 select-none touch-none bg-gray-50
|
|
1094
|
+
${i ? "cursor-grab active:cursor-grabbing" : ""}
|
|
1095
|
+
`,
|
|
1096
|
+
children: /* @__PURE__ */ c(
|
|
1097
|
+
"div",
|
|
1098
|
+
{
|
|
1099
|
+
className: `rounded-full bg-gray-400 ${P ? "w-1 h-14" : "h-1 w-14"}`
|
|
1100
|
+
}
|
|
1101
|
+
)
|
|
1094
1102
|
}
|
|
1095
1103
|
),
|
|
1096
|
-
/* @__PURE__ */
|
|
1104
|
+
/* @__PURE__ */ c("div", { className: "flex-1 overflow-y-auto p-4", children: n })
|
|
1097
1105
|
]
|
|
1098
1106
|
}
|
|
1099
1107
|
)
|
|
@@ -1101,147 +1109,147 @@ function gt({
|
|
|
1101
1109
|
document.body
|
|
1102
1110
|
);
|
|
1103
1111
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return
|
|
1112
|
+
function tt(e) {
|
|
1113
|
+
return re({ 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);
|
|
1106
1114
|
}
|
|
1107
|
-
const
|
|
1115
|
+
const ht = ({
|
|
1108
1116
|
items: e,
|
|
1109
1117
|
allowMultipleOpen: n = !1,
|
|
1110
1118
|
className: t = "",
|
|
1111
1119
|
tileClasses: r = "",
|
|
1112
1120
|
open: o,
|
|
1113
|
-
onChange:
|
|
1121
|
+
onChange: l,
|
|
1114
1122
|
renderTitle: f,
|
|
1115
|
-
renderContent:
|
|
1116
|
-
showArrowIcon:
|
|
1117
|
-
panelClasses:
|
|
1123
|
+
renderContent: d,
|
|
1124
|
+
showArrowIcon: p = !0,
|
|
1125
|
+
panelClasses: s = ""
|
|
1118
1126
|
}) => {
|
|
1119
|
-
const [
|
|
1120
|
-
(
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1127
|
+
const [a, u] = j(/* @__PURE__ */ new Set()), g = A(() => o ? new Set(o) : a, [o, a]), b = I(
|
|
1128
|
+
(i) => {
|
|
1129
|
+
const x = new Set(g);
|
|
1130
|
+
x.has(i) ? x.delete(i) : (n || x.clear(), x.add(i)), o && l ? l(Array.from(x)) : u(x);
|
|
1123
1131
|
},
|
|
1124
|
-
[
|
|
1132
|
+
[g, o, l, n]
|
|
1125
1133
|
);
|
|
1126
|
-
return /* @__PURE__ */
|
|
1134
|
+
return /* @__PURE__ */ c(
|
|
1127
1135
|
"div",
|
|
1128
1136
|
{
|
|
1129
1137
|
className: "accordion",
|
|
1130
1138
|
role: "region",
|
|
1131
1139
|
"aria-multiselectable": n,
|
|
1132
|
-
children: e.map((
|
|
1133
|
-
const
|
|
1134
|
-
return /* @__PURE__ */
|
|
1140
|
+
children: e.map((i) => {
|
|
1141
|
+
const x = g.has(i.id), E = `accordion-heading-${i.id}`, w = `accordion-panel-${i.id}`;
|
|
1142
|
+
return /* @__PURE__ */ O(
|
|
1135
1143
|
"div",
|
|
1136
1144
|
{
|
|
1137
1145
|
className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,
|
|
1138
1146
|
children: [
|
|
1139
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ O(
|
|
1140
1148
|
"button",
|
|
1141
1149
|
{
|
|
1142
|
-
id:
|
|
1150
|
+
id: E,
|
|
1143
1151
|
type: "button",
|
|
1144
|
-
"aria-expanded":
|
|
1145
|
-
"aria-controls":
|
|
1146
|
-
onClick: () =>
|
|
1152
|
+
"aria-expanded": x,
|
|
1153
|
+
"aria-controls": w,
|
|
1154
|
+
onClick: () => b(i.id),
|
|
1147
1155
|
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}`,
|
|
1148
1156
|
children: [
|
|
1149
|
-
f ? f(
|
|
1150
|
-
|
|
1157
|
+
f ? f(i, x) : i.title,
|
|
1158
|
+
p ? /* @__PURE__ */ c(tt, {}) : null
|
|
1151
1159
|
]
|
|
1152
1160
|
}
|
|
1153
1161
|
),
|
|
1154
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ c(
|
|
1155
1163
|
"div",
|
|
1156
1164
|
{
|
|
1157
|
-
id:
|
|
1165
|
+
id: w,
|
|
1158
1166
|
role: "region",
|
|
1159
|
-
"aria-labelledby":
|
|
1160
|
-
hidden: !
|
|
1161
|
-
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${
|
|
1162
|
-
children:
|
|
1167
|
+
"aria-labelledby": E,
|
|
1168
|
+
hidden: !x,
|
|
1169
|
+
className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,
|
|
1170
|
+
children: d ? d(i, x) : i.content
|
|
1163
1171
|
}
|
|
1164
1172
|
)
|
|
1165
1173
|
]
|
|
1166
1174
|
},
|
|
1167
|
-
|
|
1175
|
+
i.id
|
|
1168
1176
|
);
|
|
1169
1177
|
})
|
|
1170
1178
|
}
|
|
1171
1179
|
);
|
|
1172
|
-
},
|
|
1173
|
-
const e =
|
|
1180
|
+
}, ge = te(null), me = () => {
|
|
1181
|
+
const e = ne(ge);
|
|
1174
1182
|
if (!e)
|
|
1175
1183
|
throw new Error(
|
|
1176
1184
|
"useModalActions must be used within a ModalActionProvider"
|
|
1177
1185
|
);
|
|
1178
1186
|
return e;
|
|
1179
|
-
},
|
|
1180
|
-
function
|
|
1187
|
+
}, be = te(null), he = () => ne(be);
|
|
1188
|
+
function yt({
|
|
1181
1189
|
id: e,
|
|
1182
1190
|
variant: n = "center",
|
|
1183
1191
|
title: t,
|
|
1184
1192
|
children: r,
|
|
1185
1193
|
standalone: o = !1,
|
|
1186
|
-
showFloatingClose:
|
|
1194
|
+
showFloatingClose: l = !1,
|
|
1187
1195
|
containerClasses: f = "",
|
|
1188
|
-
headerClasses:
|
|
1189
|
-
bodyClasses:
|
|
1190
|
-
onClose:
|
|
1191
|
-
disableEscapeClose:
|
|
1192
|
-
closeBtnStyle:
|
|
1196
|
+
headerClasses: d = "",
|
|
1197
|
+
bodyClasses: p = "",
|
|
1198
|
+
onClose: s,
|
|
1199
|
+
disableEscapeClose: a = !1,
|
|
1200
|
+
closeBtnStyle: u
|
|
1193
1201
|
}) {
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
}, [
|
|
1197
|
-
return
|
|
1198
|
-
if (!
|
|
1199
|
-
const
|
|
1202
|
+
const g = he(), b = me(), i = !o && !!g && !!b, [x, E] = j(!1), w = i ? g.isOpen(e) : x, $ = i ? g.getModalData(e) : null, k = n === "bottom-sheet", y = I(() => {
|
|
1203
|
+
i ? b.closeModal(e) : E(!1), s == null || s();
|
|
1204
|
+
}, [i, b, e, s]), v = R(null);
|
|
1205
|
+
return M(() => {
|
|
1206
|
+
if (!w) return;
|
|
1207
|
+
const h = window.scrollY, D = {
|
|
1200
1208
|
position: document.body.style.position,
|
|
1201
1209
|
top: document.body.style.top,
|
|
1202
1210
|
width: document.body.style.width
|
|
1203
1211
|
};
|
|
1204
|
-
document.body.style.position = "fixed", document.body.style.top = `-${
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1212
|
+
document.body.style.position = "fixed", document.body.style.top = `-${h}px`, document.body.style.width = "100%";
|
|
1213
|
+
const N = (B) => {
|
|
1214
|
+
B.preventDefault();
|
|
1207
1215
|
};
|
|
1208
|
-
return document.addEventListener("touchmove",
|
|
1216
|
+
return document.addEventListener("touchmove", N, {
|
|
1209
1217
|
passive: !1
|
|
1210
1218
|
}), () => {
|
|
1211
|
-
document.body.style.position =
|
|
1219
|
+
document.body.style.position = D.position, document.body.style.top = D.top, document.body.style.width = D.width, document.removeEventListener("touchmove", N), window.scrollTo(0, h);
|
|
1212
1220
|
};
|
|
1213
|
-
}, [
|
|
1214
|
-
|
|
1215
|
-
const
|
|
1221
|
+
}, [w]), M(() => {
|
|
1222
|
+
w && (v.current = document.activeElement);
|
|
1223
|
+
const h = document.getElementById(e), D = [
|
|
1216
1224
|
"a[href]",
|
|
1217
1225
|
"button:not([disabled])",
|
|
1218
1226
|
"textarea:not([disabled])",
|
|
1219
1227
|
"input:not([disabled])",
|
|
1220
1228
|
"select:not([disabled])",
|
|
1221
1229
|
'[tabindex]:not([tabindex="-1"])'
|
|
1222
|
-
],
|
|
1223
|
-
if (!
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1230
|
+
], N = () => {
|
|
1231
|
+
if (!h) return [];
|
|
1232
|
+
const m = h.querySelectorAll(
|
|
1233
|
+
D.join(",")
|
|
1226
1234
|
);
|
|
1227
|
-
return Array.from(
|
|
1228
|
-
},
|
|
1229
|
-
if (
|
|
1230
|
-
const
|
|
1231
|
-
if (!
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
},
|
|
1235
|
-
|
|
1235
|
+
return Array.from(m).filter((S) => S.offsetParent !== null);
|
|
1236
|
+
}, B = (m) => {
|
|
1237
|
+
if (m.key !== "Tab") return;
|
|
1238
|
+
const S = N();
|
|
1239
|
+
if (!S.length) return;
|
|
1240
|
+
const P = S[0], z = S[S.length - 1];
|
|
1241
|
+
m.shiftKey ? document.activeElement === P && (m.preventDefault(), z.focus()) : document.activeElement === z && (m.preventDefault(), P.focus());
|
|
1242
|
+
}, T = (m) => {
|
|
1243
|
+
m.key === "Escape" && !a && y(), B(m);
|
|
1236
1244
|
};
|
|
1237
|
-
return
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1245
|
+
return w && (window.addEventListener("keydown", T), setTimeout(() => {
|
|
1246
|
+
const m = N();
|
|
1247
|
+
m.length && m[0].focus();
|
|
1240
1248
|
}, 0)), () => {
|
|
1241
|
-
var
|
|
1242
|
-
window.removeEventListener("keydown",
|
|
1249
|
+
var m;
|
|
1250
|
+
window.removeEventListener("keydown", T), (m = v.current) == null || m.focus();
|
|
1243
1251
|
};
|
|
1244
|
-
}, [
|
|
1252
|
+
}, [w, y, a, e]), w ? /* @__PURE__ */ c(
|
|
1245
1253
|
"div",
|
|
1246
1254
|
{
|
|
1247
1255
|
id: e,
|
|
@@ -1249,16 +1257,16 @@ function bt({
|
|
|
1249
1257
|
fixed inset-0 z-50
|
|
1250
1258
|
bg-black/60 backdrop-blur-[2px]
|
|
1251
1259
|
flex
|
|
1252
|
-
${
|
|
1260
|
+
${k ? "items-end justify-center" : "items-center justify-center"}
|
|
1253
1261
|
`,
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1262
|
+
children: /* @__PURE__ */ O(
|
|
1255
1263
|
"div",
|
|
1256
1264
|
{
|
|
1257
1265
|
className: `
|
|
1258
1266
|
bg-white shadow-lg
|
|
1259
1267
|
transform transition-all duration-300
|
|
1260
1268
|
|
|
1261
|
-
${
|
|
1269
|
+
${k ? `
|
|
1262
1270
|
w-full
|
|
1263
1271
|
rounded-t-3xl
|
|
1264
1272
|
max-h-[92dvh]
|
|
@@ -1274,20 +1282,20 @@ function bt({
|
|
|
1274
1282
|
${f}
|
|
1275
1283
|
`,
|
|
1276
1284
|
children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ O(
|
|
1278
1286
|
"div",
|
|
1279
1287
|
{
|
|
1280
1288
|
className: `
|
|
1281
1289
|
flex justify-between
|
|
1282
1290
|
items-center relative
|
|
1283
|
-
${
|
|
1291
|
+
${d}
|
|
1284
1292
|
`,
|
|
1285
1293
|
children: [
|
|
1286
|
-
t && /* @__PURE__ */
|
|
1287
|
-
|
|
1294
|
+
t && /* @__PURE__ */ c("h2", { className: "text-lg font-semibold", children: t }),
|
|
1295
|
+
l && /* @__PURE__ */ c(
|
|
1288
1296
|
"button",
|
|
1289
1297
|
{
|
|
1290
|
-
onClick:
|
|
1298
|
+
onClick: y,
|
|
1291
1299
|
"aria-label": "Close modal",
|
|
1292
1300
|
className: `
|
|
1293
1301
|
text-gray-500 hover:text-black
|
|
@@ -1296,7 +1304,7 @@ function bt({
|
|
|
1296
1304
|
rounded-full
|
|
1297
1305
|
w-8 aspect-square
|
|
1298
1306
|
|
|
1299
|
-
${
|
|
1307
|
+
${u}
|
|
1300
1308
|
`,
|
|
1301
1309
|
children: "✕"
|
|
1302
1310
|
}
|
|
@@ -1304,110 +1312,110 @@ function bt({
|
|
|
1304
1312
|
]
|
|
1305
1313
|
}
|
|
1306
1314
|
),
|
|
1307
|
-
/* @__PURE__ */
|
|
1315
|
+
/* @__PURE__ */ c("div", { className: p, children: typeof r == "function" ? r({ modalData: $ }) : r })
|
|
1308
1316
|
]
|
|
1309
1317
|
}
|
|
1310
1318
|
)
|
|
1311
1319
|
}
|
|
1312
1320
|
) : null;
|
|
1313
1321
|
}
|
|
1314
|
-
function
|
|
1322
|
+
function xt({
|
|
1315
1323
|
children: e
|
|
1316
1324
|
}) {
|
|
1317
|
-
const [n, t] =
|
|
1318
|
-
t((
|
|
1319
|
-
}, []), f =
|
|
1320
|
-
t((
|
|
1321
|
-
const
|
|
1322
|
-
return delete
|
|
1325
|
+
const [n, t] = j({}), [r, o] = j({}), l = I((u, g) => {
|
|
1326
|
+
t((b) => ({ ...b, [u]: !0 })), g && o((b) => ({ ...b, [u]: g }));
|
|
1327
|
+
}, []), f = I((u) => {
|
|
1328
|
+
t((g) => ({ ...g, [u]: !1 })), o((g) => {
|
|
1329
|
+
const b = { ...g };
|
|
1330
|
+
return delete b[u], b;
|
|
1323
1331
|
});
|
|
1324
|
-
}, []),
|
|
1325
|
-
(
|
|
1332
|
+
}, []), d = I((u) => !!n[u], [n]), p = I(
|
|
1333
|
+
(u) => r[u],
|
|
1326
1334
|
[r]
|
|
1327
|
-
),
|
|
1328
|
-
() => ({ openModal:
|
|
1329
|
-
[
|
|
1330
|
-
),
|
|
1331
|
-
() => ({ isOpen:
|
|
1332
|
-
[
|
|
1335
|
+
), s = A(
|
|
1336
|
+
() => ({ openModal: l, closeModal: f }),
|
|
1337
|
+
[l, f]
|
|
1338
|
+
), a = A(
|
|
1339
|
+
() => ({ isOpen: d, getModalData: p }),
|
|
1340
|
+
[d, p]
|
|
1333
1341
|
);
|
|
1334
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ c(ge.Provider, { value: s, children: /* @__PURE__ */ c(be.Provider, { value: a, children: e }) });
|
|
1335
1343
|
}
|
|
1336
|
-
function
|
|
1337
|
-
const { openModal: n, closeModal: t } =
|
|
1344
|
+
function wt(e) {
|
|
1345
|
+
const { openModal: n, closeModal: t } = me(), { isOpen: r, getModalData: o } = he();
|
|
1338
1346
|
return {
|
|
1339
|
-
open: (
|
|
1347
|
+
open: (l) => n(e, l),
|
|
1340
1348
|
close: () => t(e),
|
|
1341
1349
|
isOpen: r(e),
|
|
1342
1350
|
data: o(e)
|
|
1343
1351
|
};
|
|
1344
1352
|
}
|
|
1345
|
-
let
|
|
1346
|
-
function
|
|
1347
|
-
|
|
1353
|
+
let V = null, ee = {};
|
|
1354
|
+
function nt(e) {
|
|
1355
|
+
V = e;
|
|
1348
1356
|
}
|
|
1349
|
-
function
|
|
1350
|
-
|
|
1357
|
+
function vt(e) {
|
|
1358
|
+
ee = { ...ee, ...e };
|
|
1351
1359
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return
|
|
1360
|
+
function rt() {
|
|
1361
|
+
return ee;
|
|
1354
1362
|
}
|
|
1355
|
-
function
|
|
1356
|
-
|
|
1363
|
+
function Ct(e, n, t = 3e3, r) {
|
|
1364
|
+
V ? V(e, n, t, r) : console.warn("Toast system is not mounted");
|
|
1357
1365
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return
|
|
1366
|
+
function ot(e) {
|
|
1367
|
+
return re({ 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);
|
|
1360
1368
|
}
|
|
1361
|
-
const
|
|
1369
|
+
const st = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1362
1370
|
const n = Math.random() * 16 | 0;
|
|
1363
1371
|
return (e === "x" ? n : n & 3 | 8).toString(16);
|
|
1364
|
-
}),
|
|
1365
|
-
const [n, t] =
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
const
|
|
1369
|
-
t((
|
|
1370
|
-
t((
|
|
1372
|
+
}), $t = ({ containerStyle: e = "" }) => {
|
|
1373
|
+
const [n, t] = j([]);
|
|
1374
|
+
M(() => {
|
|
1375
|
+
nt((o, l, f, d) => {
|
|
1376
|
+
const p = st();
|
|
1377
|
+
t((s) => [...s, { id: p, type: o, message: l, config: d }]), setTimeout(() => {
|
|
1378
|
+
t((s) => s.filter((a) => a.id !== p));
|
|
1371
1379
|
}, f);
|
|
1372
1380
|
});
|
|
1373
1381
|
}, []);
|
|
1374
|
-
const r =
|
|
1375
|
-
return /* @__PURE__ */
|
|
1382
|
+
const r = rt();
|
|
1383
|
+
return /* @__PURE__ */ c(
|
|
1376
1384
|
"div",
|
|
1377
1385
|
{
|
|
1378
1386
|
className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
|
|
1379
1387
|
children: n.map((o) => {
|
|
1380
|
-
var
|
|
1381
|
-
const
|
|
1382
|
-
return /* @__PURE__ */
|
|
1388
|
+
var s, a, u, g, b, i, x, E, w, $, k, y, v, h;
|
|
1389
|
+
const l = ((s = o.config) == null ? void 0 : s.icon) || ((a = r.icons) == null ? void 0 : a[o.type]) || at(o.type), f = ((u = o.config) == null ? void 0 : u.bgColor) || ((b = (g = r.colors) == null ? void 0 : g[o.type]) == null ? void 0 : b.bg) || "bg-white dark:bg-gray-800", d = ((i = o.config) == null ? void 0 : i.textColor) || ((E = (x = r.colors) == null ? void 0 : x[o.type]) == null ? void 0 : E.text) || "text-gray-700 dark:text-gray-300", p = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(w = o.config) == null ? void 0 : w.iconContainerClass}`;
|
|
1390
|
+
return /* @__PURE__ */ O(
|
|
1383
1391
|
"div",
|
|
1384
1392
|
{
|
|
1385
|
-
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${f} ${
|
|
1393
|
+
className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${f} ${d} ${($ = o.config) == null ? void 0 : $.containerBody}`,
|
|
1386
1394
|
children: [
|
|
1387
|
-
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
((
|
|
1395
|
+
l && /* @__PURE__ */ c("div", { className: p, children: l }),
|
|
1396
|
+
/* @__PURE__ */ O("div", { className: "flex-1", children: [
|
|
1397
|
+
((k = o.config) == null ? void 0 : k.title) && /* @__PURE__ */ c(
|
|
1390
1398
|
"div",
|
|
1391
1399
|
{
|
|
1392
|
-
className: `font-semibold text-black ${(
|
|
1400
|
+
className: `font-semibold text-black ${(y = o.config) == null ? void 0 : y.titleClass}`,
|
|
1393
1401
|
children: o.config.title
|
|
1394
1402
|
}
|
|
1395
1403
|
),
|
|
1396
|
-
((
|
|
1404
|
+
((v = o.config) == null ? void 0 : v.description) && /* @__PURE__ */ c(
|
|
1397
1405
|
"div",
|
|
1398
1406
|
{
|
|
1399
|
-
className: `text-sm text-gray-500 ${(
|
|
1407
|
+
className: `text-sm text-gray-500 ${(h = o.config) == null ? void 0 : h.subTitleClass}`,
|
|
1400
1408
|
children: o.config.description
|
|
1401
1409
|
}
|
|
1402
1410
|
)
|
|
1403
1411
|
] }),
|
|
1404
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ c(
|
|
1405
1413
|
"button",
|
|
1406
1414
|
{
|
|
1407
|
-
onClick: () => t((
|
|
1415
|
+
onClick: () => t((D) => D.filter((N) => N.id !== o.id)),
|
|
1408
1416
|
className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
|
|
1409
1417
|
"aria-label": "Close",
|
|
1410
|
-
children: /* @__PURE__ */
|
|
1418
|
+
children: /* @__PURE__ */ c(ot, { size: 18 })
|
|
1411
1419
|
}
|
|
1412
1420
|
)
|
|
1413
1421
|
]
|
|
@@ -1418,7 +1426,7 @@ const rt = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
|
|
|
1418
1426
|
}
|
|
1419
1427
|
);
|
|
1420
1428
|
};
|
|
1421
|
-
function
|
|
1429
|
+
function at(e) {
|
|
1422
1430
|
switch (e) {
|
|
1423
1431
|
case "success":
|
|
1424
1432
|
return "✅";
|
|
@@ -1431,24 +1439,24 @@ function ot(e) {
|
|
|
1431
1439
|
}
|
|
1432
1440
|
}
|
|
1433
1441
|
export {
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1442
|
+
ht as Accordion,
|
|
1443
|
+
pt as Badge,
|
|
1444
|
+
bt as BottomSheet,
|
|
1445
|
+
mt as BottomSheetProvider,
|
|
1446
|
+
dt as Button,
|
|
1439
1447
|
Ye as Checkbox,
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1448
|
+
ut as Dropdown,
|
|
1449
|
+
Se as Input,
|
|
1450
|
+
yt as Modal,
|
|
1451
|
+
xt as ModalProvider,
|
|
1452
|
+
De as Select,
|
|
1453
|
+
$t as Toast,
|
|
1454
|
+
gt as Toggler,
|
|
1455
|
+
ft as Tooltip,
|
|
1456
|
+
vt as setToastDefaults,
|
|
1457
|
+
Ct as showToast,
|
|
1458
|
+
et as useBottomSheet,
|
|
1459
|
+
me as useModalActions,
|
|
1460
|
+
wt as useModalInstance,
|
|
1461
|
+
he as useModalState
|
|
1454
1462
|
};
|