@vellira-ui/react 2.38.0 → 2.39.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
@@ -398,12 +398,12 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
398
398
  return f(() => {
399
399
  n(!0);
400
400
  }, []), t ? e ?? document.getElementById("overlay-root") ?? me() : null;
401
- }, ge = ({ value: e, defaultValue: t, onChange: n }) => {
401
+ }, U = ({ value: e, defaultValue: t, onChange: n }) => {
402
402
  let [r, i] = g(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
- }, _e = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: o, getItemText: s, loop: c = !0 }) => {
406
+ }, ge = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: o, getItemText: s, loop: c = !0 }) => {
407
407
  let l = h({
408
408
  value: "",
409
409
  timeoutId: void 0
@@ -486,7 +486,7 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
486
486
  m,
487
487
  g
488
488
  ]) };
489
- }, ve = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: o, getItemText: s, loop: c = !0 }) => {
489
+ }, _e = ({ 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] = g(n), [p, m] = g(-1), h = t !== void 0, _ = 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 B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
541
541
  p,
542
542
  e,
543
543
  T
544
- ]), { onKeyDown: D } = _e({
544
+ ]), { onKeyDown: D } = ge({
545
545
  activeIndex: p,
546
546
  setActiveIndex: m,
547
547
  items: e,
@@ -570,8 +570,8 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
570
570
  getFirstEnabledIndex: v,
571
571
  getLastEnabledIndex: y
572
572
  };
573
- }, ye = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
574
- let a = p(), o = p(), s = p(), [c, l] = ge({
573
+ }, ve = ({ 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 B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
589
589
  titleId: o,
590
590
  descriptionId: s
591
591
  };
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 [h, _] = ge({
592
+ }, ye = ({ 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 [h, _] = U({
594
594
  value: e,
595
595
  defaultValue: t ?? (a ? [] : ""),
596
596
  onChange: n ?? r
597
- }), [v, y] = ge({
597
+ }), [v, y] = U({
598
598
  value: l,
599
599
  defaultValue: d,
600
600
  onChange: p
@@ -663,7 +663,7 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
663
663
  b,
664
664
  i,
665
665
  k
666
- ]), { onKeyDown: j } = _e({
666
+ ]), { onKeyDown: j } = ge({
667
667
  activeIndex: b,
668
668
  setActiveIndex: x,
669
669
  items: i,
@@ -693,8 +693,8 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
693
693
  selectActiveOption: A,
694
694
  onKeyDown: j
695
695
  };
696
- }, xe = ({ activeIndex: e, defaultActiveIndex: t = 0, onChange: n }) => {
697
- let [r, i] = ge({
696
+ }, be = ({ activeIndex: e, defaultActiveIndex: t = 0, onChange: n }) => {
697
+ let [r, i] = U({
698
698
  value: e,
699
699
  defaultValue: t,
700
700
  onChange: n
@@ -703,7 +703,7 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
703
703
  activeIndex: r,
704
704
  setActiveIndex: i
705
705
  };
706
- }, U = ({ activeIndex: e, setActiveIndex: t, tabRefs: n, orientation: r = "horizontal", onNavigate: i }) => ({ onKeyDown: u((a) => {
706
+ }, W = ({ activeIndex: e, setActiveIndex: t, tabRefs: n, orientation: r = "horizontal", onNavigate: i }) => ({ onKeyDown: u((a) => {
707
707
  let o = (e) => !!(e?.disabled || e?.props?.disabled), s = (e, t) => {
708
708
  let r = n.current.length;
709
709
  if (!r) return e;
@@ -752,15 +752,15 @@ var B = I("checkboxItem", "Dropdown.CheckboxItem"), te = ({ active: e, enabled:
752
752
  r,
753
753
  t,
754
754
  n
755
- ]) }), Se = s(null), Ce = ({ children: e, container: t = null }) => /* @__PURE__ */ n(Se.Provider, {
755
+ ]) }), xe = s(null), Se = ({ children: e, container: t = null }) => /* @__PURE__ */ n(xe.Provider, {
756
756
  value: t,
757
757
  children: e
758
- }), we = ({ children: e, container: t }) => {
759
- let n = d(Se), r = he({ container: t ?? n });
758
+ }), Ce = ({ children: e, container: t }) => {
759
+ let n = d(xe), r = he({ container: t ?? n });
760
760
  return r ? _(e, r) : null;
761
761
  };
762
- we.__velliraPortal = !0, we.displayName = "Portal", Ce.displayName = "PortalProvider";
763
- var Te = {
762
+ Ce.__velliraPortal = !0, Ce.displayName = "Portal", Se.displayName = "PortalProvider";
763
+ var we = {
764
764
  dropdown: "_dropdown_m7rnq_1",
765
765
  "dropdown-in": "_dropdown-in_m7rnq_1",
766
766
  primary: "_primary_m7rnq_42",
@@ -772,31 +772,31 @@ var Te = {
772
772
  searchWrap: "_searchWrap_m7rnq_165",
773
773
  search: "_search_m7rnq_165",
774
774
  "dropdown-sheet-in": "_dropdown-sheet-in_m7rnq_1"
775
- }, Ee = I("empty", "Dropdown.Empty"), De = ({ children: e }) => /* @__PURE__ */ n("li", {
775
+ }, Te = I("empty", "Dropdown.Empty"), Ee = ({ children: e }) => /* @__PURE__ */ n("li", {
776
776
  role: "presentation",
777
- className: Te.empty,
777
+ className: we.empty,
778
778
  children: e ?? "No actions available"
779
779
  });
780
- De.displayName = "DropdownEmptySurface";
780
+ Ee.displayName = "DropdownEmptySurface";
781
781
  //#endregion
782
782
  //#region src/components/Dropdown/Group/DropdownGroup.tsx
783
- var Oe = I("group", "Dropdown.Group"), ke = () => null;
784
- ke.displayName = "DropdownGroupSurface";
783
+ var De = I("group", "Dropdown.Group"), Oe = () => null;
784
+ Oe.displayName = "DropdownGroupSurface";
785
785
  //#endregion
786
786
  //#region src/components/Dropdown/internal/DropdownContext.tsx
787
- var Ae = s(null), je = s(null), Me = s(null), Ne = Ae.Provider, Pe = je.Provider;
788
- Me.Provider;
789
- function W() {
790
- let e = d(Ae);
787
+ var ke = s(null), Ae = s(null), je = s(null), Me = ke.Provider, Ne = Ae.Provider;
788
+ je.Provider;
789
+ function G() {
790
+ let e = d(ke);
791
791
  if (!e) throw Error("Dropdown compound components must be used inside Dropdown.");
792
792
  return e;
793
793
  }
794
- function Fe() {
795
- let e = d(je);
794
+ function Pe() {
795
+ let e = d(Ae);
796
796
  if (!e) throw Error("Dropdown.Trigger must be used inside Dropdown.");
797
797
  return e;
798
798
  }
799
- var G = {
799
+ var K = {
800
800
  item: "_item_1vj4n_1",
801
801
  disabled: "_disabled_1vj4n_22",
802
802
  active: "_active_1vj4n_37",
@@ -821,8 +821,8 @@ var G = {
821
821
  "dropdown-sub-in": "_dropdown-sub-in_1vj4n_1",
822
822
  subLabel: "_subLabel_1vj4n_276",
823
823
  subSeparator: "_subSeparator_1vj4n_284"
824
- }, Ie = I("item", "Dropdown.Item"), Le = ({ item: e, itemIndex: i }) => {
825
- let a = W(), o = h(void 0), [s, c] = g(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, _ = a.loading || e.disabled, y = e.props, x = R(y.children), S = x.icon ?? y.icon, C = x.description ?? ("description" in y ? y.description : void 0), w = x.badge ?? ("badge" in y ? y.badge : void 0), T = x.shortcut ?? y.shortcut, E = x.content.length ? x.content : y.children, D = "color" in y ? y.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", P = 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) => {
824
+ }, Fe = I("item", "Dropdown.Item"), Ie = ({ item: e, itemIndex: i }) => {
825
+ let a = G(), o = h(void 0), [s, c] = g(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, _ = a.loading || e.disabled, y = e.props, x = R(y.children), S = x.icon ?? y.icon, C = x.description ?? ("description" in y ? y.description : void 0), w = x.badge ?? ("badge" in y ? y.badge : void 0), T = x.shortcut ?? y.shortcut, E = x.content.length ? x.content : y.children, D = "color" in y ? y.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", P = 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) => {
826
826
  if (_) {
827
827
  t.preventDefault();
828
828
  return;
@@ -831,7 +831,7 @@ var G = {
831
831
  let t = !m;
832
832
  c(t), e.props.onCheckedChange?.(t);
833
833
  }
834
- a.selectItem(e, Re(t));
834
+ a.selectItem(e, Le(t));
835
835
  };
836
836
  return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r(F, {
837
837
  id: j,
@@ -847,11 +847,11 @@ var G = {
847
847
  "aria-expanded": p ? u : void 0,
848
848
  "data-active": l || void 0,
849
849
  "data-state": u ? "open" : void 0,
850
- className: N(G.item, G[a.size], {
851
- [G.active]: l,
852
- [G.disabled]: _,
853
- [G.checked]: m
854
- }, D && D !== "default" ? G[D] : void 0, y.className),
850
+ className: N(K.item, K[a.size], {
851
+ [K.active]: l,
852
+ [K.disabled]: _,
853
+ [K.checked]: m
854
+ }, D && D !== "default" ? K[D] : void 0, y.className),
855
855
  onClick: L,
856
856
  onMouseEnter: () => {
857
857
  _ || (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)));
@@ -861,58 +861,58 @@ var G = {
861
861
  },
862
862
  children: [
863
863
  I && /* @__PURE__ */ n("span", {
864
- className: G.indicator,
864
+ className: K.indicator,
865
865
  "aria-hidden": "true",
866
866
  children: m ? /* @__PURE__ */ n(v, {}) : null
867
867
  }),
868
868
  S && /* @__PURE__ */ n("span", {
869
- className: G.itemIcon,
869
+ className: K.itemIcon,
870
870
  children: S
871
871
  }),
872
872
  /* @__PURE__ */ r("span", {
873
- className: G.itemText,
873
+ className: K.itemText,
874
874
  children: [/* @__PURE__ */ n("span", {
875
- className: G.itemLabel,
875
+ className: K.itemLabel,
876
876
  children: E
877
877
  }), C && /* @__PURE__ */ n("span", {
878
- className: G.itemDescription,
878
+ className: K.itemDescription,
879
879
  children: C
880
880
  })]
881
881
  }),
882
882
  w && /* @__PURE__ */ n("span", {
883
- className: G.itemBadge,
883
+ className: K.itemBadge,
884
884
  children: w
885
885
  }),
886
886
  T && /* @__PURE__ */ n("span", {
887
- className: G.itemShortcut,
887
+ className: K.itemShortcut,
888
888
  children: T
889
889
  }),
890
890
  p && /* @__PURE__ */ n("span", {
891
- className: G.itemShortcut,
891
+ className: K.itemShortcut,
892
892
  "aria-hidden": "true",
893
893
  children: /* @__PURE__ */ n(b, {})
894
894
  })
895
895
  ]
896
896
  }), p && u && e.subEntries.length > 0 && /* @__PURE__ */ n("ul", {
897
897
  role: "menu",
898
- className: G.subContent,
898
+ className: K.subContent,
899
899
  onMouseEnter: () => a.setOpenSubId(e.id),
900
900
  children: e.subEntries.map((e) => e.type === "label" ? /* @__PURE__ */ n("li", {
901
901
  role: "presentation",
902
- className: G.subLabel,
902
+ className: K.subLabel,
903
903
  children: e.props.children
904
904
  }, e.id) : e.type === "separator" ? /* @__PURE__ */ n("li", {
905
905
  role: "separator",
906
- className: G.subSeparator,
906
+ className: K.subSeparator,
907
907
  "aria-hidden": "true"
908
- }, e.id) : e.type === "item" ? /* @__PURE__ */ n(ze, {
908
+ }, e.id) : e.type === "item" ? /* @__PURE__ */ n(Re, {
909
909
  item: e.item,
910
910
  id: `${j}-${e.itemIndex}`
911
911
  }, e.item.id) : null)
912
912
  })] });
913
913
  };
914
- Le.displayName = "DropdownItemRow";
915
- function Re(e) {
914
+ Ie.displayName = "DropdownItemRow";
915
+ function Le(e) {
916
916
  let t = !1;
917
917
  return {
918
918
  originalEvent: e,
@@ -924,8 +924,8 @@ function Re(e) {
924
924
  }
925
925
  };
926
926
  }
927
- function ze({ id: e, item: t }) {
928
- let i = W(), [a, o] = g(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 = R(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, _ = d.content.length ? d.content : u.children, y = "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) => {
927
+ function Re({ id: e, item: t }) {
928
+ let i = G(), [a, o] = g(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 = R(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, _ = d.content.length ? d.content : u.children, y = "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) => {
929
929
  if (b) {
930
930
  e.preventDefault();
931
931
  return;
@@ -934,7 +934,7 @@ function ze({ id: e, item: t }) {
934
934
  let e = !l;
935
935
  o(e), t.props.onCheckedChange?.(e);
936
936
  }
937
- i.selectItem(t, Re(e));
937
+ i.selectItem(t, Le(e));
938
938
  };
939
939
  return /* @__PURE__ */ r(E, {
940
940
  id: e,
@@ -946,54 +946,54 @@ function ze({ id: e, item: t }) {
946
946
  tabIndex: b ? -1 : 0,
947
947
  "aria-disabled": b || void 0,
948
948
  "aria-checked": s || c ? l : void 0,
949
- className: N(G.item, G[i.size], {
950
- [G.disabled]: b,
951
- [G.checked]: l
952
- }, y && y !== "default" ? G[y] : void 0),
949
+ className: N(K.item, K[i.size], {
950
+ [K.disabled]: b,
951
+ [K.checked]: l
952
+ }, y && y !== "default" ? K[y] : void 0),
953
953
  onClick: O,
954
954
  children: [
955
955
  D && /* @__PURE__ */ n("span", {
956
- className: G.indicator,
956
+ className: K.indicator,
957
957
  "aria-hidden": "true",
958
958
  children: l ? /* @__PURE__ */ n(v, {}) : null
959
959
  }),
960
960
  f && /* @__PURE__ */ n("span", {
961
- className: G.itemIcon,
961
+ className: K.itemIcon,
962
962
  children: f
963
963
  }),
964
964
  /* @__PURE__ */ r("span", {
965
- className: G.itemText,
965
+ className: K.itemText,
966
966
  children: [/* @__PURE__ */ n("span", {
967
- className: G.itemLabel,
967
+ className: K.itemLabel,
968
968
  children: _
969
969
  }), p && /* @__PURE__ */ n("span", {
970
- className: G.itemDescription,
970
+ className: K.itemDescription,
971
971
  children: p
972
972
  })]
973
973
  }),
974
974
  m && /* @__PURE__ */ n("span", {
975
- className: G.itemBadge,
975
+ className: K.itemBadge,
976
976
  children: m
977
977
  }),
978
978
  h && /* @__PURE__ */ n("span", {
979
- className: G.itemShortcut,
979
+ className: K.itemShortcut,
980
980
  children: h
981
981
  })
982
982
  ]
983
983
  });
984
984
  }
985
- var Be = { group: "_group_aviwv_1" }, Ve = I("label", "Dropdown.Label"), K = ({ children: e, className: t }) => /* @__PURE__ */ n("li", {
985
+ var ze = { group: "_group_aviwv_1" }, Be = I("label", "Dropdown.Label"), q = ({ children: e, className: t }) => /* @__PURE__ */ n("li", {
986
986
  role: "presentation",
987
- className: N(Be.group, t),
987
+ className: N(ze.group, t),
988
988
  children: e
989
989
  });
990
- K.displayName = "DropdownLabelSurface";
990
+ q.displayName = "DropdownLabelSurface";
991
991
  //#endregion
992
992
  //#region src/components/Dropdown/Loading/DropdownLoading.tsx
993
- var q = I("loading", "Dropdown.Loading"), He = ({ children: e }) => /* @__PURE__ */ n("li", {
993
+ var Ve = I("loading", "Dropdown.Loading"), He = ({ children: e }) => /* @__PURE__ */ n("li", {
994
994
  role: "presentation",
995
995
  "aria-live": "polite",
996
- className: Te.empty,
996
+ className: we.empty,
997
997
  children: e ?? "Loading actions..."
998
998
  });
999
999
  He.displayName = "DropdownLoadingSurface";
@@ -1006,9 +1006,9 @@ Ge.displayName = "DropdownSeparatorSurface";
1006
1006
  //#endregion
1007
1007
  //#region src/components/Dropdown/Content/DropdownContent.tsx
1008
1008
  var Ke = ({ className: e }) => {
1009
- let t = W();
1009
+ let t = G();
1010
1010
  if (!t.isOpen) return null;
1011
- let i = N(Te.dropdown, Te[t.color], t.contentProps?.className, t.dropdownClassName, e), o = /* @__PURE__ */ r("ul", {
1011
+ let i = N(we.dropdown, we[t.color], t.contentProps?.className, t.dropdownClassName, e), o = /* @__PURE__ */ r("ul", {
1012
1012
  ref: t.setContentRef,
1013
1013
  id: t.contentId,
1014
1014
  role: "menu",
@@ -1024,9 +1024,9 @@ var Ke = ({ className: e }) => {
1024
1024
  "data-color": t.color,
1025
1025
  children: [t.searchable && /* @__PURE__ */ r("li", {
1026
1026
  role: "presentation",
1027
- className: N(Te.searchWrap, t.searchProps?.className),
1027
+ className: N(we.searchWrap, t.searchProps?.className),
1028
1028
  children: [/* @__PURE__ */ n(S, { "aria-hidden": "true" }), /* @__PURE__ */ n("input", {
1029
- className: Te.search,
1029
+ className: we.search,
1030
1030
  value: t.searchValue,
1031
1031
  placeholder: t.searchPlaceholder,
1032
1032
  "aria-label": t.searchProps?.["aria-label"] ?? t.searchPlaceholder,
@@ -1036,12 +1036,12 @@ var Ke = ({ className: e }) => {
1036
1036
  e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === "Escape" || e.stopPropagation();
1037
1037
  }
1038
1038
  })]
1039
- }), 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(F, { ...e.props }, e.id) : /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(Le, {
1039
+ }), 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(q, { ...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(F, { ...e.props }, e.id) : /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(Ie, {
1040
1040
  item: e.item,
1041
1041
  itemIndex: e.itemIndex
1042
- }) }, e.item.id)) : /* @__PURE__ */ n(De, {})]
1042
+ }) }, e.item.id)) : /* @__PURE__ */ n(Ee, {})]
1043
1043
  });
1044
- return t.portal ? /* @__PURE__ */ n(we, { children: o }) : o;
1044
+ return t.portal ? /* @__PURE__ */ n(Ce, { children: o }) : o;
1045
1045
  };
1046
1046
  Ke.__velliraDropdownPart = "content", Ke.displayName = "Dropdown.Content";
1047
1047
  //#endregion
@@ -1116,17 +1116,17 @@ function rt(e) {
1116
1116
  return typeof e == "number" ? `${e}px` : e;
1117
1117
  }
1118
1118
  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: _, 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: P, noOptionsText: F, triggerClassName: I, dropdownClassName: R, className: z }) => {
1119
- let ee = p(), B = `${ee}-trigger`, te = `${ee}-menu`, ne = h(null), re = h(null), [ie, ae] = g(), [oe, V] = g({}), [ce, le] = g(A), de = k ?? ce, H = m(() => L(e), [e]), fe = H.content?.props.command ?? !1, me = D || O || fe || !!H.search, he = m(() => st(H.items), [H.items]), ge = m(() => H.items.map((e) => ({
1119
+ let ee = p(), B = `${ee}-trigger`, te = `${ee}-menu`, ne = h(null), re = h(null), [ie, ae] = g(), [oe, V] = g({}), [ce, le] = g(A), de = k ?? ce, H = m(() => L(e), [e]), fe = H.content?.props.command ?? !1, me = D || O || fe || !!H.search, he = m(() => st(H.items), [H.items]), U = m(() => H.items.map((e) => ({
1120
1120
  disabled: e.disabled,
1121
1121
  label: e.label
1122
- })), [H.items]), _e = m(() => !me || !de.trim() ? H : ct(H, de), [
1122
+ })), [H.items]), ge = m(() => !me || !de.trim() ? H : ct(H, de), [
1123
1123
  me,
1124
1124
  H,
1125
1125
  de
1126
- ]), ye = m(() => _e.items.map((e) => ({
1126
+ ]), ve = m(() => ge.items.map((e) => ({
1127
1127
  disabled: e.disabled,
1128
1128
  label: e.label
1129
- })), [_e.items]);
1129
+ })), [ge.items]);
1130
1130
  f(() => {
1131
1131
  V((e) => {
1132
1132
  let t = { ...e };
@@ -1135,39 +1135,39 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1135
1135
  }), t;
1136
1136
  });
1137
1137
  }, [he]);
1138
- let { activeIndex: be, setActiveIndex: xe, isOpen: U, closeDropdown: Se, toggleDropdown: Ce, onKeyDown: we } = ve({
1139
- items: me ? ye : ge,
1138
+ let { activeIndex: ye, setActiveIndex: be, isOpen: W, closeDropdown: xe, toggleDropdown: Se, onKeyDown: Ce } = _e({
1139
+ items: me ? ve : U,
1140
1140
  open: t,
1141
1141
  defaultOpen: i,
1142
1142
  disabled: w,
1143
1143
  onOpenChange: a,
1144
- getItemValue: (e, t) => (me ? _e.items : H.items)[t]?.id ?? "",
1144
+ getItemValue: (e, t) => (me ? ge.items : H.items)[t]?.id ?? "",
1145
1145
  getItemText: (e) => e.label,
1146
1146
  loop: C
1147
- }), { floatingStyles: Te, setRef: Ee, setFloatingRef: De } = et({
1148
- open: U,
1147
+ }), { floatingStyles: we, setRef: Te, setFloatingRef: Ee } = et({
1148
+ open: W,
1149
1149
  placement: c,
1150
1150
  matchTriggerWidth: d,
1151
1151
  avoidCollisions: b,
1152
1152
  offset: l,
1153
1153
  mobileSheetBreakpoint: 640
1154
- }), Oe = u((e) => {
1155
- k === void 0 && le(e), M?.(e), xe(0);
1154
+ }), De = u((e) => {
1155
+ k === void 0 && le(e), M?.(e), be(0);
1156
1156
  }, [
1157
1157
  M,
1158
1158
  k,
1159
- xe
1160
- ]), { isTopOverlay: ke } = ue({
1161
- active: U,
1159
+ be
1160
+ ]), { isTopOverlay: Oe } = ue({
1161
+ active: W,
1162
1162
  id: te
1163
1163
  });
1164
1164
  pe({
1165
- active: U,
1165
+ active: W,
1166
1166
  enabled: x
1167
1167
  });
1168
- let Ae = u(() => {
1169
- Se(), ne.current?.focus();
1170
- }, [Se]), je = u((e, t) => {
1168
+ let ke = u(() => {
1169
+ xe(), ne.current?.focus();
1170
+ }, [xe]), Ae = u((e, t) => {
1171
1171
  if (e.disabled || T) return;
1172
1172
  if (e.type === "subTrigger") {
1173
1173
  ae(e.id);
@@ -1178,13 +1178,13 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1178
1178
  [e.groupId]: e.props.value
1179
1179
  })), e.groupProps?.onValueChange?.(e.props.value));
1180
1180
  let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && S);
1181
- !t.defaultPrevented && n && Ae();
1181
+ !t.defaultPrevented && n && ke();
1182
1182
  }, [
1183
- Ae,
1183
+ ke,
1184
1184
  S,
1185
1185
  T
1186
- ]), Me = u((e) => {
1187
- let t = _e.items[be];
1186
+ ]), je = u((e) => {
1187
+ let t = ge.items[ye];
1188
1188
  if (e.key === "ArrowRight" && t?.type === "subTrigger") {
1189
1189
  e.preventDefault(), ae(t.id);
1190
1190
  return;
@@ -1196,77 +1196,77 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1196
1196
  if ((e.key === "Enter" || e.key === " ") && t) {
1197
1197
  e.preventDefault();
1198
1198
  let n = ot(e);
1199
- je(t, n);
1199
+ Ae(t, n);
1200
1200
  return;
1201
1201
  }
1202
- we(e), e.key === "Escape" && ne.current?.focus();
1202
+ Ce(e), e.key === "Escape" && ne.current?.focus();
1203
1203
  }, [
1204
- be,
1205
- _e.items,
1206
- we,
1204
+ ye,
1205
+ ge.items,
1206
+ Ce,
1207
1207
  ie,
1208
- je
1209
- ]), W = u((e) => {
1210
- e.preventDefault(), Ce();
1211
- }, [Ce]), Fe = u((e) => {
1212
- ne.current = e, Ee(e);
1213
- }, [Ee]), G = u((e) => {
1214
- re.current = e, De(e), e?.focus();
1215
- }, [De]);
1208
+ Ae
1209
+ ]), G = u((e) => {
1210
+ e.preventDefault(), Se();
1211
+ }, [Se]), Pe = u((e) => {
1212
+ ne.current = e, Te(e);
1213
+ }, [Te]), K = u((e) => {
1214
+ re.current = e, Ee(e), e?.focus();
1215
+ }, [Ee]);
1216
1216
  se({
1217
- active: U,
1217
+ active: W,
1218
1218
  closeOnEscape: !0,
1219
1219
  closeOnOutsidePress: !0,
1220
1220
  contentRef: re,
1221
1221
  ignoreRefs: [ne],
1222
- isTopOverlay: ke,
1223
- requestClose: Se
1222
+ isTopOverlay: Oe,
1223
+ requestClose: xe
1224
1224
  });
1225
- let Ie = {
1226
- ...Te,
1225
+ let Fe = {
1226
+ ...we,
1227
1227
  minWidth: rt(_),
1228
1228
  maxWidth: rt(v)
1229
1229
  };
1230
- return /* @__PURE__ */ n(Pe, {
1230
+ return /* @__PURE__ */ n(Ne, {
1231
1231
  value: {
1232
1232
  disabled: w,
1233
- isOpen: U,
1233
+ isOpen: W,
1234
1234
  contentId: te,
1235
1235
  triggerId: B,
1236
1236
  triggerClassName: I,
1237
- setTriggerRef: Fe,
1238
- onClick: W,
1239
- onKeyDown: Me
1237
+ setTriggerRef: Pe,
1238
+ onClick: G,
1239
+ onKeyDown: je
1240
1240
  },
1241
- children: /* @__PURE__ */ n(Ne, {
1241
+ children: /* @__PURE__ */ n(Me, {
1242
1242
  value: {
1243
- activeIndex: be,
1243
+ activeIndex: ye,
1244
1244
  closeOnSelect: S,
1245
1245
  color: s,
1246
1246
  contentId: te,
1247
1247
  contentProps: H.content?.props,
1248
1248
  disabled: w,
1249
1249
  dropdownClassName: R,
1250
- entries: _e.entries,
1250
+ entries: ge.entries,
1251
1251
  getItemId: (e) => `${te}-item-${e}`,
1252
- isOpen: U,
1253
- items: _e.items,
1252
+ isOpen: W,
1253
+ items: ge.items,
1254
1254
  loading: T,
1255
1255
  loadingText: E,
1256
1256
  noOptionsText: P ?? F,
1257
1257
  maxWidth: v,
1258
1258
  minWidth: _,
1259
1259
  openSubId: ie,
1260
- onKeyDown: Me,
1260
+ onKeyDown: je,
1261
1261
  portal: !H.portal && y,
1262
1262
  radioValues: oe,
1263
1263
  searchPlaceholder: H.search?.props.placeholder ?? j ?? (O || fe ? "Type a command..." : "Search actions..."),
1264
1264
  searchProps: H.search?.props,
1265
1265
  searchValue: de,
1266
1266
  searchable: me,
1267
- selectItem: je,
1268
- setActiveIndex: xe,
1269
- setContentRef: G,
1267
+ selectItem: Ae,
1268
+ setActiveIndex: be,
1269
+ setContentRef: K,
1270
1270
  setOpenSubId: ae,
1271
1271
  setRadioValue: (e, t) => {
1272
1272
  V((n) => ({
@@ -1274,9 +1274,9 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1274
1274
  [e]: t
1275
1275
  }));
1276
1276
  },
1277
- setSearchValue: Oe,
1277
+ setSearchValue: De,
1278
1278
  size: o,
1279
- surfaceStyle: Ie,
1279
+ surfaceStyle: Fe,
1280
1280
  triggerId: B
1281
1281
  },
1282
1282
  children: /* @__PURE__ */ r("div", {
@@ -1335,7 +1335,7 @@ var lt = I("search", "Dropdown.Search"), ut = I("subContent", "Dropdown.SubConte
1335
1335
  }, mt = (e) => /* @__PURE__ */ n(ht, { ...e });
1336
1336
  mt.__velliraDropdownPart = "trigger", mt.displayName = "Dropdown.Trigger";
1337
1337
  var ht = ({ children: e, asChild: t = !1, disabled: i, className: a }) => {
1338
- let s = W(), c = Fe(), u = t && l(e) ? e : void 0, d = s.disabled || i, f = {
1338
+ let s = G(), c = Pe(), u = t && l(e) ? e : void 0, d = s.disabled || i, f = {
1339
1339
  id: c.triggerId,
1340
1340
  ref: u ? nt(u.props.ref, c.setTriggerRef) : c.setTriggerRef,
1341
1341
  "aria-controls": c.isOpen ? c.contentId : void 0,
@@ -1371,12 +1371,12 @@ var gt = Object.assign(at, {
1371
1371
  Trigger: mt,
1372
1372
  Content: Ke,
1373
1373
  Search: lt,
1374
- Item: Ie,
1374
+ Item: Fe,
1375
1375
  CheckboxItem: B,
1376
1376
  RadioGroup: Ze,
1377
1377
  RadioItem: Qe,
1378
- Group: Oe,
1379
- Label: Ve,
1378
+ Group: De,
1379
+ Label: Be,
1380
1380
  Separator: We,
1381
1381
  Sub: ft,
1382
1382
  SubTrigger: dt,
@@ -1390,8 +1390,8 @@ var gt = Object.assign(at, {
1390
1390
  Badge: qe,
1391
1391
  Shortcut: Xe,
1392
1392
  Arrow: F,
1393
- Empty: Ee,
1394
- Loading: q
1393
+ Empty: Te,
1394
+ Loading: Ve
1395
1395
  });
1396
1396
  gt.displayName = "Dropdown";
1397
1397
  //#endregion
@@ -1586,7 +1586,7 @@ Rt.displayName = "ModalOverlay";
1586
1586
  //#endregion
1587
1587
  //#region src/components/Modal/Root/ModalRoot.tsx
1588
1588
  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: _, onOpenAutoFocus: v, onCloseAutoFocus: y, onEscapeKeyDown: b, onPointerDownOutside: x, onInteractOutside: S, role: C = "dialog", className: w }) => {
1589
- let T = h(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } = ye({
1589
+ let T = h(null), { contentId: E, descriptionId: D, open: O, requestClose: k, setOpen: A, titleId: j } = ve({
1590
1590
  open: t,
1591
1591
  defaultOpen: r,
1592
1592
  onOpenChange: i,
@@ -1753,7 +1753,7 @@ var J = {
1753
1753
  E,
1754
1754
  S?.describedBy,
1755
1755
  y
1756
- ].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = ge({
1756
+ ].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = U({
1757
1757
  value: t,
1758
1758
  defaultValue: i,
1759
1759
  onChange: u
@@ -1856,7 +1856,7 @@ var $t = {
1856
1856
  disabled: "_disabled_1s3vp_160",
1857
1857
  invalid: "_invalid_1s3vp_176"
1858
1858
  }, 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: g, className: _, id: v, onKeyDown: y, ...b }, x) => {
1859
- let S = h(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] = ge({
1859
+ let S = h(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({
1860
1860
  value: e,
1861
1861
  defaultValue: t,
1862
1862
  onChange: i
@@ -2232,7 +2232,7 @@ var dn = ({ isOpen: e, listboxId: i, labelledById: a, setDropdownRef: o, style:
2232
2232
  })
2233
2233
  ]
2234
2234
  });
2235
- return S ? /* @__PURE__ */ n(we, { children: pe }) : pe;
2235
+ return S ? /* @__PURE__ */ n(Ce, { children: pe }) : pe;
2236
2236
  };
2237
2237
  dn.displayName = "SelectContentSurface";
2238
2238
  function fn(e) {
@@ -2661,106 +2661,106 @@ var Ln = ({ children: e, id: i, describedBy: a, labelledBy: o, isOpen: s, disabl
2661
2661
  Ln.displayName = "SelectTriggerSurface";
2662
2662
  //#endregion
2663
2663
  //#region src/components/Select/Root/SelectRoot.tsx
2664
- var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: _, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...", noOptionsText: E, size: D, color: O = "primary", variant: k = "outline", required: A = !1, disabled: 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: ce, endIcon: le, prefix: de, suffix: H, renderValue: fe, renderOption: me, onBlur: he, onFocus: ge, className: _e, triggerClassName: ve, dropdownClassName: ye }) => {
2665
- let xe = p(), U = wn(), Se = !!(i || a || z), Ce = o ?? (Se ? void 0 : U?.controlId) ?? xe, we = `${Ce}-listbox`, [Te, Ee] = g(""), 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 = [
2664
+ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label": c, "aria-describedby": l, "aria-labelledby": d, value: _, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...", noOptionsText: E, size: D, color: O = "primary", variant: k = "outline", required: A = !1, disabled: 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: ce, endIcon: le, prefix: de, suffix: H, renderValue: fe, renderOption: me, onBlur: he, onFocus: U, className: ge, triggerClassName: _e, dropdownClassName: ve }) => {
2665
+ let be = p(), W = wn(), xe = !!(i || a || z), Se = o ?? (xe ? void 0 : W?.controlId) ?? be, Ce = `${Se}-listbox`, [we, Te] = g(""), 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 = [
2666
2666
  l,
2667
- !Se && !l ? U?.ariaDescribedBy : void 0,
2668
- ke,
2669
- Oe
2670
- ].filter(Boolean).join(" "), W = h(null), Fe = h(null), [G, Ie] = g(!1), Le = F || R, { entries: Re, options: ze } = Mn(e), Be = Pn({
2671
- options: ze,
2672
- searchable: Le,
2673
- searchValue: Te
2674
- }), { selectedValue: Ve, selectedValues: K, isOpen: q, setIsOpen: He, setSelectedValue: Ue, activeIndex: We, setActiveIndex: Ge, closeDropdown: Ke, toggleDropdown: qe, selectValue: Je, onKeyDown: Ye } = be({
2667
+ !xe && !l ? W?.ariaDescribedBy : void 0,
2668
+ Oe,
2669
+ De
2670
+ ].filter(Boolean).join(" "), G = h(null), Pe = h(null), [K, Fe] = g(!1), Ie = F || R, { entries: Le, options: Re } = Mn(e), ze = Pn({
2671
+ options: Re,
2672
+ searchable: Ie,
2673
+ searchValue: we
2674
+ }), { selectedValue: Be, selectedValues: q, isOpen: Ve, setIsOpen: He, setSelectedValue: Ue, activeIndex: We, setActiveIndex: Ge, closeDropdown: Ke, toggleDropdown: qe, selectValue: Je, onKeyDown: Ye } = ye({
2675
2675
  value: _,
2676
2676
  defaultValue: v,
2677
2677
  onValueChange: y,
2678
- options: Be,
2678
+ options: ze,
2679
2679
  multiple: b,
2680
2680
  maxSelected: x,
2681
2681
  closeOnSelect: S,
2682
- disabled: Me,
2682
+ disabled: je,
2683
2683
  open: re,
2684
2684
  defaultOpen: ie,
2685
2685
  onOpenChange: ae
2686
- }), Xe = m(() => ze.find((e) => K.includes(e.value)), [ze, K]), Ze = m(() => 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({
2687
- isOpen: q,
2686
+ }), Xe = m(() => Re.find((e) => q.includes(e.value)), [Re, q]), Ze = m(() => Re.filter((e) => q.includes(e.value)), [Re, q]), Qe = !!Xe, $e = Array.isArray(Be) ? Be[0] ?? "" : Be, { floatingStyles: et, setRef: tt, setFloatingRef: nt } = Nn({
2687
+ isOpen: Ve,
2688
2688
  onOpenChange: He,
2689
2689
  placement: ee,
2690
2690
  matchTriggerWidth: B,
2691
2691
  avoidCollisions: te
2692
2692
  }), rt = u((e) => {
2693
- Je(e), W.current?.focus();
2693
+ Je(e), G.current?.focus();
2694
2694
  }, [Je]), it = u((e) => {
2695
2695
  if (!b || e.length === 0) return;
2696
- 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;
2696
+ let t = e.filter((e) => Re.some((t) => t.value === e && !t.disabled)), n = t.filter((e) => q.includes(e)), r = q.filter((e) => !t.includes(e)).length, i = typeof x == "number" ? Math.max(0, Math.min(t.length, x - r)) : t.length;
2697
2697
  if (n.length > 0 && n.length >= i) {
2698
- Ue(K.filter((e) => !t.includes(e)));
2698
+ Ue(q.filter((e) => !t.includes(e)));
2699
2699
  return;
2700
2700
  }
2701
- let a = [...K];
2701
+ let a = [...q];
2702
2702
  for (let e of t) if (!a.includes(e)) {
2703
2703
  if (typeof x == "number" && a.length >= x) break;
2704
2704
  a.push(e);
2705
2705
  }
2706
- Ue(a), S && (Ke(), W.current?.focus());
2706
+ Ue(a), S && (Ke(), G.current?.focus());
2707
2707
  }, [
2708
2708
  Ke,
2709
2709
  S,
2710
2710
  x,
2711
2711
  b,
2712
- ze,
2713
- K,
2712
+ Re,
2713
+ q,
2714
2714
  Ue
2715
2715
  ]), at = u(() => {
2716
- Je(""), V?.(), W.current?.focus();
2716
+ Je(""), V?.(), G.current?.focus();
2717
2717
  }, [V, Je]), ot = u(() => {
2718
- q || Ie(!1), qe();
2719
- }, [q, qe]), st = u((e) => {
2720
- zn(e, q) && Ie(!0), Ye(e);
2721
- }, [q, Ye]), ct = u((e) => {
2722
- Ie(!0), Ge(e);
2718
+ Ve || Fe(!1), qe();
2719
+ }, [Ve, qe]), st = u((e) => {
2720
+ zn(e, Ve) && Fe(!0), Ye(e);
2721
+ }, [Ve, Ye]), ct = u((e) => {
2722
+ Fe(!0), Ge(e);
2723
2723
  }, [Ge]), lt = u((e) => {
2724
- Ee(e), oe?.(e);
2724
+ Te(e), oe?.(e);
2725
2725
  }, [oe]), { isTopOverlay: ut } = ue({
2726
- active: q,
2727
- id: we
2726
+ active: Ve,
2727
+ id: Ce
2728
2728
  });
2729
2729
  se({
2730
- active: q,
2730
+ active: Ve,
2731
2731
  closeOnEscape: !0,
2732
2732
  closeOnOutsidePress: !0,
2733
- contentRef: Fe,
2734
- ignoreRefs: [W],
2733
+ contentRef: Pe,
2734
+ ignoreRefs: [G],
2735
2735
  isTopOverlay: ut,
2736
2736
  requestClose: Ke
2737
2737
  }), f(() => {
2738
- q || Ie(!1);
2739
- }, [q]), f(() => {
2740
- !q && Te && Ee("");
2741
- }, [q, Te]), pe({
2742
- active: q,
2738
+ Ve || Fe(!1);
2739
+ }, [Ve]), f(() => {
2740
+ !Ve && we && Te("");
2741
+ }, [Ve, we]), pe({
2742
+ active: Ve,
2743
2743
  enabled: L
2744
2744
  });
2745
2745
  let dt = u((e) => {
2746
- W.current = e, tt(e);
2746
+ G.current = e, tt(e);
2747
2747
  }, [tt]), ft = u((e) => {
2748
- Fe.current = e, nt(e);
2749
- }, [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 && K.length > 0 && !Me && !N, gt = {
2750
- id: Ce,
2751
- describedBy: Pe || void 0,
2748
+ Pe.current = e, nt(e);
2749
+ }, [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 && q.length > 0 && !je && !N, gt = {
2750
+ id: Se,
2751
+ describedBy: Ne || void 0,
2752
2752
  labelledBy: c ? void 0 : d,
2753
- isOpen: q,
2754
- disabled: Me,
2755
- required: Ne,
2756
- listboxId: we,
2753
+ isOpen: Ve,
2754
+ disabled: je,
2755
+ required: Me,
2756
+ listboxId: Ce,
2757
2757
  activeIndex: We,
2758
- ariaLabel: c ?? (!i && !U?.labelId ? Xe?.label || C : void 0),
2759
- error: je,
2758
+ ariaLabel: c ?? (!i && !W?.labelId ? Xe?.label || C : void 0),
2759
+ error: Ae,
2760
2760
  loading: N,
2761
2761
  displayText: pt,
2762
2762
  isPlaceholder: !Qe,
2763
- size: Ae,
2763
+ size: ke,
2764
2764
  color: O,
2765
2765
  variant: k,
2766
2766
  startIcon: ce,
@@ -2768,52 +2768,52 @@ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label":
2768
2768
  prefix: de,
2769
2769
  suffix: H,
2770
2770
  clearable: ht,
2771
- className: ve,
2771
+ className: _e,
2772
2772
  buttonRef: dt,
2773
2773
  onClear: at,
2774
2774
  onClick: ot,
2775
2775
  onKeyDown: st,
2776
2776
  onBlur: he,
2777
- onFocus: ge
2777
+ onFocus: U
2778
2778
  }, _t = {
2779
- isOpen: q,
2780
- listboxId: we,
2781
- labelledById: Ce,
2779
+ isOpen: Ve,
2780
+ listboxId: Ce,
2781
+ labelledById: Se,
2782
2782
  style: et,
2783
- options: Be,
2784
- entries: Le || Te ? void 0 : Re,
2783
+ options: ze,
2784
+ entries: Ie || we ? void 0 : Le,
2785
2785
  multiple: b,
2786
2786
  color: O,
2787
2787
  variant: k,
2788
- searchable: Le,
2788
+ searchable: Ie,
2789
2789
  command: R,
2790
2790
  virtual: I,
2791
2791
  portal: ne,
2792
- searchValue: Te,
2792
+ searchValue: we,
2793
2793
  loading: N,
2794
2794
  loadingText: T,
2795
2795
  noOptionsText: mt,
2796
2796
  renderOption: me,
2797
2797
  selectedValue: $e,
2798
- selectedValues: K,
2798
+ selectedValues: q,
2799
2799
  activeIndex: We,
2800
- visualActiveIndex: G ? We : -1,
2801
- className: ye,
2800
+ visualActiveIndex: K ? We : -1,
2801
+ className: ve,
2802
2802
  setDropdownRef: ft,
2803
2803
  onSelect: rt,
2804
2804
  onSelectGroup: it,
2805
2805
  onMouseEnter: ct,
2806
2806
  onSearchChange: lt
2807
- }, vt = /* @__PURE__ */ r(t, { children: [s && b && K.length > 0 && /* @__PURE__ */ n(t, { children: K.map((e) => /* @__PURE__ */ n("input", {
2807
+ }, vt = /* @__PURE__ */ r(t, { children: [s && b && q.length > 0 && /* @__PURE__ */ n(t, { children: q.map((e) => /* @__PURE__ */ n("input", {
2808
2808
  type: "hidden",
2809
2809
  name: s,
2810
2810
  value: e,
2811
- disabled: Me
2811
+ disabled: je
2812
2812
  }, e)) }), s && !b && /* @__PURE__ */ n("input", {
2813
2813
  type: "hidden",
2814
2814
  name: s,
2815
2815
  value: $e,
2816
- disabled: Me
2816
+ disabled: je
2817
2817
  })] }), yt = kn(e), bt = /* @__PURE__ */ r(rn, {
2818
2818
  value: {
2819
2819
  triggerProps: gt,
@@ -2831,15 +2831,15 @@ var Rn = ({ children: e, label: i, description: a, id: o, name: s, "aria-label":
2831
2831
  /* @__PURE__ */ n(dn, { ..._t })
2832
2832
  ]
2833
2833
  });
2834
- return !Se && U ? e ? bt : xt : /* @__PURE__ */ n(Dn, {
2835
- id: Ce,
2834
+ return !xe && W ? e ? bt : xt : /* @__PURE__ */ n(Dn, {
2835
+ id: Se,
2836
2836
  label: i,
2837
2837
  description: a,
2838
2838
  error: z,
2839
- required: Ne,
2840
- disabled: Me,
2839
+ required: Me,
2840
+ disabled: je,
2841
2841
  bindControl: !1,
2842
- className: _e,
2842
+ className: ge,
2843
2843
  children: e ? bt : xt
2844
2844
  });
2845
2845
  };
@@ -2983,13 +2983,13 @@ var Zn = {
2983
2983
  tabs: "_tabs_uqy7q_1",
2984
2984
  vertical: "_vertical_uqy7q_5"
2985
2985
  }, Qn = ({ children: e, activeIndex: t, defaultActiveIndex: r = 0, onChange: i, orientation: a = "horizontal", appearance: o = "default", className: s }) => {
2986
- let { activeIndex: c, setActiveIndex: l } = xe({
2986
+ let { activeIndex: c, setActiveIndex: l } = be({
2987
2987
  activeIndex: t,
2988
2988
  defaultActiveIndex: r,
2989
2989
  onChange: i
2990
2990
  }), d = h([]), f = u((e, t) => {
2991
2991
  d.current[e] = t;
2992
- }, []), { onKeyDown: p } = U({
2992
+ }, []), { onKeyDown: p } = W({
2993
2993
  activeIndex: c,
2994
2994
  setActiveIndex: l,
2995
2995
  tabRefs: d,
@@ -3020,81 +3020,235 @@ var $n = Object.assign(Qn, {
3020
3020
  List: Kn,
3021
3021
  Tab: Xn,
3022
3022
  Panel: Jn
3023
- }), er = {
3024
- tooltip: "_tooltip_10opu_1",
3025
- arrow: "_arrow_10opu_25"
3026
- }, tr = c(({ content: e, placement: t = "top", arrowRef: i, arrowX: a, arrowY: o, className: s, style: c, ...l }, u) => {
3027
- let d = {
3023
+ }), er = s(null), tr = s({
3024
+ delay: {
3025
+ open: 300,
3026
+ close: 100
3027
+ },
3028
+ skipDelay: 300
3029
+ }), nr = er.Provider, rr = ({ children: e, delay: t = 700, skipDelay: r = 300 }) => {
3030
+ let i = typeof t == "number" ? {
3031
+ open: t,
3032
+ close: 100
3033
+ } : t;
3034
+ return /* @__PURE__ */ n(tr.Provider, {
3035
+ value: {
3036
+ delay: i,
3037
+ skipDelay: r
3038
+ },
3039
+ children: e
3040
+ });
3041
+ };
3042
+ function ir() {
3043
+ let e = d(er);
3044
+ if (!e) throw Error("Tooltip compound components must be rendered inside Tooltip");
3045
+ return e;
3046
+ }
3047
+ function ar() {
3048
+ return d(tr);
3049
+ }
3050
+ var or = {
3051
+ tooltip: "_tooltip_v99mt_1",
3052
+ neutral: "_neutral_v99mt_22",
3053
+ sm: "_sm_v99mt_28",
3054
+ arrow: "_arrow_v99mt_34"
3055
+ }, sr = ({ className: e, style: t, ...r }) => {
3056
+ let i = ir(), a = {
3028
3057
  top: "bottom",
3029
3058
  right: "left",
3030
3059
  bottom: "top",
3031
3060
  left: "right"
3032
- }[t.split("-")[0]], f = {
3033
- position: "absolute",
3034
- pointerEvents: "none",
3035
- left: a == null ? "" : `${a}px`,
3036
- top: o == null ? "" : `${o}px`,
3037
- [d]: "-5px"
3061
+ }[i.placement.split("-")[0]];
3062
+ return /* @__PURE__ */ n("div", {
3063
+ ...r,
3064
+ ref: i.arrowRef,
3065
+ className: N(or.arrow, e),
3066
+ style: {
3067
+ left: i.arrowX == null ? void 0 : `${i.arrowX}px`,
3068
+ top: i.arrowY == null ? void 0 : `${i.arrowY}px`,
3069
+ [a]: "-5px",
3070
+ ...t
3071
+ }
3072
+ });
3073
+ };
3074
+ sr.displayName = "Tooltip.Arrow";
3075
+ //#endregion
3076
+ //#region src/components/Tooltip/internal/composeEventHandlers.ts
3077
+ function cr(e, t) {
3078
+ return (n) => {
3079
+ e?.(n), n.defaultPrevented || t?.(n);
3038
3080
  };
3039
- return /* @__PURE__ */ r("div", {
3040
- ref: u,
3041
- className: N(er.tooltip, s),
3042
- "data-placement": t,
3043
- "data-state": "open",
3044
- style: c,
3045
- ...l,
3046
- children: [e, /* @__PURE__ */ n("div", {
3047
- ref: i,
3048
- className: er.arrow,
3049
- style: f
3050
- })]
3081
+ }
3082
+ function lr(...e) {
3083
+ return (t) => {
3084
+ e.forEach((e) => {
3085
+ if (e) {
3086
+ if (typeof e == "function") {
3087
+ e(t);
3088
+ return;
3089
+ }
3090
+ e.current = t;
3091
+ }
3092
+ });
3093
+ };
3094
+ }
3095
+ //#endregion
3096
+ //#region src/components/Tooltip/Content/TooltipContent.tsx
3097
+ var ur = c(({ children: e, color: t = "neutral", size: r = "sm", forceMount: i = !1, className: a, style: o, ...s }, c) => {
3098
+ let l = ir();
3099
+ return !i && !l.open ? null : /* @__PURE__ */ n("div", {
3100
+ ...l.getContentProps({
3101
+ id: l.contentId,
3102
+ role: "tooltip",
3103
+ ...s
3104
+ }),
3105
+ ref: lr(c, l.setContentRef),
3106
+ className: N(or.tooltip, or[t], or[r], a),
3107
+ "data-placement": l.placement,
3108
+ "data-state": l.open ? "open" : "closed",
3109
+ style: {
3110
+ ...l.floatingStyles,
3111
+ ...o
3112
+ },
3113
+ children: e
3051
3114
  });
3052
3115
  });
3053
- tr.displayName = "TooltipContent";
3116
+ ur.displayName = "Tooltip.Content";
3054
3117
  //#endregion
3055
- //#region src/components/Tooltip/Tooltip.tsx
3056
- var nr = ({ children: e, placement: i = "top", content: a, disabled: o = !1, delay: s = {
3057
- open: 300,
3058
- close: 100
3059
- }, maxWidth: c = 250, className: l, onOpenChange: u }) => {
3060
- let [d, f] = g(!1), m = h(null), _ = p(), { context: v, floatingStyles: y, middlewareData: b, setRef: x, setFloatingRef: S, placement: w } = et({
3061
- open: d,
3062
- onOpenChange: (e) => {
3063
- o || (f(e), u?.(e));
3118
+ //#region src/components/Tooltip/internal/useTooltipDelay.ts
3119
+ function dr(e, t) {
3120
+ let n = ar();
3121
+ return e == null ? n.delay : typeof e == "number" ? {
3122
+ open: e,
3123
+ close: n.delay.close
3124
+ } : {
3125
+ open: e.open ?? n.delay.open,
3126
+ close: e.close ?? n.delay.close
3127
+ };
3128
+ }
3129
+ //#endregion
3130
+ //#region src/components/Tooltip/internal/useTooltipInteractions.ts
3131
+ function fr({ context: e, delay: t, disabled: n, interactive: r }) {
3132
+ return M([j(e, {
3133
+ delay: t,
3134
+ enabled: !n,
3135
+ move: !1,
3136
+ handleClose: r ? void 0 : null
3137
+ }), A(e, { enabled: !n })]);
3138
+ }
3139
+ //#endregion
3140
+ //#region src/components/Tooltip/internal/useTooltipPosition.ts
3141
+ function pr({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions: i, matchTriggerWidth: a }) {
3142
+ let o = h(null), s = et({
3143
+ open: e,
3144
+ onOpenChange: t,
3145
+ placement: n,
3146
+ offset: r,
3147
+ avoidCollisions: i,
3148
+ matchTriggerWidth: a,
3149
+ middleware: [C({ element: o })]
3150
+ });
3151
+ return {
3152
+ ...s,
3153
+ arrowRef: o,
3154
+ arrowX: s.middlewareData.arrow?.x,
3155
+ arrowY: s.middlewareData.arrow?.y
3156
+ };
3157
+ }
3158
+ //#endregion
3159
+ //#region src/components/Tooltip/Root/TooltipRoot.tsx
3160
+ var mr = ({ 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 }) => {
3161
+ let g = `${p()}-content`, _ = h(null), v = h(null), [y, b] = U({
3162
+ value: t,
3163
+ defaultValue: r,
3164
+ onChange: i
3165
+ }), x = (e) => {
3166
+ l || b(e);
3167
+ }, S = pr({
3168
+ open: y,
3169
+ onOpenChange: x,
3170
+ placement: a,
3171
+ offset: o,
3172
+ avoidCollisions: d,
3173
+ matchTriggerWidth: f
3174
+ }), C = dr(s, c), w = fr({
3175
+ context: S.context,
3176
+ delay: C,
3177
+ disabled: l,
3178
+ interactive: u
3179
+ }), { isTopOverlay: T } = ue({
3180
+ active: y,
3181
+ id: g
3182
+ });
3183
+ return se({
3184
+ active: y,
3185
+ contentRef: _,
3186
+ ignoreRefs: [v],
3187
+ closeOnEscape: !0,
3188
+ closeOnOutsidePress: !u,
3189
+ isTopOverlay: T,
3190
+ requestClose: () => x(!1)
3191
+ }), /* @__PURE__ */ n(nr, {
3192
+ value: {
3193
+ contentId: g,
3194
+ open: y,
3195
+ disabled: l,
3196
+ interactive: u,
3197
+ contentRef: _,
3198
+ arrowRef: S.arrowRef,
3199
+ arrowX: S.arrowX,
3200
+ arrowY: S.arrowY,
3201
+ placement: S.placement,
3202
+ floatingStyles: S.floatingStyles,
3203
+ setOpen: x,
3204
+ setTriggerRef: lr(v, S.setRef),
3205
+ setContentRef: lr(_, S.setFloatingRef),
3206
+ getTriggerProps: w.getReferenceProps,
3207
+ getContentProps: w.getFloatingProps
3064
3208
  },
3065
- placement: i,
3066
- middleware: [C({ element: m })]
3067
- }), T = b.arrow?.x, E = b.arrow?.y, { getReferenceProps: D, getFloatingProps: O } = M([j(v, { delay: {
3068
- open: s.open,
3069
- close: s.close
3070
- } }), A(v)]);
3071
- return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
3072
- ref: x,
3073
- style: { display: "inline-flex" },
3074
- "aria-describedby": d ? _ : void 0,
3075
- ...D(),
3076
3209
  children: e
3077
- }), /* @__PURE__ */ n(we, { children: d && a && /* @__PURE__ */ n(tr, {
3078
- id: _,
3079
- ref: S,
3080
- content: a,
3081
- arrowRef: m,
3082
- arrowX: T,
3083
- arrowY: E,
3084
- role: "tooltip",
3085
- style: {
3086
- ...y,
3087
- maxWidth: typeof c == "number" ? `${c}px` : c
3088
- },
3089
- placement: w,
3090
- className: l,
3091
- ...O()
3092
- }) })] });
3210
+ });
3093
3211
  };
3094
- nr.displayName = "Tooltip";
3212
+ mr.displayName = "Tooltip.Root";
3213
+ //#endregion
3214
+ //#region src/components/Tooltip/Trigger/TooltipTrigger.tsx
3215
+ var hr = ({ asChild: e = !1, children: t, disabled: r = !1, className: i, ...a }) => {
3216
+ let s = ir(), c = e && l(t) ? t : void 0, u = s.disabled || r || c?.props.disabled, d = s.getTriggerProps({
3217
+ ...a,
3218
+ "aria-describedby": s.open ? s.contentId : void 0,
3219
+ "aria-disabled": u || void 0,
3220
+ "data-state": s.open ? "open" : "closed"
3221
+ }), f = {
3222
+ ...d,
3223
+ ref: c ? lr(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
3224
+ className: N(c?.props.className, i),
3225
+ disabled: u || void 0,
3226
+ onMouseEnter: cr(c?.props.onMouseEnter, d.onMouseEnter),
3227
+ onMouseLeave: cr(c?.props.onMouseLeave, d.onMouseLeave),
3228
+ onPointerEnter: cr(c?.props.onPointerEnter, d.onPointerEnter),
3229
+ onPointerLeave: cr(c?.props.onPointerLeave, d.onPointerLeave),
3230
+ onFocus: cr(c?.props.onFocus, d.onFocus),
3231
+ onBlur: cr(c?.props.onBlur, d.onBlur)
3232
+ };
3233
+ return c ? o(c, f) : /* @__PURE__ */ n("button", {
3234
+ type: "button",
3235
+ ...f,
3236
+ children: t
3237
+ });
3238
+ };
3239
+ hr.displayName = "Tooltip.Trigger";
3240
+ //#endregion
3241
+ //#region src/components/Tooltip/Tooltip.tsx
3242
+ var gr = Object.assign(mr, {
3243
+ Trigger: hr,
3244
+ Content: ur,
3245
+ Arrow: sr,
3246
+ Provider: rr
3247
+ });
3248
+ gr.displayName = "Tooltip";
3095
3249
  //#endregion
3096
3250
  //#region src/utils/devWarning.ts
3097
- var rr = (e, t) => {
3251
+ var _r = (e, t) => {
3098
3252
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
3099
3253
  }, Z = {
3100
3254
  button: "_button_1b73n_1",
@@ -3124,14 +3278,14 @@ var rr = (e, t) => {
3124
3278
  "button-spin": "_button-spin_1b73n_1",
3125
3279
  badge: "_badge_1b73n_812",
3126
3280
  shortcut: "_shortcut_1b73n_826"
3127
- }, ir = 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: P, ...F }, I) => {
3281
+ }, vr = 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: P, ...F }, I) => {
3128
3282
  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 = N(Z.button, Z[i], Z[a], Z[s], Z[c], C, {
3129
3283
  [Z.disabled]: B,
3130
3284
  [Z.loading]: f,
3131
3285
  [Z.fullWidth]: b,
3132
3286
  [Z.iconOnly]: z
3133
3287
  });
3134
- rr(!S || !D, "Button: pass href to the child element when using asChild."), rr(!S || !!L, "Button: asChild requires a single valid React element child."), rr(!z || ee, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
3288
+ _r(!S || !D, "Button: pass href to the child element when using asChild."), _r(!S || !!L, "Button: asChild requires a single valid React element child."), _r(!z || ee, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
3135
3289
  let ae = (e) => {
3136
3290
  e.preventDefault(), e.stopPropagation();
3137
3291
  }, oe = (e) => {
@@ -3221,7 +3375,7 @@ var rr = (e, t) => {
3221
3375
  children: V
3222
3376
  });
3223
3377
  });
3224
- ir.displayName = "Button";
3378
+ vr.displayName = "Button";
3225
3379
  var Q = {
3226
3380
  wrapper: "_wrapper_1kk5v_1",
3227
3381
  colorPrimary: "_colorPrimary_1kk5v_27",
@@ -3257,30 +3411,30 @@ var Q = {
3257
3411
  "checkbox-checkmark-in": "_checkbox-checkmark-in_1kk5v_1",
3258
3412
  "checkbox-indeterminate-in": "_checkbox-indeterminate-in_1kk5v_1",
3259
3413
  disabled: "_disabled_1kk5v_361"
3260
- }, ar = {
3414
+ }, yr = {
3261
3415
  sm: Q.labelSm,
3262
3416
  md: Q.labelMd,
3263
3417
  lg: Q.labelLg
3264
- }, or = {
3418
+ }, br = {
3265
3419
  sm: Q.wrapperSm,
3266
3420
  md: Q.wrapperMd,
3267
3421
  lg: Q.wrapperLg
3268
- }, sr = {
3422
+ }, xr = {
3269
3423
  sm: Q.containerSm,
3270
3424
  md: Q.containerMd,
3271
3425
  lg: Q.containerLg
3272
- }, cr = {
3426
+ }, Sr = {
3273
3427
  primary: Q.colorPrimary,
3274
3428
  neutral: Q.colorNeutral,
3275
3429
  success: Q.colorSuccess,
3276
3430
  warning: Q.colorWarning,
3277
3431
  danger: Q.colorDanger
3278
- }, lr = c(({ id: e, label: t, description: i, icon: a, indeterminateIcon: o, checked: s, size: c = "md", color: l = "primary", labelPosition: d = "end", defaultChecked: m = !1, disabled: g = !1, required: _ = !1, indeterminate: y = !1, className: b, wrapperClassName: x, onCheckedChange: S, error: C, "aria-label": w, "aria-labelledby": T, "aria-describedby": E, ...D }, O) => {
3432
+ }, Cr = c(({ id: e, label: t, description: i, icon: a, indeterminateIcon: o, checked: s, size: c = "md", color: l = "primary", labelPosition: d = "end", defaultChecked: m = !1, disabled: g = !1, required: _ = !1, indeterminate: y = !1, className: b, wrapperClassName: x, onCheckedChange: S, error: C, "aria-label": w, "aria-labelledby": T, "aria-describedby": E, ...D }, O) => {
3279
3433
  let k = p(), A = e ?? k, j = h(null), M = !!C, P = i ? `${A}-description` : void 0, F = M ? `${A}-error` : void 0, I = [
3280
3434
  E,
3281
3435
  P,
3282
3436
  F
3283
- ].filter(Boolean).join(" "), [L, R] = ge({
3437
+ ].filter(Boolean).join(" "), [L, R] = U({
3284
3438
  value: s,
3285
3439
  defaultValue: m,
3286
3440
  onChange: S
@@ -3297,12 +3451,12 @@ var Q = {
3297
3451
  let ee = (e) => {
3298
3452
  R(e.target.checked);
3299
3453
  };
3300
- return rr(!!(t || w || T), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ r("div", {
3301
- className: N(Q.container, sr[c], d === "start" && Q.containerLabelStart, b),
3454
+ return _r(!!(t || w || T), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ r("div", {
3455
+ className: N(Q.container, xr[c], d === "start" && Q.containerLabelStart, b),
3302
3456
  children: [
3303
3457
  /* @__PURE__ */ r("label", {
3304
3458
  htmlFor: A,
3305
- className: N(Q.wrapper, or[c], cr[l], d === "start" && Q.labelStart, !t && Q.iconOnly, g && Q.disabled, x),
3459
+ className: N(Q.wrapper, br[c], Sr[l], d === "start" && Q.labelStart, !t && Q.iconOnly, g && Q.disabled, x),
3306
3460
  children: [
3307
3461
  /* @__PURE__ */ n("input", {
3308
3462
  ...D,
@@ -3332,7 +3486,7 @@ var Q = {
3332
3486
  })
3333
3487
  }),
3334
3488
  t && /* @__PURE__ */ r("span", {
3335
- className: N(Q.label, ar[c]),
3489
+ className: N(Q.label, yr[c]),
3336
3490
  children: [t, _ && /* @__PURE__ */ n("span", {
3337
3491
  className: Q.requiredMark,
3338
3492
  "aria-hidden": "true",
@@ -3354,7 +3508,7 @@ var Q = {
3354
3508
  ]
3355
3509
  });
3356
3510
  });
3357
- lr.displayName = "Checkbox";
3511
+ Cr.displayName = "Checkbox";
3358
3512
  var $ = {
3359
3513
  inputGroup: "_inputGroup_1fjhk_1",
3360
3514
  primary: "_primary_1fjhk_29",
@@ -3396,7 +3550,7 @@ var $ = {
3396
3550
  toneDanger: "_toneDanger_1fjhk_876",
3397
3551
  toneMuted: "_toneMuted_1fjhk_880",
3398
3552
  toneInverse: "_toneInverse_1fjhk_884"
3399
- }, ur = {
3553
+ }, wr = {
3400
3554
  default: $.toneDefault,
3401
3555
  primary: $.tonePrimary,
3402
3556
  secondary: $.toneSecondary,
@@ -3404,7 +3558,7 @@ var $ = {
3404
3558
  danger: $.toneDanger,
3405
3559
  muted: $.toneMuted,
3406
3560
  inverse: $.toneInverse
3407
- }, dr = (e = "text", t) => {
3561
+ }, Tr = (e = "text", t) => {
3408
3562
  if (t) return t;
3409
3563
  switch (e) {
3410
3564
  case "email": return "email";
@@ -3414,7 +3568,7 @@ var $ = {
3414
3568
  case "search": return "off";
3415
3569
  default: return;
3416
3570
  }
3417
- }, fr = (e, t) => {
3571
+ }, Er = (e, t) => {
3418
3572
  let n = e.replace(/\D/g, ""), r = 0, i = "";
3419
3573
  for (let e of t) {
3420
3574
  if (e === "#") {
@@ -3426,39 +3580,39 @@ var $ = {
3426
3580
  r < n.length && (i += e);
3427
3581
  }
3428
3582
  return i;
3429
- }, pr = (e, t) => t ? typeof t == "function" ? t(e) : fr(e, t) : e, mr = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: _ = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: C = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: P, 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) => {
3430
- let pe = p(), me = wn(), he = !!(i || o || v), ge = e ?? (he ? void 0 : me?.controlId) ?? pe, _e = h(null), [ve, ye] = g(!1), [be, xe] = g(l ?? ""), U = c !== void 0, Se = String((U ? c : be) ?? ""), Ce = te ? te(Se) : Se, we = Se.length > 0, Te = f ?? me?.size ?? "md", Ee = y || !!v || !he && !!me?.invalid, De = b || !he && !!me?.disabled, Oe = x || !he && !!me?.required, ke = D || C, Ae = d === "password", je = Ae && j && ve ? "text" : d, Me = P ?? (d === "search" ? /* @__PURE__ */ n(S, {}) : null), Ne = F, Pe = dr(d, E), W = C && !De, Fe = O && we && !De && !ke && !W, G = j && Ae && !De && !W && !Fe, Ie = !W && !Fe && !G && !!Ne, Le = !!(M && V), Re = o ? `${ge}-description` : void 0, ze = v ? `${ge}-error` : void 0, Be = Le ? `${ge}-counter` : void 0, Ve = [
3583
+ }, Dr = (e, t) => t ? typeof t == "function" ? t(e) : Er(e, t) : e, Or = c(({ id: e, label: i, name: a, description: o, placeholder: s, value: c, defaultValue: l, type: d = "text", size: f, color: m = "primary", variant: _ = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: C = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: P, 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) => {
3584
+ let pe = p(), me = wn(), he = !!(i || o || v), U = e ?? (he ? void 0 : me?.controlId) ?? pe, ge = h(null), [_e, ve] = g(!1), [ye, be] = g(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 || C, ke = d === "password", Ae = ke && j && _e ? "text" : d, je = P ?? (d === "search" ? /* @__PURE__ */ n(S, {}) : null), Me = F, Ne = Tr(d, E), G = C && !Ee, Pe = O && Ce && !Ee && !Oe && !G, K = j && ke && !Ee && !G && !Pe, Fe = !G && !Pe && !K && !!Me, Ie = !!(M && V), Le = o ? `${U}-description` : void 0, Re = v ? `${U}-error` : void 0, ze = Ie ? `${U}-counter` : void 0, Be = [
3431
3585
  le,
3432
3586
  !he && !le ? me?.ariaDescribedBy : void 0,
3587
+ Le,
3433
3588
  Re,
3434
- ze,
3435
- Be
3436
- ].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) => {
3437
- if (_e.current = e, typeof fe == "function") {
3589
+ ze
3590
+ ].filter(Boolean).join(" "), q = ee ?? "×", Ve = !!(je || R), He = !!(Me || z || Pe || K || G), Ue = !!(je && R), We = !!(Me && z), Ge = !!(I || L), Ke = u((e) => {
3591
+ if (ge.current = e, typeof fe == "function") {
3438
3592
  fe(e);
3439
3593
  return;
3440
3594
  }
3441
3595
  fe && (fe.current = e);
3442
3596
  }, [fe]), qe = u((e) => {
3443
- let t = pr(ne ? ne(e.target.value) : e.target.value, B);
3444
- U || xe(t), A?.(t);
3597
+ let t = Dr(ne ? ne(e.target.value) : e.target.value, B);
3598
+ W || be(t), A?.(t);
3445
3599
  }, [
3446
- U,
3600
+ W,
3447
3601
  B,
3448
3602
  A,
3449
3603
  ne
3450
3604
  ]), Je = u(() => {
3451
- U || xe(""), A?.(""), k?.(), _e.current?.focus();
3605
+ W || be(""), A?.(""), k?.(), ge.current?.focus();
3452
3606
  }, [
3453
- U,
3607
+ W,
3454
3608
  k,
3455
3609
  A
3456
3610
  ]), Ye = /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
3457
3611
  className: N($.inputGroup, $[_], $[m], {
3458
3612
  [$.hasAddons]: Ge,
3459
- [$.isDisabled]: De,
3460
- [$.isInvalid]: Ee,
3461
- [$.isLoading]: W
3613
+ [$.isDisabled]: Ee,
3614
+ [$.isInvalid]: Te,
3615
+ [$.isLoading]: G
3462
3616
  }),
3463
3617
  children: [
3464
3618
  I && /* @__PURE__ */ n("span", {
@@ -3467,16 +3621,16 @@ var $ = {
3467
3621
  }),
3468
3622
  /* @__PURE__ */ r("div", {
3469
3623
  className: N($.inputWrapper, {
3470
- [$.hasLeftAdornment]: q,
3624
+ [$.hasLeftAdornment]: Ve,
3471
3625
  [$.hasRightAdornment]: He,
3472
3626
  [$.hasStartIconAndPrefix]: Ue,
3473
3627
  [$.hasEndIconAndSuffix]: We
3474
3628
  }),
3475
3629
  children: [
3476
- Me && /* @__PURE__ */ n("span", {
3630
+ je && /* @__PURE__ */ n("span", {
3477
3631
  "aria-hidden": "true",
3478
- className: N($.startAdornment, ur[re]),
3479
- children: Me
3632
+ className: N($.startAdornment, wr[re]),
3633
+ children: je
3480
3634
  }),
3481
3635
  R && /* @__PURE__ */ n("span", {
3482
3636
  className: $.prefix,
@@ -3485,22 +3639,22 @@ var $ = {
3485
3639
  /* @__PURE__ */ n("input", {
3486
3640
  ...H,
3487
3641
  ref: Ke,
3488
- id: ge,
3642
+ id: U,
3489
3643
  name: a,
3490
- type: je,
3491
- autoComplete: Pe,
3492
- className: N($.input, $[Te], { [$.error]: Ee }, w),
3493
- value: Ce,
3644
+ type: Ae,
3645
+ autoComplete: Ne,
3646
+ className: N($.input, $[we], { [$.error]: Te }, w),
3647
+ value: Se,
3494
3648
  onChange: qe,
3495
3649
  placeholder: s,
3496
- disabled: De,
3497
- readOnly: ke,
3498
- required: Oe,
3650
+ disabled: Ee,
3651
+ readOnly: Oe,
3652
+ required: De,
3499
3653
  autoFocus: oe,
3500
3654
  maxLength: V,
3501
- "aria-invalid": Ee ? !0 : ue,
3655
+ "aria-invalid": Te ? !0 : ue,
3502
3656
  "aria-labelledby": de ?? (he ? void 0 : me?.ariaLabelledBy),
3503
- "aria-describedby": Ve || void 0,
3657
+ "aria-describedby": Be || void 0,
3504
3658
  "aria-busy": C || void 0,
3505
3659
  onMouseEnter: se,
3506
3660
  onMouseLeave: ce
@@ -3512,29 +3666,29 @@ var $ = {
3512
3666
  /* @__PURE__ */ r("div", {
3513
3667
  className: $.endSlot,
3514
3668
  children: [
3515
- W && /* @__PURE__ */ n("span", {
3669
+ G && /* @__PURE__ */ n("span", {
3516
3670
  className: $.spinner,
3517
3671
  "aria-hidden": "true",
3518
3672
  "data-testid": "input-spinner"
3519
3673
  }),
3520
- G && /* @__PURE__ */ n("button", {
3674
+ K && /* @__PURE__ */ n("button", {
3521
3675
  type: "button",
3522
3676
  className: $.iconButton,
3523
- onClick: () => ye((e) => !e),
3524
- "aria-label": ve ? "Hide password" : "Show password",
3525
- children: ve ? "Hide" : "Show"
3677
+ onClick: () => ve((e) => !e),
3678
+ "aria-label": _e ? "Hide password" : "Show password",
3679
+ children: _e ? "Hide" : "Show"
3526
3680
  }),
3527
- Fe && /* @__PURE__ */ n("button", {
3681
+ Pe && /* @__PURE__ */ n("button", {
3528
3682
  type: "button",
3529
- className: N($.clearButton, ur[ae]),
3683
+ className: N($.clearButton, wr[ae]),
3530
3684
  onClick: Je,
3531
3685
  "aria-label": "Clear input",
3532
- children: K
3686
+ children: q
3533
3687
  }),
3534
- Ie && Ne && /* @__PURE__ */ n("span", {
3688
+ Fe && Me && /* @__PURE__ */ n("span", {
3535
3689
  "aria-hidden": "true",
3536
- className: N($.endAdornment, ur[ie]),
3537
- children: Ne
3690
+ className: N($.endAdornment, wr[ie]),
3691
+ children: Me
3538
3692
  })
3539
3693
  ]
3540
3694
  })
@@ -3545,38 +3699,38 @@ var $ = {
3545
3699
  children: L
3546
3700
  })
3547
3701
  ]
3548
- }), Le && /* @__PURE__ */ r("div", {
3549
- id: Be,
3702
+ }), Ie && /* @__PURE__ */ r("div", {
3703
+ id: ze,
3550
3704
  className: $.counter,
3551
3705
  children: [
3552
- Se.length,
3706
+ xe.length,
3553
3707
  " / ",
3554
3708
  V
3555
3709
  ]
3556
3710
  })] });
3557
3711
  return !he && me ? Ye : /* @__PURE__ */ n(Dn, {
3558
- id: ge,
3712
+ id: U,
3559
3713
  label: i,
3560
3714
  description: o,
3561
3715
  error: v,
3562
- required: Oe,
3563
- disabled: De,
3564
- invalid: Ee,
3565
- size: Te,
3716
+ required: De,
3717
+ disabled: Ee,
3718
+ invalid: Te,
3719
+ size: we,
3566
3720
  className: T,
3567
3721
  bindControl: !1,
3568
3722
  children: Ye
3569
3723
  });
3570
3724
  });
3571
- mr.displayName = "Input";
3725
+ Or.displayName = "Input";
3572
3726
  //#endregion
3573
3727
  //#region src/theme/ThemeContext.ts
3574
- var hr = s(null), gr = (e) => e === "highContrast" ? "high-contrast" : e, _r = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, children: i }) => {
3575
- let [a, o] = ge({
3728
+ var kr = s(null), Ar = (e) => e === "highContrast" ? "high-contrast" : e, jr = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, children: i }) => {
3729
+ let [a, o] = U({
3576
3730
  value: e,
3577
3731
  defaultValue: t,
3578
3732
  onChange: r
3579
- }), s = gr(a);
3733
+ }), s = Ar(a);
3580
3734
  f(() => {
3581
3735
  if (typeof document > "u") return;
3582
3736
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
@@ -3592,7 +3746,7 @@ var hr = s(null), gr = (e) => e === "highContrast" ? "high-contrast" : e, _r = (
3592
3746
  theme: a,
3593
3747
  setTheme: o
3594
3748
  }), [a, o]);
3595
- return /* @__PURE__ */ n(hr.Provider, {
3749
+ return /* @__PURE__ */ n(kr.Provider, {
3596
3750
  value: c,
3597
3751
  children: /* @__PURE__ */ n("div", {
3598
3752
  "data-vellira-theme": s,
@@ -3600,13 +3754,13 @@ var hr = s(null), gr = (e) => e === "highContrast" ? "high-contrast" : e, _r = (
3600
3754
  })
3601
3755
  });
3602
3756
  };
3603
- _r.displayName = "ThemeProvider";
3757
+ jr.displayName = "ThemeProvider";
3604
3758
  //#endregion
3605
3759
  //#region src/theme/useTheme.ts
3606
- function vr() {
3607
- let e = d(hr);
3760
+ function Mr() {
3761
+ let e = d(kr);
3608
3762
  if (!e) throw Error("useTheme must be used within ThemeProvider.");
3609
3763
  return e;
3610
3764
  }
3611
3765
  //#endregion
3612
- export { ir as Button, lr as Checkbox, gt as Dropdown, Dn as FormField, mr as Input, Vt as Modal, we as Portal, Ce as PortalProvider, Kt as Radio, tn as RadioGroup, Hn as Select, $n as Tabs, _r as ThemeProvider, nr as Tooltip, vr as useTheme };
3766
+ export { vr as Button, Cr as Checkbox, gt as Dropdown, Dn as FormField, Or as Input, Vt as Modal, Ce as Portal, Se as PortalProvider, Kt as Radio, tn as RadioGroup, Hn as Select, $n as Tabs, jr as ThemeProvider, gr as Tooltip, Mr as useTheme };