tailwind-ux-kit 1.0.30 → 1.0.32

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.
@@ -8,7 +8,8 @@ type ModalProps = {
8
8
  standalone?: boolean;
9
9
  showFloatingClose?: boolean;
10
10
  containerClasses?: string;
11
+ disableEscapeClose?: boolean;
11
12
  onClose?: () => void;
12
13
  };
13
- export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, }: ModalProps): ReactElement | null;
14
+ export default function Modal({ id, title, children, standalone, showFloatingClose, containerClasses, onClose, disableEscapeClose, }: ModalProps): ReactElement | null;
14
15
  export {};
@@ -1,27 +1,27 @@
1
1
  "use client";
2
- import { jsxs as x, jsx as g } from "react/jsx-runtime";
3
- import O, { forwardRef as J, useState as v, useRef as T, useMemo as _, useCallback as N, useEffect as z, createContext as Q, useContext as V } from "react";
2
+ import { jsxs as m, jsx as g } from "react/jsx-runtime";
3
+ import O, { forwardRef as J, useState as N, useRef as D, useMemo as T, useCallback as S, useEffect as z, createContext as Q, useContext as V } from "react";
4
4
  const le = J((e, n) => {
5
5
  const {
6
6
  label: t,
7
7
  id: r,
8
- inputSize: o = "md",
8
+ inputSize: s = "md",
9
9
  shape: f = "rounded",
10
10
  validate: p,
11
- onValidatedChange: i,
12
- className: l = "",
13
- icon: d,
14
- iconPosition: s = "left",
15
- floatingLabelStyle: c,
16
- onChange: a,
17
- isValid: u,
11
+ onValidatedChange: d,
12
+ className: a = "",
13
+ icon: u,
14
+ iconPosition: o = "left",
15
+ floatingLabelStyle: l,
16
+ onChange: i,
17
+ isValid: c,
18
18
  isInvalid: b,
19
- feedback: m,
20
- feedbackType: C = "invalid",
21
- ...k
22
- } = e, [$, E] = v("default"), P = (h) => {
23
- const w = h.target.value, S = (p == null ? void 0 : p(w)) ?? "default";
24
- E(S), i == null || i(h, S), a == null || a(h);
19
+ feedback: x,
20
+ feedbackType: h = "invalid",
21
+ ...w
22
+ } = e, [$, E] = N("default"), P = (y) => {
23
+ const C = y.target.value, k = (p == null ? void 0 : p(C)) ?? "default";
24
+ E(k), d == null || d(y, k), i == null || i(y);
25
25
  }, j = {
26
26
  xs: "text-xs px-2 py-1",
27
27
  sm: "text-sm px-3 py-1.5",
@@ -39,12 +39,12 @@ const le = J((e, n) => {
39
39
  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",
40
40
  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",
41
41
  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"
42
- }, F = (h, w, S) => {
43
- if (S)
42
+ }, F = (y, C, k) => {
43
+ if (k)
44
44
  return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
45
- if (w)
45
+ if (C)
46
46
  return "border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";
47
- switch (h) {
47
+ switch (y) {
48
48
  case "error":
49
49
  return "border-red-500 bg-red-50 focus:ring-red-500";
50
50
  case "warning":
@@ -54,52 +54,52 @@ const le = J((e, n) => {
54
54
  default:
55
55
  return "border-gray-300 focus:ring-blue-500";
56
56
  }
57
- }, Z = j[o] || j.md, G = L[f] || L.flat, H = F($, u, b), W = s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", U = d && (s === "start" || s === "left") ? "ps-10" : d ? "pe-10" : "", I = r ?? `input-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, y = !!c;
58
- return /* @__PURE__ */ x("div", { className: `w-full relative ${y ? "z-0" : ""}`, children: [
59
- !y && t && /* @__PURE__ */ g(
57
+ }, Z = j[s] || j.md, G = L[f] || L.flat, H = F($, c, b), W = o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", U = u && (o === "start" || o === "left") ? "ps-10" : u ? "pe-10" : "", I = r ?? `input-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, v = !!l;
58
+ return /* @__PURE__ */ m("div", { className: `w-full relative ${v ? "z-0" : ""}`, children: [
59
+ !v && t && /* @__PURE__ */ g(
60
60
  "label",
61
61
  {
62
62
  htmlFor: I,
63
- className: `block mb-1 font-light text-sm ${u ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
63
+ className: `block mb-1 font-light text-sm ${c ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
64
64
  children: t
65
65
  }
66
66
  ),
67
- /* @__PURE__ */ x("div", { className: "relative w-full", children: [
68
- d && /* @__PURE__ */ g(
67
+ /* @__PURE__ */ m("div", { className: "relative w-full", children: [
68
+ u && /* @__PURE__ */ g(
69
69
  "div",
70
70
  {
71
71
  className: `absolute inset-y-0 flex items-center ${W}`,
72
- children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: d })
72
+ children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: u })
73
73
  }
74
74
  ),
75
75
  /* @__PURE__ */ g(
76
76
  "input",
77
77
  {
78
- ...k,
78
+ ...w,
79
79
  id: I,
80
80
  ref: n,
81
- placeholder: y ? " " : k.placeholder,
81
+ placeholder: v ? " " : w.placeholder,
82
82
  onChange: P,
83
83
  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
84
84
  ${Z}
85
- ${y && c && A[c]}
86
- ${U} ${G} ${H} ${l}`
85
+ ${v && l && A[l]}
86
+ ${U} ${G} ${H} ${a}`
87
87
  }
88
88
  ),
89
- y && t && c && /* @__PURE__ */ g(
89
+ v && t && l && /* @__PURE__ */ g(
90
90
  "label",
91
91
  {
92
92
  htmlFor: I,
93
- className: `ms-1 ${B[c]} ${l}`,
93
+ className: `ms-1 ${B[l]} ${a}`,
94
94
  children: t
95
95
  }
96
96
  )
97
97
  ] }),
98
- m && /* @__PURE__ */ g(
98
+ x && /* @__PURE__ */ g(
99
99
  "p",
100
100
  {
101
- className: `mt-1 text-xs ${C === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
102
- children: m
101
+ className: `mt-1 text-xs ${h === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
102
+ children: x
103
103
  }
104
104
  )
105
105
  ] });
@@ -109,24 +109,24 @@ const ie = J((e, n) => {
109
109
  const {
110
110
  label: t,
111
111
  id: r,
112
- inputSize: o = "md",
112
+ inputSize: s = "md",
113
113
  shape: f = "rounded",
114
114
  validate: p,
115
- onValidatedChange: i,
116
- className: l = "",
117
- icon: d,
118
- iconPosition: s = "left",
119
- floatingLabelStyle: c,
120
- onChange: a,
121
- isValid: u,
115
+ onValidatedChange: d,
116
+ className: a = "",
117
+ icon: u,
118
+ iconPosition: o = "left",
119
+ floatingLabelStyle: l,
120
+ onChange: i,
121
+ isValid: c,
122
122
  isInvalid: b,
123
- feedback: m,
124
- feedbackType: C = "invalid",
125
- children: k,
123
+ feedback: x,
124
+ feedbackType: h = "invalid",
125
+ children: w,
126
126
  ...$
127
- } = e, [E, P] = v("default"), j = (w) => {
128
- const S = w.target.value, M = (p == null ? void 0 : p(S)) ?? "default";
129
- P(M), i == null || i(w, M), a == null || a(w);
127
+ } = e, [E, P] = N("default"), j = (C) => {
128
+ const k = C.target.value, M = (p == null ? void 0 : p(k)) ?? "default";
129
+ P(M), d == null || d(C, M), i == null || i(C);
130
130
  }, L = {
131
131
  xs: "text-xs px-2 py-1",
132
132
  sm: "text-sm px-3 py-1.5",
@@ -144,12 +144,12 @@ const ie = J((e, n) => {
144
144
  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",
145
145
  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",
146
146
  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"
147
- }, Z = (w, S, M) => {
147
+ }, Z = (C, k, M) => {
148
148
  if (M)
149
149
  return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
150
- if (S)
150
+ if (k)
151
151
  return "border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";
152
- switch (w) {
152
+ switch (C) {
153
153
  case "error":
154
154
  return "border-red-500 bg-red-50 focus:ring-red-500";
155
155
  case "warning":
@@ -159,52 +159,52 @@ const ie = J((e, n) => {
159
159
  default:
160
160
  return "border-gray-300 focus:ring-blue-500";
161
161
  }
162
- }, G = L[o] || L.md, H = A[f] || A.flat, W = Z(E, u, b), U = s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", I = d && (s === "start" || s === "left") ? "ps-10" : d ? "pe-10" : "", y = r ?? `select-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, h = !!c;
163
- return /* @__PURE__ */ x("div", { className: `w-full relative ${h ? "z-0" : ""}`, children: [
164
- !h && t && /* @__PURE__ */ g(
162
+ }, G = L[s] || L.md, H = A[f] || A.flat, W = Z(E, c, b), U = o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", I = u && (o === "start" || o === "left") ? "ps-10" : u ? "pe-10" : "", v = r ?? `select-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, y = !!l;
163
+ return /* @__PURE__ */ m("div", { className: `w-full relative ${y ? "z-0" : ""}`, children: [
164
+ !y && t && /* @__PURE__ */ g(
165
165
  "label",
166
166
  {
167
- htmlFor: y,
168
- className: `block mb-1 font-light text-sm ${u ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
167
+ htmlFor: v,
168
+ className: `block mb-1 font-light text-sm ${c ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
169
169
  children: t
170
170
  }
171
171
  ),
172
- /* @__PURE__ */ x("div", { className: "relative w-full", children: [
173
- d && /* @__PURE__ */ g(
172
+ /* @__PURE__ */ m("div", { className: "relative w-full", children: [
173
+ u && /* @__PURE__ */ g(
174
174
  "div",
175
175
  {
176
176
  className: `absolute inset-y-0 flex items-center ${U}`,
177
- children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: d })
177
+ children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: u })
178
178
  }
179
179
  ),
180
180
  /* @__PURE__ */ g(
181
181
  "select",
182
182
  {
183
183
  ...$,
184
- id: y,
184
+ id: v,
185
185
  ref: n,
186
186
  onChange: j,
187
187
  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
188
188
  ${G}
189
- ${h && c && B[c]}
190
- ${I} ${H} ${W} ${l}`,
191
- children: k
189
+ ${y && l && B[l]}
190
+ ${I} ${H} ${W} ${a}`,
191
+ children: w
192
192
  }
193
193
  ),
194
- h && t && c && /* @__PURE__ */ g(
194
+ y && t && l && /* @__PURE__ */ g(
195
195
  "label",
196
196
  {
197
- htmlFor: y,
198
- className: `ms-1 ${F[c]} ${l}`,
197
+ htmlFor: v,
198
+ className: `ms-1 ${F[l]} ${a}`,
199
199
  children: t
200
200
  }
201
201
  )
202
202
  ] }),
203
- m && /* @__PURE__ */ g(
203
+ x && /* @__PURE__ */ g(
204
204
  "p",
205
205
  {
206
- className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
207
- children: m
206
+ className: `mt-1 text-xs ${h === "invalid" ? "text-red-600" : "text-green-600"}`,
207
+ children: x
208
208
  }
209
209
  )
210
210
  ] });
@@ -244,23 +244,23 @@ const ce = {
244
244
  variant: n = "primary",
245
245
  size: t = "md",
246
246
  type: r = "button",
247
- shape: o = "rounded",
247
+ shape: s = "rounded",
248
248
  className: f = "",
249
249
  isLoading: p = !1,
250
- disabled: i = !1,
251
- ...l
250
+ disabled: d = !1,
251
+ ...a
252
252
  }) => {
253
- const d = i || p, s = [
253
+ const u = d || p, o = [
254
254
  "inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",
255
255
  ce[n],
256
256
  de[t],
257
- ue[o],
258
- o === "flat" ? "shadow-none" : "shadow-sm",
259
- d ? "opacity-50 cursor-not-allowed pointer-events-none" : "",
257
+ ue[s],
258
+ s === "flat" ? "shadow-none" : "shadow-sm",
259
+ u ? "opacity-50 cursor-not-allowed pointer-events-none" : "",
260
260
  f
261
261
  ].filter(Boolean).join(" ");
262
- return /* @__PURE__ */ x("button", { type: r, className: s, disabled: d, ...l, children: [
263
- p && /* @__PURE__ */ x(
262
+ return /* @__PURE__ */ m("button", { type: r, className: o, disabled: u, ...a, children: [
263
+ p && /* @__PURE__ */ m(
264
264
  "svg",
265
265
  {
266
266
  "aria-hidden": "true",
@@ -294,7 +294,7 @@ const ce = {
294
294
  children: n,
295
295
  position: t = "right"
296
296
  }) => {
297
- const [r, o] = v(!1), [f, p] = v(!1), i = T(null), l = T(null), d = _(() => {
297
+ const [r, s] = N(!1), [f, p] = N(!1), d = D(null), a = D(null), u = T(() => {
298
298
  switch (t) {
299
299
  case "left":
300
300
  return "left-0";
@@ -304,32 +304,32 @@ const ce = {
304
304
  default:
305
305
  return "right-0";
306
306
  }
307
- }, [t]), s = N((u) => {
308
- const b = u.target;
309
- i.current && !i.current.contains(b) && l.current && !l.current.contains(b) && o(!1);
310
- }, []), c = N(() => {
311
- if (!l.current || !i.current) return;
312
- const u = l.current.getBoundingClientRect(), b = i.current.getBoundingClientRect(), m = window.innerHeight - u.bottom, C = u.top;
307
+ }, [t]), o = S((c) => {
308
+ const b = c.target;
309
+ d.current && !d.current.contains(b) && a.current && !a.current.contains(b) && s(!1);
310
+ }, []), l = S(() => {
311
+ if (!a.current || !d.current) return;
312
+ const c = a.current.getBoundingClientRect(), b = d.current.getBoundingClientRect(), x = window.innerHeight - c.bottom, h = c.top;
313
313
  p(
314
- m < b.height && C > b.height
314
+ x < b.height && h > b.height
315
315
  );
316
316
  }, []);
317
317
  z(() => {
318
318
  if (r)
319
- return c(), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), () => {
320
- window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0);
319
+ return l(), window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), () => {
320
+ window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
321
321
  };
322
- }, [r, c]), z(() => (document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s)), [s]);
323
- const a = N(() => o((u) => !u), []);
324
- return /* @__PURE__ */ x("div", { className: "relative flex items-center", children: [
325
- /* @__PURE__ */ g("button", { ref: l, onClick: a, children: e }),
322
+ }, [r, l]), z(() => (document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o)), [o]);
323
+ const i = S(() => s((c) => !c), []);
324
+ return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
325
+ /* @__PURE__ */ g("button", { ref: a, onClick: i, children: e }),
326
326
  r && /* @__PURE__ */ g(
327
327
  "div",
328
328
  {
329
- ref: i,
329
+ ref: d,
330
330
  className: `absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
331
331
  ${f ? "bottom-full mb-2" : "top-full mt-2"}
332
- ${d}`,
332
+ ${u}`,
333
333
  children: n
334
334
  }
335
335
  )
@@ -339,24 +339,24 @@ const ce = {
339
339
  content: n,
340
340
  position: t = "top",
341
341
  className: r = "",
342
- tooltipClass: o = "",
342
+ tooltipClass: s = "",
343
343
  tooltipStyle: f = {}
344
344
  }) => {
345
- const p = T(null), i = T(null);
345
+ const p = D(null), d = D(null);
346
346
  z(() => {
347
- const d = p.current, s = i.current;
348
- if (!d || !s) return;
349
- const c = () => {
350
- s.style.opacity = "1", s.style.visibility = "visible";
351
- }, a = () => {
352
- s.style.opacity = "0", s.style.visibility = "hidden";
347
+ const u = p.current, o = d.current;
348
+ if (!u || !o) return;
349
+ const l = () => {
350
+ o.style.opacity = "1", o.style.visibility = "visible";
351
+ }, i = () => {
352
+ o.style.opacity = "0", o.style.visibility = "hidden";
353
353
  };
354
- return d.addEventListener("mouseenter", c), d.addEventListener("mouseleave", a), () => {
355
- d.removeEventListener("mouseenter", c), d.removeEventListener("mouseleave", a);
354
+ return u.addEventListener("mouseenter", l), u.addEventListener("mouseleave", i), () => {
355
+ u.removeEventListener("mouseenter", l), u.removeEventListener("mouseleave", i);
356
356
  };
357
357
  }, []);
358
- const l = (d) => {
359
- const s = {
358
+ const a = (u) => {
359
+ const o = {
360
360
  position: "absolute",
361
361
  opacity: 0,
362
362
  visibility: "hidden",
@@ -373,10 +373,10 @@ const ce = {
373
373
  zIndex: 9999,
374
374
  width: "max-content"
375
375
  };
376
- switch (d) {
376
+ switch (u) {
377
377
  case "top":
378
378
  return {
379
- ...s,
379
+ ...o,
380
380
  bottom: "100%",
381
381
  left: "50%",
382
382
  transform: "translateX(-50%)",
@@ -384,7 +384,7 @@ const ce = {
384
384
  };
385
385
  case "bottom":
386
386
  return {
387
- ...s,
387
+ ...o,
388
388
  top: "100%",
389
389
  left: "50%",
390
390
  transform: "translateX(-50%)",
@@ -392,7 +392,7 @@ const ce = {
392
392
  };
393
393
  case "left":
394
394
  return {
395
- ...s,
395
+ ...o,
396
396
  right: "100%",
397
397
  top: "50%",
398
398
  transform: "translateY(-50%)",
@@ -400,26 +400,26 @@ const ce = {
400
400
  };
401
401
  case "right":
402
402
  return {
403
- ...s,
403
+ ...o,
404
404
  left: "100%",
405
405
  top: "50%",
406
406
  transform: "translateY(-50%)",
407
407
  marginLeft: "8px"
408
408
  };
409
409
  default:
410
- return s;
410
+ return o;
411
411
  }
412
412
  };
413
- return /* @__PURE__ */ x("div", { ref: p, className: `relative inline-block ${r}`, children: [
413
+ return /* @__PURE__ */ m("div", { ref: p, className: `relative inline-block ${r}`, children: [
414
414
  e,
415
415
  /* @__PURE__ */ g(
416
416
  "div",
417
417
  {
418
- ref: i,
418
+ ref: d,
419
419
  role: "tooltip",
420
- className: o,
420
+ className: s,
421
421
  style: {
422
- ...l(t),
422
+ ...a(t),
423
423
  ...f
424
424
  },
425
425
  children: n
@@ -460,15 +460,15 @@ const ce = {
460
460
  variant: n = "primary",
461
461
  size: t = "sm",
462
462
  shape: r = "rounded",
463
- icon: o,
463
+ icon: s,
464
464
  dismissible: f,
465
465
  onDismiss: p,
466
- className: i = "",
467
- ...l
466
+ className: d = "",
467
+ ...a
468
468
  }) => {
469
- const d = !e && !!o, s = `inline-flex items-center font-medium ${ge[n] || ""} ${pe[t] || ""} ${fe[r] || ""} ${d ? "justify-center p-2 w-8 h-8" : ""} ` + i;
470
- return /* @__PURE__ */ x("span", { className: s.trim(), ...l, children: [
471
- o && /* @__PURE__ */ g("span", { className: e ? "mr-1" : "", children: o }),
469
+ const u = !e && !!s, o = `inline-flex items-center font-medium ${ge[n] || ""} ${pe[t] || ""} ${fe[r] || ""} ${u ? "justify-center p-2 w-8 h-8" : ""} ` + d;
470
+ return /* @__PURE__ */ m("span", { className: o.trim(), ...a, children: [
471
+ s && /* @__PURE__ */ g("span", { className: e ? "mr-1" : "", children: s }),
472
472
  e,
473
473
  f && /* @__PURE__ */ g(
474
474
  "button",
@@ -487,14 +487,14 @@ var ee = {
487
487
  className: void 0,
488
488
  style: void 0,
489
489
  attr: void 0
490
- }, K = O.createContext && /* @__PURE__ */ O.createContext(ee), be = ["attr", "size", "title"];
490
+ }, Y = O.createContext && /* @__PURE__ */ O.createContext(ee), be = ["attr", "size", "title"];
491
491
  function xe(e, n) {
492
492
  if (e == null) return {};
493
- var t = me(e, n), r, o;
493
+ var t = me(e, n), r, s;
494
494
  if (Object.getOwnPropertySymbols) {
495
495
  var f = Object.getOwnPropertySymbols(e);
496
- for (o = 0; o < f.length; o++)
497
- r = f[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
496
+ for (s = 0; s < f.length; s++)
497
+ r = f[s], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
498
498
  }
499
499
  return t;
500
500
  }
@@ -508,22 +508,22 @@ function me(e, n) {
508
508
  }
509
509
  return t;
510
510
  }
511
- function D() {
512
- return D = Object.assign ? Object.assign.bind() : function(e) {
511
+ function _() {
512
+ return _ = Object.assign ? Object.assign.bind() : function(e) {
513
513
  for (var n = 1; n < arguments.length; n++) {
514
514
  var t = arguments[n];
515
515
  for (var r in t)
516
516
  Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
517
517
  }
518
518
  return e;
519
- }, D.apply(this, arguments);
519
+ }, _.apply(this, arguments);
520
520
  }
521
521
  function q(e, n) {
522
522
  var t = Object.keys(e);
523
523
  if (Object.getOwnPropertySymbols) {
524
524
  var r = Object.getOwnPropertySymbols(e);
525
- n && (r = r.filter(function(o) {
526
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
525
+ n && (r = r.filter(function(s) {
526
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
527
527
  })), t.push.apply(t, r);
528
528
  }
529
529
  return t;
@@ -562,7 +562,7 @@ function te(e) {
562
562
  }, n.attr), te(n.child)));
563
563
  }
564
564
  function re(e) {
565
- return (n) => /* @__PURE__ */ O.createElement(ve, D({
565
+ return (n) => /* @__PURE__ */ O.createElement(ve, _({
566
566
  attr: R({}, e.attr)
567
567
  }, n), te(e.child));
568
568
  }
@@ -570,24 +570,24 @@ function ve(e) {
570
570
  var n = (t) => {
571
571
  var {
572
572
  attr: r,
573
- size: o,
573
+ size: s,
574
574
  title: f
575
- } = e, p = xe(e, be), i = o || t.size || "1em", l;
576
- return t.className && (l = t.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ O.createElement("svg", D({
575
+ } = e, p = xe(e, be), d = s || t.size || "1em", a;
576
+ return t.className && (a = t.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ O.createElement("svg", _({
577
577
  stroke: "currentColor",
578
578
  fill: "currentColor",
579
579
  strokeWidth: "0"
580
580
  }, t.attr, r, p, {
581
- className: l,
581
+ className: a,
582
582
  style: R(R({
583
583
  color: e.color || t.color
584
584
  }, t.style), e.style),
585
- height: i,
586
- width: i,
585
+ height: d,
586
+ width: d,
587
587
  xmlns: "http://www.w3.org/2000/svg"
588
588
  }), f && /* @__PURE__ */ O.createElement("title", null, f), e.children);
589
589
  };
590
- return K !== void 0 ? /* @__PURE__ */ O.createElement(K.Consumer, null, (t) => n(t)) : n(ee);
590
+ return Y !== void 0 ? /* @__PURE__ */ O.createElement(Y.Consumer, null, (t) => n(t)) : n(ee);
591
591
  }
592
592
  function Ce(e) {
593
593
  return re({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z" }, child: [] }] })(e);
@@ -597,17 +597,17 @@ const Ae = ({
597
597
  allowMultipleOpen: n = !1,
598
598
  className: t = "",
599
599
  tileClasses: r = "",
600
- open: o,
600
+ open: s,
601
601
  onChange: f,
602
602
  renderTitle: p,
603
- renderContent: i
603
+ renderContent: d
604
604
  }) => {
605
- const [l, d] = v(/* @__PURE__ */ new Set()), s = _(() => o ? new Set(o) : l, [o, l]), c = N(
606
- (a) => {
607
- const u = new Set(s);
608
- u.has(a) ? u.delete(a) : (n || u.clear(), u.add(a)), o && f ? f(Array.from(u)) : d(u);
605
+ const [a, u] = N(/* @__PURE__ */ new Set()), o = T(() => s ? new Set(s) : a, [s, a]), l = S(
606
+ (i) => {
607
+ const c = new Set(o);
608
+ c.has(i) ? c.delete(i) : (n || c.clear(), c.add(i)), s && f ? f(Array.from(c)) : u(c);
609
609
  },
610
- [s, o, f, n]
610
+ [o, s, f, n]
611
611
  );
612
612
  return /* @__PURE__ */ g(
613
613
  "div",
@@ -615,24 +615,24 @@ const Ae = ({
615
615
  className: "accordion",
616
616
  role: "region",
617
617
  "aria-multiselectable": n,
618
- children: e.map((a) => {
619
- const u = s.has(a.id), b = `accordion-heading-${a.id}`, m = `accordion-panel-${a.id}`;
620
- return /* @__PURE__ */ x(
618
+ children: e.map((i) => {
619
+ const c = o.has(i.id), b = `accordion-heading-${i.id}`, x = `accordion-panel-${i.id}`;
620
+ return /* @__PURE__ */ m(
621
621
  "div",
622
622
  {
623
623
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,
624
624
  children: [
625
- /* @__PURE__ */ x(
625
+ /* @__PURE__ */ m(
626
626
  "button",
627
627
  {
628
628
  id: b,
629
629
  type: "button",
630
- "aria-expanded": u,
631
- "aria-controls": m,
632
- onClick: () => c(a.id),
630
+ "aria-expanded": c,
631
+ "aria-controls": x,
632
+ onClick: () => l(i.id),
633
633
  className: `flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${r}`,
634
634
  children: [
635
- p ? p(a, u) : a.title,
635
+ p ? p(i, c) : i.title,
636
636
  /* @__PURE__ */ g(Ce, {})
637
637
  ]
638
638
  }
@@ -640,17 +640,17 @@ const Ae = ({
640
640
  /* @__PURE__ */ g(
641
641
  "div",
642
642
  {
643
- id: m,
643
+ id: x,
644
644
  role: "region",
645
645
  "aria-labelledby": b,
646
- hidden: !u,
646
+ hidden: !c,
647
647
  className: "p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",
648
- children: i ? i(a, u) : a.content
648
+ children: d ? d(i, c) : i.content
649
649
  }
650
650
  )
651
651
  ]
652
652
  },
653
- a.id
653
+ i.id
654
654
  );
655
655
  })
656
656
  }
@@ -661,80 +661,86 @@ function Me({
661
661
  title: n,
662
662
  children: t,
663
663
  standalone: r = !1,
664
- showFloatingClose: o = !1,
664
+ showFloatingClose: s = !1,
665
665
  containerClasses: f = "",
666
- onClose: p
666
+ onClose: p,
667
+ disableEscapeClose: d = !1
667
668
  }) {
668
- const i = ae(), l = oe(), d = !r && !!i && !!l, [s, c] = v(!1), a = d ? i.isOpen(e) : s, u = d ? i.getModalData(e) : null, b = () => {
669
- d ? l.closeModal(e) : c(!1), p == null || p();
670
- };
671
- return z(() => (a ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
672
- document.body.style.overflow = "";
673
- }), [a]), a ? /* @__PURE__ */ g("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]", children: /* @__PURE__ */ x(
669
+ const a = ae(), u = oe(), o = !r && !!a && !!u, [l, i] = N(!1), c = o ? a.isOpen(e) : l, b = o ? a.getModalData(e) : null, x = S(() => {
670
+ o ? u.closeModal(e) : i(!1), p == null || p();
671
+ }, [o, u, e, p]);
672
+ return z(() => {
673
+ const h = (w) => {
674
+ w.key === "Escape" && !d && x();
675
+ };
676
+ return c ? (document.body.style.overflow = "hidden", window.addEventListener("keydown", h)) : document.body.style.overflow = "", () => {
677
+ document.body.style.overflow = "", window.removeEventListener("keydown", h);
678
+ };
679
+ }, [c, d, x]), c ? /* @__PURE__ */ g("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]", children: /* @__PURE__ */ m(
674
680
  "div",
675
681
  {
676
682
  className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${f}`,
677
683
  children: [
678
- /* @__PURE__ */ x("div", { className: "flex justify-between items-center relative", children: [
684
+ /* @__PURE__ */ m("div", { className: "flex justify-between items-center relative", children: [
679
685
  n && /* @__PURE__ */ g("h2", { className: "text-lg font-semibold", children: n }),
680
- o && /* @__PURE__ */ g(
686
+ s && /* @__PURE__ */ g(
681
687
  "button",
682
688
  {
683
- onClick: b,
684
- className: "text-gray-500 hover:text-gray-700 absolute top-2 right-3",
689
+ onClick: x,
690
+ className: "text-gray-500 hover:text-gray-900 absolute top-2 right-3 hover:bg-gray-50 rounded-full",
685
691
  "aria-label": "Close modal",
686
692
  children: "✕"
687
693
  }
688
694
  )
689
695
  ] }),
690
- /* @__PURE__ */ g("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: u }) : t })
696
+ /* @__PURE__ */ g("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: b }) : t })
691
697
  ]
692
698
  }
693
699
  ) }) : null;
694
700
  }
695
- function Te({
701
+ function De({
696
702
  children: e
697
703
  }) {
698
- const [n, t] = v({}), [r, o] = v({}), f = N((c, a) => {
699
- t((u) => ({ ...u, [c]: !0 })), a && o((u) => ({ ...u, [c]: a }));
700
- }, []), p = N((c) => {
701
- t((a) => ({ ...a, [c]: !1 })), o((a) => {
702
- const u = { ...a };
703
- return delete u[c], u;
704
+ const [n, t] = N({}), [r, s] = N({}), f = S((l, i) => {
705
+ t((c) => ({ ...c, [l]: !0 })), i && s((c) => ({ ...c, [l]: i }));
706
+ }, []), p = S((l) => {
707
+ t((i) => ({ ...i, [l]: !1 })), s((i) => {
708
+ const c = { ...i };
709
+ return delete c[l], c;
704
710
  });
705
- }, []), i = N((c) => !!n[c], [n]), l = N(
706
- (c) => r[c],
711
+ }, []), d = S((l) => !!n[l], [n]), a = S(
712
+ (l) => r[l],
707
713
  [r]
708
- ), d = _(
714
+ ), u = T(
709
715
  () => ({ openModal: f, closeModal: p }),
710
716
  [f, p]
711
- ), s = _(
712
- () => ({ isOpen: i, getModalData: l }),
713
- [i, l]
717
+ ), o = T(
718
+ () => ({ isOpen: d, getModalData: a }),
719
+ [d, a]
714
720
  );
715
- return /* @__PURE__ */ g(ne.Provider, { value: d, children: /* @__PURE__ */ g(se.Provider, { value: s, children: e }) });
721
+ return /* @__PURE__ */ g(ne.Provider, { value: u, children: /* @__PURE__ */ g(se.Provider, { value: o, children: e }) });
716
722
  }
717
- function _e(e) {
718
- const { openModal: n, closeModal: t } = oe(), { isOpen: r, getModalData: o } = ae();
723
+ function Te(e) {
724
+ const { openModal: n, closeModal: t } = oe(), { isOpen: r, getModalData: s } = ae();
719
725
  return {
720
726
  open: (f) => n(e, f),
721
727
  close: () => t(e),
722
728
  isOpen: r(e),
723
- data: o(e)
729
+ data: s(e)
724
730
  };
725
731
  }
726
- let X = null, Y = {};
732
+ let K = null, X = {};
727
733
  function Se(e) {
728
- X = e;
734
+ K = e;
729
735
  }
730
- function De(e) {
731
- Y = { ...Y, ...e };
736
+ function _e(e) {
737
+ X = { ...X, ...e };
732
738
  }
733
739
  function Ne() {
734
- return Y;
740
+ return X;
735
741
  }
736
742
  function Re(e, n, t = 3e3, r) {
737
- X ? X(e, n, t, r) : console.warn("Toast system is not mounted");
743
+ K ? K(e, n, t, r) : console.warn("Toast system is not mounted");
738
744
  }
739
745
  function ke(e) {
740
746
  return re({ attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor" }, child: [] }] })(e);
@@ -743,27 +749,27 @@ const Le = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
743
749
  const n = Math.random() * 16 | 0;
744
750
  return (e === "x" ? n : n & 3 | 8).toString(16);
745
751
  }), Be = () => {
746
- const [e, n] = v([]);
752
+ const [e, n] = N([]);
747
753
  z(() => {
748
- Se((r, o, f, p) => {
749
- const i = Le();
750
- n((l) => [...l, { id: i, type: r, message: o, config: p }]), setTimeout(() => {
751
- n((l) => l.filter((d) => d.id !== i));
754
+ Se((r, s, f, p) => {
755
+ const d = Le();
756
+ n((a) => [...a, { id: d, type: r, message: s, config: p }]), setTimeout(() => {
757
+ n((a) => a.filter((u) => u.id !== d));
752
758
  }, f);
753
759
  });
754
760
  }, []);
755
761
  const t = Ne();
756
762
  return /* @__PURE__ */ g("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((r) => {
757
- var l, d, s, c, a, u, b, m, C, k, $, E, P;
758
- const o = ((l = r.config) == null ? void 0 : l.icon) || ((d = t.icons) == null ? void 0 : d[r.type]) || Oe(r.type), f = ((s = r.config) == null ? void 0 : s.bgColor) || ((a = (c = t.colors) == null ? void 0 : c[r.type]) == null ? void 0 : a.bg) || "bg-white dark:bg-gray-800", p = ((u = r.config) == null ? void 0 : u.textColor) || ((m = (b = t.colors) == null ? void 0 : b[r.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", i = ((C = r.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
759
- return /* @__PURE__ */ x(
763
+ var a, u, o, l, i, c, b, x, h, w, $, E, P;
764
+ const s = ((a = r.config) == null ? void 0 : a.icon) || ((u = t.icons) == null ? void 0 : u[r.type]) || Oe(r.type), f = ((o = r.config) == null ? void 0 : o.bgColor) || ((i = (l = t.colors) == null ? void 0 : l[r.type]) == null ? void 0 : i.bg) || "bg-white dark:bg-gray-800", p = ((c = r.config) == null ? void 0 : c.textColor) || ((x = (b = t.colors) == null ? void 0 : b[r.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", d = ((h = r.config) == null ? void 0 : h.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
765
+ return /* @__PURE__ */ m(
760
766
  "div",
761
767
  {
762
768
  className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${f} ${p}`,
763
769
  children: [
764
- /* @__PURE__ */ g("div", { className: i, children: o }),
765
- /* @__PURE__ */ x("div", { className: "flex-1 me-3", children: [
766
- ((k = r.config) == null ? void 0 : k.title) && /* @__PURE__ */ g("div", { className: "font-semibold text-black", children: r.config.title }),
770
+ /* @__PURE__ */ g("div", { className: d, children: s }),
771
+ /* @__PURE__ */ m("div", { className: "flex-1 me-3", children: [
772
+ ((w = r.config) == null ? void 0 : w.title) && /* @__PURE__ */ g("div", { className: "font-semibold text-black", children: r.config.title }),
767
773
  (($ = r.config) == null ? void 0 : $.description) && /* @__PURE__ */ g("div", { className: "text-sm text-gray-500", children: r.config.description }),
768
774
  !((E = r.config) != null && E.title) && !((P = r.config) != null && P.description) && /* @__PURE__ */ g("div", { className: "text-sm", children: r.message })
769
775
  ] }),
@@ -801,13 +807,13 @@ export {
801
807
  je as Dropdown,
802
808
  le as Input,
803
809
  Me as Modal,
804
- Te as ModalProvider,
810
+ De as ModalProvider,
805
811
  ie as Select,
806
812
  Be as Toast,
807
813
  Ie as Tooltip,
808
- De as setToastDefaults,
814
+ _e as setToastDefaults,
809
815
  Re as showToast,
810
816
  oe as useModalActions,
811
- _e as useModalInstance,
817
+ Te as useModalInstance,
812
818
  ae as useModalState
813
819
  };
@@ -1,9 +1,9 @@
1
- (function(x,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(x=typeof globalThis<"u"?globalThis:x||self,o(x.TailwindUiKit={},x.jsxRuntime,x.React))})(this,function(x,o,s){"use strict";"use client";const q=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:a="md",shape:b="rounded",validate:p,onValidatedChange:d,className:c="",icon:g,iconPosition:l="left",floatingLabelStyle:u,onChange:i,isValid:f,isInvalid:h,feedback:y,feedbackType:C="invalid",...N}=e,[O,L]=s.useState("default"),$=m=>{const v=m.target.value,S=(p==null?void 0:p(v))??"default";L(S),d==null||d(m,S),i==null||i(m)},E={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"},k={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},I={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"},B={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"},F=(m,v,S)=>{if(S)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(v)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(m){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"}},Z=E[a]||E.md,G=k[b]||k.flat,H=F(O,f,h),U=l==="start"||l==="left"?"left-0 ps-3.5":"right-0 pe-3.5",W=g&&(l==="start"||l==="left")?"ps-10":g?"pe-10":"",j=r??`input-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,w=!!u;return o.jsxs("div",{className:`w-full relative ${w?"z-0":""}`,children:[!w&&t&&o.jsx("label",{htmlFor:j,className:`block mb-1 font-light text-sm ${f?"text-green-700 dark:text-green-500":h?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[g&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${U}`,children:o.jsx("span",{className:"text-gray-500",children:g})}),o.jsx("input",{...N,id:j,ref:n,placeholder:w?" ":N.placeholder,onChange:$,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
1
+ (function(x,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(x=typeof globalThis<"u"?globalThis:x||self,o(x.TailwindUiKit={},x.jsxRuntime,x.React))})(this,function(x,o,s){"use strict";"use client";const K=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:b="rounded",validate:p,onValidatedChange:g,className:i="",icon:f,iconPosition:a="left",floatingLabelStyle:c,onChange:d,isValid:u,isInvalid:h,feedback:y,feedbackType:m="invalid",...v}=e,[L,O]=s.useState("default"),$=w=>{const S=w.target.value,N=(p==null?void 0:p(S))??"default";O(N),g==null||g(w,N),d==null||d(w)},E={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"},k={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},I={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"},B={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"},F=(w,S,N)=>{if(N)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(S)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(w){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"}},Z=E[l]||E.md,G=k[b]||k.flat,H=F(L,u,h),U=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",W=f&&(a==="start"||a==="left")?"ps-10":f?"pe-10":"",j=r??`input-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,C=!!c;return o.jsxs("div",{className:`w-full relative ${C?"z-0":""}`,children:[!C&&t&&o.jsx("label",{htmlFor:j,className:`block mb-1 font-light text-sm ${u?"text-green-700 dark:text-green-500":h?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[f&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${U}`,children:o.jsx("span",{className:"text-gray-500",children:f})}),o.jsx("input",{...v,id:j,ref:n,placeholder:C?" ":v.placeholder,onChange:$,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
2
2
  ${Z}
3
- ${w&&u&&I[u]}
4
- ${W} ${G} ${H} ${c}`}),w&&t&&u&&o.jsx("label",{htmlFor:j,className:`ms-1 ${B[u]} ${c}`,children:t})]}),y&&o.jsx("p",{className:`mt-1 text-xs ${C==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,children:y})]})});q.displayName="Input";const K=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:a="md",shape:b="rounded",validate:p,onValidatedChange:d,className:c="",icon:g,iconPosition:l="left",floatingLabelStyle:u,onChange:i,isValid:f,isInvalid:h,feedback:y,feedbackType:C="invalid",children:N,...O}=e,[L,$]=s.useState("default"),E=v=>{const S=v.target.value,T=(p==null?void 0:p(S))??"default";$(T),d==null||d(v,T),i==null||i(v)},k={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"},I={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},B={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"},F={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"},Z=(v,S,T)=>{if(T)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(S)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";switch(v){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"}},G=k[a]||k.md,H=I[b]||I.flat,U=Z(L,f,h),W=l==="start"||l==="left"?"left-0 ps-3.5":"right-0 pe-3.5",j=g&&(l==="start"||l==="left")?"ps-10":g?"pe-10":"",w=r??`select-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,m=!!u;return o.jsxs("div",{className:`w-full relative ${m?"z-0":""}`,children:[!m&&t&&o.jsx("label",{htmlFor:w,className:`block mb-1 font-light text-sm ${f?"text-green-700":h?"text-red-700":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[g&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${W}`,children:o.jsx("span",{className:"text-gray-500",children:g})}),o.jsx("select",{...O,id:w,ref:n,onChange:E,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
3
+ ${C&&c&&I[c]}
4
+ ${W} ${G} ${H} ${i}`}),C&&t&&c&&o.jsx("label",{htmlFor:j,className:`ms-1 ${B[c]} ${i}`,children:t})]}),y&&o.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,children:y})]})});K.displayName="Input";const q=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:b="rounded",validate:p,onValidatedChange:g,className:i="",icon:f,iconPosition:a="left",floatingLabelStyle:c,onChange:d,isValid:u,isInvalid:h,feedback:y,feedbackType:m="invalid",children:v,...L}=e,[O,$]=s.useState("default"),E=S=>{const N=S.target.value,T=(p==null?void 0:p(N))??"default";$(T),g==null||g(S,T),d==null||d(S)},k={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"},I={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},B={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"},F={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"},Z=(S,N,T)=>{if(T)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(N)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";switch(S){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"}},G=k[l]||k.md,H=I[b]||I.flat,U=Z(O,u,h),W=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",j=f&&(a==="start"||a==="left")?"ps-10":f?"pe-10":"",C=r??`select-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,w=!!c;return o.jsxs("div",{className:`w-full relative ${w?"z-0":""}`,children:[!w&&t&&o.jsx("label",{htmlFor:C,className:`block mb-1 font-light text-sm ${u?"text-green-700":h?"text-red-700":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[f&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${W}`,children:o.jsx("span",{className:"text-gray-500",children:f})}),o.jsx("select",{...L,id:C,ref:n,onChange:E,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
5
5
  ${G}
6
- ${m&&u&&B[u]}
7
- ${j} ${H} ${U} ${c}`,children:N}),m&&t&&u&&o.jsx("label",{htmlFor:w,className:`ms-1 ${F[u]} ${c}`,children:t})]}),y&&o.jsx("p",{className:`mt-1 text-xs ${C==="invalid"?"text-red-600":"text-green-600"}`,children:y})]})});K.displayName="Select";const te={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-600 text-white hover:bg-gray-700",success:"bg-green-600 text-white hover:bg-green-700",danger:"bg-red-600 text-white hover:bg-red-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-cyan-600 text-white hover:bg-cyan-700",dark:"bg-gray-900 text-white hover:bg-black",light:"bg-gray-100 text-black hover:bg-gray-200",link:"bg-transparent text-blue-600 hover:underline [&&]:p-0 [&&]:shadow-none","outline-primary":"border border-blue-600 text-blue-600 hover:bg-blue-50","outline-secondary":"border border-gray-600 text-gray-600 hover:bg-gray-50","outline-success":"border border-green-600 text-green-600 hover:bg-green-50","outline-danger":"border border-red-600 text-red-600 hover:bg-red-50","outline-warning":"border border-yellow-500 text-yellow-600 hover:bg-yellow-50","outline-info":"border border-cyan-600 text-cyan-600 hover:bg-cyan-50","outline-dark":"border border-gray-900 text-gray-900 hover:bg-gray-100","outline-light":"border border-gray-100 text-gray-500 hover:bg-gray-200"},re={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"},ne={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},oe=({children:e,variant:n="primary",size:t="md",type:r="button",shape:a="rounded",className:b="",isLoading:p=!1,disabled:d=!1,...c})=>{const g=d||p,l=["inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",te[n],re[t],ne[a],a==="flat"?"shadow-none":"shadow-sm",g?"opacity-50 cursor-not-allowed pointer-events-none":"",b].filter(Boolean).join(" ");return o.jsxs("button",{type:r,className:l,disabled:g,...c,children:[p&&o.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:[o.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"}),o.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"})]}),e]})},se=({label:e,children:n,position:t="right"})=>{const[r,a]=s.useState(!1),[b,p]=s.useState(!1),d=s.useRef(null),c=s.useRef(null),g=s.useMemo(()=>{switch(t){case"left":return"left-0";case"center":return"left-1/2 transform -translate-x-1/2";case"right":default:return"right-0"}},[t]),l=s.useCallback(f=>{const h=f.target;d.current&&!d.current.contains(h)&&c.current&&!c.current.contains(h)&&a(!1)},[]),u=s.useCallback(()=>{if(!c.current||!d.current)return;const f=c.current.getBoundingClientRect(),h=d.current.getBoundingClientRect(),y=window.innerHeight-f.bottom,C=f.top;p(y<h.height&&C>h.height)},[]);s.useEffect(()=>{if(r)return u(),window.addEventListener("resize",u),window.addEventListener("scroll",u,!0),()=>{window.removeEventListener("resize",u),window.removeEventListener("scroll",u,!0)}},[r,u]),s.useEffect(()=>(document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)),[l]);const i=s.useCallback(()=>a(f=>!f),[]);return o.jsxs("div",{className:"relative flex items-center",children:[o.jsx("button",{ref:c,onClick:i,children:e}),r&&o.jsx("div",{ref:d,className:`absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
6
+ ${w&&c&&B[c]}
7
+ ${j} ${H} ${U} ${i}`,children:v}),w&&t&&c&&o.jsx("label",{htmlFor:C,className:`ms-1 ${F[c]} ${i}`,children:t})]}),y&&o.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600":"text-green-600"}`,children:y})]})});q.displayName="Select";const te={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-600 text-white hover:bg-gray-700",success:"bg-green-600 text-white hover:bg-green-700",danger:"bg-red-600 text-white hover:bg-red-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-cyan-600 text-white hover:bg-cyan-700",dark:"bg-gray-900 text-white hover:bg-black",light:"bg-gray-100 text-black hover:bg-gray-200",link:"bg-transparent text-blue-600 hover:underline [&&]:p-0 [&&]:shadow-none","outline-primary":"border border-blue-600 text-blue-600 hover:bg-blue-50","outline-secondary":"border border-gray-600 text-gray-600 hover:bg-gray-50","outline-success":"border border-green-600 text-green-600 hover:bg-green-50","outline-danger":"border border-red-600 text-red-600 hover:bg-red-50","outline-warning":"border border-yellow-500 text-yellow-600 hover:bg-yellow-50","outline-info":"border border-cyan-600 text-cyan-600 hover:bg-cyan-50","outline-dark":"border border-gray-900 text-gray-900 hover:bg-gray-100","outline-light":"border border-gray-100 text-gray-500 hover:bg-gray-200"},re={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"},ne={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},oe=({children:e,variant:n="primary",size:t="md",type:r="button",shape:l="rounded",className:b="",isLoading:p=!1,disabled:g=!1,...i})=>{const f=g||p,a=["inline-flex items-center justify-center font-normal transition duration-150 cursor-pointer",te[n],re[t],ne[l],l==="flat"?"shadow-none":"shadow-sm",f?"opacity-50 cursor-not-allowed pointer-events-none":"",b].filter(Boolean).join(" ");return o.jsxs("button",{type:r,className:a,disabled:f,...i,children:[p&&o.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:[o.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"}),o.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"})]}),e]})},se=({label:e,children:n,position:t="right"})=>{const[r,l]=s.useState(!1),[b,p]=s.useState(!1),g=s.useRef(null),i=s.useRef(null),f=s.useMemo(()=>{switch(t){case"left":return"left-0";case"center":return"left-1/2 transform -translate-x-1/2";case"right":default:return"right-0"}},[t]),a=s.useCallback(u=>{const h=u.target;g.current&&!g.current.contains(h)&&i.current&&!i.current.contains(h)&&l(!1)},[]),c=s.useCallback(()=>{if(!i.current||!g.current)return;const u=i.current.getBoundingClientRect(),h=g.current.getBoundingClientRect(),y=window.innerHeight-u.bottom,m=u.top;p(y<h.height&&m>h.height)},[]);s.useEffect(()=>{if(r)return c(),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[r,c]),s.useEffect(()=>(document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)),[a]);const d=s.useCallback(()=>l(u=>!u),[]);return o.jsxs("div",{className:"relative flex items-center",children:[o.jsx("button",{ref:i,onClick:d,children:e}),r&&o.jsx("div",{ref:g,className:`absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
8
8
  ${b?"bottom-full mb-2":"top-full mt-2"}
9
- ${g}`,children:n})]})},ae=({children:e,content:n,position:t="top",className:r="",tooltipClass:a="",tooltipStyle:b={}})=>{const p=s.useRef(null),d=s.useRef(null);s.useEffect(()=>{const g=p.current,l=d.current;if(!g||!l)return;const u=()=>{l.style.opacity="1",l.style.visibility="visible"},i=()=>{l.style.opacity="0",l.style.visibility="hidden"};return g.addEventListener("mouseenter",u),g.addEventListener("mouseleave",i),()=>{g.removeEventListener("mouseenter",u),g.removeEventListener("mouseleave",i)}},[]);const c=g=>{const l={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(g){case"top":return{...l,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...l,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...l,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...l,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return l}};return o.jsxs("div",{ref:p,className:`relative inline-block ${r}`,children:[e,o.jsx("div",{ref:d,role:"tooltip",className:a,style:{...c(t),...b},children:n})]})},le={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"},ie={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"},ce={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},de=({label:e,variant:n="primary",size:t="sm",shape:r="rounded",icon:a,dismissible:b,onDismiss:p,className:d="",...c})=>{const g=!e&&!!a,l=`inline-flex items-center font-medium ${le[n]||""} ${ie[t]||""} ${ce[r]||""} ${g?"justify-center p-2 w-8 h-8":""} `+d;return o.jsxs("span",{className:l.trim(),...c,children:[a&&o.jsx("span",{className:e?"mr-1":"",children:a}),e,b&&o.jsx("button",{type:"button",onClick:p,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};var X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=s.createContext&&s.createContext(X),ue=["attr","size","title"];function ge(e,n){if(e==null)return{};var t=fe(e,n),r,a;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a<b.length;a++)r=b[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function fe(e,n){if(e==null)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},P.apply(this,arguments)}function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?J(Object(t),!0).forEach(function(r){pe(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function pe(e,n,t){return n=be(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function be(e){var n=xe(e,"string");return typeof n=="symbol"?n:n+""}function xe(e,n){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Q(e){return e&&e.map((n,t)=>s.createElement(n.tag,M({key:t},n.attr),Q(n.child)))}function V(e){return n=>s.createElement(he,P({attr:M({},e.attr)},n),Q(e.child))}function he(e){var n=t=>{var{attr:r,size:a,title:b}=e,p=ge(e,ue),d=a||t.size||"1em",c;return t.className&&(c=t.className),e.className&&(c=(c?c+" ":"")+e.className),s.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,p,{className:c,style:M(M({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),b&&s.createElement("title",null,b),e.children)};return Y!==void 0?s.createElement(Y.Consumer,null,t=>n(t)):n(X)}function ye(e){return V({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}const me=({items:e,allowMultipleOpen:n=!1,className:t="",tileClasses:r="",open:a,onChange:b,renderTitle:p,renderContent:d})=>{const[c,g]=s.useState(new Set),l=s.useMemo(()=>a?new Set(a):c,[a,c]),u=s.useCallback(i=>{const f=new Set(l);f.has(i)?f.delete(i):(n||f.clear(),f.add(i)),a&&b?b(Array.from(f)):g(f)},[l,a,b,n]);return o.jsx("div",{className:"accordion",role:"region","aria-multiselectable":n,children:e.map(i=>{const f=l.has(i.id),h=`accordion-heading-${i.id}`,y=`accordion-panel-${i.id}`;return o.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,children:[o.jsxs("button",{id:h,type:"button","aria-expanded":f,"aria-controls":y,onClick:()=>u(i.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 ${r}`,children:[p?p(i,f):i.title,o.jsx(ye,{})]}),o.jsx("div",{id:y,role:"region","aria-labelledby":h,hidden:!f,className:"p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",children:d?d(i,f):i.content})]},i.id)})})},R=s.createContext(null),z=()=>s.useContext(R),ee=s.createContext(null),A=()=>s.useContext(ee);function we({id:e,title:n,children:t,standalone:r=!1,showFloatingClose:a=!1,containerClasses:b="",onClose:p}){const d=A(),c=z(),g=!r&&!!d&&!!c,[l,u]=s.useState(!1),i=g?d.isOpen(e):l,f=g?d.getModalData(e):null,h=()=>{g?c.closeModal(e):u(!1),p==null||p()};return s.useEffect(()=>(i?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[i]),i?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",children:o.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${b}`,children:[o.jsxs("div",{className:"flex justify-between items-center relative",children:[n&&o.jsx("h2",{className:"text-lg font-semibold",children:n}),a&&o.jsx("button",{onClick:h,className:"text-gray-500 hover:text-gray-700 absolute top-2 right-3","aria-label":"Close modal",children:"✕"})]}),o.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof t=="function"?t({modalData:f}):t})]})}):null}function ve({children:e}){const[n,t]=s.useState({}),[r,a]=s.useState({}),b=s.useCallback((u,i)=>{t(f=>({...f,[u]:!0})),i&&a(f=>({...f,[u]:i}))},[]),p=s.useCallback(u=>{t(i=>({...i,[u]:!1})),a(i=>{const f={...i};return delete f[u],f})},[]),d=s.useCallback(u=>!!n[u],[n]),c=s.useCallback(u=>r[u],[r]),g=s.useMemo(()=>({openModal:b,closeModal:p}),[b,p]),l=s.useMemo(()=>({isOpen:d,getModalData:c}),[d,c]);return o.jsx(R.Provider,{value:g,children:o.jsx(ee.Provider,{value:l,children:e})})}function Ce(e){const{openModal:n,closeModal:t}=z(),{isOpen:r,getModalData:a}=A();return{open:b=>n(e,b),close:()=>t(e),isOpen:r(e),data:a(e)}}let D=null,_={};function Se(e){D=e}function Ne(e){_={..._,...e}}function ke(){return _}function Oe(e,n,t=3e3,r){D?D(e,n,t,r):console.warn("Toast system is not mounted")}function Le(e){return V({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const $e=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)}),Ee=()=>{const[e,n]=s.useState([]);s.useEffect(()=>{Se((r,a,b,p)=>{const d=$e();n(c=>[...c,{id:d,type:r,message:a,config:p}]),setTimeout(()=>{n(c=>c.filter(g=>g.id!==d))},b)})},[]);const t=ke();return o.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:e.map(r=>{var c,g,l,u,i,f,h,y,C,N,O,L,$;const a=((c=r.config)==null?void 0:c.icon)||((g=t.icons)==null?void 0:g[r.type])||je(r.type),b=((l=r.config)==null?void 0:l.bgColor)||((i=(u=t.colors)==null?void 0:u[r.type])==null?void 0:i.bg)||"bg-white dark:bg-gray-800",p=((f=r.config)==null?void 0:f.textColor)||((y=(h=t.colors)==null?void 0:h[r.type])==null?void 0:y.text)||"text-gray-700 dark:text-gray-300",d=((C=r.config)==null?void 0:C.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return o.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${b} ${p}`,children:[o.jsx("div",{className:d,children:a}),o.jsxs("div",{className:"flex-1 me-3",children:[((N=r.config)==null?void 0:N.title)&&o.jsx("div",{className:"font-semibold text-black",children:r.config.title}),((O=r.config)==null?void 0:O.description)&&o.jsx("div",{className:"text-sm text-gray-500",children:r.config.description}),!((L=r.config)!=null&&L.title)&&!(($=r.config)!=null&&$.description)&&o.jsx("div",{className:"text-sm",children:r.message})]}),o.jsx("button",{onClick:()=>n(E=>E.filter(k=>k.id!==r.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:o.jsx(Le,{size:18})})]},r.id)})})};function je(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}x.Accordion=me,x.Badge=de,x.Button=oe,x.Dropdown=se,x.Input=q,x.Modal=we,x.ModalProvider=ve,x.Select=K,x.Toast=Ee,x.Tooltip=ae,x.setToastDefaults=Ne,x.showToast=Oe,x.useModalActions=z,x.useModalInstance=Ce,x.useModalState=A,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
9
+ ${f}`,children:n})]})},ae=({children:e,content:n,position:t="top",className:r="",tooltipClass:l="",tooltipStyle:b={}})=>{const p=s.useRef(null),g=s.useRef(null);s.useEffect(()=>{const f=p.current,a=g.current;if(!f||!a)return;const c=()=>{a.style.opacity="1",a.style.visibility="visible"},d=()=>{a.style.opacity="0",a.style.visibility="hidden"};return f.addEventListener("mouseenter",c),f.addEventListener("mouseleave",d),()=>{f.removeEventListener("mouseenter",c),f.removeEventListener("mouseleave",d)}},[]);const i=f=>{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(f){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 o.jsxs("div",{ref:p,className:`relative inline-block ${r}`,children:[e,o.jsx("div",{ref:g,role:"tooltip",className:l,style:{...i(t),...b},children:n})]})},le={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"},ie={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"},ce={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},de=({label:e,variant:n="primary",size:t="sm",shape:r="rounded",icon:l,dismissible:b,onDismiss:p,className:g="",...i})=>{const f=!e&&!!l,a=`inline-flex items-center font-medium ${le[n]||""} ${ie[t]||""} ${ce[r]||""} ${f?"justify-center p-2 w-8 h-8":""} `+g;return o.jsxs("span",{className:a.trim(),...i,children:[l&&o.jsx("span",{className:e?"mr-1":"",children:l}),e,b&&o.jsx("button",{type:"button",onClick:p,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};var X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=s.createContext&&s.createContext(X),ue=["attr","size","title"];function ge(e,n){if(e==null)return{};var t=fe(e,n),r,l;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(l=0;l<b.length;l++)r=b[l],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function fe(e,n){if(e==null)return{};var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},P.apply(this,arguments)}function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?J(Object(t),!0).forEach(function(r){pe(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function pe(e,n,t){return n=be(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function be(e){var n=xe(e,"string");return typeof n=="symbol"?n:n+""}function xe(e,n){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Q(e){return e&&e.map((n,t)=>s.createElement(n.tag,M({key:t},n.attr),Q(n.child)))}function V(e){return n=>s.createElement(he,P({attr:M({},e.attr)},n),Q(e.child))}function he(e){var n=t=>{var{attr:r,size:l,title:b}=e,p=ge(e,ue),g=l||t.size||"1em",i;return t.className&&(i=t.className),e.className&&(i=(i?i+" ":"")+e.className),s.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,p,{className:i,style:M(M({color:e.color||t.color},t.style),e.style),height:g,width:g,xmlns:"http://www.w3.org/2000/svg"}),b&&s.createElement("title",null,b),e.children)};return Y!==void 0?s.createElement(Y.Consumer,null,t=>n(t)):n(X)}function ye(e){return V({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}const me=({items:e,allowMultipleOpen:n=!1,className:t="",tileClasses:r="",open:l,onChange:b,renderTitle:p,renderContent:g})=>{const[i,f]=s.useState(new Set),a=s.useMemo(()=>l?new Set(l):i,[l,i]),c=s.useCallback(d=>{const u=new Set(a);u.has(d)?u.delete(d):(n||u.clear(),u.add(d)),l&&b?b(Array.from(u)):f(u)},[a,l,b,n]);return o.jsx("div",{className:"accordion",role:"region","aria-multiselectable":n,children:e.map(d=>{const u=a.has(d.id),h=`accordion-heading-${d.id}`,y=`accordion-panel-${d.id}`;return o.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,children:[o.jsxs("button",{id:h,type:"button","aria-expanded":u,"aria-controls":y,onClick:()=>c(d.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 ${r}`,children:[p?p(d,u):d.title,o.jsx(ye,{})]}),o.jsx("div",{id:y,role:"region","aria-labelledby":h,hidden:!u,className:"p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",children:g?g(d,u):d.content})]},d.id)})})},R=s.createContext(null),z=()=>s.useContext(R),ee=s.createContext(null),A=()=>s.useContext(ee);function we({id:e,title:n,children:t,standalone:r=!1,showFloatingClose:l=!1,containerClasses:b="",onClose:p,disableEscapeClose:g=!1}){const i=A(),f=z(),a=!r&&!!i&&!!f,[c,d]=s.useState(!1),u=a?i.isOpen(e):c,h=a?i.getModalData(e):null,y=s.useCallback(()=>{a?f.closeModal(e):d(!1),p==null||p()},[a,f,e,p]);return s.useEffect(()=>{const m=v=>{v.key==="Escape"&&!g&&y()};return u?(document.body.style.overflow="hidden",window.addEventListener("keydown",m)):document.body.style.overflow="",()=>{document.body.style.overflow="",window.removeEventListener("keydown",m)}},[u,g,y]),u?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",children:o.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${b}`,children:[o.jsxs("div",{className:"flex justify-between items-center relative",children:[n&&o.jsx("h2",{className:"text-lg font-semibold",children:n}),l&&o.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-900 absolute top-2 right-3 hover:bg-gray-50 rounded-full","aria-label":"Close modal",children:"✕"})]}),o.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof t=="function"?t({modalData:h}):t})]})}):null}function ve({children:e}){const[n,t]=s.useState({}),[r,l]=s.useState({}),b=s.useCallback((c,d)=>{t(u=>({...u,[c]:!0})),d&&l(u=>({...u,[c]:d}))},[]),p=s.useCallback(c=>{t(d=>({...d,[c]:!1})),l(d=>{const u={...d};return delete u[c],u})},[]),g=s.useCallback(c=>!!n[c],[n]),i=s.useCallback(c=>r[c],[r]),f=s.useMemo(()=>({openModal:b,closeModal:p}),[b,p]),a=s.useMemo(()=>({isOpen:g,getModalData:i}),[g,i]);return o.jsx(R.Provider,{value:f,children:o.jsx(ee.Provider,{value:a,children:e})})}function Ce(e){const{openModal:n,closeModal:t}=z(),{isOpen:r,getModalData:l}=A();return{open:b=>n(e,b),close:()=>t(e),isOpen:r(e),data:l(e)}}let D=null,_={};function Se(e){D=e}function Ne(e){_={..._,...e}}function ke(){return _}function Le(e,n,t=3e3,r){D?D(e,n,t,r):console.warn("Toast system is not mounted")}function Oe(e){return V({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const $e=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)}),Ee=()=>{const[e,n]=s.useState([]);s.useEffect(()=>{Se((r,l,b,p)=>{const g=$e();n(i=>[...i,{id:g,type:r,message:l,config:p}]),setTimeout(()=>{n(i=>i.filter(f=>f.id!==g))},b)})},[]);const t=ke();return o.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:e.map(r=>{var i,f,a,c,d,u,h,y,m,v,L,O,$;const l=((i=r.config)==null?void 0:i.icon)||((f=t.icons)==null?void 0:f[r.type])||je(r.type),b=((a=r.config)==null?void 0:a.bgColor)||((d=(c=t.colors)==null?void 0:c[r.type])==null?void 0:d.bg)||"bg-white dark:bg-gray-800",p=((u=r.config)==null?void 0:u.textColor)||((y=(h=t.colors)==null?void 0:h[r.type])==null?void 0:y.text)||"text-gray-700 dark:text-gray-300",g=((m=r.config)==null?void 0:m.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return o.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${b} ${p}`,children:[o.jsx("div",{className:g,children:l}),o.jsxs("div",{className:"flex-1 me-3",children:[((v=r.config)==null?void 0:v.title)&&o.jsx("div",{className:"font-semibold text-black",children:r.config.title}),((L=r.config)==null?void 0:L.description)&&o.jsx("div",{className:"text-sm text-gray-500",children:r.config.description}),!((O=r.config)!=null&&O.title)&&!(($=r.config)!=null&&$.description)&&o.jsx("div",{className:"text-sm",children:r.message})]}),o.jsx("button",{onClick:()=>n(E=>E.filter(k=>k.id!==r.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:o.jsx(Oe,{size:18})})]},r.id)})})};function je(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}x.Accordion=me,x.Badge=de,x.Button=oe,x.Dropdown=se,x.Input=K,x.Modal=we,x.ModalProvider=ve,x.Select=q,x.Toast=Ee,x.Tooltip=ae,x.setToastDefaults=Ne,x.showToast=Le,x.useModalActions=z,x.useModalInstance=Ce,x.useModalState=A,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
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",