@vellira-ui/react 2.25.1 → 2.26.1

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
@@ -3,21 +3,21 @@ import l from "clsx";
3
3
  import { createPortal as u } from "react-dom";
4
4
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
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, useKeyboardNavigation as E, useTabsKeyboard as D } from "@vellira-ui/core";
7
- import { Check as O, ChevronDown as k, Close as A } from "@vellira-ui/icons";
8
- import j from "focus-trap-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";
9
9
  //#region src/utils/cn.ts
10
- var M = (...e) => l(e), N = ({ children: e }) => {
10
+ var F = (...e) => l(e), I = ({ children: e }) => {
11
11
  let [t, n] = c(!1);
12
12
  if (i(() => {
13
13
  n(!0);
14
14
  }, []), !t) return null;
15
15
  let r = document.getElementById("overlay-root") ?? document.body;
16
16
  return r ? u(e, r) : null;
17
- }, P = {
18
- dropdown: "_dropdown_6pgxt_1",
19
- dropdownIn: "_dropdownIn_6pgxt_1"
20
- }, F = t(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ f(N, { children: /* @__PURE__ */ f("ul", {
17
+ }, L = {
18
+ dropdown: "_dropdown_1rvx9_1",
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", {
21
21
  ref: c,
22
22
  id: n,
23
23
  role: "menu",
@@ -27,13 +27,13 @@ var M = (...e) => l(e), N = ({ children: e }) => {
27
27
  "aria-activedescendant": a,
28
28
  onKeyDown: o,
29
29
  style: t,
30
- className: M(P.dropdown, s),
30
+ className: F(L.dropdown, s),
31
31
  children: e
32
32
  }) }));
33
- F.displayName = "DropdownContent";
33
+ R.displayName = "DropdownContent";
34
34
  //#endregion
35
35
  //#region src/hooks/useFloatingPosition.ts
36
- var I = (e) => {
36
+ var z = (e) => {
37
37
  let [t, n] = c(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
38
  return i(() => {
39
39
  if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
@@ -42,15 +42,15 @@ var I = (e) => {
42
42
  t.removeEventListener("change", r);
43
43
  };
44
44
  }, [e]), t;
45
- }, ee = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: a = !1, mobileSheetBreakpoint: s, middleware: c = [] } = {}) => {
46
- let l = I(s), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = x({
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({
47
47
  open: e,
48
48
  onOpenChange: t,
49
49
  placement: n,
50
50
  strategy: r,
51
51
  transform: !1,
52
52
  middleware: o(() => [
53
- v(6),
53
+ v(2),
54
54
  _(),
55
55
  b({ apply({ rects: e, elements: t }) {
56
56
  !a || l || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
@@ -76,7 +76,7 @@ var I = (e) => {
76
76
  setFloatingRef: u.setFloating,
77
77
  updatePosition: f
78
78
  };
79
- }, L = (e, t, n = !0) => {
79
+ }, ee = (e, t, n = !0) => {
80
80
  let r = s(e);
81
81
  r.current = e;
82
82
  let a = s(t);
@@ -88,21 +88,21 @@ var I = (e) => {
88
88
  };
89
89
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
90
90
  }, [n]);
91
- }, R = { group: "_group_1yomt_1" }, te = ({ label: e }) => /* @__PURE__ */ f("li", {
91
+ }, V = { group: "_group_aviwv_1" }, te = ({ label: e }) => /* @__PURE__ */ f("li", {
92
92
  role: "presentation",
93
- className: R.group,
93
+ className: V.group,
94
94
  children: e
95
- }), z = {
96
- item: "_item_t87eq_1",
97
- disabled: "_disabled_t87eq_18",
98
- active: "_active_t87eq_28",
99
- danger: "_danger_t87eq_37",
100
- itemIcon: "_itemIcon_t87eq_61",
101
- itemShortcut: "_itemShortcut_t87eq_62",
102
- itemText: "_itemText_t87eq_68",
103
- "itemText--truncate": "_itemText--truncate_t87eq_74",
104
- "itemText--wrap": "_itemText--wrap_t87eq_79",
105
- "itemText--nowrap": "_itemText--nowrap_t87eq_83"
95
+ }), H = {
96
+ item: "_item_re11y_1",
97
+ disabled: "_disabled_re11y_21",
98
+ active: "_active_re11y_34",
99
+ danger: "_danger_re11y_40",
100
+ itemIcon: "_itemIcon_re11y_62",
101
+ itemShortcut: "_itemShortcut_re11y_63",
102
+ itemText: "_itemText_re11y_82",
103
+ "itemText--truncate": "_itemText--truncate_re11y_88",
104
+ "itemText--wrap": "_itemText--wrap_re11y_93",
105
+ "itemText--nowrap": "_itemText--nowrap_re11y_97"
106
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
107
  let m = t || n;
108
108
  return /* @__PURE__ */ p("li", {
@@ -114,228 +114,232 @@ var I = (e) => {
114
114
  "data-danger": i || void 0,
115
115
  onClick: a ? void 0 : s,
116
116
  onMouseEnter: a ? void 0 : c,
117
- className: M(z.item, {
118
- [z.active]: o,
119
- [z.disabled]: a,
120
- [z.danger]: i
117
+ className: F(H.item, {
118
+ [H.active]: o,
119
+ [H.disabled]: a,
120
+ [H.danger]: i
121
121
  }, d),
122
122
  children: [
123
123
  r && /* @__PURE__ */ f("span", {
124
124
  "aria-hidden": "true",
125
- className: z.itemIcon,
125
+ className: H.itemIcon,
126
126
  children: r
127
127
  }),
128
128
  m && /* @__PURE__ */ f("span", {
129
- className: M(z.itemText, z[`itemText--${u}`]),
129
+ className: F(H.itemText, H[`itemText--${u}`]),
130
130
  children: m
131
131
  }),
132
132
  l && /* @__PURE__ */ f("span", {
133
- className: z.itemShortcut,
133
+ className: H.itemShortcut,
134
134
  children: l
135
135
  })
136
136
  ]
137
137
  });
138
- }, B = { group: "_group_ts4nb_1" }, V = () => /* @__PURE__ */ f("li", {
138
+ }, U = { separator: "_separator_1v11r_1" }, re = () => /* @__PURE__ */ f("li", {
139
139
  role: "separator",
140
- className: B.separator,
140
+ className: U.separator,
141
141
  "aria-hidden": "true"
142
- }), H = {
143
- button: "_button_ii6sx_1",
144
- disabled: "_disabled_ii6sx_16",
145
- iconLeft: "_iconLeft_ii6sx_27",
146
- arrow: "_arrow_ii6sx_39",
147
- iconOnly: "_iconOnly_ii6sx_42",
148
- open: "_open_ii6sx_75"
149
- }, re = t(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, label: o, className: s, ...c }, l) => {
150
- let u = !!n, d = !!e, m = u && !d, h = i && d, g = r ?? /* @__PURE__ */ f(k, {}), _ = m ? o ?? "Open menu" : void 0;
142
+ }), W = {
143
+ button: "_button_18ucr_1",
144
+ disabled: "_disabled_18ucr_20",
145
+ iconLeft: "_iconLeft_18ucr_32",
146
+ arrow: "_arrow_18ucr_44",
147
+ iconOnly: "_iconOnly_18ucr_47",
148
+ sm: "_sm_18ucr_60",
149
+ md: "_md_18ucr_72",
150
+ lg: "_lg_18ucr_84",
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);
151
154
  return /* @__PURE__ */ p("button", {
152
- ...c,
153
- ref: l,
155
+ ...u,
156
+ ref: d,
154
157
  type: "button",
155
- className: M(H.button, {
156
- [H.disabled]: c.disabled,
157
- [H.iconOnly]: m
158
- }, s),
159
- "aria-label": _,
158
+ className: F(W.button, W[o], {
159
+ [W.disabled]: u.disabled,
160
+ [W.iconOnly]: g
161
+ }, l),
162
+ "aria-label": y,
160
163
  "aria-expanded": t,
161
164
  "aria-haspopup": "menu",
162
165
  style: { "--dropdown-rotate-angle": `${a}deg` },
163
166
  children: [
164
- u && /* @__PURE__ */ f("span", {
167
+ m && /* @__PURE__ */ f("span", {
165
168
  "aria-hidden": "true",
166
- className: H.iconLeft,
169
+ className: W.iconLeft,
167
170
  children: n
168
171
  }),
169
172
  e,
170
- h && /* @__PURE__ */ f("span", {
173
+ _ && /* @__PURE__ */ f("span", {
171
174
  "aria-hidden": "true",
172
- className: M(H.arrow, { [H.open]: t }),
173
- children: g
175
+ className: F(W.arrow, { [W.open]: t }),
176
+ children: v
174
177
  })
175
178
  ]
176
179
  });
177
180
  });
178
- re.displayName = "DropdownTrigger";
181
+ ie.displayName = "DropdownTrigger";
179
182
  //#endregion
180
183
  //#region src/components/Dropdown/types.ts
181
- var U = (e) => e.type !== "group" && e.type !== "separator", W = (e) => e.type === "group", ie = (e) => e.type === "separator", ae = { wrapper: "_wrapper_14ue8_1" }, oe = ({ label: e, icon: t, trigger: n, items: r = [], onSelect: i, className: o, disabled: l, rotateAngle: u = 90, placement: d, matchTriggerWidth: m, textWrap: h, showArrow: g = !0, arrowIcon: _ }) => {
182
- let [v, y] = c(!1), [b, x] = c(-1), S = s(null), C = s(null), w = a(), T = `${w}-trigger`, { floatingStyles: D, setRef: O, setFloatingRef: k } = ee({
183
- placement: d,
184
- matchTriggerWidth: m,
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({
186
+ placement: S,
187
+ matchTriggerWidth: C,
185
188
  mobileSheetBreakpoint: 640
186
- }), A = r.filter(U), j = v && b >= 0 ? `${w}-item-${b}` : void 0, N = () => A.findIndex((e) => !e.disabled), P = () => {
187
- l || y((e) => {
188
- let t = !e;
189
- return x(t ? N() : -1), t;
190
- });
191
- }, I = () => {
192
- y(!1), x(-1);
193
- }, R = () => {
194
- I(), S.current?.focus();
195
- }, { onKeyDown: z } = E({
196
- activeIndex: b,
197
- setActiveIndex: x,
198
- items: A,
199
- isOpen: v,
200
- onOpen: P,
201
- onSelect: () => {
202
- let e = A[b];
203
- !e || e.disabled || (i?.(e.value), R());
204
- },
205
- onClose: R
206
- });
207
- L([S, C], () => I(), v);
208
- let B = (e) => {
209
- S.current = e, O(e);
210
- }, H = (e) => {
211
- C.current = e, k(e), e?.focus();
212
- };
189
+ }), I = o(() => c.flatMap((e, t) => ae(e) ? [{
190
+ item: e,
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,
194
+ open: u,
195
+ defaultOpen: d,
196
+ disabled: b,
197
+ onOpenChange: m,
198
+ onSelect: n((e) => {
199
+ l?.(e), O.current?.focus();
200
+ }, [l]),
201
+ getItemValue: (e) => e.value,
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) => {
210
+ k.current = e, P(e), e?.focus();
211
+ }, [P]);
213
212
  return /* @__PURE__ */ p("div", {
214
- className: M(ae.wrapper, o),
215
- children: [/* @__PURE__ */ f(re, {
216
- ref: B,
217
- id: T,
218
- isOpen: v,
219
- disabled: l,
220
- icon: t,
213
+ className: F(ce.wrapper, g),
214
+ children: [/* @__PURE__ */ f(ie, {
215
+ ref: pe,
216
+ id: j,
217
+ isOpen: U,
218
+ disabled: b,
219
+ size: h,
220
+ icon: r,
221
221
  label: e,
222
- showArrow: g,
223
- arrowIcon: _,
224
- rotateAngle: u,
225
- onClick: P,
226
- onKeyDown: z,
227
- "aria-expanded": v,
222
+ ariaLabel: t,
223
+ showArrow: T,
224
+ arrowIcon: D,
225
+ rotateAngle: x,
226
+ className: _,
227
+ onClick: le,
228
+ onKeyDown: fe,
229
+ "aria-expanded": U,
228
230
  "aria-haspopup": "menu",
229
- ...v && { "aria-controls": w },
230
- children: n
231
- }), v && /* @__PURE__ */ f(F, {
232
- ref: H,
233
- floatingStyles: D,
234
- menuId: w,
235
- labelledById: n ? T : void 0,
236
- label: n ? void 0 : e,
237
- activeDescendantId: j,
238
- onKeyDown: z,
239
- children: r.map((e, t) => {
240
- if (W(e)) return /* @__PURE__ */ f(te, { label: e.label }, `group-${e.label}`);
241
- if (ie(e)) return /* @__PURE__ */ f(V, {}, `separator-${t}`);
242
- if (U(e)) {
243
- let t = A.findIndex((t) => t === e);
231
+ ...U && { "aria-controls": A },
232
+ children: i
233
+ }), U && /* @__PURE__ */ f(R, {
234
+ ref: me,
235
+ floatingStyles: M,
236
+ menuId: A,
237
+ labelledById: i ? j : void 0,
238
+ label: t ?? (!i && typeof e == "string" ? e : void 0),
239
+ activeDescendantId: de,
240
+ onKeyDown: fe,
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;
244
247
  return /* @__PURE__ */ f(ne, {
245
- id: `${w}-item-${t}`,
248
+ id: `${A}-item-${n}`,
246
249
  ...e,
247
- active: b === t,
248
- textWrap: e.textWrap || h,
250
+ active: V === n,
251
+ textWrap: e.textWrap || w,
252
+ className: y,
249
253
  onClick: () => {
250
- e.disabled || (i?.(e.value), R());
254
+ ue(e), O.current?.focus();
251
255
  },
252
256
  onMouseEnter: () => {
253
- t < 0 || e.disabled || x(t);
257
+ n < 0 || e.disabled || H(n);
254
258
  },
255
259
  children: e.label
256
- }, e.value);
260
+ }, `${e.value}-${t}`);
257
261
  }
258
262
  })
259
263
  })]
260
264
  });
261
- }, se = e(void 0), ce = () => {
262
- let e = r(se);
265
+ }, ue = e(void 0), G = () => {
266
+ let e = r(ue);
263
267
  if (e === void 0) throw Error("Modal compound components must be used inside Modal");
264
268
  return e;
265
269
  };
266
- se.displayName = "ModalContext";
267
- var le = { modalBody: "_modalBody_iv33a_1" }, ue = ({ children: e }) => {
268
- let { descriptionId: t } = ce();
270
+ ue.displayName = "ModalContext";
271
+ var de = { modalBody: "_modalBody_iv33a_1" }, fe = ({ children: e }) => {
272
+ let { descriptionId: t } = G();
269
273
  return /* @__PURE__ */ f("div", {
270
274
  id: t,
271
- className: le.modalBody,
275
+ className: de.modalBody,
272
276
  children: e
273
277
  });
274
278
  };
275
- ue.displayName = "ModalBody";
276
- var G = { content: "_content_avpai_1" }, de = ({ children: e }) => /* @__PURE__ */ f("div", {
277
- className: G.content,
279
+ fe.displayName = "ModalBody";
280
+ var pe = { content: "_content_k44g7_1" }, me = ({ children: e }) => /* @__PURE__ */ f("div", {
281
+ className: pe.content,
278
282
  children: e
279
283
  });
280
- de.displayName = "ModalContent";
281
- var fe = { modalFooter: "_modalFooter_ezys6_1" }, pe = ({ children: e }) => /* @__PURE__ */ f("div", {
282
- className: fe.modalFooter,
284
+ me.displayName = "ModalContent";
285
+ var he = { modalFooter: "_modalFooter_ezys6_1" }, ge = ({ children: e }) => /* @__PURE__ */ f("div", {
286
+ className: he.modalFooter,
283
287
  children: e
284
288
  });
285
- pe.displayName = "ModalFooter";
286
- var me = {
287
- modalHeader: "_modalHeader_155d7_1",
288
- modalHeaderTitle: "_modalHeaderTitle_155d7_8",
289
- modalHeaderCloseButton: "_modalHeaderCloseButton_155d7_15"
290
- }, he = ({ children: e }) => {
291
- let { onClose: t, titleId: n } = ce();
289
+ ge.displayName = "ModalFooter";
290
+ var _e = {
291
+ modalHeader: "_modalHeader_p8xf1_1",
292
+ modalHeaderTitle: "_modalHeaderTitle_p8xf1_7",
293
+ modalHeaderCloseButton: "_modalHeaderCloseButton_p8xf1_14"
294
+ }, ve = ({ children: e }) => {
295
+ let { onClose: t, titleId: n } = G();
292
296
  return /* @__PURE__ */ p("div", {
293
- className: me.modalHeader,
297
+ className: _e.modalHeader,
294
298
  children: [/* @__PURE__ */ f("h2", {
295
299
  id: n,
296
- className: me.modalHeaderTitle,
300
+ className: _e.modalHeaderTitle,
297
301
  children: e
298
302
  }), t && /* @__PURE__ */ f("button", {
299
303
  type: "button",
300
- className: me.modalHeaderCloseButton,
304
+ className: _e.modalHeaderCloseButton,
301
305
  onClick: t,
302
306
  "aria-label": "Close modal",
303
- children: /* @__PURE__ */ f(A, { size: 16 })
307
+ children: /* @__PURE__ */ f(N, { size: 16 })
304
308
  })]
305
309
  });
306
310
  };
307
- he.displayName = "ModalHeader";
311
+ ve.displayName = "ModalHeader";
308
312
  //#endregion
309
313
  //#region src/hooks/useModalKeyboard.ts
310
- var ge = ({ isOpen: e, onClose: t }) => {
314
+ var ye = ({ isOpen: e, onClose: t }) => {
311
315
  let r = n((n) => {
312
316
  e && n.key === "Escape" && (n.preventDefault(), t?.());
313
317
  }, [e, t]);
314
318
  i(() => (document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r)), [r]);
315
- }, _e = {
316
- overlay: "_overlay_1xotg_1",
317
- "overlay--open": "_overlay--open_1xotg_13",
318
- "overlay--animated": "_overlay--animated_1xotg_17",
319
- modal: "_modal_1xotg_21"
320
- }, ve = 0, ye = "", be = ({ children: e, onClose: t, isOpen: r, className: a, closeOnBackdrop: o, closeOnClick: c, closeOnEsc: l = !0, zIndex: u = 1e3, animated: d = !0 }) => {
321
- let p = o ?? c ?? !0, m = s(null), { titleId: h, descriptionId: g } = ce(), _ = n((e) => {
319
+ }, be = {
320
+ overlay: "_overlay_dcudn_1",
321
+ "overlay--open": "_overlay--open_dcudn_14",
322
+ modal: "_modal_dcudn_20",
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) => {
322
326
  p && e.target === e.currentTarget && t?.();
323
327
  }, [p, t]);
324
- return ge({
328
+ return ye({
325
329
  isOpen: r,
326
330
  onClose: l ? t : void 0
327
331
  }), i(() => {
328
- if (r) return ve === 0 && (ye = document.body.style.overflow), ve += 1, document.body.style.overflow = "hidden", () => {
329
- ve = Math.max(0, ve - 1), ve === 0 && (document.body.style.overflow = ye);
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);
330
334
  };
331
- }, [r]), !r && !d ? null : /* @__PURE__ */ f(N, { children: /* @__PURE__ */ f("div", {
332
- className: M(_e.overlay, r && _e["overlay--open"], d && _e["overlay--animated"], a),
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),
333
337
  onClick: _,
334
338
  tabIndex: -1,
335
339
  role: "presentation",
336
340
  "aria-hidden": !r,
337
341
  style: { zIndex: u },
338
- children: /* @__PURE__ */ f(j, {
342
+ children: /* @__PURE__ */ f(P, {
339
343
  active: r,
340
344
  focusTrapOptions: {
341
345
  fallbackFocus: () => m.current,
@@ -345,7 +349,7 @@ var ge = ({ isOpen: e, onClose: t }) => {
345
349
  children: /* @__PURE__ */ f("div", {
346
350
  ref: m,
347
351
  tabIndex: -1,
348
- className: _e.modal,
352
+ className: be.modal,
349
353
  role: "dialog",
350
354
  "aria-modal": "true",
351
355
  "aria-labelledby": h,
@@ -355,50 +359,56 @@ var ge = ({ isOpen: e, onClose: t }) => {
355
359
  })
356
360
  }) });
357
361
  };
358
- be.displayName = "ModalOverlay";
362
+ Ce.displayName = "ModalOverlay";
359
363
  //#endregion
360
364
  //#region src/components/Modal/Modal.tsx
361
- var xe = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: o = !0 }) => {
362
- let s = a(), c = a();
363
- return e ? /* @__PURE__ */ f(se.Provider, {
365
+ var we = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
366
+ let o = D({
367
+ isOpen: e,
368
+ onClose: n,
369
+ closeOnBackdrop: r,
370
+ closeOnClick: i,
371
+ closeOnEsc: a
372
+ });
373
+ return o.shouldRender ? /* @__PURE__ */ f(ue.Provider, {
364
374
  value: {
365
- onClose: n,
366
- titleId: s,
367
- descriptionId: c
375
+ onClose: o.onClose,
376
+ titleId: o.titleId,
377
+ descriptionId: o.descriptionId
368
378
  },
369
- children: /* @__PURE__ */ f(be, {
370
- isOpen: e,
371
- onClose: n,
372
- closeOnBackdrop: r ?? i,
373
- closeOnEsc: o,
374
- children: /* @__PURE__ */ f(de, { children: t })
379
+ children: /* @__PURE__ */ f(Ce, {
380
+ isOpen: o.isOpen,
381
+ onClose: o.onClose,
382
+ closeOnBackdrop: o.closeOnBackdrop,
383
+ closeOnEsc: o.closeOnEsc,
384
+ children: /* @__PURE__ */ f(me, { children: t })
375
385
  })
376
386
  }) : null;
377
387
  };
378
- xe.displayName = "Modal";
388
+ we.displayName = "Modal";
379
389
  //#endregion
380
390
  //#region src/components/Modal/index.ts
381
- var Se = Object.assign(xe, {
382
- Header: he,
383
- Body: ue,
384
- Content: de,
385
- Footer: pe
386
- }), Ce = e(null), we = Ce.Provider;
387
- function Te() {
388
- return r(Ce);
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);
389
399
  }
390
400
  var K = {
391
- root: "_root_7wga8_1",
392
- label: "_label_7wga8_9",
393
- required: "_required_7wga8_20",
394
- description: "_description_7wga8_24",
395
- items: "_items_7wga8_31",
396
- vertical: "_vertical_7wga8_36",
397
- horizontal: "_horizontal_7wga8_42",
398
- error: "_error_7wga8_48",
399
- disabled: "_disabled_7wga8_55",
400
- invalid: "_invalid_7wga8_60"
401
- }, Ee = 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) => {
401
+ root: "_root_1n02e_1",
402
+ label: "_label_1n02e_9",
403
+ required: "_required_1n02e_21",
404
+ description: "_description_1n02e_26",
405
+ items: "_items_1n02e_34",
406
+ vertical: "_vertical_1n02e_39",
407
+ horizontal: "_horizontal_1n02e_45",
408
+ error: "_error_1n02e_51",
409
+ disabled: "_disabled_1n02e_59",
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) => {
402
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({
403
413
  value: e,
404
414
  defaultValue: t,
@@ -414,7 +424,7 @@ var K = {
414
424
  "aria-disabled": r || void 0,
415
425
  "aria-required": i || void 0,
416
426
  "aria-invalid": k || void 0,
417
- className: M(K.root, k && K.invalid, r && K.disabled, h),
427
+ className: F(K.root, k && K.invalid, r && K.disabled, h),
418
428
  children: [
419
429
  c && /* @__PURE__ */ p("div", {
420
430
  id: x,
@@ -430,7 +440,7 @@ var K = {
430
440
  className: K.description,
431
441
  children: l
432
442
  }),
433
- /* @__PURE__ */ f(we, {
443
+ /* @__PURE__ */ f(De, {
434
444
  value: {
435
445
  name: E,
436
446
  value: D,
@@ -442,7 +452,7 @@ var K = {
442
452
  onValueChange: O
443
453
  },
444
454
  children: /* @__PURE__ */ f("div", {
445
- className: M(K.items, K[d]),
455
+ className: F(K.items, K[d]),
446
456
  children: m
447
457
  })
448
458
  }),
@@ -454,34 +464,27 @@ var K = {
454
464
  ]
455
465
  });
456
466
  });
457
- Ee.displayName = "RadioGroup";
467
+ ke.displayName = "RadioGroup";
458
468
  var q = {
459
- wrapper: "_wrapper_w0lsp_1",
460
- label: "_label_w0lsp_9",
461
- required: "_required_w0lsp_20",
462
- description: "_description_w0lsp_25",
463
- control: "_control_w0lsp_32",
464
- errorText: "_errorText_w0lsp_40",
465
- disabled: "_disabled_w0lsp_47",
466
- storyInput: "_storyInput_w0lsp_60",
467
- storyBadge: "_storyBadge_w0lsp_65",
468
- storyCustomRoot: "_storyCustomRoot_w0lsp_76",
469
- storyCustomLabel: "_storyCustomLabel_w0lsp_83",
470
- storyCustomControl: "_storyCustomControl_w0lsp_87",
471
- storyCustomDescription: "_storyCustomDescription_w0lsp_91",
472
- storyCustomError: "_storyCustomError_w0lsp_95"
473
- }, De = ({ 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 }) => {
469
+ wrapper: "_wrapper_byl2d_1",
470
+ label: "_label_byl2d_9",
471
+ required: "_required_byl2d_20",
472
+ description: "_description_byl2d_25",
473
+ control: "_control_byl2d_32",
474
+ errorText: "_errorText_byl2d_40",
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 }) => {
474
477
  let h = n && e ? `${e}-description` : void 0, g = r && e ? `${e}-error` : void 0;
475
478
  return /* @__PURE__ */ p("div", {
476
479
  ...m,
477
480
  "aria-disabled": a || void 0,
478
- className: M(q.wrapper, a && q.disabled, s),
481
+ className: F(q.wrapper, a && q.disabled, s),
479
482
  "data-disabled": a || void 0,
480
483
  "data-invalid": !!r || void 0,
481
484
  children: [
482
485
  t && /* @__PURE__ */ p("label", {
483
486
  htmlFor: e,
484
- className: M(q.label, l),
487
+ className: F(q.label, l),
485
488
  children: [t, i && /* @__PURE__ */ f("span", {
486
489
  className: q.required,
487
490
  "aria-hidden": "true",
@@ -490,39 +493,39 @@ var q = {
490
493
  }),
491
494
  n && /* @__PURE__ */ f("div", {
492
495
  id: h,
493
- className: M(q.description, u),
496
+ className: F(q.description, u),
494
497
  children: n
495
498
  }),
496
499
  /* @__PURE__ */ f("div", {
497
- className: M(q.control, c),
500
+ className: F(q.control, c),
498
501
  children: o
499
502
  }),
500
503
  r && /* @__PURE__ */ f("div", {
501
504
  id: g,
502
- className: M(q.errorText, d),
505
+ className: F(q.errorText, d),
503
506
  role: "alert",
504
507
  children: r
505
508
  })
506
509
  ]
507
510
  });
508
- }, Oe = {
509
- option: "_option_1mcld_1",
510
- selected: "_selected_1mcld_17",
511
- disabled: "_disabled_1mcld_17",
512
- active: "_active_1mcld_28",
513
- label: "_label_1mcld_40",
514
- check: "_check_1mcld_48"
515
- }, ke = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
511
+ }, je = {
512
+ option: "_option_l6qjj_1",
513
+ selected: "_selected_l6qjj_18",
514
+ disabled: "_disabled_l6qjj_18",
515
+ active: "_active_l6qjj_34",
516
+ label: "_label_l6qjj_46",
517
+ check: "_check_l6qjj_54"
518
+ }, Me = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
516
519
  let o = !!e.disabled;
517
520
  return /* @__PURE__ */ p("li", {
518
521
  id: r,
519
522
  role: "option",
520
523
  "aria-selected": t,
521
524
  "aria-disabled": o || void 0,
522
- className: M(Oe.option, {
523
- [Oe.selected]: t,
524
- [Oe.active]: n,
525
- [Oe.disabled]: o
525
+ className: F(je.option, {
526
+ [je.selected]: t,
527
+ [je.active]: n,
528
+ [je.disabled]: o
526
529
  }),
527
530
  onClick: () => {
528
531
  o || i(e.value);
@@ -531,28 +534,28 @@ var q = {
531
534
  o || a();
532
535
  },
533
536
  children: [/* @__PURE__ */ f("span", {
534
- className: Oe.label,
537
+ className: je.label,
535
538
  children: e.label
536
539
  }), /* @__PURE__ */ f("span", {
537
- className: Oe.check,
540
+ className: je.check,
538
541
  "aria-hidden": "true",
539
- children: t && /* @__PURE__ */ f(O, {})
542
+ children: t && /* @__PURE__ */ f(j, {})
540
543
  })]
541
544
  });
542
545
  };
543
- ke.displayName = "SelectOption";
544
- var Ae = {
545
- dropdown: "_dropdown_jl377_1",
546
- dropdownIn: "_dropdownIn_jl377_1",
547
- empty: "_empty_jl377_17"
548
- }, je = ({ 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(N, { children: /* @__PURE__ */ f("ul", {
546
+ Me.displayName = "SelectOption";
547
+ var Ne = {
548
+ dropdown: "_dropdown_qznlq_1",
549
+ dropdownIn: "_dropdownIn_qznlq_1",
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", {
549
552
  ref: r,
550
553
  id: t,
551
554
  role: "listbox",
552
555
  "aria-labelledby": n,
553
- className: [Ae.dropdown, l].filter(Boolean).join(" "),
556
+ className: [Ne.dropdown, l].filter(Boolean).join(" "),
554
557
  style: i,
555
- children: a.length ? a.map((e, n) => /* @__PURE__ */ f(ke, {
558
+ children: a.length ? a.map((e, n) => /* @__PURE__ */ f(Me, {
556
559
  option: e,
557
560
  isSelected: e.value === s,
558
561
  isActive: n === c,
@@ -560,24 +563,26 @@ var Ae = {
560
563
  onSelect: u,
561
564
  onMouseEnter: () => d(n)
562
565
  }, e.value)) : /* @__PURE__ */ f("li", {
563
- className: Ae.empty,
564
- role: "presentation",
566
+ role: "option",
567
+ "aria-disabled": "true",
568
+ "aria-selected": "false",
569
+ className: Ne.empty,
565
570
  children: o
566
571
  })
567
572
  }) }) : null;
568
- je.displayName = "SelectDropdown";
573
+ Pe.displayName = "SelectDropdown";
569
574
  var J = {
570
- control: "_control_ole58_1",
571
- disabled: "_disabled_ole58_18",
572
- arrow: "_arrow_ole58_23",
573
- sm: "_sm_ole58_33",
574
- md: "_md_ole58_40",
575
- lg: "_lg_ole58_47",
576
- value: "_value_ole58_54",
577
- placeholder: "_placeholder_ole58_62",
578
- error: "_error_ole58_66",
579
- open: "_open_ole58_107"
580
- }, Me = ({ 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", {
575
+ control: "_control_1xma1_1",
576
+ disabled: "_disabled_1xma1_18",
577
+ arrow: "_arrow_1xma1_23",
578
+ sm: "_sm_1xma1_34",
579
+ md: "_md_1xma1_41",
580
+ lg: "_lg_1xma1_48",
581
+ value: "_value_1xma1_55",
582
+ placeholder: "_placeholder_1xma1_63",
583
+ error: "_error_1xma1_67",
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", {
581
586
  id: e,
582
587
  ref: h,
583
588
  type: "button",
@@ -592,7 +597,7 @@ var J = {
592
597
  "aria-controls": n ? a : void 0,
593
598
  "aria-describedby": t,
594
599
  "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
595
- className: M(J.control, J[d], {
600
+ className: F(J.control, J[d], {
596
601
  [J.error]: !!c,
597
602
  [J.disabled]: r
598
603
  }, m),
@@ -601,152 +606,121 @@ var J = {
601
606
  onBlur: v,
602
607
  onFocus: y,
603
608
  children: [/* @__PURE__ */ f("span", {
604
- className: M(J.value, { [J.placeholder]: u }),
609
+ className: F(J.value, { [J.placeholder]: u }),
605
610
  children: l
606
611
  }), /* @__PURE__ */ f("span", {
607
- className: M(J.arrow, { [J.open]: n }),
612
+ className: F(J.arrow, { [J.open]: n }),
608
613
  "aria-hidden": "true",
609
- children: /* @__PURE__ */ f(k, {})
614
+ children: /* @__PURE__ */ f(M, {})
610
615
  })]
611
616
  });
612
- Me.displayName = "SelectTrigger";
617
+ Fe.displayName = "SelectTrigger";
613
618
  //#endregion
614
619
  //#region src/components/Select/Select.tsx
615
- var Ne = ({ label: e, description: t, id: r, name: i, "aria-label": l, value: u, defaultValue: d, onChange: m, options: h, placeholder: g = "Select...", noOptionsText: _ = "No options available", size: v = "md", required: y = !1, disabled: b = !1, error: x, placement: S = "bottom-start", matchTriggerWidth: C = !0, open: w, defaultOpen: D = !1, onOpenChange: O, onBlur: k, onFocus: A, className: j, triggerClassName: M, dropdownClassName: N }) => {
616
- let P = a(), F = r ?? P, I = `${F}-listbox`, R = !!x, te = R ? `${F}-error` : void 0, z = s(null), ne = s(null), [B, V] = T({
617
- value: u,
618
- defaultValue: d ?? "",
619
- onChange: m
620
- }), [H, re] = T({
621
- value: w,
622
- defaultValue: D,
623
- onChange: O
624
- }), [U, W] = c(-1), ie = o(() => h.find((e) => e.value === B), [h, B]), ae = !!ie, { floatingStyles: oe, setRef: se, setFloatingRef: ce } = ee({
625
- open: H,
626
- onOpenChange: re,
627
- placement: S,
628
- matchTriggerWidth: C,
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,
624
+ onChange: u,
625
+ options: d,
626
+ disabled: v,
627
+ open: S,
628
+ defaultOpen: C,
629
+ onOpenChange: w
630
+ }), ae = !!z, { floatingStyles: oe, setRef: se, setFloatingRef: ce } = B({
631
+ open: V,
632
+ onOpenChange: te,
633
+ placement: b,
634
+ matchTriggerWidth: x,
629
635
  mobileSheetBreakpoint: 640
630
- }), le = n(() => {
631
- let e = h.findIndex((e) => e.value === B && !e.disabled);
632
- return e >= 0 ? e : h.findIndex((e) => !e.disabled);
633
- }, [h, B]), ue = n(() => {
634
- b || (W(le()), re(!0));
635
- }, [b, le]), G = n(() => {
636
- re(!1);
637
- }, []), de = n(() => {
638
- if (!b) {
639
- if (H) {
640
- G();
641
- return;
642
- }
643
- ue();
644
- }
645
- }, [
646
- G,
647
- b,
648
- H,
649
- ue
650
- ]), fe = n((e) => {
651
- V(e), G(), z.current?.focus();
652
- }, [G, V]), { onKeyDown: pe } = E({
653
- activeIndex: U,
654
- setActiveIndex: W,
655
- items: h,
656
- isOpen: H,
657
- onOpen: ue,
658
- onClose: G,
659
- onSelect: () => {
660
- let e = h[U];
661
- !e || e.disabled || fe(e.value);
662
- },
663
- getItemText: (e) => e.label
664
- });
665
- L([z, ne], G, H);
666
- let me = n((e) => {
667
- z.current = e, se(e);
668
- }, [se]), he = n((e) => {
669
- ne.current = e, ce(e);
636
+ }), le = n((e) => {
637
+ W(e), I.current?.focus();
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);
670
644
  }, [ce]);
671
- return /* @__PURE__ */ p(De, {
672
- id: F,
645
+ return /* @__PURE__ */ p(Ae, {
646
+ id: M,
673
647
  label: e,
674
648
  description: t,
675
- error: x,
676
- required: y,
677
- disabled: b,
678
- className: j,
649
+ error: y,
650
+ required: _,
651
+ disabled: v,
652
+ className: D,
679
653
  children: [
680
- /* @__PURE__ */ f(Me, {
681
- id: F,
682
- errorId: te,
683
- isOpen: H,
684
- disabled: b,
685
- required: y,
686
- listboxId: I,
687
- activeIndex: U,
688
- ariaLabel: l ?? (e ? void 0 : ie?.label || g),
689
- error: R,
690
- displayText: ie?.label ?? g,
654
+ /* @__PURE__ */ f(Fe, {
655
+ id: M,
656
+ errorId: F,
657
+ isOpen: V,
658
+ disabled: v,
659
+ required: _,
660
+ listboxId: N,
661
+ activeIndex: H,
662
+ ariaLabel: o ?? (e ? void 0 : z?.label || m),
663
+ error: P,
664
+ displayText: z?.label ?? m,
691
665
  isPlaceholder: !ae,
692
- size: v,
693
- className: M,
694
- buttonRef: me,
695
- onClick: de,
696
- onKeyDown: pe,
697
- onBlur: k,
698
- onFocus: A
666
+ size: g,
667
+ className: k,
668
+ buttonRef: ue,
669
+ onClick: re,
670
+ onKeyDown: ie,
671
+ onBlur: T,
672
+ onFocus: E
699
673
  }),
700
674
  i && /* @__PURE__ */ f("input", {
701
675
  type: "hidden",
702
676
  name: i,
703
- value: B,
704
- disabled: b
677
+ value: R,
678
+ disabled: v
705
679
  }),
706
- /* @__PURE__ */ f(je, {
707
- isOpen: H,
708
- listboxId: I,
709
- labelledById: F,
680
+ /* @__PURE__ */ f(Pe, {
681
+ isOpen: V,
682
+ listboxId: N,
683
+ labelledById: M,
710
684
  style: oe,
711
- options: h,
712
- noOptionsText: _,
713
- selectedValue: B,
714
- activeIndex: U,
715
- className: N,
716
- setDropdownRef: he,
717
- onSelect: fe,
718
- onMouseEnter: W
685
+ options: d,
686
+ noOptionsText: h,
687
+ selectedValue: R,
688
+ activeIndex: H,
689
+ className: A,
690
+ setDropdownRef: G,
691
+ onSelect: le,
692
+ onMouseEnter: ne
719
693
  })
720
694
  ]
721
695
  });
722
696
  };
723
- Ne.displayName = "Select";
697
+ Ie.displayName = "Select";
724
698
  //#endregion
725
699
  //#region src/components/Tabs/TabsContext.tsx
726
- var Pe = e(null), Fe = () => {
727
- let e = r(Pe);
700
+ var Le = e(null), Re = () => {
701
+ let e = r(Le);
728
702
  if (!e) throw Error("Tabs components must be used inside Tabs");
729
703
  return e;
730
- }, Ie = {
731
- list: "_list_astty_1",
732
- vertical: "_vertical_astty_8"
733
- }, Le = ({ children: e, className: t, ...n }) => {
734
- let { orientation: r, appearance: i } = Fe();
704
+ }, ze = {
705
+ list: "_list_13hkl_1",
706
+ vertical: "_vertical_13hkl_8"
707
+ }, Be = ({ children: e, className: t, ...n }) => {
708
+ let { orientation: r, appearance: i } = Re();
735
709
  return /* @__PURE__ */ f("div", {
736
710
  ...n,
737
711
  role: "tablist",
738
712
  "aria-orientation": r,
739
- className: M(Ie.list, r === "vertical" && Ie.vertical, i === "underline" && Ie.underline, i === "pills" && Ie.pills, t),
713
+ className: F(ze.list, r === "vertical" && ze.vertical, i === "underline" && ze.underline, i === "pills" && ze.pills, t),
740
714
  children: e
741
715
  });
742
716
  };
743
- Le.displayName = "TabsList";
744
- var Re = {
745
- panel: "_panel_1e9ds_1",
746
- visible: "_visible_1e9ds_10",
747
- vertical: "_vertical_1e9ds_15"
748
- }, ze = ({ index: e, children: t, className: n }) => {
749
- let { activeIndex: r, orientation: a } = Fe(), [o, s] = c(!1), l = r === e;
717
+ Be.displayName = "TabsList";
718
+ var Ve = {
719
+ panel: "_panel_1v1a9_1",
720
+ visible: "_visible_1v1a9_10",
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;
750
724
  return i(() => {
751
725
  if (!l) {
752
726
  s(!1);
@@ -760,22 +734,22 @@ var Re = {
760
734
  "aria-labelledby": `tab-${e}`,
761
735
  hidden: !l,
762
736
  tabIndex: 0,
763
- className: M(Re.panel, o && Re.visible, a === "vertical" && Re.vertical, n),
737
+ className: F(Ve.panel, o && Ve.visible, a === "vertical" && Ve.vertical, n),
764
738
  children: t
765
739
  });
766
740
  };
767
- ze.displayName = "TabsPanel";
741
+ He.displayName = "TabsPanel";
768
742
  var Y = {
769
- tab: "_tab_160gh_1",
770
- iconOnly: "_iconOnly_160gh_19",
771
- tabIcon: "_tabIcon_160gh_27",
772
- label: "_label_160gh_41",
773
- default: "_default_160gh_46",
774
- underline: "_underline_160gh_53",
775
- pills: "_pills_160gh_81",
776
- vertical: "_vertical_160gh_93"
777
- }, Be = t(({ index: e, children: t, className: r, disabled: i = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
778
- let { activeIndex: u, setActiveIndex: d, orientation: m, appearance: h = "default", registerTab: g, onTabKeyDown: _ } = Fe(), v = u === e, y = !!a, b = y && t == null;
743
+ tab: "_tab_qe8xc_1",
744
+ iconOnly: "_iconOnly_qe8xc_27",
745
+ tabIcon: "_tabIcon_qe8xc_31",
746
+ label: "_label_qe8xc_45",
747
+ default: "_default_qe8xc_51",
748
+ underline: "_underline_qe8xc_60",
749
+ pills: "_pills_qe8xc_92",
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;
779
753
  return /* @__PURE__ */ p("button", {
780
754
  type: "button",
781
755
  ref: n((t) => {
@@ -791,7 +765,7 @@ var Y = {
791
765
  id: `tab-${e}`,
792
766
  disabled: i,
793
767
  tabIndex: v ? 0 : -1,
794
- className: M(Y.tab, Y[h], m === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, r),
768
+ className: F(Y.tab, Y[h], m === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, r),
795
769
  onClick: (t) => {
796
770
  i || (d(e), o?.(t));
797
771
  },
@@ -809,47 +783,52 @@ var Y = {
809
783
  })]
810
784
  });
811
785
  });
812
- Be.displayName = "Tab";
813
- var Ve = {
814
- tabs: "_tabs_15a7w_1",
815
- vertical: "_vertical_15a7w_4"
816
- }, He = ({ children: e, activeIndex: t, defaultActiveIndex: r = 0, onChange: i, orientation: a = "horizontal", appearance: o = "default", className: l }) => {
817
- let [u, d] = c(r), p = t !== void 0, m = p ? t : u, h = n((e) => {
818
- p || d(e), i?.(e);
819
- }, [p, i]), g = s([]), _ = n((e, t) => {
820
- g.current[e] = t;
821
- }, []), { onKeyDown: v } = D({
822
- activeIndex: m,
823
- setActiveIndex: h,
824
- tabRefs: g,
825
- orientation: a
826
- }), y = {
827
- activeIndex: m,
828
- setActiveIndex: h,
786
+ Ue.displayName = "Tab";
787
+ var We = {
788
+ tabs: "_tabs_uqy7q_1",
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({
792
+ activeIndex: t,
793
+ defaultActiveIndex: r,
794
+ onChange: i
795
+ }), d = s([]), p = n((e, t) => {
796
+ d.current[e] = t;
797
+ }, []), { onKeyDown: m } = A({
798
+ activeIndex: l,
799
+ setActiveIndex: u,
800
+ tabRefs: d,
801
+ orientation: a,
802
+ onNavigate: (e) => {
803
+ d.current[e]?.focus();
804
+ }
805
+ }), h = {
806
+ activeIndex: l,
807
+ setActiveIndex: u,
829
808
  orientation: a,
830
809
  appearance: o,
831
- registerTab: _,
832
- onTabKeyDown: v
810
+ registerTab: p,
811
+ onTabKeyDown: m
833
812
  };
834
- return /* @__PURE__ */ f(Pe.Provider, {
835
- value: y,
813
+ return /* @__PURE__ */ f(Le.Provider, {
814
+ value: h,
836
815
  children: /* @__PURE__ */ f("div", {
837
- className: M(Ve.tabs, a === "vertical" && Ve.vertical, l),
816
+ className: F(We.tabs, a === "vertical" && We.vertical, c),
838
817
  children: e
839
818
  })
840
819
  });
841
820
  };
842
- He.displayName = "Tabs";
821
+ Ge.displayName = "Tabs";
843
822
  //#endregion
844
823
  //#region src/components/Tabs/index.ts
845
- var Ue = Object.assign(He, {
846
- List: Le,
847
- Tab: Be,
848
- Panel: ze
849
- }), We = {
850
- tooltip: "_tooltip_frlq7_1",
851
- arrow: "_arrow_frlq7_22"
852
- }, Ge = t(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
824
+ var Ke = Object.assign(Ge, {
825
+ List: Be,
826
+ Tab: Ue,
827
+ Panel: He
828
+ }), qe = {
829
+ tooltip: "_tooltip_10opu_1",
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) => {
853
832
  let l = {
854
833
  top: "bottom",
855
834
  right: "left",
@@ -864,26 +843,26 @@ var Ue = Object.assign(He, {
864
843
  };
865
844
  return /* @__PURE__ */ p("div", {
866
845
  ref: c,
867
- className: M(We.tooltip, a),
846
+ className: F(qe.tooltip, a),
868
847
  "data-placement": t,
869
848
  "data-state": "open",
870
849
  style: o,
871
850
  ...s,
872
851
  children: [e, /* @__PURE__ */ f("div", {
873
852
  ref: n,
874
- className: We.arrow,
853
+ className: qe.arrow,
875
854
  style: u
876
855
  })]
877
856
  });
878
857
  });
879
- Ge.displayName = "TooltipContent";
858
+ Je.displayName = "TooltipContent";
880
859
  //#endregion
881
860
  //#region src/components/Tooltip/Tooltip.tsx
882
- var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
861
+ var Ye = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
883
862
  open: 300,
884
863
  close: 100
885
864
  }, maxWidth: o = 250, className: l, onOpenChange: u }) => {
886
- let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef: E, setFloatingRef: D, placement: O } = ee({
865
+ let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef: E, setFloatingRef: D, placement: O } = B({
887
866
  open: g,
888
867
  onOpenChange: (e) => {
889
868
  r || (_(e), u?.(e));
@@ -900,7 +879,7 @@ var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
900
879
  "aria-describedby": g ? y : void 0,
901
880
  ...j(),
902
881
  children: e
903
- }), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Ge, {
882
+ }), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Je, {
904
883
  id: y,
905
884
  ref: D,
906
885
  content: n,
@@ -917,33 +896,33 @@ var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
917
896
  ...M()
918
897
  }) })] });
919
898
  };
920
- Ke.displayName = "Tooltip";
899
+ Ye.displayName = "Tooltip";
921
900
  //#endregion
922
901
  //#region src/utils/devWarning.ts
923
- var qe = (e, t) => {
902
+ var Xe = (e, t) => {
924
903
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
925
904
  }, X = {
926
- button: "_button_s76yk_1",
927
- loading: "_loading_s76yk_21",
928
- solid: "_solid_s76yk_32",
929
- primary: "_primary_s76yk_32",
930
- secondary: "_secondary_s76yk_52",
931
- danger: "_danger_s76yk_72",
932
- close: "_close_s76yk_92",
933
- outline: "_outline_s76yk_112",
934
- ghost: "_ghost_s76yk_192",
935
- sm: "_sm_s76yk_281",
936
- md: "_md_s76yk_287",
937
- lg: "_lg_s76yk_293",
938
- fullWidth: "_fullWidth_s76yk_299",
939
- iconOnly: "_iconOnly_s76yk_303",
940
- label: "_label_s76yk_307",
941
- icon: "_icon_s76yk_303",
942
- spinner: "_spinner_s76yk_329",
943
- "button-spin": "_button-spin_s76yk_1"
944
- }, Je = 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) => {
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) => {
945
924
  let y = d || !e && !!(c || l), b = a || o, x = o && s ? s : e;
946
- return qe(!y || !!g, "Button: icon-only buttons must provide aria-label."), /* @__PURE__ */ p("button", {
925
+ return Xe(!y || !!g, "Button: icon-only buttons must provide aria-label."), /* @__PURE__ */ p("button", {
947
926
  ..._,
948
927
  ref: v,
949
928
  type: i,
@@ -951,7 +930,7 @@ var qe = (e, t) => {
951
930
  onClick: b ? void 0 : h,
952
931
  "aria-label": g || void 0,
953
932
  "aria-busy": o || void 0,
954
- className: M(X.button, X[t], X[n], X[r], m, {
933
+ className: F(X.button, X[t], X[n], X[r], m, {
955
934
  [X.disabled]: b,
956
935
  [X.loading]: o,
957
936
  [X.fullWidth]: u,
@@ -977,49 +956,49 @@ var qe = (e, t) => {
977
956
  ]
978
957
  });
979
958
  });
980
- Je.displayName = "Button";
959
+ Ze.displayName = "Button";
981
960
  var Z = {
982
- wrapper: "_wrapper_1xtic_1",
983
- wrapperSm: "_wrapperSm_1xtic_12",
984
- wrapperMd: "_wrapperMd_1xtic_18",
985
- wrapperLg: "_wrapperLg_1xtic_24",
986
- iconOnly: "_iconOnly_1xtic_30",
987
- container: "_container_1xtic_36",
988
- containerSm: "_containerSm_1xtic_43",
989
- containerMd: "_containerMd_1xtic_47",
990
- containerLg: "_containerLg_1xtic_51",
991
- input: "_input_1xtic_55",
992
- customCheckbox: "_customCheckbox_1xtic_67",
993
- requiredMark: "_requiredMark_1xtic_82",
994
- checkmark: "_checkmark_1xtic_92",
995
- indeterminateMark: "_indeterminateMark_1xtic_108",
996
- label: "_label_1xtic_118",
997
- descriptionText: "_descriptionText_1xtic_123",
998
- errorText: "_errorText_1xtic_130",
999
- labelSm: "_labelSm_1xtic_137",
1000
- labelMd: "_labelMd_1xtic_141",
1001
- labelLg: "_labelLg_1xtic_145",
1002
- indeterminate: "_indeterminate_1xtic_108",
1003
- error: "_error_1xtic_130",
1004
- disabled: "_disabled_1xtic_200"
1005
- }, Ye = {
961
+ wrapper: "_wrapper_2j84j_1",
962
+ wrapperSm: "_wrapperSm_2j84j_12",
963
+ wrapperMd: "_wrapperMd_2j84j_18",
964
+ wrapperLg: "_wrapperLg_2j84j_24",
965
+ iconOnly: "_iconOnly_2j84j_30",
966
+ container: "_container_2j84j_36",
967
+ containerSm: "_containerSm_2j84j_43",
968
+ containerMd: "_containerMd_2j84j_47",
969
+ containerLg: "_containerLg_2j84j_51",
970
+ input: "_input_2j84j_55",
971
+ customCheckbox: "_customCheckbox_2j84j_67",
972
+ requiredMark: "_requiredMark_2j84j_81",
973
+ error: "_error_2j84j_92",
974
+ checkmark: "_checkmark_2j84j_97",
975
+ indeterminateMark: "_indeterminateMark_2j84j_113",
976
+ label: "_label_2j84j_123",
977
+ descriptionText: "_descriptionText_2j84j_129",
978
+ errorText: "_errorText_2j84j_136",
979
+ labelSm: "_labelSm_2j84j_143",
980
+ labelMd: "_labelMd_2j84j_147",
981
+ labelLg: "_labelLg_2j84j_151",
982
+ indeterminate: "_indeterminate_2j84j_113",
983
+ disabled: "_disabled_2j84j_223"
984
+ }, Qe = {
1006
985
  sm: Z.labelSm,
1007
986
  md: Z.labelMd,
1008
987
  lg: Z.labelLg
1009
- }, Xe = {
988
+ }, $e = {
1010
989
  sm: Z.wrapperSm,
1011
990
  md: Z.wrapperMd,
1012
991
  lg: Z.wrapperLg
1013
- }, Ze = {
992
+ }, et = {
1014
993
  sm: Z.containerSm,
1015
994
  md: Z.containerMd,
1016
995
  lg: Z.containerLg
1017
- }, Qe = 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) => {
1018
- let w = a(), E = e ?? w, D = s(null), k = !!v, A = r ? `${E}-description` : void 0, j = k ? `${E}-error` : void 0, N = [
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 = [
1019
998
  x,
1020
- A,
1021
- j
1022
- ].filter(Boolean).join(" "), [P, F] = T({
999
+ k,
1000
+ A
1001
+ ].filter(Boolean).join(" "), [N, P] = T({
1023
1002
  value: o,
1024
1003
  defaultValue: l,
1025
1004
  onChange: _
@@ -1033,42 +1012,42 @@ var Z = {
1033
1012
  i(() => {
1034
1013
  D.current && (D.current.indeterminate = m);
1035
1014
  }, [m]);
1036
- let ee = (e) => {
1037
- F(e.target.checked);
1015
+ let L = (e) => {
1016
+ P(e.target.checked);
1038
1017
  };
1039
- return qe(!!(t || y || b), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ p("div", {
1040
- className: M(Z.container, Ze[c], h),
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),
1041
1020
  children: [
1042
1021
  /* @__PURE__ */ p("label", {
1043
1022
  htmlFor: E,
1044
- className: M(Z.wrapper, Xe[c], !t && Z.iconOnly, u && Z.disabled, g),
1023
+ className: F(Z.wrapper, $e[c], !t && Z.iconOnly, u && Z.disabled, g),
1045
1024
  children: [
1046
1025
  /* @__PURE__ */ f("input", {
1047
1026
  ...S,
1048
1027
  ref: I,
1049
1028
  id: E,
1050
1029
  type: "checkbox",
1051
- checked: P,
1030
+ checked: N,
1052
1031
  disabled: u,
1053
1032
  required: d,
1054
- onChange: ee,
1033
+ onChange: L,
1055
1034
  className: Z.input,
1056
1035
  "aria-label": y,
1057
1036
  "aria-labelledby": b,
1058
1037
  "aria-checked": m ? "mixed" : S["aria-checked"],
1059
- "aria-invalid": k ? !0 : S["aria-invalid"],
1060
- "aria-describedby": N || void 0
1038
+ "aria-invalid": O ? !0 : S["aria-invalid"],
1039
+ "aria-describedby": M || void 0
1061
1040
  }),
1062
1041
  /* @__PURE__ */ f("span", {
1063
- className: M(Z.customCheckbox, k && Z.error, m && Z.indeterminate),
1042
+ className: F(Z.customCheckbox, O && Z.error, m && Z.indeterminate),
1064
1043
  "aria-hidden": "true",
1065
- children: m ? /* @__PURE__ */ f("span", { className: Z.indeterminateMark }) : P && /* @__PURE__ */ f("span", {
1044
+ children: m ? /* @__PURE__ */ f("span", { className: Z.indeterminateMark }) : N && /* @__PURE__ */ f("span", {
1066
1045
  className: Z.checkmark,
1067
- children: /* @__PURE__ */ f(O, {})
1046
+ children: /* @__PURE__ */ f(j, {})
1068
1047
  })
1069
1048
  }),
1070
1049
  t && /* @__PURE__ */ p("span", {
1071
- className: M(Z.label, Ye[c]),
1050
+ className: F(Z.label, Qe[c]),
1072
1051
  children: [t, d && /* @__PURE__ */ f("span", {
1073
1052
  className: Z.requiredMark,
1074
1053
  "aria-hidden": "true",
@@ -1078,39 +1057,39 @@ var Z = {
1078
1057
  ]
1079
1058
  }),
1080
1059
  r && /* @__PURE__ */ f("span", {
1081
- id: A,
1060
+ id: k,
1082
1061
  className: Z.descriptionText,
1083
1062
  children: r
1084
1063
  }),
1085
- k && /* @__PURE__ */ f("span", {
1086
- id: j,
1064
+ O && /* @__PURE__ */ f("span", {
1065
+ id: A,
1087
1066
  className: Z.errorText,
1088
1067
  children: v
1089
1068
  })
1090
1069
  ]
1091
1070
  });
1092
1071
  });
1093
- Qe.displayName = "Checkbox";
1072
+ tt.displayName = "Checkbox";
1094
1073
  var Q = {
1095
- inputWrapper: "_inputWrapper_1553r_1",
1096
- input: "_input_1553r_1",
1097
- error: "_error_1553r_47",
1098
- sm: "_sm_1553r_54",
1099
- md: "_md_1553r_58",
1100
- lg: "_lg_1553r_62",
1101
- hasLeftAdornment: "_hasLeftAdornment_1553r_90",
1102
- hasRightAdornment: "_hasRightAdornment_1553r_94",
1103
- leftAdornment: "_leftAdornment_1553r_98",
1104
- rightAdornment: "_rightAdornment_1553r_99",
1105
- clearButton: "_clearButton_1553r_120",
1106
- toneDefault: "_toneDefault_1553r_159",
1107
- tonePrimary: "_tonePrimary_1553r_163",
1108
- toneSecondary: "_toneSecondary_1553r_167",
1109
- toneSuccess: "_toneSuccess_1553r_171",
1110
- toneDanger: "_toneDanger_1553r_175",
1111
- toneMuted: "_toneMuted_1553r_179",
1112
- toneInverse: "_toneInverse_1553r_183"
1113
- }, $e = {
1074
+ inputWrapper: "_inputWrapper_13w4m_1",
1075
+ input: "_input_13w4m_1",
1076
+ error: "_error_13w4m_47",
1077
+ sm: "_sm_13w4m_55",
1078
+ md: "_md_13w4m_59",
1079
+ lg: "_lg_13w4m_63",
1080
+ hasLeftAdornment: "_hasLeftAdornment_13w4m_98",
1081
+ hasRightAdornment: "_hasRightAdornment_13w4m_102",
1082
+ leftAdornment: "_leftAdornment_13w4m_106",
1083
+ rightAdornment: "_rightAdornment_13w4m_107",
1084
+ clearButton: "_clearButton_13w4m_149",
1085
+ toneDefault: "_toneDefault_13w4m_189",
1086
+ tonePrimary: "_tonePrimary_13w4m_193",
1087
+ toneSecondary: "_toneSecondary_13w4m_197",
1088
+ toneSuccess: "_toneSuccess_13w4m_201",
1089
+ toneDanger: "_toneDanger_13w4m_205",
1090
+ toneMuted: "_toneMuted_13w4m_209",
1091
+ toneInverse: "_toneInverse_13w4m_213"
1092
+ }, nt = {
1114
1093
  default: Q.toneDefault,
1115
1094
  primary: Q.tonePrimary,
1116
1095
  secondary: Q.toneSecondary,
@@ -1118,7 +1097,7 @@ var Q = {
1118
1097
  danger: Q.toneDanger,
1119
1098
  muted: Q.toneMuted,
1120
1099
  inverse: Q.toneInverse
1121
- }, et = (e = "text", t) => {
1100
+ }, rt = (e = "text", t) => {
1122
1101
  if (t) return t;
1123
1102
  switch (e) {
1124
1103
  case "email": return "email";
@@ -1128,50 +1107,50 @@ var Q = {
1128
1107
  case "search": return "off";
1129
1108
  default: return;
1130
1109
  }
1131
- }, tt = 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: N, onMouseLeave: P, "aria-describedby": F, "aria-invalid": I, ...ee }, L) => {
1132
- let R = a(), te = e ?? R, z = s(null), [ne, B] = c(u ?? ""), V = l !== void 0, H = V ? l : ne, re = H !== "", U = et(m, b), W = S && re && !_ && !x, ie = [
1133
- F,
1134
- i ? `${te}-description` : void 0,
1135
- g ? `${te}-error` : void 0
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 = [
1112
+ P,
1113
+ i ? `${B}-description` : void 0,
1114
+ g ? `${B}-error` : void 0
1136
1115
  ].filter(Boolean).join(" "), ae = E ?? "×", oe = n((e) => {
1137
- if (z.current = e, typeof L == "function") {
1138
- L(e);
1116
+ if (ee.current = e, typeof R == "function") {
1117
+ R(e);
1139
1118
  return;
1140
1119
  }
1141
- L && (L.current = e);
1142
- }, [L]), se = n((e) => {
1120
+ R && (R.current = e);
1121
+ }, [R]), se = n((e) => {
1143
1122
  let t = e.target.value;
1144
- V || B(t), d?.(e);
1145
- }, [V, d]), ce = n(() => {
1146
- V || B(""), C?.(), z.current?.focus();
1147
- }, [V, C]), le = !W && !!T;
1148
- return /* @__PURE__ */ f(De, {
1149
- id: te,
1123
+ 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, {
1128
+ id: B,
1150
1129
  label: t,
1151
1130
  description: i,
1152
1131
  error: g,
1153
1132
  required: v,
1154
1133
  disabled: _,
1155
1134
  children: /* @__PURE__ */ p("div", {
1156
- className: M(Q.inputWrapper, {
1135
+ className: F(Q.inputWrapper, {
1157
1136
  [Q.hasLeftAdornment]: !!w,
1158
1137
  [Q.hasRightAdornment]: !!T || W
1159
1138
  }),
1160
1139
  children: [
1161
1140
  w && /* @__PURE__ */ f("span", {
1162
1141
  "aria-hidden": "true",
1163
- className: M(Q.leftAdornment, $e[D]),
1142
+ className: F(Q.leftAdornment, nt[D]),
1164
1143
  children: w
1165
1144
  }),
1166
1145
  /* @__PURE__ */ f("input", {
1167
- ...ee,
1146
+ ...L,
1168
1147
  ref: oe,
1169
- id: te,
1148
+ id: B,
1170
1149
  name: r,
1171
1150
  type: m,
1172
- autoComplete: U,
1173
- className: M(Q.input, Q[h], { [Q.error]: !!g }, y),
1174
- value: H,
1151
+ autoComplete: re,
1152
+ className: F(Q.input, Q[h], { [Q.error]: !!g }, y),
1153
+ value: ne,
1175
1154
  onChange: se,
1176
1155
  placeholder: o,
1177
1156
  disabled: _,
@@ -1181,42 +1160,42 @@ var Q = {
1181
1160
  maxLength: j,
1182
1161
  "aria-invalid": g ? !0 : I,
1183
1162
  "aria-describedby": ie || void 0,
1184
- onMouseEnter: N,
1185
- onMouseLeave: P
1163
+ onMouseEnter: M,
1164
+ onMouseLeave: N
1186
1165
  }),
1187
1166
  W && /* @__PURE__ */ f("button", {
1188
1167
  type: "button",
1189
- className: M(Q.clearButton, $e[k]),
1168
+ className: F(Q.clearButton, nt[k]),
1190
1169
  onClick: ce,
1191
1170
  "aria-label": "Clear input",
1192
1171
  children: ae
1193
1172
  }),
1194
1173
  le && /* @__PURE__ */ f("div", {
1195
- className: M(Q.rightAdornment, $e[O]),
1174
+ className: F(Q.rightAdornment, nt[O]),
1196
1175
  children: T
1197
1176
  })
1198
1177
  ]
1199
1178
  })
1200
1179
  });
1201
1180
  });
1202
- tt.displayName = "Input";
1181
+ it.displayName = "Input";
1203
1182
  var $ = {
1204
- root: "_root_6w580_1",
1205
- invalid: "_invalid_6w580_14",
1206
- control: "_control_6w580_14",
1207
- label: "_label_6w580_17",
1208
- wrapper: "_wrapper_6w580_20",
1209
- input: "_input_6w580_21",
1210
- disabled: "_disabled_6w580_24",
1211
- description: "_description_6w580_32",
1212
- sm: "_sm_6w580_36",
1213
- md: "_md_6w580_45",
1214
- lg: "_lg_6w580_54",
1215
- indicator: "_indicator_6w580_109",
1216
- content: "_content_6w580_182",
1217
- error: "_error_6w580_198"
1218
- }, nt = 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) => {
1219
- let b = Te(), x = a(), S = h ?? x, C = u ? `${S}-description` : void 0, w = s ? `${S}-error` : void 0, E = [
1183
+ root: "_root_ie5a6_1",
1184
+ invalid: "_invalid_ie5a6_14",
1185
+ control: "_control_ie5a6_14",
1186
+ label: "_label_ie5a6_17",
1187
+ wrapper: "_wrapper_ie5a6_20",
1188
+ input: "_input_ie5a6_21",
1189
+ disabled: "_disabled_ie5a6_24",
1190
+ description: "_description_ie5a6_32",
1191
+ sm: "_sm_ie5a6_36",
1192
+ md: "_md_ie5a6_45",
1193
+ lg: "_lg_ie5a6_54",
1194
+ indicator: "_indicator_ie5a6_109",
1195
+ content: "_content_ie5a6_202",
1196
+ 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 = [
1220
1199
  C,
1221
1200
  w,
1222
1201
  b?.describedBy,
@@ -1225,7 +1204,7 @@ var $ = {
1225
1204
  value: t,
1226
1205
  defaultValue: n,
1227
1206
  onChange: c
1228
- }), A = D ? b.value === e : O, j = !!b?.disabled || r, N = !!b?.required || i, P = b?.name ?? g, F = !!(s || b?.invalid), I = o ?? b?.size ?? "md", ee = (t) => {
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) => {
1229
1208
  if (!j) {
1230
1209
  if (D) {
1231
1210
  b.onValueChange(e);
@@ -1235,25 +1214,25 @@ var $ = {
1235
1214
  }
1236
1215
  };
1237
1216
  return /* @__PURE__ */ p("div", {
1238
- className: M($.root, $[I], F && $.invalid, j && $.disabled, m),
1217
+ className: F($.root, $[I], P && $.invalid, j && $.disabled, m),
1239
1218
  children: [/* @__PURE__ */ p("label", {
1240
1219
  htmlFor: S,
1241
- className: M($.wrapper, d),
1220
+ className: F($.wrapper, d),
1242
1221
  children: [
1243
1222
  /* @__PURE__ */ f("input", {
1244
1223
  ...v,
1245
1224
  ref: y,
1246
1225
  id: S,
1247
1226
  type: "radio",
1248
- name: P,
1227
+ name: N,
1249
1228
  value: e,
1250
1229
  checked: A,
1251
1230
  disabled: j,
1252
- required: N,
1253
- "aria-invalid": F || void 0,
1231
+ required: M,
1232
+ "aria-invalid": P || void 0,
1254
1233
  "aria-describedby": E,
1255
1234
  className: $.input,
1256
- onChange: ee
1235
+ onChange: L
1257
1236
  }),
1258
1237
  /* @__PURE__ */ f("span", {
1259
1238
  className: $.control,
@@ -1279,15 +1258,15 @@ var $ = {
1279
1258
  })]
1280
1259
  });
1281
1260
  });
1282
- nt.displayName = "Radio";
1261
+ at.displayName = "Radio";
1283
1262
  //#endregion
1284
1263
  //#region src/theme/ThemeContext.ts
1285
- var rt = e(null), it = (e) => e === "highContrast" ? "high-contrast" : e, at = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1264
+ var ot = e(null), st = (e) => e === "highContrast" ? "high-contrast" : e, ct = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1286
1265
  let [a, s] = T({
1287
1266
  value: e,
1288
1267
  defaultValue: t,
1289
1268
  onChange: n
1290
- }), c = it(a);
1269
+ }), c = st(a);
1291
1270
  i(() => {
1292
1271
  if (typeof document > "u") return;
1293
1272
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
@@ -1303,7 +1282,7 @@ var rt = e(null), it = (e) => e === "highContrast" ? "high-contrast" : e, at = (
1303
1282
  theme: a,
1304
1283
  setTheme: s
1305
1284
  }), [a, s]);
1306
- return /* @__PURE__ */ f(rt.Provider, {
1285
+ return /* @__PURE__ */ f(ot.Provider, {
1307
1286
  value: l,
1308
1287
  children: /* @__PURE__ */ f("div", {
1309
1288
  "data-vellira-theme": c,
@@ -1311,13 +1290,13 @@ var rt = e(null), it = (e) => e === "highContrast" ? "high-contrast" : e, at = (
1311
1290
  })
1312
1291
  });
1313
1292
  };
1314
- at.displayName = "ThemeProvider";
1293
+ ct.displayName = "ThemeProvider";
1315
1294
  //#endregion
1316
1295
  //#region src/theme/useTheme.ts
1317
- function ot() {
1318
- let e = r(rt);
1296
+ function lt() {
1297
+ let e = r(ot);
1319
1298
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1320
1299
  return e;
1321
1300
  }
1322
1301
  //#endregion
1323
- export { Je as Button, Qe as Checkbox, oe as Dropdown, De as FormField, tt as Input, Se as Modal, nt as Radio, Ee as RadioGroup, Ne as Select, Ue as Tabs, at as ThemeProvider, Ke as Tooltip, ot as useTheme };
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 };