@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/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: "_layer_1q5ig_1",
866
- nested: "_nested_1q5ig_14",
867
- fileInput: "_fileInput_1q5ig_17",
868
- trigger: "_trigger_1q5ig_23",
869
- heading: "_heading_1q5ig_32",
870
- headingIcon: "_headingIcon_1q5ig_38",
871
- clickable: "_clickable_1q5ig_45",
872
- option: "_option_1q5ig_49",
873
- active: "_active_1q5ig_68",
874
- disabled: "_disabled_1q5ig_73",
875
- selected: "_selected_1q5ig_76",
876
- optionContent: "_optionContent_1q5ig_83",
877
- inline: "_inline_1q5ig_87",
878
- icon: "_icon_1q5ig_92",
879
- check: "_check_1q5ig_93",
880
- label: "_label_1q5ig_119",
881
- description: "_description_1q5ig_131",
882
- arrow: "_arrow_1q5ig_135",
883
- divider: "_divider_1q5ig_139",
884
- buttonLabel: "_buttonLabel_1q5ig_147",
885
- component: "_component_1q5ig_154",
886
- right: "_right_1q5ig_160",
887
- actions: "_actions_1q5ig_165",
888
- menuPopover: "_menuPopover_1q5ig_172",
889
- menuPopoverNested: "_menuPopoverNested_1q5ig_194",
890
- menuItem: "_menuItem_1q5ig_197",
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 v = (o = e.menu) == null ? void 0 : o.sections, b = Array.isArray(v) && v.some((e) => e == null ? void 0 : e.selected), C = Fa((s = e.menu) == null ? {} : s), w = ((c = e.menu) == null ? void 0 : c.placement) || "right-start", T = (l = e.testId) == null ? (u = e.menu) == null ? void 0 : u.testId : l;
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((d = (f = e.menu) == null ? void 0 : f.label) == null ? e.label : d),
1042
- isDisabled: C,
1043
- "data-testid": T,
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: (p = (m = (h = e.menu) == null ? void 0 : h.label) == null ? e.label : m) == null ? "" : p,
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: b
1047
+ selected: v
1049
1048
  })
1050
1049
  }), /* @__PURE__ */ x(Ma, {
1051
1050
  className: y(q.menuPopover, q.menuPopoverNested),
1052
- placement: w,
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: (g = (_ = e.menu) == null ? void 0 : _.sections) == null ? [] : g,
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: T ? `${T}-layer` : void 0
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("div", {
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 == null ? e.testId : c, re = V ? `${V}-layer` : void 0, ie = /* @__PURE__ */ x(Aa, {
1252
+ let ne = qa(I).placement, V = c ? `${c}-layer` : void 0, re = /* @__PURE__ */ x(Aa, {
1260
1253
  behavior: ka.PRESS,
1261
- testId: V,
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(ie, {
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: re
1304
+ testId: V
1311
1305
  })
1312
1306
  })]
1313
1307
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "8.0.0-beta-14",
3
+ "version": "8.0.0-beta-15",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {