tailwind-ux-kit 1.0.67 → 1.0.69

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,5 +16,5 @@ interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
16
16
  value?: string;
17
17
  icon?: React.ReactNode;
18
18
  }
19
- declare const Checkbox: React.FC<CheckboxProps>;
19
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
20
20
  export default Checkbox;
@@ -1,6 +1,6 @@
1
1
  "use client";
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";
2
+ import { jsxs as C, jsx as l } from "react/jsx-runtime";
3
+ import I, { forwardRef as Y, useState as z, useMemo as P, useId as 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",
@@ -37,37 +37,37 @@ const K = {
37
37
  const {
38
38
  label: r,
39
39
  id: t,
40
- inputSize: s = "md",
41
- shape: u = "rounded",
42
- validate: a,
43
- onValidatedChange: d,
44
- className: c = "",
45
- icon: l,
46
- iconPosition: o = "left",
47
- floatingLabelStyle: f,
40
+ inputSize: o = "md",
41
+ shape: d = "rounded",
42
+ validate: u,
43
+ onValidatedChange: f,
44
+ className: i = "",
45
+ icon: a,
46
+ iconPosition: s = "left",
47
+ floatingLabelStyle: c,
48
48
  onChange: p,
49
49
  isValid: b,
50
50
  isInvalid: g,
51
51
  feedback: m,
52
- iconClasses: C,
53
- feedbackType: h = "invalid",
52
+ iconClasses: k,
53
+ feedbackType: y = "invalid",
54
54
  ...N
55
- } = e, [S, k] = I("default"), $ = z.useCallback(
55
+ } = e, [S, v] = z("default"), $ = I.useCallback(
56
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);
57
+ const M = A.target.value, D = (u == null ? void 0 : u(M)) ?? "default";
58
+ v(D), f == null || f(A, D), p == null || p(A);
59
59
  },
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(
60
+ [u, f, p]
61
+ ), x = P(() => t || (typeof r == "string" ? `input-${r.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, r]), w = !!c, E = K[o] || K.md, h = U[d] || U.flat, L = P(
62
62
  () => ie(S, b, g),
63
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]);
65
- return /* @__PURE__ */ v(
64
+ ), O = P(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), _ = P(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]);
65
+ return /* @__PURE__ */ C(
66
66
  "div",
67
67
  {
68
- className: `w-full relative ${y ? "z-0" : ""} tailwind-ux-input`,
68
+ className: `w-full relative ${w ? "z-0" : ""} tailwind-ux-input`,
69
69
  children: [
70
- !y && r && /* @__PURE__ */ i(
70
+ !w && r && /* @__PURE__ */ l(
71
71
  "label",
72
72
  {
73
73
  htmlFor: x,
@@ -75,43 +75,43 @@ const K = {
75
75
  children: r
76
76
  }
77
77
  ),
78
- /* @__PURE__ */ v("div", { className: "relative w-full", children: [
79
- l && /* @__PURE__ */ i(
78
+ /* @__PURE__ */ C("div", { className: "relative w-full", children: [
79
+ a && /* @__PURE__ */ l(
80
80
  "div",
81
81
  {
82
- className: `absolute inset-y-0 flex items-center ${O} ${C}`,
82
+ className: `absolute inset-y-0 flex items-center ${O} ${k}`,
83
83
  "aria-hidden": "true",
84
- children: l
84
+ children: a
85
85
  }
86
86
  ),
87
- /* @__PURE__ */ i(
87
+ /* @__PURE__ */ l(
88
88
  "input",
89
89
  {
90
90
  ...N,
91
91
  id: x,
92
92
  ref: n,
93
- placeholder: y ? " " : N.placeholder,
93
+ placeholder: w ? " " : N.placeholder,
94
94
  onChange: $,
95
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
96
96
  ${E}
97
- ${y && f && ae[f]}
98
- ${_} ${w} ${L} ${c}`
97
+ ${w && c && ae[c]}
98
+ ${_} ${h} ${L} ${i}`
99
99
  }
100
100
  ),
101
- y && r && f && /* @__PURE__ */ i(
101
+ w && r && c && /* @__PURE__ */ l(
102
102
  "label",
103
103
  {
104
104
  htmlFor: x,
105
- className: `ms-1 ${le[f]} ${c}`,
105
+ className: `ms-1 ${le[c]} ${i}`,
106
106
  children: r
107
107
  }
108
108
  )
109
109
  ] }),
110
- m && /* @__PURE__ */ i(
110
+ m && /* @__PURE__ */ l(
111
111
  "p",
112
112
  {
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,
113
+ className: `mt-1 text-xs ${y === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
114
+ role: y === "invalid" ? "alert" : void 0,
115
115
  children: m
116
116
  }
117
117
  )
@@ -157,27 +157,27 @@ const de = {
157
157
  const {
158
158
  label: r,
159
159
  id: t,
160
- inputSize: s = "md",
161
- shape: u = "rounded",
162
- validate: a,
163
- onValidatedChange: d,
164
- className: c = "",
165
- icon: l,
166
- iconPosition: o = "left",
167
- floatingLabelStyle: f,
160
+ inputSize: o = "md",
161
+ shape: d = "rounded",
162
+ validate: u,
163
+ onValidatedChange: f,
164
+ className: i = "",
165
+ icon: a,
166
+ iconPosition: s = "left",
167
+ floatingLabelStyle: c,
168
168
  onChange: p,
169
169
  isValid: b,
170
170
  isInvalid: g,
171
171
  feedback: m,
172
- feedbackType: C = "invalid",
173
- children: h,
172
+ feedbackType: k = "invalid",
173
+ children: y,
174
174
  ...N
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);
179
- return /* @__PURE__ */ v("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
180
- !E && r && /* @__PURE__ */ i(
175
+ } = e, [S, v] = z("default"), $ = oe(), x = P(() => t || (typeof r == "string" ? `select-${r.toLowerCase().replace(/\s+/g, "-")}` : $), [t, r, $]), w = (M) => {
176
+ const D = M.target.value, G = (u == null ? void 0 : u(D)) ?? "default";
177
+ v(G), f == null || f(M, G), p == null || p(M);
178
+ }, E = !!c, h = de[o], L = ue[d], O = ge(S, b, g);
179
+ return /* @__PURE__ */ C("div", { className: `w-full relative ${E ? "z-0" : ""}`, children: [
180
+ !E && r && /* @__PURE__ */ l(
181
181
  "label",
182
182
  {
183
183
  htmlFor: x,
@@ -185,41 +185,41 @@ const de = {
185
185
  children: r
186
186
  }
187
187
  ),
188
- /* @__PURE__ */ v("div", { className: "relative w-full", children: [
189
- l && /* @__PURE__ */ i(
188
+ /* @__PURE__ */ C("div", { className: "relative w-full", children: [
189
+ a && /* @__PURE__ */ l(
190
190
  "div",
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"}`,
193
- children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
192
+ className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
193
+ children: /* @__PURE__ */ l("span", { className: "text-gray-500", children: a })
194
194
  }
195
195
  ),
196
- /* @__PURE__ */ i(
196
+ /* @__PURE__ */ l(
197
197
  "select",
198
198
  {
199
199
  ...N,
200
200
  id: x,
201
201
  ref: n,
202
- onChange: y,
202
+ onChange: w,
203
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
204
- ${w} ${l && (o === "start" || o === "left") ? "ps-10" : l ? "pe-10" : ""}
205
- ${E && f && fe[f]}
206
- ${L} ${O} ${c}`,
207
- children: h
204
+ ${h} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
205
+ ${E && c && fe[c]}
206
+ ${L} ${O} ${i}`,
207
+ children: y
208
208
  }
209
209
  ),
210
- E && r && f && /* @__PURE__ */ i(
210
+ E && r && c && /* @__PURE__ */ l(
211
211
  "label",
212
212
  {
213
213
  htmlFor: x,
214
- className: `ms-1 ${pe[f]} ${c}`,
214
+ className: `ms-1 ${pe[c]} ${i}`,
215
215
  children: r
216
216
  }
217
217
  )
218
218
  ] }),
219
- m && /* @__PURE__ */ i(
219
+ m && /* @__PURE__ */ l(
220
220
  "p",
221
221
  {
222
- className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
222
+ className: `mt-1 text-xs ${k === "invalid" ? "text-red-600" : "text-green-600"}`,
223
223
  children: m
224
224
  }
225
225
  )
@@ -263,28 +263,28 @@ const me = {
263
263
  rounded: "rounded-sm",
264
264
  pill: "rounded-full",
265
265
  circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
266
- }, Re = ({
266
+ }, He = ({
267
267
  children: e,
268
268
  variant: n = "primary",
269
269
  size: r = "md",
270
270
  type: t = "button",
271
- shape: s = "rounded",
272
- className: u = "",
273
- isLoading: a = !1,
274
- disabled: d = !1,
275
- ...c
271
+ shape: o = "rounded",
272
+ className: d = "",
273
+ isLoading: u = !1,
274
+ disabled: f = !1,
275
+ ...i
276
276
  }) => {
277
- const l = d || a, o = [
277
+ const a = f || u, s = [
278
278
  "inline-flex items-center justify-center font-normal transition duration-150",
279
279
  me[n],
280
280
  xe[r],
281
- he[s],
282
- s === "flat" ? "shadow-none" : "shadow-sm",
283
- l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
284
- u
281
+ he[o],
282
+ o === "flat" ? "shadow-none" : "shadow-sm",
283
+ a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
284
+ d
285
285
  ].filter(Boolean).join(" ");
286
- return /* @__PURE__ */ v("button", { type: t, className: o, disabled: l, ...c, children: [
287
- a && /* @__PURE__ */ v(
286
+ return /* @__PURE__ */ C("button", { type: t, className: s, disabled: a, ...i, children: [
287
+ u && /* @__PURE__ */ C(
288
288
  "svg",
289
289
  {
290
290
  "aria-hidden": "true",
@@ -294,14 +294,14 @@ const me = {
294
294
  fill: "none",
295
295
  xmlns: "http://www.w3.org/2000/svg",
296
296
  children: [
297
- /* @__PURE__ */ i(
297
+ /* @__PURE__ */ l(
298
298
  "path",
299
299
  {
300
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",
301
301
  fill: "currentColor"
302
302
  }
303
303
  ),
304
- /* @__PURE__ */ i(
304
+ /* @__PURE__ */ l(
305
305
  "path",
306
306
  {
307
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",
@@ -320,14 +320,14 @@ var V = {
320
320
  className: void 0,
321
321
  style: void 0,
322
322
  attr: void 0
323
- }, q = z.createContext && /* @__PURE__ */ z.createContext(V), ye = ["attr", "size", "title"];
323
+ }, q = I.createContext && /* @__PURE__ */ I.createContext(V), ye = ["attr", "size", "title"];
324
324
  function we(e, n) {
325
325
  if (e == null) return {};
326
- var r = ve(e, n), t, s;
326
+ var r = ve(e, n), t, o;
327
327
  if (Object.getOwnPropertySymbols) {
328
- var u = Object.getOwnPropertySymbols(e);
329
- for (s = 0; s < u.length; s++)
330
- t = u[s], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
328
+ var d = Object.getOwnPropertySymbols(e);
329
+ for (o = 0; o < d.length; o++)
330
+ t = d[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
331
331
  }
332
332
  return r;
333
333
  }
@@ -355,8 +355,8 @@ function X(e, n) {
355
355
  var r = Object.keys(e);
356
356
  if (Object.getOwnPropertySymbols) {
357
357
  var t = Object.getOwnPropertySymbols(e);
358
- n && (t = t.filter(function(s) {
359
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
358
+ n && (t = t.filter(function(o) {
359
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
360
360
  })), r.push.apply(r, t);
361
361
  }
362
362
  return r;
@@ -390,12 +390,12 @@ function Ne(e, n) {
390
390
  return (n === "string" ? String : Number)(e);
391
391
  }
392
392
  function ee(e) {
393
- return e && e.map((n, r) => /* @__PURE__ */ z.createElement(n.tag, R({
393
+ return e && e.map((n, r) => /* @__PURE__ */ I.createElement(n.tag, R({
394
394
  key: r
395
395
  }, n.attr), ee(n.child)));
396
396
  }
397
397
  function Z(e) {
398
- return (n) => /* @__PURE__ */ z.createElement(Se, F({
398
+ return (n) => /* @__PURE__ */ I.createElement(Se, F({
399
399
  attr: R({}, e.attr)
400
400
  }, n), ee(e.child));
401
401
  }
@@ -403,24 +403,24 @@ function Se(e) {
403
403
  var n = (r) => {
404
404
  var {
405
405
  attr: t,
406
- size: s,
407
- title: u
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({
406
+ size: o,
407
+ title: d
408
+ } = e, u = we(e, ye), f = o || r.size || "1em", i;
409
+ return r.className && (i = r.className), e.className && (i = (i ? i + " " : "") + e.className), /* @__PURE__ */ I.createElement("svg", F({
410
410
  stroke: "currentColor",
411
411
  fill: "currentColor",
412
412
  strokeWidth: "0"
413
- }, r.attr, t, a, {
414
- className: c,
413
+ }, r.attr, t, u, {
414
+ className: i,
415
415
  style: R(R({
416
416
  color: e.color || r.color
417
417
  }, r.style), e.style),
418
- height: d,
419
- width: d,
418
+ height: f,
419
+ width: f,
420
420
  xmlns: "http://www.w3.org/2000/svg"
421
- }), u && /* @__PURE__ */ z.createElement("title", null, u), e.children);
421
+ }), d && /* @__PURE__ */ I.createElement("title", null, d), e.children);
422
422
  };
423
- return q !== void 0 ? /* @__PURE__ */ z.createElement(q.Consumer, null, (r) => n(r)) : n(V);
423
+ return q !== void 0 ? /* @__PURE__ */ I.createElement(q.Consumer, null, (r) => n(r)) : n(V);
424
424
  }
425
425
  function $e(e) {
426
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);
@@ -460,122 +460,127 @@ const Ee = {
460
460
  "soft-info": "soft-info",
461
461
  "soft-dark": "soft-dark",
462
462
  "soft-light": "soft-light"
463
- }, He = ({
464
- label: e,
465
- boxSize: n = "md",
466
- shape: r = "rounded",
467
- variant: t = "success",
468
- checked: s = !1,
469
- onSelectionChange: u,
470
- disabled: a = !1,
471
- className: d = "",
472
- id: c,
473
- value: l,
474
- icon: o,
475
- children: f,
476
- ...p
477
- }) => {
478
- const b = (E) => {
479
- !a && u && u(E.target.checked), p.onChange && p.onChange(E);
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 = {
481
- xs: "w-2 h-2",
482
- sm: "w-2.5 h-2.5",
483
- md: "w-3 h-3",
484
- lg: "w-3.5 h-3.5"
485
- };
486
- return /* @__PURE__ */ v(
487
- "label",
488
- {
489
- className: `flex items-center ${a ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
490
- children: [
491
- /* @__PURE__ */ i(
492
- "input",
493
- {
494
- type: "checkbox",
495
- className: "peer hidden",
496
- checked: s,
497
- onChange: b,
498
- disabled: a,
499
- id: c,
500
- value: l,
501
- ...p
502
- }
503
- ),
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
506
- ]
507
- }
508
- );
509
- }, We = ({
463
+ }, Pe = I.forwardRef(
464
+ ({
465
+ label: e,
466
+ boxSize: n = "md",
467
+ shape: r = "rounded",
468
+ variant: t = "success",
469
+ onSelectionChange: o,
470
+ disabled: d = !1,
471
+ className: u = "",
472
+ id: f,
473
+ value: i,
474
+ icon: a,
475
+ children: s,
476
+ checked: c,
477
+ ...p
478
+ }, b) => {
479
+ const g = (h) => {
480
+ !d && o && o(h.target.checked), p.onChange && p.onChange(h);
481
+ }, m = "mr-2 border flex items-center justify-center transition-all", k = Ee[n], y = Le[r], N = Oe[t] ?? "", S = t.startsWith("outline"), v = t.startsWith("soft"), w = `${m} ${k} ${y} ${N} ${c && (S || v || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : c ? "peer-checked:bg-current" : ""}`, E = {
482
+ xs: "w-2 h-2",
483
+ sm: "w-2.5 h-2.5",
484
+ md: "w-3 h-3",
485
+ lg: "w-3.5 h-3.5"
486
+ };
487
+ return /* @__PURE__ */ C(
488
+ "label",
489
+ {
490
+ className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${u}`,
491
+ children: [
492
+ /* @__PURE__ */ l(
493
+ "input",
494
+ {
495
+ type: "checkbox",
496
+ className: "peer hidden",
497
+ checked: c,
498
+ onChange: g,
499
+ disabled: d,
500
+ id: f,
501
+ value: i,
502
+ ref: b,
503
+ ...p
504
+ }
505
+ ),
506
+ /* @__PURE__ */ l("span", { className: w.trim(), children: c && (a ?? /* @__PURE__ */ l($e, { className: `${E[n]}` })) }),
507
+ e || s ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
508
+ ]
509
+ }
510
+ );
511
+ }
512
+ );
513
+ Pe.displayName = "Checkbox";
514
+ const We = ({
510
515
  label: e,
511
516
  header: n,
512
517
  items: r = [],
513
518
  onSelect: t,
514
- renderItem: s,
515
- position: u = "right",
516
- className: a = "",
517
- menuClassName: d = "",
518
- width: c = "w-48",
519
- closeOnSelect: l = !1,
520
- transition: o = !0,
521
- ariaLabel: f = "Dropdown menu",
519
+ renderItem: o,
520
+ position: d = "right",
521
+ className: u = "",
522
+ menuClassName: f = "",
523
+ width: i = "w-48",
524
+ closeOnSelect: a = !1,
525
+ transition: s = !0,
526
+ ariaLabel: c = "Dropdown menu",
522
527
  ...p
523
528
  }) => {
524
- const [b, g] = I(!1), [m, C] = I(!1), h = B(null), N = B(null), S = P(() => ({
529
+ const [b, g] = z(!1), [m, k] = z(!1), y = B(null), N = B(null), S = P(() => ({
525
530
  left: "left-0",
526
531
  center: "left-1/2 transform -translate-x-1/2",
527
532
  right: "right-0"
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
+ })[d], [d]), v = j(() => {
534
+ const h = N.current, L = y.current;
535
+ if (!h || !L) return;
536
+ const { top: O, bottom: _ } = h.getBoundingClientRect(), A = L.offsetHeight, M = window.innerHeight - _, D = O;
537
+ k(M < A && D > A);
538
+ }, []), $ = j((h) => {
534
539
  var L, O;
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), []);
540
+ !((L = y.current) != null && L.contains(h.target)) && !((O = N.current) != null && O.contains(h.target)) && g(!1);
541
+ }, []), x = j(() => g((h) => !h), []), w = j(() => g(!1), []);
537
542
  T(() => {
538
543
  if (b)
539
- return k(), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
540
- window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
544
+ return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
545
+ window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
541
546
  };
542
- }, [b, k]), T(() => (document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $)), [$]);
547
+ }, [b, v]), T(() => (document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $)), [$]);
543
548
  const E = P(
544
549
  () => [
545
550
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
546
551
  m ? "bottom-full mb-2" : "top-full mt-2",
547
552
  S,
548
- c,
549
- o && "transition-all duration-200 ease-out",
550
- d
553
+ i,
554
+ s && "transition-all duration-200 ease-out",
555
+ f
551
556
  ].filter(Boolean).join(" "),
552
- [m, S, c, o, d]
557
+ [m, S, i, s, f]
553
558
  );
554
- return /* @__PURE__ */ v("div", { className: `relative inline-block ${a}`, ...p, children: [
555
- /* @__PURE__ */ i(
559
+ return /* @__PURE__ */ C("div", { className: `relative inline-block ${u}`, ...p, children: [
560
+ /* @__PURE__ */ l(
556
561
  "button",
557
562
  {
558
563
  ref: N,
559
564
  onClick: x,
560
565
  "aria-expanded": b,
561
- "aria-label": f,
566
+ "aria-label": c,
562
567
  className: "focus:outline-none",
563
568
  children: e
564
569
  }
565
570
  ),
566
- b && /* @__PURE__ */ v("div", { ref: h, role: "menu", className: E, children: [
571
+ b && /* @__PURE__ */ C("div", { ref: y, role: "menu", className: E, children: [
567
572
  n && n,
568
- r.map((w, L) => {
573
+ r.map((h, L) => {
569
574
  const O = () => {
570
- t && t(w), l && y();
575
+ t && t(h), a && w();
571
576
  };
572
- return /* @__PURE__ */ i("div", { children: s ? s(w, O) : /* @__PURE__ */ i(
577
+ return /* @__PURE__ */ l("div", { children: o ? o(h, O) : /* @__PURE__ */ l(
573
578
  "div",
574
579
  {
575
580
  onClick: O,
576
581
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
577
582
  role: "menuitem",
578
- children: w.label
583
+ children: h.label
579
584
  }
580
585
  ) }, L);
581
586
  })
@@ -586,24 +591,24 @@ const Ee = {
586
591
  content: n,
587
592
  position: r = "top",
588
593
  className: t = "",
589
- tooltipClass: s = "",
590
- tooltipStyle: u = {}
594
+ tooltipClass: o = "",
595
+ tooltipStyle: d = {}
591
596
  }) => {
592
- const a = B(null), d = B(null);
597
+ const u = B(null), f = B(null);
593
598
  T(() => {
594
- const l = a.current, o = d.current;
595
- if (!l || !o) return;
596
- const f = () => {
597
- o.style.opacity = "1", o.style.visibility = "visible";
599
+ const a = u.current, s = f.current;
600
+ if (!a || !s) return;
601
+ const c = () => {
602
+ s.style.opacity = "1", s.style.visibility = "visible";
598
603
  }, p = () => {
599
- o.style.opacity = "0", o.style.visibility = "hidden";
604
+ s.style.opacity = "0", s.style.visibility = "hidden";
600
605
  };
601
- return l.addEventListener("mouseenter", f), l.addEventListener("mouseleave", p), () => {
602
- l.removeEventListener("mouseenter", f), l.removeEventListener("mouseleave", p);
606
+ return a.addEventListener("mouseenter", c), a.addEventListener("mouseleave", p), () => {
607
+ a.removeEventListener("mouseenter", c), a.removeEventListener("mouseleave", p);
603
608
  };
604
609
  }, []);
605
- const c = (l) => {
606
- const o = {
610
+ const i = (a) => {
611
+ const s = {
607
612
  position: "absolute",
608
613
  opacity: 0,
609
614
  visibility: "hidden",
@@ -620,10 +625,10 @@ const Ee = {
620
625
  zIndex: 9999,
621
626
  width: "max-content"
622
627
  };
623
- switch (l) {
628
+ switch (a) {
624
629
  case "top":
625
630
  return {
626
- ...o,
631
+ ...s,
627
632
  bottom: "100%",
628
633
  left: "50%",
629
634
  transform: "translateX(-50%)",
@@ -631,7 +636,7 @@ const Ee = {
631
636
  };
632
637
  case "bottom":
633
638
  return {
634
- ...o,
639
+ ...s,
635
640
  top: "100%",
636
641
  left: "50%",
637
642
  transform: "translateX(-50%)",
@@ -639,7 +644,7 @@ const Ee = {
639
644
  };
640
645
  case "left":
641
646
  return {
642
- ...o,
647
+ ...s,
643
648
  right: "100%",
644
649
  top: "50%",
645
650
  transform: "translateY(-50%)",
@@ -647,33 +652,33 @@ const Ee = {
647
652
  };
648
653
  case "right":
649
654
  return {
650
- ...o,
655
+ ...s,
651
656
  left: "100%",
652
657
  top: "50%",
653
658
  transform: "translateY(-50%)",
654
659
  marginLeft: "8px"
655
660
  };
656
661
  default:
657
- return o;
662
+ return s;
658
663
  }
659
664
  };
660
- return /* @__PURE__ */ v("div", { ref: a, className: `relative inline-block ${t}`, children: [
665
+ return /* @__PURE__ */ C("div", { ref: u, className: `relative inline-block ${t}`, children: [
661
666
  e,
662
- /* @__PURE__ */ i(
667
+ /* @__PURE__ */ l(
663
668
  "div",
664
669
  {
665
- ref: d,
670
+ ref: f,
666
671
  role: "tooltip",
667
- className: s,
672
+ className: o,
668
673
  style: {
669
- ...c(r),
670
- ...u
674
+ ...i(r),
675
+ ...d
671
676
  },
672
677
  children: n
673
678
  }
674
679
  )
675
680
  ] });
676
- }, Pe = {
681
+ }, je = {
677
682
  primary: "bg-blue-500 text-white",
678
683
  secondary: "bg-gray-500 text-white",
679
684
  success: "bg-green-500 text-white",
@@ -691,13 +696,13 @@ const Ee = {
691
696
  "outline-info": "border border-cyan-500 text-cyan-500 bg-transparent",
692
697
  "outline-dark": "border border-black text-black bg-transparent",
693
698
  "outline-light": "border border-gray-100 text-gray-800 bg-transparent"
694
- }, je = {
699
+ }, Ie = {
695
700
  xs: "text-xs px-2 py-0.5",
696
701
  sm: "text-sm px-2.5 py-0.5",
697
702
  md: "text-base px-3 py-1",
698
703
  lg: "text-lg px-3.5 py-1.5",
699
704
  xl: "text-xl px-4 py-2"
700
- }, Ie = {
705
+ }, ze = {
701
706
  flat: "rounded-none",
702
707
  rounded: "rounded-sm",
703
708
  pill: "rounded-full",
@@ -707,28 +712,28 @@ const Ee = {
707
712
  variant: n = "primary",
708
713
  size: r = "sm",
709
714
  shape: t = "rounded",
710
- icon: s,
711
- dismissible: u,
712
- onDismiss: a,
713
- className: d = "",
714
- ...c
715
+ icon: o,
716
+ dismissible: d,
717
+ onDismiss: u,
718
+ className: f = "",
719
+ ...i
715
720
  }) => {
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;
717
- return /* @__PURE__ */ v("span", { className: o.trim(), ...c, children: [
718
- s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
721
+ const a = !e && !!o, s = `inline-flex items-center font-medium ${je[n] || ""} ${Ie[r] || ""} ${ze[t] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + f;
722
+ return /* @__PURE__ */ C("span", { className: s.trim(), ...i, children: [
723
+ o && /* @__PURE__ */ l("span", { className: e ? "mr-1" : "", children: o }),
719
724
  e,
720
- u && /* @__PURE__ */ i(
725
+ d && /* @__PURE__ */ l(
721
726
  "button",
722
727
  {
723
728
  type: "button",
724
- onClick: a,
729
+ onClick: u,
725
730
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
726
731
  children: "×"
727
732
  }
728
733
  )
729
734
  ] });
730
735
  };
731
- function ze(e) {
736
+ function Ae(e) {
732
737
  return Z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z" }, child: [] }] })(e);
733
738
  }
734
739
  const Ke = ({
@@ -736,57 +741,57 @@ const Ke = ({
736
741
  allowMultipleOpen: n = !1,
737
742
  className: r = "",
738
743
  tileClasses: t = "",
739
- open: s,
740
- onChange: u,
741
- renderTitle: a,
742
- renderContent: d,
743
- showArrowIcon: c = !0,
744
- panelClasses: l = ""
744
+ open: o,
745
+ onChange: d,
746
+ renderTitle: u,
747
+ renderContent: f,
748
+ showArrowIcon: i = !0,
749
+ panelClasses: a = ""
745
750
  }) => {
746
- const [o, f] = I(/* @__PURE__ */ new Set()), p = P(() => s ? new Set(s) : o, [s, o]), b = j(
751
+ const [s, c] = z(/* @__PURE__ */ new Set()), p = P(() => o ? new Set(o) : s, [o, s]), b = j(
747
752
  (g) => {
748
753
  const m = new Set(p);
749
- m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), s && u ? u(Array.from(m)) : f(m);
754
+ m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && d ? d(Array.from(m)) : c(m);
750
755
  },
751
- [p, s, u, n]
756
+ [p, o, d, n]
752
757
  );
753
- return /* @__PURE__ */ i(
758
+ return /* @__PURE__ */ l(
754
759
  "div",
755
760
  {
756
761
  className: "accordion",
757
762
  role: "region",
758
763
  "aria-multiselectable": n,
759
764
  children: e.map((g) => {
760
- const m = p.has(g.id), C = `accordion-heading-${g.id}`, h = `accordion-panel-${g.id}`;
761
- return /* @__PURE__ */ v(
765
+ const m = p.has(g.id), k = `accordion-heading-${g.id}`, y = `accordion-panel-${g.id}`;
766
+ return /* @__PURE__ */ C(
762
767
  "div",
763
768
  {
764
769
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${r}`,
765
770
  children: [
766
- /* @__PURE__ */ v(
771
+ /* @__PURE__ */ C(
767
772
  "button",
768
773
  {
769
- id: C,
774
+ id: k,
770
775
  type: "button",
771
776
  "aria-expanded": m,
772
- "aria-controls": h,
777
+ "aria-controls": y,
773
778
  onClick: () => b(g.id),
774
779
  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}`,
775
780
  children: [
776
- a ? a(g, m) : g.title,
777
- c ? /* @__PURE__ */ i(ze, {}) : null
781
+ u ? u(g, m) : g.title,
782
+ i ? /* @__PURE__ */ l(Ae, {}) : null
778
783
  ]
779
784
  }
780
785
  ),
781
- /* @__PURE__ */ i(
786
+ /* @__PURE__ */ l(
782
787
  "div",
783
788
  {
784
- id: h,
789
+ id: y,
785
790
  role: "region",
786
- "aria-labelledby": C,
791
+ "aria-labelledby": k,
787
792
  hidden: !m,
788
- className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
789
- children: d ? d(g, m) : g.content
793
+ className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
794
+ children: f ? f(g, m) : g.content
790
795
  }
791
796
  )
792
797
  ]
@@ -809,19 +814,19 @@ function Ue({
809
814
  title: n,
810
815
  children: r,
811
816
  standalone: t = !1,
812
- showFloatingClose: s = !1,
813
- containerClasses: u = "",
814
- onClose: a,
815
- disableEscapeClose: d = !1
817
+ showFloatingClose: o = !1,
818
+ containerClasses: d = "",
819
+ onClose: u,
820
+ disableEscapeClose: f = !1
816
821
  }) {
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]);
822
+ const i = se(), a = re(), s = !t && !!i && !!a, [c, p] = z(!1), b = s ? i.isOpen(e) : c, g = s ? i.getModalData(e) : null, m = j(() => {
823
+ s ? a.closeModal(e) : p(!1), u == null || u();
824
+ }, [s, a, e, u]);
820
825
  return T(() => {
821
- const C = document.activeElement;
826
+ const k = document.activeElement;
822
827
  console.log(e);
823
- const h = document.getElementById(e);
824
- console.log("modalEl=", h);
828
+ const y = document.getElementById(e);
829
+ console.log("modalEl=", y);
825
830
  const N = [
826
831
  "a[href]",
827
832
  "button:not([disabled])",
@@ -830,40 +835,40 @@ function Ue({
830
835
  "select:not([disabled])",
831
836
  '[tabindex]:not([tabindex="-1"])'
832
837
  ], S = () => {
833
- if (!h) return [];
834
- const x = h.querySelectorAll(
838
+ if (!y) return [];
839
+ const x = y.querySelectorAll(
835
840
  N.join(",")
836
841
  );
837
- return Array.from(x).filter((y) => y.offsetParent !== null);
838
- }, k = (x) => {
842
+ return Array.from(x).filter((w) => w.offsetParent !== null);
843
+ }, v = (x) => {
839
844
  if (x.key === "Tab") {
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());
845
+ const w = S();
846
+ if (w.length === 0) return;
847
+ const E = w[0], h = w[w.length - 1];
848
+ x.shiftKey ? document.activeElement === E && (x.preventDefault(), h.focus()) : document.activeElement === h && (x.preventDefault(), E.focus());
844
849
  }
845
850
  }, $ = (x) => {
846
- x.key === "Escape" && !d && m(), k(x);
851
+ x.key === "Escape" && !f && m(), v(x);
847
852
  };
848
853
  return b && (document.body.style.overflow = "hidden", setTimeout(() => {
849
854
  const x = S();
850
855
  x.length && x[0].focus();
851
856
  }, 0), window.addEventListener("keydown", $)), () => {
852
- document.body.style.overflow = "", C && C.focus(), window.removeEventListener("keydown", $);
857
+ document.body.style.overflow = "", k && k.focus(), window.removeEventListener("keydown", $);
853
858
  };
854
- }, [b, d, m, e]), b ? /* @__PURE__ */ i(
859
+ }, [b, f, m, e]), b ? /* @__PURE__ */ l(
855
860
  "div",
856
861
  {
857
862
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
858
863
  id: e,
859
- children: /* @__PURE__ */ v(
864
+ children: /* @__PURE__ */ C(
860
865
  "div",
861
866
  {
862
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${u}`,
867
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
863
868
  children: [
864
- /* @__PURE__ */ v("div", { className: "flex justify-between items-center relative", children: [
865
- n && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: n }),
866
- s && /* @__PURE__ */ i(
869
+ /* @__PURE__ */ C("div", { className: "flex justify-between items-center relative", children: [
870
+ n && /* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: n }),
871
+ o && /* @__PURE__ */ l(
867
872
  "button",
868
873
  {
869
874
  onClick: m,
@@ -873,7 +878,7 @@ function Ue({
873
878
  }
874
879
  )
875
880
  ] }),
876
- /* @__PURE__ */ i("div", { className: "mt-3 text-sm text-gray-700", children: typeof r == "function" ? r({ modalData: g }) : r })
881
+ /* @__PURE__ */ l("div", { className: "mt-3 text-sm text-gray-700", children: typeof r == "function" ? r({ modalData: g }) : r })
877
882
  ]
878
883
  }
879
884
  )
@@ -883,85 +888,85 @@ function Ue({
883
888
  function qe({
884
889
  children: e
885
890
  }) {
886
- const [n, r] = I({}), [t, s] = I({}), u = j((f, p) => {
887
- r((b) => ({ ...b, [f]: !0 })), p && s((b) => ({ ...b, [f]: p }));
888
- }, []), a = j((f) => {
889
- r((p) => ({ ...p, [f]: !1 })), s((p) => {
891
+ const [n, r] = z({}), [t, o] = z({}), d = j((c, p) => {
892
+ r((b) => ({ ...b, [c]: !0 })), p && o((b) => ({ ...b, [c]: p }));
893
+ }, []), u = j((c) => {
894
+ r((p) => ({ ...p, [c]: !1 })), o((p) => {
890
895
  const b = { ...p };
891
- return delete b[f], b;
896
+ return delete b[c], b;
892
897
  });
893
- }, []), d = j((f) => !!n[f], [n]), c = j(
894
- (f) => t[f],
898
+ }, []), f = j((c) => !!n[c], [n]), i = j(
899
+ (c) => t[c],
895
900
  [t]
896
- ), l = P(
897
- () => ({ openModal: u, closeModal: a }),
898
- [u, a]
899
- ), o = P(
900
- () => ({ isOpen: d, getModalData: c }),
901
- [d, c]
901
+ ), a = P(
902
+ () => ({ openModal: d, closeModal: u }),
903
+ [d, u]
904
+ ), s = P(
905
+ () => ({ isOpen: f, getModalData: i }),
906
+ [f, i]
902
907
  );
903
- return /* @__PURE__ */ i(te.Provider, { value: l, children: /* @__PURE__ */ i(ne.Provider, { value: o, children: e }) });
908
+ return /* @__PURE__ */ l(te.Provider, { value: a, children: /* @__PURE__ */ l(ne.Provider, { value: s, children: e }) });
904
909
  }
905
910
  function Xe(e) {
906
- const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: s } = se();
911
+ const { openModal: n, closeModal: r } = re(), { isOpen: t, getModalData: o } = se();
907
912
  return {
908
- open: (u) => n(e, u),
913
+ open: (d) => n(e, d),
909
914
  close: () => r(e),
910
915
  isOpen: t(e),
911
- data: s(e)
916
+ data: o(e)
912
917
  };
913
918
  }
914
919
  let H = null, W = {};
915
- function Ae(e) {
920
+ function Me(e) {
916
921
  H = e;
917
922
  }
918
923
  function Ye(e) {
919
924
  W = { ...W, ...e };
920
925
  }
921
- function Me() {
926
+ function De() {
922
927
  return W;
923
928
  }
924
929
  function Je(e, n, r = 3e3, t) {
925
930
  H ? H(e, n, r, t) : console.warn("Toast system is not mounted");
926
931
  }
927
- function De(e) {
932
+ function Te(e) {
928
933
  return Z({ attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor" }, child: [] }] })(e);
929
934
  }
930
- const Te = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
935
+ const _e = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
931
936
  const n = Math.random() * 16 | 0;
932
937
  return (e === "x" ? n : n & 3 | 8).toString(16);
933
938
  }), Qe = () => {
934
- const [e, n] = I([]);
939
+ const [e, n] = z([]);
935
940
  T(() => {
936
- Ae((t, s, u, a) => {
937
- const d = Te();
938
- n((c) => [...c, { id: d, type: t, message: s, config: a }]), setTimeout(() => {
939
- n((c) => c.filter((l) => l.id !== d));
940
- }, u);
941
+ Me((t, o, d, u) => {
942
+ const f = _e();
943
+ n((i) => [...i, { id: f, type: t, message: o, config: u }]), setTimeout(() => {
944
+ n((i) => i.filter((a) => a.id !== f));
945
+ }, d);
941
946
  });
942
947
  }, []);
943
- const r = Me();
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";
947
- return /* @__PURE__ */ v(
948
+ const r = De();
949
+ return /* @__PURE__ */ l("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
950
+ var i, a, s, c, p, b, g, m, k, y, N, S, v;
951
+ const o = ((i = t.config) == null ? void 0 : i.icon) || ((a = r.icons) == null ? void 0 : a[t.type]) || Be(t.type), d = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (c = r.colors) == null ? void 0 : c[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", u = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = r.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", f = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
952
+ return /* @__PURE__ */ C(
948
953
  "div",
949
954
  {
950
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${u} ${a}`,
955
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${u}`,
951
956
  children: [
952
- /* @__PURE__ */ i("div", { className: d, children: s }),
953
- /* @__PURE__ */ v("div", { className: "flex-1 me-3", children: [
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 })
957
+ /* @__PURE__ */ l("div", { className: f, children: o }),
958
+ /* @__PURE__ */ C("div", { className: "flex-1 me-3", children: [
959
+ ((y = t.config) == null ? void 0 : y.title) && /* @__PURE__ */ l("div", { className: "font-semibold text-black", children: t.config.title }),
960
+ ((N = t.config) == null ? void 0 : N.description) && /* @__PURE__ */ l("div", { className: "text-sm text-gray-500", children: t.config.description }),
961
+ !((S = t.config) != null && S.title) && !((v = t.config) != null && v.description) && /* @__PURE__ */ l("div", { className: "text-sm", children: t.message })
957
962
  ] }),
958
- /* @__PURE__ */ i(
963
+ /* @__PURE__ */ l(
959
964
  "button",
960
965
  {
961
966
  onClick: () => n(($) => $.filter((x) => x.id !== t.id)),
962
967
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
963
968
  "aria-label": "Close",
964
- children: /* @__PURE__ */ i(De, { size: 18 })
969
+ children: /* @__PURE__ */ l(Te, { size: 18 })
965
970
  }
966
971
  )
967
972
  ]
@@ -970,7 +975,7 @@ const Te = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
970
975
  );
971
976
  }) });
972
977
  };
973
- function _e(e) {
978
+ function Be(e) {
974
979
  switch (e) {
975
980
  case "success":
976
981
  return "✅";
@@ -985,8 +990,8 @@ function _e(e) {
985
990
  export {
986
991
  Ke as Accordion,
987
992
  Ge as Badge,
988
- Re as Button,
989
- He as Checkbox,
993
+ He as Button,
994
+ Pe as Checkbox,
990
995
  We as Dropdown,
991
996
  ce as Input,
992
997
  Ue as Modal,
@@ -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,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
2
+ /*$vite$:1*/`,document.head.appendChild(W);const Z={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},G={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},or={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},er={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},tr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(r){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},q=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,iconClasses:S,feedbackType:m="invalid",...N}=r,[$,C]=n.useState("default"),E=n.useCallback(j=>{const P=j.target.value,I=(u==null?void 0:u(P))??"default";C(I),b==null||b(j,I),f==null||f(j)},[u,b,f]),y=n.useMemo(()=>o||(typeof e=="string"?`input-${e.toLowerCase().replace(/\s+/g,"-")}`:`input-${Math.random().toString(36).slice(2)}`),[o,e]),x=!!d,L=Z[c]||Z.md,k=G[h]||G.flat,O=n.useMemo(()=>tr($,v,g),[$,v,g]),M=n.useMemo(()=>a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",[a]),z=n.useMemo(()=>s?a==="start"||a==="left"?"ps-10":"pe-10":"",[s,a]);return l.jsxs("div",{className:`w-full relative ${x?"z-0":""} tailwind-ux-input`,children:[!x&&e&&l.jsx("label",{htmlFor:y,className:`block mb-1 text-sm ${v?"text-green-700 dark:text-green-500":g?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${M} ${S}`,"aria-hidden":"true",children:s}),l.jsx("input",{...N,id:y,ref:t,placeholder:x?" ":N.placeholder,onChange:E,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
3
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
- ${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 ${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),f.onChange&&f.onChange(L)},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 w-auto",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"})});
4
+ ${x&&d&&or[d]}
5
+ ${z} ${k} ${O} ${i}`}),x&&e&&d&&l.jsx("label",{htmlFor:y,className:`ms-1 ${er[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,role:m==="invalid"?"alert":void 0,children:p})]})});q.displayName="Input";const lr={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},nr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},ar={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},cr={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},sr=(r,t,e)=>{if(e)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(t)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";const o="focus:ring focus:border";switch(r){case"error":return`${o}-red-500 border-red-500 bg-red-50`;case"warning":return`${o}-yellow-500 border-yellow-500 bg-yellow-50`;case"success":return`${o}-green-500 border-green-500 bg-green-50`;default:return"border-gray-300 focus:ring-blue-500"}},K=n.forwardRef((r,t)=>{const{label:e,id:o,inputSize:c="md",shape:h="rounded",validate:u,onValidatedChange:b,className:i="",icon:s,iconPosition:a="left",floatingLabelStyle:d,onChange:f,isValid:v,isInvalid:g,feedback:p,feedbackType:S="invalid",children:m,...N}=r,[$,C]=n.useState("default"),E=n.useId(),y=n.useMemo(()=>o||(typeof e=="string"?`select-${e.toLowerCase().replace(/\s+/g,"-")}`:E),[o,e,E]),x=P=>{const I=P.target.value,rr=(u==null?void 0:u(I))??"default";C(rr),b==null||b(P,rr),f==null||f(P)},L=!!d,k=lr[c],O=nr[h],M=sr($,v,g),z=s&&(a==="start"||a==="left")?"ps-10":s?"pe-10":"",j=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5";return l.jsxs("div",{className:`w-full relative ${L?"z-0":""}`,children:[!L&&e&&l.jsx("label",{htmlFor:y,className:`block mb-1 text-sm ${v?"text-green-700":g?"text-red-700":"text-gray-700"}`,children:e}),l.jsxs("div",{className:"relative w-full",children:[s&&l.jsx("div",{className:`absolute inset-y-0 flex items-center ${j}`,children:l.jsx("span",{className:"text-gray-500",children:s})}),l.jsx("select",{...N,id:y,ref:t,onChange:x,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
6
+ ${k} ${z}
7
+ ${L&&d&&ar[d]}
8
+ ${O} ${M} ${i}`,children:m}),L&&e&&d&&l.jsx("label",{htmlFor:y,className:`ms-1 ${cr[d]} ${i}`,children:e})]}),p&&l.jsx("p",{className:`mt-1 text-xs ${S==="invalid"?"text-red-600":"text-green-600"}`,children:p})]})});K.displayName="Select";const ir={primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",warning:"btn-warning",info:"btn-info",dark:"btn-dark",light:"btn-light",link:"btn-link","outline-primary":"btn-outline-primary","outline-secondary":"btn-outline-secondary","outline-success":"btn-outline-success","outline-danger":"btn-outline-danger","outline-warning":"btn-outline-warning","outline-info":"btn-outline-info","outline-dark":"btn-outline-dark","outline-light":"btn-outline-light","soft-primary":"btn-soft-primary","soft-secondary":"btn-soft-secondary","soft-success":"btn-soft-success","soft-danger":"btn-soft-danger","soft-warning":"btn-soft-warning","soft-info":"btn-soft-info","soft-dark":"btn-soft-dark","soft-light":"btn-soft-light"},dr={xs:"px-3 py-2 text-xs",sm:"px-3 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},hr={flat:"shadow-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full w-10 h-10 p-0 flex items-center justify-center"},ur=({children:r,variant:t="primary",size:e="md",type:o="button",shape:c="rounded",className:h="",isLoading:u=!1,disabled:b=!1,...i})=>{const s=b||u,a=["inline-flex items-center justify-center font-normal transition duration-150",ir[t],dr[e],hr[c],c==="flat"?"shadow-none":"shadow-sm",s?"opacity-50 cursor-not-allowed":"cursor-pointer",h].filter(Boolean).join(" ");return l.jsxs("button",{type:o,className:a,disabled:s,...i,children:[u&&l.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 me-3 text-gray-200 animate-spin dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})]}),r]})};var U={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},X=n.createContext&&n.createContext(U),br=["attr","size","title"];function fr(r,t){if(r==null)return{};var e=gr(r,t),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(c=0;c<h.length;c++)o=h[c],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(e[o]=r[o])}return e}function gr(r,t){if(r==null)return{};var e={};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(t.indexOf(o)>=0)continue;e[o]=r[o]}return e}function T(){return T=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},T.apply(this,arguments)}function Y(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),e.push.apply(e,o)}return e}function A(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Y(Object(e),!0).forEach(function(o){vr(r,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Y(Object(e)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o))})}return r}function vr(r,t,e){return t=pr(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function pr(r){var t=yr(r,"string");return typeof t=="symbol"?t:t+""}function yr(r,t){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var o=e.call(r,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function J(r){return r&&r.map((t,e)=>n.createElement(t.tag,A({key:e},t.attr),J(t.child)))}function D(r){return t=>n.createElement(wr,T({attr:A({},r.attr)},t),J(r.child))}function wr(r){var t=e=>{var{attr:o,size:c,title:h}=r,u=fr(r,br),b=c||e.size||"1em",i;return e.className&&(i=e.className),r.className&&(i=(i?i+" ":"")+r.className),n.createElement("svg",T({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,o,u,{className:i,style:A(A({color:r.color||e.color},e.style),r.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),h&&n.createElement("title",null,h),r.children)};return X!==void 0?n.createElement(X.Consumer,null,e=>t(e)):t(U)}function kr(r){return D({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(r)}const mr={xs:"w-3 h-3 text-[10px]",sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"},xr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},Cr={primary:"primary",secondary:"secondary",success:"success",danger:"danger",warning:"warning",info:"info",dark:"dark",light:"light",link:"link","outline-primary":"outline-primary","outline-secondary":"outline-secondary","outline-success":"outline-success","outline-danger":"outline-danger","outline-warning":"outline-warning","outline-info":"outline-info","outline-dark":"outline-dark","outline-light":"outline-light","soft-primary":"soft-primary","soft-secondary":"soft-secondary","soft-success":"soft-success","soft-danger":"soft-danger","soft-warning":"soft-warning","soft-info":"soft-info","soft-dark":"soft-dark","soft-light":"soft-light"},Q=n.forwardRef(({label:r,boxSize:t="md",shape:e="rounded",variant:o="success",onSelectionChange:c,disabled:h=!1,className:u="",id:b,value:i,icon:s,children:a,checked:d,...f},v)=>{const g=k=>{!h&&c&&c(k.target.checked),f.onChange&&f.onChange(k)},p="mr-2 border flex items-center justify-center transition-all",S=mr[t],m=xr[e],N=Cr[o]??"",$=o.startsWith("outline"),C=o.startsWith("soft"),x=`${p} ${S} ${m} ${N} ${d&&($||C||o==="link")?"peer-checked:bg-current peer-checked:text-white":d?"peer-checked:bg-current":""}`,L={xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"};return l.jsxs("label",{className:`flex items-center ${h?"opacity-50 cursor-not-allowed":"cursor-pointer"} me-4 ${u}`,children:[l.jsx("input",{type:"checkbox",className:"peer hidden",checked:d,onChange:g,disabled:h,id:b,value:i,ref:v,...f}),l.jsx("span",{className:x.trim(),children:d&&(s??l.jsx(kr,{className:`${L[t]}`}))}),r||a?l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-300",children:r??a}):null]})});Q.displayName="Checkbox";const Sr=({label:r,header:t,items:e=[],onSelect:o,renderItem:c,position:h="right",className:u="",menuClassName:b="",width:i="w-48",closeOnSelect:s=!1,transition:a=!0,ariaLabel:d="Dropdown menu",...f})=>{const[v,g]=n.useState(!1),[p,S]=n.useState(!1),m=n.useRef(null),N=n.useRef(null),$=n.useMemo(()=>({left:"left-0",center:"left-1/2 transform -translate-x-1/2",right:"right-0"})[h],[h]),C=n.useCallback(()=>{const k=N.current,O=m.current;if(!k||!O)return;const{top:M,bottom:z}=k.getBoundingClientRect(),j=O.offsetHeight,P=window.innerHeight-z,I=M;S(P<j&&I>j)},[]),E=n.useCallback(k=>{var O,M;!((O=m.current)!=null&&O.contains(k.target))&&!((M=N.current)!=null&&M.contains(k.target))&&g(!1)},[]),y=n.useCallback(()=>g(k=>!k),[]),x=n.useCallback(()=>g(!1),[]);n.useEffect(()=>{if(v)return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[v,C]),n.useEffect(()=>(document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)),[E]);const L=n.useMemo(()=>["absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",p?"bottom-full mb-2":"top-full mt-2",$,i,a&&"transition-all duration-200 ease-out",b].filter(Boolean).join(" "),[p,$,i,a,b]);return l.jsxs("div",{className:`relative inline-block ${u}`,...f,children:[l.jsx("button",{ref:N,onClick:y,"aria-expanded":v,"aria-label":d,className:"focus:outline-none",children:r}),v&&l.jsxs("div",{ref:m,role:"menu",className:L,children:[t&&t,e.map((k,O)=>{const M=()=>{o&&o(k),s&&x()};return l.jsx("div",{children:c?c(k,M):l.jsx("div",{onClick:M,className:"px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",role:"menuitem",children:k.label})},O)})]})]})},Nr=({children:r,content:t,position:e="top",className:o="",tooltipClass:c="",tooltipStyle:h={}})=>{const u=n.useRef(null),b=n.useRef(null);n.useEffect(()=>{const s=u.current,a=b.current;if(!s||!a)return;const d=()=>{a.style.opacity="1",a.style.visibility="visible"},f=()=>{a.style.opacity="0",a.style.visibility="hidden"};return s.addEventListener("mouseenter",d),s.addEventListener("mouseleave",f),()=>{s.removeEventListener("mouseenter",d),s.removeEventListener("mouseleave",f)}},[]);const i=s=>{const a={position:"absolute",opacity:0,visibility:"hidden",transition:"opacity 0.2s ease",maxWidth:"240px",whiteSpace:"normal",wordBreak:"break-word",padding:"8px 12px",fontSize:"0.875rem",backgroundColor:"black",color:"white",borderRadius:"4px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:9999,width:"max-content"};switch(s){case"top":return{...a,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"8px"};case"bottom":return{...a,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"8px"};case"left":return{...a,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"8px"};case"right":return{...a,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px"};default:return a}};return l.jsxs("div",{ref:u,className:`relative inline-block ${o}`,children:[r,l.jsx("div",{ref:b,role:"tooltip",className:c,style:{...i(e),...h},children:t})]})},$r={primary:"bg-blue-500 text-white",secondary:"bg-gray-500 text-white",success:"bg-green-500 text-white",danger:"bg-red-500 text-white",warning:"bg-yellow-400 text-black",info:"bg-cyan-500 text-white",dark:"bg-black text-white",light:"bg-gray-100 text-gray-800",link:"bg-transparent text-blue-500 underline","outline-primary":"border border-blue-500 text-blue-500 bg-transparent","outline-secondary":"border border-gray-500 text-gray-500 bg-transparent","outline-success":"border border-green-500 text-green-500 bg-transparent","outline-danger":"border border-red-500 text-red-500 bg-transparent","outline-warning":"border border-yellow-400 text-yellow-500 bg-transparent","outline-info":"border border-cyan-500 text-cyan-500 bg-transparent","outline-dark":"border border-black text-black bg-transparent","outline-light":"border border-gray-100 text-gray-800 bg-transparent"},Er={xs:"text-xs px-2 py-0.5",sm:"text-sm px-2.5 py-0.5",md:"text-base px-3 py-1",lg:"text-lg px-3.5 py-1.5",xl:"text-xl px-4 py-2"},Lr={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full",circle:"rounded-full p-2 w-8 h-8 justify-center"},Or=({label:r,variant:t="primary",size:e="sm",shape:o="rounded",icon:c,dismissible:h,onDismiss:u,className:b="",...i})=>{const s=!r&&!!c,a=`inline-flex items-center font-medium ${$r[t]||""} ${Er[e]||""} ${Lr[o]||""} ${s?"justify-center p-2 w-8 h-8":""} `+b;return l.jsxs("span",{className:a.trim(),...i,children:[c&&l.jsx("span",{className:r?"mr-1":"",children:c}),r,h&&l.jsx("button",{type:"button",onClick:u,className:"ml-2 text-xs font-bold leading-none focus:outline-none",children:"×"})]})};function Mr(r){return D({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(r)}const jr=({items:r,allowMultipleOpen:t=!1,className:e="",tileClasses:o="",open:c,onChange:h,renderTitle:u,renderContent:b,showArrowIcon:i=!0,panelClasses:s=""})=>{const[a,d]=n.useState(new Set),f=n.useMemo(()=>c?new Set(c):a,[c,a]),v=n.useCallback(g=>{const p=new Set(f);p.has(g)?p.delete(g):(t||p.clear(),p.add(g)),c&&h?h(Array.from(p)):d(p)},[f,c,h,t]);return l.jsx("div",{className:"accordion",role:"region","aria-multiselectable":t,children:r.map(g=>{const p=f.has(g.id),S=`accordion-heading-${g.id}`,m=`accordion-panel-${g.id}`;return l.jsxs("div",{className:`accordion-item border rounded border-gray-300 dark:border-gray-700 ${e}`,children:[l.jsxs("button",{id:S,type:"button","aria-expanded":p,"aria-controls":m,onClick:()=>v(g.id),className:`flex justify-between items-center w-full p-1.5 text-left text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none gap-3 ${o}`,children:[u?u(g,p):g.title,i?l.jsx(Mr,{}):null]}),l.jsx("div",{id:m,role:"region","aria-labelledby":S,hidden:!p,className:`p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${s}`,children:b?b(g,p):g.content})]},g.id)})})},V=n.createContext(null),_=()=>{const r=n.useContext(V);if(!r)throw new Error("useModalActions must be used within a ModalActionProvider");return r},R=n.createContext(null),B=()=>n.useContext(R);function Pr({id:r,title:t,children:e,standalone:o=!1,showFloatingClose:c=!1,containerClasses:h="",onClose:u,disableEscapeClose:b=!1}){const i=B(),s=_(),a=!o&&!!i&&!!s,[d,f]=n.useState(!1),v=a?i.isOpen(r):d,g=a?i.getModalData(r):null,p=n.useCallback(()=>{a?s.closeModal(r):f(!1),u==null||u()},[a,s,r,u]);return n.useEffect(()=>{const S=document.activeElement;console.log(r);const m=document.getElementById(r);console.log("modalEl=",m);const N=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],$=()=>{if(!m)return[];const y=m.querySelectorAll(N.join(","));return Array.from(y).filter(x=>x.offsetParent!==null)},C=y=>{if(y.key==="Tab"){const x=$();if(x.length===0)return;const L=x[0],k=x[x.length-1];y.shiftKey?document.activeElement===L&&(y.preventDefault(),k.focus()):document.activeElement===k&&(y.preventDefault(),L.focus())}},E=y=>{y.key==="Escape"&&!b&&p(),C(y)};return v&&(document.body.style.overflow="hidden",setTimeout(()=>{const y=$();y.length&&y[0].focus()},0),window.addEventListener("keydown",E)),()=>{document.body.style.overflow="",S&&S.focus(),window.removeEventListener("keydown",E)}},[v,b,p,r]),v?l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",id:r,children:l.jsxs("div",{className:`bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${h}`,children:[l.jsxs("div",{className:"flex justify-between items-center relative",children:[t&&l.jsx("h2",{className:"text-lg font-semibold",children:t}),c&&l.jsx("button",{onClick:p,className:"text-gray-500 hover:text-black absolute top-2 right-3 hover:bg-gray-200 rounded-full aspect-square w-8","aria-label":"Close modal",children:"✕"})]}),l.jsx("div",{className:"mt-3 text-sm text-gray-700",children:typeof e=="function"?e({modalData:g}):e})]})}):null}function Ir({children:r}){const[t,e]=n.useState({}),[o,c]=n.useState({}),h=n.useCallback((d,f)=>{e(v=>({...v,[d]:!0})),f&&c(v=>({...v,[d]:f}))},[]),u=n.useCallback(d=>{e(f=>({...f,[d]:!1})),c(f=>{const v={...f};return delete v[d],v})},[]),b=n.useCallback(d=>!!t[d],[t]),i=n.useCallback(d=>o[d],[o]),s=n.useMemo(()=>({openModal:h,closeModal:u}),[h,u]),a=n.useMemo(()=>({isOpen:b,getModalData:i}),[b,i]);return l.jsx(V.Provider,{value:s,children:l.jsx(R.Provider,{value:a,children:r})})}function zr(r){const{openModal:t,closeModal:e}=_(),{isOpen:o,getModalData:c}=B();return{open:h=>t(r,h),close:()=>e(r),isOpen:o(r),data:c(r)}}let F=null,H={};function Tr(r){F=r}function Ar(r){H={...H,...r}}function Dr(){return H}function _r(r,t,e=3e3,o){F?F(r,t,e,o):console.warn("Toast system is not mounted")}function Br(r){return D({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(r)}const Fr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)}),Hr=()=>{const[r,t]=n.useState([]);n.useEffect(()=>{Tr((o,c,h,u)=>{const b=Fr();t(i=>[...i,{id:b,type:o,message:c,config:u}]),setTimeout(()=>{t(i=>i.filter(s=>s.id!==b))},h)})},[]);const e=Dr();return l.jsx("div",{className:"fixed top-5 right-5 z-[9999] flex flex-col gap-2",children:r.map(o=>{var i,s,a,d,f,v,g,p,S,m,N,$,C;const c=((i=o.config)==null?void 0:i.icon)||((s=e.icons)==null?void 0:s[o.type])||Wr(o.type),h=((a=o.config)==null?void 0:a.bgColor)||((f=(d=e.colors)==null?void 0:d[o.type])==null?void 0:f.bg)||"bg-white dark:bg-gray-800",u=((v=o.config)==null?void 0:v.textColor)||((p=(g=e.colors)==null?void 0:g[o.type])==null?void 0:p.text)||"text-gray-700 dark:text-gray-300",b=((S=o.config)==null?void 0:S.iconContainerClass)||"w-8 h-8 mr-3 text-xl flex items-center justify-center";return l.jsxs("div",{className:`flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${h} ${u}`,children:[l.jsx("div",{className:b,children:c}),l.jsxs("div",{className:"flex-1 me-3",children:[((m=o.config)==null?void 0:m.title)&&l.jsx("div",{className:"font-semibold text-black",children:o.config.title}),((N=o.config)==null?void 0:N.description)&&l.jsx("div",{className:"text-sm text-gray-500",children:o.config.description}),!(($=o.config)!=null&&$.title)&&!((C=o.config)!=null&&C.description)&&l.jsx("div",{className:"text-sm",children:o.message})]}),l.jsx("button",{onClick:()=>t(E=>E.filter(y=>y.id!==o.id)),className:"ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white","aria-label":"Close",children:l.jsx(Br,{size:18})})]},o.id)})})};function Wr(r){switch(r){case"success":return"✅";case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️"}}w.Accordion=jr,w.Badge=Or,w.Button=ur,w.Checkbox=Q,w.Dropdown=Sr,w.Input=q,w.Modal=Pr,w.ModalProvider=Ir,w.Select=K,w.Toast=Hr,w.Tooltip=Nr,w.setToastDefaults=Ar,w.showToast=_r,w.useModalActions=_,w.useModalInstance=zr,w.useModalState=B,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
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",