@oliasoft-open-source/react-ui-library 8.0.0-beta-14 → 8.0.0-beta-16
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 +1 -0
- 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/helpers/overlay-trigger/overlay-trigger-child.d.ts.map +1 -1
- package/dist/index.js +46 -51
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-trigger-child.d.ts","sourceRoot":"","sources":["../../../src/helpers/overlay-trigger/overlay-trigger-child.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAmE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEtH,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,QAAQ,EAAE,sBAAsB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrC,wEAAwE;IACxE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,0BAA0B,CAAC,KAAK,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC7G,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAChD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,cAAc,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,yIAWjC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"overlay-trigger-child.d.ts","sourceRoot":"","sources":["../../../src/helpers/overlay-trigger/overlay-trigger-child.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAmE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEtH,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,QAAQ,EAAE,sBAAsB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrC,wEAAwE;IACxE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,0BAA0B,CAAC,KAAK,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC7G,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAChD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,cAAc,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,yIAWjC,yBAAyB,mDA+E3B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -802,8 +802,8 @@ var _a = {
|
|
|
802
802
|
children: e
|
|
803
803
|
});
|
|
804
804
|
if (m) {
|
|
805
|
-
let e = typeof m.type == "string", t = f.includes(m.type), o = d && Ea(m);
|
|
806
|
-
if (
|
|
805
|
+
let e = typeof m.type == "string", t = f.includes(m.type), o = d && Ea(m), s = e || t || o, l = n === "focus" && Da(m);
|
|
806
|
+
if (s && !l) {
|
|
807
807
|
let t = {}, { role: o, tabIndex: s } = m.props;
|
|
808
808
|
if (a) {
|
|
809
809
|
var _;
|
|
@@ -817,6 +817,7 @@ var _a = {
|
|
|
817
817
|
return g(/* @__PURE__ */ x("span", {
|
|
818
818
|
role: n === "press" ? "button" : void 0,
|
|
819
819
|
tabIndex: n === "press" ? i ? -1 : 0 : void 0,
|
|
820
|
+
"aria-disabled": i || void 0,
|
|
820
821
|
"data-testid": a,
|
|
821
822
|
style: l,
|
|
822
823
|
...u,
|
|
@@ -862,33 +863,32 @@ var _a = {
|
|
|
862
863
|
let { sections: t } = e;
|
|
863
864
|
return !s(t) && (!Array.isArray(t) || t.every((e) => cn(e)));
|
|
864
865
|
}, 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"
|
|
866
|
+
layer: "_layer_14ect_1",
|
|
867
|
+
nested: "_nested_14ect_14",
|
|
868
|
+
fileInput: "_fileInput_14ect_17",
|
|
869
|
+
trigger: "_trigger_14ect_23",
|
|
870
|
+
heading: "_heading_14ect_32",
|
|
871
|
+
headingIcon: "_headingIcon_14ect_38",
|
|
872
|
+
clickable: "_clickable_14ect_45",
|
|
873
|
+
option: "_option_14ect_49",
|
|
874
|
+
active: "_active_14ect_68",
|
|
875
|
+
disabled: "_disabled_14ect_73",
|
|
876
|
+
selected: "_selected_14ect_76",
|
|
877
|
+
optionContent: "_optionContent_14ect_83",
|
|
878
|
+
inline: "_inline_14ect_87",
|
|
879
|
+
icon: "_icon_14ect_92",
|
|
880
|
+
check: "_check_14ect_93",
|
|
881
|
+
label: "_label_14ect_119",
|
|
882
|
+
description: "_description_14ect_131",
|
|
883
|
+
arrow: "_arrow_14ect_135",
|
|
884
|
+
divider: "_divider_14ect_139",
|
|
885
|
+
buttonLabel: "_buttonLabel_14ect_147",
|
|
886
|
+
component: "_component_14ect_154",
|
|
887
|
+
right: "_right_14ect_160",
|
|
888
|
+
actions: "_actions_14ect_165",
|
|
889
|
+
menuPopover: "_menuPopover_14ect_172",
|
|
890
|
+
menuPopoverNested: "_menuPopoverNested_14ect_194",
|
|
891
|
+
menuItem: "_menuItem_14ect_197"
|
|
892
892
|
}, Ia = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ S("div", {
|
|
893
893
|
"data-testid": r,
|
|
894
894
|
children: [e, !!n && /* @__PURE__ */ x("span", {
|
|
@@ -1034,31 +1034,32 @@ var _a = {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
}), Wa = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", Ga = (e, t, { closeOnOptionClick: n, close: r, maxHeight: i, width: a }) => {
|
|
1036
1036
|
if (e.type === Ba.MENU) {
|
|
1037
|
-
var o, s, c, l, u, d, f, p, m, h, g
|
|
1038
|
-
let
|
|
1037
|
+
var o, s, c, l, u, d, f, p, m, h, g;
|
|
1038
|
+
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
1039
|
return /* @__PURE__ */ S(kn, { children: [/* @__PURE__ */ x(En, {
|
|
1040
1040
|
className: q.menuItem,
|
|
1041
|
-
textValue: Wa((
|
|
1042
|
-
isDisabled:
|
|
1043
|
-
"data-testid":
|
|
1041
|
+
textValue: Wa((l = (u = e.menu) == null ? void 0 : u.label) == null ? e.label : l),
|
|
1042
|
+
isDisabled: b,
|
|
1043
|
+
"data-testid": w,
|
|
1044
1044
|
children: /* @__PURE__ */ x(Ua, {
|
|
1045
|
-
label: (
|
|
1045
|
+
label: (d = (f = (p = e.menu) == null ? void 0 : p.label) == null ? e.label : f) == null ? "" : d,
|
|
1046
1046
|
title: e.title,
|
|
1047
1047
|
carat: Va.RIGHT,
|
|
1048
|
-
selected:
|
|
1048
|
+
selected: v
|
|
1049
1049
|
})
|
|
1050
1050
|
}), /* @__PURE__ */ x(Ma, {
|
|
1051
1051
|
className: y(q.menuPopover, q.menuPopoverNested),
|
|
1052
|
-
placement:
|
|
1052
|
+
placement: C,
|
|
1053
1053
|
isNested: !0,
|
|
1054
|
+
"data-testid": (m = e.menu) == null ? void 0 : m.testId,
|
|
1054
1055
|
children: /* @__PURE__ */ x(Ka, {
|
|
1055
|
-
sections: (
|
|
1056
|
+
sections: (h = (g = e.menu) == null ? void 0 : g.sections) == null ? [] : h,
|
|
1056
1057
|
isNested: !0,
|
|
1057
1058
|
width: a,
|
|
1058
1059
|
closeOnOptionClick: n,
|
|
1059
1060
|
close: r,
|
|
1060
1061
|
maxHeight: i,
|
|
1061
|
-
testId:
|
|
1062
|
+
testId: w ? `${w}-layer` : void 0
|
|
1062
1063
|
})
|
|
1063
1064
|
})] }, `${e.type}-${t}`);
|
|
1064
1065
|
}
|
|
@@ -1070,14 +1071,7 @@ var _a = {
|
|
|
1070
1071
|
}, Ka = ({ sections: e, isNested: t = !1, width: n, closeOnOptionClick: r, close: i, maxHeight: a, showAllButton: o, testId: c }) => {
|
|
1071
1072
|
var l, u;
|
|
1072
1073
|
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
|
-
});
|
|
1074
|
+
if (s(e)) return /* @__PURE__ */ x(b, { children: e });
|
|
1081
1075
|
let p = e, m = (l = o == null || (u = o.additionalSections) == null ? void 0 : u.map((e) => ({
|
|
1082
1076
|
...e,
|
|
1083
1077
|
closeOnOptionClick: r,
|
|
@@ -1256,9 +1250,9 @@ var _a = {
|
|
|
1256
1250
|
triggerRef: E,
|
|
1257
1251
|
close: te
|
|
1258
1252
|
});
|
|
1259
|
-
let ne = qa(I).placement, V = c
|
|
1253
|
+
let ne = qa(I).placement, V = c ? `${c}-layer` : void 0, re = /* @__PURE__ */ x(Aa, {
|
|
1260
1254
|
behavior: ka.PRESS,
|
|
1261
|
-
testId:
|
|
1255
|
+
testId: c,
|
|
1262
1256
|
isDisabled: B,
|
|
1263
1257
|
triggerRef: E,
|
|
1264
1258
|
safeComponents: [K],
|
|
@@ -1291,7 +1285,7 @@ var _a = {
|
|
|
1291
1285
|
tooltip: m,
|
|
1292
1286
|
error: h,
|
|
1293
1287
|
warning: v,
|
|
1294
|
-
children: no(
|
|
1288
|
+
children: no(re, {
|
|
1295
1289
|
badgeTitle: r,
|
|
1296
1290
|
badgeDot: i
|
|
1297
1291
|
})
|
|
@@ -1300,6 +1294,7 @@ var _a = {
|
|
|
1300
1294
|
placement: ne,
|
|
1301
1295
|
portalTriggerRef: E,
|
|
1302
1296
|
offset: w,
|
|
1297
|
+
"data-testid": e.testId,
|
|
1303
1298
|
children: /* @__PURE__ */ x(Ka, {
|
|
1304
1299
|
sections: P,
|
|
1305
1300
|
width: t,
|
|
@@ -1307,7 +1302,7 @@ var _a = {
|
|
|
1307
1302
|
close: te,
|
|
1308
1303
|
maxHeight: s,
|
|
1309
1304
|
showAllButton: L,
|
|
1310
|
-
testId:
|
|
1305
|
+
testId: V
|
|
1311
1306
|
})
|
|
1312
1307
|
})]
|
|
1313
1308
|
});
|
package/package.json
CHANGED