tailwind-ux-kit 1.0.74 → 1.0.75

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.
@@ -9,7 +9,8 @@ type ModalProps = {
9
9
  showFloatingClose?: boolean;
10
10
  containerClasses?: string;
11
11
  disableEscapeClose?: boolean;
12
+ closeBtnStyle?: boolean;
12
13
  onClose?: () => void;
13
14
  };
14
- export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, disableEscapeClose, }: ModalProps): ReactElement | null;
15
+ export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, disableEscapeClose, closeBtnStyle, }: ModalProps): ReactElement | null;
15
16
  export {};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as C, jsx as l } from "react/jsx-runtime";
2
+ import { jsxs as k, jsx as i } from "react/jsx-runtime";
3
3
  import z, { forwardRef as Y, useState as A, useMemo as P, useId as oe, useRef as F, useCallback as j, useEffect as _, createContext as J, useContext as Q } from "react";
4
4
  const K = {
5
5
  xs: "text-xs px-2 py-1",
@@ -38,81 +38,81 @@ const K = {
38
38
  label: r,
39
39
  id: t,
40
40
  inputSize: o = "md",
41
- shape: d = "rounded",
42
- validate: u,
43
- onValidatedChange: f,
44
- className: i = "",
45
- icon: a,
41
+ shape: c = "rounded",
42
+ validate: d,
43
+ onValidatedChange: u,
44
+ className: f = "",
45
+ icon: l,
46
46
  iconPosition: s = "left",
47
- floatingLabelStyle: c,
47
+ floatingLabelStyle: a,
48
48
  onChange: p,
49
49
  isValid: b,
50
50
  isInvalid: g,
51
51
  feedback: m,
52
- iconClasses: k,
53
- feedbackType: y = "invalid",
54
- labelClasses: $ = "",
52
+ iconClasses: C,
53
+ feedbackType: w = "invalid",
54
+ labelClasses: N = "",
55
55
  ...S
56
- } = e, [w, E] = A("default"), x = z.useCallback(
56
+ } = e, [v, E] = A("default"), L = z.useCallback(
57
57
  (I) => {
58
- const D = I.target.value, T = (u == null ? void 0 : u(D)) ?? "default";
59
- E(T), f == null || f(I, T), p == null || p(I);
58
+ const D = I.target.value, T = (d == null ? void 0 : d(D)) ?? "default";
59
+ E(T), u == null || u(I, T), p == null || p(I);
60
60
  },
61
- [u, f, p]
62
- ), N = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), v = !!c, h = K[o] || K.md, L = U[d] || U.flat, O = P(
63
- () => ie(w, b, g),
64
- [w, b, g]
65
- ), B = P(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), M = P(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]);
66
- return /* @__PURE__ */ C(
61
+ [d, u, p]
62
+ ), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), h = !!a, y = K[o] || K.md, $ = U[c] || U.flat, O = P(
63
+ () => ie(v, b, g),
64
+ [v, b, g]
65
+ ), B = P(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), M = P(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]);
66
+ return /* @__PURE__ */ k(
67
67
  "div",
68
68
  {
69
- className: `w-full relative ${v ? "z-0" : ""} tailwind-ux-input`,
69
+ className: `w-full relative ${h ? "z-0" : ""} tailwind-ux-input`,
70
70
  children: [
71
- !v && r && /* @__PURE__ */ l(
71
+ !h && r && /* @__PURE__ */ i(
72
72
  "label",
73
73
  {
74
- htmlFor: N,
75
- 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"} ${$}`,
74
+ htmlFor: x,
75
+ 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"} ${N}`,
76
76
  children: r
77
77
  }
78
78
  ),
79
- /* @__PURE__ */ C("div", { className: "relative w-full", children: [
80
- a && /* @__PURE__ */ l(
79
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
80
+ l && /* @__PURE__ */ i(
81
81
  "div",
82
82
  {
83
- className: `absolute inset-y-0 flex items-center ${B} ${k}`,
83
+ className: `absolute inset-y-0 flex items-center ${B} ${C}`,
84
84
  "aria-hidden": "true",
85
- children: a
85
+ children: l
86
86
  }
87
87
  ),
88
- /* @__PURE__ */ l(
88
+ /* @__PURE__ */ i(
89
89
  "input",
90
90
  {
91
91
  ...S,
92
- id: N,
92
+ id: x,
93
93
  ref: n,
94
- placeholder: v ? " " : S.placeholder,
95
- onChange: x,
94
+ placeholder: h ? " " : S.placeholder,
95
+ onChange: L,
96
96
  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
97
- ${h}
98
- ${v && c && ae[c]}
99
- ${M} ${L} ${O} ${i}`
97
+ ${y}
98
+ ${h && a && ae[a]}
99
+ ${M} ${$} ${O} ${f}`
100
100
  }
101
101
  ),
102
- v && r && c && /* @__PURE__ */ l(
102
+ h && r && a && /* @__PURE__ */ i(
103
103
  "label",
104
104
  {
105
- htmlFor: N,
106
- className: `ms-1 ${le[c]} ${i}`,
105
+ htmlFor: x,
106
+ className: `ms-1 ${le[a]} ${f}`,
107
107
  children: r
108
108
  }
109
109
  )
110
110
  ] }),
111
- m && /* @__PURE__ */ l(
111
+ m && /* @__PURE__ */ i(
112
112
  "p",
113
113
  {
114
- className: `mt-1 text-xs ${y === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
115
- role: y === "invalid" ? "alert" : void 0,
114
+ className: `mt-1 text-xs ${w === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
115
+ role: w === "invalid" ? "alert" : void 0,
116
116
  children: m
117
117
  }
118
118
  )
@@ -159,68 +159,68 @@ const de = {
159
159
  label: r,
160
160
  id: t,
161
161
  inputSize: o = "md",
162
- shape: d = "rounded",
163
- validate: u,
164
- onValidatedChange: f,
165
- className: i = "",
166
- icon: a,
162
+ shape: c = "rounded",
163
+ validate: d,
164
+ onValidatedChange: u,
165
+ className: f = "",
166
+ icon: l,
167
167
  iconPosition: s = "left",
168
- floatingLabelStyle: c,
168
+ floatingLabelStyle: a,
169
169
  onChange: p,
170
170
  isValid: b,
171
171
  isInvalid: g,
172
172
  feedback: m,
173
- feedbackType: k = "invalid",
174
- children: y,
175
- ...$
176
- } = e, [S, w] = A("default"), E = oe(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : E), [t, r, E]), N = (I) => {
177
- const D = I.target.value, T = (u == null ? void 0 : u(D)) ?? "default";
178
- w(T), f == null || f(I, T), p == null || p(I);
179
- }, v = !!c, h = de[o], L = ue[d], O = ge(S, b, g);
180
- return /* @__PURE__ */ C("div", { className: `w-full relative ${v ? "z-0" : ""}`, children: [
181
- !v && r && /* @__PURE__ */ l(
173
+ feedbackType: C = "invalid",
174
+ children: w,
175
+ ...N
176
+ } = e, [S, v] = A("default"), E = oe(), L = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : E), [t, r, E]), x = (I) => {
177
+ const D = I.target.value, T = (d == null ? void 0 : d(D)) ?? "default";
178
+ v(T), u == null || u(I, T), p == null || p(I);
179
+ }, h = !!a, y = de[o], $ = ue[c], O = ge(S, b, g);
180
+ return /* @__PURE__ */ k("div", { className: `w-full relative ${h ? "z-0" : ""}`, children: [
181
+ !h && r && /* @__PURE__ */ i(
182
182
  "label",
183
183
  {
184
- htmlFor: x,
184
+ htmlFor: L,
185
185
  className: `block mb-1 text-sm ${b ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
186
186
  children: r
187
187
  }
188
188
  ),
189
- /* @__PURE__ */ C("div", { className: "relative w-full", children: [
190
- a && /* @__PURE__ */ l(
189
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
190
+ l && /* @__PURE__ */ i(
191
191
  "div",
192
192
  {
193
193
  className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
194
- children: /* @__PURE__ */ l("span", { className: "text-gray-500", children: a })
194
+ children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
195
195
  }
196
196
  ),
197
- /* @__PURE__ */ l(
197
+ /* @__PURE__ */ i(
198
198
  "select",
199
199
  {
200
- ...$,
201
- id: x,
200
+ ...N,
201
+ id: L,
202
202
  ref: n,
203
- onChange: N,
203
+ onChange: x,
204
204
  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
205
- ${h} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
206
- ${v && c && fe[c]}
207
- ${L} ${O} ${i}`,
208
- children: y
205
+ ${y} ${l && (s === "start" || s === "left") ? "ps-10" : l ? "pe-10" : ""}
206
+ ${h && a && fe[a]}
207
+ ${$} ${O} ${f}`,
208
+ children: w
209
209
  }
210
210
  ),
211
- v && r && c && /* @__PURE__ */ l(
211
+ h && r && a && /* @__PURE__ */ i(
212
212
  "label",
213
213
  {
214
- htmlFor: x,
215
- className: `ms-1 ${pe[c]} ${i}`,
214
+ htmlFor: L,
215
+ className: `ms-1 ${pe[a]} ${f}`,
216
216
  children: r
217
217
  }
218
218
  )
219
219
  ] }),
220
- m && /* @__PURE__ */ l(
220
+ m && /* @__PURE__ */ i(
221
221
  "p",
222
222
  {
223
- className: `mt-1 text-xs ${k === "invalid" ? "text-red-600" : "text-green-600"}`,
223
+ className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
224
224
  children: m
225
225
  }
226
226
  )
@@ -270,22 +270,22 @@ const me = {
270
270
  size: r = "md",
271
271
  type: t = "button",
272
272
  shape: o = "rounded",
273
- className: d = "",
274
- isLoading: u = !1,
275
- disabled: f = !1,
276
- ...i
273
+ className: c = "",
274
+ isLoading: d = !1,
275
+ disabled: u = !1,
276
+ ...f
277
277
  }) => {
278
- const a = f || u, s = [
278
+ const l = u || d, s = [
279
279
  "inline-flex items-center justify-center font-normal transition duration-150",
280
280
  me[n],
281
281
  xe[r],
282
282
  he[o],
283
283
  o === "flat" ? "shadow-none" : "shadow-sm",
284
- a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
285
- d
284
+ l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
285
+ c
286
286
  ].filter(Boolean).join(" ");
287
- return /* @__PURE__ */ C("button", { type: t, className: s, disabled: a, ...i, children: [
288
- u && /* @__PURE__ */ C(
287
+ return /* @__PURE__ */ k("button", { type: t, className: s, disabled: l, ...f, children: [
288
+ d && /* @__PURE__ */ k(
289
289
  "svg",
290
290
  {
291
291
  "aria-hidden": "true",
@@ -295,14 +295,14 @@ const me = {
295
295
  fill: "none",
296
296
  xmlns: "http://www.w3.org/2000/svg",
297
297
  children: [
298
- /* @__PURE__ */ l(
298
+ /* @__PURE__ */ i(
299
299
  "path",
300
300
  {
301
301
  d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
302
302
  fill: "currentColor"
303
303
  }
304
304
  ),
305
- /* @__PURE__ */ l(
305
+ /* @__PURE__ */ i(
306
306
  "path",
307
307
  {
308
308
  d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
@@ -326,9 +326,9 @@ function we(e, n) {
326
326
  if (e == null) return {};
327
327
  var r = ve(e, n), t, o;
328
328
  if (Object.getOwnPropertySymbols) {
329
- var d = Object.getOwnPropertySymbols(e);
330
- for (o = 0; o < d.length; o++)
331
- t = d[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
329
+ var c = Object.getOwnPropertySymbols(e);
330
+ for (o = 0; o < c.length; o++)
331
+ t = c[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
332
332
  }
333
333
  return r;
334
334
  }
@@ -405,21 +405,21 @@ function Se(e) {
405
405
  var {
406
406
  attr: t,
407
407
  size: o,
408
- title: d
409
- } = e, u = we(e, ye), f = o || r.size || "1em", i;
410
- return r.className && (i = r.className), e.className && (i = (i ? i + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", R({
408
+ title: c
409
+ } = e, d = we(e, ye), u = o || r.size || "1em", f;
410
+ return r.className && (f = r.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", R({
411
411
  stroke: "currentColor",
412
412
  fill: "currentColor",
413
413
  strokeWidth: "0"
414
- }, r.attr, t, u, {
415
- className: i,
414
+ }, r.attr, t, d, {
415
+ className: f,
416
416
  style: H(H({
417
417
  color: e.color || r.color
418
418
  }, r.style), e.style),
419
- height: f,
420
- width: f,
419
+ height: u,
420
+ width: u,
421
421
  xmlns: "http://www.w3.org/2000/svg"
422
- }), d && /* @__PURE__ */ z.createElement("title", null, d), e.children);
422
+ }), c && /* @__PURE__ */ z.createElement("title", null, c), e.children);
423
423
  };
424
424
  return q !== void 0 ? /* @__PURE__ */ z.createElement(q.Consumer, null, (r) => n(r)) : n(V);
425
425
  }
@@ -468,44 +468,44 @@ const Ee = {
468
468
  shape: r = "rounded",
469
469
  variant: t = "success",
470
470
  onSelectionChange: o,
471
- disabled: d = !1,
472
- className: u = "",
473
- id: f,
474
- value: i,
475
- icon: a,
471
+ disabled: c = !1,
472
+ className: d = "",
473
+ id: u,
474
+ value: f,
475
+ icon: l,
476
476
  children: s,
477
- checked: c,
477
+ checked: a,
478
478
  ...p
479
479
  }, b) => {
480
- const g = (h) => {
481
- !d && o && o(h.target.checked), p.onChange && p.onChange(h);
482
- }, m = "mr-2 border flex items-center justify-center transition-all", k = Ee[n], y = Le[r], $ = Oe[t] ?? "", S = t.startsWith("outline"), w = t.startsWith("soft"), N = `${m} ${k} ${y} ${$} ${c && (S || w || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : c ? "peer-checked:bg-current" : ""}`, v = {
480
+ const g = (y) => {
481
+ !c && o && o(y.target.checked), p.onChange && p.onChange(y);
482
+ }, m = "mr-2 border flex items-center justify-center transition-all", C = Ee[n], w = Le[r], N = Oe[t] ?? "", S = t.startsWith("outline"), v = t.startsWith("soft"), x = `${m} ${C} ${w} ${N} ${a && (S || v || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, h = {
483
483
  xs: "w-2 h-2",
484
484
  sm: "w-2.5 h-2.5",
485
485
  md: "w-3 h-3",
486
486
  lg: "w-3.5 h-3.5"
487
487
  };
488
- return /* @__PURE__ */ C(
488
+ return /* @__PURE__ */ k(
489
489
  "label",
490
490
  {
491
- className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${u}`,
491
+ className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
492
492
  children: [
493
- /* @__PURE__ */ l(
493
+ /* @__PURE__ */ i(
494
494
  "input",
495
495
  {
496
496
  type: "checkbox",
497
497
  className: "peer hidden",
498
- checked: c,
498
+ checked: a,
499
499
  onChange: g,
500
- disabled: d,
501
- id: f,
502
- value: i,
500
+ disabled: c,
501
+ id: u,
502
+ value: f,
503
503
  ref: b,
504
504
  ...p
505
505
  }
506
506
  ),
507
- /* @__PURE__ */ l("span", { className: N.trim(), children: (c || p.defaultChecked) && (a ?? /* @__PURE__ */ l($e, { className: `${v[n]}` })) }),
508
- e || s ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
507
+ /* @__PURE__ */ i("span", { className: x.trim(), children: (a || p.defaultChecked) && (l ?? /* @__PURE__ */ i($e, { className: `${h[n]}` })) }),
508
+ e || s ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
509
509
  ]
510
510
  }
511
511
  );
@@ -518,73 +518,73 @@ const We = ({
518
518
  items: r = [],
519
519
  onSelect: t,
520
520
  renderItem: o,
521
- position: d = "right",
522
- className: u = "",
523
- menuClassName: f = "",
524
- width: i = "w-48",
525
- closeOnSelect: a = !1,
521
+ position: c = "right",
522
+ className: d = "",
523
+ menuClassName: u = "",
524
+ width: f = "w-48",
525
+ closeOnSelect: l = !1,
526
526
  transition: s = !0,
527
- ariaLabel: c = "Dropdown menu",
527
+ ariaLabel: a = "Dropdown menu",
528
528
  ...p
529
529
  }) => {
530
- const [b, g] = A(!1), [m, k] = A(!1), y = F(null), $ = F(null), S = P(() => ({
530
+ const [b, g] = A(!1), [m, C] = A(!1), w = F(null), N = F(null), S = P(() => ({
531
531
  left: "left-0",
532
532
  center: "left-1/2 transform -translate-x-1/2",
533
533
  right: "right-0"
534
- })[d], [d]), w = j(() => {
535
- const h = $.current, L = y.current;
536
- if (!h || !L) return;
537
- const { top: O, bottom: B } = h.getBoundingClientRect(), M = L.offsetHeight, I = window.innerHeight - B, D = O;
538
- k(I < M && D > M);
539
- }, []), E = j((h) => {
540
- var L, O;
541
- !((L = y.current) != null && L.contains(h.target)) && !((O = $.current) != null && O.contains(h.target)) && g(!1);
542
- }, []), x = j(() => g((h) => !h), []), N = j(() => g(!1), []);
534
+ })[c], [c]), v = j(() => {
535
+ const y = N.current, $ = w.current;
536
+ if (!y || !$) return;
537
+ const { top: O, bottom: B } = y.getBoundingClientRect(), M = $.offsetHeight, I = window.innerHeight - B, D = O;
538
+ C(I < M && D > M);
539
+ }, []), E = j((y) => {
540
+ var $, O;
541
+ !(($ = w.current) != null && $.contains(y.target)) && !((O = N.current) != null && O.contains(y.target)) && g(!1);
542
+ }, []), L = j(() => g((y) => !y), []), x = j(() => g(!1), []);
543
543
  _(() => {
544
544
  if (b)
545
- return w(), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
546
- window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
545
+ return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
546
+ window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
547
547
  };
548
- }, [b, w]), _(() => (document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E)), [E]);
549
- const v = P(
548
+ }, [b, v]), _(() => (document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E)), [E]);
549
+ const h = P(
550
550
  () => [
551
551
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
552
552
  m ? "bottom-full mb-2" : "top-full mt-2",
553
553
  S,
554
- i,
554
+ f,
555
555
  s && "transition-all duration-200 ease-out",
556
- f
556
+ u
557
557
  ].filter(Boolean).join(" "),
558
- [m, S, i, s, f]
558
+ [m, S, f, s, u]
559
559
  );
560
- return /* @__PURE__ */ C("div", { className: `relative inline-block ${u}`, ...p, children: [
561
- /* @__PURE__ */ l(
560
+ return /* @__PURE__ */ k("div", { className: `relative inline-block ${d}`, ...p, children: [
561
+ /* @__PURE__ */ i(
562
562
  "button",
563
563
  {
564
564
  type: "button",
565
- ref: $,
566
- onClick: x,
565
+ ref: N,
566
+ onClick: L,
567
567
  "aria-expanded": b,
568
- "aria-label": c,
568
+ "aria-label": a,
569
569
  className: "focus:outline-none",
570
570
  children: e
571
571
  }
572
572
  ),
573
- b && /* @__PURE__ */ C("div", { ref: y, role: "menu", className: v, children: [
573
+ b && /* @__PURE__ */ k("div", { ref: w, role: "menu", className: h, children: [
574
574
  n && n,
575
- r.map((h, L) => {
575
+ r.map((y, $) => {
576
576
  const O = () => {
577
- t && t(h), a && N();
577
+ t && t(y), l && x();
578
578
  };
579
- return /* @__PURE__ */ l("div", { children: o ? o(h, O) : /* @__PURE__ */ l(
579
+ return /* @__PURE__ */ i("div", { children: o ? o(y, O) : /* @__PURE__ */ i(
580
580
  "div",
581
581
  {
582
582
  onClick: O,
583
583
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
584
584
  role: "menuitem",
585
- children: h.label
585
+ children: y.label
586
586
  }
587
- ) }, L);
587
+ ) }, $);
588
588
  })
589
589
  ] })
590
590
  ] });
@@ -594,22 +594,22 @@ const We = ({
594
594
  position: r = "top",
595
595
  className: t = "",
596
596
  tooltipClass: o = "",
597
- tooltipStyle: d = {}
597
+ tooltipStyle: c = {}
598
598
  }) => {
599
- const u = F(null), f = F(null);
599
+ const d = F(null), u = F(null);
600
600
  _(() => {
601
- const a = u.current, s = f.current;
602
- if (!a || !s) return;
603
- const c = () => {
601
+ const l = d.current, s = u.current;
602
+ if (!l || !s) return;
603
+ const a = () => {
604
604
  s.style.opacity = "1", s.style.visibility = "visible";
605
605
  }, p = () => {
606
606
  s.style.opacity = "0", s.style.visibility = "hidden";
607
607
  };
608
- return a.addEventListener("mouseenter", c), a.addEventListener("mouseleave", p), () => {
609
- a.removeEventListener("mouseenter", c), a.removeEventListener("mouseleave", p);
608
+ return l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", p), () => {
609
+ l.removeEventListener("mouseenter", a), l.removeEventListener("mouseleave", p);
610
610
  };
611
611
  }, []);
612
- const i = (a) => {
612
+ const f = (l) => {
613
613
  const s = {
614
614
  position: "absolute",
615
615
  opacity: 0,
@@ -627,7 +627,7 @@ const We = ({
627
627
  zIndex: 9999,
628
628
  width: "max-content"
629
629
  };
630
- switch (a) {
630
+ switch (l) {
631
631
  case "top":
632
632
  return {
633
633
  ...s,
@@ -664,17 +664,17 @@ const We = ({
664
664
  return s;
665
665
  }
666
666
  };
667
- return /* @__PURE__ */ C("div", { ref: u, className: `relative inline-block ${t}`, children: [
667
+ return /* @__PURE__ */ k("div", { ref: d, className: `relative inline-block ${t}`, children: [
668
668
  e,
669
- /* @__PURE__ */ l(
669
+ /* @__PURE__ */ i(
670
670
  "div",
671
671
  {
672
- ref: f,
672
+ ref: u,
673
673
  role: "tooltip",
674
674
  className: o,
675
675
  style: {
676
- ...i(r),
677
- ...d
676
+ ...f(r),
677
+ ...c
678
678
  },
679
679
  children: n
680
680
  }
@@ -715,20 +715,20 @@ const We = ({
715
715
  size: r = "sm",
716
716
  shape: t = "rounded",
717
717
  icon: o,
718
- dismissible: d,
719
- onDismiss: u,
720
- className: f = "",
721
- ...i
718
+ dismissible: c,
719
+ onDismiss: d,
720
+ className: u = "",
721
+ ...f
722
722
  }) => {
723
- const a = !e && !!o, s = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + f;
724
- return /* @__PURE__ */ C("span", { className: s.trim(), ...i, children: [
725
- o && /* @__PURE__ */ l("span", { className: e ? "mr-1" : "", children: o }),
723
+ const l = !e && !!o, s = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + u;
724
+ return /* @__PURE__ */ k("span", { className: s.trim(), ...f, children: [
725
+ o && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: o }),
726
726
  e,
727
- d && /* @__PURE__ */ l(
727
+ c && /* @__PURE__ */ i(
728
728
  "button",
729
729
  {
730
730
  type: "button",
731
- onClick: u,
731
+ onClick: d,
732
732
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
733
733
  children: "×"
734
734
  }
@@ -744,56 +744,56 @@ const Ke = ({
744
744
  className: r = "",
745
745
  tileClasses: t = "",
746
746
  open: o,
747
- onChange: d,
748
- renderTitle: u,
749
- renderContent: f,
750
- showArrowIcon: i = !0,
751
- panelClasses: a = ""
747
+ onChange: c,
748
+ renderTitle: d,
749
+ renderContent: u,
750
+ showArrowIcon: f = !0,
751
+ panelClasses: l = ""
752
752
  }) => {
753
- const [s, c] = A(/* @__PURE__ */ new Set()), p = P(() => o ? new Set(o) : s, [o, s]), b = j(
753
+ const [s, a] = A(/* @__PURE__ */ new Set()), p = P(() => o ? new Set(o) : s, [o, s]), b = j(
754
754
  (g) => {
755
755
  const m = new Set(p);
756
- m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && d ? d(Array.from(m)) : c(m);
756
+ m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && c ? c(Array.from(m)) : a(m);
757
757
  },
758
- [p, o, d, n]
758
+ [p, o, c, n]
759
759
  );
760
- return /* @__PURE__ */ l(
760
+ return /* @__PURE__ */ i(
761
761
  "div",
762
762
  {
763
763
  className: "accordion",
764
764
  role: "region",
765
765
  "aria-multiselectable": n,
766
766
  children: e.map((g) => {
767
- const m = p.has(g.id), k = `accordion-heading-${g.id}`, y = `accordion-panel-${g.id}`;
768
- return /* @__PURE__ */ C(
767
+ const m = p.has(g.id), C = `accordion-heading-${g.id}`, w = `accordion-panel-${g.id}`;
768
+ return /* @__PURE__ */ k(
769
769
  "div",
770
770
  {
771
771
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${r}`,
772
772
  children: [
773
- /* @__PURE__ */ C(
773
+ /* @__PURE__ */ k(
774
774
  "button",
775
775
  {
776
- id: k,
776
+ id: C,
777
777
  type: "button",
778
778
  "aria-expanded": m,
779
- "aria-controls": y,
779
+ "aria-controls": w,
780
780
  onClick: () => b(g.id),
781
781
  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}`,
782
782
  children: [
783
- u ? u(g, m) : g.title,
784
- i ? /* @__PURE__ */ l(Ae, {}) : null
783
+ d ? d(g, m) : g.title,
784
+ f ? /* @__PURE__ */ i(Ae, {}) : null
785
785
  ]
786
786
  }
787
787
  ),
788
- /* @__PURE__ */ l(
788
+ /* @__PURE__ */ i(
789
789
  "div",
790
790
  {
791
- id: y,
791
+ id: w,
792
792
  role: "region",
793
- "aria-labelledby": k,
793
+ "aria-labelledby": C,
794
794
  hidden: !m,
795
- className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
796
- children: f ? f(g, m) : g.content
795
+ className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
796
+ children: u ? u(g, m) : g.content
797
797
  }
798
798
  )
799
799
  ]
@@ -817,66 +817,67 @@ function Ue({
817
817
  children: r,
818
818
  standalone: t = !1,
819
819
  showFloatingClose: o = !1,
820
- containerClasses: d = "",
821
- onClose: u,
822
- disableEscapeClose: f = !1
820
+ containerClasses: c = "",
821
+ onClose: d,
822
+ disableEscapeClose: u = !1,
823
+ closeBtnStyle: f
823
824
  }) {
824
- const i = se(), a = re(), s = !t && !!i && !!a, [c, p] = A(!1), b = s ? i.isOpen(e) : c, g = s ? i.getModalData(e) : null, m = j(() => {
825
- s ? a.closeModal(e) : p(!1), u == null || u();
826
- }, [s, a, e, u]);
825
+ const l = se(), s = re(), a = !t && !!l && !!s, [p, b] = A(!1), g = a ? l.isOpen(e) : p, m = a ? l.getModalData(e) : null, C = j(() => {
826
+ a ? s.closeModal(e) : b(!1), d == null || d();
827
+ }, [a, s, e, d]);
827
828
  return _(() => {
828
- const k = document.activeElement, y = document.getElementById(e), $ = [
829
+ const w = document.activeElement, N = document.getElementById(e), S = [
829
830
  "a[href]",
830
831
  "button:not([disabled])",
831
832
  "textarea:not([disabled])",
832
833
  "input:not([disabled])",
833
834
  "select:not([disabled])",
834
835
  '[tabindex]:not([tabindex="-1"])'
835
- ], S = () => {
836
- if (!y) return [];
837
- const x = y.querySelectorAll(
838
- $.join(",")
836
+ ], v = () => {
837
+ if (!N) return [];
838
+ const x = N.querySelectorAll(
839
+ S.join(",")
839
840
  );
840
- return Array.from(x).filter((N) => N.offsetParent !== null);
841
- }, w = (x) => {
841
+ return Array.from(x).filter((h) => h.offsetParent !== null);
842
+ }, E = (x) => {
842
843
  if (x.key === "Tab") {
843
- const N = S();
844
- if (N.length === 0) return;
845
- const v = N[0], h = N[N.length - 1];
846
- x.shiftKey ? document.activeElement === v && (x.preventDefault(), h.focus()) : document.activeElement === h && (x.preventDefault(), v.focus());
844
+ const h = v();
845
+ if (h.length === 0) return;
846
+ const y = h[0], $ = h[h.length - 1];
847
+ x.shiftKey ? document.activeElement === y && (x.preventDefault(), $.focus()) : document.activeElement === $ && (x.preventDefault(), y.focus());
847
848
  }
848
- }, E = (x) => {
849
- x.key === "Escape" && !f && m(), w(x);
849
+ }, L = (x) => {
850
+ x.key === "Escape" && !u && C(), E(x);
850
851
  };
851
- return b && (document.body.style.overflow = "hidden", setTimeout(() => {
852
- const x = S();
852
+ return g && (document.body.style.overflow = "hidden", setTimeout(() => {
853
+ const x = v();
853
854
  x.length && x[0].focus();
854
- }, 0), window.addEventListener("keydown", E)), () => {
855
- document.body.style.overflow = "", k && k.focus(), window.removeEventListener("keydown", E);
855
+ }, 0), window.addEventListener("keydown", L)), () => {
856
+ document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", L);
856
857
  };
857
- }, [b, f, m, e]), b ? /* @__PURE__ */ l(
858
+ }, [g, u, C, e]), g ? /* @__PURE__ */ i(
858
859
  "div",
859
860
  {
860
861
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
861
862
  id: e,
862
- children: /* @__PURE__ */ C(
863
+ children: /* @__PURE__ */ k(
863
864
  "div",
864
865
  {
865
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
866
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
866
867
  children: [
867
- /* @__PURE__ */ C("div", { className: "flex justify-between items-center relative", children: [
868
- n && /* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: n }),
869
- o && /* @__PURE__ */ l(
868
+ /* @__PURE__ */ k("div", { className: "flex justify-between items-center relative", children: [
869
+ n && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: n }),
870
+ o && /* @__PURE__ */ i(
870
871
  "button",
871
872
  {
872
- onClick: m,
873
- className: "text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8",
873
+ onClick: C,
874
+ className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${f}`,
874
875
  "aria-label": "Close modal",
875
876
  children: "✕"
876
877
  }
877
878
  )
878
879
  ] }),
879
- /* @__PURE__ */ l("div", { children: typeof r == "function" ? r({ modalData: g }) : r })
880
+ /* @__PURE__ */ i("div", { children: typeof r == "function" ? r({ modalData: m }) : r })
880
881
  ]
881
882
  }
882
883
  )
@@ -886,29 +887,29 @@ function Ue({
886
887
  function qe({
887
888
  children: e
888
889
  }) {
889
- const [n, r] = A({}), [t, o] = A({}), d = j((c, p) => {
890
- r((b) => ({ ...b, [c]: !0 })), p && o((b) => ({ ...b, [c]: p }));
891
- }, []), u = j((c) => {
892
- r((p) => ({ ...p, [c]: !1 })), o((p) => {
890
+ const [n, r] = A({}), [t, o] = A({}), c = j((a, p) => {
891
+ r((b) => ({ ...b, [a]: !0 })), p && o((b) => ({ ...b, [a]: p }));
892
+ }, []), d = j((a) => {
893
+ r((p) => ({ ...p, [a]: !1 })), o((p) => {
893
894
  const b = { ...p };
894
- return delete b[c], b;
895
+ return delete b[a], b;
895
896
  });
896
- }, []), f = j((c) => !!n[c], [n]), i = j(
897
- (c) => t[c],
897
+ }, []), u = j((a) => !!n[a], [n]), f = j(
898
+ (a) => t[a],
898
899
  [t]
899
- ), a = P(
900
- () => ({ openModal: d, closeModal: u }),
901
- [d, u]
900
+ ), l = P(
901
+ () => ({ openModal: c, closeModal: d }),
902
+ [c, d]
902
903
  ), s = P(
903
- () => ({ isOpen: f, getModalData: i }),
904
- [f, i]
904
+ () => ({ isOpen: u, getModalData: f }),
905
+ [u, f]
905
906
  );
906
- return /* @__PURE__ */ l(te.Provider, { value: a, children: /* @__PURE__ */ l(ne.Provider, { value: s, children: e }) });
907
+ return /* @__PURE__ */ i(te.Provider, { value: l, children: /* @__PURE__ */ i(ne.Provider, { value: s, children: e }) });
907
908
  }
908
909
  function Xe(e) {
909
910
  const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: o } = se();
910
911
  return {
911
- open: (d) => n(e, d),
912
+ open: (c) => n(e, c),
912
913
  close: () => r(e),
913
914
  isOpen: t(e),
914
915
  data: o(e)
@@ -936,35 +937,35 @@ const _e = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
936
937
  }), Qe = () => {
937
938
  const [e, n] = A([]);
938
939
  _(() => {
939
- Me((t, o, d, u) => {
940
- const f = _e();
941
- n((i) => [...i, { id: f, type: t, message: o, config: u }]), setTimeout(() => {
942
- n((i) => i.filter((a) => a.id !== f));
943
- }, d);
940
+ Me((t, o, c, d) => {
941
+ const u = _e();
942
+ n((f) => [...f, { id: u, type: t, message: o, config: d }]), setTimeout(() => {
943
+ n((f) => f.filter((l) => l.id !== u));
944
+ }, c);
944
945
  });
945
946
  }, []);
946
947
  const r = De();
947
- return /* @__PURE__ */ l("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
948
- var i, a, s, c, p, b, g, m, k, y, $, S, w;
949
- const o = ((i = t.config) == null ? void 0 : i.icon) || ((a = r.icons) == null ? void 0 : a[t.type]) || Be(t.type), d = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (c = r.colors) == null ? void 0 : c[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", u = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", f = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
950
- return /* @__PURE__ */ C(
948
+ return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
949
+ var f, l, s, a, p, b, g, m, C, w, N, S, v;
950
+ const o = ((f = t.config) == null ? void 0 : f.icon) || ((l = r.icons) == null ? void 0 : l[t.type]) || Be(t.type), c = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (a = r.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 = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.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";
951
+ return /* @__PURE__ */ k(
951
952
  "div",
952
953
  {
953
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${u}`,
954
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${c} ${d}`,
954
955
  children: [
955
- /* @__PURE__ */ l("div", { className: f, children: o }),
956
- /* @__PURE__ */ C("div", { className: "flex-1 me-3", children: [
957
- ((y = t.config) == null ? void 0 : y.title) && /* @__PURE__ */ l("div", { className: "font-semibold text-black", children: t.config.title }),
958
- (($ = t.config) == null ? void 0 : $.description) && /* @__PURE__ */ l("div", { className: "text-sm text-gray-500", children: t.config.description }),
959
- !((S = t.config) != null && S.title) && !((w = t.config) != null && w.description) && /* @__PURE__ */ l("div", { className: "text-sm", children: t.message })
956
+ /* @__PURE__ */ i("div", { className: u, children: o }),
957
+ /* @__PURE__ */ k("div", { className: "flex-1 me-3", children: [
958
+ ((w = t.config) == null ? void 0 : w.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
959
+ ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
960
+ !((S = t.config) != null && S.title) && !((v = t.config) != null && v.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
960
961
  ] }),
961
- /* @__PURE__ */ l(
962
+ /* @__PURE__ */ i(
962
963
  "button",
963
964
  {
964
- onClick: () => n((E) => E.filter((x) => x.id !== t.id)),
965
+ onClick: () => n((E) => E.filter((L) => L.id !== t.id)),
965
966
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
966
967
  "aria-label": "Close",
967
- children: /* @__PURE__ */ l(Te, { size: 18 })
968
+ children: /* @__PURE__ */ i(Te, { size: 18 })
968
969
  }
969
970
  )
970
971
  ]
@@ -1,8 +1,8 @@
1
1
  (function(y,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(y=typeof globalThis<"u"?globalThis:y||self,l(y.TailwindUiKit={},y.jsxRuntime,y.React))})(this,function(y,l,n){"use strict";"use client";var Z=document.createElement("style");Z.textContent=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.btn-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.btn-outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.btn-outline-success:hover{background-color:var(--color-green-50,oklch(98.2% .018 155.826))}}.btn-soft-success{background-color:var(--color-green-100,oklch(96.2% .044 156.743));color:var(--color-green-700,oklch(52.7% .154 150.069))}@media (hover:hover){.btn-soft-success:hover{background-color:var(--color-green-200,oklch(92.5% .084 155.995))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-white,#fff)}@media (hover:hover){.btn-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.btn-outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.btn-outline-warning:hover{background-color:var(--color-yellow-50,oklch(98.7% .026 102.212))}}.btn-soft-warning{background-color:var(--color-yellow-100,oklch(97.3% .071 103.193));color:var(--color-yellow-700,oklch(55.4% .135 66.442))}@media (hover:hover){.btn-soft-warning:hover{background-color:var(--color-yellow-200,oklch(94.5% .129 101.54))}}.btn-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.btn-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.btn-outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.btn-outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.btn-soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.btn-soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.btn-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-white,#fff)}@media (hover:hover){.btn-dark:hover{background-color:var(--color-black,#000)}}.btn-outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-soft-dark{background-color:var(--color-gray-200,oklch(92.8% .006 264.531));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.btn-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.btn-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}.primary:is(:where(.peer):checked~*):hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.outline-primary:is(:where(.peer):checked~*){color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.outline-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.soft-primary{border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-200,oklch(88.2% .059 254.128));color:var(--color-blue-600,oklch(54.6% .245 262.881))}.soft-primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.soft-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}.success:is(:where(.peer):checked~*):hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.outline-success:is(:where(.peer):checked~*){color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.outline-success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}}.soft-success{border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-200,oklch(92.5% .084 155.995));color:var(--color-green-600,oklch(62.7% .194 149.214))}.soft-success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.soft-success:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}.danger:is(:where(.peer):checked~*):hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.outline-danger:is(:where(.peer):checked~*){color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.outline-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.soft-danger{border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-200,oklch(88.5% .062 18.334));color:var(--color-red-600,oklch(57.7% .245 27.325))}.soft-danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.soft-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-white,#fff)}@media (hover:hover){.warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}.warning:is(:where(.peer):checked~*):hover{background-color:var(--color-yellow-700,oklch(55.4% .135 66.442))}}.outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.outline-warning:is(:where(.peer):checked~*){color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.outline-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.soft-warning{border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-200,oklch(94.5% .129 101.54));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}.soft-warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.soft-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-700,oklch(37.3% .034 259.733));background-color:var(--color-white,#fff)}.dark:is(:where(.peer):checked~*){border-color:var(--color-black,#000);background-color:var(--color-black,#000);color:var(--color-white,#fff)}@media (hover:hover){.dark:hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark:hover{background-color:color-mix(in oklab,var(--color-black,#000)50%,transparent)}}}.outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));background-color:var(--color-white,#fff)}.outline-dark:is(:where(.peer):checked~*){color:var(--color-black,#000)}@media (hover:hover){.outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.soft-dark{border-color:var(--color-gray-600,oklch(44.6% .03 256.802));background-color:var(--color-gray-500,oklch(55.1% .027 264.364));color:var(--color-black,#000)}.soft-dark:is(:where(.peer):checked~*){border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-black,#000)}@media (hover:hover){.soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
2
- /*$vite$:1*/`,document.head.appendChild(Z);const G={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},q={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},er={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",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",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"},tr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},K=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:S,feedbackType:m="invalid",labelClasses:E="",...$}=r,[x,L]=n.useState("default"),w=n.useCallback(j=>{const z=j.target.value,T=(u==null?void 0:u(z))??"default";L(T),b==null||b(j,T),f==null||f(j)},[u,b,f]),N=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),C=!!d,k=G[c]||G.md,O=q[h]||q.flat,M=n.useMemo(()=>tr(x,v,g),[x,v,g]),I=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),P=n.useMemo(()=>s?a==="start"||a==="left"?"ps-10":"pe-10":"",[s,a]);return l.jsxs("div",{className:`w-full relative ${C?"z-0":""} tailwind-ux-input`,children:[!C&&e&&l.jsx("label",{htmlFor:N,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"} ${E}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I} ${S}`,"aria-hidden":"true",children:s}),l.jsx("input",{...$,id:N,ref:t,placeholder:C?" ":$.placeholder,onChange:w,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
3
- ${k}
4
- ${C&&d&&or[d]}
5
- ${P} ${O} ${M} ${i}`}),C&&e&&d&&l.jsx("label",{htmlFor:N,className:`ms-1 ${er[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:m==="invalid"?"alert":void 0,children:p})]})});K.displayName="Input";const lr={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},cr={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",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",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"},sr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},U=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:S="invalid",children:m,...E}=r,[$,x]=n.useState("default"),L=n.useId(),w=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:L),[o,e,L]),N=j=>{const z=j.target.value,T=(u==null?void 0:u(z))??"default";x(T),b==null||b(j,T),f==null||f(j)},C=!!d,k=lr[c],O=nr[h],M=sr($,v,g),I=s&&(a==="start"||a==="left")?"ps-10":s?"pe-10":"",P=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${C?"z-0":""}`,children:[!C&&e&&l.jsx("label",{htmlFor:w,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${P}`,children:l.jsx("span",{className:"text-gray-500",children:s})}),l.jsx("select",{...E,id:w,ref:t,onChange:N,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
6
- ${k} ${I}
7
- ${C&&d&&ar[d]}
8
- ${O} ${M} ${i}`,children:m}),C&&e&&d&&l.jsx("label",{htmlFor:w,className:`ms-1 ${cr[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});U.displayName="Select";const ir={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},dr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:h="",isLoading:u=!1,disabled:b=!1,...i})=>{const s=b||u,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:s,...i,children:[u&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=n.createContext&&n.createContext(X),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(c=0;c<h.length;c++)o=h[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function A(){return A=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},A.apply(this,arguments)}function J(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function D(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?J(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Q(r){return r&&r.map((t,e)=>n.createElement(t.tag,D({key:e},t.attr),Q(t.child)))}function _(r){return t=>n.createElement(wr,A({attr:D({},r.attr)},t),Q(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:h}=r,u=fr(r,br),b=c||e.size||"1em",i;return e.className&&(i=e.className),r.className&&(i=(i?i+" ":"")+r.className),n.createElement("svg",A({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,u,{className:i,style:D(D({color:r.color||e.color},e.style),r.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),h&&n.createElement("title",null,h),r.children)};return Y!==void 0?n.createElement(Y.Consumer,null,e=>t(e)):t(X)}function kr(r){return _({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:[]}]})(r)}const mr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},V=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:h=!1,className:u="",id:b,value:i,icon:s,children:a,checked:d,...f},v)=>{const g=k=>{!h&&c&&c(k.target.checked),f.onChange&&f.onChange(k)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],m=xr[e],E=Cr[o]??"",$=o.startsWith("outline"),x=o.startsWith("soft"),N=`${p} ${S} ${m} ${E} ${d&&($||x||o==="link")?"peer-checked:bg-current peer-checked:text-white":d?"peer-checked:bg-current":""}`,C={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${u}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:d,onChange:g,disabled:h,id:b,value:i,ref:v,...f}),l.jsx("span",{className:N.trim(),children:(d||f.defaultChecked)&&(s??l.jsx(kr,{className:`${C[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});V.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:h="right",className:u="",menuClassName:b="",width:i="w-48",closeOnSelect:s=!1,transition:a=!0,ariaLabel:d="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),m=n.useRef(null),E=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),x=n.useCallback(()=>{const k=E.current,O=m.current;if(!k||!O)return;const{top:M,bottom:I}=k.getBoundingClientRect(),P=O.offsetHeight,j=window.innerHeight-I,z=M;S(j<P&&z>P)},[]),L=n.useCallback(k=>{var O,M;!((O=m.current)!=null&&O.contains(k.target))&&!((M=E.current)!=null&&M.contains(k.target))&&g(!1)},[]),w=n.useCallback(()=>g(k=>!k),[]),N=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}},[v,x]),n.useEffect(()=>(document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)),[L]);const C=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",$,i,a&&"transition-all duration-200 ease-out",b].filter(Boolean).join(" "),[p,$,i,a,b]);return l.jsxs("div",{className:`relative inline-block ${u}`,...f,children:[l.jsx("button",{type:"button",ref:E,onClick:w,"aria-expanded":v,"aria-label":d,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:m,role:"menu",className:C,children:[t&&t,e.map((k,O)=>{const M=()=>{o&&o(k),s&&N()};return l.jsx("div",{children:c?c(k,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:k.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:h={}})=>{const u=n.useRef(null),b=n.useRef(null);n.useEffect(()=>{const s=u.current,a=b.current;if(!s||!a)return;const d=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return s.addEventListener("mouseenter",d),s.addEventListener("mouseleave",f),()=>{s.removeEventListener("mouseenter",d),s.removeEventListener("mouseleave",f)}},[]);const i=s=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:u,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:b,role:"tooltip",className:c,style:{...i(e),...h},children:t})]})},$r={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Er={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:h,onDismiss:u,className:b="",...i})=>{const s=!r&&!!c,a=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${s?"justify-center p-2 w-8 h-8":""} `+b;return l.jsxs("span",{className:a.trim(),...i,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,h&&l.jsx("button",{type:"button",onClick:u,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return _({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:[]}]})(r)}const jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:h,renderTitle:u,renderContent:b,showArrowIcon:i=!0,panelClasses:s=""})=>{const[a,d]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&h?h(Array.from(p)):d(p)},[f,c,h,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,m=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":p,"aria-controls":m,onClick:()=>v(g.id),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 ${o}`,children:[u?u(g,p):g.title,i?l.jsx(Mr,{}):null]}),l.jsx("div",{id:m,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:b?b(g,p):g.content})]},g.id)})})},R=n.createContext(null),B=()=>{const r=n.useContext(R);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},rr=n.createContext(null),F=()=>n.useContext(rr);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:h="",onClose:u,disableEscapeClose:b=!1}){const i=F(),s=B(),a=!o&&!!i&&!!s,[d,f]=n.useState(!1),v=a?i.isOpen(r):d,g=a?i.getModalData(r):null,p=n.useCallback(()=>{a?s.closeModal(r):f(!1),u==null||u()},[a,s,r,u]);return n.useEffect(()=>{const S=document.activeElement,m=document.getElementById(r),E=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!m)return[];const w=m.querySelectorAll(E.join(","));return Array.from(w).filter(N=>N.offsetParent!==null)},x=w=>{if(w.key==="Tab"){const N=$();if(N.length===0)return;const C=N[0],k=N[N.length-1];w.shiftKey?document.activeElement===C&&(w.preventDefault(),k.focus()):document.activeElement===k&&(w.preventDefault(),C.focus())}},L=w=>{w.key==="Escape"&&!b&&p(),x(w)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const w=$();w.length&&w[0].focus()},0),window.addEventListener("keydown",L)),()=>{document.body.style.overflow="",S&&S.focus(),window.removeEventListener("keydown",L)}},[v,b,p,r]),v?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${h}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:p,className:"text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:g}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),h=n.useCallback((d,f)=>{e(v=>({...v,[d]:!0})),f&&c(v=>({...v,[d]:f}))},[]),u=n.useCallback(d=>{e(f=>({...f,[d]:!1})),c(f=>{const v={...f};return delete v[d],v})},[]),b=n.useCallback(d=>!!t[d],[t]),i=n.useCallback(d=>o[d],[o]),s=n.useMemo(()=>({openModal:h,closeModal:u}),[h,u]),a=n.useMemo(()=>({isOpen:b,getModalData:i}),[b,i]);return l.jsx(R.Provider,{value:s,children:l.jsx(rr.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=B(),{isOpen:o,getModalData:c}=F();return{open:h=>t(r,h),close:()=>e(r),isOpen:o(r),data:c(r)}}let H=null,W={};function Tr(r){H=r}function Ar(r){W={...W,...r}}function Dr(){return W}function _r(r,t,e=3e3,o){H?H(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return _({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:[]}]})(r)}const Fr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,h,u)=>{const b=Fr();t(i=>[...i,{id:b,type:o,message:c,config:u}]),setTimeout(()=>{t(i=>i.filter(s=>s.id!==b))},h)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var i,s,a,d,f,v,g,p,S,m,E,$,x;const c=((i=o.config)==null?void 0:i.icon)||((s=e.icons)==null?void 0:s[o.type])||Wr(o.type),h=((a=o.config)==null?void 0:a.bgColor)||((f=(d=e.colors)==null?void 0:d[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",u=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",b=((S=o.config)==null?void 0:S.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${h} ${u}`,children:[l.jsx("div",{className:b,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((m=o.config)==null?void 0:m.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((E=o.config)==null?void 0:E.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!(($=o.config)!=null&&$.title)&&!((x=o.config)!=null&&x.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(L=>L.filter(w=>w.id!==o.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=jr,y.Badge=Or,y.Button=ur,y.Checkbox=V,y.Dropdown=Sr,y.Input=K,y.Modal=Pr,y.ModalProvider=Ir,y.Select=U,y.Toast=Hr,y.Tooltip=Nr,y.setToastDefaults=Ar,y.showToast=_r,y.useModalActions=B,y.useModalInstance=zr,y.useModalState=F,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
2
+ /*$vite$:1*/`,document.head.appendChild(Z);const G={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},q={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},er={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",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",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"},tr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},K=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:d="rounded",validate:h,onValidatedChange:u,className:b="",icon:i,iconPosition:a="left",floatingLabelStyle:s,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:S,feedbackType:x="invalid",labelClasses:$="",...N}=r,[C,L]=n.useState("default"),O=n.useCallback(j=>{const z=j.target.value,T=(h==null?void 0:h(z))??"default";L(T),u==null||u(j,T),f==null||f(j)},[h,u,f]),w=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),k=!!s,m=G[c]||G.md,E=q[d]||q.flat,M=n.useMemo(()=>tr(C,v,g),[C,v,g]),I=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),P=n.useMemo(()=>i?a==="start"||a==="left"?"ps-10":"pe-10":"",[i,a]);return l.jsxs("div",{className:`w-full relative ${k?"z-0":""} tailwind-ux-input`,children:[!k&&e&&l.jsx("label",{htmlFor:w,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"} ${$}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I} ${S}`,"aria-hidden":"true",children:i}),l.jsx("input",{...N,id:w,ref:t,placeholder:k?" ":N.placeholder,onChange:O,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
3
+ ${m}
4
+ ${k&&s&&or[s]}
5
+ ${P} ${E} ${M} ${b}`}),k&&e&&s&&l.jsx("label",{htmlFor:w,className:`ms-1 ${er[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${x==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:x==="invalid"?"alert":void 0,children:p})]})});K.displayName="Input";const lr={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},cr={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",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",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"},sr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},U=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:d="rounded",validate:h,onValidatedChange:u,className:b="",icon:i,iconPosition:a="left",floatingLabelStyle:s,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:S="invalid",children:x,...$}=r,[N,C]=n.useState("default"),L=n.useId(),O=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:L),[o,e,L]),w=j=>{const z=j.target.value,T=(h==null?void 0:h(z))??"default";C(T),u==null||u(j,T),f==null||f(j)},k=!!s,m=lr[c],E=nr[d],M=sr(N,v,g),I=i&&(a==="start"||a==="left")?"ps-10":i?"pe-10":"",P=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${k?"z-0":""}`,children:[!k&&e&&l.jsx("label",{htmlFor:O,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${P}`,children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("select",{...$,id:O,ref:t,onChange:w,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
6
+ ${m} ${I}
7
+ ${k&&s&&ar[s]}
8
+ ${E} ${M} ${b}`,children:x}),k&&e&&s&&l.jsx("label",{htmlFor:O,className:`ms-1 ${cr[s]} ${b}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});U.displayName="Select";const ir={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},dr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:d="",isLoading:h=!1,disabled:u=!1,...b})=>{const i=u||h,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",i?"opacity-50 cursor-not-allowed":"cursor-pointer",d].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:i,...b,children:[h&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=n.createContext&&n.createContext(X),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(c=0;c<d.length;c++)o=d[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function A(){return A=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},A.apply(this,arguments)}function J(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function D(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?J(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Q(r){return r&&r.map((t,e)=>n.createElement(t.tag,D({key:e},t.attr),Q(t.child)))}function _(r){return t=>n.createElement(wr,A({attr:D({},r.attr)},t),Q(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:d}=r,h=fr(r,br),u=c||e.size||"1em",b;return e.className&&(b=e.className),r.className&&(b=(b?b+" ":"")+r.className),n.createElement("svg",A({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,h,{className:b,style:D(D({color:r.color||e.color},e.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),d&&n.createElement("title",null,d),r.children)};return Y!==void 0?n.createElement(Y.Consumer,null,e=>t(e)):t(X)}function kr(r){return _({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:[]}]})(r)}const mr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},V=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:d=!1,className:h="",id:u,value:b,icon:i,children:a,checked:s,...f},v)=>{const g=m=>{!d&&c&&c(m.target.checked),f.onChange&&f.onChange(m)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],x=xr[e],$=Cr[o]??"",N=o.startsWith("outline"),C=o.startsWith("soft"),w=`${p} ${S} ${x} ${$} ${s&&(N||C||o==="link")?"peer-checked:bg-current peer-checked:text-white":s?"peer-checked:bg-current":""}`,k={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${d?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${h}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:s,onChange:g,disabled:d,id:u,value:b,ref:v,...f}),l.jsx("span",{className:w.trim(),children:(s||f.defaultChecked)&&(i??l.jsx(kr,{className:`${k[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});V.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:d="right",className:h="",menuClassName:u="",width:b="w-48",closeOnSelect:i=!1,transition:a=!0,ariaLabel:s="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),x=n.useRef(null),$=n.useRef(null),N=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[d],[d]),C=n.useCallback(()=>{const m=$.current,E=x.current;if(!m||!E)return;const{top:M,bottom:I}=m.getBoundingClientRect(),P=E.offsetHeight,j=window.innerHeight-I,z=M;S(j<P&&z>P)},[]),L=n.useCallback(m=>{var E,M;!((E=x.current)!=null&&E.contains(m.target))&&!((M=$.current)!=null&&M.contains(m.target))&&g(!1)},[]),O=n.useCallback(()=>g(m=>!m),[]),w=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[v,C]),n.useEffect(()=>(document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)),[L]);const k=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",N,b,a&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[p,N,b,a,u]);return l.jsxs("div",{className:`relative inline-block ${h}`,...f,children:[l.jsx("button",{type:"button",ref:$,onClick:O,"aria-expanded":v,"aria-label":s,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:x,role:"menu",className:k,children:[t&&t,e.map((m,E)=>{const M=()=>{o&&o(m),i&&w()};return l.jsx("div",{children:c?c(m,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:m.label})},E)})]})]})},$r=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:d={}})=>{const h=n.useRef(null),u=n.useRef(null);n.useEffect(()=>{const i=h.current,a=u.current;if(!i||!a)return;const s=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return i.addEventListener("mouseenter",s),i.addEventListener("mouseleave",f),()=>{i.removeEventListener("mouseenter",s),i.removeEventListener("mouseleave",f)}},[]);const b=i=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(i){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:h,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:u,role:"tooltip",className:c,style:{...b(e),...d},children:t})]})},Nr={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Er={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:d,onDismiss:h,className:u="",...b})=>{const i=!r&&!!c,a=`inline-flex items-center font-medium ${Nr[t]||""} ${Er[e]||""} ${Lr[o]||""} ${i?"justify-center p-2 w-8 h-8":""} `+u;return l.jsxs("span",{className:a.trim(),...b,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,d&&l.jsx("button",{type:"button",onClick:h,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return _({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:[]}]})(r)}const jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:d,renderTitle:h,renderContent:u,showArrowIcon:b=!0,panelClasses:i=""})=>{const[a,s]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&d?d(Array.from(p)):s(p)},[f,c,d,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,x=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":p,"aria-controls":x,onClick:()=>v(g.id),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 ${o}`,children:[h?h(g,p):g.title,b?l.jsx(Mr,{}):null]}),l.jsx("div",{id:x,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,children:u?u(g,p):g.content})]},g.id)})})},R=n.createContext(null),B=()=>{const r=n.useContext(R);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},rr=n.createContext(null),F=()=>n.useContext(rr);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:d="",onClose:h,disableEscapeClose:u=!1,closeBtnStyle:b}){const i=F(),a=B(),s=!o&&!!i&&!!a,[f,v]=n.useState(!1),g=s?i.isOpen(r):f,p=s?i.getModalData(r):null,S=n.useCallback(()=>{s?a.closeModal(r):v(!1),h==null||h()},[s,a,r,h]);return n.useEffect(()=>{const x=document.activeElement,$=document.getElementById(r),N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],C=()=>{if(!$)return[];const w=$.querySelectorAll(N.join(","));return Array.from(w).filter(k=>k.offsetParent!==null)},L=w=>{if(w.key==="Tab"){const k=C();if(k.length===0)return;const m=k[0],E=k[k.length-1];w.shiftKey?document.activeElement===m&&(w.preventDefault(),E.focus()):document.activeElement===E&&(w.preventDefault(),m.focus())}},O=w=>{w.key==="Escape"&&!u&&S(),L(w)};return g&&(document.body.style.overflow="hidden",setTimeout(()=>{const w=C();w.length&&w[0].focus()},0),window.addEventListener("keydown",O)),()=>{document.body.style.overflow="",x&&x.focus(),window.removeEventListener("keydown",O)}},[g,u,S,r]),g?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:S,className:`text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${b}`,"aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:p}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),d=n.useCallback((s,f)=>{e(v=>({...v,[s]:!0})),f&&c(v=>({...v,[s]:f}))},[]),h=n.useCallback(s=>{e(f=>({...f,[s]:!1})),c(f=>{const v={...f};return delete v[s],v})},[]),u=n.useCallback(s=>!!t[s],[t]),b=n.useCallback(s=>o[s],[o]),i=n.useMemo(()=>({openModal:d,closeModal:h}),[d,h]),a=n.useMemo(()=>({isOpen:u,getModalData:b}),[u,b]);return l.jsx(R.Provider,{value:i,children:l.jsx(rr.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=B(),{isOpen:o,getModalData:c}=F();return{open:d=>t(r,d),close:()=>e(r),isOpen:o(r),data:c(r)}}let H=null,W={};function Tr(r){H=r}function Ar(r){W={...W,...r}}function Dr(){return W}function _r(r,t,e=3e3,o){H?H(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return _({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:[]}]})(r)}const Fr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,d,h)=>{const u=Fr();t(b=>[...b,{id:u,type:o,message:c,config:h}]),setTimeout(()=>{t(b=>b.filter(i=>i.id!==u))},d)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var b,i,a,s,f,v,g,p,S,x,$,N,C;const c=((b=o.config)==null?void 0:b.icon)||((i=e.icons)==null?void 0:i[o.type])||Wr(o.type),d=((a=o.config)==null?void 0:a.bgColor)||((f=(s=e.colors)==null?void 0:s[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",h=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",u=((S=o.config)==null?void 0:S.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${h}`,children:[l.jsx("div",{className:u,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((x=o.config)==null?void 0:x.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),(($=o.config)==null?void 0:$.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!((N=o.config)!=null&&N.title)&&!((C=o.config)!=null&&C.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(L=>L.filter(O=>O.id!==o.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=jr,y.Badge=Or,y.Button=ur,y.Checkbox=V,y.Dropdown=Sr,y.Input=K,y.Modal=Pr,y.ModalProvider=Ir,y.Select=U,y.Toast=Hr,y.Tooltip=$r,y.setToastDefaults=Ar,y.showToast=_r,y.useModalActions=B,y.useModalInstance=zr,y.useModalState=F,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "main": "lib/tailwind-ux-kit.es.js",
5
5
  "module": "lib/tailwind-ux-kit.umd.js",
6
6
  "types": "lib/tailwind-ux-kit.es.d.ts",