@oliasoft-open-source/react-ui-library 10.0.0-beta-48 → 10.0.0-beta-49
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 +54 -46
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2746,7 +2746,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
2746
2746
|
var n;
|
|
2747
2747
|
return e.type === Ga.HEADING ? `heading-${t}` : e.createAble ? `create-${t}` : `option-${String((n = e.value) == null ? t : n)}`;
|
|
2748
2748
|
}, Tc = ({ listRef: e, sections: t, selectedOptions: n, onSelectOption: r, focusedOptionIndex: i, width: a, small: o, closeLayer: s, testId: c }) => {
|
|
2749
|
-
let l = _(null), u = o ? 24 : 30, f = u * 10, p = b(nc.layer, o && nc.small), m = h(() => t.map((e, t) => ({
|
|
2749
|
+
let l = _(null), u = o ? 24 : 30, f = u * 10, p = b(nc.layer, o && nc.small), m = t.length >= 100, g = h(() => t.map((e, t) => ({
|
|
2750
2750
|
...e,
|
|
2751
2751
|
id: wc(e, t),
|
|
2752
2752
|
index: t,
|
|
@@ -2757,7 +2757,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
2757
2757
|
i,
|
|
2758
2758
|
n
|
|
2759
2759
|
]);
|
|
2760
|
-
|
|
2760
|
+
d(() => (e.current = { scrollToRow: ({ index: e }) => {
|
|
2761
2761
|
l.current && Number.isInteger(e) && e >= 0 && (l.current.scrollTop = e * u);
|
|
2762
2762
|
} }, () => {
|
|
2763
2763
|
e.current = null;
|
|
@@ -2772,43 +2772,46 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
2772
2772
|
t,
|
|
2773
2773
|
n,
|
|
2774
2774
|
u
|
|
2775
|
-
])
|
|
2775
|
+
]);
|
|
2776
|
+
let v = /* @__PURE__ */ S(jr, {
|
|
2777
|
+
ref: l,
|
|
2778
|
+
"aria-label": "Options",
|
|
2779
|
+
className: p,
|
|
2780
|
+
style: {
|
|
2781
|
+
width: a,
|
|
2782
|
+
maxHeight: f
|
|
2783
|
+
},
|
|
2784
|
+
items: g,
|
|
2785
|
+
selectionMode: "none",
|
|
2786
|
+
renderEmptyState: () => /* @__PURE__ */ S("div", {
|
|
2787
|
+
className: nc.message,
|
|
2788
|
+
children: "No matches"
|
|
2789
|
+
}),
|
|
2790
|
+
"data-testid": c,
|
|
2791
|
+
children: (e) => {
|
|
2792
|
+
var t;
|
|
2793
|
+
let n = e.type === Ga.HEADING;
|
|
2794
|
+
return /* @__PURE__ */ S(Mr, {
|
|
2795
|
+
id: e.id,
|
|
2796
|
+
textValue: `${String((t = e.label) == null ? "" : t)}${e.details ? String(e.details) : ""}`,
|
|
2797
|
+
isDisabled: n || !!e.disabled,
|
|
2798
|
+
className: nc.listBoxItem,
|
|
2799
|
+
style: { height: u },
|
|
2800
|
+
children: /* @__PURE__ */ S(xc, {
|
|
2801
|
+
closeLayer: s,
|
|
2802
|
+
section: e,
|
|
2803
|
+
selected: e.selected,
|
|
2804
|
+
focused: e.focused,
|
|
2805
|
+
onSelectOption: (t) => r(t, e)
|
|
2806
|
+
})
|
|
2807
|
+
});
|
|
2808
|
+
}
|
|
2809
|
+
});
|
|
2810
|
+
return m ? /* @__PURE__ */ S(Pr, {
|
|
2776
2811
|
layout: Nr,
|
|
2777
2812
|
layoutOptions: { rowSize: u },
|
|
2778
|
-
children:
|
|
2779
|
-
|
|
2780
|
-
"aria-label": "Options",
|
|
2781
|
-
className: p,
|
|
2782
|
-
style: {
|
|
2783
|
-
width: a,
|
|
2784
|
-
maxHeight: f
|
|
2785
|
-
},
|
|
2786
|
-
items: m,
|
|
2787
|
-
selectionMode: "none",
|
|
2788
|
-
renderEmptyState: () => /* @__PURE__ */ S("div", {
|
|
2789
|
-
className: nc.message,
|
|
2790
|
-
children: "No matches"
|
|
2791
|
-
}),
|
|
2792
|
-
"data-testid": c,
|
|
2793
|
-
children: (e) => {
|
|
2794
|
-
var t;
|
|
2795
|
-
let n = e.type === Ga.HEADING;
|
|
2796
|
-
return /* @__PURE__ */ S(Mr, {
|
|
2797
|
-
id: e.id,
|
|
2798
|
-
textValue: `${String((t = e.label) == null ? "" : t)}${e.details ? String(e.details) : ""}`,
|
|
2799
|
-
isDisabled: n || !!e.disabled,
|
|
2800
|
-
className: nc.listBoxItem,
|
|
2801
|
-
children: /* @__PURE__ */ S(xc, {
|
|
2802
|
-
closeLayer: s,
|
|
2803
|
-
section: e,
|
|
2804
|
-
selected: e.selected,
|
|
2805
|
-
focused: e.focused,
|
|
2806
|
-
onSelectOption: (t) => r(t, e)
|
|
2807
|
-
})
|
|
2808
|
-
});
|
|
2809
|
-
}
|
|
2810
|
-
})
|
|
2811
|
-
});
|
|
2813
|
+
children: v
|
|
2814
|
+
}) : v;
|
|
2812
2815
|
}, Ec = {
|
|
2813
2816
|
inputInTable: "_inputInTable_c2rg4_1",
|
|
2814
2817
|
inputHover: "_inputHover_c2rg4_13",
|
|
@@ -3218,24 +3221,29 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
3218
3221
|
createAble: N,
|
|
3219
3222
|
listRef: P
|
|
3220
3223
|
});
|
|
3221
|
-
|
|
3224
|
+
m(() => {
|
|
3222
3225
|
V.isLayerOpen && z(ue(F.current));
|
|
3223
3226
|
}, [
|
|
3224
3227
|
ue,
|
|
3225
3228
|
V.isLayerOpen,
|
|
3226
3229
|
V.visibleOptions,
|
|
3227
3230
|
s
|
|
3228
|
-
])
|
|
3231
|
+
]);
|
|
3232
|
+
let de = _(ce);
|
|
3233
|
+
return de.current = ce, d(() => {
|
|
3229
3234
|
if (!V.isLayerOpen) return;
|
|
3230
|
-
let e = (
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3235
|
+
let e = !1, t = window.setTimeout(() => {
|
|
3236
|
+
e = !0;
|
|
3237
|
+
}, 0), n = (t) => {
|
|
3238
|
+
var n, r;
|
|
3239
|
+
if (!e) return;
|
|
3240
|
+
let i = t.target;
|
|
3241
|
+
i && ((n = F.current) != null && n.contains(i) || (r = I.current) != null && r.contains(i) || de.current());
|
|
3234
3242
|
};
|
|
3235
|
-
return document.addEventListener("pointerdown",
|
|
3236
|
-
document.removeEventListener("pointerdown",
|
|
3243
|
+
return document.addEventListener("pointerdown", n, !0), () => {
|
|
3244
|
+
window.clearTimeout(t), document.removeEventListener("pointerdown", n, !0);
|
|
3237
3245
|
};
|
|
3238
|
-
}, [V.isLayerOpen
|
|
3246
|
+
}, [V.isLayerOpen]), /* @__PURE__ */ C("div", {
|
|
3239
3247
|
style: { width: te() },
|
|
3240
3248
|
onKeyDown: (e) => {
|
|
3241
3249
|
Object.values(Bc).includes(e.key) && ne(e.key, e);
|
package/package.json
CHANGED