tailwind-ux-kit 1.0.106 → 1.0.108

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.
@@ -47,13 +47,13 @@ const ne = {
47
47
  iconPosition: s = "left",
48
48
  floatingLabelStyle: l,
49
49
  onChange: i,
50
- isValid: y,
50
+ isValid: x,
51
51
  isInvalid: p,
52
52
  feedback: b,
53
53
  iconClasses: $,
54
54
  feedbackType: C = "invalid",
55
55
  labelClasses: O = "",
56
- inputType: x = "",
56
+ inputType: y = "",
57
57
  inputPattern: v,
58
58
  ...h
59
59
  } = e, [w, N] = z("default"), k = K.useCallback(
@@ -63,14 +63,14 @@ const ne = {
63
63
  },
64
64
  [g, c, i]
65
65
  ), P = _(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), j = !!l, m = ne[o] || ne.md, L = re[u] || re.flat, D = _(
66
- () => ve(w, y, p),
67
- [w, y, p]
66
+ () => ve(w, x, p),
67
+ [w, x, p]
68
68
  ), S = _(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), T = _(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]), R = (M) => {
69
69
  var Z;
70
70
  const A = M.key;
71
71
  !(M.ctrlKey || M.metaKey || A.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(A)) && (() => {
72
72
  const W = /^\d$/, X = /^[a-zA-Z]$/;
73
- switch (x) {
73
+ switch (y) {
74
74
  case "numeric":
75
75
  case "number":
76
76
  case "integer":
@@ -90,7 +90,7 @@ const ne = {
90
90
  const A = M.clipboardData.getData("Text");
91
91
  (() => {
92
92
  const Z = /^\d+$/, W = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
93
- switch (x) {
93
+ switch (y) {
94
94
  case "numeric":
95
95
  case "number":
96
96
  case "integer":
@@ -115,7 +115,7 @@ const ne = {
115
115
  "label",
116
116
  {
117
117
  htmlFor: P,
118
- className: `block mb-1 text-sm ${y ? "text-green-700 dark:text-green-500" : p ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${O}`,
118
+ className: `block mb-1 text-sm ${x ? "text-green-700 dark:text-green-500" : p ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${O}`,
119
119
  children: t
120
120
  }
121
121
  ),
@@ -212,22 +212,22 @@ const $e = {
212
212
  iconPosition: s = "left",
213
213
  floatingLabelStyle: l,
214
214
  onChange: i,
215
- isValid: y,
215
+ isValid: x,
216
216
  isInvalid: p,
217
217
  feedback: b,
218
218
  feedbackType: $ = "invalid",
219
219
  children: C,
220
220
  ...O
221
- } = e, [x, v] = z("default"), h = he(), w = _(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : h), [r, t, h]), N = (S) => {
221
+ } = e, [y, v] = z("default"), h = he(), w = _(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : h), [r, t, h]), N = (S) => {
222
222
  const T = S.target.value, R = (g == null ? void 0 : g(T)) ?? "default";
223
223
  v(R), c == null || c(S, R), i == null || i(S);
224
- }, k = !!l, P = $e[o], j = ke[u], m = Le(x, y, p);
224
+ }, k = !!l, P = $e[o], j = ke[u], m = Le(y, x, p);
225
225
  return /* @__PURE__ */ E("div", { className: `w-full relative ${k ? "z-0" : ""}`, children: [
226
226
  !k && t && /* @__PURE__ */ d(
227
227
  "label",
228
228
  {
229
229
  htmlFor: w,
230
- className: `block mb-1 text-sm ${y ? "text-green-700" : p ? "text-red-700" : "text-gray-700"}`,
230
+ className: `block mb-1 text-sm ${x ? "text-green-700" : p ? "text-red-700" : "text-gray-700"}`,
231
231
  children: t
232
232
  }
233
233
  ),
@@ -521,10 +521,10 @@ const _e = {
521
521
  children: s,
522
522
  checked: l,
523
523
  ...i
524
- }, y) => {
524
+ }, x) => {
525
525
  const p = (P) => {
526
526
  !u && o && o(P.target.checked), i.onChange && i.onChange(P);
527
- }, b = "mr-2 border flex items-center justify-center transition-all", $ = _e[n], C = Fe[t], O = Ke[r] ?? "", x = r.startsWith("outline"), v = r.startsWith("soft"), N = `${b} ${$} ${C} ${O} ${l && (x || v || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, k = {
527
+ }, b = "mr-2 border flex items-center justify-center transition-all", $ = _e[n], C = Fe[t], O = Ke[r] ?? "", y = r.startsWith("outline"), v = r.startsWith("soft"), N = `${b} ${$} ${C} ${O} ${l && (y || v || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, k = {
528
528
  xs: "w-2 h-2",
529
529
  sm: "w-2.5 h-2.5",
530
530
  md: "w-3 h-3",
@@ -545,7 +545,7 @@ const _e = {
545
545
  disabled: u,
546
546
  id: c,
547
547
  value: f,
548
- ref: y,
548
+ ref: x,
549
549
  ...i
550
550
  }
551
551
  ),
@@ -571,20 +571,20 @@ const ot = ({
571
571
  transition: s = !0,
572
572
  ariaLabel: l = "Dropdown menu",
573
573
  forceCloseDropdown: i,
574
- ...y
574
+ ...x
575
575
  }) => {
576
- const [p, b] = z(!1), [$, C] = z(!1), O = F(null), x = F(null), v = _(() => ({
576
+ const [p, b] = z(!1), [$, C] = z(!1), O = F(null), y = F(null), v = _(() => ({
577
577
  left: "left-0",
578
578
  center: "left-1/2 transform -translate-x-1/2",
579
579
  right: "right-0"
580
580
  })[u], [u]), h = I(() => {
581
- const m = x.current, L = O.current;
581
+ const m = y.current, L = O.current;
582
582
  if (!m || !L) return;
583
583
  const { top: D, bottom: S } = m.getBoundingClientRect(), T = L.offsetHeight, R = window.innerHeight - S, H = D;
584
584
  C(R < T && H > T);
585
585
  }, []), w = I((m) => {
586
586
  var L, D;
587
- !((L = O.current) != null && L.contains(m.target)) && !((D = x.current) != null && D.contains(m.target)) && b(!1);
587
+ !((L = O.current) != null && L.contains(m.target)) && !((D = y.current) != null && D.contains(m.target)) && b(!1);
588
588
  }, []), N = I(() => b((m) => !m), []), k = I(() => b(!1), []);
589
589
  B(() => {
590
590
  if (p)
@@ -598,7 +598,7 @@ const ot = ({
598
598
  }, [p]), B(() => {
599
599
  const m = (L) => {
600
600
  var D;
601
- L.key === "Escape" && P.current && (b(!1), (D = x.current) == null || D.focus());
601
+ L.key === "Escape" && P.current && (b(!1), (D = y.current) == null || D.focus());
602
602
  };
603
603
  return document.addEventListener("keydown", m), () => {
604
604
  document.removeEventListener("keydown", m);
@@ -615,12 +615,12 @@ const ot = ({
615
615
  ].filter(Boolean).join(" "),
616
616
  [$, v, f, s, c]
617
617
  );
618
- return /* @__PURE__ */ E("div", { className: `relative inline-block ${g}`, ...y, children: [
618
+ return /* @__PURE__ */ E("div", { className: `relative inline-block ${g}`, ...x, children: [
619
619
  /* @__PURE__ */ d(
620
620
  "button",
621
621
  {
622
622
  type: "button",
623
- ref: x,
623
+ ref: y,
624
624
  onClick: N,
625
625
  "aria-expanded": p,
626
626
  "aria-label": l,
@@ -828,12 +828,12 @@ function lt({
828
828
  name: l,
829
829
  renderOption: i
830
830
  }) {
831
- const y = ae[u] || ae.rounded, p = le[c] || le.md, b = F(null), [$, C] = z({});
831
+ const x = ae[u] || ae.rounded, p = le[c] || le.md, b = F(null), [$, C] = z({});
832
832
  B(() => {
833
833
  if (!b.current) return;
834
- const x = e.findIndex((w) => w.value === n);
835
- if (x === -1) return;
836
- const h = b.current.querySelectorAll("button")[x];
834
+ const y = e.findIndex((w) => w.value === n);
835
+ if (y === -1) return;
836
+ const h = b.current.querySelectorAll("button")[y];
837
837
  if (h) {
838
838
  const { offsetLeft: w, offsetWidth: N, offsetHeight: k } = h;
839
839
  C({
@@ -863,12 +863,12 @@ function lt({
863
863
  ref: b,
864
864
  role: "radiogroup",
865
865
  "aria-disabled": o,
866
- className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${y} ${o ? "opacity-50 cursor-not-allowed" : ""} ${a.group ?? ""}`,
866
+ className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${x} ${o ? "opacity-50 cursor-not-allowed" : ""} ${a.group ?? ""}`,
867
867
  children: [
868
868
  /* @__PURE__ */ d(
869
869
  "div",
870
870
  {
871
- className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${y} ${O}`,
871
+ className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${O}`,
872
872
  style: {
873
873
  ...$,
874
874
  zIndex: 0
@@ -876,8 +876,8 @@ function lt({
876
876
  "aria-hidden": "true"
877
877
  }
878
878
  ),
879
- e.map((x) => {
880
- const v = n === x.value, h = o || x.disabled;
879
+ e.map((y) => {
880
+ const v = n === y.value, h = o || y.disabled;
881
881
  return /* @__PURE__ */ d(
882
882
  "button",
883
883
  {
@@ -885,21 +885,18 @@ function lt({
885
885
  name: l,
886
886
  "aria-checked": v,
887
887
  disabled: h,
888
- onClick: () => !h && t(x.value),
888
+ onClick: () => !h && t(y.value),
889
889
  onKeyDown: (w) => {
890
- (w.key === "Enter" || w.key === " ") && !h && (w.preventDefault(), t(x.value));
890
+ (w.key === "Enter" || w.key === " ") && !h && (w.preventDefault(), t(y.value));
891
891
  },
892
- className: `
893
- relative z-10
894
- transition-colors duration-200 focus:outline-none
895
- ${p.button}
896
- ${v ? `text-white toggler-text-${g}` : "text-gray-700 hover:bg-gray-200"}
892
+ className: `relative z-10 transition-colors duration-200 focus:outline-none ${p.button}
893
+ ${v ? `text-white toggler-${g}` : "text-gray-700 hover:bg-gray-200"}
897
894
  ${a.option ?? ""}
898
895
  ${v ? a.selectedOption ?? "" : ""}
899
896
  `,
900
- children: i ? i(x, v) : x.label
897
+ children: i ? i(y, v) : y.label
901
898
  },
902
- String(x.value)
899
+ String(y.value)
903
900
  );
904
901
  })
905
902
  ]
@@ -949,7 +946,7 @@ function ct({
949
946
  lockScroll: c = !0,
950
947
  zIndex: f = 1e3
951
948
  }) {
952
- const { activeSheets: a, closeBottomSheet: s } = Ge(), l = a.includes(e), i = !!r, [y, p] = z(!1), [b, $] = z(100), [C, O] = z(!1), x = F(0), v = F(0), h = F(null), w = typeof window < "u" ? window.innerHeight : 0, N = r ? (1 - r.full) * 100 : 0, k = r ? (1 - r.half) * 100 : 0, P = I(
949
+ const { activeSheets: a, closeBottomSheet: s } = Ge(), l = a.includes(e), i = !!r, [x, p] = z(!1), [b, $] = z(100), [C, O] = z(!1), y = F(0), v = F(0), h = F(null), w = typeof window < "u" ? window.innerHeight : 0, N = r ? (1 - r.full) * 100 : 0, k = r ? (1 - r.half) * 100 : 0, P = I(
953
950
  (S) => {
954
951
  if (i)
955
952
  switch (S) {
@@ -989,10 +986,10 @@ function ct({
989
986
  }, [s, e, l]);
990
987
  const j = (S) => {
991
988
  var T, R;
992
- i && (O(!0), x.current = S.clientY, v.current = b, (R = (T = S.target).setPointerCapture) == null || R.call(T, S.pointerId));
989
+ i && (O(!0), y.current = S.clientY, v.current = b, (R = (T = S.target).setPointerCapture) == null || R.call(T, S.pointerId));
993
990
  }, m = (S) => {
994
991
  if (!C || !i) return;
995
- const R = (S.clientY - x.current) / w * 100, H = v.current + R;
992
+ const R = (S.clientY - y.current) / w * 100, H = v.current + R;
996
993
  $(Math.min(Math.max(H, N), 100));
997
994
  }, L = () => {
998
995
  if (!i) return;
@@ -1003,7 +1000,7 @@ function ct({
1003
1000
  const S = (k + N) / 2;
1004
1001
  b <= S ? P("full") : P("half");
1005
1002
  };
1006
- if (!y) return null;
1003
+ if (!x) return null;
1007
1004
  const D = {
1008
1005
  transform: `translate3d(0, ${b}%, 0)`,
1009
1006
  transition: C ? "none" : "transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",
@@ -1082,7 +1079,7 @@ const dt = ({
1082
1079
  showArrowIcon: f = !0,
1083
1080
  panelClasses: a = ""
1084
1081
  }) => {
1085
- const [s, l] = z(/* @__PURE__ */ new Set()), i = _(() => o ? new Set(o) : s, [o, s]), y = I(
1082
+ const [s, l] = z(/* @__PURE__ */ new Set()), i = _(() => o ? new Set(o) : s, [o, s]), x = I(
1086
1083
  (p) => {
1087
1084
  const b = new Set(i);
1088
1085
  b.has(p) ? b.delete(p) : (n || b.clear(), b.add(p)), o && u ? u(Array.from(b)) : l(b);
@@ -1109,7 +1106,7 @@ const dt = ({
1109
1106
  type: "button",
1110
1107
  "aria-expanded": b,
1111
1108
  "aria-controls": C,
1112
- onClick: () => y(p.id),
1109
+ onClick: () => x(p.id),
1113
1110
  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}`,
1114
1111
  children: [
1115
1112
  g ? g(p, b) : p.title,
@@ -1157,9 +1154,9 @@ function ut({
1157
1154
  disableEscapeClose: s = !1,
1158
1155
  closeBtnStyle: l
1159
1156
  }) {
1160
- const i = be(), y = pe(), p = !o && !!i && !!y, [b, $] = z(!1), C = p ? i.isOpen(e) : b, O = p ? i.getModalData(e) : null, x = n === "bottom-sheet", v = I(() => {
1161
- p ? y.closeModal(e) : $(!1), a == null || a();
1162
- }, [p, y, e, a]), h = F(null);
1157
+ const i = be(), x = pe(), p = !o && !!i && !!x, [b, $] = z(!1), C = p ? i.isOpen(e) : b, O = p ? i.getModalData(e) : null, y = n === "bottom-sheet", v = I(() => {
1158
+ p ? x.closeModal(e) : $(!1), a == null || a();
1159
+ }, [p, x, e, a]), h = F(null);
1163
1160
  return B(() => {
1164
1161
  if (!C) return;
1165
1162
  const w = window.scrollY, N = {
@@ -1215,7 +1212,7 @@ function ut({
1215
1212
  fixed inset-0 z-50
1216
1213
  bg-black/60 backdrop-blur-[2px]
1217
1214
  flex
1218
- ${x ? "items-end justify-center" : "items-center justify-center"}
1215
+ ${y ? "items-end justify-center" : "items-center justify-center"}
1219
1216
  `,
1220
1217
  children: /* @__PURE__ */ E(
1221
1218
  "div",
@@ -1224,7 +1221,7 @@ function ut({
1224
1221
  bg-white shadow-lg
1225
1222
  transform transition-all duration-300
1226
1223
 
1227
- ${x ? `
1224
+ ${y ? `
1228
1225
  w-full
1229
1226
  rounded-t-3xl
1230
1227
  max-h-[92dvh]
@@ -1281,11 +1278,11 @@ function ft({
1281
1278
  children: e
1282
1279
  }) {
1283
1280
  const [n, t] = z({}), [r, o] = z({}), u = I((l, i) => {
1284
- t((y) => ({ ...y, [l]: !0 })), i && o((y) => ({ ...y, [l]: i }));
1281
+ t((x) => ({ ...x, [l]: !0 })), i && o((x) => ({ ...x, [l]: i }));
1285
1282
  }, []), g = I((l) => {
1286
1283
  t((i) => ({ ...i, [l]: !1 })), o((i) => {
1287
- const y = { ...i };
1288
- return delete y[l], y;
1284
+ const x = { ...i };
1285
+ return delete x[l], x;
1289
1286
  });
1290
1287
  }, []), c = I((l) => !!n[l], [n]), f = I(
1291
1288
  (l) => r[l],
@@ -1343,8 +1340,8 @@ const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
1343
1340
  {
1344
1341
  className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
1345
1342
  children: n.map((o) => {
1346
- var a, s, l, i, y, p, b, $, C, O, x, v, h, w;
1347
- const u = ((a = o.config) == null ? void 0 : a.icon) || ((s = r.icons) == null ? void 0 : s[o.type]) || Ve(o.type), g = ((l = o.config) == null ? void 0 : l.bgColor) || ((y = (i = r.colors) == null ? void 0 : i[o.type]) == null ? void 0 : y.bg) || "bg-white dark:bg-gray-800", c = ((p = o.config) == null ? void 0 : p.textColor) || (($ = (b = r.colors) == null ? void 0 : b[o.type]) == null ? void 0 : $.text) || "text-gray-700 dark:text-gray-300", f = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(C = o.config) == null ? void 0 : C.iconContainerClass}`;
1343
+ var a, s, l, i, x, p, b, $, C, O, y, v, h, w;
1344
+ const u = ((a = o.config) == null ? void 0 : a.icon) || ((s = r.icons) == null ? void 0 : s[o.type]) || Ve(o.type), g = ((l = o.config) == null ? void 0 : l.bgColor) || ((x = (i = r.colors) == null ? void 0 : i[o.type]) == null ? void 0 : x.bg) || "bg-white dark:bg-gray-800", c = ((p = o.config) == null ? void 0 : p.textColor) || (($ = (b = r.colors) == null ? void 0 : b[o.type]) == null ? void 0 : $.text) || "text-gray-700 dark:text-gray-300", f = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(C = o.config) == null ? void 0 : C.iconContainerClass}`;
1348
1345
  return /* @__PURE__ */ E(
1349
1346
  "div",
1350
1347
  {
@@ -1352,7 +1349,7 @@ const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
1352
1349
  children: [
1353
1350
  u && /* @__PURE__ */ d("div", { className: f, children: u }),
1354
1351
  /* @__PURE__ */ E("div", { className: "flex-1", children: [
1355
- ((x = o.config) == null ? void 0 : x.title) && /* @__PURE__ */ d(
1352
+ ((y = o.config) == null ? void 0 : y.title) && /* @__PURE__ */ d(
1356
1353
  "div",
1357
1354
  {
1358
1355
  className: `font-semibold text-black ${(v = o.config) == null ? void 0 : v.titleClass}`,
@@ -1,18 +1,15 @@
1
1
  (function(x,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],n):(x=typeof globalThis<"u"?globalThis:x||self,n(x.TailwindUiKit={},x.jsxRuntime,x.React,x.ReactDOM))})(this,(function(x,n,l,fe){"use strict";"use client";var Q=document.createElement("style");Q.textContent=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media(hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media(hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media(hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media(hover:hover){.btn-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.btn-outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.btn-outline-success:hover{background-color:var(--color-green-50,oklch(98.2% .018 155.826))}}.btn-soft-success{background-color:var(--color-green-100,oklch(96.2% .044 156.743));color:var(--color-green-700,oklch(52.7% .154 150.069))}@media(hover:hover){.btn-soft-success:hover{background-color:var(--color-green-200,oklch(92.5% .084 155.995))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media(hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media(hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-white,#fff)}@media(hover:hover){.btn-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.btn-outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.btn-outline-warning:hover{background-color:var(--color-yellow-50,oklch(98.7% .026 102.212))}}.btn-soft-warning{background-color:var(--color-yellow-100,oklch(97.3% .071 103.193));color:var(--color-yellow-700,oklch(55.4% .135 66.442))}@media(hover:hover){.btn-soft-warning:hover{background-color:var(--color-yellow-200,oklch(94.5% .129 101.54))}}.btn-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media(hover:hover){.btn-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.btn-outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.btn-outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.btn-soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media(hover:hover){.btn-soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.btn-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-white,#fff)}@media(hover:hover){.btn-dark:hover{background-color:var(--color-black,#000)}}.btn-outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.btn-outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-soft-dark{background-color:var(--color-gray-200,oklch(92.8% .006 264.531));color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.btn-soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.btn-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media(hover:hover){.btn-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.btn-outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.btn-soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media(hover:hover){.btn-link:hover{text-decoration-line:underline}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media(hover:hover){.primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}.primary:is(:where(.peer):checked~*):hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.outline-primary:is(:where(.peer):checked~*){color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.outline-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.soft-primary{border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-200,oklch(88.2% .059 254.128));color:var(--color-blue-600,oklch(54.6% .245 262.881))}.soft-primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.soft-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media(hover:hover){.secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media(hover:hover){.success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}.success:is(:where(.peer):checked~*):hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.outline-success:is(:where(.peer):checked~*){color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.outline-success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}}.soft-success{border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-200,oklch(92.5% .084 155.995));color:var(--color-green-600,oklch(62.7% .194 149.214))}.soft-success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.soft-success:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media(hover:hover){.danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}.danger:is(:where(.peer):checked~*):hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.outline-danger:is(:where(.peer):checked~*){color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.outline-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.soft-danger{border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-200,oklch(88.5% .062 18.334));color:var(--color-red-600,oklch(57.7% .245 27.325))}.soft-danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.soft-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-white,#fff)}@media(hover:hover){.warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}.warning:is(:where(.peer):checked~*):hover{background-color:var(--color-yellow-700,oklch(55.4% .135 66.442))}}.outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.outline-warning:is(:where(.peer):checked~*){color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.outline-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.soft-warning{border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-200,oklch(94.5% .129 101.54));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}.soft-warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media(hover:hover){.soft-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media(hover:hover){.info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media(hover:hover){.soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-700,oklch(37.3% .034 259.733));background-color:var(--color-white,#fff)}.dark:is(:where(.peer):checked~*){border-color:var(--color-black,#000);background-color:var(--color-black,#000);color:var(--color-white,#fff)}@media(hover:hover){.dark:hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark:hover{background-color:color-mix(in oklab,var(--color-black,#000)50%,transparent)}}}.outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));background-color:var(--color-white,#fff)}.outline-dark:is(:where(.peer):checked~*){color:var(--color-black,#000)}@media(hover:hover){.outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.soft-dark{border-color:var(--color-gray-600,oklch(44.6% .03 256.802));background-color:var(--color-gray-500,oklch(55.1% .027 264.364));color:var(--color-black,#000)}.soft-dark:is(:where(.peer):checked~*){border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-black,#000)}@media(hover:hover){.soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media(hover:hover){.light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media(hover:hover){.soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media(hover:hover){.link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */.toggler-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media(hover:hover){.toggler-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.toggler-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media(hover:hover){.toggler-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.toggler-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214))}@media(hover:hover){.toggler-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.toggler-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325))}@media(hover:hover){.toggler-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.toggler-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047))}@media(hover:hover){.toggler-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.toggler-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media(hover:hover){.toggler-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.toggler-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665))}@media(hover:hover){.toggler-dark:hover{background-color:var(--color-black,#000)}}.toggler-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}@media(hover:hover){.toggler-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-slide-up{animation:slideUp .25s cubic-bezier(.22,1,.36,1)}
2
- /*$vite$:1*/`,document.head.appendChild(Q);const V={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"},R={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},be={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"},ge={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"},ve=(e,r,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(r)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(e){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"}},ee=l.forwardRef((e,r)=>{const{label:o,id:t,inputSize:a="md",shape:h="rounded",validate:g,onValidatedChange:u,className:f="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:d,isValid:w,isInvalid:b,feedback:v,iconClasses:$,feedbackType:S="invalid",labelClasses:O="",inputType:k="",inputPattern:C,...y}=e,[m,L]=l.useState("default"),N=l.useCallback(A=>{const T=A.target.value,K=(g==null?void 0:g(T))??"default";L(K),u==null||u(A,K),d==null||d(A)},[g,u,d]),P=l.useMemo(()=>t||(typeof o=="string"?`input-${o.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[t,o]),j=!!i,p=V[a]||V.md,M=R[h]||R.flat,D=l.useMemo(()=>ve(m,w,b),[m,w,b]),E=l.useMemo(()=>c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[c]),I=l.useMemo(()=>s?c==="start"||c==="left"?"ps-10":"pe-10":"",[s,c]),B=A=>{var Y;const T=A.key;!(A.ctrlKey||A.metaKey||T.length!==1||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(T))&&(()=>{const H=/^\d$/,J=/^[a-zA-Z]$/;switch(k){case"numeric":case"number":case"integer":return!H.test(T);case"decimal":return!H.test(T)&&T!=="."&&T!=="Backspace"&&T!=="Tab";case"alphabetic":return!J.test(T);case"custom":return C?!C.test(T):!1;default:return!1}})()&&A.preventDefault(),(Y=y.onKeyDown)==null||Y.call(y,A)},z=A=>{var X;const T=A.clipboardData.getData("Text");(()=>{const Y=/^\d+$/,H=/^\d*\.?\d*$/,J=/^[a-zA-Z]+$/;switch(k){case"numeric":case"number":case"integer":return!Y.test(T);case"decimal":return!H.test(T);case"alphabetic":return!J.test(T);case"custom":return C?!C.test(T):!1;default:return!1}})()&&A.preventDefault(),(X=y.onPaste)==null||X.call(y,A)};return n.jsxs("div",{className:`w-full relative ${j?"z-0":""} tailwind-ux-input`,children:[!j&&o&&n.jsx("label",{htmlFor:P,className:`block mb-1 text-sm ${w?"text-green-700 dark:text-green-500":b?"text-red-700 dark:text-red-500":"text-gray-700"} ${O}`,children:o}),n.jsxs("div",{className:"relative w-full",children:[s&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${E} ${$}`,"aria-hidden":"true",children:s}),n.jsx("input",{...y,id:P,ref:r,placeholder:j?" ":y.placeholder,onChange:N,onKeyDown:B,onPaste:z,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
2
+ /*$vite$:1*/`,document.head.appendChild(Q);const V={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"},R={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},be={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"},ge={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"},ve=(e,r,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(r)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(e){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"}},ee=l.forwardRef((e,r)=>{const{label:o,id:t,inputSize:a="md",shape:h="rounded",validate:g,onValidatedChange:u,className:f="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:d,isValid:k,isInvalid:b,feedback:v,iconClasses:$,feedbackType:S="invalid",labelClasses:O="",inputType:w="",inputPattern:C,...y}=e,[m,L]=l.useState("default"),N=l.useCallback(A=>{const T=A.target.value,K=(g==null?void 0:g(T))??"default";L(K),u==null||u(A,K),d==null||d(A)},[g,u,d]),P=l.useMemo(()=>t||(typeof o=="string"?`input-${o.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[t,o]),j=!!i,p=V[a]||V.md,M=R[h]||R.flat,D=l.useMemo(()=>ve(m,k,b),[m,k,b]),E=l.useMemo(()=>c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[c]),I=l.useMemo(()=>s?c==="start"||c==="left"?"ps-10":"pe-10":"",[s,c]),B=A=>{var Y;const T=A.key;!(A.ctrlKey||A.metaKey||T.length!==1||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(T))&&(()=>{const H=/^\d$/,J=/^[a-zA-Z]$/;switch(w){case"numeric":case"number":case"integer":return!H.test(T);case"decimal":return!H.test(T)&&T!=="."&&T!=="Backspace"&&T!=="Tab";case"alphabetic":return!J.test(T);case"custom":return C?!C.test(T):!1;default:return!1}})()&&A.preventDefault(),(Y=y.onKeyDown)==null||Y.call(y,A)},z=A=>{var X;const T=A.clipboardData.getData("Text");(()=>{const Y=/^\d+$/,H=/^\d*\.?\d*$/,J=/^[a-zA-Z]+$/;switch(w){case"numeric":case"number":case"integer":return!Y.test(T);case"decimal":return!H.test(T);case"alphabetic":return!J.test(T);case"custom":return C?!C.test(T):!1;default:return!1}})()&&A.preventDefault(),(X=y.onPaste)==null||X.call(y,A)};return n.jsxs("div",{className:`w-full relative ${j?"z-0":""} tailwind-ux-input`,children:[!j&&o&&n.jsx("label",{htmlFor:P,className:`block mb-1 text-sm ${k?"text-green-700 dark:text-green-500":b?"text-red-700 dark:text-red-500":"text-gray-700"} ${O}`,children:o}),n.jsxs("div",{className:"relative w-full",children:[s&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${E} ${$}`,"aria-hidden":"true",children:s}),n.jsx("input",{...y,id:P,ref:r,placeholder:j?" ":y.placeholder,onChange:N,onKeyDown:B,onPaste:z,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
3
3
  ${p}
4
4
  ${j&&i&&be[i]}
5
- ${I} ${M} ${D} ${f}`}),j&&o&&i&&n.jsx("label",{htmlFor:P,className:`ms-1 ${ge[i]} ${f}`,children:o})]}),v&&n.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:S==="invalid"?"alert":void 0,children:v})]})});ee.displayName="Input";const pe={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"},ye={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},we={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"},ke={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"},me=(e,r,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(r)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const t="focus:ring focus:border";switch(e){case"error":return`${t}-red-500 border-red-500 bg-red-50`;case"warning":return`${t}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${t}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},oe=l.forwardRef((e,r)=>{const{label:o,id:t,inputSize:a="md",shape:h="rounded",validate:g,onValidatedChange:u,className:f="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:d,isValid:w,isInvalid:b,feedback:v,feedbackType:$="invalid",children:S,...O}=e,[k,C]=l.useState("default"),y=l.useId(),m=l.useMemo(()=>t||(typeof o=="string"?`select-${o.toLowerCase().replace(/\s+/g,"-")}`:y),[t,o,y]),L=E=>{const I=E.target.value,B=(g==null?void 0:g(I))??"default";C(B),u==null||u(E,B),d==null||d(E)},N=!!i,P=pe[a],j=ye[h],p=me(k,w,b),M=s&&(c==="start"||c==="left")?"ps-10":s?"pe-10":"",D=c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return n.jsxs("div",{className:`w-full relative ${N?"z-0":""}`,children:[!N&&o&&n.jsx("label",{htmlFor:m,className:`block mb-1 text-sm ${w?"text-green-700":b?"text-red-700":"text-gray-700"}`,children:o}),n.jsxs("div",{className:"relative w-full",children:[s&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${D}`,children:n.jsx("span",{className:"text-gray-500",children:s})}),n.jsx("select",{...O,id:m,ref:r,onChange:L,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
+ ${I} ${M} ${D} ${f}`}),j&&o&&i&&n.jsx("label",{htmlFor:P,className:`ms-1 ${ge[i]} ${f}`,children:o})]}),v&&n.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:S==="invalid"?"alert":void 0,children:v})]})});ee.displayName="Input";const pe={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"},ye={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},we={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"},ke={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"},me=(e,r,o)=>{if(o)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(r)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const t="focus:ring focus:border";switch(e){case"error":return`${t}-red-500 border-red-500 bg-red-50`;case"warning":return`${t}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${t}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},oe=l.forwardRef((e,r)=>{const{label:o,id:t,inputSize:a="md",shape:h="rounded",validate:g,onValidatedChange:u,className:f="",icon:s,iconPosition:c="left",floatingLabelStyle:i,onChange:d,isValid:k,isInvalid:b,feedback:v,feedbackType:$="invalid",children:S,...O}=e,[w,C]=l.useState("default"),y=l.useId(),m=l.useMemo(()=>t||(typeof o=="string"?`select-${o.toLowerCase().replace(/\s+/g,"-")}`:y),[t,o,y]),L=E=>{const I=E.target.value,B=(g==null?void 0:g(I))??"default";C(B),u==null||u(E,B),d==null||d(E)},N=!!i,P=pe[a],j=ye[h],p=me(w,k,b),M=s&&(c==="start"||c==="left")?"ps-10":s?"pe-10":"",D=c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return n.jsxs("div",{className:`w-full relative ${N?"z-0":""}`,children:[!N&&o&&n.jsx("label",{htmlFor:m,className:`block mb-1 text-sm ${k?"text-green-700":b?"text-red-700":"text-gray-700"}`,children:o}),n.jsxs("div",{className:"relative w-full",children:[s&&n.jsx("div",{className:`absolute inset-y-0 flex items-center ${D}`,children:n.jsx("span",{className:"text-gray-500",children:s})}),n.jsx("select",{...O,id:m,ref:r,onChange:L,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
6
6
  ${P} ${M}
7
7
  ${N&&i&&we[i]}
8
- ${j} ${p} ${f}`,children:S}),N&&o&&i&&n.jsx("label",{htmlFor:m,className:`ms-1 ${ke[i]} ${f}`,children:o})]}),v&&n.jsx("p",{className:`mt-1 text-xs ${$==="invalid"?"text-red-600":"text-green-600"}`,children:v})]})});oe.displayName="Select";const xe={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},Ce={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"},Se={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},$e=({children:e,variant:r="primary",size:o="md",type:t="button",shape:a="rounded",className:h="",isLoading:g=!1,disabled:u=!1,...f})=>{const s=u||g,c=["inline-flex items-center justify-center font-normal transition duration-150",xe[r],Ce[o],Se[a],a==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return n.jsxs("button",{type:t,className:c,disabled:s,...f,children:[g&&n.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:[n.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"}),n.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]})};var re={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},te=l.createContext&&l.createContext(re),Ne=["attr","size","title"];function Ee(e,r){if(e==null)return{};var o=Le(e,r),t,a;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(a=0;a<h.length;a++)t=h[a],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Le(e,r){if(e==null)return{};var o={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if(r.indexOf(t)>=0)continue;o[t]=e[t]}return o}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},_.apply(this,arguments)}function le(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,t)}return o}function F(e){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?le(Object(o),!0).forEach(function(t){Me(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Me(e,r,o){return r=Pe(r),r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function Pe(e){var r=Oe(e,"string");return typeof r=="symbol"?r:r+""}function Oe(e,r){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var t=o.call(e,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ne(e){return e&&e.map((r,o)=>l.createElement(r.tag,F({key:o},r.attr),ne(r.child)))}function Z(e){return r=>l.createElement(De,_({attr:F({},e.attr)},r),ne(e.child))}function De(e){var r=o=>{var{attr:t,size:a,title:h}=e,g=Ee(e,Ne),u=a||o.size||"1em",f;return o.className&&(f=o.className),e.className&&(f=(f?f+" ":"")+e.className),l.createElement("svg",_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,t,g,{className:f,style:F(F({color:e.color||o.color},o.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),h&&l.createElement("title",null,h),e.children)};return te!==void 0?l.createElement(te.Consumer,null,o=>r(o)):r(re)}function Te(e){return Z({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}const je={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},Ae={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Ie={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},ae=l.forwardRef(({label:e,boxSize:r="md",shape:o="rounded",variant:t="success",onSelectionChange:a,disabled:h=!1,className:g="",id:u,value:f,icon:s,children:c,checked:i,...d},w)=>{const b=P=>{!h&&a&&a(P.target.checked),d.onChange&&d.onChange(P)},v="mr-2 border flex items-center justify-center transition-all",$=je[r],S=Ae[o],O=Ie[t]??"",k=t.startsWith("outline"),C=t.startsWith("soft"),L=`${v} ${$} ${S} ${O} ${i&&(k||C||t==="link")?"peer-checked:bg-current peer-checked:text-white":i?"peer-checked:bg-current":""}`,N={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return n.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${g}`,children:[n.jsx("input",{type:"checkbox",className:"peer hidden",checked:i,onChange:b,disabled:h,id:u,value:f,ref:w,...d}),n.jsx("span",{className:L.trim(),children:(i||d.defaultChecked)&&(s??n.jsx(Te,{className:`${N[r]}`}))}),e||c?n.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:e??c}):null]})});ae.displayName="Checkbox";const Be=({label:e,header:r,items:o=[],onSelect:t,renderItem:a,position:h="right",className:g="",menuClassName:u="",width:f="w-48",closeOnSelect:s=!1,transition:c=!0,ariaLabel:i="Dropdown menu",forceCloseDropdown:d,...w})=>{const[b,v]=l.useState(!1),[$,S]=l.useState(!1),O=l.useRef(null),k=l.useRef(null),C=l.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),y=l.useCallback(()=>{const p=k.current,M=O.current;if(!p||!M)return;const{top:D,bottom:E}=p.getBoundingClientRect(),I=M.offsetHeight,B=window.innerHeight-E,z=D;S(B<I&&z>I)},[]),m=l.useCallback(p=>{var M,D;!((M=O.current)!=null&&M.contains(p.target))&&!((D=k.current)!=null&&D.contains(p.target))&&v(!1)},[]),L=l.useCallback(()=>v(p=>!p),[]),N=l.useCallback(()=>v(!1),[]);l.useEffect(()=>{if(b)return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[b,y]);const P=l.useRef(b);l.useEffect(()=>{P.current=b},[b]),l.useEffect(()=>{const p=M=>{var D;M.key==="Escape"&&P.current&&(v(!1),(D=k.current)==null||D.focus())};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[]),l.useEffect(()=>(document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)),[m]);const j=l.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",$?"bottom-full mb-2":"top-full mt-2",C,f,c&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[$,C,f,c,u]);return n.jsxs("div",{className:`relative inline-block ${g}`,...w,children:[n.jsx("button",{type:"button",ref:k,onClick:L,"aria-expanded":b,"aria-label":i,className:"focus:outline-none",children:e}),b&&n.jsxs("div",{ref:O,role:"menu",className:j,children:[r&&r,o.map((p,M)=>{const D=()=>{t&&t(p),s&&N()};return n.jsx("div",{children:a?a(p,D):n.jsx("div",{onClick:D,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:p.label})},M)})]})]})},ze=({children:e,content:r,position:o="top",className:t="",tooltipClass:a="",tooltipStyle:h={}})=>{const g=l.useRef(null),u=l.useRef(null);l.useEffect(()=>{const s=g.current,c=u.current;if(!s||!c)return;const i=()=>{c.style.opacity="1",c.style.visibility="visible"},d=()=>{c.style.opacity="0",c.style.visibility="hidden"};return s.addEventListener("mouseenter",i),s.addEventListener("mouseleave",d),()=>{s.removeEventListener("mouseenter",i),s.removeEventListener("mouseleave",d)}},[]);const f=s=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return n.jsxs("div",{ref:g,className:`relative inline-block ${t}`,children:[e,n.jsx("div",{ref:u,role:"tooltip",className:a,style:{...f(o),...h},children:r})]})},_e={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"},Fe={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"},Ke={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Ye=({label:e,variant:r="primary",size:o="sm",shape:t="rounded",icon:a,dismissible:h,onDismiss:g,className:u="",...f})=>{const s=!e&&!!a,c=`inline-flex items-center font-medium ${_e[r]||""} ${Fe[o]||""} ${Ke[t]||""} ${s?"justify-center p-2 w-8 h-8":""} `+u;return n.jsxs("span",{className:c.trim(),...f,children:[a&&n.jsx("span",{className:e?"mr-1":"",children:a}),e,h&&n.jsx("button",{type:"button",onClick:g,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})},ce={rounded:"rounded-md",pill:"rounded-full",flat:"rounded-none"},se={xs:{button:"px-2 py-1 text-xs"},sm:{button:"px-3 py-1.5 text-sm"},md:{button:"px-4 py-2 text-sm"},lg:{button:"px-5 py-3 text-base"},xl:{button:"px-6 py-4 text-lg"}};function He({options:e,selected:r,onChange:o,label:t,disabled:a=!1,shape:h="rounded",variant:g="primary",size:u="md",className:f="",classNames:s={},id:c,name:i,renderOption:d}){const w=ce[h]||ce.rounded,b=se[u]||se.md,v=l.useRef(null),[$,S]=l.useState({});l.useEffect(()=>{if(!v.current)return;const k=e.findIndex(m=>m.value===r);if(k===-1)return;const y=v.current.querySelectorAll("button")[k];if(y){const{offsetLeft:m,offsetWidth:L,offsetHeight:N}=y;S({transform:`translateX(${m}px)`,width:L,height:N})}},[r,e,u]);const O=`toggler-${g}`;return n.jsxs("div",{className:`flex flex-col gap-2 w-fit ${f} ${s.root??""}`,id:c,children:[t&&n.jsx("span",{className:`text-sm font-medium select-none ${s.label??""}`,children:t}),n.jsxs("div",{ref:v,role:"radiogroup","aria-disabled":a,className:`relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${w} ${a?"opacity-50 cursor-not-allowed":""} ${s.group??""}`,children:[n.jsx("div",{className:`absolute top-0 left-0 transition-transform duration-300 ease-in-out ${w} ${O}`,style:{...$,zIndex:0},"aria-hidden":"true"}),e.map(k=>{const C=r===k.value,y=a||k.disabled;return n.jsx("button",{role:"radio",name:i,"aria-checked":C,disabled:y,onClick:()=>!y&&o(k.value),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&!y&&(m.preventDefault(),o(k.value))},className:`
9
- relative z-10
10
- transition-colors duration-200 focus:outline-none
11
- ${b.button}
12
- ${C?`text-white toggler-text-${g}`:"text-gray-700 hover:bg-gray-200"}
8
+ ${j} ${p} ${f}`,children:S}),N&&o&&i&&n.jsx("label",{htmlFor:m,className:`ms-1 ${ke[i]} ${f}`,children:o})]}),v&&n.jsx("p",{className:`mt-1 text-xs ${$==="invalid"?"text-red-600":"text-green-600"}`,children:v})]})});oe.displayName="Select";const xe={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},Ce={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"},Se={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},$e=({children:e,variant:r="primary",size:o="md",type:t="button",shape:a="rounded",className:h="",isLoading:g=!1,disabled:u=!1,...f})=>{const s=u||g,c=["inline-flex items-center justify-center font-normal transition duration-150",xe[r],Ce[o],Se[a],a==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return n.jsxs("button",{type:t,className:c,disabled:s,...f,children:[g&&n.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:[n.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"}),n.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]})};var re={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},te=l.createContext&&l.createContext(re),Ne=["attr","size","title"];function Ee(e,r){if(e==null)return{};var o=Le(e,r),t,a;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(a=0;a<h.length;a++)t=h[a],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Le(e,r){if(e==null)return{};var o={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if(r.indexOf(t)>=0)continue;o[t]=e[t]}return o}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},_.apply(this,arguments)}function le(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,t)}return o}function F(e){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?le(Object(o),!0).forEach(function(t){Me(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Me(e,r,o){return r=Pe(r),r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function Pe(e){var r=Oe(e,"string");return typeof r=="symbol"?r:r+""}function Oe(e,r){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var t=o.call(e,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ne(e){return e&&e.map((r,o)=>l.createElement(r.tag,F({key:o},r.attr),ne(r.child)))}function Z(e){return r=>l.createElement(De,_({attr:F({},e.attr)},r),ne(e.child))}function De(e){var r=o=>{var{attr:t,size:a,title:h}=e,g=Ee(e,Ne),u=a||o.size||"1em",f;return o.className&&(f=o.className),e.className&&(f=(f?f+" ":"")+e.className),l.createElement("svg",_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,t,g,{className:f,style:F(F({color:e.color||o.color},o.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),h&&l.createElement("title",null,h),e.children)};return te!==void 0?l.createElement(te.Consumer,null,o=>r(o)):r(re)}function Te(e){return Z({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}const je={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},Ae={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Ie={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},ae=l.forwardRef(({label:e,boxSize:r="md",shape:o="rounded",variant:t="success",onSelectionChange:a,disabled:h=!1,className:g="",id:u,value:f,icon:s,children:c,checked:i,...d},k)=>{const b=P=>{!h&&a&&a(P.target.checked),d.onChange&&d.onChange(P)},v="mr-2 border flex items-center justify-center transition-all",$=je[r],S=Ae[o],O=Ie[t]??"",w=t.startsWith("outline"),C=t.startsWith("soft"),L=`${v} ${$} ${S} ${O} ${i&&(w||C||t==="link")?"peer-checked:bg-current peer-checked:text-white":i?"peer-checked:bg-current":""}`,N={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return n.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${g}`,children:[n.jsx("input",{type:"checkbox",className:"peer hidden",checked:i,onChange:b,disabled:h,id:u,value:f,ref:k,...d}),n.jsx("span",{className:L.trim(),children:(i||d.defaultChecked)&&(s??n.jsx(Te,{className:`${N[r]}`}))}),e||c?n.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:e??c}):null]})});ae.displayName="Checkbox";const Be=({label:e,header:r,items:o=[],onSelect:t,renderItem:a,position:h="right",className:g="",menuClassName:u="",width:f="w-48",closeOnSelect:s=!1,transition:c=!0,ariaLabel:i="Dropdown menu",forceCloseDropdown:d,...k})=>{const[b,v]=l.useState(!1),[$,S]=l.useState(!1),O=l.useRef(null),w=l.useRef(null),C=l.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),y=l.useCallback(()=>{const p=w.current,M=O.current;if(!p||!M)return;const{top:D,bottom:E}=p.getBoundingClientRect(),I=M.offsetHeight,B=window.innerHeight-E,z=D;S(B<I&&z>I)},[]),m=l.useCallback(p=>{var M,D;!((M=O.current)!=null&&M.contains(p.target))&&!((D=w.current)!=null&&D.contains(p.target))&&v(!1)},[]),L=l.useCallback(()=>v(p=>!p),[]),N=l.useCallback(()=>v(!1),[]);l.useEffect(()=>{if(b)return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[b,y]);const P=l.useRef(b);l.useEffect(()=>{P.current=b},[b]),l.useEffect(()=>{const p=M=>{var D;M.key==="Escape"&&P.current&&(v(!1),(D=w.current)==null||D.focus())};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[]),l.useEffect(()=>(document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)),[m]);const j=l.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",$?"bottom-full mb-2":"top-full mt-2",C,f,c&&"transition-all duration-200 ease-out",u].filter(Boolean).join(" "),[$,C,f,c,u]);return n.jsxs("div",{className:`relative inline-block ${g}`,...k,children:[n.jsx("button",{type:"button",ref:w,onClick:L,"aria-expanded":b,"aria-label":i,className:"focus:outline-none",children:e}),b&&n.jsxs("div",{ref:O,role:"menu",className:j,children:[r&&r,o.map((p,M)=>{const D=()=>{t&&t(p),s&&N()};return n.jsx("div",{children:a?a(p,D):n.jsx("div",{onClick:D,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:p.label})},M)})]})]})},ze=({children:e,content:r,position:o="top",className:t="",tooltipClass:a="",tooltipStyle:h={}})=>{const g=l.useRef(null),u=l.useRef(null);l.useEffect(()=>{const s=g.current,c=u.current;if(!s||!c)return;const i=()=>{c.style.opacity="1",c.style.visibility="visible"},d=()=>{c.style.opacity="0",c.style.visibility="hidden"};return s.addEventListener("mouseenter",i),s.addEventListener("mouseleave",d),()=>{s.removeEventListener("mouseenter",i),s.removeEventListener("mouseleave",d)}},[]);const f=s=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return n.jsxs("div",{ref:g,className:`relative inline-block ${t}`,children:[e,n.jsx("div",{ref:u,role:"tooltip",className:a,style:{...f(o),...h},children:r})]})},_e={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"},Fe={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"},Ke={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Ye=({label:e,variant:r="primary",size:o="sm",shape:t="rounded",icon:a,dismissible:h,onDismiss:g,className:u="",...f})=>{const s=!e&&!!a,c=`inline-flex items-center font-medium ${_e[r]||""} ${Fe[o]||""} ${Ke[t]||""} ${s?"justify-center p-2 w-8 h-8":""} `+u;return n.jsxs("span",{className:c.trim(),...f,children:[a&&n.jsx("span",{className:e?"mr-1":"",children:a}),e,h&&n.jsx("button",{type:"button",onClick:g,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})},ce={rounded:"rounded-md",pill:"rounded-full",flat:"rounded-none"},se={xs:{button:"px-2 py-1 text-xs"},sm:{button:"px-3 py-1.5 text-sm"},md:{button:"px-4 py-2 text-sm"},lg:{button:"px-5 py-3 text-base"},xl:{button:"px-6 py-4 text-lg"}};function He({options:e,selected:r,onChange:o,label:t,disabled:a=!1,shape:h="rounded",variant:g="primary",size:u="md",className:f="",classNames:s={},id:c,name:i,renderOption:d}){const k=ce[h]||ce.rounded,b=se[u]||se.md,v=l.useRef(null),[$,S]=l.useState({});l.useEffect(()=>{if(!v.current)return;const w=e.findIndex(m=>m.value===r);if(w===-1)return;const y=v.current.querySelectorAll("button")[w];if(y){const{offsetLeft:m,offsetWidth:L,offsetHeight:N}=y;S({transform:`translateX(${m}px)`,width:L,height:N})}},[r,e,u]);const O=`toggler-${g}`;return n.jsxs("div",{className:`flex flex-col gap-2 w-fit ${f} ${s.root??""}`,id:c,children:[t&&n.jsx("span",{className:`text-sm font-medium select-none ${s.label??""}`,children:t}),n.jsxs("div",{ref:v,role:"radiogroup","aria-disabled":a,className:`relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${k} ${a?"opacity-50 cursor-not-allowed":""} ${s.group??""}`,children:[n.jsx("div",{className:`absolute top-0 left-0 transition-transform duration-300 ease-in-out ${O}`,style:{...$,zIndex:0},"aria-hidden":"true"}),e.map(w=>{const C=r===w.value,y=a||w.disabled;return n.jsx("button",{role:"radio",name:i,"aria-checked":C,disabled:y,onClick:()=>!y&&o(w.value),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&!y&&(m.preventDefault(),o(w.value))},className:`relative z-10 transition-colors duration-200 focus:outline-none ${b.button}
9
+ ${C?`text-white toggler-${g}`:"text-gray-700 hover:bg-gray-200"}
13
10
  ${s.option??""}
14
11
  ${C?s.selectedOption??"":""}
15
- `,children:d?d(k,C):k.label},String(k.value))})]})]})}const ie=l.createContext(null);function Ze({children:e}){const[r,o]=l.useState([]),t=l.useCallback(u=>{o(f=>f.includes(u)?f:[...f,u])},[]),a=l.useCallback(u=>{o(f=>f.filter(s=>s!==u))},[]),h=l.useCallback(()=>{o([])},[]),g=l.useMemo(()=>({showBottomSheet:t,closeBottomSheet:a,closeAllBottomSheet:h,activeSheets:r}),[t,a,h,r]);return n.jsx(ie.Provider,{value:g,children:e})}function de(){const e=l.useContext(ie);if(!e)throw new Error("useBottomSheet must be used inside BottomSheetProvider");return e}function Ue({id:e,children:r,initialSnap:o="half",snapPoints:t,className:a="",overlayClassName:h="",closeOnBackdrop:g=!0,lockScroll:u=!0,zIndex:f=1e3}){const{activeSheets:s,closeBottomSheet:c}=de(),i=s.includes(e),d=!!t,[w,b]=l.useState(!1),[v,$]=l.useState(100),[S,O]=l.useState(!1),k=l.useRef(0),C=l.useRef(0),y=l.useRef(null),m=typeof window<"u"?window.innerHeight:0,L=t?(1-t.full)*100:0,N=t?(1-t.half)*100:0,P=l.useCallback(E=>{if(d)switch(E){case"full":$(L);break;case"half":$(N);break;default:$(100)}},[L,N,d]);l.useEffect(()=>{b(!0)},[]),l.useEffect(()=>{if(!i){$(100);return}d?P(o):$(0)},[i,o,P,d]),l.useEffect(()=>{if(u)return i?(document.body.style.overflow="hidden",document.body.style.touchAction="none"):(document.body.style.overflow="",document.body.style.touchAction=""),()=>{document.body.style.overflow="",document.body.style.touchAction=""}},[i,u]),l.useEffect(()=>{if(!i)return;const E=I=>{I.key==="Escape"&&c(e)};return window.addEventListener("keydown",E),()=>{window.removeEventListener("keydown",E)}},[c,e,i]);const j=E=>{var I,B;d&&(O(!0),k.current=E.clientY,C.current=v,(B=(I=E.target).setPointerCapture)==null||B.call(I,E.pointerId))},p=E=>{if(!S||!d)return;const B=(E.clientY-k.current)/m*100,z=C.current+B;$(Math.min(Math.max(z,L),100))},M=()=>{if(!d)return;if(O(!1),v>75){c(e);return}const E=(N+L)/2;v<=E?P("full"):P("half")};if(!w)return null;const D={transform:`translate3d(0, ${v}%, 0)`,transition:S?"none":"transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",willChange:"transform",zIndex:f,maxHeight:"100dvh"};return fe.createPortal(n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button","aria-label":"Close bottom sheet",onClick:()=>{g&&c(e)},className:`fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${i?"opacity-100":"pointer-events-none opacity-0"} ${h}`,style:{zIndex:f}}),n.jsxs("div",{ref:y,style:D,className:`
12
+ `,children:d?d(w,C):w.label},String(w.value))})]})]})}const ie=l.createContext(null);function Ze({children:e}){const[r,o]=l.useState([]),t=l.useCallback(u=>{o(f=>f.includes(u)?f:[...f,u])},[]),a=l.useCallback(u=>{o(f=>f.filter(s=>s!==u))},[]),h=l.useCallback(()=>{o([])},[]),g=l.useMemo(()=>({showBottomSheet:t,closeBottomSheet:a,closeAllBottomSheet:h,activeSheets:r}),[t,a,h,r]);return n.jsx(ie.Provider,{value:g,children:e})}function de(){const e=l.useContext(ie);if(!e)throw new Error("useBottomSheet must be used inside BottomSheetProvider");return e}function Ue({id:e,children:r,initialSnap:o="half",snapPoints:t,className:a="",overlayClassName:h="",closeOnBackdrop:g=!0,lockScroll:u=!0,zIndex:f=1e3}){const{activeSheets:s,closeBottomSheet:c}=de(),i=s.includes(e),d=!!t,[k,b]=l.useState(!1),[v,$]=l.useState(100),[S,O]=l.useState(!1),w=l.useRef(0),C=l.useRef(0),y=l.useRef(null),m=typeof window<"u"?window.innerHeight:0,L=t?(1-t.full)*100:0,N=t?(1-t.half)*100:0,P=l.useCallback(E=>{if(d)switch(E){case"full":$(L);break;case"half":$(N);break;default:$(100)}},[L,N,d]);l.useEffect(()=>{b(!0)},[]),l.useEffect(()=>{if(!i){$(100);return}d?P(o):$(0)},[i,o,P,d]),l.useEffect(()=>{if(u)return i?(document.body.style.overflow="hidden",document.body.style.touchAction="none"):(document.body.style.overflow="",document.body.style.touchAction=""),()=>{document.body.style.overflow="",document.body.style.touchAction=""}},[i,u]),l.useEffect(()=>{if(!i)return;const E=I=>{I.key==="Escape"&&c(e)};return window.addEventListener("keydown",E),()=>{window.removeEventListener("keydown",E)}},[c,e,i]);const j=E=>{var I,B;d&&(O(!0),w.current=E.clientY,C.current=v,(B=(I=E.target).setPointerCapture)==null||B.call(I,E.pointerId))},p=E=>{if(!S||!d)return;const B=(E.clientY-w.current)/m*100,z=C.current+B;$(Math.min(Math.max(z,L),100))},M=()=>{if(!d)return;if(O(!1),v>75){c(e);return}const E=(N+L)/2;v<=E?P("full"):P("half")};if(!k)return null;const D={transform:`translate3d(0, ${v}%, 0)`,transition:S?"none":"transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",willChange:"transform",zIndex:f,maxHeight:"100dvh"};return fe.createPortal(n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button","aria-label":"Close bottom sheet",onClick:()=>{g&&c(e)},className:`fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${i?"opacity-100":"pointer-events-none opacity-0"} ${h}`,style:{zIndex:f}}),n.jsxs("div",{ref:y,style:D,className:`
16
13
  fixed inset-x-0 bottom-0
17
14
  rounded-t-3xl
18
15
  bg-white
@@ -28,16 +25,16 @@
28
25
  flex justify-center py-2.5
29
26
  ${d?"cursor-grab active:cursor-grabbing":""}
30
27
  select-none touch-none bg-gray-50
31
- `,children:n.jsx("div",{className:"h-1 w-14 rounded-full bg-gray-500"})}),n.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r})]})]}),document.body)}function We(e){return Z({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 qe=({items:e,allowMultipleOpen:r=!1,className:o="",tileClasses:t="",open:a,onChange:h,renderTitle:g,renderContent:u,showArrowIcon:f=!0,panelClasses:s=""})=>{const[c,i]=l.useState(new Set),d=l.useMemo(()=>a?new Set(a):c,[a,c]),w=l.useCallback(b=>{const v=new Set(d);v.has(b)?v.delete(b):(r||v.clear(),v.add(b)),a&&h?h(Array.from(v)):i(v)},[d,a,h,r]);return n.jsx("div",{className:"accordion",role:"region","aria-multiselectable":r,children:e.map(b=>{const v=d.has(b.id),$=`accordion-heading-${b.id}`,S=`accordion-panel-${b.id}`;return n.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${o}`,children:[n.jsxs("button",{id:$,type:"button","aria-expanded":v,"aria-controls":S,onClick:()=>w(b.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 ${t}`,children:[g?g(b,v):b.title,f?n.jsx(We,{}):null]}),n.jsx("div",{id:S,role:"region","aria-labelledby":$,hidden:!v,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:u?u(b,v):b.content})]},b.id)})})},ue=l.createContext(null),U=()=>{const e=l.useContext(ue);if(!e)throw new Error("useModalActions must be used within a ModalActionProvider");return e},he=l.createContext(null),W=()=>l.useContext(he);function Ge({id:e,variant:r="center",title:o,children:t,standalone:a=!1,showFloatingClose:h=!1,containerClasses:g="",headerClasses:u="",bodyClasses:f="",onClose:s,disableEscapeClose:c=!1,closeBtnStyle:i}){const d=W(),w=U(),b=!a&&!!d&&!!w,[v,$]=l.useState(!1),S=b?d.isOpen(e):v,O=b?d.getModalData(e):null,k=r==="bottom-sheet",C=l.useCallback(()=>{b?w.closeModal(e):$(!1),s==null||s()},[b,w,e,s]),y=l.useRef(null);return l.useEffect(()=>{if(!S)return;const m=window.scrollY,L={position:document.body.style.position,top:document.body.style.top,width:document.body.style.width};document.body.style.position="fixed",document.body.style.top=`-${m}px`,document.body.style.width="100%";const N=P=>{P.preventDefault()};return document.addEventListener("touchmove",N,{passive:!1}),()=>{document.body.style.position=L.position,document.body.style.top=L.top,document.body.style.width=L.width,document.removeEventListener("touchmove",N),window.scrollTo(0,m)}},[S]),l.useEffect(()=>{S&&(y.current=document.activeElement);const m=document.getElementById(e),L=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],N=()=>{if(!m)return[];const p=m.querySelectorAll(L.join(","));return Array.from(p).filter(M=>M.offsetParent!==null)},P=p=>{if(p.key!=="Tab")return;const M=N();if(!M.length)return;const D=M[0],E=M[M.length-1];p.shiftKey?document.activeElement===D&&(p.preventDefault(),E.focus()):document.activeElement===E&&(p.preventDefault(),D.focus())},j=p=>{p.key==="Escape"&&!c&&C(),P(p)};return S&&(window.addEventListener("keydown",j),setTimeout(()=>{const p=N();p.length&&p[0].focus()},0)),()=>{var p;window.removeEventListener("keydown",j),(p=y.current)==null||p.focus()}},[S,C,c,e]),S?n.jsx("div",{id:e,className:`
28
+ `,children:n.jsx("div",{className:"h-1 w-14 rounded-full bg-gray-500"})}),n.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r})]})]}),document.body)}function We(e){return Z({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 qe=({items:e,allowMultipleOpen:r=!1,className:o="",tileClasses:t="",open:a,onChange:h,renderTitle:g,renderContent:u,showArrowIcon:f=!0,panelClasses:s=""})=>{const[c,i]=l.useState(new Set),d=l.useMemo(()=>a?new Set(a):c,[a,c]),k=l.useCallback(b=>{const v=new Set(d);v.has(b)?v.delete(b):(r||v.clear(),v.add(b)),a&&h?h(Array.from(v)):i(v)},[d,a,h,r]);return n.jsx("div",{className:"accordion",role:"region","aria-multiselectable":r,children:e.map(b=>{const v=d.has(b.id),$=`accordion-heading-${b.id}`,S=`accordion-panel-${b.id}`;return n.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${o}`,children:[n.jsxs("button",{id:$,type:"button","aria-expanded":v,"aria-controls":S,onClick:()=>k(b.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 ${t}`,children:[g?g(b,v):b.title,f?n.jsx(We,{}):null]}),n.jsx("div",{id:S,role:"region","aria-labelledby":$,hidden:!v,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:u?u(b,v):b.content})]},b.id)})})},ue=l.createContext(null),U=()=>{const e=l.useContext(ue);if(!e)throw new Error("useModalActions must be used within a ModalActionProvider");return e},he=l.createContext(null),W=()=>l.useContext(he);function Ge({id:e,variant:r="center",title:o,children:t,standalone:a=!1,showFloatingClose:h=!1,containerClasses:g="",headerClasses:u="",bodyClasses:f="",onClose:s,disableEscapeClose:c=!1,closeBtnStyle:i}){const d=W(),k=U(),b=!a&&!!d&&!!k,[v,$]=l.useState(!1),S=b?d.isOpen(e):v,O=b?d.getModalData(e):null,w=r==="bottom-sheet",C=l.useCallback(()=>{b?k.closeModal(e):$(!1),s==null||s()},[b,k,e,s]),y=l.useRef(null);return l.useEffect(()=>{if(!S)return;const m=window.scrollY,L={position:document.body.style.position,top:document.body.style.top,width:document.body.style.width};document.body.style.position="fixed",document.body.style.top=`-${m}px`,document.body.style.width="100%";const N=P=>{P.preventDefault()};return document.addEventListener("touchmove",N,{passive:!1}),()=>{document.body.style.position=L.position,document.body.style.top=L.top,document.body.style.width=L.width,document.removeEventListener("touchmove",N),window.scrollTo(0,m)}},[S]),l.useEffect(()=>{S&&(y.current=document.activeElement);const m=document.getElementById(e),L=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],N=()=>{if(!m)return[];const p=m.querySelectorAll(L.join(","));return Array.from(p).filter(M=>M.offsetParent!==null)},P=p=>{if(p.key!=="Tab")return;const M=N();if(!M.length)return;const D=M[0],E=M[M.length-1];p.shiftKey?document.activeElement===D&&(p.preventDefault(),E.focus()):document.activeElement===E&&(p.preventDefault(),D.focus())},j=p=>{p.key==="Escape"&&!c&&C(),P(p)};return S&&(window.addEventListener("keydown",j),setTimeout(()=>{const p=N();p.length&&p[0].focus()},0)),()=>{var p;window.removeEventListener("keydown",j),(p=y.current)==null||p.focus()}},[S,C,c,e]),S?n.jsx("div",{id:e,className:`
32
29
  fixed inset-0 z-50
33
30
  bg-black/60 backdrop-blur-[2px]
34
31
  flex
35
- ${k?"items-end justify-center":"items-center justify-center"}
32
+ ${w?"items-end justify-center":"items-center justify-center"}
36
33
  `,children:n.jsxs("div",{className:`
37
34
  bg-white shadow-lg
38
35
  transform transition-all duration-300
39
36
 
40
- ${k?`
37
+ ${w?`
41
38
  w-full
42
39
  rounded-t-3xl
43
40
  max-h-[92dvh]
@@ -63,4 +60,4 @@
63
60
  w-8 aspect-square
64
61
 
65
62
  ${i}
66
- `,children:"✕"})]}),n.jsx("div",{className:f,children:typeof t=="function"?t({modalData:O}):t})]})}):null}function Xe({children:e}){const[r,o]=l.useState({}),[t,a]=l.useState({}),h=l.useCallback((i,d)=>{o(w=>({...w,[i]:!0})),d&&a(w=>({...w,[i]:d}))},[]),g=l.useCallback(i=>{o(d=>({...d,[i]:!1})),a(d=>{const w={...d};return delete w[i],w})},[]),u=l.useCallback(i=>!!r[i],[r]),f=l.useCallback(i=>t[i],[t]),s=l.useMemo(()=>({openModal:h,closeModal:g}),[h,g]),c=l.useMemo(()=>({isOpen:u,getModalData:f}),[u,f]);return n.jsx(ue.Provider,{value:s,children:n.jsx(he.Provider,{value:c,children:e})})}function Je(e){const{openModal:r,closeModal:o}=U(),{isOpen:t,getModalData:a}=W();return{open:h=>r(e,h),close:()=>o(e),isOpen:t(e),data:a(e)}}let q=null,G={};function Qe(e){q=e}function Ve(e){G={...G,...e}}function Re(){return G}function eo(e,r,o=3e3,t){q?q(e,r,o,t):console.warn("Toast system is not mounted")}function oo(e){return Z({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 ro=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)}),to=({containerStyle:e=""})=>{const[r,o]=l.useState([]);l.useEffect(()=>{Qe((a,h,g,u)=>{const f=ro();o(s=>[...s,{id:f,type:a,message:h,config:u}]),setTimeout(()=>{o(s=>s.filter(c=>c.id!==f))},g)})},[]);const t=Re();return n.jsx("div",{className:`fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,children:r.map(a=>{var s,c,i,d,w,b,v,$,S,O,k,C,y,m;const h=((s=a.config)==null?void 0:s.icon)||((c=t.icons)==null?void 0:c[a.type])||lo(a.type),g=((i=a.config)==null?void 0:i.bgColor)||((w=(d=t.colors)==null?void 0:d[a.type])==null?void 0:w.bg)||"bg-white dark:bg-gray-800",u=((b=a.config)==null?void 0:b.textColor)||(($=(v=t.colors)==null?void 0:v[a.type])==null?void 0:$.text)||"text-gray-700 dark:text-gray-300",f=`w-8 h-8 mr-3 text-xl flex items-center justify-center ${(S=a.config)==null?void 0:S.iconContainerClass}`;return n.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${u} ${(O=a.config)==null?void 0:O.containerBody}`,children:[h&&n.jsx("div",{className:f,children:h}),n.jsxs("div",{className:"flex-1",children:[((k=a.config)==null?void 0:k.title)&&n.jsx("div",{className:`font-semibold text-black ${(C=a.config)==null?void 0:C.titleClass}`,children:a.config.title}),((y=a.config)==null?void 0:y.description)&&n.jsx("div",{className:`text-sm text-gray-500 ${(m=a.config)==null?void 0:m.subTitleClass}`,children:a.config.description})]}),n.jsx("button",{onClick:()=>o(L=>L.filter(N=>N.id!==a.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:n.jsx(oo,{size:18})})]},a.id)})})};function lo(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}x.Accordion=qe,x.Badge=Ye,x.BottomSheet=Ue,x.BottomSheetProvider=Ze,x.Button=$e,x.Checkbox=ae,x.Dropdown=Be,x.Input=ee,x.Modal=Ge,x.ModalProvider=Xe,x.Select=oe,x.Toast=to,x.Toggler=He,x.Tooltip=ze,x.setToastDefaults=Ve,x.showToast=eo,x.useBottomSheet=de,x.useModalActions=U,x.useModalInstance=Je,x.useModalState=W,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
63
+ `,children:"✕"})]}),n.jsx("div",{className:f,children:typeof t=="function"?t({modalData:O}):t})]})}):null}function Xe({children:e}){const[r,o]=l.useState({}),[t,a]=l.useState({}),h=l.useCallback((i,d)=>{o(k=>({...k,[i]:!0})),d&&a(k=>({...k,[i]:d}))},[]),g=l.useCallback(i=>{o(d=>({...d,[i]:!1})),a(d=>{const k={...d};return delete k[i],k})},[]),u=l.useCallback(i=>!!r[i],[r]),f=l.useCallback(i=>t[i],[t]),s=l.useMemo(()=>({openModal:h,closeModal:g}),[h,g]),c=l.useMemo(()=>({isOpen:u,getModalData:f}),[u,f]);return n.jsx(ue.Provider,{value:s,children:n.jsx(he.Provider,{value:c,children:e})})}function Je(e){const{openModal:r,closeModal:o}=U(),{isOpen:t,getModalData:a}=W();return{open:h=>r(e,h),close:()=>o(e),isOpen:t(e),data:a(e)}}let q=null,G={};function Qe(e){q=e}function Ve(e){G={...G,...e}}function Re(){return G}function eo(e,r,o=3e3,t){q?q(e,r,o,t):console.warn("Toast system is not mounted")}function oo(e){return Z({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 ro=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)}),to=({containerStyle:e=""})=>{const[r,o]=l.useState([]);l.useEffect(()=>{Qe((a,h,g,u)=>{const f=ro();o(s=>[...s,{id:f,type:a,message:h,config:u}]),setTimeout(()=>{o(s=>s.filter(c=>c.id!==f))},g)})},[]);const t=Re();return n.jsx("div",{className:`fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,children:r.map(a=>{var s,c,i,d,k,b,v,$,S,O,w,C,y,m;const h=((s=a.config)==null?void 0:s.icon)||((c=t.icons)==null?void 0:c[a.type])||lo(a.type),g=((i=a.config)==null?void 0:i.bgColor)||((k=(d=t.colors)==null?void 0:d[a.type])==null?void 0:k.bg)||"bg-white dark:bg-gray-800",u=((b=a.config)==null?void 0:b.textColor)||(($=(v=t.colors)==null?void 0:v[a.type])==null?void 0:$.text)||"text-gray-700 dark:text-gray-300",f=`w-8 h-8 mr-3 text-xl flex items-center justify-center ${(S=a.config)==null?void 0:S.iconContainerClass}`;return n.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${u} ${(O=a.config)==null?void 0:O.containerBody}`,children:[h&&n.jsx("div",{className:f,children:h}),n.jsxs("div",{className:"flex-1",children:[((w=a.config)==null?void 0:w.title)&&n.jsx("div",{className:`font-semibold text-black ${(C=a.config)==null?void 0:C.titleClass}`,children:a.config.title}),((y=a.config)==null?void 0:y.description)&&n.jsx("div",{className:`text-sm text-gray-500 ${(m=a.config)==null?void 0:m.subTitleClass}`,children:a.config.description})]}),n.jsx("button",{onClick:()=>o(L=>L.filter(N=>N.id!==a.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:n.jsx(oo,{size:18})})]},a.id)})})};function lo(e){switch(e){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}x.Accordion=qe,x.Badge=Ye,x.BottomSheet=Ue,x.BottomSheetProvider=Ze,x.Button=$e,x.Checkbox=ae,x.Dropdown=Be,x.Input=ee,x.Modal=Ge,x.ModalProvider=Xe,x.Select=oe,x.Toast=to,x.Toggler=He,x.Tooltip=ze,x.setToastDefaults=Ve,x.showToast=eo,x.useBottomSheet=de,x.useModalActions=U,x.useModalInstance=Je,x.useModalState=W,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.106",
3
+ "version": "1.0.108",
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",