@vellira-ui/react 2.29.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 } from "@vellira-ui/icons";
8
- import I 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 L = (...e) => d(e), R = ({ 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;
17
- }, z = {
16
+ return r ? p(e, r) : null;
17
+ }, B = {
18
18
  dropdown: "_dropdown_1rvx9_1",
19
19
  "dropdown-in": "_dropdown-in_1rvx9_1"
20
- }, B = n(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ m(R, { children: /* @__PURE__ */ m("ul", {
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 L = (...e) => d(e), R = ({ children: e }) => {
27
27
  "aria-activedescendant": a,
28
28
  onKeyDown: o,
29
29
  style: t,
30
- className: L(z.dropdown, s),
30
+ className: z(B.dropdown, s),
31
31
  children: e
32
32
  }) }));
33
- B.displayName = "DropdownContent";
33
+ te.displayName = "DropdownContent";
34
34
  //#endregion
35
35
  //#region src/hooks/useFloatingPosition.ts
36
- var V = (e) => {
37
- let [t, n] = u(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
- return o(() => {
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 = V(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 V = (e) => {
88
89
  };
89
90
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
90
91
  }, [n]);
91
- }, H = { group: "_group_aviwv_1" }, U = ({ label: e }) => /* @__PURE__ */ m("li", {
92
+ }, ae = { group: "_group_aviwv_1" }, oe = ({ label: e }) => /* @__PURE__ */ h("li", {
92
93
  role: "presentation",
93
- className: H.group,
94
+ className: ae.group,
94
95
  children: e
95
- }), W = {
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 V = (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
- }, ne = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
107
+ }, 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 V = (e) => {
114
115
  "data-danger": i || void 0,
115
116
  onClick: a ? void 0 : s,
116
117
  onMouseEnter: a ? void 0 : c,
117
- className: L(W.item, {
118
- [W.active]: o,
119
- [W.disabled]: a,
120
- [W.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: W.itemIcon,
126
+ className: V.itemIcon,
126
127
  children: r
127
128
  }),
128
- f && /* @__PURE__ */ m("span", {
129
- className: L(W.itemText, W[`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: W.itemShortcut,
133
+ l && /* @__PURE__ */ h("span", {
134
+ className: V.itemShortcut,
134
135
  children: l
135
136
  })
136
137
  ]
137
138
  });
138
- }, G = { separator: "_separator_1v11r_1" }, re = () => /* @__PURE__ */ m("li", {
139
+ }, ce = { separator: "_separator_1v11r_1" }, le = () => /* @__PURE__ */ h("li", {
139
140
  role: "separator",
140
- className: G.separator,
141
+ className: ce.separator,
141
142
  "aria-hidden": "true"
142
- }), K = {
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 V = (e) => {
149
150
  md: "_md_18ucr_72",
150
151
  lg: "_lg_18ucr_84",
151
152
  open: "_open_18ucr_123"
152
- }, ie = 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: L(K.button, K[o], {
159
- [K.disabled]: u.disabled,
160
- [K.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: K.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: L(K.arrow, { [K.open]: t }),
176
+ className: z(ue.arrow, { [ue.open]: t }),
176
177
  children: v
177
178
  })
178
179
  ]
179
180
  });
180
181
  });
181
- ie.displayName = "DropdownTrigger";
182
+ de.displayName = "DropdownTrigger";
182
183
  //#endregion
183
184
  //#region src/components/Dropdown/types.ts
184
- var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "group", se = (e) => e.type === "separator", ce = { wrapper: "_wrapper_14ue8_1" }, le = ({ label: e, ariaLabel: t, icon: 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) => ae(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]), R = c(() => new Map(F.map(({ itemIndex: e }, t) => [e, t])), [F]), { activeIndex: z, setActiveIndex: V, isOpen: H, closeDropdown: W, toggleDropdown: G, selectItem: K, onKeyDown: le } = 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
- }), ue = H && z >= 0 ? `${A}-item-${z}` : void 0;
204
- te([D, k], W, H);
205
- let de = i((e) => {
206
- le(e), H && e.key === "Escape" && D.current?.focus();
207
- }, [H, le]), 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: L(ce.wrapper, g),
214
- children: [/* @__PURE__ */ m(ie, {
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 ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
224
225
  arrowIcon: E,
225
226
  rotateAngle: x,
226
227
  className: _,
227
- onClick: G,
228
- onKeyDown: de,
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(B, {
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
240
  activeDescendantId: ue,
240
- onKeyDown: de,
241
+ onKeyDown: ge,
241
242
  className: v,
242
- children: a.map((e, t) => {
243
- if (oe(e)) return /* @__PURE__ */ m(U, { label: e.label }, `group-${e.label}`);
244
- if (se(e)) return /* @__PURE__ */ m(re, {}, `separator-${t}`);
245
- if (ae(e)) {
246
- let n = R.get(t) ?? -1;
247
- return /* @__PURE__ */ m(ne, {
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)) {
247
+ let n = L.get(t) ?? -1;
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
- K(e), D.current?.focus();
255
+ V(e), D.current?.focus();
255
256
  },
256
257
  onMouseEnter: () => {
257
- n < 0 || e.disabled || V(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 ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
262
263
  })
263
264
  })]
264
265
  });
265
- }, ue = t(void 0), de = () => {
266
- let e = a(ue);
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
- ue.displayName = "ModalContext";
271
- var fe = { modalBody: "_modalBody_iv33a_1" }, pe = ({ children: e }) => {
272
- let { descriptionId: t } = de();
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: fe.modalBody,
276
+ className: ye.modalBody,
276
277
  children: e
277
278
  });
278
279
  };
279
- pe.displayName = "ModalBody";
280
- var me = { content: "_content_k44g7_1" }, he = ({ children: e }) => /* @__PURE__ */ m("div", {
281
- className: me.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
- he.displayName = "ModalContent";
285
- var ge = { modalFooter: "_modalFooter_ezys6_1" }, _e = ({ children: e }) => /* @__PURE__ */ m("div", {
286
- className: ge.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
- _e.displayName = "ModalFooter";
290
- var ve = {
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
- }, ye = ({ children: e }) => {
295
- let { onClose: t, titleId: n } = de();
296
- return /* @__PURE__ */ h("div", {
297
- className: ve.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: ve.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: ve.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
- ye.displayName = "ModalHeader";
312
+ Ce.displayName = "ModalHeader";
312
313
  //#endregion
313
314
  //#region src/hooks/useModalKeyboard.ts
314
- var be = ({ 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
- }, xe = {
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
- }, Se = 0, Ce = "", we = ({ 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 } = de(), _ = 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 be({
329
+ return we({
329
330
  isOpen: n,
330
331
  onClose: c ? t : void 0
331
- }), o(() => {
332
- if (n) return Se === 0 && (Ce = document.body.style.overflow), Se += 1, document.body.style.overflow = "hidden", () => {
333
- Se = Math.max(0, Se - 1), Se === 0 && (document.body.style.overflow = Ce);
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(R, { children: /* @__PURE__ */ m("div", {
336
- className: L(xe.overlay, n && xe["overlay--open"], d && xe["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(I, {
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: xe.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
- we.displayName = "ModalOverlay";
363
+ Oe.displayName = "ModalOverlay";
363
364
  //#endregion
364
365
  //#region src/components/Modal/Modal.tsx
365
- var Te = ({ 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(ue.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(we, {
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(he, { children: t })
385
+ children: /* @__PURE__ */ h(H, { children: t })
385
386
  })
386
387
  }) : null;
387
388
  };
388
- Te.displayName = "Modal";
389
+ ke.displayName = "Modal";
389
390
  //#endregion
390
391
  //#region src/components/Modal/index.ts
391
- var Ee = Object.assign(Te, {
392
- Header: ye,
393
- Body: pe,
394
- Content: he,
395
- Footer: _e
396
- }), De = t(null), Oe = De.Provider;
397
- function ke() {
398
- return a(De);
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
- }, Ae = 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: L(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(Oe, {
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,295 +453,831 @@ var q = {
452
453
  describedBy: T,
453
454
  onValueChange: k
454
455
  },
455
- children: /* @__PURE__ */ m("div", {
456
- className: L(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
- Ae.displayName = "RadioGroup";
469
- var J = {
470
- wrapper: "_wrapper_byl2d_1",
471
- label: "_label_byl2d_9",
472
- required: "_required_byl2d_20",
473
- description: "_description_byl2d_25",
474
- control: "_control_byl2d_32",
475
- errorText: "_errorText_byl2d_40",
476
- disabled: "_disabled_byl2d_54"
477
- }, je = ({ id: e, label: t, description: n, error: r, required: i = !1, disabled: a = !1, children: o, className: s, controlClassName: c, labelClassName: l, descriptionClassName: u, errorClassName: d, ...f }) => {
478
- let p = n && e ? `${e}-description` : void 0, g = r && e ? `${e}-error` : void 0;
479
- return /* @__PURE__ */ h("div", {
480
- ...f,
481
- "aria-disabled": a || void 0,
482
- className: L(J.wrapper, a && J.disabled, s),
483
- "data-disabled": a || void 0,
484
- "data-invalid": !!r || void 0,
469
+ Pe.displayName = "RadioGroup";
470
+ //#endregion
471
+ //#region src/patterns/FormField/FormFieldContext.ts
472
+ var Fe = n(null), Ie = () => o(Fe), K = {
473
+ wrapper: "_wrapper_143kr_1",
474
+ sm: "_sm_143kr_41",
475
+ md: "_md_143kr_78",
476
+ lg: "_lg_143kr_115",
477
+ horizontal: "_horizontal_143kr_152",
478
+ start: "_start_143kr_153",
479
+ description: "_description_143kr_160",
480
+ control: "_control_143kr_161",
481
+ errorText: "_errorText_143kr_162",
482
+ label: "_label_143kr_169",
483
+ labelText: "_labelText_143kr_186",
484
+ required: "_required_143kr_190",
485
+ optional: "_optional_143kr_194",
486
+ labelInfo: "_labelInfo_143kr_201",
487
+ disabled: "_disabled_143kr_243"
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 = {
490
+ controlId: E,
491
+ labelId: D,
492
+ descriptionId: O,
493
+ errorId: k,
494
+ required: o,
495
+ disabled: s,
496
+ invalid: A,
497
+ size: f,
498
+ ariaLabelledBy: j,
499
+ ariaDescribedBy: M
500
+ }, P = i(_) ? _ : void 0, F = v && P ? t(P, {
501
+ id: P.props.id ?? E,
502
+ required: P.props.required ?? o,
503
+ disabled: P.props.disabled ?? s,
504
+ "aria-invalid": P.props["aria-invalid"] ?? (A || void 0),
505
+ "aria-labelledby": Le(P.props["aria-labelledby"], j),
506
+ "aria-describedby": Le(P.props["aria-describedby"], M)
507
+ }) : _;
508
+ return /* @__PURE__ */ g("div", {
509
+ ...w,
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,
513
+ "data-invalid": A || void 0,
514
+ "data-orientation": u,
515
+ "data-size": f,
485
516
  children: [
486
- t && /* @__PURE__ */ h("label", {
487
- htmlFor: e,
488
- className: L(J.label, l),
489
- children: [t, i && /* @__PURE__ */ m("span", {
490
- className: J.required,
491
- "aria-hidden": "true",
492
- children: "*"
493
- })]
517
+ n && /* @__PURE__ */ g("label", {
518
+ id: D,
519
+ htmlFor: E,
520
+ className: z(K.label, x),
521
+ children: [
522
+ /* @__PURE__ */ h("span", {
523
+ className: K.labelText,
524
+ children: n
525
+ }),
526
+ o && /* @__PURE__ */ h("span", {
527
+ className: K.required,
528
+ "aria-hidden": "true",
529
+ children: "*"
530
+ }),
531
+ !o && m && /* @__PURE__ */ h("span", {
532
+ className: K.optional,
533
+ children: m
534
+ }),
535
+ p && /* @__PURE__ */ h("span", {
536
+ className: K.labelInfo,
537
+ children: p
538
+ })
539
+ ]
494
540
  }),
495
- n && /* @__PURE__ */ m("div", {
496
- id: p,
497
- className: L(J.description, u),
498
- children: n
541
+ r && /* @__PURE__ */ h("div", {
542
+ id: O,
543
+ className: z(K.description, S),
544
+ children: r
499
545
  }),
500
- /* @__PURE__ */ m("div", {
501
- className: L(J.control, c),
502
- children: o
546
+ /* @__PURE__ */ h(Fe.Provider, {
547
+ value: N,
548
+ children: /* @__PURE__ */ h("div", {
549
+ className: z(K.control, b),
550
+ children: F
551
+ })
503
552
  }),
504
- r && /* @__PURE__ */ m("div", {
505
- id: g,
506
- className: L(J.errorText, d),
553
+ a && /* @__PURE__ */ h("div", {
554
+ id: k,
555
+ className: z(K.errorText, C),
507
556
  role: "alert",
508
- children: r
557
+ children: a
509
558
  })
510
559
  ]
511
560
  });
512
- }, Me = {
513
- option: "_option_l6qjj_1",
514
- selected: "_selected_l6qjj_18",
515
- disabled: "_disabled_l6qjj_18",
516
- active: "_active_l6qjj_34",
517
- label: "_label_l6qjj_46",
518
- check: "_check_l6qjj_54"
519
- }, Ne = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
520
- let o = !!e.disabled;
521
- 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", {
522
581
  id: r,
523
582
  role: "option",
524
583
  "aria-selected": t,
525
- "aria-disabled": o || void 0,
526
- className: L(Me.option, {
527
- [Me.selected]: t,
528
- [Me.active]: n,
529
- [Me.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"
530
592
  }),
531
593
  onClick: () => {
532
- o || i(e.value);
594
+ s || a(e.value);
533
595
  },
534
596
  onMouseEnter: () => {
535
- o || a();
597
+ s || o();
536
598
  },
537
- children: [/* @__PURE__ */ m("span", {
538
- className: Me.label,
539
- children: e.label
540
- }), /* @__PURE__ */ m("span", {
541
- className: Me.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,
542
627
  "aria-hidden": "true",
543
- children: t && /* @__PURE__ */ m(N, {})
628
+ children: t && /* @__PURE__ */ h(P, {})
544
629
  })]
545
630
  });
546
631
  };
547
- Ne.displayName = "SelectOption";
548
- var Pe = {
549
- dropdown: "_dropdown_qznlq_1",
550
- dropdownIn: "_dropdownIn_qznlq_1",
551
- empty: "_empty_qznlq_17"
552
- }, Fe = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, noOptionsText: o, selectedValue: s, activeIndex: c, className: l, onSelect: u, onMouseEnter: d }) => e ? /* @__PURE__ */ m(R, { children: /* @__PURE__ */ m("ul", {
553
- ref: r,
554
- id: t,
555
- role: "listbox",
556
- "aria-labelledby": n,
557
- className: [Pe.dropdown, l].filter(Boolean).join(" "),
558
- style: i,
559
- children: a.length ? a.map((e, n) => /* @__PURE__ */ m(Ne, {
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",
560
688
  option: e,
561
- isSelected: e.value === s,
562
- isActive: n === c,
563
- optionId: `${t}-option-${n}`,
564
- onSelect: u,
565
- onMouseEnter: () => d(n)
566
- }, e.value)) : /* @__PURE__ */ m("li", {
567
- role: "option",
568
- "aria-disabled": "true",
569
- "aria-selected": "false",
570
- className: Pe.empty,
571
- children: o
572
- })
573
- }) }) : null;
574
- Fe.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";
575
785
  var Y = {
576
- control: "_control_1xma1_1",
577
- disabled: "_disabled_1xma1_18",
578
- arrow: "_arrow_1xma1_23",
579
- sm: "_sm_1xma1_34",
580
- md: "_md_1xma1_41",
581
- lg: "_lg_1xma1_48",
582
- value: "_value_1xma1_55",
583
- placeholder: "_placeholder_1xma1_63",
584
- error: "_error_1xma1_67",
585
- open: "_open_1xma1_109"
586
- }, Ie = ({ 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", {
587
- id: e,
588
- 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,
589
814
  type: "button",
590
815
  role: "combobox",
591
- disabled: r,
592
- "aria-disabled": r || void 0,
593
- "aria-required": i || void 0,
594
- "aria-expanded": n,
816
+ disabled: a,
817
+ "aria-disabled": a || void 0,
818
+ "aria-required": o || void 0,
819
+ "aria-expanded": i,
595
820
  "aria-haspopup": "listbox",
596
- "aria-label": s,
597
- "aria-invalid": c || void 0,
598
- "aria-controls": n ? a : void 0,
599
- "aria-describedby": t,
600
- "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
601
- className: L(Y.control, Y[d], {
602
- [Y.error]: !!c,
603
- [Y.disabled]: r
604
- }, f),
605
- onClick: g,
606
- onKeyDown: _,
607
- onBlur: v,
608
- onFocus: y,
609
- children: [/* @__PURE__ */ m("span", {
610
- className: L(Y.value, { [Y.placeholder]: u }),
611
- children: l
612
- }), /* @__PURE__ */ m("span", {
613
- className: L(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),
614
918
  "aria-hidden": "true",
615
- children: /* @__PURE__ */ m(P, {})
616
- })]
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
617
953
  });
618
- Ie.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
+ }
619
1072
  //#endregion
620
1073
  //#region src/components/Select/Select.tsx
621
- var Le = ({ 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 }) => {
622
- 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: U, closeDropdown: W, toggleDropdown: ne, selectValue: G, onKeyDown: re } = A({
623
- value: o,
624
- defaultValue: c,
625
- onChange: u,
626
- options: d,
627
- disabled: v,
628
- open: S,
629
- defaultOpen: C,
630
- onOpenChange: w
631
- }), K = !!z, { floatingStyles: ie, setRef: ae, setFloatingRef: oe } = ee({
632
- open: B,
633
- onOpenChange: V,
634
- placement: b,
635
- 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,
636
1106
  mobileSheetBreakpoint: 640
637
- }), se = i((e) => {
638
- G(e), I.current?.focus();
639
- }, [G]);
640
- te([I, L], W, B);
641
- let ce = i((e) => {
642
- I.current = e, ae(e);
643
- }, [ae]), le = i((e) => {
644
- L.current = e, oe(e);
645
- }, [oe]);
646
- return /* @__PURE__ */ h(je, {
647
- id: M,
648
- label: e,
649
- description: t,
650
- error: y,
651
- required: _,
652
- disabled: v,
653
- className: D,
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);
1113
+ }, [ce]);
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
+ },
654
1200
  children: [
655
- /* @__PURE__ */ m(Ie, {
656
- id: M,
657
- errorId: F,
658
- isOpen: B,
659
- disabled: v,
660
- required: _,
661
- listboxId: N,
662
- activeIndex: H,
663
- ariaLabel: a ?? (e ? void 0 : z?.label || f),
664
- error: P,
665
- displayText: z?.label ?? f,
666
- isPlaceholder: !K,
667
- size: g,
668
- className: O,
669
- buttonRef: ce,
670
- onClick: ne,
671
- onKeyDown: re,
672
- onBlur: T,
673
- onFocus: E
674
- }),
675
- r && /* @__PURE__ */ m("input", {
676
- type: "hidden",
677
- name: r,
678
- value: R,
679
- disabled: v
680
- }),
681
- /* @__PURE__ */ m(Fe, {
682
- isOpen: B,
683
- listboxId: N,
684
- labelledById: M,
685
- style: ie,
686
- options: d,
687
- noOptionsText: p,
688
- selectedValue: R,
689
- activeIndex: H,
690
- className: k,
691
- setDropdownRef: le,
692
- onSelect: se,
693
- onMouseEnter: U
694
- })
1201
+ yt,
1202
+ /* @__PURE__ */ h(Ve, { ..._t }),
1203
+ /* @__PURE__ */ h(Be, { ...vt })
695
1204
  ]
696
1205
  });
697
- };
698
- Le.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
+ }
699
1236
  //#endregion
700
1237
  //#region src/components/Tabs/TabsContext.tsx
701
- var Re = t(null), ze = () => {
702
- let e = a(Re);
1238
+ var ft = n(null), pt = () => {
1239
+ let e = o(ft);
703
1240
  if (!e) throw Error("Tabs components must be used inside Tabs");
704
1241
  return e;
705
- }, Be = {
1242
+ }, mt = {
706
1243
  list: "_list_13hkl_1",
707
1244
  vertical: "_vertical_13hkl_8"
708
- }, Ve = ({ children: e, className: t, ...n }) => {
709
- let { orientation: r, appearance: i } = ze();
710
- return /* @__PURE__ */ m("div", {
1245
+ }, ht = ({ children: e, className: t, ...n }) => {
1246
+ let { orientation: r, appearance: i } = pt();
1247
+ return /* @__PURE__ */ h("div", {
711
1248
  ...n,
712
1249
  role: "tablist",
713
1250
  "aria-orientation": r,
714
- className: L(Be.list, r === "vertical" && Be.vertical, i === "underline" && Be.underline, i === "pills" && Be.pills, t),
1251
+ className: z(mt.list, r === "vertical" && mt.vertical, i === "underline" && mt.underline, i === "pills" && mt.pills, t),
715
1252
  children: e
716
1253
  });
717
1254
  };
718
- Ve.displayName = "TabsList";
719
- var He = {
1255
+ ht.displayName = "TabsList";
1256
+ var gt = {
720
1257
  panel: "_panel_1v1a9_1",
721
1258
  visible: "_visible_1v1a9_10",
722
1259
  vertical: "_vertical_1v1a9_14"
723
- }, Ue = ({ index: e, children: t, className: n }) => {
724
- let { activeIndex: r, orientation: i } = ze(), [a, s] = u(!1), c = r === e;
725
- 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(() => {
726
1263
  if (!c) {
727
- s(!1);
1264
+ o(!1);
728
1265
  return;
729
1266
  }
730
- let e = setTimeout(() => s(!0), 10);
1267
+ let e = setTimeout(() => o(!0), 10);
731
1268
  return () => clearTimeout(e);
732
- }, [c]), /* @__PURE__ */ m("div", {
1269
+ }, [c]), /* @__PURE__ */ h("div", {
733
1270
  role: "tabpanel",
734
1271
  id: `tab-panel-${e}`,
735
1272
  "aria-labelledby": `tab-${e}`,
736
1273
  hidden: !c,
737
1274
  tabIndex: 0,
738
- className: L(He.panel, a && He.visible, i === "vertical" && He.vertical, n),
1275
+ className: z(gt.panel, a && gt.visible, i === "vertical" && gt.vertical, n),
739
1276
  children: t
740
1277
  });
741
1278
  };
742
- Ue.displayName = "TabsPanel";
743
- var We = {
1279
+ _t.displayName = "TabsPanel";
1280
+ var vt = {
744
1281
  tab: "_tab_qe8xc_1",
745
1282
  iconOnly: "_iconOnly_qe8xc_27",
746
1283
  tabIcon: "_tabIcon_qe8xc_31",
@@ -749,14 +1286,14 @@ var We = {
749
1286
  underline: "_underline_qe8xc_60",
750
1287
  pills: "_pills_qe8xc_92",
751
1288
  vertical: "_vertical_qe8xc_106"
752
- }, Ge = n(({ index: e, children: t, className: n, disabled: r = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
753
- let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: g, onTabKeyDown: _ } = ze(), v = u === e, y = !!a, b = y && t == null;
754
- 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", {
755
1292
  type: "button",
756
- ref: i((t) => {
757
- 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);
758
1295
  }, [
759
- g,
1296
+ m,
760
1297
  e,
761
1298
  l
762
1299
  ]),
@@ -766,7 +1303,7 @@ var We = {
766
1303
  id: `tab-${e}`,
767
1304
  disabled: r,
768
1305
  tabIndex: v ? 0 : -1,
769
- className: L(We.tab, We[p], f === "vertical" && We.vertical, y && We.withIcon, b && We.iconOnly, n),
1306
+ className: z(vt.tab, vt[p], f === "vertical" && vt.vertical, y && vt.withIcon, b && vt.iconOnly, n),
770
1307
  onClick: (t) => {
771
1308
  r || (d(e), o?.(t));
772
1309
  },
@@ -774,62 +1311,62 @@ var We = {
774
1311
  _(e), s?.(e);
775
1312
  },
776
1313
  ...c,
777
- children: [y && /* @__PURE__ */ m("span", {
778
- className: We.tabIcon,
1314
+ children: [y && /* @__PURE__ */ h("span", {
1315
+ className: vt.tabIcon,
779
1316
  "aria-hidden": "true",
780
- children: a
781
- }), t != null && /* @__PURE__ */ m("span", {
782
- className: We.label,
1317
+ children: i
1318
+ }), t != null && /* @__PURE__ */ h("span", {
1319
+ className: vt.label,
783
1320
  children: t
784
1321
  })]
785
1322
  });
786
1323
  });
787
- Ge.displayName = "Tab";
788
- var Ke = {
1324
+ yt.displayName = "Tab";
1325
+ var bt = {
789
1326
  tabs: "_tabs_uqy7q_1",
790
1327
  vertical: "_vertical_uqy7q_5"
791
- }, qe = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
792
- 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({
793
1330
  activeIndex: t,
794
1331
  defaultActiveIndex: n,
795
1332
  onChange: r
796
- }), d = l([]), f = i((e, t) => {
1333
+ }), d = u([]), f = a((e, t) => {
797
1334
  d.current[e] = t;
798
- }, []), { onKeyDown: p } = M({
1335
+ }, []), { onKeyDown: p } = N({
799
1336
  activeIndex: c,
800
- setActiveIndex: u,
1337
+ setActiveIndex: l,
801
1338
  tabRefs: d,
802
- orientation: a,
1339
+ orientation: i,
803
1340
  onNavigate: (e) => {
804
1341
  d.current[e]?.focus();
805
1342
  }
806
- }), h = {
1343
+ }), m = {
807
1344
  activeIndex: c,
808
- setActiveIndex: u,
809
- orientation: a,
1345
+ setActiveIndex: l,
1346
+ orientation: i,
810
1347
  appearance: o,
811
1348
  registerTab: f,
812
1349
  onTabKeyDown: p
813
1350
  };
814
- return /* @__PURE__ */ m(Re.Provider, {
815
- value: h,
816
- children: /* @__PURE__ */ m("div", {
817
- className: L(Ke.tabs, a === "vertical" && Ke.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),
818
1355
  children: e
819
1356
  })
820
1357
  });
821
1358
  };
822
- qe.displayName = "Tabs";
1359
+ xt.displayName = "Tabs";
823
1360
  //#endregion
824
1361
  //#region src/components/Tabs/index.ts
825
- var Je = Object.assign(qe, {
826
- List: Ve,
827
- Tab: Ge,
828
- Panel: Ue
829
- }), Ye = {
1362
+ var St = Object.assign(xt, {
1363
+ List: ht,
1364
+ Tab: yt,
1365
+ Panel: _t
1366
+ }), Ct = {
830
1367
  tooltip: "_tooltip_10opu_1",
831
1368
  arrow: "_arrow_10opu_25"
832
- }, Xe = 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) => {
833
1370
  let l = {
834
1371
  top: "bottom",
835
1372
  right: "left",
@@ -842,49 +1379,49 @@ var Je = Object.assign(qe, {
842
1379
  top: i == null ? "" : `${i}px`,
843
1380
  [l]: "-5px"
844
1381
  };
845
- return /* @__PURE__ */ h("div", {
1382
+ return /* @__PURE__ */ g("div", {
846
1383
  ref: c,
847
- className: L(Ye.tooltip, a),
1384
+ className: z(Ct.tooltip, a),
848
1385
  "data-placement": t,
849
1386
  "data-state": "open",
850
1387
  style: o,
851
1388
  ...s,
852
- children: [e, /* @__PURE__ */ m("div", {
1389
+ children: [e, /* @__PURE__ */ h("div", {
853
1390
  ref: n,
854
- className: Ye.arrow,
1391
+ className: Ct.arrow,
855
1392
  style: u
856
1393
  })]
857
1394
  });
858
1395
  });
859
- Xe.displayName = "TooltipContent";
1396
+ wt.displayName = "TooltipContent";
860
1397
  //#endregion
861
1398
  //#region src/components/Tooltip/Tooltip.tsx
862
- var Ze = ({ 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 = {
863
1400
  open: 300,
864
1401
  close: 100
865
- }, maxWidth: a = 250, className: o, onOpenChange: c }) => {
866
- let [d, f] = u(!1), v = l(null), y = s(), { context: b, floatingStyles: x, middlewareData: S, setRef: C, setFloatingRef: D, placement: O } = ee({
867
- 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,
868
1405
  onOpenChange: (e) => {
869
- r || (f(e), c?.(e));
1406
+ r || (f(e), s?.(e));
870
1407
  },
871
1408
  placement: t,
872
- middleware: [_({ element: v })]
873
- }), 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: {
874
1411
  open: i.open,
875
1412
  close: i.close
876
- } }), w(b)]);
877
- return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
1413
+ } }), T(b)]);
1414
+ return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
878
1415
  ref: C,
879
1416
  style: { display: "inline-flex" },
880
- "aria-describedby": d ? y : void 0,
1417
+ "aria-describedby": l ? y : void 0,
881
1418
  ...j(),
882
1419
  children: e
883
- }), /* @__PURE__ */ m(g, { children: d && n && /* @__PURE__ */ m(Xe, {
1420
+ }), /* @__PURE__ */ h(_, { children: l && n && /* @__PURE__ */ h(wt, {
884
1421
  id: y,
885
- ref: D,
1422
+ ref: w,
886
1423
  content: n,
887
- arrowRef: v,
1424
+ arrowRef: p,
888
1425
  arrowX: k,
889
1426
  arrowY: A,
890
1427
  role: "tooltip",
@@ -897,10 +1434,10 @@ var Ze = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
897
1434
  ...M()
898
1435
  }) })] });
899
1436
  };
900
- Ze.displayName = "Tooltip";
1437
+ Tt.displayName = "Tooltip";
901
1438
  //#endregion
902
1439
  //#region src/utils/devWarning.ts
903
- var Qe = (e, t) => {
1440
+ var Et = (e, t) => {
904
1441
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
905
1442
  }, X = {
906
1443
  button: "_button_2nghu_1",
@@ -930,193 +1467,193 @@ var Qe = (e, t) => {
930
1467
  "button-spin": "_button-spin_2nghu_1",
931
1468
  badge: "_badge_2nghu_786",
932
1469
  shortcut: "_shortcut_2nghu_800"
933
- }, $e = n(({ children: t, color: n = "primary", appearance: i = "solid", size: a = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: g, badge: _, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
934
- let I = S && r(t) ? t : void 0, R = I ? I.props.children : t, z = x || !R && !!(d || f), B = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), V = c || l, ee = l && u ? u : R, te = u && R && !z && (typeof R == "string" || typeof R == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? R : u) : void 0, H = O === "_blank" && !k ? "noreferrer noopener" : k, U = L(X.button, X[n], X[i], X[a], X[o], C, {
935
- [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,
936
1473
  [X.loading]: l,
937
1474
  [X.fullWidth]: b,
938
- [X.iconOnly]: z
1475
+ [X.iconOnly]: R
939
1476
  });
940
- Qe(!S || !D, "Button: pass href to the child element when using asChild."), Qe(!S || !!I, "Button: asChild requires a single valid React element child."), Qe(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
941
- let W = (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) => {
942
1479
  e.preventDefault(), e.stopPropagation();
943
- }, ne = (e) => {
944
- if (V) {
945
- W(e);
1480
+ }, oe = (e) => {
1481
+ if (B) {
1482
+ ae(e);
946
1483
  return;
947
1484
  }
948
1485
  I?.props.onClick?.(e), e.defaultPrevented || w?.(e);
949
- }, G = /* @__PURE__ */ h(p, { children: [
950
- l && (g ? /* @__PURE__ */ m("span", {
1486
+ }, V = /* @__PURE__ */ g(m, { children: [
1487
+ l && (p ? /* @__PURE__ */ h("span", {
951
1488
  className: X.icon,
952
1489
  "aria-hidden": "true",
953
- children: g
954
- }) : /* @__PURE__ */ m("span", {
1490
+ children: p
1491
+ }) : /* @__PURE__ */ h("span", {
955
1492
  className: X.spinner,
956
1493
  "aria-hidden": "true"
957
1494
  })),
958
- !l && d && /* @__PURE__ */ m("span", {
1495
+ !l && d && /* @__PURE__ */ h("span", {
959
1496
  className: X.icon,
960
1497
  children: d
961
1498
  }),
962
- ee && !z && /* @__PURE__ */ m("span", {
1499
+ te && !R && /* @__PURE__ */ h("span", {
963
1500
  className: X.label,
964
- "data-measure": te,
965
- children: /* @__PURE__ */ m("span", {
1501
+ "data-measure": ne,
1502
+ children: /* @__PURE__ */ h("span", {
966
1503
  className: X.labelText,
967
- children: ee
1504
+ children: te
968
1505
  })
969
1506
  }),
970
- _ && !z && /* @__PURE__ */ m("span", {
1507
+ _ && !R && /* @__PURE__ */ h("span", {
971
1508
  className: X.badge,
972
1509
  children: _
973
1510
  }),
974
- v && !z && /* @__PURE__ */ m("span", {
1511
+ v && !R && /* @__PURE__ */ h("span", {
975
1512
  className: X.shortcut,
976
1513
  children: v
977
1514
  }),
978
- !l && f && /* @__PURE__ */ m("span", {
1515
+ !l && f && /* @__PURE__ */ h("span", {
979
1516
  className: X.icon,
980
1517
  children: f
981
1518
  })
982
1519
  ] });
983
- return I ? e(I, {
1520
+ return I ? t(I, {
984
1521
  ...P,
985
1522
  ref: F,
986
1523
  "aria-busy": l || void 0,
987
- "aria-disabled": V || void 0,
1524
+ "aria-disabled": B || void 0,
988
1525
  "aria-label": T || I.props["aria-label"] || void 0,
989
1526
  "aria-labelledby": E || I.props["aria-labelledby"] || void 0,
990
- className: L(I.props.className, U),
991
- href: V ? void 0 : I.props.href,
992
- onClick: ne,
993
- 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,
994
1531
  title: y || I.props.title,
995
- children: G
996
- }) : D ? /* @__PURE__ */ m("a", {
1532
+ children: V
1533
+ }) : D ? /* @__PURE__ */ h("a", {
997
1534
  ref: F,
998
- href: V ? void 0 : D,
1535
+ href: B ? void 0 : D,
999
1536
  id: j,
1000
1537
  role: M,
1001
- tabIndex: V ? -1 : N,
1538
+ tabIndex: B ? -1 : N,
1002
1539
  target: O,
1003
- rel: H,
1540
+ rel: re,
1004
1541
  download: A,
1005
- onClick: V ? W : w,
1006
- "aria-disabled": V || void 0,
1542
+ onClick: B ? ae : w,
1543
+ "aria-disabled": B || void 0,
1007
1544
  "aria-label": T || void 0,
1008
1545
  "aria-labelledby": E || void 0,
1009
1546
  "aria-busy": l || void 0,
1010
- className: U,
1547
+ className: ie,
1011
1548
  title: y,
1012
- children: G
1013
- }) : /* @__PURE__ */ m("button", {
1549
+ children: V
1550
+ }) : /* @__PURE__ */ h("button", {
1014
1551
  ...P,
1015
1552
  ref: F,
1016
1553
  id: j,
1017
1554
  role: M,
1018
1555
  tabIndex: N,
1019
1556
  type: s,
1020
- disabled: V,
1021
- onClick: V ? void 0 : w,
1557
+ disabled: B,
1558
+ onClick: B ? void 0 : w,
1022
1559
  "aria-label": T || void 0,
1023
1560
  "aria-labelledby": E || void 0,
1024
1561
  "aria-busy": l || void 0,
1025
- className: U,
1562
+ className: ie,
1026
1563
  title: y,
1027
- children: G
1564
+ children: V
1028
1565
  });
1029
1566
  });
1030
- $e.displayName = "Button";
1567
+ Dt.displayName = "Button";
1031
1568
  var Z = {
1032
- wrapper: "_wrapper_wpr9s_1",
1033
- colorPrimary: "_colorPrimary_wpr9s_27",
1034
- colorNeutral: "_colorNeutral_wpr9s_45",
1035
- colorSuccess: "_colorSuccess_wpr9s_63",
1036
- colorWarning: "_colorWarning_wpr9s_81",
1037
- colorDanger: "_colorDanger_wpr9s_99",
1038
- labelStart: "_labelStart_wpr9s_115",
1039
- wrapperSm: "_wrapperSm_wpr9s_119",
1040
- wrapperMd: "_wrapperMd_wpr9s_125",
1041
- wrapperLg: "_wrapperLg_wpr9s_131",
1042
- iconOnly: "_iconOnly_wpr9s_137",
1043
- container: "_container_wpr9s_143",
1044
- containerSm: "_containerSm_wpr9s_150",
1045
- containerMd: "_containerMd_wpr9s_154",
1046
- containerLg: "_containerLg_wpr9s_158",
1047
- containerLabelStart: "_containerLabelStart_wpr9s_162",
1048
- descriptionText: "_descriptionText_wpr9s_162",
1049
- errorText: "_errorText_wpr9s_163",
1050
- input: "_input_wpr9s_167",
1051
- customCheckbox: "_customCheckbox_wpr9s_179",
1052
- requiredMark: "_requiredMark_wpr9s_194",
1053
- error: "_error_wpr9s_163",
1054
- checkmark: "_checkmark_wpr9s_210",
1055
- indeterminateMark: "_indeterminateMark_wpr9s_226",
1056
- customMark: "_customMark_wpr9s_239",
1057
- label: "_label_wpr9s_115",
1058
- labelSm: "_labelSm_wpr9s_270",
1059
- labelMd: "_labelMd_wpr9s_274",
1060
- labelLg: "_labelLg_wpr9s_278",
1061
- indeterminate: "_indeterminate_wpr9s_226",
1062
- "checkbox-pop": "_checkbox-pop_wpr9s_1",
1063
- disabled: "_disabled_wpr9s_354"
1064
- }, et = {
1569
+ wrapper: "_wrapper_877rr_1",
1570
+ colorPrimary: "_colorPrimary_877rr_27",
1571
+ colorNeutral: "_colorNeutral_877rr_45",
1572
+ colorSuccess: "_colorSuccess_877rr_63",
1573
+ colorWarning: "_colorWarning_877rr_81",
1574
+ colorDanger: "_colorDanger_877rr_99",
1575
+ labelStart: "_labelStart_877rr_115",
1576
+ wrapperSm: "_wrapperSm_877rr_119",
1577
+ wrapperMd: "_wrapperMd_877rr_125",
1578
+ wrapperLg: "_wrapperLg_877rr_131",
1579
+ iconOnly: "_iconOnly_877rr_137",
1580
+ container: "_container_877rr_143",
1581
+ containerSm: "_containerSm_877rr_150",
1582
+ containerMd: "_containerMd_877rr_154",
1583
+ containerLg: "_containerLg_877rr_158",
1584
+ containerLabelStart: "_containerLabelStart_877rr_162",
1585
+ descriptionText: "_descriptionText_877rr_162",
1586
+ errorText: "_errorText_877rr_163",
1587
+ input: "_input_877rr_167",
1588
+ customCheckbox: "_customCheckbox_877rr_179",
1589
+ requiredMark: "_requiredMark_877rr_194",
1590
+ error: "_error_877rr_163",
1591
+ checkmark: "_checkmark_877rr_210",
1592
+ indeterminateMark: "_indeterminateMark_877rr_226",
1593
+ customMark: "_customMark_877rr_239",
1594
+ label: "_label_877rr_115",
1595
+ labelSm: "_labelSm_877rr_270",
1596
+ labelMd: "_labelMd_877rr_274",
1597
+ labelLg: "_labelLg_877rr_278",
1598
+ indeterminate: "_indeterminate_877rr_226",
1599
+ "checkbox-pop": "_checkbox-pop_877rr_1",
1600
+ disabled: "_disabled_877rr_354"
1601
+ }, Ot = {
1065
1602
  sm: Z.labelSm,
1066
1603
  md: Z.labelMd,
1067
1604
  lg: Z.labelLg
1068
- }, tt = {
1605
+ }, kt = {
1069
1606
  sm: Z.wrapperSm,
1070
1607
  md: Z.wrapperMd,
1071
1608
  lg: Z.wrapperLg
1072
- }, nt = {
1609
+ }, At = {
1073
1610
  sm: Z.containerSm,
1074
1611
  md: Z.containerMd,
1075
1612
  lg: Z.containerLg
1076
- }, rt = {
1613
+ }, jt = {
1077
1614
  primary: Z.colorPrimary,
1078
1615
  neutral: Z.colorNeutral,
1079
1616
  success: Z.colorSuccess,
1080
1617
  warning: Z.colorWarning,
1081
1618
  danger: Z.colorDanger
1082
- }, it = 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) => {
1083
- 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 = [
1084
1621
  T,
1085
- P,
1622
+ N,
1086
1623
  F
1087
- ].filter(Boolean).join(" "), [R, z] = D({
1088
- value: c,
1624
+ ].filter(Boolean).join(" "), [L, R] = O({
1625
+ value: o,
1089
1626
  defaultValue: p,
1090
1627
  onChange: x
1091
- }), B = i((e) => {
1092
- if (j.current = e, typeof O == "function") {
1093
- O(e);
1628
+ }), ee = a((e) => {
1629
+ if (j.current = e, typeof D == "function") {
1630
+ D(e);
1094
1631
  return;
1095
1632
  }
1096
- O && (O.current = e);
1097
- }, [O]);
1098
- o(() => {
1633
+ D && (D.current = e);
1634
+ }, [D]);
1635
+ s(() => {
1099
1636
  j.current && (j.current.indeterminate = v);
1100
1637
  }, [v]);
1101
- let V = (e) => {
1102
- z(e.target.checked);
1638
+ let B = (e) => {
1639
+ R(e.target.checked);
1103
1640
  };
1104
- return Qe(!!(t || C || w), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ h("div", {
1105
- className: L(Z.container, nt[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),
1106
1643
  children: [
1107
- /* @__PURE__ */ h("label", {
1644
+ /* @__PURE__ */ g("label", {
1108
1645
  htmlFor: A,
1109
- className: L(Z.wrapper, tt[u], rt[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),
1110
1647
  children: [
1111
- /* @__PURE__ */ m("input", {
1648
+ /* @__PURE__ */ h("input", {
1112
1649
  ...E,
1113
- ref: B,
1650
+ ref: ee,
1114
1651
  id: A,
1115
1652
  type: "checkbox",
1116
- checked: R,
1117
- disabled: g,
1653
+ checked: L,
1654
+ disabled: m,
1118
1655
  required: _,
1119
- onChange: V,
1656
+ onChange: B,
1120
1657
  className: Z.input,
1121
1658
  "aria-label": C,
1122
1659
  "aria-labelledby": w,
@@ -1124,20 +1661,20 @@ var Z = {
1124
1661
  "aria-invalid": M ? !0 : E["aria-invalid"],
1125
1662
  "aria-describedby": I || void 0
1126
1663
  }),
1127
- /* @__PURE__ */ m("span", {
1128
- className: L(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1664
+ /* @__PURE__ */ h("span", {
1665
+ className: z(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1129
1666
  "aria-hidden": "true",
1130
- children: v ? /* @__PURE__ */ m("span", {
1131
- className: L(Z.indeterminateMark, a && Z.customMark),
1132
- children: a
1133
- }) : R && /* @__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", {
1134
1671
  className: Z.checkmark,
1135
- children: r ?? /* @__PURE__ */ m(N, {})
1672
+ children: r ?? /* @__PURE__ */ h(P, {})
1136
1673
  })
1137
1674
  }),
1138
- t && /* @__PURE__ */ h("span", {
1139
- className: L(Z.label, et[u]),
1140
- children: [t, _ && /* @__PURE__ */ m("span", {
1675
+ t && /* @__PURE__ */ g("span", {
1676
+ className: z(Z.label, Ot[l]),
1677
+ children: [t, _ && /* @__PURE__ */ h("span", {
1141
1678
  className: Z.requiredMark,
1142
1679
  "aria-hidden": "true",
1143
1680
  children: "*"
@@ -1145,12 +1682,12 @@ var Z = {
1145
1682
  })
1146
1683
  ]
1147
1684
  }),
1148
- n && /* @__PURE__ */ m("span", {
1149
- id: P,
1685
+ n && /* @__PURE__ */ h("span", {
1686
+ id: N,
1150
1687
  className: Z.descriptionText,
1151
1688
  children: n
1152
1689
  }),
1153
- M && /* @__PURE__ */ m("span", {
1690
+ M && /* @__PURE__ */ h("span", {
1154
1691
  id: F,
1155
1692
  className: Z.errorText,
1156
1693
  children: S
@@ -1158,27 +1695,49 @@ var Z = {
1158
1695
  ]
1159
1696
  });
1160
1697
  });
1161
- it.displayName = "Checkbox";
1698
+ Mt.displayName = "Checkbox";
1162
1699
  var Q = {
1163
- inputWrapper: "_inputWrapper_13w4m_1",
1164
- input: "_input_13w4m_1",
1165
- error: "_error_13w4m_47",
1166
- sm: "_sm_13w4m_55",
1167
- md: "_md_13w4m_59",
1168
- lg: "_lg_13w4m_63",
1169
- hasLeftAdornment: "_hasLeftAdornment_13w4m_98",
1170
- hasRightAdornment: "_hasRightAdornment_13w4m_102",
1171
- leftAdornment: "_leftAdornment_13w4m_106",
1172
- rightAdornment: "_rightAdornment_13w4m_107",
1173
- clearButton: "_clearButton_13w4m_149",
1174
- toneDefault: "_toneDefault_13w4m_189",
1175
- tonePrimary: "_tonePrimary_13w4m_193",
1176
- toneSecondary: "_toneSecondary_13w4m_197",
1177
- toneSuccess: "_toneSuccess_13w4m_201",
1178
- toneDanger: "_toneDanger_13w4m_205",
1179
- toneMuted: "_toneMuted_13w4m_209",
1180
- toneInverse: "_toneInverse_13w4m_213"
1181
- }, at = {
1700
+ inputGroup: "_inputGroup_151bq_1",
1701
+ primary: "_primary_151bq_29",
1702
+ outline: "_outline_151bq_29",
1703
+ filled: "_filled_151bq_62",
1704
+ soft: "_soft_151bq_95",
1705
+ neutral: "_neutral_151bq_128",
1706
+ success: "_success_151bq_227",
1707
+ warning: "_warning_151bq_326",
1708
+ danger: "_danger_151bq_425",
1709
+ inputWrapper: "_inputWrapper_151bq_524",
1710
+ input: "_input_151bq_1",
1711
+ error: "_error_151bq_575",
1712
+ sm: "_sm_151bq_583",
1713
+ md: "_md_151bq_587",
1714
+ lg: "_lg_151bq_591",
1715
+ isInvalid: "_isInvalid_151bq_607",
1716
+ hasLeftAdornment: "_hasLeftAdornment_151bq_635",
1717
+ hasRightAdornment: "_hasRightAdornment_151bq_639",
1718
+ hasStartIconAndPrefix: "_hasStartIconAndPrefix_151bq_643",
1719
+ hasEndIconAndSuffix: "_hasEndIconAndSuffix_151bq_647",
1720
+ startAdornment: "_startAdornment_151bq_651",
1721
+ endAdornment: "_endAdornment_151bq_652",
1722
+ prefix: "_prefix_151bq_670",
1723
+ suffix: "_suffix_151bq_671",
1724
+ endSlot: "_endSlot_151bq_698",
1725
+ isLoading: "_isLoading_151bq_709",
1726
+ clearButton: "_clearButton_151bq_744",
1727
+ iconButton: "_iconButton_151bq_759",
1728
+ spinner: "_spinner_151bq_785",
1729
+ "input-spin": "_input-spin_151bq_1",
1730
+ addon: "_addon_151bq_794",
1731
+ hasAddons: "_hasAddons_151bq_815",
1732
+ counter: "_counter_151bq_829",
1733
+ toneDefault: "_toneDefault_151bq_857",
1734
+ tonePrimary: "_tonePrimary_151bq_861",
1735
+ toneSecondary: "_toneSecondary_151bq_865",
1736
+ toneSuccess: "_toneSuccess_151bq_869",
1737
+ toneDanger: "_toneDanger_151bq_873",
1738
+ toneMuted: "_toneMuted_151bq_877",
1739
+ toneInverse: "_toneInverse_151bq_881"
1740
+ }, Nt = {
1182
1741
  default: Q.toneDefault,
1183
1742
  primary: Q.tonePrimary,
1184
1743
  secondary: Q.toneSecondary,
@@ -1186,7 +1745,7 @@ var Q = {
1186
1745
  danger: Q.toneDanger,
1187
1746
  muted: Q.toneMuted,
1188
1747
  inverse: Q.toneInverse
1189
- }, ot = (e = "text", t) => {
1748
+ }, Pt = (e = "text", t) => {
1190
1749
  if (t) return t;
1191
1750
  switch (e) {
1192
1751
  case "email": return "email";
@@ -1196,78 +1755,161 @@ var Q = {
1196
1755
  case "search": return "off";
1197
1756
  default: return;
1198
1757
  }
1199
- }, st = n(({ id: e, label: t, name: n, description: r, placeholder: a, value: o, defaultValue: c, onChange: d, type: f = "text", size: p = "md", error: g, disabled: _ = !1, required: v = !1, className: y, autoComplete: b, readOnly: x = !1, clearable: S = !1, onClear: C, leftAdornment: w, rightAdornment: T, clearIcon: E, leftAdornmentTone: D = "default", rightAdornmentTone: O = "default", clearIconTone: k = "danger", autoFocus: A, maxLength: j, onMouseEnter: M, onMouseLeave: N, "aria-describedby": P, "aria-invalid": F, ...I }, R) => {
1200
- let z = s(), B = e ?? z, V = l(null), [ee, te] = u(c ?? ""), H = o !== void 0, U = H ? o : ee, W = U !== "", ne = ot(f, b), G = S && W && !_ && !x, re = [
1201
- P,
1202
- r ? `${B}-description` : void 0,
1203
- g ? `${B}-error` : void 0
1204
- ].filter(Boolean).join(" "), K = E ?? "×", ie = i((e) => {
1205
- if (V.current = e, typeof R == "function") {
1206
- R(e);
1758
+ }, Ft = (e, t) => {
1759
+ let n = e.replace(/\D/g, ""), r = 0, i = "";
1760
+ for (let e of t) {
1761
+ if (e === "#") {
1762
+ let e = n[r];
1763
+ if (!e) break;
1764
+ i += e, r += 1;
1765
+ continue;
1766
+ }
1767
+ r < n.length && (i += e);
1768
+ }
1769
+ return i;
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);
1207
1780
  return;
1208
1781
  }
1209
- R && (R.current = e);
1210
- }, [R]), ae = i((e) => {
1211
- let t = e.target.value;
1212
- H || te(t), d?.(e);
1213
- }, [H, d]), oe = i(() => {
1214
- H || te(""), C?.(), V.current?.focus();
1215
- }, [H, C]), se = !G && !!T;
1216
- return /* @__PURE__ */ m(je, {
1217
- id: B,
1218
- label: t,
1219
- description: r,
1220
- error: g,
1221
- required: v,
1222
- disabled: _,
1223
- children: /* @__PURE__ */ h("div", {
1224
- className: L(Q.inputWrapper, {
1225
- [Q.hasLeftAdornment]: !!w,
1226
- [Q.hasRightAdornment]: !!T || G
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);
1786
+ }, [
1787
+ U,
1788
+ B,
1789
+ k,
1790
+ ne
1791
+ ]), Je = a(() => {
1792
+ U || H(""), k?.(""), O?.(), ve.current?.focus();
1793
+ }, [
1794
+ U,
1795
+ O,
1796
+ k
1797
+ ]), Ye = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
1798
+ className: z(Q.inputGroup, Q[_], Q[p], {
1799
+ [Q.hasAddons]: Ge,
1800
+ [Q.isDisabled]: Ee,
1801
+ [Q.isInvalid]: Te,
1802
+ [Q.isLoading]: G
1803
+ }),
1804
+ children: [
1805
+ P && /* @__PURE__ */ h("span", {
1806
+ className: Q.addon,
1807
+ children: P
1227
1808
  }),
1228
- children: [
1229
- w && /* @__PURE__ */ m("span", {
1230
- "aria-hidden": "true",
1231
- className: L(Q.leftAdornment, at[D]),
1232
- children: w
1233
- }),
1234
- /* @__PURE__ */ m("input", {
1235
- ...I,
1236
- ref: ie,
1237
- id: B,
1238
- name: n,
1239
- type: f,
1240
- autoComplete: ne,
1241
- className: L(Q.input, Q[p], { [Q.error]: !!g }, y),
1242
- value: U,
1243
- onChange: ae,
1244
- placeholder: a,
1245
- disabled: _,
1246
- readOnly: x,
1247
- required: v,
1248
- autoFocus: A,
1249
- maxLength: j,
1250
- "aria-invalid": g ? !0 : F,
1251
- "aria-describedby": re || void 0,
1252
- onMouseEnter: M,
1253
- onMouseLeave: N
1809
+ /* @__PURE__ */ g("div", {
1810
+ className: z(Q.inputWrapper, {
1811
+ [Q.hasLeftAdornment]: Ve,
1812
+ [Q.hasRightAdornment]: He,
1813
+ [Q.hasStartIconAndPrefix]: Ue,
1814
+ [Q.hasEndIconAndSuffix]: We
1254
1815
  }),
1255
- G && /* @__PURE__ */ m("button", {
1256
- type: "button",
1257
- className: L(Q.clearButton, at[k]),
1258
- onClick: oe,
1259
- "aria-label": "Clear input",
1260
- children: K
1261
- }),
1262
- se && /* @__PURE__ */ m("div", {
1263
- className: L(Q.rightAdornment, at[O]),
1264
- children: T
1265
- })
1266
- ]
1267
- })
1816
+ children: [
1817
+ je && /* @__PURE__ */ h("span", {
1818
+ "aria-hidden": "true",
1819
+ className: z(Q.startAdornment, Nt[re]),
1820
+ children: je
1821
+ }),
1822
+ I && /* @__PURE__ */ h("span", {
1823
+ className: Q.prefix,
1824
+ children: I
1825
+ }),
1826
+ /* @__PURE__ */ h("input", {
1827
+ ...fe,
1828
+ ref: Ke,
1829
+ id: _e,
1830
+ name: n,
1831
+ type: Ae,
1832
+ autoComplete: Ne,
1833
+ className: z(Q.input, Q[we], { [Q.error]: Te }, C),
1834
+ value: Se,
1835
+ onChange: qe,
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,
1845
+ "aria-busy": S || void 0,
1846
+ onMouseEnter: se,
1847
+ onMouseLeave: ce
1848
+ }),
1849
+ R && /* @__PURE__ */ h("span", {
1850
+ className: Q.suffix,
1851
+ children: R
1852
+ }),
1853
+ /* @__PURE__ */ g("div", {
1854
+ className: Q.endSlot,
1855
+ children: [
1856
+ G && /* @__PURE__ */ h("span", {
1857
+ className: Q.spinner,
1858
+ "aria-hidden": "true",
1859
+ "data-testid": "input-spinner"
1860
+ }),
1861
+ Fe && /* @__PURE__ */ h("button", {
1862
+ type: "button",
1863
+ className: Q.iconButton,
1864
+ onClick: () => be((e) => !e),
1865
+ "aria-label": ye ? "Hide password" : "Show password",
1866
+ children: ye ? "Hide" : "Show"
1867
+ }),
1868
+ Pe && /* @__PURE__ */ h("button", {
1869
+ type: "button",
1870
+ className: z(Q.clearButton, Nt[ae]),
1871
+ onClick: Je,
1872
+ "aria-label": "Clear input",
1873
+ children: Y
1874
+ }),
1875
+ K && Me && /* @__PURE__ */ h("span", {
1876
+ "aria-hidden": "true",
1877
+ className: z(Q.endAdornment, Nt[ie]),
1878
+ children: Me
1879
+ })
1880
+ ]
1881
+ })
1882
+ ]
1883
+ }),
1884
+ F && /* @__PURE__ */ h("span", {
1885
+ className: Q.addon,
1886
+ children: F
1887
+ })
1888
+ ]
1889
+ }), Le && /* @__PURE__ */ g("div", {
1890
+ id: J,
1891
+ className: Q.counter,
1892
+ children: [
1893
+ W.length,
1894
+ " / ",
1895
+ V
1896
+ ]
1897
+ })] });
1898
+ return !ge && he ? Ye : /* @__PURE__ */ h(Re, {
1899
+ id: _e,
1900
+ label: t,
1901
+ description: r,
1902
+ error: v,
1903
+ required: De,
1904
+ disabled: Ee,
1905
+ invalid: Te,
1906
+ size: we,
1907
+ className: w,
1908
+ bindControl: !1,
1909
+ children: Ye
1268
1910
  });
1269
1911
  });
1270
- st.displayName = "Input";
1912
+ Lt.displayName = "Input";
1271
1913
  var $ = {
1272
1914
  root: "_root_qb9nm_1",
1273
1915
  invalid: "_invalid_qb9nm_27",
@@ -1289,23 +1931,23 @@ var $ = {
1289
1931
  customIcon: "_customIcon_qb9nm_216",
1290
1932
  content: "_content_qb9nm_335",
1291
1933
  error: "_error_qb9nm_352"
1292
- }, ct = {
1934
+ }, Rt = {
1293
1935
  primary: $.colorPrimary,
1294
1936
  neutral: $.colorNeutral,
1295
1937
  success: $.colorSuccess,
1296
1938
  warning: $.colorWarning,
1297
1939
  danger: $.colorDanger
1298
- }, lt = 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) => {
1299
- let S = ke(), 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 = [
1300
1942
  T,
1301
1943
  E,
1302
1944
  S?.describedBy,
1303
1945
  y
1304
- ].filter(Boolean).join(" ") || void 0, k = S !== null, [A, j] = D({
1946
+ ].filter(Boolean).join(" ") || void 0, k = S !== null, [A, j] = O({
1305
1947
  value: t,
1306
1948
  defaultValue: n,
1307
1949
  onChange: l
1308
- }), M = k ? S.value === e : A, N = !!S?.disabled || r, P = !!S?.required || i, F = S?.name ?? v, I = !!(c || S?.invalid), R = 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) => {
1309
1951
  if (!N) {
1310
1952
  if (k) {
1311
1953
  S.onValueChange(e);
@@ -1314,13 +1956,13 @@ var $ = {
1314
1956
  j(t.currentTarget.checked);
1315
1957
  }
1316
1958
  };
1317
- return /* @__PURE__ */ h("div", {
1318
- className: L($.root, $[R], I && $.invalid, N && $.disabled, ct[z], g),
1319
- 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", {
1320
1962
  htmlFor: w,
1321
- className: L($.wrapper, p),
1963
+ className: z($.wrapper, p),
1322
1964
  children: [
1323
- /* @__PURE__ */ m("input", {
1965
+ /* @__PURE__ */ h("input", {
1324
1966
  ...b,
1325
1967
  ref: x,
1326
1968
  id: w,
@@ -1331,76 +1973,76 @@ var $ = {
1331
1973
  disabled: N,
1332
1974
  required: P,
1333
1975
  "aria-invalid": I || void 0,
1334
- "aria-describedby": O,
1976
+ "aria-describedby": D,
1335
1977
  className: $.input,
1336
- onChange: B
1978
+ onChange: ee
1337
1979
  }),
1338
- /* @__PURE__ */ m("span", {
1980
+ /* @__PURE__ */ h("span", {
1339
1981
  className: $.control,
1340
1982
  "aria-hidden": "true",
1341
- children: /* @__PURE__ */ m("span", {
1342
- className: L($.indicator, f && $.customIcon),
1983
+ children: /* @__PURE__ */ h("span", {
1984
+ className: z($.indicator, f && $.customIcon),
1343
1985
  children: f
1344
1986
  })
1345
1987
  }),
1346
- (u || d) && /* @__PURE__ */ h("span", {
1988
+ (u || d) && /* @__PURE__ */ g("span", {
1347
1989
  className: $.content,
1348
- children: [u && /* @__PURE__ */ m("span", {
1990
+ children: [u && /* @__PURE__ */ h("span", {
1349
1991
  className: $.label,
1350
1992
  children: u
1351
- }), d && /* @__PURE__ */ m("span", {
1993
+ }), d && /* @__PURE__ */ h("span", {
1352
1994
  id: T,
1353
1995
  className: $.description,
1354
1996
  children: d
1355
1997
  })]
1356
1998
  })
1357
1999
  ]
1358
- }), c && /* @__PURE__ */ m("div", {
2000
+ }), s && /* @__PURE__ */ h("div", {
1359
2001
  id: E,
1360
2002
  className: $.error,
1361
- children: c
2003
+ children: s
1362
2004
  })]
1363
2005
  });
1364
2006
  });
1365
- lt.displayName = "Radio";
2007
+ zt.displayName = "Radio";
1366
2008
  //#endregion
1367
2009
  //#region src/theme/ThemeContext.ts
1368
- var ut = t(null), dt = (e) => e === "highContrast" ? "high-contrast" : e, ft = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1369
- 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({
1370
2012
  value: e,
1371
2013
  defaultValue: t,
1372
2014
  onChange: n
1373
- }), s = dt(i);
1374
- o(() => {
2015
+ }), o = Vt(i);
2016
+ s(() => {
1375
2017
  if (typeof document > "u") return;
1376
2018
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
1377
- return e.dataset.velliraTheme = s, () => {
2019
+ return e.dataset.velliraTheme = o, () => {
1378
2020
  if (t === void 0) {
1379
2021
  delete e.dataset.velliraTheme;
1380
2022
  return;
1381
2023
  }
1382
2024
  e.dataset.velliraTheme = t;
1383
2025
  };
1384
- }, [s]);
1385
- let l = c(() => ({
2026
+ }, [o]);
2027
+ let c = l(() => ({
1386
2028
  theme: i,
1387
2029
  setTheme: a
1388
2030
  }), [i, a]);
1389
- return /* @__PURE__ */ m(ut.Provider, {
1390
- value: l,
1391
- children: /* @__PURE__ */ m("div", {
1392
- "data-vellira-theme": s,
2031
+ return /* @__PURE__ */ h(Bt.Provider, {
2032
+ value: c,
2033
+ children: /* @__PURE__ */ h("div", {
2034
+ "data-vellira-theme": o,
1393
2035
  children: r
1394
2036
  })
1395
2037
  });
1396
2038
  };
1397
- ft.displayName = "ThemeProvider";
2039
+ Ht.displayName = "ThemeProvider";
1398
2040
  //#endregion
1399
2041
  //#region src/theme/useTheme.ts
1400
- function pt() {
1401
- let e = a(ut);
2042
+ function Ut() {
2043
+ let e = o(Bt);
1402
2044
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1403
2045
  return e;
1404
2046
  }
1405
2047
  //#endregion
1406
- export { $e as Button, it as Checkbox, le as Dropdown, je as FormField, st as Input, Ee as Modal, lt as Radio, Ae as RadioGroup, Le as Select, Je as Tabs, ft as ThemeProvider, Ze as Tooltip, pt 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 };