@oliasoft-open-source/react-ui-library 8.0.0-beta-3 → 8.0.0-beta-5

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
@@ -843,48 +843,48 @@ var pa = {
843
843
  let { sections: t } = e;
844
844
  return !s(t) && (!Array.isArray(t) || t.every((e) => ln(e)));
845
845
  }, q = {
846
- wrapper: "_wrapper_r9cul_1",
847
- layer: "_layer_r9cul_6",
848
- layerContainer: "_layerContainer_r9cul_9",
849
- enter: "_enter_r9cul_25",
850
- enterActive: "_enterActive_r9cul_29",
851
- nested: "_nested_r9cul_34",
852
- fileInput: "_fileInput_r9cul_55",
853
- trigger: "_trigger_r9cul_61",
854
- heading: "_heading_r9cul_70",
855
- headingIcon: "_headingIcon_r9cul_76",
856
- clickable: "_clickable_r9cul_83",
857
- option: "_option_r9cul_87",
858
- active: "_active_r9cul_106",
859
- disabled: "_disabled_r9cul_111",
860
- selected: "_selected_r9cul_114",
861
- optionContent: "_optionContent_r9cul_121",
862
- inline: "_inline_r9cul_125",
863
- icon: "_icon_r9cul_130",
864
- check: "_check_r9cul_131",
865
- text: "_text_r9cul_157",
866
- label: "_label_r9cul_162",
867
- description: "_description_r9cul_174",
868
- arrow: "_arrow_r9cul_178",
869
- divider: "_divider_r9cul_182",
870
- deprecatedSemanticIcon: "_deprecatedSemanticIcon_r9cul_186",
871
- buttonLabel: "_buttonLabel_r9cul_194",
872
- component: "_component_r9cul_201",
873
- right: "_right_r9cul_207",
874
- actions: "_actions_r9cul_212",
875
- menuPopover: "_menuPopover_r9cul_219",
876
- menuPopoverNested: "_menuPopoverNested_r9cul_241",
877
- modalContainer: "_modalContainer_r9cul_244",
878
- menuItem: "_menuItem_r9cul_247",
879
- customSections: "_customSections_r9cul_262"
880
- }, Aa = ({ children: e, placement: t = "bottom-start", triggerRef: n, portalTriggerRef: r, isNested: i = !1, className: a }) => {
881
- let o = i ? void 0 : _a((r == null ? n : r).current);
846
+ layerContainer: "_layerContainer_uahkz_1",
847
+ layer: "_layer_uahkz_1",
848
+ enter: "_enter_uahkz_17",
849
+ enterActive: "_enterActive_uahkz_21",
850
+ nested: "_nested_uahkz_26",
851
+ fileInput: "_fileInput_uahkz_47",
852
+ trigger: "_trigger_uahkz_53",
853
+ heading: "_heading_uahkz_62",
854
+ headingIcon: "_headingIcon_uahkz_68",
855
+ clickable: "_clickable_uahkz_75",
856
+ option: "_option_uahkz_79",
857
+ active: "_active_uahkz_98",
858
+ disabled: "_disabled_uahkz_103",
859
+ selected: "_selected_uahkz_106",
860
+ optionContent: "_optionContent_uahkz_113",
861
+ inline: "_inline_uahkz_117",
862
+ icon: "_icon_uahkz_122",
863
+ check: "_check_uahkz_123",
864
+ text: "_text_uahkz_149",
865
+ label: "_label_uahkz_154",
866
+ description: "_description_uahkz_166",
867
+ arrow: "_arrow_uahkz_170",
868
+ divider: "_divider_uahkz_174",
869
+ deprecatedSemanticIcon: "_deprecatedSemanticIcon_uahkz_178",
870
+ buttonLabel: "_buttonLabel_uahkz_186",
871
+ component: "_component_uahkz_193",
872
+ right: "_right_uahkz_199",
873
+ actions: "_actions_uahkz_204",
874
+ menuPopover: "_menuPopover_uahkz_211",
875
+ menuPopoverNested: "_menuPopoverNested_uahkz_233",
876
+ modalContainer: "_modalContainer_uahkz_236",
877
+ menuItem: "_menuItem_uahkz_239",
878
+ customSections: "_customSections_uahkz_254"
879
+ }, Aa = ({ children: e, placement: t = "bottom-start", triggerRef: n, portalTriggerRef: r, isNested: i = !1, className: a, offset: o = 0, testId: s }) => {
880
+ let c = i ? void 0 : _a((r == null ? n : r).current);
882
881
  return /* @__PURE__ */ x(On, {
883
882
  className: y(q.menuPopover, i && q.menuPopoverNested, a),
884
883
  placement: ha(t),
885
- offset: 0,
886
- UNSTABLE_portalContainer: o,
884
+ offset: i ? 0 : o,
885
+ UNSTABLE_portalContainer: c,
887
886
  "data-overlay-layer": !0,
887
+ "data-testid": s,
888
888
  children: i ? e : /* @__PURE__ */ S("div", {
889
889
  id: Ui,
890
890
  className: q.modalContainer,
@@ -983,13 +983,15 @@ var pa = {
983
983
  return e.HEADING = "Heading", e.DIVIDER = "Divider", e.OPTION = "Option", e.MENU = "Menu", e;
984
984
  }({}), Ia = /* @__PURE__ */ function(e) {
985
985
  return e.FALSE = "false", e.RIGHT = "right", e.DOWN = "down", e;
986
- }({}), La = ({ label: e, title: t, carat: n, disabled: r, isOpen: i, selected: a }) => {
987
- let o;
988
- return t ? o = t : (typeof e == "string" || typeof e == "number") && (o = String(e)), /* @__PURE__ */ S("div", {
989
- className: y(q.trigger, r ? q.disabled : null, i ? q.active : null, a ? q == null ? void 0 : q.selected : null),
986
+ }({}), La = o(({ label: e, title: t, carat: n, disabled: r, isOpen: i, selected: a, className: o, ...s }, c) => {
987
+ let l;
988
+ return t ? l = t : (typeof e == "string" || typeof e == "number") && (l = String(e)), /* @__PURE__ */ S("div", {
989
+ ref: c,
990
+ className: y(q.trigger, r ? q.disabled : null, i ? q.active : null, a ? q == null ? void 0 : q.selected : null, o),
991
+ ...s,
990
992
  children: [/* @__PURE__ */ x("span", {
991
993
  className: q.label,
992
- title: o,
994
+ title: l,
993
995
  children: e
994
996
  }), n && n === Ia.RIGHT ? /* @__PURE__ */ x("span", {
995
997
  className: q.arrow,
@@ -999,7 +1001,7 @@ var pa = {
999
1001
  children: /* @__PURE__ */ x(W, { icon: H.CHEVRON_DOWN })
1000
1002
  }) : null]
1001
1003
  });
1002
- }, Ra = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", za = ({ section: e, closeOnOptionClick: t, close: n, closeParent: r, maxHeight: i, width: a, triggerRef: o }) => {
1004
+ }), Ra = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", za = ({ section: e, closeOnOptionClick: t, close: n, closeParent: r, maxHeight: i, width: a, triggerRef: o }) => {
1003
1005
  let s = u(U);
1004
1006
  switch (e.type) {
1005
1007
  case Fa.HEADING:
@@ -1203,8 +1205,10 @@ var pa = {
1203
1205
  });
1204
1206
  }
1205
1207
  return /* @__PURE__ */ x("div", {
1208
+ ref: a,
1206
1209
  className: y(q.component, t ? q.disabled : null),
1207
1210
  "data-testid": n,
1211
+ ...i,
1208
1212
  children: e
1209
1213
  });
1210
1214
  }), Ya = ({ tooltip: e, error: t, warning: n, children: r }) => !J(e) && !J(t) && !J(n) ? /* @__PURE__ */ x(b, { children: r }) : /* @__PURE__ */ x(G, {
@@ -1218,62 +1222,43 @@ var pa = {
1218
1222
  dot: r,
1219
1223
  small: !r,
1220
1224
  children: e
1221
- }) : e, Za = e.forwardRef(({ active: e, disabled: t, badgeTitle: n, badgeDot: r, loading: i, width: a, trigger: o, label: c, title: l, colored: u, small: d, isNested: f, component: p, groupOrder: m, fullHeight: h, isOpen: g, error: _, warning: v, tooltip: y, testId: b, selected: S, tabIndex: C, ...w }, T) => {
1222
- let E = o === hi.BUTTON || o === hi.DROP_DOWN_BUTTON, D = o === hi.COMPONENT, O = D && s(p) && Sa(p), k = a ? { width: a } : { ...h && {
1223
- height: "100%",
1224
- display: "flex"
1225
- } }, A = E ? /* @__PURE__ */ x(Ka, {
1226
- ref: T,
1227
- trigger: o,
1228
- label: c == null ? "" : c,
1229
- colored: u,
1230
- small: d,
1231
- width: a,
1225
+ }) : e, Za = e.forwardRef(({ active: e, disabled: t, loading: n, width: r, trigger: i, label: a, title: o, colored: s, small: c, isNested: l, component: u, groupOrder: d, isOpen: f, error: p, warning: m, testId: h, selected: g, tabIndex: _, ...v }, y) => {
1226
+ let b = i === hi.BUTTON || i === hi.DROP_DOWN_BUTTON, S = i === hi.COMPONENT;
1227
+ return b ? /* @__PURE__ */ x(Ka, {
1228
+ ref: y,
1229
+ trigger: i,
1230
+ label: a == null ? "" : a,
1231
+ colored: s,
1232
+ small: c,
1233
+ width: r,
1232
1234
  disabled: t,
1233
- groupOrder: m,
1234
- loading: i,
1235
- error: _,
1236
- warning: v,
1237
- active: g || e,
1238
- tabIndex: C,
1239
- testId: b,
1240
- ...w
1241
- }) : o === hi.TEXT ? /* @__PURE__ */ x(La, {
1242
- label: c == null ? "" : c,
1243
- title: l,
1235
+ groupOrder: d,
1236
+ loading: n,
1237
+ error: p,
1238
+ warning: m,
1239
+ active: f || e,
1240
+ tabIndex: _,
1241
+ testId: h,
1242
+ ...v
1243
+ }) : i === hi.TEXT ? /* @__PURE__ */ x(La, {
1244
+ ref: y,
1245
+ label: a == null ? "" : a,
1246
+ title: o,
1244
1247
  disabled: t,
1245
- carat: f ? Ia.RIGHT : Ia.DOWN,
1246
- isOpen: g,
1247
- selected: S
1248
- }) : D ? /* @__PURE__ */ x(Ja, {
1249
- ref: O ? T : void 0,
1250
- component: p,
1248
+ carat: l ? Ia.RIGHT : Ia.DOWN,
1249
+ isOpen: f,
1250
+ selected: g,
1251
+ tabIndex: _,
1252
+ ...v
1253
+ }) : S ? /* @__PURE__ */ x(Ja, {
1254
+ ref: y,
1255
+ component: u,
1251
1256
  disabled: t,
1252
- testId: b,
1253
- tabIndex: O ? C : void 0,
1254
- ...O ? w : {}
1255
- }) : null, j = !E && !O;
1256
- return /* @__PURE__ */ x("div", {
1257
- ref: j ? T : void 0,
1258
- className: q.wrapper,
1259
- tabIndex: j ? C : void 0,
1260
- style: k,
1261
- "data-error": _ || null,
1262
- "data-warning": v || null,
1263
- "data-testid": j ? b : void 0,
1264
- ...j ? w : void 0,
1265
- children: /* @__PURE__ */ x(Ya, {
1266
- tooltip: y,
1267
- error: _,
1268
- warning: v,
1269
- children: Xa(A, {
1270
- isNested: f,
1271
- badgeTitle: n,
1272
- badgeDot: r
1273
- })
1274
- })
1275
- });
1276
- }), Qa = ({ menu: e, width: t, disabled: n = !1, badgeTitle: r, badgeDot: i = !1, loading: a = !1, closeOnOptionClick: o = !0, maxHeight: s, testId: c, open: f, setOpen: p, tooltip: m, error: h, warning: v, tabIndex: y, active: b, fullHeightTrigger: C, groupOrder: w }) => {
1257
+ testId: h,
1258
+ tabIndex: _,
1259
+ ...v
1260
+ }) : null;
1261
+ }), Qa = ({ menu: e, width: t, disabled: n = !1, badgeTitle: r, badgeDot: i = !1, loading: a = !1, closeOnOptionClick: o = !0, maxHeight: s, testId: c, open: f, setOpen: p, tooltip: m, error: h, warning: v, tabIndex: y, active: b, groupOrder: C, offset: w = 0 }) => {
1277
1262
  let T = u(U), E = g(null), [D, O] = _(!1), { label: k, title: A, trigger: j, colored: M, small: N, sections: P, component: F, placement: I, showAllButton: L } = e, R = cn(f) && dn(p), z = R ? f : D, B = n || ka(e) || T, ee = l((e) => {
1278
1263
  B && e || (R ? p(e) : O(e));
1279
1264
  }, [
@@ -1294,41 +1279,47 @@ var pa = {
1294
1279
  triggerRef: E,
1295
1280
  close: te
1296
1281
  });
1297
- let ne = Va(I).placement, re = c ? `${c}-layer` : e.testId;
1282
+ let ne = Va(I).placement, re = c ? `${c}-layer` : void 0;
1298
1283
  return /* @__PURE__ */ S(Dn, {
1299
1284
  isOpen: z,
1300
1285
  onOpenChange: ee,
1301
- children: [/* @__PURE__ */ x(Ea, {
1302
- behavior: Ta.PRESS,
1303
- testId: c,
1304
- isDisabled: B,
1305
- triggerRef: E,
1306
- safeComponents: [K],
1307
- attachToForwardRef: !0,
1308
- children: /* @__PURE__ */ x(Za, {
1309
- active: b,
1310
- disabled: B,
1286
+ children: [/* @__PURE__ */ x(Ya, {
1287
+ tooltip: m,
1288
+ error: h,
1289
+ warning: v,
1290
+ children: Xa(/* @__PURE__ */ x(Ea, {
1291
+ behavior: Ta.PRESS,
1292
+ testId: c,
1293
+ isDisabled: B,
1294
+ triggerRef: E,
1295
+ safeComponents: [K],
1296
+ attachToForwardRef: !0,
1297
+ children: /* @__PURE__ */ x(Za, {
1298
+ active: b,
1299
+ disabled: B,
1300
+ loading: a,
1301
+ width: t,
1302
+ trigger: j,
1303
+ label: k,
1304
+ title: A,
1305
+ colored: M,
1306
+ small: N,
1307
+ component: F,
1308
+ groupOrder: C,
1309
+ isOpen: z,
1310
+ error: h,
1311
+ warning: v,
1312
+ tabIndex: y
1313
+ })
1314
+ }), {
1311
1315
  badgeTitle: r,
1312
- badgeDot: i,
1313
- loading: a,
1314
- width: t,
1315
- trigger: j,
1316
- label: k,
1317
- title: A,
1318
- colored: M,
1319
- small: N,
1320
- component: F,
1321
- groupOrder: w,
1322
- fullHeight: C == null ? e.fullHeightTrigger : C,
1323
- isOpen: z,
1324
- error: h,
1325
- warning: v,
1326
- tooltip: m,
1327
- tabIndex: y
1316
+ badgeDot: i
1328
1317
  })
1329
1318
  }), /* @__PURE__ */ x(Aa, {
1330
1319
  placement: ne,
1331
1320
  triggerRef: E,
1321
+ offset: w,
1322
+ testId: e.testId,
1332
1323
  children: /* @__PURE__ */ x(Ba, {
1333
1324
  sections: P,
1334
1325
  width: t,
@@ -7343,7 +7334,6 @@ var vo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), yo =
7343
7334
  maxHeight: "100%",
7344
7335
  menu: {
7345
7336
  trigger: hi.COMPONENT,
7346
- fullHeightTrigger: !0,
7347
7337
  placement: "bottom-start",
7348
7338
  component: /* @__PURE__ */ x(Tf, {
7349
7339
  label: e.label,
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-3",
3
+ "version": "8.0.0-beta-5",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {