tailwind-ux-kit 1.0.84 → 1.0.88

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,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as S, jsx as i } from "react/jsx-runtime";
3
- import A, { forwardRef as oe, useState as D, useMemo as j, useId as be, useRef as F, useCallback as z, useEffect as R, createContext as ae, useContext as le } from "react";
3
+ import A, { forwardRef as oe, useState as z, useMemo as j, useId as be, useRef as F, useCallback as D, useEffect as B, createContext as ae, useContext as le } from "react";
4
4
  const V = {
5
5
  xs: "text-xs px-2 py-1",
6
6
  sm: "text-sm px-3 py-1.5",
@@ -18,10 +18,10 @@ const V = {
18
18
  filled: "absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
19
19
  outlined: "absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
20
20
  standard: "absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"
21
- }, he = (e, r, n) => {
22
- if (n)
21
+ }, he = (e, n, t) => {
22
+ if (t)
23
23
  return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
24
- if (r)
24
+ if (n)
25
25
  return "border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";
26
26
  switch (e) {
27
27
  case "error":
@@ -33,19 +33,19 @@ const V = {
33
33
  default:
34
34
  return "border-gray-300 focus:ring-blue-500";
35
35
  }
36
- }, ye = oe((e, r) => {
36
+ }, ye = oe((e, n) => {
37
37
  const {
38
- label: n,
39
- id: t,
38
+ label: t,
39
+ id: r,
40
40
  inputSize: s = "md",
41
- shape: d = "rounded",
41
+ shape: c = "rounded",
42
42
  validate: p,
43
- onValidatedChange: u,
44
- className: c = "",
43
+ onValidatedChange: f,
44
+ className: d = "",
45
45
  icon: a,
46
46
  iconPosition: o = "left",
47
47
  floatingLabelStyle: l,
48
- onChange: f,
48
+ onChange: u,
49
49
  isValid: g,
50
50
  isInvalid: b,
51
51
  feedback: x,
@@ -53,69 +53,69 @@ const V = {
53
53
  feedbackType: $ = "invalid",
54
54
  labelClasses: N = "",
55
55
  inputType: w = "",
56
- inputPattern: h,
57
- ...y
58
- } = e, [v, I] = D("default"), E = A.useCallback(
59
- (P) => {
60
- const L = P.target.value, Z = (p == null ? void 0 : p(L)) ?? "default";
61
- I(Z), u == null || u(P, Z), f == null || f(P);
56
+ inputPattern: y,
57
+ ...h
58
+ } = e, [v, P] = z("default"), L = A.useCallback(
59
+ (I) => {
60
+ const E = I.target.value, Z = (p == null ? void 0 : p(E)) ?? "default";
61
+ P(Z), f == null || f(I, Z), u == null || u(I);
62
62
  },
63
- [p, u, f]
64
- ), m = j(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!l, O = V[s] || V.md, M = ee[d] || ee.flat, B = j(
63
+ [p, f, u]
64
+ ), m = j(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), C = !!l, O = V[s] || V.md, M = ee[c] || ee.flat, R = j(
65
65
  () => he(v, g, b),
66
66
  [v, g, b]
67
- ), T = j(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = j(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]), K = (P) => {
67
+ ), T = j(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = j(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]), K = (I) => {
68
68
  var H;
69
- const L = P.key;
70
- !(P.ctrlKey || P.metaKey || L.length !== 1) && (() => {
69
+ const E = I.key;
70
+ !(I.ctrlKey || I.metaKey || E.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(E)) && (() => {
71
71
  const W = /^\d$/, X = /^[a-zA-Z]$/;
72
72
  switch (w) {
73
73
  case "numeric":
74
74
  case "number":
75
75
  case "integer":
76
- return !W.test(L);
76
+ return !W.test(E);
77
77
  case "decimal":
78
- return !W.test(L) && L !== "." && L !== "Backspace" && L !== "Tab";
78
+ return !W.test(E) && E !== "." && E !== "Backspace" && E !== "Tab";
79
79
  case "alphabetic":
80
- return !X.test(L);
80
+ return !X.test(E);
81
81
  case "custom":
82
- return h ? !h.test(L) : !1;
82
+ return y ? !y.test(E) : !1;
83
83
  default:
84
84
  return !1;
85
85
  }
86
- })() && P.preventDefault(), (H = y.onKeyDown) == null || H.call(y, P);
87
- }, ge = (P) => {
86
+ })() && I.preventDefault(), (H = h.onKeyDown) == null || H.call(h, I);
87
+ }, ge = (I) => {
88
88
  var U;
89
- const L = P.clipboardData.getData("Text");
89
+ const E = I.clipboardData.getData("Text");
90
90
  (() => {
91
91
  const H = /^\d+$/, W = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
92
92
  switch (w) {
93
93
  case "numeric":
94
94
  case "number":
95
95
  case "integer":
96
- return !H.test(L);
96
+ return !H.test(E);
97
97
  case "decimal":
98
- return !W.test(L);
98
+ return !W.test(E);
99
99
  case "alphabetic":
100
- return !X.test(L);
100
+ return !X.test(E);
101
101
  case "custom":
102
- return h ? !h.test(L) : !1;
102
+ return y ? !y.test(E) : !1;
103
103
  default:
104
104
  return !1;
105
105
  }
106
- })() && P.preventDefault(), (U = y.onPaste) == null || U.call(y, P);
106
+ })() && I.preventDefault(), (U = h.onPaste) == null || U.call(h, I);
107
107
  };
108
108
  return /* @__PURE__ */ S(
109
109
  "div",
110
110
  {
111
111
  className: `w-full relative ${C ? "z-0" : ""} tailwind-ux-input`,
112
112
  children: [
113
- !C && n && /* @__PURE__ */ i(
113
+ !C && t && /* @__PURE__ */ i(
114
114
  "label",
115
115
  {
116
116
  htmlFor: m,
117
117
  className: `block mb-1 text-sm ${g ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${N}`,
118
- children: n
118
+ children: t
119
119
  }
120
120
  ),
121
121
  /* @__PURE__ */ S("div", { className: "relative w-full", children: [
@@ -130,25 +130,25 @@ const V = {
130
130
  /* @__PURE__ */ i(
131
131
  "input",
132
132
  {
133
- ...y,
133
+ ...h,
134
134
  id: m,
135
- ref: r,
136
- placeholder: C ? " " : y.placeholder,
137
- onChange: E,
135
+ ref: n,
136
+ placeholder: C ? " " : h.placeholder,
137
+ onChange: L,
138
138
  onKeyDown: K,
139
139
  onPaste: ge,
140
140
  className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
141
141
  ${O}
142
142
  ${C && l && me[l]}
143
- ${_} ${M} ${B} ${c}`
143
+ ${_} ${M} ${R} ${d}`
144
144
  }
145
145
  ),
146
- C && n && l && /* @__PURE__ */ i(
146
+ C && t && l && /* @__PURE__ */ i(
147
147
  "label",
148
148
  {
149
149
  htmlFor: m,
150
- className: `ms-1 ${xe[l]} ${c}`,
151
- children: n
150
+ className: `ms-1 ${xe[l]} ${d}`,
151
+ children: t
152
152
  }
153
153
  )
154
154
  ] }),
@@ -182,52 +182,52 @@ const we = {
182
182
  filled: "absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
183
183
  outlined: "absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",
184
184
  standard: "absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"
185
- }, ke = (e, r, n) => {
186
- if (n)
185
+ }, ke = (e, n, t) => {
186
+ if (t)
187
187
  return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
188
- if (r)
188
+ if (n)
189
189
  return "border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";
190
- const t = "focus:ring focus:border";
190
+ const r = "focus:ring focus:border";
191
191
  switch (e) {
192
192
  case "error":
193
- return `${t}-red-500 border-red-500 bg-red-50`;
193
+ return `${r}-red-500 border-red-500 bg-red-50`;
194
194
  case "warning":
195
- return `${t}-yellow-500 border-yellow-500 bg-yellow-50`;
195
+ return `${r}-yellow-500 border-yellow-500 bg-yellow-50`;
196
196
  case "success":
197
- return `${t}-green-500 border-green-500 bg-green-50`;
197
+ return `${r}-green-500 border-green-500 bg-green-50`;
198
198
  default:
199
199
  return "border-gray-300 focus:ring-blue-500";
200
200
  }
201
- }, Se = oe((e, r) => {
201
+ }, Se = oe((e, n) => {
202
202
  const {
203
- label: n,
204
- id: t,
203
+ label: t,
204
+ id: r,
205
205
  inputSize: s = "md",
206
- shape: d = "rounded",
206
+ shape: c = "rounded",
207
207
  validate: p,
208
- onValidatedChange: u,
209
- className: c = "",
208
+ onValidatedChange: f,
209
+ className: d = "",
210
210
  icon: a,
211
211
  iconPosition: o = "left",
212
212
  floatingLabelStyle: l,
213
- onChange: f,
213
+ onChange: u,
214
214
  isValid: g,
215
215
  isInvalid: b,
216
216
  feedback: x,
217
217
  feedbackType: k = "invalid",
218
218
  children: $,
219
219
  ...N
220
- } = e, [w, h] = D("default"), y = be(), v = j(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : y), [t, n, y]), I = (T) => {
220
+ } = e, [w, y] = z("default"), h = be(), v = j(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : h), [r, t, h]), P = (T) => {
221
221
  const _ = T.target.value, K = (p == null ? void 0 : p(_)) ?? "default";
222
- h(K), u == null || u(T, K), f == null || f(T);
223
- }, E = !!l, m = we[s], C = ve[d], O = ke(w, g, b);
224
- return /* @__PURE__ */ S("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
225
- !E && n && /* @__PURE__ */ i(
222
+ y(K), f == null || f(T, K), u == null || u(T);
223
+ }, L = !!l, m = we[s], C = ve[c], O = ke(w, g, b);
224
+ return /* @__PURE__ */ S("div", { className: `w-full relative ${L ? "z-0" : ""}`, children: [
225
+ !L && t && /* @__PURE__ */ i(
226
226
  "label",
227
227
  {
228
228
  htmlFor: v,
229
229
  className: `block mb-1 text-sm ${g ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
230
- children: n
230
+ children: t
231
231
  }
232
232
  ),
233
233
  /* @__PURE__ */ S("div", { className: "relative w-full", children: [
@@ -243,21 +243,21 @@ const we = {
243
243
  {
244
244
  ...N,
245
245
  id: v,
246
- ref: r,
247
- onChange: I,
246
+ ref: n,
247
+ onChange: P,
248
248
  className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
249
249
  ${m} ${a && (o === "start" || o === "left") ? "ps-10" : a ? "pe-10" : ""}
250
- ${E && l && Ce[l]}
251
- ${C} ${O} ${c}`,
250
+ ${L && l && Ce[l]}
251
+ ${C} ${O} ${d}`,
252
252
  children: $
253
253
  }
254
254
  ),
255
- E && n && l && /* @__PURE__ */ i(
255
+ L && t && l && /* @__PURE__ */ i(
256
256
  "label",
257
257
  {
258
258
  htmlFor: v,
259
- className: `ms-1 ${$e[l]} ${c}`,
260
- children: n
259
+ className: `ms-1 ${$e[l]} ${d}`,
260
+ children: t
261
261
  }
262
262
  )
263
263
  ] }),
@@ -297,38 +297,38 @@ const Ne = {
297
297
  "soft-info": "btn-soft-info",
298
298
  "soft-dark": "btn-soft-dark",
299
299
  "soft-light": "btn-soft-light"
300
- }, Ee = {
300
+ }, Le = {
301
301
  xs: "px-3 py-2 text-xs",
302
302
  sm: "px-3 py-2 text-sm",
303
303
  md: "px-5 py-2.5 text-sm",
304
304
  lg: "px-5 py-3 text-base",
305
305
  xl: "px-6 py-3.5 text-base"
306
- }, Le = {
306
+ }, Ee = {
307
307
  flat: "shadow-none",
308
308
  rounded: "rounded-sm",
309
309
  pill: "rounded-full",
310
310
  circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
311
311
  }, Qe = ({
312
312
  children: e,
313
- variant: r = "primary",
314
- size: n = "md",
315
- type: t = "button",
313
+ variant: n = "primary",
314
+ size: t = "md",
315
+ type: r = "button",
316
316
  shape: s = "rounded",
317
- className: d = "",
317
+ className: c = "",
318
318
  isLoading: p = !1,
319
- disabled: u = !1,
320
- ...c
319
+ disabled: f = !1,
320
+ ...d
321
321
  }) => {
322
- const a = u || p, o = [
322
+ const a = f || p, o = [
323
323
  "inline-flex items-center justify-center font-normal transition duration-150",
324
- Ne[r],
325
- Ee[n],
326
- Le[s],
324
+ Ne[n],
325
+ Le[t],
326
+ Ee[s],
327
327
  s === "flat" ? "shadow-none" : "shadow-sm",
328
328
  a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
329
- d
329
+ c
330
330
  ].filter(Boolean).join(" ");
331
- return /* @__PURE__ */ S("button", { type: t, className: o, disabled: a, ...c, children: [
331
+ return /* @__PURE__ */ S("button", { type: r, className: o, disabled: a, ...d, children: [
332
332
  p && /* @__PURE__ */ S(
333
333
  "svg",
334
334
  {
@@ -366,106 +366,106 @@ var ie = {
366
366
  style: void 0,
367
367
  attr: void 0
368
368
  }, te = A.createContext && /* @__PURE__ */ A.createContext(ie), Oe = ["attr", "size", "title"];
369
- function Pe(e, r) {
369
+ function Pe(e, n) {
370
370
  if (e == null) return {};
371
- var n = Ie(e, r), t, s;
371
+ var t = Ie(e, n), r, s;
372
372
  if (Object.getOwnPropertySymbols) {
373
- var d = Object.getOwnPropertySymbols(e);
374
- for (s = 0; s < d.length; s++)
375
- t = d[s], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
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]);
376
376
  }
377
- return n;
377
+ return t;
378
378
  }
379
- function Ie(e, r) {
379
+ function Ie(e, n) {
380
380
  if (e == null) return {};
381
- var n = {};
382
- for (var t in e)
383
- if (Object.prototype.hasOwnProperty.call(e, t)) {
384
- if (r.indexOf(t) >= 0) continue;
385
- n[t] = e[t];
381
+ var t = {};
382
+ for (var r in e)
383
+ if (Object.prototype.hasOwnProperty.call(e, r)) {
384
+ if (n.indexOf(r) >= 0) continue;
385
+ t[r] = e[r];
386
386
  }
387
- return n;
387
+ return t;
388
388
  }
389
389
  function G() {
390
390
  return G = Object.assign ? Object.assign.bind() : function(e) {
391
- for (var r = 1; r < arguments.length; r++) {
392
- var n = arguments[r];
393
- for (var t in n)
394
- Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
391
+ for (var n = 1; n < arguments.length; n++) {
392
+ var t = arguments[n];
393
+ for (var r in t)
394
+ Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
395
395
  }
396
396
  return e;
397
397
  }, G.apply(this, arguments);
398
398
  }
399
- function ne(e, r) {
400
- var n = Object.keys(e);
399
+ function ne(e, n) {
400
+ var t = Object.keys(e);
401
401
  if (Object.getOwnPropertySymbols) {
402
- var t = Object.getOwnPropertySymbols(e);
403
- r && (t = t.filter(function(s) {
402
+ var r = Object.getOwnPropertySymbols(e);
403
+ n && (r = r.filter(function(s) {
404
404
  return Object.getOwnPropertyDescriptor(e, s).enumerable;
405
- })), n.push.apply(n, t);
405
+ })), t.push.apply(t, r);
406
406
  }
407
- return n;
407
+ return t;
408
408
  }
409
409
  function q(e) {
410
- for (var r = 1; r < arguments.length; r++) {
411
- var n = arguments[r] != null ? arguments[r] : {};
412
- r % 2 ? ne(Object(n), !0).forEach(function(t) {
413
- je(e, t, n[t]);
414
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ne(Object(n)).forEach(function(t) {
415
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
410
+ for (var n = 1; n < arguments.length; n++) {
411
+ var t = arguments[n] != null ? arguments[n] : {};
412
+ n % 2 ? ne(Object(t), !0).forEach(function(r) {
413
+ je(e, r, t[r]);
414
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ne(Object(t)).forEach(function(r) {
415
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
416
416
  });
417
417
  }
418
418
  return e;
419
419
  }
420
- function je(e, r, n) {
421
- return r = ze(r), r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
420
+ function je(e, n, t) {
421
+ return n = De(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
422
422
  }
423
- function ze(e) {
424
- var r = De(e, "string");
425
- return typeof r == "symbol" ? r : r + "";
423
+ function De(e) {
424
+ var n = ze(e, "string");
425
+ return typeof n == "symbol" ? n : n + "";
426
426
  }
427
- function De(e, r) {
427
+ function ze(e, n) {
428
428
  if (typeof e != "object" || !e) return e;
429
- var n = e[Symbol.toPrimitive];
430
- if (n !== void 0) {
431
- var t = n.call(e, r);
432
- if (typeof t != "object") return t;
429
+ var t = e[Symbol.toPrimitive];
430
+ if (t !== void 0) {
431
+ var r = t.call(e, n);
432
+ if (typeof r != "object") return r;
433
433
  throw new TypeError("@@toPrimitive must return a primitive value.");
434
434
  }
435
- return (r === "string" ? String : Number)(e);
435
+ return (n === "string" ? String : Number)(e);
436
436
  }
437
437
  function ce(e) {
438
- return e && e.map((r, n) => /* @__PURE__ */ A.createElement(r.tag, q({
439
- key: n
440
- }, r.attr), ce(r.child)));
438
+ return e && e.map((n, t) => /* @__PURE__ */ A.createElement(n.tag, q({
439
+ key: t
440
+ }, n.attr), ce(n.child)));
441
441
  }
442
442
  function Q(e) {
443
- return (r) => /* @__PURE__ */ A.createElement(Ae, G({
443
+ return (n) => /* @__PURE__ */ A.createElement(Ae, G({
444
444
  attr: q({}, e.attr)
445
- }, r), ce(e.child));
445
+ }, n), ce(e.child));
446
446
  }
447
447
  function Ae(e) {
448
- var r = (n) => {
448
+ var n = (t) => {
449
449
  var {
450
- attr: t,
450
+ attr: r,
451
451
  size: s,
452
- title: d
453
- } = e, p = Pe(e, Oe), u = s || n.size || "1em", c;
454
- return n.className && (c = n.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", G({
452
+ title: c
453
+ } = e, p = Pe(e, Oe), f = s || t.size || "1em", d;
454
+ return t.className && (d = t.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", G({
455
455
  stroke: "currentColor",
456
456
  fill: "currentColor",
457
457
  strokeWidth: "0"
458
- }, n.attr, t, p, {
459
- className: c,
458
+ }, t.attr, r, p, {
459
+ className: d,
460
460
  style: q(q({
461
- color: e.color || n.color
462
- }, n.style), e.style),
463
- height: u,
464
- width: u,
461
+ color: e.color || t.color
462
+ }, t.style), e.style),
463
+ height: f,
464
+ width: f,
465
465
  xmlns: "http://www.w3.org/2000/svg"
466
- }), d && /* @__PURE__ */ A.createElement("title", null, d), e.children);
466
+ }), c && /* @__PURE__ */ A.createElement("title", null, c), e.children);
467
467
  };
468
- return te !== void 0 ? /* @__PURE__ */ A.createElement(te.Consumer, null, (n) => r(n)) : r(ie);
468
+ return te !== void 0 ? /* @__PURE__ */ A.createElement(te.Consumer, null, (t) => n(t)) : n(ie);
469
469
  }
470
470
  function Me(e) {
471
471
  return Q({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, child: [] }] })(e);
@@ -475,11 +475,11 @@ const Te = {
475
475
  sm: "w-4 h-4 text-xs",
476
476
  md: "w-5 h-5 text-sm",
477
477
  lg: "w-6 h-6 text-base"
478
- }, Re = {
478
+ }, Be = {
479
479
  flat: "rounded-none",
480
480
  rounded: "rounded-sm",
481
481
  pill: "rounded-full"
482
- }, Be = {
482
+ }, Re = {
483
483
  primary: "primary",
484
484
  secondary: "secondary",
485
485
  success: "success",
@@ -508,22 +508,22 @@ const Te = {
508
508
  }, _e = A.forwardRef(
509
509
  ({
510
510
  label: e,
511
- boxSize: r = "md",
512
- shape: n = "rounded",
513
- variant: t = "success",
511
+ boxSize: n = "md",
512
+ shape: t = "rounded",
513
+ variant: r = "success",
514
514
  onSelectionChange: s,
515
- disabled: d = !1,
515
+ disabled: c = !1,
516
516
  className: p = "",
517
- id: u,
518
- value: c,
517
+ id: f,
518
+ value: d,
519
519
  icon: a,
520
520
  children: o,
521
521
  checked: l,
522
- ...f
522
+ ...u
523
523
  }, g) => {
524
524
  const b = (m) => {
525
- !d && s && s(m.target.checked), f.onChange && f.onChange(m);
526
- }, x = "mr-2 border flex items-center justify-center transition-all", k = Te[r], $ = Re[n], N = Be[t] ?? "", w = t.startsWith("outline"), h = t.startsWith("soft"), I = `${x} ${k} ${$} ${N} ${l && (w || h || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, E = {
525
+ !c && s && s(m.target.checked), u.onChange && u.onChange(m);
526
+ }, x = "mr-2 border flex items-center justify-center transition-all", k = Te[n], $ = Be[t], N = Re[r] ?? "", w = r.startsWith("outline"), y = r.startsWith("soft"), P = `${x} ${k} ${$} ${N} ${l && (w || y || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, L = {
527
527
  xs: "w-2 h-2",
528
528
  sm: "w-2.5 h-2.5",
529
529
  md: "w-3 h-3",
@@ -532,7 +532,7 @@ const Te = {
532
532
  return /* @__PURE__ */ S(
533
533
  "label",
534
534
  {
535
- className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${p}`,
535
+ className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${p}`,
536
536
  children: [
537
537
  /* @__PURE__ */ i(
538
538
  "input",
@@ -541,14 +541,14 @@ const Te = {
541
541
  className: "peer hidden",
542
542
  checked: l,
543
543
  onChange: b,
544
- disabled: d,
545
- id: u,
546
- value: c,
544
+ disabled: c,
545
+ id: f,
546
+ value: d,
547
547
  ref: g,
548
- ...f
548
+ ...u
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ i("span", { className: I.trim(), children: (l || f.defaultChecked) && (a ?? /* @__PURE__ */ i(Me, { className: `${E[r]}` })) }),
551
+ /* @__PURE__ */ i("span", { className: P.trim(), children: (l || u.defaultChecked) && (a ?? /* @__PURE__ */ i(Me, { className: `${L[n]}` })) }),
552
552
  e || o ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? o }) : null
553
553
  ]
554
554
  }
@@ -558,50 +558,50 @@ const Te = {
558
558
  _e.displayName = "Checkbox";
559
559
  const Ve = ({
560
560
  label: e,
561
- header: r,
562
- items: n = [],
563
- onSelect: t,
561
+ header: n,
562
+ items: t = [],
563
+ onSelect: r,
564
564
  renderItem: s,
565
- position: d = "right",
565
+ position: c = "right",
566
566
  className: p = "",
567
- menuClassName: u = "",
568
- width: c = "w-48",
567
+ menuClassName: f = "",
568
+ width: d = "w-48",
569
569
  closeOnSelect: a = !1,
570
570
  transition: o = !0,
571
571
  ariaLabel: l = "Dropdown menu",
572
- ...f
572
+ ...u
573
573
  }) => {
574
- const [g, b] = D(!1), [x, k] = D(!1), $ = F(null), N = F(null), w = j(() => ({
574
+ const [g, b] = z(!1), [x, k] = z(!1), $ = F(null), N = F(null), w = j(() => ({
575
575
  left: "left-0",
576
576
  center: "left-1/2 transform -translate-x-1/2",
577
577
  right: "right-0"
578
- })[d], [d]), h = z(() => {
578
+ })[c], [c]), y = D(() => {
579
579
  const m = N.current, C = $.current;
580
580
  if (!m || !C) return;
581
- const { top: O, bottom: M } = m.getBoundingClientRect(), B = C.offsetHeight, T = window.innerHeight - M, _ = O;
582
- k(T < B && _ > B);
583
- }, []), y = z((m) => {
581
+ const { top: O, bottom: M } = m.getBoundingClientRect(), R = C.offsetHeight, T = window.innerHeight - M, _ = O;
582
+ k(T < R && _ > R);
583
+ }, []), h = D((m) => {
584
584
  var C, O;
585
585
  !((C = $.current) != null && C.contains(m.target)) && !((O = N.current) != null && O.contains(m.target)) && b(!1);
586
- }, []), v = z(() => b((m) => !m), []), I = z(() => b(!1), []);
587
- R(() => {
586
+ }, []), v = D(() => b((m) => !m), []), P = D(() => b(!1), []);
587
+ B(() => {
588
588
  if (g)
589
- return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
590
- window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
589
+ return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
590
+ window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
591
591
  };
592
- }, [g, h]), R(() => (document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y)), [y]);
593
- const E = j(
592
+ }, [g, y]), B(() => (document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h)), [h]);
593
+ const L = j(
594
594
  () => [
595
595
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
596
596
  x ? "bottom-full mb-2" : "top-full mt-2",
597
597
  w,
598
- c,
598
+ d,
599
599
  o && "transition-all duration-200 ease-out",
600
- u
600
+ f
601
601
  ].filter(Boolean).join(" "),
602
- [x, w, c, o, u]
602
+ [x, w, d, o, f]
603
603
  );
604
- return /* @__PURE__ */ S("div", { className: `relative inline-block ${p}`, ...f, children: [
604
+ return /* @__PURE__ */ S("div", { className: `relative inline-block ${p}`, ...u, children: [
605
605
  /* @__PURE__ */ i(
606
606
  "button",
607
607
  {
@@ -614,11 +614,11 @@ const Ve = ({
614
614
  children: e
615
615
  }
616
616
  ),
617
- g && /* @__PURE__ */ S("div", { ref: $, role: "menu", className: E, children: [
618
- r && r,
619
- n.map((m, C) => {
617
+ g && /* @__PURE__ */ S("div", { ref: $, role: "menu", className: L, children: [
618
+ n && n,
619
+ t.map((m, C) => {
620
620
  const O = () => {
621
- t && t(m), a && I();
621
+ r && r(m), a && P();
622
622
  };
623
623
  return /* @__PURE__ */ i("div", { children: s ? s(m, O) : /* @__PURE__ */ i(
624
624
  "div",
@@ -634,26 +634,26 @@ const Ve = ({
634
634
  ] });
635
635
  }, et = ({
636
636
  children: e,
637
- content: r,
638
- position: n = "top",
639
- className: t = "",
637
+ content: n,
638
+ position: t = "top",
639
+ className: r = "",
640
640
  tooltipClass: s = "",
641
- tooltipStyle: d = {}
641
+ tooltipStyle: c = {}
642
642
  }) => {
643
- const p = F(null), u = F(null);
644
- R(() => {
645
- const a = p.current, o = u.current;
643
+ const p = F(null), f = F(null);
644
+ B(() => {
645
+ const a = p.current, o = f.current;
646
646
  if (!a || !o) return;
647
647
  const l = () => {
648
648
  o.style.opacity = "1", o.style.visibility = "visible";
649
- }, f = () => {
649
+ }, u = () => {
650
650
  o.style.opacity = "0", o.style.visibility = "hidden";
651
651
  };
652
- return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", f), () => {
653
- a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", f);
652
+ return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", u), () => {
653
+ a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", u);
654
654
  };
655
655
  }, []);
656
- const c = (a) => {
656
+ const d = (a) => {
657
657
  const o = {
658
658
  position: "absolute",
659
659
  opacity: 0,
@@ -708,19 +708,19 @@ const Ve = ({
708
708
  return o;
709
709
  }
710
710
  };
711
- return /* @__PURE__ */ S("div", { ref: p, className: `relative inline-block ${t}`, children: [
711
+ return /* @__PURE__ */ S("div", { ref: p, className: `relative inline-block ${r}`, children: [
712
712
  e,
713
713
  /* @__PURE__ */ i(
714
714
  "div",
715
715
  {
716
- ref: u,
716
+ ref: f,
717
717
  role: "tooltip",
718
718
  className: s,
719
719
  style: {
720
- ...c(n),
721
- ...d
720
+ ...d(t),
721
+ ...c
722
722
  },
723
- children: r
723
+ children: n
724
724
  }
725
725
  )
726
726
  ] });
@@ -755,20 +755,20 @@ const Ve = ({
755
755
  circle: "rounded-full p-2 w-8 h-8 justify-center"
756
756
  }, tt = ({
757
757
  label: e,
758
- variant: r = "primary",
759
- size: n = "sm",
760
- shape: t = "rounded",
758
+ variant: n = "primary",
759
+ size: t = "sm",
760
+ shape: r = "rounded",
761
761
  icon: s,
762
- dismissible: d,
762
+ dismissible: c,
763
763
  onDismiss: p,
764
- className: u = "",
765
- ...c
764
+ className: f = "",
765
+ ...d
766
766
  }) => {
767
- const a = !e && !!s, o = `inline-flex items-center font-medium ${Fe[r] || ""} ${Ke[n] || ""} ${Ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + u;
768
- return /* @__PURE__ */ S("span", { className: o.trim(), ...c, children: [
767
+ 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" : ""} ` + f;
768
+ return /* @__PURE__ */ S("span", { className: o.trim(), ...d, children: [
769
769
  s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
770
770
  e,
771
- d && /* @__PURE__ */ i(
771
+ c && /* @__PURE__ */ i(
772
772
  "button",
773
773
  {
774
774
  type: "button",
@@ -801,46 +801,46 @@ const Ve = ({
801
801
  };
802
802
  function nt({
803
803
  options: e,
804
- selected: r,
805
- onChange: n,
806
- label: t,
804
+ selected: n,
805
+ onChange: t,
806
+ label: r,
807
807
  disabled: s = !1,
808
- shape: d = "rounded",
808
+ shape: c = "rounded",
809
809
  variant: p = "primary",
810
- size: u = "md",
811
- className: c = "",
810
+ size: f = "md",
811
+ className: d = "",
812
812
  classNames: a = {},
813
813
  id: o,
814
814
  name: l,
815
- renderOption: f
815
+ renderOption: u
816
816
  }) {
817
- const g = re[d] || re.rounded, b = se[u] || se.md, x = F(null), [k, $] = D({});
818
- R(() => {
817
+ const g = re[c] || re.rounded, b = se[f] || se.md, x = F(null), [k, $] = z({});
818
+ B(() => {
819
819
  if (!x.current) return;
820
- const w = e.findIndex((v) => v.value === r);
820
+ const w = e.findIndex((v) => v.value === n);
821
821
  if (w === -1) return;
822
- const y = x.current.querySelectorAll("button")[w];
823
- if (y) {
824
- const { offsetLeft: v, offsetWidth: I, offsetHeight: E } = y;
822
+ const h = x.current.querySelectorAll("button")[w];
823
+ if (h) {
824
+ const { offsetLeft: v, offsetWidth: P, offsetHeight: L } = h;
825
825
  $({
826
826
  transform: `translateX(${v}px)`,
827
- width: I,
828
- height: E
827
+ width: P,
828
+ height: L
829
829
  });
830
830
  }
831
- }, [r, e, u]);
831
+ }, [n, e, f]);
832
832
  const N = `toggler-${p}`;
833
833
  return /* @__PURE__ */ S(
834
834
  "div",
835
835
  {
836
- className: `flex flex-col gap-2 w-fit ${c} ${a.root ?? ""}`,
836
+ className: `flex flex-col gap-2 w-fit ${d} ${a.root ?? ""}`,
837
837
  id: o,
838
838
  children: [
839
- t && /* @__PURE__ */ i(
839
+ r && /* @__PURE__ */ i(
840
840
  "span",
841
841
  {
842
842
  className: `text-sm font-medium select-none ${a.label ?? ""}`,
843
- children: t
843
+ children: r
844
844
  }
845
845
  ),
846
846
  /* @__PURE__ */ S(
@@ -863,27 +863,27 @@ function nt({
863
863
  }
864
864
  ),
865
865
  e.map((w) => {
866
- const h = r === w.value, y = s || w.disabled;
866
+ const y = n === w.value, h = s || w.disabled;
867
867
  return /* @__PURE__ */ i(
868
868
  "button",
869
869
  {
870
870
  role: "radio",
871
871
  name: l,
872
- "aria-checked": h,
873
- disabled: y,
874
- onClick: () => !y && n(w.value),
872
+ "aria-checked": y,
873
+ disabled: h,
874
+ onClick: () => !h && t(w.value),
875
875
  onKeyDown: (v) => {
876
- (v.key === "Enter" || v.key === " ") && !y && (v.preventDefault(), n(w.value));
876
+ (v.key === "Enter" || v.key === " ") && !h && (v.preventDefault(), t(w.value));
877
877
  },
878
878
  className: `
879
879
  relative z-10
880
880
  transition-colors duration-200 focus:outline-none
881
881
  ${b.button}
882
- ${h ? `text-white toggler-text-${p}` : "text-gray-700 hover:bg-gray-200"}
882
+ ${y ? `text-white toggler-text-${p}` : "text-gray-700 hover:bg-gray-200"}
883
883
  ${a.option ?? ""}
884
- ${h ? a.selectedOption ?? "" : ""}
884
+ ${y ? a.selectedOption ?? "" : ""}
885
885
  `,
886
- children: f ? f(w, h) : w.label
886
+ children: u ? u(w, y) : w.label
887
887
  },
888
888
  String(w.value)
889
889
  );
@@ -900,35 +900,35 @@ function He(e) {
900
900
  }
901
901
  const rt = ({
902
902
  items: e,
903
- allowMultipleOpen: r = !1,
904
- className: n = "",
905
- tileClasses: t = "",
903
+ allowMultipleOpen: n = !1,
904
+ className: t = "",
905
+ tileClasses: r = "",
906
906
  open: s,
907
- onChange: d,
907
+ onChange: c,
908
908
  renderTitle: p,
909
- renderContent: u,
910
- showArrowIcon: c = !0,
909
+ renderContent: f,
910
+ showArrowIcon: d = !0,
911
911
  panelClasses: a = ""
912
912
  }) => {
913
- const [o, l] = D(/* @__PURE__ */ new Set()), f = j(() => s ? new Set(s) : o, [s, o]), g = z(
913
+ const [o, l] = z(/* @__PURE__ */ new Set()), u = j(() => s ? new Set(s) : o, [s, o]), g = D(
914
914
  (b) => {
915
- const x = new Set(f);
916
- x.has(b) ? x.delete(b) : (r || x.clear(), x.add(b)), s && d ? d(Array.from(x)) : l(x);
915
+ const x = new Set(u);
916
+ x.has(b) ? x.delete(b) : (n || x.clear(), x.add(b)), s && c ? c(Array.from(x)) : l(x);
917
917
  },
918
- [f, s, d, r]
918
+ [u, s, c, n]
919
919
  );
920
920
  return /* @__PURE__ */ i(
921
921
  "div",
922
922
  {
923
923
  className: "accordion",
924
924
  role: "region",
925
- "aria-multiselectable": r,
925
+ "aria-multiselectable": n,
926
926
  children: e.map((b) => {
927
- const x = f.has(b.id), k = `accordion-heading-${b.id}`, $ = `accordion-panel-${b.id}`;
927
+ const x = u.has(b.id), k = `accordion-heading-${b.id}`, $ = `accordion-panel-${b.id}`;
928
928
  return /* @__PURE__ */ S(
929
929
  "div",
930
930
  {
931
- className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${n}`,
931
+ className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,
932
932
  children: [
933
933
  /* @__PURE__ */ S(
934
934
  "button",
@@ -938,10 +938,10 @@ const rt = ({
938
938
  "aria-expanded": x,
939
939
  "aria-controls": $,
940
940
  onClick: () => g(b.id),
941
- className: `flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${t}`,
941
+ className: `flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${r}`,
942
942
  children: [
943
943
  p ? p(b, x) : b.title,
944
- c ? /* @__PURE__ */ i(He, {}) : null
944
+ d ? /* @__PURE__ */ i(He, {}) : null
945
945
  ]
946
946
  }
947
947
  ),
@@ -953,7 +953,7 @@ const rt = ({
953
953
  "aria-labelledby": k,
954
954
  hidden: !x,
955
955
  className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
956
- children: u ? u(b, x) : b.content
956
+ children: f ? f(b, x) : b.content
957
957
  }
958
958
  )
959
959
  ]
@@ -973,22 +973,22 @@ const rt = ({
973
973
  }, fe = ae(null), pe = () => le(fe);
974
974
  function st({
975
975
  id: e,
976
- title: r,
977
- children: n,
978
- standalone: t = !1,
976
+ title: n,
977
+ children: t,
978
+ standalone: r = !1,
979
979
  showFloatingClose: s = !1,
980
- containerClasses: d = "",
980
+ containerClasses: c = "",
981
981
  headerClasses: p = "",
982
- bodyClasses: u = "",
983
- onClose: c,
982
+ bodyClasses: f = "",
983
+ onClose: d,
984
984
  disableEscapeClose: a = !1,
985
985
  closeBtnStyle: o
986
986
  }) {
987
- const l = pe(), f = ue(), g = !t && !!l && !!f, [b, x] = D(!1), k = g ? l.isOpen(e) : b, $ = g ? l.getModalData(e) : null, N = z(() => {
988
- g ? f.closeModal(e) : x(!1), c == null || c();
989
- }, [g, f, e, c]);
990
- return R(() => {
991
- const w = document.activeElement, h = document.getElementById(e), y = [
987
+ const l = pe(), u = ue(), g = !r && !!l && !!u, [b, x] = z(!1), k = g ? l.isOpen(e) : b, $ = g ? l.getModalData(e) : null, N = D(() => {
988
+ g ? u.closeModal(e) : x(!1), d == null || d();
989
+ }, [g, u, e, d]);
990
+ return B(() => {
991
+ const w = document.activeElement, y = document.getElementById(e), h = [
992
992
  "a[href]",
993
993
  "button:not([disabled])",
994
994
  "textarea:not([disabled])",
@@ -996,26 +996,26 @@ function st({
996
996
  "select:not([disabled])",
997
997
  '[tabindex]:not([tabindex="-1"])'
998
998
  ], v = () => {
999
- if (!h) return [];
1000
- const m = h.querySelectorAll(
1001
- y.join(",")
999
+ if (!y) return [];
1000
+ const m = y.querySelectorAll(
1001
+ h.join(",")
1002
1002
  );
1003
1003
  return Array.from(m).filter((C) => C.offsetParent !== null);
1004
- }, I = (m) => {
1004
+ }, P = (m) => {
1005
1005
  if (m.key === "Tab") {
1006
1006
  const C = v();
1007
1007
  if (C.length === 0) return;
1008
1008
  const O = C[0], M = C[C.length - 1];
1009
1009
  m.shiftKey ? document.activeElement === O && (m.preventDefault(), M.focus()) : document.activeElement === M && (m.preventDefault(), O.focus());
1010
1010
  }
1011
- }, E = (m) => {
1012
- m.key === "Escape" && !a && N(), I(m);
1011
+ }, L = (m) => {
1012
+ m.key === "Escape" && !a && N(), P(m);
1013
1013
  };
1014
1014
  return k && (document.body.style.overflow = "hidden", setTimeout(() => {
1015
1015
  const m = v();
1016
1016
  m.length && m[0].focus();
1017
- }, 0), window.addEventListener("keydown", E)), () => {
1018
- document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", E);
1017
+ }, 0), window.addEventListener("keydown", L)), () => {
1018
+ document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", L);
1019
1019
  };
1020
1020
  }, [k, a, N, e]), k ? /* @__PURE__ */ i(
1021
1021
  "div",
@@ -1025,14 +1025,14 @@ function st({
1025
1025
  children: /* @__PURE__ */ S(
1026
1026
  "div",
1027
1027
  {
1028
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
1028
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
1029
1029
  children: [
1030
1030
  /* @__PURE__ */ S(
1031
1031
  "div",
1032
1032
  {
1033
1033
  className: `flex justify-between items-center relative ${p}`,
1034
1034
  children: [
1035
- r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
1035
+ n && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: n }),
1036
1036
  s && /* @__PURE__ */ i(
1037
1037
  "button",
1038
1038
  {
@@ -1045,7 +1045,7 @@ function st({
1045
1045
  ]
1046
1046
  }
1047
1047
  ),
1048
- /* @__PURE__ */ i("div", { className: u, children: typeof n == "function" ? n({ modalData: $ }) : n })
1048
+ /* @__PURE__ */ i("div", { className: f, children: typeof t == "function" ? t({ modalData: $ }) : t })
1049
1049
  ]
1050
1050
  }
1051
1051
  )
@@ -1055,31 +1055,31 @@ function st({
1055
1055
  function ot({
1056
1056
  children: e
1057
1057
  }) {
1058
- const [r, n] = D({}), [t, s] = D({}), d = z((l, f) => {
1059
- n((g) => ({ ...g, [l]: !0 })), f && s((g) => ({ ...g, [l]: f }));
1060
- }, []), p = z((l) => {
1061
- n((f) => ({ ...f, [l]: !1 })), s((f) => {
1062
- const g = { ...f };
1058
+ const [n, t] = z({}), [r, s] = z({}), c = D((l, u) => {
1059
+ t((g) => ({ ...g, [l]: !0 })), u && s((g) => ({ ...g, [l]: u }));
1060
+ }, []), p = D((l) => {
1061
+ t((u) => ({ ...u, [l]: !1 })), s((u) => {
1062
+ const g = { ...u };
1063
1063
  return delete g[l], g;
1064
1064
  });
1065
- }, []), u = z((l) => !!r[l], [r]), c = z(
1066
- (l) => t[l],
1067
- [t]
1065
+ }, []), f = D((l) => !!n[l], [n]), d = D(
1066
+ (l) => r[l],
1067
+ [r]
1068
1068
  ), a = j(
1069
- () => ({ openModal: d, closeModal: p }),
1070
- [d, p]
1069
+ () => ({ openModal: c, closeModal: p }),
1070
+ [c, p]
1071
1071
  ), o = j(
1072
- () => ({ isOpen: u, getModalData: c }),
1073
- [u, c]
1072
+ () => ({ isOpen: f, getModalData: d }),
1073
+ [f, d]
1074
1074
  );
1075
1075
  return /* @__PURE__ */ i(de.Provider, { value: a, children: /* @__PURE__ */ i(fe.Provider, { value: o, children: e }) });
1076
1076
  }
1077
1077
  function at(e) {
1078
- const { openModal: r, closeModal: n } = ue(), { isOpen: t, getModalData: s } = pe();
1078
+ const { openModal: n, closeModal: t } = ue(), { isOpen: r, getModalData: s } = pe();
1079
1079
  return {
1080
- open: (d) => r(e, d),
1081
- close: () => n(e),
1082
- isOpen: t(e),
1080
+ open: (c) => n(e, c),
1081
+ close: () => t(e),
1082
+ isOpen: r(e),
1083
1083
  data: s(e)
1084
1084
  };
1085
1085
  }
@@ -1093,54 +1093,60 @@ function lt(e) {
1093
1093
  function Ge() {
1094
1094
  return J;
1095
1095
  }
1096
- function it(e, r, n = 3e3, t) {
1097
- Y ? Y(e, r, n, t) : console.warn("Toast system is not mounted");
1096
+ function it(e, n, t = 3e3, r) {
1097
+ Y ? Y(e, n, t, r) : console.warn("Toast system is not mounted");
1098
1098
  }
1099
1099
  function qe(e) {
1100
1100
  return Q({ attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor" }, child: [] }] })(e);
1101
1101
  }
1102
1102
  const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1103
- const r = Math.random() * 16 | 0;
1104
- return (e === "x" ? r : r & 3 | 8).toString(16);
1105
- }), ct = () => {
1106
- const [e, r] = D([]);
1107
- R(() => {
1108
- We((t, s, d, p) => {
1109
- const u = Ue();
1110
- r((c) => [...c, { id: u, type: t, message: s, config: p }]), setTimeout(() => {
1111
- r((c) => c.filter((a) => a.id !== u));
1112
- }, d);
1103
+ const n = Math.random() * 16 | 0;
1104
+ return (e === "x" ? n : n & 3 | 8).toString(16);
1105
+ }), ct = ({ containerStyle: e = "" }) => {
1106
+ const [n, t] = z([]);
1107
+ B(() => {
1108
+ We((s, c, p, f) => {
1109
+ const d = Ue();
1110
+ t((a) => [...a, { id: d, type: s, message: c, config: f }]), setTimeout(() => {
1111
+ t((a) => a.filter((o) => o.id !== d));
1112
+ }, p);
1113
1113
  });
1114
1114
  }, []);
1115
- const n = Ge();
1116
- return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
1117
- var c, a, o, l, f, g, b, x, k, $, N, w, h;
1118
- const s = ((c = t.config) == null ? void 0 : c.icon) || ((a = n.icons) == null ? void 0 : a[t.type]) || Xe(t.type), d = ((o = t.config) == null ? void 0 : o.bgColor) || ((f = (l = n.colors) == null ? void 0 : l[t.type]) == null ? void 0 : f.bg) || "bg-white dark:bg-gray-800", p = ((g = t.config) == null ? void 0 : g.textColor) || ((x = (b = n.colors) == null ? void 0 : b[t.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", u = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
1119
- return /* @__PURE__ */ S(
1120
- "div",
1121
- {
1122
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${p}`,
1123
- children: [
1124
- /* @__PURE__ */ i("div", { className: u, children: s }),
1125
- /* @__PURE__ */ S("div", { className: "flex-1 me-3", children: [
1126
- (($ = t.config) == null ? void 0 : $.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
1127
- ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
1128
- !((w = t.config) != null && w.title) && !((h = t.config) != null && h.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
1129
- ] }),
1130
- /* @__PURE__ */ i(
1131
- "button",
1132
- {
1133
- onClick: () => r((y) => y.filter((v) => v.id !== t.id)),
1134
- className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
1135
- "aria-label": "Close",
1136
- children: /* @__PURE__ */ i(qe, { size: 18 })
1137
- }
1138
- )
1139
- ]
1140
- },
1141
- t.id
1142
- );
1143
- }) });
1115
+ const r = Ge();
1116
+ return /* @__PURE__ */ i(
1117
+ "div",
1118
+ {
1119
+ className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
1120
+ children: n.map((s) => {
1121
+ var a, o, l, u, g, b, x, k, $, N, w, y, h, v;
1122
+ 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) || ((g = (u = r.colors) == null ? void 0 : u[s.type]) == null ? void 0 : g.bg) || "bg-white dark:bg-gray-800", f = ((b = s.config) == null ? void 0 : b.textColor) || ((k = (x = r.colors) == null ? void 0 : x[s.type]) == null ? void 0 : k.text) || "text-gray-700 dark:text-gray-300", d = (($ = s.config) == null ? void 0 : $.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
1123
+ return /* @__PURE__ */ S(
1124
+ "div",
1125
+ {
1126
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${p} ${f} ${(N = s.config) == null ? void 0 : N.containerBody}`,
1127
+ children: [
1128
+ c && /* @__PURE__ */ i("div", { className: d, children: c }),
1129
+ /* @__PURE__ */ S("div", { className: "flex-1 me-3", children: [
1130
+ ((w = s.config) == null ? void 0 : w.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: s.config.title }),
1131
+ ((y = s.config) == null ? void 0 : y.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: s.config.description }),
1132
+ !((h = s.config) != null && h.title) && !((v = s.config) != null && v.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: s.message })
1133
+ ] }),
1134
+ /* @__PURE__ */ i(
1135
+ "button",
1136
+ {
1137
+ onClick: () => t((P) => P.filter((L) => L.id !== s.id)),
1138
+ className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
1139
+ "aria-label": "Close",
1140
+ children: /* @__PURE__ */ i(qe, { size: 18 })
1141
+ }
1142
+ )
1143
+ ]
1144
+ },
1145
+ s.id
1146
+ );
1147
+ })
1148
+ }
1149
+ );
1144
1150
  };
1145
1151
  function Xe(e) {
1146
1152
  switch (e) {