tailwind-ux-kit 1.0.28 → 1.0.29

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,6 +9,7 @@ interface AccordionProps<T extends AccordionItemBase> {
9
9
  items: T[];
10
10
  allowMultipleOpen?: boolean;
11
11
  className?: string;
12
+ tileClasses?: string;
12
13
  open?: (string | number)[];
13
14
  onChange?: (openItems: (string | number)[]) => void;
14
15
  /**
@@ -20,5 +21,5 @@ interface AccordionProps<T extends AccordionItemBase> {
20
21
  */
21
22
  renderContent?: (item: T, isOpen: boolean) => React.ReactNode;
22
23
  }
23
- declare const Accordion: <T extends AccordionItemBase>({ items, allowMultipleOpen, className, open: controlledOpen, onChange, renderTitle, renderContent, }: AccordionProps<T>) => import("react/jsx-runtime").JSX.Element;
24
+ declare const Accordion: <T extends AccordionItemBase>({ items, allowMultipleOpen, className, tileClasses, open: controlledOpen, onChange, renderTitle, renderContent, }: AccordionProps<T>) => import("react/jsx-runtime").JSX.Element;
24
25
  export default Accordion;
@@ -1,27 +1,27 @@
1
1
  "use client";
2
- import { jsxs as x, jsx as u } from "react/jsx-runtime";
2
+ import { jsxs as x, jsx as g } from "react/jsx-runtime";
3
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";
4
4
  const le = J((e, n) => {
5
5
  const {
6
6
  label: t,
7
7
  id: r,
8
- inputSize: s = "md",
9
- shape: p = "rounded",
10
- validate: g,
11
- onValidatedChange: l,
12
- className: i = "",
13
- icon: a,
14
- iconPosition: c = "left",
15
- floatingLabelStyle: o,
16
- onChange: d,
17
- isValid: f,
8
+ inputSize: o = "md",
9
+ shape: f = "rounded",
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,
18
18
  isInvalid: b,
19
19
  feedback: m,
20
20
  feedbackType: C = "invalid",
21
21
  ...k
22
22
  } = e, [$, E] = v("default"), P = (h) => {
23
- const w = h.target.value, S = (g == null ? void 0 : g(w)) ?? "default";
24
- E(S), l == null || l(h, S), d == null || d(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);
25
25
  }, j = {
26
26
  xs: "text-xs px-2 py-1",
27
27
  sm: "text-sm px-3 py-1.5",
@@ -54,25 +54,25 @@ const le = J((e, n) => {
54
54
  default:
55
55
  return "border-gray-300 focus:ring-blue-500";
56
56
  }
57
- }, Z = j[s] || j.md, G = L[p] || L.flat, H = F($, f, b), W = c === "start" || c === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", U = a && (c === "start" || c === "left") ? "ps-10" : a ? "pe-10" : "", I = r ?? `input-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, y = !!o;
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
58
  return /* @__PURE__ */ x("div", { className: `w-full relative ${y ? "z-0" : ""}`, children: [
59
- !y && t && /* @__PURE__ */ u(
59
+ !y && t && /* @__PURE__ */ g(
60
60
  "label",
61
61
  {
62
62
  htmlFor: I,
63
- className: `block mb-1 font-light text-sm ${f ? "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 ${u ? "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
67
  /* @__PURE__ */ x("div", { className: "relative w-full", children: [
68
- a && /* @__PURE__ */ u(
68
+ d && /* @__PURE__ */ g(
69
69
  "div",
70
70
  {
71
71
  className: `absolute inset-y-0 flex items-center ${W}`,
72
- children: /* @__PURE__ */ u("span", { className: "text-gray-500", children: a })
72
+ children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: d })
73
73
  }
74
74
  ),
75
- /* @__PURE__ */ u(
75
+ /* @__PURE__ */ g(
76
76
  "input",
77
77
  {
78
78
  ...k,
@@ -82,20 +82,20 @@ const le = J((e, n) => {
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 && o && A[o]}
86
- ${U} ${G} ${H} ${i}`
85
+ ${y && c && A[c]}
86
+ ${U} ${G} ${H} ${l}`
87
87
  }
88
88
  ),
89
- y && t && o && /* @__PURE__ */ u(
89
+ y && t && c && /* @__PURE__ */ g(
90
90
  "label",
91
91
  {
92
92
  htmlFor: I,
93
- className: `ms-1 ${B[o]} ${i}`,
93
+ className: `ms-1 ${B[c]} ${l}`,
94
94
  children: t
95
95
  }
96
96
  )
97
97
  ] }),
98
- m && /* @__PURE__ */ u(
98
+ m && /* @__PURE__ */ g(
99
99
  "p",
100
100
  {
101
101
  className: `mt-1 text-xs ${C === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
@@ -109,24 +109,24 @@ const ie = J((e, n) => {
109
109
  const {
110
110
  label: t,
111
111
  id: r,
112
- inputSize: s = "md",
113
- shape: p = "rounded",
114
- validate: g,
115
- onValidatedChange: l,
116
- className: i = "",
117
- icon: a,
118
- iconPosition: c = "left",
119
- floatingLabelStyle: o,
120
- onChange: d,
121
- isValid: f,
112
+ inputSize: o = "md",
113
+ shape: f = "rounded",
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,
122
122
  isInvalid: b,
123
123
  feedback: m,
124
124
  feedbackType: C = "invalid",
125
125
  children: k,
126
126
  ...$
127
127
  } = e, [E, P] = v("default"), j = (w) => {
128
- const S = w.target.value, M = (g == null ? void 0 : g(S)) ?? "default";
129
- P(M), l == null || l(w, M), d == null || d(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);
130
130
  }, L = {
131
131
  xs: "text-xs px-2 py-1",
132
132
  sm: "text-sm px-3 py-1.5",
@@ -159,25 +159,25 @@ const ie = J((e, n) => {
159
159
  default:
160
160
  return "border-gray-300 focus:ring-blue-500";
161
161
  }
162
- }, G = L[s] || L.md, H = A[p] || A.flat, W = Z(E, f, b), U = c === "start" || c === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", I = a && (c === "start" || c === "left") ? "ps-10" : a ? "pe-10" : "", y = r ?? `select-${(t == null ? void 0 : t.toLowerCase().replace(/\s+/g, "-")) || Math.random().toString(36).slice(2)}`, h = !!o;
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
163
  return /* @__PURE__ */ x("div", { className: `w-full relative ${h ? "z-0" : ""}`, children: [
164
- !h && t && /* @__PURE__ */ u(
164
+ !h && t && /* @__PURE__ */ g(
165
165
  "label",
166
166
  {
167
167
  htmlFor: y,
168
- className: `block mb-1 font-light text-sm ${f ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
168
+ className: `block mb-1 font-light text-sm ${u ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
169
169
  children: t
170
170
  }
171
171
  ),
172
172
  /* @__PURE__ */ x("div", { className: "relative w-full", children: [
173
- a && /* @__PURE__ */ u(
173
+ d && /* @__PURE__ */ g(
174
174
  "div",
175
175
  {
176
176
  className: `absolute inset-y-0 flex items-center ${U}`,
177
- children: /* @__PURE__ */ u("span", { className: "text-gray-500", children: a })
177
+ children: /* @__PURE__ */ g("span", { className: "text-gray-500", children: d })
178
178
  }
179
179
  ),
180
- /* @__PURE__ */ u(
180
+ /* @__PURE__ */ g(
181
181
  "select",
182
182
  {
183
183
  ...$,
@@ -186,21 +186,21 @@ const ie = J((e, 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 && o && B[o]}
190
- ${I} ${H} ${W} ${i}`,
189
+ ${h && c && B[c]}
190
+ ${I} ${H} ${W} ${l}`,
191
191
  children: k
192
192
  }
193
193
  ),
194
- h && t && o && /* @__PURE__ */ u(
194
+ h && t && c && /* @__PURE__ */ g(
195
195
  "label",
196
196
  {
197
197
  htmlFor: y,
198
- className: `ms-1 ${F[o]} ${i}`,
198
+ className: `ms-1 ${F[c]} ${l}`,
199
199
  children: t
200
200
  }
201
201
  )
202
202
  ] }),
203
- m && /* @__PURE__ */ u(
203
+ m && /* @__PURE__ */ g(
204
204
  "p",
205
205
  {
206
206
  className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
@@ -244,23 +244,23 @@ const ce = {
244
244
  variant: n = "primary",
245
245
  size: t = "md",
246
246
  type: r = "button",
247
- shape: s = "rounded",
248
- className: p = "",
249
- isLoading: g = !1,
250
- disabled: l = !1,
251
- ...i
247
+ shape: o = "rounded",
248
+ className: f = "",
249
+ isLoading: p = !1,
250
+ disabled: i = !1,
251
+ ...l
252
252
  }) => {
253
- const a = l || g, c = [
253
+ const d = i || p, s = [
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[s],
258
- s === "flat" ? "shadow-none" : "shadow-sm",
259
- a ? "opacity-50 cursor-not-allowed pointer-events-none" : "",
260
- p
257
+ ue[o],
258
+ o === "flat" ? "shadow-none" : "shadow-sm",
259
+ d ? "opacity-50 cursor-not-allowed pointer-events-none" : "",
260
+ f
261
261
  ].filter(Boolean).join(" ");
262
- return /* @__PURE__ */ x("button", { type: r, className: c, disabled: a, ...i, children: [
263
- g && /* @__PURE__ */ x(
262
+ return /* @__PURE__ */ x("button", { type: r, className: s, disabled: d, ...l, children: [
263
+ p && /* @__PURE__ */ x(
264
264
  "svg",
265
265
  {
266
266
  "aria-hidden": "true",
@@ -270,14 +270,14 @@ const ce = {
270
270
  fill: "none",
271
271
  xmlns: "http://www.w3.org/2000/svg",
272
272
  children: [
273
- /* @__PURE__ */ u(
273
+ /* @__PURE__ */ g(
274
274
  "path",
275
275
  {
276
276
  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",
277
277
  fill: "currentColor"
278
278
  }
279
279
  ),
280
- /* @__PURE__ */ u(
280
+ /* @__PURE__ */ g(
281
281
  "path",
282
282
  {
283
283
  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",
@@ -294,7 +294,7 @@ const ce = {
294
294
  children: n,
295
295
  position: t = "right"
296
296
  }) => {
297
- const [r, s] = v(!1), [p, g] = v(!1), l = T(null), i = T(null), a = _(() => {
297
+ const [r, o] = v(!1), [f, p] = v(!1), i = T(null), l = T(null), d = _(() => {
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]), c = N((f) => {
308
- const b = f.target;
309
- l.current && !l.current.contains(b) && i.current && !i.current.contains(b) && s(!1);
310
- }, []), o = N(() => {
311
- if (!i.current || !l.current) return;
312
- const f = i.current.getBoundingClientRect(), b = l.current.getBoundingClientRect(), m = window.innerHeight - f.bottom, C = f.top;
313
- g(
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;
313
+ p(
314
314
  m < b.height && C > b.height
315
315
  );
316
316
  }, []);
317
317
  z(() => {
318
318
  if (r)
319
- return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
320
- window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
319
+ return c(), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), () => {
320
+ window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0);
321
321
  };
322
- }, [r, o]), z(() => (document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c)), [c]);
323
- const d = N(() => s((f) => !f), []);
322
+ }, [r, c]), z(() => (document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s)), [s]);
323
+ const a = N(() => o((u) => !u), []);
324
324
  return /* @__PURE__ */ x("div", { className: "relative flex items-center", children: [
325
- /* @__PURE__ */ u("button", { ref: i, onClick: d, children: e }),
326
- r && /* @__PURE__ */ u(
325
+ /* @__PURE__ */ g("button", { ref: l, onClick: a, children: e }),
326
+ r && /* @__PURE__ */ g(
327
327
  "div",
328
328
  {
329
- ref: l,
329
+ ref: i,
330
330
  className: `absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
331
- ${p ? "bottom-full mb-2" : "top-full mt-2"}
332
- ${a}`,
331
+ ${f ? "bottom-full mb-2" : "top-full mt-2"}
332
+ ${d}`,
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: s = "",
343
- tooltipStyle: p = {}
342
+ tooltipClass: o = "",
343
+ tooltipStyle: f = {}
344
344
  }) => {
345
- const g = T(null), l = T(null);
345
+ const p = T(null), i = T(null);
346
346
  z(() => {
347
- const a = g.current, c = l.current;
348
- if (!a || !c) return;
349
- const o = () => {
350
- c.style.opacity = "1", c.style.visibility = "visible";
351
- }, d = () => {
352
- c.style.opacity = "0", c.style.visibility = "hidden";
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";
353
353
  };
354
- return a.addEventListener("mouseenter", o), a.addEventListener("mouseleave", d), () => {
355
- a.removeEventListener("mouseenter", o), a.removeEventListener("mouseleave", d);
354
+ return d.addEventListener("mouseenter", c), d.addEventListener("mouseleave", a), () => {
355
+ d.removeEventListener("mouseenter", c), d.removeEventListener("mouseleave", a);
356
356
  };
357
357
  }, []);
358
- const i = (a) => {
359
- const c = {
358
+ const l = (d) => {
359
+ const s = {
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 (a) {
376
+ switch (d) {
377
377
  case "top":
378
378
  return {
379
- ...c,
379
+ ...s,
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
- ...c,
387
+ ...s,
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
- ...c,
395
+ ...s,
396
396
  right: "100%",
397
397
  top: "50%",
398
398
  transform: "translateY(-50%)",
@@ -400,27 +400,27 @@ const ce = {
400
400
  };
401
401
  case "right":
402
402
  return {
403
- ...c,
403
+ ...s,
404
404
  left: "100%",
405
405
  top: "50%",
406
406
  transform: "translateY(-50%)",
407
407
  marginLeft: "8px"
408
408
  };
409
409
  default:
410
- return c;
410
+ return s;
411
411
  }
412
412
  };
413
- return /* @__PURE__ */ x("div", { ref: g, className: `relative inline-block ${r}`, children: [
413
+ return /* @__PURE__ */ x("div", { ref: p, className: `relative inline-block ${r}`, children: [
414
414
  e,
415
- /* @__PURE__ */ u(
415
+ /* @__PURE__ */ g(
416
416
  "div",
417
417
  {
418
- ref: l,
418
+ ref: i,
419
419
  role: "tooltip",
420
- className: s,
420
+ className: o,
421
421
  style: {
422
- ...i(t),
423
- ...p
422
+ ...l(t),
423
+ ...f
424
424
  },
425
425
  children: n
426
426
  }
@@ -460,21 +460,21 @@ const ce = {
460
460
  variant: n = "primary",
461
461
  size: t = "sm",
462
462
  shape: r = "rounded",
463
- icon: s,
464
- dismissible: p,
465
- onDismiss: g,
466
- className: l = "",
467
- ...i
463
+ icon: o,
464
+ dismissible: f,
465
+ onDismiss: p,
466
+ className: i = "",
467
+ ...l
468
468
  }) => {
469
- const a = !e && !!s, c = `inline-flex items-center font-medium ${ge[n] || ""} ${pe[t] || ""} ${fe[r] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + l;
470
- return /* @__PURE__ */ x("span", { className: c.trim(), ...i, children: [
471
- s && /* @__PURE__ */ u("span", { className: e ? "mr-1" : "", children: s }),
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 }),
472
472
  e,
473
- p && /* @__PURE__ */ u(
473
+ f && /* @__PURE__ */ g(
474
474
  "button",
475
475
  {
476
476
  type: "button",
477
- onClick: g,
477
+ onClick: p,
478
478
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
479
479
  children: "×"
480
480
  }
@@ -490,11 +490,11 @@ var ee = {
490
490
  }, K = 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, s;
493
+ var t = me(e, n), r, o;
494
494
  if (Object.getOwnPropertySymbols) {
495
- var p = Object.getOwnPropertySymbols(e);
496
- for (s = 0; s < p.length; s++)
497
- r = p[s], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
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]);
498
498
  }
499
499
  return t;
500
500
  }
@@ -522,8 +522,8 @@ 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(s) {
526
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
525
+ n && (r = r.filter(function(o) {
526
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
527
527
  })), t.push.apply(t, r);
528
528
  }
529
529
  return t;
@@ -570,22 +570,22 @@ function ve(e) {
570
570
  var n = (t) => {
571
571
  var {
572
572
  attr: r,
573
- size: s,
574
- title: p
575
- } = e, g = xe(e, be), l = s || t.size || "1em", i;
576
- return t.className && (i = t.className), e.className && (i = (i ? i + " " : "") + e.className), /* @__PURE__ */ O.createElement("svg", D({
573
+ size: o,
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({
577
577
  stroke: "currentColor",
578
578
  fill: "currentColor",
579
579
  strokeWidth: "0"
580
- }, t.attr, r, g, {
581
- className: i,
580
+ }, t.attr, r, p, {
581
+ className: l,
582
582
  style: R(R({
583
583
  color: e.color || t.color
584
584
  }, t.style), e.style),
585
- height: l,
586
- width: l,
585
+ height: i,
586
+ width: i,
587
587
  xmlns: "http://www.w3.org/2000/svg"
588
- }), p && /* @__PURE__ */ O.createElement("title", null, p), e.children);
588
+ }), f && /* @__PURE__ */ O.createElement("title", null, f), e.children);
589
589
  };
590
590
  return K !== void 0 ? /* @__PURE__ */ O.createElement(K.Consumer, null, (t) => n(t)) : n(ee);
591
591
  }
@@ -596,59 +596,61 @@ const Ae = ({
596
596
  items: e,
597
597
  allowMultipleOpen: n = !1,
598
598
  className: t = "",
599
- open: r,
600
- onChange: s,
599
+ tileClasses: r = "",
600
+ open: o,
601
+ onChange: f,
601
602
  renderTitle: p,
602
- renderContent: g
603
+ renderContent: i
603
604
  }) => {
604
- const [l, i] = v(/* @__PURE__ */ new Set()), a = _(() => r ? new Set(r) : l, [r, l]), c = N(
605
- (o) => {
606
- const d = new Set(a);
607
- d.has(o) ? d.delete(o) : (n || d.clear(), d.add(o)), r && s ? s(Array.from(d)) : i(d);
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);
608
609
  },
609
- [a, r, s, n]
610
+ [s, o, f, n]
610
611
  );
611
- return /* @__PURE__ */ u(
612
+ return /* @__PURE__ */ g(
612
613
  "div",
613
614
  {
614
615
  className: "accordion",
615
616
  role: "region",
616
617
  "aria-multiselectable": n,
617
- children: e.map((o) => {
618
- const d = a.has(o.id), f = `accordion-heading-${o.id}`, b = `accordion-panel-${o.id}`;
618
+ children: e.map((a) => {
619
+ const u = s.has(a.id), b = `accordion-heading-${a.id}`, m = `accordion-panel-${a.id}`;
619
620
  return /* @__PURE__ */ x(
620
621
  "div",
621
622
  {
622
623
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,
623
624
  children: [
624
- /* @__PURE__ */ u("h3", { id: f, children: /* @__PURE__ */ x(
625
+ /* @__PURE__ */ x(
625
626
  "button",
626
627
  {
628
+ id: b,
627
629
  type: "button",
628
- "aria-expanded": d,
629
- "aria-controls": b,
630
- onClick: () => c(o.id),
631
- className: "flex justify-between items-center w-full p-2 font-medium text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3",
630
+ "aria-expanded": u,
631
+ "aria-controls": m,
632
+ onClick: () => c(a.id),
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}`,
632
634
  children: [
633
- p ? p(o, d) : o.title,
634
- /* @__PURE__ */ u(Ce, {})
635
+ p ? p(a, u) : a.title,
636
+ /* @__PURE__ */ g(Ce, {})
635
637
  ]
636
638
  }
637
- ) }),
638
- /* @__PURE__ */ u(
639
+ ),
640
+ /* @__PURE__ */ g(
639
641
  "div",
640
642
  {
641
- id: b,
643
+ id: m,
642
644
  role: "region",
643
- "aria-labelledby": f,
644
- hidden: !d,
645
+ "aria-labelledby": b,
646
+ hidden: !u,
645
647
  className: "p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",
646
- children: g ? g(o, d) : o.content
648
+ children: i ? i(a, u) : a.content
647
649
  }
648
650
  )
649
651
  ]
650
652
  },
651
- o.id
653
+ a.id
652
654
  );
653
655
  })
654
656
  }
@@ -659,23 +661,23 @@ function Me({
659
661
  title: n,
660
662
  children: t,
661
663
  standalone: r = !1,
662
- showFloatingClose: s = !1,
663
- containerClasses: p = "",
664
- onClose: g
664
+ showFloatingClose: o = !1,
665
+ containerClasses: f = "",
666
+ onClose: p
665
667
  }) {
666
- const l = ae(), i = oe(), a = !r && !!l && !!i, [c, o] = v(!1), d = a ? l.isOpen(e) : c, f = a ? l.getModalData(e) : null, b = () => {
667
- a ? i.closeModal(e) : o(!1), g == null || g();
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();
668
670
  };
669
- return z(() => (d ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
671
+ return z(() => (a ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
670
672
  document.body.style.overflow = "";
671
- }), [d]), d ? /* @__PURE__ */ u("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]", children: /* @__PURE__ */ x(
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(
672
674
  "div",
673
675
  {
674
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${p}`,
676
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${f}`,
675
677
  children: [
676
678
  /* @__PURE__ */ x("div", { className: "flex justify-between items-center relative", children: [
677
- n && /* @__PURE__ */ u("h2", { className: "text-lg font-semibold", children: n }),
678
- s && /* @__PURE__ */ u(
679
+ n && /* @__PURE__ */ g("h2", { className: "text-lg font-semibold", children: n }),
680
+ o && /* @__PURE__ */ g(
679
681
  "button",
680
682
  {
681
683
  onClick: b,
@@ -685,7 +687,7 @@ function Me({
685
687
  }
686
688
  )
687
689
  ] }),
688
- /* @__PURE__ */ u("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: f }) : t })
690
+ /* @__PURE__ */ g("div", { className: "mt-3 text-sm text-gray-700", children: typeof t == "function" ? t({ modalData: u }) : t })
689
691
  ]
690
692
  }
691
693
  ) }) : null;
@@ -693,32 +695,32 @@ function Me({
693
695
  function Te({
694
696
  children: e
695
697
  }) {
696
- const [n, t] = v({}), [r, s] = v({}), p = N((o, d) => {
697
- t((f) => ({ ...f, [o]: !0 })), d && s((f) => ({ ...f, [o]: d }));
698
- }, []), g = N((o) => {
699
- t((d) => ({ ...d, [o]: !1 })), s((d) => {
700
- const f = { ...d };
701
- return delete f[o], f;
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;
702
704
  });
703
- }, []), l = N((o) => !!n[o], [n]), i = N(
704
- (o) => r[o],
705
+ }, []), i = N((c) => !!n[c], [n]), l = N(
706
+ (c) => r[c],
705
707
  [r]
706
- ), a = _(
707
- () => ({ openModal: p, closeModal: g }),
708
- [p, g]
709
- ), c = _(
710
- () => ({ isOpen: l, getModalData: i }),
711
- [l, i]
708
+ ), d = _(
709
+ () => ({ openModal: f, closeModal: p }),
710
+ [f, p]
711
+ ), s = _(
712
+ () => ({ isOpen: i, getModalData: l }),
713
+ [i, l]
712
714
  );
713
- return /* @__PURE__ */ u(ne.Provider, { value: a, children: /* @__PURE__ */ u(se.Provider, { value: c, children: e }) });
715
+ return /* @__PURE__ */ g(ne.Provider, { value: d, children: /* @__PURE__ */ g(se.Provider, { value: s, children: e }) });
714
716
  }
715
717
  function _e(e) {
716
- const { openModal: n, closeModal: t } = oe(), { isOpen: r, getModalData: s } = ae();
718
+ const { openModal: n, closeModal: t } = oe(), { isOpen: r, getModalData: o } = ae();
717
719
  return {
718
- open: (p) => n(e, p),
720
+ open: (f) => n(e, f),
719
721
  close: () => t(e),
720
722
  isOpen: r(e),
721
- data: s(e)
723
+ data: o(e)
722
724
  };
723
725
  }
724
726
  let X = null, Y = {};
@@ -743,35 +745,35 @@ const Le = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
743
745
  }), Be = () => {
744
746
  const [e, n] = v([]);
745
747
  z(() => {
746
- Se((r, s, p, g) => {
747
- const l = Le();
748
- n((i) => [...i, { id: l, type: r, message: s, config: g }]), setTimeout(() => {
749
- n((i) => i.filter((a) => a.id !== l));
750
- }, p);
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));
752
+ }, f);
751
753
  });
752
754
  }, []);
753
755
  const t = Ne();
754
- return /* @__PURE__ */ u("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((r) => {
755
- var i, a, c, o, d, f, b, m, C, k, $, E, P;
756
- const s = ((i = r.config) == null ? void 0 : i.icon) || ((a = t.icons) == null ? void 0 : a[r.type]) || Oe(r.type), p = ((c = r.config) == null ? void 0 : c.bgColor) || ((d = (o = t.colors) == null ? void 0 : o[r.type]) == null ? void 0 : d.bg) || "bg-white dark:bg-gray-800", g = ((f = r.config) == null ? void 0 : f.textColor) || ((m = (b = t.colors) == null ? void 0 : b[r.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", l = ((C = r.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
756
+ 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";
757
759
  return /* @__PURE__ */ x(
758
760
  "div",
759
761
  {
760
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${p} ${g}`,
762
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${f} ${p}`,
761
763
  children: [
762
- /* @__PURE__ */ u("div", { className: l, children: s }),
764
+ /* @__PURE__ */ g("div", { className: i, children: o }),
763
765
  /* @__PURE__ */ x("div", { className: "flex-1 me-3", children: [
764
- ((k = r.config) == null ? void 0 : k.title) && /* @__PURE__ */ u("div", { className: "font-semibold text-black", children: r.config.title }),
765
- (($ = r.config) == null ? void 0 : $.description) && /* @__PURE__ */ u("div", { className: "text-sm text-gray-500", children: r.config.description }),
766
- !((E = r.config) != null && E.title) && !((P = r.config) != null && P.description) && /* @__PURE__ */ u("div", { className: "text-sm", children: r.message })
766
+ ((k = r.config) == null ? void 0 : k.title) && /* @__PURE__ */ g("div", { className: "font-semibold text-black", children: r.config.title }),
767
+ (($ = r.config) == null ? void 0 : $.description) && /* @__PURE__ */ g("div", { className: "text-sm text-gray-500", children: r.config.description }),
768
+ !((E = r.config) != null && E.title) && !((P = r.config) != null && P.description) && /* @__PURE__ */ g("div", { className: "text-sm", children: r.message })
767
769
  ] }),
768
- /* @__PURE__ */ u(
770
+ /* @__PURE__ */ g(
769
771
  "button",
770
772
  {
771
773
  onClick: () => n((j) => j.filter((L) => L.id !== r.id)),
772
774
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
773
775
  "aria-label": "Close",
774
- children: /* @__PURE__ */ u(ke, { size: 18 })
776
+ children: /* @__PURE__ */ g(ke, { size: 18 })
775
777
  }
776
778
  )
777
779
  ]
@@ -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,a){"use strict";"use client";const q=a.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:p="rounded",validate:f,onValidatedChange:c,className:d="",icon:i,iconPosition:u="left",floatingLabelStyle:s,onChange:g,isValid:b,isInvalid:h,feedback:y,feedbackType:C="invalid",...N}=e,[O,L]=a.useState("default"),$=m=>{const v=m.target.value,S=(f==null?void 0:f(v))??"default";L(S),c==null||c(m,S),g==null||g(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-md",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[l]||E.md,G=k[p]||k.flat,H=F(O,b,h),U=u==="start"||u==="left"?"left-0 ps-3.5":"right-0 pe-3.5",W=i&&(u==="start"||u==="left")?"ps-10":i?"pe-10":"",j=r??`input-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,w=!!s;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 ${b?"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:[i&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${U}`,children:o.jsx("span",{className:"text-gray-500",children:i})}),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 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-md",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
2
2
  ${Z}
3
- ${w&&s&&I[s]}
4
- ${W} ${G} ${H} ${d}`}),w&&t&&s&&o.jsx("label",{htmlFor:j,className:`ms-1 ${B[s]} ${d}`,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=a.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:p="rounded",validate:f,onValidatedChange:c,className:d="",icon:i,iconPosition:u="left",floatingLabelStyle:s,onChange:g,isValid:b,isInvalid:h,feedback:y,feedbackType:C="invalid",children:N,...O}=e,[L,$]=a.useState("default"),E=v=>{const S=v.target.value,T=(f==null?void 0:f(S))??"default";$(T),c==null||c(v,T),g==null||g(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-md",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[l]||k.md,H=I[p]||I.flat,U=Z(L,b,h),W=u==="start"||u==="left"?"left-0 ps-3.5":"right-0 pe-3.5",j=i&&(u==="start"||u==="left")?"ps-10":i?"pe-10":"",w=r??`select-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,m=!!s;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 ${b?"text-green-700":h?"text-red-700":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[i&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${W}`,children:o.jsx("span",{className:"text-gray-500",children:i})}),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
+ ${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-md",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
5
5
  ${G}
6
- ${m&&s&&B[s]}
7
- ${j} ${H} ${U} ${d}`,children:N}),m&&t&&s&&o.jsx("label",{htmlFor:w,className:`ms-1 ${F[s]} ${d}`,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-md",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:p="",isLoading:f=!1,disabled:c=!1,...d})=>{const i=c||f,u=["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",i?"opacity-50 cursor-not-allowed pointer-events-none":"",p].filter(Boolean).join(" ");return o.jsxs("button",{type:r,className:u,disabled:i,...d,children:[f&&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]=a.useState(!1),[p,f]=a.useState(!1),c=a.useRef(null),d=a.useRef(null),i=a.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]),u=a.useCallback(b=>{const h=b.target;c.current&&!c.current.contains(h)&&d.current&&!d.current.contains(h)&&l(!1)},[]),s=a.useCallback(()=>{if(!d.current||!c.current)return;const b=d.current.getBoundingClientRect(),h=c.current.getBoundingClientRect(),y=window.innerHeight-b.bottom,C=b.top;f(y<h.height&&C>h.height)},[]);a.useEffect(()=>{if(r)return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}},[r,s]),a.useEffect(()=>(document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)),[u]);const g=a.useCallback(()=>l(b=>!b),[]);return o.jsxs("div",{className:"relative flex items-center",children:[o.jsx("button",{ref:d,onClick:g,children:e}),r&&o.jsx("div",{ref:c,className:`absolute z-10 bg-white rounded-sm shadow-md overflow-hidden
8
- ${p?"bottom-full mb-2":"top-full mt-2"}
9
- ${i}`,children:n})]})},ae=({children:e,content:n,position:t="top",className:r="",tooltipClass:l="",tooltipStyle:p={}})=>{const f=a.useRef(null),c=a.useRef(null);a.useEffect(()=>{const i=f.current,u=c.current;if(!i||!u)return;const s=()=>{u.style.opacity="1",u.style.visibility="visible"},g=()=>{u.style.opacity="0",u.style.visibility="hidden"};return i.addEventListener("mouseenter",s),i.addEventListener("mouseleave",g),()=>{i.removeEventListener("mouseenter",s),i.removeEventListener("mouseleave",g)}},[]);const d=i=>{const u={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{...u,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...u,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...u,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...u,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return u}};return o.jsxs("div",{ref:f,className:`relative inline-block ${r}`,children:[e,o.jsx("div",{ref:c,role:"tooltip",className:l,style:{...d(t),...p},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:p,onDismiss:f,className:c="",...d})=>{const i=!e&&!!l,u=`inline-flex items-center font-medium ${le[n]||""} ${ie[t]||""} ${ce[r]||""} ${i?"justify-center p-2 w-8 h-8":""} `+c;return o.jsxs("span",{className:u.trim(),...d,children:[l&&o.jsx("span",{className:e?"mr-1":"",children:l}),e,p&&o.jsx("button",{type:"button",onClick:f,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=a.createContext&&a.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 p=Object.getOwnPropertySymbols(e);for(l=0;l<p.length;l++)r=p[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)=>a.createElement(n.tag,M({key:t},n.attr),Q(n.child)))}function V(e){return n=>a.createElement(he,P({attr:M({},e.attr)},n),Q(e.child))}function he(e){var n=t=>{var{attr:r,size:l,title:p}=e,f=ge(e,ue),c=l||t.size||"1em",d;return t.className&&(d=t.className),e.className&&(d=(d?d+" ":"")+e.className),a.createElement("svg",P({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,f,{className:d,style:M(M({color:e.color||t.color},t.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),p&&a.createElement("title",null,p),e.children)};return Y!==void 0?a.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="",open:r,onChange:l,renderTitle:p,renderContent:f})=>{const[c,d]=a.useState(new Set),i=a.useMemo(()=>r?new Set(r):c,[r,c]),u=a.useCallback(s=>{const g=new Set(i);g.has(s)?g.delete(s):(n||g.clear(),g.add(s)),r&&l?l(Array.from(g)):d(g)},[i,r,l,n]);return o.jsx("div",{className:"accordion",role:"region","aria-multiselectable":n,children:e.map(s=>{const g=i.has(s.id),b=`accordion-heading-${s.id}`,h=`accordion-panel-${s.id}`;return o.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,children:[o.jsx("h3",{id:b,children:o.jsxs("button",{type:"button","aria-expanded":g,"aria-controls":h,onClick:()=>u(s.id),className:"flex justify-between items-center w-full p-2 font-medium text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3",children:[p?p(s,g):s.title,o.jsx(ye,{})]})}),o.jsx("div",{id:h,role:"region","aria-labelledby":b,hidden:!g,className:"p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400",children:f?f(s,g):s.content})]},s.id)})})},R=a.createContext(null),z=()=>a.useContext(R),ee=a.createContext(null),A=()=>a.useContext(ee);function we({id:e,title:n,children:t,standalone:r=!1,showFloatingClose:l=!1,containerClasses:p="",onClose:f}){const c=A(),d=z(),i=!r&&!!c&&!!d,[u,s]=a.useState(!1),g=i?c.isOpen(e):u,b=i?c.getModalData(e):null,h=()=>{i?d.closeModal(e):s(!1),f==null||f()};return a.useEffect(()=>(g?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[g]),g?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 ${p}`,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: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:b}):t})]})}):null}function ve({children:e}){const[n,t]=a.useState({}),[r,l]=a.useState({}),p=a.useCallback((s,g)=>{t(b=>({...b,[s]:!0})),g&&l(b=>({...b,[s]:g}))},[]),f=a.useCallback(s=>{t(g=>({...g,[s]:!1})),l(g=>{const b={...g};return delete b[s],b})},[]),c=a.useCallback(s=>!!n[s],[n]),d=a.useCallback(s=>r[s],[r]),i=a.useMemo(()=>({openModal:p,closeModal:f}),[p,f]),u=a.useMemo(()=>({isOpen:c,getModalData:d}),[c,d]);return o.jsx(R.Provider,{value:i,children:o.jsx(ee.Provider,{value:u,children:e})})}function Ce(e){const{openModal:n,closeModal:t}=z(),{isOpen:r,getModalData:l}=A();return{open:p=>n(e,p),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 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]=a.useState([]);a.useEffect(()=>{Se((r,l,p,f)=>{const c=$e();n(d=>[...d,{id:c,type:r,message:l,config:f}]),setTimeout(()=>{n(d=>d.filter(i=>i.id!==c))},p)})},[]);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 d,i,u,s,g,b,h,y,C,N,O,L,$;const l=((d=r.config)==null?void 0:d.icon)||((i=t.icons)==null?void 0:i[r.type])||je(r.type),p=((u=r.config)==null?void 0:u.bgColor)||((g=(s=t.colors)==null?void 0:s[r.type])==null?void 0:g.bg)||"bg-white dark:bg-gray-800",f=((b=r.config)==null?void 0:b.textColor)||((y=(h=t.colors)==null?void 0:h[r.type])==null?void 0:y.text)||"text-gray-700 dark:text-gray-300",c=((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 ${p} ${f}`,children:[o.jsx("div",{className:c,children:l}),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"})});
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-md",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
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"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
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",