@vellira-ui/react 2.42.0 → 2.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -281,14 +281,14 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
281
281
  "input:not([disabled])",
282
282
  "select:not([disabled])",
283
283
  "[tabindex]:not([tabindex=\"-1\"])"
284
- ].join(","), oe = (e) => Array.from(e.querySelectorAll(ae)).filter((e) => !e.hasAttribute("disabled")), se = (e) => {
284
+ ].join(","), oe = (e) => Array.from(e.querySelectorAll(ae)).filter((e) => !e.hasAttribute("disabled")), V = (e) => {
285
285
  (oe(e)[0] ?? e).focus();
286
- }, ce = ({ active: e, contentRef: t, enabled: n, initialFocus: r, finalFocus: i, restoreFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s }) => {
286
+ }, se = ({ active: e, contentRef: t, enabled: n, initialFocus: r, finalFocus: i, restoreFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s }) => {
287
287
  f(() => {
288
288
  if (!e) return;
289
289
  let n = document.activeElement, c = i?.current, l = re();
290
290
  return o?.(l), l.defaultPrevented || queueMicrotask(() => {
291
- r?.current?.focus(), !r?.current && t.current && se(t.current);
291
+ r?.current?.focus(), !r?.current && t.current && V(t.current);
292
292
  }), () => {
293
293
  let e = re();
294
294
  s?.(e), !(e.defaultPrevented || !a) && queueMicrotask(() => {
@@ -331,7 +331,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
331
331
  t,
332
332
  n
333
333
  ]);
334
- }, le = ({ active: e, contentRef: t, ignoreRefs: n = [], closeOnEscape: r, closeOnOutsidePress: i, isTopOverlay: a, onEscapeKeyDown: o, onPointerDownOutside: s, onInteractOutside: c, requestClose: l }) => {
334
+ }, ce = ({ active: e, contentRef: t, ignoreRefs: n = [], closeOnEscape: r, closeOnOutsidePress: i, isTopOverlay: a, onEscapeKeyDown: o, onPointerDownOutside: s, onInteractOutside: c, requestClose: l }) => {
335
335
  let u = g(n);
336
336
  u.current = n, f(() => {
337
337
  if (!e) return;
@@ -366,44 +366,44 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
366
366
  s,
367
367
  l
368
368
  ]);
369
- }, V = [], ue = {
369
+ }, le = [], ue = {
370
370
  add(e) {
371
- V = V.filter((t) => t !== e), V.push(e);
371
+ le = le.filter((t) => t !== e), le.push(e);
372
372
  },
373
373
  remove(e) {
374
- V = V.filter((t) => t !== e);
374
+ le = le.filter((t) => t !== e);
375
375
  },
376
376
  isTop(e) {
377
- return V[V.length - 1] === e;
377
+ return le[le.length - 1] === e;
378
378
  }
379
379
  }, de = ({ active: e, id: t }) => (f(() => {
380
380
  if (e) return ue.add(t), () => {
381
381
  ue.remove(t);
382
382
  };
383
- }, [e, t]), { isTopOverlay: u(() => ue.isTop(t), [t]) }), fe = 0, pe = "", me = {
383
+ }, [e, t]), { isTopOverlay: u(() => ue.isTop(t), [t]) }), H = 0, fe = "", pe = {
384
384
  lock() {
385
- typeof document > "u" || (fe === 0 && (pe = document.body.style.overflow, document.body.style.overflow = "hidden"), fe += 1);
385
+ typeof document > "u" || (H === 0 && (fe = document.body.style.overflow, document.body.style.overflow = "hidden"), H += 1);
386
386
  },
387
387
  unlock() {
388
- typeof document > "u" || (fe = Math.max(0, fe - 1), fe === 0 && (document.body.style.overflow = pe));
388
+ typeof document > "u" || (H = Math.max(0, H - 1), H === 0 && (document.body.style.overflow = fe));
389
389
  }
390
- }, he = ({ active: e, enabled: t = !0 }) => {
390
+ }, me = ({ active: e, enabled: t = !0 }) => {
391
391
  f(() => {
392
- if (!(!e || !t)) return me.lock(), () => {
393
- me.unlock();
392
+ if (!(!e || !t)) return pe.lock(), () => {
393
+ pe.unlock();
394
394
  };
395
395
  }, [e, t]);
396
- }, H = () => typeof document > "u" ? null : document.body, ge = ({ container: e } = {}) => {
396
+ }, he = () => typeof document > "u" ? null : document.body, ge = ({ container: e } = {}) => {
397
397
  let [t, n] = _(!1);
398
398
  return f(() => {
399
399
  n(!0);
400
- }, []), t ? e ?? document.getElementById("overlay-root") ?? H() : null;
401
- }, _e = ({ value: e, defaultValue: t, onChange: n }) => {
400
+ }, []), t ? e ?? document.getElementById("overlay-root") ?? he() : null;
401
+ }, U = ({ value: e, defaultValue: t, onChange: n }) => {
402
402
  let [r, i] = _(t), a = e !== void 0;
403
403
  return [a ? e : r, u((e) => {
404
404
  a || i(e), n?.(e);
405
405
  }, [a, n])];
406
- }, ve = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: o, getItemText: s, loop: c = !0 }) => {
406
+ }, _e = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: o, getItemText: s, loop: c = !0 }) => {
407
407
  let l = g({
408
408
  value: "",
409
409
  timeoutId: void 0
@@ -486,7 +486,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
486
486
  m,
487
487
  h
488
488
  ]) };
489
- }, ye = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: o, getItemText: s, loop: c = !0 }) => {
489
+ }, ve = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: o, getItemText: s, loop: c = !0 }) => {
490
490
  let [l, d] = _(n), [p, m] = _(-1), h = t !== void 0, g = t ?? l, v = u(() => e.findIndex((e) => !e.disabled), [e]), y = u(() => {
491
491
  for (let t = e.length - 1; t >= 0; t--) if (!e[t]?.disabled) return t;
492
492
  return -1;
@@ -541,7 +541,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
541
541
  p,
542
542
  e,
543
543
  T
544
- ]), { onKeyDown: D } = ve({
544
+ ]), { onKeyDown: D } = _e({
545
545
  activeIndex: p,
546
546
  setActiveIndex: m,
547
547
  items: e,
@@ -570,8 +570,8 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
570
570
  getFirstEnabledIndex: v,
571
571
  getLastEnabledIndex: y
572
572
  };
573
- }, be = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
574
- let a = p(), o = p(), s = p(), [c, l] = _e({
573
+ }, ye = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
574
+ let a = p(), o = p(), s = p(), [c, l] = U({
575
575
  value: e,
576
576
  defaultValue: t,
577
577
  onChange: n
@@ -589,12 +589,12 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
589
589
  titleId: o,
590
590
  descriptionId: s
591
591
  };
592
- }, xe = ({ value: e, defaultValue: t, onValueChange: n, onChange: r, options: i, multiple: a = !1, maxSelected: o, closeOnSelect: s = !a, disabled: c = !1, open: l, defaultOpen: d = !1, onOpenChange: p }) => {
593
- let [m, g] = _e({
592
+ }, be = ({ value: e, defaultValue: t, onValueChange: n, onChange: r, options: i, multiple: a = !1, maxSelected: o, closeOnSelect: s = !a, disabled: c = !1, open: l, defaultOpen: d = !1, onOpenChange: p }) => {
593
+ let [m, g] = U({
594
594
  value: e,
595
595
  defaultValue: t ?? (a ? [] : ""),
596
596
  onChange: n ?? r
597
- }), [v, y] = _e({
597
+ }), [v, y] = U({
598
598
  value: l,
599
599
  defaultValue: d,
600
600
  onChange: p
@@ -663,7 +663,7 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
663
663
  b,
664
664
  i,
665
665
  k
666
- ]), { onKeyDown: j } = ve({
666
+ ]), { onKeyDown: j } = _e({
667
667
  activeIndex: b,
668
668
  setActiveIndex: x,
669
669
  items: i,
@@ -693,8 +693,8 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
693
693
  selectActiveOption: A,
694
694
  onKeyDown: j
695
695
  };
696
- }, U = ({ value: e, defaultValue: t = "", onValueChange: n }) => {
697
- let [r, i] = _e({
696
+ }, W = ({ value: e, defaultValue: t = "", onValueChange: n }) => {
697
+ let [r, i] = U({
698
698
  value: e,
699
699
  defaultValue: t,
700
700
  onChange: n
@@ -703,15 +703,15 @@ var te = L("checkboxItem", "Dropdown.CheckboxItem"), ne = ({ active: e, enabled:
703
703
  value: r,
704
704
  setValue: i
705
705
  };
706
- }, Se = s(null), Ce = ({ children: e, container: t = null }) => /* @__PURE__ */ n(Se.Provider, {
706
+ }, xe = s(null), Se = ({ children: e, container: t = null }) => /* @__PURE__ */ n(xe.Provider, {
707
707
  value: t,
708
708
  children: e
709
- }), we = ({ children: e, container: t }) => {
710
- let n = d(Se), r = ge({ container: t ?? n });
709
+ }), Ce = ({ children: e, container: t }) => {
710
+ let n = d(xe), r = ge({ container: t ?? n });
711
711
  return r ? v(e, r) : null;
712
712
  };
713
- we.__velliraPortal = !0, we.displayName = "Portal", Ce.displayName = "PortalProvider";
714
- var Te = {
713
+ Ce.__velliraPortal = !0, Ce.displayName = "Portal", Se.displayName = "PortalProvider";
714
+ var we = {
715
715
  dropdown: "_dropdown_m7rnq_1",
716
716
  "dropdown-in": "_dropdown-in_m7rnq_1",
717
717
  primary: "_primary_m7rnq_42",
@@ -723,57 +723,57 @@ var Te = {
723
723
  searchWrap: "_searchWrap_m7rnq_165",
724
724
  search: "_search_m7rnq_165",
725
725
  "dropdown-sheet-in": "_dropdown-sheet-in_m7rnq_1"
726
- }, Ee = L("empty", "Dropdown.Empty"), De = ({ children: e }) => /* @__PURE__ */ n("li", {
726
+ }, Te = L("empty", "Dropdown.Empty"), Ee = ({ children: e }) => /* @__PURE__ */ n("li", {
727
727
  role: "presentation",
728
- className: Te.empty,
728
+ className: we.empty,
729
729
  children: e ?? "No actions available"
730
730
  });
731
- De.displayName = "DropdownEmptySurface";
731
+ Ee.displayName = "DropdownEmptySurface";
732
732
  //#endregion
733
733
  //#region src/components/Dropdown/Group/DropdownGroup.tsx
734
- var Oe = L("group", "Dropdown.Group"), ke = () => null;
735
- ke.displayName = "DropdownGroupSurface";
734
+ var De = L("group", "Dropdown.Group"), Oe = () => null;
735
+ Oe.displayName = "DropdownGroupSurface";
736
736
  //#endregion
737
737
  //#region src/components/Dropdown/internal/DropdownContext.tsx
738
- var Ae = s(null), je = s(null), Me = s(null), Ne = Ae.Provider, Pe = je.Provider;
739
- Me.Provider;
740
- function W() {
741
- let e = d(Ae);
738
+ var ke = s(null), Ae = s(null), je = s(null), Me = ke.Provider, Ne = Ae.Provider;
739
+ je.Provider;
740
+ function G() {
741
+ let e = d(ke);
742
742
  if (!e) throw Error("Dropdown compound components must be used inside Dropdown.");
743
743
  return e;
744
744
  }
745
- function Fe() {
746
- let e = d(je);
745
+ function Pe() {
746
+ let e = d(Ae);
747
747
  if (!e) throw Error("Dropdown.Trigger must be used inside Dropdown.");
748
748
  return e;
749
749
  }
750
- var G = {
751
- item: "_item_1vj4n_1",
752
- disabled: "_disabled_1vj4n_22",
753
- active: "_active_1vj4n_37",
754
- itemShortcut: "_itemShortcut_1vj4n_44",
755
- itemDescription: "_itemDescription_1vj4n_45",
756
- primary: "_primary_1vj4n_53",
757
- success: "_success_1vj4n_71",
758
- warning: "_warning_1vj4n_89",
759
- danger: "_danger_1vj4n_107",
760
- itemIcon: "_itemIcon_1vj4n_131",
761
- sm: "_sm_1vj4n_151",
762
- md: "_md_1vj4n_157",
763
- lg: "_lg_1vj4n_161",
764
- itemText: "_itemText_1vj4n_168",
765
- itemLabel: "_itemLabel_1vj4n_177",
766
- itemBadge: "_itemBadge_1vj4n_203",
767
- indicator: "_indicator_1vj4n_230",
768
- "dropdown-indicator-in": "_dropdown-indicator-in_1vj4n_1",
769
- checked: "_checked_1vj4n_246",
770
- "dropdown-item-pop": "_dropdown-item-pop_1vj4n_1",
771
- subContent: "_subContent_1vj4n_251",
772
- "dropdown-sub-in": "_dropdown-sub-in_1vj4n_1",
773
- subLabel: "_subLabel_1vj4n_276",
774
- subSeparator: "_subSeparator_1vj4n_284"
775
- }, Ie = L("item", "Dropdown.Item"), Le = ({ item: e, itemIndex: i }) => {
776
- let a = W(), o = g(void 0), [s, c] = _(e.type === "checkbox" ? e.props.defaultChecked ?? !1 : !1), l = a.activeIndex === i, u = a.openSubId === e.id, d = e.type === "checkbox", f = e.type === "radio", p = e.type === "subTrigger", m = d ? e.props.checked ?? s : f ? (e.groupProps?.value ?? a.radioValues[e.groupId]) === e.props.value : !1, h = a.loading || e.disabled, v = e.props, b = z(v.children), S = b.icon ?? v.icon, C = b.description ?? ("description" in v ? v.description : void 0), w = b.badge ?? ("badge" in v ? v.badge : void 0), T = b.shortcut ?? v.shortcut, E = b.content.length ? b.content : v.children, D = "color" in v ? v.color : void 0, O = e.type === "item" ? e.props.href : void 0, k = e.type === "item" ? e.props.target : void 0, A = e.type === "item" ? e.props.download : void 0, j = a.getItemId(i), M = d ? "menuitemcheckbox" : f ? "menuitemradio" : "menuitem", N = e.type === "item" && k === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, F = O ? "a" : "li", I = d || f, L = (t) => {
750
+ var K = {
751
+ item: "_item_xmygj_1",
752
+ disabled: "_disabled_xmygj_35",
753
+ active: "_active_xmygj_53",
754
+ itemShortcut: "_itemShortcut_xmygj_67",
755
+ itemDescription: "_itemDescription_xmygj_68",
756
+ primary: "_primary_xmygj_76",
757
+ success: "_success_xmygj_94",
758
+ warning: "_warning_xmygj_112",
759
+ danger: "_danger_xmygj_130",
760
+ itemIcon: "_itemIcon_xmygj_154",
761
+ sm: "_sm_xmygj_174",
762
+ md: "_md_xmygj_180",
763
+ lg: "_lg_xmygj_184",
764
+ itemText: "_itemText_xmygj_191",
765
+ itemLabel: "_itemLabel_xmygj_200",
766
+ itemBadge: "_itemBadge_xmygj_226",
767
+ indicator: "_indicator_xmygj_253",
768
+ "dropdown-indicator-in": "_dropdown-indicator-in_xmygj_1",
769
+ checked: "_checked_xmygj_270",
770
+ "dropdown-item-pop": "_dropdown-item-pop_xmygj_1",
771
+ subContent: "_subContent_xmygj_275",
772
+ "dropdown-sub-in": "_dropdown-sub-in_xmygj_1",
773
+ subLabel: "_subLabel_xmygj_300",
774
+ subSeparator: "_subSeparator_xmygj_308"
775
+ }, Fe = L("item", "Dropdown.Item"), Ie = ({ item: e, itemIndex: i }) => {
776
+ let a = G(), o = g(void 0), [s, c] = _(e.type === "checkbox" ? e.props.defaultChecked ?? !1 : !1), l = a.activeIndex === i, u = a.openSubId === e.id, d = e.type === "checkbox", f = e.type === "radio", p = e.type === "subTrigger", m = d ? e.props.checked ?? s : f ? (e.groupProps?.value ?? a.radioValues[e.groupId]) === e.props.value : !1, h = a.loading || e.disabled, v = e.props, b = z(v.children), S = b.icon ?? v.icon, C = b.description ?? ("description" in v ? v.description : void 0), w = b.badge ?? ("badge" in v ? v.badge : void 0), T = b.shortcut ?? v.shortcut, E = b.content.length ? b.content : v.children, D = "color" in v ? v.color : void 0, O = e.type === "item" ? e.props.href : void 0, k = e.type === "item" ? e.props.target : void 0, A = e.type === "item" ? e.props.download : void 0, j = a.getItemId(i), M = d ? "menuitemcheckbox" : f ? "menuitemradio" : "menuitem", N = e.type === "item" && k === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, F = O ? "a" : "li", I = d || f, L = (t) => {
777
777
  if (h) {
778
778
  t.preventDefault();
779
779
  return;
@@ -782,7 +782,7 @@ var G = {
782
782
  let t = !m;
783
783
  c(t), e.props.onCheckedChange?.(t);
784
784
  }
785
- a.selectItem(e, Re(t));
785
+ a.selectItem(e, Le(t));
786
786
  };
787
787
  return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r(F, {
788
788
  id: j,
@@ -798,11 +798,11 @@ var G = {
798
798
  "aria-expanded": p ? u : void 0,
799
799
  "data-active": l || void 0,
800
800
  "data-state": u ? "open" : void 0,
801
- className: P(G.item, G[a.size], {
802
- [G.active]: l,
803
- [G.disabled]: h,
804
- [G.checked]: m
805
- }, D && D !== "default" ? G[D] : void 0, v.className),
801
+ className: P(K.item, K[a.size], {
802
+ [K.active]: l,
803
+ [K.disabled]: h,
804
+ [K.checked]: m
805
+ }, D && D !== "default" ? K[D] : void 0, v.className),
806
806
  onClick: L,
807
807
  onMouseEnter: () => {
808
808
  h || (a.setActiveIndex(i), p ? (window.clearTimeout(o.current), o.current = window.setTimeout(() => a.setOpenSubId(e.id), 120)) : (window.clearTimeout(o.current), a.setOpenSubId(void 0)));
@@ -811,59 +811,59 @@ var G = {
811
811
  window.clearTimeout(o.current);
812
812
  },
813
813
  children: [
814
- I && /* @__PURE__ */ n("span", {
815
- className: G.indicator,
816
- "aria-hidden": "true",
817
- children: m ? /* @__PURE__ */ n(y, {}) : null
818
- }),
819
814
  S && /* @__PURE__ */ n("span", {
820
- className: G.itemIcon,
815
+ className: K.itemIcon,
821
816
  children: S
822
817
  }),
823
818
  /* @__PURE__ */ r("span", {
824
- className: G.itemText,
819
+ className: K.itemText,
825
820
  children: [/* @__PURE__ */ n("span", {
826
- className: G.itemLabel,
821
+ className: K.itemLabel,
827
822
  children: E
828
823
  }), C && /* @__PURE__ */ n("span", {
829
- className: G.itemDescription,
824
+ className: K.itemDescription,
830
825
  children: C
831
826
  })]
832
827
  }),
833
828
  w && /* @__PURE__ */ n("span", {
834
- className: G.itemBadge,
829
+ className: K.itemBadge,
835
830
  children: w
836
831
  }),
837
832
  T && /* @__PURE__ */ n("span", {
838
- className: G.itemShortcut,
833
+ className: K.itemShortcut,
839
834
  children: T
840
835
  }),
836
+ I && /* @__PURE__ */ n("span", {
837
+ className: K.indicator,
838
+ "aria-hidden": "true",
839
+ children: m ? /* @__PURE__ */ n(y, {}) : null
840
+ }),
841
841
  p && /* @__PURE__ */ n("span", {
842
- className: G.itemShortcut,
842
+ className: K.itemShortcut,
843
843
  "aria-hidden": "true",
844
844
  children: /* @__PURE__ */ n(x, {})
845
845
  })
846
846
  ]
847
847
  }), p && u && e.subEntries.length > 0 && /* @__PURE__ */ n("ul", {
848
848
  role: "menu",
849
- className: G.subContent,
849
+ className: K.subContent,
850
850
  onMouseEnter: () => a.setOpenSubId(e.id),
851
851
  children: e.subEntries.map((e) => e.type === "label" ? /* @__PURE__ */ n("li", {
852
852
  role: "presentation",
853
- className: G.subLabel,
853
+ className: K.subLabel,
854
854
  children: e.props.children
855
855
  }, e.id) : e.type === "separator" ? /* @__PURE__ */ n("li", {
856
856
  role: "separator",
857
- className: G.subSeparator,
857
+ className: K.subSeparator,
858
858
  "aria-hidden": "true"
859
- }, e.id) : e.type === "item" ? /* @__PURE__ */ n(ze, {
859
+ }, e.id) : e.type === "item" ? /* @__PURE__ */ n(Re, {
860
860
  item: e.item,
861
861
  id: `${j}-${e.itemIndex}`
862
862
  }, e.item.id) : null)
863
863
  })] });
864
864
  };
865
- Le.displayName = "DropdownItemRow";
866
- function Re(e) {
865
+ Ie.displayName = "DropdownItemRow";
866
+ function Le(e) {
867
867
  let t = !1;
868
868
  return {
869
869
  originalEvent: e,
@@ -875,8 +875,8 @@ function Re(e) {
875
875
  }
876
876
  };
877
877
  }
878
- function ze({ id: e, item: t }) {
879
- let i = W(), [a, o] = _(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), s = t.type === "checkbox", c = t.type === "radio", l = s ? t.props.checked ?? a : c ? (t.groupProps?.value ?? i.radioValues[t.groupId]) === t.props.value : !1, u = t.props, d = z(u.children), f = d.icon ?? u.icon, p = d.description ?? ("description" in u ? u.description : void 0), m = d.badge ?? ("badge" in u ? u.badge : void 0), h = d.shortcut ?? u.shortcut, g = d.content.length ? d.content : u.children, v = "color" in u ? u.color : void 0, b = i.loading || t.disabled, x = t.type === "item" ? t.props.href : void 0, S = t.type === "item" ? t.props.target : void 0, C = t.type === "item" ? t.props.download : void 0, w = s ? "menuitemcheckbox" : c ? "menuitemradio" : "menuitem", T = t.type === "item" && S === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, E = x ? "a" : "li", D = s || c, O = (e) => {
878
+ function Re({ id: e, item: t }) {
879
+ let i = G(), [a, o] = _(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), s = t.type === "checkbox", c = t.type === "radio", l = s ? t.props.checked ?? a : c ? (t.groupProps?.value ?? i.radioValues[t.groupId]) === t.props.value : !1, u = t.props, d = z(u.children), f = d.icon ?? u.icon, p = d.description ?? ("description" in u ? u.description : void 0), m = d.badge ?? ("badge" in u ? u.badge : void 0), h = d.shortcut ?? u.shortcut, g = d.content.length ? d.content : u.children, v = "color" in u ? u.color : void 0, b = i.loading || t.disabled, x = t.type === "item" ? t.props.href : void 0, S = t.type === "item" ? t.props.target : void 0, C = t.type === "item" ? t.props.download : void 0, w = s ? "menuitemcheckbox" : c ? "menuitemradio" : "menuitem", T = t.type === "item" && S === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, E = x ? "a" : "li", D = s || c, O = (e) => {
880
880
  if (b) {
881
881
  e.preventDefault();
882
882
  return;
@@ -885,7 +885,7 @@ function ze({ id: e, item: t }) {
885
885
  let e = !l;
886
886
  o(e), t.props.onCheckedChange?.(e);
887
887
  }
888
- i.selectItem(t, Re(e));
888
+ i.selectItem(t, Le(e));
889
889
  };
890
890
  return /* @__PURE__ */ r(E, {
891
891
  id: e,
@@ -897,54 +897,54 @@ function ze({ id: e, item: t }) {
897
897
  tabIndex: b ? -1 : 0,
898
898
  "aria-disabled": b || void 0,
899
899
  "aria-checked": s || c ? l : void 0,
900
- className: P(G.item, G[i.size], {
901
- [G.disabled]: b,
902
- [G.checked]: l
903
- }, v && v !== "default" ? G[v] : void 0),
900
+ className: P(K.item, K[i.size], {
901
+ [K.disabled]: b,
902
+ [K.checked]: l
903
+ }, v && v !== "default" ? K[v] : void 0),
904
904
  onClick: O,
905
905
  children: [
906
906
  D && /* @__PURE__ */ n("span", {
907
- className: G.indicator,
907
+ className: K.indicator,
908
908
  "aria-hidden": "true",
909
909
  children: l ? /* @__PURE__ */ n(y, {}) : null
910
910
  }),
911
911
  f && /* @__PURE__ */ n("span", {
912
- className: G.itemIcon,
912
+ className: K.itemIcon,
913
913
  children: f
914
914
  }),
915
915
  /* @__PURE__ */ r("span", {
916
- className: G.itemText,
916
+ className: K.itemText,
917
917
  children: [/* @__PURE__ */ n("span", {
918
- className: G.itemLabel,
918
+ className: K.itemLabel,
919
919
  children: g
920
920
  }), p && /* @__PURE__ */ n("span", {
921
- className: G.itemDescription,
921
+ className: K.itemDescription,
922
922
  children: p
923
923
  })]
924
924
  }),
925
925
  m && /* @__PURE__ */ n("span", {
926
- className: G.itemBadge,
926
+ className: K.itemBadge,
927
927
  children: m
928
928
  }),
929
929
  h && /* @__PURE__ */ n("span", {
930
- className: G.itemShortcut,
930
+ className: K.itemShortcut,
931
931
  children: h
932
932
  })
933
933
  ]
934
934
  });
935
935
  }
936
- var Be = { group: "_group_aviwv_1" }, Ve = L("label", "Dropdown.Label"), K = ({ children: e, className: t }) => /* @__PURE__ */ n("li", {
936
+ var ze = { group: "_group_aviwv_1" }, Be = L("label", "Dropdown.Label"), Ve = ({ children: e, className: t }) => /* @__PURE__ */ n("li", {
937
937
  role: "presentation",
938
- className: P(Be.group, t),
938
+ className: P(ze.group, t),
939
939
  children: e
940
940
  });
941
- K.displayName = "DropdownLabelSurface";
941
+ Ve.displayName = "DropdownLabelSurface";
942
942
  //#endregion
943
943
  //#region src/components/Dropdown/Loading/DropdownLoading.tsx
944
944
  var q = L("loading", "Dropdown.Loading"), He = ({ children: e }) => /* @__PURE__ */ n("li", {
945
945
  role: "presentation",
946
946
  "aria-live": "polite",
947
- className: Te.empty,
947
+ className: we.empty,
948
948
  children: e ?? "Loading actions..."
949
949
  });
950
950
  He.displayName = "DropdownLoadingSurface";
@@ -957,12 +957,18 @@ Ge.displayName = "DropdownSeparatorSurface";
957
957
  //#endregion
958
958
  //#region src/components/Dropdown/Content/DropdownContent.tsx
959
959
  var Ke = ({ className: e }) => {
960
- let t = W();
961
- if (!t.isOpen) return null;
962
- let i = P(Te.dropdown, Te[t.color], t.contentProps?.className, e), o = /* @__PURE__ */ r("ul", {
963
- ref: t.setContentRef,
960
+ let t = G(), { contentReadyToFocus: i, isOpen: o, setContentRef: s } = t, c = g(null), l = u((e) => {
961
+ c.current = e, s(e);
962
+ }, [s]);
963
+ if (f(() => {
964
+ let e = c.current;
965
+ !o || !i || !e || e.contains(document.activeElement) || e.focus({ preventScroll: !0 });
966
+ }, [i, o]), !o) return null;
967
+ let d = P(we.dropdown, we[t.color], t.contentProps?.className, e), p = /* @__PURE__ */ r("ul", {
968
+ ref: l,
964
969
  id: t.contentId,
965
970
  role: "menu",
971
+ autoFocus: !0,
966
972
  tabIndex: -1,
967
973
  "aria-labelledby": t.triggerId,
968
974
  "aria-activedescendant": t.activeIndex >= 0 && t.activeIndex < t.items.length ? t.getItemId(t.activeIndex) : void 0,
@@ -971,13 +977,13 @@ var Ke = ({ className: e }) => {
971
977
  ...t.surfaceStyle,
972
978
  ...t.contentProps?.style
973
979
  },
974
- className: i,
980
+ className: d,
975
981
  "data-color": t.color,
976
982
  children: [t.searchable && /* @__PURE__ */ r("li", {
977
983
  role: "presentation",
978
- className: P(Te.searchWrap, t.searchProps?.className),
984
+ className: P(we.searchWrap, t.searchProps?.className),
979
985
  children: [/* @__PURE__ */ n(C, { "aria-hidden": "true" }), /* @__PURE__ */ n("input", {
980
- className: Te.search,
986
+ className: we.search,
981
987
  value: t.searchValue,
982
988
  placeholder: t.searchPlaceholder,
983
989
  "aria-label": t.searchProps?.["aria-label"] ?? t.searchPlaceholder,
@@ -987,12 +993,12 @@ var Ke = ({ className: e }) => {
987
993
  e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === "Escape" || e.stopPropagation();
988
994
  }
989
995
  })]
990
- }), t.loading ? /* @__PURE__ */ n(He, { children: t.loadingText }) : t.searchable && t.items.length === 0 ? /* @__PURE__ */ n(De, { children: t.noOptionsText }) : t.entries.length ? t.entries.map((e) => e.type === "groupStart" ? /* @__PURE__ */ n(ke, {}, e.id) : e.type === "groupEnd" ? null : e.type === "label" ? /* @__PURE__ */ n(K, { ...e.props }, e.id) : e.type === "separator" ? /* @__PURE__ */ n(Ge, { ...e.props }, e.id) : e.type === "empty" ? /* @__PURE__ */ n(De, { children: e.props.children }, e.id) : e.type === "loading" ? /* @__PURE__ */ n(He, { children: e.props.children }, e.id) : e.type === "arrow" ? /* @__PURE__ */ n(I, { ...e.props }, e.id) : /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(Le, {
996
+ }), t.loading ? /* @__PURE__ */ n(He, { children: t.loadingText }) : t.searchable && t.items.length === 0 ? /* @__PURE__ */ n(Ee, { children: t.noOptionsText }) : t.entries.length ? t.entries.map((e) => e.type === "groupStart" ? /* @__PURE__ */ n(Oe, {}, e.id) : e.type === "groupEnd" ? null : e.type === "label" ? /* @__PURE__ */ n(Ve, { ...e.props }, e.id) : e.type === "separator" ? /* @__PURE__ */ n(Ge, { ...e.props }, e.id) : e.type === "empty" ? /* @__PURE__ */ n(Ee, { children: e.props.children }, e.id) : e.type === "loading" ? /* @__PURE__ */ n(He, { children: e.props.children }, e.id) : e.type === "arrow" ? /* @__PURE__ */ n(I, { ...e.props }, e.id) : /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(Ie, {
991
997
  item: e.item,
992
998
  itemIndex: e.itemIndex
993
- }) }, e.item.id)) : /* @__PURE__ */ n(De, {})]
999
+ }) }, e.item.id)) : /* @__PURE__ */ n(Ee, {})]
994
1000
  });
995
- return t.portal ? /* @__PURE__ */ n(we, { children: o }) : o;
1001
+ return t.portal ? /* @__PURE__ */ n(Ce, { children: p }) : p;
996
1002
  };
997
1003
  Ke.__velliraDropdownPart = "content", Ke.displayName = "Dropdown.Content";
998
1004
  //#endregion
@@ -1006,8 +1012,8 @@ var qe = L("itemBadge", "Dropdown.ItemBadge"), Je = L("itemDescription", "Dropdo
1006
1012
  t.removeEventListener("change", r);
1007
1013
  };
1008
1014
  }, [e]), t;
1009
- }, et = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", offset: i = 2, matchTriggerWidth: a = !1, avoidCollisions: o = !0, mobileSheetBreakpoint: s, middleware: c = [] } = {}) => {
1010
- let l = $e(s), { refs: u, floatingStyles: d, update: p, context: m, middlewareData: g, placement: _ } = A({
1015
+ }, et = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", offset: i = 2, collisionPadding: a = 8, matchTriggerWidth: o = !1, avoidCollisions: s = !0, mobileSheetBreakpoint: c, middleware: l = [] } = {}) => {
1016
+ let u = $e(c), { refs: d, floatingStyles: p, isPositioned: m, update: g, context: _, middlewareData: v, placement: y } = A({
1011
1017
  open: e,
1012
1018
  onOpenChange: t,
1013
1019
  placement: n,
@@ -1015,32 +1021,37 @@ var qe = L("itemBadge", "Dropdown.ItemBadge"), Je = L("itemDescription", "Dropdo
1015
1021
  transform: !1,
1016
1022
  middleware: h(() => [
1017
1023
  D(i),
1018
- ...o ? [E()] : [],
1024
+ ...s ? [E({ padding: a })] : [],
1019
1025
  k({ apply({ rects: e, elements: t }) {
1020
- !a || l || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
1026
+ !o || u || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
1021
1027
  } }),
1022
- ...o ? [O({ padding: 8 })] : [],
1023
- ...c
1028
+ ...s ? [O({ padding: a })] : [],
1029
+ ...l
1024
1030
  ], [
1025
- o,
1026
- c,
1027
- l,
1031
+ s,
1028
1032
  a,
1033
+ l,
1034
+ u,
1035
+ o,
1029
1036
  i
1030
1037
  ]),
1031
1038
  whileElementsMounted: T
1032
1039
  });
1033
1040
  return f(() => {
1034
- l && u.floating.current?.style.removeProperty("width");
1035
- }, [l, u.floating]), {
1036
- context: m,
1037
- placement: _,
1038
- middlewareData: g,
1039
- floatingStyles: l ? {} : d,
1040
- isMobileSheet: l,
1041
- setRef: u.setReference,
1042
- setFloatingRef: u.setFloating,
1043
- updatePosition: p
1041
+ u && d.floating.current?.style.removeProperty("width");
1042
+ }, [u, d.floating]), {
1043
+ context: _,
1044
+ placement: y,
1045
+ middlewareData: v,
1046
+ isPositioned: m,
1047
+ floatingStyles: u ? {} : {
1048
+ ...p,
1049
+ visibility: e && !m ? "hidden" : p.visibility
1050
+ },
1051
+ isMobileSheet: u,
1052
+ setRef: d.setReference,
1053
+ setFloatingRef: d.setFloating,
1054
+ updatePosition: g
1044
1055
  };
1045
1056
  };
1046
1057
  //#endregion
@@ -1066,172 +1077,175 @@ function nt(...e) {
1066
1077
  function rt(e) {
1067
1078
  return typeof e == "number" ? `${e}px` : e;
1068
1079
  }
1069
- var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultOpen: i = !1, onOpenChange: a, size: o = "md", color: s = "primary", placement: c = "bottom-start", offset: l = 2, matchTriggerWidth: d = !1, minWidth: m, maxWidth: v, portal: y = !0, avoidCollisions: b = !0, modal: x = !1, closeOnSelect: S = !0, loop: C = !0, disabled: w = !1, loading: T = !1, loadingText: E = "Loading actions...", searchable: D = !1, command: O = !1, searchValue: k, defaultSearchValue: A = "", searchPlaceholder: j, onSearch: M, empty: N, noOptionsText: F, className: I }) => {
1070
- let L = p(), z = `${L}-trigger`, ee = `${L}-menu`, B = g(null), te = g(null), [ne, re] = _(), [ie, ae] = _({}), [oe, se] = _(A), ce = k ?? oe, V = h(() => R(e), [e]), ue = V.content?.props.command ?? !1, fe = D || O || ue || !!V.search, pe = h(() => st(V.items), [V.items]), me = h(() => V.items.map((e) => ({
1080
+ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultOpen: i = !1, onOpenChange: a, size: o = "md", color: s = "primary", placement: c = "bottom-start", strategy: l, offset: d = 2, collisionPadding: m = 8, matchTriggerWidth: v = !1, minWidth: y, maxWidth: b, portal: x = !0, avoidCollisions: S = !0, modal: C = !1, closeOnSelect: w = !0, loop: T = !0, disabled: E = !1, loading: D = !1, loadingText: O = "Loading actions...", searchable: k = !1, command: A = !1, searchValue: j, defaultSearchValue: M = "", searchPlaceholder: N, onSearch: F, empty: I, noOptionsText: L, className: z }) => {
1081
+ let ee = p(), B = `${ee}-trigger`, te = `${ee}-menu`, ne = g(null), re = g(null), [ie, ae] = _(), [oe, V] = _({}), [se, le] = _(M), ue = j ?? se, H = h(() => R(e), [e]), fe = H.content?.props.command ?? !1, pe = k || A || fe || !!H.search, he = h(() => st(H.items), [H.items]), ge = h(() => H.items.map((e) => ({
1071
1082
  disabled: e.disabled,
1072
1083
  label: e.label
1073
- })), [V.items]), H = h(() => !fe || !ce.trim() ? V : ct(V, ce), [
1074
- fe,
1075
- V,
1076
- ce
1077
- ]), ge = h(() => H.items.map((e) => ({
1084
+ })), [H.items]), U = h(() => !pe || !ue.trim() ? H : ct(H, ue), [
1085
+ pe,
1086
+ H,
1087
+ ue
1088
+ ]), _e = h(() => U.items.map((e) => ({
1078
1089
  disabled: e.disabled,
1079
1090
  label: e.label
1080
- })), [H.items]);
1091
+ })), [U.items]);
1081
1092
  f(() => {
1082
- ae((e) => {
1093
+ V((e) => {
1083
1094
  let t = { ...e };
1084
- return pe.forEach((e) => {
1095
+ return he.forEach((e) => {
1085
1096
  e.type === "radio" && t[e.groupId] === void 0 && (t[e.groupId] = e.groupProps?.value ?? e.groupProps?.defaultValue);
1086
1097
  }), t;
1087
1098
  });
1088
- }, [pe]);
1089
- let { activeIndex: _e, setActiveIndex: ve, isOpen: be, closeDropdown: xe, toggleDropdown: U, onKeyDown: Se } = ye({
1090
- items: fe ? ge : me,
1099
+ }, [he]);
1100
+ let { activeIndex: ye, setActiveIndex: be, isOpen: W, closeDropdown: xe, toggleDropdown: Se, onKeyDown: Ce } = ve({
1101
+ items: pe ? _e : ge,
1091
1102
  open: t,
1092
1103
  defaultOpen: i,
1093
- disabled: w,
1104
+ disabled: E,
1094
1105
  onOpenChange: a,
1095
- getItemValue: (e, t) => (fe ? H.items : V.items)[t]?.id ?? "",
1106
+ getItemValue: (e, t) => (pe ? U.items : H.items)[t]?.id ?? "",
1096
1107
  getItemText: (e) => e.label,
1097
- loop: C
1098
- }), { floatingStyles: Ce, setRef: we, setFloatingRef: Te } = et({
1099
- open: be,
1108
+ loop: T
1109
+ }), { floatingStyles: we, isMobileSheet: Te, isPositioned: Ee, setRef: De, setFloatingRef: Oe } = et({
1110
+ open: W,
1100
1111
  placement: c,
1101
- matchTriggerWidth: d,
1102
- avoidCollisions: b,
1103
- offset: l,
1112
+ strategy: l ?? (x ? "fixed" : "absolute"),
1113
+ matchTriggerWidth: v,
1114
+ avoidCollisions: S,
1115
+ offset: d,
1116
+ collisionPadding: m,
1104
1117
  mobileSheetBreakpoint: 640
1105
- }), Ee = u((e) => {
1106
- k === void 0 && se(e), M?.(e), ve(0);
1118
+ }), ke = u((e) => {
1119
+ j === void 0 && le(e), F?.(e), be(0);
1107
1120
  }, [
1108
- M,
1109
- k,
1110
- ve
1111
- ]), { isTopOverlay: De } = de({
1112
- active: be,
1113
- id: ee
1121
+ F,
1122
+ j,
1123
+ be
1124
+ ]), { isTopOverlay: Ae } = de({
1125
+ active: W,
1126
+ id: te
1114
1127
  });
1115
- he({
1116
- active: be,
1117
- enabled: x
1128
+ me({
1129
+ active: W,
1130
+ enabled: C
1118
1131
  });
1119
- let Oe = u(() => {
1120
- xe(), B.current?.focus();
1121
- }, [xe]), ke = u((e, t) => {
1122
- if (e.disabled || T) return;
1132
+ let je = u(() => {
1133
+ xe(), ne.current?.focus();
1134
+ }, [xe]), G = u((e, t) => {
1135
+ if (e.disabled || D) return;
1123
1136
  if (e.type === "subTrigger") {
1124
- re(e.id);
1137
+ ae(e.id);
1125
1138
  return;
1126
1139
  }
1127
- e.type === "item" && e.props.onSelect?.(t), e.type === "radio" && (ae((t) => ({
1140
+ e.type === "item" && e.props.onSelect?.(t), e.type === "radio" && (V((t) => ({
1128
1141
  ...t,
1129
1142
  [e.groupId]: e.props.value
1130
1143
  })), e.groupProps?.onValueChange?.(e.props.value));
1131
- let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && S);
1132
- !t.defaultPrevented && n && Oe();
1144
+ let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && w);
1145
+ !t.defaultPrevented && n && je();
1133
1146
  }, [
1134
- Oe,
1135
- S,
1136
- T
1137
- ]), Ae = u((e) => {
1138
- let t = H.items[_e];
1147
+ je,
1148
+ w,
1149
+ D
1150
+ ]), Pe = u((e) => {
1151
+ let t = U.items[ye];
1139
1152
  if (e.key === "ArrowRight" && t?.type === "subTrigger") {
1140
- e.preventDefault(), re(t.id);
1153
+ e.preventDefault(), ae(t.id);
1141
1154
  return;
1142
1155
  }
1143
- if (e.key === "ArrowLeft" && ne) {
1144
- e.preventDefault(), re(void 0);
1156
+ if (e.key === "ArrowLeft" && ie) {
1157
+ e.preventDefault(), ae(void 0);
1145
1158
  return;
1146
1159
  }
1147
1160
  if ((e.key === "Enter" || e.key === " ") && t) {
1148
1161
  e.preventDefault();
1149
1162
  let n = ot(e);
1150
- ke(t, n);
1163
+ G(t, n);
1151
1164
  return;
1152
1165
  }
1153
- Se(e), e.key === "Escape" && B.current?.focus();
1166
+ Ce(e), e.key === "Escape" && ne.current?.focus();
1154
1167
  }, [
1155
- _e,
1156
- H.items,
1157
- Se,
1158
- ne,
1159
- ke
1160
- ]), je = u((e) => {
1161
- e.preventDefault(), U();
1162
- }, [U]), Me = u((e) => {
1163
- B.current = e, we(e);
1164
- }, [we]), W = u((e) => {
1165
- te.current = e, Te(e), e?.focus();
1166
- }, [Te]);
1167
- le({
1168
- active: be,
1168
+ ye,
1169
+ U.items,
1170
+ Ce,
1171
+ ie,
1172
+ G
1173
+ ]), K = u((e) => {
1174
+ e.preventDefault(), Se();
1175
+ }, [Se]), Fe = u((e) => {
1176
+ ne.current = e, De(e);
1177
+ }, [De]), Ie = u((e) => {
1178
+ re.current = e, Oe(e), Te && e?.focus({ preventScroll: !0 });
1179
+ }, [Te, Oe]);
1180
+ ce({
1181
+ active: W,
1169
1182
  closeOnEscape: !0,
1170
1183
  closeOnOutsidePress: !0,
1171
- contentRef: te,
1172
- ignoreRefs: [B],
1173
- isTopOverlay: De,
1184
+ contentRef: re,
1185
+ ignoreRefs: [ne],
1186
+ isTopOverlay: Ae,
1174
1187
  requestClose: xe
1175
1188
  });
1176
- let Fe = {
1177
- ...Ce,
1178
- minWidth: rt(m),
1179
- maxWidth: rt(v)
1189
+ let Le = {
1190
+ ...we,
1191
+ minWidth: rt(y),
1192
+ maxWidth: rt(b)
1180
1193
  };
1181
- return /* @__PURE__ */ n(Pe, {
1194
+ return /* @__PURE__ */ n(Ne, {
1182
1195
  value: {
1183
- disabled: w,
1184
- isOpen: be,
1185
- contentId: ee,
1186
- triggerId: z,
1187
- setTriggerRef: Me,
1188
- onClick: je,
1189
- onKeyDown: Ae
1196
+ disabled: E,
1197
+ isOpen: W,
1198
+ contentId: te,
1199
+ triggerId: B,
1200
+ setTriggerRef: Fe,
1201
+ onClick: K,
1202
+ onKeyDown: Pe
1190
1203
  },
1191
- children: /* @__PURE__ */ n(Ne, {
1204
+ children: /* @__PURE__ */ n(Me, {
1192
1205
  value: {
1193
- activeIndex: _e,
1194
- closeOnSelect: S,
1206
+ activeIndex: ye,
1207
+ closeOnSelect: w,
1195
1208
  color: s,
1196
- contentId: ee,
1197
- contentProps: V.content?.props,
1198
- disabled: w,
1199
- entries: H.entries,
1200
- getItemId: (e) => `${ee}-item-${e}`,
1201
- isOpen: be,
1202
- items: H.items,
1203
- loading: T,
1204
- loadingText: E,
1205
- noOptionsText: N ?? F,
1206
- maxWidth: v,
1207
- minWidth: m,
1208
- openSubId: ne,
1209
- onKeyDown: Ae,
1210
- portal: !V.portal && y,
1211
- radioValues: ie,
1212
- searchPlaceholder: V.search?.props.placeholder ?? j ?? (O || ue ? "Type a command..." : "Search actions..."),
1213
- searchProps: V.search?.props,
1214
- searchValue: ce,
1215
- searchable: fe,
1216
- selectItem: ke,
1217
- setActiveIndex: ve,
1218
- setContentRef: W,
1219
- setOpenSubId: re,
1209
+ contentReadyToFocus: Te || Ee,
1210
+ contentId: te,
1211
+ contentProps: H.content?.props,
1212
+ disabled: E,
1213
+ entries: U.entries,
1214
+ getItemId: (e) => `${te}-item-${e}`,
1215
+ isOpen: W,
1216
+ items: U.items,
1217
+ loading: D,
1218
+ loadingText: O,
1219
+ noOptionsText: I ?? L,
1220
+ maxWidth: b,
1221
+ minWidth: y,
1222
+ openSubId: ie,
1223
+ onKeyDown: Pe,
1224
+ portal: !H.portal && x,
1225
+ radioValues: oe,
1226
+ searchPlaceholder: H.search?.props.placeholder ?? N ?? (A || fe ? "Type a command..." : "Search actions..."),
1227
+ searchProps: H.search?.props,
1228
+ searchValue: ue,
1229
+ searchable: pe,
1230
+ selectItem: G,
1231
+ setActiveIndex: be,
1232
+ setContentRef: Ie,
1233
+ setOpenSubId: ae,
1220
1234
  setRadioValue: (e, t) => {
1221
- ae((n) => ({
1235
+ V((n) => ({
1222
1236
  ...n,
1223
1237
  [e]: t
1224
1238
  }));
1225
1239
  },
1226
- setSearchValue: Ee,
1240
+ setSearchValue: ke,
1227
1241
  size: o,
1228
- surfaceStyle: Fe,
1229
- triggerId: z
1242
+ surfaceStyle: Le,
1243
+ triggerId: B
1230
1244
  },
1231
1245
  children: /* @__PURE__ */ r("div", {
1232
- className: P(it.wrapper, I),
1233
- "data-disabled": w || void 0,
1234
- children: [V.trigger ?? null, V.portal ?? V.content ?? /* @__PURE__ */ n(Ke, {})]
1246
+ className: P(it.wrapper, z),
1247
+ "data-disabled": E || void 0,
1248
+ children: [H.trigger ?? null, H.portal ?? H.content ?? /* @__PURE__ */ n(Ke, {})]
1235
1249
  })
1236
1250
  })
1237
1251
  });
@@ -1284,7 +1298,7 @@ var lt = L("search", "Dropdown.Search"), ut = L("subContent", "Dropdown.SubConte
1284
1298
  }, mt = (e) => /* @__PURE__ */ n(ht, { ...e });
1285
1299
  mt.__velliraDropdownPart = "trigger", mt.displayName = "Dropdown.Trigger";
1286
1300
  var ht = ({ children: e, asChild: t = !1, disabled: i, className: a }) => {
1287
- let s = W(), c = Fe(), u = t && l(e) ? e : void 0, d = s.disabled || i, f = {
1301
+ let s = G(), c = Pe(), u = t && l(e) ? e : void 0, d = s.disabled || i, f = {
1288
1302
  id: c.triggerId,
1289
1303
  ref: u ? nt(u.props.ref, c.setTriggerRef) : c.setTriggerRef,
1290
1304
  "aria-controls": c.isOpen ? c.contentId : void 0,
@@ -1320,12 +1334,12 @@ var gt = Object.assign(at, {
1320
1334
  Trigger: mt,
1321
1335
  Content: Ke,
1322
1336
  Search: lt,
1323
- Item: Ie,
1337
+ Item: Fe,
1324
1338
  CheckboxItem: te,
1325
1339
  RadioGroup: Ze,
1326
1340
  RadioItem: Qe,
1327
- Group: Oe,
1328
- Label: Ve,
1341
+ Group: De,
1342
+ Label: Be,
1329
1343
  Separator: We,
1330
1344
  Sub: ft,
1331
1345
  SubTrigger: dt,
@@ -1335,7 +1349,7 @@ var gt = Object.assign(at, {
1335
1349
  ItemBadge: qe,
1336
1350
  ItemShortcut: Xe,
1337
1351
  Arrow: I,
1338
- Empty: Ee,
1352
+ Empty: Te,
1339
1353
  Loading: q
1340
1354
  });
1341
1355
  gt.displayName = "Dropdown";
@@ -1404,7 +1418,7 @@ Ot.displayName = "Modal.Close";
1404
1418
  //#endregion
1405
1419
  //#region src/components/Modal/internal/useModalDismiss.ts
1406
1420
  var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r, isTopModal: i, onEscapeKeyDown: a, onPointerDownOutside: o, onInteractOutside: s, requestClose: c }) => {
1407
- le({
1421
+ ce({
1408
1422
  active: e,
1409
1423
  closeOnOutsidePress: r,
1410
1424
  closeOnEscape: n,
@@ -1441,7 +1455,7 @@ var kt = ({ active: e, contentRef: t, closeOnEscape: n, closeOnOutsidePress: r,
1441
1455
  onInteractOutside: p.onInteractOutside,
1442
1456
  onPointerDownOutside: p.onPointerDownOutside,
1443
1457
  requestClose: p.requestClose
1444
- }), ce({
1458
+ }), se({
1445
1459
  active: m,
1446
1460
  contentRef: p.contentRef,
1447
1461
  enabled: p.trapFocus,
@@ -1531,7 +1545,7 @@ Rt.displayName = "ModalOverlay";
1531
1545
  //#endregion
1532
1546
  //#region src/components/Modal/Root/ModalRoot.tsx
1533
1547
  var zt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a = !0, closeOnEscape: o = !0, closeOnOutsidePress: s = !0, preventScroll: c = !0, restoreFocus: l = !0, trapFocus: d = !0, initialFocus: p, finalFocus: m, onOpenAutoFocus: v, onCloseAutoFocus: y, onEscapeKeyDown: b, onPointerDownOutside: x, onInteractOutside: S, role: C = "dialog", className: w }) => {
1534
- let T = g(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } = be({
1548
+ let T = g(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } = ye({
1535
1549
  open: t,
1536
1550
  defaultOpen: r,
1537
1551
  onOpenChange: i,
@@ -1545,7 +1559,7 @@ var zt = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, modal: a
1545
1559
  active: O,
1546
1560
  id: E
1547
1561
  });
1548
- return he({
1562
+ return me({
1549
1563
  active: O,
1550
1564
  enabled: c
1551
1565
  }), f(() => {
@@ -1664,28 +1678,28 @@ function Wt() {
1664
1678
  return d(Ht);
1665
1679
  }
1666
1680
  var J = {
1667
- root: "_root_1avxs_1",
1668
- invalid: "_invalid_1avxs_27",
1669
- control: "_control_1avxs_27",
1670
- label: "_label_1avxs_30",
1671
- wrapper: "_wrapper_1avxs_33",
1672
- input: "_input_1avxs_34",
1673
- disabled: "_disabled_1avxs_37",
1674
- description: "_description_1avxs_45",
1675
- colorPrimary: "_colorPrimary_1avxs_49",
1676
- colorNeutral: "_colorNeutral_1avxs_65",
1677
- colorSuccess: "_colorSuccess_1avxs_81",
1678
- colorWarning: "_colorWarning_1avxs_97",
1679
- colorDanger: "_colorDanger_1avxs_113",
1680
- sm: "_sm_1avxs_129",
1681
- md: "_md_1avxs_138",
1682
- lg: "_lg_1avxs_147",
1683
- indicator: "_indicator_1avxs_202",
1684
- customIcon: "_customIcon_1avxs_216",
1685
- "radio-pop": "_radio-pop_1avxs_1",
1686
- "radio-indicator-in": "_radio-indicator-in_1avxs_1",
1687
- content: "_content_1avxs_339",
1688
- error: "_error_1avxs_356"
1681
+ root: "_root_owqkg_1",
1682
+ invalid: "_invalid_owqkg_34",
1683
+ control: "_control_owqkg_34",
1684
+ label: "_label_owqkg_37",
1685
+ wrapper: "_wrapper_owqkg_40",
1686
+ input: "_input_owqkg_41",
1687
+ disabled: "_disabled_owqkg_44",
1688
+ description: "_description_owqkg_52",
1689
+ colorPrimary: "_colorPrimary_owqkg_56",
1690
+ colorNeutral: "_colorNeutral_owqkg_72",
1691
+ colorSuccess: "_colorSuccess_owqkg_88",
1692
+ colorWarning: "_colorWarning_owqkg_104",
1693
+ colorDanger: "_colorDanger_owqkg_120",
1694
+ sm: "_sm_owqkg_136",
1695
+ md: "_md_owqkg_145",
1696
+ lg: "_lg_owqkg_154",
1697
+ indicator: "_indicator_owqkg_209",
1698
+ customIcon: "_customIcon_owqkg_223",
1699
+ "radio-pop": "_radio-pop_owqkg_1",
1700
+ "radio-indicator-in": "_radio-indicator-in_owqkg_1",
1701
+ content: "_content_owqkg_346",
1702
+ error: "_error_owqkg_363"
1689
1703
  }, Gt = {
1690
1704
  primary: J.colorPrimary,
1691
1705
  neutral: J.colorNeutral,
@@ -1698,7 +1712,7 @@ var J = {
1698
1712
  E,
1699
1713
  S?.describedBy,
1700
1714
  y
1701
- ].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = _e({
1715
+ ].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = U({
1702
1716
  value: t,
1703
1717
  defaultValue: i,
1704
1718
  onChange: u
@@ -1801,7 +1815,7 @@ var $t = {
1801
1815
  disabled: "_disabled_1s3vp_160",
1802
1816
  invalid: "_invalid_1s3vp_176"
1803
1817
  }, en = c(({ value: e, defaultValue: t = "", onValueChange: i, disabled: a = !1, required: o = !1, size: s = "md", color: c = "primary", name: l, label: u, description: d, error: f, orientation: m = "vertical", children: h, className: _, id: v, onKeyDown: y, ...b }, x) => {
1804
- let S = g(null), C = p(), w = v ?? C, T = u ? `${w}-label` : void 0, E = d ? `${w}-description` : void 0, D = f ? `${w}-error` : void 0, O = [E, D].filter(Boolean).join(" ") || void 0, k = l ?? `${w}-radio`, [A, j] = _e({
1818
+ let S = g(null), C = p(), w = v ?? C, T = u ? `${w}-label` : void 0, E = d ? `${w}-description` : void 0, D = f ? `${w}-error` : void 0, O = [E, D].filter(Boolean).join(" ") || void 0, k = l ?? `${w}-radio`, [A, j] = U({
1805
1819
  value: e,
1806
1820
  defaultValue: t,
1807
1821
  onChange: i
@@ -2014,12 +2028,12 @@ var Y = {
2014
2028
  };
2015
2029
  un.__velliraSelectPart = "content", un.displayName = "Select.Content";
2016
2030
  var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style: s, options: c, entries: l, multiple: d, selectedValues: p, color: m = "primary", variant: h = "outline", searchable: v, command: y, virtual: b, portal: x = !0, searchValue: C = "", searchPlaceholder: w = "Search...", loading: T, loadingText: E = "Loading...", noOptionsText: D, searchSlot: O, headerSlot: k, emptySlot: A, loadingSlot: j, renderOption: M, selectedValue: N, activeIndex: P, visualActiveIndex: F = P, className: I, onSelect: L, onSelectGroup: R, onMouseEnter: z, onSearchChange: ee }) => {
2017
- let B = g(null), te = g(!1), [ne, re] = _(null), [ie, ae] = _(0), { bottomSpacerHeight: oe, isVirtual: se, itemHeight: ce, startIndex: le, topSpacerHeight: V, viewportHeight: ue, visibleOptions: de } = on({
2031
+ let B = g(null), te = g(!1), [ne, re] = _(null), [ie, ae] = _(0), { bottomSpacerHeight: oe, isVirtual: V, itemHeight: se, startIndex: ce, topSpacerHeight: le, viewportHeight: ue, visibleOptions: de } = on({
2018
2032
  loading: T,
2019
2033
  options: c,
2020
2034
  scrollTop: ie,
2021
2035
  virtual: b
2022
- }), fe = u((e) => {
2036
+ }), H = u((e) => {
2023
2037
  re(e), o(e);
2024
2038
  }, [o]);
2025
2039
  if (f(() => {
@@ -2037,8 +2051,8 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2037
2051
  te.current = !0;
2038
2052
  return;
2039
2053
  }
2040
- if (te.current = !0, se) {
2041
- let e = Math.max(0, n * ce - (ue - ce) / 2);
2054
+ if (te.current = !0, V) {
2055
+ let e = Math.max(0, n * se - (ue - se) / 2);
2042
2056
  ae(e), ne.scrollTop = e;
2043
2057
  return;
2044
2058
  }
@@ -2047,8 +2061,8 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2047
2061
  P,
2048
2062
  ne,
2049
2063
  e,
2064
+ V,
2050
2065
  se,
2051
- ce,
2052
2066
  i,
2053
2067
  T,
2054
2068
  c,
@@ -2056,12 +2070,12 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2056
2070
  p,
2057
2071
  ue
2058
2072
  ]), !e) return null;
2059
- let pe = l && !se ? l : de.map((e, t) => ({
2073
+ let fe = l && !V ? l : de.map((e, t) => ({
2060
2074
  type: "option",
2061
2075
  option: e,
2062
- optionIndex: le + t
2063
- })), me = /* @__PURE__ */ r("div", {
2064
- ref: fe,
2076
+ optionIndex: ce + t
2077
+ })), pe = /* @__PURE__ */ r("div", {
2078
+ ref: H,
2065
2079
  tabIndex: 0,
2066
2080
  className: [
2067
2081
  Y.dropdown,
@@ -2072,7 +2086,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2072
2086
  ].filter(Boolean).join(" "),
2073
2087
  style: s,
2074
2088
  onScroll: (e) => {
2075
- se && ae(e.currentTarget.scrollTop);
2089
+ V && ae(e.currentTarget.scrollTop);
2076
2090
  },
2077
2091
  children: [
2078
2092
  k,
@@ -2108,12 +2122,12 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2108
2122
  className: Y.empty,
2109
2123
  children: j ?? E
2110
2124
  }) : c.length ? /* @__PURE__ */ r(t, { children: [
2111
- se && /* @__PURE__ */ n("li", {
2125
+ V && /* @__PURE__ */ n("li", {
2112
2126
  "aria-hidden": "true",
2113
2127
  className: Y.virtualSpacer,
2114
- style: { height: V }
2128
+ style: { height: le }
2115
2129
  }),
2116
- pe.map((e) => {
2130
+ fe.map((e) => {
2117
2131
  if (e.type === "group") {
2118
2132
  if (e.selectable && d) {
2119
2133
  let t = e.itemValues.filter((e) => c.some((t) => t.value === e && !t.disabled)), i = p ? t.filter((e) => p.includes(e)).length : 0, a = t.length > 0 && i === t.length, o = i > 0 && i < t.length;
@@ -2163,7 +2177,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2163
2177
  onMouseEnter: () => z(a)
2164
2178
  }, t.value);
2165
2179
  }),
2166
- se && /* @__PURE__ */ n("li", {
2180
+ V && /* @__PURE__ */ n("li", {
2167
2181
  "aria-hidden": "true",
2168
2182
  className: Y.virtualSpacer,
2169
2183
  style: { height: oe }
@@ -2178,7 +2192,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2178
2192
  })
2179
2193
  ]
2180
2194
  });
2181
- return x ? /* @__PURE__ */ n(we, { children: me }) : me;
2195
+ return x ? /* @__PURE__ */ n(Ce, { children: pe }) : pe;
2182
2196
  };
2183
2197
  dn.displayName = "SelectContentSurface";
2184
2198
  function fn(e) {
@@ -2607,159 +2621,159 @@ var Ln = ({ children: e, id: i, describedBy: a, labelledBy: o, isOpen: s, disabl
2607
2621
  Ln.displayName = "SelectTriggerSurface";
2608
2622
  //#endregion
2609
2623
  //#region src/components/Select/Root/SelectRoot.tsx
2610
- var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: m, 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: j = !1, invalid: M = !1, loading: N = !1, clearable: P = !1, searchable: F = !1, virtual: I, modal: L = !1, command: R = !1, error: z, placement: ee = "bottom", matchTriggerWidth: B = !0, avoidCollisions: te = !0, portal: ne = !0, open: re, defaultOpen: ie = !1, onOpenChange: ae, onSearch: oe, onClear: se, startIcon: ce, endIcon: V, prefix: ue, suffix: fe, renderValue: pe, renderOption: me, onBlur: H, onFocus: ge, className: _e, triggerClassName: ve, dropdownClassName: ye }) => {
2611
- let be = p(), U = wn(), Se = !!(i || a || z), Ce = o ?? (Se ? void 0 : U?.controlId) ?? be, we = `${Ce}-listbox`, [Te, Ee] = _(""), De = !!z, Oe = De ? `${Ce}-error` : void 0, ke = a ? `${Ce}-description` : void 0, Ae = D ?? U?.size ?? "md", je = M || De || !Se && !!U?.invalid, Me = j || !Se && !!U?.disabled, Ne = A || !Se && !!U?.required, Pe = [
2624
+ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: m, 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: j = !1, invalid: M = !1, loading: N = !1, clearable: P = !1, searchable: F = !1, virtual: I, modal: L = !1, command: R = !1, error: z, placement: ee = "bottom", matchTriggerWidth: B = !0, avoidCollisions: te = !0, portal: ne = !0, open: re, defaultOpen: ie = !1, onOpenChange: ae, onSearch: oe, onClear: V, startIcon: se, endIcon: le, prefix: ue, suffix: H, renderValue: fe, renderOption: pe, onBlur: he, onFocus: ge, className: U, triggerClassName: _e, dropdownClassName: ve }) => {
2625
+ let ye = p(), W = wn(), xe = !!(i || a || z), Se = o ?? (xe ? void 0 : W?.controlId) ?? ye, Ce = `${Se}-listbox`, [we, Te] = _(""), Ee = !!z, De = Ee ? `${Se}-error` : void 0, Oe = a ? `${Se}-description` : void 0, ke = D ?? W?.size ?? "md", Ae = M || Ee || !xe && !!W?.invalid, je = j || !xe && !!W?.disabled, Me = A || !xe && !!W?.required, Ne = [
2612
2626
  l,
2613
- !Se && !l ? U?.ariaDescribedBy : void 0,
2614
- ke,
2615
- Oe
2616
- ].filter(Boolean).join(" "), W = g(null), Fe = g(null), [G, Ie] = _(!1), Le = F || R, { entries: Re, options: ze } = Mn(e), Be = Pn({
2617
- options: ze,
2618
- searchable: Le,
2619
- searchValue: Te
2620
- }), { selectedValue: Ve, selectedValues: K, isOpen: q, setIsOpen: He, setSelectedValue: Ue, activeIndex: We, setActiveIndex: Ge, closeDropdown: Ke, toggleDropdown: qe, selectValue: Je, onKeyDown: Ye } = xe({
2627
+ !xe && !l ? W?.ariaDescribedBy : void 0,
2628
+ Oe,
2629
+ De
2630
+ ].filter(Boolean).join(" "), G = g(null), Pe = g(null), [K, Fe] = _(!1), Ie = F || R, { entries: Le, options: Re } = Mn(e), ze = Pn({
2631
+ options: Re,
2632
+ searchable: Ie,
2633
+ searchValue: we
2634
+ }), { selectedValue: Be, selectedValues: Ve, isOpen: q, setIsOpen: He, setSelectedValue: Ue, activeIndex: We, setActiveIndex: Ge, closeDropdown: Ke, toggleDropdown: qe, selectValue: Je, onKeyDown: Ye } = be({
2621
2635
  value: m,
2622
2636
  defaultValue: v,
2623
2637
  onValueChange: y,
2624
- options: Be,
2638
+ options: ze,
2625
2639
  multiple: b,
2626
2640
  maxSelected: x,
2627
2641
  closeOnSelect: S,
2628
- disabled: Me,
2642
+ disabled: je,
2629
2643
  open: re,
2630
2644
  defaultOpen: ie,
2631
2645
  onOpenChange: ae
2632
- }), Xe = h(() => ze.find((e) => K.includes(e.value)), [ze, K]), Ze = h(() => ze.filter((e) => K.includes(e.value)), [ze, K]), Qe = !!Xe, $e = Array.isArray(Ve) ? Ve[0] ?? "" : Ve, { floatingStyles: et, setRef: tt, setFloatingRef: nt } = Nn({
2646
+ }), Xe = h(() => Re.find((e) => Ve.includes(e.value)), [Re, Ve]), Ze = h(() => Re.filter((e) => Ve.includes(e.value)), [Re, Ve]), Qe = !!Xe, $e = Array.isArray(Be) ? Be[0] ?? "" : Be, { floatingStyles: et, setRef: tt, setFloatingRef: nt } = Nn({
2633
2647
  isOpen: q,
2634
2648
  onOpenChange: He,
2635
2649
  placement: ee,
2636
2650
  matchTriggerWidth: B,
2637
2651
  avoidCollisions: te
2638
2652
  }), rt = u((e) => {
2639
- Je(e), W.current?.focus();
2653
+ Je(e), G.current?.focus();
2640
2654
  }, [Je]), it = u((e) => {
2641
2655
  if (!b || e.length === 0) return;
2642
- let t = e.filter((e) => ze.some((t) => t.value === e && !t.disabled)), n = t.filter((e) => K.includes(e)), r = K.filter((e) => !t.includes(e)).length, i = typeof x == "number" ? Math.max(0, Math.min(t.length, x - r)) : t.length;
2656
+ let t = e.filter((e) => Re.some((t) => t.value === e && !t.disabled)), n = t.filter((e) => Ve.includes(e)), r = Ve.filter((e) => !t.includes(e)).length, i = typeof x == "number" ? Math.max(0, Math.min(t.length, x - r)) : t.length;
2643
2657
  if (n.length > 0 && n.length >= i) {
2644
- Ue(K.filter((e) => !t.includes(e)));
2658
+ Ue(Ve.filter((e) => !t.includes(e)));
2645
2659
  return;
2646
2660
  }
2647
- let a = [...K];
2661
+ let a = [...Ve];
2648
2662
  for (let e of t) if (!a.includes(e)) {
2649
2663
  if (typeof x == "number" && a.length >= x) break;
2650
2664
  a.push(e);
2651
2665
  }
2652
- Ue(a), S && (Ke(), W.current?.focus());
2666
+ Ue(a), S && (Ke(), G.current?.focus());
2653
2667
  }, [
2654
2668
  Ke,
2655
2669
  S,
2656
2670
  x,
2657
2671
  b,
2658
- ze,
2659
- K,
2672
+ Re,
2673
+ Ve,
2660
2674
  Ue
2661
2675
  ]), at = u(() => {
2662
- Je(""), se?.(), W.current?.focus();
2663
- }, [se, Je]), ot = u(() => {
2664
- q || Ie(!1), qe();
2676
+ Je(""), V?.(), G.current?.focus();
2677
+ }, [V, Je]), ot = u(() => {
2678
+ q || Fe(!1), qe();
2665
2679
  }, [q, qe]), st = u((e) => {
2666
- zn(e, q) && Ie(!0), Ye(e);
2680
+ zn(e, q) && Fe(!0), Ye(e);
2667
2681
  }, [q, Ye]), ct = u((e) => {
2668
- Ie(!0), Ge(e);
2682
+ Fe(!0), Ge(e);
2669
2683
  }, [Ge]), lt = u((e) => {
2670
- Ee(e), oe?.(e);
2684
+ Te(e), oe?.(e);
2671
2685
  }, [oe]), { isTopOverlay: ut } = de({
2672
2686
  active: q,
2673
- id: we
2687
+ id: Ce
2674
2688
  });
2675
- le({
2689
+ ce({
2676
2690
  active: q,
2677
2691
  closeOnEscape: !0,
2678
2692
  closeOnOutsidePress: !0,
2679
- contentRef: Fe,
2680
- ignoreRefs: [W],
2693
+ contentRef: Pe,
2694
+ ignoreRefs: [G],
2681
2695
  isTopOverlay: ut,
2682
2696
  requestClose: Ke
2683
2697
  }), f(() => {
2684
- q || Ie(!1);
2698
+ q || Fe(!1);
2685
2699
  }, [q]), f(() => {
2686
- !q && Te && Ee("");
2687
- }, [q, Te]), he({
2700
+ !q && we && Te("");
2701
+ }, [q, we]), me({
2688
2702
  active: q,
2689
2703
  enabled: L
2690
2704
  });
2691
2705
  let dt = u((e) => {
2692
- W.current = e, tt(e);
2706
+ G.current = e, tt(e);
2693
2707
  }, [tt]), ft = u((e) => {
2694
- Fe.current = e, nt(e);
2695
- }, [nt]), pt = pe ? pe(Xe) : b && Ze.length ? Ze.map((e) => e.label).join(", ") : Xe?.label ?? C, mt = w ?? E ?? "No options available", ht = P && K.length > 0 && !Me && !N, gt = {
2696
- id: Ce,
2697
- describedBy: Pe || void 0,
2708
+ Pe.current = e, nt(e);
2709
+ }, [nt]), pt = fe ? fe(Xe) : b && Ze.length ? Ze.map((e) => e.label).join(", ") : Xe?.label ?? C, mt = w ?? E ?? "No options available", ht = P && Ve.length > 0 && !je && !N, gt = {
2710
+ id: Se,
2711
+ describedBy: Ne || void 0,
2698
2712
  labelledBy: c ? void 0 : d,
2699
2713
  isOpen: q,
2700
- disabled: Me,
2701
- required: Ne,
2702
- listboxId: we,
2714
+ disabled: je,
2715
+ required: Me,
2716
+ listboxId: Ce,
2703
2717
  activeIndex: We,
2704
- ariaLabel: c ?? (!i && !U?.labelId ? Xe?.label || C : void 0),
2705
- error: je,
2718
+ ariaLabel: c ?? (!i && !W?.labelId ? Xe?.label || C : void 0),
2719
+ error: Ae,
2706
2720
  loading: N,
2707
2721
  displayText: pt,
2708
2722
  isPlaceholder: !Qe,
2709
- size: Ae,
2723
+ size: ke,
2710
2724
  color: O,
2711
2725
  variant: k,
2712
- startIcon: ce,
2713
- endIcon: V,
2726
+ startIcon: se,
2727
+ endIcon: le,
2714
2728
  prefix: ue,
2715
- suffix: fe,
2729
+ suffix: H,
2716
2730
  clearable: ht,
2717
- className: ve,
2731
+ className: _e,
2718
2732
  buttonRef: dt,
2719
2733
  onClear: at,
2720
2734
  onClick: ot,
2721
2735
  onKeyDown: st,
2722
- onBlur: H,
2736
+ onBlur: he,
2723
2737
  onFocus: ge
2724
2738
  }, _t = {
2725
2739
  isOpen: q,
2726
- listboxId: we,
2727
- labelledById: Ce,
2740
+ listboxId: Ce,
2741
+ labelledById: Se,
2728
2742
  style: et,
2729
- options: Be,
2730
- entries: Le || Te ? void 0 : Re,
2743
+ options: ze,
2744
+ entries: Ie || we ? void 0 : Le,
2731
2745
  multiple: b,
2732
2746
  color: O,
2733
2747
  variant: k,
2734
- searchable: Le,
2748
+ searchable: Ie,
2735
2749
  command: R,
2736
2750
  virtual: I,
2737
2751
  portal: ne,
2738
- searchValue: Te,
2752
+ searchValue: we,
2739
2753
  loading: N,
2740
2754
  loadingText: T,
2741
2755
  noOptionsText: mt,
2742
- renderOption: me,
2756
+ renderOption: pe,
2743
2757
  selectedValue: $e,
2744
- selectedValues: K,
2758
+ selectedValues: Ve,
2745
2759
  activeIndex: We,
2746
- visualActiveIndex: G ? We : -1,
2747
- className: ye,
2760
+ visualActiveIndex: K ? We : -1,
2761
+ className: ve,
2748
2762
  setDropdownRef: ft,
2749
2763
  onSelect: rt,
2750
2764
  onSelectGroup: it,
2751
2765
  onMouseEnter: ct,
2752
2766
  onSearchChange: lt
2753
- }, vt = /* @__PURE__ */ r(t, { children: [s && b && K.length > 0 && /* @__PURE__ */ n(t, { children: K.map((e) => /* @__PURE__ */ n("input", {
2767
+ }, vt = /* @__PURE__ */ r(t, { children: [s && b && Ve.length > 0 && /* @__PURE__ */ n(t, { children: Ve.map((e) => /* @__PURE__ */ n("input", {
2754
2768
  type: "hidden",
2755
2769
  name: s,
2756
2770
  value: e,
2757
- disabled: Me
2771
+ disabled: je
2758
2772
  }, e)) }), s && !b && /* @__PURE__ */ n("input", {
2759
2773
  type: "hidden",
2760
2774
  name: s,
2761
2775
  value: $e,
2762
- disabled: Me
2776
+ disabled: je
2763
2777
  })] }), yt = kn(e), bt = /* @__PURE__ */ r(rn, {
2764
2778
  value: {
2765
2779
  triggerProps: gt,
@@ -2777,15 +2791,15 @@ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label":
2777
2791
  /* @__PURE__ */ n(dn, { ..._t })
2778
2792
  ]
2779
2793
  });
2780
- return !Se && U ? e ? bt : xt : /* @__PURE__ */ n(Dn, {
2781
- id: Ce,
2794
+ return !xe && W ? e ? bt : xt : /* @__PURE__ */ n(Dn, {
2795
+ id: Se,
2782
2796
  label: i,
2783
2797
  description: a,
2784
2798
  error: z,
2785
- required: Ne,
2786
- disabled: Me,
2799
+ required: Me,
2800
+ disabled: je,
2787
2801
  bindControl: !1,
2788
- className: _e,
2802
+ className: U,
2789
2803
  children: e ? bt : xt
2790
2804
  });
2791
2805
  };
@@ -3110,7 +3124,7 @@ var $n = (e) => [...e].sort((e, t) => {
3110
3124
  tabs: "_tabs_1hj56_1",
3111
3125
  vertical: "_vertical_1hj56_30"
3112
3126
  }, rr = ({ children: e, value: t, defaultValue: r, onValueChange: i, orientation: a = "horizontal", activationMode: o = "automatic", dir: s = "ltr", loop: c = !0, variant: l = "line", color: d = "primary", size: m = "md", keepMounted: h = !1, lazyMount: v = !1, disabled: y = !1, className: b, ...x }) => {
3113
- let S = p(), C = t !== void 0, { value: w, setValue: T } = U({
3127
+ let S = p(), C = t !== void 0, { value: w, setValue: T } = W({
3114
3128
  value: t,
3115
3129
  defaultValue: r,
3116
3130
  onValueChange: i
@@ -3377,23 +3391,23 @@ function vr(...e) {
3377
3391
  }
3378
3392
  //#endregion
3379
3393
  //#region src/components/Tooltip/Content/TooltipContent.tsx
3380
- var yr = c(({ children: e, forceMount: t = !1, className: r, style: i, ...a }, o) => {
3381
- let s = pr();
3382
- return !t && !s.open ? null : /* @__PURE__ */ n("div", {
3383
- ...s.getContentProps({
3384
- id: s.contentId,
3394
+ var yr = c(({ children: e, forceMount: t = !1, withArrow: i = !1, className: a, style: o, ...s }, c) => {
3395
+ let l = pr();
3396
+ return !t && !l.open ? null : /* @__PURE__ */ r("div", {
3397
+ ...l.getContentProps({
3398
+ id: l.contentId,
3385
3399
  role: "tooltip",
3386
- ...a
3400
+ ...s
3387
3401
  }),
3388
- ref: vr(o, s.setContentRef),
3389
- className: P(hr.tooltip, r),
3390
- "data-placement": s.placement,
3391
- "data-state": s.open ? "open" : "closed",
3402
+ ref: vr(c, l.setContentRef),
3403
+ className: P(hr.tooltip, a),
3404
+ "data-placement": l.placement,
3405
+ "data-state": l.open ? "open" : "closed",
3392
3406
  style: {
3393
- ...s.floatingStyles,
3394
- ...i
3407
+ ...l.floatingStyles,
3408
+ ...o
3395
3409
  },
3396
- children: e
3410
+ children: [e, i && /* @__PURE__ */ n(gr, {})]
3397
3411
  });
3398
3412
  });
3399
3413
  yr.displayName = "Tooltip.Content";
@@ -3441,7 +3455,7 @@ function Sr({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions
3441
3455
  //#endregion
3442
3456
  //#region src/components/Tooltip/Root/TooltipRoot.tsx
3443
3457
  var Cr = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, placement: a = "top", offset: o = 8, delay: s, skipDelay: c, disabled: l = !1, interactive: u = !1, avoidCollisions: d = !0, matchTriggerWidth: f = !1, modal: m = !1 }) => {
3444
- let h = `${p()}-content`, _ = g(null), v = g(null), [y, b] = _e({
3458
+ let h = `${p()}-content`, _ = g(null), v = g(null), [y, b] = U({
3445
3459
  value: t,
3446
3460
  defaultValue: r,
3447
3461
  onChange: i
@@ -3463,7 +3477,7 @@ var Cr = ({ children: e, open: t, defaultOpen: r = !1, onOpenChange: i, placemen
3463
3477
  active: y,
3464
3478
  id: h
3465
3479
  });
3466
- return le({
3480
+ return ce({
3467
3481
  active: y,
3468
3482
  contentRef: _,
3469
3483
  ignoreRefs: [v],
@@ -3534,33 +3548,33 @@ Tr.displayName = "Tooltip";
3534
3548
  var Er = (e, t) => {
3535
3549
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
3536
3550
  }, Z = {
3537
- button: "_button_1b73n_1",
3538
- solid: "_solid_1b73n_23",
3539
- primary: "_primary_1b73n_23",
3540
- loading: "_loading_1b73n_23",
3541
- neutral: "_neutral_1b73n_49",
3542
- success: "_success_1b73n_75",
3543
- warning: "_warning_1b73n_101",
3544
- danger: "_danger_1b73n_127",
3545
- outline: "_outline_1b73n_153",
3546
- ghost: "_ghost_1b73n_283",
3547
- soft: "_soft_1b73n_413",
3548
- link: "_link_1b73n_543",
3549
- square: "_square_1b73n_711",
3550
- rounded: "_rounded_1b73n_715",
3551
- pill: "_pill_1b73n_719",
3552
- sm: "_sm_1b73n_723",
3553
- md: "_md_1b73n_729",
3554
- lg: "_lg_1b73n_735",
3555
- fullWidth: "_fullWidth_1b73n_741",
3556
- iconOnly: "_iconOnly_1b73n_745",
3557
- label: "_label_1b73n_749",
3558
- labelText: "_labelText_1b73n_771",
3559
- icon: "_icon_1b73n_745",
3560
- spinner: "_spinner_1b73n_790",
3561
- "button-spin": "_button-spin_1b73n_1",
3562
- badge: "_badge_1b73n_812",
3563
- shortcut: "_shortcut_1b73n_826"
3551
+ button: "_button_1xn9g_1",
3552
+ solid: "_solid_1xn9g_23",
3553
+ primary: "_primary_1xn9g_23",
3554
+ loading: "_loading_1xn9g_23",
3555
+ neutral: "_neutral_1xn9g_49",
3556
+ success: "_success_1xn9g_75",
3557
+ warning: "_warning_1xn9g_101",
3558
+ danger: "_danger_1xn9g_127",
3559
+ outline: "_outline_1xn9g_153",
3560
+ ghost: "_ghost_1xn9g_283",
3561
+ soft: "_soft_1xn9g_413",
3562
+ link: "_link_1xn9g_543",
3563
+ square: "_square_1xn9g_711",
3564
+ rounded: "_rounded_1xn9g_715",
3565
+ pill: "_pill_1xn9g_719",
3566
+ sm: "_sm_1xn9g_723",
3567
+ md: "_md_1xn9g_729",
3568
+ lg: "_lg_1xn9g_735",
3569
+ fullWidth: "_fullWidth_1xn9g_741",
3570
+ iconOnly: "_iconOnly_1xn9g_745",
3571
+ label: "_label_1xn9g_749",
3572
+ labelText: "_labelText_1xn9g_771",
3573
+ icon: "_icon_1xn9g_745",
3574
+ spinner: "_spinner_1xn9g_790",
3575
+ "button-spin": "_button-spin_1xn9g_1",
3576
+ badge: "_badge_1xn9g_812",
3577
+ shortcut: "_shortcut_1xn9g_826"
3564
3578
  }, Dr = c(({ children: e, color: i = "primary", appearance: a = "solid", size: s = "md", shape: c = "pill", type: u = "button", disabled: d = !1, loading: f = !1, loadingText: p, iconStart: m, iconEnd: h, 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, ...F }, I) => {
3565
3579
  let L = S && l(e) ? e : void 0, R = L ? L.props.children : e, z = x || !R && !!(m || h), ee = !!(T || E || L?.props["aria-label"] || L?.props["aria-labelledby"]), B = d || f, te = f && p ? p : R, ne = p && R && !z && (typeof R == "string" || typeof R == "number") && (typeof p == "string" || typeof p == "number") ? String(f ? R : p) : void 0, re = O === "_blank" && !k ? "noreferrer noopener" : k, ie = P(Z.button, Z[i], Z[a], Z[s], Z[c], C, {
3566
3580
  [Z.disabled]: B,
@@ -3577,7 +3591,7 @@ var Er = (e, t) => {
3577
3591
  return;
3578
3592
  }
3579
3593
  L?.props.onClick?.(e), e.defaultPrevented || w?.(e);
3580
- }, se = /* @__PURE__ */ r(t, { children: [
3594
+ }, V = /* @__PURE__ */ r(t, { children: [
3581
3595
  f && (g ? /* @__PURE__ */ n("span", {
3582
3596
  className: Z.icon,
3583
3597
  "aria-hidden": "true",
@@ -3623,7 +3637,7 @@ var Er = (e, t) => {
3623
3637
  onClick: oe,
3624
3638
  tabIndex: B ? -1 : L.props.tabIndex,
3625
3639
  title: y || L.props.title,
3626
- children: se
3640
+ children: V
3627
3641
  }) : D ? /* @__PURE__ */ n("a", {
3628
3642
  ref: I,
3629
3643
  href: B ? void 0 : D,
@@ -3640,7 +3654,7 @@ var Er = (e, t) => {
3640
3654
  "aria-busy": f || void 0,
3641
3655
  className: ie,
3642
3656
  title: y,
3643
- children: se
3657
+ children: V
3644
3658
  }) : /* @__PURE__ */ n("button", {
3645
3659
  ...F,
3646
3660
  ref: I,
@@ -3655,45 +3669,45 @@ var Er = (e, t) => {
3655
3669
  "aria-busy": f || void 0,
3656
3670
  className: ie,
3657
3671
  title: y,
3658
- children: se
3672
+ children: V
3659
3673
  });
3660
3674
  });
3661
3675
  Dr.displayName = "Button";
3662
3676
  var Q = {
3663
- wrapper: "_wrapper_1kk5v_1",
3664
- colorPrimary: "_colorPrimary_1kk5v_27",
3665
- colorNeutral: "_colorNeutral_1kk5v_45",
3666
- colorSuccess: "_colorSuccess_1kk5v_63",
3667
- colorWarning: "_colorWarning_1kk5v_81",
3668
- colorDanger: "_colorDanger_1kk5v_99",
3669
- labelStart: "_labelStart_1kk5v_115",
3670
- wrapperSm: "_wrapperSm_1kk5v_119",
3671
- wrapperMd: "_wrapperMd_1kk5v_125",
3672
- wrapperLg: "_wrapperLg_1kk5v_131",
3673
- iconOnly: "_iconOnly_1kk5v_137",
3674
- container: "_container_1kk5v_143",
3675
- containerSm: "_containerSm_1kk5v_150",
3676
- containerMd: "_containerMd_1kk5v_154",
3677
- containerLg: "_containerLg_1kk5v_158",
3678
- containerLabelStart: "_containerLabelStart_1kk5v_162",
3679
- descriptionText: "_descriptionText_1kk5v_162",
3680
- errorText: "_errorText_1kk5v_163",
3681
- input: "_input_1kk5v_167",
3682
- customCheckbox: "_customCheckbox_1kk5v_179",
3683
- requiredMark: "_requiredMark_1kk5v_194",
3684
- error: "_error_1kk5v_163",
3685
- checkmark: "_checkmark_1kk5v_210",
3686
- indeterminateMark: "_indeterminateMark_1kk5v_226",
3687
- customMark: "_customMark_1kk5v_239",
3688
- label: "_label_1kk5v_115",
3689
- labelSm: "_labelSm_1kk5v_270",
3690
- labelMd: "_labelMd_1kk5v_274",
3691
- labelLg: "_labelLg_1kk5v_278",
3692
- indeterminate: "_indeterminate_1kk5v_226",
3693
- "checkbox-pop": "_checkbox-pop_1kk5v_1",
3694
- "checkbox-checkmark-in": "_checkbox-checkmark-in_1kk5v_1",
3695
- "checkbox-indeterminate-in": "_checkbox-indeterminate-in_1kk5v_1",
3696
- disabled: "_disabled_1kk5v_361"
3677
+ wrapper: "_wrapper_11rc7_1",
3678
+ colorPrimary: "_colorPrimary_11rc7_35",
3679
+ colorNeutral: "_colorNeutral_11rc7_53",
3680
+ colorSuccess: "_colorSuccess_11rc7_71",
3681
+ colorWarning: "_colorWarning_11rc7_89",
3682
+ colorDanger: "_colorDanger_11rc7_107",
3683
+ labelStart: "_labelStart_11rc7_123",
3684
+ wrapperSm: "_wrapperSm_11rc7_127",
3685
+ wrapperMd: "_wrapperMd_11rc7_133",
3686
+ wrapperLg: "_wrapperLg_11rc7_139",
3687
+ iconOnly: "_iconOnly_11rc7_145",
3688
+ container: "_container_11rc7_151",
3689
+ containerSm: "_containerSm_11rc7_158",
3690
+ containerMd: "_containerMd_11rc7_162",
3691
+ containerLg: "_containerLg_11rc7_166",
3692
+ containerLabelStart: "_containerLabelStart_11rc7_170",
3693
+ descriptionText: "_descriptionText_11rc7_170",
3694
+ errorText: "_errorText_11rc7_171",
3695
+ input: "_input_11rc7_175",
3696
+ customCheckbox: "_customCheckbox_11rc7_187",
3697
+ requiredMark: "_requiredMark_11rc7_202",
3698
+ error: "_error_11rc7_171",
3699
+ checkmark: "_checkmark_11rc7_218",
3700
+ indeterminateMark: "_indeterminateMark_11rc7_234",
3701
+ customMark: "_customMark_11rc7_247",
3702
+ label: "_label_11rc7_123",
3703
+ labelSm: "_labelSm_11rc7_278",
3704
+ labelMd: "_labelMd_11rc7_282",
3705
+ labelLg: "_labelLg_11rc7_286",
3706
+ indeterminate: "_indeterminate_11rc7_234",
3707
+ "checkbox-pop": "_checkbox-pop_11rc7_1",
3708
+ "checkbox-checkmark-in": "_checkbox-checkmark-in_11rc7_1",
3709
+ "checkbox-indeterminate-in": "_checkbox-indeterminate-in_11rc7_1",
3710
+ disabled: "_disabled_11rc7_369"
3697
3711
  }, Or = {
3698
3712
  sm: Q.labelSm,
3699
3713
  md: Q.labelMd,
@@ -3717,7 +3731,7 @@ var Q = {
3717
3731
  E,
3718
3732
  N,
3719
3733
  F
3720
- ].filter(Boolean).join(" "), [L, R] = _e({
3734
+ ].filter(Boolean).join(" "), [L, R] = U({
3721
3735
  value: s,
3722
3736
  defaultValue: m,
3723
3737
  onChange: S
@@ -3863,39 +3877,39 @@ var $ = {
3863
3877
  r < n.length && (i += e);
3864
3878
  }
3865
3879
  return i;
3866
- }, Ir = (e, t) => t ? typeof t == "function" ? t(e) : Fr(e, t) : e, Lr = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: h = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: N, endIcon: F, startAddon: I, endAddon: L, prefix: R, suffix: z, clearIcon: ee, mask: B, format: te, parse: ne, startIconTone: re = "default", endIconTone: ie = "default", clearIconTone: ae = "danger", autoFocus: oe, maxLength: se, onMouseEnter: ce, onMouseLeave: le, "aria-describedby": V, "aria-invalid": ue, "aria-labelledby": de, ...fe }, pe) => {
3867
- let me = p(), he = wn(), H = !!(i || o || v), ge = e ?? (H ? void 0 : he?.controlId) ?? me, _e = g(null), [ve, ye] = _(!1), [be, xe] = _(l ?? ""), U = c !== void 0, Se = String((U ? c : be) ?? ""), Ce = te ? te(Se) : Se, we = Se.length > 0, Te = f ?? he?.size ?? "md", Ee = y || !!v || !H && !!he?.invalid, De = b || !H && !!he?.disabled, Oe = x || !H && !!he?.required, ke = D || S, Ae = d === "password", je = Ae && j && ve ? "text" : d, Me = N ?? (d === "search" ? /* @__PURE__ */ n(C, {}) : null), Ne = F, Pe = Pr(d, E), W = S && !De, Fe = O && we && !De && !ke && !W, G = j && Ae && !De && !W && !Fe, Ie = !W && !Fe && !G && !!Ne, Le = !!(M && se), Re = o ? `${ge}-description` : void 0, ze = v ? `${ge}-error` : void 0, Be = Le ? `${ge}-counter` : void 0, Ve = [
3868
- V,
3869
- !H && !V ? he?.ariaDescribedBy : void 0,
3880
+ }, Ir = (e, t) => t ? typeof t == "function" ? t(e) : Fr(e, t) : e, Lr = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: h = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: S = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: N, endIcon: F, startAddon: I, endAddon: L, prefix: R, suffix: z, 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, ...H }, fe) => {
3881
+ let pe = p(), me = wn(), he = !!(i || o || v), ge = e ?? (he ? void 0 : me?.controlId) ?? pe, U = g(null), [_e, ve] = _(!1), [ye, be] = _(l ?? ""), W = c !== void 0, xe = String((W ? c : ye) ?? ""), Se = te ? te(xe) : xe, Ce = xe.length > 0, we = f ?? me?.size ?? "md", Te = y || !!v || !he && !!me?.invalid, Ee = b || !he && !!me?.disabled, De = x || !he && !!me?.required, Oe = D || S, ke = d === "password", Ae = ke && j && _e ? "text" : d, je = N ?? (d === "search" ? /* @__PURE__ */ n(C, {}) : null), Me = F, Ne = Pr(d, E), G = S && !Ee, Pe = O && Ce && !Ee && !Oe && !G, K = j && ke && !Ee && !G && !Pe, Fe = !G && !Pe && !K && !!Me, Ie = !!(M && V), Le = o ? `${ge}-description` : void 0, Re = v ? `${ge}-error` : void 0, ze = Ie ? `${ge}-counter` : void 0, Be = [
3882
+ le,
3883
+ !he && !le ? me?.ariaDescribedBy : void 0,
3884
+ Le,
3870
3885
  Re,
3871
- ze,
3872
- Be
3873
- ].filter(Boolean).join(" "), K = ee ?? "×", q = !!(Me || R), He = !!(Ne || z || Fe || G || W), Ue = !!(Me && R), We = !!(Ne && z), Ge = !!(I || L), Ke = u((e) => {
3874
- if (_e.current = e, typeof pe == "function") {
3875
- pe(e);
3886
+ ze
3887
+ ].filter(Boolean).join(" "), Ve = ee ?? "×", q = !!(je || R), He = !!(Me || z || Pe || K || G), Ue = !!(je && R), We = !!(Me && z), Ge = !!(I || L), Ke = u((e) => {
3888
+ if (U.current = e, typeof fe == "function") {
3889
+ fe(e);
3876
3890
  return;
3877
3891
  }
3878
- pe && (pe.current = e);
3879
- }, [pe]), qe = u((e) => {
3892
+ fe && (fe.current = e);
3893
+ }, [fe]), qe = u((e) => {
3880
3894
  let t = Ir(ne ? ne(e.target.value) : e.target.value, B);
3881
- U || xe(t), A?.(t);
3895
+ W || be(t), A?.(t);
3882
3896
  }, [
3883
- U,
3897
+ W,
3884
3898
  B,
3885
3899
  A,
3886
3900
  ne
3887
3901
  ]), Je = u(() => {
3888
- U || xe(""), A?.(""), k?.(), _e.current?.focus();
3902
+ W || be(""), A?.(""), k?.(), U.current?.focus();
3889
3903
  }, [
3890
- U,
3904
+ W,
3891
3905
  k,
3892
3906
  A
3893
3907
  ]), Ye = /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
3894
3908
  className: P($.inputGroup, $[h], $[m], {
3895
3909
  [$.hasAddons]: Ge,
3896
- [$.isDisabled]: De,
3897
- [$.isInvalid]: Ee,
3898
- [$.isLoading]: W
3910
+ [$.isDisabled]: Ee,
3911
+ [$.isInvalid]: Te,
3912
+ [$.isLoading]: G
3899
3913
  }),
3900
3914
  children: [
3901
3915
  I && /* @__PURE__ */ n("span", {
@@ -3910,37 +3924,37 @@ var $ = {
3910
3924
  [$.hasEndIconAndSuffix]: We
3911
3925
  }),
3912
3926
  children: [
3913
- Me && /* @__PURE__ */ n("span", {
3927
+ je && /* @__PURE__ */ n("span", {
3914
3928
  "aria-hidden": "true",
3915
3929
  className: P($.startAdornment, Nr[re]),
3916
- children: Me
3930
+ children: je
3917
3931
  }),
3918
3932
  R && /* @__PURE__ */ n("span", {
3919
3933
  className: $.prefix,
3920
3934
  children: R
3921
3935
  }),
3922
3936
  /* @__PURE__ */ n("input", {
3923
- ...fe,
3937
+ ...H,
3924
3938
  ref: Ke,
3925
3939
  id: ge,
3926
3940
  name: a,
3927
- type: je,
3928
- autoComplete: Pe,
3929
- className: P($.input, $[Te], { [$.error]: Ee }, w),
3930
- value: Ce,
3941
+ type: Ae,
3942
+ autoComplete: Ne,
3943
+ className: P($.input, $[we], { [$.error]: Te }, w),
3944
+ value: Se,
3931
3945
  onChange: qe,
3932
3946
  placeholder: s,
3933
- disabled: De,
3934
- readOnly: ke,
3935
- required: Oe,
3947
+ disabled: Ee,
3948
+ readOnly: Oe,
3949
+ required: De,
3936
3950
  autoFocus: oe,
3937
- maxLength: se,
3938
- "aria-invalid": Ee ? !0 : ue,
3939
- "aria-labelledby": de ?? (H ? void 0 : he?.ariaLabelledBy),
3940
- "aria-describedby": Ve || void 0,
3951
+ maxLength: V,
3952
+ "aria-invalid": Te ? !0 : ue,
3953
+ "aria-labelledby": de ?? (he ? void 0 : me?.ariaLabelledBy),
3954
+ "aria-describedby": Be || void 0,
3941
3955
  "aria-busy": S || void 0,
3942
- onMouseEnter: ce,
3943
- onMouseLeave: le
3956
+ onMouseEnter: se,
3957
+ onMouseLeave: ce
3944
3958
  }),
3945
3959
  z && /* @__PURE__ */ n("span", {
3946
3960
  className: $.suffix,
@@ -3949,29 +3963,29 @@ var $ = {
3949
3963
  /* @__PURE__ */ r("div", {
3950
3964
  className: $.endSlot,
3951
3965
  children: [
3952
- W && /* @__PURE__ */ n("span", {
3966
+ G && /* @__PURE__ */ n("span", {
3953
3967
  className: $.spinner,
3954
3968
  "aria-hidden": "true",
3955
3969
  "data-testid": "input-spinner"
3956
3970
  }),
3957
- G && /* @__PURE__ */ n("button", {
3971
+ K && /* @__PURE__ */ n("button", {
3958
3972
  type: "button",
3959
3973
  className: $.iconButton,
3960
- onClick: () => ye((e) => !e),
3961
- "aria-label": ve ? "Hide password" : "Show password",
3962
- children: ve ? "Hide" : "Show"
3974
+ onClick: () => ve((e) => !e),
3975
+ "aria-label": _e ? "Hide password" : "Show password",
3976
+ children: _e ? "Hide" : "Show"
3963
3977
  }),
3964
- Fe && /* @__PURE__ */ n("button", {
3978
+ Pe && /* @__PURE__ */ n("button", {
3965
3979
  type: "button",
3966
3980
  className: P($.clearButton, Nr[ae]),
3967
3981
  onClick: Je,
3968
3982
  "aria-label": "Clear input",
3969
- children: K
3983
+ children: Ve
3970
3984
  }),
3971
- Ie && Ne && /* @__PURE__ */ n("span", {
3985
+ Fe && Me && /* @__PURE__ */ n("span", {
3972
3986
  "aria-hidden": "true",
3973
3987
  className: P($.endAdornment, Nr[ie]),
3974
- children: Ne
3988
+ children: Me
3975
3989
  })
3976
3990
  ]
3977
3991
  })
@@ -3982,24 +3996,24 @@ var $ = {
3982
3996
  children: L
3983
3997
  })
3984
3998
  ]
3985
- }), Le && /* @__PURE__ */ r("div", {
3986
- id: Be,
3999
+ }), Ie && /* @__PURE__ */ r("div", {
4000
+ id: ze,
3987
4001
  className: $.counter,
3988
4002
  children: [
3989
- Se.length,
4003
+ xe.length,
3990
4004
  " / ",
3991
- se
4005
+ V
3992
4006
  ]
3993
4007
  })] });
3994
- return !H && he ? Ye : /* @__PURE__ */ n(Dn, {
4008
+ return !he && me ? Ye : /* @__PURE__ */ n(Dn, {
3995
4009
  id: ge,
3996
4010
  label: i,
3997
4011
  description: o,
3998
4012
  error: v,
3999
- required: Oe,
4000
- disabled: De,
4001
- invalid: Ee,
4002
- size: Te,
4013
+ required: De,
4014
+ disabled: Ee,
4015
+ invalid: Te,
4016
+ size: we,
4003
4017
  className: T,
4004
4018
  bindControl: !1,
4005
4019
  children: Ye
@@ -4008,32 +4022,32 @@ var $ = {
4008
4022
  Lr.displayName = "Input";
4009
4023
  //#endregion
4010
4024
  //#region src/theme/ThemeContext.ts
4011
- var Rr = s(null), zr = (e) => e === "highContrast" ? "high-contrast" : e, Br = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, children: i }) => {
4012
- let [a, o] = _e({
4025
+ var Rr = s(null), zr = (e) => e === "highContrast" ? "high-contrast" : e, Br = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, syncDocument: i = !0, children: a }) => {
4026
+ let [o, s] = U({
4013
4027
  value: e,
4014
4028
  defaultValue: t,
4015
4029
  onChange: r
4016
- }), s = zr(a);
4030
+ }), c = zr(o);
4017
4031
  f(() => {
4018
- if (typeof document > "u") return;
4032
+ if (!i || typeof document > "u") return;
4019
4033
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
4020
- return e.dataset.velliraTheme = s, () => {
4034
+ return e.dataset.velliraTheme = c, () => {
4021
4035
  if (t === void 0) {
4022
4036
  delete e.dataset.velliraTheme;
4023
4037
  return;
4024
4038
  }
4025
4039
  e.dataset.velliraTheme = t;
4026
4040
  };
4027
- }, [s]);
4028
- let c = h(() => ({
4029
- theme: a,
4030
- setTheme: o
4031
- }), [a, o]);
4041
+ }, [c, i]);
4042
+ let l = h(() => ({
4043
+ theme: o,
4044
+ setTheme: s
4045
+ }), [o, s]);
4032
4046
  return /* @__PURE__ */ n(Rr.Provider, {
4033
- value: c,
4047
+ value: l,
4034
4048
  children: /* @__PURE__ */ n("div", {
4035
- "data-vellira-theme": s,
4036
- children: i
4049
+ "data-vellira-theme": c,
4050
+ children: a
4037
4051
  })
4038
4052
  });
4039
4053
  };
@@ -4046,4 +4060,4 @@ function Vr() {
4046
4060
  return e;
4047
4061
  }
4048
4062
  //#endregion
4049
- export { Dr as Button, Mr as Checkbox, gt as Dropdown, Dn as FormField, Lr as Input, Vt as Modal, we as Portal, Ce as PortalProvider, Kt as Radio, tn as RadioGroup, Hn as Select, cr as Tabs, Br as ThemeProvider, Tr as Tooltip, Vr as useTheme };
4063
+ export { Dr as Button, Mr as Checkbox, gt as Dropdown, Dn as FormField, Lr as Input, Vt as Modal, Ce as Portal, Se as PortalProvider, Kt as Radio, tn as RadioGroup, Hn as Select, cr as Tabs, Br as ThemeProvider, Tr as Tooltip, Vr as useTheme };