tailwind-ux-kit 1.0.62 → 1.0.64

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.
@@ -16,6 +16,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChan
16
16
  icon?: React.ReactNode;
17
17
  iconPosition?: IconPosition;
18
18
  floatingLabelStyle?: FloatingLabelStyle;
19
+ iconClasses?: string;
19
20
  isValid?: boolean;
20
21
  isInvalid?: boolean;
21
22
  feedback?: string;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ type BoxSize = "xs" | "sm" | "md" | "lg";
3
+ type Shape = "flat" | "rounded" | "pill";
4
+ type Variant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light";
5
+ interface RadioButtonProps extends React.InputHTMLAttributes<HTMLInputElement> {
6
+ label?: React.ReactNode;
7
+ boxSize?: BoxSize;
8
+ shape?: Shape;
9
+ variant?: Variant;
10
+ selected?: boolean;
11
+ onSelectionChange?: (value: string) => void;
12
+ disabled?: boolean;
13
+ className?: string;
14
+ id?: string;
15
+ value: string;
16
+ }
17
+ declare const Radio: React.FC<RadioButtonProps>;
18
+ export default Radio;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { jsxs as v, jsx as a } from "react/jsx-runtime";
3
- import A, { forwardRef as Y, useState as I, useMemo as P, useId as oe, useRef as _, useCallback as j, useEffect as T, createContext as J, useContext as Q } from "react";
2
+ import { jsxs as v, jsx as i } from "react/jsx-runtime";
3
+ import z, { forwardRef as Y, useState as I, useMemo as P, useId as oe, useRef as B, useCallback as j, useEffect as T, 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",
@@ -39,78 +39,79 @@ const K = {
39
39
  id: t,
40
40
  inputSize: s = "md",
41
41
  shape: u = "rounded",
42
- validate: l,
42
+ validate: a,
43
43
  onValidatedChange: d,
44
44
  className: c = "",
45
- icon: i,
45
+ icon: l,
46
46
  iconPosition: o = "left",
47
47
  floatingLabelStyle: f,
48
48
  onChange: p,
49
49
  isValid: b,
50
50
  isInvalid: g,
51
51
  feedback: m,
52
- feedbackType: w = "invalid",
53
- ...h
54
- } = e, [N, S] = I("default"), C = A.useCallback(
55
- (M) => {
56
- const D = M.target.value, z = (l == null ? void 0 : l(D)) ?? "default";
57
- S(z), d == null || d(M, z), p == null || p(M);
52
+ iconClasses: C,
53
+ feedbackType: h = "invalid",
54
+ ...N
55
+ } = e, [S, k] = I("default"), $ = z.useCallback(
56
+ (A) => {
57
+ const M = A.target.value, D = (a == null ? void 0 : a(M)) ?? "default";
58
+ k(D), d == null || d(A, D), p == null || p(A);
58
59
  },
59
- [l, d, p]
60
- ), k = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), x = !!f, $ = K[s] || K.md, E = U[u] || U.flat, y = P(
61
- () => ie(N, b, g),
62
- [N, b, g]
63
- ), L = P(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), O = P(() => i ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [i, o]);
60
+ [a, d, p]
61
+ ), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), y = !!f, E = K[s] || K.md, w = U[u] || 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(() => l ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [l, o]);
64
65
  return /* @__PURE__ */ v(
65
66
  "div",
66
67
  {
67
- className: `w-full relative ${x ? "z-0" : ""} tailwind-ux-input`,
68
+ className: `w-full relative ${y ? "z-0" : ""} tailwind-ux-input`,
68
69
  children: [
69
- !x && r && /* @__PURE__ */ a(
70
+ !y && r && /* @__PURE__ */ i(
70
71
  "label",
71
72
  {
72
- htmlFor: k,
73
+ htmlFor: x,
73
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
75
  children: r
75
76
  }
76
77
  ),
77
78
  /* @__PURE__ */ v("div", { className: "relative w-full", children: [
78
- i && /* @__PURE__ */ a(
79
+ l && /* @__PURE__ */ i(
79
80
  "div",
80
81
  {
81
- className: `absolute inset-y-0 flex items-center ${L}`,
82
+ className: `absolute inset-y-0 flex items-center ${O} ${C}`,
82
83
  "aria-hidden": "true",
83
- children: /* @__PURE__ */ a("span", { className: "text-gray-500", children: i })
84
+ children: l
84
85
  }
85
86
  ),
86
- /* @__PURE__ */ a(
87
+ /* @__PURE__ */ i(
87
88
  "input",
88
89
  {
89
- ...h,
90
- id: k,
90
+ ...N,
91
+ id: x,
91
92
  ref: n,
92
- placeholder: x ? " " : h.placeholder,
93
- onChange: C,
93
+ placeholder: y ? " " : N.placeholder,
94
+ onChange: $,
94
95
  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
95
- ${$}
96
- ${x && f && ae[f]}
97
- ${O} ${E} ${y} ${c}`
96
+ ${E}
97
+ ${y && f && ae[f]}
98
+ ${_} ${w} ${L} ${c}`
98
99
  }
99
100
  ),
100
- x && r && f && /* @__PURE__ */ a(
101
+ y && r && f && /* @__PURE__ */ i(
101
102
  "label",
102
103
  {
103
- htmlFor: k,
104
+ htmlFor: x,
104
105
  className: `ms-1 ${le[f]} ${c}`,
105
106
  children: r
106
107
  }
107
108
  )
108
109
  ] }),
109
- m && /* @__PURE__ */ a(
110
+ m && /* @__PURE__ */ i(
110
111
  "p",
111
112
  {
112
- className: `mt-1 text-xs ${w === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
113
- role: w === "invalid" ? "alert" : void 0,
113
+ className: `mt-1 text-xs ${h === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
114
+ role: h === "invalid" ? "alert" : void 0,
114
115
  children: m
115
116
  }
116
117
  )
@@ -158,25 +159,25 @@ const de = {
158
159
  id: t,
159
160
  inputSize: s = "md",
160
161
  shape: u = "rounded",
161
- validate: l,
162
+ validate: a,
162
163
  onValidatedChange: d,
163
164
  className: c = "",
164
- icon: i,
165
+ icon: l,
165
166
  iconPosition: o = "left",
166
167
  floatingLabelStyle: f,
167
168
  onChange: p,
168
169
  isValid: b,
169
170
  isInvalid: g,
170
171
  feedback: m,
171
- feedbackType: w = "invalid",
172
+ feedbackType: C = "invalid",
172
173
  children: h,
173
174
  ...N
174
- } = e, [S, C] = I("default"), k = oe(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : k), [t, r, k]), $ = (z) => {
175
- const R = z.target.value, G = (l == null ? void 0 : l(R)) ?? "default";
176
- C(G), d == null || d(z, G), p == null || p(z);
177
- }, E = !!f, y = de[s], L = ue[u], O = ge(S, b, g);
175
+ } = e, [S, k] = I("default"), $ = oe(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : $), [t, r, $]), y = (M) => {
176
+ const D = M.target.value, G = (a == null ? void 0 : a(D)) ?? "default";
177
+ k(G), d == null || d(M, G), p == null || p(M);
178
+ }, E = !!f, w = de[s], L = ue[u], O = ge(S, b, g);
178
179
  return /* @__PURE__ */ v("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
179
- !E && r && /* @__PURE__ */ a(
180
+ !E && r && /* @__PURE__ */ i(
180
181
  "label",
181
182
  {
182
183
  htmlFor: x,
@@ -185,28 +186,28 @@ const de = {
185
186
  }
186
187
  ),
187
188
  /* @__PURE__ */ v("div", { className: "relative w-full", children: [
188
- i && /* @__PURE__ */ a(
189
+ l && /* @__PURE__ */ i(
189
190
  "div",
190
191
  {
191
192
  className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
192
- children: /* @__PURE__ */ a("span", { className: "text-gray-500", children: i })
193
+ children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
193
194
  }
194
195
  ),
195
- /* @__PURE__ */ a(
196
+ /* @__PURE__ */ i(
196
197
  "select",
197
198
  {
198
199
  ...N,
199
200
  id: x,
200
201
  ref: n,
201
- onChange: $,
202
+ onChange: y,
202
203
  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
203
- ${y} ${i && (o === "start" || o === "left") ? "ps-10" : i ? "pe-10" : ""}
204
+ ${w} ${l && (o === "start" || o === "left") ? "ps-10" : l ? "pe-10" : ""}
204
205
  ${E && f && fe[f]}
205
206
  ${L} ${O} ${c}`,
206
207
  children: h
207
208
  }
208
209
  ),
209
- E && r && f && /* @__PURE__ */ a(
210
+ E && r && f && /* @__PURE__ */ i(
210
211
  "label",
211
212
  {
212
213
  htmlFor: x,
@@ -215,10 +216,10 @@ const de = {
215
216
  }
216
217
  )
217
218
  ] }),
218
- m && /* @__PURE__ */ a(
219
+ m && /* @__PURE__ */ i(
219
220
  "p",
220
221
  {
221
- className: `mt-1 text-xs ${w === "invalid" ? "text-red-600" : "text-green-600"}`,
222
+ className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
222
223
  children: m
223
224
  }
224
225
  )
@@ -269,21 +270,21 @@ const me = {
269
270
  type: t = "button",
270
271
  shape: s = "rounded",
271
272
  className: u = "",
272
- isLoading: l = !1,
273
+ isLoading: a = !1,
273
274
  disabled: d = !1,
274
275
  ...c
275
276
  }) => {
276
- const i = d || l, o = [
277
+ const l = d || a, o = [
277
278
  "inline-flex items-center justify-center font-normal transition duration-150",
278
279
  me[n],
279
280
  xe[r],
280
281
  he[s],
281
282
  s === "flat" ? "shadow-none" : "shadow-sm",
282
- i ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
283
+ l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
283
284
  u
284
285
  ].filter(Boolean).join(" ");
285
- return /* @__PURE__ */ v("button", { type: t, className: o, disabled: i, ...c, children: [
286
- l && /* @__PURE__ */ v(
286
+ return /* @__PURE__ */ v("button", { type: t, className: o, disabled: l, ...c, children: [
287
+ a && /* @__PURE__ */ v(
287
288
  "svg",
288
289
  {
289
290
  "aria-hidden": "true",
@@ -293,14 +294,14 @@ const me = {
293
294
  fill: "none",
294
295
  xmlns: "http://www.w3.org/2000/svg",
295
296
  children: [
296
- /* @__PURE__ */ a(
297
+ /* @__PURE__ */ i(
297
298
  "path",
298
299
  {
299
300
  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",
300
301
  fill: "currentColor"
301
302
  }
302
303
  ),
303
- /* @__PURE__ */ a(
304
+ /* @__PURE__ */ i(
304
305
  "path",
305
306
  {
306
307
  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",
@@ -319,7 +320,7 @@ var V = {
319
320
  className: void 0,
320
321
  style: void 0,
321
322
  attr: void 0
322
- }, q = A.createContext && /* @__PURE__ */ A.createContext(V), ye = ["attr", "size", "title"];
323
+ }, q = z.createContext && /* @__PURE__ */ z.createContext(V), ye = ["attr", "size", "title"];
323
324
  function we(e, n) {
324
325
  if (e == null) return {};
325
326
  var r = ve(e, n), t, s;
@@ -340,15 +341,15 @@ function ve(e, n) {
340
341
  }
341
342
  return r;
342
343
  }
343
- function B() {
344
- return B = Object.assign ? Object.assign.bind() : function(e) {
344
+ function F() {
345
+ return F = Object.assign ? Object.assign.bind() : function(e) {
345
346
  for (var n = 1; n < arguments.length; n++) {
346
347
  var r = arguments[n];
347
348
  for (var t in r)
348
349
  Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
349
350
  }
350
351
  return e;
351
- }, B.apply(this, arguments);
352
+ }, F.apply(this, arguments);
352
353
  }
353
354
  function X(e, n) {
354
355
  var r = Object.keys(e);
@@ -360,7 +361,7 @@ function X(e, n) {
360
361
  }
361
362
  return r;
362
363
  }
363
- function F(e) {
364
+ function R(e) {
364
365
  for (var n = 1; n < arguments.length; n++) {
365
366
  var r = arguments[n] != null ? arguments[n] : {};
366
367
  n % 2 ? X(Object(r), !0).forEach(function(t) {
@@ -389,13 +390,13 @@ function Ne(e, n) {
389
390
  return (n === "string" ? String : Number)(e);
390
391
  }
391
392
  function ee(e) {
392
- return e && e.map((n, r) => /* @__PURE__ */ A.createElement(n.tag, F({
393
+ return e && e.map((n, r) => /* @__PURE__ */ z.createElement(n.tag, R({
393
394
  key: r
394
395
  }, n.attr), ee(n.child)));
395
396
  }
396
397
  function Z(e) {
397
- return (n) => /* @__PURE__ */ A.createElement(Se, B({
398
- attr: F({}, e.attr)
398
+ return (n) => /* @__PURE__ */ z.createElement(Se, F({
399
+ attr: R({}, e.attr)
399
400
  }, n), ee(e.child));
400
401
  }
401
402
  function Se(e) {
@@ -404,22 +405,22 @@ function Se(e) {
404
405
  attr: t,
405
406
  size: s,
406
407
  title: u
407
- } = e, l = we(e, ye), d = s || r.size || "1em", c;
408
- return r.className && (c = r.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", B({
408
+ } = e, a = we(e, ye), d = s || r.size || "1em", c;
409
+ return r.className && (c = r.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", F({
409
410
  stroke: "currentColor",
410
411
  fill: "currentColor",
411
412
  strokeWidth: "0"
412
- }, r.attr, t, l, {
413
+ }, r.attr, t, a, {
413
414
  className: c,
414
- style: F(F({
415
+ style: R(R({
415
416
  color: e.color || r.color
416
417
  }, r.style), e.style),
417
418
  height: d,
418
419
  width: d,
419
420
  xmlns: "http://www.w3.org/2000/svg"
420
- }), u && /* @__PURE__ */ A.createElement("title", null, u), e.children);
421
+ }), u && /* @__PURE__ */ z.createElement("title", null, u), e.children);
421
422
  };
422
- return q !== void 0 ? /* @__PURE__ */ A.createElement(q.Consumer, null, (r) => n(r)) : n(V);
423
+ return q !== void 0 ? /* @__PURE__ */ z.createElement(q.Consumer, null, (r) => n(r)) : n(V);
423
424
  }
424
425
  function $e(e) {
425
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);
@@ -466,17 +467,17 @@ const Ee = {
466
467
  variant: t = "success",
467
468
  checked: s = !1,
468
469
  onSelectionChange: u,
469
- disabled: l = !1,
470
+ disabled: a = !1,
470
471
  className: d = "",
471
472
  id: c,
472
- value: i,
473
+ value: l,
473
474
  icon: o,
474
475
  children: f,
475
476
  ...p
476
477
  }) => {
477
478
  const b = (E) => {
478
- !l && u && u(E.target.checked);
479
- }, g = "mr-2 border flex items-center justify-center transition-all", m = Ee[n], w = Le[r], h = Oe[t] ?? "", N = t.startsWith("outline"), S = t.startsWith("soft"), x = `${g} ${m} ${w} ${h} ${s && (N || S || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : s ? "peer-checked:bg-current" : ""}`, $ = {
479
+ !a && u && u(E.target.checked);
480
+ }, g = "mr-2 border flex items-center justify-center transition-all", m = Ee[n], C = Le[r], h = Oe[t] ?? "", N = t.startsWith("outline"), S = t.startsWith("soft"), x = `${g} ${m} ${C} ${h} ${s && (N || S || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : s ? "peer-checked:bg-current" : ""}`, y = {
480
481
  xs: "w-2 h-2",
481
482
  sm: "w-2.5 h-2.5",
482
483
  md: "w-3 h-3",
@@ -485,23 +486,23 @@ const Ee = {
485
486
  return /* @__PURE__ */ v(
486
487
  "label",
487
488
  {
488
- className: `flex items-center ${l ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
489
+ className: `flex items-center ${a ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
489
490
  children: [
490
- /* @__PURE__ */ a(
491
+ /* @__PURE__ */ i(
491
492
  "input",
492
493
  {
493
494
  type: "checkbox",
494
495
  className: "peer hidden",
495
496
  checked: s,
496
497
  onChange: b,
497
- disabled: l,
498
+ disabled: a,
498
499
  id: c,
499
- value: i,
500
+ value: l,
500
501
  ...p
501
502
  }
502
503
  ),
503
- /* @__PURE__ */ a("span", { className: x.trim(), children: s && (o ?? /* @__PURE__ */ a($e, { className: `${$[n]}` })) }),
504
- e || f ? /* @__PURE__ */ a("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? f }) : null
504
+ /* @__PURE__ */ i("span", { className: x.trim(), children: s && (o ?? /* @__PURE__ */ i($e, { className: `${y[n]}` })) }),
505
+ e || f ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? f }) : null
505
506
  ]
506
507
  }
507
508
  );
@@ -512,33 +513,33 @@ const Ee = {
512
513
  onSelect: t,
513
514
  renderItem: s,
514
515
  position: u = "right",
515
- className: l = "",
516
+ className: a = "",
516
517
  menuClassName: d = "",
517
518
  width: c = "w-48",
518
- closeOnSelect: i = !1,
519
+ closeOnSelect: l = !1,
519
520
  transition: o = !0,
520
521
  ariaLabel: f = "Dropdown menu",
521
522
  ...p
522
523
  }) => {
523
- const [b, g] = I(!1), [m, w] = I(!1), h = _(null), N = _(null), S = P(() => ({
524
+ const [b, g] = I(!1), [m, C] = I(!1), h = B(null), N = B(null), S = P(() => ({
524
525
  left: "left-0",
525
526
  center: "left-1/2 transform -translate-x-1/2",
526
527
  right: "right-0"
527
- })[u], [u]), C = j(() => {
528
- const y = N.current, L = h.current;
529
- if (!y || !L) return;
530
- const { top: O, bottom: M } = y.getBoundingClientRect(), D = L.offsetHeight, z = window.innerHeight - M, R = O;
531
- w(z < D && R > D);
532
- }, []), k = j((y) => {
528
+ })[u], [u]), k = j(() => {
529
+ const w = N.current, L = h.current;
530
+ if (!w || !L) return;
531
+ const { top: O, bottom: _ } = w.getBoundingClientRect(), A = L.offsetHeight, M = window.innerHeight - _, D = O;
532
+ C(M < A && D > A);
533
+ }, []), $ = j((w) => {
533
534
  var L, O;
534
- !((L = h.current) != null && L.contains(y.target)) && !((O = N.current) != null && O.contains(y.target)) && g(!1);
535
- }, []), x = j(() => g((y) => !y), []), $ = j(() => g(!1), []);
535
+ !((L = h.current) != null && L.contains(w.target)) && !((O = N.current) != null && O.contains(w.target)) && g(!1);
536
+ }, []), x = j(() => g((w) => !w), []), y = j(() => g(!1), []);
536
537
  T(() => {
537
538
  if (b)
538
- return C(), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0), () => {
539
- window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
539
+ return k(), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
540
+ window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
540
541
  };
541
- }, [b, C]), T(() => (document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k)), [k]);
542
+ }, [b, k]), T(() => (document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $)), [$]);
542
543
  const E = P(
543
544
  () => [
544
545
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden",
@@ -550,8 +551,8 @@ const Ee = {
550
551
  ].filter(Boolean).join(" "),
551
552
  [m, S, c, o, d]
552
553
  );
553
- return /* @__PURE__ */ v("div", { className: `relative inline-block ${l}`, ...p, children: [
554
- /* @__PURE__ */ a(
554
+ return /* @__PURE__ */ v("div", { className: `relative inline-block ${a}`, ...p, children: [
555
+ /* @__PURE__ */ i(
555
556
  "button",
556
557
  {
557
558
  ref: N,
@@ -564,17 +565,17 @@ const Ee = {
564
565
  ),
565
566
  b && /* @__PURE__ */ v("div", { ref: h, role: "menu", className: E, children: [
566
567
  n && n,
567
- r.map((y, L) => {
568
+ r.map((w, L) => {
568
569
  const O = () => {
569
- t && t(y), i && $();
570
+ t && t(w), l && y();
570
571
  };
571
- return /* @__PURE__ */ a("div", { children: s ? s(y, O) : /* @__PURE__ */ a(
572
+ return /* @__PURE__ */ i("div", { children: s ? s(w, O) : /* @__PURE__ */ i(
572
573
  "div",
573
574
  {
574
575
  onClick: O,
575
576
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
576
577
  role: "menuitem",
577
- children: y.label
578
+ children: w.label
578
579
  }
579
580
  ) }, L);
580
581
  })
@@ -588,20 +589,20 @@ const Ee = {
588
589
  tooltipClass: s = "",
589
590
  tooltipStyle: u = {}
590
591
  }) => {
591
- const l = _(null), d = _(null);
592
+ const a = B(null), d = B(null);
592
593
  T(() => {
593
- const i = l.current, o = d.current;
594
- if (!i || !o) return;
594
+ const l = a.current, o = d.current;
595
+ if (!l || !o) return;
595
596
  const f = () => {
596
597
  o.style.opacity = "1", o.style.visibility = "visible";
597
598
  }, p = () => {
598
599
  o.style.opacity = "0", o.style.visibility = "hidden";
599
600
  };
600
- return i.addEventListener("mouseenter", f), i.addEventListener("mouseleave", p), () => {
601
- i.removeEventListener("mouseenter", f), i.removeEventListener("mouseleave", p);
601
+ return l.addEventListener("mouseenter", f), l.addEventListener("mouseleave", p), () => {
602
+ l.removeEventListener("mouseenter", f), l.removeEventListener("mouseleave", p);
602
603
  };
603
604
  }, []);
604
- const c = (i) => {
605
+ const c = (l) => {
605
606
  const o = {
606
607
  position: "absolute",
607
608
  opacity: 0,
@@ -619,7 +620,7 @@ const Ee = {
619
620
  zIndex: 9999,
620
621
  width: "max-content"
621
622
  };
622
- switch (i) {
623
+ switch (l) {
623
624
  case "top":
624
625
  return {
625
626
  ...o,
@@ -656,9 +657,9 @@ const Ee = {
656
657
  return o;
657
658
  }
658
659
  };
659
- return /* @__PURE__ */ v("div", { ref: l, className: `relative inline-block ${t}`, children: [
660
+ return /* @__PURE__ */ v("div", { ref: a, className: `relative inline-block ${t}`, children: [
660
661
  e,
661
- /* @__PURE__ */ a(
662
+ /* @__PURE__ */ i(
662
663
  "div",
663
664
  {
664
665
  ref: d,
@@ -708,19 +709,19 @@ const Ee = {
708
709
  shape: t = "rounded",
709
710
  icon: s,
710
711
  dismissible: u,
711
- onDismiss: l,
712
+ onDismiss: a,
712
713
  className: d = "",
713
714
  ...c
714
715
  }) => {
715
- const i = !e && !!s, o = `inline-flex items-center font-medium ${Pe[n] || ""} ${je[r] || ""} ${Ie[t] || ""} ${i ? "justify-center p-2 w-8 h-8" : ""} ` + d;
716
+ const l = !e && !!s, o = `inline-flex items-center font-medium ${Pe[n] || ""} ${je[r] || ""} ${Ie[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + d;
716
717
  return /* @__PURE__ */ v("span", { className: o.trim(), ...c, children: [
717
- s && /* @__PURE__ */ a("span", { className: e ? "mr-1" : "", children: s }),
718
+ s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
718
719
  e,
719
- u && /* @__PURE__ */ a(
720
+ u && /* @__PURE__ */ i(
720
721
  "button",
721
722
  {
722
723
  type: "button",
723
- onClick: l,
724
+ onClick: a,
724
725
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
725
726
  children: "×"
726
727
  }
@@ -737,10 +738,10 @@ const Ke = ({
737
738
  tileClasses: t = "",
738
739
  open: s,
739
740
  onChange: u,
740
- renderTitle: l,
741
+ renderTitle: a,
741
742
  renderContent: d,
742
743
  showArrowIcon: c = !0,
743
- panelClasses: i = ""
744
+ panelClasses: l = ""
744
745
  }) => {
745
746
  const [o, f] = I(/* @__PURE__ */ new Set()), p = P(() => s ? new Set(s) : o, [s, o]), b = j(
746
747
  (g) => {
@@ -749,14 +750,14 @@ const Ke = ({
749
750
  },
750
751
  [p, s, u, n]
751
752
  );
752
- return /* @__PURE__ */ a(
753
+ return /* @__PURE__ */ i(
753
754
  "div",
754
755
  {
755
756
  className: "accordion",
756
757
  role: "region",
757
758
  "aria-multiselectable": n,
758
759
  children: e.map((g) => {
759
- const m = p.has(g.id), w = `accordion-heading-${g.id}`, h = `accordion-panel-${g.id}`;
760
+ const m = p.has(g.id), C = `accordion-heading-${g.id}`, h = `accordion-panel-${g.id}`;
760
761
  return /* @__PURE__ */ v(
761
762
  "div",
762
763
  {
@@ -765,26 +766,26 @@ const Ke = ({
765
766
  /* @__PURE__ */ v(
766
767
  "button",
767
768
  {
768
- id: w,
769
+ id: C,
769
770
  type: "button",
770
771
  "aria-expanded": m,
771
772
  "aria-controls": h,
772
773
  onClick: () => b(g.id),
773
774
  className: `flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${t}`,
774
775
  children: [
775
- l ? l(g, m) : g.title,
776
- c ? /* @__PURE__ */ a(ze, {}) : null
776
+ a ? a(g, m) : g.title,
777
+ c ? /* @__PURE__ */ i(ze, {}) : null
777
778
  ]
778
779
  }
779
780
  ),
780
- /* @__PURE__ */ a(
781
+ /* @__PURE__ */ i(
781
782
  "div",
782
783
  {
783
784
  id: h,
784
785
  role: "region",
785
- "aria-labelledby": w,
786
+ "aria-labelledby": C,
786
787
  hidden: !m,
787
- className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,
788
+ className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
788
789
  children: d ? d(g, m) : g.content
789
790
  }
790
791
  )
@@ -810,14 +811,14 @@ function Ue({
810
811
  standalone: t = !1,
811
812
  showFloatingClose: s = !1,
812
813
  containerClasses: u = "",
813
- onClose: l,
814
+ onClose: a,
814
815
  disableEscapeClose: d = !1
815
816
  }) {
816
- const c = se(), i = re(), o = !t && !!c && !!i, [f, p] = I(!1), b = o ? c.isOpen(e) : f, g = o ? c.getModalData(e) : null, m = j(() => {
817
- o ? i.closeModal(e) : p(!1), l == null || l();
818
- }, [o, i, e, l]);
817
+ const c = se(), l = re(), o = !t && !!c && !!l, [f, p] = I(!1), b = o ? c.isOpen(e) : f, g = o ? c.getModalData(e) : null, m = j(() => {
818
+ o ? l.closeModal(e) : p(!1), a == null || a();
819
+ }, [o, l, e, a]);
819
820
  return T(() => {
820
- const w = document.activeElement;
821
+ const C = document.activeElement;
821
822
  console.log(e);
822
823
  const h = document.getElementById(e);
823
824
  console.log("modalEl=", h);
@@ -833,24 +834,24 @@ function Ue({
833
834
  const x = h.querySelectorAll(
834
835
  N.join(",")
835
836
  );
836
- return Array.from(x).filter(($) => $.offsetParent !== null);
837
- }, C = (x) => {
837
+ return Array.from(x).filter((y) => y.offsetParent !== null);
838
+ }, k = (x) => {
838
839
  if (x.key === "Tab") {
839
- const $ = S();
840
- if ($.length === 0) return;
841
- const E = $[0], y = $[$.length - 1];
842
- x.shiftKey ? document.activeElement === E && (x.preventDefault(), y.focus()) : document.activeElement === y && (x.preventDefault(), E.focus());
840
+ const y = S();
841
+ if (y.length === 0) return;
842
+ const E = y[0], w = y[y.length - 1];
843
+ x.shiftKey ? document.activeElement === E && (x.preventDefault(), w.focus()) : document.activeElement === w && (x.preventDefault(), E.focus());
843
844
  }
844
- }, k = (x) => {
845
- x.key === "Escape" && !d && m(), C(x);
845
+ }, $ = (x) => {
846
+ x.key === "Escape" && !d && m(), k(x);
846
847
  };
847
848
  return b && (document.body.style.overflow = "hidden", setTimeout(() => {
848
849
  const x = S();
849
850
  x.length && x[0].focus();
850
- }, 0), window.addEventListener("keydown", k)), () => {
851
- document.body.style.overflow = "", w && w.focus(), window.removeEventListener("keydown", k);
851
+ }, 0), window.addEventListener("keydown", $)), () => {
852
+ document.body.style.overflow = "", C && C.focus(), window.removeEventListener("keydown", $);
852
853
  };
853
- }, [b, d, m, e]), b ? /* @__PURE__ */ a(
854
+ }, [b, d, m, e]), b ? /* @__PURE__ */ i(
854
855
  "div",
855
856
  {
856
857
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
@@ -861,8 +862,8 @@ function Ue({
861
862
  className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${u}`,
862
863
  children: [
863
864
  /* @__PURE__ */ v("div", { className: "flex justify-between items-center relative", children: [
864
- n && /* @__PURE__ */ a("h2", { className: "text-lg font-semibold", children: n }),
865
- s && /* @__PURE__ */ a(
865
+ n && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: n }),
866
+ s && /* @__PURE__ */ i(
866
867
  "button",
867
868
  {
868
869
  onClick: m,
@@ -872,7 +873,7 @@ function Ue({
872
873
  }
873
874
  )
874
875
  ] }),
875
- /* @__PURE__ */ a("div", { className: "mt-3 text-sm text-gray-700", children: typeof r == "function" ? r({ modalData: g }) : r })
876
+ /* @__PURE__ */ i("div", { className: "mt-3 text-sm text-gray-700", children: typeof r == "function" ? r({ modalData: g }) : r })
876
877
  ]
877
878
  }
878
879
  )
@@ -884,7 +885,7 @@ function qe({
884
885
  }) {
885
886
  const [n, r] = I({}), [t, s] = I({}), u = j((f, p) => {
886
887
  r((b) => ({ ...b, [f]: !0 })), p && s((b) => ({ ...b, [f]: p }));
887
- }, []), l = j((f) => {
888
+ }, []), a = j((f) => {
888
889
  r((p) => ({ ...p, [f]: !1 })), s((p) => {
889
890
  const b = { ...p };
890
891
  return delete b[f], b;
@@ -892,14 +893,14 @@ function qe({
892
893
  }, []), d = j((f) => !!n[f], [n]), c = j(
893
894
  (f) => t[f],
894
895
  [t]
895
- ), i = P(
896
- () => ({ openModal: u, closeModal: l }),
897
- [u, l]
896
+ ), l = P(
897
+ () => ({ openModal: u, closeModal: a }),
898
+ [u, a]
898
899
  ), o = P(
899
900
  () => ({ isOpen: d, getModalData: c }),
900
901
  [d, c]
901
902
  );
902
- return /* @__PURE__ */ a(te.Provider, { value: i, children: /* @__PURE__ */ a(ne.Provider, { value: o, children: e }) });
903
+ return /* @__PURE__ */ i(te.Provider, { value: l, children: /* @__PURE__ */ i(ne.Provider, { value: o, children: e }) });
903
904
  }
904
905
  function Xe(e) {
905
906
  const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: s } = se();
@@ -932,35 +933,35 @@ const Te = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
932
933
  }), Qe = () => {
933
934
  const [e, n] = I([]);
934
935
  T(() => {
935
- Ae((t, s, u, l) => {
936
+ Ae((t, s, u, a) => {
936
937
  const d = Te();
937
- n((c) => [...c, { id: d, type: t, message: s, config: l }]), setTimeout(() => {
938
- n((c) => c.filter((i) => i.id !== d));
938
+ n((c) => [...c, { id: d, type: t, message: s, config: a }]), setTimeout(() => {
939
+ n((c) => c.filter((l) => l.id !== d));
939
940
  }, u);
940
941
  });
941
942
  }, []);
942
943
  const r = Me();
943
- return /* @__PURE__ */ a("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
944
- var c, i, o, f, p, b, g, m, w, h, N, S, C;
945
- const s = ((c = t.config) == null ? void 0 : c.icon) || ((i = r.icons) == null ? void 0 : i[t.type]) || _e(t.type), u = ((o = t.config) == null ? void 0 : o.bgColor) || ((p = (f = r.colors) == null ? void 0 : f[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", l = ((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", d = ((w = t.config) == null ? void 0 : w.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
944
+ return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
945
+ var c, l, o, f, p, b, g, m, C, h, N, S, k;
946
+ const s = ((c = t.config) == null ? void 0 : c.icon) || ((l = r.icons) == null ? void 0 : l[t.type]) || _e(t.type), u = ((o = t.config) == null ? void 0 : o.bgColor) || ((p = (f = r.colors) == null ? void 0 : f[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", a = ((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", d = ((C = t.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
946
947
  return /* @__PURE__ */ v(
947
948
  "div",
948
949
  {
949
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${u} ${l}`,
950
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${u} ${a}`,
950
951
  children: [
951
- /* @__PURE__ */ a("div", { className: d, children: s }),
952
+ /* @__PURE__ */ i("div", { className: d, children: s }),
952
953
  /* @__PURE__ */ v("div", { className: "flex-1 me-3", children: [
953
- ((h = t.config) == null ? void 0 : h.title) && /* @__PURE__ */ a("div", { className: "font-semibold text-black", children: t.config.title }),
954
- ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ a("div", { className: "text-sm text-gray-500", children: t.config.description }),
955
- !((S = t.config) != null && S.title) && !((C = t.config) != null && C.description) && /* @__PURE__ */ a("div", { className: "text-sm", children: t.message })
954
+ ((h = t.config) == null ? void 0 : h.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
955
+ ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
956
+ !((S = t.config) != null && S.title) && !((k = t.config) != null && k.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
956
957
  ] }),
957
- /* @__PURE__ */ a(
958
+ /* @__PURE__ */ i(
958
959
  "button",
959
960
  {
960
- onClick: () => n((k) => k.filter((x) => x.id !== t.id)),
961
+ onClick: () => n(($) => $.filter((x) => x.id !== t.id)),
961
962
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
962
963
  "aria-label": "Close",
963
- children: /* @__PURE__ */ a(De, { size: 18 })
964
+ children: /* @__PURE__ */ i(De, { size: 18 })
964
965
  }
965
966
  )
966
967
  ]
@@ -1,8 +1,8 @@
1
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"},rr={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"},or={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"},er=(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:a="md",shape:u="rounded",validate:s,onValidatedChange:h,className:d="",icon:i,iconPosition:c="left",floatingLabelStyle:b,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:x="invalid",...k}=r,[N,$]=n.useState("default"),C=n.useCallback(P=>{const I=P.target.value,j=(s==null?void 0:s(I))??"default";$(j),h==null||h(P,j),f==null||f(P)},[s,h,f]),S=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),y=!!b,E=Z[a]||Z.md,L=G[u]||G.flat,m=n.useMemo(()=>er(N,v,g),[N,v,g]),O=n.useMemo(()=>c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[c]),M=n.useMemo(()=>i?c==="start"||c==="left"?"ps-10":"pe-10":"",[i,c]);return l.jsxs("div",{className:`w-full relative ${y?"z-0":""} tailwind-ux-input`,children:[!y&&e&&l.jsx("label",{htmlFor:S,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${O}`,"aria-hidden":"true",children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("input",{...k,id:S,ref:t,placeholder:y?" ":k.placeholder,onChange:C,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
- ${E}
4
- ${y&&b&&rr[b]}
5
- ${M} ${L} ${m} ${d}`}),y&&e&&b&&l.jsx("label",{htmlFor:S,className:`ms-1 ${or[b]} ${d}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${x==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:x==="invalid"?"alert":void 0,children:p})]})});q.displayName="Input";const tr={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"},lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},nr={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"},ar={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"},cr=(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:a="md",shape:u="rounded",validate:s,onValidatedChange:h,className:d="",icon:i,iconPosition:c="left",floatingLabelStyle:b,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:x="invalid",children:k,...N}=r,[$,C]=n.useState("default"),S=n.useId(),y=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:S),[o,e,S]),E=j=>{const H=j.target.value,R=(s==null?void 0:s(H))??"default";C(R),h==null||h(j,R),f==null||f(j)},L=!!b,m=tr[a],O=lr[u],M=cr($,v,g),P=i&&(c==="start"||c==="left")?"ps-10":i?"pe-10":"",I=c==="start"||c==="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:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${I}`,children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("select",{...N,id:y,ref:t,onChange:E,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
6
- ${m} ${P}
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"},rr={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"},or={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"},er=(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:a="md",shape:u="rounded",validate:s,onValidatedChange:h,className:d="",icon:i,iconPosition:c="left",floatingLabelStyle:b,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:C,feedbackType:k="invalid",...N}=r,[$,S]=n.useState("default"),E=n.useCallback(j=>{const P=j.target.value,I=(s==null?void 0:s(P))??"default";S(I),h==null||h(j,I),f==null||f(j)},[s,h,f]),y=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),m=!!b,L=Z[a]||Z.md,x=G[u]||G.flat,O=n.useMemo(()=>er($,v,g),[$,v,g]),M=n.useMemo(()=>c==="start"||c==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[c]),z=n.useMemo(()=>i?c==="start"||c==="left"?"ps-10":"pe-10":"",[i,c]);return l.jsxs("div",{className:`w-full relative ${m?"z-0":""} tailwind-ux-input`,children:[!m&&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:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${M} ${C}`,"aria-hidden":"true",children:i}),l.jsx("input",{...N,id:y,ref:t,placeholder:m?" ":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
+ ${m&&b&&rr[b]}
5
+ ${z} ${x} ${O} ${d}`}),m&&e&&b&&l.jsx("label",{htmlFor:y,className:`ms-1 ${or[b]} ${d}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${k==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:k==="invalid"?"alert":void 0,children:p})]})});q.displayName="Input";const tr={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"},lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},nr={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"},ar={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"},cr=(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:a="md",shape:u="rounded",validate:s,onValidatedChange:h,className:d="",icon:i,iconPosition:c="left",floatingLabelStyle:b,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:C="invalid",children:k,...N}=r,[$,S]=n.useState("default"),E=n.useId(),y=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:E),[o,e,E]),m=P=>{const I=P.target.value,R=(s==null?void 0:s(I))??"default";S(R),h==null||h(P,R),f==null||f(P)},L=!!b,x=tr[a],O=lr[u],M=cr($,v,g),z=i&&(c==="start"||c==="left")?"ps-10":i?"pe-10":"",j=c==="start"||c==="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:[i&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${j}`,children:l.jsx("span",{className:"text-gray-500",children:i})}),l.jsx("select",{...N,id:y,ref:t,onChange:m,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
+ ${x} ${z}
7
7
  ${L&&b&&nr[b]}
8
- ${O} ${M} ${d}`,children:k}),L&&e&&b&&l.jsx("label",{htmlFor:y,className:`ms-1 ${ar[b]} ${d}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${x==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});K.displayName="Select";const sr={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"},ir={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"},dr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},hr=({children:r,variant:t="primary",size:e="md",type:o="button",shape:a="rounded",className:u="",isLoading:s=!1,disabled:h=!1,...d})=>{const i=h||s,c=["inline-flex items-center justify-center font-normal transition duration-150",sr[t],ir[e],dr[a],a==="flat"?"shadow-none":"shadow-sm",i?"opacity-50 cursor-not-allowed":"cursor-pointer",u].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:c,disabled:i,...d,children:[s&&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),ur=["attr","size","title"];function br(r,t){if(r==null)return{};var e=fr(r,t),o,a;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(a=0;a<u.length;a++)o=u[a],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function fr(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 z(){return z=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},z.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(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),e.push.apply(e,o)}return e}function T(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){gr(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 gr(r,t,e){return t=vr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function vr(r){var t=pr(r,"string");return typeof t=="symbol"?t:t+""}function pr(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,T({key:e},t.attr),J(t.child)))}function A(r){return t=>n.createElement(yr,z({attr:T({},r.attr)},t),J(r.child))}function yr(r){var t=e=>{var{attr:o,size:a,title:u}=r,s=br(r,ur),h=a||e.size||"1em",d;return e.className&&(d=e.className),r.className&&(d=(d?d+" ":"")+r.className),n.createElement("svg",z({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,s,{className:d,style:T(T({color:r.color||e.color},e.style),r.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),u&&n.createElement("title",null,u),r.children)};return X!==void 0?n.createElement(X.Consumer,null,e=>t(e)):t(U)}function wr(r){return A({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 kr={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"},mr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},xr={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"},Cr=({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",checked:a=!1,onSelectionChange:u,disabled:s=!1,className:h="",id:d,value:i,icon:c,children:b,...f})=>{const v=L=>{!s&&u&&u(L.target.checked)},g="mr-2 border flex items-center justify-center transition-all",p=kr[t],x=mr[e],k=xr[o]??"",N=o.startsWith("outline"),$=o.startsWith("soft"),y=`${g} ${p} ${x} ${k} ${a&&(N||$||o==="link")?"peer-checked:bg-current peer-checked:text-white":a?"peer-checked:bg-current":""}`,E={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 ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${h}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:a,onChange:v,disabled:s,id:d,value:i,...f}),l.jsx("span",{className:y.trim(),children:a&&(c??l.jsx(wr,{className:`${E[t]}`}))}),r||b?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??b}):null]})},Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:a,position:u="right",className:s="",menuClassName:h="",width:d="w-48",closeOnSelect:i=!1,transition:c=!0,ariaLabel:b="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,x]=n.useState(!1),k=n.useRef(null),N=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[u],[u]),C=n.useCallback(()=>{const m=N.current,O=k.current;if(!m||!O)return;const{top:M,bottom:P}=m.getBoundingClientRect(),I=O.offsetHeight,j=window.innerHeight-P,H=M;x(j<I&&H>I)},[]),S=n.useCallback(m=>{var O,M;!((O=k.current)!=null&&O.contains(m.target))&&!((M=N.current)!=null&&M.contains(m.target))&&g(!1)},[]),y=n.useCallback(()=>g(m=>!m),[]),E=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",S),()=>document.removeEventListener("mousedown",S)),[S]);const L=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden",p?"bottom-full mb-2":"top-full mt-2",$,d,c&&"transition-all duration-200 ease-out",h].filter(Boolean).join(" "),[p,$,d,c,h]);return l.jsxs("div",{className:`relative inline-block ${s}`,...f,children:[l.jsx("button",{ref:N,onClick:y,"aria-expanded":v,"aria-label":b,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:k,role:"menu",className:L,children:[t&&t,e.map((m,O)=>{const M=()=>{o&&o(m),i&&E()};return l.jsx("div",{children:a?a(m,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:m.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:a="",tooltipStyle:u={}})=>{const s=n.useRef(null),h=n.useRef(null);n.useEffect(()=>{const i=s.current,c=h.current;if(!i||!c)return;const b=()=>{c.style.opacity="1",c.style.visibility="visible"},f=()=>{c.style.opacity="0",c.style.visibility="hidden"};return i.addEventListener("mouseenter",b),i.addEventListener("mouseleave",f),()=>{i.removeEventListener("mouseenter",b),i.removeEventListener("mouseleave",f)}},[]);const d=i=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(i){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return l.jsxs("div",{ref:s,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:h,role:"tooltip",className:a,style:{...d(e),...u},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:a,dismissible:u,onDismiss:s,className:h="",...d})=>{const i=!r&&!!a,c=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${i?"justify-center p-2 w-8 h-8":""} `+h;return l.jsxs("span",{className:c.trim(),...d,children:[a&&l.jsx("span",{className:r?"mr-1":"",children:a}),r,u&&l.jsx("button",{type:"button",onClick:s,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return A({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:a,onChange:u,renderTitle:s,renderContent:h,showArrowIcon:d=!0,panelClasses:i=""})=>{const[c,b]=n.useState(new Set),f=n.useMemo(()=>a?new Set(a):c,[a,c]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),a&&u?u(Array.from(p)):b(p)},[f,a,u,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),x=`accordion-heading-${g.id}`,k=`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:x,type:"button","aria-expanded":p,"aria-controls":k,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:[s?s(g,p):g.title,d?l.jsx(Mr,{}):null]}),l.jsx("div",{id:k,role:"region","aria-labelledby":x,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,children:h?h(g,p):g.content})]},g.id)})})},Q=n.createContext(null),D=()=>{const r=n.useContext(Q);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},V=n.createContext(null),_=()=>n.useContext(V);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:a=!1,containerClasses:u="",onClose:s,disableEscapeClose:h=!1}){const d=_(),i=D(),c=!o&&!!d&&!!i,[b,f]=n.useState(!1),v=c?d.isOpen(r):b,g=c?d.getModalData(r):null,p=n.useCallback(()=>{c?i.closeModal(r):f(!1),s==null||s()},[c,i,r,s]);return n.useEffect(()=>{const x=document.activeElement;console.log(r);const k=document.getElementById(r);console.log("modalEl=",k);const N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!k)return[];const y=k.querySelectorAll(N.join(","));return Array.from(y).filter(E=>E.offsetParent!==null)},C=y=>{if(y.key==="Tab"){const E=$();if(E.length===0)return;const L=E[0],m=E[E.length-1];y.shiftKey?document.activeElement===L&&(y.preventDefault(),m.focus()):document.activeElement===m&&(y.preventDefault(),L.focus())}},S=y=>{y.key==="Escape"&&!h&&p(),C(y)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const y=$();y.length&&y[0].focus()},0),window.addEventListener("keydown",S)),()=>{document.body.style.overflow="",x&&x.focus(),window.removeEventListener("keydown",S)}},[v,h,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 ${u}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),a&&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,a]=n.useState({}),u=n.useCallback((b,f)=>{e(v=>({...v,[b]:!0})),f&&a(v=>({...v,[b]:f}))},[]),s=n.useCallback(b=>{e(f=>({...f,[b]:!1})),a(f=>{const v={...f};return delete v[b],v})},[]),h=n.useCallback(b=>!!t[b],[t]),d=n.useCallback(b=>o[b],[o]),i=n.useMemo(()=>({openModal:u,closeModal:s}),[u,s]),c=n.useMemo(()=>({isOpen:h,getModalData:d}),[h,d]);return l.jsx(Q.Provider,{value:i,children:l.jsx(V.Provider,{value:c,children:r})})}function zr(r){const{openModal:t,closeModal:e}=D(),{isOpen:o,getModalData:a}=_();return{open:u=>t(r,u),close:()=>e(r),isOpen:o(r),data:a(r)}}let B=null,F={};function Tr(r){B=r}function Ar(r){F={...F,...r}}function Dr(){return F}function _r(r,t,e=3e3,o){B?B(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return A({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,a,u,s)=>{const h=Fr();t(d=>[...d,{id:h,type:o,message:a,config:s}]),setTimeout(()=>{t(d=>d.filter(i=>i.id!==h))},u)})},[]);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 d,i,c,b,f,v,g,p,x,k,N,$,C;const a=((d=o.config)==null?void 0:d.icon)||((i=e.icons)==null?void 0:i[o.type])||Wr(o.type),u=((c=o.config)==null?void 0:c.bgColor)||((f=(b=e.colors)==null?void 0:b[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",s=((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",h=((x=o.config)==null?void 0:x.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 ${u} ${s}`,children:[l.jsx("div",{className:h,children:a}),l.jsxs("div",{className:"flex-1 me-3",children:[((k=o.config)==null?void 0:k.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(S=>S.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=hr,w.Checkbox=Cr,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=D,w.useModalInstance=zr,w.useModalState=_,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
8
+ ${O} ${M} ${d}`,children:k}),L&&e&&b&&l.jsx("label",{htmlFor:y,className:`ms-1 ${ar[b]} ${d}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${C==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});K.displayName="Select";const sr={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"},ir={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"},dr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},hr=({children:r,variant:t="primary",size:e="md",type:o="button",shape:a="rounded",className:u="",isLoading:s=!1,disabled:h=!1,...d})=>{const i=h||s,c=["inline-flex items-center justify-center font-normal transition duration-150",sr[t],ir[e],dr[a],a==="flat"?"shadow-none":"shadow-sm",i?"opacity-50 cursor-not-allowed":"cursor-pointer",u].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:c,disabled:i,...d,children:[s&&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),ur=["attr","size","title"];function br(r,t){if(r==null)return{};var e=fr(r,t),o,a;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(a=0;a<u.length;a++)o=u[a],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function fr(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(a){return Object.getOwnPropertyDescriptor(r,a).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){gr(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 gr(r,t,e){return t=vr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function vr(r){var t=pr(r,"string");return typeof t=="symbol"?t:t+""}function pr(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(yr,T({attr:A({},r.attr)},t),J(r.child))}function yr(r){var t=e=>{var{attr:o,size:a,title:u}=r,s=br(r,ur),h=a||e.size||"1em",d;return e.className&&(d=e.className),r.className&&(d=(d?d+" ":"")+r.className),n.createElement("svg",T({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,s,{className:d,style:A(A({color:r.color||e.color},e.style),r.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),u&&n.createElement("title",null,u),r.children)};return X!==void 0?n.createElement(X.Consumer,null,e=>t(e)):t(U)}function wr(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 kr={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"},mr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},xr={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"},Cr=({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",checked:a=!1,onSelectionChange:u,disabled:s=!1,className:h="",id:d,value:i,icon:c,children:b,...f})=>{const v=L=>{!s&&u&&u(L.target.checked)},g="mr-2 border flex items-center justify-center transition-all",p=kr[t],C=mr[e],k=xr[o]??"",N=o.startsWith("outline"),$=o.startsWith("soft"),y=`${g} ${p} ${C} ${k} ${a&&(N||$||o==="link")?"peer-checked:bg-current peer-checked:text-white":a?"peer-checked:bg-current":""}`,m={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 ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${h}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:a,onChange:v,disabled:s,id:d,value:i,...f}),l.jsx("span",{className:y.trim(),children:a&&(c??l.jsx(wr,{className:`${m[t]}`}))}),r||b?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??b}):null]})},Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:a,position:u="right",className:s="",menuClassName:h="",width:d="w-48",closeOnSelect:i=!1,transition:c=!0,ariaLabel:b="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,C]=n.useState(!1),k=n.useRef(null),N=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[u],[u]),S=n.useCallback(()=>{const x=N.current,O=k.current;if(!x||!O)return;const{top:M,bottom:z}=x.getBoundingClientRect(),j=O.offsetHeight,P=window.innerHeight-z,I=M;C(P<j&&I>j)},[]),E=n.useCallback(x=>{var O,M;!((O=k.current)!=null&&O.contains(x.target))&&!((M=N.current)!=null&&M.contains(x.target))&&g(!1)},[]),y=n.useCallback(()=>g(x=>!x),[]),m=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,!0),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,!0)}},[v,S]),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",p?"bottom-full mb-2":"top-full mt-2",$,d,c&&"transition-all duration-200 ease-out",h].filter(Boolean).join(" "),[p,$,d,c,h]);return l.jsxs("div",{className:`relative inline-block ${s}`,...f,children:[l.jsx("button",{ref:N,onClick:y,"aria-expanded":v,"aria-label":b,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:k,role:"menu",className:L,children:[t&&t,e.map((x,O)=>{const M=()=>{o&&o(x),i&&m()};return l.jsx("div",{children:a?a(x,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:x.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:a="",tooltipStyle:u={}})=>{const s=n.useRef(null),h=n.useRef(null);n.useEffect(()=>{const i=s.current,c=h.current;if(!i||!c)return;const b=()=>{c.style.opacity="1",c.style.visibility="visible"},f=()=>{c.style.opacity="0",c.style.visibility="hidden"};return i.addEventListener("mouseenter",b),i.addEventListener("mouseleave",f),()=>{i.removeEventListener("mouseenter",b),i.removeEventListener("mouseleave",f)}},[]);const d=i=>{const c={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(i){case"top":return{...c,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...c,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...c,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...c,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return c}};return l.jsxs("div",{ref:s,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:h,role:"tooltip",className:a,style:{...d(e),...u},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:a,dismissible:u,onDismiss:s,className:h="",...d})=>{const i=!r&&!!a,c=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${i?"justify-center p-2 w-8 h-8":""} `+h;return l.jsxs("span",{className:c.trim(),...d,children:[a&&l.jsx("span",{className:r?"mr-1":"",children:a}),r,u&&l.jsx("button",{type:"button",onClick:s,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:a,onChange:u,renderTitle:s,renderContent:h,showArrowIcon:d=!0,panelClasses:i=""})=>{const[c,b]=n.useState(new Set),f=n.useMemo(()=>a?new Set(a):c,[a,c]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),a&&u?u(Array.from(p)):b(p)},[f,a,u,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),C=`accordion-heading-${g.id}`,k=`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:C,type:"button","aria-expanded":p,"aria-controls":k,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:[s?s(g,p):g.title,d?l.jsx(Mr,{}):null]}),l.jsx("div",{id:k,role:"region","aria-labelledby":C,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${i}`,children:h?h(g,p):g.content})]},g.id)})})},Q=n.createContext(null),_=()=>{const r=n.useContext(Q);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},V=n.createContext(null),B=()=>n.useContext(V);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:a=!1,containerClasses:u="",onClose:s,disableEscapeClose:h=!1}){const d=B(),i=_(),c=!o&&!!d&&!!i,[b,f]=n.useState(!1),v=c?d.isOpen(r):b,g=c?d.getModalData(r):null,p=n.useCallback(()=>{c?i.closeModal(r):f(!1),s==null||s()},[c,i,r,s]);return n.useEffect(()=>{const C=document.activeElement;console.log(r);const k=document.getElementById(r);console.log("modalEl=",k);const N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!k)return[];const y=k.querySelectorAll(N.join(","));return Array.from(y).filter(m=>m.offsetParent!==null)},S=y=>{if(y.key==="Tab"){const m=$();if(m.length===0)return;const L=m[0],x=m[m.length-1];y.shiftKey?document.activeElement===L&&(y.preventDefault(),x.focus()):document.activeElement===x&&(y.preventDefault(),L.focus())}},E=y=>{y.key==="Escape"&&!h&&p(),S(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="",C&&C.focus(),window.removeEventListener("keydown",E)}},[v,h,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 ${u}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),a&&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,a]=n.useState({}),u=n.useCallback((b,f)=>{e(v=>({...v,[b]:!0})),f&&a(v=>({...v,[b]:f}))},[]),s=n.useCallback(b=>{e(f=>({...f,[b]:!1})),a(f=>{const v={...f};return delete v[b],v})},[]),h=n.useCallback(b=>!!t[b],[t]),d=n.useCallback(b=>o[b],[o]),i=n.useMemo(()=>({openModal:u,closeModal:s}),[u,s]),c=n.useMemo(()=>({isOpen:h,getModalData:d}),[h,d]);return l.jsx(Q.Provider,{value:i,children:l.jsx(V.Provider,{value:c,children:r})})}function zr(r){const{openModal:t,closeModal:e}=_(),{isOpen:o,getModalData:a}=B();return{open:u=>t(r,u),close:()=>e(r),isOpen:o(r),data:a(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,a,u,s)=>{const h=Fr();t(d=>[...d,{id:h,type:o,message:a,config:s}]),setTimeout(()=>{t(d=>d.filter(i=>i.id!==h))},u)})},[]);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 d,i,c,b,f,v,g,p,C,k,N,$,S;const a=((d=o.config)==null?void 0:d.icon)||((i=e.icons)==null?void 0:i[o.type])||Wr(o.type),u=((c=o.config)==null?void 0:c.bgColor)||((f=(b=e.colors)==null?void 0:b[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",s=((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",h=((C=o.config)==null?void 0:C.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 ${u} ${s}`,children:[l.jsx("div",{className:h,children:a}),l.jsxs("div",{className:"flex-1 me-3",children:[((k=o.config)==null?void 0:k.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)&&!((S=o.config)!=null&&S.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=hr,w.Checkbox=Cr,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"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
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",