tailwind-ux-kit 1.0.80 → 1.0.82

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.
@@ -1,24 +1,24 @@
1
1
  "use client";
2
- import { jsxs as S, jsx as i } from "react/jsx-runtime";
3
- import A, { forwardRef as se, useState as D, useMemo as I, useId as ge, useRef as W, useCallback as z, useEffect as _, createContext as oe, useContext as ae } from "react";
4
- const ee = {
2
+ import { jsxs as k, jsx as i } from "react/jsx-runtime";
3
+ import D, { forwardRef as re, useState as A, useMemo as j, useId as pe, useRef as W, useCallback as I, useEffect as B, createContext as se, useContext as oe } from "react";
4
+ const V = {
5
5
  xs: "text-xs px-2 py-1",
6
6
  sm: "text-sm px-3 py-1.5",
7
7
  md: "text-sm px-3 py-3",
8
8
  lg: "text-lg px-5 py-3"
9
- }, te = {
9
+ }, ee = {
10
10
  flat: "rounded-none",
11
11
  rounded: "rounded-sm",
12
12
  pill: "rounded-full"
13
- }, be = {
13
+ }, ge = {
14
14
  filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
15
15
  outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
16
16
  standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
17
- }, me = {
17
+ }, be = {
18
18
  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",
19
19
  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",
20
20
  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"
21
- }, xe = (e, r, n) => {
21
+ }, me = (e, r, n) => {
22
22
  if (n)
23
23
  return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
24
24
  if (r)
@@ -33,160 +33,156 @@ const ee = {
33
33
  default:
34
34
  return "border-gray-300 focus:ring-blue-500";
35
35
  }
36
- }, he = se((e, r) => {
36
+ }, xe = re((e, r) => {
37
37
  const {
38
38
  label: n,
39
39
  id: t,
40
- inputSize: o = "md",
41
- shape: c = "rounded",
42
- validate: d,
40
+ inputSize: s = "md",
41
+ shape: d = "rounded",
42
+ validate: p,
43
43
  onValidatedChange: u,
44
- className: f = "",
45
- icon: l,
46
- iconPosition: s = "left",
44
+ className: l = "",
45
+ icon: c,
46
+ iconPosition: o = "left",
47
47
  floatingLabelStyle: a,
48
- onChange: p,
49
- isValid: b,
50
- isInvalid: g,
51
- feedback: m,
52
- iconClasses: k,
48
+ onChange: f,
49
+ isValid: m,
50
+ isInvalid: b,
51
+ feedback: x,
52
+ iconClasses: C,
53
53
  feedbackType: v = "invalid",
54
- labelClasses: E = "",
55
- inputType: L = "",
56
- inputPattern: h,
57
- ...y
58
- } = e, [O, w] = D("default"), $ = A.useCallback(
54
+ labelClasses: $ = "",
55
+ inputType: N = "",
56
+ inputPattern: y,
57
+ ...w
58
+ } = e, [E, z] = A("default"), O = D.useCallback(
59
59
  (P) => {
60
- const N = P.target.value, K = (d == null ? void 0 : d(N)) ?? "default";
61
- w(K), u == null || u(P, K), p == null || p(P);
60
+ const S = P.target.value, K = (p == null ? void 0 : p(S)) ?? "default";
61
+ z(K), u == null || u(P, K), f == null || f(P);
62
62
  },
63
- [d, u, p]
64
- ), x = I(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), C = !!a, j = ee[o] || ee.md, B = te[c] || te.flat, T = I(
65
- () => xe(O, b, g),
66
- [O, b, g]
67
- ), M = I(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), R = I(() => l ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [l, s]), F = (P) => {
63
+ [p, u, f]
64
+ ), g = j(() => t || (typeof n == "string" ? `input-${n.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [t, n]), h = !!a, L = V[s] || V.md, M = ee[d] || ee.flat, R = j(
65
+ () => me(E, m, b),
66
+ [E, m, b]
67
+ ), T = j(() => o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [o]), _ = j(() => c ? o === "start" || o === "left" ? "ps-10" : "pe-10" : "", [c, o]), F = (P) => {
68
68
  var Z;
69
- const N = P.key;
70
- !(P.ctrlKey || P.metaKey || N.length !== 1) && (() => {
71
- const H = /^\d$/, X = /^[a-zA-Z]$/, Y = /^[a-zA-Z0-9]$/;
72
- switch (L) {
69
+ const S = P.key;
70
+ !(P.ctrlKey || P.metaKey || S.length !== 1) && (() => {
71
+ const H = /^\d$/, X = /^[a-zA-Z]$/;
72
+ switch (N) {
73
73
  case "numeric":
74
74
  case "number":
75
75
  case "integer":
76
- return !H.test(N);
76
+ return !H.test(S);
77
77
  case "decimal":
78
- return !H.test(N) && N !== "." && N !== "Backspace" && N !== "Tab";
78
+ return !H.test(S) && S !== "." && S !== "Backspace" && S !== "Tab";
79
79
  case "alphabetic":
80
- return !X.test(N);
81
- case "string":
82
- return !Y.test(N);
80
+ return !X.test(S);
83
81
  case "custom":
84
- return h ? !h.test(N) : !1;
82
+ return y ? !y.test(S) : !1;
85
83
  default:
86
84
  return !1;
87
85
  }
88
- })() && P.preventDefault(), (Z = y.onKeyDown) == null || Z.call(y, P);
89
- }, pe = (P) => {
86
+ })() && P.preventDefault(), (Z = w.onKeyDown) == null || Z.call(w, P);
87
+ }, fe = (P) => {
90
88
  var q;
91
- const N = P.clipboardData.getData("Text");
89
+ const S = P.clipboardData.getData("Text");
92
90
  (() => {
93
- const Z = /^\d+$/, H = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/, Y = /^[a-zA-Z0-9]+$/;
94
- switch (L) {
91
+ const Z = /^\d+$/, H = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
92
+ switch (N) {
95
93
  case "numeric":
96
94
  case "number":
97
95
  case "integer":
98
- return !Z.test(N);
96
+ return !Z.test(S);
99
97
  case "decimal":
100
- return !H.test(N);
98
+ return !H.test(S);
101
99
  case "alphabetic":
102
- return !X.test(N);
103
- case "string":
104
- return !Y.test(N);
100
+ return !X.test(S);
105
101
  case "custom":
106
- return h ? !h.test(N) : !1;
102
+ return y ? !y.test(S) : !1;
107
103
  default:
108
104
  return !1;
109
105
  }
110
- })() && P.preventDefault(), (q = y.onPaste) == null || q.call(y, P);
106
+ })() && P.preventDefault(), (q = w.onPaste) == null || q.call(w, P);
111
107
  };
112
- return /* @__PURE__ */ S(
108
+ return /* @__PURE__ */ k(
113
109
  "div",
114
110
  {
115
- className: `w-full relative ${C ? "z-0" : ""} tailwind-ux-input`,
111
+ className: `w-full relative ${h ? "z-0" : ""} tailwind-ux-input`,
116
112
  children: [
117
- !C && n && /* @__PURE__ */ i(
113
+ !h && n && /* @__PURE__ */ i(
118
114
  "label",
119
115
  {
120
- htmlFor: x,
121
- className: `block mb-1 text-sm ${b ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${E}`,
116
+ htmlFor: g,
117
+ className: `block mb-1 text-sm ${m ? "text-green-700 dark:text-green-500" : b ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${$}`,
122
118
  children: n
123
119
  }
124
120
  ),
125
- /* @__PURE__ */ S("div", { className: "relative w-full", children: [
126
- l && /* @__PURE__ */ i(
121
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
122
+ c && /* @__PURE__ */ i(
127
123
  "div",
128
124
  {
129
- className: `absolute inset-y-0 flex items-center ${M} ${k}`,
125
+ className: `absolute inset-y-0 flex items-center ${T} ${C}`,
130
126
  "aria-hidden": "true",
131
- children: l
127
+ children: c
132
128
  }
133
129
  ),
134
130
  /* @__PURE__ */ i(
135
131
  "input",
136
132
  {
137
- ...y,
138
- id: x,
133
+ ...w,
134
+ id: g,
139
135
  ref: r,
140
- placeholder: C ? " " : y.placeholder,
141
- onChange: $,
136
+ placeholder: h ? " " : w.placeholder,
137
+ onChange: O,
142
138
  onKeyDown: F,
143
- onPaste: pe,
139
+ onPaste: fe,
144
140
  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
145
- ${j}
146
- ${C && a && be[a]}
147
- ${R} ${B} ${T} ${f}`
141
+ ${L}
142
+ ${h && a && ge[a]}
143
+ ${_} ${M} ${R} ${l}`
148
144
  }
149
145
  ),
150
- C && n && a && /* @__PURE__ */ i(
146
+ h && n && a && /* @__PURE__ */ i(
151
147
  "label",
152
148
  {
153
- htmlFor: x,
154
- className: `ms-1 ${me[a]} ${f}`,
149
+ htmlFor: g,
150
+ className: `ms-1 ${be[a]} ${l}`,
155
151
  children: n
156
152
  }
157
153
  )
158
154
  ] }),
159
- m && /* @__PURE__ */ i(
155
+ x && /* @__PURE__ */ i(
160
156
  "p",
161
157
  {
162
158
  className: `mt-1 text-xs ${v === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
163
159
  role: v === "invalid" ? "alert" : void 0,
164
- children: m
160
+ children: x
165
161
  }
166
162
  )
167
163
  ]
168
164
  }
169
165
  );
170
166
  });
171
- he.displayName = "Input";
172
- const ye = {
167
+ xe.displayName = "Input";
168
+ const he = {
173
169
  xs: "text-xs px-2 py-1",
174
170
  sm: "text-sm px-3 py-1.5",
175
171
  md: "text-sm px-3 py-3",
176
172
  lg: "text-lg px-5 py-3"
177
- }, we = {
173
+ }, ye = {
178
174
  flat: "rounded-none",
179
175
  rounded: "rounded-sm",
180
176
  pill: "rounded-full"
181
- }, ve = {
177
+ }, we = {
182
178
  filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
183
179
  outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
184
180
  standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
185
- }, Ce = {
181
+ }, ve = {
186
182
  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",
187
183
  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",
188
184
  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"
189
- }, ke = (e, r, n) => {
185
+ }, Ce = (e, r, n) => {
190
186
  if (n)
191
187
  return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
192
188
  if (r)
@@ -202,80 +198,80 @@ const ye = {
202
198
  default:
203
199
  return "border-gray-300 focus:ring-blue-500";
204
200
  }
205
- }, $e = se((e, r) => {
201
+ }, ke = re((e, r) => {
206
202
  const {
207
203
  label: n,
208
204
  id: t,
209
- inputSize: o = "md",
210
- shape: c = "rounded",
211
- validate: d,
205
+ inputSize: s = "md",
206
+ shape: d = "rounded",
207
+ validate: p,
212
208
  onValidatedChange: u,
213
- className: f = "",
214
- icon: l,
215
- iconPosition: s = "left",
209
+ className: l = "",
210
+ icon: c,
211
+ iconPosition: o = "left",
216
212
  floatingLabelStyle: a,
217
- onChange: p,
218
- isValid: b,
219
- isInvalid: g,
220
- feedback: m,
221
- feedbackType: k = "invalid",
213
+ onChange: f,
214
+ isValid: m,
215
+ isInvalid: b,
216
+ feedback: x,
217
+ feedbackType: C = "invalid",
222
218
  children: v,
223
- ...E
224
- } = e, [L, h] = D("default"), y = ge(), O = I(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : y), [t, n, y]), w = (M) => {
225
- const R = M.target.value, F = (d == null ? void 0 : d(R)) ?? "default";
226
- h(F), u == null || u(M, F), p == null || p(M);
227
- }, $ = !!a, x = ye[o], C = we[c], j = ke(L, b, g);
228
- return /* @__PURE__ */ S("div", { className: `w-full relative ${$ ? "z-0" : ""}`, children: [
229
- !$ && n && /* @__PURE__ */ i(
219
+ ...$
220
+ } = e, [N, y] = A("default"), w = pe(), E = j(() => t || (typeof n == "string" ? `select-${n.toLowerCase().replace(/\s+/g, "-")}` : w), [t, n, w]), z = (T) => {
221
+ const _ = T.target.value, F = (p == null ? void 0 : p(_)) ?? "default";
222
+ y(F), u == null || u(T, F), f == null || f(T);
223
+ }, O = !!a, g = he[s], h = ye[d], L = Ce(N, m, b);
224
+ return /* @__PURE__ */ k("div", { className: `w-full relative ${O ? "z-0" : ""}`, children: [
225
+ !O && n && /* @__PURE__ */ i(
230
226
  "label",
231
227
  {
232
- htmlFor: O,
233
- className: `block mb-1 text-sm ${b ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
228
+ htmlFor: E,
229
+ className: `block mb-1 text-sm ${m ? "text-green-700" : b ? "text-red-700" : "text-gray-700"}`,
234
230
  children: n
235
231
  }
236
232
  ),
237
- /* @__PURE__ */ S("div", { className: "relative w-full", children: [
238
- l && /* @__PURE__ */ i(
233
+ /* @__PURE__ */ k("div", { className: "relative w-full", children: [
234
+ c && /* @__PURE__ */ i(
239
235
  "div",
240
236
  {
241
- className: `absolute inset-y-0 flex items-center ${s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
242
- children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: l })
237
+ className: `absolute inset-y-0 flex items-center ${o === "start" || o === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5"}`,
238
+ children: /* @__PURE__ */ i("span", { className: "text-gray-500", children: c })
243
239
  }
244
240
  ),
245
241
  /* @__PURE__ */ i(
246
242
  "select",
247
243
  {
248
- ...E,
249
- id: O,
244
+ ...$,
245
+ id: E,
250
246
  ref: r,
251
- onChange: w,
247
+ onChange: z,
252
248
  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
253
- ${x} ${l && (s === "start" || s === "left") ? "ps-10" : l ? "pe-10" : ""}
254
- ${$ && a && ve[a]}
255
- ${C} ${j} ${f}`,
249
+ ${g} ${c && (o === "start" || o === "left") ? "ps-10" : c ? "pe-10" : ""}
250
+ ${O && a && we[a]}
251
+ ${h} ${L} ${l}`,
256
252
  children: v
257
253
  }
258
254
  ),
259
- $ && n && a && /* @__PURE__ */ i(
255
+ O && n && a && /* @__PURE__ */ i(
260
256
  "label",
261
257
  {
262
- htmlFor: O,
263
- className: `ms-1 ${Ce[a]} ${f}`,
258
+ htmlFor: E,
259
+ className: `ms-1 ${ve[a]} ${l}`,
264
260
  children: n
265
261
  }
266
262
  )
267
263
  ] }),
268
- m && /* @__PURE__ */ i(
264
+ x && /* @__PURE__ */ i(
269
265
  "p",
270
266
  {
271
- className: `mt-1 text-xs ${k === "invalid" ? "text-red-600" : "text-green-600"}`,
272
- children: m
267
+ className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
268
+ children: x
273
269
  }
274
270
  )
275
271
  ] });
276
272
  });
277
- $e.displayName = "Select";
278
- const Ne = {
273
+ ke.displayName = "Select";
274
+ const $e = {
279
275
  primary: "btn-primary",
280
276
  secondary: "btn-secondary",
281
277
  success: "btn-success",
@@ -301,39 +297,39 @@ const Ne = {
301
297
  "soft-info": "btn-soft-info",
302
298
  "soft-dark": "btn-soft-dark",
303
299
  "soft-light": "btn-soft-light"
304
- }, Se = {
300
+ }, Ne = {
305
301
  xs: "px-3 py-2 text-xs",
306
302
  sm: "px-3 py-2 text-sm",
307
303
  md: "px-5 py-2.5 text-sm",
308
304
  lg: "px-5 py-3 text-base",
309
305
  xl: "px-6 py-3.5 text-base"
310
- }, Ee = {
306
+ }, Se = {
311
307
  flat: "shadow-none",
312
308
  rounded: "rounded-sm",
313
309
  pill: "rounded-full",
314
310
  circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
315
- }, Je = ({
311
+ }, Ye = ({
316
312
  children: e,
317
313
  variant: r = "primary",
318
314
  size: n = "md",
319
315
  type: t = "button",
320
- shape: o = "rounded",
321
- className: c = "",
322
- isLoading: d = !1,
316
+ shape: s = "rounded",
317
+ className: d = "",
318
+ isLoading: p = !1,
323
319
  disabled: u = !1,
324
- ...f
320
+ ...l
325
321
  }) => {
326
- const l = u || d, s = [
322
+ const c = u || p, o = [
327
323
  "inline-flex items-center justify-center font-normal transition duration-150",
328
- Ne[r],
329
- Se[n],
330
- Ee[o],
331
- o === "flat" ? "shadow-none" : "shadow-sm",
332
- l ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
333
- c
324
+ $e[r],
325
+ Ne[n],
326
+ Se[s],
327
+ s === "flat" ? "shadow-none" : "shadow-sm",
328
+ c ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
329
+ d
334
330
  ].filter(Boolean).join(" ");
335
- return /* @__PURE__ */ S("button", { type: t, className: s, disabled: l, ...f, children: [
336
- d && /* @__PURE__ */ S(
331
+ return /* @__PURE__ */ k("button", { type: t, className: o, disabled: c, ...l, children: [
332
+ p && /* @__PURE__ */ k(
337
333
  "svg",
338
334
  {
339
335
  "aria-hidden": "true",
@@ -363,24 +359,24 @@ const Ne = {
363
359
  e
364
360
  ] });
365
361
  };
366
- var le = {
362
+ var ae = {
367
363
  color: void 0,
368
364
  size: void 0,
369
365
  className: void 0,
370
366
  style: void 0,
371
367
  attr: void 0
372
- }, ne = A.createContext && /* @__PURE__ */ A.createContext(le), Le = ["attr", "size", "title"];
373
- function Oe(e, r) {
368
+ }, te = D.createContext && /* @__PURE__ */ D.createContext(ae), Ee = ["attr", "size", "title"];
369
+ function Le(e, r) {
374
370
  if (e == null) return {};
375
- var n = Pe(e, r), t, o;
371
+ var n = Oe(e, r), t, s;
376
372
  if (Object.getOwnPropertySymbols) {
377
- var c = Object.getOwnPropertySymbols(e);
378
- for (o = 0; o < c.length; o++)
379
- t = c[o], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
373
+ var d = Object.getOwnPropertySymbols(e);
374
+ for (s = 0; s < d.length; s++)
375
+ t = d[s], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
380
376
  }
381
377
  return n;
382
378
  }
383
- function Pe(e, r) {
379
+ function Oe(e, r) {
384
380
  if (e == null) return {};
385
381
  var n = {};
386
382
  for (var t in e)
@@ -400,12 +396,12 @@ function G() {
400
396
  return e;
401
397
  }, G.apply(this, arguments);
402
398
  }
403
- function re(e, r) {
399
+ function ne(e, r) {
404
400
  var n = Object.keys(e);
405
401
  if (Object.getOwnPropertySymbols) {
406
402
  var t = Object.getOwnPropertySymbols(e);
407
- r && (t = t.filter(function(o) {
408
- return Object.getOwnPropertyDescriptor(e, o).enumerable;
403
+ r && (t = t.filter(function(s) {
404
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
409
405
  })), n.push.apply(n, t);
410
406
  }
411
407
  return n;
@@ -413,22 +409,22 @@ function re(e, r) {
413
409
  function U(e) {
414
410
  for (var r = 1; r < arguments.length; r++) {
415
411
  var n = arguments[r] != null ? arguments[r] : {};
416
- r % 2 ? re(Object(n), !0).forEach(function(t) {
417
- je(e, t, n[t]);
418
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : re(Object(n)).forEach(function(t) {
412
+ r % 2 ? ne(Object(n), !0).forEach(function(t) {
413
+ Pe(e, t, n[t]);
414
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ne(Object(n)).forEach(function(t) {
419
415
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
420
416
  });
421
417
  }
422
418
  return e;
423
419
  }
424
- function je(e, r, n) {
425
- return r = Ie(r), r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
420
+ function Pe(e, r, n) {
421
+ return r = je(r), r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
426
422
  }
427
- function Ie(e) {
428
- var r = ze(e, "string");
423
+ function je(e) {
424
+ var r = Ie(e, "string");
429
425
  return typeof r == "symbol" ? r : r + "";
430
426
  }
431
- function ze(e, r) {
427
+ function Ie(e, r) {
432
428
  if (typeof e != "object" || !e) return e;
433
429
  var n = e[Symbol.toPrimitive];
434
430
  if (n !== void 0) {
@@ -438,52 +434,52 @@ function ze(e, r) {
438
434
  }
439
435
  return (r === "string" ? String : Number)(e);
440
436
  }
441
- function ie(e) {
442
- return e && e.map((r, n) => /* @__PURE__ */ A.createElement(r.tag, U({
437
+ function le(e) {
438
+ return e && e.map((r, n) => /* @__PURE__ */ D.createElement(r.tag, U({
443
439
  key: n
444
- }, r.attr), ie(r.child)));
440
+ }, r.attr), le(r.child)));
445
441
  }
446
- function V(e) {
447
- return (r) => /* @__PURE__ */ A.createElement(Ae, G({
442
+ function Q(e) {
443
+ return (r) => /* @__PURE__ */ D.createElement(ze, G({
448
444
  attr: U({}, e.attr)
449
- }, r), ie(e.child));
445
+ }, r), le(e.child));
450
446
  }
451
- function Ae(e) {
447
+ function ze(e) {
452
448
  var r = (n) => {
453
449
  var {
454
450
  attr: t,
455
- size: o,
456
- title: c
457
- } = e, d = Oe(e, Le), u = o || n.size || "1em", f;
458
- return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", G({
451
+ size: s,
452
+ title: d
453
+ } = e, p = Le(e, Ee), u = s || n.size || "1em", l;
454
+ return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ D.createElement("svg", G({
459
455
  stroke: "currentColor",
460
456
  fill: "currentColor",
461
457
  strokeWidth: "0"
462
- }, n.attr, t, d, {
463
- className: f,
458
+ }, n.attr, t, p, {
459
+ className: l,
464
460
  style: U(U({
465
461
  color: e.color || n.color
466
462
  }, n.style), e.style),
467
463
  height: u,
468
464
  width: u,
469
465
  xmlns: "http://www.w3.org/2000/svg"
470
- }), c && /* @__PURE__ */ A.createElement("title", null, c), e.children);
466
+ }), d && /* @__PURE__ */ D.createElement("title", null, d), e.children);
471
467
  };
472
- return ne !== void 0 ? /* @__PURE__ */ A.createElement(ne.Consumer, null, (n) => r(n)) : r(le);
468
+ return te !== void 0 ? /* @__PURE__ */ D.createElement(te.Consumer, null, (n) => r(n)) : r(ae);
473
469
  }
474
470
  function De(e) {
475
- return V({ 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);
471
+ return Q({ 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);
476
472
  }
477
- const Me = {
473
+ const Ae = {
478
474
  xs: "w-3 h-3 text-[10px]",
479
475
  sm: "w-4 h-4 text-xs",
480
476
  md: "w-5 h-5 text-sm",
481
477
  lg: "w-6 h-6 text-base"
482
- }, Te = {
478
+ }, Me = {
483
479
  flat: "rounded-none",
484
480
  rounded: "rounded-sm",
485
481
  pill: "rounded-full"
486
- }, Re = {
482
+ }, Te = {
487
483
  primary: "primary",
488
484
  secondary: "secondary",
489
485
  success: "success",
@@ -509,34 +505,34 @@ const Me = {
509
505
  "soft-info": "soft-info",
510
506
  "soft-dark": "soft-dark",
511
507
  "soft-light": "soft-light"
512
- }, _e = A.forwardRef(
508
+ }, Re = D.forwardRef(
513
509
  ({
514
510
  label: e,
515
511
  boxSize: r = "md",
516
512
  shape: n = "rounded",
517
513
  variant: t = "success",
518
- onSelectionChange: o,
519
- disabled: c = !1,
520
- className: d = "",
514
+ onSelectionChange: s,
515
+ disabled: d = !1,
516
+ className: p = "",
521
517
  id: u,
522
- value: f,
523
- icon: l,
524
- children: s,
518
+ value: l,
519
+ icon: c,
520
+ children: o,
525
521
  checked: a,
526
- ...p
527
- }, b) => {
528
- const g = (x) => {
529
- !c && o && o(x.target.checked), p.onChange && p.onChange(x);
530
- }, m = "mr-2 border flex items-center justify-center transition-all", k = Me[r], v = Te[n], E = Re[t] ?? "", L = t.startsWith("outline"), h = t.startsWith("soft"), w = `${m} ${k} ${v} ${E} ${a && (L || h || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, $ = {
522
+ ...f
523
+ }, m) => {
524
+ const b = (g) => {
525
+ !d && s && s(g.target.checked), f.onChange && f.onChange(g);
526
+ }, x = "mr-2 border flex items-center justify-center transition-all", C = Ae[r], v = Me[n], $ = Te[t] ?? "", N = t.startsWith("outline"), y = t.startsWith("soft"), z = `${x} ${C} ${v} ${$} ${a && (N || y || t === "link") ? "peer-checked:bg-current peer-checked:text-white" : a ? "peer-checked:bg-current" : ""}`, O = {
531
527
  xs: "w-2 h-2",
532
528
  sm: "w-2.5 h-2.5",
533
529
  md: "w-3 h-3",
534
530
  lg: "w-3.5 h-3.5"
535
531
  };
536
- return /* @__PURE__ */ S(
532
+ return /* @__PURE__ */ k(
537
533
  "label",
538
534
  {
539
- className: `flex items-center ${c ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${d}`,
535
+ className: `flex items-center ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${p}`,
540
536
  children: [
541
537
  /* @__PURE__ */ i(
542
538
  "input",
@@ -544,121 +540,121 @@ const Me = {
544
540
  type: "checkbox",
545
541
  className: "peer hidden",
546
542
  checked: a,
547
- onChange: g,
548
- disabled: c,
543
+ onChange: b,
544
+ disabled: d,
549
545
  id: u,
550
- value: f,
551
- ref: b,
552
- ...p
546
+ value: l,
547
+ ref: m,
548
+ ...f
553
549
  }
554
550
  ),
555
- /* @__PURE__ */ i("span", { className: w.trim(), children: (a || p.defaultChecked) && (l ?? /* @__PURE__ */ i(De, { className: `${$[r]}` })) }),
556
- e || s ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
551
+ /* @__PURE__ */ i("span", { className: z.trim(), children: (a || f.defaultChecked) && (c ?? /* @__PURE__ */ i(De, { className: `${O[r]}` })) }),
552
+ e || o ? /* @__PURE__ */ i("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? o }) : null
557
553
  ]
558
554
  }
559
555
  );
560
556
  }
561
557
  );
562
- _e.displayName = "Checkbox";
563
- const Qe = ({
558
+ Re.displayName = "Checkbox";
559
+ const Je = ({
564
560
  label: e,
565
561
  header: r,
566
562
  items: n = [],
567
563
  onSelect: t,
568
- renderItem: o,
569
- position: c = "right",
570
- className: d = "",
564
+ renderItem: s,
565
+ position: d = "right",
566
+ className: p = "",
571
567
  menuClassName: u = "",
572
- width: f = "w-48",
573
- closeOnSelect: l = !1,
574
- transition: s = !0,
568
+ width: l = "w-48",
569
+ closeOnSelect: c = !1,
570
+ transition: o = !0,
575
571
  ariaLabel: a = "Dropdown menu",
576
- ...p
572
+ ...f
577
573
  }) => {
578
- const [b, g] = D(!1), [m, k] = D(!1), v = W(null), E = W(null), L = I(() => ({
574
+ const [m, b] = A(!1), [x, C] = A(!1), v = W(null), $ = W(null), N = j(() => ({
579
575
  left: "left-0",
580
576
  center: "left-1/2 transform -translate-x-1/2",
581
577
  right: "right-0"
582
- })[c], [c]), h = z(() => {
583
- const x = E.current, C = v.current;
584
- if (!x || !C) return;
585
- const { top: j, bottom: B } = x.getBoundingClientRect(), T = C.offsetHeight, M = window.innerHeight - B, R = j;
586
- k(M < T && R > T);
587
- }, []), y = z((x) => {
588
- var C, j;
589
- !((C = v.current) != null && C.contains(x.target)) && !((j = E.current) != null && j.contains(x.target)) && g(!1);
590
- }, []), O = z(() => g((x) => !x), []), w = z(() => g(!1), []);
591
- _(() => {
592
- if (b)
593
- return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
594
- window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
578
+ })[d], [d]), y = I(() => {
579
+ const g = $.current, h = v.current;
580
+ if (!g || !h) return;
581
+ const { top: L, bottom: M } = g.getBoundingClientRect(), R = h.offsetHeight, T = window.innerHeight - M, _ = L;
582
+ C(T < R && _ > R);
583
+ }, []), w = I((g) => {
584
+ var h, L;
585
+ !((h = v.current) != null && h.contains(g.target)) && !((L = $.current) != null && L.contains(g.target)) && b(!1);
586
+ }, []), E = I(() => b((g) => !g), []), z = I(() => b(!1), []);
587
+ B(() => {
588
+ if (m)
589
+ return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
590
+ window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
595
591
  };
596
- }, [b, h]), _(() => (document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y)), [y]);
597
- const $ = I(
592
+ }, [m, y]), B(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
593
+ const O = j(
598
594
  () => [
599
595
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
600
- m ? "bottom-full mb-2" : "top-full mt-2",
601
- L,
602
- f,
603
- s && "transition-all duration-200 ease-out",
596
+ x ? "bottom-full mb-2" : "top-full mt-2",
597
+ N,
598
+ l,
599
+ o && "transition-all duration-200 ease-out",
604
600
  u
605
601
  ].filter(Boolean).join(" "),
606
- [m, L, f, s, u]
602
+ [x, N, l, o, u]
607
603
  );
608
- return /* @__PURE__ */ S("div", { className: `relative inline-block ${d}`, ...p, children: [
604
+ return /* @__PURE__ */ k("div", { className: `relative inline-block ${p}`, ...f, children: [
609
605
  /* @__PURE__ */ i(
610
606
  "button",
611
607
  {
612
608
  type: "button",
613
- ref: E,
614
- onClick: O,
615
- "aria-expanded": b,
609
+ ref: $,
610
+ onClick: E,
611
+ "aria-expanded": m,
616
612
  "aria-label": a,
617
613
  className: "focus:outline-none",
618
614
  children: e
619
615
  }
620
616
  ),
621
- b && /* @__PURE__ */ S("div", { ref: v, role: "menu", className: $, children: [
617
+ m && /* @__PURE__ */ k("div", { ref: v, role: "menu", className: O, children: [
622
618
  r && r,
623
- n.map((x, C) => {
624
- const j = () => {
625
- t && t(x), l && w();
619
+ n.map((g, h) => {
620
+ const L = () => {
621
+ t && t(g), c && z();
626
622
  };
627
- return /* @__PURE__ */ i("div", { children: o ? o(x, j) : /* @__PURE__ */ i(
623
+ return /* @__PURE__ */ i("div", { children: s ? s(g, L) : /* @__PURE__ */ i(
628
624
  "div",
629
625
  {
630
- onClick: j,
626
+ onClick: L,
631
627
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
632
628
  role: "menuitem",
633
- children: x.label
629
+ children: g.label
634
630
  }
635
- ) }, C);
631
+ ) }, h);
636
632
  })
637
633
  ] })
638
634
  ] });
639
- }, Ve = ({
635
+ }, Qe = ({
640
636
  children: e,
641
637
  content: r,
642
638
  position: n = "top",
643
639
  className: t = "",
644
- tooltipClass: o = "",
645
- tooltipStyle: c = {}
640
+ tooltipClass: s = "",
641
+ tooltipStyle: d = {}
646
642
  }) => {
647
- const d = W(null), u = W(null);
648
- _(() => {
649
- const l = d.current, s = u.current;
650
- if (!l || !s) return;
643
+ const p = W(null), u = W(null);
644
+ B(() => {
645
+ const c = p.current, o = u.current;
646
+ if (!c || !o) return;
651
647
  const a = () => {
652
- s.style.opacity = "1", s.style.visibility = "visible";
653
- }, p = () => {
654
- s.style.opacity = "0", s.style.visibility = "hidden";
648
+ o.style.opacity = "1", o.style.visibility = "visible";
649
+ }, f = () => {
650
+ o.style.opacity = "0", o.style.visibility = "hidden";
655
651
  };
656
- return l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", p), () => {
657
- l.removeEventListener("mouseenter", a), l.removeEventListener("mouseleave", p);
652
+ return c.addEventListener("mouseenter", a), c.addEventListener("mouseleave", f), () => {
653
+ c.removeEventListener("mouseenter", a), c.removeEventListener("mouseleave", f);
658
654
  };
659
655
  }, []);
660
- const f = (l) => {
661
- const s = {
656
+ const l = (c) => {
657
+ const o = {
662
658
  position: "absolute",
663
659
  opacity: 0,
664
660
  visibility: "hidden",
@@ -675,10 +671,10 @@ const Qe = ({
675
671
  zIndex: 9999,
676
672
  width: "max-content"
677
673
  };
678
- switch (l) {
674
+ switch (c) {
679
675
  case "top":
680
676
  return {
681
- ...s,
677
+ ...o,
682
678
  bottom: "100%",
683
679
  left: "50%",
684
680
  transform: "translateX(-50%)",
@@ -686,7 +682,7 @@ const Qe = ({
686
682
  };
687
683
  case "bottom":
688
684
  return {
689
- ...s,
685
+ ...o,
690
686
  top: "100%",
691
687
  left: "50%",
692
688
  transform: "translateX(-50%)",
@@ -694,7 +690,7 @@ const Qe = ({
694
690
  };
695
691
  case "left":
696
692
  return {
697
- ...s,
693
+ ...o,
698
694
  right: "100%",
699
695
  top: "50%",
700
696
  transform: "translateY(-50%)",
@@ -702,33 +698,33 @@ const Qe = ({
702
698
  };
703
699
  case "right":
704
700
  return {
705
- ...s,
701
+ ...o,
706
702
  left: "100%",
707
703
  top: "50%",
708
704
  transform: "translateY(-50%)",
709
705
  marginLeft: "8px"
710
706
  };
711
707
  default:
712
- return s;
708
+ return o;
713
709
  }
714
710
  };
715
- return /* @__PURE__ */ S("div", { ref: d, className: `relative inline-block ${t}`, children: [
711
+ return /* @__PURE__ */ k("div", { ref: p, className: `relative inline-block ${t}`, children: [
716
712
  e,
717
713
  /* @__PURE__ */ i(
718
714
  "div",
719
715
  {
720
716
  ref: u,
721
717
  role: "tooltip",
722
- className: o,
718
+ className: s,
723
719
  style: {
724
- ...f(n),
725
- ...c
720
+ ...l(n),
721
+ ...d
726
722
  },
727
723
  children: r
728
724
  }
729
725
  )
730
726
  ] });
731
- }, Be = {
727
+ }, _e = {
732
728
  primary: "bg-blue-500 text-white",
733
729
  secondary: "bg-gray-500 text-white",
734
730
  success: "bg-green-500 text-white",
@@ -746,64 +742,64 @@ const Qe = ({
746
742
  "outline-info": "border border-cyan-500 text-cyan-500 bg-transparent",
747
743
  "outline-dark": "border border-black text-black bg-transparent",
748
744
  "outline-light": "border border-gray-100 text-gray-800 bg-transparent"
749
- }, Fe = {
745
+ }, Be = {
750
746
  xs: "text-xs px-2 py-0.5",
751
747
  sm: "text-sm px-2.5 py-0.5",
752
748
  md: "text-base px-3 py-1",
753
749
  lg: "text-lg px-3.5 py-1.5",
754
750
  xl: "text-xl px-4 py-2"
755
- }, Ke = {
751
+ }, Fe = {
756
752
  flat: "rounded-none",
757
753
  rounded: "rounded-sm",
758
754
  pill: "rounded-full",
759
755
  circle: "rounded-full p-2 w-8 h-8 justify-center"
760
- }, et = ({
756
+ }, Ve = ({
761
757
  label: e,
762
758
  variant: r = "primary",
763
759
  size: n = "sm",
764
760
  shape: t = "rounded",
765
- icon: o,
766
- dismissible: c,
767
- onDismiss: d,
761
+ icon: s,
762
+ dismissible: d,
763
+ onDismiss: p,
768
764
  className: u = "",
769
- ...f
765
+ ...l
770
766
  }) => {
771
- const l = !e && !!o, s = `inline-flex items-center font-medium ${Be[r] || ""} ${Fe[n] || ""} ${Ke[t] || ""} ${l ? "justify-center p-2 w-8 h-8" : ""} ` + u;
772
- return /* @__PURE__ */ S("span", { className: s.trim(), ...f, children: [
773
- o && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: o }),
767
+ const c = !e && !!s, o = `inline-flex items-center font-medium ${_e[r] || ""} ${Be[n] || ""} ${Fe[t] || ""} ${c ? "justify-center p-2 w-8 h-8" : ""} ` + u;
768
+ return /* @__PURE__ */ k("span", { className: o.trim(), ...l, children: [
769
+ s && /* @__PURE__ */ i("span", { className: e ? "mr-1" : "", children: s }),
774
770
  e,
775
- c && /* @__PURE__ */ i(
771
+ d && /* @__PURE__ */ i(
776
772
  "button",
777
773
  {
778
774
  type: "button",
779
- onClick: d,
775
+ onClick: p,
780
776
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
781
777
  children: "×"
782
778
  }
783
779
  )
784
780
  ] });
785
781
  };
786
- function Ze(e) {
787
- return V({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z" }, child: [] }] })(e);
782
+ function Ke(e) {
783
+ return Q({ 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);
788
784
  }
789
- const tt = ({
785
+ const et = ({
790
786
  items: e,
791
787
  allowMultipleOpen: r = !1,
792
788
  className: n = "",
793
789
  tileClasses: t = "",
794
- open: o,
795
- onChange: c,
796
- renderTitle: d,
790
+ open: s,
791
+ onChange: d,
792
+ renderTitle: p,
797
793
  renderContent: u,
798
- showArrowIcon: f = !0,
799
- panelClasses: l = ""
794
+ showArrowIcon: l = !0,
795
+ panelClasses: c = ""
800
796
  }) => {
801
- const [s, a] = D(/* @__PURE__ */ new Set()), p = I(() => o ? new Set(o) : s, [o, s]), b = z(
802
- (g) => {
803
- const m = new Set(p);
804
- m.has(g) ? m.delete(g) : (r || m.clear(), m.add(g)), o && c ? c(Array.from(m)) : a(m);
797
+ const [o, a] = A(/* @__PURE__ */ new Set()), f = j(() => s ? new Set(s) : o, [s, o]), m = I(
798
+ (b) => {
799
+ const x = new Set(f);
800
+ x.has(b) ? x.delete(b) : (r || x.clear(), x.add(b)), s && d ? d(Array.from(x)) : a(x);
805
801
  },
806
- [p, o, c, r]
802
+ [f, s, d, r]
807
803
  );
808
804
  return /* @__PURE__ */ i(
809
805
  "div",
@@ -811,25 +807,25 @@ const tt = ({
811
807
  className: "accordion",
812
808
  role: "region",
813
809
  "aria-multiselectable": r,
814
- children: e.map((g) => {
815
- const m = p.has(g.id), k = `accordion-heading-${g.id}`, v = `accordion-panel-${g.id}`;
816
- return /* @__PURE__ */ S(
810
+ children: e.map((b) => {
811
+ const x = f.has(b.id), C = `accordion-heading-${b.id}`, v = `accordion-panel-${b.id}`;
812
+ return /* @__PURE__ */ k(
817
813
  "div",
818
814
  {
819
815
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${n}`,
820
816
  children: [
821
- /* @__PURE__ */ S(
817
+ /* @__PURE__ */ k(
822
818
  "button",
823
819
  {
824
- id: k,
820
+ id: C,
825
821
  type: "button",
826
- "aria-expanded": m,
822
+ "aria-expanded": x,
827
823
  "aria-controls": v,
828
- onClick: () => b(g.id),
824
+ onClick: () => m(b.id),
829
825
  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}`,
830
826
  children: [
831
- d ? d(g, m) : g.title,
832
- f ? /* @__PURE__ */ i(Ze, {}) : null
827
+ p ? p(b, x) : b.title,
828
+ l ? /* @__PURE__ */ i(Ke, {}) : null
833
829
  ]
834
830
  }
835
831
  ),
@@ -838,182 +834,190 @@ const tt = ({
838
834
  {
839
835
  id: v,
840
836
  role: "region",
841
- "aria-labelledby": k,
842
- hidden: !m,
843
- className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${l}`,
844
- children: u ? u(g, m) : g.content
837
+ "aria-labelledby": C,
838
+ hidden: !x,
839
+ className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${c}`,
840
+ children: u ? u(b, x) : b.content
845
841
  }
846
842
  )
847
843
  ]
848
844
  },
849
- g.id
845
+ b.id
850
846
  );
851
847
  })
852
848
  }
853
849
  );
854
- }, ce = oe(null), de = () => {
855
- const e = ae(ce);
850
+ }, ie = se(null), ce = () => {
851
+ const e = oe(ie);
856
852
  if (!e)
857
853
  throw new Error(
858
854
  "useModalActions must be used within a ModalActionProvider"
859
855
  );
860
856
  return e;
861
- }, ue = oe(null), fe = () => ae(ue);
862
- function nt({
857
+ }, de = se(null), ue = () => oe(de);
858
+ function tt({
863
859
  id: e,
864
860
  title: r,
865
861
  children: n,
866
862
  standalone: t = !1,
867
- showFloatingClose: o = !1,
868
- containerClasses: c = "",
869
- onClose: d,
870
- disableEscapeClose: u = !1,
871
- closeBtnStyle: f
863
+ showFloatingClose: s = !1,
864
+ containerClasses: d = "",
865
+ headerClasses: p = "",
866
+ bodyClasses: u = "",
867
+ onClose: l,
868
+ disableEscapeClose: c = !1,
869
+ closeBtnStyle: o
872
870
  }) {
873
- const l = fe(), s = de(), a = !t && !!l && !!s, [p, b] = D(!1), g = a ? l.isOpen(e) : p, m = a ? l.getModalData(e) : null, k = z(() => {
874
- a ? s.closeModal(e) : b(!1), d == null || d();
875
- }, [a, s, e, d]);
876
- return _(() => {
877
- const v = document.activeElement, E = document.getElementById(e), L = [
871
+ const a = ue(), f = ce(), m = !t && !!a && !!f, [b, x] = A(!1), C = m ? a.isOpen(e) : b, v = m ? a.getModalData(e) : null, $ = I(() => {
872
+ m ? f.closeModal(e) : x(!1), l == null || l();
873
+ }, [m, f, e, l]);
874
+ return B(() => {
875
+ const N = document.activeElement, y = document.getElementById(e), w = [
878
876
  "a[href]",
879
877
  "button:not([disabled])",
880
878
  "textarea:not([disabled])",
881
879
  "input:not([disabled])",
882
880
  "select:not([disabled])",
883
881
  '[tabindex]:not([tabindex="-1"])'
884
- ], h = () => {
885
- if (!E) return [];
886
- const w = E.querySelectorAll(
887
- L.join(",")
882
+ ], E = () => {
883
+ if (!y) return [];
884
+ const g = y.querySelectorAll(
885
+ w.join(",")
888
886
  );
889
- return Array.from(w).filter(($) => $.offsetParent !== null);
890
- }, y = (w) => {
891
- if (w.key === "Tab") {
892
- const $ = h();
893
- if ($.length === 0) return;
894
- const x = $[0], C = $[$.length - 1];
895
- w.shiftKey ? document.activeElement === x && (w.preventDefault(), C.focus()) : document.activeElement === C && (w.preventDefault(), x.focus());
887
+ return Array.from(g).filter((h) => h.offsetParent !== null);
888
+ }, z = (g) => {
889
+ if (g.key === "Tab") {
890
+ const h = E();
891
+ if (h.length === 0) return;
892
+ const L = h[0], M = h[h.length - 1];
893
+ g.shiftKey ? document.activeElement === L && (g.preventDefault(), M.focus()) : document.activeElement === M && (g.preventDefault(), L.focus());
896
894
  }
897
- }, O = (w) => {
898
- w.key === "Escape" && !u && k(), y(w);
895
+ }, O = (g) => {
896
+ g.key === "Escape" && !c && $(), z(g);
899
897
  };
900
- return g && (document.body.style.overflow = "hidden", setTimeout(() => {
901
- const w = h();
902
- w.length && w[0].focus();
898
+ return C && (document.body.style.overflow = "hidden", setTimeout(() => {
899
+ const g = E();
900
+ g.length && g[0].focus();
903
901
  }, 0), window.addEventListener("keydown", O)), () => {
904
- document.body.style.overflow = "", v && v.focus(), window.removeEventListener("keydown", O);
902
+ document.body.style.overflow = "", N && N.focus(), window.removeEventListener("keydown", O);
905
903
  };
906
- }, [g, u, k, e]), g ? /* @__PURE__ */ i(
904
+ }, [C, c, $, e]), C ? /* @__PURE__ */ i(
907
905
  "div",
908
906
  {
909
907
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",
910
908
  id: e,
911
- children: /* @__PURE__ */ S(
909
+ children: /* @__PURE__ */ k(
912
910
  "div",
913
911
  {
914
- className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${c}`,
912
+ className: `bg-white rounded-lg shadow-lg w-full max-w-md p-4 transform transition-all duration-300 scale-100 ${d}`,
915
913
  children: [
916
- /* @__PURE__ */ S("div", { className: "flex justify-between items-center relative", children: [
917
- r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
918
- o && /* @__PURE__ */ i(
919
- "button",
920
- {
921
- onClick: k,
922
- className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${f}`,
923
- "aria-label": "Close modal",
924
- children: "✕"
925
- }
926
- )
927
- ] }),
928
- /* @__PURE__ */ i("div", { children: typeof n == "function" ? n({ modalData: m }) : n })
914
+ /* @__PURE__ */ k(
915
+ "div",
916
+ {
917
+ className: `flex justify-between items-center relative ${p}`,
918
+ children: [
919
+ r && /* @__PURE__ */ i("h2", { className: "text-lg font-semibold", children: r }),
920
+ s && /* @__PURE__ */ i(
921
+ "button",
922
+ {
923
+ onClick: $,
924
+ className: `text-gray-500 hover:text-black absolute top-0 right-3 hover:bg-gray-200 rounded-full aspect-square w-8 ${o}`,
925
+ "aria-label": "Close modal",
926
+ children: ""
927
+ }
928
+ )
929
+ ]
930
+ }
931
+ ),
932
+ /* @__PURE__ */ i("div", { className: u, children: typeof n == "function" ? n({ modalData: v }) : n })
929
933
  ]
930
934
  }
931
935
  )
932
936
  }
933
937
  ) : null;
934
938
  }
935
- function rt({
939
+ function nt({
936
940
  children: e
937
941
  }) {
938
- const [r, n] = D({}), [t, o] = D({}), c = z((a, p) => {
939
- n((b) => ({ ...b, [a]: !0 })), p && o((b) => ({ ...b, [a]: p }));
940
- }, []), d = z((a) => {
941
- n((p) => ({ ...p, [a]: !1 })), o((p) => {
942
- const b = { ...p };
943
- return delete b[a], b;
942
+ const [r, n] = A({}), [t, s] = A({}), d = I((a, f) => {
943
+ n((m) => ({ ...m, [a]: !0 })), f && s((m) => ({ ...m, [a]: f }));
944
+ }, []), p = I((a) => {
945
+ n((f) => ({ ...f, [a]: !1 })), s((f) => {
946
+ const m = { ...f };
947
+ return delete m[a], m;
944
948
  });
945
- }, []), u = z((a) => !!r[a], [r]), f = z(
949
+ }, []), u = I((a) => !!r[a], [r]), l = I(
946
950
  (a) => t[a],
947
951
  [t]
948
- ), l = I(
949
- () => ({ openModal: c, closeModal: d }),
950
- [c, d]
951
- ), s = I(
952
- () => ({ isOpen: u, getModalData: f }),
953
- [u, f]
952
+ ), c = j(
953
+ () => ({ openModal: d, closeModal: p }),
954
+ [d, p]
955
+ ), o = j(
956
+ () => ({ isOpen: u, getModalData: l }),
957
+ [u, l]
954
958
  );
955
- return /* @__PURE__ */ i(ce.Provider, { value: l, children: /* @__PURE__ */ i(ue.Provider, { value: s, children: e }) });
959
+ return /* @__PURE__ */ i(ie.Provider, { value: c, children: /* @__PURE__ */ i(de.Provider, { value: o, children: e }) });
956
960
  }
957
- function st(e) {
958
- const { openModal: r, closeModal: n } = de(), { isOpen: t, getModalData: o } = fe();
961
+ function rt(e) {
962
+ const { openModal: r, closeModal: n } = ce(), { isOpen: t, getModalData: s } = ue();
959
963
  return {
960
- open: (c) => r(e, c),
964
+ open: (d) => r(e, d),
961
965
  close: () => n(e),
962
966
  isOpen: t(e),
963
- data: o(e)
967
+ data: s(e)
964
968
  };
965
969
  }
966
- let J = null, Q = {};
967
- function He(e) {
968
- J = e;
970
+ let Y = null, J = {};
971
+ function Ze(e) {
972
+ Y = e;
969
973
  }
970
- function ot(e) {
971
- Q = { ...Q, ...e };
974
+ function st(e) {
975
+ J = { ...J, ...e };
972
976
  }
973
- function We() {
974
- return Q;
977
+ function He() {
978
+ return J;
975
979
  }
976
- function at(e, r, n = 3e3, t) {
977
- J ? J(e, r, n, t) : console.warn("Toast system is not mounted");
980
+ function ot(e, r, n = 3e3, t) {
981
+ Y ? Y(e, r, n, t) : console.warn("Toast system is not mounted");
978
982
  }
979
- function Ge(e) {
980
- return V({ attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor" }, child: [] }] })(e);
983
+ function We(e) {
984
+ return Q({ 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);
981
985
  }
982
- const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
986
+ const Ge = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
983
987
  const r = Math.random() * 16 | 0;
984
988
  return (e === "x" ? r : r & 3 | 8).toString(16);
985
- }), lt = () => {
986
- const [e, r] = D([]);
987
- _(() => {
988
- He((t, o, c, d) => {
989
- const u = Ue();
990
- r((f) => [...f, { id: u, type: t, message: o, config: d }]), setTimeout(() => {
991
- r((f) => f.filter((l) => l.id !== u));
992
- }, c);
989
+ }), at = () => {
990
+ const [e, r] = A([]);
991
+ B(() => {
992
+ Ze((t, s, d, p) => {
993
+ const u = Ge();
994
+ r((l) => [...l, { id: u, type: t, message: s, config: p }]), setTimeout(() => {
995
+ r((l) => l.filter((c) => c.id !== u));
996
+ }, d);
993
997
  });
994
998
  }, []);
995
- const n = We();
999
+ const n = He();
996
1000
  return /* @__PURE__ */ i("div", { className: "fixed top-5 right-5 z-[9999] flex flex-col gap-2", children: e.map((t) => {
997
- var f, l, s, a, p, b, g, m, k, v, E, L, h;
998
- const o = ((f = t.config) == null ? void 0 : f.icon) || ((l = n.icons) == null ? void 0 : l[t.type]) || qe(t.type), c = ((s = t.config) == null ? void 0 : s.bgColor) || ((p = (a = n.colors) == null ? void 0 : a[t.type]) == null ? void 0 : p.bg) || "bg-white dark:bg-gray-800", d = ((b = t.config) == null ? void 0 : b.textColor) || ((m = (g = n.colors) == null ? void 0 : g[t.type]) == null ? void 0 : m.text) || "text-gray-700 dark:text-gray-300", u = ((k = t.config) == null ? void 0 : k.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
999
- return /* @__PURE__ */ S(
1001
+ var l, c, o, a, f, m, b, x, C, v, $, N, y;
1002
+ const s = ((l = t.config) == null ? void 0 : l.icon) || ((c = n.icons) == null ? void 0 : c[t.type]) || Ue(t.type), d = ((o = t.config) == null ? void 0 : o.bgColor) || ((f = (a = n.colors) == null ? void 0 : a[t.type]) == null ? void 0 : f.bg) || "bg-white dark:bg-gray-800", p = ((m = t.config) == null ? void 0 : m.textColor) || ((x = (b = n.colors) == null ? void 0 : b[t.type]) == null ? void 0 : x.text) || "text-gray-700 dark:text-gray-300", u = ((C = t.config) == null ? void 0 : C.iconContainerClass) || "w-8 h-8 mr-3 text-xl flex items-center justify-center";
1003
+ return /* @__PURE__ */ k(
1000
1004
  "div",
1001
1005
  {
1002
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${c} ${d}`,
1006
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${d} ${p}`,
1003
1007
  children: [
1004
- /* @__PURE__ */ i("div", { className: u, children: o }),
1005
- /* @__PURE__ */ S("div", { className: "flex-1 me-3", children: [
1008
+ /* @__PURE__ */ i("div", { className: u, children: s }),
1009
+ /* @__PURE__ */ k("div", { className: "flex-1 me-3", children: [
1006
1010
  ((v = t.config) == null ? void 0 : v.title) && /* @__PURE__ */ i("div", { className: "font-semibold text-black", children: t.config.title }),
1007
- ((E = t.config) == null ? void 0 : E.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
1008
- !((L = t.config) != null && L.title) && !((h = t.config) != null && h.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
1011
+ (($ = t.config) == null ? void 0 : $.description) && /* @__PURE__ */ i("div", { className: "text-sm text-gray-500", children: t.config.description }),
1012
+ !((N = t.config) != null && N.title) && !((y = t.config) != null && y.description) && /* @__PURE__ */ i("div", { className: "text-sm", children: t.message })
1009
1013
  ] }),
1010
1014
  /* @__PURE__ */ i(
1011
1015
  "button",
1012
1016
  {
1013
- onClick: () => r((y) => y.filter((O) => O.id !== t.id)),
1017
+ onClick: () => r((w) => w.filter((E) => E.id !== t.id)),
1014
1018
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
1015
1019
  "aria-label": "Close",
1016
- children: /* @__PURE__ */ i(Ge, { size: 18 })
1020
+ children: /* @__PURE__ */ i(We, { size: 18 })
1017
1021
  }
1018
1022
  )
1019
1023
  ]
@@ -1022,7 +1026,7 @@ const Ue = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
1022
1026
  );
1023
1027
  }) });
1024
1028
  };
1025
- function qe(e) {
1029
+ function Ue(e) {
1026
1030
  switch (e) {
1027
1031
  case "success":
1028
1032
  return "✅";
@@ -1035,20 +1039,20 @@ function qe(e) {
1035
1039
  }
1036
1040
  }
1037
1041
  export {
1038
- tt as Accordion,
1039
- et as Badge,
1040
- Je as Button,
1041
- _e as Checkbox,
1042
- Qe as Dropdown,
1043
- he as Input,
1044
- nt as Modal,
1045
- rt as ModalProvider,
1046
- $e as Select,
1047
- lt as Toast,
1048
- Ve as Tooltip,
1049
- ot as setToastDefaults,
1050
- at as showToast,
1051
- de as useModalActions,
1052
- st as useModalInstance,
1053
- fe as useModalState
1042
+ et as Accordion,
1043
+ Ve as Badge,
1044
+ Ye as Button,
1045
+ Re as Checkbox,
1046
+ Je as Dropdown,
1047
+ xe as Input,
1048
+ tt as Modal,
1049
+ nt as ModalProvider,
1050
+ ke as Select,
1051
+ at as Toast,
1052
+ Qe as Tooltip,
1053
+ st as setToastDefaults,
1054
+ ot as showToast,
1055
+ ce as useModalActions,
1056
+ rt as useModalInstance,
1057
+ ue as useModalState
1054
1058
  };