@vellira-ui/react 2.25.1 → 2.26.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
@@ -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,24 @@ var Ae = {
560
563
  onSelect: u,
561
564
  onMouseEnter: () => d(n)
562
565
  }, e.value)) : /* @__PURE__ */ f("li", {
563
- className: Ae.empty,
566
+ className: Ne.empty,
564
567
  role: "presentation",
565
568
  children: o
566
569
  })
567
570
  }) }) : null;
568
- je.displayName = "SelectDropdown";
571
+ Pe.displayName = "SelectDropdown";
569
572
  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", {
573
+ control: "_control_1xma1_1",
574
+ disabled: "_disabled_1xma1_18",
575
+ arrow: "_arrow_1xma1_23",
576
+ sm: "_sm_1xma1_34",
577
+ md: "_md_1xma1_41",
578
+ lg: "_lg_1xma1_48",
579
+ value: "_value_1xma1_55",
580
+ placeholder: "_placeholder_1xma1_63",
581
+ error: "_error_1xma1_67",
582
+ open: "_open_1xma1_109"
583
+ }, 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
584
  id: e,
582
585
  ref: h,
583
586
  type: "button",
@@ -592,7 +595,7 @@ var J = {
592
595
  "aria-controls": n ? a : void 0,
593
596
  "aria-describedby": t,
594
597
  "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
595
- className: M(J.control, J[d], {
598
+ className: F(J.control, J[d], {
596
599
  [J.error]: !!c,
597
600
  [J.disabled]: r
598
601
  }, m),
@@ -601,152 +604,121 @@ var J = {
601
604
  onBlur: v,
602
605
  onFocus: y,
603
606
  children: [/* @__PURE__ */ f("span", {
604
- className: M(J.value, { [J.placeholder]: u }),
607
+ className: F(J.value, { [J.placeholder]: u }),
605
608
  children: l
606
609
  }), /* @__PURE__ */ f("span", {
607
- className: M(J.arrow, { [J.open]: n }),
610
+ className: F(J.arrow, { [J.open]: n }),
608
611
  "aria-hidden": "true",
609
- children: /* @__PURE__ */ f(k, {})
612
+ children: /* @__PURE__ */ f(M, {})
610
613
  })]
611
614
  });
612
- Me.displayName = "SelectTrigger";
615
+ Fe.displayName = "SelectTrigger";
613
616
  //#endregion
614
617
  //#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,
618
+ 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 }) => {
619
+ 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({
620
+ value: c,
621
+ defaultValue: l,
622
+ onChange: u,
623
+ options: d,
624
+ disabled: v,
625
+ open: S,
626
+ defaultOpen: C,
627
+ onOpenChange: w
628
+ }), ae = !!z, { floatingStyles: oe, setRef: se, setFloatingRef: ce } = B({
629
+ open: V,
630
+ onOpenChange: te,
631
+ placement: b,
632
+ matchTriggerWidth: x,
629
633
  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);
634
+ }), le = n((e) => {
635
+ W(e), I.current?.focus();
636
+ }, [W]);
637
+ ee([I, L], U, V);
638
+ let ue = n((e) => {
639
+ I.current = e, se(e);
640
+ }, [se]), G = n((e) => {
641
+ L.current = e, ce(e);
670
642
  }, [ce]);
