tailwind-ux-kit 1.0.75 → 1.0.77

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