tailwind-ux-kit 1.0.75 → 1.0.76

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