@vellira-ui/react 2.30.0 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { cloneElement as e, createContext as t, forwardRef as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
2
- import d from "clsx";
3
- import { createPortal as f } from "react-dom";
4
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
- import { FloatingPortal as g, arrow as _, autoUpdate as v, flip as y, offset as b, shift as x, size as S, useFloating as C, useFocus as w, useHover as T, useInteractions as E } from "@floating-ui/react";
6
- import { useControllableState as D, useDropdown as O, useModal as k, useSelect as A, useTabs as j, useTabsKeyboard as M } from "@vellira-ui/core";
7
- import { Check as N, ChevronDown as P, Close as F, Search as I } from "@vellira-ui/icons";
8
- import L from "focus-trap-react";
1
+ import { Children as e, cloneElement as t, createContext as n, forwardRef as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
2
+ import f from "clsx";
3
+ import { createPortal as p } from "react-dom";
4
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { FloatingPortal as _, arrow as v, autoUpdate as y, flip as b, offset as x, shift as S, size as C, useFloating as w, useFocus as T, useHover as E, useInteractions as D } from "@floating-ui/react";
6
+ import { useControllableState as O, useDropdown as k, useModal as A, useSelect as j, useTabs as M, useTabsKeyboard as N } from "@vellira-ui/core";
7
+ import { Check as P, ChevronDown as F, Close as I, Search as L } from "@vellira-ui/icons";
8
+ import R from "focus-trap-react";
9
9
  //#region src/utils/cn.ts
10
- var R = (...e) => d(e), z = ({ children: e }) => {
11
- let [t, n] = u(!1);
12
- if (o(() => {
10
+ var z = (...e) => f(e), ee = ({ children: e }) => {
11
+ let [t, n] = d(!1);
12
+ if (s(() => {
13
13
  n(!0);
14
14
  }, []), !t) return null;
15
15
  let r = document.getElementById("overlay-root") ?? document.body;
16
- return r ? f(e, r) : null;
16
+ return r ? p(e, r) : null;
17
17
  }, B = {
18
18
  dropdown: "_dropdown_1rvx9_1",
19
19
  "dropdown-in": "_dropdown-in_1rvx9_1"
20
- }, V = n(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("ul", {
20
+ }, te = r(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ h(ee, { children: /* @__PURE__ */ h("ul", {
21
21
  ref: c,
22
22
  id: n,
23
23
  role: "menu",
@@ -27,60 +27,61 @@ var R = (...e) => d(e), z = ({ children: e }) => {
27
27
  "aria-activedescendant": a,
28
28
  onKeyDown: o,
29
29
  style: t,
30
- className: R(B.dropdown, s),
30
+ className: z(B.dropdown, s),
31
31
  children: e
32
32
  }) }));
33
- V.displayName = "DropdownContent";
33
+ te.displayName = "DropdownContent";
34
34
  //#endregion
35
35
  //#region src/hooks/useFloatingPosition.ts
36
- var H = (e) => {
37
- let [t, n] = u(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
- return o(() => {
36
+ var ne = (e) => {
37
+ let [t, n] = d(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
+ return s(() => {
39
39
  if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
40
40
  let t = window.matchMedia(`(max-width: ${e}px)`), r = () => n(t.matches);
41
41
  return r(), t.addEventListener("change", r), () => {
42
42
  t.removeEventListener("change", r);
43
43
  };
44
44
  }, [e]), t;
45
- }, ee = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: i = !1, mobileSheetBreakpoint: a, middleware: s = [] } = {}) => {
46
- let l = H(a), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = C({
45
+ }, re = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: i = !1, avoidCollisions: a = !0, mobileSheetBreakpoint: o, middleware: c = [] } = {}) => {
46
+ let u = ne(o), { refs: d, floatingStyles: f, update: p, context: m, middlewareData: h, placement: g } = w({
47
47
  open: e,
48
48
  onOpenChange: t,
49
49
  placement: n,
50
50
  strategy: r,
51
51
  transform: !1,
52
- middleware: c(() => [
53
- b(2),
54
- y(),
55
- S({ apply({ rects: e, elements: t }) {
56
- !i || l || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
52
+ middleware: l(() => [
53
+ x(2),
54
+ ...a ? [b()] : [],
55
+ C({ apply({ rects: e, elements: t }) {
56
+ !i || u || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
57
57
  } }),
58
- x({ padding: 8 }),
59
- ...s
58
+ ...a ? [S({ padding: 8 })] : [],
59
+ ...c
60
60
  ], [
61
- s,
62
- l,
61
+ a,
62
+ c,
63
+ u,
63
64
  i
64
65
  ]),
65
- whileElementsMounted: v
66
+ whileElementsMounted: y
66
67
  });
67
- return o(() => {
68
- l && u.floating.current?.style.removeProperty("width");
69
- }, [l, u.floating]), {
70
- context: p,
71
- placement: h,
72
- middlewareData: m,
73
- floatingStyles: l ? {} : d,
74
- isMobileSheet: l,
75
- setRef: u.setReference,
76
- setFloatingRef: u.setFloating,
77
- updatePosition: f
68
+ return s(() => {
69
+ u && d.floating.current?.style.removeProperty("width");
70
+ }, [u, d.floating]), {
71
+ context: m,
72
+ placement: g,
73
+ middlewareData: h,
74
+ floatingStyles: u ? {} : f,
75
+ isMobileSheet: u,
76
+ setRef: d.setReference,
77
+ setFloatingRef: d.setFloating,
78
+ updatePosition: p
78
79
  };
79
- }, te = (e, t, n = !0) => {
80
- let r = l(e);
80
+ }, ie = (e, t, n = !0) => {
81
+ let r = u(e);
81
82
  r.current = e;
82
- let i = l(t);
83
- i.current = t, o(() => {
83
+ let i = u(t);
84
+ i.current = t, s(() => {
84
85
  if (!n) return;
85
86
  let e = (e) => {
86
87
  let t = e.target;
@@ -88,11 +89,11 @@ var H = (e) => {
88
89
  };
89
90
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
90
91
  }, [n]);
91
- }, ne = { group: "_group_aviwv_1" }, re = ({ label: e }) => /* @__PURE__ */ m("li", {
92
+ }, ae = { group: "_group_aviwv_1" }, oe = ({ label: e }) => /* @__PURE__ */ h("li", {
92
93
  role: "presentation",
93
- className: ne.group,
94
+ className: ae.group,
94
95
  children: e
95
- }), U = {
96
+ }), V = {
96
97
  item: "_item_re11y_1",
97
98
  disabled: "_disabled_re11y_21",
98
99
  active: "_active_re11y_34",
@@ -103,9 +104,9 @@ var H = (e) => {
103
104
  "itemText--truncate": "_itemText--truncate_re11y_88",
104
105
  "itemText--wrap": "_itemText--wrap_re11y_93",
105
106
  "itemText--nowrap": "_itemText--nowrap_re11y_97"
106
- }, ie = ({ 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
+ }, se = ({ 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
108
  let f = t || n;
108
- return /* @__PURE__ */ h("li", {
109
+ return /* @__PURE__ */ g("li", {
109
110
  id: e,
110
111
  role: "menuitem",
111
112
  tabIndex: -1,
@@ -114,32 +115,32 @@ var H = (e) => {
114
115
  "data-danger": i || void 0,
115
116
  onClick: a ? void 0 : s,
116
117
  onMouseEnter: a ? void 0 : c,
117
- className: R(U.item, {
118
- [U.active]: o,
119
- [U.disabled]: a,
120
- [U.danger]: i
118
+ className: z(V.item, {
119
+ [V.active]: o,
120
+ [V.disabled]: a,
121
+ [V.danger]: i
121
122
  }, d),
122
123
  children: [
123
- r && /* @__PURE__ */ m("span", {
124
+ r && /* @__PURE__ */ h("span", {
124
125
  "aria-hidden": "true",
125
- className: U.itemIcon,
126
+ className: V.itemIcon,
126
127
  children: r
127
128
  }),
128
- f && /* @__PURE__ */ m("span", {
129
- className: R(U.itemText, U[`itemText--${u}`]),
129
+ f && /* @__PURE__ */ h("span", {
130
+ className: z(V.itemText, V[`itemText--${u}`]),
130
131
  children: f
131
132
  }),
132
- l && /* @__PURE__ */ m("span", {
133
- className: U.itemShortcut,
133
+ l && /* @__PURE__ */ h("span", {
134
+ className: V.itemShortcut,
134
135
  children: l
135
136
  })
136
137
  ]
137
138
  });
138
- }, ae = { separator: "_separator_1v11r_1" }, oe = () => /* @__PURE__ */ m("li", {
139
+ }, ce = { separator: "_separator_1v11r_1" }, le = () => /* @__PURE__ */ h("li", {
139
140
  role: "separator",
140
- className: ae.separator,
141
+ className: ce.separator,
141
142
  "aria-hidden": "true"
142
- }), W = {
143
+ }), ue = {
143
144
  button: "_button_18ucr_1",
144
145
  disabled: "_disabled_18ucr_20",
145
146
  iconLeft: "_iconLeft_18ucr_32",
@@ -149,72 +150,72 @@ var H = (e) => {
149
150
  md: "_md_18ucr_72",
150
151
  lg: "_lg_18ucr_84",
151
152
  open: "_open_18ucr_123"
152
- }, se = n(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, size: o = "md", label: s, ariaLabel: c, className: l, ...u }, d) => {
153
- let f = !!n, p = !!e, g = f && !p, _ = i && p, v = r ?? /* @__PURE__ */ m(P, {}), y = c ?? (g ? typeof s == "string" ? s : "Open menu" : void 0);
154
- return /* @__PURE__ */ h("button", {
153
+ }, de = r(({ 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) => {
154
+ let f = !!n, p = !!e, m = f && !p, _ = i && p, v = r ?? /* @__PURE__ */ h(F, {}), y = c ?? (m ? typeof s == "string" ? s : "Open menu" : void 0);
155
+ return /* @__PURE__ */ g("button", {
155
156
  ...u,
156
157
  ref: d,
157
158
  type: "button",
158
- className: R(W.button, W[o], {
159
- [W.disabled]: u.disabled,
160
- [W.iconOnly]: g
159
+ className: z(ue.button, ue[o], {
160
+ [ue.disabled]: u.disabled,
161
+ [ue.iconOnly]: m
161
162
  }, l),
162
163
  "aria-label": y,
163
164
  "aria-expanded": t,
164
165
  "aria-haspopup": "menu",
165
166
  style: { "--dropdown-rotate-angle": `${a}deg` },
166
167
  children: [
167
- f && /* @__PURE__ */ m("span", {
168
+ f && /* @__PURE__ */ h("span", {
168
169
  "aria-hidden": "true",
169
- className: W.iconLeft,
170
+ className: ue.iconLeft,
170
171
  children: n
171
172
  }),
172
173
  e,
173
- _ && /* @__PURE__ */ m("span", {
174
+ _ && /* @__PURE__ */ h("span", {
174
175
  "aria-hidden": "true",
175
- className: R(W.arrow, { [W.open]: t }),
176
+ className: z(ue.arrow, { [ue.open]: t }),
176
177
  children: v
177
178
  })
178
179
  ]
179
180
  });
180
181
  });
181
- se.displayName = "DropdownTrigger";
182
+ de.displayName = "DropdownTrigger";
182
183
  //#endregion
183
184
  //#region src/components/Dropdown/types.ts
184
- var ce = (e) => e.type === void 0 || e.type === "item", le = (e) => e.type === "group", ue = (e) => e.type === "separator", de = { wrapper: "_wrapper_14ue8_1" }, G = ({ label: e, ariaLabel: t, icon: n, trigger: r, items: a = [], onSelect: o, open: u, defaultOpen: d = !1, onOpenChange: f, size: p = "md", className: g, triggerClassName: _, contentClassName: v, itemClassName: y, disabled: b, rotateAngle: x = 90, placement: S, matchTriggerWidth: C, textWrap: w, showArrow: T = !0, arrowIcon: E }) => {
185
- let D = l(null), k = l(null), A = s(), j = `${A}-trigger`, { floatingStyles: M, setRef: N, setFloatingRef: P } = ee({
185
+ var fe = (e) => e.type === void 0 || e.type === "item", pe = (e) => e.type === "group", me = (e) => e.type === "separator", he = { wrapper: "_wrapper_14ue8_1" }, ge = ({ label: e, ariaLabel: t, icon: n, trigger: r, items: i = [], onSelect: o, open: s, defaultOpen: d = !1, onOpenChange: f, size: p = "md", className: m, triggerClassName: _, contentClassName: v, itemClassName: y, disabled: b, rotateAngle: x = 90, placement: S, matchTriggerWidth: C, textWrap: w, showArrow: T = !0, arrowIcon: E }) => {
186
+ let D = u(null), O = u(null), A = c(), j = `${A}-trigger`, { floatingStyles: M, setRef: N, setFloatingRef: P } = re({
186
187
  placement: S,
187
188
  matchTriggerWidth: C,
188
189
  mobileSheetBreakpoint: 640
189
- }), F = c(() => a.flatMap((e, t) => ce(e) ? [{
190
+ }), F = l(() => i.flatMap((e, t) => fe(e) ? [{
190
191
  item: e,
191
192
  itemIndex: t
192
- }] : []), [a]), I = c(() => F.map(({ item: e }) => e), [F]), L = c(() => new Map(F.map(({ itemIndex: e }, t) => [e, t])), [F]), { activeIndex: z, setActiveIndex: B, isOpen: H, closeDropdown: ne, toggleDropdown: U, selectItem: ae, onKeyDown: W } = O({
193
+ }] : []), [i]), I = l(() => F.map(({ item: e }) => e), [F]), L = l(() => new Map(F.map(({ itemIndex: e }, t) => [e, t])), [F]), { activeIndex: R, setActiveIndex: ee, isOpen: B, closeDropdown: ne, toggleDropdown: ae, selectItem: V, onKeyDown: ce } = k({
193
194
  items: I,
194
- open: u,
195
+ open: s,
195
196
  defaultOpen: d,
196
197
  disabled: b,
197
198
  onOpenChange: f,
198
- onSelect: i((e) => {
199
+ onSelect: a((e) => {
199
200
  o?.(e), D.current?.focus();
200
201
  }, [o]),
201
202
  getItemValue: (e) => e.value,
202
203
  getItemText: (e) => typeof e.label == "string" ? e.label : e.value
203
- }), G = H && z >= 0 ? `${A}-item-${z}` : void 0;
204
- te([D, k], ne, H);
205
- let K = i((e) => {
206
- W(e), H && e.key === "Escape" && D.current?.focus();
207
- }, [H, W]), fe = i((e) => {
204
+ }), ue = B && R >= 0 ? `${A}-item-${R}` : void 0;
205
+ ie([D, O], ne, B);
206
+ let ge = a((e) => {
207
+ ce(e), B && e.key === "Escape" && D.current?.focus();
208
+ }, [B, ce]), _e = a((e) => {
208
209
  D.current = e, N(e);
209
- }, [N]), pe = i((e) => {
210
- k.current = e, P(e), e?.focus();
210
+ }, [N]), ve = a((e) => {
211
+ O.current = e, P(e), e?.focus();
211
212
  }, [P]);
212
- return /* @__PURE__ */ h("div", {
213
- className: R(de.wrapper, g),
214
- children: [/* @__PURE__ */ m(se, {
215
- ref: fe,
213
+ return /* @__PURE__ */ g("div", {
214
+ className: z(he.wrapper, m),
215
+ children: [/* @__PURE__ */ h(de, {
216
+ ref: _e,
216
217
  id: j,
217
- isOpen: H,
218
+ isOpen: B,
218
219
  disabled: b,
219
220
  size: p,
220
221
  icon: n,
@@ -224,37 +225,37 @@ var ce = (e) => e.type === void 0 || e.type === "item", le = (e) => e.type === "
224
225
  arrowIcon: E,
225
226
  rotateAngle: x,
226
227
  className: _,
227
- onClick: U,
228
- onKeyDown: K,
229
- "aria-expanded": H,
228
+ onClick: ae,
229
+ onKeyDown: ge,
230
+ "aria-expanded": B,
230
231
  "aria-haspopup": "menu",
231
- ...H && { "aria-controls": A },
232
+ ...B && { "aria-controls": A },
232
233
  children: r
233
- }), H && /* @__PURE__ */ m(V, {
234
- ref: pe,
234
+ }), B && /* @__PURE__ */ h(te, {
235
+ ref: ve,
235
236
  floatingStyles: M,
236
237
  menuId: A,
237
238
  labelledById: r ? j : void 0,
238
239
  label: t ?? (!r && typeof e == "string" ? e : void 0),
239
- activeDescendantId: G,
240
- onKeyDown: K,
240
+ activeDescendantId: ue,
241
+ onKeyDown: ge,
241
242
  className: v,
242
- children: a.map((e, t) => {
243
- if (le(e)) return /* @__PURE__ */ m(re, { label: e.label }, `group-${e.label}`);
244
- if (ue(e)) return /* @__PURE__ */ m(oe, {}, `separator-${t}`);
245
- if (ce(e)) {
243
+ children: i.map((e, t) => {
244
+ if (pe(e)) return /* @__PURE__ */ h(oe, { label: e.label }, `group-${e.label}`);
245
+ if (me(e)) return /* @__PURE__ */ h(le, {}, `separator-${t}`);
246
+ if (fe(e)) {
246
247
  let n = L.get(t) ?? -1;
247
- return /* @__PURE__ */ m(ie, {
248
+ return /* @__PURE__ */ h(se, {
248
249
  id: `${A}-item-${n}`,
249
250
  ...e,
250
- active: z === n,
251
+ active: R === n,
251
252
  textWrap: e.textWrap || w,
252
253
  className: y,
253
254
  onClick: () => {
254
- ae(e), D.current?.focus();
255
+ V(e), D.current?.focus();
255
256
  },
256
257
  onMouseEnter: () => {
257
- n < 0 || e.disabled || B(n);
258
+ n < 0 || e.disabled || ee(n);
258
259
  },
259
260
  children: e.label
260
261
  }, `${e.value}-${t}`);
@@ -262,142 +263,142 @@ var ce = (e) => e.type === void 0 || e.type === "item", le = (e) => e.type === "
262
263
  })
263
264
  })]
264
265
  });
265
- }, K = t(void 0), fe = () => {
266
- let e = a(K);
266
+ }, _e = n(void 0), ve = () => {
267
+ let e = o(_e);
267
268
  if (e === void 0) throw Error("Modal compound components must be used inside Modal");
268
269
  return e;
269
270
  };
270
- K.displayName = "ModalContext";
271
- var pe = { modalBody: "_modalBody_iv33a_1" }, me = ({ children: e }) => {
272
- let { descriptionId: t } = fe();
273
- return /* @__PURE__ */ m("div", {
271
+ _e.displayName = "ModalContext";
272
+ var ye = { modalBody: "_modalBody_iv33a_1" }, be = ({ children: e }) => {
273
+ let { descriptionId: t } = ve();
274
+ return /* @__PURE__ */ h("div", {
274
275
  id: t,
275
- className: pe.modalBody,
276
+ className: ye.modalBody,
276
277
  children: e
277
278
  });
278
279
  };
279
- me.displayName = "ModalBody";
280
- var he = { content: "_content_k44g7_1" }, ge = ({ children: e }) => /* @__PURE__ */ m("div", {
281
- className: he.content,
280
+ be.displayName = "ModalBody";
281
+ var xe = { content: "_content_k44g7_1" }, H = ({ children: e }) => /* @__PURE__ */ h("div", {
282
+ className: xe.content,
282
283
  children: e
283
284
  });
284
- ge.displayName = "ModalContent";
285
- var _e = { modalFooter: "_modalFooter_ezys6_1" }, ve = ({ children: e }) => /* @__PURE__ */ m("div", {
286
- className: _e.modalFooter,
285
+ H.displayName = "ModalContent";
286
+ var U = { modalFooter: "_modalFooter_ezys6_1" }, W = ({ children: e }) => /* @__PURE__ */ h("div", {
287
+ className: U.modalFooter,
287
288
  children: e
288
289
  });
289
- ve.displayName = "ModalFooter";
290
- var ye = {
290
+ W.displayName = "ModalFooter";
291
+ var Se = {
291
292
  modalHeader: "_modalHeader_p8xf1_1",
292
293
  modalHeaderTitle: "_modalHeaderTitle_p8xf1_7",
293
294
  modalHeaderCloseButton: "_modalHeaderCloseButton_p8xf1_14"
294
- }, be = ({ children: e }) => {
295
- let { onClose: t, titleId: n } = fe();
296
- return /* @__PURE__ */ h("div", {
297
- className: ye.modalHeader,
298
- children: [/* @__PURE__ */ m("h2", {
295
+ }, Ce = ({ children: e }) => {
296
+ let { onClose: t, titleId: n } = ve();
297
+ return /* @__PURE__ */ g("div", {
298
+ className: Se.modalHeader,
299
+ children: [/* @__PURE__ */ h("h2", {
299
300
  id: n,
300
- className: ye.modalHeaderTitle,
301
+ className: Se.modalHeaderTitle,
301
302
  children: e
302
- }), t && /* @__PURE__ */ m("button", {
303
+ }), t && /* @__PURE__ */ h("button", {
303
304
  type: "button",
304
- className: ye.modalHeaderCloseButton,
305
+ className: Se.modalHeaderCloseButton,
305
306
  onClick: t,
306
307
  "aria-label": "Close modal",
307
- children: /* @__PURE__ */ m(F, { size: 16 })
308
+ children: /* @__PURE__ */ h(I, { size: 16 })
308
309
  })]
309
310
  });
310
311
  };
311
- be.displayName = "ModalHeader";
312
+ Ce.displayName = "ModalHeader";
312
313
  //#endregion
313
314
  //#region src/hooks/useModalKeyboard.ts
314
- var xe = ({ isOpen: e, onClose: t }) => {
315
- let n = i((n) => {
315
+ var we = ({ isOpen: e, onClose: t }) => {
316
+ let n = a((n) => {
316
317
  e && n.key === "Escape" && (n.preventDefault(), t?.());
317
318
  }, [e, t]);
318
- o(() => (document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)), [n]);
319
- }, Se = {
319
+ s(() => (document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)), [n]);
320
+ }, Te = {
320
321
  overlay: "_overlay_dcudn_1",
321
322
  "overlay--open": "_overlay--open_dcudn_14",
322
323
  modal: "_modal_dcudn_20",
323
324
  "overlay--animated": "_overlay--animated_dcudn_28"
324
- }, Ce = 0, we = "", Te = ({ children: e, onClose: t, isOpen: n, className: r, closeOnBackdrop: a, closeOnClick: s, closeOnEsc: c = !0, zIndex: u = 1e3, animated: d = !0 }) => {
325
- let f = a ?? s ?? !0, p = l(null), { titleId: h, descriptionId: g } = fe(), _ = i((e) => {
325
+ }, Ee = 0, De = "", Oe = ({ children: e, onClose: t, isOpen: n, className: r, closeOnBackdrop: i, closeOnClick: o, closeOnEsc: c = !0, zIndex: l = 1e3, animated: d = !0 }) => {
326
+ let f = i ?? o ?? !0, p = u(null), { titleId: m, descriptionId: g } = ve(), _ = a((e) => {
326
327
  f && e.target === e.currentTarget && t?.();
327
328
  }, [f, t]);
328
- return xe({
329
+ return we({
329
330
  isOpen: n,
330
331
  onClose: c ? t : void 0
331
- }), o(() => {
332
- if (n) return Ce === 0 && (we = document.body.style.overflow), Ce += 1, document.body.style.overflow = "hidden", () => {
333
- Ce = Math.max(0, Ce - 1), Ce === 0 && (document.body.style.overflow = we);
332
+ }), s(() => {
333
+ if (n) return Ee === 0 && (De = document.body.style.overflow), Ee += 1, document.body.style.overflow = "hidden", () => {
334
+ Ee = Math.max(0, Ee - 1), Ee === 0 && (document.body.style.overflow = De);
334
335
  };
335
- }, [n]), !n && !d ? null : /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("div", {
336
- className: R(Se.overlay, n && Se["overlay--open"], d && Se["overlay--animated"], r),
336
+ }, [n]), !n && !d ? null : /* @__PURE__ */ h(ee, { children: /* @__PURE__ */ h("div", {
337
+ className: z(Te.overlay, n && Te["overlay--open"], d && Te["overlay--animated"], r),
337
338
  onClick: _,
338
339
  tabIndex: -1,
339
340
  role: "presentation",
340
341
  "aria-hidden": !n,
341
- style: { zIndex: u },
342
- children: /* @__PURE__ */ m(L, {
342
+ style: { zIndex: l },
343
+ children: /* @__PURE__ */ h(R, {
343
344
  active: n,
344
345
  focusTrapOptions: {
345
346
  fallbackFocus: () => p.current,
346
347
  returnFocusOnDeactivate: !0,
347
348
  allowOutsideClick: !0
348
349
  },
349
- children: /* @__PURE__ */ m("div", {
350
+ children: /* @__PURE__ */ h("div", {
350
351
  ref: p,
351
352
  tabIndex: -1,
352
- className: Se.modal,
353
+ className: Te.modal,
353
354
  role: "dialog",
354
355
  "aria-modal": "true",
355
- "aria-labelledby": h,
356
+ "aria-labelledby": m,
356
357
  "aria-describedby": g,
357
358
  children: e
358
359
  })
359
360
  })
360
361
  }) });
361
362
  };
362
- Te.displayName = "ModalOverlay";
363
+ Oe.displayName = "ModalOverlay";
363
364
  //#endregion
364
365
  //#region src/components/Modal/Modal.tsx
365
- var Ee = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
366
- let o = k({
366
+ var ke = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
367
+ let o = A({
367
368
  isOpen: e,
368
369
  onClose: n,
369
370
  closeOnBackdrop: r,
370
371
  closeOnClick: i,
371
372
  closeOnEsc: a
372
373
  });
373
- return o.shouldRender ? /* @__PURE__ */ m(K.Provider, {
374
+ return o.shouldRender ? /* @__PURE__ */ h(_e.Provider, {
374
375
  value: {
375
376
  onClose: o.onClose,
376
377
  titleId: o.titleId,
377
378
  descriptionId: o.descriptionId
378
379
  },
379
- children: /* @__PURE__ */ m(Te, {
380
+ children: /* @__PURE__ */ h(Oe, {
380
381
  isOpen: o.isOpen,
381
382
  onClose: o.onClose,
382
383
  closeOnBackdrop: o.closeOnBackdrop,
383
384
  closeOnEsc: o.closeOnEsc,
384
- children: /* @__PURE__ */ m(ge, { children: t })
385
+ children: /* @__PURE__ */ h(H, { children: t })
385
386
  })
386
387
  }) : null;
387
388
  };
388
- Ee.displayName = "Modal";
389
+ ke.displayName = "Modal";
389
390
  //#endregion
390
391
  //#region src/components/Modal/index.ts
391
- var De = Object.assign(Ee, {
392
- Header: be,
393
- Body: me,
394
- Content: ge,
395
- Footer: ve
396
- }), Oe = t(null), ke = Oe.Provider;
397
- function Ae() {
398
- return a(Oe);
392
+ var Ae = Object.assign(ke, {
393
+ Header: Ce,
394
+ Body: be,
395
+ Content: H,
396
+ Footer: W
397
+ }), je = n(null), Me = je.Provider;
398
+ function Ne() {
399
+ return o(je);
399
400
  }
400
- var q = {
401
+ var G = {
401
402
  root: "_root_1n02e_1",
402
403
  label: "_label_1n02e_9",
403
404
  required: "_required_1n02e_21",
@@ -408,13 +409,13 @@ var q = {
408
409
  error: "_error_1n02e_51",
409
410
  disabled: "_disabled_1n02e_59",
410
411
  invalid: "_invalid_1n02e_75"
411
- }, je = n(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: a = "md", color: o = "primary", name: c, label: l, description: u, error: d, orientation: f = "vertical", children: p, className: g, id: _, ...v }, y) => {
412
- let b = s(), x = _ ?? b, S = l ? `${x}-label` : void 0, C = u ? `${x}-description` : void 0, w = d ? `${x}-error` : void 0, T = [C, w].filter(Boolean).join(" ") || void 0, E = c ?? `${x}-radio`, [O, k] = D({
412
+ }, Pe = r(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: a = "md", color: o = "primary", name: s, label: l, description: u, error: d, orientation: f = "vertical", children: p, className: m, id: _, ...v }, y) => {
413
+ let b = c(), x = _ ?? b, S = l ? `${x}-label` : void 0, C = u ? `${x}-description` : void 0, w = d ? `${x}-error` : void 0, T = [C, w].filter(Boolean).join(" ") || void 0, E = s ?? `${x}-radio`, [D, k] = O({
413
414
  value: e,
414
415
  defaultValue: t,
415
416
  onChange: n
416
417
  }), A = !!d;
417
- return /* @__PURE__ */ h("div", {
418
+ return /* @__PURE__ */ g("div", {
418
419
  ...v,
419
420
  ref: y,
420
421
  id: x,
@@ -424,26 +425,26 @@ var q = {
424
425
  "aria-disabled": r || void 0,
425
426
  "aria-required": i || void 0,
426
427
  "aria-invalid": A || void 0,
427
- className: R(q.root, A && q.invalid, r && q.disabled, g),
428
+ className: z(G.root, A && G.invalid, r && G.disabled, m),
428
429
  children: [
429
- l && /* @__PURE__ */ h("div", {
430
+ l && /* @__PURE__ */ g("div", {
430
431
  id: S,
431
- className: q.label,
432
- children: [l, i && /* @__PURE__ */ m("span", {
433
- className: q.required,
432
+ className: G.label,
433
+ children: [l, i && /* @__PURE__ */ h("span", {
434
+ className: G.required,
434
435
  "aria-hidden": "true",
435
436
  children: "*"
436
437
  })]
437
438
  }),
438
- u && /* @__PURE__ */ m("div", {
439
+ u && /* @__PURE__ */ h("div", {
439
440
  id: C,
440
- className: q.description,
441
+ className: G.description,
441
442
  children: u
442
443
  }),
443
- /* @__PURE__ */ m(ke, {
444
+ /* @__PURE__ */ h(Me, {
444
445
  value: {
445
446
  name: E,
446
- value: O,
447
+ value: D,
447
448
  disabled: r,
448
449
  required: i,
449
450
  invalid: A,
@@ -452,23 +453,23 @@ var q = {
452
453
  describedBy: T,
453
454
  onValueChange: k
454
455
  },
455
- children: /* @__PURE__ */ m("div", {
456
- className: R(q.items, q[f]),
456
+ children: /* @__PURE__ */ h("div", {
457
+ className: z(G.items, G[f]),
457
458
  children: p
458
459
  })
459
460
  }),
460
- d && /* @__PURE__ */ m("div", {
461
+ d && /* @__PURE__ */ h("div", {
461
462
  id: w,
462
- className: q.error,
463
+ className: G.error,
463
464
  children: d
464
465
  })
465
466
  ]
466
467
  });
467
468
  });
468
- je.displayName = "RadioGroup";
469
+ Pe.displayName = "RadioGroup";
469
470
  //#endregion
470
471
  //#region src/patterns/FormField/FormFieldContext.ts
471
- var Me = t(null), Ne = () => a(Me), J = {
472
+ var Fe = n(null), Ie = () => o(Fe), K = {
472
473
  wrapper: "_wrapper_143kr_1",
473
474
  sm: "_sm_143kr_41",
474
475
  md: "_md_143kr_78",
@@ -484,311 +485,799 @@ var Me = t(null), Ne = () => a(Me), J = {
484
485
  optional: "_optional_143kr_194",
485
486
  labelInfo: "_labelInfo_143kr_201",
486
487
  disabled: "_disabled_143kr_243"
487
- }, Pe = (...e) => e.filter(Boolean).join(" ") || void 0, Fe = ({ id: t, label: n, description: i, error: a, required: o = !1, disabled: c = !1, invalid: l = !1, orientation: u = "vertical", labelPosition: d = "top", size: f = "md", labelInfo: p, optionalText: g, children: _, bindControl: v = !0, className: y, controlClassName: b, labelClassName: x, descriptionClassName: S, errorClassName: C, ...w }) => {
488
- let T = s(), E = t ?? T, D = n ? `${E}-label` : void 0, O = i && E ? `${E}-description` : void 0, k = a && E ? `${E}-error` : void 0, A = l || !!a, j = Pe(D), M = Pe(O, k), N = {
488
+ }, Le = (...e) => e.filter(Boolean).join(" ") || void 0, Re = ({ id: e, label: n, description: r, error: a, required: o = !1, disabled: s = !1, invalid: l = !1, orientation: u = "vertical", labelPosition: d = "top", size: f = "md", labelInfo: p, optionalText: m, children: _, bindControl: v = !0, className: y, controlClassName: b, labelClassName: x, descriptionClassName: S, errorClassName: C, ...w }) => {
489
+ let T = c(), E = e ?? T, D = n ? `${E}-label` : void 0, O = r && E ? `${E}-description` : void 0, k = a && E ? `${E}-error` : void 0, A = l || !!a, j = Le(D), M = Le(O, k), N = {
489
490
  controlId: E,
490
491
  labelId: D,
491
492
  descriptionId: O,
492
493
  errorId: k,
493
494
  required: o,
494
- disabled: c,
495
+ disabled: s,
495
496
  invalid: A,
496
497
  size: f,
497
498
  ariaLabelledBy: j,
498
499
  ariaDescribedBy: M
499
- }, P = r(_) ? _ : void 0, F = v && P ? e(P, {
500
+ }, P = i(_) ? _ : void 0, F = v && P ? t(P, {
500
501
  id: P.props.id ?? E,
501
502
  required: P.props.required ?? o,
502
- disabled: P.props.disabled ?? c,
503
+ disabled: P.props.disabled ?? s,
503
504
  "aria-invalid": P.props["aria-invalid"] ?? (A || void 0),
504
- "aria-labelledby": Pe(P.props["aria-labelledby"], j),
505
- "aria-describedby": Pe(P.props["aria-describedby"], M)
505
+ "aria-labelledby": Le(P.props["aria-labelledby"], j),
506
+ "aria-describedby": Le(P.props["aria-describedby"], M)
506
507
  }) : _;
507
- return /* @__PURE__ */ h("div", {
508
+ return /* @__PURE__ */ g("div", {
508
509
  ...w,
509
- "aria-disabled": c || void 0,
510
- className: R(J.wrapper, J[u], J[d], J[f], c && J.disabled, y),
511
- "data-disabled": c || void 0,
510
+ "aria-disabled": s || void 0,
511
+ className: z(K.wrapper, K[u], K[d], K[f], s && K.disabled, y),
512
+ "data-disabled": s || void 0,
512
513
  "data-invalid": A || void 0,
513
514
  "data-orientation": u,
514
515
  "data-size": f,
515
516
  children: [
516
- n && /* @__PURE__ */ h("label", {
517
+ n && /* @__PURE__ */ g("label", {
517
518
  id: D,
518
519
  htmlFor: E,
519
- className: R(J.label, x),
520
+ className: z(K.label, x),
520
521
  children: [
521
- /* @__PURE__ */ m("span", {
522
- className: J.labelText,
522
+ /* @__PURE__ */ h("span", {
523
+ className: K.labelText,
523
524
  children: n
524
525
  }),
525
- o && /* @__PURE__ */ m("span", {
526
- className: J.required,
526
+ o && /* @__PURE__ */ h("span", {
527
+ className: K.required,
527
528
  "aria-hidden": "true",
528
529
  children: "*"
529
530
  }),
530
- !o && g && /* @__PURE__ */ m("span", {
531
- className: J.optional,
532
- children: g
531
+ !o && m && /* @__PURE__ */ h("span", {
532
+ className: K.optional,
533
+ children: m
533
534
  }),
534
- p && /* @__PURE__ */ m("span", {
535
- className: J.labelInfo,
535
+ p && /* @__PURE__ */ h("span", {
536
+ className: K.labelInfo,
536
537
  children: p
537
538
  })
538
539
  ]
539
540
  }),
540
- i && /* @__PURE__ */ m("div", {
541
+ r && /* @__PURE__ */ h("div", {
541
542
  id: O,
542
- className: R(J.description, S),
543
- children: i
543
+ className: z(K.description, S),
544
+ children: r
544
545
  }),
545
- /* @__PURE__ */ m(Me.Provider, {
546
+ /* @__PURE__ */ h(Fe.Provider, {
546
547
  value: N,
547
- children: /* @__PURE__ */ m("div", {
548
- className: R(J.control, b),
548
+ children: /* @__PURE__ */ h("div", {
549
+ className: z(K.control, b),
549
550
  children: F
550
551
  })
551
552
  }),
552
- a && /* @__PURE__ */ m("div", {
553
+ a && /* @__PURE__ */ h("div", {
553
554
  id: k,
554
- className: R(J.errorText, C),
555
+ className: z(K.errorText, C),
555
556
  role: "alert",
556
557
  children: a
557
558
  })
558
559
  ]
559
560
  });
560
- }, Ie = {
561
- option: "_option_l6qjj_1",
562
- selected: "_selected_l6qjj_18",
563
- disabled: "_disabled_l6qjj_18",
564
- active: "_active_l6qjj_34",
565
- label: "_label_l6qjj_46",
566
- check: "_check_l6qjj_54"
567
- }, Le = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
568
- let o = !!e.disabled;
569
- return /* @__PURE__ */ h("li", {
561
+ }, q = {
562
+ option: "_option_8aali_1",
563
+ selected: "_selected_8aali_18",
564
+ disabled: "_disabled_8aali_18",
565
+ active: "_active_8aali_37",
566
+ label: "_label_8aali_51",
567
+ content: "_content_8aali_60",
568
+ custom: "_custom_8aali_61",
569
+ description: "_description_8aali_66",
570
+ icon: "_icon_8aali_77",
571
+ badge: "_badge_8aali_87",
572
+ shortcut: "_shortcut_8aali_88",
573
+ success: "_success_8aali_108",
574
+ warning: "_warning_8aali_112",
575
+ danger: "_danger_8aali_116",
576
+ check: "_check_8aali_120",
577
+ checkPop: "_checkPop_8aali_1"
578
+ }, ze = ({ option: e, isSelected: t, isActive: n, optionId: r, renderOption: i, onSelect: a, onMouseEnter: o }) => {
579
+ let s = !!e.disabled;
580
+ return /* @__PURE__ */ g("li", {
570
581
  id: r,
571
582
  role: "option",
572
583
  "aria-selected": t,
573
- "aria-disabled": o || void 0,
574
- className: R(Ie.option, {
575
- [Ie.selected]: t,
576
- [Ie.active]: n,
577
- [Ie.disabled]: o
584
+ "aria-disabled": s || void 0,
585
+ className: z(q.option, {
586
+ [q.selected]: t,
587
+ [q.active]: n,
588
+ [q.disabled]: s,
589
+ [q.success]: e.color === "success",
590
+ [q.warning]: e.color === "warning",
591
+ [q.danger]: e.color === "danger"
578
592
  }),
579
593
  onClick: () => {
580
- o || i(e.value);
594
+ s || a(e.value);
581
595
  },
582
596
  onMouseEnter: () => {
583
- o || a();
597
+ s || o();
584
598
  },
585
- children: [/* @__PURE__ */ m("span", {
586
- className: Ie.label,
587
- children: e.label
588
- }), /* @__PURE__ */ m("span", {
589
- className: Ie.check,
599
+ children: [i ? /* @__PURE__ */ h("span", {
600
+ className: q.custom,
601
+ children: i(e)
602
+ }) : /* @__PURE__ */ g(m, { children: [
603
+ e.icon && /* @__PURE__ */ h("span", {
604
+ className: q.icon,
605
+ children: e.icon
606
+ }),
607
+ /* @__PURE__ */ g("span", {
608
+ className: q.content,
609
+ children: [/* @__PURE__ */ h("span", {
610
+ className: q.label,
611
+ children: e.label
612
+ }), e.description && /* @__PURE__ */ h("span", {
613
+ className: q.description,
614
+ children: e.description
615
+ })]
616
+ }),
617
+ e.badge && /* @__PURE__ */ h("span", {
618
+ className: q.badge,
619
+ children: e.badge
620
+ }),
621
+ e.shortcut && /* @__PURE__ */ h("kbd", {
622
+ className: q.shortcut,
623
+ children: e.shortcut
624
+ })
625
+ ] }), /* @__PURE__ */ h("span", {
626
+ className: q.check,
590
627
  "aria-hidden": "true",
591
- children: t && /* @__PURE__ */ m(N, {})
628
+ children: t && /* @__PURE__ */ h(P, {})
592
629
  })]
593
630
  });
594
631
  };
595
- Le.displayName = "SelectOption";
596
- var Re = {
597
- dropdown: "_dropdown_qznlq_1",
598
- dropdownIn: "_dropdownIn_qznlq_1",
599
- empty: "_empty_qznlq_17"
600
- }, ze = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, noOptionsText: o, selectedValue: s, activeIndex: c, className: l, onSelect: u, onMouseEnter: d }) => e ? /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("ul", {
601
- ref: r,
602
- id: t,
603
- role: "listbox",
604
- "aria-labelledby": n,
605
- className: [Re.dropdown, l].filter(Boolean).join(" "),
606
- style: i,
607
- children: a.length ? a.map((e, n) => /* @__PURE__ */ m(Le, {
632
+ ze.displayName = "SelectOption";
633
+ var J = {
634
+ dropdown: "_dropdown_1yn7p_1",
635
+ dropdownIn: "_dropdownIn_1yn7p_1",
636
+ primary: "_primary_1yn7p_73",
637
+ outline: "_outline_1yn7p_73",
638
+ filled: "_filled_1yn7p_130",
639
+ soft: "_soft_1yn7p_187",
640
+ neutral: "_neutral_1yn7p_244",
641
+ success: "_success_1yn7p_415",
642
+ warning: "_warning_1yn7p_586",
643
+ danger: "_danger_1yn7p_757",
644
+ listReveal: "_listReveal_1yn7p_1",
645
+ command: "_command_1yn7p_935",
646
+ searchWrap: "_searchWrap_1yn7p_940",
647
+ searchReveal: "_searchReveal_1yn7p_1",
648
+ search: "_search_1yn7p_940",
649
+ searchClear: "_searchClear_1yn7p_969",
650
+ empty: "_empty_1yn7p_1002",
651
+ groupLabel: "_groupLabel_1yn7p_1010",
652
+ separator: "_separator_1yn7p_1020",
653
+ virtualSpacer: "_virtualSpacer_1yn7p_1026",
654
+ mobileDropdownIn: "_mobileDropdownIn_1yn7p_1"
655
+ }, Be = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: o, entries: c, multiple: l, selectedValues: f, color: p = "primary", variant: _ = "outline", searchable: v, command: y, virtual: b, portal: x = !0, searchValue: S = "", searchPlaceholder: C = "Search...", loading: w, loadingText: T = "Loading...", noOptionsText: E, searchSlot: D, headerSlot: O, emptySlot: k, loadingSlot: A, renderOption: j, selectedValue: M, activeIndex: N, className: P, onSelect: F, onMouseEnter: L, onSearchChange: R }) => {
656
+ let z = u(null), B = u(!1), [te, ne] = d(null), [re, ie] = d(0), ae = typeof b == "object" ? b : b ? {} : void 0, oe = ae?.itemHeight ?? 40, V = !!(ae && o.length > 0 && !w), se = a((e) => {
657
+ ne(e), r(e);
658
+ }, [r]);
659
+ if (s(() => {
660
+ e || (B.current = !1, ie(0));
661
+ }, [e, S]), s(() => {
662
+ if (!e || w || !te || B.current) return;
663
+ let n = o.findIndex((e) => f ? f.includes(e.value) : e.value === M), r = n >= 0 ? n : N;
664
+ if (r < 0) {
665
+ B.current = !0;
666
+ return;
667
+ }
668
+ if (B.current = !0, V) {
669
+ let e = Math.max(0, r * oe - (300 - oe) / 2);
670
+ ie(e), te.scrollTop = e;
671
+ return;
672
+ }
673
+ document.getElementById(`${t}-option-${r}`)?.scrollIntoView?.({ block: "nearest" });
674
+ }, [
675
+ N,
676
+ te,
677
+ e,
678
+ V,
679
+ oe,
680
+ t,
681
+ w,
682
+ o,
683
+ M,
684
+ f
685
+ ]), !e) return null;
686
+ let ce = V ? Math.max(0, Math.floor(re / oe) - 2) : 0, le = V ? Math.ceil(300 / oe) + 4 : o.length, ue = V ? o.slice(ce, ce + le) : o, de = c && !V ? c : ue.map((e, t) => ({
687
+ type: "option",
608
688
  option: e,
609
- isSelected: e.value === s,
610
- isActive: n === c,
611
- optionId: `${t}-option-${n}`,
612
- onSelect: u,
613
- onMouseEnter: () => d(n)
614
- }, e.value)) : /* @__PURE__ */ m("li", {
615
- role: "option",
616
- "aria-disabled": "true",
617
- "aria-selected": "false",
618
- className: Re.empty,
619
- children: o
620
- })
621
- }) }) : null;
622
- ze.displayName = "SelectDropdown";
689
+ optionIndex: ce + t
690
+ })), fe = V ? ce * oe : 0, pe = V ? Math.max(0, (o.length - ce - ue.length) * oe) : 0, me = /* @__PURE__ */ g("div", {
691
+ ref: se,
692
+ tabIndex: 0,
693
+ className: [
694
+ J.dropdown,
695
+ J[p],
696
+ J[_],
697
+ y ? J.command : void 0,
698
+ P
699
+ ].filter(Boolean).join(" "),
700
+ style: i,
701
+ onScroll: (e) => {
702
+ V && ie(e.currentTarget.scrollTop);
703
+ },
704
+ children: [
705
+ O,
706
+ D ?? (v && /* @__PURE__ */ g("div", {
707
+ className: J.searchWrap,
708
+ children: [/* @__PURE__ */ h("input", {
709
+ ref: z,
710
+ className: J.search,
711
+ value: S,
712
+ placeholder: y ? "Type a command..." : C,
713
+ "aria-label": "Search options",
714
+ onInput: (e) => R?.(e.currentTarget.value),
715
+ onChange: (e) => R?.(e.target.value)
716
+ }), S && /* @__PURE__ */ h("button", {
717
+ type: "button",
718
+ className: J.searchClear,
719
+ "aria-label": "Clear search",
720
+ onClick: () => {
721
+ R?.(""), z.current?.focus();
722
+ },
723
+ children: /* @__PURE__ */ h(I, {})
724
+ })]
725
+ })),
726
+ /* @__PURE__ */ h("ul", {
727
+ id: t,
728
+ role: "listbox",
729
+ "aria-multiselectable": l || void 0,
730
+ "aria-labelledby": n,
731
+ className: P,
732
+ children: w ? /* @__PURE__ */ h("li", {
733
+ role: "option",
734
+ "aria-disabled": "true",
735
+ "aria-selected": "false",
736
+ className: J.empty,
737
+ children: A ?? T
738
+ }) : o.length ? /* @__PURE__ */ g(m, { children: [
739
+ V && /* @__PURE__ */ h("li", {
740
+ "aria-hidden": "true",
741
+ className: J.virtualSpacer,
742
+ style: { height: fe }
743
+ }),
744
+ de.map((e) => {
745
+ if (e.type === "group") return /* @__PURE__ */ h("li", {
746
+ role: "presentation",
747
+ className: J.groupLabel,
748
+ children: e.label
749
+ }, e.id);
750
+ if (e.type === "separator") return /* @__PURE__ */ h("li", {
751
+ role: "presentation",
752
+ "aria-hidden": "true",
753
+ className: J.separator,
754
+ "data-vellira-select-separator": "true"
755
+ }, e.id);
756
+ let { option: n, optionIndex: r } = e;
757
+ return /* @__PURE__ */ h(ze, {
758
+ option: n,
759
+ isSelected: f ? f.includes(n.value) : n.value === M,
760
+ isActive: r === N,
761
+ optionId: `${t}-option-${r}`,
762
+ renderOption: j,
763
+ onSelect: F,
764
+ onMouseEnter: () => L(r)
765
+ }, n.value);
766
+ }),
767
+ V && /* @__PURE__ */ h("li", {
768
+ "aria-hidden": "true",
769
+ className: J.virtualSpacer,
770
+ style: { height: pe }
771
+ })
772
+ ] }) : /* @__PURE__ */ h("li", {
773
+ role: "option",
774
+ "aria-disabled": "true",
775
+ "aria-selected": "false",
776
+ className: J.empty,
777
+ children: k ?? E
778
+ })
779
+ })
780
+ ]
781
+ });
782
+ return x ? /* @__PURE__ */ h(ee, { children: me }) : me;
783
+ };
784
+ Be.displayName = "SelectDropdown";
623
785
  var Y = {
624
- control: "_control_1xma1_1",
625
- disabled: "_disabled_1xma1_18",
626
- arrow: "_arrow_1xma1_23",
627
- sm: "_sm_1xma1_34",
628
- md: "_md_1xma1_41",
629
- lg: "_lg_1xma1_48",
630
- value: "_value_1xma1_55",
631
- placeholder: "_placeholder_1xma1_63",
632
- error: "_error_1xma1_67",
633
- open: "_open_1xma1_109"
634
- }, Be = ({ id: e, errorId: t, isOpen: n, disabled: r, required: i, listboxId: a, activeIndex: o, ariaLabel: s, error: c, displayText: l, isPlaceholder: u, size: d = "md", className: f, buttonRef: p, onClick: g, onKeyDown: _, onBlur: v, onFocus: y }) => /* @__PURE__ */ h("button", {
635
- id: e,
636
- ref: p,
786
+ control: "_control_1m1fn_1",
787
+ disabled: "_disabled_1m1fn_41",
788
+ arrow: "_arrow_1m1fn_46",
789
+ primary: "_primary_1m1fn_60",
790
+ outline: "_outline_1m1fn_60",
791
+ filled: "_filled_1m1fn_101",
792
+ soft: "_soft_1m1fn_142",
793
+ neutral: "_neutral_1m1fn_183",
794
+ success: "_success_1m1fn_306",
795
+ warning: "_warning_1m1fn_429",
796
+ danger: "_danger_1m1fn_552",
797
+ sm: "_sm_1m1fn_675",
798
+ md: "_md_1m1fn_682",
799
+ lg: "_lg_1m1fn_689",
800
+ valueWrap: "_valueWrap_1m1fn_696",
801
+ value: "_value_1m1fn_696",
802
+ adornment: "_adornment_1m1fn_710",
803
+ clear: "_clear_1m1fn_711",
804
+ affix: "_affix_1m1fn_712",
805
+ placeholder: "_placeholder_1m1fn_748",
806
+ error: "_error_1m1fn_752",
807
+ spinner: "_spinner_1m1fn_787",
808
+ spin: "_spin_1m1fn_787",
809
+ loading: "_loading_1m1fn_796",
810
+ open: "_open_1m1fn_808"
811
+ }, Ve = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabled: a, required: o, listboxId: s, activeIndex: c, ariaLabel: l, error: u, displayText: d, isPlaceholder: f, size: p = "md", color: _, variant: v, loading: y, startIcon: b, endIcon: x, prefix: S, suffix: C, clearable: w, onClear: T, className: E, buttonRef: D, onClick: O, onKeyDown: k, onBlur: A, onFocus: j }) => /* @__PURE__ */ h("button", {
812
+ id: t,
813
+ ref: D,
637
814
  type: "button",
638
815
  role: "combobox",
639
- disabled: r,
640
- "aria-disabled": r || void 0,
641
- "aria-required": i || void 0,
642
- "aria-expanded": n,
816
+ disabled: a,
817
+ "aria-disabled": a || void 0,
818
+ "aria-required": o || void 0,
819
+ "aria-expanded": i,
643
820
  "aria-haspopup": "listbox",
644
- "aria-label": s,
645
- "aria-invalid": c || void 0,
646
- "aria-controls": n ? a : void 0,
647
- "aria-describedby": t,
648
- "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
649
- className: R(Y.control, Y[d], {
650
- [Y.error]: !!c,
651
- [Y.disabled]: r
652
- }, f),
653
- onClick: g,
654
- onKeyDown: _,
655
- onBlur: v,
656
- onFocus: y,
657
- children: [/* @__PURE__ */ m("span", {
658
- className: R(Y.value, { [Y.placeholder]: u }),
659
- children: l
660
- }), /* @__PURE__ */ m("span", {
661
- className: R(Y.arrow, { [Y.open]: n }),
821
+ "aria-label": l,
822
+ "aria-labelledby": r,
823
+ "aria-invalid": u || void 0,
824
+ "aria-controls": i ? s : void 0,
825
+ "aria-describedby": n,
826
+ "aria-activedescendant": i && c >= 0 ? `${s}-option-${c}` : void 0,
827
+ className: z(Y.control, Y[p], Y[v], Y[_], {
828
+ [Y.error]: !!u,
829
+ [Y.disabled]: a,
830
+ [Y.loading]: y
831
+ }, E),
832
+ onClick: O,
833
+ onKeyDown: k,
834
+ onBlur: A,
835
+ onFocus: j,
836
+ children: e ?? /* @__PURE__ */ g(m, { children: [
837
+ b && /* @__PURE__ */ h("span", {
838
+ className: Y.adornment,
839
+ children: b
840
+ }),
841
+ S && /* @__PURE__ */ h("span", {
842
+ className: Y.affix,
843
+ children: S
844
+ }),
845
+ /* @__PURE__ */ h("span", {
846
+ className: Y.valueWrap,
847
+ children: /* @__PURE__ */ h("span", {
848
+ className: z(Y.value, { [Y.placeholder]: f }),
849
+ children: d
850
+ })
851
+ }),
852
+ C && /* @__PURE__ */ h("span", {
853
+ className: Y.affix,
854
+ children: C
855
+ }),
856
+ w && /* @__PURE__ */ h("span", {
857
+ role: "button",
858
+ "aria-label": "Clear selection",
859
+ tabIndex: -1,
860
+ className: Y.clear,
861
+ onClick: (e) => {
862
+ e.stopPropagation(), T?.();
863
+ },
864
+ children: /* @__PURE__ */ h(I, {})
865
+ }),
866
+ /* @__PURE__ */ h("span", {
867
+ className: z(Y.arrow, { [Y.open]: i }),
868
+ "aria-hidden": "true",
869
+ children: y ? /* @__PURE__ */ h("span", { className: Y.spinner }) : x ?? /* @__PURE__ */ h(F, {})
870
+ })
871
+ ] })
872
+ });
873
+ Ve.displayName = "SelectTrigger";
874
+ //#endregion
875
+ //#region src/components/Select/SelectContext.tsx
876
+ var He = n(null), Ue = He.Provider;
877
+ function We() {
878
+ let e = o(He);
879
+ if (!e) throw Error("Select compound components must be used inside Select");
880
+ return e;
881
+ }
882
+ He.displayName = "SelectContext";
883
+ //#endregion
884
+ //#region src/components/Select/SelectCompound.tsx
885
+ var Ge = ({ children: e, className: t }) => {
886
+ let { triggerProps: n } = We();
887
+ return /* @__PURE__ */ h(Ve, {
888
+ ...n,
889
+ className: [n.className, t].filter(Boolean).join(" "),
890
+ children: e
891
+ });
892
+ };
893
+ Ge.__velliraSelectPart = "trigger", Ge.displayName = "Select.Trigger";
894
+ var Ke = ({ children: e, className: t }) => {
895
+ let { dropdownProps: n } = We(), r = ot(e);
896
+ return /* @__PURE__ */ h(Be, {
897
+ ...n,
898
+ ...r,
899
+ className: [n.className, t].filter(Boolean).join(" ")
900
+ });
901
+ };
902
+ Ke.__velliraSelectPart = "content", Ke.displayName = "Select.Content";
903
+ var qe = ({ children: e, className: t }) => {
904
+ let { triggerProps: n } = We();
905
+ return /* @__PURE__ */ h("span", {
906
+ className: z(Y.valueWrap, t),
907
+ children: /* @__PURE__ */ h("span", {
908
+ className: z(Y.value, { [Y.placeholder]: n.isPlaceholder }),
909
+ children: e ?? n.displayText
910
+ })
911
+ });
912
+ };
913
+ qe.__velliraSelectPart = "value", qe.displayName = "Select.Value";
914
+ var Je = ({ children: e, className: t }) => {
915
+ let { triggerProps: n } = We();
916
+ return /* @__PURE__ */ h("span", {
917
+ className: z(Y.arrow, { [Y.open]: n.isOpen }, t),
662
918
  "aria-hidden": "true",
663
- children: /* @__PURE__ */ m(P, {})
664
- })]
919
+ children: n.loading ? /* @__PURE__ */ h("span", { className: Y.spinner }) : e ?? n.endIcon ?? /* @__PURE__ */ h(F, {})
920
+ });
921
+ };
922
+ Je.__velliraSelectPart = "icon", Je.displayName = "Select.Icon";
923
+ var Ye = ({ placeholder: e, className: t }) => {
924
+ let { dropdownProps: n } = We(), r = u(null), i = n.searchValue ?? "";
925
+ return /* @__PURE__ */ g("div", {
926
+ className: J.searchWrap,
927
+ children: [/* @__PURE__ */ h("input", {
928
+ ref: r,
929
+ className: z(J.search, t),
930
+ value: i,
931
+ placeholder: e ?? (n.command ? "Type a command..." : "Search..."),
932
+ "aria-label": "Search options",
933
+ onInput: (e) => n.onSearchChange?.(e.currentTarget.value),
934
+ onChange: (e) => n.onSearchChange?.(e.target.value)
935
+ }), i && /* @__PURE__ */ h("button", {
936
+ type: "button",
937
+ className: J.searchClear,
938
+ "aria-label": "Clear search",
939
+ onClick: () => {
940
+ n.onSearchChange?.(""), r.current?.focus();
941
+ },
942
+ children: /* @__PURE__ */ h(I, {})
943
+ })]
944
+ });
945
+ };
946
+ Ye.__velliraSelectPart = "search", Ye.displayName = "Select.Search";
947
+ var Xe = () => null;
948
+ Xe.__velliraSelectPart = "group", Xe.displayName = "Select.Group";
949
+ var Ze = ({ children: e }) => /* @__PURE__ */ h("div", {
950
+ role: "presentation",
951
+ className: J.groupLabel,
952
+ children: e
665
953
  });
666
- Be.displayName = "SelectTrigger";
954
+ Ze.__velliraSelectPart = "label", Ze.displayName = "Select.Label";
955
+ var Qe = () => null;
956
+ Qe.__velliraSelectPart = "item", Qe.displayName = "Select.Item";
957
+ var $e = () => null;
958
+ $e.__velliraSelectPart = "itemIcon", $e.displayName = "Select.ItemIcon";
959
+ var et = () => null;
960
+ et.__velliraSelectPart = "itemDescription", et.displayName = "Select.ItemDescription";
961
+ var tt = () => null;
962
+ tt.__velliraSelectPart = "separator", tt.displayName = "Select.Separator";
963
+ var nt = ({ children: e }) => /* @__PURE__ */ h(m, { children: e });
964
+ nt.__velliraSelectPart = "empty", nt.displayName = "Select.Empty";
965
+ var rt = ({ children: e }) => /* @__PURE__ */ h(m, { children: e });
966
+ rt.__velliraSelectPart = "loading", rt.displayName = "Select.Loading";
967
+ function it(t) {
968
+ let n = [], r = [], a = 0;
969
+ function o(t) {
970
+ e.forEach(t, (e) => {
971
+ if (!i(e)) return;
972
+ let t = e.type;
973
+ if (t.__velliraSelectPart === "group") {
974
+ let t = e.props;
975
+ n.push({
976
+ type: "group",
977
+ id: `group-${a++}`,
978
+ label: t.label
979
+ }), o(t.children);
980
+ return;
981
+ }
982
+ if (t.__velliraSelectPart === "item") {
983
+ let t = e.props, i = st(t.children, t.value), a = t.label ?? i.label, o = r.length, s = {
984
+ label: a,
985
+ value: t.value,
986
+ disabled: t.disabled,
987
+ description: t.description ?? i.description,
988
+ icon: t.icon ?? i.icon,
989
+ badge: t.badge,
990
+ shortcut: t.shortcut,
991
+ color: t.color
992
+ };
993
+ r.push(s), n.push({
994
+ type: "option",
995
+ option: s,
996
+ optionIndex: o
997
+ });
998
+ return;
999
+ }
1000
+ if (t.__velliraSelectPart === "separator") {
1001
+ n.push({
1002
+ type: "separator",
1003
+ id: `separator-${a++}`
1004
+ });
1005
+ return;
1006
+ }
1007
+ t.__velliraSelectPart === "empty" || t.__velliraSelectPart === "icon" || t.__velliraSelectPart === "itemDescription" || t.__velliraSelectPart === "itemIcon" || t.__velliraSelectPart === "label" || t.__velliraSelectPart === "loading" || t.__velliraSelectPart === "search" || t.__velliraSelectPart === "value" || o(e.props.children);
1008
+ });
1009
+ }
1010
+ return o(t), {
1011
+ entries: n,
1012
+ options: r
1013
+ };
1014
+ }
1015
+ function at(t) {
1016
+ let n = !1;
1017
+ function r(t) {
1018
+ e.forEach(t, (e) => {
1019
+ if (!i(e) || n) return;
1020
+ let t = e.type;
1021
+ if (t.__velliraSelectPart === "trigger" || t.__velliraSelectPart === "content") {
1022
+ n = !0;
1023
+ return;
1024
+ }
1025
+ r(e.props.children);
1026
+ });
1027
+ }
1028
+ return r(t), n;
1029
+ }
1030
+ function ot(t) {
1031
+ let n, r, a, o;
1032
+ return e.forEach(t, (e) => {
1033
+ if (!i(e)) return;
1034
+ let t = e.type;
1035
+ t.__velliraSelectPart === "label" && (n = e), t.__velliraSelectPart === "search" && (r = e), t.__velliraSelectPart === "empty" && (a = e), t.__velliraSelectPart === "loading" && (o = e);
1036
+ }), {
1037
+ emptySlot: a,
1038
+ headerSlot: n,
1039
+ loadingSlot: o,
1040
+ searchSlot: r
1041
+ };
1042
+ }
1043
+ function st(t, n) {
1044
+ let r, a, o = [];
1045
+ function s(t) {
1046
+ e.forEach(t, (e) => {
1047
+ if (typeof e == "string" || typeof e == "number") {
1048
+ o.push(String(e));
1049
+ return;
1050
+ }
1051
+ if (!i(e)) return;
1052
+ let t = e.type;
1053
+ if (t.__velliraSelectPart === "itemIcon") {
1054
+ r = e.props.children;
1055
+ return;
1056
+ }
1057
+ if (t.__velliraSelectPart === "itemDescription") {
1058
+ a = e.props.children;
1059
+ return;
1060
+ }
1061
+ s(e.props.children);
1062
+ });
1063
+ }
1064
+ s(t);
1065
+ let c = o.join("").trim();
1066
+ return {
1067
+ description: a,
1068
+ icon: r,
1069
+ label: c || n
1070
+ };
1071
+ }
667
1072
  //#endregion
668
1073
  //#region src/components/Select/Select.tsx
669
- var Ve = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o, defaultValue: c, onChange: u, options: d, placeholder: f = "Select...", noOptionsText: p = "No options available", size: g = "md", required: _ = !1, disabled: v = !1, error: y, placement: b = "bottom-start", matchTriggerWidth: x = !0, open: S, defaultOpen: C = !1, onOpenChange: w, onBlur: T, onFocus: E, className: D, triggerClassName: O, dropdownClassName: k }) => {
670
- let j = s(), M = n ?? j, N = `${M}-listbox`, P = !!y, F = P ? `${M}-error` : void 0, I = l(null), L = l(null), { selectedValue: R, selectedOption: z, isOpen: B, setIsOpen: V, activeIndex: H, setActiveIndex: ne, closeDropdown: re, toggleDropdown: U, selectValue: ie, onKeyDown: ae } = A({
671
- value: o,
672
- defaultValue: c,
673
- onChange: u,
674
- options: d,
675
- disabled: v,
676
- open: S,
677
- defaultOpen: C,
678
- onOpenChange: w
679
- }), oe = !!z, { floatingStyles: W, setRef: se, setFloatingRef: ce } = ee({
680
- open: B,
681
- onOpenChange: V,
682
- placement: b,
683
- matchTriggerWidth: x,
1074
+ var ct = 0, lt = "", ut = Object.assign(({ children: e, label: t, description: n, id: r, name: i, "aria-label": o, "aria-describedby": f, "aria-labelledby": p, value: _, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...", noOptionsText: E, size: D, color: O = "primary", variant: k = "outline", required: A = !1, disabled: M = !1, invalid: N = !1, loading: P = !1, clearable: F = !1, searchable: I = !1, virtual: L, modal: R = !1, command: z = !1, error: ee, placement: B = "bottom", matchTriggerWidth: te = !0, avoidCollisions: ne = !0, portal: ae = !0, open: oe, defaultOpen: V = !1, onOpenChange: se, onSearch: ce, onClear: le, startIcon: ue, endIcon: de, prefix: fe, suffix: pe, renderValue: me, renderOption: he, onBlur: ge, onFocus: _e, className: ve, triggerClassName: ye, dropdownClassName: be }) => {
1075
+ let xe = c(), H = Ie(), U = !!(t || n || ee), W = r ?? (U ? void 0 : H?.controlId) ?? xe, Se = `${W}-listbox`, [Ce, we] = d(""), Te = !!ee, Ee = Te ? `${W}-error` : void 0, De = n ? `${W}-description` : void 0, Oe = D ?? H?.size ?? "md", ke = N || Te || !U && !!H?.invalid, Ae = M || !U && !!H?.disabled, je = A || !U && !!H?.required, Me = [
1076
+ f,
1077
+ !U && !f ? H?.ariaDescribedBy : void 0,
1078
+ De,
1079
+ Ee
1080
+ ].filter(Boolean).join(" "), Ne = u(null), G = u(null), Pe = I || z, { entries: Fe, options: K } = l(() => it(e), [e]), Le = l(() => {
1081
+ if (!Pe || !Ce) return K;
1082
+ let e = Ce.toLocaleLowerCase();
1083
+ return K.filter((t) => `${t.label} ${dt(t.description)}`.toLocaleLowerCase().includes(e));
1084
+ }, [
1085
+ Pe,
1086
+ K,
1087
+ Ce
1088
+ ]), { selectedValue: q, selectedValues: ze, selectedOption: J, selectedOptions: Y, isOpen: He, setIsOpen: We, activeIndex: qe, setActiveIndex: Je, closeDropdown: Ye, toggleDropdown: Xe, selectValue: Ze, onKeyDown: Qe } = j({
1089
+ value: _,
1090
+ defaultValue: v,
1091
+ onValueChange: y,
1092
+ options: Le,
1093
+ multiple: b,
1094
+ maxSelected: x,
1095
+ closeOnSelect: S,
1096
+ disabled: Ae,
1097
+ open: oe,
1098
+ defaultOpen: V,
1099
+ onOpenChange: se
1100
+ }), $e = !!J, et = Array.isArray(q) ? q[0] ?? "" : q, { floatingStyles: tt, setRef: nt, setFloatingRef: rt } = re({
1101
+ open: He,
1102
+ onOpenChange: We,
1103
+ placement: B === "bottom" || B === "top" ? `${B}-start` : B,
1104
+ matchTriggerWidth: te,
1105
+ avoidCollisions: ne,
684
1106
  mobileSheetBreakpoint: 640
685
- }), le = i((e) => {
686
- ie(e), I.current?.focus();
687
- }, [ie]);
688
- te([I, L], re, B);
689
- let ue = i((e) => {
690
- I.current = e, se(e);
691
- }, [se]), de = i((e) => {
692
- L.current = e, ce(e);
1107
+ }), ot = a((e) => {
1108
+ Ze(e), Ne.current?.focus();
1109
+ }, [Ze]), st = a(() => {
1110
+ Ze(""), le?.(), Ne.current?.focus();
1111
+ }, [le, Ze]), ut = a((e) => {
1112
+ we(e), ce?.(e);
693
1113
  }, [ce]);
694
- return /* @__PURE__ */ h(Fe, {
695
- id: M,
696
- label: e,
697
- description: t,
698
- error: y,
699
- required: _,
700
- disabled: v,
701
- className: D,
1114
+ ie([Ne, G], Ye, He), s(() => {
1115
+ if (!(!R || !He)) return ct === 0 && (lt = document.body.style.overflow), ct += 1, document.body.style.overflow = "hidden", () => {
1116
+ ct = Math.max(0, ct - 1), ct === 0 && (document.body.style.overflow = lt);
1117
+ };
1118
+ }, [He, R]);
1119
+ let ft = a((e) => {
1120
+ Ne.current = e, nt(e);
1121
+ }, [nt]), pt = a((e) => {
1122
+ G.current = e, rt(e);
1123
+ }, [rt]), mt = me ? me(J) : b && Y.length ? Y.map((e) => e.label).join(", ") : J?.label ?? C, ht = w ?? E ?? "No options available", gt = F && ze.length > 0 && !Ae && !P, _t = {
1124
+ id: W,
1125
+ describedBy: Me || void 0,
1126
+ labelledBy: o ? void 0 : p,
1127
+ isOpen: He,
1128
+ disabled: Ae,
1129
+ required: je,
1130
+ listboxId: Se,
1131
+ activeIndex: qe,
1132
+ ariaLabel: o ?? (!t && !H?.labelId ? J?.label || C : void 0),
1133
+ error: ke,
1134
+ loading: P,
1135
+ displayText: mt,
1136
+ isPlaceholder: !$e,
1137
+ size: Oe,
1138
+ color: O,
1139
+ variant: k,
1140
+ startIcon: ue,
1141
+ endIcon: de,
1142
+ prefix: fe,
1143
+ suffix: pe,
1144
+ clearable: gt,
1145
+ className: ye,
1146
+ buttonRef: ft,
1147
+ onClear: st,
1148
+ onClick: Xe,
1149
+ onKeyDown: Qe,
1150
+ onBlur: ge,
1151
+ onFocus: _e
1152
+ }, vt = {
1153
+ isOpen: He,
1154
+ listboxId: Se,
1155
+ labelledById: W,
1156
+ style: tt,
1157
+ options: Le,
1158
+ entries: Pe || Ce ? void 0 : Fe,
1159
+ multiple: b,
1160
+ color: O,
1161
+ variant: k,
1162
+ searchable: Pe,
1163
+ command: z,
1164
+ virtual: L,
1165
+ portal: ae,
1166
+ searchValue: Ce,
1167
+ loading: P,
1168
+ loadingText: T,
1169
+ noOptionsText: ht,
1170
+ renderOption: he,
1171
+ selectedValue: et,
1172
+ selectedValues: ze,
1173
+ activeIndex: qe,
1174
+ className: be,
1175
+ setDropdownRef: pt,
1176
+ onSelect: ot,
1177
+ onMouseEnter: Je,
1178
+ onSearchChange: ut
1179
+ }, yt = /* @__PURE__ */ g(m, { children: [i && b && ze.length > 0 && /* @__PURE__ */ h(m, { children: ze.map((e) => /* @__PURE__ */ h("input", {
1180
+ type: "hidden",
1181
+ name: i,
1182
+ value: e,
1183
+ disabled: Ae
1184
+ }, e)) }), i && !b && /* @__PURE__ */ h("input", {
1185
+ type: "hidden",
1186
+ name: i,
1187
+ value: et,
1188
+ disabled: Ae
1189
+ })] }), bt = at(e), xt = /* @__PURE__ */ g(Ue, {
1190
+ value: {
1191
+ triggerProps: _t,
1192
+ dropdownProps: vt
1193
+ },
1194
+ children: [yt, bt ? e : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(Ge, {}), /* @__PURE__ */ h(Ke, { children: e })] })]
1195
+ }), St = /* @__PURE__ */ g(Ue, {
1196
+ value: {
1197
+ triggerProps: _t,
1198
+ dropdownProps: vt
1199
+ },
702
1200
  children: [
703
- /* @__PURE__ */ m(Be, {
704
- id: M,
705
- errorId: F,
706
- isOpen: B,
707
- disabled: v,
708
- required: _,
709
- listboxId: N,
710
- activeIndex: H,
711
- ariaLabel: a ?? (e ? void 0 : z?.label || f),
712
- error: P,
713
- displayText: z?.label ?? f,
714
- isPlaceholder: !oe,
715
- size: g,
716
- className: O,
717
- buttonRef: ue,
718
- onClick: U,
719
- onKeyDown: ae,
720
- onBlur: T,
721
- onFocus: E
722
- }),
723
- r && /* @__PURE__ */ m("input", {
724
- type: "hidden",
725
- name: r,
726
- value: R,
727
- disabled: v
728
- }),
729
- /* @__PURE__ */ m(ze, {
730
- isOpen: B,
731
- listboxId: N,
732
- labelledById: M,
733
- style: W,
734
- options: d,
735
- noOptionsText: p,
736
- selectedValue: R,
737
- activeIndex: H,
738
- className: k,
739
- setDropdownRef: de,
740
- onSelect: le,
741
- onMouseEnter: ne
742
- })
1201
+ yt,
1202
+ /* @__PURE__ */ h(Ve, { ..._t }),
1203
+ /* @__PURE__ */ h(Be, { ...vt })
743
1204
  ]
744
1205
  });
745
- };
746
- Ve.displayName = "Select";
1206
+ return !U && H ? e ? xt : St : /* @__PURE__ */ h(Re, {
1207
+ id: W,
1208
+ label: t,
1209
+ description: n,
1210
+ error: ee,
1211
+ required: je,
1212
+ disabled: Ae,
1213
+ bindControl: !1,
1214
+ className: ve,
1215
+ children: e ? xt : St
1216
+ });
1217
+ }, {
1218
+ Trigger: Ge,
1219
+ Value: qe,
1220
+ Icon: Je,
1221
+ Content: Ke,
1222
+ Search: Ye,
1223
+ Group: Xe,
1224
+ Label: Ze,
1225
+ Item: Qe,
1226
+ ItemIcon: $e,
1227
+ ItemDescription: et,
1228
+ Separator: tt,
1229
+ Empty: nt,
1230
+ Loading: rt
1231
+ });
1232
+ ut.displayName = "Select";
1233
+ function dt(e) {
1234
+ return typeof e == "string" || typeof e == "number" ? String(e) : "";
1235
+ }
747
1236
  //#endregion
748
1237
  //#region src/components/Tabs/TabsContext.tsx
749
- var He = t(null), Ue = () => {
750
- let e = a(He);
1238
+ var ft = n(null), pt = () => {
1239
+ let e = o(ft);
751
1240
  if (!e) throw Error("Tabs components must be used inside Tabs");
752
1241
  return e;
753
- }, We = {
1242
+ }, mt = {
754
1243
  list: "_list_13hkl_1",
755
1244
  vertical: "_vertical_13hkl_8"
756
- }, Ge = ({ children: e, className: t, ...n }) => {
757
- let { orientation: r, appearance: i } = Ue();
758
- return /* @__PURE__ */ m("div", {
1245
+ }, ht = ({ children: e, className: t, ...n }) => {
1246
+ let { orientation: r, appearance: i } = pt();
1247
+ return /* @__PURE__ */ h("div", {
759
1248
  ...n,
760
1249
  role: "tablist",
761
1250
  "aria-orientation": r,
762
- className: R(We.list, r === "vertical" && We.vertical, i === "underline" && We.underline, i === "pills" && We.pills, t),
1251
+ className: z(mt.list, r === "vertical" && mt.vertical, i === "underline" && mt.underline, i === "pills" && mt.pills, t),
763
1252
  children: e
764
1253
  });
765
1254
  };
766
- Ge.displayName = "TabsList";
767
- var Ke = {
1255
+ ht.displayName = "TabsList";
1256
+ var gt = {
768
1257
  panel: "_panel_1v1a9_1",
769
1258
  visible: "_visible_1v1a9_10",
770
1259
  vertical: "_vertical_1v1a9_14"
771
- }, qe = ({ index: e, children: t, className: n }) => {
772
- let { activeIndex: r, orientation: i } = Ue(), [a, s] = u(!1), c = r === e;
773
- return o(() => {
1260
+ }, _t = ({ index: e, children: t, className: n }) => {
1261
+ let { activeIndex: r, orientation: i } = pt(), [a, o] = d(!1), c = r === e;
1262
+ return s(() => {
774
1263
  if (!c) {
775
- s(!1);
1264
+ o(!1);
776
1265
  return;
777
1266
  }
778
- let e = setTimeout(() => s(!0), 10);
1267
+ let e = setTimeout(() => o(!0), 10);
779
1268
  return () => clearTimeout(e);
780
- }, [c]), /* @__PURE__ */ m("div", {
1269
+ }, [c]), /* @__PURE__ */ h("div", {
781
1270
  role: "tabpanel",
782
1271
  id: `tab-panel-${e}`,
783
1272
  "aria-labelledby": `tab-${e}`,
784
1273
  hidden: !c,
785
1274
  tabIndex: 0,
786
- className: R(Ke.panel, a && Ke.visible, i === "vertical" && Ke.vertical, n),
1275
+ className: z(gt.panel, a && gt.visible, i === "vertical" && gt.vertical, n),
787
1276
  children: t
788
1277
  });
789
1278
  };
790
- qe.displayName = "TabsPanel";
791
- var Je = {
1279
+ _t.displayName = "TabsPanel";
1280
+ var vt = {
792
1281
  tab: "_tab_qe8xc_1",
793
1282
  iconOnly: "_iconOnly_qe8xc_27",
794
1283
  tabIcon: "_tabIcon_qe8xc_31",
@@ -797,14 +1286,14 @@ var Je = {
797
1286
  underline: "_underline_qe8xc_60",
798
1287
  pills: "_pills_qe8xc_92",
799
1288
  vertical: "_vertical_qe8xc_106"
800
- }, Ye = n(({ index: e, children: t, className: n, disabled: r = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
801
- let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: g, onTabKeyDown: _ } = Ue(), v = u === e, y = !!a, b = y && t == null;
802
- return /* @__PURE__ */ h("button", {
1289
+ }, yt = r(({ index: e, children: t, className: n, disabled: r = !1, icon: i, onClick: o, onKeyDown: s, ...c }, l) => {
1290
+ let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: m, onTabKeyDown: _ } = pt(), v = u === e, y = !!i, b = y && t == null;
1291
+ return /* @__PURE__ */ g("button", {
803
1292
  type: "button",
804
- ref: i((t) => {
805
- g(e, t), typeof l == "function" ? l(t) : l && (l.current = t);
1293
+ ref: a((t) => {
1294
+ m(e, t), typeof l == "function" ? l(t) : l && (l.current = t);
806
1295
  }, [
807
- g,
1296
+ m,
808
1297
  e,
809
1298
  l
810
1299
  ]),
@@ -814,7 +1303,7 @@ var Je = {
814
1303
  id: `tab-${e}`,
815
1304
  disabled: r,
816
1305
  tabIndex: v ? 0 : -1,
817
- className: R(Je.tab, Je[p], f === "vertical" && Je.vertical, y && Je.withIcon, b && Je.iconOnly, n),
1306
+ className: z(vt.tab, vt[p], f === "vertical" && vt.vertical, y && vt.withIcon, b && vt.iconOnly, n),
818
1307
  onClick: (t) => {
819
1308
  r || (d(e), o?.(t));
820
1309
  },
@@ -822,62 +1311,62 @@ var Je = {
822
1311
  _(e), s?.(e);
823
1312
  },
824
1313
  ...c,
825
- children: [y && /* @__PURE__ */ m("span", {
826
- className: Je.tabIcon,
1314
+ children: [y && /* @__PURE__ */ h("span", {
1315
+ className: vt.tabIcon,
827
1316
  "aria-hidden": "true",
828
- children: a
829
- }), t != null && /* @__PURE__ */ m("span", {
830
- className: Je.label,
1317
+ children: i
1318
+ }), t != null && /* @__PURE__ */ h("span", {
1319
+ className: vt.label,
831
1320
  children: t
832
1321
  })]
833
1322
  });
834
1323
  });
835
- Ye.displayName = "Tab";
836
- var Xe = {
1324
+ yt.displayName = "Tab";
1325
+ var bt = {
837
1326
  tabs: "_tabs_uqy7q_1",
838
1327
  vertical: "_vertical_uqy7q_5"
839
- }, Ze = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
840
- let { activeIndex: c, setActiveIndex: u } = j({
1328
+ }, xt = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: i = "horizontal", appearance: o = "default", className: s }) => {
1329
+ let { activeIndex: c, setActiveIndex: l } = M({
841
1330
  activeIndex: t,
842
1331
  defaultActiveIndex: n,
843
1332
  onChange: r
844
- }), d = l([]), f = i((e, t) => {
1333
+ }), d = u([]), f = a((e, t) => {
845
1334
  d.current[e] = t;
846
- }, []), { onKeyDown: p } = M({
1335
+ }, []), { onKeyDown: p } = N({
847
1336
  activeIndex: c,
848
- setActiveIndex: u,
1337
+ setActiveIndex: l,
849
1338
  tabRefs: d,
850
- orientation: a,
1339
+ orientation: i,
851
1340
  onNavigate: (e) => {
852
1341
  d.current[e]?.focus();
853
1342
  }
854
- }), h = {
1343
+ }), m = {
855
1344
  activeIndex: c,
856
- setActiveIndex: u,
857
- orientation: a,
1345
+ setActiveIndex: l,
1346
+ orientation: i,
858
1347
  appearance: o,
859
1348
  registerTab: f,
860
1349
  onTabKeyDown: p
861
1350
  };
862
- return /* @__PURE__ */ m(He.Provider, {
863
- value: h,
864
- children: /* @__PURE__ */ m("div", {
865
- className: R(Xe.tabs, a === "vertical" && Xe.vertical, s),
1351
+ return /* @__PURE__ */ h(ft.Provider, {
1352
+ value: m,
1353
+ children: /* @__PURE__ */ h("div", {
1354
+ className: z(bt.tabs, i === "vertical" && bt.vertical, s),
866
1355
  children: e
867
1356
  })
868
1357
  });
869
1358
  };
870
- Ze.displayName = "Tabs";
1359
+ xt.displayName = "Tabs";
871
1360
  //#endregion
872
1361
  //#region src/components/Tabs/index.ts
873
- var Qe = Object.assign(Ze, {
874
- List: Ge,
875
- Tab: Ye,
876
- Panel: qe
877
- }), $e = {
1362
+ var St = Object.assign(xt, {
1363
+ List: ht,
1364
+ Tab: yt,
1365
+ Panel: _t
1366
+ }), Ct = {
878
1367
  tooltip: "_tooltip_10opu_1",
879
1368
  arrow: "_arrow_10opu_25"
880
- }, et = n(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
1369
+ }, wt = r(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
881
1370
  let l = {
882
1371
  top: "bottom",
883
1372
  right: "left",
@@ -890,49 +1379,49 @@ var Qe = Object.assign(Ze, {
890
1379
  top: i == null ? "" : `${i}px`,
891
1380
  [l]: "-5px"
892
1381
  };
893
- return /* @__PURE__ */ h("div", {
1382
+ return /* @__PURE__ */ g("div", {
894
1383
  ref: c,
895
- className: R($e.tooltip, a),
1384
+ className: z(Ct.tooltip, a),
896
1385
  "data-placement": t,
897
1386
  "data-state": "open",
898
1387
  style: o,
899
1388
  ...s,
900
- children: [e, /* @__PURE__ */ m("div", {
1389
+ children: [e, /* @__PURE__ */ h("div", {
901
1390
  ref: n,
902
- className: $e.arrow,
1391
+ className: Ct.arrow,
903
1392
  style: u
904
1393
  })]
905
1394
  });
906
1395
  });
907
- et.displayName = "TooltipContent";
1396
+ wt.displayName = "TooltipContent";
908
1397
  //#endregion
909
1398
  //#region src/components/Tooltip/Tooltip.tsx
910
- var tt = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
1399
+ var Tt = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
911
1400
  open: 300,
912
1401
  close: 100
913
- }, maxWidth: a = 250, className: o, onOpenChange: c }) => {
914
- let [d, f] = u(!1), v = l(null), y = s(), { context: b, floatingStyles: x, middlewareData: S, setRef: C, setFloatingRef: D, placement: O } = ee({
915
- open: d,
1402
+ }, maxWidth: a = 250, className: o, onOpenChange: s }) => {
1403
+ let [l, f] = d(!1), p = u(null), y = c(), { context: b, floatingStyles: x, middlewareData: S, setRef: C, setFloatingRef: w, placement: O } = re({
1404
+ open: l,
916
1405
  onOpenChange: (e) => {
917
- r || (f(e), c?.(e));
1406
+ r || (f(e), s?.(e));
918
1407
  },
919
1408
  placement: t,
920
- middleware: [_({ element: v })]
921
- }), k = S.arrow?.x, A = S.arrow?.y, { getReferenceProps: j, getFloatingProps: M } = E([T(b, { delay: {
1409
+ middleware: [v({ element: p })]
1410
+ }), k = S.arrow?.x, A = S.arrow?.y, { getReferenceProps: j, getFloatingProps: M } = D([E(b, { delay: {
922
1411
  open: i.open,
923
1412
  close: i.close
924
- } }), w(b)]);
925
- return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
1413
+ } }), T(b)]);
1414
+ return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
926
1415
  ref: C,
927
1416
  style: { display: "inline-flex" },
928
- "aria-describedby": d ? y : void 0,
1417
+ "aria-describedby": l ? y : void 0,
929
1418
  ...j(),
930
1419
  children: e
931
- }), /* @__PURE__ */ m(g, { children: d && n && /* @__PURE__ */ m(et, {
1420
+ }), /* @__PURE__ */ h(_, { children: l && n && /* @__PURE__ */ h(wt, {
932
1421
  id: y,
933
- ref: D,
1422
+ ref: w,
934
1423
  content: n,
935
- arrowRef: v,
1424
+ arrowRef: p,
936
1425
  arrowX: k,
937
1426
  arrowY: A,
938
1427
  role: "tooltip",
@@ -945,10 +1434,10 @@ var tt = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
945
1434
  ...M()
946
1435
  }) })] });
947
1436
  };
948
- tt.displayName = "Tooltip";
1437
+ Tt.displayName = "Tooltip";
949
1438
  //#endregion
950
1439
  //#region src/utils/devWarning.ts
951
- var nt = (e, t) => {
1440
+ var Et = (e, t) => {
952
1441
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
953
1442
  }, X = {
954
1443
  button: "_button_2nghu_1",
@@ -978,104 +1467,104 @@ var nt = (e, t) => {
978
1467
  "button-spin": "_button-spin_2nghu_1",
979
1468
  badge: "_badge_2nghu_786",
980
1469
  shortcut: "_shortcut_2nghu_800"
981
- }, rt = n(({ children: t, color: n = "primary", appearance: i = "solid", size: a = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: g, badge: _, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
982
- let I = S && r(t) ? t : void 0, L = I ? I.props.children : t, z = x || !L && !!(d || f), B = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), V = c || l, H = l && u ? u : L, ee = u && L && !z && (typeof L == "string" || typeof L == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? L : u) : void 0, te = O === "_blank" && !k ? "noreferrer noopener" : k, ne = R(X.button, X[n], X[i], X[a], X[o], C, {
983
- [X.disabled]: V,
1470
+ }, Dt = r(({ children: e, color: n = "primary", appearance: r = "solid", size: a = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: p, badge: _, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
1471
+ let I = S && i(e) ? e : void 0, L = I ? I.props.children : e, R = x || !L && !!(d || f), ee = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), B = c || l, te = l && u ? u : L, ne = u && L && !R && (typeof L == "string" || typeof L == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? L : u) : void 0, re = O === "_blank" && !k ? "noreferrer noopener" : k, ie = z(X.button, X[n], X[r], X[a], X[o], C, {
1472
+ [X.disabled]: B,
984
1473
  [X.loading]: l,
985
1474
  [X.fullWidth]: b,
986
- [X.iconOnly]: z
1475
+ [X.iconOnly]: R
987
1476
  });
988
- nt(!S || !D, "Button: pass href to the child element when using asChild."), nt(!S || !!I, "Button: asChild requires a single valid React element child."), nt(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
989
- let re = (e) => {
1477
+ Et(!S || !D, "Button: pass href to the child element when using asChild."), Et(!S || !!I, "Button: asChild requires a single valid React element child."), Et(!R || ee, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
1478
+ let ae = (e) => {
990
1479
  e.preventDefault(), e.stopPropagation();
991
- }, U = (e) => {
992
- if (V) {
993
- re(e);
1480
+ }, oe = (e) => {
1481
+ if (B) {
1482
+ ae(e);
994
1483
  return;
995
1484
  }
996
1485
  I?.props.onClick?.(e), e.defaultPrevented || w?.(e);
997
- }, ie = /* @__PURE__ */ h(p, { children: [
998
- l && (g ? /* @__PURE__ */ m("span", {
1486
+ }, V = /* @__PURE__ */ g(m, { children: [
1487
+ l && (p ? /* @__PURE__ */ h("span", {
999
1488
  className: X.icon,
1000
1489
  "aria-hidden": "true",
1001
- children: g
1002
- }) : /* @__PURE__ */ m("span", {
1490
+ children: p
1491
+ }) : /* @__PURE__ */ h("span", {
1003
1492
  className: X.spinner,
1004
1493
  "aria-hidden": "true"
1005
1494
  })),
1006
- !l && d && /* @__PURE__ */ m("span", {
1495
+ !l && d && /* @__PURE__ */ h("span", {
1007
1496
  className: X.icon,
1008
1497
  children: d
1009
1498
  }),
1010
- H && !z && /* @__PURE__ */ m("span", {
1499
+ te && !R && /* @__PURE__ */ h("span", {
1011
1500
  className: X.label,
1012
- "data-measure": ee,
1013
- children: /* @__PURE__ */ m("span", {
1501
+ "data-measure": ne,
1502
+ children: /* @__PURE__ */ h("span", {
1014
1503
  className: X.labelText,
1015
- children: H
1504
+ children: te
1016
1505
  })
1017
1506
  }),
1018
- _ && !z && /* @__PURE__ */ m("span", {
1507
+ _ && !R && /* @__PURE__ */ h("span", {
1019
1508
  className: X.badge,
1020
1509
  children: _
1021
1510
  }),
1022
- v && !z && /* @__PURE__ */ m("span", {
1511
+ v && !R && /* @__PURE__ */ h("span", {
1023
1512
  className: X.shortcut,
1024
1513
  children: v
1025
1514
  }),
1026
- !l && f && /* @__PURE__ */ m("span", {
1515
+ !l && f && /* @__PURE__ */ h("span", {
1027
1516
  className: X.icon,
1028
1517
  children: f
1029
1518
  })
1030
1519
  ] });
1031
- return I ? e(I, {
1520
+ return I ? t(I, {
1032
1521
  ...P,
1033
1522
  ref: F,
1034
1523
  "aria-busy": l || void 0,
1035
- "aria-disabled": V || void 0,
1524
+ "aria-disabled": B || void 0,
1036
1525
  "aria-label": T || I.props["aria-label"] || void 0,
1037
1526
  "aria-labelledby": E || I.props["aria-labelledby"] || void 0,
1038
- className: R(I.props.className, ne),
1039
- href: V ? void 0 : I.props.href,
1040
- onClick: U,
1041
- tabIndex: V ? -1 : I.props.tabIndex,
1527
+ className: z(I.props.className, ie),
1528
+ href: B ? void 0 : I.props.href,
1529
+ onClick: oe,
1530
+ tabIndex: B ? -1 : I.props.tabIndex,
1042
1531
  title: y || I.props.title,
1043
- children: ie
1044
- }) : D ? /* @__PURE__ */ m("a", {
1532
+ children: V
1533
+ }) : D ? /* @__PURE__ */ h("a", {
1045
1534
  ref: F,
1046
- href: V ? void 0 : D,
1535
+ href: B ? void 0 : D,
1047
1536
  id: j,
1048
1537
  role: M,
1049
- tabIndex: V ? -1 : N,
1538
+ tabIndex: B ? -1 : N,
1050
1539
  target: O,
1051
- rel: te,
1540
+ rel: re,
1052
1541
  download: A,
1053
- onClick: V ? re : w,
1054
- "aria-disabled": V || void 0,
1542
+ onClick: B ? ae : w,
1543
+ "aria-disabled": B || void 0,
1055
1544
  "aria-label": T || void 0,
1056
1545
  "aria-labelledby": E || void 0,
1057
1546
  "aria-busy": l || void 0,
1058
- className: ne,
1547
+ className: ie,
1059
1548
  title: y,
1060
- children: ie
1061
- }) : /* @__PURE__ */ m("button", {
1549
+ children: V
1550
+ }) : /* @__PURE__ */ h("button", {
1062
1551
  ...P,
1063
1552
  ref: F,
1064
1553
  id: j,
1065
1554
  role: M,
1066
1555
  tabIndex: N,
1067
1556
  type: s,
1068
- disabled: V,
1069
- onClick: V ? void 0 : w,
1557
+ disabled: B,
1558
+ onClick: B ? void 0 : w,
1070
1559
  "aria-label": T || void 0,
1071
1560
  "aria-labelledby": E || void 0,
1072
1561
  "aria-busy": l || void 0,
1073
- className: ne,
1562
+ className: ie,
1074
1563
  title: y,
1075
- children: ie
1564
+ children: V
1076
1565
  });
1077
1566
  });
1078
- rt.displayName = "Button";
1567
+ Dt.displayName = "Button";
1079
1568
  var Z = {
1080
1569
  wrapper: "_wrapper_877rr_1",
1081
1570
  colorPrimary: "_colorPrimary_877rr_27",
@@ -1109,62 +1598,62 @@ var Z = {
1109
1598
  indeterminate: "_indeterminate_877rr_226",
1110
1599
  "checkbox-pop": "_checkbox-pop_877rr_1",
1111
1600
  disabled: "_disabled_877rr_354"
1112
- }, it = {
1601
+ }, Ot = {
1113
1602
  sm: Z.labelSm,
1114
1603
  md: Z.labelMd,
1115
1604
  lg: Z.labelLg
1116
- }, at = {
1605
+ }, kt = {
1117
1606
  sm: Z.wrapperSm,
1118
1607
  md: Z.wrapperMd,
1119
1608
  lg: Z.wrapperLg
1120
- }, ot = {
1609
+ }, At = {
1121
1610
  sm: Z.containerSm,
1122
1611
  md: Z.containerMd,
1123
1612
  lg: Z.containerLg
1124
- }, st = {
1613
+ }, jt = {
1125
1614
  primary: Z.colorPrimary,
1126
1615
  neutral: Z.colorNeutral,
1127
1616
  success: Z.colorSuccess,
1128
1617
  warning: Z.colorWarning,
1129
1618
  danger: Z.colorDanger
1130
- }, ct = n(({ id: e, label: t, description: n, icon: r, indeterminateIcon: a, checked: c, size: u = "md", color: d = "primary", labelPosition: f = "end", defaultChecked: p = !1, disabled: g = !1, required: _ = !1, indeterminate: v = !1, className: y, wrapperClassName: b, onCheckedChange: x, error: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, ...E }, O) => {
1131
- let k = s(), A = e ?? k, j = l(null), M = !!S, P = n ? `${A}-description` : void 0, F = M ? `${A}-error` : void 0, I = [
1619
+ }, Mt = r(({ id: e, label: t, description: n, icon: r, indeterminateIcon: i, checked: o, size: l = "md", color: d = "primary", labelPosition: f = "end", defaultChecked: p = !1, disabled: m = !1, required: _ = !1, indeterminate: v = !1, className: y, wrapperClassName: b, onCheckedChange: x, error: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, ...E }, D) => {
1620
+ let k = c(), A = e ?? k, j = u(null), M = !!S, N = n ? `${A}-description` : void 0, F = M ? `${A}-error` : void 0, I = [
1132
1621
  T,
1133
- P,
1622
+ N,
1134
1623
  F
1135
- ].filter(Boolean).join(" "), [L, z] = D({
1136
- value: c,
1624
+ ].filter(Boolean).join(" "), [L, R] = O({
1625
+ value: o,
1137
1626
  defaultValue: p,
1138
1627
  onChange: x
1139
- }), B = i((e) => {
1140
- if (j.current = e, typeof O == "function") {
1141
- O(e);
1628
+ }), ee = a((e) => {
1629
+ if (j.current = e, typeof D == "function") {
1630
+ D(e);
1142
1631
  return;
1143
1632
  }
1144
- O && (O.current = e);
1145
- }, [O]);
1146
- o(() => {
1633
+ D && (D.current = e);
1634
+ }, [D]);
1635
+ s(() => {
1147
1636
  j.current && (j.current.indeterminate = v);
1148
1637
  }, [v]);
1149
- let V = (e) => {
1150
- z(e.target.checked);
1638
+ let B = (e) => {
1639
+ R(e.target.checked);
1151
1640
  };
1152
- return nt(!!(t || C || w), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ h("div", {
1153
- className: R(Z.container, ot[u], f === "start" && Z.containerLabelStart, y),
1641
+ return Et(!!(t || C || w), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ g("div", {
1642
+ className: z(Z.container, At[l], f === "start" && Z.containerLabelStart, y),
1154
1643
  children: [
1155
- /* @__PURE__ */ h("label", {
1644
+ /* @__PURE__ */ g("label", {
1156
1645
  htmlFor: A,
1157
- className: R(Z.wrapper, at[u], st[d], f === "start" && Z.labelStart, !t && Z.iconOnly, g && Z.disabled, b),
1646
+ className: z(Z.wrapper, kt[l], jt[d], f === "start" && Z.labelStart, !t && Z.iconOnly, m && Z.disabled, b),
1158
1647
  children: [
1159
- /* @__PURE__ */ m("input", {
1648
+ /* @__PURE__ */ h("input", {
1160
1649
  ...E,
1161
- ref: B,
1650
+ ref: ee,
1162
1651
  id: A,
1163
1652
  type: "checkbox",
1164
1653
  checked: L,
1165
- disabled: g,
1654
+ disabled: m,
1166
1655
  required: _,
1167
- onChange: V,
1656
+ onChange: B,
1168
1657
  className: Z.input,
1169
1658
  "aria-label": C,
1170
1659
  "aria-labelledby": w,
@@ -1172,20 +1661,20 @@ var Z = {
1172
1661
  "aria-invalid": M ? !0 : E["aria-invalid"],
1173
1662
  "aria-describedby": I || void 0
1174
1663
  }),
1175
- /* @__PURE__ */ m("span", {
1176
- className: R(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1664
+ /* @__PURE__ */ h("span", {
1665
+ className: z(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1177
1666
  "aria-hidden": "true",
1178
- children: v ? /* @__PURE__ */ m("span", {
1179
- className: R(Z.indeterminateMark, a && Z.customMark),
1180
- children: a
1181
- }) : L && /* @__PURE__ */ m("span", {
1667
+ children: v ? /* @__PURE__ */ h("span", {
1668
+ className: z(Z.indeterminateMark, i && Z.customMark),
1669
+ children: i
1670
+ }) : L && /* @__PURE__ */ h("span", {
1182
1671
  className: Z.checkmark,
1183
- children: r ?? /* @__PURE__ */ m(N, {})
1672
+ children: r ?? /* @__PURE__ */ h(P, {})
1184
1673
  })
1185
1674
  }),
1186
- t && /* @__PURE__ */ h("span", {
1187
- className: R(Z.label, it[u]),
1188
- children: [t, _ && /* @__PURE__ */ m("span", {
1675
+ t && /* @__PURE__ */ g("span", {
1676
+ className: z(Z.label, Ot[l]),
1677
+ children: [t, _ && /* @__PURE__ */ h("span", {
1189
1678
  className: Z.requiredMark,
1190
1679
  "aria-hidden": "true",
1191
1680
  children: "*"
@@ -1193,12 +1682,12 @@ var Z = {
1193
1682
  })
1194
1683
  ]
1195
1684
  }),
1196
- n && /* @__PURE__ */ m("span", {
1197
- id: P,
1685
+ n && /* @__PURE__ */ h("span", {
1686
+ id: N,
1198
1687
  className: Z.descriptionText,
1199
1688
  children: n
1200
1689
  }),
1201
- M && /* @__PURE__ */ m("span", {
1690
+ M && /* @__PURE__ */ h("span", {
1202
1691
  id: F,
1203
1692
  className: Z.errorText,
1204
1693
  children: S
@@ -1206,7 +1695,7 @@ var Z = {
1206
1695
  ]
1207
1696
  });
1208
1697
  });
1209
- ct.displayName = "Checkbox";
1698
+ Mt.displayName = "Checkbox";
1210
1699
  var Q = {
1211
1700
  inputGroup: "_inputGroup_151bq_1",
1212
1701
  primary: "_primary_151bq_29",
@@ -1248,7 +1737,7 @@ var Q = {
1248
1737
  toneDanger: "_toneDanger_151bq_873",
1249
1738
  toneMuted: "_toneMuted_151bq_877",
1250
1739
  toneInverse: "_toneInverse_151bq_881"
1251
- }, lt = {
1740
+ }, Nt = {
1252
1741
  default: Q.toneDefault,
1253
1742
  primary: Q.tonePrimary,
1254
1743
  secondary: Q.toneSecondary,
@@ -1256,7 +1745,7 @@ var Q = {
1256
1745
  danger: Q.toneDanger,
1257
1746
  muted: Q.toneMuted,
1258
1747
  inverse: Q.toneInverse
1259
- }, ut = (e = "text", t) => {
1748
+ }, Pt = (e = "text", t) => {
1260
1749
  if (t) return t;
1261
1750
  switch (e) {
1262
1751
  case "email": return "email";
@@ -1266,7 +1755,7 @@ var Q = {
1266
1755
  case "search": return "off";
1267
1756
  default: return;
1268
1757
  }
1269
- }, dt = (e, t) => {
1758
+ }, Ft = (e, t) => {
1270
1759
  let n = e.replace(/\D/g, ""), r = 0, i = "";
1271
1760
  for (let e of t) {
1272
1761
  if (e === "#") {
@@ -1278,149 +1767,149 @@ var Q = {
1278
1767
  r < n.length && (i += e);
1279
1768
  }
1280
1769
  return i;
1281
- }, ft = (e, t) => t ? typeof t == "function" ? t(e) : dt(e, t) : e, pt = n(({ id: e, label: t, name: n, description: r, placeholder: a, value: o, defaultValue: c, type: d = "text", size: f, color: g = "primary", variant: _ = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: C, wrapperClassName: w, autoComplete: T, readOnly: E = !1, clearable: D = !1, onClear: O, onValueChange: k, revealPassword: A = !1, showCounter: j = !1, startIcon: M, endIcon: N, startAddon: P, endAddon: F, prefix: L, suffix: z, clearIcon: B, mask: V, format: H, parse: ee, startIconTone: te = "default", endIconTone: ne = "default", clearIconTone: re = "danger", autoFocus: U, maxLength: ie, onMouseEnter: ae, onMouseLeave: oe, "aria-describedby": W, "aria-invalid": se, "aria-labelledby": ce, ...le }, ue) => {
1282
- let de = s(), G = Ne(), K = !!(t || r || v), fe = e ?? (K ? void 0 : G?.controlId) ?? de, pe = l(null), [me, he] = u(!1), [ge, _e] = u(c ?? ""), ve = o !== void 0, ye = String((ve ? o : ge) ?? ""), be = H ? H(ye) : ye, xe = ye.length > 0, Se = f ?? G?.size ?? "md", Ce = y || !!v || !K && !!G?.invalid, we = b || !K && !!G?.disabled, Te = x || !K && !!G?.required, Ee = E || S, De = d === "password", Oe = De && A && me ? "text" : d, ke = M ?? (d === "search" ? /* @__PURE__ */ m(I, {}) : null), Ae = N, q = ut(d, T), je = S && !we, Me = D && xe && !we && !Ee && !je, J = A && De && !we && !je && !Me, Pe = !je && !Me && !J && !!Ae, Ie = !!(j && ie), Le = r ? `${fe}-description` : void 0, Re = v ? `${fe}-error` : void 0, ze = Ie ? `${fe}-counter` : void 0, Y = [
1283
- W,
1284
- !K && !W ? G?.ariaDescribedBy : void 0,
1285
- Le,
1286
- Re,
1287
- ze
1288
- ].filter(Boolean).join(" "), Be = B ?? "×", Ve = !!(ke || L), He = !!(Ae || z || Me || J || je), Ue = !!(ke && L), We = !!(Ae && z), Ge = !!(P || F), Ke = i((e) => {
1289
- if (pe.current = e, typeof ue == "function") {
1290
- ue(e);
1770
+ }, It = (e, t) => t ? typeof t == "function" ? t(e) : Ft(e, t) : e, Lt = r(({ id: e, label: t, name: n, description: r, placeholder: i, value: o, defaultValue: s, type: l = "text", size: f, color: p = "primary", variant: _ = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: C, wrapperClassName: w, autoComplete: T, readOnly: E = !1, clearable: D = !1, onClear: O, onValueChange: k, revealPassword: A = !1, showCounter: j = !1, startIcon: M, endIcon: N, startAddon: P, endAddon: F, prefix: I, suffix: R, clearIcon: ee, mask: B, format: te, parse: ne, startIconTone: re = "default", endIconTone: ie = "default", clearIconTone: ae = "danger", autoFocus: oe, maxLength: V, onMouseEnter: se, onMouseLeave: ce, "aria-describedby": le, "aria-invalid": ue, "aria-labelledby": de, ...fe }, pe) => {
1771
+ let me = c(), he = Ie(), ge = !!(t || r || v), _e = e ?? (ge ? void 0 : he?.controlId) ?? me, ve = u(null), [ye, be] = d(!1), [xe, H] = d(s ?? ""), U = o !== void 0, W = String((U ? o : xe) ?? ""), Se = te ? te(W) : W, Ce = W.length > 0, we = f ?? he?.size ?? "md", Te = y || !!v || !ge && !!he?.invalid, Ee = b || !ge && !!he?.disabled, De = x || !ge && !!he?.required, Oe = E || S, ke = l === "password", Ae = ke && A && ye ? "text" : l, je = M ?? (l === "search" ? /* @__PURE__ */ h(L, {}) : null), Me = N, Ne = Pt(l, T), G = S && !Ee, Pe = D && Ce && !Ee && !Oe && !G, Fe = A && ke && !Ee && !G && !Pe, K = !G && !Pe && !Fe && !!Me, Le = !!(j && V), q = r ? `${_e}-description` : void 0, ze = v ? `${_e}-error` : void 0, J = Le ? `${_e}-counter` : void 0, Be = [
1772
+ le,
1773
+ !ge && !le ? he?.ariaDescribedBy : void 0,
1774
+ q,
1775
+ ze,
1776
+ J
1777
+ ].filter(Boolean).join(" "), Y = ee ?? "×", Ve = !!(je || I), He = !!(Me || R || Pe || Fe || G), Ue = !!(je && I), We = !!(Me && R), Ge = !!(P || F), Ke = a((e) => {
1778
+ if (ve.current = e, typeof pe == "function") {
1779
+ pe(e);
1291
1780
  return;
1292
1781
  }
1293
- ue && (ue.current = e);
1294
- }, [ue]), qe = i((e) => {
1295
- let t = ft(ee ? ee(e.target.value) : e.target.value, V);
1296
- ve || _e(t), k?.(t);
1782
+ pe && (pe.current = e);
1783
+ }, [pe]), qe = a((e) => {
1784
+ let t = It(ne ? ne(e.target.value) : e.target.value, B);
1785
+ U || H(t), k?.(t);
1297
1786
  }, [
1298
- ve,
1299
- V,
1787
+ U,
1788
+ B,
1300
1789
  k,
1301
- ee
1302
- ]), Je = i(() => {
1303
- ve || _e(""), k?.(""), O?.(), pe.current?.focus();
1790
+ ne
1791
+ ]), Je = a(() => {
1792
+ U || H(""), k?.(""), O?.(), ve.current?.focus();
1304
1793
  }, [
1305
- ve,
1794
+ U,
1306
1795
  O,
1307
1796
  k
1308
- ]), Ye = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
1309
- className: R(Q.inputGroup, Q[_], Q[g], {
1797
+ ]), Ye = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
1798
+ className: z(Q.inputGroup, Q[_], Q[p], {
1310
1799
  [Q.hasAddons]: Ge,
1311
- [Q.isDisabled]: we,
1312
- [Q.isInvalid]: Ce,
1313
- [Q.isLoading]: je
1800
+ [Q.isDisabled]: Ee,
1801
+ [Q.isInvalid]: Te,
1802
+ [Q.isLoading]: G
1314
1803
  }),
1315
1804
  children: [
1316
- P && /* @__PURE__ */ m("span", {
1805
+ P && /* @__PURE__ */ h("span", {
1317
1806
  className: Q.addon,
1318
1807
  children: P
1319
1808
  }),
1320
- /* @__PURE__ */ h("div", {
1321
- className: R(Q.inputWrapper, {
1809
+ /* @__PURE__ */ g("div", {
1810
+ className: z(Q.inputWrapper, {
1322
1811
  [Q.hasLeftAdornment]: Ve,
1323
1812
  [Q.hasRightAdornment]: He,
1324
1813
  [Q.hasStartIconAndPrefix]: Ue,
1325
1814
  [Q.hasEndIconAndSuffix]: We
1326
1815
  }),
1327
1816
  children: [
1328
- ke && /* @__PURE__ */ m("span", {
1817
+ je && /* @__PURE__ */ h("span", {
1329
1818
  "aria-hidden": "true",
1330
- className: R(Q.startAdornment, lt[te]),
1331
- children: ke
1819
+ className: z(Q.startAdornment, Nt[re]),
1820
+ children: je
1332
1821
  }),
1333
- L && /* @__PURE__ */ m("span", {
1822
+ I && /* @__PURE__ */ h("span", {
1334
1823
  className: Q.prefix,
1335
- children: L
1824
+ children: I
1336
1825
  }),
1337
- /* @__PURE__ */ m("input", {
1338
- ...le,
1826
+ /* @__PURE__ */ h("input", {
1827
+ ...fe,
1339
1828
  ref: Ke,
1340
- id: fe,
1829
+ id: _e,
1341
1830
  name: n,
1342
- type: Oe,
1343
- autoComplete: q,
1344
- className: R(Q.input, Q[Se], { [Q.error]: Ce }, C),
1345
- value: be,
1831
+ type: Ae,
1832
+ autoComplete: Ne,
1833
+ className: z(Q.input, Q[we], { [Q.error]: Te }, C),
1834
+ value: Se,
1346
1835
  onChange: qe,
1347
- placeholder: a,
1348
- disabled: we,
1349
- readOnly: Ee,
1350
- required: Te,
1351
- autoFocus: U,
1352
- maxLength: ie,
1353
- "aria-invalid": Ce ? !0 : se,
1354
- "aria-labelledby": ce ?? (K ? void 0 : G?.ariaLabelledBy),
1355
- "aria-describedby": Y || void 0,
1836
+ placeholder: i,
1837
+ disabled: Ee,
1838
+ readOnly: Oe,
1839
+ required: De,
1840
+ autoFocus: oe,
1841
+ maxLength: V,
1842
+ "aria-invalid": Te ? !0 : ue,
1843
+ "aria-labelledby": de ?? (ge ? void 0 : he?.ariaLabelledBy),
1844
+ "aria-describedby": Be || void 0,
1356
1845
  "aria-busy": S || void 0,
1357
- onMouseEnter: ae,
1358
- onMouseLeave: oe
1846
+ onMouseEnter: se,
1847
+ onMouseLeave: ce
1359
1848
  }),
1360
- z && /* @__PURE__ */ m("span", {
1849
+ R && /* @__PURE__ */ h("span", {
1361
1850
  className: Q.suffix,
1362
- children: z
1851
+ children: R
1363
1852
  }),
1364
- /* @__PURE__ */ h("div", {
1853
+ /* @__PURE__ */ g("div", {
1365
1854
  className: Q.endSlot,
1366
1855
  children: [
1367
- je && /* @__PURE__ */ m("span", {
1856
+ G && /* @__PURE__ */ h("span", {
1368
1857
  className: Q.spinner,
1369
1858
  "aria-hidden": "true",
1370
1859
  "data-testid": "input-spinner"
1371
1860
  }),
1372
- J && /* @__PURE__ */ m("button", {
1861
+ Fe && /* @__PURE__ */ h("button", {
1373
1862
  type: "button",
1374
1863
  className: Q.iconButton,
1375
- onClick: () => he((e) => !e),
1376
- "aria-label": me ? "Hide password" : "Show password",
1377
- children: me ? "Hide" : "Show"
1864
+ onClick: () => be((e) => !e),
1865
+ "aria-label": ye ? "Hide password" : "Show password",
1866
+ children: ye ? "Hide" : "Show"
1378
1867
  }),
1379
- Me && /* @__PURE__ */ m("button", {
1868
+ Pe && /* @__PURE__ */ h("button", {
1380
1869
  type: "button",
1381
- className: R(Q.clearButton, lt[re]),
1870
+ className: z(Q.clearButton, Nt[ae]),
1382
1871
  onClick: Je,
1383
1872
  "aria-label": "Clear input",
1384
- children: Be
1873
+ children: Y
1385
1874
  }),
1386
- Pe && Ae && /* @__PURE__ */ m("span", {
1875
+ K && Me && /* @__PURE__ */ h("span", {
1387
1876
  "aria-hidden": "true",
1388
- className: R(Q.endAdornment, lt[ne]),
1389
- children: Ae
1877
+ className: z(Q.endAdornment, Nt[ie]),
1878
+ children: Me
1390
1879
  })
1391
1880
  ]
1392
1881
  })
1393
1882
  ]
1394
1883
  }),
1395
- F && /* @__PURE__ */ m("span", {
1884
+ F && /* @__PURE__ */ h("span", {
1396
1885
  className: Q.addon,
1397
1886
  children: F
1398
1887
  })
1399
1888
  ]
1400
- }), Ie && /* @__PURE__ */ h("div", {
1401
- id: ze,
1889
+ }), Le && /* @__PURE__ */ g("div", {
1890
+ id: J,
1402
1891
  className: Q.counter,
1403
1892
  children: [
1404
- ye.length,
1893
+ W.length,
1405
1894
  " / ",
1406
- ie
1895
+ V
1407
1896
  ]
1408
1897
  })] });
1409
- return !K && G ? Ye : /* @__PURE__ */ m(Fe, {
1410
- id: fe,
1898
+ return !ge && he ? Ye : /* @__PURE__ */ h(Re, {
1899
+ id: _e,
1411
1900
  label: t,
1412
1901
  description: r,
1413
1902
  error: v,
1414
- required: Te,
1415
- disabled: we,
1416
- invalid: Ce,
1417
- size: Se,
1903
+ required: De,
1904
+ disabled: Ee,
1905
+ invalid: Te,
1906
+ size: we,
1418
1907
  className: w,
1419
1908
  bindControl: !1,
1420
1909
  children: Ye
1421
1910
  });
1422
1911
  });
1423
- pt.displayName = "Input";
1912
+ Lt.displayName = "Input";
1424
1913
  var $ = {
1425
1914
  root: "_root_qb9nm_1",
1426
1915
  invalid: "_invalid_qb9nm_27",
@@ -1442,23 +1931,23 @@ var $ = {
1442
1931
  customIcon: "_customIcon_qb9nm_216",
1443
1932
  content: "_content_qb9nm_335",
1444
1933
  error: "_error_qb9nm_352"
1445
- }, mt = {
1934
+ }, Rt = {
1446
1935
  primary: $.colorPrimary,
1447
1936
  neutral: $.colorNeutral,
1448
1937
  success: $.colorSuccess,
1449
1938
  warning: $.colorWarning,
1450
1939
  danger: $.colorDanger
1451
- }, ht = n(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, color: o, error: c, onCheckedChange: l, label: u, description: d, icon: f, wrapperClassName: p, className: g, id: _, name: v, "aria-describedby": y, ...b }, x) => {
1452
- let S = Ae(), C = s(), w = _ ?? C, T = d ? `${w}-description` : void 0, E = c ? `${w}-error` : void 0, O = [
1940
+ }, zt = r(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, color: o, error: s, onCheckedChange: l, label: u, description: d, icon: f, wrapperClassName: p, className: m, id: _, name: v, "aria-describedby": y, ...b }, x) => {
1941
+ let S = Ne(), C = c(), w = _ ?? C, T = d ? `${w}-description` : void 0, E = s ? `${w}-error` : void 0, D = [
1453
1942
  T,
1454
1943
  E,
1455
1944
  S?.describedBy,
1456
1945
  y
1457
- ].filter(Boolean).join(" ") || void 0, k = S !== null, [A, j] = D({
1946
+ ].filter(Boolean).join(" ") || void 0, k = S !== null, [A, j] = O({
1458
1947
  value: t,
1459
1948
  defaultValue: n,
1460
1949
  onChange: l
1461
- }), M = k ? S.value === e : A, N = !!S?.disabled || r, P = !!S?.required || i, F = S?.name ?? v, I = !!(c || S?.invalid), L = a ?? S?.size ?? "md", z = o ?? S?.color ?? "primary", B = (t) => {
1950
+ }), M = k ? S.value === e : A, N = !!S?.disabled || r, P = !!S?.required || i, F = S?.name ?? v, I = !!(s || S?.invalid), L = a ?? S?.size ?? "md", R = o ?? S?.color ?? "primary", ee = (t) => {
1462
1951
  if (!N) {
1463
1952
  if (k) {
1464
1953
  S.onValueChange(e);
@@ -1467,13 +1956,13 @@ var $ = {
1467
1956
  j(t.currentTarget.checked);
1468
1957
  }
1469
1958
  };
1470
- return /* @__PURE__ */ h("div", {
1471
- className: R($.root, $[L], I && $.invalid, N && $.disabled, mt[z], g),
1472
- children: [/* @__PURE__ */ h("label", {
1959
+ return /* @__PURE__ */ g("div", {
1960
+ className: z($.root, $[L], I && $.invalid, N && $.disabled, Rt[R], m),
1961
+ children: [/* @__PURE__ */ g("label", {
1473
1962
  htmlFor: w,
1474
- className: R($.wrapper, p),
1963
+ className: z($.wrapper, p),
1475
1964
  children: [
1476
- /* @__PURE__ */ m("input", {
1965
+ /* @__PURE__ */ h("input", {
1477
1966
  ...b,
1478
1967
  ref: x,
1479
1968
  id: w,
@@ -1484,76 +1973,76 @@ var $ = {
1484
1973
  disabled: N,
1485
1974
  required: P,
1486
1975
  "aria-invalid": I || void 0,
1487
- "aria-describedby": O,
1976
+ "aria-describedby": D,
1488
1977
  className: $.input,
1489
- onChange: B
1978
+ onChange: ee
1490
1979
  }),
1491
- /* @__PURE__ */ m("span", {
1980
+ /* @__PURE__ */ h("span", {
1492
1981
  className: $.control,
1493
1982
  "aria-hidden": "true",
1494
- children: /* @__PURE__ */ m("span", {
1495
- className: R($.indicator, f && $.customIcon),
1983
+ children: /* @__PURE__ */ h("span", {
1984
+ className: z($.indicator, f && $.customIcon),
1496
1985
  children: f
1497
1986
  })
1498
1987
  }),
1499
- (u || d) && /* @__PURE__ */ h("span", {
1988
+ (u || d) && /* @__PURE__ */ g("span", {
1500
1989
  className: $.content,
1501
- children: [u && /* @__PURE__ */ m("span", {
1990
+ children: [u && /* @__PURE__ */ h("span", {
1502
1991
  className: $.label,
1503
1992
  children: u
1504
- }), d && /* @__PURE__ */ m("span", {
1993
+ }), d && /* @__PURE__ */ h("span", {
1505
1994
  id: T,
1506
1995
  className: $.description,
1507
1996
  children: d
1508
1997
  })]
1509
1998
  })
1510
1999
  ]
1511
- }), c && /* @__PURE__ */ m("div", {
2000
+ }), s && /* @__PURE__ */ h("div", {
1512
2001
  id: E,
1513
2002
  className: $.error,
1514
- children: c
2003
+ children: s
1515
2004
  })]
1516
2005
  });
1517
2006
  });
1518
- ht.displayName = "Radio";
2007
+ zt.displayName = "Radio";
1519
2008
  //#endregion
1520
2009
  //#region src/theme/ThemeContext.ts
1521
- var gt = t(null), _t = (e) => e === "highContrast" ? "high-contrast" : e, vt = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1522
- let [i, a] = D({
2010
+ var Bt = n(null), Vt = (e) => e === "highContrast" ? "high-contrast" : e, Ht = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
2011
+ let [i, a] = O({
1523
2012
  value: e,
1524
2013
  defaultValue: t,
1525
2014
  onChange: n
1526
- }), s = _t(i);
1527
- o(() => {
2015
+ }), o = Vt(i);
2016
+ s(() => {
1528
2017
  if (typeof document > "u") return;
1529
2018
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
1530
- return e.dataset.velliraTheme = s, () => {
2019
+ return e.dataset.velliraTheme = o, () => {
1531
2020
  if (t === void 0) {
1532
2021
  delete e.dataset.velliraTheme;
1533
2022
  return;
1534
2023
  }
1535
2024
  e.dataset.velliraTheme = t;
1536
2025
  };
1537
- }, [s]);
1538
- let l = c(() => ({
2026
+ }, [o]);
2027
+ let c = l(() => ({
1539
2028
  theme: i,
1540
2029
  setTheme: a
1541
2030
  }), [i, a]);
1542
- return /* @__PURE__ */ m(gt.Provider, {
1543
- value: l,
1544
- children: /* @__PURE__ */ m("div", {
1545
- "data-vellira-theme": s,
2031
+ return /* @__PURE__ */ h(Bt.Provider, {
2032
+ value: c,
2033
+ children: /* @__PURE__ */ h("div", {
2034
+ "data-vellira-theme": o,
1546
2035
  children: r
1547
2036
  })
1548
2037
  });
1549
2038
  };
1550
- vt.displayName = "ThemeProvider";
2039
+ Ht.displayName = "ThemeProvider";
1551
2040
  //#endregion
1552
2041
  //#region src/theme/useTheme.ts
1553
- function yt() {
1554
- let e = a(gt);
2042
+ function Ut() {
2043
+ let e = o(Bt);
1555
2044
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1556
2045
  return e;
1557
2046
  }
1558
2047
  //#endregion
1559
- export { rt as Button, ct as Checkbox, G as Dropdown, Fe as FormField, pt as Input, De as Modal, ht as Radio, je as RadioGroup, Ve as Select, Qe as Tabs, vt as ThemeProvider, tt as Tooltip, yt as useTheme };
2048
+ export { Dt as Button, Mt as Checkbox, ge as Dropdown, Re as FormField, Lt as Input, Ae as Modal, zt as Radio, Pe as RadioGroup, ut as Select, St as Tabs, Ht as ThemeProvider, Tt as Tooltip, Ut as useTheme };