@oliasoft-open-source/react-ui-library 8.0.0-beta-14 → 8.0.0-beta-15
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 +3 -3
- package/dist/components/menu/layer/layer.d.ts.map +1 -1
- package/dist/components/menu/menu.test-case.stories.d.ts.map +1 -1
- package/dist/components/option-dropdown/option-dropdown.test-case.stories.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +43 -49
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -862,33 +862,32 @@ var _a = {
|
|
|
862
862
|
let { sections: t } = e;
|
|
863
863
|
return !s(t) && (!Array.isArray(t) || t.every((e) => cn(e)));
|
|
864
864
|
}, q = {
|
|
865
|
-
layer: "
|
|
866
|
-
nested: "
|
|
867
|
-
fileInput: "
|
|
868
|
-
trigger: "
|
|
869
|
-
heading: "
|
|
870
|
-
headingIcon: "
|
|
871
|
-
clickable: "
|
|
872
|
-
option: "
|
|
873
|
-
active: "
|
|
874
|
-
disabled: "
|
|
875
|
-
selected: "
|
|
876
|
-
optionContent: "
|
|
877
|
-
inline: "
|
|
878
|
-
icon: "
|
|
879
|
-
check: "
|
|
880
|
-
label: "
|
|
881
|
-
description: "
|
|
882
|
-
arrow: "
|
|
883
|
-
divider: "
|
|
884
|
-
buttonLabel: "
|
|
885
|
-
component: "
|
|
886
|
-
right: "
|
|
887
|
-
actions: "
|
|
888
|
-
menuPopover: "
|
|
889
|
-
menuPopoverNested: "
|
|
890
|
-
menuItem: "
|
|
891
|
-
customSections: "_customSections_1q5ig_212"
|
|
865
|
+
layer: "_layer_14ect_1",
|
|
866
|
+
nested: "_nested_14ect_14",
|
|
867
|
+
fileInput: "_fileInput_14ect_17",
|
|
868
|
+
trigger: "_trigger_14ect_23",
|
|
869
|
+
heading: "_heading_14ect_32",
|
|
870
|
+
headingIcon: "_headingIcon_14ect_38",
|
|
871
|
+
clickable: "_clickable_14ect_45",
|
|
872
|
+
option: "_option_14ect_49",
|
|
873
|
+
active: "_active_14ect_68",
|
|
874
|
+
disabled: "_disabled_14ect_73",
|
|
875
|
+
selected: "_selected_14ect_76",
|
|
876
|
+
optionContent: "_optionContent_14ect_83",
|
|
877
|
+
inline: "_inline_14ect_87",
|
|
878
|
+
icon: "_icon_14ect_92",
|
|
879
|
+
check: "_check_14ect_93",
|
|
880
|
+
label: "_label_14ect_119",
|
|
881
|
+
description: "_description_14ect_131",
|
|
882
|
+
arrow: "_arrow_14ect_135",
|
|
883
|
+
divider: "_divider_14ect_139",
|
|
884
|
+
buttonLabel: "_buttonLabel_14ect_147",
|
|
885
|
+
component: "_component_14ect_154",
|
|
886
|
+
right: "_right_14ect_160",
|
|
887
|
+
actions: "_actions_14ect_165",
|
|
888
|
+
menuPopover: "_menuPopover_14ect_172",
|
|
889
|
+
menuPopoverNested: "_menuPopoverNested_14ect_194",
|
|
890
|
+
menuItem: "_menuItem_14ect_197"
|
|
892
891
|
}, Ia = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ S("div", {
|
|
893
892
|
"data-testid": r,
|
|
894
893
|
children: [e, !!n && /* @__PURE__ */ x("span", {
|
|
@@ -1034,31 +1033,32 @@ var _a = {
|
|
|
1034
1033
|
});
|
|
1035
1034
|
}), Wa = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", Ga = (e, t, { closeOnOptionClick: n, close: r, maxHeight: i, width: a }) => {
|
|
1036
1035
|
if (e.type === Ba.MENU) {
|
|
1037
|
-
var o, s, c, l, u, d, f, p, m, h, g
|
|
1038
|
-
let
|
|
1036
|
+
var o, s, c, l, u, d, f, p, m, h, g;
|
|
1037
|
+
let _ = (o = e.menu) == null ? void 0 : o.sections, v = Array.isArray(_) && _.some((e) => e == null ? void 0 : e.selected), b = Fa((s = e.menu) == null ? {} : s), C = ((c = e.menu) == null ? void 0 : c.placement) || "right-start", w = e.testId;
|
|
1039
1038
|
return /* @__PURE__ */ S(kn, { children: [/* @__PURE__ */ x(En, {
|
|
1040
1039
|
className: q.menuItem,
|
|
1041
|
-
textValue: Wa((
|
|
1042
|
-
isDisabled:
|
|
1043
|
-
"data-testid":
|
|
1040
|
+
textValue: Wa((l = (u = e.menu) == null ? void 0 : u.label) == null ? e.label : l),
|
|
1041
|
+
isDisabled: b,
|
|
1042
|
+
"data-testid": w,
|
|
1044
1043
|
children: /* @__PURE__ */ x(Ua, {
|
|
1045
|
-
label: (
|
|
1044
|
+
label: (d = (f = (p = e.menu) == null ? void 0 : p.label) == null ? e.label : f) == null ? "" : d,
|
|
1046
1045
|
title: e.title,
|
|
1047
1046
|
carat: Va.RIGHT,
|
|
1048
|
-
selected:
|
|
1047
|
+
selected: v
|
|
1049
1048
|
})
|
|
1050
1049
|
}), /* @__PURE__ */ x(Ma, {
|
|
1051
1050
|
className: y(q.menuPopover, q.menuPopoverNested),
|
|
1052
|
-
placement:
|
|
1051
|
+
placement: C,
|
|
1053
1052
|
isNested: !0,
|
|
1053
|
+
"data-testid": (m = e.menu) == null ? void 0 : m.testId,
|
|
1054
1054
|
children: /* @__PURE__ */ x(Ka, {
|
|
1055
|
-
sections: (
|
|
1055
|
+
sections: (h = (g = e.menu) == null ? void 0 : g.sections) == null ? [] : h,
|
|
1056
1056
|
isNested: !0,
|
|
1057
1057
|
width: a,
|
|
1058
1058
|
closeOnOptionClick: n,
|
|
1059
1059
|
close: r,
|
|
1060
1060
|
maxHeight: i,
|
|
1061
|
-
testId:
|
|
1061
|
+
testId: w ? `${w}-layer` : void 0
|
|
1062
1062
|
})
|
|
1063
1063
|
})] }, `${e.type}-${t}`);
|
|
1064
1064
|
}
|
|
@@ -1070,14 +1070,7 @@ var _a = {
|
|
|
1070
1070
|
}, Ka = ({ sections: e, isNested: t = !1, width: n, closeOnOptionClick: r, close: i, maxHeight: a, showAllButton: o, testId: c }) => {
|
|
1071
1071
|
var l, u;
|
|
1072
1072
|
let [d, f] = _(!(o != null && o.visible));
|
|
1073
|
-
if (s(e)) return /* @__PURE__ */ x(
|
|
1074
|
-
className: q.layer,
|
|
1075
|
-
"data-testid": c,
|
|
1076
|
-
children: /* @__PURE__ */ x("div", {
|
|
1077
|
-
className: q.customSections,
|
|
1078
|
-
children: e
|
|
1079
|
-
})
|
|
1080
|
-
});
|
|
1073
|
+
if (s(e)) return /* @__PURE__ */ x(b, { children: e });
|
|
1081
1074
|
let p = e, m = (l = o == null || (u = o.additionalSections) == null ? void 0 : u.map((e) => ({
|
|
1082
1075
|
...e,
|
|
1083
1076
|
closeOnOptionClick: r,
|
|
@@ -1256,9 +1249,9 @@ var _a = {
|
|
|
1256
1249
|
triggerRef: E,
|
|
1257
1250
|
close: te
|
|
1258
1251
|
});
|
|
1259
|
-
let ne = qa(I).placement, V = c
|
|
1252
|
+
let ne = qa(I).placement, V = c ? `${c}-layer` : void 0, re = /* @__PURE__ */ x(Aa, {
|
|
1260
1253
|
behavior: ka.PRESS,
|
|
1261
|
-
testId:
|
|
1254
|
+
testId: c,
|
|
1262
1255
|
isDisabled: B,
|
|
1263
1256
|
triggerRef: E,
|
|
1264
1257
|
safeComponents: [K],
|
|
@@ -1291,7 +1284,7 @@ var _a = {
|
|
|
1291
1284
|
tooltip: m,
|
|
1292
1285
|
error: h,
|
|
1293
1286
|
warning: v,
|
|
1294
|
-
children: no(
|
|
1287
|
+
children: no(re, {
|
|
1295
1288
|
badgeTitle: r,
|
|
1296
1289
|
badgeDot: i
|
|
1297
1290
|
})
|
|
@@ -1300,6 +1293,7 @@ var _a = {
|
|
|
1300
1293
|
placement: ne,
|
|
1301
1294
|
portalTriggerRef: E,
|
|
1302
1295
|
offset: w,
|
|
1296
|
+
"data-testid": e.testId,
|
|
1303
1297
|
children: /* @__PURE__ */ x(Ka, {
|
|
1304
1298
|
sections: P,
|
|
1305
1299
|
width: t,
|
|
@@ -1307,7 +1301,7 @@ var _a = {
|
|
|
1307
1301
|
close: te,
|
|
1308
1302
|
maxHeight: s,
|
|
1309
1303
|
showAllButton: L,
|
|
1310
|
-
testId:
|
|
1304
|
+
testId: V
|
|
1311
1305
|
})
|
|
1312
1306
|
})]
|
|
1313
1307
|
});
|
package/package.json
CHANGED