@oliasoft-open-source/react-ui-library 9.5.0-beta-1 → 9.5.0-beta-2

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
@@ -2692,24 +2692,23 @@ var Mo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), No =
2692
2692
  window.removeEventListener("resize", n);
2693
2693
  }), []), e;
2694
2694
  }, ac = {
2695
- layerContainer: "_layerContainer_ptlxg_1",
2696
- layer: "_layer_ptlxg_1",
2697
- enter: "_enter_ptlxg_14",
2698
- enterActive: "_enterActive_ptlxg_18",
2699
- small: "_small_ptlxg_32",
2700
- listBox: "_listBox_ptlxg_35",
2701
- listBoxItem: "_listBoxItem_ptlxg_39",
2702
- heading: "_heading_ptlxg_43",
2703
- option: "_option_ptlxg_44",
2704
- message: "_message_ptlxg_45",
2705
- focused: "_focused_ptlxg_84",
2706
- selected: "_selected_ptlxg_88",
2707
- disabled: "_disabled_ptlxg_95",
2708
- check: "_check_ptlxg_99",
2709
- optionContent: "_optionContent_ptlxg_116",
2710
- label: "_label_ptlxg_121",
2711
- icon: "_icon_ptlxg_128",
2712
- details: "_details_ptlxg_133"
2695
+ layerContainer: "_layerContainer_yvqu5_1",
2696
+ layer: "_layer_yvqu5_1",
2697
+ enter: "_enter_yvqu5_14",
2698
+ enterActive: "_enterActive_yvqu5_18",
2699
+ small: "_small_yvqu5_32",
2700
+ listBox: "_listBox_yvqu5_35",
2701
+ listBoxItem: "_listBoxItem_yvqu5_39",
2702
+ heading: "_heading_yvqu5_43",
2703
+ option: "_option_yvqu5_44",
2704
+ message: "_message_yvqu5_45",
2705
+ focused: "_focused_yvqu5_86",
2706
+ selected: "_selected_yvqu5_89",
2707
+ check: "_check_yvqu5_102",
2708
+ optionContent: "_optionContent_yvqu5_119",
2709
+ label: "_label_yvqu5_124",
2710
+ icon: "_icon_yvqu5_131",
2711
+ details: "_details_yvqu5_136"
2713
2712
  }, oc = (e, t) => {
2714
2713
  let n = document.createElement("canvas").getContext("2d");
2715
2714
  return n ? (n.font = t, n.measureText(e).width) : 0;
@@ -2727,61 +2726,56 @@ var Mo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), No =
2727
2726
  onClick: (e) => e.stopPropagation(),
2728
2727
  className: ac.heading,
2729
2728
  children: e
