@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/global.css +1 -1
- package/dist/index.js +94 -104
- package/package.json +1 -1
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: "
|
|
2677
|
-
layerContainer: "
|
|
2678
|
-
layer: "
|
|
2679
|
-
small: "
|
|
2680
|
-
listBoxItem: "
|
|
2681
|
-
heading: "
|
|
2682
|
-
option: "
|
|
2683
|
-
message: "
|
|
2684
|
-
check: "
|
|
2685
|
-
optionContent: "
|
|
2686
|
-
label: "
|
|
2687
|
-
icon: "
|
|
2688
|
-
details: "
|
|
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 =
|
|
2802
|
-
|
|
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((
|
|
2808
|
-
var
|
|
2809
|
-
let
|
|
2810
|
-
return s ? Math.max(
|
|
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
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
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
|
-
]),
|
|
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]),
|
|
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
|
|
2840
|
+
return A;
|
|
2852
2841
|
}, [
|
|
2853
|
-
|
|
2842
|
+
A,
|
|
2854
2843
|
i,
|
|
2855
2844
|
t
|
|
2856
|
-
]),
|
|
2845
|
+
]), M = l((e) => {
|
|
2857
2846
|
n == null || n({ target: {} }, e);
|
|
2858
|
-
}, [n]),
|
|
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
|
-
|
|
2870
|
-
|
|
2858
|
+
searchValue: g,
|
|
2859
|
+
onChangeSearch: C,
|
|
2871
2860
|
isOpen: b,
|
|
2872
2861
|
setIsOpen: S,
|
|
2873
|
-
|
|
2874
|
-
comboValue:
|
|
2875
|
-
selectedItemId:
|
|
2876
|
-
getTriggerWidth:
|
|
2877
|
-
getLayerWidth:
|
|
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
|
|
2881
|
-
if (
|
|
2882
|
-
|
|
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
|
|
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
|
-
|
|
2884
|
+
M(r);
|
|
2895
2885
|
return;
|
|
2896
2886
|
}
|
|
2897
|
-
let
|
|
2898
|
-
if (Mr(
|
|
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
|
-
|
|
2893
|
+
M({ value: null });
|
|
2904
2894
|
return;
|
|
2905
2895
|
}
|
|
2906
|
-
if (String(
|
|
2907
|
-
|
|
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
|
|
2912
|
-
!
|
|
2913
|
-
value:
|
|
2914
|
-
label:
|
|
2915
|
-
details:
|
|
2916
|
-
icon:
|
|
2917
|
-
actions:
|
|
2918
|
-
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
|
-
|
|
2911
|
+
M,
|
|
2912
|
+
N,
|
|
2923
2913
|
i,
|
|
2924
|
-
|
|
2914
|
+
k
|
|
2925
2915
|
]),
|
|
2926
|
-
|
|
2927
|
-
y(""),
|
|
2928
|
-
}, [
|
|
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: "
|
|
2976
|
-
inputHover: "
|
|
2977
|
-
inputFocus: "
|
|
2978
|
-
controlFocusVisible: "
|
|
2979
|
-
inputError: "
|
|
2980
|
-
inputWarning: "
|
|
2981
|
-
inputDisabled: "
|
|
2982
|
-
hideScrollbars: "
|
|
2983
|
-
trigger: "
|
|
2984
|
-
input: "
|
|
2985
|
-
isInTable: "
|
|
2986
|
-
isOpen: "
|
|
2987
|
-
disabled: "
|
|
2988
|
-
toggle: "
|
|
2989
|
-
icons: "
|
|
2990
|
-
clearAll: "
|
|
2991
|
-
iconOpen: "
|
|
2992
|
-
small: "
|
|
2993
|
-
triggerInputContainer: "
|
|
2994
|
-
right: "
|
|
2995
|
-
multiOptions: "
|
|
2996
|
-
multiOption: "
|
|
2997
|
-
label: "
|
|
2998
|
-
closeMultiOption: "
|
|
2999
|
-
focus: "
|
|
3000
|
-
selectedSingleValue: "
|
|
3001
|
-
placeHolder: "
|
|
3002
|
-
groupOrderFirst: "
|
|
3003
|
-
groupOrderMiddle: "
|
|
3004
|
-
groupOrderLast: "
|
|
3005
|
-
detailedLabel: "
|
|
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), {
|
|
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