tailwind-ux-kit 1.0.100 → 1.0.103

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