tailwind-ux-kit 1.0.108 → 1.0.109

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,7 +1,7 @@
1
1
  "use client";
2
- import { jsxs as E, jsx as d, Fragment as me } from "react/jsx-runtime";
3
- import K, { forwardRef as ie, useState as z, useMemo as _, useId as he, useRef as F, useCallback as I, useEffect as B, createContext as V, useContext as ee } from "react";
4
- import { createPortal as ye } from "react-dom";
2
+ import { jsxs as P, jsx as d, Fragment as be } from "react/jsx-runtime";
3
+ import K, { forwardRef as ae, useState as I, useMemo as B, useId as he, useRef as F, useCallback as T, useEffect as R, memo as le, useLayoutEffect as ye, createContext as V, useContext as ee } from "react";
4
+ import { createPortal as xe } from "react-dom";
5
5
  const ne = {
6
6
  xs: "text-xs px-2 py-1",
7
7
  sm: "text-sm px-3 py-1.5",
@@ -11,15 +11,15 @@ const ne = {
11
11
  flat: "rounded-none",
12
12
  rounded: "rounded-sm",
13
13
  pill: "rounded-full"
14
- }, xe = {
14
+ }, we = {
15
15
  filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
16
16
  outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
17
17
  standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
18
- }, we = {
18
+ }, ve = {
19
19
  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",
20
20
  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",
21
21
  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"
22
- }, ve = (e, n, t) => {
22
+ }, Ce = (e, n, t) => {
23
23
  if (t)
24
24
  return "border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";
25
25
  if (n)
@@ -34,96 +34,96 @@ const ne = {
34
34
  default:
35
35
  return "border-gray-300 focus:ring-blue-500";
36
36
  }
37
- }, Ce = ie((e, n) => {
37
+ }, $e = ae((e, n) => {
38
38
  const {
39
39
  label: t,
40
40
  id: r,
41
41
  inputSize: o = "md",
42
- shape: u = "rounded",
43
- validate: g,
42
+ shape: i = "rounded",
43
+ validate: f,
44
44
  onValidatedChange: c,
45
- className: f = "",
45
+ className: u = "",
46
46
  icon: a,
47
47
  iconPosition: s = "left",
48
48
  floatingLabelStyle: l,
49
- onChange: i,
49
+ onChange: p,
50
50
  isValid: x,
51
- isInvalid: p,
52
- feedback: b,
53
- iconClasses: $,
54
- feedbackType: C = "invalid",
55
- labelClasses: O = "",
56
- inputType: y = "",
57
- inputPattern: v,
58
- ...h
59
- } = e, [w, N] = z("default"), k = K.useCallback(
60
- (M) => {
61
- const A = M.target.value, Y = (g == null ? void 0 : g(A)) ?? "default";
62
- N(Y), c == null || c(M, Y), i == null || i(M);
51
+ isInvalid: g,
52
+ feedback: m,
53
+ iconClasses: C,
54
+ feedbackType: v = "invalid",
55
+ labelClasses: L = "",
56
+ inputType: S = "",
57
+ inputPattern: b,
58
+ ...y
59
+ } = e, [w, N] = I("default"), $ = K.useCallback(
60
+ (z) => {
61
+ const j = z.target.value, Y = (f == null ? void 0 : f(j)) ?? "default";
62
+ N(Y), c == null || c(z, Y), p == null || p(z);
63
63
  },
64
- [g, c, i]
65
- ), P = _(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), j = !!l, m = ne[o] || ne.md, L = re[u] || re.flat, D = _(
66
- () => ve(w, x, p),
67
- [w, x, p]
68
- ), S = _(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), T = _(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]), R = (M) => {
64
+ [f, c, p]
65
+ ), O = B(() => r || (typeof t == "string" ? `input-${t.toLowerCase().replace(/\s+/g, "-")}` : `input-${Math.random().toString(36).slice(2)}`), [r, t]), A = !!l, h = ne[o] || ne.md, E = re[i] || re.flat, D = B(
66
+ () => Ce(w, x, g),
67
+ [w, x, g]
68
+ ), k = B(() => s === "start" || s === "left" ? "left-0 ps-3.5" : "right-0 pe-3.5", [s]), M = B(() => a ? s === "start" || s === "left" ? "ps-10" : "pe-10" : "", [a, s]), _ = (z) => {
69
69
  var Z;
70
- const A = M.key;
71
- !(M.ctrlKey || M.metaKey || A.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(A)) && (() => {
72
- const W = /^\d$/, X = /^[a-zA-Z]$/;
73
- switch (y) {
70
+ const j = z.key;
71
+ !(z.ctrlKey || z.metaKey || j.length !== 1 || ["Backspace", "ArrowLeft", "ArrowRight", "Delete", "Tab"].includes(j)) && (() => {
72
+ const W = /^\d$/, q = /^[a-zA-Z]$/;
73
+ switch (S) {
74
74
  case "numeric":
75
75
  case "number":
76
76
  case "integer":
77
- return !W.test(A);
77
+ return !W.test(j);
78
78
  case "decimal":
79
- return !W.test(A) && A !== "." && A !== "Backspace" && A !== "Tab";
79
+ return !W.test(j) && j !== "." && j !== "Backspace" && j !== "Tab";
80
80
  case "alphabetic":
81
- return !X.test(A);
81
+ return !q.test(j);
82
82
  case "custom":
83
- return v ? !v.test(A) : !1;
83
+ return b ? !b.test(j) : !1;
84
84
  default:
85
85
  return !1;
86
86
  }
87
- })() && M.preventDefault(), (Z = h.onKeyDown) == null || Z.call(h, M);
88
- }, H = (M) => {
89
- var q;
90
- const A = M.clipboardData.getData("Text");
87
+ })() && z.preventDefault(), (Z = y.onKeyDown) == null || Z.call(y, z);
88
+ }, H = (z) => {
89
+ var X;
90
+ const j = z.clipboardData.getData("Text");
91
91
  (() => {
92
- const Z = /^\d+$/, W = /^\d*\.?\d*$/, X = /^[a-zA-Z]+$/;
93
- switch (y) {
92
+ const Z = /^\d+$/, W = /^\d*\.?\d*$/, q = /^[a-zA-Z]+$/;
93
+ switch (S) {
94
94
  case "numeric":
95
95
  case "number":
96
96
  case "integer":
97
- return !Z.test(A);
97
+ return !Z.test(j);
98
98
  case "decimal":
99
- return !W.test(A);
99
+ return !W.test(j);
100
100
  case "alphabetic":
101
- return !X.test(A);
101
+ return !q.test(j);
102
102
  case "custom":
103
- return v ? !v.test(A) : !1;
103
+ return b ? !b.test(j) : !1;
104
104
  default:
105
105
  return !1;
106
106
  }
107
- })() && M.preventDefault(), (q = h.onPaste) == null || q.call(h, M);
107
+ })() && z.preventDefault(), (X = y.onPaste) == null || X.call(y, z);
108
108
  };
109
- return /* @__PURE__ */ E(
109
+ return /* @__PURE__ */ P(
110
110
  "div",
111
111
  {
112
- className: `w-full relative ${j ? "z-0" : ""} tailwind-ux-input`,
112
+ className: `w-full relative ${A ? "z-0" : ""} tailwind-ux-input`,
113
113
  children: [
114
- !j && t && /* @__PURE__ */ d(
114
+ !A && t && /* @__PURE__ */ d(
115
115
  "label",
116
116
  {
117
- htmlFor: P,
118
- className: `block mb-1 text-sm ${x ? "text-green-700 dark:text-green-500" : p ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${O}`,
117
+ htmlFor: O,
118
+ className: `block mb-1 text-sm ${x ? "text-green-700 dark:text-green-500" : g ? "text-red-700 dark:text-red-500" : "text-gray-700"} ${L}`,
119
119
  children: t
120
120
  }
121
121
  ),
122
- /* @__PURE__ */ E("div", { className: "relative w-full", children: [
122
+ /* @__PURE__ */ P("div", { className: "relative w-full", children: [
123
123
  a && /* @__PURE__ */ d(
124
124
  "div",
125
125
  {
126
- className: `absolute inset-y-0 flex items-center ${S} ${$}`,
126
+ className: `absolute inset-y-0 flex items-center ${k} ${C}`,
127
127
  "aria-hidden": "true",
128
128
  children: a
129
129
  }
@@ -131,59 +131,59 @@ const ne = {
131
131
  /* @__PURE__ */ d(
132
132
  "input",
133
133
  {
134
- ...h,
135
- id: P,
134
+ ...y,
135
+ id: O,
136
136
  ref: n,
137
- placeholder: j ? " " : h.placeholder,
138
- onChange: k,
139
- onKeyDown: R,
137
+ placeholder: A ? " " : y.placeholder,
138
+ onChange: $,
139
+ onKeyDown: _,
140
140
  onPaste: H,
141
141
  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
142
- ${m}
143
- ${j && l && xe[l]}
144
- ${T} ${L} ${D} ${f}`
142
+ ${h}
143
+ ${A && l && we[l]}
144
+ ${M} ${E} ${D} ${u}`
145
145
  }
146
146
  ),
147
- j && t && l && /* @__PURE__ */ d(
147
+ A && t && l && /* @__PURE__ */ d(
148
148
  "label",
149
149
  {
150
- htmlFor: P,
151
- className: `ms-1 ${we[l]} ${f}`,
150
+ htmlFor: O,
151
+ className: `ms-1 ${ve[l]} ${u}`,
152
152
  children: t
153
153
  }
154
154
  )
155
155
  ] }),
156
- b && /* @__PURE__ */ d(
156
+ m && /* @__PURE__ */ d(
157
157
  "p",
158
158
  {
159
- className: `mt-1 text-xs ${C === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
160
- role: C === "invalid" ? "alert" : void 0,
161
- children: b
159
+ className: `mt-1 text-xs ${v === "invalid" ? "text-red-600 dark:text-red-500" : "text-green-600 dark:text-green-500"}`,
160
+ role: v === "invalid" ? "alert" : void 0,
161
+ children: m
162
162
  }
163
163
  )
164
164
  ]
165
165
  }
166
166
  );
167
167
  });
168
- Ce.displayName = "Input";
169
- const $e = {
168
+ $e.displayName = "Input";
169
+ const ke = {
170
170
  xs: "text-xs px-2 py-1",
171
171
  sm: "text-sm px-3 py-1.5",
172
172
  md: "text-sm px-3 py-3",
173
173
  lg: "text-lg px-5 py-3"
174
- }, ke = {
174
+ }, Se = {
175
175
  flat: "rounded-none",
176
176
  rounded: "rounded-sm",
177
177
  pill: "rounded-full"
178
- }, Se = {
178
+ }, Ne = {
179
179
  filled: "rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",
180
180
  outlined: "rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",
181
181
  standard: "px-0 py-2.5 bg-transparent border-0 border-b-2"
182
- }, Ne = {
182
+ }, Le = {
183
183
  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",
184
184
  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",
185
185
  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"
186
- }, Le = (e, n, t) => {
186
+ }, Ee = (e, n, t) => {
187
187
  if (t)
188
188
  return "border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";
189
189
  if (n)
@@ -199,39 +199,39 @@ const $e = {
199
199
  default:
200
200
  return "border-gray-300 focus:ring-blue-500";
201
201
  }
202
- }, Ee = ie((e, n) => {
202
+ }, Pe = ae((e, n) => {
203
203
  const {
204
204
  label: t,
205
205
  id: r,
206
206
  inputSize: o = "md",
207
- shape: u = "rounded",
208
- validate: g,
207
+ shape: i = "rounded",
208
+ validate: f,
209
209
  onValidatedChange: c,
210
- className: f = "",
210
+ className: u = "",
211
211
  icon: a,
212
212
  iconPosition: s = "left",
213
213
  floatingLabelStyle: l,
214
- onChange: i,
214
+ onChange: p,
215
215
  isValid: x,
216
- isInvalid: p,
217
- feedback: b,
218
- feedbackType: $ = "invalid",
219
- children: C,
220
- ...O
221
- } = e, [y, v] = z("default"), h = he(), w = _(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : h), [r, t, h]), N = (S) => {
222
- const T = S.target.value, R = (g == null ? void 0 : g(T)) ?? "default";
223
- v(R), c == null || c(S, R), i == null || i(S);
224
- }, k = !!l, P = $e[o], j = ke[u], m = Le(y, x, p);
225
- return /* @__PURE__ */ E("div", { className: `w-full relative ${k ? "z-0" : ""}`, children: [
226
- !k && t && /* @__PURE__ */ d(
216
+ isInvalid: g,
217
+ feedback: m,
218
+ feedbackType: C = "invalid",
219
+ children: v,
220
+ ...L
221
+ } = e, [S, b] = I("default"), y = he(), w = B(() => r || (typeof t == "string" ? `select-${t.toLowerCase().replace(/\s+/g, "-")}` : y), [r, t, y]), N = (k) => {
222
+ const M = k.target.value, _ = (f == null ? void 0 : f(M)) ?? "default";
223
+ b(_), c == null || c(k, _), p == null || p(k);
224
+ }, $ = !!l, O = ke[o], A = Se[i], h = Ee(S, x, g);
225
+ return /* @__PURE__ */ P("div", { className: `w-full relative ${$ ? "z-0" : ""}`, children: [
226
+ !$ && t && /* @__PURE__ */ d(
227
227
  "label",
228
228
  {
229
229
  htmlFor: w,
230
- className: `block mb-1 text-sm ${x ? "text-green-700" : p ? "text-red-700" : "text-gray-700"}`,
230
+ className: `block mb-1 text-sm ${x ? "text-green-700" : g ? "text-red-700" : "text-gray-700"}`,
231
231
  children: t
232
232
  }
233
233
  ),
234
- /* @__PURE__ */ E("div", { className: "relative w-full", children: [
234
+ /* @__PURE__ */ P("div", { className: "relative w-full", children: [
235
235
  a && /* @__PURE__ */ d(
236
236
  "div",
237
237
  {
@@ -242,37 +242,37 @@ const $e = {
242
242
  /* @__PURE__ */ d(
243
243
  "select",
244
244
  {
245
- ...O,
245
+ ...L,
246
246
  id: w,
247
247
  ref: n,
248
248
  onChange: N,
249
249
  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
250
- ${P} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
251
- ${k && l && Se[l]}
252
- ${j} ${m} ${f}`,
253
- children: C
250
+ ${O} ${a && (s === "start" || s === "left") ? "ps-10" : a ? "pe-10" : ""}
251
+ ${$ && l && Ne[l]}
252
+ ${A} ${h} ${u}`,
253
+ children: v
254
254
  }
255
255
  ),
256
- k && t && l && /* @__PURE__ */ d(
256
+ $ && t && l && /* @__PURE__ */ d(
257
257
  "label",
258
258
  {
259
259
  htmlFor: w,
260
- className: `ms-1 ${Ne[l]} ${f}`,
260
+ className: `ms-1 ${Le[l]} ${u}`,
261
261
  children: t
262
262
  }
263
263
  )
264
264
  ] }),
265
- b && /* @__PURE__ */ d(
265
+ m && /* @__PURE__ */ d(
266
266
  "p",
267
267
  {
268
- className: `mt-1 text-xs ${$ === "invalid" ? "text-red-600" : "text-green-600"}`,
269
- children: b
268
+ className: `mt-1 text-xs ${C === "invalid" ? "text-red-600" : "text-green-600"}`,
269
+ children: m
270
270
  }
271
271
  )
272
272
  ] });
273
273
  });
274
- Ee.displayName = "Select";
275
- const Pe = {
274
+ Pe.displayName = "Select";
275
+ const Oe = {
276
276
  primary: "btn-primary",
277
277
  secondary: "btn-secondary",
278
278
  success: "btn-success",
@@ -298,39 +298,39 @@ const Pe = {
298
298
  "soft-info": "btn-soft-info",
299
299
  "soft-dark": "btn-soft-dark",
300
300
  "soft-light": "btn-soft-light"
301
- }, Oe = {
301
+ }, De = {
302
302
  xs: "px-3 py-2 text-xs",
303
303
  sm: "px-3 py-2 text-sm",
304
304
  md: "px-5 py-2.5 text-sm",
305
305
  lg: "px-5 py-3 text-base",
306
306
  xl: "px-6 py-3.5 text-base"
307
- }, De = {
307
+ }, Te = {
308
308
  flat: "shadow-none",
309
309
  rounded: "rounded-sm",
310
310
  pill: "rounded-full",
311
311
  circle: "rounded-full w-10 h-10 p-0 flex items-center justify-center"
312
- }, rt = ({
312
+ }, it = ({
313
313
  children: e,
314
314
  variant: n = "primary",
315
315
  size: t = "md",
316
316
  type: r = "button",
317
317
  shape: o = "rounded",
318
- className: u = "",
319
- isLoading: g = !1,
318
+ className: i = "",
319
+ isLoading: f = !1,
320
320
  disabled: c = !1,
321
- ...f
321
+ ...u
322
322
  }) => {
323
- const a = c || g, s = [
323
+ const a = c || f, s = [
324
324
  "inline-flex items-center justify-center font-normal transition duration-150",
325
- Pe[n],
326
- Oe[t],
327
- De[o],
325
+ Oe[n],
326
+ De[t],
327
+ Te[o],
328
328
  o === "flat" ? "shadow-none" : "shadow-sm",
329
329
  a ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
330
- u
330
+ i
331
331
  ].filter(Boolean).join(" ");
332
- return /* @__PURE__ */ E("button", { type: r, className: s, disabled: a, ...f, children: [
333
- g && /* @__PURE__ */ E(
332
+ return /* @__PURE__ */ P("button", { type: r, className: s, disabled: a, ...u, children: [
333
+ f && /* @__PURE__ */ P(
334
334
  "svg",
335
335
  {
336
336
  "aria-hidden": "true",
@@ -360,24 +360,24 @@ const Pe = {
360
360
  e
361
361
  ] });
362
362
  };
363
- var ce = {
363
+ var ie = {
364
364
  color: void 0,
365
365
  size: void 0,
366
366
  className: void 0,
367
367
  style: void 0,
368
368
  attr: void 0
369
- }, oe = K.createContext && /* @__PURE__ */ K.createContext(ce), Ae = ["attr", "size", "title"];
370
- function je(e, n) {
369
+ }, oe = K.createContext && /* @__PURE__ */ K.createContext(ie), je = ["attr", "size", "title"];
370
+ function Ae(e, n) {
371
371
  if (e == null) return {};
372
- var t = Ie(e, n), r, o;
372
+ var t = Be(e, n), r, o;
373
373
  if (Object.getOwnPropertySymbols) {
374
- var u = Object.getOwnPropertySymbols(e);
375
- for (o = 0; o < u.length; o++)
376
- r = u[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
374
+ var i = Object.getOwnPropertySymbols(e);
375
+ for (o = 0; o < i.length; o++)
376
+ r = i[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
377
377
  }
378
378
  return t;
379
379
  }
380
- function Ie(e, n) {
380
+ function Be(e, n) {
381
381
  if (e == null) return {};
382
382
  var t = {};
383
383
  for (var r in e)
@@ -411,21 +411,21 @@ function U(e) {
411
411
  for (var n = 1; n < arguments.length; n++) {
412
412
  var t = arguments[n] != null ? arguments[n] : {};
413
413
  n % 2 ? se(Object(t), !0).forEach(function(r) {
414
- ze(e, r, t[r]);
414
+ Ie(e, r, t[r]);
415
415
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : se(Object(t)).forEach(function(r) {
416
416
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
417
417
  });
418
418
  }
419
419
  return e;
420
420
  }
421
- function ze(e, n, t) {
422
- return n = Me(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
421
+ function Ie(e, n, t) {
422
+ return n = ze(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
423
423
  }
424
- function Me(e) {
425
- var n = Be(e, "string");
424
+ function ze(e) {
425
+ var n = Me(e, "string");
426
426
  return typeof n == "symbol" ? n : n + "";
427
427
  }
428
- function Be(e, n) {
428
+ function Me(e, n) {
429
429
  if (typeof e != "object" || !e) return e;
430
430
  var t = e[Symbol.toPrimitive];
431
431
  if (t !== void 0) {
@@ -435,52 +435,52 @@ function Be(e, n) {
435
435
  }
436
436
  return (n === "string" ? String : Number)(e);
437
437
  }
438
- function de(e) {
438
+ function ce(e) {
439
439
  return e && e.map((n, t) => /* @__PURE__ */ K.createElement(n.tag, U({
440
440
  key: t
441
- }, n.attr), de(n.child)));
441
+ }, n.attr), ce(n.child)));
442
442
  }
443
443
  function te(e) {
444
- return (n) => /* @__PURE__ */ K.createElement(Te, G({
444
+ return (n) => /* @__PURE__ */ K.createElement(Re, G({
445
445
  attr: U({}, e.attr)
446
- }, n), de(e.child));
446
+ }, n), ce(e.child));
447
447
  }
448
- function Te(e) {
448
+ function Re(e) {
449
449
  var n = (t) => {
450
450
  var {
451
451
  attr: r,
452
452
  size: o,
453
- title: u
454
- } = e, g = je(e, Ae), c = o || t.size || "1em", f;
455
- return t.className && (f = t.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ K.createElement("svg", G({
453
+ title: i
454
+ } = e, f = Ae(e, je), c = o || t.size || "1em", u;
455
+ return t.className && (u = t.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ K.createElement("svg", G({
456
456
  stroke: "currentColor",
457
457
  fill: "currentColor",
458
458
  strokeWidth: "0"
459
- }, t.attr, r, g, {
460
- className: f,
459
+ }, t.attr, r, f, {
460
+ className: u,
461
461
  style: U(U({
462
462
  color: e.color || t.color
463
463
  }, t.style), e.style),
464
464
  height: c,
465
465
  width: c,
466
466
  xmlns: "http://www.w3.org/2000/svg"
467
- }), u && /* @__PURE__ */ K.createElement("title", null, u), e.children);
467
+ }), i && /* @__PURE__ */ K.createElement("title", null, i), e.children);
468
468
  };
469
- return oe !== void 0 ? /* @__PURE__ */ K.createElement(oe.Consumer, null, (t) => n(t)) : n(ce);
469
+ return oe !== void 0 ? /* @__PURE__ */ K.createElement(oe.Consumer, null, (t) => n(t)) : n(ie);
470
470
  }
471
- function Re(e) {
471
+ function _e(e) {
472
472
  return te({ 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
473
  }
474
- const _e = {
474
+ const Fe = {
475
475
  xs: "w-3 h-3 text-[10px]",
476
476
  sm: "w-4 h-4 text-xs",
477
477
  md: "w-5 h-5 text-sm",
478
478
  lg: "w-6 h-6 text-base"
479
- }, Fe = {
479
+ }, Ke = {
480
480
  flat: "rounded-none",
481
481
  rounded: "rounded-sm",
482
482
  pill: "rounded-full"
483
- }, Ke = {
483
+ }, He = {
484
484
  primary: "primary",
485
485
  secondary: "secondary",
486
486
  success: "success",
@@ -506,34 +506,34 @@ const _e = {
506
506
  "soft-info": "soft-info",
507
507
  "soft-dark": "soft-dark",
508
508
  "soft-light": "soft-light"
509
- }, He = K.forwardRef(
509
+ }, Ye = K.forwardRef(
510
510
  ({
511
511
  label: e,
512
512
  boxSize: n = "md",
513
513
  shape: t = "rounded",
514
514
  variant: r = "success",
515
515
  onSelectionChange: o,
516
- disabled: u = !1,
517
- className: g = "",
516
+ disabled: i = !1,
517
+ className: f = "",
518
518
  id: c,
519
- value: f,
519
+ value: u,
520
520
  icon: a,
521
521
  children: s,
522
522
  checked: l,
523
- ...i
523
+ ...p
524
524
  }, x) => {
525
- const p = (P) => {
526
- !u && o && o(P.target.checked), i.onChange && i.onChange(P);
527
- }, b = "mr-2 border flex items-center justify-center transition-all", $ = _e[n], C = Fe[t], O = Ke[r] ?? "", y = r.startsWith("outline"), v = r.startsWith("soft"), N = `${b} ${$} ${C} ${O} ${l && (y || v || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, k = {
525
+ const g = (O) => {
526
+ !i && o && o(O.target.checked), p.onChange && p.onChange(O);
527
+ }, m = "mr-2 border flex items-center justify-center transition-all", C = Fe[n], v = Ke[t], L = He[r] ?? "", S = r.startsWith("outline"), b = r.startsWith("soft"), N = `${m} ${C} ${v} ${L} ${l && (S || b || r === "link") ? "peer-checked:bg-current peer-checked:text-white" : l ? "peer-checked:bg-current" : ""}`, $ = {
528
528
  xs: "w-2 h-2",
529
529
  sm: "w-2.5 h-2.5",
530
530
  md: "w-3 h-3",
531
531
  lg: "w-3.5 h-3.5"
532
532
  };
533
- return /* @__PURE__ */ E(
533
+ return /* @__PURE__ */ P(
534
534
  "label",
535
535
  {
536
- className: `flex items-center ${u ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${g}`,
536
+ className: `flex items-center ${i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} me-4 ${f}`,
537
537
  children: [
538
538
  /* @__PURE__ */ d(
539
539
  "input",
@@ -541,133 +541,133 @@ const _e = {
541
541
  type: "checkbox",
542
542
  className: "peer hidden",
543
543
  checked: l,
544
- onChange: p,
545
- disabled: u,
544
+ onChange: g,
545
+ disabled: i,
546
546
  id: c,
547
- value: f,
547
+ value: u,
548
548
  ref: x,
549
- ...i
549
+ ...p
550
550
  }
551
551
  ),
552
- /* @__PURE__ */ d("span", { className: N.trim(), children: (l || i.defaultChecked) && (a ?? /* @__PURE__ */ d(Re, { className: `${k[n]}` })) }),
552
+ /* @__PURE__ */ d("span", { className: N.trim(), children: (l || p.defaultChecked) && (a ?? /* @__PURE__ */ d(_e, { className: `${$[n]}` })) }),
553
553
  e || s ? /* @__PURE__ */ d("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: e ?? s }) : null
554
554
  ]
555
555
  }
556
556
  );
557
557
  }
558
558
  );
559
- He.displayName = "Checkbox";
560
- const ot = ({
559
+ Ye.displayName = "Checkbox";
560
+ const ct = ({
561
561
  label: e,
562
562
  header: n,
563
563
  items: t = [],
564
564
  onSelect: r,
565
565
  renderItem: o,
566
- position: u = "right",
567
- className: g = "",
566
+ position: i = "right",
567
+ className: f = "",
568
568
  menuClassName: c = "",
569
- width: f = "w-48",
569
+ width: u = "w-48",
570
570
  closeOnSelect: a = !1,
571
571
  transition: s = !0,
572
572
  ariaLabel: l = "Dropdown menu",
573
- forceCloseDropdown: i,
573
+ forceCloseDropdown: p,
574
574
  ...x
575
575
  }) => {
576
- const [p, b] = z(!1), [$, C] = z(!1), O = F(null), y = F(null), v = _(() => ({
576
+ const [g, m] = I(!1), [C, v] = I(!1), L = F(null), S = F(null), b = B(() => ({
577
577
  left: "left-0",
578
578
  center: "left-1/2 transform -translate-x-1/2",
579
579
  right: "right-0"
580
- })[u], [u]), h = I(() => {
581
- const m = y.current, L = O.current;
582
- if (!m || !L) return;
583
- const { top: D, bottom: S } = m.getBoundingClientRect(), T = L.offsetHeight, R = window.innerHeight - S, H = D;
584
- C(R < T && H > T);
585
- }, []), w = I((m) => {
586
- var L, D;
587
- !((L = O.current) != null && L.contains(m.target)) && !((D = y.current) != null && D.contains(m.target)) && b(!1);
588
- }, []), N = I(() => b((m) => !m), []), k = I(() => b(!1), []);
589
- B(() => {
590
- if (p)
591
- return h(), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
592
- window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
580
+ })[i], [i]), y = T(() => {
581
+ const h = S.current, E = L.current;
582
+ if (!h || !E) return;
583
+ const { top: D, bottom: k } = h.getBoundingClientRect(), M = E.offsetHeight, _ = window.innerHeight - k, H = D;
584
+ v(_ < M && H > M);
585
+ }, []), w = T((h) => {
586
+ var E, D;
587
+ !((E = L.current) != null && E.contains(h.target)) && !((D = S.current) != null && D.contains(h.target)) && m(!1);
588
+ }, []), N = T(() => m((h) => !h), []), $ = T(() => m(!1), []);
589
+ R(() => {
590
+ if (g)
591
+ return y(), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
592
+ window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
593
593
  };
594
- }, [p, h]);
595
- const P = F(p);
596
- B(() => {
597
- P.current = p;
598
- }, [p]), B(() => {
599
- const m = (L) => {
594
+ }, [g, y]);
595
+ const O = F(g);
596
+ R(() => {
597
+ O.current = g;
598
+ }, [g]), R(() => {
599
+ const h = (E) => {
600
600
  var D;
601
- L.key === "Escape" && P.current && (b(!1), (D = y.current) == null || D.focus());
601
+ E.key === "Escape" && O.current && (m(!1), (D = S.current) == null || D.focus());
602
602
  };
603
- return document.addEventListener("keydown", m), () => {
604
- document.removeEventListener("keydown", m);
603
+ return document.addEventListener("keydown", h), () => {
604
+ document.removeEventListener("keydown", h);
605
605
  };
606
- }, []), B(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
607
- const j = _(
606
+ }, []), R(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]);
607
+ const A = B(
608
608
  () => [
609
609
  "absolute z-50 bg-white rounded shadow-lg overflow-hidden w-auto",
610
- $ ? "bottom-full mb-2" : "top-full mt-2",
611
- v,
612
- f,
610
+ C ? "bottom-full mb-2" : "top-full mt-2",
611
+ b,
612
+ u,
613
613
  s && "transition-all duration-200 ease-out",
614
614
  c
615
615
  ].filter(Boolean).join(" "),
616
- [$, v, f, s, c]
616
+ [C, b, u, s, c]
617
617
  );
618
- return /* @__PURE__ */ E("div", { className: `relative inline-block ${g}`, ...x, children: [
618
+ return /* @__PURE__ */ P("div", { className: `relative inline-block ${f}`, ...x, children: [
619
619
  /* @__PURE__ */ d(
620
620
  "button",
621
621
  {
622
622
  type: "button",
623
- ref: y,
623
+ ref: S,
624
624
  onClick: N,
625
- "aria-expanded": p,
625
+ "aria-expanded": g,
626
626
  "aria-label": l,
627
627
  className: "focus:outline-none",
628
628
  children: e
629
629
  }
630
630
  ),
631
- p && /* @__PURE__ */ E("div", { ref: O, role: "menu", className: j, children: [
631
+ g && /* @__PURE__ */ P("div", { ref: L, role: "menu", className: A, children: [
632
632
  n && n,
633
- t.map((m, L) => {
633
+ t.map((h, E) => {
634
634
  const D = () => {
635
- r && r(m), a && k();
635
+ r && r(h), a && $();
636
636
  };
637
- return /* @__PURE__ */ d("div", { children: o ? o(m, D) : /* @__PURE__ */ d(
637
+ return /* @__PURE__ */ d("div", { children: o ? o(h, D) : /* @__PURE__ */ d(
638
638
  "div",
639
639
  {
640
640
  onClick: D,
641
641
  className: "px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 cursor-pointer",
642
642
  role: "menuitem",
643
- children: m.label
643
+ children: h.label
644
644
  }
645
- ) }, L);
645
+ ) }, E);
646
646
  })
647
647
  ] })
648
648
  ] });
649
- }, st = ({
649
+ }, dt = ({
650
650
  children: e,
651
651
  content: n,
652
652
  position: t = "top",
653
653
  className: r = "",
654
654
  tooltipClass: o = "",
655
- tooltipStyle: u = {}
655
+ tooltipStyle: i = {}
656
656
  }) => {
657
- const g = F(null), c = F(null);
658
- B(() => {
659
- const a = g.current, s = c.current;
657
+ const f = F(null), c = F(null);
658
+ R(() => {
659
+ const a = f.current, s = c.current;
660
660
  if (!a || !s) return;
661
661
  const l = () => {
662
662
  s.style.opacity = "1", s.style.visibility = "visible";
663
- }, i = () => {
663
+ }, p = () => {
664
664
  s.style.opacity = "0", s.style.visibility = "hidden";
665
665
  };
666
- return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", i), () => {
667
- a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", i);
666
+ return a.addEventListener("mouseenter", l), a.addEventListener("mouseleave", p), () => {
667
+ a.removeEventListener("mouseenter", l), a.removeEventListener("mouseleave", p);
668
668
  };
669
669
  }, []);
670
- const f = (a) => {
670
+ const u = (a) => {
671
671
  const s = {
672
672
  position: "absolute",
673
673
  opacity: 0,
@@ -722,7 +722,7 @@ const ot = ({
722
722
  return s;
723
723
  }
724
724
  };
725
- return /* @__PURE__ */ E("div", { ref: g, className: `relative inline-block ${r}`, children: [
725
+ return /* @__PURE__ */ P("div", { ref: f, className: `relative inline-block ${r}`, children: [
726
726
  e,
727
727
  /* @__PURE__ */ d(
728
728
  "div",
@@ -731,14 +731,14 @@ const ot = ({
731
731
  role: "tooltip",
732
732
  className: o,
733
733
  style: {
734
- ...f(t),
735
- ...u
734
+ ...u(t),
735
+ ...i
736
736
  },
737
737
  children: n
738
738
  }
739
739
  )
740
740
  ] });
741
- }, Ye = {
741
+ }, Ze = {
742
742
  primary: "bg-blue-500 text-white",
743
743
  secondary: "bg-gray-500 text-white",
744
744
  success: "bg-green-500 text-white",
@@ -756,277 +756,314 @@ const ot = ({
756
756
  "outline-info": "border border-cyan-500 text-cyan-500 bg-transparent",
757
757
  "outline-dark": "border border-black text-black bg-transparent",
758
758
  "outline-light": "border border-gray-100 text-gray-800 bg-transparent"
759
- }, Ze = {
759
+ }, We = {
760
760
  xs: "text-xs px-2 py-0.5",
761
761
  sm: "text-sm px-2.5 py-0.5",
762
762
  md: "text-base px-3 py-1",
763
763
  lg: "text-lg px-3.5 py-1.5",
764
764
  xl: "text-xl px-4 py-2"
765
- }, We = {
765
+ }, Ge = {
766
766
  flat: "rounded-none",
767
767
  rounded: "rounded-sm",
768
768
  pill: "rounded-full",
769
769
  circle: "rounded-full p-2 w-8 h-8 justify-center"
770
- }, at = ({
770
+ }, ut = ({
771
771
  label: e,
772
772
  variant: n = "primary",
773
773
  size: t = "sm",
774
774
  shape: r = "rounded",
775
775
  icon: o,
776
- dismissible: u,
777
- onDismiss: g,
776
+ dismissible: i,
777
+ onDismiss: f,
778
778
  className: c = "",
779
- ...f
779
+ ...u
780
780
  }) => {
781
- const a = !e && !!o, s = `inline-flex items-center font-medium ${Ye[n] || ""} ${Ze[t] || ""} ${We[r] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + c;
782
- return /* @__PURE__ */ E("span", { className: s.trim(), ...f, children: [
781
+ const a = !e && !!o, s = `inline-flex items-center font-medium ${Ze[n] || ""} ${We[t] || ""} ${Ge[r] || ""} ${a ? "justify-center p-2 w-8 h-8" : ""} ` + c;
782
+ return /* @__PURE__ */ P("span", { className: s.trim(), ...u, children: [
783
783
  o && /* @__PURE__ */ d("span", { className: e ? "mr-1" : "", children: o }),
784
784
  e,
785
- u && /* @__PURE__ */ d(
785
+ i && /* @__PURE__ */ d(
786
786
  "button",
787
787
  {
788
788
  type: "button",
789
- onClick: g,
789
+ onClick: f,
790
790
  className: "ml-2 text-xs font-bold leading-none focus:outline-none",
791
791
  children: "×"
792
792
  }
793
793
  )
794
794
  ] });
795
- }, ae = {
795
+ }, Ue = {
796
796
  rounded: "rounded-md",
797
797
  pill: "rounded-full",
798
798
  flat: "rounded-none"
799
- }, le = {
800
- xs: {
801
- button: "px-2 py-1 text-xs"
802
- },
803
- sm: {
804
- button: "px-3 py-1.5 text-sm"
805
- },
806
- md: {
807
- button: "px-4 py-2 text-sm"
808
- },
809
- lg: {
810
- button: "px-5 py-3 text-base"
811
- },
812
- xl: {
813
- button: "px-6 py-4 text-lg"
814
- }
799
+ }, Xe = {
800
+ xs: "px-2 py-1 text-xs",
801
+ sm: "px-3 py-1.5 text-sm",
802
+ md: "px-4 py-2 text-sm",
803
+ lg: "px-5 py-3 text-base",
804
+ xl: "px-6 py-4 text-lg"
815
805
  };
816
- function lt({
806
+ function qe({
807
+ option: e,
808
+ selected: n,
809
+ disabled: t,
810
+ variant: r,
811
+ sizeClass: o,
812
+ classNames: i,
813
+ onSelect: f,
814
+ renderOption: c,
815
+ buttonRef: u
816
+ }) {
817
+ const a = T(() => {
818
+ t || f(e.value);
819
+ }, [t, f, e.value]), s = T(
820
+ (l) => {
821
+ (l.key === "Enter" || l.key === " ") && !t && (l.preventDefault(), f(e.value));
822
+ },
823
+ [t, f, e.value]
824
+ );
825
+ return /* @__PURE__ */ d(
826
+ "button",
827
+ {
828
+ ref: u,
829
+ type: "button",
830
+ role: "radio",
831
+ "aria-checked": n,
832
+ disabled: t,
833
+ onClick: a,
834
+ onKeyDown: s,
835
+ className: `relative z-10 transition-colors duration-200 focus:outline-none w-full ${o}
836
+ ${n ? `text-white toggler-${r}` : "text-gray-700 hover:bg-gray-200"}
837
+ ${i.option ?? ""}
838
+ ${n ? i.selectedOption ?? "" : ""}
839
+ `,
840
+ children: c ? c(e, n) : e.label
841
+ }
842
+ );
843
+ }
844
+ const Je = le(
845
+ qe
846
+ );
847
+ function de({
817
848
  options: e,
818
849
  selected: n,
819
850
  onChange: t,
820
851
  label: r,
821
852
  disabled: o = !1,
822
- shape: u = "rounded",
823
- variant: g = "primary",
853
+ shape: i = "rounded",
854
+ variant: f = "primary",
824
855
  size: c = "md",
825
- className: f = "",
856
+ className: u = "",
826
857
  classNames: a = {},
827
858
  id: s,
828
859
  name: l,
829
- renderOption: i
860
+ renderOption: p
830
861
  }) {
831
- const x = ae[u] || ae.rounded, p = le[c] || le.md, b = F(null), [$, C] = z({});
832
- B(() => {
833
- if (!b.current) return;
834
- const y = e.findIndex((w) => w.value === n);
835
- if (y === -1) return;
836
- const h = b.current.querySelectorAll("button")[y];
837
- if (h) {
838
- const { offsetLeft: w, offsetWidth: N, offsetHeight: k } = h;
839
- C({
840
- transform: `translateX(${w}px)`,
841
- width: N,
842
- height: k
843
- });
844
- }
845
- }, [n, e, c]);
846
- const O = `toggler-${g}`;
847
- return /* @__PURE__ */ E(
862
+ const x = F([]), [g, m] = I({}), C = B(() => Ue[i], [i]), v = B(() => Xe[c], [c]), L = B(
863
+ () => e.findIndex((b) => b.value === n),
864
+ [e, n]
865
+ );
866
+ ye(() => {
867
+ if (L < 0)
868
+ return;
869
+ const b = x.current[L];
870
+ if (!b)
871
+ return;
872
+ const y = {
873
+ transform: `translateX(${b.offsetLeft}px)`,
874
+ width: b.offsetWidth,
875
+ height: b.offsetHeight
876
+ };
877
+ m((w) => w.transform === y.transform && w.width === y.width && w.height === y.height ? w : y);
878
+ }, [L, e]);
879
+ const S = T(
880
+ (b) => {
881
+ b !== n && t(b);
882
+ },
883
+ [t, n]
884
+ );
885
+ return /* @__PURE__ */ P(
848
886
  "div",
849
887
  {
850
- className: `flex flex-col gap-2 w-fit ${f} ${a.root ?? ""}`,
851
888
  id: s,
889
+ className: `flex w-fit flex-col gap-2 ${u} ${a.root ?? ""}`,
852
890
  children: [
853
- r && /* @__PURE__ */ d(
891
+ r ? /* @__PURE__ */ d(
854
892
  "span",
855
893
  {
856
- className: `text-sm font-medium select-none ${a.label ?? ""}`,
894
+ className: `select-none text-sm font-medium ${a.label ?? ""}`,
857
895
  children: r
858
896
  }
859
- ),
860
- /* @__PURE__ */ E(
897
+ ) : null,
898
+ /* @__PURE__ */ P(
861
899
  "div",
862
900
  {
863
- ref: b,
864
901
  role: "radiogroup",
865
902
  "aria-disabled": o,
866
- className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${x} ${o ? "opacity-50 cursor-not-allowed" : ""} ${a.group ?? ""}`,
903
+ "aria-label": typeof r == "string" ? r : void 0,
904
+ className: `relative inline-flex overflow-hidden border border-gray-300 bg-gray-100 ${C}
905
+ ${o ? "cursor-not-allowed opacity-50" : ""}
906
+ ${a.group ?? ""}
907
+ `,
867
908
  children: [
868
909
  /* @__PURE__ */ d(
869
910
  "div",
870
911
  {
871
- className: `absolute top-0 left-0 transition-transform duration-300 ease-in-out ${O}`,
872
- style: {
873
- ...$,
874
- zIndex: 0
875
- },
876
- "aria-hidden": "true"
912
+ "aria-hidden": "true",
913
+ style: g,
914
+ className: `absolute left-0 top-0 z-0 transition-all duration-300 ease-in-out toggler-${f}`
877
915
  }
878
916
  ),
879
- e.map((y) => {
880
- const v = n === y.value, h = o || y.disabled;
917
+ e.map((b, y) => {
918
+ const w = n === b.value, N = o || !!b.disabled;
881
919
  return /* @__PURE__ */ d(
882
- "button",
920
+ Je,
883
921
  {
884
- role: "radio",
885
- name: l,
886
- "aria-checked": v,
887
- disabled: h,
888
- onClick: () => !h && t(y.value),
889
- onKeyDown: (w) => {
890
- (w.key === "Enter" || w.key === " ") && !h && (w.preventDefault(), t(y.value));
891
- },
892
- className: `relative z-10 transition-colors duration-200 focus:outline-none ${p.button}
893
- ${v ? `text-white toggler-${g}` : "text-gray-700 hover:bg-gray-200"}
894
- ${a.option ?? ""}
895
- ${v ? a.selectedOption ?? "" : ""}
896
- `,
897
- children: i ? i(y, v) : y.label
922
+ option: b,
923
+ selected: w,
924
+ disabled: N,
925
+ variant: f,
926
+ sizeClass: v,
927
+ classNames: a,
928
+ onSelect: S,
929
+ renderOption: p,
930
+ buttonRef: ($) => {
931
+ x.current[y] = $;
932
+ }
898
933
  },
899
- String(y.value)
934
+ String(b.value)
900
935
  );
901
936
  })
902
937
  ]
903
938
  }
904
- )
939
+ ),
940
+ l ? /* @__PURE__ */ d("input", { type: "hidden", name: l, value: String(n) }) : null
905
941
  ]
906
942
  }
907
943
  );
908
944
  }
909
- const ue = V(
945
+ de.displayName = "Toggler";
946
+ const ft = le(de), ue = V(
910
947
  null
911
948
  );
912
- function it({
949
+ function pt({
913
950
  children: e
914
951
  }) {
915
- const [n, t] = z([]), r = I((c) => {
916
- t((f) => f.includes(c) ? f : [...f, c]);
917
- }, []), o = I((c) => {
918
- t((f) => f.filter((a) => a !== c));
919
- }, []), u = I(() => {
952
+ const [n, t] = I([]), r = T((c) => {
953
+ t((u) => u.includes(c) ? u : [...u, c]);
954
+ }, []), o = T((c) => {
955
+ t((u) => u.filter((a) => a !== c));
956
+ }, []), i = T(() => {
920
957
  t([]);
921
- }, []), g = _(
958
+ }, []), f = B(
922
959
  () => ({
923
960
  showBottomSheet: r,
924
961
  closeBottomSheet: o,
925
- closeAllBottomSheet: u,
962
+ closeAllBottomSheet: i,
926
963
  activeSheets: n
927
964
  }),
928
- [r, o, u, n]
965
+ [r, o, i, n]
929
966
  );
930
- return /* @__PURE__ */ d(ue.Provider, { value: g, children: e });
967
+ return /* @__PURE__ */ d(ue.Provider, { value: f, children: e });
931
968
  }
932
- function Ge() {
969
+ function Qe() {
933
970
  const e = ee(ue);
934
971
  if (!e)
935
972
  throw new Error("useBottomSheet must be used inside BottomSheetProvider");
936
973
  return e;
937
974
  }
938
- function ct({
975
+ function gt({
939
976
  id: e,
940
977
  children: n,
941
978
  initialSnap: t = "half",
942
979
  snapPoints: r,
943
980
  className: o = "",
944
- overlayClassName: u = "",
945
- closeOnBackdrop: g = !0,
981
+ overlayClassName: i = "",
982
+ closeOnBackdrop: f = !0,
946
983
  lockScroll: c = !0,
947
- zIndex: f = 1e3
984
+ zIndex: u = 1e3
948
985
  }) {
949
- const { activeSheets: a, closeBottomSheet: s } = Ge(), l = a.includes(e), i = !!r, [x, p] = z(!1), [b, $] = z(100), [C, O] = z(!1), y = F(0), v = F(0), h = F(null), w = typeof window < "u" ? window.innerHeight : 0, N = r ? (1 - r.full) * 100 : 0, k = r ? (1 - r.half) * 100 : 0, P = I(
950
- (S) => {
951
- if (i)
952
- switch (S) {
986
+ const { activeSheets: a, closeBottomSheet: s } = Qe(), l = a.includes(e), p = !!r, [x, g] = I(!1), [m, C] = I(100), [v, L] = I(!1), S = F(0), b = F(0), y = F(null), w = typeof window < "u" ? window.innerHeight : 0, N = r ? (1 - r.full) * 100 : 0, $ = r ? (1 - r.half) * 100 : 0, O = T(
987
+ (k) => {
988
+ if (p)
989
+ switch (k) {
953
990
  case "full":
954
- $(N);
991
+ C(N);
955
992
  break;
956
993
  case "half":
957
- $(k);
994
+ C($);
958
995
  break;
959
996
  default:
960
- $(100);
997
+ C(100);
961
998
  }
962
999
  },
963
- [N, k, i]
1000
+ [N, $, p]
964
1001
  );
965
- B(() => {
966
- p(!0);
967
- }, []), B(() => {
1002
+ R(() => {
1003
+ g(!0);
1004
+ }, []), R(() => {
968
1005
  if (!l) {
969
- $(100);
1006
+ C(100);
970
1007
  return;
971
1008
  }
972
- i ? P(t) : $(0);
973
- }, [l, t, P, i]), B(() => {
1009
+ p ? O(t) : C(0);
1010
+ }, [l, t, O, p]), R(() => {
974
1011
  if (c)
975
1012
  return l ? (document.body.style.overflow = "hidden", document.body.style.touchAction = "none") : (document.body.style.overflow = "", document.body.style.touchAction = ""), () => {
976
1013
  document.body.style.overflow = "", document.body.style.touchAction = "";
977
1014
  };
978
- }, [l, c]), B(() => {
1015
+ }, [l, c]), R(() => {
979
1016
  if (!l) return;
980
- const S = (T) => {
981
- T.key === "Escape" && s(e);
1017
+ const k = (M) => {
1018
+ M.key === "Escape" && s(e);
982
1019
  };
983
- return window.addEventListener("keydown", S), () => {
984
- window.removeEventListener("keydown", S);
1020
+ return window.addEventListener("keydown", k), () => {
1021
+ window.removeEventListener("keydown", k);
985
1022
  };
986
1023
  }, [s, e, l]);
987
- const j = (S) => {
988
- var T, R;
989
- i && (O(!0), y.current = S.clientY, v.current = b, (R = (T = S.target).setPointerCapture) == null || R.call(T, S.pointerId));
990
- }, m = (S) => {
991
- if (!C || !i) return;
992
- const R = (S.clientY - y.current) / w * 100, H = v.current + R;
993
- $(Math.min(Math.max(H, N), 100));
994
- }, L = () => {
995
- if (!i) return;
996
- if (O(!1), b > 75) {
1024
+ const A = (k) => {
1025
+ var M, _;
1026
+ p && (L(!0), S.current = k.clientY, b.current = m, (_ = (M = k.target).setPointerCapture) == null || _.call(M, k.pointerId));
1027
+ }, h = (k) => {
1028
+ if (!v || !p) return;
1029
+ const _ = (k.clientY - S.current) / w * 100, H = b.current + _;
1030
+ C(Math.min(Math.max(H, N), 100));
1031
+ }, E = () => {
1032
+ if (!p) return;
1033
+ if (L(!1), m > 75) {
997
1034
  s(e);
998
1035
  return;
999
1036
  }
1000
- const S = (k + N) / 2;
1001
- b <= S ? P("full") : P("half");
1037
+ const k = ($ + N) / 2;
1038
+ m <= k ? O("full") : O("half");
1002
1039
  };
1003
1040
  if (!x) return null;
1004
1041
  const D = {
1005
- transform: `translate3d(0, ${b}%, 0)`,
1006
- transition: C ? "none" : "transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",
1042
+ transform: `translate3d(0, ${m}%, 0)`,
1043
+ transition: v ? "none" : "transform 240ms cubic-bezier(0.22, 1, 0.36, 1)",
1007
1044
  willChange: "transform",
1008
- zIndex: f,
1045
+ zIndex: u,
1009
1046
  // height: hasSnapPoints ? "92dvh" : `${contentHeight}px`,
1010
1047
  maxHeight: "100dvh"
1011
1048
  };
1012
- return ye(
1013
- /* @__PURE__ */ E(me, { children: [
1049
+ return xe(
1050
+ /* @__PURE__ */ P(be, { children: [
1014
1051
  /* @__PURE__ */ d(
1015
1052
  "button",
1016
1053
  {
1017
1054
  type: "button",
1018
1055
  "aria-label": "Close bottom sheet",
1019
1056
  onClick: () => {
1020
- g && s(e);
1057
+ f && s(e);
1021
1058
  },
1022
- className: `fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${l ? "opacity-100" : "pointer-events-none opacity-0"} ${u}`,
1023
- style: { zIndex: f }
1059
+ className: `fixed inset-0 bg-black/45 backdrop-blur-[2px] transition-opacity duration-200 ${l ? "opacity-100" : "pointer-events-none opacity-0"} ${i}`,
1060
+ style: { zIndex: u }
1024
1061
  }
1025
1062
  ),
1026
- /* @__PURE__ */ E(
1063
+ /* @__PURE__ */ P(
1027
1064
  "div",
1028
1065
  {
1029
- ref: h,
1066
+ ref: y,
1030
1067
  style: D,
1031
1068
  className: `
1032
1069
  fixed inset-x-0 bottom-0
@@ -1045,12 +1082,12 @@ function ct({
1045
1082
  /* @__PURE__ */ d(
1046
1083
  "div",
1047
1084
  {
1048
- onPointerDown: j,
1049
- onPointerMove: m,
1050
- onPointerUp: L,
1085
+ onPointerDown: A,
1086
+ onPointerMove: h,
1087
+ onPointerUp: E,
1051
1088
  className: `
1052
1089
  flex justify-center py-2.5
1053
- ${i ? "cursor-grab active:cursor-grabbing" : ""}
1090
+ ${p ? "cursor-grab active:cursor-grabbing" : ""}
1054
1091
  select-none touch-none bg-gray-50
1055
1092
  `,
1056
1093
  children: /* @__PURE__ */ d("div", { className: "h-1 w-14 rounded-full bg-gray-500" })
@@ -1064,27 +1101,27 @@ function ct({
1064
1101
  document.body
1065
1102
  );
1066
1103
  }
1067
- function Ue(e) {
1104
+ function Ve(e) {
1068
1105
  return te({ 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);
1069
1106
  }
1070
- const dt = ({
1107
+ const mt = ({
1071
1108
  items: e,
1072
1109
  allowMultipleOpen: n = !1,
1073
1110
  className: t = "",
1074
1111
  tileClasses: r = "",
1075
1112
  open: o,
1076
- onChange: u,
1077
- renderTitle: g,
1113
+ onChange: i,
1114
+ renderTitle: f,
1078
1115
  renderContent: c,
1079
- showArrowIcon: f = !0,
1116
+ showArrowIcon: u = !0,
1080
1117
  panelClasses: a = ""
1081
1118
  }) => {
1082
- const [s, l] = z(/* @__PURE__ */ new Set()), i = _(() => o ? new Set(o) : s, [o, s]), x = I(
1083
- (p) => {
1084
- const b = new Set(i);
1085
- b.has(p) ? b.delete(p) : (n || b.clear(), b.add(p)), o && u ? u(Array.from(b)) : l(b);
1119
+ const [s, l] = I(/* @__PURE__ */ new Set()), p = B(() => o ? new Set(o) : s, [o, s]), x = T(
1120
+ (g) => {
1121
+ const m = new Set(p);
1122
+ m.has(g) ? m.delete(g) : (n || m.clear(), m.add(g)), o && i ? i(Array.from(m)) : l(m);
1086
1123
  },
1087
- [i, o, u, n]
1124
+ [p, o, i, n]
1088
1125
  );
1089
1126
  return /* @__PURE__ */ d(
1090
1127
  "div",
@@ -1092,42 +1129,42 @@ const dt = ({
1092
1129
  className: "accordion",
1093
1130
  role: "region",
1094
1131
  "aria-multiselectable": n,
1095
- children: e.map((p) => {
1096
- const b = i.has(p.id), $ = `accordion-heading-${p.id}`, C = `accordion-panel-${p.id}`;
1097
- return /* @__PURE__ */ E(
1132
+ children: e.map((g) => {
1133
+ const m = p.has(g.id), C = `accordion-heading-${g.id}`, v = `accordion-panel-${g.id}`;
1134
+ return /* @__PURE__ */ P(
1098
1135
  "div",
1099
1136
  {
1100
1137
  className: `accordion-item border rounded border-gray-300 dark:border-gray-700 ${t}`,
1101
1138
  children: [
1102
- /* @__PURE__ */ E(
1139
+ /* @__PURE__ */ P(
1103
1140
  "button",
1104
1141
  {
1105
- id: $,
1142
+ id: C,
1106
1143
  type: "button",
1107
- "aria-expanded": b,
1108
- "aria-controls": C,
1109
- onClick: () => x(p.id),
1144
+ "aria-expanded": m,
1145
+ "aria-controls": v,
1146
+ onClick: () => x(g.id),
1110
1147
  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 ${r}`,
1111
1148
  children: [
1112
- g ? g(p, b) : p.title,
1113
- f ? /* @__PURE__ */ d(Ue, {}) : null
1149
+ f ? f(g, m) : g.title,
1150
+ u ? /* @__PURE__ */ d(Ve, {}) : null
1114
1151
  ]
1115
1152
  }
1116
1153
  ),
1117
1154
  /* @__PURE__ */ d(
1118
1155
  "div",
1119
1156
  {
1120
- id: C,
1157
+ id: v,
1121
1158
  role: "region",
1122
- "aria-labelledby": $,
1123
- hidden: !b,
1159
+ "aria-labelledby": C,
1160
+ hidden: !m,
1124
1161
  className: `p-4 border-t border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 ${a}`,
1125
- children: c ? c(p, b) : p.content
1162
+ children: c ? c(g, m) : g.content
1126
1163
  }
1127
1164
  )
1128
1165
  ]
1129
1166
  },
1130
- p.id
1167
+ g.id
1131
1168
  );
1132
1169
  })
1133
1170
  }
@@ -1139,42 +1176,42 @@ const dt = ({
1139
1176
  "useModalActions must be used within a ModalActionProvider"
1140
1177
  );
1141
1178
  return e;
1142
- }, ge = V(null), be = () => ee(ge);
1143
- function ut({
1179
+ }, ge = V(null), me = () => ee(ge);
1180
+ function bt({
1144
1181
  id: e,
1145
1182
  variant: n = "center",
1146
1183
  title: t,
1147
1184
  children: r,
1148
1185
  standalone: o = !1,
1149
- showFloatingClose: u = !1,
1150
- containerClasses: g = "",
1186
+ showFloatingClose: i = !1,
1187
+ containerClasses: f = "",
1151
1188
  headerClasses: c = "",
1152
- bodyClasses: f = "",
1189
+ bodyClasses: u = "",
1153
1190
  onClose: a,
1154
1191
  disableEscapeClose: s = !1,
1155
1192
  closeBtnStyle: l
1156
1193
  }) {
1157
- const i = be(), x = pe(), p = !o && !!i && !!x, [b, $] = z(!1), C = p ? i.isOpen(e) : b, O = p ? i.getModalData(e) : null, y = n === "bottom-sheet", v = I(() => {
1158
- p ? x.closeModal(e) : $(!1), a == null || a();
1159
- }, [p, x, e, a]), h = F(null);
1160
- return B(() => {
1161
- if (!C) return;
1194
+ const p = me(), x = pe(), g = !o && !!p && !!x, [m, C] = I(!1), v = g ? p.isOpen(e) : m, L = g ? p.getModalData(e) : null, S = n === "bottom-sheet", b = T(() => {
1195
+ g ? x.closeModal(e) : C(!1), a == null || a();
1196
+ }, [g, x, e, a]), y = F(null);
1197
+ return R(() => {
1198
+ if (!v) return;
1162
1199
  const w = window.scrollY, N = {
1163
1200
  position: document.body.style.position,
1164
1201
  top: document.body.style.top,
1165
1202
  width: document.body.style.width
1166
1203
  };
1167
1204
  document.body.style.position = "fixed", document.body.style.top = `-${w}px`, document.body.style.width = "100%";
1168
- const k = (P) => {
1169
- P.preventDefault();
1205
+ const $ = (O) => {
1206
+ O.preventDefault();
1170
1207
  };
1171
- return document.addEventListener("touchmove", k, {
1208
+ return document.addEventListener("touchmove", $, {
1172
1209
  passive: !1
1173
1210
  }), () => {
1174
- document.body.style.position = N.position, document.body.style.top = N.top, document.body.style.width = N.width, document.removeEventListener("touchmove", k), window.scrollTo(0, w);
1211
+ document.body.style.position = N.position, document.body.style.top = N.top, document.body.style.width = N.width, document.removeEventListener("touchmove", $), window.scrollTo(0, w);
1175
1212
  };
1176
- }, [C]), B(() => {
1177
- C && (h.current = document.activeElement);
1213
+ }, [v]), R(() => {
1214
+ v && (y.current = document.activeElement);
1178
1215
  const w = document.getElementById(e), N = [
1179
1216
  "a[href]",
1180
1217
  "button:not([disabled])",
@@ -1182,29 +1219,29 @@ function ut({
1182
1219
  "input:not([disabled])",
1183
1220
  "select:not([disabled])",
1184
1221
  '[tabindex]:not([tabindex="-1"])'
1185
- ], k = () => {
1222
+ ], $ = () => {
1186
1223
  if (!w) return [];
1187
- const m = w.querySelectorAll(
1224
+ const h = w.querySelectorAll(
1188
1225
  N.join(",")
1189
1226
  );
1190
- return Array.from(m).filter((L) => L.offsetParent !== null);
1191
- }, P = (m) => {
1192
- if (m.key !== "Tab") return;
1193
- const L = k();
1194
- if (!L.length) return;
1195
- const D = L[0], S = L[L.length - 1];
1196
- m.shiftKey ? document.activeElement === D && (m.preventDefault(), S.focus()) : document.activeElement === S && (m.preventDefault(), D.focus());
1197
- }, j = (m) => {
1198
- m.key === "Escape" && !s && v(), P(m);
1227
+ return Array.from(h).filter((E) => E.offsetParent !== null);
1228
+ }, O = (h) => {
1229
+ if (h.key !== "Tab") return;
1230
+ const E = $();
1231
+ if (!E.length) return;
1232
+ const D = E[0], k = E[E.length - 1];
1233
+ h.shiftKey ? document.activeElement === D && (h.preventDefault(), k.focus()) : document.activeElement === k && (h.preventDefault(), D.focus());
1234
+ }, A = (h) => {
1235
+ h.key === "Escape" && !s && b(), O(h);
1199
1236
  };
1200
- return C && (window.addEventListener("keydown", j), setTimeout(() => {
1201
- const m = k();
1202
- m.length && m[0].focus();
1237
+ return v && (window.addEventListener("keydown", A), setTimeout(() => {
1238
+ const h = $();
1239
+ h.length && h[0].focus();
1203
1240
  }, 0)), () => {
1204
- var m;
1205
- window.removeEventListener("keydown", j), (m = h.current) == null || m.focus();
1241
+ var h;
1242
+ window.removeEventListener("keydown", A), (h = y.current) == null || h.focus();
1206
1243
  };
1207
- }, [C, v, s, e]), C ? /* @__PURE__ */ d(
1244
+ }, [v, b, s, e]), v ? /* @__PURE__ */ d(
1208
1245
  "div",
1209
1246
  {
1210
1247
  id: e,
@@ -1212,16 +1249,16 @@ function ut({
1212
1249
  fixed inset-0 z-50
1213
1250
  bg-black/60 backdrop-blur-[2px]
1214
1251
  flex
1215
- ${y ? "items-end justify-center" : "items-center justify-center"}
1252
+ ${S ? "items-end justify-center" : "items-center justify-center"}
1216
1253
  `,
1217
- children: /* @__PURE__ */ E(
1254
+ children: /* @__PURE__ */ P(
1218
1255
  "div",
1219
1256
  {
1220
1257
  className: `
1221
1258
  bg-white shadow-lg
1222
1259
  transform transition-all duration-300
1223
1260
 
1224
- ${y ? `
1261
+ ${S ? `
1225
1262
  w-full
1226
1263
  rounded-t-3xl
1227
1264
  max-h-[92dvh]
@@ -1234,10 +1271,10 @@ function ut({
1234
1271
  p-4
1235
1272
  `}
1236
1273
 
1237
- ${g}
1274
+ ${f}
1238
1275
  `,
1239
1276
  children: [
1240
- /* @__PURE__ */ E(
1277
+ /* @__PURE__ */ P(
1241
1278
  "div",
1242
1279
  {
1243
1280
  className: `
@@ -1247,10 +1284,10 @@ function ut({
1247
1284
  `,
1248
1285
  children: [
1249
1286
  t && /* @__PURE__ */ d("h2", { className: "text-lg font-semibold", children: t }),
1250
- u && /* @__PURE__ */ d(
1287
+ i && /* @__PURE__ */ d(
1251
1288
  "button",
1252
1289
  {
1253
- onClick: v,
1290
+ onClick: b,
1254
1291
  "aria-label": "Close modal",
1255
1292
  className: `
1256
1293
  text-gray-500 hover:text-black
@@ -1267,96 +1304,96 @@ function ut({
1267
1304
  ]
1268
1305
  }
1269
1306
  ),
1270
- /* @__PURE__ */ d("div", { className: f, children: typeof r == "function" ? r({ modalData: O }) : r })
1307
+ /* @__PURE__ */ d("div", { className: u, children: typeof r == "function" ? r({ modalData: L }) : r })
1271
1308
  ]
1272
1309
  }
1273
1310
  )
1274
1311
  }
1275
1312
  ) : null;
1276
1313
  }
1277
- function ft({
1314
+ function ht({
1278
1315
  children: e
1279
1316
  }) {
1280
- const [n, t] = z({}), [r, o] = z({}), u = I((l, i) => {
1281
- t((x) => ({ ...x, [l]: !0 })), i && o((x) => ({ ...x, [l]: i }));
1282
- }, []), g = I((l) => {
1283
- t((i) => ({ ...i, [l]: !1 })), o((i) => {
1284
- const x = { ...i };
1317
+ const [n, t] = I({}), [r, o] = I({}), i = T((l, p) => {
1318
+ t((x) => ({ ...x, [l]: !0 })), p && o((x) => ({ ...x, [l]: p }));
1319
+ }, []), f = T((l) => {
1320
+ t((p) => ({ ...p, [l]: !1 })), o((p) => {
1321
+ const x = { ...p };
1285
1322
  return delete x[l], x;
1286
1323
  });
1287
- }, []), c = I((l) => !!n[l], [n]), f = I(
1324
+ }, []), c = T((l) => !!n[l], [n]), u = T(
1288
1325
  (l) => r[l],
1289
1326
  [r]
1290
- ), a = _(
1291
- () => ({ openModal: u, closeModal: g }),
1292
- [u, g]
1293
- ), s = _(
1294
- () => ({ isOpen: c, getModalData: f }),
1295
- [c, f]
1327
+ ), a = B(
1328
+ () => ({ openModal: i, closeModal: f }),
1329
+ [i, f]
1330
+ ), s = B(
1331
+ () => ({ isOpen: c, getModalData: u }),
1332
+ [c, u]
1296
1333
  );
1297
1334
  return /* @__PURE__ */ d(fe.Provider, { value: a, children: /* @__PURE__ */ d(ge.Provider, { value: s, children: e }) });
1298
1335
  }
1299
- function pt(e) {
1300
- const { openModal: n, closeModal: t } = pe(), { isOpen: r, getModalData: o } = be();
1336
+ function yt(e) {
1337
+ const { openModal: n, closeModal: t } = pe(), { isOpen: r, getModalData: o } = me();
1301
1338
  return {
1302
- open: (u) => n(e, u),
1339
+ open: (i) => n(e, i),
1303
1340
  close: () => t(e),
1304
1341
  isOpen: r(e),
1305
1342
  data: o(e)
1306
1343
  };
1307
1344
  }
1308
1345
  let J = null, Q = {};
1309
- function qe(e) {
1346
+ function et(e) {
1310
1347
  J = e;
1311
1348
  }
1312
- function gt(e) {
1349
+ function xt(e) {
1313
1350
  Q = { ...Q, ...e };
1314
1351
  }
1315
- function Xe() {
1352
+ function tt() {
1316
1353
  return Q;
1317
1354
  }
1318
- function bt(e, n, t = 3e3, r) {
1355
+ function wt(e, n, t = 3e3, r) {
1319
1356
  J ? J(e, n, t, r) : console.warn("Toast system is not mounted");
1320
1357
  }
1321
- function Je(e) {
1358
+ function nt(e) {
1322
1359
  return te({ 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);
1323
1360
  }
1324
- const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1361
+ const rt = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1325
1362
  const n = Math.random() * 16 | 0;
1326
1363
  return (e === "x" ? n : n & 3 | 8).toString(16);
1327
- }), mt = ({ containerStyle: e = "" }) => {
1328
- const [n, t] = z([]);
1329
- B(() => {
1330
- qe((o, u, g, c) => {
1331
- const f = Qe();
1332
- t((a) => [...a, { id: f, type: o, message: u, config: c }]), setTimeout(() => {
1333
- t((a) => a.filter((s) => s.id !== f));
1334
- }, g);
1364
+ }), vt = ({ containerStyle: e = "" }) => {
1365
+ const [n, t] = I([]);
1366
+ R(() => {
1367
+ et((o, i, f, c) => {
1368
+ const u = rt();
1369
+ t((a) => [...a, { id: u, type: o, message: i, config: c }]), setTimeout(() => {
1370
+ t((a) => a.filter((s) => s.id !== u));
1371
+ }, f);
1335
1372
  });
1336
1373
  }, []);
1337
- const r = Xe();
1374
+ const r = tt();
1338
1375
  return /* @__PURE__ */ d(
1339
1376
  "div",
1340
1377
  {
1341
1378
  className: `fixed top-5 right-5 z-9999 flex flex-col gap-2 ${e}`,
1342
1379
  children: n.map((o) => {
1343
- var a, s, l, i, x, p, b, $, C, O, y, v, h, w;
1344
- const u = ((a = o.config) == null ? void 0 : a.icon) || ((s = r.icons) == null ? void 0 : s[o.type]) || Ve(o.type), g = ((l = o.config) == null ? void 0 : l.bgColor) || ((x = (i = r.colors) == null ? void 0 : i[o.type]) == null ? void 0 : x.bg) || "bg-white dark:bg-gray-800", c = ((p = o.config) == null ? void 0 : p.textColor) || (($ = (b = r.colors) == null ? void 0 : b[o.type]) == null ? void 0 : $.text) || "text-gray-700 dark:text-gray-300", f = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(C = o.config) == null ? void 0 : C.iconContainerClass}`;
1345
- return /* @__PURE__ */ E(
1380
+ var a, s, l, p, x, g, m, C, v, L, S, b, y, w;
1381
+ const i = ((a = o.config) == null ? void 0 : a.icon) || ((s = r.icons) == null ? void 0 : s[o.type]) || ot(o.type), f = ((l = o.config) == null ? void 0 : l.bgColor) || ((x = (p = r.colors) == null ? void 0 : p[o.type]) == null ? void 0 : x.bg) || "bg-white dark:bg-gray-800", c = ((g = o.config) == null ? void 0 : g.textColor) || ((C = (m = r.colors) == null ? void 0 : m[o.type]) == null ? void 0 : C.text) || "text-gray-700 dark:text-gray-300", u = `w-8 h-8 mr-3 text-xl flex items-center justify-center ${(v = o.config) == null ? void 0 : v.iconContainerClass}`;
1382
+ return /* @__PURE__ */ P(
1346
1383
  "div",
1347
1384
  {
1348
- className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${g} ${c} ${(O = o.config) == null ? void 0 : O.containerBody}`,
1385
+ className: `flex items-center w-full max-w-xs p-4 text-sm rounded-lg shadow ${f} ${c} ${(L = o.config) == null ? void 0 : L.containerBody}`,
1349
1386
  children: [
1350
- u && /* @__PURE__ */ d("div", { className: f, children: u }),
1351
- /* @__PURE__ */ E("div", { className: "flex-1", children: [
1352
- ((y = o.config) == null ? void 0 : y.title) && /* @__PURE__ */ d(
1387
+ i && /* @__PURE__ */ d("div", { className: u, children: i }),
1388
+ /* @__PURE__ */ P("div", { className: "flex-1", children: [
1389
+ ((S = o.config) == null ? void 0 : S.title) && /* @__PURE__ */ d(
1353
1390
  "div",
1354
1391
  {
1355
- className: `font-semibold text-black ${(v = o.config) == null ? void 0 : v.titleClass}`,
1392
+ className: `font-semibold text-black ${(b = o.config) == null ? void 0 : b.titleClass}`,
1356
1393
  children: o.config.title
1357
1394
  }
1358
1395
  ),
1359
- ((h = o.config) == null ? void 0 : h.description) && /* @__PURE__ */ d(
1396
+ ((y = o.config) == null ? void 0 : y.description) && /* @__PURE__ */ d(
1360
1397
  "div",
1361
1398
  {
1362
1399
  className: `text-sm text-gray-500 ${(w = o.config) == null ? void 0 : w.subTitleClass}`,
@@ -1367,10 +1404,10 @@ const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
1367
1404
  /* @__PURE__ */ d(
1368
1405
  "button",
1369
1406
  {
1370
- onClick: () => t((N) => N.filter((k) => k.id !== o.id)),
1407
+ onClick: () => t((N) => N.filter(($) => $.id !== o.id)),
1371
1408
  className: "ml-auto text-gray-400 hover:text-gray-700 dark:text-gray-500 dark:hover:text-white",
1372
1409
  "aria-label": "Close",
1373
- children: /* @__PURE__ */ d(Je, { size: 18 })
1410
+ children: /* @__PURE__ */ d(nt, { size: 18 })
1374
1411
  }
1375
1412
  )
1376
1413
  ]
@@ -1381,7 +1418,7 @@ const Qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, functio
1381
1418
  }
1382
1419
  );
1383
1420
  };
1384
- function Ve(e) {
1421
+ function ot(e) {
1385
1422
  switch (e) {
1386
1423
  case "success":
1387
1424
  return "✅";
@@ -1394,24 +1431,24 @@ function Ve(e) {
1394
1431
  }
1395
1432
  }
1396
1433
  export {
1397
- dt as Accordion,
1398
- at as Badge,
1399
- ct as BottomSheet,
1400
- it as BottomSheetProvider,
1401
- rt as Button,
1402
- He as Checkbox,
1403
- ot as Dropdown,
1404
- Ce as Input,
1405
- ut as Modal,
1406
- ft as ModalProvider,
1407
- Ee as Select,
1408
- mt as Toast,
1409
- lt as Toggler,
1410
- st as Tooltip,
1411
- gt as setToastDefaults,
1412
- bt as showToast,
1413
- Ge as useBottomSheet,
1434
+ mt as Accordion,
1435
+ ut as Badge,
1436
+ gt as BottomSheet,
1437
+ pt as BottomSheetProvider,
1438
+ it as Button,
1439
+ Ye as Checkbox,
1440
+ ct as Dropdown,
1441
+ $e as Input,
1442
+ bt as Modal,
1443
+ ht as ModalProvider,
1444
+ Pe as Select,
1445
+ vt as Toast,
1446
+ ft as Toggler,
1447
+ dt as Tooltip,
1448
+ xt as setToastDefaults,
1449
+ wt as showToast,
1450
+ Qe as useBottomSheet,
1414
1451
  pe as useModalActions,
1415
- pt as useModalInstance,
1416
- be as useModalState
1452
+ yt as useModalInstance,
1453
+ me as useModalState
1417
1454
  };