671
- return /* @__PURE__ */ p(De, {
672
- id: F,
643
+ return /* @__PURE__ */ p(Ae, {
644
+ id: M,
673
645
  label: e,
674
646
  description: t,
675
- error: x,
676
- required: y,
677
- disabled: b,
678
- className: j,
647
+ error: y,
648
+ required: _,
649
+ disabled: v,
650
+ className: D,
679
651
  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,
652
+ /* @__PURE__ */ f(Fe, {
653
+ id: M,
654
+ errorId: F,
655
+ isOpen: V,
656
+ disabled: v,
657
+ required: _,
658
+ listboxId: N,
659
+ activeIndex: H,
660
+ ariaLabel: o ?? (e ? void 0 : z?.label || m),
661
+ error: P,
662
+ displayText: z?.label ?? m,
691
663
  isPlaceholder: !ae,
692
- size: v,
693
- className: M,
694
- buttonRef: me,
695
- onClick: de,
696
- onKeyDown: pe,
697
- onBlur: k,
698
- onFocus: A
664
+ size: g,
665
+ className: k,
666
+ buttonRef: ue,
667
+ onClick: re,
668
+ onKeyDown: ie,
669
+ onBlur: T,
670
+ onFocus: E
699
671
  }),
700
672
  i && /* @__PURE__ */ f("input", {
701
673
  type: "hidden",
702
674
  name: i,
703
- value: B,
704
- disabled: b
675
+ value: R,
676
+ disabled: v
705
677
  }),
706
- /* @__PURE__ */ f(je, {
707
- isOpen: H,
708
- listboxId: I,
709
- labelledById: F,
678
+ /* @__PURE__ */ f(Pe, {
679
+ isOpen: V,
680
+ listboxId: N,
681
+ labelledById: M,
710
682
  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
683
+ options: d,
684
+ noOptionsText: h,
685
+ selectedValue: R,
686
+ activeIndex: H,
687
+ className: A,
688
+ setDropdownRef: G,
689
+ onSelect: le,
690
+ onMouseEnter: ne
719
691
  })
720
692
  ]
721
693
  });
722
694
  };
723
- Ne.displayName = "Select";
695
+ Ie.displayName = "Select";
724
696
  //#endregion
725
697
  //#region src/components/Tabs/TabsContext.tsx
726
- var Pe = e(null), Fe = () => {
727
- let e = r(Pe);
698
+ var Le = e(null), Re = () => {
699
+ let e = r(Le);
728
700
  if (!e) throw Error("Tabs components must be used inside Tabs");
729
701
  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();
702
+ }, ze = {
703
+ list: "_list_13hkl_1",
704
+ vertical: "_vertical_13hkl_8"
705
+ }, Be = ({ children: e, className: t, ...n }) => {
706
+ let { orientation: r, appearance: i } = Re();
735
707
  return /* @__PURE__ */ f("div", {
736
708
  ...n,
737
709
  role: "tablist",
738
710
  "aria-orientation": r,
739
- className: M(Ie.list, r === "vertical" && Ie.vertical, i === "underline" && Ie.underline, i === "pills" && Ie.pills, t),
711
+ className: F(ze.list, r === "vertical" && ze.vertical, i === "underline" && ze.underline, i === "pills" && ze.pills, t),
740
712
  children: e
741
713
  });
742
714
  };
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;
715
+ Be.displayName = "TabsList";
716
+ var Ve = {
717
+ panel: "_panel_1v1a9_1",
718
+ visible: "_visible_1v1a9_10",
719
+ vertical: "_vertical_1v1a9_14"
720
+ }, He = ({ index: e, children: t, className: n }) => {
721
+ let { activeIndex: r, orientation: a } = Re(), [o, s] = c(!1), l = r === e;
750
722
  return i(() => {
751
723
  if (!l) {
752
724
  s(!1);
@@ -760,22 +732,22 @@ var Re = {
760
732
  "aria-labelledby": `tab-${e}`,
761
733
  hidden: !l,
762
734
  tabIndex: 0,
763
- className: M(Re.panel, o && Re.visible, a === "vertical" && Re.vertical, n),
735
+ className: F(Ve.panel, o && Ve.visible, a === "vertical" && Ve.vertical, n),
764
736
  children: t
765
737
  });
766
738
  };
767
- ze.displayName = "TabsPanel";
739
+ He.displayName = "TabsPanel";
768
740
  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;
741
+ tab: "_tab_qe8xc_1",
742
+ iconOnly: "_iconOnly_qe8xc_27",
743
+ tabIcon: "_tabIcon_qe8xc_31",
744
+ label: "_label_qe8xc_45",
745
+ default: "_default_qe8xc_51",
746
+ underline: "_underline_qe8xc_60",
747
+ pills: "_pills_qe8xc_92",
748
+ vertical: "_vertical_qe8xc_106"
749
+ }, Ue = t(({ index: e, children: t, className: r, disabled: i = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
750
+ let { activeIndex: u, setActiveIndex: d, orientation: m, appearance: h = "default", registerTab: g, onTabKeyDown: _ } = Re(), v = u === e, y = !!a, b = y && t == null;
779
751
  return /* @__PURE__ */ p("button", {
780
752
  type: "button",
781
753
  ref: n((t) => {
@@ -791,7 +763,7 @@ var Y = {
791
763
  id: `tab-${e}`,
792
764
  disabled: i,
793
765
  tabIndex: v ? 0 : -1,
794
- className: M(Y.tab, Y[h], m === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, r),
766
+ className: F(Y.tab, Y[h], m === "vertical" && Y.vertical, y && Y.withIcon, b && Y.iconOnly, r),
795
767
  onClick: (t) => {
796
768
  i || (d(e), o?.(t));
797
769
  },
@@ -809,47 +781,52 @@ var Y = {
809
781
  })]
810
782
  });
811
783
  });
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,
784
+ Ue.displayName = "Tab";
785
+ var We = {
786
+ tabs: "_tabs_uqy7q_1",
787
+ vertical: "_vertical_uqy7q_5"
788
+ }, Ge = ({ children: e, activeIndex: t, defaultActiveIndex: r = 0, onChange: i, orientation: a = "horizontal", appearance: o = "default", className: c }) => {
789
+ let { activeIndex: l, setActiveIndex: u } = k({
790
+ activeIndex: t,
791
+ defaultActiveIndex: r,
792
+ onChange: i
793
+ }), d = s([]), p = n((e, t) => {
794
+ d.current[e] = t;
795
+ }, []), { onKeyDown: m } = A({
796
+ activeIndex: l,
797
+ setActiveIndex: u,
798
+ tabRefs: d,
799
+ orientation: a,
800
+ onNavigate: (e) => {
801
+ d.current[e]?.focus();
802
+ }
803
+ }), h = {
804
+ activeIndex: l,
805
+ setActiveIndex: u,
829
806
  orientation: a,
830
807
  appearance: o,
831
- registerTab: _,
832
- onTabKeyDown: v
808
+ registerTab: p,
809
+ onTabKeyDown: m
833
810
  };
834
- return /* @__PURE__ */ f(Pe.Provider, {
835
- value: y,
811
+ return /* @__PURE__ */ f(Le.Provider, {
812
+ value: h,
836
813
  children: /* @__PURE__ */ f("div", {
837
- className: M(Ve.tabs, a === "vertical" && Ve.vertical, l),
814
+ className: F(We.tabs, a === "vertical" && We.vertical, c),
838
815
  children: e
839
816
  })
840
817
  });
841
818
  };
842
- He.displayName = "Tabs";
819
+ Ge.displayName = "Tabs";
843
820
  //#endregion
844
821
  //#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) => {
822
+ var Ke = Object.assign(Ge, {
823
+ List: Be,
824
+ Tab: Ue,
825
+ Panel: He
826
+ }), qe = {
827
+ tooltip: "_tooltip_10opu_1",
828
+ arrow: "_arrow_10opu_25"
829
+ }, Je = t(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
853
830
  let l = {
854
831
  top: "bottom",
855
832
  right: "left",
@@ -864,26 +841,26 @@ var Ue = Object.assign(He, {
864
841
  };
865
842
  return /* @__PURE__ */ p("div", {
866
843
  ref: c,
867
- className: M(We.tooltip, a),
844
+ className: F(qe.tooltip, a),
868
845
  "data-placement": t,
869
846
  "data-state": "open",
870
847
  style: o,
871
848
  ...s,
872
849
  children: [e, /* @__PURE__ */ f("div", {
873
850
  ref: n,
874
- className: We.arrow,
851
+ className: qe.arrow,
875
852
  style: u
876
853
  })]
877
854
  });
878
855
  });
879
- Ge.displayName = "TooltipContent";
856
+ Je.displayName = "TooltipContent";
880
857
  //#endregion
881
858
  //#region src/components/Tooltip/Tooltip.tsx
882
- var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
859
+ var Ye = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
883
860
  open: 300,
884
861
  close: 100
885
862
  }, 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({
863
+ let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef: E, setFloatingRef: D, placement: O } = B({
887
864
  open: g,
888
865
  onOpenChange: (e) => {
889
866
  r || (_(e), u?.(e));
@@ -900,7 +877,7 @@ var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
900
877
  "aria-describedby": g ? y : void 0,
901
878
  ...j(),
902
879
  children: e
903
- }), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Ge, {
880
+ }), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Je, {
904
881
  id: y,
905
882
  ref: D,
906
883
  content: n,
@@ -917,33 +894,33 @@ var Ke = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
917
894
  ...M()
918
895
  }) })] });
919
896
  };
920
- Ke.displayName = "Tooltip";
897
+ Ye.displayName = "Tooltip";
921
898
  //#endregion
922
899
  //#region src/utils/devWarning.ts
923
- var qe = (e, t) => {
900
+ var Xe = (e, t) => {
924
901
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
925
902
  }, 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) => {
903
+ button: "_button_kajmf_1",
904
+ solid: "_solid_kajmf_21",
905
+ primary: "_primary_kajmf_21",
906
+ loading: "_loading_kajmf_21",
907
+ secondary: "_secondary_kajmf_45",
908
+ danger: "_danger_kajmf_69",
909
+ close: "_close_kajmf_93",
910
+ outline: "_outline_kajmf_117",
911
+ ghost: "_ghost_kajmf_213",
912
+ sm: "_sm_kajmf_327",
913
+ md: "_md_kajmf_333",
914
+ lg: "_lg_kajmf_339",
915
+ fullWidth: "_fullWidth_kajmf_345",
916
+ iconOnly: "_iconOnly_kajmf_349",
917
+ label: "_label_kajmf_353",
918
+ icon: "_icon_kajmf_349",
919
+ spinner: "_spinner_kajmf_375",
920
+ "button-spin": "_button-spin_kajmf_1"
921
+ }, 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
922
  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", {
923
+ return Xe(!y || !!g, "Button: icon-only buttons must provide aria-label."), /* @__PURE__ */ p("button", {
947
924
  ..._,
948
925
  ref: v,
949
926
  type: i,
@@ -951,7 +928,7 @@ var qe = (e, t) => {
951
928
  onClick: b ? void 0 : h,
952
929
  "aria-label": g || void 0,
953
930
  "aria-busy": o || void 0,
954
- className: M(X.button, X[t], X[n], X[r], m, {
931
+ className: F(X.button, X[t], X[n], X[r], m, {
955
932
  [X.disabled]: b,
956
933
  [X.loading]: o,
957
934
  [X.fullWidth]: u,
@@ -977,49 +954,49 @@ var qe = (e, t) => {
977
954
  ]
978
955
  });
979
956
  });
980
- Je.displayName = "Button";
957
+ Ze.displayName = "Button";
981
958
  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 = {
959
+ wrapper: "_wrapper_3q721_1",
960
+ wrapperSm: "_wrapperSm_3q721_12",
961
+ wrapperMd: "_wrapperMd_3q721_18",
962
+ wrapperLg: "_wrapperLg_3q721_24",
963
+ iconOnly: "_iconOnly_3q721_30",
964
+ container: "_container_3q721_36",
965
+ containerSm: "_containerSm_3q721_43",
966
+ containerMd: "_containerMd_3q721_47",
967
+ containerLg: "_containerLg_3q721_51",
968
+ input: "_input_3q721_55",
969
+ customCheckbox: "_customCheckbox_3q721_67",
970
+ requiredMark: "_requiredMark_3q721_81",
971
+ error: "_error_3q721_92",
972
+ checkmark: "_checkmark_3q721_97",
973
+ indeterminateMark: "_indeterminateMark_3q721_113",
974
+ label: "_label_3q721_123",
975
+ descriptionText: "_descriptionText_3q721_129",
976
+ errorText: "_errorText_3q721_136",
977
+ labelSm: "_labelSm_3q721_143",
978
+ labelMd: "_labelMd_3q721_147",
979
+ labelLg: "_labelLg_3q721_151",
980
+ indeterminate: "_indeterminate_3q721_113",
981
+ disabled: "_disabled_3q721_219"
982
+ }, Qe = {
1006
983
  sm: Z.labelSm,
1007
984
  md: Z.labelMd,
1008
985
  lg: Z.labelLg
1009
- }, Xe = {
986
+ }, $e = {
1010
987
  sm: Z.wrapperSm,
1011
988
  md: Z.wrapperMd,
1012
989
  lg: Z.wrapperLg
1013
- }, Ze = {
990
+ }, et = {
1014
991
  sm: Z.containerSm,
1015
992
  md: Z.containerMd,
1016
993
  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 = [
994
+ }, 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) => {
995
+ 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
996
  x,
1020
- A,
1021
- j
1022
- ].filter(Boolean).join(" "), [P, F] = T({
997
+ k,
998
+ A
999
+ ].filter(Boolean).join(" "), [N, P] = T({
1023
1000
  value: o,
1024
1001
  defaultValue: l,
1025
1002
  onChange: _
@@ -1033,42 +1010,42 @@ var Z = {
1033
1010
  i(() => {
1034
1011
  D.current && (D.current.indeterminate = m);
1035
1012
  }, [m]);
1036
- let ee = (e) => {
1037
- F(e.target.checked);
1013
+ let L = (e) => {
1014
+ P(e.target.checked);
1038
1015
  };
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),
1016
+ return Xe(!!(t || y || b), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ p("div", {
1017
+ className: F(Z.container, et[c], h),
1041
1018
  children: [
1042
1019
  /* @__PURE__ */ p("label", {
1043
1020
  htmlFor: E,
1044
- className: M(Z.wrapper, Xe[c], !t && Z.iconOnly, u && Z.disabled, g),
1021
+ className: F(Z.wrapper, $e[c], !t && Z.iconOnly, u && Z.disabled, g),
1045
1022
  children: [
1046
1023
  /* @__PURE__ */ f("input", {
1047
1024
  ...S,
1048
1025
  ref: I,
1049
1026
  id: E,
1050
1027
  type: "checkbox",
1051
- checked: P,
1028
+ checked: N,
1052
1029
  disabled: u,
1053
1030
  required: d,
1054
- onChange: ee,
1031
+ onChange: L,
1055
1032
  className: Z.input,
1056
1033
  "aria-label": y,
1057
1034
  "aria-labelledby": b,
1058
1035
  "aria-checked": m ? "mixed" : S["aria-checked"],
1059
- "aria-invalid": k ? !0 : S["aria-invalid"],
1060
- "aria-describedby": N || void 0
1036
+ "aria-invalid": O ? !0 : S["aria-invalid"],
1037
+ "aria-describedby": M || void 0
1061
1038
  }),
1062
1039
  /* @__PURE__ */ f("span", {
1063
- className: M(Z.customCheckbox, k && Z.error, m && Z.indeterminate),
1040
+ className: F(Z.customCheckbox, O && Z.error, m && Z.indeterminate),
1064
1041
  "aria-hidden": "true",
1065
- children: m ? /* @__PURE__ */ f("span", { className: Z.indeterminateMark }) : P && /* @__PURE__ */ f("span", {
1042
+ children: m ? /* @__PURE__ */ f("span", { className: Z.indeterminateMark }) : N && /* @__PURE__ */ f("span", {
1066
1043
  className: Z.checkmark,
1067
- children: /* @__PURE__ */ f(O, {})
1044
+ children: /* @__PURE__ */ f(j, {})
1068
1045
  })
1069
1046
  }),
1070
1047
  t && /* @__PURE__ */ p("span", {
1071
- className: M(Z.label, Ye[c]),
1048
+ className: F(Z.label, Qe[c]),
1072
1049
  children: [t, d && /* @__PURE__ */ f("span", {
1073
1050
  className: Z.requiredMark,
1074
1051
  "aria-hidden": "true",
@@ -1078,39 +1055,39 @@ var Z = {
1078
1055
  ]
1079
1056
  }),
1080
1057
  r && /* @__PURE__ */ f("span", {
1081
- id: A,
1058
+ id: k,
1082
1059
  className: Z.descriptionText,
1083
1060
  children: r
1084
1061
  }),
1085
- k && /* @__PURE__ */ f("span", {
1086
- id: j,
1062
+ O && /* @__PURE__ */ f("span", {
1063
+ id: A,
1087
1064
  className: Z.errorText,
1088
1065
  children: v
1089
1066
  })
1090
1067
  ]
1091
1068
  });
1092
1069
  });
1093
- Qe.displayName = "Checkbox";
1070
+ tt.displayName = "Checkbox";
1094
1071
  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 = {
1072
+ inputWrapper: "_inputWrapper_13w4m_1",
1073
+ input: "_input_13w4m_1",
1074
+ error: "_error_13w4m_47",
1075
+ sm: "_sm_13w4m_55",
1076
+ md: "_md_13w4m_59",
1077
+ lg: "_lg_13w4m_63",
1078
+ hasLeftAdornment: "_hasLeftAdornment_13w4m_98",
1079
+ hasRightAdornment: "_hasRightAdornment_13w4m_102",
1080
+ leftAdornment: "_leftAdornment_13w4m_106",
1081
+ rightAdornment: "_rightAdornment_13w4m_107",
1082
+ clearButton: "_clearButton_13w4m_149",
1083
+ toneDefault: "_toneDefault_13w4m_189",
1084
+ tonePrimary: "_tonePrimary_13w4m_193",
1085
+ toneSecondary: "_toneSecondary_13w4m_197",
1086
+ toneSuccess: "_toneSuccess_13w4m_201",
1087
+ toneDanger: "_toneDanger_13w4m_205",
1088
+ toneMuted: "_toneMuted_13w4m_209",
1089
+ toneInverse: "_toneInverse_13w4m_213"
1090
+ }, nt = {
1114
1091
  default: Q.toneDefault,
1115
1092
  primary: Q.tonePrimary,
1116
1093
  secondary: Q.toneSecondary,
@@ -1118,7 +1095,7 @@ var Q = {
1118
1095
  danger: Q.toneDanger,
1119
1096
  muted: Q.toneMuted,
1120
1097
  inverse: Q.toneInverse
1121
- }, et = (e = "text", t) => {
1098
+ }, rt = (e = "text", t) => {
1122
1099
  if (t) return t;
1123
1100
  switch (e) {
1124
1101
  case "email": return "email";
@@ -1128,50 +1105,50 @@ var Q = {
1128
1105
  case "search": return "off";
1129
1106
  default: return;
1130
1107
  }
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
1108
+ }, 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) => {
1109
+ 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 = [
1110
+ P,
1111
+ i ? `${B}-description` : void 0,
1112
+ g ? `${B}-error` : void 0
1136
1113
  ].filter(Boolean).join(" "), ae = E ?? "×", oe = n((e) => {
1137
- if (z.current = e, typeof L == "function") {
1138
- L(e);
1114
+ if (ee.current = e, typeof R == "function") {
1115
+ R(e);
1139
1116
  return;
1140
1117
  }
1141
- L && (L.current = e);
1142
- }, [L]), se = n((e) => {
1118
+ R && (R.current = e);
1119
+ }, [R]), se = n((e) => {
1143
1120
  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,
1121
+ H || te(t), d?.(e);
1122
+ }, [H, d]), ce = n(() => {
1123
+ H || te(""), C?.(), ee.current?.focus();
1124
+ }, [H, C]), le = !W && !!T;
1125
+ return /* @__PURE__ */ f(Ae, {
1126
+ id: B,
1150
1127
  label: t,
1151
1128
  description: i,
1152
1129
  error: g,
1153
1130
  required: v,
1154
1131
  disabled: _,
1155
1132
  children: /* @__PURE__ */ p("div", {
1156
- className: M(Q.inputWrapper, {
1133
+ className: F(Q.inputWrapper, {
1157
1134
  [Q.hasLeftAdornment]: !!w,
1158
1135
  [Q.hasRightAdornment]: !!T || W
1159
1136
  }),
1160
1137
  children: [
1161
1138
  w && /* @__PURE__ */ f("span", {
1162
1139
  "aria-hidden": "true",
1163
- className: M(Q.leftAdornment, $e[D]),
1140
+ className: F(Q.leftAdornment, nt[D]),
1164
1141
  children: w
1165
1142
  }),
1166
1143
  /* @__PURE__ */ f("input", {
1167
- ...ee,
1144
+ ...L,
1168
1145
  ref: oe,
1169
- id: te,
1146
+ id: B,
1170
1147
  name: r,
1171
1148
  type: m,
1172
- autoComplete: U,
1173
- className: M(Q.input, Q[h], { [Q.error]: !!g }, y),
1174
- value: H,
1149
+ autoComplete: re,
1150
+ className: F(Q.input, Q[h], { [Q.error]: !!g }, y),
1151
+ value: ne,
1175
1152
  onChange: se,
1176
1153
  placeholder: o,
1177
1154
  disabled: _,
@@ -1181,42 +1158,42 @@ var Q = {
1181
1158
  maxLength: j,
1182
1159
  "aria-invalid": g ? !0 : I,
1183
1160
  "aria-describedby": ie || void 0,
1184
- onMouseEnter: N,
1185
- onMouseLeave: P
1161
+ onMouseEnter: M,
1162
+ onMouseLeave: N
1186
1163
  }),
1187
1164
  W && /* @__PURE__ */ f("button", {
1188
1165
  type: "button",
1189
- className: M(Q.clearButton, $e[k]),
1166
+ className: F(Q.clearButton, nt[k]),
1190
1167
  onClick: ce,
1191
1168
  "aria-label": "Clear input",
1192
1169
  children: ae
1193
1170
  }),
1194
1171
  le && /* @__PURE__ */ f("div", {
1195
- className: M(Q.rightAdornment, $e[O]),
1172
+ className: F(Q.rightAdornment, nt[O]),
1196
1173
  children: T
1197
1174
  })
1198
1175
  ]
1199
1176
  })
1200
1177
  });
1201
1178
  });
1202
- tt.displayName = "Input";
1179
+ it.displayName = "Input";
1203
1180
  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 = [
1181
+ root: "_root_ie5a6_1",
1182
+ invalid: "_invalid_ie5a6_14",
1183
+ control: "_control_ie5a6_14",
1184
+ label: "_label_ie5a6_17",
1185
+ wrapper: "_wrapper_ie5a6_20",
1186
+ input: "_input_ie5a6_21",
1187
+ disabled: "_disabled_ie5a6_24",
1188
+ description: "_description_ie5a6_32",
1189
+ sm: "_sm_ie5a6_36",
1190
+ md: "_md_ie5a6_45",
1191
+ lg: "_lg_ie5a6_54",
1192
+ indicator: "_indicator_ie5a6_109",
1193
+ content: "_content_ie5a6_202",
1194
+ error: "_error_ie5a6_219"
1195
+ }, 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) => {
1196
+ let b = Oe(), x = a(), S = h ?? x, C = u ? `${S}-description` : void 0, w = s ? `${S}-error` : void 0, E = [
1220
1197
  C,
1221
1198
  w,
1222
1199
  b?.describedBy,
@@ -1225,7 +1202,7 @@ var $ = {
1225
1202
  value: t,
1226
1203
  defaultValue: n,
1227
1204
  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) => {
1205
+ }), 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
1206
  if (!j) {
1230
1207
  if (D) {
1231
1208
  b.onValueChange(e);
@@ -1235,25 +1212,25 @@ var $ = {
1235
1212
  }
1236
1213
  };
1237
1214
  return /* @__PURE__ */ p("div", {
1238
- className: M($.root, $[I], F && $.invalid, j && $.disabled, m),
1215
+ className: F($.root, $[I], P && $.invalid, j && $.disabled, m),
1239
1216
  children: [/* @__PURE__ */ p("label", {
1240
1217
  htmlFor: S,
1241
- className: M($.wrapper, d),
1218
+ className: F($.wrapper, d),
1242
1219
  children: [
1243
1220
  /* @__PURE__ */ f("input", {
1244
1221
  ...v,
1245
1222
  ref: y,
1246
1223
  id: S,
1247
1224
  type: "radio",
1248
- name: P,
1225
+ name: N,
1249
1226
  value: e,
1250
1227
  checked: A,
1251
1228
  disabled: j,
1252
- required: N,
1253
- "aria-invalid": F || void 0,
1229
+ required: M,
1230
+ "aria-invalid": P || void 0,
1254
1231
  "aria-describedby": E,
1255
1232
  className: $.input,
1256
- onChange: ee
1233
+ onChange: L
1257
1234
  }),
1258
1235
  /* @__PURE__ */ f("span", {
1259
1236
  className: $.control,
@@ -1279,15 +1256,15 @@ var $ = {
1279
1256
  })]
1280
1257
  });
1281
1258
  });
1282
- nt.displayName = "Radio";
1259
+ at.displayName = "Radio";
1283
1260
  //#endregion
1284
1261
  //#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 }) => {
1262
+ var ot = e(null), st = (e) => e === "highContrast" ? "high-contrast" : e, ct = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1286
1263
  let [a, s] = T({
1287
1264
  value: e,
1288
1265
  defaultValue: t,
1289
1266
  onChange: n
1290
- }), c = it(a);
1267
+ }), c = st(a);
1291
1268
  i(() => {
1292
1269
  if (typeof document > "u") return;
1293
1270
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
@@ -1303,7 +1280,7 @@ var rt = e(null), it = (e) => e === "highContrast" ? "high-contrast" : e, at = (
1303
1280
  theme: a,
1304
1281
  setTheme: s
1305
1282
  }), [a, s]);
1306
- return /* @__PURE__ */ f(rt.Provider, {
1283
+ return /* @__PURE__ */ f(ot.Provider, {
1307
1284
  value: l,
1308
1285
  children: /* @__PURE__ */ f("div", {
1309
1286
  "data-vellira-theme": c,
@@ -1311,13 +1288,13 @@ var rt = e(null), it = (e) => e === "highContrast" ? "high-contrast" : e, at = (
1311
1288
  })
1312
1289
  });
1313
1290
  };
1314
- at.displayName = "ThemeProvider";
1291
+ ct.displayName = "ThemeProvider";
1315
1292
  //#endregion
1316
1293
  //#region src/theme/useTheme.ts
1317
- function ot() {
1318
- let e = r(rt);
1294
+ function lt() {
1295
+ let e = r(ot);
1319
1296
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1320
1297
  return e;
1321
1298
  }
1322
1299
  //#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 };
1300
+ 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 };