tailwind-ux-kit 1.0.110 → 1.0.113

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