tailwind-ux-kit 1.0.72 → 1.0.74

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.
@@ -21,6 +21,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChan
21
21
  isInvalid?: boolean;
22
22
  feedback?: string;
23
23
  feedbackType?: "valid" | "invalid";
24
+ labelClasses?: string;
24
25
  }
25
26
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
26
27
  export default Input;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as C, jsx as l } from "react/jsx-runtime";
3
- import I, { forwardRef as Y, useState as z, useMemo as P, useId as se, useRef as B, useCallback as j, useEffect as T, createContext as J, useContext as Q } from "react";
3
+ import z, { forwardRef as Y, useState as A, useMemo as P, useId as oe, useRef as F, useCallback as j, useEffect as _, createContext as J, useContext as Q } from "react";
4
4
  const K = {
5
5
  xs: "text-xs px-2 py-1",
6
6
  sm: "text-sm px-3 py-1.5",
@@ -37,13 +37,13 @@ const K = {
37
37
  const {
38
38
  label: r,
39
39
  id: t,
40
- inputSize: s = "md",
40
+ inputSize: o = "md",
41
41
  shape: d = "rounded",
42
42
  validate: u,
43
43
  onValidatedChange: f,
44
44
  className: i = "",
45
45
  icon: a,
46
- iconPosition: o = "left",
46
+ iconPosition: s = "left",
47
47
  floatingLabelStyle: c,
48
48
  onChange: p,
49
49
  isValid: b,
@@ -51,27 +51,28 @@ const K = {
51
51
  feedback: m,
52
52
  iconClasses: k,
53
53
  feedbackType: y = "invalid",
54
- ...N
55
- } = e, [S, v] = z("default"), $ = I.useCallback(
56
- (A) => {
57
- const M = A.target.value, D = (u == null ? void 0 : u(M)) ?? "default";
58
- v(D), f == null || f(A, D), p == null || p(A);
54
+ labelClasses: $ = "",
55
+ ...S
56
+ } = e, [w, E] = A("default"), x = z.useCallback(
57
+ (I) => {
58
+ const D = I.target.value, T = (u == null ? void 0 : u(D)) ?? "default";
59
+ E(T), f == null || f(I, T), p == null || p(I);
59
60
  },
60
61
  [u, f, p]
61
- ), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), w = !!c, E = K[s] || K.md, h = U[d] || U.flat, L = P(
62
- () => ie(S, b, g),
63
- [S, b, g]
64
- ), O = P(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = P(() => a ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [a, o]);
62
+ ), N = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), v = !!c, h = K[o] || K.md, L = U[d] || U.flat, O = P(
63
+ () => ie(w, b, g),
64
+ [w, b, g]
65
+ ), B = P(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), M = P(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]);
65
66
  return /* @__PURE__ */ C(
66
67
  "div",
67
68
  {
68
- className: `w-full relative ${w ? "z-0" : ""} tailwind-ux-input`,
69
+ className: `w-full relative ${v ? "z-0" : ""} tailwind-ux-input`,
69
70
  children: [
70
- !w && r && /* @__PURE__ */ l(
71
+ !v && r && /* @__PURE__ */ l(
71
72
  "label",
72
73
  {
73
- htmlFor: x,
74
- className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"}`,
74
+ htmlFor: N,
75
+ className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${$}`,
75
76
  children: r
76
77
  }
77
78
  ),
@@ -79,7 +80,7 @@ const K = {
79
80
  a && /* @__PURE__ */ l(
80
81
  "div",
81
82
  {
82
- className: `absolute inset-y-0 flex items-center ${O} ${k}`,
83
+ className: `absolute inset-y-0 flex items-center ${B} ${k}`,
83
84
  "aria-hidden": "true",
84
85
  children: a
85
86
  }
@@ -87,21 +88,21 @@ const K = {
87
88
  /* @__PURE__ */ l(
88
89
  "input",
89
90
  {
90
- ...N,
91
- id: x,
91
+ ...S,
92
+ id: N,
92
93
  ref: n,
93
- placeholder: w ? " " : N.placeholder,
94
- onChange: $,
94
+ placeholder: v ? " " : S.placeholder,
95
+ onChange: x,
95
96
  className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
96
- ${E}
97
- ${w && c && ae[c]}
98
- ${_} ${h} ${L} ${i}`
97
+ ${h}
98
+ ${v && c && ae[c]}
99
+ ${M} ${L} ${O} ${i}`
99
100
  }
100
101
  ),
101
- w && r && c && /* @__PURE__ */ l(
102
+ v && r && c && /* @__PURE__ */ l(
102
103
  "label",
103
104
  {
104
- htmlFor: x,
105
+ htmlFor: N,
105
106
  className: `ms-1 ${le[c]} ${i}`,
106
107
  children: r
107
108
  }
@@ -157,13 +158,13 @@ const de = {
157
158
  const {
158
159
  label: r,
159
160
  id: t,
160
- inputSize: s = "md",
161
+ inputSize: o = "md",
161
162
  shape: d = "rounded",
162
163
  validate: u,
163
164
  onValidatedChange: f,
164
165
  className: i = "",
165
166
  icon: a,
166
- iconPosition: o = "left",
167
+ iconPosition: s = "left",
167
168
  floatingLabelStyle: c,
168
169
  onChange: p,
169
170
  isValid: b,
@@ -171,13 +172,13 @@ const de = {
171
172
  feedback: m,
172
173
  feedbackType: k = "invalid",
173
174
  children: y,
174
- ...N
175
- } = e, [S, v] = z("default"), $ = se(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : $), [t, r, $]), w = (M) => {
176
- const D = M.target.value, G = (u == null ? void 0 : u(D)) ?? "default";
177
- v(G), f == null || f(M, G), p == null || p(M);
178
- }, E = !!c, h = de[s], L = ue[d], O = ge(S, b, g);
179
- return /* @__PURE__ */ C("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
180
- !E && r && /* @__PURE__ */ l(
175
+ ...$
176
+ } = e, [S, w] = A("default"), E = oe(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : E), [t, r, E]), N = (I) => {
177
+ const D = I.target.value, T = (u == null ? void 0 : u(D)) ?? "default";
178
+ w(T), f == null || f(I, T), p == null || p(I);
179
+ }, v = !!c, h = de[o], L = ue[d], O = ge(S, b, g);
180
+ return /* @__PURE__ */ C("div", { className: `w-full relative ${v ? "z-0" : ""}`, children: [
181
+ !v && r && /* @__PURE__ */ l(
181
182
  "label",
182
183
  {
183
184
  htmlFor: x,
@@ -189,25 +190,25 @@ const de = {
189
190
  a && /* @__PURE__ */ l(
190
191
  "div",
191
192
  {
192
- className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
193
+ className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
193
194
  children: /* @__PURE__ */ l("span", { className: "text-gray-500", children: a })
194
195
  }
195
196
  ),
196
197
  /* @__PURE__ */ l(
197
198
  "select",
198
199
  {
199
- ...N,
200
+ ...$,
200
201
  id: x,
201
202
  ref: n,
202
- onChange: w,
203
+ onChange: N,
203
204
  className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
204
- ${h} ${a && (o === "start" || o === "left") ? "ps-10" : a ? "pe-10" : ""}
205
- ${E && c && fe[c]}
205
+ ${h} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
206
+ ${v && c && fe[c]}
206
207
  ${L} ${O} ${i}`,
207
208
  children: y
208
209
  }
209
210
  ),
210
- E && r && c && /* @__PURE__ */ l(
211
+ v && r && c && /* @__PURE__ */ l(
211
212
  "label",
212
213
  {
213
214
  htmlFor: x,
@@ -268,22 +269,22 @@ const me = {
268
269
  variant: n = "primary",
269
270
  size: r = "md",
270
271
  type: t = "button",
271
- shape: s = "rounded",
272
+ shape: o = "rounded",
272
273
  className: d = "",
273
274
  isLoading: u = !1,
274
275
  disabled: f = !1,
275
276
  ...i
276
277
  }) => {
277
- const a = f || u, o = [
278
+ const a = f || u, s = [
278
279
  "inline-flex items-center justify-center font-normal transition duration-150",
279
280
  me[n],
280
281
  xe[r],
281
- he[s],
282
- s === "flat" ? "shadow-none" : "shadow-sm",
282
+ he[o],
283
+ o === "flat" ? "shadow-none" : "shadow-sm",
283
284
  a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
284
285
  d
285
286
  ].filter(Boolean).join(" ");
286
- return /* @__PURE__ */ C("button", { type: t, className: o, disabled: a, ...i, children: [
287
+ return /* @__PURE__ */ C("button", { type: t, className: s, disabled: a, ...i, children: [
287
288
  u && /* @__PURE__ */ C(
288
289
  "svg",
289
290
  {
@@ -320,14 +321,14 @@ var V = {
320
321
  className: void 0,
321
322
  style: void 0,
322
323
  attr: void 0
323
- }, q = I.createContext && /* @__PURE__ */ I.createContext(V), ye = ["attr", "size", "title"];
324
+ }, q = z.createContext && /* @__PURE__ */ z.createContext(V), ye = ["attr", "size", "title"];
324
325
  function we(e, n) {
325
326
  if (e == null) return {};
326
- var r = ve(e, n), t, s;
327
+ var r = ve(e, n), t, o;
327
328
  if (Object.getOwnPropertySymbols) {
328
329
  var d = Object.getOwnPropertySymbols(e);
329
- for (s = 0; s < d.length; s++)
330
- t = d[s], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
330
+ for (o = 0; o < d.length; o++)
331
+ t = d[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
331
332
  }
332
333
  return r;
333
334
  }
@@ -341,27 +342,27 @@ function ve(e, n) {
341
342
  }
342
343
  return r;
343
344
  }
344
- function F() {
345
- return F = Object.assign ? Object.assign.bind() : function(e) {
345
+ function R() {
346
+ return R = Object.assign ? Object.assign.bind() : function(e) {
346
347
  for (var n = 1; n < arguments.length; n++) {
347
348
  var r = arguments[n];
348
349
  for (var t in r)
349
350
  Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
350
351
  }
351
352
  return e;
352
- }, F.apply(this, arguments);
353
+ }, R.apply(this, arguments);
353
354
  }
354
355
  function X(e, n) {
355
356
  var r = Object.keys(e);
356
357
  if (Object.getOwnPropertySymbols) {
357
358
  var t = Object.getOwnPropertySymbols(e);
358
- n && (t = t.filter(function(s) {
359
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
359
+ n && (t = t.filter(function(o) {
360
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
360
361
  })), r.push.apply(r, t);
361
362
  }
362
363
  return r;
363
364
  }
364
- function R(e) {
365
+ function H(e) {
365
366
  for (var n = 1; n < arguments.length; n++) {
366
367
  var r = arguments[n] != null ? arguments[n] : {};
367
368
  n % 2 ? X(Object(r), !0).forEach(function(t) {
@@ -390,40 +391,40 @@ function Ne(e, n) {
390
391
  return (n === "string" ? String : Number)(e);
391
392
  }
392
393
  function ee(e) {
393
- return e && e.map((n, r) => /* @__PURE__ */ I.createElement(n.tag, R({
394
+ return e && e.map((n, r) => /* @__PURE__ */ z.createElement(n.tag, H({
394
395
  key: r
395
396
  }, n.attr), ee(n.child)));
396
397
  }
397
- function Z(e) {
398
- return (n) => /* @__PURE__ */ I.createElement(Se, F({
399
- attr: R({}, e.attr)
398
+ function G(e) {
399
+ return (n) => /* @__PURE__ */ z.createElement(Se, R({
400
+ attr: H({}, e.attr)
400
401
  }, n), ee(e.child));
401
402
  }
402
403
  function Se(e) {
403
404
  var n = (r) => {
404
405
  var {
405
406
  attr: t,
406
- size: s,
407
+ size: o,
407
408
  title: d
408
- } = e, u = we(e, ye), f = s || r.size || "1em", i;
409
- return r.className && (i = r.className), e.className && (i = (i ? i + " " : "") + e.className), /* @__PURE__ */ I.createElement("svg", F({
409
+ } = e, u = we(e, ye), f = o || r.size || "1em", i;
410
+ return r.className && (i = r.className), e.className && (i = (i ? i + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", R({
410
411
  stroke: "currentColor",
411
412
  fill: "currentColor",
412
413
  strokeWidth: "0"
413
414
  }, r.attr, t, u, {
414
415
  className: i,
415
- style: R(R({
416
+ style: H(H({
416
417
  color: e.color || r.color
417
418
  }, r.style), e.style),
418
419
  height: f,
419
420
  width: f,
420
421
  xmlns: "http://www.w3.org/2000/svg"
421
- }), d && /* @__PURE__ */ I.createElement("title", null, d), e.children);
422
+ }), d && /* @__PURE__ */ z.createElement("title", null, d), e.children);
422
423
  };
423
- return q !== void 0 ? /* @__PURE__ */ I.createElement(q.Consumer, null, (r) => n(r)) : n(V);
424
+ return q !== void 0 ? /* @__PURE__ */ z.createElement(q.Consumer, null, (r) => n(r)) : n(V);
424
425
  }
425
426
  function $e(e) {
426
- 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);
427
+ return G({ 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);
427
428
  }
428
429
  const Ee = {
429
430
  xs: "w-3 h-3 text-[10px]",
@@ -460,25 +461,25 @@ const Ee = {
460
461
  "soft-info": "soft-info",
461
462
  "soft-dark": "soft-dark",
462
463
  "soft-light": "soft-light"
463
- }, Pe = I.forwardRef(
464
+ }, Pe = z.forwardRef(
464
465
  ({
465
466
  label: e,
466
467
  boxSize: n = "md",
467
468
  shape: r = "rounded",
468
469
  variant: t = "success",
469
- onSelectionChange: s,
470
+ onSelectionChange: o,
470
471
  disabled: d = !1,
471
472
  className: u = "",
472
473
  id: f,
473
474
  value: i,
474
475
  icon: a,
475
- children: o,
476
+ children: s,
476
477
  checked: c,
477
478
  ...p
478
479
  }, b) => {
479
480
  const g = (h) => {
480
- !d && s && s(h.target.checked), p.onChange && p.onChange(h);
481
- }, m = "mr-2 border flex items-center justify-center transition-all", k = Ee[n], y = Le[r], N = Oe[t] ?? "", S = t.startsWith("outline"), v = t.startsWith("soft"), w = `${m} ${k} ${y} ${N} ${c && (S || v || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : c ? "peer-checked:bg-current" : ""}`, E = {
481
+ !d && o && o(h.target.checked), p.onChange && p.onChange(h);
482
+ }, m = "mr-2 border flex items-center justify-center transition-all", k = Ee[n], y = Le[r], $ = Oe[t] ?? "", S = t.startsWith("outline"), w = t.startsWith("soft"), N = `${m} ${k} ${y} ${$} ${c && (S || w || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : c ? "peer-checked:bg-current" : ""}`, v = {
482
483
  xs: "w-2 h-2",
483
484
  sm: "w-2.5 h-2.5",
484
485
  md: "w-3 h-3",
@@ -503,8 +504,8 @@ const Ee = {
503
504
  ...p
504
505
  }
505
506
  ),
506
- /* @__PURE__ */ l("span", { className: w.trim(), children: (c || p.defaultChecked) && (a ?? /* @__PURE__ */ l($e, { className: `${E[n]}` })) }),
507
- e || o ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? o }) : null
507
+ /* @__PURE__ */ l("span", { className: N.trim(), children: (c || p.defaultChecked) && (a ?? /* @__PURE__ */ l($e, { className: `${v[n]}` })) }),
508
+ e || s ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
508
509
  ]
509
510
  }
510
511
  );
@@ -516,52 +517,52 @@ const We = ({
516
517
  header: n,
517
518
  items: r = [],
518
519
  onSelect: t,
519
- renderItem: s,
520
+ renderItem: o,
520
521
  position: d = "right",
521
522
  className: u = "",
522
523
  menuClassName: f = "",
523
524
  width: i = "w-48",
524
525
  closeOnSelect: a = !1,
525
- transition: o = !0,
526
+ transition: s = !0,
526
527
  ariaLabel: c = "Dropdown menu",
527
528
  ...p
528
529
  }) => {
529
- const [b, g] = z(!1), [m, k] = z(!1), y = B(null), N = B(null), S = P(() => ({
530
+ const [b, g] = A(!1), [m, k] = A(!1), y = F(null), $ = F(null), S = P(() => ({
530
531
  left: "left-0",
531
532
  center: "left-1/2 transform -translate-x-1/2",
532
533
  right: "right-0"
533
- })[d], [d]), v = j(() => {
534
- const h = N.current, L = y.current;
534
+ })[d], [d]), w = j(() => {
535
+ const h = $.current, L = y.current;
535
536
  if (!h || !L) return;
536
- const { top: O, bottom: _ } = h.getBoundingClientRect(), A = L.offsetHeight, M = window.innerHeight - _, D = O;
537
- k(M < A && D > A);
538
- }, []), $ = j((h) => {
537
+ const { top: O, bottom: B } = h.getBoundingClientRect(), M = L.offsetHeight, I = window.innerHeight - B, D = O;
538
+ k(I < M && D > M);
539
+ }, []), E = j((h) => {
539
540
  var L, O;
540
- !((L = y.current) != null && L.contains(h.target)) && !((O = N.current) != null && O.contains(h.target)) && g(!1);
541
- }, []), x = j(() => g((h) => !h), []), w = j(() => g(!1), []);
542
- T(() => {
541
+ !((L = y.current) != null && L.contains(h.target)) && !((O = $.current) != null && O.contains(h.target)) && g(!1);
542
+ }, []), x = j(() => g((h) => !h), []), N = j(() => g(!1), []);
543
+ _(() => {
543
544
  if (b)
544
- return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
545
- window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
545
+ return w(), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), () => {
546
+ window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
546
547
  };
547
- }, [b, v]), T(() => (document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $)), [$]);
548
- const E = P(
548
+ }, [b, w]), _(() => (document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E)), [E]);
549
+ const v = P(
549
550
  () => [
550
551
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
551
552
  m ? "bottom-full mb-2" : "top-full mt-2",
552
553
  S,
553
554
  i,
554
- o && "transition-all duration-200 ease-out",
555
+ s && "transition-all duration-200 ease-out",
555
556
  f
556
557
  ].filter(Boolean).join(" "),
557
- [m, S, i, o, f]
558
+ [m, S, i, s, f]
558
559
  );
559
560
  return /* @__PURE__ */ C("div", { className: `relative inline-block ${u}`, ...p, children: [
560
561
  /* @__PURE__ */ l(
561
562
  "button",
562
563
  {
563
564
  type: "button",
564
- ref: N,
565
+ ref: $,
565
566
  onClick: x,
566
567
  "aria-expanded": b,
567
568
  "aria-label": c,
@@ -569,13 +570,13 @@ const We = ({
569
570
  children: e
570
571
  }
571
572
  ),
572
- b && /* @__PURE__ */ C("div", { ref: y, role: "menu", className: E, children: [
573
+ b && /* @__PURE__ */ C("div", { ref: y, role: "menu", className: v, children: [
573
574
  n && n,
574
575
  r.map((h, L) => {
575
576
  const O = () => {
576
- t && t(h), a && w();
577
+ t && t(h), a && N();
577
578
  };
578
- return /* @__PURE__ */ l("div", { children: s ? s(h, O) : /* @__PURE__ */ l(
579
+ return /* @__PURE__ */ l("div", { children: o ? o(h, O) : /* @__PURE__ */ l(
579
580
  "div",
580
581
  {
581
582
  onClick: O,
@@ -592,24 +593,24 @@ const We = ({
592
593
  content: n,
593
594
  position: r = "top",
594
595
  className: t = "",
595
- tooltipClass: s = "",
596
+ tooltipClass: o = "",
596
597
  tooltipStyle: d = {}
597
598
  }) => {
598
- const u = B(null), f = B(null);
599
- T(() => {
600
- const a = u.current, o = f.current;
601
- if (!a || !o) return;
599
+ const u = F(null), f = F(null);
600
+ _(() => {
601
+ const a = u.current, s = f.current;
602
+ if (!a || !s) return;
602
603
  const c = () => {
603
- o.style.opacity = "1", o.style.visibility = "visible";
604
+ s.style.opacity = "1", s.style.visibility = "visible";
604
605
  }, p = () => {
605
- o.style.opacity = "0", o.style.visibility = "hidden";
606
+ s.style.opacity = "0", s.style.visibility = "hidden";
606
607
  };
607
608
  return a.addEventListener("mouseenter", c), a.addEventListener("mouseleave", p), () => {
608
609
  a.removeEventListener("mouseenter", c), a.removeEventListener("mouseleave", p);
609
610
  };
610
611
  }, []);
611
612
  const i = (a) => {
612
- const o = {
613
+ const s = {
613
614
  position: "absolute",
614
615
  opacity: 0,
615
616
  visibility: "hidden",
@@ -629,7 +630,7 @@ const We = ({
629
630
  switch (a) {
630
631
  case "top":
631
632
  return {
632
- ...o,
633
+ ...s,
633
634
  bottom: "100%",
634
635
  left: "50%",
635
636
  transform: "translateX(-50%)",
@@ -637,7 +638,7 @@ const We = ({
637
638
  };
638
639
  case "bottom":
639
640
  return {
640
- ...o,
641
+ ...s,
641
642
  top: "100%",
642
643
  left: "50%",
643
644
  transform: "translateX(-50%)",
@@ -645,7 +646,7 @@ const We = ({
645
646
  };
646
647
  case "left":
647
648
  return {
648
- ...o,
649
+ ...s,
649
650
  right: "100%",
650
651
  top: "50%",
651
652
  transform: "translateY(-50%)",
@@ -653,14 +654,14 @@ const We = ({
653
654
  };
654
655
  case "right":
655
656
  return {
656
- ...o,
657
+ ...s,
657
658
  left: "100%",
658
659
  top: "50%",
659
660
  transform: "translateY(-50%)",
660
661
  marginLeft: "8px"
661
662
  };
662
663
  default:
663
- return o;
664
+ return s;
664
665
  }
665
666
  };
666
667
  return /* @__PURE__ */ C("div", { ref: u, className: `relative inline-block ${t}`, children: [
@@ -670,7 +671,7 @@ const We = ({
670
671
  {
671
672
  ref: f,
672
673
  role: "tooltip",
673
- className: s,
674
+ className: o,
674
675
  style: {
675
676
  ...i(r),
676
677
  ...d
@@ -713,15 +714,15 @@ const We = ({
713
714
  variant: n = "primary",
714
715
  size: r = "sm",
715
716
  shape: t = "rounded",
716
- icon: s,
717
+ icon: o,
717
718
  dismissible: d,
718
719
  onDismiss: u,
719
720
  className: f = "",
720
721
  ...i
721
722
  }) => {
722
- const a = !e && !!s, o = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + f;
723
- return /* @__PURE__ */ C("span", { className: o.trim(), ...i, children: [
724
- s && /* @__PURE__ */ l("span", { className: e ? "mr-1" : "", children: s }),
723
+ const a = !e && !!o, s = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + f;
724
+ return /* @__PURE__ */ C("span", { className: s.trim(), ...i, children: [
725
+ o && /* @__PURE__ */ l("span", { className: e ? "mr-1" : "", children: o }),
725
726
  e,
726
727
  d && /* @__PURE__ */ l(
727
728
  "button",
@@ -735,26 +736,26 @@ const We = ({
735
736
  ] });
736
737
  };
737
738
  function Ae(e) {
738
- 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);
739
+ return G({ 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);
739
740
  }
740
741
  const Ke = ({
741
742
  items: e,
742
743
  allowMultipleOpen: n = !1,
743
744
  className: r = "",
744
745
  tileClasses: t = "",
745
- open: s,
746
+ open: o,
746
747
  onChange: d,
747
748
  renderTitle: u,
748
749
  renderContent: f,
749
750
  showArrowIcon: i = !0,
750
751
  panelClasses: a = ""
751
752
  }) => {
752
- const [o, c] = z(/* @__PURE__ */ new Set()), p = P(() => s ? new Set(s) : o, [s, o]), b = j(
753
+ const [s, c] = A(/* @__PURE__ */ new Set()), p = P(() => o ? new Set(o) : s, [o, s]), b = j(
753
754
  (g) => {
754
755
  const m = new Set(p);
755
- m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), s && d ? d(Array.from(m)) : c(m);
756
+ m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && d ? d(Array.from(m)) : c(m);
756
757
  },
757
- [p, s, d, n]
758
+ [p, o, d, n]
758
759
  );
759
760
  return /* @__PURE__ */ l(
760
761
  "div",
@@ -809,26 +810,22 @@ const Ke = ({
809
810
  "useModalActions must be used within a ModalActionProvider"
810
811
  );
811
812
  return e;
812
- }, ne = J(null), oe = () => Q(ne);
813
+ }, ne = J(null), se = () => Q(ne);
813
814
  function Ue({
814
815
  id: e,
815
816
  title: n,
816
817
  children: r,
817
818
  standalone: t = !1,
818
- showFloatingClose: s = !1,
819
+ showFloatingClose: o = !1,
819
820
  containerClasses: d = "",
820
821
  onClose: u,
821
822
  disableEscapeClose: f = !1
822
823
  }) {
823
- const i = oe(), a = re(), o = !t && !!i && !!a, [c, p] = z(!1), b = o ? i.isOpen(e) : c, g = o ? i.getModalData(e) : null, m = j(() => {
824
- o ? a.closeModal(e) : p(!1), u == null || u();
825
- }, [o, a, e, u]);
826
- return T(() => {
827
- const k = document.activeElement;
828
- console.log(e);
829
- const y = document.getElementById(e);
830
- console.log("modalEl=", y);
831
- const N = [
824
+ const i = se(), a = re(), s = !t && !!i && !!a, [c, p] = A(!1), b = s ? i.isOpen(e) : c, g = s ? i.getModalData(e) : null, m = j(() => {
825
+ s ? a.closeModal(e) : p(!1), u == null || u();
826
+ }, [s, a, e, u]);
827
+ return _(() => {
828
+ const k = document.activeElement, y = document.getElementById(e), $ = [
832
829
  "a[href]",
833
830
  "button:not([disabled])",
834
831
  "textarea:not([disabled])",
@@ -838,24 +835,24 @@ function Ue({
838
835
  ], S = () => {
839
836
  if (!y) return [];
840
837
  const x = y.querySelectorAll(
841
- N.join(",")
838
+ $.join(",")
842
839
  );
843
- return Array.from(x).filter((w) => w.offsetParent !== null);
844
- }, v = (x) => {
840
+ return Array.from(x).filter((N) => N.offsetParent !== null);
841
+ }, w = (x) => {
845
842
  if (x.key === "Tab") {
846
- const w = S();
847
- if (w.length === 0) return;
848
- const E = w[0], h = w[w.length - 1];
849
- x.shiftKey ? document.activeElement === E && (x.preventDefault(), h.focus()) : document.activeElement === h && (x.preventDefault(), E.focus());
843
+ const N = S();
844
+ if (N.length === 0) return;
845
+ const v = N[0], h = N[N.length - 1];
846
+ x.shiftKey ? document.activeElement === v && (x.preventDefault(), h.focus()) : document.activeElement === h && (x.preventDefault(), v.focus());
850
847
  }
851
- }, $ = (x) => {
852
- x.key === "Escape" && !f && m(), v(x);
848
+ }, E = (x) => {
849
+ x.key === "Escape" && !f && m(), w(x);
853
850
  };
854
851
  return b && (document.body.style.overflow = "hidden", setTimeout(() => {
855
852
  const x = S();
856
853
  x.length && x[0].focus();
857
- }, 0), window.addEventListener("keydown", $)), () => {
858
- document.body.style.overflow = "", k && k.focus(), window.removeEventListener("keydown", $);
854
+ }, 0), window.addEventListener("keydown", E)), () => {
855
+ document.body.style.overflow = "", k && k.focus(), window.removeEventListener("keydown", E);
859
856
  };
860
857
  }, [b, f, m, e]), b ? /* @__PURE__ */ l(
861
858
  "div",
@@ -869,17 +866,17 @@ function Ue({
869
866
  children: [
870
867
  /* @__PURE__ */ C("div", { className: "flex justify-between items-center relative", children: [
871
868
  n && /* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: n }),
872
- s && /* @__PURE__ */ l(
869
+ o && /* @__PURE__ */ l(
873
870
  "button",
874
871
  {
875
872
  onClick: m,
876
- className: "text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8",
873
+ className: "text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8",
877
874
  "aria-label": "Close modal",
878
875
  children: "✕"
879
876
  }
880
877
  )
881
878
  ] }),
882
- /* @__PURE__ */ l("div", { className: "mt-3 text-sm text-gray-700", children: typeof r == "function" ? r({ modalData: g }) : r })
879
+ /* @__PURE__ */ l("div", { children: typeof r == "function" ? r({ modalData: g }) : r })
883
880
  ]
884
881
  }
885
882
  )
@@ -889,10 +886,10 @@ function Ue({
889
886
  function qe({
890
887
  children: e
891
888
  }) {
892
- const [n, r] = z({}), [t, s] = z({}), d = j((c, p) => {
893
- r((b) => ({ ...b, [c]: !0 })), p && s((b) => ({ ...b, [c]: p }));
889
+ const [n, r] = A({}), [t, o] = A({}), d = j((c, p) => {
890
+ r((b) => ({ ...b, [c]: !0 })), p && o((b) => ({ ...b, [c]: p }));
894
891
  }, []), u = j((c) => {
895
- r((p) => ({ ...p, [c]: !1 })), s((p) => {
892
+ r((p) => ({ ...p, [c]: !1 })), o((p) => {
896
893
  const b = { ...p };
897
894
  return delete b[c], b;
898
895
  });
@@ -902,69 +899,69 @@ function qe({
902
899
  ), a = P(
903
900
  () => ({ openModal: d, closeModal: u }),
904
901
  [d, u]
905
- ), o = P(
902
+ ), s = P(
906
903
  () => ({ isOpen: f, getModalData: i }),
907
904
  [f, i]
908
905
  );
909
- return /* @__PURE__ */ l(te.Provider, { value: a, children: /* @__PURE__ */ l(ne.Provider, { value: o, children: e }) });
906
+ return /* @__PURE__ */ l(te.Provider, { value: a, children: /* @__PURE__ */ l(ne.Provider, { value: s, children: e }) });
910
907
  }
911
908
  function Xe(e) {
912
- const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: s } = oe();
909
+ const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: o } = se();
913
910
  return {
914
911
  open: (d) => n(e, d),
915
912
  close: () => r(e),
916
913
  isOpen: t(e),
917
- data: s(e)
914
+ data: o(e)
918
915
  };
919
916
  }
920
- let H = null, W = {};
917
+ let W = null, Z = {};
921
918
  function Me(e) {
922
- H = e;
919
+ W = e;
923
920
  }
924
921
  function Ye(e) {
925
- W = { ...W, ...e };
922
+ Z = { ...Z, ...e };
926
923
  }
927
924
  function De() {
928
- return W;
925
+ return Z;
929
926
  }
930
927
  function Je(e, n, r = 3e3, t) {
931
- H ? H(e, n, r, t) : console.warn("Toast system is not mounted");
928
+ W ? W(e, n, r, t) : console.warn("Toast system is not mounted");
932
929
  }
933
930
  function Te(e) {
934
- 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);
931
+ return G({ 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);
935
932
  }
936
933
  const _e = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
937
934
  const n = Math.random() * 16 | 0;
938
935
  return (e === "x" ? n : n & 3 | 8).toString(16);
939
936
  }), Qe = () => {
940
- const [e, n] = z([]);
941
- T(() => {
942
- Me((t, s, d, u) => {
937
+ const [e, n] = A([]);
938
+ _(() => {
939
+ Me((t, o, d, u) => {
943
940
  const f = _e();
944
- n((i) => [...i, { id: f, type: t, message: s, config: u }]), setTimeout(() => {
941
+ n((i) => [...i, { id: f, type: t, message: o, config: u }]), setTimeout(() => {
945
942
  n((i) => i.filter((a) => a.id !== f));
946
943
  }, d);
947
944
  });
948
945
  }, []);
949
946
  const r = De();
950
947
  return /* @__PURE__ */ l("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
951
- var i, a, o, c, p, b, g, m, k, y, N, S, v;
952
- const s = ((i = t.config) == null ? void 0 : i.icon) || ((a = r.icons) == null ? void 0 : a[t.type]) || Be(t.type), d = ((o = t.config) == null ? void 0 : o.bgColor) || ((p = (c = r.colors) == null ? void 0 : c[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", u = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", f = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
948
+ var i, a, s, c, p, b, g, m, k, y, $, S, w;
949
+ const o = ((i = t.config) == null ? void 0 : i.icon) || ((a = r.icons) == null ? void 0 : a[t.type]) || Be(t.type), d = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (c = r.colors) == null ? void 0 : c[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", u = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", f = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
953
950
  return /* @__PURE__ */ C(
954
951
  "div",
955
952
  {
956
953
  className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${u}`,
957
954
  children: [
958
- /* @__PURE__ */ l("div", { className: f, children: s }),
955
+ /* @__PURE__ */ l("div", { className: f, children: o }),
959
956
  /* @__PURE__ */ C("div", { className: "flex-1 me-3", children: [
960
957
  ((y = t.config) == null ? void 0 : y.title) && /* @__PURE__ */ l("div", { className: "font-semibold text-black", children: t.config.title }),
961
- ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ l("div", { className: "text-sm text-gray-500", children: t.config.description }),
962
- !((S = t.config) != null && S.title) && !((v = t.config) != null && v.description) && /* @__PURE__ */ l("div", { className: "text-sm", children: t.message })
958
+ (($ = t.config) == null ? void 0 : $.description) && /* @__PURE__ */ l("div", { className: "text-sm text-gray-500", children: t.config.description }),
959
+ !((S = t.config) != null && S.title) && !((w = t.config) != null && w.description) && /* @__PURE__ */ l("div", { className: "text-sm", children: t.message })
963
960
  ] }),
964
961
  /* @__PURE__ */ l(
965
962
  "button",
966
963
  {
967
- onClick: () => n(($) => $.filter((x) => x.id !== t.id)),
964
+ onClick: () => n((E) => E.filter((x) => x.id !== t.id)),
968
965
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
969
966
  "aria-label": "Close",
970
967
  children: /* @__PURE__ */ l(Te, { size: 18 })
@@ -1004,5 +1001,5 @@ export {
1004
1001
  Je as showToast,
1005
1002
  re as useModalActions,
1006
1003
  Xe as useModalInstance,
1007
- oe as useModalState
1004
+ se as useModalState
1008
1005
  };
@@ -1,8 +1,8 @@
1
- (function(w,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(w=typeof globalThis<"u"?globalThis:w||self,l(w.TailwindUiKit={},w.jsxRuntime,w.React))})(this,function(w,l,n){"use strict";"use client";var W=document.createElement("style");W.textContent=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.btn-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.btn-outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.btn-outline-success:hover{background-color:var(--color-green-50,oklch(98.2% .018 155.826))}}.btn-soft-success{background-color:var(--color-green-100,oklch(96.2% .044 156.743));color:var(--color-green-700,oklch(52.7% .154 150.069))}@media (hover:hover){.btn-soft-success:hover{background-color:var(--color-green-200,oklch(92.5% .084 155.995))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-white,#fff)}@media (hover:hover){.btn-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.btn-outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.btn-outline-warning:hover{background-color:var(--color-yellow-50,oklch(98.7% .026 102.212))}}.btn-soft-warning{background-color:var(--color-yellow-100,oklch(97.3% .071 103.193));color:var(--color-yellow-700,oklch(55.4% .135 66.442))}@media (hover:hover){.btn-soft-warning:hover{background-color:var(--color-yellow-200,oklch(94.5% .129 101.54))}}.btn-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.btn-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.btn-outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.btn-outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.btn-soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.btn-soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.btn-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-white,#fff)}@media (hover:hover){.btn-dark:hover{background-color:var(--color-black,#000)}}.btn-outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-soft-dark{background-color:var(--color-gray-200,oklch(92.8% .006 264.531));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.btn-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.btn-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}.primary:is(:where(.peer):checked~*):hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.outline-primary:is(:where(.peer):checked~*){color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.outline-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.soft-primary{border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-200,oklch(88.2% .059 254.128));color:var(--color-blue-600,oklch(54.6% .245 262.881))}.soft-primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.soft-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}.success:is(:where(.peer):checked~*):hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.outline-success:is(:where(.peer):checked~*){color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.outline-success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}}.soft-success{border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-200,oklch(92.5% .084 155.995));color:var(--color-green-600,oklch(62.7% .194 149.214))}.soft-success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.soft-success:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}.danger:is(:where(.peer):checked~*):hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.outline-danger:is(:where(.peer):checked~*){color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.outline-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.soft-danger{border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-200,oklch(88.5% .062 18.334));color:var(--color-red-600,oklch(57.7% .245 27.325))}.soft-danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.soft-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-white,#fff)}@media (hover:hover){.warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}.warning:is(:where(.peer):checked~*):hover{background-color:var(--color-yellow-700,oklch(55.4% .135 66.442))}}.outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.outline-warning:is(:where(.peer):checked~*){color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.outline-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.soft-warning{border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-200,oklch(94.5% .129 101.54));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}.soft-warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.soft-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-700,oklch(37.3% .034 259.733));background-color:var(--color-white,#fff)}.dark:is(:where(.peer):checked~*){border-color:var(--color-black,#000);background-color:var(--color-black,#000);color:var(--color-white,#fff)}@media (hover:hover){.dark:hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark:hover{background-color:color-mix(in oklab,var(--color-black,#000)50%,transparent)}}}.outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));background-color:var(--color-white,#fff)}.outline-dark:is(:where(.peer):checked~*){color:var(--color-black,#000)}@media (hover:hover){.outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.soft-dark{border-color:var(--color-gray-600,oklch(44.6% .03 256.802));background-color:var(--color-gray-500,oklch(55.1% .027 264.364));color:var(--color-black,#000)}.soft-dark:is(:where(.peer):checked~*){border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-black,#000)}@media (hover:hover){.soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
2
- /*$vite$:1*/`,document.head.appendChild(W);const Z={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"},G={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},er={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},tr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},q=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:S,feedbackType:m="invalid",...N}=r,[$,C]=n.useState("default"),E=n.useCallback(j=>{const P=j.target.value,I=(u==null?void 0:u(P))??"default";C(I),b==null||b(j,I),f==null||f(j)},[u,b,f]),y=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),x=!!d,L=Z[c]||Z.md,k=G[h]||G.flat,O=n.useMemo(()=>tr($,v,g),[$,v,g]),M=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),z=n.useMemo(()=>s?a==="start"||a==="left"?"ps-10":"pe-10":"",[s,a]);return l.jsxs("div",{className:`w-full relative ${x?"z-0":""} tailwind-ux-input`,children:[!x&&e&&l.jsx("label",{htmlFor:y,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${M} ${S}`,"aria-hidden":"true",children:s}),l.jsx("input",{...N,id:y,ref:t,placeholder:x?" ":N.placeholder,onChange:E,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
- ${L}
4
- ${x&&d&&or[d]}
5
- ${z} ${k} ${O} ${i}`}),x&&e&&d&&l.jsx("label",{htmlFor:y,className:`ms-1 ${er[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:m==="invalid"?"alert":void 0,children:p})]})});q.displayName="Input";const lr={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},cr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},sr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},K=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:S="invalid",children:m,...N}=r,[$,C]=n.useState("default"),E=n.useId(),y=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:E),[o,e,E]),x=P=>{const I=P.target.value,rr=(u==null?void 0:u(I))??"default";C(rr),b==null||b(P,rr),f==null||f(P)},L=!!d,k=lr[c],O=nr[h],M=sr($,v,g),z=s&&(a==="start"||a==="left")?"ps-10":s?"pe-10":"",j=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${L?"z-0":""}`,children:[!L&&e&&l.jsx("label",{htmlFor:y,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${j}`,children:l.jsx("span",{className:"text-gray-500",children:s})}),l.jsx("select",{...N,id:y,ref:t,onChange:x,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
6
- ${k} ${z}
7
- ${L&&d&&ar[d]}
8
- ${O} ${M} ${i}`,children:m}),L&&e&&d&&l.jsx("label",{htmlFor:y,className:`ms-1 ${cr[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});K.displayName="Select";const ir={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},dr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:h="",isLoading:u=!1,disabled:b=!1,...i})=>{const s=b||u,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:s,...i,children:[u&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var U={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},X=n.createContext&&n.createContext(U),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(c=0;c<h.length;c++)o=h[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function T(){return T=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},T.apply(this,arguments)}function Y(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function A(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Y(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Y(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function J(r){return r&&r.map((t,e)=>n.createElement(t.tag,A({key:e},t.attr),J(t.child)))}function D(r){return t=>n.createElement(wr,T({attr:A({},r.attr)},t),J(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:h}=r,u=fr(r,br),b=c||e.size||"1em",i;return e.className&&(i=e.className),r.className&&(i=(i?i+" ":"")+r.className),n.createElement("svg",T({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,u,{className:i,style:A(A({color:r.color||e.color},e.style),r.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),h&&n.createElement("title",null,h),r.children)};return X!==void 0?n.createElement(X.Consumer,null,e=>t(e)):t(U)}function kr(r){return D({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(r)}const mr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},Q=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:h=!1,className:u="",id:b,value:i,icon:s,children:a,checked:d,...f},v)=>{const g=k=>{!h&&c&&c(k.target.checked),f.onChange&&f.onChange(k)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],m=xr[e],N=Cr[o]??"",$=o.startsWith("outline"),C=o.startsWith("soft"),x=`${p} ${S} ${m} ${N} ${d&&($||C||o==="link")?"peer-checked:bg-current peer-checked:text-white":d?"peer-checked:bg-current":""}`,L={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${u}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:d,onChange:g,disabled:h,id:b,value:i,ref:v,...f}),l.jsx("span",{className:x.trim(),children:(d||f.defaultChecked)&&(s??l.jsx(kr,{className:`${L[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});Q.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:h="right",className:u="",menuClassName:b="",width:i="w-48",closeOnSelect:s=!1,transition:a=!0,ariaLabel:d="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),m=n.useRef(null),N=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),C=n.useCallback(()=>{const k=N.current,O=m.current;if(!k||!O)return;const{top:M,bottom:z}=k.getBoundingClientRect(),j=O.offsetHeight,P=window.innerHeight-z,I=M;S(P<j&&I>j)},[]),E=n.useCallback(k=>{var O,M;!((O=m.current)!=null&&O.contains(k.target))&&!((M=N.current)!=null&&M.contains(k.target))&&g(!1)},[]),y=n.useCallback(()=>g(k=>!k),[]),x=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[v,C]),n.useEffect(()=>(document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)),[E]);const L=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",$,i,a&&"transition-all duration-200 ease-out",b].filter(Boolean).join(" "),[p,$,i,a,b]);return l.jsxs("div",{className:`relative inline-block ${u}`,...f,children:[l.jsx("button",{type:"button",ref:N,onClick:y,"aria-expanded":v,"aria-label":d,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:m,role:"menu",className:L,children:[t&&t,e.map((k,O)=>{const M=()=>{o&&o(k),s&&x()};return l.jsx("div",{children:c?c(k,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:k.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:h={}})=>{const u=n.useRef(null),b=n.useRef(null);n.useEffect(()=>{const s=u.current,a=b.current;if(!s||!a)return;const d=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return s.addEventListener("mouseenter",d),s.addEventListener("mouseleave",f),()=>{s.removeEventListener("mouseenter",d),s.removeEventListener("mouseleave",f)}},[]);const i=s=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:u,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:b,role:"tooltip",className:c,style:{...i(e),...h},children:t})]})},$r={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Er={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:h,onDismiss:u,className:b="",...i})=>{const s=!r&&!!c,a=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${s?"justify-center p-2 w-8 h-8":""} `+b;return l.jsxs("span",{className:a.trim(),...i,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,h&&l.jsx("button",{type:"button",onClick:u,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return D({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(r)}const jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:h,renderTitle:u,renderContent:b,showArrowIcon:i=!0,panelClasses:s=""})=>{const[a,d]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&h?h(Array.from(p)):d(p)},[f,c,h,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,m=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":p,"aria-controls":m,onClick:()=>v(g.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${o}`,children:[u?u(g,p):g.title,i?l.jsx(Mr,{}):null]}),l.jsx("div",{id:m,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:b?b(g,p):g.content})]},g.id)})})},V=n.createContext(null),_=()=>{const r=n.useContext(V);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},R=n.createContext(null),B=()=>n.useContext(R);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:h="",onClose:u,disableEscapeClose:b=!1}){const i=B(),s=_(),a=!o&&!!i&&!!s,[d,f]=n.useState(!1),v=a?i.isOpen(r):d,g=a?i.getModalData(r):null,p=n.useCallback(()=>{a?s.closeModal(r):f(!1),u==null||u()},[a,s,r,u]);return n.useEffect(()=>{const S=document.activeElement;console.log(r);const m=document.getElementById(r);console.log("modalEl=",m);const N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!m)return[];const y=m.querySelectorAll(N.join(","));return Array.from(y).filter(x=>x.offsetParent!==null)},C=y=>{if(y.key==="Tab"){const x=$();if(x.length===0)return;const L=x[0],k=x[x.length-1];y.shiftKey?document.activeElement===L&&(y.preventDefault(),k.focus()):document.activeElement===k&&(y.preventDefault(),L.focus())}},E=y=>{y.key==="Escape"&&!b&&p(),C(y)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const y=$();y.length&&y[0].focus()},0),window.addEventListener("keydown",E)),()=>{document.body.style.overflow="",S&&S.focus(),window.removeEventListener("keydown",E)}},[v,b,p,r]),v?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${h}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:p,className:"text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof e=="function"?e({modalData:g}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),h=n.useCallback((d,f)=>{e(v=>({...v,[d]:!0})),f&&c(v=>({...v,[d]:f}))},[]),u=n.useCallback(d=>{e(f=>({...f,[d]:!1})),c(f=>{const v={...f};return delete v[d],v})},[]),b=n.useCallback(d=>!!t[d],[t]),i=n.useCallback(d=>o[d],[o]),s=n.useMemo(()=>({openModal:h,closeModal:u}),[h,u]),a=n.useMemo(()=>({isOpen:b,getModalData:i}),[b,i]);return l.jsx(V.Provider,{value:s,children:l.jsx(R.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=_(),{isOpen:o,getModalData:c}=B();return{open:h=>t(r,h),close:()=>e(r),isOpen:o(r),data:c(r)}}let F=null,H={};function Tr(r){F=r}function Ar(r){H={...H,...r}}function Dr(){return H}function _r(r,t,e=3e3,o){F?F(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return D({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(r)}const Fr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,h,u)=>{const b=Fr();t(i=>[...i,{id:b,type:o,message:c,config:u}]),setTimeout(()=>{t(i=>i.filter(s=>s.id!==b))},h)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var i,s,a,d,f,v,g,p,S,m,N,$,C;const c=((i=o.config)==null?void 0:i.icon)||((s=e.icons)==null?void 0:s[o.type])||Wr(o.type),h=((a=o.config)==null?void 0:a.bgColor)||((f=(d=e.colors)==null?void 0:d[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",u=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",b=((S=o.config)==null?void 0:S.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${h} ${u}`,children:[l.jsx("div",{className:b,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((m=o.config)==null?void 0:m.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((N=o.config)==null?void 0:N.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!(($=o.config)!=null&&$.title)&&!((C=o.config)!=null&&C.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(E=>E.filter(y=>y.id!==o.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}w.Accordion=jr,w.Badge=Or,w.Button=ur,w.Checkbox=Q,w.Dropdown=Sr,w.Input=q,w.Modal=Pr,w.ModalProvider=Ir,w.Select=K,w.Toast=Hr,w.Tooltip=Nr,w.setToastDefaults=Ar,w.showToast=_r,w.useModalActions=_,w.useModalInstance=zr,w.useModalState=B,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
1
+ (function(y,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(y=typeof globalThis<"u"?globalThis:y||self,l(y.TailwindUiKit={},y.jsxRuntime,y.React))})(this,function(y,l,n){"use strict";"use client";var Z=document.createElement("style");Z.textContent=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.btn-primary{background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.btn-primary:hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.btn-outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.btn-outline-primary:hover{background-color:var(--color-blue-50,oklch(97% .014 254.604))}}.btn-soft-primary{background-color:var(--color-blue-100,oklch(93.2% .032 255.585));color:var(--color-blue-700,oklch(48.8% .243 264.376))}@media (hover:hover){.btn-soft-primary:hover{background-color:var(--color-blue-200,oklch(88.2% .059 254.128))}}.btn-secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.btn-secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.btn-outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-success{background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.btn-success:hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.btn-outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.btn-outline-success:hover{background-color:var(--color-green-50,oklch(98.2% .018 155.826))}}.btn-soft-success{background-color:var(--color-green-100,oklch(96.2% .044 156.743));color:var(--color-green-700,oklch(52.7% .154 150.069))}@media (hover:hover){.btn-soft-success:hover{background-color:var(--color-green-200,oklch(92.5% .084 155.995))}}.btn-danger{background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.btn-danger:hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.btn-outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.btn-outline-danger:hover{background-color:var(--color-red-50,oklch(97.1% .013 17.38))}}.btn-soft-danger{background-color:var(--color-red-100,oklch(93.6% .032 17.717));color:var(--color-red-700,oklch(50.5% .213 27.518))}@media (hover:hover){.btn-soft-danger:hover{background-color:var(--color-red-200,oklch(88.5% .062 18.334))}}.btn-warning{background-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-white,#fff)}@media (hover:hover){.btn-warning:hover{background-color:var(--color-yellow-600,oklch(68.1% .162 75.834))}}.btn-outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-500,oklch(79.5% .184 86.047));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.btn-outline-warning:hover{background-color:var(--color-yellow-50,oklch(98.7% .026 102.212))}}.btn-soft-warning{background-color:var(--color-yellow-100,oklch(97.3% .071 103.193));color:var(--color-yellow-700,oklch(55.4% .135 66.442))}@media (hover:hover){.btn-soft-warning:hover{background-color:var(--color-yellow-200,oklch(94.5% .129 101.54))}}.btn-info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.btn-info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.btn-outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.btn-outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.btn-soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.btn-soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.btn-dark{background-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-white,#fff)}@media (hover:hover){.btn-dark:hover{background-color:var(--color-black,#000)}}.btn-outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-soft-dark{background-color:var(--color-gray-200,oklch(92.8% .006 264.531));color:var(--color-gray-900,oklch(21% .034 264.665))}@media (hover:hover){.btn-soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.btn-light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.btn-light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.btn-outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.btn-outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.btn-soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.btn-soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.btn-link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.btn-link:hover{text-decoration-line:underline}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-white,#fff)}@media (hover:hover){.primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}.primary:is(:where(.peer):checked~*):hover{background-color:var(--color-blue-700,oklch(48.8% .243 264.376))}}.outline-primary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-white,#fff)}.outline-primary:is(:where(.peer):checked~*){color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.outline-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.soft-primary{border-color:var(--color-blue-600,oklch(54.6% .245 262.881));background-color:var(--color-blue-200,oklch(88.2% .059 254.128));color:var(--color-blue-600,oklch(54.6% .245 262.881))}.soft-primary:is(:where(.peer):checked~*){border-color:var(--color-blue-600,oklch(54.6% .245 262.881));color:var(--color-blue-600,oklch(54.6% .245 262.881))}@media (hover:hover){.soft-primary:hover{background-color:var(--color-blue-300,oklch(80.9% .105 251.813))}}.secondary{background-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-white,#fff)}@media (hover:hover){.secondary:hover{background-color:var(--color-gray-700,oklch(37.3% .034 259.733))}}.outline-secondary{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-600,oklch(44.6% .03 256.802));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-secondary:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-secondary{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-secondary:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-white,#fff)}@media (hover:hover){.success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}.success:is(:where(.peer):checked~*):hover{background-color:var(--color-green-700,oklch(52.7% .154 150.069))}}.outline-success{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-white,#fff)}.outline-success:is(:where(.peer):checked~*){color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.outline-success:hover{background-color:var(--color-green-300,oklch(87.1% .15 154.449))}}.soft-success{border-color:var(--color-green-600,oklch(62.7% .194 149.214));background-color:var(--color-green-200,oklch(92.5% .084 155.995));color:var(--color-green-600,oklch(62.7% .194 149.214))}.soft-success:is(:where(.peer):checked~*){border-color:var(--color-green-600,oklch(62.7% .194 149.214));color:var(--color-green-600,oklch(62.7% .194 149.214))}@media (hover:hover){.soft-success:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-white,#fff)}@media (hover:hover){.danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}.danger:is(:where(.peer):checked~*):hover{background-color:var(--color-red-700,oklch(50.5% .213 27.518))}}.outline-danger{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-white,#fff)}.outline-danger:is(:where(.peer):checked~*){color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.outline-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.soft-danger{border-color:var(--color-red-600,oklch(57.7% .245 27.325));background-color:var(--color-red-200,oklch(88.5% .062 18.334));color:var(--color-red-600,oklch(57.7% .245 27.325))}.soft-danger:is(:where(.peer):checked~*){border-color:var(--color-red-600,oklch(57.7% .245 27.325));color:var(--color-red-600,oklch(57.7% .245 27.325))}@media (hover:hover){.soft-danger:hover{background-color:var(--color-red-300,oklch(80.8% .114 19.571))}}.warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-white,#fff)}@media (hover:hover){.warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}.warning:is(:where(.peer):checked~*):hover{background-color:var(--color-yellow-700,oklch(55.4% .135 66.442))}}.outline-warning{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-white,#fff)}.outline-warning:is(:where(.peer):checked~*){color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.outline-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.soft-warning{border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));background-color:var(--color-yellow-200,oklch(94.5% .129 101.54));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}.soft-warning:is(:where(.peer):checked~*){border-color:var(--color-yellow-600,oklch(68.1% .162 75.834));color:var(--color-yellow-600,oklch(68.1% .162 75.834))}@media (hover:hover){.soft-warning:hover{background-color:var(--color-yellow-300,oklch(90.5% .182 98.111))}}.info{background-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-white,#fff)}@media (hover:hover){.info:hover{background-color:var(--color-cyan-700,oklch(52% .105 223.128))}}.outline-info{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-cyan-600,oklch(60.9% .126 221.723));color:var(--color-cyan-600,oklch(60.9% .126 221.723))}@media (hover:hover){.outline-info:hover{background-color:var(--color-cyan-50,oklch(98.4% .019 200.873))}}.soft-info{background-color:var(--color-cyan-100,oklch(95.6% .045 203.388));color:var(--color-cyan-700,oklch(52% .105 223.128))}@media (hover:hover){.soft-info:hover{background-color:var(--color-cyan-200,oklch(91.7% .08 205.041))}}.dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-700,oklch(37.3% .034 259.733));background-color:var(--color-white,#fff)}.dark:is(:where(.peer):checked~*){border-color:var(--color-black,#000);background-color:var(--color-black,#000);color:var(--color-white,#fff)}@media (hover:hover){.dark:hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark:hover{background-color:color-mix(in oklab,var(--color-black,#000)50%,transparent)}}}.outline-dark{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-900,oklch(21% .034 264.665));background-color:var(--color-white,#fff)}.outline-dark:is(:where(.peer):checked~*){color:var(--color-black,#000)}@media (hover:hover){.outline-dark:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.soft-dark{border-color:var(--color-gray-600,oklch(44.6% .03 256.802));background-color:var(--color-gray-500,oklch(55.1% .027 264.364));color:var(--color-black,#000)}.soft-dark:is(:where(.peer):checked~*){border-color:var(--color-gray-900,oklch(21% .034 264.665));color:var(--color-black,#000)}@media (hover:hover){.soft-dark:hover{background-color:var(--color-gray-300,oklch(87.2% .01 258.338))}}.light{background-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-800,oklch(27.8% .033 256.848))}@media (hover:hover){.light:hover{background-color:var(--color-gray-200,oklch(92.8% .006 264.531))}}.outline-light{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-100,oklch(96.7% .003 264.542));color:var(--color-gray-600,oklch(44.6% .03 256.802))}@media (hover:hover){.outline-light:hover{background-color:var(--color-gray-50,oklch(98.5% .002 247.839))}}.soft-light{background-color:var(--color-gray-50,oklch(98.5% .002 247.839));color:var(--color-gray-700,oklch(37.3% .034 259.733))}@media (hover:hover){.soft-light:hover{background-color:var(--color-gray-100,oklch(96.7% .003 264.542))}}.link{padding:calc(var(--spacing,.25rem)*0);color:var(--color-blue-600,oklch(54.6% .245 262.881));--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000}@media (hover:hover){.link:hover{text-decoration-line:underline}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
2
+ /*$vite$:1*/`,document.head.appendChild(Z);const G={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},q={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},er={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},tr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},K=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:S,feedbackType:m="invalid",labelClasses:E="",...$}=r,[x,L]=n.useState("default"),w=n.useCallback(j=>{const z=j.target.value,T=(u==null?void 0:u(z))??"default";L(T),b==null||b(j,T),f==null||f(j)},[u,b,f]),N=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),C=!!d,k=G[c]||G.md,O=q[h]||q.flat,M=n.useMemo(()=>tr(x,v,g),[x,v,g]),I=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),P=n.useMemo(()=>s?a==="start"||a==="left"?"ps-10":"pe-10":"",[s,a]);return l.jsxs("div",{className:`w-full relative ${C?"z-0":""} tailwind-ux-input`,children:[!C&&e&&l.jsx("label",{htmlFor:N,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"} ${E}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I} ${S}`,"aria-hidden":"true",children:s}),l.jsx("input",{...$,id:N,ref:t,placeholder:C?" ":$.placeholder,onChange:w,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
3
+ ${k}
4
+ ${C&&d&&or[d]}
5
+ ${P} ${O} ${M} ${i}`}),C&&e&&d&&l.jsx("label",{htmlFor:N,className:`ms-1 ${er[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:m==="invalid"?"alert":void 0,children:p})]})});K.displayName="Input";const lr={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},cr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},sr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},U=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:S="invalid",children:m,...E}=r,[$,x]=n.useState("default"),L=n.useId(),w=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:L),[o,e,L]),N=j=>{const z=j.target.value,T=(u==null?void 0:u(z))??"default";x(T),b==null||b(j,T),f==null||f(j)},C=!!d,k=lr[c],O=nr[h],M=sr($,v,g),I=s&&(a==="start"||a==="left")?"ps-10":s?"pe-10":"",P=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${C?"z-0":""}`,children:[!C&&e&&l.jsx("label",{htmlFor:w,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${P}`,children:l.jsx("span",{className:"text-gray-500",children:s})}),l.jsx("select",{...E,id:w,ref:t,onChange:N,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
6
+ ${k} ${I}
7
+ ${C&&d&&ar[d]}
8
+ ${O} ${M} ${i}`,children:m}),C&&e&&d&&l.jsx("label",{htmlFor:w,className:`ms-1 ${cr[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});U.displayName="Select";const ir={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},dr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:h="",isLoading:u=!1,disabled:b=!1,...i})=>{const s=b||u,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:s,...i,children:[u&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var X={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=n.createContext&&n.createContext(X),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(c=0;c<h.length;c++)o=h[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function A(){return A=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},A.apply(this,arguments)}function J(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function D(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?J(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Q(r){return r&&r.map((t,e)=>n.createElement(t.tag,D({key:e},t.attr),Q(t.child)))}function _(r){return t=>n.createElement(wr,A({attr:D({},r.attr)},t),Q(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:h}=r,u=fr(r,br),b=c||e.size||"1em",i;return e.className&&(i=e.className),r.className&&(i=(i?i+" ":"")+r.className),n.createElement("svg",A({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,u,{className:i,style:D(D({color:r.color||e.color},e.style),r.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),h&&n.createElement("title",null,h),r.children)};return Y!==void 0?n.createElement(Y.Consumer,null,e=>t(e)):t(X)}function kr(r){return _({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(r)}const mr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},V=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:h=!1,className:u="",id:b,value:i,icon:s,children:a,checked:d,...f},v)=>{const g=k=>{!h&&c&&c(k.target.checked),f.onChange&&f.onChange(k)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],m=xr[e],E=Cr[o]??"",$=o.startsWith("outline"),x=o.startsWith("soft"),N=`${p} ${S} ${m} ${E} ${d&&($||x||o==="link")?"peer-checked:bg-current peer-checked:text-white":d?"peer-checked:bg-current":""}`,C={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${u}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:d,onChange:g,disabled:h,id:b,value:i,ref:v,...f}),l.jsx("span",{className:N.trim(),children:(d||f.defaultChecked)&&(s??l.jsx(kr,{className:`${C[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});V.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:h="right",className:u="",menuClassName:b="",width:i="w-48",closeOnSelect:s=!1,transition:a=!0,ariaLabel:d="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),m=n.useRef(null),E=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),x=n.useCallback(()=>{const k=E.current,O=m.current;if(!k||!O)return;const{top:M,bottom:I}=k.getBoundingClientRect(),P=O.offsetHeight,j=window.innerHeight-I,z=M;S(j<P&&z>P)},[]),L=n.useCallback(k=>{var O,M;!((O=m.current)!=null&&O.contains(k.target))&&!((M=E.current)!=null&&M.contains(k.target))&&g(!1)},[]),w=n.useCallback(()=>g(k=>!k),[]),N=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}},[v,x]),n.useEffect(()=>(document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)),[L]);const C=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",$,i,a&&"transition-all duration-200 ease-out",b].filter(Boolean).join(" "),[p,$,i,a,b]);return l.jsxs("div",{className:`relative inline-block ${u}`,...f,children:[l.jsx("button",{type:"button",ref:E,onClick:w,"aria-expanded":v,"aria-label":d,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:m,role:"menu",className:C,children:[t&&t,e.map((k,O)=>{const M=()=>{o&&o(k),s&&N()};return l.jsx("div",{children:c?c(k,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:k.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:h={}})=>{const u=n.useRef(null),b=n.useRef(null);n.useEffect(()=>{const s=u.current,a=b.current;if(!s||!a)return;const d=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return s.addEventListener("mouseenter",d),s.addEventListener("mouseleave",f),()=>{s.removeEventListener("mouseenter",d),s.removeEventListener("mouseleave",f)}},[]);const i=s=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:u,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:b,role:"tooltip",className:c,style:{...i(e),...h},children:t})]})},$r={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Er={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:h,onDismiss:u,className:b="",...i})=>{const s=!r&&!!c,a=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${s?"justify-center p-2 w-8 h-8":""} `+b;return l.jsxs("span",{className:a.trim(),...i,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,h&&l.jsx("button",{type:"button",onClick:u,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(r)}const jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:h,renderTitle:u,renderContent:b,showArrowIcon:i=!0,panelClasses:s=""})=>{const[a,d]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&h?h(Array.from(p)):d(p)},[f,c,h,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,m=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":p,"aria-controls":m,onClick:()=>v(g.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${o}`,children:[u?u(g,p):g.title,i?l.jsx(Mr,{}):null]}),l.jsx("div",{id:m,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:b?b(g,p):g.content})]},g.id)})})},R=n.createContext(null),B=()=>{const r=n.useContext(R);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},rr=n.createContext(null),F=()=>n.useContext(rr);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:h="",onClose:u,disableEscapeClose:b=!1}){const i=F(),s=B(),a=!o&&!!i&&!!s,[d,f]=n.useState(!1),v=a?i.isOpen(r):d,g=a?i.getModalData(r):null,p=n.useCallback(()=>{a?s.closeModal(r):f(!1),u==null||u()},[a,s,r,u]);return n.useEffect(()=>{const S=document.activeElement,m=document.getElementById(r),E=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!m)return[];const w=m.querySelectorAll(E.join(","));return Array.from(w).filter(N=>N.offsetParent!==null)},x=w=>{if(w.key==="Tab"){const N=$();if(N.length===0)return;const C=N[0],k=N[N.length-1];w.shiftKey?document.activeElement===C&&(w.preventDefault(),k.focus()):document.activeElement===k&&(w.preventDefault(),C.focus())}},L=w=>{w.key==="Escape"&&!b&&p(),x(w)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const w=$();w.length&&w[0].focus()},0),window.addEventListener("keydown",L)),()=>{document.body.style.overflow="",S&&S.focus(),window.removeEventListener("keydown",L)}},[v,b,p,r]),v?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${h}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:p,className:"text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{children:typeof e=="function"?e({modalData:g}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),h=n.useCallback((d,f)=>{e(v=>({...v,[d]:!0})),f&&c(v=>({...v,[d]:f}))},[]),u=n.useCallback(d=>{e(f=>({...f,[d]:!1})),c(f=>{const v={...f};return delete v[d],v})},[]),b=n.useCallback(d=>!!t[d],[t]),i=n.useCallback(d=>o[d],[o]),s=n.useMemo(()=>({openModal:h,closeModal:u}),[h,u]),a=n.useMemo(()=>({isOpen:b,getModalData:i}),[b,i]);return l.jsx(R.Provider,{value:s,children:l.jsx(rr.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=B(),{isOpen:o,getModalData:c}=F();return{open:h=>t(r,h),close:()=>e(r),isOpen:o(r),data:c(r)}}let H=null,W={};function Tr(r){H=r}function Ar(r){W={...W,...r}}function Dr(){return W}function _r(r,t,e=3e3,o){H?H(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return _({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(r)}const Fr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,h,u)=>{const b=Fr();t(i=>[...i,{id:b,type:o,message:c,config:u}]),setTimeout(()=>{t(i=>i.filter(s=>s.id!==b))},h)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var i,s,a,d,f,v,g,p,S,m,E,$,x;const c=((i=o.config)==null?void 0:i.icon)||((s=e.icons)==null?void 0:s[o.type])||Wr(o.type),h=((a=o.config)==null?void 0:a.bgColor)||((f=(d=e.colors)==null?void 0:d[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",u=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",b=((S=o.config)==null?void 0:S.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${h} ${u}`,children:[l.jsx("div",{className:b,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((m=o.config)==null?void 0:m.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((E=o.config)==null?void 0:E.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!(($=o.config)!=null&&$.title)&&!((x=o.config)!=null&&x.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(L=>L.filter(w=>w.id!==o.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}y.Accordion=jr,y.Badge=Or,y.Button=ur,y.Checkbox=V,y.Dropdown=Sr,y.Input=K,y.Modal=Pr,y.ModalProvider=Ir,y.Select=U,y.Toast=Hr,y.Tooltip=Nr,y.setToastDefaults=Ar,y.showToast=_r,y.useModalActions=B,y.useModalInstance=zr,y.useModalState=F,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
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",