@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/README.md +6 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +247 -239
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -748,30 +748,30 @@ function Pe() {
|
|
|
748
748
|
return e;
|
|
749
749
|
}
|
|
750
750
|
var K = {
|
|
751
|
-
item: "
|
|
752
|
-
disabled: "
|
|
753
|
-
active: "
|
|
754
|
-
itemShortcut: "
|
|
755
|
-
itemDescription: "
|
|
756
|
-
primary: "
|
|
757
|
-
success: "
|
|
758
|
-
warning: "
|
|
759
|
-
danger: "
|
|
760
|
-
itemIcon: "
|
|
761
|
-
sm: "
|
|
762
|
-
md: "
|
|
763
|
-
lg: "
|
|
764
|
-
itemText: "
|
|
765
|
-
itemLabel: "
|
|
766
|
-
itemBadge: "
|
|
767
|
-
indicator: "
|
|
768
|
-
"dropdown-indicator-in": "_dropdown-indicator-
|
|
769
|
-
checked: "
|
|
770
|
-
"dropdown-item-pop": "_dropdown-item-
|
|
771
|
-
subContent: "
|
|
772
|
-
"dropdown-sub-in": "_dropdown-sub-
|
|
773
|
-
subLabel: "
|
|
774
|
-
subSeparator: "
|
|
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
|
-
|
|
962
|
-
|
|
963
|
-
|
|
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:
|
|
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:
|
|
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,
|
|
1010
|
-
let
|
|
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
|
-
...
|
|
1024
|
+
...s ? [E({ padding: a })] : [],
|
|
1019
1025
|
k({ apply({ rects: e, elements: t }) {
|
|
1020
|
-
!
|
|
1026
|
+
!o || u || Object.assign(t.floating.style, { width: `${e.reference.width}px` });
|
|
1021
1027
|
} }),
|
|
1022
|
-
...
|
|
1023
|
-
...
|
|
1028
|
+
...s ? [O({ padding: a })] : [],
|
|
1029
|
+
...l
|
|
1024
1030
|
], [
|
|
1025
|
-
|
|
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
|
-
|
|
1035
|
-
}, [
|
|
1036
|
-
context:
|
|
1037
|
-
placement:
|
|
1038
|
-
middlewareData:
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
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",
|
|
1070
|
-
let ee = p(), B = `${ee}-trigger`, te = `${ee}-menu`, ne = g(null), re = g(null), [ie, ae] = _(), [oe, V] = _({}), [se, le] = _(
|
|
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:
|
|
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:
|
|
1098
|
-
}), { floatingStyles: we,
|
|
1108
|
+
loop: T
|
|
1109
|
+
}), { floatingStyles: we, isMobileSheet: Te, isPositioned: Ee, setRef: De, setFloatingRef: Oe } = et({
|
|
1099
1110
|
open: W,
|
|
1100
1111
|
placement: c,
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1112
|
+
strategy: l ?? (x ? "fixed" : "absolute"),
|
|
1113
|
+
matchTriggerWidth: v,
|
|
1114
|
+
avoidCollisions: S,
|
|
1115
|
+
offset: d,
|
|
1116
|
+
collisionPadding: m,
|
|
1104
1117
|
mobileSheetBreakpoint: 640
|
|
1105
|
-
}),
|
|
1106
|
-
|
|
1118
|
+
}), ke = u((e) => {
|
|
1119
|
+
j === void 0 && le(e), F?.(e), be(0);
|
|
1107
1120
|
}, [
|
|
1108
|
-
|
|
1109
|
-
|
|
1121
|
+
F,
|
|
1122
|
+
j,
|
|
1110
1123
|
be
|
|
1111
|
-
]), { isTopOverlay:
|
|
1124
|
+
]), { isTopOverlay: Ae } = de({
|
|
1112
1125
|
active: W,
|
|
1113
1126
|
id: te
|
|
1114
1127
|
});
|
|
1115
1128
|
me({
|
|
1116
1129
|
active: W,
|
|
1117
|
-
enabled:
|
|
1130
|
+
enabled: C
|
|
1118
1131
|
});
|
|
1119
|
-
let
|
|
1132
|
+
let je = u(() => {
|
|
1120
1133
|
xe(), ne.current?.focus();
|
|
1121
|
-
}, [xe]),
|
|
1122
|
-
if (e.disabled ||
|
|
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" &&
|
|
1132
|
-
!t.defaultPrevented && n &&
|
|
1144
|
+
let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && w);
|
|
1145
|
+
!t.defaultPrevented && n && je();
|
|
1133
1146
|
}, [
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
]),
|
|
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
|
-
|
|
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
|
-
|
|
1160
|
-
]),
|
|
1172
|
+
G
|
|
1173
|
+
]), K = u((e) => {
|
|
1161
1174
|
e.preventDefault(), Se();
|
|
1162
|
-
}, [Se]),
|
|
1163
|
-
ne.current = e,
|
|
1164
|
-
}, [
|
|
1165
|
-
re.current = e,
|
|
1166
|
-
}, [
|
|
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:
|
|
1186
|
+
isTopOverlay: Ae,
|
|
1174
1187
|
requestClose: xe
|
|
1175
1188
|
});
|
|
1176
|
-
let
|
|
1189
|
+
let Le = {
|
|
1177
1190
|
...we,
|
|
1178
|
-
minWidth: rt(
|
|
1179
|
-
maxWidth: rt(
|
|
1191
|
+
minWidth: rt(y),
|
|
1192
|
+
maxWidth: rt(b)
|
|
1180
1193
|
};
|
|
1181
1194
|
return /* @__PURE__ */ n(Ne, {
|
|
1182
1195
|
value: {
|
|
1183
|
-
disabled:
|
|
1196
|
+
disabled: E,
|
|
1184
1197
|
isOpen: W,
|
|
1185
1198
|
contentId: te,
|
|
1186
1199
|
triggerId: B,
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
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:
|
|
1207
|
+
closeOnSelect: w,
|
|
1196
1208
|
color: s,
|
|
1209
|
+
contentReadyToFocus: Te || Ee,
|
|
1197
1210
|
contentId: te,
|
|
1198
1211
|
contentProps: H.content?.props,
|
|
1199
|
-
disabled:
|
|
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:
|
|
1206
|
-
loadingText:
|
|
1207
|
-
noOptionsText:
|
|
1208
|
-
maxWidth:
|
|
1209
|
-
minWidth:
|
|
1217
|
+
loading: D,
|
|
1218
|
+
loadingText: O,
|
|
1219
|
+
noOptionsText: I ?? L,
|
|
1220
|
+
maxWidth: b,
|
|
1221
|
+
minWidth: y,
|
|
1210
1222
|
openSubId: ie,
|
|
1211
|
-
onKeyDown:
|
|
1212
|
-
portal: !H.portal &&
|
|
1223
|
+
onKeyDown: Pe,
|
|
1224
|
+
portal: !H.portal && x,
|
|
1213
1225
|
radioValues: oe,
|
|
1214
|
-
searchPlaceholder: H.search?.props.placeholder ??
|
|
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:
|
|
1230
|
+
selectItem: G,
|
|
1219
1231
|
setActiveIndex: be,
|
|
1220
|
-
setContentRef:
|
|
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:
|
|
1240
|
+
setSearchValue: ke,
|
|
1229
1241
|
size: o,
|
|
1230
|
-
surfaceStyle:
|
|
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":
|
|
1236
|
-
children: [H.trigger ?? null, H.portal ?? H.content ?? /* @__PURE__ */ n(Ke, {
|
|
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],
|
|
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: "
|
|
1674
|
-
invalid: "
|
|
1675
|
-
control: "
|
|
1676
|
-
label: "
|
|
1677
|
-
wrapper: "
|
|
1678
|
-
input: "
|
|
1679
|
-
disabled: "
|
|
1680
|
-
description: "
|
|
1681
|
-
colorPrimary: "
|
|
1682
|
-
colorNeutral: "
|
|
1683
|
-
colorSuccess: "
|
|
1684
|
-
colorWarning: "
|
|
1685
|
-
colorDanger: "
|
|
1686
|
-
sm: "
|
|
1687
|
-
md: "
|
|
1688
|
-
lg: "
|
|
1689
|
-
indicator: "
|
|
1690
|
-
customIcon: "
|
|
1691
|
-
"radio-pop": "_radio-
|
|
1692
|
-
"radio-indicator-in": "_radio-indicator-
|
|
1693
|
-
content: "
|
|
1694
|
-
error: "
|
|
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: "
|
|
3218
|
-
iconOnly: "
|
|
3219
|
-
icon: "
|
|
3220
|
-
body: "
|
|
3221
|
-
label: "
|
|
3222
|
-
description: "
|
|
3223
|
-
badge: "
|
|
3224
|
-
sm: "
|
|
3225
|
-
md: "
|
|
3226
|
-
lg: "
|
|
3227
|
-
segmented: "
|
|
3228
|
-
line: "
|
|
3229
|
-
pills: "
|
|
3230
|
-
vertical: "
|
|
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:
|
|
3387
|
-
let
|
|
3388
|
-
return !t && !
|
|
3389
|
-
...
|
|
3390
|
-
id:
|
|
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
|
-
...
|
|
3400
|
+
...s
|
|
3393
3401
|
}),
|
|
3394
|
-
ref: vr(
|
|
3395
|
-
className: P(hr.tooltip,
|
|
3396
|
-
"data-placement":
|
|
3397
|
-
"data-state":
|
|
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
|
-
...
|
|
3400
|
-
...
|
|
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: "
|
|
3544
|
-
solid: "
|
|
3545
|
-
primary: "
|
|
3546
|
-
loading: "
|
|
3547
|
-
neutral: "
|
|
3548
|
-
success: "
|
|
3549
|
-
warning: "
|
|
3550
|
-
danger: "
|
|
3551
|
-
outline: "
|
|
3552
|
-
ghost: "
|
|
3553
|
-
soft: "
|
|
3554
|
-
link: "
|
|
3555
|
-
square: "
|
|
3556
|
-
rounded: "
|
|
3557
|
-
pill: "
|
|
3558
|
-
sm: "
|
|
3559
|
-
md: "
|
|
3560
|
-
lg: "
|
|
3561
|
-
fullWidth: "
|
|
3562
|
-
iconOnly: "
|
|
3563
|
-
label: "
|
|
3564
|
-
labelText: "
|
|
3565
|
-
icon: "
|
|
3566
|
-
spinner: "
|
|
3567
|
-
"button-spin": "_button-
|
|
3568
|
-
badge: "
|
|
3569
|
-
shortcut: "
|
|
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: "
|
|
3670
|
-
colorPrimary: "
|
|
3671
|
-
colorNeutral: "
|
|
3672
|
-
colorSuccess: "
|
|
3673
|
-
colorWarning: "
|
|
3674
|
-
colorDanger: "
|
|
3675
|
-
labelStart: "
|
|
3676
|
-
wrapperSm: "
|
|
3677
|
-
wrapperMd: "
|
|
3678
|
-
wrapperLg: "
|
|
3679
|
-
iconOnly: "
|
|
3680
|
-
container: "
|
|
3681
|
-
containerSm: "
|
|
3682
|
-
containerMd: "
|
|
3683
|
-
containerLg: "
|
|
3684
|
-
containerLabelStart: "
|
|
3685
|
-
descriptionText: "
|
|
3686
|
-
errorText: "
|
|
3687
|
-
input: "
|
|
3688
|
-
customCheckbox: "
|
|
3689
|
-
requiredMark: "
|
|
3690
|
-
error: "
|
|
3691
|
-
checkmark: "
|
|
3692
|
-
indeterminateMark: "
|
|
3693
|
-
customMark: "
|
|
3694
|
-
label: "
|
|
3695
|
-
labelSm: "
|
|
3696
|
-
labelMd: "
|
|
3697
|
-
labelLg: "
|
|
3698
|
-
indeterminate: "
|
|
3699
|
-
"checkbox-pop": "_checkbox-
|
|
3700
|
-
"checkbox-checkmark-in": "_checkbox-checkmark-
|
|
3701
|
-
"checkbox-indeterminate-in": "_checkbox-indeterminate-
|
|
3702
|
-
disabled: "
|
|
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,
|
|
4018
|
-
let [
|
|
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
|
-
}),
|
|
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 =
|
|
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
|
-
}, [
|
|
4034
|
-
let
|
|
4035
|
-
theme:
|
|
4036
|
-
setTheme:
|
|
4037
|
-
}), [
|
|
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:
|
|
4047
|
+
value: l,
|
|
4040
4048
|
children: /* @__PURE__ */ n("div", {
|
|
4041
|
-
"data-vellira-theme":
|
|
4042
|
-
children:
|
|
4049
|
+
"data-vellira-theme": c,
|
|
4050
|
+
children: a
|
|
4043
4051
|
})
|
|
4044
4052
|
});
|
|
4045
4053
|
};
|