@vellira-ui/react 2.29.0 → 2.30.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
@@ -4,20 +4,20 @@ import { createPortal as f } from "react-dom";
4
4
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
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
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";
7
+ import { Check as N, ChevronDown as P, Close as F, Search as I } from "@vellira-ui/icons";
8
+ import L from "focus-trap-react";
9
9
  //#region src/utils/cn.ts
10
- var L = (...e) => d(e), R = ({ children: e }) => {
10
+ var R = (...e) => d(e), z = ({ children: e }) => {
11
11
  let [t, n] = u(!1);
12
12
  if (o(() => {
13
13
  n(!0);
14
14
  }, []), !t) return null;
15
15
  let r = document.getElementById("overlay-root") ?? document.body;
16
16
  return r ? f(e, r) : null;
17
- }, z = {
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
+ }, V = n(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("ul", {
21
21
  ref: c,
22
22
  id: n,
23
23
  role: "menu",
@@ -27,13 +27,13 @@ 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: R(B.dropdown, s),
31
31
  children: e
32
32
  }) }));
33
- B.displayName = "DropdownContent";
33
+ V.displayName = "DropdownContent";
34
34
  //#endregion
35
35
  //#region src/hooks/useFloatingPosition.ts
36
- var V = (e) => {
36
+ var H = (e) => {
37
37
  let [t, n] = u(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
38
38
  return o(() => {
39
39
  if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
@@ -43,7 +43,7 @@ var V = (e) => {
43
43
  };
44
44
  }, [e]), t;
45
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({
46
+ let l = H(a), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = C({
47
47
  open: e,
48
48
  onOpenChange: t,
49
49
  placement: n,
@@ -88,11 +88,11 @@ var V = (e) => {
88
88
  };
89
89
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
90
90
  }, [n]);
91
- }, H = { group: "_group_aviwv_1" }, U = ({ label: e }) => /* @__PURE__ */ m("li", {
91
+ }, ne = { group: "_group_aviwv_1" }, re = ({ label: e }) => /* @__PURE__ */ m("li", {
92
92
  role: "presentation",
93
- className: H.group,
93
+ className: ne.group,
94
94
  children: e
95
- }), W = {
95
+ }), U = {
96
96
  item: "_item_re11y_1",
97
97
  disabled: "_disabled_re11y_21",
98
98
  active: "_active_re11y_34",
@@ -103,7 +103,7 @@ var V = (e) => {
103
103
  "itemText--truncate": "_itemText--truncate_re11y_88",
104
104
  "itemText--wrap": "_itemText--wrap_re11y_93",
105
105
  "itemText--nowrap": "_itemText--nowrap_re11y_97"
106
- }, ne = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
106
+ }, ie = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
107
107
  let f = t || n;
108
108
  return /* @__PURE__ */ h("li", {
109
109
  id: e,
@@ -114,32 +114,32 @@ var V = (e) => {
114
114
  "data-danger": i || void 0,
115
115
  onClick: a ? void 0 : s,
116
116
  onMouseEnter: a ? void 0 : c,
117
- className: L(W.item, {
118
- [W.active]: o,
119
- [W.disabled]: a,
120
- [W.danger]: i
117
+ className: R(U.item, {
118
+ [U.active]: o,
119
+ [U.disabled]: a,
120
+ [U.danger]: i
121
121
  }, d),
122
122
  children: [
123
123
  r && /* @__PURE__ */ m("span", {
124
124
  "aria-hidden": "true",
125
- className: W.itemIcon,
125
+ className: U.itemIcon,
126
126
  children: r
127
127
  }),
128
128
  f && /* @__PURE__ */ m("span", {
129
- className: L(W.itemText, W[`itemText--${u}`]),
129
+ className: R(U.itemText, U[`itemText--${u}`]),
130
130
  children: f
131
131
  }),
132
132
  l && /* @__PURE__ */ m("span", {
133
- className: W.itemShortcut,
133
+ className: U.itemShortcut,
134
134
  children: l
135
135
  })
136
136
  ]
137
137
  });
138
- }, G = { separator: "_separator_1v11r_1" }, re = () => /* @__PURE__ */ m("li", {
138
+ }, ae = { separator: "_separator_1v11r_1" }, oe = () => /* @__PURE__ */ m("li", {
139
139
  role: "separator",
140
- className: G.separator,
140
+ className: ae.separator,
141
141
  "aria-hidden": "true"
142
- }), K = {
142
+ }), W = {
143
143
  button: "_button_18ucr_1",
144
144
  disabled: "_disabled_18ucr_20",
145
145
  iconLeft: "_iconLeft_18ucr_32",
@@ -149,15 +149,15 @@ var V = (e) => {
149
149
  md: "_md_18ucr_72",
150
150
  lg: "_lg_18ucr_84",
151
151
  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) => {
152
+ }, se = n(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, size: o = "md", label: s, ariaLabel: c, className: l, ...u }, d) => {
153
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
154
  return /* @__PURE__ */ h("button", {
155
155
  ...u,
156
156
  ref: d,
157
157
  type: "button",
158
- className: L(K.button, K[o], {
159
- [K.disabled]: u.disabled,
160
- [K.iconOnly]: g
158
+ className: R(W.button, W[o], {
159
+ [W.disabled]: u.disabled,
160
+ [W.iconOnly]: g
161
161
  }, l),
162
162
  "aria-label": y,
163
163
  "aria-expanded": t,
@@ -166,30 +166,30 @@ var V = (e) => {
166
166
  children: [
167
167
  f && /* @__PURE__ */ m("span", {
168
168
  "aria-hidden": "true",
169
- className: K.iconLeft,
169
+ className: W.iconLeft,
170
170
  children: n
171
171
  }),
172
172
  e,
173
173
  _ && /* @__PURE__ */ m("span", {
174
174
  "aria-hidden": "true",
175
- className: L(K.arrow, { [K.open]: t }),
175
+ className: R(W.arrow, { [W.open]: t }),
176
176
  children: v
177
177
  })
178
178
  ]
179
179
  });
180
180
  });
181
- ie.displayName = "DropdownTrigger";
181
+ se.displayName = "DropdownTrigger";
182
182
  //#endregion
183
183
  //#region src/components/Dropdown/types.ts
184
- var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "group", se = (e) => e.type === "separator", ce = { wrapper: "_wrapper_14ue8_1" }, le = ({ label: e, ariaLabel: t, icon: 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 }) => {
184
+ var ce = (e) => e.type === void 0 || e.type === "item", le = (e) => e.type === "group", ue = (e) => e.type === "separator", de = { wrapper: "_wrapper_14ue8_1" }, G = ({ label: e, ariaLabel: t, icon: n, trigger: r, items: a = [], onSelect: o, open: u, defaultOpen: d = !1, onOpenChange: f, size: p = "md", className: g, triggerClassName: _, contentClassName: v, itemClassName: y, disabled: b, rotateAngle: x = 90, placement: S, matchTriggerWidth: C, textWrap: w, showArrow: T = !0, arrowIcon: E }) => {
185
185
  let D = l(null), k = l(null), A = s(), j = `${A}-trigger`, { floatingStyles: M, setRef: N, setFloatingRef: P } = ee({
186
186
  placement: S,
187
187
  matchTriggerWidth: C,
188
188
  mobileSheetBreakpoint: 640
189
- }), F = c(() => a.flatMap((e, t) => ae(e) ? [{
189
+ }), F = c(() => a.flatMap((e, t) => ce(e) ? [{
190
190
  item: e,
191
191
  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({
192
+ }] : []), [a]), I = c(() => F.map(({ item: e }) => e), [F]), L = c(() => new Map(F.map(({ itemIndex: e }, t) => [e, t])), [F]), { activeIndex: z, setActiveIndex: B, isOpen: H, closeDropdown: ne, toggleDropdown: U, selectItem: ae, onKeyDown: W } = O({
193
193
  items: I,
194
194
  open: u,
195
195
  defaultOpen: d,
@@ -200,18 +200,18 @@ var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
200
200
  }, [o]),
201
201
  getItemValue: (e) => e.value,
202
202
  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) => {
203
+ }), G = H && z >= 0 ? `${A}-item-${z}` : void 0;
204
+ te([D, k], ne, H);
205
+ let K = i((e) => {
206
+ W(e), H && e.key === "Escape" && D.current?.focus();
207
+ }, [H, W]), fe = i((e) => {
208
208
  D.current = e, N(e);
209
209
  }, [N]), pe = i((e) => {
210
210
  k.current = e, P(e), e?.focus();
211
211
  }, [P]);
212
212
  return /* @__PURE__ */ h("div", {
213
- className: L(ce.wrapper, g),
214
- children: [/* @__PURE__ */ m(ie, {
213
+ className: R(de.wrapper, g),
214
+ children: [/* @__PURE__ */ m(se, {
215
215
  ref: fe,
216
216
  id: j,
217
217
  isOpen: H,
@@ -224,37 +224,37 @@ var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
224
224
  arrowIcon: E,
225
225
  rotateAngle: x,
226
226
  className: _,
227
- onClick: G,
228
- onKeyDown: de,
227
+ onClick: U,
228
+ onKeyDown: K,
229
229
  "aria-expanded": H,
230
230
  "aria-haspopup": "menu",
231
231
  ...H && { "aria-controls": A },
232
232
  children: r
233
- }), H && /* @__PURE__ */ m(B, {
233
+ }), H && /* @__PURE__ */ m(V, {
234
234
  ref: pe,
235
235
  floatingStyles: M,
236
236
  menuId: A,
237
237
  labelledById: r ? j : void 0,
238
238
  label: t ?? (!r && typeof e == "string" ? e : void 0),
239
- activeDescendantId: ue,
240
- onKeyDown: de,
239
+ activeDescendantId: G,
240
+ onKeyDown: K,
241
241
  className: v,
242
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
+ if (le(e)) return /* @__PURE__ */ m(re, { label: e.label }, `group-${e.label}`);
244
+ if (ue(e)) return /* @__PURE__ */ m(oe, {}, `separator-${t}`);
245
+ if (ce(e)) {
246
+ let n = L.get(t) ?? -1;
247
+ return /* @__PURE__ */ m(ie, {
248
248
  id: `${A}-item-${n}`,
249
249
  ...e,
250
250
  active: z === n,
251
251
  textWrap: e.textWrap || w,
252
252
  className: y,
253
253
  onClick: () => {
254
- K(e), D.current?.focus();
254
+ ae(e), D.current?.focus();
255
255
  },
256
256
  onMouseEnter: () => {
257
- n < 0 || e.disabled || V(n);
257
+ n < 0 || e.disabled || B(n);
258
258
  },
259
259
  children: e.label
260
260
  }, `${e.value}-${t}`);
@@ -262,84 +262,84 @@ var ae = (e) => e.type === void 0 || e.type === "item", oe = (e) => e.type === "
262
262
  })
263
263
  })]
264
264
  });
265
- }, ue = t(void 0), de = () => {
266
- let e = a(ue);
265
+ }, K = t(void 0), fe = () => {
266
+ let e = a(K);
267
267
  if (e === void 0) throw Error("Modal compound components must be used inside Modal");
268
268
  return e;
269
269
  };
270
- ue.displayName = "ModalContext";
271
- var fe = { modalBody: "_modalBody_iv33a_1" }, pe = ({ children: e }) => {
272
- let { descriptionId: t } = de();
270
+ K.displayName = "ModalContext";
271
+ var pe = { modalBody: "_modalBody_iv33a_1" }, me = ({ children: e }) => {
272
+ let { descriptionId: t } = fe();
273
273
  return /* @__PURE__ */ m("div", {
274
274
  id: t,
275
- className: fe.modalBody,
275
+ className: pe.modalBody,
276
276
  children: e
277
277
  });
278
278
  };
279
- pe.displayName = "ModalBody";
280
- var me = { content: "_content_k44g7_1" }, he = ({ children: e }) => /* @__PURE__ */ m("div", {
281
- className: me.content,
279
+ me.displayName = "ModalBody";
280
+ var he = { content: "_content_k44g7_1" }, ge = ({ children: e }) => /* @__PURE__ */ m("div", {
281
+ className: he.content,
282
282
  children: e
283
283
  });
284
- he.displayName = "ModalContent";
285
- var ge = { modalFooter: "_modalFooter_ezys6_1" }, _e = ({ children: e }) => /* @__PURE__ */ m("div", {
286
- className: ge.modalFooter,
284
+ ge.displayName = "ModalContent";
285
+ var _e = { modalFooter: "_modalFooter_ezys6_1" }, ve = ({ children: e }) => /* @__PURE__ */ m("div", {
286
+ className: _e.modalFooter,
287
287
  children: e
288
288
  });
289
- _e.displayName = "ModalFooter";
290
- var ve = {
289
+ ve.displayName = "ModalFooter";
290
+ var ye = {
291
291
  modalHeader: "_modalHeader_p8xf1_1",
292
292
  modalHeaderTitle: "_modalHeaderTitle_p8xf1_7",
293
293
  modalHeaderCloseButton: "_modalHeaderCloseButton_p8xf1_14"
294
- }, ye = ({ children: e }) => {
295
- let { onClose: t, titleId: n } = de();
294
+ }, be = ({ children: e }) => {
295
+ let { onClose: t, titleId: n } = fe();
296
296
  return /* @__PURE__ */ h("div", {
297
- className: ve.modalHeader,
297
+ className: ye.modalHeader,
298
298
  children: [/* @__PURE__ */ m("h2", {
299
299
  id: n,
300
- className: ve.modalHeaderTitle,
300
+ className: ye.modalHeaderTitle,
301
301
  children: e
302
302
  }), t && /* @__PURE__ */ m("button", {
303
303
  type: "button",
304
- className: ve.modalHeaderCloseButton,
304
+ className: ye.modalHeaderCloseButton,
305
305
  onClick: t,
306
306
  "aria-label": "Close modal",
307
307
  children: /* @__PURE__ */ m(F, { size: 16 })
308
308
  })]
309
309
  });
310
310
  };
311
- ye.displayName = "ModalHeader";
311
+ be.displayName = "ModalHeader";
312
312
  //#endregion
313
313
  //#region src/hooks/useModalKeyboard.ts
314
- var be = ({ isOpen: e, onClose: t }) => {
314
+ var xe = ({ isOpen: e, onClose: t }) => {
315
315
  let n = i((n) => {
316
316
  e && n.key === "Escape" && (n.preventDefault(), t?.());
317
317
  }, [e, t]);
318
318
  o(() => (document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)), [n]);
319
- }, xe = {
319
+ }, Se = {
320
320
  overlay: "_overlay_dcudn_1",
321
321
  "overlay--open": "_overlay--open_dcudn_14",
322
322
  modal: "_modal_dcudn_20",
323
323
  "overlay--animated": "_overlay--animated_dcudn_28"
324
- }, 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) => {
324
+ }, Ce = 0, we = "", Te = ({ children: e, onClose: t, isOpen: n, className: r, closeOnBackdrop: a, closeOnClick: s, closeOnEsc: c = !0, zIndex: u = 1e3, animated: d = !0 }) => {
325
+ let f = a ?? s ?? !0, p = l(null), { titleId: h, descriptionId: g } = fe(), _ = i((e) => {
326
326
  f && e.target === e.currentTarget && t?.();
327
327
  }, [f, t]);
328
- return be({
328
+ return xe({
329
329
  isOpen: n,
330
330
  onClose: c ? t : void 0
331
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
+ if (n) return Ce === 0 && (we = document.body.style.overflow), Ce += 1, document.body.style.overflow = "hidden", () => {
333
+ Ce = Math.max(0, Ce - 1), Ce === 0 && (document.body.style.overflow = we);
334
334
  };
335
- }, [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),
335
+ }, [n]), !n && !d ? null : /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("div", {
336
+ className: R(Se.overlay, n && Se["overlay--open"], d && Se["overlay--animated"], r),
337
337
  onClick: _,
338
338
  tabIndex: -1,
339
339
  role: "presentation",
340
340
  "aria-hidden": !n,
341
341
  style: { zIndex: u },
342
- children: /* @__PURE__ */ m(I, {
342
+ children: /* @__PURE__ */ m(L, {
343
343
  active: n,
344
344
  focusTrapOptions: {
345
345
  fallbackFocus: () => p.current,
@@ -349,7 +349,7 @@ var be = ({ isOpen: e, onClose: t }) => {
349
349
  children: /* @__PURE__ */ m("div", {
350
350
  ref: p,
351
351
  tabIndex: -1,
352
- className: xe.modal,
352
+ className: Se.modal,
353
353
  role: "dialog",
354
354
  "aria-modal": "true",
355
355
  "aria-labelledby": h,
@@ -359,10 +359,10 @@ var be = ({ isOpen: e, onClose: t }) => {
359
359
  })
360
360
  }) });
361
361
  };
362
- we.displayName = "ModalOverlay";
362
+ Te.displayName = "ModalOverlay";
363
363
  //#endregion
364
364
  //#region src/components/Modal/Modal.tsx
365
- var Te = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
365
+ var Ee = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
366
366
  let o = k({
367
367
  isOpen: e,
368
368
  onClose: n,
@@ -370,32 +370,32 @@ var Te = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick
370
370
  closeOnClick: i,
371
371
  closeOnEsc: a
372
372
  });
373
- return o.shouldRender ? /* @__PURE__ */ m(ue.Provider, {
373
+ return o.shouldRender ? /* @__PURE__ */ m(K.Provider, {
374
374
  value: {
375
375
  onClose: o.onClose,
376
376
  titleId: o.titleId,
377
377
  descriptionId: o.descriptionId
378
378
  },
379
- children: /* @__PURE__ */ m(we, {
379
+ children: /* @__PURE__ */ m(Te, {
380
380
  isOpen: o.isOpen,
381
381
  onClose: o.onClose,
382
382
  closeOnBackdrop: o.closeOnBackdrop,
383
383
  closeOnEsc: o.closeOnEsc,
384
- children: /* @__PURE__ */ m(he, { children: t })
384
+ children: /* @__PURE__ */ m(ge, { children: t })
385
385
  })
386
386
  }) : null;
387
387
  };
388
- Te.displayName = "Modal";
388
+ Ee.displayName = "Modal";
389
389
  //#endregion
390
390
  //#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);
391
+ var De = Object.assign(Ee, {
392
+ Header: be,
393
+ Body: me,
394
+ Content: ge,
395
+ Footer: ve
396
+ }), Oe = t(null), ke = Oe.Provider;
397
+ function Ae() {
398
+ return a(Oe);
399
399
  }
400
400
  var q = {
401
401
  root: "_root_1n02e_1",
@@ -408,7 +408,7 @@ var q = {
408
408
  error: "_error_1n02e_51",
409
409
  disabled: "_disabled_1n02e_59",
410
410
  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) => {
411
+ }, je = n(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: a = "md", color: o = "primary", name: c, label: l, description: u, error: d, orientation: f = "vertical", children: p, className: g, id: _, ...v }, y) => {
412
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({
413
413
  value: e,
414
414
  defaultValue: t,
@@ -424,7 +424,7 @@ var q = {
424
424
  "aria-disabled": r || void 0,
425
425
  "aria-required": i || void 0,
426
426
  "aria-invalid": A || void 0,
427
- className: L(q.root, A && q.invalid, r && q.disabled, g),
427
+ className: R(q.root, A && q.invalid, r && q.disabled, g),
428
428
  children: [
429
429
  l && /* @__PURE__ */ h("div", {
430
430
  id: S,
@@ -440,7 +440,7 @@ var q = {
440
440
  className: q.description,
441
441
  children: u
442
442
  }),
443
- /* @__PURE__ */ m(Oe, {
443
+ /* @__PURE__ */ m(ke, {
444
444
  value: {
445
445
  name: E,
446
446
  value: O,
@@ -453,7 +453,7 @@ var q = {
453
453
  onValueChange: k
454
454
  },
455
455
  children: /* @__PURE__ */ m("div", {
456
- className: L(q.items, q[f]),
456
+ className: R(q.items, q[f]),
457
457
  children: p
458
458
  })
459
459
  }),
@@ -465,68 +465,116 @@ var q = {
465
465
  ]
466
466
  });
467
467
  });
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;
468
+ je.displayName = "RadioGroup";
469
+ //#endregion
470
+ //#region src/patterns/FormField/FormFieldContext.ts
471
+ var Me = t(null), Ne = () => a(Me), J = {
472
+ wrapper: "_wrapper_143kr_1",
473
+ sm: "_sm_143kr_41",
474
+ md: "_md_143kr_78",
475
+ lg: "_lg_143kr_115",
476
+ horizontal: "_horizontal_143kr_152",
477
+ start: "_start_143kr_153",
478
+ description: "_description_143kr_160",
479
+ control: "_control_143kr_161",
480
+ errorText: "_errorText_143kr_162",
481
+ label: "_label_143kr_169",
482
+ labelText: "_labelText_143kr_186",
483
+ required: "_required_143kr_190",
484
+ optional: "_optional_143kr_194",
485
+ labelInfo: "_labelInfo_143kr_201",
486
+ disabled: "_disabled_143kr_243"
487
+ }, Pe = (...e) => e.filter(Boolean).join(" ") || void 0, Fe = ({ id: t, label: n, description: i, error: a, required: o = !1, disabled: c = !1, invalid: l = !1, orientation: u = "vertical", labelPosition: d = "top", size: f = "md", labelInfo: p, optionalText: g, children: _, bindControl: v = !0, className: y, controlClassName: b, labelClassName: x, descriptionClassName: S, errorClassName: C, ...w }) => {
488
+ let T = s(), E = t ?? T, D = n ? `${E}-label` : void 0, O = i && E ? `${E}-description` : void 0, k = a && E ? `${E}-error` : void 0, A = l || !!a, j = Pe(D), M = Pe(O, k), N = {
489
+ controlId: E,
490
+ labelId: D,
491
+ descriptionId: O,
492
+ errorId: k,
493
+ required: o,
494
+ disabled: c,
495
+ invalid: A,
496
+ size: f,
497
+ ariaLabelledBy: j,
498
+ ariaDescribedBy: M
499
+ }, P = r(_) ? _ : void 0, F = v && P ? e(P, {
500
+ id: P.props.id ?? E,
501
+ required: P.props.required ?? o,
502
+ disabled: P.props.disabled ?? c,
503
+ "aria-invalid": P.props["aria-invalid"] ?? (A || void 0),
504
+ "aria-labelledby": Pe(P.props["aria-labelledby"], j),
505
+ "aria-describedby": Pe(P.props["aria-describedby"], M)
506
+ }) : _;
479
507
  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,
508
+ ...w,
509
+ "aria-disabled": c || void 0,
510
+ className: R(J.wrapper, J[u], J[d], J[f], c && J.disabled, y),
511
+ "data-disabled": c || void 0,
512
+ "data-invalid": A || void 0,
513
+ "data-orientation": u,
514
+ "data-size": f,
485
515
  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
- })]
516
+ n && /* @__PURE__ */ h("label", {
517
+ id: D,
518
+ htmlFor: E,
519
+ className: R(J.label, x),
520
+ children: [
521
+ /* @__PURE__ */ m("span", {
522
+ className: J.labelText,
523
+ children: n
524
+ }),
525
+ o && /* @__PURE__ */ m("span", {
526
+ className: J.required,
527
+ "aria-hidden": "true",
528
+ children: "*"
529
+ }),
530
+ !o && g && /* @__PURE__ */ m("span", {
531
+ className: J.optional,
532
+ children: g
533
+ }),
534
+ p && /* @__PURE__ */ m("span", {
535
+ className: J.labelInfo,
536
+ children: p
537
+ })
538
+ ]
494
539
  }),
495
- n && /* @__PURE__ */ m("div", {
496
- id: p,
497
- className: L(J.description, u),
498
- children: n
540
+ i && /* @__PURE__ */ m("div", {
541
+ id: O,
542
+ className: R(J.description, S),
543
+ children: i
499
544
  }),
500
- /* @__PURE__ */ m("div", {
501
- className: L(J.control, c),
502
- children: o
545
+ /* @__PURE__ */ m(Me.Provider, {
546
+ value: N,
547
+ children: /* @__PURE__ */ m("div", {
548
+ className: R(J.control, b),
549
+ children: F
550
+ })
503
551
  }),
504
- r && /* @__PURE__ */ m("div", {
505
- id: g,
506
- className: L(J.errorText, d),
552
+ a && /* @__PURE__ */ m("div", {
553
+ id: k,
554
+ className: R(J.errorText, C),
507
555
  role: "alert",
508
- children: r
556
+ children: a
509
557
  })
510
558
  ]
511
559
  });
512
- }, Me = {
560
+ }, Ie = {
513
561
  option: "_option_l6qjj_1",
514
562
  selected: "_selected_l6qjj_18",
515
563
  disabled: "_disabled_l6qjj_18",
516
564
  active: "_active_l6qjj_34",
517
565
  label: "_label_l6qjj_46",
518
566
  check: "_check_l6qjj_54"
519
- }, Ne = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
567
+ }, Le = ({ option: e, isSelected: t, isActive: n, optionId: r, onSelect: i, onMouseEnter: a }) => {
520
568
  let o = !!e.disabled;
521
569
  return /* @__PURE__ */ h("li", {
522
570
  id: r,
523
571
  role: "option",
524
572
  "aria-selected": t,
525
573
  "aria-disabled": o || void 0,
526
- className: L(Me.option, {
527
- [Me.selected]: t,
528
- [Me.active]: n,
529
- [Me.disabled]: o
574
+ className: R(Ie.option, {
575
+ [Ie.selected]: t,
576
+ [Ie.active]: n,
577
+ [Ie.disabled]: o
530
578
  }),
531
579
  onClick: () => {
532
580
  o || i(e.value);
@@ -535,28 +583,28 @@ var J = {
535
583
  o || a();
536
584
  },
537
585
  children: [/* @__PURE__ */ m("span", {
538
- className: Me.label,
586
+ className: Ie.label,
539
587
  children: e.label
540
588
  }), /* @__PURE__ */ m("span", {
541
- className: Me.check,
589
+ className: Ie.check,
542
590
  "aria-hidden": "true",
543
591
  children: t && /* @__PURE__ */ m(N, {})
544
592
  })]
545
593
  });
546
594
  };
547
- Ne.displayName = "SelectOption";
548
- var Pe = {
595
+ Le.displayName = "SelectOption";
596
+ var Re = {
549
597
  dropdown: "_dropdown_qznlq_1",
550
598
  dropdownIn: "_dropdownIn_qznlq_1",
551
599
  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", {
600
+ }, ze = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, noOptionsText: o, selectedValue: s, activeIndex: c, className: l, onSelect: u, onMouseEnter: d }) => e ? /* @__PURE__ */ m(z, { children: /* @__PURE__ */ m("ul", {
553
601
  ref: r,
554
602
  id: t,
555
603
  role: "listbox",
556
604
  "aria-labelledby": n,
557
- className: [Pe.dropdown, l].filter(Boolean).join(" "),
605
+ className: [Re.dropdown, l].filter(Boolean).join(" "),
558
606
  style: i,
559
- children: a.length ? a.map((e, n) => /* @__PURE__ */ m(Ne, {
607
+ children: a.length ? a.map((e, n) => /* @__PURE__ */ m(Le, {
560
608
  option: e,
561
609
  isSelected: e.value === s,
562
610
  isActive: n === c,
@@ -567,11 +615,11 @@ var Pe = {
567
615
  role: "option",
568
616
  "aria-disabled": "true",
569
617
  "aria-selected": "false",
570
- className: Pe.empty,
618
+ className: Re.empty,
571
619
  children: o
572
620
  })
573
621
  }) }) : null;
574
- Fe.displayName = "SelectDropdown";
622
+ ze.displayName = "SelectDropdown";
575
623
  var Y = {
576
624
  control: "_control_1xma1_1",
577
625
  disabled: "_disabled_1xma1_18",
@@ -583,7 +631,7 @@ var Y = {
583
631
  placeholder: "_placeholder_1xma1_63",
584
632
  error: "_error_1xma1_67",
585
633
  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", {
634
+ }, Be = ({ id: e, errorId: t, isOpen: n, disabled: r, required: i, listboxId: a, activeIndex: o, ariaLabel: s, error: c, displayText: l, isPlaceholder: u, size: d = "md", className: f, buttonRef: p, onClick: g, onKeyDown: _, onBlur: v, onFocus: y }) => /* @__PURE__ */ h("button", {
587
635
  id: e,
588
636
  ref: p,
589
637
  type: "button",
@@ -598,7 +646,7 @@ var Y = {
598
646
  "aria-controls": n ? a : void 0,
599
647
  "aria-describedby": t,
600
648
  "aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
601
- className: L(Y.control, Y[d], {
649
+ className: R(Y.control, Y[d], {
602
650
  [Y.error]: !!c,
603
651
  [Y.disabled]: r
604
652
  }, f),
@@ -607,19 +655,19 @@ var Y = {
607
655
  onBlur: v,
608
656
  onFocus: y,
609
657
  children: [/* @__PURE__ */ m("span", {
610
- className: L(Y.value, { [Y.placeholder]: u }),
658
+ className: R(Y.value, { [Y.placeholder]: u }),
611
659
  children: l
612
660
  }), /* @__PURE__ */ m("span", {
613
- className: L(Y.arrow, { [Y.open]: n }),
661
+ className: R(Y.arrow, { [Y.open]: n }),
614
662
  "aria-hidden": "true",
615
663
  children: /* @__PURE__ */ m(P, {})
616
664
  })]
617
665
  });
618
- Ie.displayName = "SelectTrigger";
666
+ Be.displayName = "SelectTrigger";
619
667
  //#endregion
620
668
  //#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({
669
+ var Ve = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o, defaultValue: c, onChange: u, options: d, placeholder: f = "Select...", noOptionsText: p = "No options available", size: g = "md", required: _ = !1, disabled: v = !1, error: y, placement: b = "bottom-start", matchTriggerWidth: x = !0, open: S, defaultOpen: C = !1, onOpenChange: w, onBlur: T, onFocus: E, className: D, triggerClassName: O, dropdownClassName: k }) => {
670
+ let j = s(), M = n ?? j, N = `${M}-listbox`, P = !!y, F = P ? `${M}-error` : void 0, I = l(null), L = l(null), { selectedValue: R, selectedOption: z, isOpen: B, setIsOpen: V, activeIndex: H, setActiveIndex: ne, closeDropdown: re, toggleDropdown: U, selectValue: ie, onKeyDown: ae } = A({
623
671
  value: o,
624
672
  defaultValue: c,
625
673
  onChange: u,
@@ -628,22 +676,22 @@ var Le = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o,
628
676
  open: S,
629
677
  defaultOpen: C,
630
678
  onOpenChange: w
631
- }), K = !!z, { floatingStyles: ie, setRef: ae, setFloatingRef: oe } = ee({
679
+ }), oe = !!z, { floatingStyles: W, setRef: se, setFloatingRef: ce } = ee({
632
680
  open: B,
633
681
  onOpenChange: V,
634
682
  placement: b,
635
683
  matchTriggerWidth: x,
636
684
  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, {
685
+ }), le = i((e) => {
686
+ ie(e), I.current?.focus();
687
+ }, [ie]);
688
+ te([I, L], re, B);
689
+ let ue = i((e) => {
690
+ I.current = e, se(e);
691
+ }, [se]), de = i((e) => {
692
+ L.current = e, ce(e);
693
+ }, [ce]);
694
+ return /* @__PURE__ */ h(Fe, {
647
695
  id: M,
648
696
  label: e,
649
697
  description: t,
@@ -652,7 +700,7 @@ var Le = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o,
652
700
  disabled: v,
653
701
  className: D,
654
702
  children: [
655
- /* @__PURE__ */ m(Ie, {
703
+ /* @__PURE__ */ m(Be, {
656
704
  id: M,
657
705
  errorId: F,
658
706
  isOpen: B,
@@ -663,12 +711,12 @@ var Le = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o,
663
711
  ariaLabel: a ?? (e ? void 0 : z?.label || f),
664
712
  error: P,
665
713
  displayText: z?.label ?? f,
666
- isPlaceholder: !K,
714
+ isPlaceholder: !oe,
667
715
  size: g,
668
716
  className: O,
669
- buttonRef: ce,
670
- onClick: ne,
671
- onKeyDown: re,
717
+ buttonRef: ue,
718
+ onClick: U,
719
+ onKeyDown: ae,
672
720
  onBlur: T,
673
721
  onFocus: E
674
722
  }),
@@ -678,50 +726,50 @@ var Le = ({ label: e, description: t, id: n, name: r, "aria-label": a, value: o,
678
726
  value: R,
679
727
  disabled: v
680
728
  }),
681
- /* @__PURE__ */ m(Fe, {
729
+ /* @__PURE__ */ m(ze, {
682
730
  isOpen: B,
683
731
  listboxId: N,
684
732
  labelledById: M,
685
- style: ie,
733
+ style: W,
686
734
  options: d,
687
735
  noOptionsText: p,
688
736
  selectedValue: R,
689
737
  activeIndex: H,
690
738
  className: k,
691
- setDropdownRef: le,
692
- onSelect: se,
693
- onMouseEnter: U
739
+ setDropdownRef: de,
740
+ onSelect: le,
741
+ onMouseEnter: ne
694
742
  })
695
743
  ]
696
744
  });
697
745
  };
698
- Le.displayName = "Select";
746
+ Ve.displayName = "Select";
699
747
  //#endregion
700
748
  //#region src/components/Tabs/TabsContext.tsx
701
- var Re = t(null), ze = () => {
702
- let e = a(Re);
749
+ var He = t(null), Ue = () => {
750
+ let e = a(He);
703
751
  if (!e) throw Error("Tabs components must be used inside Tabs");
704
752
  return e;
705
- }, Be = {
753
+ }, We = {
706
754
  list: "_list_13hkl_1",
707
755
  vertical: "_vertical_13hkl_8"
708
- }, Ve = ({ children: e, className: t, ...n }) => {
709
- let { orientation: r, appearance: i } = ze();
756
+ }, Ge = ({ children: e, className: t, ...n }) => {
757
+ let { orientation: r, appearance: i } = Ue();
710
758
  return /* @__PURE__ */ m("div", {
711
759
  ...n,
712
760
  role: "tablist",
713
761
  "aria-orientation": r,
714
- className: L(Be.list, r === "vertical" && Be.vertical, i === "underline" && Be.underline, i === "pills" && Be.pills, t),
762
+ className: R(We.list, r === "vertical" && We.vertical, i === "underline" && We.underline, i === "pills" && We.pills, t),
715
763
  children: e
716
764
  });
717
765
  };
718
- Ve.displayName = "TabsList";
719
- var He = {
766
+ Ge.displayName = "TabsList";
767
+ var Ke = {
720
768
  panel: "_panel_1v1a9_1",
721
769
  visible: "_visible_1v1a9_10",
722
770
  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;
771
+ }, qe = ({ index: e, children: t, className: n }) => {
772
+ let { activeIndex: r, orientation: i } = Ue(), [a, s] = u(!1), c = r === e;
725
773
  return o(() => {
726
774
  if (!c) {
727
775
  s(!1);
@@ -735,12 +783,12 @@ var He = {
735
783
  "aria-labelledby": `tab-${e}`,
736
784
  hidden: !c,
737
785
  tabIndex: 0,
738
- className: L(He.panel, a && He.visible, i === "vertical" && He.vertical, n),
786
+ className: R(Ke.panel, a && Ke.visible, i === "vertical" && Ke.vertical, n),
739
787
  children: t
740
788
  });
741
789
  };
742
- Ue.displayName = "TabsPanel";
743
- var We = {
790
+ qe.displayName = "TabsPanel";
791
+ var Je = {
744
792
  tab: "_tab_qe8xc_1",
745
793
  iconOnly: "_iconOnly_qe8xc_27",
746
794
  tabIcon: "_tabIcon_qe8xc_31",
@@ -749,8 +797,8 @@ var We = {
749
797
  underline: "_underline_qe8xc_60",
750
798
  pills: "_pills_qe8xc_92",
751
799
  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;
800
+ }, Ye = n(({ index: e, children: t, className: n, disabled: r = !1, icon: a, onClick: o, onKeyDown: s, ...c }, l) => {
801
+ let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: g, onTabKeyDown: _ } = Ue(), v = u === e, y = !!a, b = y && t == null;
754
802
  return /* @__PURE__ */ h("button", {
755
803
  type: "button",
756
804
  ref: i((t) => {
@@ -766,7 +814,7 @@ var We = {
766
814
  id: `tab-${e}`,
767
815
  disabled: r,
768
816
  tabIndex: v ? 0 : -1,
769
- className: L(We.tab, We[p], f === "vertical" && We.vertical, y && We.withIcon, b && We.iconOnly, n),
817
+ className: R(Je.tab, Je[p], f === "vertical" && Je.vertical, y && Je.withIcon, b && Je.iconOnly, n),
770
818
  onClick: (t) => {
771
819
  r || (d(e), o?.(t));
772
820
  },
@@ -775,20 +823,20 @@ var We = {
775
823
  },
776
824
  ...c,
777
825
  children: [y && /* @__PURE__ */ m("span", {
778
- className: We.tabIcon,
826
+ className: Je.tabIcon,
779
827
  "aria-hidden": "true",
780
828
  children: a
781
829
  }), t != null && /* @__PURE__ */ m("span", {
782
- className: We.label,
830
+ className: Je.label,
783
831
  children: t
784
832
  })]
785
833
  });
786
834
  });
787
- Ge.displayName = "Tab";
788
- var Ke = {
835
+ Ye.displayName = "Tab";
836
+ var Xe = {
789
837
  tabs: "_tabs_uqy7q_1",
790
838
  vertical: "_vertical_uqy7q_5"
791
- }, qe = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
839
+ }, Ze = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
792
840
  let { activeIndex: c, setActiveIndex: u } = j({
793
841
  activeIndex: t,
794
842
  defaultActiveIndex: n,
@@ -811,25 +859,25 @@ var Ke = {
811
859
  registerTab: f,
812
860
  onTabKeyDown: p
813
861
  };
814
- return /* @__PURE__ */ m(Re.Provider, {
862
+ return /* @__PURE__ */ m(He.Provider, {
815
863
  value: h,
816
864
  children: /* @__PURE__ */ m("div", {
817
- className: L(Ke.tabs, a === "vertical" && Ke.vertical, s),
865
+ className: R(Xe.tabs, a === "vertical" && Xe.vertical, s),
818
866
  children: e
819
867
  })
820
868
  });
821
869
  };
822
- qe.displayName = "Tabs";
870
+ Ze.displayName = "Tabs";
823
871
  //#endregion
824
872
  //#region src/components/Tabs/index.ts
825
- var Je = Object.assign(qe, {
826
- List: Ve,
827
- Tab: Ge,
828
- Panel: Ue
829
- }), Ye = {
873
+ var Qe = Object.assign(Ze, {
874
+ List: Ge,
875
+ Tab: Ye,
876
+ Panel: qe
877
+ }), $e = {
830
878
  tooltip: "_tooltip_10opu_1",
831
879
  arrow: "_arrow_10opu_25"
832
- }, Xe = n(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
880
+ }, et = n(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
833
881
  let l = {
834
882
  top: "bottom",
835
883
  right: "left",
@@ -844,22 +892,22 @@ var Je = Object.assign(qe, {
844
892
  };
845
893
  return /* @__PURE__ */ h("div", {
846
894
  ref: c,
847
- className: L(Ye.tooltip, a),
895
+ className: R($e.tooltip, a),
848
896
  "data-placement": t,
849
897
  "data-state": "open",
850
898
  style: o,
851
899
  ...s,
852
900
  children: [e, /* @__PURE__ */ m("div", {
853
901
  ref: n,
854
- className: Ye.arrow,
902
+ className: $e.arrow,
855
903
  style: u
856
904
  })]
857
905
  });
858
906
  });
859
- Xe.displayName = "TooltipContent";
907
+ et.displayName = "TooltipContent";
860
908
  //#endregion
861
909
  //#region src/components/Tooltip/Tooltip.tsx
862
- var Ze = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
910
+ var tt = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
863
911
  open: 300,
864
912
  close: 100
865
913
  }, maxWidth: a = 250, className: o, onOpenChange: c }) => {
@@ -880,7 +928,7 @@ var Ze = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
880
928
  "aria-describedby": d ? y : void 0,
881
929
  ...j(),
882
930
  children: e
883
- }), /* @__PURE__ */ m(g, { children: d && n && /* @__PURE__ */ m(Xe, {
931
+ }), /* @__PURE__ */ m(g, { children: d && n && /* @__PURE__ */ m(et, {
884
932
  id: y,
885
933
  ref: D,
886
934
  content: n,
@@ -897,10 +945,10 @@ var Ze = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
897
945
  ...M()
898
946
  }) })] });
899
947
  };
900
- Ze.displayName = "Tooltip";
948
+ tt.displayName = "Tooltip";
901
949
  //#endregion
902
950
  //#region src/utils/devWarning.ts
903
- var Qe = (e, t) => {
951
+ var nt = (e, t) => {
904
952
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
905
953
  }, X = {
906
954
  button: "_button_2nghu_1",
@@ -930,23 +978,23 @@ var Qe = (e, t) => {
930
978
  "button-spin": "_button-spin_2nghu_1",
931
979
  badge: "_badge_2nghu_786",
932
980
  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, {
981
+ }, rt = n(({ children: t, color: n = "primary", appearance: i = "solid", size: a = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: g, badge: _, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
982
+ let I = S && r(t) ? t : void 0, L = I ? I.props.children : t, z = x || !L && !!(d || f), B = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), V = c || l, H = l && u ? u : L, ee = u && L && !z && (typeof L == "string" || typeof L == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? L : u) : void 0, te = O === "_blank" && !k ? "noreferrer noopener" : k, ne = R(X.button, X[n], X[i], X[a], X[o], C, {
935
983
  [X.disabled]: V,
936
984
  [X.loading]: l,
937
985
  [X.fullWidth]: b,
938
986
  [X.iconOnly]: z
939
987
  });
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) => {
988
+ nt(!S || !D, "Button: pass href to the child element when using asChild."), nt(!S || !!I, "Button: asChild requires a single valid React element child."), nt(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
989
+ let re = (e) => {
942
990
  e.preventDefault(), e.stopPropagation();
943
- }, ne = (e) => {
991
+ }, U = (e) => {
944
992
  if (V) {
945
- W(e);
993
+ re(e);
946
994
  return;
947
995
  }
948
996
  I?.props.onClick?.(e), e.defaultPrevented || w?.(e);
949
- }, G = /* @__PURE__ */ h(p, { children: [
997
+ }, ie = /* @__PURE__ */ h(p, { children: [
950
998
  l && (g ? /* @__PURE__ */ m("span", {
951
999
  className: X.icon,
952
1000
  "aria-hidden": "true",
@@ -959,12 +1007,12 @@ var Qe = (e, t) => {
959
1007
  className: X.icon,
960
1008
  children: d
961
1009
  }),
962
- ee && !z && /* @__PURE__ */ m("span", {
1010
+ H && !z && /* @__PURE__ */ m("span", {
963
1011
  className: X.label,
964
- "data-measure": te,
1012
+ "data-measure": ee,
965
1013
  children: /* @__PURE__ */ m("span", {
966
1014
  className: X.labelText,
967
- children: ee
1015
+ children: H
968
1016
  })
969
1017
  }),
970
1018
  _ && !z && /* @__PURE__ */ m("span", {
@@ -987,12 +1035,12 @@ var Qe = (e, t) => {
987
1035
  "aria-disabled": V || void 0,
988
1036
  "aria-label": T || I.props["aria-label"] || void 0,
989
1037
  "aria-labelledby": E || I.props["aria-labelledby"] || void 0,
990
- className: L(I.props.className, U),
1038
+ className: R(I.props.className, ne),
991
1039
  href: V ? void 0 : I.props.href,
992
- onClick: ne,
1040
+ onClick: U,
993
1041
  tabIndex: V ? -1 : I.props.tabIndex,
994
1042
  title: y || I.props.title,
995
- children: G
1043
+ children: ie
996
1044
  }) : D ? /* @__PURE__ */ m("a", {
997
1045
  ref: F,
998
1046
  href: V ? void 0 : D,
@@ -1000,16 +1048,16 @@ var Qe = (e, t) => {
1000
1048
  role: M,
1001
1049
  tabIndex: V ? -1 : N,
1002
1050
  target: O,
1003
- rel: H,
1051
+ rel: te,
1004
1052
  download: A,
1005
- onClick: V ? W : w,
1053
+ onClick: V ? re : w,
1006
1054
  "aria-disabled": V || void 0,
1007
1055
  "aria-label": T || void 0,
1008
1056
  "aria-labelledby": E || void 0,
1009
1057
  "aria-busy": l || void 0,
1010
- className: U,
1058
+ className: ne,
1011
1059
  title: y,
1012
- children: G
1060
+ children: ie
1013
1061
  }) : /* @__PURE__ */ m("button", {
1014
1062
  ...P,
1015
1063
  ref: F,
@@ -1022,69 +1070,69 @@ var Qe = (e, t) => {
1022
1070
  "aria-label": T || void 0,
1023
1071
  "aria-labelledby": E || void 0,
1024
1072
  "aria-busy": l || void 0,
1025
- className: U,
1073
+ className: ne,
1026
1074
  title: y,
1027
- children: G
1075
+ children: ie
1028
1076
  });
1029
1077
  });
1030
- $e.displayName = "Button";
1078
+ rt.displayName = "Button";
1031
1079
  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 = {
1080
+ wrapper: "_wrapper_877rr_1",
1081
+ colorPrimary: "_colorPrimary_877rr_27",
1082
+ colorNeutral: "_colorNeutral_877rr_45",
1083
+ colorSuccess: "_colorSuccess_877rr_63",
1084
+ colorWarning: "_colorWarning_877rr_81",
1085
+ colorDanger: "_colorDanger_877rr_99",
1086
+ labelStart: "_labelStart_877rr_115",
1087
+ wrapperSm: "_wrapperSm_877rr_119",
1088
+ wrapperMd: "_wrapperMd_877rr_125",
1089
+ wrapperLg: "_wrapperLg_877rr_131",
1090
+ iconOnly: "_iconOnly_877rr_137",
1091
+ container: "_container_877rr_143",
1092
+ containerSm: "_containerSm_877rr_150",
1093
+ containerMd: "_containerMd_877rr_154",
1094
+ containerLg: "_containerLg_877rr_158",
1095
+ containerLabelStart: "_containerLabelStart_877rr_162",
1096
+ descriptionText: "_descriptionText_877rr_162",
1097
+ errorText: "_errorText_877rr_163",
1098
+ input: "_input_877rr_167",
1099
+ customCheckbox: "_customCheckbox_877rr_179",
1100
+ requiredMark: "_requiredMark_877rr_194",
1101
+ error: "_error_877rr_163",
1102
+ checkmark: "_checkmark_877rr_210",
1103
+ indeterminateMark: "_indeterminateMark_877rr_226",
1104
+ customMark: "_customMark_877rr_239",
1105
+ label: "_label_877rr_115",
1106
+ labelSm: "_labelSm_877rr_270",
1107
+ labelMd: "_labelMd_877rr_274",
1108
+ labelLg: "_labelLg_877rr_278",
1109
+ indeterminate: "_indeterminate_877rr_226",
1110
+ "checkbox-pop": "_checkbox-pop_877rr_1",
1111
+ disabled: "_disabled_877rr_354"
1112
+ }, it = {
1065
1113
  sm: Z.labelSm,
1066
1114
  md: Z.labelMd,
1067
1115
  lg: Z.labelLg
1068
- }, tt = {
1116
+ }, at = {
1069
1117
  sm: Z.wrapperSm,
1070
1118
  md: Z.wrapperMd,
1071
1119
  lg: Z.wrapperLg
1072
- }, nt = {
1120
+ }, ot = {
1073
1121
  sm: Z.containerSm,
1074
1122
  md: Z.containerMd,
1075
1123
  lg: Z.containerLg
1076
- }, rt = {
1124
+ }, st = {
1077
1125
  primary: Z.colorPrimary,
1078
1126
  neutral: Z.colorNeutral,
1079
1127
  success: Z.colorSuccess,
1080
1128
  warning: Z.colorWarning,
1081
1129
  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) => {
1130
+ }, ct = n(({ id: e, label: t, description: n, icon: r, indeterminateIcon: a, checked: c, size: u = "md", color: d = "primary", labelPosition: f = "end", defaultChecked: p = !1, disabled: g = !1, required: _ = !1, indeterminate: v = !1, className: y, wrapperClassName: b, onCheckedChange: x, error: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, ...E }, O) => {
1083
1131
  let k = s(), A = e ?? k, j = l(null), M = !!S, P = n ? `${A}-description` : void 0, F = M ? `${A}-error` : void 0, I = [
1084
1132
  T,
1085
1133
  P,
1086
1134
  F
1087
- ].filter(Boolean).join(" "), [R, z] = D({
1135
+ ].filter(Boolean).join(" "), [L, z] = D({
1088
1136
  value: c,
1089
1137
  defaultValue: p,
1090
1138
  onChange: x
@@ -1101,19 +1149,19 @@ var Z = {
1101
1149
  let V = (e) => {
1102
1150
  z(e.target.checked);
1103
1151
  };
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),
1152
+ return nt(!!(t || C || w), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ h("div", {
1153
+ className: R(Z.container, ot[u], f === "start" && Z.containerLabelStart, y),
1106
1154
  children: [
1107
1155
  /* @__PURE__ */ h("label", {
1108
1156
  htmlFor: A,
1109
- className: L(Z.wrapper, tt[u], rt[d], f === "start" && Z.labelStart, !t && Z.iconOnly, g && Z.disabled, b),
1157
+ className: R(Z.wrapper, at[u], st[d], f === "start" && Z.labelStart, !t && Z.iconOnly, g && Z.disabled, b),
1110
1158
  children: [
1111
1159
  /* @__PURE__ */ m("input", {
1112
1160
  ...E,
1113
1161
  ref: B,
1114
1162
  id: A,
1115
1163
  type: "checkbox",
1116
- checked: R,
1164
+ checked: L,
1117
1165
  disabled: g,
1118
1166
  required: _,
1119
1167
  onChange: V,
@@ -1125,18 +1173,18 @@ var Z = {
1125
1173
  "aria-describedby": I || void 0
1126
1174
  }),
1127
1175
  /* @__PURE__ */ m("span", {
1128
- className: L(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1176
+ className: R(Z.customCheckbox, M && Z.error, v && Z.indeterminate),
1129
1177
  "aria-hidden": "true",
1130
1178
  children: v ? /* @__PURE__ */ m("span", {
1131
- className: L(Z.indeterminateMark, a && Z.customMark),
1179
+ className: R(Z.indeterminateMark, a && Z.customMark),
1132
1180
  children: a
1133
- }) : R && /* @__PURE__ */ m("span", {
1181
+ }) : L && /* @__PURE__ */ m("span", {
1134
1182
  className: Z.checkmark,
1135
1183
  children: r ?? /* @__PURE__ */ m(N, {})
1136
1184
  })
1137
1185
  }),
1138
1186
  t && /* @__PURE__ */ h("span", {
1139
- className: L(Z.label, et[u]),
1187
+ className: R(Z.label, it[u]),
1140
1188
  children: [t, _ && /* @__PURE__ */ m("span", {
1141
1189
  className: Z.requiredMark,
1142
1190
  "aria-hidden": "true",
@@ -1158,27 +1206,49 @@ var Z = {
1158
1206
  ]
1159
1207
  });
1160
1208
  });
1161
- it.displayName = "Checkbox";
1209
+ ct.displayName = "Checkbox";
1162
1210
  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 = {
1211
+ inputGroup: "_inputGroup_151bq_1",
1212
+ primary: "_primary_151bq_29",
1213
+ outline: "_outline_151bq_29",
1214
+ filled: "_filled_151bq_62",
1215
+ soft: "_soft_151bq_95",
1216
+ neutral: "_neutral_151bq_128",
1217
+ success: "_success_151bq_227",
1218
+ warning: "_warning_151bq_326",
1219
+ danger: "_danger_151bq_425",
1220
+ inputWrapper: "_inputWrapper_151bq_524",
1221
+ input: "_input_151bq_1",
1222
+ error: "_error_151bq_575",
1223
+ sm: "_sm_151bq_583",
1224
+ md: "_md_151bq_587",
1225
+ lg: "_lg_151bq_591",
1226
+ isInvalid: "_isInvalid_151bq_607",
1227
+ hasLeftAdornment: "_hasLeftAdornment_151bq_635",
1228
+ hasRightAdornment: "_hasRightAdornment_151bq_639",
1229
+ hasStartIconAndPrefix: "_hasStartIconAndPrefix_151bq_643",
1230
+ hasEndIconAndSuffix: "_hasEndIconAndSuffix_151bq_647",
1231
+ startAdornment: "_startAdornment_151bq_651",
1232
+ endAdornment: "_endAdornment_151bq_652",
1233
+ prefix: "_prefix_151bq_670",
1234
+ suffix: "_suffix_151bq_671",
1235
+ endSlot: "_endSlot_151bq_698",
1236
+ isLoading: "_isLoading_151bq_709",
1237
+ clearButton: "_clearButton_151bq_744",
1238
+ iconButton: "_iconButton_151bq_759",
1239
+ spinner: "_spinner_151bq_785",
1240
+ "input-spin": "_input-spin_151bq_1",
1241
+ addon: "_addon_151bq_794",
1242
+ hasAddons: "_hasAddons_151bq_815",
1243
+ counter: "_counter_151bq_829",
1244
+ toneDefault: "_toneDefault_151bq_857",
1245
+ tonePrimary: "_tonePrimary_151bq_861",
1246
+ toneSecondary: "_toneSecondary_151bq_865",
1247
+ toneSuccess: "_toneSuccess_151bq_869",
1248
+ toneDanger: "_toneDanger_151bq_873",
1249
+ toneMuted: "_toneMuted_151bq_877",
1250
+ toneInverse: "_toneInverse_151bq_881"
1251
+ }, lt = {
1182
1252
  default: Q.toneDefault,
1183
1253
  primary: Q.tonePrimary,
1184
1254
  secondary: Q.toneSecondary,
@@ -1186,7 +1256,7 @@ var Q = {
1186
1256
  danger: Q.toneDanger,
1187
1257
  muted: Q.toneMuted,
1188
1258
  inverse: Q.toneInverse
1189
- }, ot = (e = "text", t) => {
1259
+ }, ut = (e = "text", t) => {
1190
1260
  if (t) return t;
1191
1261
  switch (e) {
1192
1262
  case "email": return "email";
@@ -1196,78 +1266,161 @@ var Q = {
1196
1266
  case "search": return "off";
1197
1267
  default: return;
1198
1268
  }
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);
1269
+ }, dt = (e, t) => {
1270
+ let n = e.replace(/\D/g, ""), r = 0, i = "";
1271
+ for (let e of t) {
1272
+ if (e === "#") {
1273
+ let e = n[r];
1274
+ if (!e) break;
1275
+ i += e, r += 1;
1276
+ continue;
1277
+ }
1278
+ r < n.length && (i += e);
1279
+ }
1280
+ return i;
1281
+ }, ft = (e, t) => t ? typeof t == "function" ? t(e) : dt(e, t) : e, pt = n(({ id: e, label: t, name: n, description: r, placeholder: a, value: o, defaultValue: c, type: d = "text", size: f, color: g = "primary", variant: _ = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: C, wrapperClassName: w, autoComplete: T, readOnly: E = !1, clearable: D = !1, onClear: O, onValueChange: k, revealPassword: A = !1, showCounter: j = !1, startIcon: M, endIcon: N, startAddon: P, endAddon: F, prefix: L, suffix: z, clearIcon: B, mask: V, format: H, parse: ee, startIconTone: te = "default", endIconTone: ne = "default", clearIconTone: re = "danger", autoFocus: U, maxLength: ie, onMouseEnter: ae, onMouseLeave: oe, "aria-describedby": W, "aria-invalid": se, "aria-labelledby": ce, ...le }, ue) => {
1282
+ let de = s(), G = Ne(), K = !!(t || r || v), fe = e ?? (K ? void 0 : G?.controlId) ?? de, pe = l(null), [me, he] = u(!1), [ge, _e] = u(c ?? ""), ve = o !== void 0, ye = String((ve ? o : ge) ?? ""), be = H ? H(ye) : ye, xe = ye.length > 0, Se = f ?? G?.size ?? "md", Ce = y || !!v || !K && !!G?.invalid, we = b || !K && !!G?.disabled, Te = x || !K && !!G?.required, Ee = E || S, De = d === "password", Oe = De && A && me ? "text" : d, ke = M ?? (d === "search" ? /* @__PURE__ */ m(I, {}) : null), Ae = N, q = ut(d, T), je = S && !we, Me = D && xe && !we && !Ee && !je, J = A && De && !we && !je && !Me, Pe = !je && !Me && !J && !!Ae, Ie = !!(j && ie), Le = r ? `${fe}-description` : void 0, Re = v ? `${fe}-error` : void 0, ze = Ie ? `${fe}-counter` : void 0, Y = [
1283
+ W,
1284
+ !K && !W ? G?.ariaDescribedBy : void 0,
1285
+ Le,
1286
+ Re,
1287
+ ze
1288
+ ].filter(Boolean).join(" "), Be = B ?? "×", Ve = !!(ke || L), He = !!(Ae || z || Me || J || je), Ue = !!(ke && L), We = !!(Ae && z), Ge = !!(P || F), Ke = i((e) => {
1289
+ if (pe.current = e, typeof ue == "function") {
1290
+ ue(e);
1207
1291
  return;
1208
1292
  }
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
1293
+ ue && (ue.current = e);
1294
+ }, [ue]), qe = i((e) => {
1295
+ let t = ft(ee ? ee(e.target.value) : e.target.value, V);
1296
+ ve || _e(t), k?.(t);
1297
+ }, [
1298
+ ve,
1299
+ V,
1300
+ k,
1301
+ ee
1302
+ ]), Je = i(() => {
1303
+ ve || _e(""), k?.(""), O?.(), pe.current?.focus();
1304
+ }, [
1305
+ ve,
1306
+ O,
1307
+ k
1308
+ ]), Ye = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
1309
+ className: R(Q.inputGroup, Q[_], Q[g], {
1310
+ [Q.hasAddons]: Ge,
1311
+ [Q.isDisabled]: we,
1312
+ [Q.isInvalid]: Ce,
1313
+ [Q.isLoading]: je
1314
+ }),
1315
+ children: [
1316
+ P && /* @__PURE__ */ m("span", {
1317
+ className: Q.addon,
1318
+ children: P
1227
1319
  }),
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
1320
+ /* @__PURE__ */ h("div", {
1321
+ className: R(Q.inputWrapper, {
1322
+ [Q.hasLeftAdornment]: Ve,
1323
+ [Q.hasRightAdornment]: He,
1324
+ [Q.hasStartIconAndPrefix]: Ue,
1325
+ [Q.hasEndIconAndSuffix]: We
1254
1326
  }),
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
- })
1327
+ children: [
1328
+ ke && /* @__PURE__ */ m("span", {
1329
+ "aria-hidden": "true",
1330
+ className: R(Q.startAdornment, lt[te]),
1331
+ children: ke
1332
+ }),
1333
+ L && /* @__PURE__ */ m("span", {
1334
+ className: Q.prefix,
1335
+ children: L
1336
+ }),
1337
+ /* @__PURE__ */ m("input", {
1338
+ ...le,
1339
+ ref: Ke,
1340
+ id: fe,
1341
+ name: n,
1342
+ type: Oe,
1343
+ autoComplete: q,
1344
+ className: R(Q.input, Q[Se], { [Q.error]: Ce }, C),
1345
+ value: be,
1346
+ onChange: qe,
1347
+ placeholder: a,
1348
+ disabled: we,
1349
+ readOnly: Ee,
1350
+ required: Te,
1351
+ autoFocus: U,
1352
+ maxLength: ie,
1353
+ "aria-invalid": Ce ? !0 : se,
1354
+ "aria-labelledby": ce ?? (K ? void 0 : G?.ariaLabelledBy),
1355
+ "aria-describedby": Y || void 0,
1356
+ "aria-busy": S || void 0,
1357
+ onMouseEnter: ae,
1358
+ onMouseLeave: oe
1359
+ }),
1360
+ z && /* @__PURE__ */ m("span", {
1361
+ className: Q.suffix,
1362
+ children: z
1363
+ }),
1364
+ /* @__PURE__ */ h("div", {
1365
+ className: Q.endSlot,
1366
+ children: [
1367
+ je && /* @__PURE__ */ m("span", {
1368
+ className: Q.spinner,
1369
+ "aria-hidden": "true",
1370
+ "data-testid": "input-spinner"
1371
+ }),
1372
+ J && /* @__PURE__ */ m("button", {
1373
+ type: "button",
1374
+ className: Q.iconButton,
1375
+ onClick: () => he((e) => !e),
1376
+ "aria-label": me ? "Hide password" : "Show password",
1377
+ children: me ? "Hide" : "Show"
1378
+ }),
1379
+ Me && /* @__PURE__ */ m("button", {
1380
+ type: "button",
1381
+ className: R(Q.clearButton, lt[re]),
1382
+ onClick: Je,
1383
+ "aria-label": "Clear input",
1384
+ children: Be
1385
+ }),
1386
+ Pe && Ae && /* @__PURE__ */ m("span", {
1387
+ "aria-hidden": "true",
1388
+ className: R(Q.endAdornment, lt[ne]),
1389
+ children: Ae
1390
+ })
1391
+ ]
1392
+ })
1393
+ ]
1394
+ }),
1395
+ F && /* @__PURE__ */ m("span", {
1396
+ className: Q.addon,
1397
+ children: F
1398
+ })
1399
+ ]
1400
+ }), Ie && /* @__PURE__ */ h("div", {
1401
+ id: ze,
1402
+ className: Q.counter,
1403
+ children: [
1404
+ ye.length,
1405
+ " / ",
1406
+ ie
1407
+ ]
1408
+ })] });
1409
+ return !K && G ? Ye : /* @__PURE__ */ m(Fe, {
1410
+ id: fe,
1411
+ label: t,
1412
+ description: r,
1413
+ error: v,
1414
+ required: Te,
1415
+ disabled: we,
1416
+ invalid: Ce,
1417
+ size: Se,
1418
+ className: w,
1419
+ bindControl: !1,
1420
+ children: Ye
1268
1421
  });
1269
1422
  });
1270
- st.displayName = "Input";
1423
+ pt.displayName = "Input";
1271
1424
  var $ = {
1272
1425
  root: "_root_qb9nm_1",
1273
1426
  invalid: "_invalid_qb9nm_27",
@@ -1289,14 +1442,14 @@ var $ = {
1289
1442
  customIcon: "_customIcon_qb9nm_216",
1290
1443
  content: "_content_qb9nm_335",
1291
1444
  error: "_error_qb9nm_352"
1292
- }, ct = {
1445
+ }, mt = {
1293
1446
  primary: $.colorPrimary,
1294
1447
  neutral: $.colorNeutral,
1295
1448
  success: $.colorSuccess,
1296
1449
  warning: $.colorWarning,
1297
1450
  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 = [
1451
+ }, ht = n(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, color: o, error: c, onCheckedChange: l, label: u, description: d, icon: f, wrapperClassName: p, className: g, id: _, name: v, "aria-describedby": y, ...b }, x) => {
1452
+ let S = Ae(), C = s(), w = _ ?? C, T = d ? `${w}-description` : void 0, E = c ? `${w}-error` : void 0, O = [
1300
1453
  T,
1301
1454
  E,
1302
1455
  S?.describedBy,
@@ -1305,7 +1458,7 @@ var $ = {
1305
1458
  value: t,
1306
1459
  defaultValue: n,
1307
1460
  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) => {
1461
+ }), M = k ? S.value === e : A, N = !!S?.disabled || r, P = !!S?.required || i, F = S?.name ?? v, I = !!(c || S?.invalid), L = a ?? S?.size ?? "md", z = o ?? S?.color ?? "primary", B = (t) => {
1309
1462
  if (!N) {
1310
1463
  if (k) {
1311
1464
  S.onValueChange(e);
@@ -1315,10 +1468,10 @@ var $ = {
1315
1468
  }
1316
1469
  };
1317
1470
  return /* @__PURE__ */ h("div", {
1318
- className: L($.root, $[R], I && $.invalid, N && $.disabled, ct[z], g),
1471
+ className: R($.root, $[L], I && $.invalid, N && $.disabled, mt[z], g),
1319
1472
  children: [/* @__PURE__ */ h("label", {
1320
1473
  htmlFor: w,
1321
- className: L($.wrapper, p),
1474
+ className: R($.wrapper, p),
1322
1475
  children: [
1323
1476
  /* @__PURE__ */ m("input", {
1324
1477
  ...b,
@@ -1339,7 +1492,7 @@ var $ = {
1339
1492
  className: $.control,
1340
1493
  "aria-hidden": "true",
1341
1494
  children: /* @__PURE__ */ m("span", {
1342
- className: L($.indicator, f && $.customIcon),
1495
+ className: R($.indicator, f && $.customIcon),
1343
1496
  children: f
1344
1497
  })
1345
1498
  }),
@@ -1362,15 +1515,15 @@ var $ = {
1362
1515
  })]
1363
1516
  });
1364
1517
  });
1365
- lt.displayName = "Radio";
1518
+ ht.displayName = "Radio";
1366
1519
  //#endregion
1367
1520
  //#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 }) => {
1521
+ var gt = t(null), _t = (e) => e === "highContrast" ? "high-contrast" : e, vt = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
1369
1522
  let [i, a] = D({
1370
1523
  value: e,
1371
1524
  defaultValue: t,
1372
1525
  onChange: n
1373
- }), s = dt(i);
1526
+ }), s = _t(i);
1374
1527
  o(() => {
1375
1528
  if (typeof document > "u") return;
1376
1529
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
@@ -1386,7 +1539,7 @@ var ut = t(null), dt = (e) => e === "highContrast" ? "high-contrast" : e, ft = (
1386
1539
  theme: i,
1387
1540
  setTheme: a
1388
1541
  }), [i, a]);
1389
- return /* @__PURE__ */ m(ut.Provider, {
1542
+ return /* @__PURE__ */ m(gt.Provider, {
1390
1543
  value: l,
1391
1544
  children: /* @__PURE__ */ m("div", {
1392
1545
  "data-vellira-theme": s,
@@ -1394,13 +1547,13 @@ var ut = t(null), dt = (e) => e === "highContrast" ? "high-contrast" : e, ft = (
1394
1547
  })
1395
1548
  });
1396
1549
  };
1397
- ft.displayName = "ThemeProvider";
1550
+ vt.displayName = "ThemeProvider";
1398
1551
  //#endregion
1399
1552
  //#region src/theme/useTheme.ts
1400
- function pt() {
1401
- let e = a(ut);
1553
+ function yt() {
1554
+ let e = a(gt);
1402
1555
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
1403
1556
  return e;
1404
1557
  }
1405
1558
  //#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 };
1559
+ export { rt as Button, ct as Checkbox, G as Dropdown, Fe as FormField, pt as Input, De as Modal, ht as Radio, je as RadioGroup, Ve as Select, Qe as Tabs, vt as ThemeProvider, tt as Tooltip, yt as useTheme };