@vellira-ui/react 2.41.0 → 2.43.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
@@ -748,30 +748,30 @@ function Pe() {
748
748
  return e;
749
749
  }
750
750
  var K = {
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"
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
775
  }, Fe = L("item", "Dropdown.Item"), Ie = ({ item: e, itemIndex: i }) => {
776
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) {
@@ -811,11 +811,6 @@ var K = {
811
811
  window.clearTimeout(o.current);
812
812
  },
813
813
  children: [
814
- I && /* @__PURE__ */ n("span", {
815
- className: K.indicator,
816
- "aria-hidden": "true",
817
- children: m ? /* @__PURE__ */ n(y, {}) : null
818
- }),
819
814
  S && /* @__PURE__ */ n("span", {
820
815
  className: K.itemIcon,
821
816
  children: S
@@ -838,6 +833,11 @@ var K = {
838
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
842
  className: K.itemShortcut,
843
843
  "aria-hidden": "true",
@@ -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 = G();
961
- if (!t.isOpen) return null;
962
- let i = P(we.dropdown, we[t.color], t.contentProps?.className, t.dropdownClassName, 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,7 +977,7 @@ 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",
@@ -992,7 +998,7 @@ var Ke = ({ className: e }) => {
992
998
  itemIndex: e.itemIndex
993
999
  }) }, e.item.id)) : /* @__PURE__ */ n(Ee, {})]
994
1000
  });
995
- return t.portal ? /* @__PURE__ */ n(Ce, { 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,8 +1077,8 @@ 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, triggerClassName: I, dropdownClassName: L, className: z }) => {
1070
- let ee = p(), B = `${ee}-trigger`, te = `${ee}-menu`, ne = g(null), re = g(null), [ie, ae] = _(), [oe, V] = _({}), [se, le] = _(A), ue = k ?? se, H = h(() => R(e), [e]), fe = H.content?.props.command ?? !1, pe = D || O || fe || !!H.search, he = h(() => st(H.items), [H.items]), ge = h(() => H.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
1084
  })), [H.items]), U = h(() => !pe || !ue.trim() ? H : ct(H, ue), [
@@ -1090,36 +1101,38 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1090
1101
  items: pe ? _e : ge,
1091
1102
  open: t,
1092
1103
  defaultOpen: i,
1093
- disabled: w,
1104
+ disabled: E,
1094
1105
  onOpenChange: a,
1095
1106
  getItemValue: (e, t) => (pe ? U.items : H.items)[t]?.id ?? "",
1096
1107
  getItemText: (e) => e.label,
1097
- loop: C
1098
- }), { floatingStyles: we, setRef: Te, setFloatingRef: Ee } = et({
1108
+ loop: T
1109
+ }), { floatingStyles: we, isMobileSheet: Te, isPositioned: Ee, setRef: De, setFloatingRef: Oe } = et({
1099
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
- }), De = u((e) => {
1106
- k === void 0 && le(e), M?.(e), be(0);
1118
+ }), ke = u((e) => {
1119
+ j === void 0 && le(e), F?.(e), be(0);
1107
1120
  }, [
1108
- M,
1109
- k,
1121
+ F,
1122
+ j,
1110
1123
  be
1111
- ]), { isTopOverlay: Oe } = de({
1124
+ ]), { isTopOverlay: Ae } = de({
1112
1125
  active: W,
1113
1126
  id: te
1114
1127
  });
1115
1128
  me({
1116
1129
  active: W,
1117
- enabled: x
1130
+ enabled: C
1118
1131
  });
