@gisce/react-ooui 2.97.0-alpha.11 → 2.97.0-alpha.12
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/react-ooui.es.js
CHANGED
|
@@ -6175,7 +6175,7 @@ const Lh = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(Gl,
|
|
|
6175
6175
|
}) => {
|
|
6176
6176
|
if (!t)
|
|
6177
6177
|
return null;
|
|
6178
|
-
const n = typeof t == "string" ? t.
|
|
6178
|
+
const n = typeof t == "string" ? t.split(/[,;]/).map((r) => r.trim()) : t;
|
|
6179
6179
|
return /* @__PURE__ */ s(ye, { children: n.map((r, o) => /* @__PURE__ */ s(
|
|
6180
6180
|
Qo,
|
|
6181
6181
|
{
|
|
@@ -6193,18 +6193,18 @@ const Lh = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(Gl,
|
|
|
6193
6193
|
readonly: r = !1
|
|
6194
6194
|
}) => {
|
|
6195
6195
|
const { token: o } = nt.useToken(), [i, a] = T(
|
|
6196
|
-
t ? t.
|
|
6196
|
+
t ? t.split(/[,;]/).map((v) => v.trim()).filter((v) => v) : []
|
|
6197
6197
|
), [l, c] = T(""), d = J(null), m = pe(et), { elementHasLostFocus: u } = m || {};
|
|
6198
6198
|
We(() => {
|
|
6199
6199
|
if (t) {
|
|
6200
|
-
const v = t.
|
|
6200
|
+
const v = t.split(/[,;]/).map((y) => y.trim()).filter(Boolean);
|
|
6201
6201
|
a(v);
|
|
6202
6202
|
} else
|
|
6203
6203
|
a([]);
|
|
6204
6204
|
}, [t]);
|
|
6205
6205
|
const f = E(
|
|
6206
6206
|
(v) => {
|
|
6207
|
-
e && e(v.join("
|
|
6207
|
+
e && e(v.join(","));
|
|
6208
6208
|
},
|
|
6209
6209
|
[e]
|
|
6210
6210
|
), p = (v) => {
|
|
@@ -6213,13 +6213,13 @@ const Lh = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(Gl,
|
|
|
6213
6213
|
b ? S = [y.trimEnd(), ""] : S = /["<>]/.test(y) ? y.split(/[,;]+/) : y.split(/[ ,;]+/);
|
|
6214
6214
|
const C = S.slice(0, -1).map((w) => w.trim()).filter((w) => w && !i.includes(w));
|
|
6215
6215
|
if (C.length > 0) {
|
|
6216
|
-
const w = [...i, ...C].join("
|
|
6216
|
+
const w = [...i, ...C].join(",");
|
|
6217
6217
|
(!n || w.length + S[S.length - 1].length <= n) && (a([...i, ...C]), f([...i, ...C]), c(S[S.length - 1]));
|
|
6218
6218
|
} else
|
|
6219
6219
|
c(y);
|
|
6220
6220
|
}, g = () => {
|
|
6221
6221
|
if (l) {
|
|
6222
|
-
const v = l.
|
|
6222
|
+
const v = l.split(/[,;]/).map((b) => b.trim()).filter((b) => b && !i.includes(b)), y = [...i, ...v].join(",");
|
|
6223
6223
|
(!n || y.length <= n) && (a([...i, ...v]), f([...i, ...v])), c("");
|
|
6224
6224
|
}
|
|
6225
6225
|
u && u();
|