2730
- }), Cc = ({ details: e, label: t, icon: n, disabled: r = !1, selected: i = !1, focused: a = !1, onSelectOption: o, actions: s, closeLayer: c, testId: l }) => /* @__PURE__ */ C("div", {
2731
- className: b(ac.option, r ? ac.disabled : "", i ? ac == null ? void 0 : ac.selected : "", a ? ac.focused : ""),
2732
- onClick: !r && o ? o : void 0,
2733
- "data-testid": l,
2734
- children: [
2735
- /* @__PURE__ */ S("div", {
2736
- className: ac.optionContent,
2737
- children: /* @__PURE__ */ C("span", {
2738
- className: ac.label,
2739
- title: String(t),
2740
- children: [t, n && /* @__PURE__ */ S("span", {
2741
- className: ac.icon,
2742
- children: n
2743
- })]
2744
- })
2745
- }),
2746
- e && /* @__PURE__ */ S("div", {
2747
- className: b(ac.details),
2748
- children: /* @__PURE__ */ S(Qo, {
2749
- faint: !0,
2750
- children: e
2751
- })
2752
- }),
2753
- !!(s != null && s.length) && /* @__PURE__ */ S("div", {
2754
- className: b(ac.actions),
2755
- children: /* @__PURE__ */ S(ho, {
2756
- actions: s,
2757
- closeLayer: c
2758
- })
2759
- }),
2760
- /* @__PURE__ */ S("span", {
2761
- className: ac.check,
2762
- children: i ? /* @__PURE__ */ S(G, { icon: U.CHECK }) : null
2729
+ }), Cc = ({ details: e, label: t, icon: n, selected: r = !1, actions: i, closeLayer: a }) => /* @__PURE__ */ C(x, { children: [
2730
+ /* @__PURE__ */ S("div", {
2731
+ className: ac.optionContent,
2732
+ children: /* @__PURE__ */ C("span", {
2733
+ className: ac.label,
2734
+ title: String(t),
2735
+ children: [t, n && /* @__PURE__ */ S("span", {
2736
+ className: ac.icon,
2737
+ children: n
2738
+ })]
2763
2739
  })
2764
- ]
2765
- }), wc = "create", Tc = (e, t) => e.type === Ja.HEADING ? `heading-${t}` : e.createAble ? wc : String(e.value), Ec = ({ item: e, onSelectOption: t, closeLayer: n }) => {
2740
+ }),
2741
+ e && /* @__PURE__ */ S("div", {
2742
+ className: ac.details,
2743
+ children: /* @__PURE__ */ S(Qo, {
2744
+ faint: !0,
2745
+ children: e
2746
+ })
2747
+ }),
2748
+ !!(i != null && i.length) && /* @__PURE__ */ S("div", {
2749
+ className: ac.actions,
2750
+ children: /* @__PURE__ */ S(ho, {
2751
+ actions: i,
2752
+ closeLayer: a
2753
+ })
2754
+ }),
2755
+ /* @__PURE__ */ S("span", {
2756
+ className: ac.check,
2757
+ children: r ? /* @__PURE__ */ S(G, { icon: U.CHECK }) : null
2758
+ })
2759
+ ] }), wc = "create", Tc = (e, t) => e.type === Ja.HEADING ? `heading-${t}` : e.createAble ? wc : String(e.value), Ec = ({ item: e, onSelectOption: t, closeLayer: n }) => {
2766
2760
  var r;
2767
- let i = u(W), { section: a, isSelected: o, isFocused: s } = e;
2761
+ let i = u(W), { section: a, isSelected: o, isFocused: s } = e, c = a.type === Ja.HEADING, l = c || !!a.disabled || i;
2768
2762
  return /* @__PURE__ */ S(Mr, {
2769
2763
  id: e.id,
2770
2764
  textValue: String((r = a.label) == null ? "" : r),
2771
- isDisabled: a.type === Ja.HEADING || !!a.disabled,
2772
- className: ac.listBoxItem,
2765
+ isDisabled: l,
2766
+ className: b(c ? ac.listBoxItem : ac.option, s && ac.focused, o && ac.selected),
2767
+ "data-testid": a.testId,
2773
2768
  onPointerDown: (e) => e.preventDefault(),
2774
- children: a.type === Ja.HEADING ? /* @__PURE__ */ S(Sc, { label: a.label }) : /* @__PURE__ */ S(Cc, {
2769
+ onAction: l ? void 0 : () => {
2770
+ t == null || t(void 0, a);
2771
+ },
2772
+ children: c ? /* @__PURE__ */ S(Sc, { label: a.label }) : /* @__PURE__ */ S(Cc, {
2775
2773
  closeLayer: n,
2776
2774
  actions: a.actions,
2777
2775
  label: a.label,
2778
2776
  details: a.details,
2779
2777
  icon: a.icon,
2780
- disabled: a.disabled || i,
2781
- selected: o,
2782
- focused: s,
2783
- onSelectOption: (e) => t == null ? void 0 : t(e, a),
2784
- testId: a.testId
2778
+ selected: o
2785
2779
  })
2786
2780
  });
2787
2781
  }, Dc = (e, t) => !e || e.type === Ja.HEADING ? !1 : Array.isArray(t) ? t.some((t) => t && t.value == e.value) : e.value == (t == null ? void 0 : t.value), Oc = (e, t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "9.5.0-beta-1",
3
+ "version": "9.5.0-beta-2",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {