visits-style 2.2.9 → 2.3.0

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.
package/dist/index.es.js CHANGED
@@ -1,42 +1,42 @@
1
1
  import e from "clsx";
2
2
  import { twMerge as t } from "tailwind-merge";
3
- import { Children as n, cloneElement as r, createContext as i, createElement as a, forwardRef as o, startTransition as s, useCallback as c, useContext as l, useEffect as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
4
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
5
- import { FloatingOverlay as y, autoUpdate as b, flip as x, offset as S, shift as C, useClick as w, useClientPoint as T, useDismiss as E, useFloating as D, useHover as O, useId as k, useInteractions as A, useTransitionStyles as j } from "@floating-ui/react";
6
- import { createPortal as M } from "react-dom";
3
+ import { createContext as n, createElement as r, forwardRef as i, startTransition as a, useCallback as o, useContext as s, useEffect as c, useImperativeHandle as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
4
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { FloatingOverlay as _, autoUpdate as v, flip as y, offset as b, shift as x, useClick as S, useClientPoint as C, useDismiss as w, useFloating as T, useHover as E, useId as D, useInteractions as O, useTransitionStyles as k } from "@floating-ui/react";
6
+ import { createPortal as A } from "react-dom";
7
7
  //#region src/utils/merge.ts
8
- var N = e;
9
- function P(e, n) {
8
+ var j = e;
9
+ function M(e, n) {
10
10
  return n ? t(e, n) : e;
11
11
  }
12
12
  //#endregion
13
13
  //#region src/elements/Base.tsx
14
- function F({ as: e, classList: t = [], className: n, override: r, ...i }) {
15
- let o = p(() => r ? n : P(N(t), n), [
14
+ function N({ as: e, classList: t = [], className: n, override: i, ...a }) {
15
+ let o = d(() => i ? n : M(j(t), n), [
16
16
  t,
17
17
  n,
18
- r
18
+ i
19
19
  ]);
20
- return a(e || "div", {
20
+ return r(e || "div", {
21
21
  className: o,
22
- ...i
22
+ ...a
23
23
  });
24
24
  }
25
- function I(e, t, n = {}) {
26
- let r = ({ className: r, ...i }) => {
27
- let o = p(() => P(t, r), [r]);
28
- return a(e, {
25
+ function P(e, t, n = {}) {
26
+ let i = ({ className: i, ...a }) => {
27
+ let o = d(() => M(t, i), [i]);
28
+ return r(e, {
29
29
  className: o,
30
30
  ...n,
31
- ...i
31
+ ...a
32
32
  });
33
33
  };
34
- return r.displayName = `Styled${typeof e == "string" ? e : "Component"}`, r;
34
+ return i.displayName = `Styled${typeof e == "string" ? e : "Component"}`, i;
35
35
  }
36
36
  //#endregion
37
37
  //#region src/forms/Field/FormLabel.tsx
38
- function L(e) {
39
- return /* @__PURE__ */ _(F, {
38
+ function F(e) {
39
+ return /* @__PURE__ */ h(N, {
40
40
  as: "label",
41
41
  classList: ["leading-none peer-disabled:opacity-70"],
42
42
  ...e
@@ -44,47 +44,40 @@ function L(e) {
44
44
  }
45
45
  //#endregion
46
46
  //#region src/forms/Field/FormField.tsx
47
- function R({ label: e, children: t, required: n, htmlFor: r, error: i, help: a, helpBefore: o, innerClass: s, ...c }) {
48
- let l = p(() => N("font-medium", n ? "after:content-[\"*\"] after:text-danger after:text-sm after:pl-0.5" : ""), [n]);
49
- return /* @__PURE__ */ v(F, {
47
+ function I({ label: e, render: t, required: n, htmlFor: r, error: i, help: a, helpBefore: o, innerClass: s, ...c }) {
48
+ let l = d(() => j("font-medium", n ? "after:content-[\"*\"] after:text-danger after:text-sm after:pl-0.5" : ""), [n]);
49
+ return /* @__PURE__ */ g(N, {
50
50
  classList: "flex flex-col space-y-2",
51
51
  ...c,
52
52
  children: [
53
- e ? /* @__PURE__ */ _(L, {
53
+ e ? /* @__PURE__ */ h(F, {
54
54
  className: l,
55
55
  htmlFor: r,
56
56
  children: e
57
57
  }) : null,
58
- a && o ? /* @__PURE__ */ _("p", {
58
+ a && o ? /* @__PURE__ */ h("p", {
59
59
  className: "text-xs text-muted pb-2",
60
60
  children: a
61
61
  }) : null,
62
- /* @__PURE__ */ _("div", {
62
+ /* @__PURE__ */ h("div", {
63
63
  className: s,
64
- children: z(t, !!i)
64
+ children: t(!!i)
65
65
  }),
66
- a && !o && !i ? /* @__PURE__ */ _("p", {
66
+ a && !o && !i ? /* @__PURE__ */ h("p", {
67
67
  className: "text-xs text-muted",
68
68
  children: a
69
69
  }) : null,
70
- i ? /* @__PURE__ */ _("p", {
70
+ i ? /* @__PURE__ */ h("p", {
71
71
  className: "text-xs text-danger",
72
72
  children: i
73
73
  }) : null
74
74
  ]
75
75
  });
76
76
  }
77
- function z(e, t) {
78
- let i = n.count(e);
79
- if (!i) return null;
80
- if (i === 1) return r(e, { error: t });
81
- let a = n.toArray(e);
82
- return a[0] = r(a[0], { error: t }), a;
83
- }
84
77
  //#endregion
85
78
  //#region src/forms/Field/InputField.tsx
86
- function ee({ error: e, ...t }) {
87
- return /* @__PURE__ */ _(F, {
79
+ function L({ error: e, ...t }) {
80
+ return /* @__PURE__ */ h(N, {
88
81
  as: "fieldset",
89
82
  classList: [
90
83
  "flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted",
@@ -96,8 +89,8 @@ function ee({ error: e, ...t }) {
96
89
  }
97
90
  //#endregion
98
91
  //#region src/forms/Input/index.tsx
99
- function B({ type: e, error: t, ...n }) {
100
- return /* @__PURE__ */ _(F, {
92
+ function R({ type: e, error: t, ...n }) {
93
+ return /* @__PURE__ */ h(N, {
101
94
  as: "input",
102
95
  type: e,
103
96
  classList: [
@@ -111,8 +104,8 @@ function B({ type: e, error: t, ...n }) {
111
104
  }
112
105
  //#endregion
113
106
  //#region src/forms/Textarea/index.tsx
114
- function V({ error: e, ...t }) {
115
- return /* @__PURE__ */ _(F, {
107
+ function z({ error: e, ...t }) {
108
+ return /* @__PURE__ */ h(N, {
116
109
  as: "textarea",
117
110
  classList: [
118
111
  "flex rounded-md border bg-background px-3 py-2 w-full",
@@ -124,13 +117,13 @@ function V({ error: e, ...t }) {
124
117
  }
125
118
  //#endregion
126
119
  //#region src/forms/Checkbox/index.tsx
127
- function H() {
128
- return /* @__PURE__ */ _("svg", {
120
+ function B() {
121
+ return /* @__PURE__ */ h("svg", {
129
122
  xmlns: "http://www.w3.org/2000/svg",
130
123
  width: "30",
131
124
  height: "30",
132
125
  viewBox: "0 0 30 30",
133
- children: /* @__PURE__ */ _("rect", {
126
+ children: /* @__PURE__ */ h("rect", {
134
127
  width: "20",
135
128
  height: "3",
136
129
  y: "13.5",
@@ -141,11 +134,11 @@ function H() {
141
134
  })
142
135
  });
143
136
  }
144
- function U({ checked: e, indeterminate: t, id: n, name: r, onChange: i, value: a, checkIcon: o, error: s, ...c }) {
137
+ function V({ checked: e, indeterminate: t, id: n, name: r, onChange: i, value: a, checkIcon: o, error: s, ...c }) {
145
138
  let l = () => {
146
139
  c.disabled || i?.(!e);
147
140
  };
148
- return /* @__PURE__ */ v(F, {
141
+ return /* @__PURE__ */ g(N, {
149
142
  as: "button",
150
143
  type: "button",
151
144
  role: "checkbox",
@@ -164,8 +157,8 @@ function U({ checked: e, indeterminate: t, id: n, name: r, onChange: i, value: a
164
157
  ...c,
165
158
  children: [
166
159
  e ? o : null,
167
- t && !e ? /* @__PURE__ */ _(H, {}) : null,
168
- /* @__PURE__ */ _("input", {
160
+ t && !e ? /* @__PURE__ */ h(B, {}) : null,
161
+ /* @__PURE__ */ h("input", {
169
162
  type: "checkbox",
170
163
  "aria-hidden": "true",
171
164
  name: r,
@@ -188,52 +181,52 @@ function U({ checked: e, indeterminate: t, id: n, name: r, onChange: i, value: a
188
181
  }
189
182
  //#endregion
190
183
  //#region src/hooks/useIsomorphicLayoutEffect.ts
191
- var W = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? f : u;
184
+ var H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? u : c;
192
185
  //#endregion
193
186
  //#region src/components/Portal/index.tsx
194
- function G({ children: e, container: t, disabled: n }) {
195
- let [r, i] = h(null);
196
- return W(() => {
187
+ function U({ children: e, container: t, disabled: n }) {
188
+ let [r, i] = p(null);
189
+ return H(() => {
197
190
  if (!t) {
198
191
  let e = document.getElementById("visits-style-portals");
199
192
  return e || (e = document.createElement("div"), e.id = "visits-style-portals", document.body.appendChild(e)), i(e);
200
193
  }
201
194
  i(t);
202
- }, [t]), n || !r ? null : M(e, r);
195
+ }, [t]), n || !r ? null : A(e, r);
203
196
  }
204
197
  //#endregion
205
198
  //#region src/utils/stopPropagation.ts
206
- function K(e) {
199
+ function W(e) {
207
200
  e && (e.stopPropagation(), e.preventDefault());
208
201
  }
209
202
  //#endregion
210
203
  //#region src/components/Popover/index.tsx
211
- var te = {
204
+ var ee = {
212
205
  open: 150,
213
206
  close: 75
214
207
  };
215
- function q({ ref: e, position: t, label: i, children: a, disabled: o, offset: s = {
208
+ function G({ ref: e, position: t, render: n, children: r, disabled: i, offset: a = {
216
209
  x: 0,
217
210
  y: 6
218
- }, onOpen: l, onClose: f, onManualClose: p, timeout: T = te, override: E, zIndex: O = 9996, role: M, ...N }) {
219
- let [P, F] = h(!1), I = k(), L = m(l), R = m(f), { refs: z, floatingStyles: ee, context: B } = D({
220
- nodeId: I,
211
+ }, onOpen: s, onClose: u, onManualClose: d, timeout: C = ee, override: w, zIndex: E = 9996, role: A, ...j }) {
212
+ let [M, N] = p(!1), P = D(), F = f(s), I = f(u), { refs: L, floatingStyles: R, context: z } = T({
213
+ nodeId: P,
221
214
  placement: t,
222
215
  middleware: [
223
- C(),
224
- x({ fallbackAxisSideDirection: "end" }),
225
- S({
226
- mainAxis: s.y,
227
- crossAxis: s.x
216
+ x(),
217
+ y({ fallbackAxisSideDirection: "end" }),
218
+ b({
219
+ mainAxis: a.y,
220
+ crossAxis: a.x
228
221
  })
229
222
  ],
230
- open: P,
223
+ open: M,
231
224
  onOpenChange: (e) => {
232
- e ? L.current?.(z.reference.current, z.floating.current) : R.current?.(z.reference.current, z.floating.current), F(e);
225
+ e ? F.current?.(L.reference.current, L.floating.current) : I.current?.(L.reference.current, L.floating.current), N(e);
233
226
  },
234
- whileElementsMounted: b
235
- }), { isMounted: V, styles: H } = j(B, {
236
- duration: T,
227
+ whileElementsMounted: v
228
+ }), { isMounted: B, styles: V } = k(z, {
229
+ duration: C,
237
230
  initial({ side: e }) {
238
231
  let t = "";
239
232
  return t = e === "top" ? "translateY(5%) scale(0.95)" : e === "bottom" ? "translateY(-5%) scale(0.95)" : e === "left" ? "translateX(5%) scale(0.95)" : "translateX(-5%) scale(0.95)", {
@@ -241,54 +234,53 @@ function q({ ref: e, position: t, label: i, children: a, disabled: o, offset: s
241
234
  transform: t
242
235
  };
243
236
  }
244
- }), U = c((e) => {
245
- if (K(e), p) return p();
246
- F(!1), R.current?.(z.reference.current, z.floating.current);
247
- }, [p]);
248
- u(() => {
249
- if (o && P) return F(!1);
250
- }, [o, P]), d(e, () => ({
237
+ }), H = o((e) => {
238
+ if (W(e), d) return d();
239
+ N(!1), I.current?.(L.reference.current, L.floating.current);
240
+ }, [d]);
241
+ c(() => {
242
+ if (i && M) return N(!1);
243
+ }, [i, M]), l(e, () => ({
251
244
  open: () => {
252
- F(!0), L.current?.(z.reference.current, z.floating.current);
245
+ N(!0), F.current?.(L.reference.current, L.floating.current);
253
246
  },
254
247
  close: () => {
255
- F(!1), R.current?.(z.reference.current, z.floating.current);
248
+ N(!1), I.current?.(L.reference.current, L.floating.current);
256
249
  }
257
250
  }), []);
258
- let { getFloatingProps: W, getReferenceProps: q } = A([w(B, { enabled: !o })]);
259
- return L.current = l, R.current = f, /* @__PURE__ */ v(g, { children: [r(n.only(i), q({
260
- ref: z.setReference,
251
+ let { getFloatingProps: G, getReferenceProps: K } = O([S(z, { enabled: !i })]);
252
+ return F.current = s, I.current = u, /* @__PURE__ */ g(m, { children: [n(K({
253
+ ref: L.setReference,
261
254
  tabIndex: 0,
262
- role: "button",
263
- "aria-expanded": P,
264
- disabled: o,
265
- onClick: K
266
- })), /* @__PURE__ */ _(G, {
267
- disabled: o || !V,
268
- children: /* @__PURE__ */ _(y, {
255
+ "aria-expanded": M,
256
+ "aria-disabled": i,
257
+ onClick: W
258
+ })), /* @__PURE__ */ h(U, {
259
+ disabled: i || !B,
260
+ children: /* @__PURE__ */ h(_, {
269
261
  "data-testid": "vs-popover-shadow",
270
- onClick: U,
271
- style: { zIndex: O },
262
+ onClick: H,
263
+ style: { zIndex: E },
272
264
  autoFocus: !0,
273
- children: /* @__PURE__ */ _("div", {
274
- role: M || "region",
275
- ref: z.setFloating,
276
- style: ee,
277
- children: /* @__PURE__ */ _(ne, {
278
- override: E,
279
- styles: H,
280
- ...W({
281
- ...N,
282
- onClick: K
265
+ children: /* @__PURE__ */ h("div", {
266
+ role: A || "region",
267
+ ref: L.setFloating,
268
+ style: R,
269
+ children: /* @__PURE__ */ h(te, {
270
+ override: w,
271
+ styles: V,
272
+ ...G({
273
+ ...j,
274
+ onClick: W
283
275
  }),
284
- children: a
276
+ children: r
285
277
  })
286
278
  })
287
279
  })
288
280
  })] });
289
281
  }
290
- function ne({ override: e, styles: t, style: n = {}, ...r }) {
291
- return /* @__PURE__ */ _(F, {
282
+ function te({ override: e, styles: t, style: n = {}, ...r }) {
283
+ return /* @__PURE__ */ h(N, {
292
284
  classList: ["z-20 w-auto h-auto outline-none transition-transform ease-in-out", e ? null : "border border-accent rounded-md shadow-lg p-1 bg-background"],
293
285
  style: {
294
286
  ...t,
@@ -299,58 +291,58 @@ function ne({ override: e, styles: t, style: n = {}, ...r }) {
299
291
  }
300
292
  //#endregion
301
293
  //#region src/forms/Select/index.tsx
302
- function re({ ref: e, className: t, placeholder: n = "", options: r = [], error: i, disabled: a, value: o, maxHeight: s = 408, arrowIcon: l, closeIcon: u, checkIcon: f, onChange: g, onClear: y, renderItem: b, sectionLabelStyle: x, buttonAreaStyle: S, clearLabelText: C, optionStyle: w, popoverStyle: T, popoverPosition: E, labelStyle: D, ...O }) {
303
- let k = m(null), [A, j] = h(0), M = p(() => Array.isArray(o), []), N = c((e) => {
304
- g?.(e), M || k.current?.close();
305
- }, [g, M]), P = c((e) => Array.isArray(o) ? o.indexOf(e) > -1 : o === e, [o]), I = p(() => {
294
+ function K({ ref: e, className: t, placeholder: n = "", options: r = [], error: i, disabled: a, value: s, maxHeight: c = 408, arrowIcon: u, closeIcon: m, checkIcon: _, onChange: v, onClear: y, renderItem: b, sectionLabelStyle: x, buttonAreaStyle: S, clearLabelText: C, optionStyle: w, popoverStyle: T, popoverPosition: E, labelStyle: D, ...O }) {
295
+ let k = f(null), [A, j] = p(0), M = d(() => Array.isArray(s), []), P = o((e, t) => {
296
+ v?.(e, t), M || k.current?.close();
297
+ }, [v, M]), F = o((e) => Array.isArray(s) ? s.indexOf(e) > -1 : s === e, [s]), I = d(() => {
306
298
  let e = {}, t = r.filter((e) => typeof e != "string");
307
299
  for (let n = 0, r = t.length; n < r; n += 1) {
308
300
  let r = t[n];
309
301
  e[`${r.value}`] = r.label;
310
302
  }
311
303
  return e;
312
- }, [r]), L = p(() => {
313
- if (!o) return n;
314
- if (Array.isArray(o)) {
315
- if (!o.length) return n;
316
- let e = [...o].sort(), t = [];
304
+ }, [r]), L = d(() => {
305
+ if (!s) return n;
306
+ if (Array.isArray(s)) {
307
+ if (!s.length) return n;
308
+ let e = [...s].sort(), t = [];
317
309
  for (let n = 0, r = e.length; n < r; n += 1) t[n] = I[`${e[n]}`] || "";
318
310
  return t.filter(Boolean).join(",") || n;
319
311
  }
320
- return I[`${o}`] || n;
312
+ return I[`${s}`] || n;
321
313
  }, [
322
314
  n,
323
- o,
315
+ s,
324
316
  I
325
- ]), R = p(() => o == null ? !0 : Array.isArray(o) ? !o.length : !1, [o]), z = c((e, t) => b ? typeof e == "string" ? b(e, {
317
+ ]), R = d(() => s == null ? !0 : Array.isArray(s) ? !s.length : !1, [s]), z = o((e, t) => b ? typeof e == "string" ? b(e, {
326
318
  index: t,
327
319
  selected: !1,
328
320
  onChange: () => {}
329
321
  }) : b(e, {
330
322
  index: t,
331
- selected: P(e.value),
332
- onChange: () => N(e.value)
333
- }) : typeof e == "string" ? /* @__PURE__ */ _(F, {
323
+ selected: F(e.value),
324
+ onChange: () => P(e.value, e)
325
+ }) : typeof e == "string" ? /* @__PURE__ */ h(N, {
334
326
  as: "h5",
335
327
  classList: ["font-normal py-1 px-2 text-muted"],
336
328
  className: x,
337
329
  children: e
338
- }, `optionheader-${t}`) : /* @__PURE__ */ _(ie, {
339
- selected: P(e.value),
340
- onChange: N,
341
- checkIcon: f,
330
+ }, `optionheader-${t}`) : /* @__PURE__ */ h(ne, {
331
+ selected: F(e.value),
332
+ onChange: P,
333
+ checkIcon: _,
342
334
  className: w,
343
- ...e
335
+ data: e
344
336
  }, e.label), [
345
337
  b,
346
- N,
347
338
  P,
339
+ F,
348
340
  x,
349
341
  w,
350
- f
342
+ _
351
343
  ]);
352
- return d(e, () => k.current, []), /* @__PURE__ */ _(q, {
353
- label: /* @__PURE__ */ v(F, {
344
+ return l(e, () => k.current, []), /* @__PURE__ */ h(G, {
345
+ render: (e) => /* @__PURE__ */ g(N, {
354
346
  as: "button",
355
347
  type: "button",
356
348
  classList: [
@@ -360,16 +352,17 @@ function re({ ref: e, className: t, placeholder: n = "", options: r = [], error:
360
352
  ],
361
353
  className: t,
362
354
  disabled: a,
355
+ ...e,
363
356
  ...O,
364
- children: [/* @__PURE__ */ _(F, {
357
+ children: [/* @__PURE__ */ h(N, {
365
358
  as: "span",
366
359
  classList: ["overflow-hidden text-ellipsis whitespace-nowrap", R ? "text-muted" : "text-text"],
367
360
  className: D,
368
361
  children: L
369
- }), /* @__PURE__ */ v(F, {
362
+ }), /* @__PURE__ */ g(N, {
370
363
  classList: "relative flex items-center space-x-2",
371
364
  className: S,
372
- children: [y && !R ? /* @__PURE__ */ _("div", {
365
+ children: [y && !R ? /* @__PURE__ */ h("div", {
373
366
  tabIndex: -1,
374
367
  role: "button",
375
368
  className: "size-6 p-1.5 rounded hover:bg-accent cursor-pointer",
@@ -380,8 +373,8 @@ function re({ ref: e, className: t, placeholder: n = "", options: r = [], error:
380
373
  onClick: (e) => {
381
374
  e.stopPropagation(), y();
382
375
  },
383
- children: u
384
- }) : null, l]
376
+ children: m
377
+ }) : null, u]
385
378
  })]
386
379
  }),
387
380
  ref: k,
@@ -389,37 +382,37 @@ function re({ ref: e, className: t, placeholder: n = "", options: r = [], error:
389
382
  className: T,
390
383
  position: E,
391
384
  disabled: a,
392
- children: /* @__PURE__ */ _("div", {
385
+ children: /* @__PURE__ */ h("div", {
393
386
  className: "overflow-y-auto flex flex-col",
394
387
  role: "listbox",
395
388
  style: {
396
389
  minWidth: A,
397
390
  maxWidth: "calc(100vw - 3rem)",
398
- maxHeight: s
391
+ maxHeight: c
399
392
  },
400
393
  children: r.map(z)
401
394
  })
402
395
  });
403
396
  }
404
- function ie({ className: e, value: t, label: n, selected: r, checkIcon: i, onChange: a }) {
405
- return /* @__PURE__ */ v(F, {
397
+ function ne({ className: e, data: t, selected: n, checkIcon: r, onChange: i }) {
398
+ return /* @__PURE__ */ g(N, {
406
399
  as: "button",
407
400
  type: "button",
408
401
  role: "option",
409
402
  classList: "flex items-center w-full hover:bg-accent rounded p-1 cursor-pointer",
410
403
  className: e,
411
- "aria-selected": r,
412
- onClick: () => a?.(t),
413
- children: [i === null || r && i ? i : /* @__PURE__ */ _("div", { className: "w-5 h-1 mr-1" }), n]
404
+ "aria-selected": n,
405
+ onClick: () => i?.(t.value, t),
406
+ children: [r === null || n && r ? r : /* @__PURE__ */ h("div", { className: "w-5 h-1 mr-1" }), t.label]
414
407
  });
415
408
  }
416
409
  //#endregion
417
410
  //#region src/forms/Radio/index.tsx
418
- function ae({ checked: e, className: t, id: n, name: r, onChange: i, value: a, error: o, ...s }) {
411
+ function re({ checked: e, className: t, id: n, name: r, onChange: i, value: a, error: o, ...s }) {
419
412
  let c = () => {
420
413
  s.disabled || i?.(!e);
421
414
  };
422
- return /* @__PURE__ */ v(F, {
415
+ return /* @__PURE__ */ g(N, {
423
416
  as: "button",
424
417
  type: "button",
425
418
  role: "radio",
@@ -434,13 +427,13 @@ function ae({ checked: e, className: t, id: n, name: r, onChange: i, value: a, e
434
427
  onClick: c,
435
428
  "aria-checked": e,
436
429
  ...s,
437
- children: [/* @__PURE__ */ _("i", {
430
+ children: [/* @__PURE__ */ h("i", {
438
431
  className: "block w-2.5 h-2.5 rounded-full transition-transform",
439
432
  style: {
440
433
  transform: e ? "" : "scale(0.8)",
441
434
  opacity: +!!e
442
435
  }
443
- }), /* @__PURE__ */ _("input", {
436
+ }), /* @__PURE__ */ h("input", {
444
437
  type: "radio",
445
438
  "aria-hidden": "true",
446
439
  name: r,
@@ -462,11 +455,11 @@ function ae({ checked: e, className: t, id: n, name: r, onChange: i, value: a, e
462
455
  }
463
456
  //#endregion
464
457
  //#region src/forms/Switch/index.tsx
465
- function oe({ checked: e, onChange: t, value: n, id: r, name: i, error: a, ref: o, ...s }) {
458
+ function ie({ checked: e, onChange: t, value: n, id: r, name: i, error: a, ref: o, ...s }) {
466
459
  let c = () => {
467
460
  s.disabled || t?.(!e);
468
461
  };
469
- return /* @__PURE__ */ v(F, {
462
+ return /* @__PURE__ */ g(N, {
470
463
  as: "button",
471
464
  type: "button",
472
465
  role: "switch",
@@ -481,10 +474,10 @@ function oe({ checked: e, onChange: t, value: n, id: r, name: i, error: a, ref:
481
474
  "aria-checked": e,
482
475
  "aria-invalid": a,
483
476
  ...s,
484
- children: [/* @__PURE__ */ _("span", {
477
+ children: [/* @__PURE__ */ h("span", {
485
478
  className: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
486
479
  style: { transform: e ? "translateX(100%)" : "" }
487
- }), /* @__PURE__ */ _("input", {
480
+ }), /* @__PURE__ */ h("input", {
488
481
  ref: o,
489
482
  type: "checkbox",
490
483
  "aria-hidden": "true",
@@ -507,14 +500,14 @@ function oe({ checked: e, onChange: t, value: n, id: r, name: i, error: a, ref:
507
500
  }
508
501
  //#endregion
509
502
  //#region src/components/Accordion/index.tsx
510
- function se({ header: e, show: t, children: n, timeout: r = 300, ...i }) {
511
- let a = m(null), o = m(0), s = m(0), c = m(!0);
512
- return u(() => {
503
+ function ae({ header: e, show: t, children: n, timeout: r = 300, ...i }) {
504
+ let a = f(null), o = f(0), s = f(0), l = f(!0);
505
+ return c(() => {
513
506
  s.current = r;
514
- }, [r]), W(() => {
507
+ }, [r]), H(() => {
515
508
  if (!a.current) return;
516
- if (a.current.style.overflow = "hidden", a.current.style.opacity = "1", c.current) {
517
- c.current = !1, a.current.style.height = t ? "auto" : "0px", t ? window.requestAnimationFrame(() => {
509
+ if (a.current.style.overflow = "hidden", a.current.style.opacity = "1", l.current) {
510
+ l.current = !1, a.current.style.height = t ? "auto" : "0px", t ? window.requestAnimationFrame(() => {
518
511
  a.current && (o.current = a.current.offsetHeight);
519
512
  }) : (window.requestAnimationFrame(() => {
520
513
  a.current && (a.current.style.height = "auto", o.current = a.current.offsetHeight, a.current.style.height = "0px");
@@ -536,9 +529,9 @@ function se({ header: e, show: t, children: n, timeout: r = 300, ...i }) {
536
529
  return s.current === 0 ? r() : n = window.setTimeout(r, s.current), () => {
537
530
  e.forEach(window.cancelAnimationFrame), n && window.clearTimeout(n);
538
531
  };
539
- }, [t]), /* @__PURE__ */ v("div", {
532
+ }, [t]), /* @__PURE__ */ g("div", {
540
533
  ...i,
541
- children: [e, /* @__PURE__ */ _("div", {
534
+ children: [e, /* @__PURE__ */ h("div", {
542
535
  className: "transition-all ease-in-out overflow-hidden",
543
536
  role: "region",
544
537
  "aria-hidden": !t,
@@ -550,72 +543,70 @@ function se({ header: e, show: t, children: n, timeout: r = 300, ...i }) {
550
543
  }
551
544
  //#endregion
552
545
  //#region src/components/Tooltip/index.tsx
553
- var J = o(({ children: e, position: t = "bottom", label: i, className: a, timeout: o = 150, offset: s = {
546
+ var q = i(({ render: e, position: t = "bottom", label: n, className: r, timeout: i = 150, offset: a = {
554
547
  x: 0,
555
548
  y: 6
556
- }, clientPoint: c = !1, disabled: l }, f) => {
557
- let [p, m] = h(!1), y = k(), { refs: w, floatingStyles: E, context: M } = D({
558
- nodeId: y,
559
- open: p,
549
+ }, clientPoint: o = !1, disabled: s }, u) => {
550
+ let [d, f] = p(!1), _ = D(), { refs: S, floatingStyles: w, context: A } = T({
551
+ nodeId: _,
552
+ open: d,
560
553
  placement: t,
561
554
  middleware: [
562
- C(),
563
555
  x(),
564
- S({
565
- mainAxis: s.y,
566
- crossAxis: s.x
556
+ y(),
557
+ b({
558
+ mainAxis: a.y,
559
+ crossAxis: a.x
567
560
  })
568
561
  ],
569
- whileElementsMounted: l ? void 0 : b,
570
- onOpenChange: m
571
- }), { getReferenceProps: N, getFloatingProps: P } = A([O(M, { enabled: !l }), T(M, { enabled: c })]), { isMounted: F, styles: I } = j(M, {
572
- duration: o,
562
+ whileElementsMounted: s ? void 0 : v,
563
+ onOpenChange: f
564
+ }), { getReferenceProps: j, getFloatingProps: M } = O([E(A, { enabled: !s }), C(A, { enabled: o })]), { isMounted: N, styles: P } = k(A, {
565
+ duration: i,
573
566
  initial: {
574
567
  opacity: 0,
575
568
  transform: "scale(0.8)"
576
569
  }
577
570
  });
578
- d(f, () => ({
579
- floating: w.floating,
580
- reference: w.reference,
581
- open: () => m(!0),
582
- close: () => m(!1)
583
- })), u(() => {
584
- l && m(!1);
585
- }, [l]);
586
- let L = typeof e == "string" ? /* @__PURE__ */ _("span", { children: e }) : e;
587
- return /* @__PURE__ */ v(g, { children: [r(n.only(L), {
588
- ref: w.setReference,
589
- ...N()
590
- }), /* @__PURE__ */ _(G, {
591
- disabled: l || !F,
592
- children: /* @__PURE__ */ _("div", {
571
+ return l(u, () => ({
572
+ floating: S.floating,
573
+ reference: S.reference,
574
+ open: () => f(!0),
575
+ close: () => f(!1)
576
+ })), c(() => {
577
+ s && f(!1);
578
+ }, [s]), /* @__PURE__ */ g(m, { children: [e({
579
+ ref: S.setReference,
580
+ ...j()
581
+ }), /* @__PURE__ */ h(U, {
582
+ disabled: s || !N,
583
+ children: /* @__PURE__ */ h("div", {
593
584
  role: "tooltip",
594
585
  className: "z-9999",
595
- ref: w.setFloating,
596
- ...P({ style: E }),
597
- children: /* @__PURE__ */ _(Y, {
598
- className: a,
599
- style: I,
600
- children: i
586
+ ref: S.setFloating,
587
+ ...M({ style: w }),
588
+ children: /* @__PURE__ */ h(J, {
589
+ className: r,
590
+ style: P,
591
+ children: n
601
592
  })
602
593
  })
603
594
  })] });
604
595
  });
605
- J.displayName = "Tooltip";
606
- var Y = o(({ className: e, custom: t, ...n }, r) => {
607
- let i = p(() => P(N("relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre", t ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background"), e), [e, t]);
608
- return /* @__PURE__ */ _("div", {
596
+ q.displayName = "Tooltip";
597
+ var J = i(({ className: e, custom: t, ...n }, r) => {
598
+ let i = d(() => M(j("relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre", t ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background"), e), [e, t]);
599
+ return /* @__PURE__ */ h("div", {
609
600
  ref: r,
610
601
  className: i,
611
602
  ...n
612
603
  });
613
604
  });
614
- Y.displayName = "TooltipContent";
605
+ J.displayName = "TooltipContent";
615
606
  //#endregion
616
607
  //#region src/elements/Button/index.tsx
617
- function X({ variant: e, size: t }) {
618
- return N("inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto", {
608
+ function Y({ variant: e, size: t }) {
609
+ return j("inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto", {
619
610
  "bg-primary text-inverted hover:bg-primary-fore": !e || e === "primary",
620
611
  "bg-info text-inverted hover:bg-info-fore": e === "info",
621
612
  "bg-warn text-inverted hover:bg-warn-fore": e === "warn",
@@ -628,8 +619,8 @@ function X({ variant: e, size: t }) {
628
619
  "p-1.5": t === "icon"
629
620
  });
630
621
  }
631
- function ce({ size: e, variant: t, className: n, ...r }) {
632
- let i = p(() => P(X({
622
+ function oe({ size: e, variant: t, className: n, ...r }) {
623
+ let i = d(() => M(Y({
633
624
  size: e,
634
625
  variant: t
635
626
  }), n), [
@@ -637,7 +628,7 @@ function ce({ size: e, variant: t, className: n, ...r }) {
637
628
  t,
638
629
  n
639
630
  ]);
640
- return /* @__PURE__ */ _("button", {
631
+ return /* @__PURE__ */ h("button", {
641
632
  className: i,
642
633
  type: "button",
643
634
  ...r
@@ -645,57 +636,57 @@ function ce({ size: e, variant: t, className: n, ...r }) {
645
636
  }
646
637
  //#endregion
647
638
  //#region src/components/Dialog/index.tsx
648
- var le = {
639
+ var se = {
649
640
  open: 150,
650
641
  close: 75
651
642
  };
652
- function ue({ open: e, children: t, timeout: n = le, padding: r = "0.85rem", verticalAlign: i = "center", closeOnOverlay: a, closeOnEsc: o, onExited: s, className: l, onOpenChange: d, size: f, ...h }) {
653
- let g = m(s), v = m(!1), b = k(), { refs: x, context: S } = D({
643
+ function ce({ open: e, children: t, timeout: n = se, padding: r = "0.85rem", verticalAlign: i = "center", closeOnOverlay: a, closeOnEsc: s, onExited: l, className: u, onOpenChange: p, size: m, ...g }) {
644
+ let v = f(l), y = f(!1), b = D(), { refs: x, context: S } = T({
654
645
  open: e,
655
- onOpenChange: d,
646
+ onOpenChange: p,
656
647
  nodeId: b
657
- }), { getFloatingProps: C } = A([E(S, {
658
- enabled: o,
659
- escapeKey: o,
648
+ }), { getFloatingProps: C } = O([w(S, {
649
+ enabled: s,
650
+ escapeKey: s,
660
651
  outsidePress: !1
661
- })]), { isMounted: w, styles: T } = j(S, {
652
+ })]), { isMounted: E, styles: A } = k(S, {
662
653
  duration: n,
663
654
  initial: {
664
655
  opacity: 0,
665
656
  transform: "scale(0.8)"
666
657
  }
667
658
  });
668
- u(() => {
669
- v.current !== w && (v.current = w, !w && g.current?.());
670
- }, [w]);
671
- let O = c(() => {
672
- a && d?.(!1);
673
- }, [d, a]);
674
- g.current = s;
675
- let M = p(() => N("grid bg-backdrop z-40 justify-items-center transition ease-in-out", {
659
+ c(() => {
660
+ y.current !== E && (y.current = E, !E && v.current?.());
661
+ }, [E]);
662
+ let M = o(() => {
663
+ a && p?.(!1);
664
+ }, [p, a]);
665
+ v.current = l;
666
+ let N = d(() => j("grid bg-backdrop z-40 justify-items-center transition ease-in-out", {
676
667
  "place-items-start items-start": i === "start",
677
668
  "place-items-end": i === "end",
678
669
  "place-items-center": i === "center" || !i
679
670
  }), [i]);
680
- return /* @__PURE__ */ _(G, {
681
- disabled: !w,
682
- children: /* @__PURE__ */ _(y, {
683
- className: M,
671
+ return /* @__PURE__ */ h(U, {
672
+ disabled: !E,
673
+ children: /* @__PURE__ */ h(_, {
674
+ className: N,
684
675
  "data-testid": "vs-dialog-overlay",
685
- onClick: O,
676
+ onClick: M,
686
677
  style: {
687
678
  padding: r,
688
- opacity: T.opacity
679
+ opacity: A.opacity
689
680
  },
690
681
  lockScroll: !0,
691
- children: /* @__PURE__ */ _(de, {
682
+ children: /* @__PURE__ */ h(le, {
692
683
  ref: x.setFloating,
693
- className: l,
684
+ className: u,
694
685
  role: "dialog",
695
- size: f,
686
+ size: m,
696
687
  ...C({
697
- ...h,
698
- style: T,
688
+ ...g,
689
+ style: A,
699
690
  onClick: (e) => e?.stopPropagation()
700
691
  }),
701
692
  children: t
@@ -703,8 +694,8 @@ function ue({ open: e, children: t, timeout: n = le, padding: r = "0.85rem", ver
703
694
  })
704
695
  });
705
696
  }
706
- function de({ size: e, ...t }) {
707
- return /* @__PURE__ */ _(F, {
697
+ function le({ size: e, ...t }) {
698
+ return /* @__PURE__ */ h(N, {
708
699
  classList: [e ? "flex flex-col bg-background shadow-lg p-5 rounded" : null, {
709
700
  "w-full max-w-dialog-sm": e === "small",
710
701
  "w-full max-w-dialog-md": e === "medium",
@@ -715,16 +706,16 @@ function de({ size: e, ...t }) {
715
706
  }
716
707
  //#endregion
717
708
  //#region src/elements/Skeleton/index.tsx
718
- function fe(e) {
719
- return /* @__PURE__ */ _(F, {
709
+ function ue(e) {
710
+ return /* @__PURE__ */ h(N, {
720
711
  classList: "inline-block animate-pulse rounded-md bg-accent",
721
712
  ...e
722
713
  });
723
714
  }
724
715
  //#endregion
725
716
  //#region src/elements/Button/ButtonGroup.tsx
726
- function pe(e) {
727
- return /* @__PURE__ */ _(F, {
717
+ function de(e) {
718
+ return /* @__PURE__ */ h(N, {
728
719
  role: "group",
729
720
  classList: [
730
721
  "flex items-center justify-center",
@@ -736,8 +727,8 @@ function pe(e) {
736
727
  }
737
728
  //#endregion
738
729
  //#region src/elements/Spinner/index.tsx
739
- function me({ label: e = "Loading...", ...t }) {
740
- return /* @__PURE__ */ v(F, {
730
+ function fe({ label: e = "Loading...", ...t }) {
731
+ return /* @__PURE__ */ g(N, {
741
732
  as: "svg",
742
733
  classList: "fill-accent animate-spin text-primary",
743
734
  "aria-label": e,
@@ -748,10 +739,10 @@ function me({ label: e = "Loading...", ...t }) {
748
739
  fill: "none",
749
740
  xmlns: "http://www.w3.org/2000/svg",
750
741
  ...t,
751
- children: [/* @__PURE__ */ _("path", {
742
+ children: [/* @__PURE__ */ h("path", {
752
743
  d: "M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z",
753
744
  fill: "currentFill"
754
- }), /* @__PURE__ */ _("path", {
745
+ }), /* @__PURE__ */ h("path", {
755
746
  d: "M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z",
756
747
  fill: "currentColor"
757
748
  })]
@@ -759,15 +750,15 @@ function me({ label: e = "Loading...", ...t }) {
759
750
  }
760
751
  //#endregion
761
752
  //#region src/elements/Progress/index.tsx
762
- function he({ value: e, max: t, ...n }) {
763
- let r = p(() => e ? Math.min(100, Math.round(e / t * 100)) : 0, [e, t]);
764
- return /* @__PURE__ */ _(F, {
753
+ function pe({ value: e, max: t, ...n }) {
754
+ let r = d(() => e ? Math.min(100, Math.round(e / t * 100)) : 0, [e, t]);
755
+ return /* @__PURE__ */ h(N, {
765
756
  role: "progressbar",
766
757
  classList: "relative overflow-hidden rounded-full bg-primary",
767
758
  "aria-valuemax": t,
768
759
  "aria-valuemin": 0,
769
760
  ...n,
770
- children: /* @__PURE__ */ _(F, {
761
+ children: /* @__PURE__ */ h(N, {
771
762
  className: "h-full w-full flex-1 bg-input transition-all origin-right",
772
763
  style: { transform: `translateX(${r}%)` }
773
764
  })
@@ -775,8 +766,8 @@ function he({ value: e, max: t, ...n }) {
775
766
  }
776
767
  //#endregion
777
768
  //#region src/elements/Divider/index.tsx
778
- function ge({ orientation: e = "horizontal", ...t }) {
779
- return /* @__PURE__ */ _(F, {
769
+ function me({ orientation: e = "horizontal", ...t }) {
770
+ return /* @__PURE__ */ h(N, {
780
771
  as: "hr",
781
772
  role: "none",
782
773
  classList: ["border-0 p-0 shrink-0 bg-input", e === "horizontal" ? "h-px w-full" : "w-px h-full"],
@@ -785,16 +776,16 @@ function ge({ orientation: e = "horizontal", ...t }) {
785
776
  }
786
777
  //#endregion
787
778
  //#region src/components/Sheet/index.tsx
788
- var _e = {
779
+ var he = {
789
780
  open: 250,
790
781
  close: 150
791
782
  };
792
- function ve({ open: e, timeout: t = _e, onOpenChange: n, position: r = "right", overlay: i, onExited: a, onOpen: o, ...s }) {
793
- let c = k(), l = m(!1), d = m(o), f = m(a), { refs: p, context: h } = D({
783
+ function ge({ open: e, timeout: t = he, onOpenChange: n, position: r = "right", overlay: i, onExited: a, onOpen: o, ...s }) {
784
+ let l = D(), u = f(!1), d = f(o), p = f(a), { refs: m, context: v } = T({
794
785
  open: e,
795
786
  onOpenChange: n,
796
- nodeId: c
797
- }), { isMounted: g, styles: b } = j(h, {
787
+ nodeId: l
788
+ }), { isMounted: y, styles: b } = k(v, {
798
789
  duration: t,
799
790
  initial() {
800
791
  let e = "translateX(75%)";
@@ -804,22 +795,22 @@ function ve({ open: e, timeout: t = _e, onOpenChange: n, position: r = "right",
804
795
  };
805
796
  }
806
797
  });
807
- return u(() => {
808
- if (l.current !== g) {
809
- if (l.current = g, g) {
798
+ return c(() => {
799
+ if (u.current !== y) {
800
+ if (u.current = y, y) {
810
801
  d.current?.();
811
802
  return;
812
803
  }
813
- f.current?.();
804
+ p.current?.();
814
805
  }
815
- }, [g]), f.current = a, d.current = o, /* @__PURE__ */ v(G, {
816
- disabled: !g,
817
- children: [i ? /* @__PURE__ */ _(y, {
806
+ }, [y]), p.current = a, d.current = o, /* @__PURE__ */ g(U, {
807
+ disabled: !y,
808
+ children: [i ? /* @__PURE__ */ h(_, {
818
809
  className: i === "transparent" ? "" : "bg-backdrop",
819
810
  style: { opacity: b.opacity },
820
811
  onClick: () => n?.(!1)
821
- }) : null, /* @__PURE__ */ _(F, {
822
- ref: p.setFloating,
812
+ }) : null, /* @__PURE__ */ h(N, {
813
+ ref: m.setFloating,
823
814
  role: "complementary",
824
815
  classList: ["fixed transition-transform z-1", {
825
816
  "top-0 right-0 h-full max-h-screen": r === "right",
@@ -828,23 +819,23 @@ function ve({ open: e, timeout: t = _e, onOpenChange: n, position: r = "right",
828
819
  "bottom-0 left-0 right-0 w-full max-w-screen": r === "bottom"
829
820
  }],
830
821
  style: b,
831
- children: /* @__PURE__ */ _(ye, { ...s })
822
+ children: /* @__PURE__ */ h(_e, { ...s })
832
823
  })]
833
824
  });
834
825
  }
835
- function ye(e) {
836
- return /* @__PURE__ */ _(F, {
826
+ function _e(e) {
827
+ return /* @__PURE__ */ h(N, {
837
828
  classList: "relative bg-background min-w-full min-h-full border border-input shadow-lg",
838
829
  ...e
839
830
  });
840
831
  }
841
832
  //#endregion
842
833
  //#region src/components/Toast/ToastItem.tsx
843
- function Z({ type: e, label: t, message: n }) {
844
- let { icons: r } = Se();
845
- return /* @__PURE__ */ v("div", {
834
+ function X({ type: e, label: t, message: n }) {
835
+ let { icons: r } = ye();
836
+ return /* @__PURE__ */ g("div", {
846
837
  className: "flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2",
847
- children: [e ? /* @__PURE__ */ v("figure", {
838
+ children: [e ? /* @__PURE__ */ g("figure", {
848
839
  className: "mr-2",
849
840
  children: [
850
841
  e === "success" && r?.success ? r.success : null,
@@ -853,23 +844,23 @@ function Z({ type: e, label: t, message: n }) {
853
844
  e === "warn" && r?.warn ? r.warn : null,
854
845
  e === "loading" ? r?.loading : null
855
846
  ]
856
- }) : null, /* @__PURE__ */ v("div", {
847
+ }) : null, /* @__PURE__ */ g("div", {
857
848
  className: "space-y-2",
858
- children: [/* @__PURE__ */ _("p", {
849
+ children: [/* @__PURE__ */ h("p", {
859
850
  className: "font-medium leading-none",
860
851
  children: t
861
- }), n ? /* @__PURE__ */ _("p", { children: n }) : null]
852
+ }), n ? /* @__PURE__ */ h("p", { children: n }) : null]
862
853
  })]
863
854
  });
864
855
  }
865
856
  //#endregion
866
857
  //#region src/components/Toast/observer.ts
867
- function Q() {}
868
- var $ = new class {
869
- notify = Q;
858
+ function Z() {}
859
+ var Q = new class {
860
+ notify = Z;
870
861
  lastId = 0;
871
862
  subscribe = (e) => (this.notify = e, () => {
872
- this.notify = Q;
863
+ this.notify = Z;
873
864
  });
874
865
  add = (e, t = {}) => {
875
866
  this.lastId += 1;
@@ -903,96 +894,96 @@ var $ = new class {
903
894
  }();
904
895
  //#endregion
905
896
  //#region src/components/Toast/ToastFloat.tsx
906
- function be({ id: t, type: n, index: r, duration: i = 5e3, className: a, children: o, inverted: s, timeout: l = 250, max: d = 3 }) {
907
- let g = m(!1), [v, y] = h(!1), { context: b, refs: x } = D({
897
+ function ve({ id: t, type: n, index: r, duration: i = 5e3, className: a, children: s, inverted: l, timeout: m = 250, max: g = 3 }) {
898
+ let _ = f(!1), [v, y] = p(!1), { context: b, refs: x } = T({
908
899
  open: v,
909
900
  onOpenChange: y,
910
901
  nodeId: t
911
- }), { isMounted: S, styles: C } = j(b, {
912
- duration: l,
902
+ }), { isMounted: S, styles: C } = k(b, {
903
+ duration: m,
913
904
  initial: {
914
905
  opacity: 0,
915
- transform: `translateY(${s ? "" : "-"}50%)`
906
+ transform: `translateY(${l ? "" : "-"}50%)`
916
907
  }
917
908
  });
918
- f(() => {
919
- y(r <= d);
920
- }, [r, d]), u(() => {
921
- g.current !== S && (S || $.remove(t), g.current = S);
922
- }, [S, t]), u(() => {
909
+ u(() => {
910
+ y(r <= g);
911
+ }, [r, g]), c(() => {
912
+ _.current !== S && (S || Q.remove(t), _.current = S);
913
+ }, [S, t]), c(() => {
923
914
  if (!i) return;
924
915
  let e = window.setTimeout(() => y(!1), i);
925
916
  return () => window.clearTimeout(e);
926
917
  }, [i, t]);
927
- let w = c(() => {
918
+ let w = o(() => {
928
919
  n !== "loading" && y(!1);
929
- }, [n]), T = p(() => e("relative flex w-fit transition-transform ease-in-out cursor-pointer", a), [a]);
930
- return S ? /* @__PURE__ */ _("li", {
920
+ }, [n]), E = d(() => e("relative flex w-fit transition-transform ease-in-out cursor-pointer", a), [a]);
921
+ return S ? /* @__PURE__ */ h("li", {
931
922
  role: "log",
932
923
  tabIndex: -1,
933
924
  ref: x.setFloating,
934
- className: T,
925
+ className: E,
935
926
  style: C,
936
927
  onClick: w,
937
- children: o
928
+ children: s
938
929
  }) : null;
939
930
  }
940
931
  //#endregion
941
932
  //#region src/components/Toast/index.tsx
942
- var xe = i({});
943
- function Se() {
944
- return l(xe);
933
+ var $ = n({});
934
+ function ye() {
935
+ return s($);
945
936
  }
946
- function Ce({ className: t, offset: n = {}, position: r = "top-left", max: i, ListItem: o = Z, icons: c }) {
947
- let l = p(() => {
937
+ function be({ className: t, offset: n = {}, position: i = "top-left", max: o, ListItem: s = X, icons: c }) {
938
+ let l = d(() => {
948
939
  let e = {
949
940
  position: "fixed",
950
941
  ...n
951
942
  };
952
- return Object.keys(n).length || (r.indexOf("top") > -1 ? e.top = "16px" : r.indexOf("bottom") > -1 && (e.bottom = "16px"), r.indexOf("left") > -1 ? e.left = "16px" : r.indexOf("right") > -1 && (e.right = "16px")), r.indexOf("left") > -1 ? e.alignItems = "flex-start" : r.indexOf("right") > -1 ? e.alignItems = "flex-end" : (e.left = "50%", e.alignItems = "center", e.transform = "translateX(-50%)"), e;
953
- }, [n, r]), u = p(() => e("flex flex-col z-40 overflow-hidden", t), [t]), d = p(() => r?.startsWith("bottom") || !1, [r]), f = m(/* @__PURE__ */ new Map()), [g, v] = h([]), y = h(0)[1];
954
- W(() => $.subscribe((e) => {
955
- s(() => {
956
- if (e.type === "add") f.current.set(e.id, e.config), v((t) => [...t, e.id]);
943
+ return Object.keys(n).length || (i.indexOf("top") > -1 ? e.top = "16px" : i.indexOf("bottom") > -1 && (e.bottom = "16px"), i.indexOf("left") > -1 ? e.left = "16px" : i.indexOf("right") > -1 && (e.right = "16px")), i.indexOf("left") > -1 ? e.alignItems = "flex-start" : i.indexOf("right") > -1 ? e.alignItems = "flex-end" : (e.left = "50%", e.alignItems = "center", e.transform = "translateX(-50%)"), e;
944
+ }, [n, i]), u = d(() => e("flex flex-col z-40 overflow-hidden", t), [t]), m = d(() => i?.startsWith("bottom") || !1, [i]), g = f(/* @__PURE__ */ new Map()), [_, v] = p([]), y = p(0)[1];
945
+ H(() => Q.subscribe((e) => {
946
+ a(() => {
947
+ if (e.type === "add") g.current.set(e.id, e.config), v((t) => [...t, e.id]);
957
948
  else if (e.type === "remove") {
958
- if (!f.current.delete(e.id)) return;
949
+ if (!g.current.delete(e.id)) return;
959
950
  v((t) => {
960
951
  let n = new Set(t);
961
952
  return n.has(e.id) ? (n.delete(e.id), Array.from(n)) : t;
962
953
  });
963
954
  } else if (e.type === "update") {
964
- let t = f.current.get(e.id);
955
+ let t = g.current.get(e.id);
965
956
  if (!t) return;
966
- f.current.set(e.id, {
957
+ g.current.set(e.id, {
967
958
  ...t,
968
959
  ...e.config
969
960
  }), y((e) => e + 1);
970
961
  }
971
962
  });
972
963
  }), []);
973
- let b = p(() => ({ icons: c }), [c]), x = g.length;
974
- return /* @__PURE__ */ _(G, { children: /* @__PURE__ */ _("ol", {
964
+ let b = d(() => ({ icons: c }), [c]), x = _.length;
965
+ return /* @__PURE__ */ h(U, { children: /* @__PURE__ */ h("ol", {
975
966
  className: u,
976
967
  style: l,
977
968
  "aria-live": "polite",
978
- children: /* @__PURE__ */ _(xe.Provider, {
969
+ children: /* @__PURE__ */ h($.Provider, {
979
970
  value: b,
980
- children: g.map((e, t) => {
981
- let n = f.current.get(e);
971
+ children: _.map((e, t) => {
972
+ let n = g.current.get(e);
982
973
  if (!n) return null;
983
- let { className: r, duration: s, ...c } = n;
984
- return /* @__PURE__ */ _(be, {
974
+ let { className: i, duration: a, ...c } = n;
975
+ return /* @__PURE__ */ h(ve, {
985
976
  id: e,
986
977
  index: x - t,
987
- className: r,
988
- duration: s,
989
- inverted: d,
990
- max: i,
991
- children: a(o, c)
978
+ className: i,
979
+ duration: a,
980
+ inverted: m,
981
+ max: o,
982
+ children: r(s, c)
992
983
  }, e);
993
984
  })
994
985
  })
995
986
  }) });
996
987
  }
997
988
  //#endregion
998
- export { se as Accordion, F as Base, ce as Button, pe as ButtonGroup, U as Checkbox, ue as Dialog, ge as Divider, R as FormField, L as FormLabel, B as Input, ee as InputField, q as Popover, G as Portal, he as Progress, ae as Radio, re as Select, ve as Sheet, fe as Skeleton, me as Spinner, oe as Switch, V as Textarea, Ce as Toast, Z as ToastItem, J as Tooltip, N as cn, I as element, P as merge, $ as toast, X as varientButton };
989
+ export { ae as Accordion, N as Base, oe as Button, de as ButtonGroup, V as Checkbox, ce as Dialog, me as Divider, I as FormField, F as FormLabel, R as Input, L as InputField, G as Popover, U as Portal, pe as Progress, re as Radio, K as Select, ge as Sheet, ue as Skeleton, fe as Spinner, ie as Switch, z as Textarea, be as Toast, X as ToastItem, q as Tooltip, j as cn, P as element, M as merge, Q as toast, Y as varientButton };