@vellira-ui/react 2.26.1 → 2.27.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.js CHANGED
@@ -1,23 +1,23 @@
1
- import { createContext as e, forwardRef as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
2
- import l from "clsx";
3
- import { createPortal as u } from "react-dom";
4
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
- import { FloatingPortal as m, arrow as h, autoUpdate as g, flip as _, offset as v, shift as y, size as b, useFloating as x, useFocus as S, useHover as C, useInteractions as w } from "@floating-ui/react";
6
- import { useControllableState as T, useDropdown as E, useModal as D, useSelect as O, useTabs as k, useTabsKeyboard as A } from "@vellira-ui/core";
7
- import { Check as j, ChevronDown as M, Close as N } from "@vellira-ui/icons";
8
- import P from "focus-trap-react";
1
+ import { cloneElement as e, createContext as t, forwardRef as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
2
+ import d from "clsx";
3
+ import { createPortal as f } from "react-dom";
4
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ import { FloatingPortal as g, arrow as _, autoUpdate as v, flip as y, offset as b, shift as x, size as S, useFloating as C, useFocus as w, useHover as T, useInteractions as E } from "@floating-ui/react";
6
+ import { useControllableState as D, useDropdown as O, useModal as k, useSelect as A, useTabs as j, useTabsKeyboard as M } from "@vellira-ui/core";
7
+ import { Check as N, ChevronDown as P, Close as F } from "@vellira-ui/icons";
8
+ import I from "focus-trap-react";
9
9
  //#region src/utils/cn.ts
10
- var F = (...e) => l(e), I = ({ children: e }) => {
11
- let [t, n] = c(!1);
12
- if (i(() => {
10
+ var L = (...e) => d(e), R = ({ children: e }) => {
11
+ let [t, n] = u(!1);
12
+ if (o(() => {
13
13
  n(!0);
14
14
  }, []), !t) return null;
15
15
  let r = document.getElementById("overlay-root") ?? document.body;
16
- return r ? u(e, r) : null;
17
- }, L = {
16
+ return r ? f(e, r) : null;
17
+ }, z = {
18
18
  dropdown: "_dropdown_1rvx9_1",
19
19
  "dropdown-in": "_dropdown-in_1rvx9_1"
20
- }, R = t(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ f(I, { children: /* @__PURE__ */ f("ul", {
20
+ }, B = n(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ m(R, { children: /* @__PURE__ */ m("ul", {
21
21
  ref: c,
22
22
  id: n,
23
23
  role: "menu",
@@ -27,44 +27,44 @@ var F = (...e) => l(e), I = ({ children: e }) => {
27
27
  "aria-activedescendant": a,
28
28
  onKeyDown: o,
29
29
  style: t,
30
- className: F(L.dropdown, s),
30
+ className: L(z.dropdown, s),
31
31
  children: e
32
32
  }) }));
33
- R.displayName = "DropdownContent";
33
+ B.displayName = "DropdownContent";
34
34
  //#endregion
35
35
  //#region src/hooks/useFloatingPosition.ts
36
- var z = (e) => {
37
- let [t, n] = c(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
- return i(() => {
36
+ var V = (e) => {
37
+ let [t, n] = u(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
+ return o(() => {
39
39
  if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
40
40
  let t = window.matchMedia(`(max-width: ${e}px)`), r = () => n(t.matches);
41
41
  return r(), t.addEventListener("change", r), () => {
42
42
  t.removeEventListener("change", r);
43
43
  };
44
44
  }, [e]), t;
45
- }, B = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: a = !1, mobileSheetBreakpoint: s, middleware: c = [] } = {}) => {
46
- let l = z(s), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = x({
45
+ }, ee = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: i = !1, mobileSheetBreakpoint: a, middleware: s = [] } = {}) => {
46
+ let l = V(a), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = C({
47
47
  open: e,
48
48
  onOpenChange: t,
49
49
  placement: n,
50
50
  strategy: r,
51
51
  transform: !1,
52
- middleware: o(() => [
53
- v(2),
54
- _(),
55
- b({ apply({ rects: e, elements: t }) {
56
- !a || l || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
52
+ middleware: c(() => [
53
+ b(2),
54
+ y(),
55
+ S({ apply({ rects: e, elements: t }) {
56
+ !i || l || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
57
57
  } }),
58
- y({ padding: 8 }),
59
- ...c
58
+ x({ padding: 8 }),
59
+ ...s
60
60
  ], [
61
- c,
61
+ s,
62
62
  l,
63
- a
63
+ i
64
64
  ]),
65
- whileElementsMounted: g
65
+ whileElementsMounted: v
66
66
  });
67
- return i(() => {
67
+ return o(() => {
68
68
  l && u.floating.current?.style.removeProperty("width");
69
69
  }, [l, u.floating]), {
70
70
  context: p,
@@ -76,23 +76,23 @@ var z = (e) => {
76
76
  setFloatingRef: u.setFloating,
77
77
  updatePosition: f
78
78
  };
79
- }, ee = (e, t, n = !0) => {
80
- let r = s(e);
79
+ }, te = (e, t, n = !0) => {
80
+ let r = l(e);
81
81
  r.current = e;
82
- let a = s(t);
83
- a.current = t, i(() => {
82
+ let i = l(t);
83
+ i.current = t, o(() => {
84
84
  if (!n) return;
85
85
  let e = (e) => {
86
86
  let t = e.target;
87
- r.current.every((e) => e.current && !e.current.contains(t)) && a.current();
87
+ r.current.every((e) => e.current && !e.current.contains(t)) && i.current();
88
88
  };
89
89
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
90
90
  }, [n]);
91
- }, V = { group: "_group_aviwv_1" }, te = ({ label: e }) => /* @__PURE__ */ f("li", {
91
+ }, H = { group: "_group_aviwv_1" }, ne = ({ label: e }) => /* @__PURE__ */ m("li", {
92
92
  role: "presentation",
93
- className: V.group,
93
+ className: H.group,
94
94
  children: e
95
- }), H = {
95
+ }), U = {
96
96
  item: "_item_re11y_1",
97
97
  disabled: "_disabled_re11y_21",
98
98
  active: "_active_re11y_34",
@@ -103,9 +103,9 @@ var z = (e) => {
103
103
  "itemText--truncate": "_itemText--truncate_re11y_88",
104
104
  "itemText--wrap": "_itemText--wrap_re11y_93",
105
105
  "itemText--nowrap": "_itemText--nowrap_re11y_97"
106
- }, ne = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
107
- let m = t || n;
108
- return /* @__PURE__ */ p("li", {
106
+ }, re = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
107
+ let f = t || n;
108
+ return /* @__PURE__ */ h("li", {
109
109
  id: e,
110
110
  role: "menuitem",
111
111
  tabIndex: -1,
@@ -114,32 +114,32 @@ var z = (e) => {
114
114
  "data-danger": i || void 0,
115
115
  onClick: a ? void 0 : s,
116
116
  onMouseEnter: a ? void 0 : c,
117
- className: F(H.item, {
118
- [H.active]: o,
119
- [H.disabled]: a,
120
- [H.danger]: i
117
+ className: L(U.item, {
118
+ [U.active]: o,
119
+ [U.disabled]: a,
120
+ [U.danger]: i
121
121
  }, d),
122
122
  children: [
123
- r && /* @__PURE__ */ f("span", {
123
+ r && /* @__PURE__ */ m("span", {
124
124
  "aria-hidden": "true",
125
- className: H.itemIcon,
125
+ className: U.itemIcon,
126
126
  children: r
127
127
  }),
128
- m && /* @__PURE__ */ f("span", {
129
- className: F(H.itemText, H[`itemText--${u}`]),
130
- children: m
128
+ f && /* @__PURE__ */ m("span", {
129
+ className: L(U.itemText, U[`itemText--${u}`]),
130
+ children: f
131
131
  }),
132
- l && /* @__PURE__ */ f("span", {
133
- className: H.itemShortcut,
132
+ l && /* @__PURE__ */ m("span", {
133
+ className: U.itemShortcut,
134
134
  children: l
135
135
  })
136
136
  ]
137
137
  });
138
- }, U = { separator: "_separator_1v11r_1" }, re = () => /* @__PURE__ */ f("li", {
138
+ }, W = { separator: "_separator_1v11r_1" }, ie = () => /* @__PURE__ */ m("li", {
139
139
  role: "separator",
140
- className: U.separator,
140
+ className: W.separator,
141
141
  "aria-hidden": "true"
142
- }), W = {
142
+ }), G = {
143
143
  button: "_button_18ucr_1",
144
144
  disabled: "_disabled_18ucr_20",
145
145
  iconLeft: "_iconLeft_18ucr_32",
@@ -149,112 +149,112 @@ var z = (e) => {
149
149
  md: "_md_18ucr_72",
150
150
  lg: "_lg_18ucr_84",
151
151
  open: "_open_18ucr_123"
152
- }, ie = t(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, size: o = "md", label: s, ariaLabel: c, className: l, ...u }, d) => {
153
- let m = !!n, h = !!e, g = m && !h, _ = i && h, v = r ?? /* @__PURE__ */ f(M, {}), y = c ?? (g ? typeof s == "string" ? s : "Open menu" : void 0);
154
- return /* @__PURE__ */ p("button", {
152
+ }, ae = n(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, size: o = "md", label: s, ariaLabel: c, className: l, ...u }, d) => {
153
+ let f = !!n, p = !!e, g = f && !p, _ = i && p, v = r ?? /* @__PURE__ */ m(P, {}), y = c ?? (g ? typeof s == "string" ? s : "Open menu" : void 0);
154
+ return /* @__PURE__ */ h("button", {
155
155
  ...u,
156
156
  ref: d,
157
157
  type: "button",
158
- className: F(W.button, W[o], {
159
- [W.disabled]: u.disabled,
160
- [W.iconOnly]: g
158
+ className: L(G.button, G[o], {
159
+ [G.disabled]: u.disabled,
160
+ [G.iconOnly]: g
161
161
  }, l),
162
162
  "aria-label": y,
163
163
  "aria-expanded": t,
164
164
  "aria-haspopup": "menu",
165
165
  style: { "--dropdown-rotate-angle": `${a}deg` },
166
166
  children: [
167
- m && /* @__PURE__ */ f("span", {
167
+ f && /* @__PURE__ */ m("span", {
168
168
  "aria-hidden": "true",
169
- className: W.iconLeft,
169
+ className: G.iconLeft,
170
170
  children: n
171
171
  }),
172
172
  e,
173
- _ && /* @__PURE__ */ f("span", {
173
+ _ && /* @__PURE__ */ m("span", {
174
174
  "aria-hidden": "true",
175
- className: F(W.arrow, { [W.open]: t }),
175
+ className: L(G.arrow, { [G.open]: t }),
176
176
  children: v
177
177
  })
178
178
  ]
179
179
  });
180
180
  });
181
- ie.displayName = "DropdownTrigger";
181
+ ae.displayName = "DropdownTrigger";
182
182
  //#endregion
183
183
  //#region src/components/Dropdown/types.ts
184
- var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "group", se = (e) => e.type === "separator", ce = { wrapper: "_wrapper_14ue8_1" }, le = ({ label: e, ariaLabel: t, icon: r, trigger: i, items: c = [], onSelect: l, open: u, defaultOpen: d = !1, onOpenChange: m, size: h = "md", className: g, triggerClassName: _, contentClassName: v, itemClassName: y, disabled: b, rotateAngle: x = 90, placement: S, matchTriggerWidth: C, textWrap: w, showArrow: T = !0, arrowIcon: D }) => {
185
- let O = s(null), k = s(null), A = a(), j = `${A}-trigger`, { floatingStyles: M, setRef: N, setFloatingRef: P } = B({
184
+ var oe = (e) => e.type === void 0 || e.type === "item", se = (e) => e.type === "group", ce = (e) => e.type === "separator", le = { wrapper: "_wrapper_14ue8_1" }, ue = ({ label: e, ariaLabel: t, icon: n, trigger: r, items: a = [], onSelect: o, open: u, defaultOpen: d = !1, onOpenChange: f, size: p = "md", className: g, triggerClassName: _, contentClassName: v, itemClassName: y, disabled: b, rotateAngle: x = 90, placement: S, matchTriggerWidth: C, textWrap: w, showArrow: T = !0, arrowIcon: E }) => {
185
+ let D = l(null), k = l(null), A = s(), j = `${A}-trigger`, { floatingStyles: M, setRef: N, setFloatingRef: P } = ee({
186
186
  placement: S,
187
187
  matchTriggerWidth: C,
188
188
  mobileSheetBreakpoint: 640
189
- }), I = o(() => c.flatMap((e, t) => ae(e) ? [{
189
+ }), F = c(() => a.flatMap((e, t) => oe(e) ? [{
190
190
  item: e,
191
191
  itemIndex: t
192
- }] : []), [c]), L = o(() => I.map(({ item: e }) => e), [I]), z = o(() => new Map(I.map(({ itemIndex: e }, t) => [e, t])), [I]), { activeIndex: V, setActiveIndex: H, isOpen: U, closeDropdown: W, toggleDropdown: le, selectItem: ue, onKeyDown: G } = E({
193
- items: L,
192
+ }] : []), [a]), I = c(() => F.map(({ item: e }) => e), [F]), R = c(() => new Map(F.map(({ itemIndex: e }, t) => [e, t])), [F]), { activeIndex: z, setActiveIndex: V, isOpen: H, closeDropdown: U, toggleDropdown: W, selectItem: G, onKeyDown: ue } = O({
193
+ items: I,
194
194
  open: u,
195
195
  defaultOpen: d,
196
196
  disabled: b,
197
- onOpenChange: m,
198
- onSelect: n((e) => {
199
- l?.(e), O.current?.focus();
200
- }, [l]),
197
+ onOpenChange: f,
198
+ onSelect: i((e) => {
199
+ o?.(e), D.current?.focus();
200
+ }, [o]),
201
201
  getItemValue: (e) => e.value,
202
202
  getItemText: (e) => typeof e.label == "string" ? e.label : e.value
203
- }), de = U && V >= 0 ? `${A}-item-${V}` : void 0;
204
- ee([O, k], W, U);
205
- let fe = n((e) => {
206
- G(e), U && e.key === "Escape" && O.current?.focus();
207
- }, [U, G]), pe = n((e) => {
208
- O.current = e, N(e);
209
- }, [N]), me = n((e) => {
203
+ }), de = H && z >= 0 ? `${A}-item-${z}` : void 0;
204
+ te([D, k], U, H);
205
+ let fe = i((e) => {
206
+ ue(e), H && e.key === "Escape" && D.current?.focus();
207
+ }, [H, ue]), pe = i((e) => {
208
+ D.current = e, N(e);
209
+ }, [N]), me = i((e) => {
210
210
  k.current = e, P(e), e?.focus();
211
211
  }, [P]);
212
- return /* @__PURE__ */ p("div", {
213
- className: F(ce.wrapper, g),
214
- children: [/* @__PURE__ */ f(ie, {
212
+ return /* @__PURE__ */ h("div", {
213
+ className: L(le.wrapper, g),
214
+ children: [/* @__PURE__ */ m(ae, {
215
215
  ref: pe,
216
216
  id: j,
217
- isOpen: U,
217
+ isOpen: H,
218
218
  disabled: b,
219
- size: h,
220
- icon: r,
219
+ size: p,
220
+ icon: n,
221
221
  label: e,
222
222
  ariaLabel: t,
223
223
  showArrow: T,
224
- arrowIcon: D,
224
+ arrowIcon: E,
225
225
  rotateAngle: x,
226
226
  className: _,
227
- onClick: le,
227
+ onClick: W,
228
228
  onKeyDown: fe,
229
- "aria-expanded": U,
229
+ "aria-expanded": H,
230
230
  "aria-haspopup": "menu",
231
- ...U && { "aria-controls": A },
232
- children: i
233
- }), U && /* @__PURE__ */ f(R, {
231
+ ...H && { "aria-controls": A },
232
+ children: r
233
+ }), H && /* @__PURE__ */ m(B, {
234
234
  ref: me,
235
235
  floatingStyles: M,
236
236
  menuId: A,
237
- labelledById: i ? j : void 0,
238
- label: t ?? (!i && typeof e == "string" ? e : void 0),
237
+ labelledById: r ? j : void 0,
238
+ label: t ?? (!r && typeof e == "string" ? e : void 0),
239
239
  activeDescendantId: de,
240
240
  onKeyDown: fe,
241
241
  className: v,
242
- children: c.map((e, t) => {
243
- if (oe(e)) return /* @__PURE__ */ f(te, { label: e.label }, `group-${e.label}`);
244
- if (se(e)) return /* @__PURE__ */ f(re, {}, `separator-${t}`);
245
- if (ae(e)) {
246
- let n = z.get(t) ?? -1;
247
- return /* @__PURE__ */ f(ne, {
242
+ children: a.map((e, t) => {
243
+ if (se(e)) return /* @__PURE__ */ m(ne, { label: e.label }, `group-${e.label}`);
244
+ if (ce(e)) return /* @__PURE__ */ m(ie, {}, `separator-${t}`);
245
+ if (oe(e)) {
246
+ let n = R.get(t) ?? -1;
247
+ return /* @__PURE__ */ m(re, {
248
248
  id: `${A}-item-${n}`,
249
249
  ...e,
250
- active: V === n,
250
+ active: z === n,
251
251
  textWrap: e.textWrap || w,
252
252
  className: y,
253
253
  onClick: () => {
254
- ue(e), O.current?.focus();
254
+ G(e), D.current?.focus();
255
255
  },
256
256
  onMouseEnter: () => {
257
- n < 0 || e.disabled || H(n);
257
+ n < 0 || e.disabled || V(n);
258
258
  },
259
259
  children: e.label
260
260
  }, `${e.value}-${t}`);
@@ -262,94 +262,94 @@ var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
262
262
  })
263
263
  })]
264
264
  });
265
- }, ue = e(void 0), G = () => {
266
- let e = r(ue);
265
+ }, de = t(void 0), fe = () => {
266
+ let e = a(de);
267
267
  if (e === void 0) throw Error("Modal compound components must be used inside Modal");
268
268
  return e;
269
269
  };
270
- ue.displayName = "ModalContext";
271
- var de = { modalBody: "_modalBody_iv33a_1" }, fe = ({ children: e }) => {
272
- let { descriptionId: t } = G();
273
- return /* @__PURE__ */ f("div", {
270
+ de.displayName = "ModalContext";
271
+ var pe = { modalBody: "_modalBody_iv33a_1" }, me = ({ children: e }) => {
272
+ let { descriptionId: t } = fe();
273
+ return /* @__PURE__ */ m("div", {
274
274
  id: t,
275
- className: de.modalBody,
275
+ className: pe.modalBody,
276
276
  children: e
277
277
  });
278
278
  };
279
- fe.displayName = "ModalBody";
280
- var pe = { content: "_content_k44g7_1" }, me = ({ children: e }) => /* @__PURE__ */ f("div", {
281
- className: pe.content,
279
+ me.displayName = "ModalBody";
280
+ var he = { content: "_content_k44g7_1" }, ge = ({ children: e }) => /* @__PURE__ */ m("div", {
281
+ className: he.content,
282
282
  children: e
283
283
  });
284
- me.displayName = "ModalContent";
285
- var he = { modalFooter: "_modalFooter_ezys6_1" }, ge = ({ children: e }) => /* @__PURE__ */ f("div", {
286
- className: he.modalFooter,
284
+ ge.displayName = "ModalContent";
285
+ var _e = { modalFooter: "_modalFooter_ezys6_1" }, ve = ({ children: e }) => /* @__PURE__ */ m("div", {
286
+ className: _e.modalFooter,
287
287
  children: e
288
288
  });
289
- ge.displayName = "ModalFooter";
290
- var _e = {
289
+ ve.displayName = "ModalFooter";
290
+ var ye = {
291
291
  modalHeader: "_modalHeader_p8xf1_1",
292
292
  modalHeaderTitle: "_modalHeaderTitle_p8xf1_7",
293
293
  modalHeaderCloseButton: "_modalHeaderCloseButton_p8xf1_14"
294
- }, ve = ({ children: e }) => {
295
- let { onClose: t, titleId: n } = G();
296
- return /* @__PURE__ */ p("div", {
297
- className: _e.modalHeader,
298
- children: [/* @__PURE__ */ f("h2", {
294
+ }, be = ({ children: e }) => {
295
+ let { onClose: t, titleId: n } = fe();
296
+ return /* @__PURE__ */ h("div", {
297
+ className: ye.modalHeader,
298
+ children: [/* @__PURE__ */ m("h2", {
299
299
  id: n,
300
- className: _e.modalHeaderTitle,
300
+ className: ye.modalHeaderTitle,
301
301
  children: e
302
- }), t && /* @__PURE__ */ f("button", {
302
+ }), t && /* @__PURE__ */ m("button", {
303
303
  type: "button",
304
- className: _e.modalHeaderCloseButton,
304
+ className: ye.modalHeaderCloseButton,
305
305
  onClick: t,
306
306
  "aria-label": "Close modal",
307
- children: /* @__PURE__ */ f(N, { size: 16 })
307
+ children: /* @__PURE__ */ m(F, { size: 16 })
308
308
  })]
309
309
  });
310
310
  };
311
- ve.displayName = "ModalHeader";
311
+ be.displayName = "ModalHeader";
312
312
  //#endregion
313
313
  //#region src/hooks/useModalKeyboard.ts
314
- var ye = ({ isOpen: e, onClose: t }) => {
315
- let r = n((n) => {
314
+ var xe = ({ isOpen: e, onClose: t }) => {
315
+ let n = i((n) => {
316
316
  e && n.key === "Escape" && (n.preventDefault(), t?.());
317
317
  }, [e, t]);
318
- i(() => (document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r)), [r]);
319
- }, be = {
318
+ o(() => (document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)), [n]);
319
+ }, Se = {
320
320
  overlay: "_overlay_dcudn_1",
321
321
  "overlay--open": "_overlay--open_dcudn_14",
322
322
  modal: "_modal_dcudn_20",
323
323
  "overlay--animated": "_overlay--animated_dcudn_28"
324
- }, xe = 0, Se = "", Ce = ({ children: e, onClose: t, isOpen: r, className: a, closeOnBackdrop: o, closeOnClick: c, closeOnEsc: l = !0, zIndex: u = 1e3, animated: d = !0 }) => {
325
- let p = o ?? c ?? !0, m = s(null), { titleId: h, descriptionId: g } = G(), _ = n((e) => {
326
- p && e.target === e.currentTarget && t?.();
327
- }, [p, t]);
328
- return ye({
329
- isOpen: r,
330
- onClose: l ? t : void 0
331
- }), i(() => {
332
- if (r) return xe === 0 && (Se = document.body.style.overflow), xe += 1, document.body.style.overflow = "hidden", () => {
333
- xe = Math.max(0, xe - 1), xe === 0 && (document.body.style.overflow = Se);
324
+ }, Ce = 0, we = "", Te = ({ children: e, onClose: t, isOpen: n, className: r, closeOnBackdrop: a, closeOnClick: s, closeOnEsc: c = !0, zIndex: u = 1e3, animated: d = !0 }) => {
325
+ let f = a ?? s ?? !0, p = l(null), { titleId: h, descriptionId: g } = fe(), _ = i((e) => {
326
+ f && e.target === e.currentTarget && t?.();
327
+ }, [f, t]);
328
+ return xe({
329
+ isOpen: n,
330
+ onClose: c ? t : void 0
331
+ }), o(() => {
332
+ if (n) return Ce === 0 && (we = document.body.style.overflow), Ce += 1, document.body.style.overflow = "hidden", () => {
333
+ Ce = Math.max(0, Ce - 1), Ce === 0 && (document.body.style.overflow = we);
334
334
  };
335
- }, [r]), !r && !d ? null : /* @__PURE__ */ f(I, { children: /* @__PURE__ */ f("div", {
336
- className: F(be.overlay, r && be["overlay--open"], d && be["overlay--animated"], a),
335
+ }, [n]), !n && !d ? null : /* @__PURE__ */ m(R, { children: /* @__PURE__ */ m("div", {
336
+ className: L(Se.overlay, n && Se["overlay--open"], d && Se["overlay--animated"], r),
337
337
  onClick: _,
338
338
  tabIndex: -1,
339
339
  role: "presentation",
340
- "aria-hidden": !r,
340
+ "aria-hidden": !n,
341
341
  style: { zIndex: u },
342
- children: /* @__PURE__ */ f(P, {
343
- active: r,
342
+ children: /* @__PURE__ */ m(I, {
343
+ active: n,
344
344
  focusTrapOptions: {
345
- fallbackFocus: () => m.current,
345
+ fallbackFocus: () => p.current,
346
346
  returnFocusOnDeactivate: !0,
347
347
  allowOutsideClick: !0
348
348
  },
349
- children: /* @__PURE__ */ f("div", {
350
- ref: m,
349
+ children: /* @__PURE__ */ m("div", {
350
+ ref: p,
351
351
  tabIndex: -1,
352
- className: be.modal,
352
+ className: Se.modal,
353
353
  role: "dialog",
354
354
  "aria-modal": "true",
355
355
  "aria-labelledby": h,
@@ -359,43 +359,43 @@ var ye = ({ isOpen: e, onClose: t }) => {
359
359
  })
360
360
  }) });
361
361
  };
362
- Ce.displayName = "ModalOverlay";
362
+ Te.displayName = "ModalOverlay";
363
363
  //#endregion
364
364
  //#region src/components/Modal/Modal.tsx
365
- var we = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
366
- let o = D({
365
+ var Ee = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
366
+ let o = k({
367
367
  isOpen: e,
368
368
  onClose: n,
369
369
  closeOnBackdrop: r,
370
370
  closeOnClick: i,
371
371
  closeOnEsc: a
372
372
  });
373
- return o.shouldRender ? /* @__PURE__ */ f(ue.Provider, {
373
+ return o.shouldRender ? /* @__PURE__ */ m(de.Provider, {
374
374
  value: {
375
375
  onClose: o.onClose,
376
376
  titleId: o.titleId,
377
377
  descriptionId: o.descriptionId
378
378
  },
379
- children: /* @__PURE__ */ f(Ce, {
379
+ children: /* @__PURE__ */ m(Te, {
380
380
  isOpen: o.isOpen,
381
381
  onClose: o.onClose,
382
382
  closeOnBackdrop: o.closeOnBackdrop,
383
383
  closeOnEsc: o.closeOnEsc,
384
- children: /* @__PURE__ */ f(me, { children: t })
384
+ children: /* @__PURE__ */ m(ge, { children: t })
385
385
  })
386
386
  }) : null;
387
387
  };
388
- we.displayName = "Modal";
388
+ Ee.displayName = "Modal";
389
389
  //#endregion
390
390
  //#region src/components/Modal/index.ts
391
- var Te = Object.assign(we, {
392
- Header: ve,
393
- Body: fe,
394
- Content: me,
395
- Footer: ge
396
- }), Ee = e(null), De = Ee.Provider;
397
- function Oe() {
398
- return r(Ee);
391
+ var De = Object.assign(Ee, {
392
+ Header: be,
393
+ Body: me,
394
+ Content: ge,
395
+ Footer: ve
396
+ }), Oe = t(null), ke = Oe.Provider;
397
+ function Ae() {
398
+ return a(Oe);
399
399
  }
400
400
  var K = {
401
401
  root: "_root_1n02e_1",
@@ -408,13 +408,13 @@ var K = {
408
408
  error: "_error_1n02e_51",
409
409
  disabled: "_disabled_1n02e_59",
410
410
  invalid: "_invalid_1n02e_75"
411
- }, ke = t(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: o = "md", name: s, label: c, description: l, error: u, orientation: d = "vertical", children: m, className: h, id: g, ..._ }, v) => {
412
- let y = a(), b = g ?? y, x = c ? `${b}-label` : void 0, S = l ? `${b}-description` : void 0, C = u ? `${b}-error` : void 0, w = [S, C].filter(Boolean).join(" ") || void 0, E = s ?? `${b}-radio`, [D, O] = T({
411
+ }, je = n(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: a = "md", name: o, label: c, description: l, error: u, orientation: d = "vertical", children: f, className: p, id: g, ..._ }, v) => {
412
+ let y = s(), b = g ?? y, x = c ? `${b}-label` : void 0, S = l ? `${b}-description` : void 0, C = u ? `${b}-error` : void 0, w = [S, C].filter(Boolean).join(" ") || void 0, T = o ?? `${b}-radio`, [E, O] = D({
413
413
  value: e,
414
414
  defaultValue: t,
415
415
  onChange: n
416
416
  }), k = !!u;
417
- return /* @__PURE__ */ p("div", {
417
+ return /* @__PURE__ */ h("div", {
418
418
  ..._,
419
419
  ref: v,
420
420
  id: b,
@@ -424,39 +424,39 @@ var K = {
424
424
  "aria-disabled": r || void 0,
425
425
  "aria-required": i || void 0,
426
426
  "aria-invalid": k || void 0,
427
- className: F(K.root, k && K.invalid, r && K.disabled, h),
427
+ className: L(K.root, k && K.invalid, r && K.disabled, p),
428
428
  children: [
429
- c && /* @__PURE__ */ p("div", {
429
+ c && /* @__PURE__ */ h("div", {
430
430
  id: x,
431
431
  className: K.label,
432
- children: [c, i && /* @__PURE__ */ f("span", {
432
+ children: [c, i && /* @__PURE__ */ m("span", {
433
433
  className: K.required,
434
434
  "aria-hidden": "true",
435
435
  children: "*"
436
436
  })]
437
437
  }),
438
- l && /* @__PURE__ */ f("div", {
438
+ l && /* @__PURE__ */ m("div", {
439
439
  id: S,
440
440
  className: K.description,
441
441
  children: l
442
442
  }),
443
- /* @__PURE__ */ f(De, {
443
+ /* @__PURE__ */ m(ke, {
444
444
  value: {
445
- name: E,
446
- value: D,
445
+ name: T,
446
+ value: E,
447
447
  disabled: r,
448
448
  required: i,
449
449
  invalid: k,
450
- size: o,
450
+ size: a,
451
451
  describedBy: w,
452
452
  onValueChange: O
453
453
  },
454
- children: /* @__PURE__ */ f("div", {
455
- className: F(K.items, K[d]),
456
- children: m
454
+ children: /* @__PURE__ */ m("div", {
455
+ className: L(K.items, K[d]),
456
+ children: f
457
457
  })
458
458
  }),
459
- u && /* @__PURE__ */ f("div", {
459
+ u && /* @__PURE__ */ m("div", {
460
460
  id: C,
461
461
  className: K.error,
462
462
  children: u
@@ -464,7 +464,7 @@ var K = {
464
464
  ]
465
465
  });
466
466
  });
467
- ke.displayName = "RadioGroup";
467
+ je.displayName = "RadioGroup";
468
468
  var q = {
469
469
  wrapper: "_wrapper_byl2d_1",
470
470
  label: "_label_byl2d_9",
@@ -473,59 +473,59 @@ var q = {
473
473
  control: "_control_byl2d_32",
474
474
  errorText: "_errorText_byl2d_40",
475
475
  disabled: "_disabled_byl2d_54"
476
- }, Ae = ({ id: e, label: t, description: n, error: r, required: i = !1, disabled: a = !1, children: o, className: s, controlClassName: c, labelClassName: l, descriptionClassName: u, errorClassName: d, ...m }) => {
477
- let h = n && e ? `${e}-description` : void 0, g = r && e ? `${e}-error` : void 0;
478
- return /* @__PURE__ */ p("div", {
479
- ...m,
476
+ }, Me = ({ id: e, label: t, description: n, error: r, required: i = !1, disabled: a = !1, children: o, className: s, controlClassName: c, labelClassName: l, descriptionClassName: u, errorClassName: d, ...f }) => {
477
+ let p = n && e ? `${e}-description` : void 0, g = r && e ? `${e}-error` : void 0;
478
+ return /* @__PURE__ */ h("div", {
479
+ ...f,
480
480
  "aria-disabled": a || void 0,
481
- className: F(q.wrapper, a && q.disabled, s),
481
+ className: L(q.wrapper, a && q.disabled, s),
482
482
  "data-disabled": a || void 0,
483
483
  "data-invalid": !!r || void 0,
484
484
  children: [
485
- t && /* @__PURE__ */ p("label", {
485
+ t && /* @__PURE__ */ h("label", {
486
486
  htmlFor: e,
487
- className: F(q.label, l),
488
- children: [t, i && /* @__PURE__ */ f("span", {
487
+ className: L(q.label, l),
488
+ children: [t, i && /* @__PURE__ */ m("span", {
489
489
  className: q.required,
490
490
  "aria-hidden": "true",
491
491
  children: "*"
492
492
  })]
493
493
  }),
494
- n && /* @__PURE__ */ f("div", {
495
- id: h,
496
- className: F(q.description, u),
494
+ n && /* @__PURE__ */ m("div", {
495
+ id: p,
496
+ className: L(q.description, u),
497
497
  children: n
498
498
  }),
499
- /* @__PURE__ */ f("div", {
500
- className: F(q.control, c),
499
+ /* @__PURE__ */ m("div", {
500
+ className: L(q.control, c),
501
501
  children: o
502
502
  }),
503
- r && /* @__PURE__ */ f("div", {
503
+ r && /* @__PURE__ */ m("div", {
504
504
  id: g,
505
- className: F(q.errorText, d),
505
+ className: L(q.errorText, d),
506
506
  role: "alert",
507
507
  children: r
508
508
  })
509
509
  ]
510
510
  });
511
- }, je = {
511
+ }, Ne = {
512
512
  option: "_option_l6qjj_1",
513
513
  selected: "_selected_l6qjj_18",
514
514
  disabled: "_disabled_l6qjj_18",
515
515
  active: "_active_l6qjj_34",
516
516
  label: "_label_l6qjj_46",
517
517
  check: "_check_l6qjj_54"
518
- }, Me = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
518
+ }, Pe = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
519
519
  let o = !!e.disabled;
520
- return /* @__PURE__ */ p("li", {
520
+ return /* @__PURE__ */ h("li", {
521
521
  id: r,
522
522
  role: "option",
523
523
  "aria-selected": t,
524
524
  "aria-disabled": o || void 0,
525
- className: F(je.option, {
526
- [je.selected]: t,
527
- [je.active]: n,
528
- [je.disabled]: o
525
+ className: L(Ne.option, {
526
+ [Ne.selected]: t,
527
+ [Ne.active]: n,
528
+ [Ne.disabled]: o
529
529
  }),
530
530
  onClick: () => {
531
531
  o || i(e.value);
@@ -533,44 +533,44 @@ var q = {
533
533
  onMouseEnter: () => {
534
534
  o || a();
535
535
  },
536
- children: [/* @__PURE__ */ f("span", {
537
- className: je.label,
536
+ children: [/* @__PURE__ */ m("span", {
537
+ className: Ne.label,
538
538
  children: e.label
539
- }), /* @__PURE__ */ f("span", {
540
- className: je.check,
539
+ }), /* @__PURE__ */ m("span", {
540
+ className: Ne.check,
541
541
  "aria-hidden": "true",
542
- children: t && /* @__PURE__ */ f(j, {})
542
+ children: t && /* @__PURE__ */ m(N, {})
543
543
  })]
544
544
  });
545
545
  };
546
- Me.displayName = "SelectOption";
547
- var Ne = {
546
+ Pe.displayName = "SelectOption";
547
+ var Fe = {
548
548
  dropdown: "_dropdown_qznlq_1",
549
549
  dropdownIn: "_dropdownIn_qznlq_1",
550
550
  empty: "_empty_qznlq_17"
551
- }, Pe = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, noOptionsText: o, selectedValue: s, activeIndex: c, className: l, onSelect: u, onMouseEnter: d }) => e ? /* @__PURE__ */ f(I, { children: /* @__PURE__ */ f("ul", {
551
+ }, Ie = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, noOptionsText: o, selectedValue: s, activeIndex: c, className: l, onSelect: u, onMouseEnter: d }) => e ? /* @__PURE__ */ m(R, { children: /* @__PURE__ */ m("ul", {
552
552
  ref: r,
553
553
  id: t,
554
554
  role: "listbox",
555
555
  "aria-labelledby": n,
556
- className: [Ne.dropdown, l].filter(Boolean).join(" "),
556
+ className: [Fe.dropdown, l].filter(Boolean).join(" "),
557
557
  style: i,
558
- children: a.length ? a.map((e, n) => /* @__PURE__ */ f(Me, {
558
+ children: a.length ? a.map((e, n) => /* @__PURE__ */ m(Pe, {
559
559
  option: e,
560
560
  isSelected: e.value === s,
561
561
  isActive: n === c,
562
562
  optionId: `${t}-option-${n}`,
563
563
  onSelect: u,
564
564
  onMouseEnter: () => d(n)
565
- }, e.value)) : /* @__PURE__ */ f("li", {
565
+ }, e.value)) : /* @__PURE__ */ m("li", {
566
566
  role: "option",
567
567
  "aria-disabled": "true",
568
568
  "aria-selected": "false",
569
- className: Ne.empty,
569
+ className: Fe.empty,
570
570
  children: o
571
571
  })
572
572
  }) }) : null;
573
- Pe.displayName = "SelectDropdown";
573
+ Ie.displayName = "SelectDropdown";
574
574
  var J = {
575
575
  control: "_control_1xma1_1",
576
576
  disabled: "_disabled_1xma1_18",
@@ -582,9 +582,9 @@ var J = {
582
582
  placeholder: "_placeholder_1xma1_63",
583
583
  error: "_error_1xma1_67",
584
584
  open: "_open_1xma1_109"
585
- }, Fe = ({ id: e, errorId: t, isOpen: n, disabled: r, required: i, listboxId: a, activeIndex: o, ariaLabel: s, error: c, displayText: l, isPlaceholder: u, size: d = "md", className: m, buttonRef: h, onClick: g, onKeyDown: _, onBlur: v, onFocus: y }) => /* @__PURE__ */ p("button", {
585
+ }, Le = ({ id: e, errorId: t, isOpen: n, disabled: r, required: i, listboxId: a, activeIndex: o, ariaLabel: s, error: c, displayText: l, isPlaceholder: u, size: d = "md", className: f, buttonRef: p, onClick: g, onKeyDown: _, onBlur: v, onFocus: y }) => /* @__PURE__ */ h("button", {
586
586
  id: e,
587
- ref: h,
587
+ ref: p,
588
588
  type: "button",
589
589
  role: "combobox",
590
590
  disabled: r,
@@ -597,52 +597,52 @@ var J = {
597
597
  "aria-controls": n ? a : void 0,
598
598
  "aria-describedby": t,
599
599
  "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
600
- className: F(J.control, J[d], {
600
+ className: L(J.control, J[d], {
601
601
  [J.error]: !!c,
602
602
  [J.disabled]: r
603
- }, m),
603
+ }, f),
604
604
  onClick: g,
605
605
  onKeyDown: _,
606
606
  onBlur: v,
607
607
  onFocus: y,
608
- children: [/* @__PURE__ */ f("span", {
609
- className: F(J.value, { [J.placeholder]: u }),
608
+ children: [/* @__PURE__ */ m("span", {
609
+ className: L(J.value, { [J.placeholder]: u }),
610
610
  children: l
611
- }), /* @__PURE__ */ f("span", {
612
- className: F(J.arrow, { [J.open]: n }),
611
+ }), /* @__PURE__ */ m("span", {
612
+ className: L(J.arrow, { [J.open]: n }),
613
613
  "aria-hidden": "true",
614
- children: /* @__PURE__ */ f(M, {})
614
+ children: /* @__PURE__ */ m(P, {})
615
615
  })]
616
616
  });
617
- Fe.displayName = "SelectTrigger";
617
+ Le.displayName = "SelectTrigger";
618
618
  //#endregion
619
619
  //#region src/components/Select/Select.tsx
620
- var Ie = ({ label: e, description: t, id: r, name: i, "aria-label": o, value: c, defaultValue: l, onChange: u, options: d, placeholder: m = "Select...", noOptionsText: h = "No options available", size: g = "md", required: _ = !1, disabled: v = !1, error: y, placement: b = "bottom-start", matchTriggerWidth: x = !0, open: S, defaultOpen: C = !1, onOpenChange: w, onBlur: T, onFocus: E, className: D, triggerClassName: k, dropdownClassName: A }) => {
621
- let j = a(), M = r ?? j, N = `${M}-listbox`, P = !!y, F = P ? `${M}-error` : void 0, I = s(null), L = s(null), { selectedValue: R, selectedOption: z, isOpen: V, setIsOpen: te, activeIndex: H, setActiveIndex: ne, closeDropdown: U, toggleDropdown: re, selectValue: W, onKeyDown: ie } = O({
622
- value: c,
623
- defaultValue: l,
620
+ var Re = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o, defaultValue: c, onChange: u, options: d, placeholder: f = "Select...", noOptionsText: p = "No options available", size: g = "md", required: _ = !1, disabled: v = !1, error: y, placement: b = "bottom-start", matchTriggerWidth: x = !0, open: S, defaultOpen: C = !1, onOpenChange: w, onBlur: T, onFocus: E, className: D, triggerClassName: O, dropdownClassName: k }) => {
621
+ let j = s(), M = n ?? j, N = `${M}-listbox`, P = !!y, F = P ? `${M}-error` : void 0, I = l(null), L = l(null), { selectedValue: R, selectedOption: z, isOpen: B, setIsOpen: V, activeIndex: H, setActiveIndex: ne, closeDropdown: U, toggleDropdown: re, selectValue: W, onKeyDown: ie } = A({
622
+ value: o,
623
+ defaultValue: c,
624
624
  onChange: u,
625
625
  options: d,
626
626
  disabled: v,
627
627
  open: S,
628
628
  defaultOpen: C,
629
629
  onOpenChange: w
630
- }), ae = !!z, { floatingStyles: oe, setRef: se, setFloatingRef: ce } = B({
631
- open: V,
632
- onOpenChange: te,
630
+ }), G = !!z, { floatingStyles: ae, setRef: oe, setFloatingRef: se } = ee({
631
+ open: B,
632
+ onOpenChange: V,
633
633
  placement: b,
634
634
  matchTriggerWidth: x,
635
635
  mobileSheetBreakpoint: 640
636
- }), le = n((e) => {
636
+ }), ce = i((e) => {
637
637
  W(e), I.current?.focus();
638
638
  }, [W]);
639
- ee([I, L], U, V);
640
- let ue = n((e) => {
641
- I.current = e, se(e);
642
- }, [se]), G = n((e) => {
643
- L.current = e, ce(e);
644
- }, [ce]);
645
- return /* @__PURE__ */ p(Ae, {
639
+ te([I, L], U, B);
640
+ let le = i((e) => {
641
+ I.current = e, oe(e);
642
+ }, [oe]), ue = i((e) => {
643
+ L.current = e, se(e);
644
+ }, [se]);
645
+ return /* @__PURE__ */ h(Me, {
646
646
  id: M,
647
647
  label: e,
648
648
  description: t,
@@ -651,94 +651,94 @@ var Ie = ({ label: e, description: t, id: r, name: i, "aria-label": o, value: c,
651
651
  disabled: v,
652
652
  className: D,
653
653
  children: [
654
- /* @__PURE__ */ f(Fe, {
654
+ /* @__PURE__ */ m(Le, {
655
655
  id: M,
656
656
  errorId: F,
657
- isOpen: V,
657
+ isOpen: B,
658
658
  disabled: v,
659
659
  required: _,
660
660
  listboxId: N,
661
661
  activeIndex: H,
662
- ariaLabel: o ?? (e ? void 0 : z?.label || m),
662
+ ariaLabel: a ?? (e ? void 0 : z?.label || f),
663
663
  error: P,
664
- displayText: z?.label ?? m,
665
- isPlaceholder: !ae,
664
+ displayText: z?.label ?? f,
665
+ isPlaceholder: !G,
666
666
  size: g,
667
- className: k,
668
- buttonRef: ue,
667
+ className: O,
668
+ buttonRef: le,
669
669
  onClick: re,
670
670
  onKeyDown: ie,
671
671
  onBlur: T,
672
672
  onFocus: E
673
673
  }),
674
- i && /* @__PURE__ */ f("input", {
674
+ r && /* @__PURE__ */ m("input", {
675
675
  type: "hidden",
676
- name: i,
676
+ name: r,
677
677
  value: R,
678
678
  disabled: v
679
679
  }),
680
- /* @__PURE__ */ f(Pe, {
681
- isOpen: V,
680
+ /* @__PURE__ */ m(Ie, {
681
+ isOpen: B,
682
682
  listboxId: N,
683
683
  labelledById: M,
684
- style: oe,
684
+ style: ae,
685
685
  options: d,
686
- noOptionsText: h,
686
+ noOptionsText: p,
687
687
  selectedValue: R,
688
688
  activeIndex: H,
689
- className: A,
690
- setDropdownRef: G,
691
- onSelect: le,
689
+ className: k,
690
+ setDropdownRef: ue,
691
+ onSelect: ce,
692
692
  onMouseEnter: ne
693
693
  })
694
694
  ]
695
695
  });
696
696
  };
697
- Ie.displayName = "Select";
697
+ Re.displayName = "Select";
698
698
  //#endregion
699
699
  //#region src/components/Tabs/TabsContext.tsx
700
- var Le = e(null), Re = () => {
701
- let e = r(Le);
700
+ var ze = t(null), Be = () => {
701
+ let e = a(ze);
702
702
  if (!e) throw Error("Tabs components must be used inside Tabs");
703
703
  return e;
704
- }, ze = {
704
+ }, Ve = {
705
705
  list: "_list_13hkl_1",
706
706
  vertical: "_vertical_13hkl_8"
707
- }, Be = ({ children: e, className: t, ...n }) => {
708
- let { orientation: r, appearance: i } = Re();
709
- return /* @__PURE__ */ f("div", {
707
+ }, He = ({ children: e, className: t, ...n }) => {
708
+ let { orientation: r, appearance: i } = Be();
709
+ return /* @__PURE__ */ m("div", {
710
710
  ...n,
711
711
  role: "tablist",
712
712
  "aria-orientation": r,
713
- className: F(ze.list, r === "vertical" && ze.vertical, i === "underline" && ze.underline, i === "pills" && ze.pills, t),
713
+ className: L(Ve.list, r === "vertical" && Ve.vertical, i === "underline" && Ve.underline, i === "pills" && Ve.pills, t),
714
714
  children: e
715
715
  });
716
716
  };
717
- Be.displayName = "TabsList";
718
- var Ve = {
717
+ He.displayName = "TabsList";
718
+ var Ue = {
719
719
  panel: "_panel_1v1a9_1",
720
720
  visible: "_visible_1v1a9_10",
721
721
  vertical: "_vertical_1v1a9_14"
722
- }, He = ({ index: e, children: t, className: n }) => {
723
- let { activeIndex: r, orientation: a } = Re(), [o, s] = c(!1), l = r === e;
724
- return i(() => {
725
- if (!l) {
722
+ }, We = ({ index: e, children: t, className: n }) => {
723
+ let { activeIndex: r, orientation: i } = Be(), [a, s] = u(!1), c = r === e;
724
+ return o(() => {
725
+ if (!c) {
726
726
  s(!1);
727
727
  return;
728
728
  }
729
729
  let e = setTimeout(() => s(!0), 10);
730
730
  return () => clearTimeout(e);
731
- }, [l]), /* @__PURE__ */ f("div", {
731
+ }, [c]), /* @__PURE__ */ m("div", {
732
732
  role: "tabpanel",
733
733
  id: `tab-panel-${e}`,
734
734
  "aria-labelledby": `tab-${e}`,
735
- hidden: !l,
735
+ hidden: !c,
736
736
  tabIndex: 0,
737
- className: F(Ve.panel, o && Ve.visible, a === "vertical" && Ve.vertical, n),
737
+ className: L(Ue.panel, a && Ue.visible, i === "vertical" && Ue.vertical, n),
738
738
  children: t
739
739
  });
740
740
  };
741
- He.displayName = "TabsPanel";
741
+ We.displayName = "TabsPanel";
742
742
  var Y = {
743
743
  tab: "_tab_qe8xc_1",
744
744
  iconOnly: "_iconOnly_qe8xc_27",
@@ -748,11 +748,11 @@ var Y = {
748
748
  underline: "_underline_qe8xc_60",
749
749
  pills: "_pills_qe8xc_92",
750
750
  vertical: "_vertical_qe8xc_106"
751
- }, Ue = t(({ index: e, children: t, className: r, disabled: i = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
752
- let { activeIndex: u, setActiveIndex: d, orientation: m, appearance: h = "default", registerTab: g, onTabKeyDown: _ } = Re(), v = u === e, y = !!a, b = y && t == null;
753
- return /* @__PURE__ */ p("button", {
751
+ }, Ge = n(({ index: e, children: t, className: n, disabled: r = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
752
+ let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: g, onTabKeyDown: _ } = Be(), v = u === e, y = !!a, b = y && t == null;
753
+ return /* @__PURE__ */ h("button", {
754
754
  type: "button",
755
- ref: n((t) => {
755
+ ref: i((t) => {
756
756
  g(e, t), typeof l == "function" ? l(t) : l && (l.current = t);
757
757
  }, [
758
758
  g,
@@ -763,39 +763,39 @@ var Y = {
763
763
  "aria-selected": v,
764
764
  "aria-controls": `tab-panel-${e}`,
765
765
  id: `tab-${e}`,
766
- disabled: i,
766
+ disabled: r,
767
767
  tabIndex: v ? 0 : -1,
768
- className: F(Y.tab, Y[h], m === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, r),
768
+ className: L(Y.tab, Y[p], f === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, n),
769
769
  onClick: (t) => {
770
- i || (d(e), o?.(t));
770
+ r || (d(e), o?.(t));
771
771
  },
772
772
  onKeyDown: (e) => {
773
773
  _(e), s?.(e);
774
774
  },
775
775
  ...c,
776
- children: [y && /* @__PURE__ */ f("span", {
776
+ children: [y && /* @__PURE__ */ m("span", {
777
777
  className: Y.tabIcon,
778
778
  "aria-hidden": "true",
779
779
  children: a
780
- }), t != null && /* @__PURE__ */ f("span", {
780
+ }), t != null && /* @__PURE__ */ m("span", {
781
781
  className: Y.label,
782
782
  children: t
783
783
  })]
784
784
  });
785
785
  });
786
- Ue.displayName = "Tab";
787
- var We = {
786
+ Ge.displayName = "Tab";
787
+ var Ke = {
788
788
  tabs: "_tabs_uqy7q_1",
789
789
  vertical: "_vertical_uqy7q_5"
790
- }, Ge = ({ children: e, activeIndex: t, defaultActiveIndex: r = 0, onChange: i, orientation: a = "horizontal", appearance: o = "default", className: c }) => {
791
- let { activeIndex: l, setActiveIndex: u } = k({
790
+ }, qe = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
791
+ let { activeIndex: c, setActiveIndex: u } = j({
792
792
  activeIndex: t,
793
- defaultActiveIndex: r,
794
- onChange: i
795
- }), d = s([]), p = n((e, t) => {
793
+ defaultActiveIndex: n,
794
+ onChange: r
795
+ }), d = l([]), f = i((e, t) => {
796
796
  d.current[e] = t;
797
- }, []), { onKeyDown: m } = A({
798
- activeIndex: l,
797
+ }, []), { onKeyDown: p } = M({
798
+ activeIndex: c,
799
799
  setActiveIndex: u,
800
800
  tabRefs: d,
801
801
  orientation: a,
@@ -803,32 +803,32 @@ var We = {
803
803
  d.current[e]?.focus();
804
804
  }
805
805
  }), h = {
806
- activeIndex: l,
806
+ activeIndex: c,
807
807
  setActiveIndex: u,
808
808
  orientation: a,
809
809
  appearance: o,
810
- registerTab: p,
811
- onTabKeyDown: m
810
+ registerTab: f,
811
+ onTabKeyDown: p
812
812
  };
813
- return /* @__PURE__ */ f(Le.Provider, {
813
+ return /* @__PURE__ */ m(ze.Provider, {
814
814
  value: h,
815
- children: /* @__PURE__ */ f("div", {
816
- className: F(We.tabs, a === "vertical" && We.vertical, c),
815
+ children: /* @__PURE__ */ m("div", {
816
+ className: L(Ke.tabs, a === "vertical" && Ke.vertical, s),
817
817
  children: e
818
818
  })
819
819
  });
820
820
  };
821
- Ge.displayName = "Tabs";
821
+ qe.displayName = "Tabs";
822
822
  //#endregion
823
823
  //#region src/components/Tabs/index.ts
824
- var Ke = Object.assign(Ge, {
825
- List: Be,
826
- Tab: Ue,
827
- Panel: He
828
- }), qe = {
824
+ var Je = Object.assign(qe, {
825
+ List: He,
826
+ Tab: Ge,
827
+ Panel: We
828
+ }), Ye = {
829
829
  tooltip: "_tooltip_10opu_1",
830
830
  arrow: "_arrow_10opu_25"
831
- }, Je = t(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
831
+ }, Xe = n(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
832
832
  let l = {
833
833
  top: "bottom",
834
834
  right: "left",
@@ -841,45 +841,45 @@ var Ke = Object.assign(Ge, {
841
841
  top: i == null ? "" : `${i}px`,
842
842
  [l]: "-5px"
843
843
  };
844
- return /* @__PURE__ */ p("div", {
844
+ return /* @__PURE__ */ h("div", {
845
845
  ref: c,
846
- className: F(qe.tooltip, a),
846
+ className: L(Ye.tooltip, a),
847
847
  "data-placement": t,
848
848
  "data-state": "open",
849
849
  style: o,
850
850
  ...s,
851
- children: [e, /* @__PURE__ */ f("div", {
851
+ children: [e, /* @__PURE__ */ m("div", {
852
852
  ref: n,
853
- className: qe.arrow,
853
+ className: Ye.arrow,
854
854
  style: u
855
855
  })]
856
856
  });
857
857
  });
858
- Je.displayName = "TooltipContent";
858
+ Xe.displayName = "TooltipContent";
859
859
  //#endregion
860
860
  //#region src/components/Tooltip/Tooltip.tsx
861
- var Ye = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
861
+ var Ze = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
862
862
  open: 300,
863
863
  close: 100
864
- }, maxWidth: o = 250, className: l, onOpenChange: u }) => {
865
- let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef: E, setFloatingRef: D, placement: O } = B({
866
- open: g,
864
+ }, maxWidth: a = 250, className: o, onOpenChange: c }) => {
865
+ let [d, f] = u(!1), v = l(null), y = s(), { context: b, floatingStyles: x, middlewareData: S, setRef: C, setFloatingRef: D, placement: O } = ee({
866
+ open: d,
867
867
  onOpenChange: (e) => {
868
- r || (_(e), u?.(e));
868
+ r || (f(e), c?.(e));
869
869
  },
870
870
  placement: t,
871
- middleware: [h({ element: v })]
872
- }), k = T.arrow?.x, A = T.arrow?.y, { getReferenceProps: j, getFloatingProps: M } = w([C(b, { delay: {
871
+ middleware: [_({ element: v })]
872
+ }), k = S.arrow?.x, A = S.arrow?.y, { getReferenceProps: j, getFloatingProps: M } = E([T(b, { delay: {
873
873
  open: i.open,
874
874
  close: i.close
875
- } }), S(b)]);
876
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
877
- ref: E,
875
+ } }), w(b)]);
876
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
877
+ ref: C,
878
878
  style: { display: "inline-flex" },
879
- "aria-describedby": g ? y : void 0,
879
+ "aria-describedby": d ? y : void 0,
880
880
  ...j(),
881
881
  children: e
882
- }), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Je, {
882
+ }), /* @__PURE__ */ m(g, { children: d && n && /* @__PURE__ */ m(Xe, {
883
883
  id: y,
884
884
  ref: D,
885
885
  content: n,
@@ -889,74 +889,144 @@ var Ye = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
889
889
  role: "tooltip",
890
890
  style: {
891
891
  ...x,
892
- maxWidth: typeof o == "number" ? `${o}px` : o
892
+ maxWidth: typeof a == "number" ? `${a}px` : a
893
893
  },
894
894
  placement: O,
895
- className: l,
895
+ className: o,
896
896
  ...M()
897
897
  }) })] });
898
898
  };
899
- Ye.displayName = "Tooltip";
899
+ Ze.displayName = "Tooltip";
900
900
  //#endregion
901
901
  //#region src/utils/devWarning.ts
902
- var Xe = (e, t) => {
902
+ var Qe = (e, t) => {
903
903
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
904
904
  }, X = {
905
- button: "_button_kajmf_1",
906
- solid: "_solid_kajmf_21",
907
- primary: "_primary_kajmf_21",
908
- loading: "_loading_kajmf_21",
909
- secondary: "_secondary_kajmf_45",
910
- danger: "_danger_kajmf_69",
911
- close: "_close_kajmf_93",
912
- outline: "_outline_kajmf_117",
913
- ghost: "_ghost_kajmf_213",
914
- sm: "_sm_kajmf_327",
915
- md: "_md_kajmf_333",
916
- lg: "_lg_kajmf_339",
917
- fullWidth: "_fullWidth_kajmf_345",
918
- iconOnly: "_iconOnly_kajmf_349",
919
- label: "_label_kajmf_353",
920
- icon: "_icon_kajmf_349",
921
- spinner: "_spinner_kajmf_375",
922
- "button-spin": "_button-spin_kajmf_1"
923
- }, Ze = t(({ children: e, color: t = "primary", variant: n = "solid", size: r = "md", type: i = "button", disabled: a = !1, loading: o = !1, loadingText: s, leftIcon: c, rightIcon: l, fullWidth: u = !1, iconOnly: d = !1, className: m, onClick: h, "aria-label": g, ..._ }, v) => {
924
- let y = d || !e && !!(c || l), b = a || o, x = o && s ? s : e;
925
- return Xe(!y || !!g, "Button: icon-only buttons must provide aria-label."), /* @__PURE__ */ p("button", {
926
- ..._,
927
- ref: v,
928
- type: i,
929
- disabled: b,
930
- onClick: b ? void 0 : h,
931
- "aria-label": g || void 0,
932
- "aria-busy": o || void 0,
933
- className: F(X.button, X[t], X[n], X[r], m, {
934
- [X.disabled]: b,
935
- [X.loading]: o,
936
- [X.fullWidth]: u,
937
- [X.iconOnly]: y
905
+ button: "_button_2nghu_1",
906
+ solid: "_solid_2nghu_22",
907
+ primary: "_primary_2nghu_22",
908
+ loading: "_loading_2nghu_22",
909
+ neutral: "_neutral_2nghu_48",
910
+ success: "_success_2nghu_74",
911
+ warning: "_warning_2nghu_100",
912
+ danger: "_danger_2nghu_126",
913
+ outline: "_outline_2nghu_152",
914
+ ghost: "_ghost_2nghu_282",
915
+ soft: "_soft_2nghu_412",
916
+ link: "_link_2nghu_542",
917
+ square: "_square_2nghu_685",
918
+ rounded: "_rounded_2nghu_689",
919
+ pill: "_pill_2nghu_693",
920
+ sm: "_sm_2nghu_697",
921
+ md: "_md_2nghu_703",
922
+ lg: "_lg_2nghu_709",
923
+ fullWidth: "_fullWidth_2nghu_715",
924
+ iconOnly: "_iconOnly_2nghu_719",
925
+ label: "_label_2nghu_723",
926
+ labelText: "_labelText_2nghu_745",
927
+ icon: "_icon_2nghu_719",
928
+ spinner: "_spinner_2nghu_764",
929
+ "button-spin": "_button-spin_2nghu_1",
930
+ badge: "_badge_2nghu_786",
931
+ shortcut: "_shortcut_2nghu_800"
932
+ }, $e = n(({ children: t, color: n = "primary", appearance: i = "solid", size: a = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: g, badge: _, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
933
+ let I = S && r(t) ? t : void 0, R = I ? I.props.children : t, z = x || !R && !!(d || f), B = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), V = c || l, ee = l && u ? u : R, te = u && R && !z && (typeof R == "string" || typeof R == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? R : u) : void 0, H = O === "_blank" && !k ? "noreferrer noopener" : k, ne = L(X.button, X[n], X[i], X[a], X[o], C, {
934
+ [X.disabled]: V,
935
+ [X.loading]: l,
936
+ [X.fullWidth]: b,
937
+ [X.iconOnly]: z
938
+ });
939
+ Qe(!S || !D, "Button: pass href to the child element when using asChild."), Qe(!S || !!I, "Button: asChild requires a single valid React element child."), Qe(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
940
+ let U = (e) => {
941
+ e.preventDefault(), e.stopPropagation();
942
+ }, re = (e) => {
943
+ if (V) {
944
+ U(e);
945
+ return;
946
+ }
947
+ I?.props.onClick?.(e), e.defaultPrevented || w?.(e);
948
+ }, W = /* @__PURE__ */ h(p, { children: [
949
+ l && (g ? /* @__PURE__ */ m("span", {
950
+ className: X.icon,
951
+ "aria-hidden": "true",
952
+ children: g
953
+ }) : /* @__PURE__ */ m("span", {
954
+ className: X.spinner,
955
+ "aria-hidden": "true"
956
+ })),
957
+ !l && d && /* @__PURE__ */ m("span", {
958
+ className: X.icon,
959
+ children: d
938
960
  }),
939
- children: [
940
- o && /* @__PURE__ */ f("span", {
941
- className: X.spinner,
942
- "aria-hidden": "true"
943
- }),
944
- !o && c && /* @__PURE__ */ f("span", {
945
- className: X.icon,
946
- children: c
947
- }),
948
- x && !y && /* @__PURE__ */ f("span", {
949
- className: X.label,
950
- children: x
951
- }),
952
- !o && l && /* @__PURE__ */ f("span", {
953
- className: X.icon,
954
- children: l
961
+ ee && !z && /* @__PURE__ */ m("span", {
962
+ className: X.label,
963
+ "data-measure": te,
964
+ children: /* @__PURE__ */ m("span", {
965
+ className: X.labelText,
966
+ children: ee
955
967
  })
956
- ]
968
+ }),
969
+ _ && !z && /* @__PURE__ */ m("span", {
970
+ className: X.badge,
971
+ children: _
972
+ }),
973
+ v && !z && /* @__PURE__ */ m("span", {
974
+ className: X.shortcut,
975
+ children: v
976
+ }),
977
+ !l && f && /* @__PURE__ */ m("span", {
978
+ className: X.icon,
979
+ children: f
980
+ })
981
+ ] });
982
+ return I ? e(I, {
983
+ ...P,
984
+ ref: F,
985
+ "aria-busy": l || void 0,
986
+ "aria-disabled": V || void 0,
987
+ "aria-label": T || I.props["aria-label"] || void 0,
988
+ "aria-labelledby": E || I.props["aria-labelledby"] || void 0,
989
+ className: L(I.props.className, ne),
990
+ href: V ? void 0 : I.props.href,
991
+ onClick: re,
992
+ tabIndex: V ? -1 : I.props.tabIndex,
993
+ title: y || I.props.title,
994
+ children: W
995
+ }) : D ? /* @__PURE__ */ m("a", {
996
+ ref: F,
997
+ href: V ? void 0 : D,
998
+ id: j,
999
+ role: M,
1000
+ tabIndex: V ? -1 : N,
1001
+ target: O,
1002
+ rel: H,
1003
+ download: A,
1004
+ onClick: V ? U : w,
1005
+ "aria-disabled": V || void 0,
1006
+ "aria-label": T || void 0,
1007
+ "aria-labelledby": E || void 0,
1008
+ "aria-busy": l || void 0,
1009
+ className: ne,
1010
+ title: y,
1011
+ children: W
1012
+ }) : /* @__PURE__ */ m("button", {
1013
+ ...P,
1014
+ ref: F,
1015
+ id: j,
1016
+ role: M,
1017
+ tabIndex: N,
1018
+ type: s,
1019
+ disabled: V,
1020
+ onClick: V ? void 0 : w,
1021
+ "aria-label": T || void 0,
1022
+ "aria-labelledby": E || void 0,
1023
+ "aria-busy": l || void 0,
1024
+ className: ne,
1025
+ title: y,
1026
+ children: W
957
1027
  });
958
1028
  });
959
- Ze.displayName = "Button";
1029
+ $e.displayName = "Button";
960
1030
  var Z = {
961
1031
  wrapper: "_wrapper_2j84j_1",
962
1032
  wrapperSm: "_wrapperSm_2j84j_12",
@@ -981,74 +1051,74 @@ var Z = {
981
1051
  labelLg: "_labelLg_2j84j_151",
982
1052
  indeterminate: "_indeterminate_2j84j_113",
983
1053
  disabled: "_disabled_2j84j_223"
984
- }, Qe = {
1054
+ }, et = {
985
1055
  sm: Z.labelSm,
986
1056
  md: Z.labelMd,
987
1057
  lg: Z.labelLg
988
- }, $e = {
1058
+ }, tt = {
989
1059
  sm: Z.wrapperSm,
990
1060
  md: Z.wrapperMd,
991
1061
  lg: Z.wrapperLg
992
- }, et = {
1062
+ }, nt = {
993
1063
  sm: Z.containerSm,
994
1064
  md: Z.containerMd,
995
1065
  lg: Z.containerLg
996
- }, tt = t(({ id: e, label: t, description: r, checked: o, size: c = "md", defaultChecked: l = !1, disabled: u = !1, required: d = !1, indeterminate: m = !1, className: h, wrapperClassName: g, onCheckedChange: _, error: v, "aria-label": y, "aria-labelledby": b, "aria-describedby": x, ...S }, C) => {
997
- let w = a(), E = e ?? w, D = s(null), O = !!v, k = r ? `${E}-description` : void 0, A = O ? `${E}-error` : void 0, M = [
1066
+ }, rt = n(({ id: e, label: t, description: n, checked: r, size: a = "md", defaultChecked: c = !1, disabled: u = !1, required: d = !1, indeterminate: f = !1, className: p, wrapperClassName: g, onCheckedChange: _, error: v, "aria-label": y, "aria-labelledby": b, "aria-describedby": x, ...S }, C) => {
1067
+ let w = s(), T = e ?? w, E = l(null), O = !!v, k = n ? `${T}-description` : void 0, A = O ? `${T}-error` : void 0, j = [
998
1068
  x,
999
1069
  k,
1000
1070
  A
1001
- ].filter(Boolean).join(" "), [N, P] = T({
1002
- value: o,
1003
- defaultValue: l,
1071
+ ].filter(Boolean).join(" "), [M, P] = D({
1072
+ value: r,
1073
+ defaultValue: c,
1004
1074
  onChange: _
1005
- }), I = n((e) => {
1006
- if (D.current = e, typeof C == "function") {
1075
+ }), F = i((e) => {
1076
+ if (E.current = e, typeof C == "function") {
1007
1077
  C(e);
1008
1078
  return;
1009
1079
  }
1010
1080
  C && (C.current = e);
1011
1081
  }, [C]);
1012
- i(() => {
1013
- D.current && (D.current.indeterminate = m);
1014
- }, [m]);
1015
- let L = (e) => {
1082
+ o(() => {
1083
+ E.current && (E.current.indeterminate = f);
1084
+ }, [f]);
1085
+ let I = (e) => {
1016
1086
  P(e.target.checked);
1017
1087
  };
1018
- return Xe(!!(t || y || b), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ p("div", {
1019
- className: F(Z.container, et[c], h),
1088
+ return Qe(!!(t || y || b), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ h("div", {
1089
+ className: L(Z.container, nt[a], p),
1020
1090
  children: [
1021
- /* @__PURE__ */ p("label", {
1022
- htmlFor: E,
1023
- className: F(Z.wrapper, $e[c], !t && Z.iconOnly, u && Z.disabled, g),
1091
+ /* @__PURE__ */ h("label", {
1092
+ htmlFor: T,
1093
+ className: L(Z.wrapper, tt[a], !t && Z.iconOnly, u && Z.disabled, g),
1024
1094
  children: [
1025
- /* @__PURE__ */ f("input", {
1095
+ /* @__PURE__ */ m("input", {
1026
1096
  ...S,
1027
- ref: I,
1028
- id: E,
1097
+ ref: F,
1098
+ id: T,
1029
1099
  type: "checkbox",
1030
- checked: N,
1100
+ checked: M,
1031
1101
  disabled: u,
1032
1102
  required: d,
1033
- onChange: L,
1103
+ onChange: I,
1034
1104
  className: Z.input,
1035
1105
  "aria-label": y,
1036
1106
  "aria-labelledby": b,
1037
- "aria-checked": m ? "mixed" : S["aria-checked"],
1107
+ "aria-checked": f ? "mixed" : S["aria-checked"],
1038
1108
  "aria-invalid": O ? !0 : S["aria-invalid"],
1039
- "aria-describedby": M || void 0
1109
+ "aria-describedby": j || void 0
1040
1110
  }),
1041
- /* @__PURE__ */ f("span", {
1042
- className: F(Z.customCheckbox, O && Z.error, m && Z.indeterminate),
1111
+ /* @__PURE__ */ m("span", {
1112
+ className: L(Z.customCheckbox, O && Z.error, f && Z.indeterminate),
1043
1113
  "aria-hidden": "true",
1044
- children: m ? /* @__PURE__ */ f("span", { className: Z.indeterminateMark }) : N && /* @__PURE__ */ f("span", {
1114
+ children: f ? /* @__PURE__ */ m("span", { className: Z.indeterminateMark }) : M && /* @__PURE__ */ m("span", {
1045
1115
  className: Z.checkmark,
1046
- children: /* @__PURE__ */ f(j, {})
1116
+ children: /* @__PURE__ */ m(N, {})
1047
1117
  })
1048
1118
  }),
1049
- t && /* @__PURE__ */ p("span", {
1050
- className: F(Z.label, Qe[c]),
1051
- children: [t, d && /* @__PURE__ */ f("span", {
1119
+ t && /* @__PURE__ */ h("span", {
1120
+ className: L(Z.label, et[a]),
1121
+ children: [t, d && /* @__PURE__ */ m("span", {
1052
1122
  className: Z.requiredMark,
1053
1123
  "aria-hidden": "true",
1054
1124
  children: "*"
@@ -1056,12 +1126,12 @@ var Z = {
1056
1126
  })
1057
1127
  ]
1058
1128
  }),
1059
- r && /* @__PURE__ */ f("span", {
1129
+ n && /* @__PURE__ */ m("span", {
1060
1130
  id: k,
1061
1131
  className: Z.descriptionText,
1062
- children: r
1132
+ children: n
1063
1133
  }),
1064
- O && /* @__PURE__ */ f("span", {
1134
+ O && /* @__PURE__ */ m("span", {
1065
1135
  id: A,
1066
1136
  className: Z.errorText,
1067
1137
  children: v
@@ -1069,7 +1139,7 @@ var Z = {
1069
1139
  ]
1070
1140
  });
1071
1141
  });
1072
- tt.displayName = "Checkbox";
1142
+ rt.displayName = "Checkbox";
1073
1143
  var Q = {
1074
1144
  inputWrapper: "_inputWrapper_13w4m_1",
1075
1145
  input: "_input_13w4m_1",
@@ -1089,7 +1159,7 @@ var Q = {
1089
1159
  toneDanger: "_toneDanger_13w4m_205",
1090
1160
  toneMuted: "_toneMuted_13w4m_209",
1091
1161
  toneInverse: "_toneInverse_13w4m_213"
1092
- }, nt = {
1162
+ }, it = {
1093
1163
  default: Q.toneDefault,
1094
1164
  primary: Q.tonePrimary,
1095
1165
  secondary: Q.toneSecondary,
@@ -1097,7 +1167,7 @@ var Q = {
1097
1167
  danger: Q.toneDanger,
1098
1168
  muted: Q.toneMuted,
1099
1169
  inverse: Q.toneInverse
1100
- }, rt = (e = "text", t) => {
1170
+ }, at = (e = "text", t) => {
1101
1171
  if (t) return t;
1102
1172
  switch (e) {
1103
1173
  case "email": return "email";
@@ -1107,78 +1177,78 @@ var Q = {
1107
1177
  case "search": return "off";
1108
1178
  default: return;
1109
1179
  }
1110
- }, it = t(({ id: e, label: t, name: r, description: i, placeholder: o, value: l, defaultValue: u, onChange: d, type: m = "text", size: h = "md", error: g, disabled: _ = !1, required: v = !1, className: y, autoComplete: b, readOnly: x = !1, clearable: S = !1, onClear: C, leftAdornment: w, rightAdornment: T, clearIcon: E, leftAdornmentTone: D = "default", rightAdornmentTone: O = "default", clearIconTone: k = "danger", autoFocus: A, maxLength: j, onMouseEnter: M, onMouseLeave: N, "aria-describedby": P, "aria-invalid": I, ...L }, R) => {
1111
- let z = a(), B = e ?? z, ee = s(null), [V, te] = c(u ?? ""), H = l !== void 0, ne = H ? l : V, U = ne !== "", re = rt(m, b), W = S && U && !_ && !x, ie = [
1180
+ }, ot = n(({ id: e, label: t, name: n, description: r, placeholder: a, value: o, defaultValue: c, onChange: d, type: f = "text", size: p = "md", error: g, disabled: _ = !1, required: v = !1, className: y, autoComplete: b, readOnly: x = !1, clearable: S = !1, onClear: C, leftAdornment: w, rightAdornment: T, clearIcon: E, leftAdornmentTone: D = "default", rightAdornmentTone: O = "default", clearIconTone: k = "danger", autoFocus: A, maxLength: j, onMouseEnter: M, onMouseLeave: N, "aria-describedby": P, "aria-invalid": F, ...I }, R) => {
1181
+ let z = s(), B = e ?? z, V = l(null), [ee, te] = u(c ?? ""), H = o !== void 0, ne = H ? o : ee, U = ne !== "", re = at(f, b), W = S && U && !_ && !x, ie = [
1112
1182
  P,
1113
- i ? `${B}-description` : void 0,
1183
+ r ? `${B}-description` : void 0,
1114
1184
  g ? `${B}-error` : void 0
1115
- ].filter(Boolean).join(" "), ae = E ?? "×", oe = n((e) => {
1116
- if (ee.current = e, typeof R == "function") {
1185
+ ].filter(Boolean).join(" "), G = E ?? "×", ae = i((e) => {
1186
+ if (V.current = e, typeof R == "function") {
1117
1187
  R(e);
1118
1188
  return;
1119
1189
  }
1120
1190
  R && (R.current = e);
1121
- }, [R]), se = n((e) => {
1191
+ }, [R]), oe = i((e) => {
1122
1192
  let t = e.target.value;
1123
1193
  H || te(t), d?.(e);
1124
- }, [H, d]), ce = n(() => {
1125
- H || te(""), C?.(), ee.current?.focus();
1126
- }, [H, C]), le = !W && !!T;
1127
- return /* @__PURE__ */ f(Ae, {
1194
+ }, [H, d]), se = i(() => {
1195
+ H || te(""), C?.(), V.current?.focus();
1196
+ }, [H, C]), ce = !W && !!T;
1197
+ return /* @__PURE__ */ m(Me, {
1128
1198
  id: B,
1129
1199
  label: t,
1130
- description: i,
1200
+ description: r,
1131
1201
  error: g,
1132
1202
  required: v,
1133
1203
  disabled: _,
1134
- children: /* @__PURE__ */ p("div", {
1135
- className: F(Q.inputWrapper, {
1204
+ children: /* @__PURE__ */ h("div", {
1205
+ className: L(Q.inputWrapper, {
1136
1206
  [Q.hasLeftAdornment]: !!w,
1137
1207
  [Q.hasRightAdornment]: !!T || W
1138
1208
  }),
1139
1209
  children: [
1140
- w && /* @__PURE__ */ f("span", {
1210
+ w && /* @__PURE__ */ m("span", {
1141
1211
  "aria-hidden": "true",
1142
- className: F(Q.leftAdornment, nt[D]),
1212
+ className: L(Q.leftAdornment, it[D]),
1143
1213
  children: w
1144
1214
  }),
1145
- /* @__PURE__ */ f("input", {
1146
- ...L,
1147
- ref: oe,
1215
+ /* @__PURE__ */ m("input", {
1216
+ ...I,
1217
+ ref: ae,
1148
1218
  id: B,
1149
- name: r,
1150
- type: m,
1219
+ name: n,
1220
+ type: f,
1151
1221
  autoComplete: re,
1152
- className: F(Q.input, Q[h], { [Q.error]: !!g }, y),
1222
+ className: L(Q.input, Q[p], { [Q.error]: !!g }, y),
1153
1223
  value: ne,
1154
- onChange: se,
1155
- placeholder: o,
1224
+ onChange: oe,
1225
+ placeholder: a,
1156
1226
  disabled: _,
1157
1227
  readOnly: x,
1158
1228
  required: v,
1159
1229
  autoFocus: A,
1160
1230
  maxLength: j,
1161
- "aria-invalid": g ? !0 : I,
1231
+ "aria-invalid": g ? !0 : F,
1162
1232
  "aria-describedby": ie || void 0,
1163
1233
  onMouseEnter: M,
1164
1234
  onMouseLeave: N
1165
1235
  }),
1166
- W && /* @__PURE__ */ f("button", {
1236
+ W && /* @__PURE__ */ m("button", {
1167
1237
  type: "button",
1168
- className: F(Q.clearButton, nt[k]),
1169
- onClick: ce,
1238
+ className: L(Q.clearButton, it[k]),
1239
+ onClick: se,
1170
1240
  "aria-label": "Clear input",
1171
- children: ae
1241
+ children: G
1172
1242
  }),
1173
- le && /* @__PURE__ */ f("div", {
1174
- className: F(Q.rightAdornment, nt[O]),
1243
+ ce && /* @__PURE__ */ m("div", {
1244
+ className: L(Q.rightAdornment, it[O]),
1175
1245
  children: T
1176
1246
  })
1177
1247
  ]
1178
1248
  })
1179
1249
  });
1180
1250
  });
1181
- it.displayName = "Input";
1251
+ ot.displayName = "Input";
1182
1252
  var $ = {
1183
1253
  root: "_root_ie5a6_1",
1184
1254
  invalid: "_invalid_ie5a6_14",
@@ -1194,32 +1264,32 @@ var $ = {
1194
1264
  indicator: "_indicator_ie5a6_109",
1195
1265
  content: "_content_ie5a6_202",
1196
1266
  error: "_error_ie5a6_219"
1197
- }, at = t(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: o, error: s, onCheckedChange: c, label: l, description: u, wrapperClassName: d, className: m, id: h, name: g, "aria-describedby": _, ...v }, y) => {
1198
- let b = Oe(), x = a(), S = h ?? x, C = u ? `${S}-description` : void 0, w = s ? `${S}-error` : void 0, E = [
1267
+ }, st = n(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, error: o, onCheckedChange: c, label: l, description: u, wrapperClassName: d, className: f, id: p, name: g, "aria-describedby": _, ...v }, y) => {
1268
+ let b = Ae(), x = s(), S = p ?? x, C = u ? `${S}-description` : void 0, w = o ? `${S}-error` : void 0, T = [
1199
1269
  C,
1200
1270
  w,
1201
1271
  b?.describedBy,
1202
1272
  _
1203
- ].filter(Boolean).join(" ") || void 0, D = b !== null, [O, k] = T({
1273
+ ].filter(Boolean).join(" ") || void 0, E = b !== null, [O, k] = D({
1204
1274
  value: t,
1205
1275
  defaultValue: n,
1206
1276
  onChange: c
1207
- }), A = D ? b.value === e : O, j = !!b?.disabled || r, M = !!b?.required || i, N = b?.name ?? g, P = !!(s || b?.invalid), I = o ?? b?.size ?? "md", L = (t) => {
1277
+ }), A = E ? b.value === e : O, j = !!b?.disabled || r, M = !!b?.required || i, N = b?.name ?? g, P = !!(o || b?.invalid), F = a ?? b?.size ?? "md", I = (t) => {
1208
1278
  if (!j) {
1209
- if (D) {
1279
+ if (E) {
1210
1280
  b.onValueChange(e);
1211
1281
  return;
1212
1282
  }
1213
1283
  k(t.currentTarget.checked);
1214
1284
  }
1215
1285
  };
1216
- return /* @__PURE__ */ p("div", {
1217
- className: F($.root, $[I], P && $.invalid, j && $.disabled, m),
1218
- children: [/* @__PURE__ */ p("label", {
1286
+ return /* @__PURE__ */ h("div", {
1287
+ className: L($.root, $[F], P && $.invalid, j && $.disabled, f),
1288
+ children: [/* @__PURE__ */ h("label", {
1219
1289
  htmlFor: S,
1220
- className: F($.wrapper, d),
1290
+ className: L($.wrapper, d),
1221
1291
  children: [
1222
- /* @__PURE__ */ f("input", {
1292
+ /* @__PURE__ */ m("input", {
1223
1293
  ...v,
1224
1294
  ref: y,
1225
1295
  id: S,
@@ -1230,73 +1300,73 @@ var $ = {
1230
1300
  disabled: j,
1231
1301
  required: M,
1232
1302
  "aria-invalid": P || void 0,
1233
- "aria-describedby": E,
1303
+ "aria-describedby": T,
1234
1304
  className: $.input,
1235
- onChange: L
1305
+ onChange: I
1236
1306
  }),
1237
- /* @__PURE__ */ f("span", {
1307
+ /* @__PURE__ */ m("span", {
1238
1308
  className: $.control,
1239
1309
  "aria-hidden": "true",
1240
- children: /* @__PURE__ */ f("span", { className: $.indicator })
1310
+ children: /* @__PURE__ */ m("span", { className: $.indicator })
1241
1311
  }),
1242
- (l || u) && /* @__PURE__ */ p("span", {
1312
+ (l || u) && /* @__PURE__ */ h("span", {
1243
1313
  className: $.content,
1244
- children: [l && /* @__PURE__ */ f("span", {
1314
+ children: [l && /* @__PURE__ */ m("span", {
1245
1315
  className: $.label,
1246
1316
  children: l
1247
- }), u && /* @__PURE__ */ f("span", {
1317
+ }), u && /* @__PURE__ */ m("span", {
1248
1318
  id: C,
1249
1319
  className: $.description,
1250
1320
  children: u
1251
1321
  })]
1252
1322
  })
1253
1323
  ]
1254
- }), s && /* @__PURE__ */ f("div", {
1324
+ }), o && /* @__PURE__ */ m("div", {
1255
1325
  id: w,
1256
1326
  className: $.error,
1257
- children: s
1327
+ children: o
1258
1328
  })]
1259
1329
  });
1260
1330
  });
1261
- at.displayName = "Radio";
1331
+ st.displayName = "Radio";
1262
1332
  //#endregion
1263
1333
  //#region src/theme/ThemeContext.ts
1264
- var ot = e(null), st = (e) => e === "highContrast" ? "high-contrast" : e, ct = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1265
- let [a, s] = T({
1334
+ var ct = t(null), lt = (e) => e === "highContrast" ? "high-contrast" : e, ut = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1335
+ let [i, a] = D({
1266
1336
  value: e,
1267
1337
  defaultValue: t,
1268
1338
  onChange: n
1269
- }), c = st(a);
1270
- i(() => {
1339
+ }), s = lt(i);
1340
+ o(() => {
1271
1341
  if (typeof document > "u") return;
1272
1342
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
1273
- return e.dataset.velliraTheme = c, () => {
1343
+ return e.dataset.velliraTheme = s, () => {
1274
1344
  if (t === void 0) {
1275
1345
  delete e.dataset.velliraTheme;
1276
1346
  return;
1277
1347
  }
1278
1348
  e.dataset.velliraTheme = t;
1279
1349
  };
1280
- }, [c]);
1281
- let l = o(() => ({
1282
- theme: a,
1283
- setTheme: s
1284
- }), [a, s]);
1285
- return /* @__PURE__ */ f(ot.Provider, {
1350
+ }, [s]);
1351
+ let l = c(() => ({
1352
+ theme: i,
1353
+ setTheme: a
1354
+ }), [i, a]);
1355
+ return /* @__PURE__ */ m(ct.Provider, {
1286
1356
  value: l,
1287
- children: /* @__PURE__ */ f("div", {
1288
- "data-vellira-theme": c,
1357
+ children: /* @__PURE__ */ m("div", {
1358
+ "data-vellira-theme": s,
1289
1359
  children: r
1290
1360
  })
1291
1361
  });
1292
1362
  };
1293
- ct.displayName = "ThemeProvider";
1363
+ ut.displayName = "ThemeProvider";
1294
1364
  //#endregion
1295
1365
  //#region src/theme/useTheme.ts
1296
- function lt() {
1297
- let e = r(ot);
1366
+ function dt() {
1367
+ let e = a(ct);
1298
1368
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1299
1369
  return e;
1300
1370
  }
1301
1371
  //#endregion
1302
- export { Ze as Button, tt as Checkbox, le as Dropdown, Ae as FormField, it as Input, Te as Modal, at as Radio, ke as RadioGroup, Ie as Select, Ke as Tabs, ct as ThemeProvider, Ye as Tooltip, lt as useTheme };
1372
+ export { $e as Button, rt as Checkbox, ue as Dropdown, Me as FormField, ot as Input, De as Modal, st as Radio, je as RadioGroup, Re as Select, Je as Tabs, ut as ThemeProvider, Ze as Tooltip, dt as useTheme };