@oliasoft-open-source/react-ui-library 10.0.0-beta-21 → 10.0.0-beta-23

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
@@ -2673,19 +2673,19 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2673
2673
  })
2674
2674
  });
2675
2675
  }, sc = {
2676
- select: "_select_15lfm_1",
2677
- layerContainer: "_layerContainer_15lfm_6",
2678
- layer: "_layer_15lfm_6",
2679
- small: "_small_15lfm_50",
2680
- listBoxItem: "_listBoxItem_15lfm_53",
2681
- heading: "_heading_15lfm_57",
2682
- option: "_option_15lfm_58",
2683
- message: "_message_15lfm_59",
2684
- check: "_check_15lfm_123",
2685
- optionContent: "_optionContent_15lfm_140",
2686
- label: "_label_15lfm_145",
2687
- icon: "_icon_15lfm_152",
2688
- details: "_details_15lfm_157"
2676
+ select: "_select_12180_1",
2677
+ layerContainer: "_layerContainer_12180_6",
2678
+ layer: "_layer_12180_6",
2679
+ small: "_small_12180_50",
2680
+ listBoxItem: "_listBoxItem_12180_53",
2681
+ heading: "_heading_12180_57",
2682
+ option: "_option_12180_58",
2683
+ message: "_message_12180_59",
2684
+ check: "_check_12180_123",
2685
+ optionContent: "_optionContent_12180_140",
2686
+ label: "_label_12180_145",
2687
+ icon: "_icon_12180_152",
2688
+ details: "_details_12180_157"
2689
2689
  }, cc = ({ triggerRef: e, stateRef: t }) => {
2690
2690
  let n = u(jr);
2691
2691
  return Ja({
@@ -2798,24 +2798,21 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2798
2798
  var t;
2799
2799
  (t = p.current) == null || t.open();
2800
2800
  }
2801
- }, []), w = l(() => o ? o === "auto" ? Dc(e, a, f, c == null ? "" : c) : o : "100%", [
2802
- o,
2801
+ }, []), w = o === "auto" || s, T = h(() => w ? Dc(e, a, f, c == null ? "" : c) : 0, [
2802
+ w,
2803
2803
  e,
2804
2804
  a,
2805
2805
  f,
2806
2806
  c
2807
- ]), T = l((t) => {
2808
- var n;
2809
- let r = (n = t == null ? void 0 : t.getBoundingClientRect().width) == null ? typeof w() == "number" ? w() : 0 : n;
2810
- return s ? Math.max(Dc(e, a, f, c == null ? "" : c), r) : r;
2807
+ ]), E = l(() => o ? o === "auto" ? T : o : "100%", [o, T]), D = l((e) => {
2808
+ var t;
2809
+ let n = E(), r = (t = e == null ? void 0 : e.getBoundingClientRect().width) == null ? typeof n == "number" ? n : 0 : t;
2810
+ return s ? Math.max(T, r) : r;
2811
2811
  }, [
2812
2812
  s,
2813
- e,
2814
- a,
2815
- f,
2816
- c,
2817
- w
2818
- ]), E = h(() => {
2813
+ T,
2814
+ E
2815
+ ]), O = h(() => {
2819
2816
  let t = e.filter((e) => Nc(e, g)).map((e, t) => Pc(e, t));
2820
2817
  return d && g && t.push(Pc({
2821
2818
  label: `Create "${g}"`,
@@ -2826,36 +2823,28 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2826
2823
  e,
2827
2824
  g,
2828
2825
  d
2829
- ]), D = h(() => {
2826
+ ]), k = h(() => {
2830
2827
  let t = /* @__PURE__ */ new Map();
2831
2828
  return e.forEach((e, n) => {
2832
2829
  t.set(jc(e, n), e);
2833
- }), d && g && t.set(Ac, {
2834
- label: `Create "${g}"`,
2835
- value: g,
2836
- createAble: !0
2837
2830
  }), t;
2838
- }, [
2839
- e,
2840
- d,
2841
- g
2842
- ]), O = h(() => {
2831
+ }, [e]), A = h(() => {
2843
2832
  if (i) return (Array.isArray(t) ? t : []).filter((e) => e && !Mr(e.value)).map((e) => String(e.value));
2844
2833
  let e = Array.isArray(t) ? t[0] : t;
2845
2834
  return Mr(e == null ? void 0 : e.value) ? null : String(e.value);
2846
- }, [i, t]), k = h(() => {
2835
+ }, [i, t]), j = h(() => {
2847
2836
  if (i) {
2848
2837
  let e = Array.isArray(t) ? t[0] : null;
2849
2838
  return Mr(e == null ? void 0 : e.value) ? null : String(e.value);
2850
2839
  }
2851
- return O;
2840
+ return A;
2852
2841
  }, [
2853
- O,
2842
+ A,
2854
2843
  i,
2855
2844
  t
2856
- ]), A = l((e) => {
2845
+ ]), M = l((e) => {
2857
2846
  n == null || n({ target: {} }, e);
2858
- }, [n]), j = l((e = g) => {
2847
+ }, [n]), N = l((e = g) => {
2859
2848
  if (!(!r || !e) && (m.current = !0, r(e), y(""), !i)) {
2860
2849
  var t;
2861
2850
  (t = p.current) == null || t.close();
@@ -2866,24 +2855,25 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2866
2855
  r
2867
2856
  ]);
2868
2857
  return {
2869
- inputValue: g,
2870
- handleInputChange: C,
2858
+ searchValue: g,
2859
+ onChangeSearch: C,
2871
2860
  isOpen: b,
2872
2861
  setIsOpen: S,
2873
- collectionItems: E,
2874
- comboValue: O,
2875
- selectedItemId: k,
2876
- getTriggerWidth: w,
2877
- getLayerWidth: T,
2862
+ visibleOptions: O,
2863
+ comboValue: A,
2864
+ selectedItemId: j,
2865
+ getTriggerWidth: E,
2866
+ getLayerWidth: D,
2878
2867
  handleChange: l((e) => {
2879
2868
  if (y(""), i) {
2880
- let r = Fc(e);
2881
- if (r.includes("create")) {
2882
- var t, n;
2883
- j(String((t = (n = D.get("create")) == null ? void 0 : n.value) == null ? "" : t));
2869
+ let t = Fc(e);
2870
+ if (t.includes("create")) {
2871
+ N();
2884
2872
  return;
2885
2873
  }
2886
- let i = r.map((e) => D.get(e)).filter((e) => !Mr(e) && e.type !== eo.HEADING).map((e) => ({
2874
+ let n = Array.isArray(A) ? A : [];
2875
+ if (t.length === n.length && t.every((e) => n.includes(e))) return;
2876
+ let r = t.map((e) => k.get(e)).filter((e) => !Mr(e) && e.type !== eo.HEADING).map((e) => ({
2887
2877
  value: e.value,
2888
2878
  label: e.label,
2889
2879
  details: e.details,
@@ -2891,41 +2881,41 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2891
2881
  actions: e.actions,
2892
2882
  testId: e.testId
2893
2883
  }));
2894
- A(i);
2884
+ M(r);
2895
2885
  return;
2896
2886
  }
2897
- let r = Array.isArray(e) ? e[0] : e;
2898
- if (Mr(r)) {
2887
+ let t = Array.isArray(e) ? e[0] : e;
2888
+ if (Mr(t)) {
2899
2889
  if (m.current) {
2900
2890
  m.current = !1;
2901
2891
  return;
2902
2892
  }
2903
- A({ value: null });
2893
+ M({ value: null });
2904
2894
  return;
2905
2895
  }
2906
- if (String(r) === "create") {
2907
- var a, o;
2908
- j(String((a = (o = D.get("create")) == null ? void 0 : o.value) == null ? "" : a));
2896
+ if (String(t) === "create") {
2897
+ N();
2909
2898
  return;
2910
2899
  }
2911
- let s = D.get(String(r));
2912
- !s || s.type === eo.HEADING || s.disabled || s.createAble || A({
2913
- value: s.value,
2914
- label: s.label,
2915
- details: s.details,
2916
- icon: s.icon,
2917
- actions: s.actions,
2918
- testId: s.testId
2900
+ let n = k.get(String(t));
2901
+ !n || n.type === eo.HEADING || n.disabled || n.createAble || M({
2902
+ value: n.value,
2903
+ label: n.label,
2904
+ details: n.details,
2905
+ icon: n.icon,
2906
+ actions: n.actions,
2907
+ testId: n.testId
2919
2908
  });
2920
2909
  }, [
2921
2910
  A,
2922
- j,
2911
+ M,
2912
+ N,
2923
2913
  i,
2924
- D
2914
+ k
2925
2915
  ]),
2926
- handleClear: l(() => {
2927
- y(""), A(i ? [] : { value: null });
2928
- }, [A, i]),
2916
+ onClickClearAll: l(() => {
2917
+ y(""), M(i ? [] : { value: null });
2918
+ }, [M, i]),
2929
2919
  closeLayer: l(() => {
2930
2920
  if (u) {
2931
2921
  var e;
@@ -2972,37 +2962,37 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
2972
2962
  })
2973
2963
  });
2974
2964
  }, Y = {
2975
- inputInTable: "_inputInTable_13wru_1",
2976
- inputHover: "_inputHover_13wru_13",
2977
- inputFocus: "_inputFocus_13wru_18",
2978
- controlFocusVisible: "_controlFocusVisible_13wru_25",
2979
- inputError: "_inputError_13wru_29",
2980
- inputWarning: "_inputWarning_13wru_30",
2981
- inputDisabled: "_inputDisabled_13wru_65",
2982
- hideScrollbars: "_hideScrollbars_13wru_71",
2983
- trigger: "_trigger_13wru_81",
2984
- input: "_input_13wru_1",
2985
- isInTable: "_isInTable_13wru_97",
2986
- isOpen: "_isOpen_13wru_118",
2987
- disabled: "_disabled_13wru_161",
2988
- toggle: "_toggle_13wru_167",
2989
- icons: "_icons_13wru_176",
2990
- clearAll: "_clearAll_13wru_184",
2991
- iconOpen: "_iconOpen_13wru_185",
2992
- small: "_small_13wru_196",
2993
- triggerInputContainer: "_triggerInputContainer_13wru_208",
2994
- right: "_right_13wru_217",
2995
- multiOptions: "_multiOptions_13wru_233",
2996
- multiOption: "_multiOption_13wru_233",
2997
- label: "_label_13wru_261",
2998
- closeMultiOption: "_closeMultiOption_13wru_264",
2999
- focus: "_focus_13wru_275",
3000
- selectedSingleValue: "_selectedSingleValue_13wru_279",
3001
- placeHolder: "_placeHolder_13wru_280",
3002
- groupOrderFirst: "_groupOrderFirst_13wru_319",
3003
- groupOrderMiddle: "_groupOrderMiddle_13wru_320",
3004
- groupOrderLast: "_groupOrderLast_13wru_324",
3005
- detailedLabel: "_detailedLabel_13wru_329"
2965
+ inputInTable: "_inputInTable_d0ffs_1",
2966
+ inputHover: "_inputHover_d0ffs_13",
2967
+ inputFocus: "_inputFocus_d0ffs_18",
2968
+ controlFocusVisible: "_controlFocusVisible_d0ffs_25",
2969
+ inputError: "_inputError_d0ffs_29",
2970
+ inputWarning: "_inputWarning_d0ffs_30",
2971
+ inputDisabled: "_inputDisabled_d0ffs_65",
2972
+ hideScrollbars: "_hideScrollbars_d0ffs_71",
2973
+ trigger: "_trigger_d0ffs_81",
2974
+ input: "_input_d0ffs_1",
2975
+ isInTable: "_isInTable_d0ffs_100",
2976
+ isOpen: "_isOpen_d0ffs_121",
2977
+ disabled: "_disabled_d0ffs_164",
2978
+ toggle: "_toggle_d0ffs_170",
2979
+ icons: "_icons_d0ffs_179",
2980
+ clearAll: "_clearAll_d0ffs_187",
2981
+ iconOpen: "_iconOpen_d0ffs_188",
2982
+ small: "_small_d0ffs_199",
2983
+ triggerInputContainer: "_triggerInputContainer_d0ffs_211",
2984
+ right: "_right_d0ffs_220",
2985
+ multiOptions: "_multiOptions_d0ffs_238",
2986
+ multiOption: "_multiOption_d0ffs_238",
2987
+ label: "_label_d0ffs_266",
2988
+ closeMultiOption: "_closeMultiOption_d0ffs_269",
2989
+ focus: "_focus_d0ffs_280",
2990
+ selectedSingleValue: "_selectedSingleValue_d0ffs_284",
2991
+ placeHolder: "_placeHolder_d0ffs_285",
2992
+ groupOrderFirst: "_groupOrderFirst_d0ffs_326",
2993
+ groupOrderMiddle: "_groupOrderMiddle_d0ffs_327",
2994
+ groupOrderLast: "_groupOrderLast_d0ffs_331",
2995
+ detailedLabel: "_detailedLabel_d0ffs_336"
3006
2996
  }, Rc = (e, t, n, r) => {
3007
2997
  let i = [], a = [], o = 0;
3008
2998
  return e.forEach((s, c) => {
@@ -3152,7 +3142,7 @@ var Ro = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), zo =
3152
3142
  children: A
3153
3143
  }) });
3154
3144
  }, Hc = (e) => {
3155
- let { multi: t = !1, disabled: n = !1, error: r = null, warning: i = null, tooltip: a = null, options: o, selectedOptions: s, onChange: c, onCreate: l = null, placeholder: d = "", small: f = !1, tabIndex: p = 0, onFocus: h = Pr, onBlur: g = Pr, searchable: y = !0, clearable: b = !1, maxTooltipWidth: x, closeOnOptionActionClick: w, isInTable: T = !1, groupOrder: E, right: D = !1, width: O = null, autoLayerWidth: k = !1, testId: A } = e, j = u(W), M = n || j, N = _(null), [P, F] = v(0), { inputValue: I, handleInputChange: L, isOpen: R, setIsOpen: z, collectionItems: B, comboValue: ee, selectedItemId: te, getTriggerWidth: ne, getLayerWidth: V, handleChange: re, handleClear: ie, closeLayer: ae, comboBoxStateRef: oe } = Ic({
3145
+ let { multi: t = !1, disabled: n = !1, error: r = null, warning: i = null, tooltip: a = null, options: o, selectedOptions: s, onChange: c, onCreate: l = null, placeholder: d = "", small: f = !1, tabIndex: p = 0, onFocus: h = Pr, onBlur: g = Pr, searchable: y = !0, clearable: b = !1, maxTooltipWidth: x, closeOnOptionActionClick: w, isInTable: T = !1, groupOrder: E, right: D = !1, width: O = null, autoLayerWidth: k = !1, testId: A } = e, j = u(W), M = n || j, N = _(null), [P, F] = v(0), { searchValue: I, onChangeSearch: L, isOpen: R, setIsOpen: z, visibleOptions: B, comboValue: ee, selectedItemId: te, getTriggerWidth: ne, getLayerWidth: V, handleChange: re, onClickClearAll: ie, closeLayer: ae, comboBoxStateRef: oe } = Ic({
3156
3146
  options: o,
3157
3147
  selectedOptions: s,
3158
3148
  onChange: c,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "10.0.0-beta-21",
3
+ "version": "10.0.0-beta-23",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {