@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.
@@ -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,mDA4E3B,CAAC"}
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 ((e || t || o) && !Da(m)) {
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: "_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"
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 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;
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((d = (f = e.menu) == null ? void 0 : f.label) == null ? e.label : d),
1042
- isDisabled: C,
1043
- "data-testid": T,
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: (p = (m = (h = e.menu) == null ? void 0 : h.label) == null ? e.label : m) == null ? "" : p,
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: b
1048
+ selected: v
1049
1049
  })
1050
1050
  }), /* @__PURE__ */ x(Ma, {
1051
1051
  className: y(q.menuPopover, q.menuPopoverNested),
1052
- placement: w,
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: (g = (_ = e.menu) == null ? void 0 : _.sections) == null ? [] : g,
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: T ? `${T}-layer` : void 0
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("div", {
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 == null ? e.testId : c, re = V ? `${V}-layer` : void 0, ie = /* @__PURE__ */ x(Aa, {
1253
+ let ne = qa(I).placement, V = c ? `${c}-layer` : void 0, re = /* @__PURE__ */ x(Aa, {
1260
1254
  behavior: ka.PRESS,
1261
- testId: V,
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(ie, {
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: re
1305
+ testId: V
1311
1306
  })
1312
1307
  })]
1313
1308
  });
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-16",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {