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

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,47 +843,46 @@ 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 }) => {
880
+ let s = 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: s,
887
886
  "data-overlay-layer": !0,
888
887
  children: i ? e : /* @__PURE__ */ S("div", {
889
888
  id: Ui,
@@ -983,13 +982,15 @@ var pa = {
983
982
  return e.HEADING = "Heading", e.DIVIDER = "Divider", e.OPTION = "Option", e.MENU = "Menu", e;
984
983
  }({}), Ia = /* @__PURE__ */ function(e) {
985
984
  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),
985
+ }({}), La = o(({ label: e, title: t, carat: n, disabled: r, isOpen: i, selected: a, className: o, ...s }, c) => {
986
+ let l;
987
+ return t ? l = t : (typeof e == "string" || typeof e == "number") && (l = String(e)), /* @__PURE__ */ S("div", {
988
+ ref: c,
989
+ className: y(q.trigger, r ? q.disabled : null, i ? q.active : null, a ? q == null ? void 0 : q.selected : null, o),
990
+ ...s,
990
991
  children: [/* @__PURE__ */ x("span", {
991
992
  className: q.label,
992
- title: o,
993
+ title: l,
993
994
  children: e
994
995
  }), n && n === Ia.RIGHT ? /* @__PURE__ */ x("span", {
995
996
  className: q.arrow,
@@ -999,7 +1000,7 @@ var pa = {
999
1000
  children: /* @__PURE__ */ x(W, { icon: H.CHEVRON_DOWN })
1000
1001
  }) : null]
1001
1002
  });
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 }) => {
1003
+ }), 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
1004
  let s = u(U);
1004
1005
  switch (e.type) {
1005
1006
  case Fa.HEADING:
@@ -1203,8 +1204,10 @@ var pa = {
1203
1204
  });
1204
1205
  }
1205
1206
  return /* @__PURE__ */ x("div", {
1207
+ ref: a,
1206
1208
  className: y(q.component, t ? q.disabled : null),
1207
1209
  "data-testid": n,
1210
+ ...i,
1208
1211
  children: e
1209
1212
  });
1210
1213
  }), 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 +1221,43 @@ var pa = {
1218
1221
  dot: r,
1219
1222
  small: !r,
1220
1223
  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,
1224
+ }) : 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) => {
1225
+ let b = i === hi.BUTTON || i === hi.DROP_DOWN_BUTTON, S = i === hi.COMPONENT;
1226
+ return b ? /* @__PURE__ */ x(Ka, {
1227
+ ref: y,
1228
+ trigger: i,
1229
+ label: a == null ? "" : a,
1230
+ colored: s,
1231
+ small: c,
1232
+ width: r,
1232
1233
  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,
1234
+ groupOrder: d,
1235
+ loading: n,
1236
+ error: p,
1237
+ warning: m,
1238
+ active: f || e,
1239
+ tabIndex: _,
1240
+ testId: h,
1241
+ ...v
1242
+ }) : i === hi.TEXT ? /* @__PURE__ */ x(La, {
1243
+ ref: y,
1244
+ label: a == null ? "" : a,
1245
+ title: o,
1244
1246
  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,
1247
+ carat: l ? Ia.RIGHT : Ia.DOWN,
1248
+ isOpen: f,
1249
+ selected: g,
1250
+ tabIndex: _,
1251
+ ...v
1252
+ }) : S ? /* @__PURE__ */ x(Ja, {
1253
+ ref: y,
1254
+ component: u,
1251
1255
  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 }) => {
1256
+ testId: h,
1257
+ tabIndex: _,
1258
+ ...v
1259
+ }) : null;
1260
+ }), 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
1261
  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
1262
  B && e || (R ? p(e) : O(e));
1279
1263
  }, [
@@ -1298,37 +1282,42 @@ var pa = {
1298
1282
  return /* @__PURE__ */ S(Dn, {
1299
1283
  isOpen: z,
1300
1284
  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,
1285
+ children: [/* @__PURE__ */ x(Ya, {
1286
+ tooltip: m,
1287
+ error: h,
1288
+ warning: v,
1289
+ children: Xa(/* @__PURE__ */ x(Ea, {
1290
+ behavior: Ta.PRESS,
1291
+ testId: c,
1292
+ isDisabled: B,
1293
+ triggerRef: E,
1294
+ safeComponents: [K],
1295
+ attachToForwardRef: !0,
1296
+ children: /* @__PURE__ */ x(Za, {
1297
+ active: b,
1298
+ disabled: B,
1299
+ loading: a,
1300
+ width: t,
1301
+ trigger: j,
1302
+ label: k,
1303
+ title: A,
1304
+ colored: M,
1305
+ small: N,
1306
+ component: F,
1307
+ groupOrder: C,
1308
+ isOpen: z,
1309
+ error: h,
1310
+ warning: v,
1311
+ tabIndex: y
1312
+ })
1313
+ }), {
1311
1314
  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
1315
+ badgeDot: i
1328
1316
  })
1329
1317
  }), /* @__PURE__ */ x(Aa, {
1330
1318
  placement: ne,
1331
1319
  triggerRef: E,
1320
+ offset: w,
1332
1321
  children: /* @__PURE__ */ x(Ba, {
1333
1322
  sections: P,
1334
1323
  width: t,
@@ -7343,7 +7332,6 @@ var vo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), yo =
7343
7332
  maxHeight: "100%",
7344
7333
  menu: {
7345
7334
  trigger: hi.COMPONENT,
7346
- fullHeightTrigger: !0,
7347
7335
  placement: "bottom-start",
7348
7336
  component: /* @__PURE__ */ x(Tf, {
7349
7337
  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-4",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {