tailwind-ux-kit 1.0.110 → 1.0.112

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