1119
- let ke = u(() => {
1132
+ let je = u(() => {
1120
1133
  xe(), ne.current?.focus();
1121
- }, [xe]), Ae = u((e, t) => {
1122
- if (e.disabled || T) return;
1134
+ }, [xe]), G = u((e, t) => {
1135
+ if (e.disabled || D) return;
1123
1136
  if (e.type === "subTrigger") {
1124
1137
  ae(e.id);
1125
1138
  return;
@@ -1128,13 +1141,13 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
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 && ke();
1144
+ let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && w);
1145
+ !t.defaultPrevented && n && je();
1133
1146
  }, [
1134
- ke,
1135
- S,
1136
- T
1137
- ]), je = u((e) => {
1147
+ je,
1148
+ w,
1149
+ D
1150
+ ]), Pe = u((e) => {
1138
1151
  let t = U.items[ye];
1139
1152
  if (e.key === "ArrowRight" && t?.type === "subTrigger") {
1140
1153
  e.preventDefault(), ae(t.id);
@@ -1147,7 +1160,7 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1147
1160
  if ((e.key === "Enter" || e.key === " ") && t) {
1148
1161
  e.preventDefault();
1149
1162
  let n = ot(e);
1150
- Ae(t, n);
1163
+ G(t, n);
1151
1164
  return;
1152
1165
  }
1153
1166
  Ce(e), e.key === "Escape" && ne.current?.focus();
@@ -1156,68 +1169,67 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1156
1169
  U.items,
1157
1170
  Ce,
1158
1171
  ie,
1159
- Ae
1160
- ]), G = u((e) => {
1172
+ G
1173
+ ]), K = u((e) => {
1161
1174
  e.preventDefault(), Se();
1162
- }, [Se]), Pe = u((e) => {
1163
- ne.current = e, Te(e);
1164
- }, [Te]), K = u((e) => {
1165
- re.current = e, Ee(e), e?.focus();
1166
- }, [Ee]);
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]);
1167
1180
  ce({
1168
1181
  active: W,
1169
1182
  closeOnEscape: !0,
1170
1183
  closeOnOutsidePress: !0,
1171
1184
  contentRef: re,
1172
1185
  ignoreRefs: [ne],
1173
- isTopOverlay: Oe,
1186
+ isTopOverlay: Ae,
1174
1187
  requestClose: xe
1175
1188
  });
1176
- let Fe = {
1189
+ let Le = {
1177
1190
  ...we,
1178
- minWidth: rt(m),
1179
- maxWidth: rt(v)
1191
+ minWidth: rt(y),
1192
+ maxWidth: rt(b)
1180
1193
  };
1181
1194
  return /* @__PURE__ */ n(Ne, {
1182
1195
  value: {
1183
- disabled: w,
1196
+ disabled: E,
1184
1197
  isOpen: W,
1185
1198
  contentId: te,
1186
1199
  triggerId: B,
1187
- triggerClassName: I,
1188
- setTriggerRef: Pe,
1189
- onClick: G,
1190
- onKeyDown: je
1200
+ setTriggerRef: Fe,
1201
+ onClick: K,
1202
+ onKeyDown: Pe
1191
1203
  },
1192
1204
  children: /* @__PURE__ */ n(Me, {
1193
1205
  value: {
1194
1206
  activeIndex: ye,
1195
- closeOnSelect: S,
1207
+ closeOnSelect: w,
1196
1208
  color: s,
1209
+ contentReadyToFocus: Te || Ee,
1197
1210
  contentId: te,
1198
1211
  contentProps: H.content?.props,
1199
- disabled: w,
1200
- dropdownClassName: L,
1212
+ disabled: E,
1201
1213
  entries: U.entries,
1202
1214
  getItemId: (e) => `${te}-item-${e}`,
1203
1215
  isOpen: W,
1204
1216
  items: U.items,
1205
- loading: T,
1206
- loadingText: E,
1207
- noOptionsText: N ?? F,
1208
- maxWidth: v,
1209
- minWidth: m,
1217
+ loading: D,
1218
+ loadingText: O,
1219
+ noOptionsText: I ?? L,
1220
+ maxWidth: b,
1221
+ minWidth: y,
1210
1222
  openSubId: ie,
1211
- onKeyDown: je,
1212
- portal: !H.portal && y,
1223
+ onKeyDown: Pe,
1224
+ portal: !H.portal && x,
1213
1225
  radioValues: oe,
1214
- searchPlaceholder: H.search?.props.placeholder ?? j ?? (O || fe ? "Type a command..." : "Search actions..."),
1226
+ searchPlaceholder: H.search?.props.placeholder ?? N ?? (A || fe ? "Type a command..." : "Search actions..."),
1215
1227
  searchProps: H.search?.props,
1216
1228
  searchValue: ue,
1217
1229
  searchable: pe,
1218
- selectItem: Ae,
1230
+ selectItem: G,
1219
1231
  setActiveIndex: be,
1220
- setContentRef: K,
1232
+ setContentRef: Ie,
1221
1233
  setOpenSubId: ae,
1222
1234
  setRadioValue: (e, t) => {
1223
1235
  V((n) => ({
@@ -1225,15 +1237,15 @@ var it = { wrapper: "_wrapper_14ue8_1" }, at = ({ children: e, open: t, defaultO
1225
1237
  [e]: t
1226
1238
  }));
1227
1239
  },
1228
- setSearchValue: De,
1240
+ setSearchValue: ke,
1229
1241
  size: o,
1230
- surfaceStyle: Fe,
1242
+ surfaceStyle: Le,
1231
1243
  triggerId: B
1232
1244
  },
1233
1245
  children: /* @__PURE__ */ r("div", {
1234
1246
  className: P(it.wrapper, z),
1235
- "data-disabled": w || void 0,
1236
- children: [H.trigger ?? null, H.portal ?? H.content ?? /* @__PURE__ */ n(Ke, { className: L })]
1247
+ "data-disabled": E || void 0,
1248
+ children: [H.trigger ?? null, H.portal ?? H.content ?? /* @__PURE__ */ n(Ke, {})]
1237
1249
  })
1238
1250
  })
1239
1251
  });
@@ -1293,7 +1305,7 @@ var ht = ({ children: e, asChild: t = !1, disabled: i, className: a }) => {
1293
1305
  "aria-disabled": d || void 0,
1294
1306
  "aria-expanded": c.isOpen,
1295
1307
  "aria-haspopup": "menu",
1296
- className: P(!u && pt.button, !u && pt[s.size], !u && pt[s.color], c.triggerClassName, a),
1308
+ className: P(!u && pt.button, !u && pt[s.size], !u && pt[s.color], a),
1297
1309
  "data-state": c.isOpen ? "open" : "closed",
1298
1310
  disabled: d || void 0,
1299
1311
  onClick: tt(u?.props.onClick, c.onClick),
@@ -1336,10 +1348,6 @@ var gt = Object.assign(at, {
1336
1348
  ItemDescription: Je,
1337
1349
  ItemBadge: qe,
1338
1350
  ItemShortcut: Xe,
1339
- Icon: Ye,
1340
- Description: Je,
1341
- Badge: qe,
1342
- Shortcut: Xe,
1343
1351
  Arrow: I,
1344
1352
  Empty: Te,
1345
1353
  Loading: q
@@ -1670,28 +1678,28 @@ function Wt() {
1670
1678
  return d(Ht);
1671
1679
  }
1672
1680
  var J = {
1673
- root: "_root_1avxs_1",
1674
- invalid: "_invalid_1avxs_27",
1675
- control: "_control_1avxs_27",
1676
- label: "_label_1avxs_30",
1677
- wrapper: "_wrapper_1avxs_33",
1678
- input: "_input_1avxs_34",
1679
- disabled: "_disabled_1avxs_37",
1680
- description: "_description_1avxs_45",
1681
- colorPrimary: "_colorPrimary_1avxs_49",
1682
- colorNeutral: "_colorNeutral_1avxs_65",
1683
- colorSuccess: "_colorSuccess_1avxs_81",
1684
- colorWarning: "_colorWarning_1avxs_97",
1685
- colorDanger: "_colorDanger_1avxs_113",
1686
- sm: "_sm_1avxs_129",
1687
- md: "_md_1avxs_138",
1688
- lg: "_lg_1avxs_147",
1689
- indicator: "_indicator_1avxs_202",
1690
- customIcon: "_customIcon_1avxs_216",
1691
- "radio-pop": "_radio-pop_1avxs_1",
1692
- "radio-indicator-in": "_radio-indicator-in_1avxs_1",
1693
- content: "_content_1avxs_339",
1694
- 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"
1695
1703
  }, Gt = {
1696
1704
  primary: J.colorPrimary,
1697
1705
  neutral: J.colorNeutral,
@@ -3214,20 +3222,20 @@ var $n = (e) => [...e].sort((e, t) => {
3214
3222
  };
3215
3223
  rr.displayName = "Tabs";
3216
3224
  var ir = {
3217
- trigger: "_trigger_usnq2_1",
3218
- iconOnly: "_iconOnly_usnq2_30",
3219
- icon: "_icon_usnq2_30",
3220
- body: "_body_usnq2_48",
3221
- label: "_label_usnq2_56",
3222
- description: "_description_usnq2_63",
3223
- badge: "_badge_usnq2_69",
3224
- sm: "_sm_usnq2_84",
3225
- md: "_md_usnq2_97",
3226
- lg: "_lg_usnq2_101",
3227
- segmented: "_segmented_usnq2_118",
3228
- line: "_line_usnq2_144",
3229
- pills: "_pills_usnq2_156",
3230
- vertical: "_vertical_usnq2_179"
3225
+ trigger: "_trigger_11yl9_1",
3226
+ iconOnly: "_iconOnly_11yl9_30",
3227
+ icon: "_icon_11yl9_30",
3228
+ body: "_body_11yl9_50",
3229
+ label: "_label_11yl9_58",
3230
+ description: "_description_11yl9_65",
3231
+ badge: "_badge_11yl9_71",
3232
+ sm: "_sm_11yl9_86",
3233
+ md: "_md_11yl9_104",
3234
+ lg: "_lg_11yl9_108",
3235
+ segmented: "_segmented_11yl9_130",
3236
+ line: "_line_11yl9_172",
3237
+ pills: "_pills_11yl9_184",
3238
+ vertical: "_vertical_11yl9_207"
3231
3239
  }, ar = ({ children: e, className: t }) => /* @__PURE__ */ n("span", {
3232
3240
  className: P(ir.badge, t),
3233
3241
  children: e
@@ -3383,23 +3391,23 @@ function vr(...e) {
3383
3391
  }
3384
3392
  //#endregion
3385
3393
  //#region src/components/Tooltip/Content/TooltipContent.tsx
3386
- var yr = c(({ children: e, forceMount: t = !1, className: r, style: i, ...a }, o) => {
3387
- let s = pr();
3388
- return !t && !s.open ? null : /* @__PURE__ */ n("div", {
3389
- ...s.getContentProps({
3390
- 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,
3391
3399
  role: "tooltip",
3392
- ...a
3400
+ ...s
3393
3401
  }),
3394
- ref: vr(o, s.setContentRef),
3395
- className: P(hr.tooltip, r),
3396
- "data-placement": s.placement,
3397
- "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",
3398
3406
  style: {
3399
- ...s.floatingStyles,
3400
- ...i
3407
+ ...l.floatingStyles,
3408
+ ...o
3401
3409
  },
3402
- children: e
3410
+ children: [e, i && /* @__PURE__ */ n(gr, {})]
3403
3411
  });
3404
3412
  });
3405
3413
  yr.displayName = "Tooltip.Content";
@@ -3540,33 +3548,33 @@ Tr.displayName = "Tooltip";
3540
3548
  var Er = (e, t) => {
3541
3549
  process.env.NODE_ENV !== "production" && !e && console.warn(t);
3542
3550
  }, Z = {
3543
- button: "_button_1b73n_1",
3544
- solid: "_solid_1b73n_23",
3545
- primary: "_primary_1b73n_23",
3546
- loading: "_loading_1b73n_23",
3547
- neutral: "_neutral_1b73n_49",
3548
- success: "_success_1b73n_75",
3549
- warning: "_warning_1b73n_101",
3550
- danger: "_danger_1b73n_127",
3551
- outline: "_outline_1b73n_153",
3552
- ghost: "_ghost_1b73n_283",
3553
- soft: "_soft_1b73n_413",
3554
- link: "_link_1b73n_543",
3555
- square: "_square_1b73n_711",
3556
- rounded: "_rounded_1b73n_715",
3557
- pill: "_pill_1b73n_719",
3558
- sm: "_sm_1b73n_723",
3559
- md: "_md_1b73n_729",
3560
- lg: "_lg_1b73n_735",
3561
- fullWidth: "_fullWidth_1b73n_741",
3562
- iconOnly: "_iconOnly_1b73n_745",
3563
- label: "_label_1b73n_749",
3564
- labelText: "_labelText_1b73n_771",
3565
- icon: "_icon_1b73n_745",
3566
- spinner: "_spinner_1b73n_790",
3567
- "button-spin": "_button-spin_1b73n_1",
3568
- badge: "_badge_1b73n_812",
3569
- 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"
3570
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) => {
3571
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, {
3572
3580
  [Z.disabled]: B,
@@ -3666,40 +3674,40 @@ var Er = (e, t) => {
3666
3674
  });
3667
3675
  Dr.displayName = "Button";
3668
3676
  var Q = {
3669
- wrapper: "_wrapper_1kk5v_1",
3670
- colorPrimary: "_colorPrimary_1kk5v_27",
3671
- colorNeutral: "_colorNeutral_1kk5v_45",
3672
- colorSuccess: "_colorSuccess_1kk5v_63",
3673
- colorWarning: "_colorWarning_1kk5v_81",
3674
- colorDanger: "_colorDanger_1kk5v_99",
3675
- labelStart: "_labelStart_1kk5v_115",
3676
- wrapperSm: "_wrapperSm_1kk5v_119",
3677
- wrapperMd: "_wrapperMd_1kk5v_125",
3678
- wrapperLg: "_wrapperLg_1kk5v_131",
3679
- iconOnly: "_iconOnly_1kk5v_137",
3680
- container: "_container_1kk5v_143",
3681
- containerSm: "_containerSm_1kk5v_150",
3682
- containerMd: "_containerMd_1kk5v_154",
3683
- containerLg: "_containerLg_1kk5v_158",
3684
- containerLabelStart: "_containerLabelStart_1kk5v_162",
3685
- descriptionText: "_descriptionText_1kk5v_162",
3686
- errorText: "_errorText_1kk5v_163",
3687
- input: "_input_1kk5v_167",
3688
- customCheckbox: "_customCheckbox_1kk5v_179",
3689
- requiredMark: "_requiredMark_1kk5v_194",
3690
- error: "_error_1kk5v_163",
3691
- checkmark: "_checkmark_1kk5v_210",
3692
- indeterminateMark: "_indeterminateMark_1kk5v_226",
3693
- customMark: "_customMark_1kk5v_239",
3694
- label: "_label_1kk5v_115",
3695
- labelSm: "_labelSm_1kk5v_270",
3696
- labelMd: "_labelMd_1kk5v_274",
3697
- labelLg: "_labelLg_1kk5v_278",
3698
- indeterminate: "_indeterminate_1kk5v_226",
3699
- "checkbox-pop": "_checkbox-pop_1kk5v_1",
3700
- "checkbox-checkmark-in": "_checkbox-checkmark-in_1kk5v_1",
3701
- "checkbox-indeterminate-in": "_checkbox-indeterminate-in_1kk5v_1",
3702
- 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"
3703
3711
  }, Or = {
3704
3712
  sm: Q.labelSm,
3705
3713
  md: Q.labelMd,
@@ -4014,32 +4022,32 @@ var $ = {
4014
4022
  Lr.displayName = "Input";
4015
4023
  //#endregion
4016
4024
  //#region src/theme/ThemeContext.ts
4017
- var Rr = s(null), zr = (e) => e === "highContrast" ? "high-contrast" : e, Br = ({ theme: e, defaultTheme: t = "light", onThemeChange: r, children: i }) => {
4018
- let [a, o] = U({
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({
4019
4027
  value: e,
4020
4028
  defaultValue: t,
4021
4029
  onChange: r
4022
- }), s = zr(a);
4030
+ }), c = zr(o);
4023
4031
  f(() => {
4024
- if (typeof document > "u") return;
4032
+ if (!i || typeof document > "u") return;
4025
4033
  let { documentElement: e } = document, t = e.dataset.velliraTheme;
4026
- return e.dataset.velliraTheme = s, () => {
4034
+ return e.dataset.velliraTheme = c, () => {
4027
4035
  if (t === void 0) {
4028
4036
  delete e.dataset.velliraTheme;
4029
4037
  return;
4030
4038
  }
4031
4039
  e.dataset.velliraTheme = t;
4032
4040
  };
4033
- }, [s]);
4034
- let c = h(() => ({
4035
- theme: a,
4036
- setTheme: o
4037
- }), [a, o]);
4041
+ }, [c, i]);
4042
+ let l = h(() => ({
4043
+ theme: o,
4044
+ setTheme: s
4045
+ }), [o, s]);
4038
4046
  return /* @__PURE__ */ n(Rr.Provider, {
4039
- value: c,
4047
+ value: l,
4040
4048
  children: /* @__PURE__ */ n("div", {
4041
- "data-vellira-theme": s,
4042
- children: i
4049
+ "data-vellira-theme": c,
4050
+ children: a
4043
4051
  })
4044
4052
  });
4045
4053
  };