@oliasoft-open-source/react-ui-library 9.1.0-beta-3 → 9.1.0-beta-5-beta-1
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/components/rich-text-input/mention/mention-suggestions.d.ts +0 -1
- package/dist/components/rich-text-input/mention/mention-suggestions.d.ts.map +1 -1
- package/dist/components/rich-text-input/mention/mention.interface.d.ts +0 -1
- package/dist/components/rich-text-input/mention/mention.interface.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +56 -61
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6591,101 +6591,96 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6591
6591
|
},
|
|
6592
6592
|
render: t
|
|
6593
6593
|
} }), sf = {
|
|
6594
|
-
inputInTable: "
|
|
6595
|
-
inputHover: "
|
|
6596
|
-
inputFocus: "
|
|
6597
|
-
controlFocusVisible: "
|
|
6598
|
-
inputError: "
|
|
6599
|
-
inputWarning: "
|
|
6600
|
-
inputDisabled: "
|
|
6601
|
-
hideScrollbars: "
|
|
6602
|
-
richTextInput: "
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
mentionOption: "
|
|
6607
|
-
focused: "
|
|
6608
|
-
}, cf = o(({ editable: e,
|
|
6609
|
-
let [
|
|
6610
|
-
isOpen:
|
|
6594
|
+
inputInTable: "_inputInTable_1xhvx_1",
|
|
6595
|
+
inputHover: "_inputHover_1xhvx_13",
|
|
6596
|
+
inputFocus: "_inputFocus_1xhvx_18",
|
|
6597
|
+
controlFocusVisible: "_controlFocusVisible_1xhvx_25",
|
|
6598
|
+
inputError: "_inputError_1xhvx_29",
|
|
6599
|
+
inputWarning: "_inputWarning_1xhvx_30",
|
|
6600
|
+
inputDisabled: "_inputDisabled_1xhvx_65",
|
|
6601
|
+
hideScrollbars: "_hideScrollbars_1xhvx_71",
|
|
6602
|
+
richTextInput: "_richTextInput_1xhvx_81",
|
|
6603
|
+
editable: "_editable_1xhvx_81",
|
|
6604
|
+
mention: "_mention_1xhvx_125",
|
|
6605
|
+
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6606
|
+
mentionOption: "_mentionOption_1xhvx_144",
|
|
6607
|
+
focused: "_focused_1xhvx_150"
|
|
6608
|
+
}, cf = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6609
|
+
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } = aa({
|
|
6610
|
+
isOpen: c,
|
|
6611
6611
|
placement: "bottom-start",
|
|
6612
6612
|
triggerOffset: 2,
|
|
6613
|
-
onOutsideClick:
|
|
6613
|
+
onOutsideClick: r
|
|
6614
6614
|
});
|
|
6615
6615
|
d(() => {
|
|
6616
|
-
|
|
6617
|
-
}, [r]);
|
|
6618
|
-
let T = _(n), E = _(null);
|
|
6619
|
-
d(() => {
|
|
6620
|
-
T.current = n;
|
|
6616
|
+
s(0);
|
|
6621
6617
|
}, [n]);
|
|
6622
|
-
let
|
|
6618
|
+
let C = _(t), w = _(null);
|
|
6619
|
+
d(() => {
|
|
6620
|
+
C.current = t;
|
|
6621
|
+
}, [t]);
|
|
6622
|
+
let T = h(() => ({
|
|
6623
6623
|
getBoundingClientRect: () => {
|
|
6624
6624
|
var e, t, n;
|
|
6625
|
-
return
|
|
6625
|
+
return w.current = (e = (t = C.current) == null ? void 0 : t.call(C)) == null ? w.current : e, (n = w.current) == null ? new DOMRect() : n;
|
|
6626
6626
|
},
|
|
6627
6627
|
contextElement: e == null ? void 0 : e
|
|
6628
6628
|
}), [e]);
|
|
6629
6629
|
return d(() => {
|
|
6630
|
-
|
|
6630
|
+
x.ref(e ? T : null);
|
|
6631
6631
|
}, [
|
|
6632
6632
|
e,
|
|
6633
|
-
|
|
6634
|
-
|
|
6633
|
+
T,
|
|
6634
|
+
x.ref
|
|
6635
6635
|
]), d(() => {
|
|
6636
|
-
if (!e
|
|
6636
|
+
if (!e) return;
|
|
6637
6637
|
let t = {
|
|
6638
6638
|
role: "combobox",
|
|
6639
6639
|
"aria-autocomplete": "list",
|
|
6640
|
-
"aria-expanded":
|
|
6641
|
-
"aria-controls":
|
|
6640
|
+
"aria-expanded": String(c),
|
|
6641
|
+
"aria-controls": u
|
|
6642
6642
|
};
|
|
6643
|
-
return Object.entries(t).forEach(([t, n]) => e.setAttribute(t, n)),
|
|
6643
|
+
return Object.entries(t).forEach(([t, n]) => e.setAttribute(t, n)), c ? e.setAttribute("aria-activedescendant", m(o)) : e.removeAttribute("aria-activedescendant"), () => {
|
|
6644
6644
|
Object.keys(t).forEach((t) => e.removeAttribute(t)), e.removeAttribute("aria-activedescendant");
|
|
6645
6645
|
};
|
|
6646
6646
|
}, [
|
|
6647
|
-
|
|
6647
|
+
o,
|
|
6648
6648
|
e,
|
|
6649
|
+
c,
|
|
6649
6650
|
u,
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
]), p(o, () => ({ onKeyDown: (e) => {
|
|
6654
|
-
if (!u) return !1;
|
|
6655
|
-
if (e.key === "Escape") return i(), !0;
|
|
6656
|
-
if (!r.length) return !1;
|
|
6651
|
+
m
|
|
6652
|
+
]), p(a, () => ({ onKeyDown: (e) => {
|
|
6653
|
+
if (!c) return !1;
|
|
6657
6654
|
switch (e.key) {
|
|
6658
|
-
case "ArrowDown": return
|
|
6659
|
-
case "ArrowUp": return
|
|
6655
|
+
case "ArrowDown": return s((e) => (e + 1) % n.length), !0;
|
|
6656
|
+
case "ArrowUp": return s((e) => (e + n.length - 1) % n.length), !0;
|
|
6660
6657
|
case "Tab":
|
|
6661
|
-
case "Enter": return
|
|
6658
|
+
case "Enter": return i(n[o]), !0;
|
|
6659
|
+
case "Escape": return r(), !0;
|
|
6662
6660
|
default: return !1;
|
|
6663
6661
|
}
|
|
6664
6662
|
} }), [
|
|
6665
|
-
|
|
6666
|
-
|
|
6663
|
+
o,
|
|
6664
|
+
c,
|
|
6665
|
+
n,
|
|
6667
6666
|
r,
|
|
6668
|
-
i
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
...x,
|
|
6667
|
+
i
|
|
6668
|
+
]), c ? g(/* @__PURE__ */ S("div", {
|
|
6669
|
+
...y,
|
|
6672
6670
|
className: sf.mentionLayer,
|
|
6673
|
-
id:
|
|
6671
|
+
id: u,
|
|
6674
6672
|
role: "listbox",
|
|
6675
|
-
children:
|
|
6676
|
-
|
|
6677
|
-
children: t
|
|
6678
|
-
}), r.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6679
|
-
id: g(t),
|
|
6673
|
+
children: n.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6674
|
+
id: m(t),
|
|
6680
6675
|
role: "option",
|
|
6681
|
-
"aria-selected": t ===
|
|
6682
|
-
className: b(sf.mentionOption, { [sf.focused]: t ===
|
|
6683
|
-
onMouseEnter: () =>
|
|
6676
|
+
"aria-selected": t === o,
|
|
6677
|
+
className: b(sf.mentionOption, { [sf.focused]: t === o }),
|
|
6678
|
+
onMouseEnter: () => s(t),
|
|
6684
6679
|
onMouseDown: (t) => {
|
|
6685
|
-
t.preventDefault(),
|
|
6680
|
+
t.preventDefault(), i(e);
|
|
6686
6681
|
},
|
|
6687
6682
|
children: e.label
|
|
6688
|
-
}, e.id))
|
|
6683
|
+
}, e.id))
|
|
6689
6684
|
})) : null;
|
|
6690
6685
|
}), lf = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6691
6686
|
clientRect: e,
|
|
@@ -6716,6 +6711,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6716
6711
|
content: w.current,
|
|
6717
6712
|
contentType: "markdown",
|
|
6718
6713
|
editable: !g,
|
|
6714
|
+
editorProps: { attributes: { class: sf.editable } },
|
|
6719
6715
|
onUpdate: ({ editor: e }) => {
|
|
6720
6716
|
t == null || t(e.getMarkdown(), { mentionedIds: rf(e) });
|
|
6721
6717
|
}
|
|
@@ -6744,7 +6740,6 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6744
6740
|
y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(cf, {
|
|
6745
6741
|
ref: x,
|
|
6746
6742
|
editable: (c = T == null ? void 0 : T.editable) == null ? null : c,
|
|
6747
|
-
emptyLabel: a == null ? void 0 : a.emptyLabel,
|
|
6748
6743
|
getRect: (l = T == null ? void 0 : T.clientRect) == null ? null : l,
|
|
6749
6744
|
items: (f = T == null ? void 0 : T.items) == null ? [] : f,
|
|
6750
6745
|
onDismiss: () => E(null),
|
package/package.json
CHANGED