tailwind-ux-kit 1.0.81 → 1.0.82

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
- import { jsxs as N, jsx as i } from "react/jsx-runtime";
3
- import D, { forwardRef as re, useState as A, useMemo as I, useId as pe, useRef as W, useCallback as z, useEffect as _, createContext as se, useContext as oe } from "react";
2
+ import { jsxs as k, jsx as i } from "react/jsx-runtime";
3
+ import D, { forwardRef as re, useState as A, useMemo as j, useId as pe, useRef as W, useCallback as I, useEffect as B, createContext as se, useContext as oe } 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",
@@ -37,127 +37,127 @@ const V = {
37
37
  const {
38
38
  label: n,
39
39
  id: t,
40
- inputSize: o = "md",
41
- shape: c = "rounded",
42
- validate: d,
40
+ inputSize: s = "md",
41
+ shape: d = "rounded",
42
+ validate: p,
43
43
  onValidatedChange: u,
44
- className: f = "",
45
- icon: l,
46
- iconPosition: s = "left",
44
+ className: l = "",
45
+ icon: c,
46
+ iconPosition: o = "left",
47
47
  floatingLabelStyle: a,
48
- onChange: p,
49
- isValid: b,
50
- isInvalid: g,
51
- feedback: m,
52
- iconClasses: k,
48
+ onChange: f,
49
+ isValid: m,
50
+ isInvalid: b,
51
+ feedback: x,
52
+ iconClasses: C,
53
53
  feedbackType: v = "invalid",
54
- labelClasses: S = "",
55
- inputType: L = "",
56
- inputPattern: h,
57
- ...y
58
- } = e, [O, w] = A("default"), $ = D.useCallback(
54
+ labelClasses: $ = "",
55
+ inputType: N = "",
56
+ inputPattern: y,
57
+ ...w
58
+ } = e, [E, z] = A("default"), O = D.useCallback(
59
59
  (P) => {
60
- const E = P.target.value, K = (d == null ? void 0 : d(E)) ?? "default";
61
- w(K), u == null || u(P, K), p == null || p(P);
60
+ const S = P.target.value, K = (p == null ? void 0 : p(S)) ?? "default";
61
+ z(K), u == null || u(P, K), f == null || f(P);
62
62
  },
63
- [d, u, p]
64
- ), x = I(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!a, j = V[o] || V.md, B = ee[c] || ee.flat, T = I(
65
- () => me(O, b, g),
66
- [O, b, g]
67
- ), M = I(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), R = I(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]), F = (P) => {
63
+ [p, u, f]
64
+ ), g = j(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), h = !!a, L = V[s] || V.md, M = ee[d] || ee.flat, R = j(
65
+ () => me(E, m, b),
66
+ [E, m, b]
67
+ ), T = j(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = j(() => c ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [c, o]), F = (P) => {
68
68
  var Z;
69
- const E = P.key;
70
- !(P.ctrlKey || P.metaKey || E.length !== 1) && (() => {
69
+ const S = P.key;
70
+ !(P.ctrlKey || P.metaKey || S.length !== 1) && (() => {
71
71
  const H = /^\d$/, X = /^[a-zA-Z]$/;
72
- switch (L) {
72
+ switch (N) {
73
73
  case "numeric":
74
74
  case "number":
75
75
  case "integer":
76
- return !H.test(E);
76
+ return !H.test(S);
77
77
  case "decimal":
78
- return !H.test(E) && E !== "." && E !== "Backspace" && E !== "Tab";
78
+ return !H.test(S) && S !== "." && S !== "Backspace" && S !== "Tab";
79
79
  case "alphabetic":
80
- return !X.test(E);
80
+ return !X.test(S);
81
81
  case "custom":
82
- return h ? !h.test(E) : !1;
82
+ return y ? !y.test(S) : !1;
83
83
  default:
84
84
  return !1;
85
85
  }
86
- })() && P.preventDefault(), (Z = y.onKeyDown) == null || Z.call(y, P);
86
+ })() && P.preventDefault(), (Z = w.onKeyDown) == null || Z.call(w, P);
87
87
  }, fe = (P) => {
88
88
  var q;
89
- const E = P.clipboardData.getData("Text");
89
+ const S = P.clipboardData.getData("Text");
90
90
  (() => {
91
91
  const Z = /^\d+$/, H = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
92
- switch (L) {
92
+ switch (N) {
93
93
  case "numeric":
94
94
  case "number":
95
95
  case "integer":
96
- return !Z.test(E);
96
+ return !Z.test(S);
97
97
  case "decimal":
98
- return !H.test(E);
98
+ return !H.test(S);
99
99
  case "alphabetic":
100
- return !X.test(E);
100
+ return !X.test(S);
101
101
  case "custom":
102
- return h ? !h.test(E) : !1;
102
+ return y ? !y.test(S) : !1;
103
103
  default:
104
104
  return !1;
105
105
  }
106
- })() && P.preventDefault(), (q = y.onPaste) == null || q.call(y, P);
106
+ })() && P.preventDefault(), (q = w.onPaste) == null || q.call(w, P);
107
107
  };
108
- return /* @__PURE__ */ N(
108
+ return /* @__PURE__ */ k(
109
109
  "div",
110
110
  {
111
- className: `w-full relative ${C ? "z-0" : ""} tailwind-ux-input`,
111
+ className: `w-full relative ${h ? "z-0" : ""} tailwind-ux-input`,
112
112
  children: [
113
- !C && n && /* @__PURE__ */ i(
113
+ !h && n && /* @__PURE__ */ i(
114
114
  "label",
115
115
  {
116
- htmlFor: x,
117
- className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${S}`,
116
+ htmlFor: g,
117
+ className: `block mb-1 text-sm ${m ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${$}`,
118
118
  children: n
119
119
  }
120
120
  ),
121
- /* @__PURE__ */ N("div", { className: "relative w-full", children: [
122
- l && /* @__PURE__ */ i(
121
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
122
+ c && /* @__PURE__ */ i(
123
123
  "div",
124
124
  {
125
- className: `absolute inset-y-0 flex items-center ${M} ${k}`,
125
+ className: `absolute inset-y-0 flex items-center ${T} ${C}`,
126
126
  "aria-hidden": "true",
127
- children: l
127
+ children: c
128
128
  }
129
129
  ),
130
130
  /* @__PURE__ */ i(
131
131
  "input",
132
132
  {
133
- ...y,
134
- id: x,
133
+ ...w,
134
+ id: g,
135
135
  ref: r,
136
- placeholder: C ? " " : y.placeholder,
137
- onChange: $,
136
+ placeholder: h ? " " : w.placeholder,
137
+ onChange: O,
138
138
  onKeyDown: F,
139
139
  onPaste: fe,
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
- ${j}
142
- ${C && a && ge[a]}
143
- ${R} ${B} ${T} ${f}`
141
+ ${L}
142
+ ${h && a && ge[a]}
143
+ ${_} ${M} ${R} ${l}`
144
144
  }
145
145
  ),
146
- C && n && a && /* @__PURE__ */ i(
146
+ h && n && a && /* @__PURE__ */ i(
147
147
  "label",
148
148
  {
149
- htmlFor: x,
150
- className: `ms-1 ${be[a]} ${f}`,
149
+ htmlFor: g,
150
+ className: `ms-1 ${be[a]} ${l}`,
151
151
  children: n
152
152
  }
153
153
  )
154
154
  ] }),
155
- m && /* @__PURE__ */ i(
155
+ x && /* @__PURE__ */ i(
156
156
  "p",
157
157
  {
158
158
  className: `mt-1 text-xs ${v === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
159
159
  role: v === "invalid" ? "alert" : void 0,
160
- children: m
160
+ children: x
161
161
  }
162
162
  )
163
163
  ]
@@ -202,70 +202,70 @@ const he = {
202
202
  const {
203
203
  label: n,
204
204
  id: t,
205
- inputSize: o = "md",
206
- shape: c = "rounded",
207
- validate: d,
205
+ inputSize: s = "md",
206
+ shape: d = "rounded",
207
+ validate: p,
208
208
  onValidatedChange: u,
209
- className: f = "",
210
- icon: l,
211
- iconPosition: s = "left",
209
+ className: l = "",
210
+ icon: c,
211
+ iconPosition: o = "left",
212
212
  floatingLabelStyle: a,
213
- onChange: p,
214
- isValid: b,
215
- isInvalid: g,
216
- feedback: m,
217
- feedbackType: k = "invalid",
213
+ onChange: f,
214
+ isValid: m,
215
+ isInvalid: b,
216
+ feedback: x,
217
+ feedbackType: C = "invalid",
218
218
  children: v,
219
- ...S
220
- } = e, [L, h] = A("default"), y = pe(), O = I(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : y), [t, n, y]), w = (M) => {
221
- const R = M.target.value, F = (d == null ? void 0 : d(R)) ?? "default";
222
- h(F), u == null || u(M, F), p == null || p(M);
223
- }, $ = !!a, x = he[o], C = ye[c], j = Ce(L, b, g);
224
- return /* @__PURE__ */ N("div", { className: `w-full relative ${$ ? "z-0" : ""}`, children: [
225
- !$ && n && /* @__PURE__ */ i(
219
+ ...$
220
+ } = e, [N, y] = A("default"), w = pe(), E = j(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : w), [t, n, w]), z = (T) => {
221
+ const _ = T.target.value, F = (p == null ? void 0 : p(_)) ?? "default";
222
+ y(F), u == null || u(T, F), f == null || f(T);
223
+ }, O = !!a, g = he[s], h = ye[d], L = Ce(N, m, b);
224
+ return /* @__PURE__ */ k("div", { className: `w-full relative ${O ? "z-0" : ""}`, children: [
225
+ !O && n && /* @__PURE__ */ i(
226
226
  "label",
227
227
  {
228
- htmlFor: O,
229
- className: `block mb-1 text-sm ${b ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
228
+ htmlFor: E,
229
+ className: `block mb-1 text-sm ${m ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
230
230
  children: n
231
231
  }
232
232
  ),
233
- /* @__PURE__ */ N("div", { className: "relative w-full", children: [
234
- l && /* @__PURE__ */ i(
233
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
234
+ c && /* @__PURE__ */ i(
235
235
  "div",
236
236
  {
237
- className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
238
- children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
237
+ className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
238
+ children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: c })
239
239
  }
240
240
  ),
241
241
  /* @__PURE__ */ i(
242
242
  "select",
243
243
  {
244
- ...S,
245
- id: O,
244
+ ...$,
245
+ id: E,
246
246
  ref: r,
247
- onChange: w,
247
+ onChange: z,
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
- ${x} ${l && (s === "start" || s === "left") ? "ps-10" : l ? "pe-10" : ""}
250
- ${$ && a && we[a]}
251
- ${C} ${j} ${f}`,
249
+ ${g} ${c && (o === "start" || o === "left") ? "ps-10" : c ? "pe-10" : ""}
250
+ ${O && a && we[a]}
251
+ ${h} ${L} ${l}`,
252
252
  children: v
253
253
  }
254
254
  ),
255
- $ && n && a && /* @__PURE__ */ i(
255
+ O && n && a && /* @__PURE__ */ i(
256
256
  "label",
257
257
  {
258
- htmlFor: O,
259
- className: `ms-1 ${ve[a]} ${f}`,
258
+ htmlFor: E,
259
+ className: `ms-1 ${ve[a]} ${l}`,
260
260
  children: n
261
261
  }
262
262
  )
263
263
  ] }),
264
- m && /* @__PURE__ */ i(
264
+ x && /* @__PURE__ */ i(
265
265
  "p",
266
266
  {
267
- className: `mt-1 text-xs ${k === "invalid" ? "text-red-600" : "text-green-600"}`,
268
- children: m
267
+ className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
268
+ children: x
269
269
  }
270
270
  )
271
271
  ] });
@@ -313,23 +313,23 @@ const $e = {
313
313
  variant: r = "primary",
314
314
  size: n = "md",
315
315
  type: t = "button",
316
- shape: o = "rounded",
317
- className: c = "",
318
- isLoading: d = !1,
316
+ shape: s = "rounded",
317
+ className: d = "",
318
+ isLoading: p = !1,
319
319
  disabled: u = !1,
320
- ...f
320
+ ...l
321
321
  }) => {
322
- const l = u || d, s = [
322
+ const c = u || p, o = [
323
323
  "inline-flex items-center justify-center font-normal transition duration-150",
324
324
  $e[r],
325
325
  Ne[n],
326
- Se[o],
327
- o === "flat" ? "shadow-none" : "shadow-sm",
328
- l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
329
- c
326
+ Se[s],
327
+ s === "flat" ? "shadow-none" : "shadow-sm",
328
+ c ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
329
+ d
330
330
  ].filter(Boolean).join(" ");
331
- return /* @__PURE__ */ N("button", { type: t, className: s, disabled: l, ...f, children: [
332
- d && /* @__PURE__ */ N(
331
+ return /* @__PURE__ */ k("button", { type: t, className: o, disabled: c, ...l, children: [
332
+ p && /* @__PURE__ */ k(
333
333
  "svg",
334
334
  {
335
335
  "aria-hidden": "true",
@@ -368,11 +368,11 @@ var ae = {
368
368
  }, te = D.createContext && /* @__PURE__ */ D.createContext(ae), Ee = ["attr", "size", "title"];
369
369
  function Le(e, r) {
370
370
  if (e == null) return {};
371
- var n = Oe(e, r), t, o;
371
+ var n = Oe(e, r), t, s;
372
372
  if (Object.getOwnPropertySymbols) {
373
- var c = Object.getOwnPropertySymbols(e);
374
- for (o = 0; o < c.length; o++)
375
- t = c[o], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
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]);
376
376
  }
377
377
  return n;
378
378
  }
@@ -400,8 +400,8 @@ function ne(e, r) {
400
400
  var n = Object.keys(e);
401
401
  if (Object.getOwnPropertySymbols) {
402
402
  var t = Object.getOwnPropertySymbols(e);
403
- r && (t = t.filter(function(o) {
404
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
403
+ r && (t = t.filter(function(s) {
404
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
405
405
  })), n.push.apply(n, t);
406
406
  }
407
407
  return n;
@@ -448,22 +448,22 @@ function ze(e) {
448
448
  var r = (n) => {
449
449
  var {
450
450
  attr: t,
451
- size: o,
452
- title: c
453
- } = e, d = Le(e, Ee), u = o || n.size || "1em", f;
454
- return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ D.createElement("svg", G({
451
+ size: s,
452
+ title: d
453
+ } = e, p = Le(e, Ee), u = s || n.size || "1em", l;
454
+ return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ D.createElement("svg", G({
455
455
  stroke: "currentColor",
456
456
  fill: "currentColor",
457
457
  strokeWidth: "0"
458
- }, n.attr, t, d, {
459
- className: f,
458
+ }, n.attr, t, p, {
459
+ className: l,
460
460
  style: U(U({
461
461
  color: e.color || n.color
462
462
  }, n.style), e.style),
463
463
  height: u,
464
464
  width: u,
465
465
  xmlns: "http://www.w3.org/2000/svg"
466
- }), c && /* @__PURE__ */ D.createElement("title", null, c), e.children);
466
+ }), d && /* @__PURE__ */ D.createElement("title", null, d), e.children);
467
467
  };
468
468
  return te !== void 0 ? /* @__PURE__ */ D.createElement(te.Consumer, null, (n) => r(n)) : r(ae);
469
469
  }
@@ -511,28 +511,28 @@ const Ae = {
511
511
  boxSize: r = "md",
512
512
  shape: n = "rounded",
513
513
  variant: t = "success",
514
- onSelectionChange: o,
515
- disabled: c = !1,
516
- className: d = "",
514
+ onSelectionChange: s,
515
+ disabled: d = !1,
516
+ className: p = "",
517
517
  id: u,
518
- value: f,
519
- icon: l,
520
- children: s,
518
+ value: l,
519
+ icon: c,
520
+ children: o,
521
521
  checked: a,
522
- ...p
523
- }, b) => {
524
- const g = (x) => {
525
- !c && o && o(x.target.checked), p.onChange && p.onChange(x);
526
- }, m = "mr-2 border flex items-center justify-center transition-all", k = Ae[r], v = Me[n], S = Te[t] ?? "", L = t.startsWith("outline"), h = t.startsWith("soft"), w = `${m} ${k} ${v} ${S} ${a && (L || h || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, $ = {
522
+ ...f
523
+ }, m) => {
524
+ const b = (g) => {
525
+ !d && s && s(g.target.checked), f.onChange && f.onChange(g);
526
+ }, x = "mr-2 border flex items-center justify-center transition-all", C = Ae[r], v = Me[n], $ = Te[t] ?? "", N = t.startsWith("outline"), y = t.startsWith("soft"), z = `${x} ${C} ${v} ${$} ${a && (N || y || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, O = {
527
527
  xs: "w-2 h-2",
528
528
  sm: "w-2.5 h-2.5",
529
529
  md: "w-3 h-3",
530
530
  lg: "w-3.5 h-3.5"
531
531
  };
532
- return /* @__PURE__ */ N(
532
+ return /* @__PURE__ */ k(
533
533
  "label",
534
534
  {
535
- className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
535
+ className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${p}`,
536
536
  children: [
537
537
  /* @__PURE__ */ i(
538
538
  "input",
@@ -540,16 +540,16 @@ const Ae = {
540
540
  type: "checkbox",
541
541
  className: "peer hidden",
542
542
  checked: a,
543
- onChange: g,
544
- disabled: c,
543
+ onChange: b,
544
+ disabled: d,
545
545
  id: u,
546
- value: f,
547
- ref: b,
548
- ...p
546
+ value: l,
547
+ ref: m,
548
+ ...f
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ i("span", { className: w.trim(), children: (a || p.defaultChecked) && (l ?? /* @__PURE__ */ i(De, { className: `${$[r]}` })) }),
552
- e || s ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
551
+ /* @__PURE__ */ i("span", { className: z.trim(), children: (a || f.defaultChecked) && (c ?? /* @__PURE__ */ i(De, { className: `${O[r]}` })) }),
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
  }
555
555
  );
@@ -561,74 +561,74 @@ const Je = ({
561
561
  header: r,
562
562
  items: n = [],
563
563
  onSelect: t,
564
- renderItem: o,
565
- position: c = "right",
566
- className: d = "",
564
+ renderItem: s,
565
+ position: d = "right",
566
+ className: p = "",
567
567
  menuClassName: u = "",
568
- width: f = "w-48",
569
- closeOnSelect: l = !1,
570
- transition: s = !0,
568
+ width: l = "w-48",
569
+ closeOnSelect: c = !1,
570
+ transition: o = !0,
571
571
  ariaLabel: a = "Dropdown menu",
572
- ...p
572
+ ...f
573
573
  }) => {
574
- const [b, g] = A(!1), [m, k] = A(!1), v = W(null), S = W(null), L = I(() => ({
574
+ const [m, b] = A(!1), [x, C] = A(!1), v = W(null), $ = W(null), N = j(() => ({
575
575
  left: "left-0",
576
576
  center: "left-1/2 transform -translate-x-1/2",
577
577
  right: "right-0"
578
- })[c], [c]), h = z(() => {
579
- const x = S.current, C = v.current;
580
- if (!x || !C) return;
581
- const { top: j, bottom: B } = x.getBoundingClientRect(), T = C.offsetHeight, M = window.innerHeight - B, R = j;
582
- k(M < T && R > T);
583
- }, []), y = z((x) => {
584
- var C, j;
585
- !((C = v.current) != null && C.contains(x.target)) && !((j = S.current) != null && j.contains(x.target)) && g(!1);
586
- }, []), O = z(() => g((x) => !x), []), w = z(() => g(!1), []);
587
- _(() => {
588
- if (b)
589
- return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
590
- window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
578
+ })[d], [d]), y = I(() => {
579
+ const g = $.current, h = v.current;
580
+ if (!g || !h) return;
581
+ const { top: L, bottom: M } = g.getBoundingClientRect(), R = h.offsetHeight, T = window.innerHeight - M, _ = L;
582
+ C(T < R && _ > R);
583
+ }, []), w = I((g) => {
584
+ var h, L;
585
+ !((h = v.current) != null && h.contains(g.target)) && !((L = $.current) != null && L.contains(g.target)) && b(!1);
586
+ }, []), E = I(() => b((g) => !g), []), z = I(() => b(!1), []);
587
+ B(() => {
588
+ if (m)
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
- }, [b, h]), _(() => (document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y)), [y]);
593
- const $ = I(
592
+ }, [m, y]), B(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
593
+ const O = j(
594
594
  () => [
595
595
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
596
- m ? "bottom-full mb-2" : "top-full mt-2",
597
- L,
598
- f,
599
- s && "transition-all duration-200 ease-out",
596
+ x ? "bottom-full mb-2" : "top-full mt-2",
597
+ N,
598
+ l,
599
+ o && "transition-all duration-200 ease-out",
600
600
  u
601
601
  ].filter(Boolean).join(" "),
602
- [m, L, f, s, u]
602
+ [x, N, l, o, u]
603
603
  );
604
- return /* @__PURE__ */ N("div", { className: `relative inline-block ${d}`, ...p, children: [
604
+ return /* @__PURE__ */ k("div", { className: `relative inline-block ${p}`, ...f, children: [
605
605
  /* @__PURE__ */ i(
606
606
  "button",
607
607
  {
608
608
  type: "button",
609
- ref: S,
610
- onClick: O,
611
- "aria-expanded": b,
609
+ ref: $,
610
+ onClick: E,
611
+ "aria-expanded": m,
612
612
  "aria-label": a,
613
613
  className: "focus:outline-none",
614
614
  children: e
615
615
  }
616
616
  ),
617
- b && /* @__PURE__ */ N("div", { ref: v, role: "menu", className: $, children: [
617
+ m && /* @__PURE__ */ k("div", { ref: v, role: "menu", className: O, children: [
618
618
  r && r,
619
- n.map((x, C) => {
620
- const j = () => {
621
- t && t(x), l && w();
619
+ n.map((g, h) => {
620
+ const L = () => {
621
+ t && t(g), c && z();
622
622
  };
623
- return /* @__PURE__ */ i("div", { children: o ? o(x, j) : /* @__PURE__ */ i(
623
+ return /* @__PURE__ */ i("div", { children: s ? s(g, L) : /* @__PURE__ */ i(
624
624
  "div",
625
625
  {
626
- onClick: j,
626
+ onClick: L,
627
627
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
628
628
  role: "menuitem",
629
- children: x.label
629
+ children: g.label
630
630
  }
631
- ) }, C);
631
+ ) }, h);
632
632
  })
633
633
  ] })
634
634
  ] });
@@ -637,24 +637,24 @@ const Je = ({
637
637
  content: r,
638
638
  position: n = "top",
639
639
  className: t = "",
640
- tooltipClass: o = "",
641
- tooltipStyle: c = {}
640
+ tooltipClass: s = "",
641
+ tooltipStyle: d = {}
642
642
  }) => {
643
- const d = W(null), u = W(null);
644
- _(() => {
645
- const l = d.current, s = u.current;
646
- if (!l || !s) return;
643
+ const p = W(null), u = W(null);
644
+ B(() => {
645
+ const c = p.current, o = u.current;
646
+ if (!c || !o) return;
647
647
  const a = () => {
648
- s.style.opacity = "1", s.style.visibility = "visible";
649
- }, p = () => {
650
- s.style.opacity = "0", s.style.visibility = "hidden";
648
+ o.style.opacity = "1", o.style.visibility = "visible";
649
+ }, f = () => {
650
+ o.style.opacity = "0", o.style.visibility = "hidden";
651
651
  };
652
- return l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", p), () => {
653
- l.removeEventListener("mouseenter", a), l.removeEventListener("mouseleave", p);
652
+ return c.addEventListener("mouseenter", a), c.addEventListener("mouseleave", f), () => {
653
+ c.removeEventListener("mouseenter", a), c.removeEventListener("mouseleave", f);
654
654
  };
655
655
  }, []);
656
- const f = (l) => {
657
- const s = {
656
+ const l = (c) => {
657
+ const o = {
658
658
  position: "absolute",
659
659
  opacity: 0,
660
660
  visibility: "hidden",
@@ -671,10 +671,10 @@ const Je = ({
671
671
  zIndex: 9999,
672
672
  width: "max-content"
673
673
  };
674
- switch (l) {
674
+ switch (c) {
675
675
  case "top":
676
676
  return {
677
- ...s,
677
+ ...o,
678
678
  bottom: "100%",
679
679
  left: "50%",
680
680
  transform: "translateX(-50%)",
@@ -682,7 +682,7 @@ const Je = ({
682
682
  };
683
683
  case "bottom":
684
684
  return {
685
- ...s,
685
+ ...o,
686
686
  top: "100%",
687
687
  left: "50%",
688
688
  transform: "translateX(-50%)",
@@ -690,7 +690,7 @@ const Je = ({
690
690
  };
691
691
  case "left":
692
692
  return {
693
- ...s,
693
+ ...o,
694
694
  right: "100%",
695
695
  top: "50%",
696
696
  transform: "translateY(-50%)",
@@ -698,27 +698,27 @@ const Je = ({
698
698
  };
699
699
  case "right":
700
700
  return {
701
- ...s,
701
+ ...o,
702
702
  left: "100%",
703
703
  top: "50%",
704
704
  transform: "translateY(-50%)",
705
705
  marginLeft: "8px"
706
706
  };
707
707
  default:
708
- return s;
708
+ return o;
709
709
  }
710
710
  };
711
- return /* @__PURE__ */ N("div", { ref: d, className: `relative inline-block ${t}`, children: [
711
+ return /* @__PURE__ */ k("div", { ref: p, className: `relative inline-block ${t}`, children: [
712
712
  e,
713
713
  /* @__PURE__ */ i(
714
714
  "div",
715
715
  {
716
716
  ref: u,
717
717
  role: "tooltip",
718
- className: o,
718
+ className: s,
719
719
  style: {
720
- ...f(n),
721
- ...c
720
+ ...l(n),
721
+ ...d
722
722
  },
723
723
  children: r
724
724
  }
@@ -758,21 +758,21 @@ const Je = ({
758
758
  variant: r = "primary",
759
759
  size: n = "sm",
760
760
  shape: t = "rounded",
761
- icon: o,
762
- dismissible: c,
763
- onDismiss: d,
761
+ icon: s,
762
+ dismissible: d,
763
+ onDismiss: p,
764
764
  className: u = "",
765
- ...f
765
+ ...l
766
766
  }) => {
767
- const l = !e && !!o, s = `inline-flex items-center font-medium ${_e[r] || ""} ${Be[n] || ""} ${Fe[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + u;
768
- return /* @__PURE__ */ N("span", { className: s.trim(), ...f, children: [
769
- o && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: o }),
767
+ const c = !e && !!s, o = `inline-flex items-center font-medium ${_e[r] || ""} ${Be[n] || ""} ${Fe[t] || ""} ${c ? "justify-center p-2 w-8 h-8" : ""} ` + u;
768
+ return /* @__PURE__ */ k("span", { className: o.trim(), ...l, children: [
769
+ s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
770
770
  e,
771
- c && /* @__PURE__ */ i(
771
+ d && /* @__PURE__ */ i(
772
772
  "button",
773
773
  {
774
774
  type: "button",
775
- onClick: d,
775
+ onClick: p,
776
776
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
777
777
  children: "×"
778
778
  }
@@ -787,19 +787,19 @@ const et = ({
787
787
  allowMultipleOpen: r = !1,
788
788
  className: n = "",
789
789
  tileClasses: t = "",
790
- open: o,
791
- onChange: c,
792
- renderTitle: d,
790
+ open: s,
791
+ onChange: d,
792
+ renderTitle: p,
793
793
  renderContent: u,
794
- showArrowIcon: f = !0,
795
- panelClasses: l = ""
794
+ showArrowIcon: l = !0,
795
+ panelClasses: c = ""
796
796
  }) => {
797
- const [s, a] = A(/* @__PURE__ */ new Set()), p = I(() => o ? new Set(o) : s, [o, s]), b = z(
798
- (g) => {
799
- const m = new Set(p);
800
- m.has(g) ? m.delete(g) : (r || m.clear(), m.add(g)), o && c ? c(Array.from(m)) : a(m);
797
+ const [o, a] = A(/* @__PURE__ */ new Set()), f = j(() => s ? new Set(s) : o, [s, o]), m = I(
798
+ (b) => {
799
+ const x = new Set(f);
800
+ x.has(b) ? x.delete(b) : (r || x.clear(), x.add(b)), s && d ? d(Array.from(x)) : a(x);
801
801
  },
802
- [p, o, c, r]
802
+ [f, s, d, r]
803
803
  );
804
804
  return /* @__PURE__ */ i(
805
805
  "div",
@@ -807,25 +807,25 @@ const et = ({
807
807
  className: "accordion",
808
808
  role: "region",
809
809
  "aria-multiselectable": r,
810
- children: e.map((g) => {
811
- const m = p.has(g.id), k = `accordion-heading-${g.id}`, v = `accordion-panel-${g.id}`;
812
- return /* @__PURE__ */ N(
810
+ children: e.map((b) => {
811
+ const x = f.has(b.id), C = `accordion-heading-${b.id}`, v = `accordion-panel-${b.id}`;
812
+ return /* @__PURE__ */ k(
813
813
  "div",
814
814
  {
815
815
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${n}`,
816
816
  children: [
817
- /* @__PURE__ */ N(
817
+ /* @__PURE__ */ k(
818
818
  "button",
819
819
  {
820
- id: k,
820
+ id: C,
821
821
  type: "button",
822
- "aria-expanded": m,
822
+ "aria-expanded": x,
823
823
  "aria-controls": v,
824
- onClick: () => b(g.id),
824
+ onClick: () => m(b.id),
825
825
  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}`,
826
826
  children: [
827
- d ? d(g, m) : g.title,
828
- f ? /* @__PURE__ */ i(Ke, {}) : null
827
+ p ? p(b, x) : b.title,
828
+ l ? /* @__PURE__ */ i(Ke, {}) : null
829
829
  ]
830
830
  }
831
831
  ),
@@ -834,15 +834,15 @@ const et = ({
834
834
  {
835
835
  id: v,
836
836
  role: "region",
837
- "aria-labelledby": k,
838
- hidden: !m,
839
- className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
840
- children: u ? u(g, m) : g.content
837
+ "aria-labelledby": C,
838
+ hidden: !x,
839
+ className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${c}`,
840
+ children: u ? u(b, x) : b.content
841
841
  }
842
842
  )
843
843
  ]
844
844
  },
845
- g.id
845
+ b.id
846
846
  );
847
847
  })
848
848
  }
@@ -860,68 +860,76 @@ function tt({
860
860
  title: r,
861
861
  children: n,
862
862
  standalone: t = !1,
863
- showFloatingClose: o = !1,
864
- containerClasses: c = "",
865
- onClose: d,
866
- disableEscapeClose: u = !1,
867
- closeBtnStyle: f
863
+ showFloatingClose: s = !1,
864
+ containerClasses: d = "",
865
+ headerClasses: p = "",
866
+ bodyClasses: u = "",
867
+ onClose: l,
868
+ disableEscapeClose: c = !1,
869
+ closeBtnStyle: o
868
870
  }) {
869
- const l = ue(), s = ce(), a = !t && !!l && !!s, [p, b] = A(!1), g = a ? l.isOpen(e) : p, m = a ? l.getModalData(e) : null, k = z(() => {
870
- a ? s.closeModal(e) : b(!1), d == null || d();
871
- }, [a, s, e, d]);
872
- return _(() => {
873
- const v = document.activeElement, S = document.getElementById(e), L = [
871
+ const a = ue(), f = ce(), m = !t && !!a && !!f, [b, x] = A(!1), C = m ? a.isOpen(e) : b, v = m ? a.getModalData(e) : null, $ = I(() => {
872
+ m ? f.closeModal(e) : x(!1), l == null || l();
873
+ }, [m, f, e, l]);
874
+ return B(() => {
875
+ const N = document.activeElement, y = document.getElementById(e), w = [
874
876
  "a[href]",
875
877
  "button:not([disabled])",
876
878
  "textarea:not([disabled])",
877
879
  "input:not([disabled])",
878
880
  "select:not([disabled])",
879
881
  '[tabindex]:not([tabindex="-1"])'
880
- ], h = () => {
881
- if (!S) return [];
882
- const w = S.querySelectorAll(
883
- L.join(",")
882
+ ], E = () => {
883
+ if (!y) return [];
884
+ const g = y.querySelectorAll(
885
+ w.join(",")
884
886
  );
885
- return Array.from(w).filter(($) => $.offsetParent !== null);
886
- }, y = (w) => {
887
- if (w.key === "Tab") {
888
- const $ = h();
889
- if ($.length === 0) return;
890
- const x = $[0], C = $[$.length - 1];
891
- w.shiftKey ? document.activeElement === x && (w.preventDefault(), C.focus()) : document.activeElement === C && (w.preventDefault(), x.focus());
887
+ return Array.from(g).filter((h) => h.offsetParent !== null);
888
+ }, z = (g) => {
889
+ if (g.key === "Tab") {
890
+ const h = E();
891
+ if (h.length === 0) return;
892
+ const L = h[0], M = h[h.length - 1];
893
+ g.shiftKey ? document.activeElement === L && (g.preventDefault(), M.focus()) : document.activeElement === M && (g.preventDefault(), L.focus());
892
894
  }
893
- }, O = (w) => {
894
- w.key === "Escape" && !u && k(), y(w);
895
+ }, O = (g) => {
896
+ g.key === "Escape" && !c && $(), z(g);
895
897
  };
896
- return g && (document.body.style.overflow = "hidden", setTimeout(() => {
897
- const w = h();
898
- w.length && w[0].focus();
898
+ return C && (document.body.style.overflow = "hidden", setTimeout(() => {
899
+ const g = E();
900
+ g.length && g[0].focus();
899
901
  }, 0), window.addEventListener("keydown", O)), () => {
900
- document.body.style.overflow = "", v && v.focus(), window.removeEventListener("keydown", O);
902
+ document.body.style.overflow = "", N && N.focus(), window.removeEventListener("keydown", O);
901
903
  };
902
- }, [g, u, k, e]), g ? /* @__PURE__ */ i(
904
+ }, [C, c, $, e]), C ? /* @__PURE__ */ i(
903
905
  "div",
904
906
  {
905
907
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
906
908
  id: e,
907
- children: /* @__PURE__ */ N(
909
+ children: /* @__PURE__ */ k(
908
910
  "div",
909
911
  {
910
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
912
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
911
913
  children: [
912
- /* @__PURE__ */ N("div", { className: "flex justify-between items-center relative", children: [
913
- r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
914
- o && /* @__PURE__ */ i(
915
- "button",
916
- {
917
- onClick: k,
918
- className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${f}`,
919
- "aria-label": "Close modal",
920
- children: "✕"
921
- }
922
- )
923
- ] }),
924
- /* @__PURE__ */ i("div", { children: typeof n == "function" ? n({ modalData: m }) : n })
914
+ /* @__PURE__ */ k(
915
+ "div",
916
+ {
917
+ className: `flex justify-between items-center relative ${p}`,
918
+ children: [
919
+ r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
920
+ s && /* @__PURE__ */ i(
921
+ "button",
922
+ {
923
+ onClick: $,
924
+ className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${o}`,
925
+ "aria-label": "Close modal",
926
+ children: ""
927
+ }
928
+ )
929
+ ]
930
+ }
931
+ ),
932
+ /* @__PURE__ */ i("div", { className: u, children: typeof n == "function" ? n({ modalData: v }) : n })
925
933
  ]
926
934
  }
927
935
  )
@@ -931,32 +939,32 @@ function tt({
931
939
  function nt({
932
940
  children: e
933
941
  }) {
934
- const [r, n] = A({}), [t, o] = A({}), c = z((a, p) => {
935
- n((b) => ({ ...b, [a]: !0 })), p && o((b) => ({ ...b, [a]: p }));
936
- }, []), d = z((a) => {
937
- n((p) => ({ ...p, [a]: !1 })), o((p) => {
938
- const b = { ...p };
939
- return delete b[a], b;
942
+ const [r, n] = A({}), [t, s] = A({}), d = I((a, f) => {
943
+ n((m) => ({ ...m, [a]: !0 })), f && s((m) => ({ ...m, [a]: f }));
944
+ }, []), p = I((a) => {
945
+ n((f) => ({ ...f, [a]: !1 })), s((f) => {
946
+ const m = { ...f };
947
+ return delete m[a], m;
940
948
  });
941
- }, []), u = z((a) => !!r[a], [r]), f = z(
949
+ }, []), u = I((a) => !!r[a], [r]), l = I(
942
950
  (a) => t[a],
943
951
  [t]
944
- ), l = I(
945
- () => ({ openModal: c, closeModal: d }),
946
- [c, d]
947
- ), s = I(
948
- () => ({ isOpen: u, getModalData: f }),
949
- [u, f]
952
+ ), c = j(
953
+ () => ({ openModal: d, closeModal: p }),
954
+ [d, p]
955
+ ), o = j(
956
+ () => ({ isOpen: u, getModalData: l }),
957
+ [u, l]
950
958
  );
951
- return /* @__PURE__ */ i(ie.Provider, { value: l, children: /* @__PURE__ */ i(de.Provider, { value: s, children: e }) });
959
+ return /* @__PURE__ */ i(ie.Provider, { value: c, children: /* @__PURE__ */ i(de.Provider, { value: o, children: e }) });
952
960
  }
953
961
  function rt(e) {
954
- const { openModal: r, closeModal: n } = ce(), { isOpen: t, getModalData: o } = ue();
962
+ const { openModal: r, closeModal: n } = ce(), { isOpen: t, getModalData: s } = ue();
955
963
  return {
956
- open: (c) => r(e, c),
964
+ open: (d) => r(e, d),
957
965
  close: () => n(e),
958
966
  isOpen: t(e),
959
- data: o(e)
967
+ data: s(e)
960
968
  };
961
969
  }
962
970
  let Y = null, J = {};
@@ -980,33 +988,33 @@ const Ge = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
980
988
  return (e === "x" ? r : r & 3 | 8).toString(16);
981
989
  }), at = () => {
982
990
  const [e, r] = A([]);
983
- _(() => {
984
- Ze((t, o, c, d) => {
991
+ B(() => {
992
+ Ze((t, s, d, p) => {
985
993
  const u = Ge();
986
- r((f) => [...f, { id: u, type: t, message: o, config: d }]), setTimeout(() => {
987
- r((f) => f.filter((l) => l.id !== u));
988
- }, c);
994
+ r((l) => [...l, { id: u, type: t, message: s, config: p }]), setTimeout(() => {
995
+ r((l) => l.filter((c) => c.id !== u));
996
+ }, d);
989
997
  });
990
998
  }, []);
991
999
  const n = He();
992
1000
  return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
993
- var f, l, s, a, p, b, g, m, k, v, S, L, h;
994
- const o = ((f = t.config) == null ? void 0 : f.icon) || ((l = n.icons) == null ? void 0 : l[t.type]) || Ue(t.type), c = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (a = n.colors) == null ? void 0 : a[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", d = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = n.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.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";
995
- return /* @__PURE__ */ N(
1001
+ var l, c, o, a, f, m, b, x, C, v, $, N, y;
1002
+ const s = ((l = t.config) == null ? void 0 : l.icon) || ((c = n.icons) == null ? void 0 : c[t.type]) || Ue(t.type), d = ((o = t.config) == null ? void 0 : o.bgColor) || ((f = (a = n.colors) == null ? void 0 : a[t.type]) == null ? void 0 : f.bg) || "bg-white dark:bg-gray-800", p = ((m = t.config) == null ? void 0 : m.textColor) || ((x = (b = n.colors) == null ? void 0 : b[t.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", u = ((C = t.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
1003
+ return /* @__PURE__ */ k(
996
1004
  "div",
997
1005
  {
998
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${c} ${d}`,
1006
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${p}`,
999
1007
  children: [
1000
- /* @__PURE__ */ i("div", { className: u, children: o }),
1001
- /* @__PURE__ */ N("div", { className: "flex-1 me-3", children: [
1008
+ /* @__PURE__ */ i("div", { className: u, children: s }),
1009
+ /* @__PURE__ */ k("div", { className: "flex-1 me-3", children: [
1002
1010
  ((v = t.config) == null ? void 0 : v.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
1003
- ((S = t.config) == null ? void 0 : S.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
1004
- !((L = t.config) != null && L.title) && !((h = t.config) != null && h.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
1011
+ (($ = t.config) == null ? void 0 : $.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
1012
+ !((N = t.config) != null && N.title) && !((y = t.config) != null && y.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
1005
1013
  ] }),
1006
1014
  /* @__PURE__ */ i(
1007
1015
  "button",
1008
1016
  {
1009
- onClick: () => r((y) => y.filter((O) => O.id !== t.id)),
1017
+ onClick: () => r((w) => w.filter((E) => E.id !== t.id)),
1010
1018
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
1011
1019
  "aria-label": "Close",
1012
1020
  children: /* @__PURE__ */ i(We, { size: 18 })