alex-evo-sh-ui-kit 1.1.91 → 1.1.93
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/alex-evo-sh-ui-kit.es.js +507 -499
- package/dist/alex-evo-sh-ui-kit.umd.js +15 -15
- package/dist/index.css +1 -1
- package/dist/lib/ui/List/List.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ne, { useEffect as O, useState as g, useRef as
|
|
2
|
-
import
|
|
1
|
+
import ne, { useEffect as O, useState as g, useRef as G, useCallback as k, createContext as Pe, useContext as Ce, useMemo as oe, forwardRef as ve, useLayoutEffect as dt, useId as Be, memo as ut, useImperativeHandle as ht } from "react";
|
|
2
|
+
import xt from "react-dom";
|
|
3
3
|
import { NavLink as Qe } from "react-router-dom";
|
|
4
4
|
import './index.css';var Je = { exports: {} }, Se = {};
|
|
5
5
|
/**
|
|
@@ -12,7 +12,7 @@ import './index.css';var Je = { exports: {} }, Se = {};
|
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
14
|
var an;
|
|
15
|
-
function
|
|
15
|
+
function mt() {
|
|
16
16
|
if (an) return Se;
|
|
17
17
|
an = 1;
|
|
18
18
|
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -52,7 +52,7 @@ function ft() {
|
|
|
52
52
|
return _.$$typeof === D ? null : _.displayName || _.name || null;
|
|
53
53
|
if (typeof _ == "string") return _;
|
|
54
54
|
switch (_) {
|
|
55
|
-
case
|
|
55
|
+
case p:
|
|
56
56
|
return "Fragment";
|
|
57
57
|
case b:
|
|
58
58
|
return "Profiler";
|
|
@@ -110,7 +110,7 @@ function ft() {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
function s(_) {
|
|
113
|
-
if (_ ===
|
|
113
|
+
if (_ === p) return "<>";
|
|
114
114
|
if (typeof _ == "object" && _ !== null && _.$$typeof === w)
|
|
115
115
|
return "<...>";
|
|
116
116
|
try {
|
|
@@ -155,7 +155,7 @@ function ft() {
|
|
|
155
155
|
function d(_, $, H, K, J, te) {
|
|
156
156
|
var Q = H.ref;
|
|
157
157
|
return _ = {
|
|
158
|
-
$$typeof:
|
|
158
|
+
$$typeof: j,
|
|
159
159
|
type: _,
|
|
160
160
|
key: $,
|
|
161
161
|
props: H,
|
|
@@ -191,19 +191,19 @@ function ft() {
|
|
|
191
191
|
if (K)
|
|
192
192
|
if (I(Q)) {
|
|
193
193
|
for (K = 0; K < Q.length; K++)
|
|
194
|
-
|
|
194
|
+
m(Q[K]);
|
|
195
195
|
Object.freeze && Object.freeze(Q);
|
|
196
196
|
} else
|
|
197
197
|
console.error(
|
|
198
198
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
199
|
);
|
|
200
|
-
else
|
|
200
|
+
else m(Q);
|
|
201
201
|
if (N.call($, "key")) {
|
|
202
202
|
Q = n(_);
|
|
203
203
|
var ie = Object.keys($).filter(function(W) {
|
|
204
204
|
return W !== "key";
|
|
205
205
|
});
|
|
206
|
-
K = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
206
|
+
K = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", Z[Q + K] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
208
|
let props = %s;
|
|
209
209
|
<%s {...props} />
|
|
@@ -214,7 +214,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
214
214
|
Q,
|
|
215
215
|
ie,
|
|
216
216
|
Q
|
|
217
|
-
),
|
|
217
|
+
), Z[Q + K] = !0);
|
|
218
218
|
}
|
|
219
219
|
if (Q = null, H !== void 0 && (r(H), Q = "" + H), o($) && (r($.key), Q = "" + $.key), "key" in $) {
|
|
220
220
|
H = {};
|
|
@@ -233,25 +233,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
233
|
te
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function m(_) {
|
|
237
237
|
h(_) ? _._store && (_._store.validated = 1) : typeof _ == "object" && _ !== null && _.$$typeof === w && (_._payload.status === "fulfilled" ? h(_._payload.value) && _._payload.value._store && (_._payload.value._store.validated = 1) : _._store && (_._store.validated = 1));
|
|
238
238
|
}
|
|
239
239
|
function h(_) {
|
|
240
|
-
return typeof _ == "object" && _ !== null && _.$$typeof ===
|
|
240
|
+
return typeof _ == "object" && _ !== null && _.$$typeof === j;
|
|
241
241
|
}
|
|
242
|
-
var
|
|
242
|
+
var x = ne, j = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), v = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), z = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), E = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, I = Array.isArray, S = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
x = {
|
|
246
246
|
react_stack_bottom_frame: function(_) {
|
|
247
247
|
return _();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
var L, T = {}, Y =
|
|
251
|
-
|
|
250
|
+
var L, T = {}, Y = x.react_stack_bottom_frame.bind(
|
|
251
|
+
x,
|
|
252
252
|
l
|
|
253
|
-
)(), q = S(s(l)),
|
|
254
|
-
Me.Fragment =
|
|
253
|
+
)(), q = S(s(l)), Z = {};
|
|
254
|
+
Me.Fragment = p, Me.jsx = function(_, $, H) {
|
|
255
255
|
var K = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return u(
|
|
257
257
|
_,
|
|
@@ -274,7 +274,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
274
274
|
};
|
|
275
275
|
}()), Me;
|
|
276
276
|
}
|
|
277
|
-
process.env.NODE_ENV === "production" ? Je.exports =
|
|
277
|
+
process.env.NODE_ENV === "production" ? Je.exports = mt() : Je.exports = ft();
|
|
278
278
|
var e = Je.exports;
|
|
279
279
|
const _n = (n) => /* @__PURE__ */ e.jsx(
|
|
280
280
|
Fe,
|
|
@@ -349,7 +349,7 @@ const We = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
349
349
|
}
|
|
350
350
|
);
|
|
351
351
|
}, vn = ({ bottom: n = 0, ...t }) => {
|
|
352
|
-
const [r, s] = g(!1), [i, l] = g(!0), o =
|
|
352
|
+
const [r, s] = g(!1), [i, l] = g(!0), o = G(null), c = k(() => {
|
|
353
353
|
s(!0), setTimeout(() => {
|
|
354
354
|
t.onHide(), s(!1), l(!0);
|
|
355
355
|
}, 200);
|
|
@@ -365,13 +365,13 @@ const We = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
365
365
|
window.innerHeight - h.clientY + 20 <= 150 && c(), o.current && (o.current.style.height = `${window.innerHeight - h.clientY + 20 - n}px`);
|
|
366
366
|
}, u = () => {
|
|
367
367
|
document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", u);
|
|
368
|
-
},
|
|
368
|
+
}, m = () => {
|
|
369
369
|
document.body.addEventListener("mousemove", d), document.body.addEventListener("mouseup", u);
|
|
370
370
|
};
|
|
371
371
|
return O(() => () => {
|
|
372
372
|
document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", u);
|
|
373
373
|
}), i && !r || !t.children ? null : /* @__PURE__ */ e.jsx(We, { onHide: c, children: /* @__PURE__ */ e.jsxs("div", { ref: o, style: { paddingBottom: n }, className: `bottom-sheets ${r ? "bottom-sheets_hide" : "bottom-sheets_show"}`, children: [
|
|
374
|
-
/* @__PURE__ */ e.jsx("div", { role: "presentation", "data-testid": "bottom-sheet-handle", className: "bottom-sheets__handle", onMouseDown:
|
|
374
|
+
/* @__PURE__ */ e.jsx("div", { role: "presentation", "data-testid": "bottom-sheet-handle", className: "bottom-sheets__handle", onMouseDown: m, onTouchMove: a, children: /* @__PURE__ */ e.jsx("span", {}) }),
|
|
375
375
|
/* @__PURE__ */ e.jsx("div", { className: "bottom-sheets__content", children: t.children })
|
|
376
376
|
] }) });
|
|
377
377
|
}, gn = {
|
|
@@ -410,18 +410,18 @@ const We = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
410
410
|
className: o = "",
|
|
411
411
|
...c
|
|
412
412
|
}) => {
|
|
413
|
-
const a = Ce(we), d = a ? a.screen : t, u = n === "heading" || n === "title" || n === "title-2",
|
|
413
|
+
const a = Ce(we), d = a ? a.screen : t, u = n === "heading" || n === "title" || n === "title-2", m = u ? "h3" : "span", h = {
|
|
414
414
|
fontSize: bn(n, d),
|
|
415
415
|
fontWeight: kn(n, r),
|
|
416
416
|
lineHeight: yn(n, s, d),
|
|
417
417
|
...l
|
|
418
|
-
},
|
|
418
|
+
}, x = u ? "typography-heading" : "typography-text";
|
|
419
419
|
return /* @__PURE__ */ e.jsx(
|
|
420
|
-
|
|
420
|
+
m,
|
|
421
421
|
{
|
|
422
422
|
...c,
|
|
423
423
|
style: h,
|
|
424
|
-
className: `${
|
|
424
|
+
className: `${x} ${o}`,
|
|
425
425
|
children: i
|
|
426
426
|
}
|
|
427
427
|
);
|
|
@@ -438,18 +438,18 @@ const We = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
438
438
|
style: a,
|
|
439
439
|
rippleDisabled: d = !1,
|
|
440
440
|
shadow: u = 0,
|
|
441
|
-
...
|
|
441
|
+
...m
|
|
442
442
|
}, h) => {
|
|
443
|
-
const
|
|
443
|
+
const x = k(
|
|
444
444
|
(f) => {
|
|
445
|
-
c || (l == null || l(f), !d &&
|
|
445
|
+
c || (l == null || l(f), !d && j(f));
|
|
446
446
|
},
|
|
447
447
|
[l, c]
|
|
448
|
-
),
|
|
449
|
-
const
|
|
450
|
-
C.style.width = C.style.height = `${b}px`, C.style.left = `${f.clientX -
|
|
451
|
-
const v =
|
|
452
|
-
v && v.remove(),
|
|
448
|
+
), j = (f) => {
|
|
449
|
+
const p = f.currentTarget, C = document.createElement("span"), b = Math.max(p.clientWidth, p.clientHeight), y = b / 2;
|
|
450
|
+
C.style.width = C.style.height = `${b}px`, C.style.left = `${f.clientX - p.getBoundingClientRect().left - y}px`, C.style.top = `${f.clientY - p.getBoundingClientRect().top - y}px`, C.classList.add("iconbutton-ripple");
|
|
451
|
+
const v = p.getElementsByClassName("iconbutton-ripple")[0];
|
|
452
|
+
v && v.remove(), p.appendChild(C);
|
|
453
453
|
};
|
|
454
454
|
return /* @__PURE__ */ e.jsx(
|
|
455
455
|
"button",
|
|
@@ -460,11 +460,11 @@ const We = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
460
460
|
...a
|
|
461
461
|
},
|
|
462
462
|
className: `iconbutton iconbutton--${i} ${t} container_shadow-hover-${u}`,
|
|
463
|
-
onClick:
|
|
463
|
+
onClick: x,
|
|
464
464
|
onContextMenu: o,
|
|
465
465
|
disabled: c,
|
|
466
466
|
"aria-disabled": c,
|
|
467
|
-
...
|
|
467
|
+
...m,
|
|
468
468
|
children: /* @__PURE__ */ e.jsx("div", { className: `iconbutton-container ${r}`, children: n })
|
|
469
469
|
}
|
|
470
470
|
);
|
|
@@ -1791,11 +1791,11 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1791
1791
|
marginBottom: a,
|
|
1792
1792
|
maxWidth: d = "560px",
|
|
1793
1793
|
showCloseButton: u = !1,
|
|
1794
|
-
ariaLabel:
|
|
1794
|
+
ariaLabel: m
|
|
1795
1795
|
}) => {
|
|
1796
1796
|
const h = () => {
|
|
1797
1797
|
i && i();
|
|
1798
|
-
},
|
|
1798
|
+
}, x = {
|
|
1799
1799
|
...l,
|
|
1800
1800
|
marginBottom: a,
|
|
1801
1801
|
maxWidth: typeof d == "number" ? `${d}px` : d
|
|
@@ -1808,11 +1808,11 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1808
1808
|
children: /* @__PURE__ */ e.jsxs(
|
|
1809
1809
|
"div",
|
|
1810
1810
|
{
|
|
1811
|
-
style:
|
|
1811
|
+
style: x,
|
|
1812
1812
|
className: `${o ? "" : "dialog-template__container dialog-template_base dialog-template_color_surface-container"} dialog-template ${n}`,
|
|
1813
1813
|
role: "dialog",
|
|
1814
1814
|
"aria-modal": "true",
|
|
1815
|
-
"aria-label":
|
|
1815
|
+
"aria-label": m || r,
|
|
1816
1816
|
children: [
|
|
1817
1817
|
r && /* @__PURE__ */ e.jsxs("div", { className: "dialog-template__container__header dialog-template__container__header_color_surface-container", children: [
|
|
1818
1818
|
/* @__PURE__ */ e.jsx(U, { type: "heading", children: r }),
|
|
@@ -1898,13 +1898,13 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1898
1898
|
children: a,
|
|
1899
1899
|
disableDefaultButtons: d = !1,
|
|
1900
1900
|
customActions: u,
|
|
1901
|
-
btns:
|
|
1901
|
+
btns: m
|
|
1902
1902
|
}) => {
|
|
1903
1903
|
const h = k(() => {
|
|
1904
1904
|
l == null || l(), c == null || c();
|
|
1905
|
-
}, [l, c]),
|
|
1905
|
+
}, [l, c]), x = k(() => {
|
|
1906
1906
|
o == null || o(), c == null || c();
|
|
1907
|
-
}, [o, c]),
|
|
1907
|
+
}, [o, c]), j = k(() => u || (d ? null : m ? /* @__PURE__ */ e.jsx(ze, { onHide: x, onSuccess: h, btns: m }) : /* @__PURE__ */ e.jsx(ze, { onHide: x, onSuccess: h, btns: [
|
|
1908
1908
|
{
|
|
1909
1909
|
text: i,
|
|
1910
1910
|
hide: !0,
|
|
@@ -1914,21 +1914,21 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1914
1914
|
text: s ?? "OK",
|
|
1915
1915
|
success: !0
|
|
1916
1916
|
}
|
|
1917
|
-
] })), [u, d,
|
|
1917
|
+
] })), [u, d, x, h, s, i]);
|
|
1918
1918
|
return /* @__PURE__ */ e.jsxs(
|
|
1919
1919
|
Ee,
|
|
1920
1920
|
{
|
|
1921
1921
|
style: n,
|
|
1922
1922
|
header: r,
|
|
1923
|
-
onHide:
|
|
1924
|
-
action:
|
|
1923
|
+
onHide: x,
|
|
1924
|
+
action: j(),
|
|
1925
1925
|
children: [
|
|
1926
1926
|
t && /* @__PURE__ */ e.jsx(U, { type: "body", children: t }),
|
|
1927
1927
|
a
|
|
1928
1928
|
]
|
|
1929
1929
|
}
|
|
1930
1930
|
);
|
|
1931
|
-
}, _e = ({ children: n, container: t = document.body }) => t ?
|
|
1931
|
+
}, _e = ({ children: n, container: t = document.body }) => t ? xt.createPortal(
|
|
1932
1932
|
n,
|
|
1933
1933
|
t
|
|
1934
1934
|
) : /* @__PURE__ */ e.jsx("p", { children: "container not found" }), Xt = ({ container: n, text: t, header: r, onClick: s, styleType: i, ...l }) => {
|
|
@@ -1950,12 +1950,12 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1950
1950
|
if (!l) {
|
|
1951
1951
|
try {
|
|
1952
1952
|
await navigator.clipboard.writeText(n), a(!0), setTimeout(() => a(!1), r);
|
|
1953
|
-
} catch (
|
|
1954
|
-
console.error("Не удалось скопировать текст",
|
|
1953
|
+
} catch (x) {
|
|
1954
|
+
console.error("Не удалось скопировать текст", x);
|
|
1955
1955
|
}
|
|
1956
1956
|
i == null || i(h);
|
|
1957
1957
|
}
|
|
1958
|
-
}, [n, l, r, i]), u = c ? /* @__PURE__ */ e.jsx(pe, { "aria-hidden": "true" }) : /* @__PURE__ */ e.jsx(Vn, { "aria-hidden": "true" }),
|
|
1958
|
+
}, [n, l, r, i]), u = c ? /* @__PURE__ */ e.jsx(pe, { "aria-hidden": "true" }) : /* @__PURE__ */ e.jsx(Vn, { "aria-hidden": "true" }), m = c ? "Скопировано!" : "Копировать";
|
|
1959
1959
|
return t ? /* @__PURE__ */ e.jsxs("div", { className: "copy-button", children: [
|
|
1960
1960
|
/* @__PURE__ */ e.jsx(
|
|
1961
1961
|
de,
|
|
@@ -1963,19 +1963,19 @@ const Nn = (n) => /* @__PURE__ */ e.jsx(R, { ...n, className: `${n.className} ic
|
|
|
1963
1963
|
icon: u,
|
|
1964
1964
|
onClick: d,
|
|
1965
1965
|
disabled: l,
|
|
1966
|
-
"aria-label": `${
|
|
1966
|
+
"aria-label": `${m} ${n}`,
|
|
1967
1967
|
className: s,
|
|
1968
1968
|
...o
|
|
1969
1969
|
}
|
|
1970
1970
|
),
|
|
1971
|
-
/* @__PURE__ */ e.jsx(U, { type: "body", "aria-live": "polite", children:
|
|
1971
|
+
/* @__PURE__ */ e.jsx(U, { type: "body", "aria-live": "polite", children: m })
|
|
1972
1972
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1973
1973
|
de,
|
|
1974
1974
|
{
|
|
1975
1975
|
icon: u,
|
|
1976
1976
|
onClick: d,
|
|
1977
1977
|
disabled: l,
|
|
1978
|
-
"aria-label": `${
|
|
1978
|
+
"aria-label": `${m} ${n}`,
|
|
1979
1979
|
className: s,
|
|
1980
1980
|
...o
|
|
1981
1981
|
}
|
|
@@ -1986,7 +1986,7 @@ const Kt = ({ valueDisplayDuration: n = 2e3 }) => {
|
|
|
1986
1986
|
const [t, r] = g(
|
|
1987
1987
|
2
|
|
1988
1988
|
/* CLOSE */
|
|
1989
|
-
), s =
|
|
1989
|
+
), s = G(null), i = G(null), l = () => {
|
|
1990
1990
|
r(
|
|
1991
1991
|
1
|
|
1992
1992
|
/* HIDING */
|
|
@@ -2113,15 +2113,15 @@ const qt = Ne, Jt = (n) => {
|
|
|
2113
2113
|
function Dn(n, t, r) {
|
|
2114
2114
|
if (n === 0) return r ?? "#e0e0e0";
|
|
2115
2115
|
if (n === 1) return t;
|
|
2116
|
-
const s = r ? Ne(r) : null, i = (s == null ? void 0 : s.r) ?? 224, l = (s == null ? void 0 : s.g) ?? 224, o = (s == null ? void 0 : s.b) ?? 224, c = parseInt(t.substring(1, 3), 16), a = parseInt(t.substring(3, 5), 16), d = parseInt(t.substring(5, 7), 16), u = Math.round(i + n * (c - i)),
|
|
2117
|
-
return `rgb(${u}, ${
|
|
2116
|
+
const s = r ? Ne(r) : null, i = (s == null ? void 0 : s.r) ?? 224, l = (s == null ? void 0 : s.g) ?? 224, o = (s == null ? void 0 : s.b) ?? 224, c = parseInt(t.substring(1, 3), 16), a = parseInt(t.substring(3, 5), 16), d = parseInt(t.substring(5, 7), 16), u = Math.round(i + n * (c - i)), m = Math.round(l + n * (a - l)), h = Math.round(o + n * (d - o));
|
|
2117
|
+
return `rgb(${u}, ${m}, ${h})`;
|
|
2118
2118
|
}
|
|
2119
2119
|
const ae = (n, t, r = "", s) => {
|
|
2120
|
-
let i, l, o, c, a, d, u,
|
|
2120
|
+
let i, l, o, c, a, d, u, m = Math.round, h = typeof r == "string";
|
|
2121
2121
|
if (typeof n != "number" || n < -1 || n > 1 || typeof t != "string" || t[0] != "r" && t[0] != "#" || r && !h || (u = t.length > 9, u = h ? typeof r == "string" && r.length > 9 ? !0 : r == "c" ? !u : !1 : u, a = ae.pSBCr(t), c = n < 0, d = r && typeof r == "string" && r != "c" ? ae.pSBCr(r) : c ? { r: 0, g: 0, b: 0, a: -1 } : { r: 255, g: 255, b: 255, a: -1 }, n = c ? n * -1 : n, c = 1 - n, !a || !d)) return null;
|
|
2122
|
-
s ? (i =
|
|
2123
|
-
let
|
|
2124
|
-
return d = d.a ?? 1, a =
|
|
2122
|
+
s ? (i = m(c * (a.r ?? 0) + n * (d.r ?? 0)), l = m(c * (a.g ?? 0) + n * (d.g ?? 0)), o = m(c * (a.b ?? 0) + n * (d.b ?? 0))) : (i = m((c * (a.r ?? 0) ** 2 + n * (d.r ?? 0) ** 2) ** 0.5), l = m((c * (a.g ?? 0) ** 2 + n * (d.g ?? 0) ** 2) ** 0.5), o = m((c * (a.b ?? 0) ** 2 + n * (d.b ?? 0) ** 2) ** 0.5));
|
|
2123
|
+
let x = a.a ?? 1;
|
|
2124
|
+
return d = d.a ?? 1, a = x >= 0 || d >= 0, x = x >= 0 || d >= 0 ? x < 0 ? d : d < 0 ? x : x * c + d * n : 0, u ? "rgb" + (a ? "a(" : "(") + i + "," + l + "," + o + (a ? "," + m(x * 1e3) / 1e3 : "") + ")" : "#" + (4294967296 + i * 16777216 + l * 65536 + o * 256 + (a ? m(x * 255) : 0)).toString(16).slice(1, a ? void 0 : -2);
|
|
2125
2125
|
};
|
|
2126
2126
|
ae.pSBCr = (n) => {
|
|
2127
2127
|
const t = parseInt;
|
|
@@ -2252,9 +2252,9 @@ function er(n, t = !1) {
|
|
|
2252
2252
|
(a, d) => {
|
|
2253
2253
|
const u = Qt[a];
|
|
2254
2254
|
if (!u) return;
|
|
2255
|
-
const
|
|
2256
|
-
s((h) => ({ ...h, ...
|
|
2257
|
-
document.body.style.setProperty(`--${h.replace(/_/g, "-")}`,
|
|
2255
|
+
const m = u(d, i);
|
|
2256
|
+
s((h) => ({ ...h, ...m })), Object.entries(m).forEach(([h, x]) => {
|
|
2257
|
+
document.body.style.setProperty(`--${h.replace(/_/g, "-")}`, x);
|
|
2258
2258
|
});
|
|
2259
2259
|
},
|
|
2260
2260
|
[i]
|
|
@@ -2309,11 +2309,11 @@ function rr(n = "light") {
|
|
|
2309
2309
|
const [t, r] = g(
|
|
2310
2310
|
Xe
|
|
2311
2311
|
), [s, i] = g(n), { colors: l, setColor: o, setReverse: c } = er(t[s].colors, t[s].reverse), a = k(
|
|
2312
|
-
(
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2315
|
-
o(f,
|
|
2316
|
-
}), c(t[
|
|
2312
|
+
(x) => {
|
|
2313
|
+
const j = t[x].colors;
|
|
2314
|
+
j && (Object.entries(j).forEach(([f, p]) => {
|
|
2315
|
+
o(f, p);
|
|
2316
|
+
}), c(t[x].reverse ?? !1), i(x));
|
|
2317
2317
|
},
|
|
2318
2318
|
[t, o]
|
|
2319
2319
|
);
|
|
@@ -2321,31 +2321,31 @@ function rr(n = "light") {
|
|
|
2321
2321
|
a(s);
|
|
2322
2322
|
}, [s, a]);
|
|
2323
2323
|
const d = k(
|
|
2324
|
-
(
|
|
2325
|
-
r((
|
|
2326
|
-
...
|
|
2327
|
-
[
|
|
2328
|
-
colors: { ...
|
|
2329
|
-
reverse:
|
|
2324
|
+
(x, j, f) => {
|
|
2325
|
+
r((p) => ({
|
|
2326
|
+
...p,
|
|
2327
|
+
[x]: {
|
|
2328
|
+
colors: { ...p[x].colors, [j]: f },
|
|
2329
|
+
reverse: p[x].reverse
|
|
2330
2330
|
}
|
|
2331
2331
|
}));
|
|
2332
2332
|
},
|
|
2333
2333
|
[]
|
|
2334
|
-
), u = k((
|
|
2335
|
-
r((
|
|
2336
|
-
...
|
|
2337
|
-
[
|
|
2334
|
+
), u = k((x, j = "light", f) => {
|
|
2335
|
+
r((p) => ({
|
|
2336
|
+
...p,
|
|
2337
|
+
[x]: { colors: p[j].colors, reverse: f === void 0 ? p[j].reverse : f }
|
|
2338
2338
|
}));
|
|
2339
|
-
}, []),
|
|
2340
|
-
r((
|
|
2341
|
-
const f = { ...
|
|
2342
|
-
return delete f[
|
|
2343
|
-
}), s ===
|
|
2339
|
+
}, []), m = k((x) => {
|
|
2340
|
+
r((j) => {
|
|
2341
|
+
const f = { ...j };
|
|
2342
|
+
return delete f[x], f;
|
|
2343
|
+
}), s === x && i("light");
|
|
2344
2344
|
}, [s]), h = k(
|
|
2345
|
-
(
|
|
2346
|
-
Xe[
|
|
2347
|
-
...
|
|
2348
|
-
[
|
|
2345
|
+
(x) => {
|
|
2346
|
+
Xe[x] && r((j) => ({
|
|
2347
|
+
...j,
|
|
2348
|
+
[x]: { ...Xe[x] }
|
|
2349
2349
|
}));
|
|
2350
2350
|
},
|
|
2351
2351
|
[]
|
|
@@ -2357,7 +2357,7 @@ function rr(n = "light") {
|
|
|
2357
2357
|
setActiveTheme: a,
|
|
2358
2358
|
updateThemeColor: d,
|
|
2359
2359
|
createTheme: u,
|
|
2360
|
-
deleteTheme:
|
|
2360
|
+
deleteTheme: m,
|
|
2361
2361
|
resetTheme: h
|
|
2362
2362
|
};
|
|
2363
2363
|
}
|
|
@@ -2386,19 +2386,19 @@ const $e = () => {
|
|
|
2386
2386
|
orientation: a = "horizontal",
|
|
2387
2387
|
styleTrack: d = "base",
|
|
2388
2388
|
showValue: u = !0,
|
|
2389
|
-
valueDisplayDuration:
|
|
2389
|
+
valueDisplayDuration: m = 2e3,
|
|
2390
2390
|
ariaLabel: h = "Регулятор значения",
|
|
2391
|
-
startColor:
|
|
2392
|
-
className:
|
|
2391
|
+
startColor: x,
|
|
2392
|
+
className: j = "",
|
|
2393
2393
|
...f
|
|
2394
2394
|
}) => {
|
|
2395
|
-
const
|
|
2395
|
+
const p = G(null), C = G(null), [b, y] = g(c ?? s), [v, M] = g("200px"), { colors: F } = Ce(sn), { showPopup: B, popupState: A } = Kt({ valueDisplayDuration: m }), w = n ?? F.Primary_color ?? "#0000ff";
|
|
2396
2396
|
O(() => {
|
|
2397
2397
|
var L;
|
|
2398
2398
|
if (a === "vertical" && ((L = C.current) != null && L.parentElement)) {
|
|
2399
2399
|
const T = () => {
|
|
2400
|
-
var
|
|
2401
|
-
const q = (_ = (
|
|
2400
|
+
var Z, _;
|
|
2401
|
+
const q = (_ = (Z = C.current) == null ? void 0 : Z.parentElement) == null ? void 0 : _.clientHeight;
|
|
2402
2402
|
q && M(`${q}px`);
|
|
2403
2403
|
};
|
|
2404
2404
|
T();
|
|
@@ -2419,7 +2419,7 @@ const $e = () => {
|
|
|
2419
2419
|
), N = oe(() => ({
|
|
2420
2420
|
...f.style,
|
|
2421
2421
|
[a === "vertical" ? "height" : "width"]: `${E}%`,
|
|
2422
|
-
background: d === "point" ? "transperent" : d === "static-color" ? w : Dn(E / 100, w,
|
|
2422
|
+
background: d === "point" ? "transperent" : d === "static-color" ? w : Dn(E / 100, w, x)
|
|
2423
2423
|
}), [E, w, f.style, a, d]), I = oe(() => a === "vertical" ? {
|
|
2424
2424
|
"--range-width": o,
|
|
2425
2425
|
"--point-width": d === "point" ? o : "6px",
|
|
@@ -2445,7 +2445,7 @@ const $e = () => {
|
|
|
2445
2445
|
"div",
|
|
2446
2446
|
{
|
|
2447
2447
|
ref: C,
|
|
2448
|
-
className: `range-wrapper ${a} ${
|
|
2448
|
+
className: `range-wrapper ${a} ${j}`,
|
|
2449
2449
|
style: I,
|
|
2450
2450
|
children: [
|
|
2451
2451
|
/* @__PURE__ */ e.jsxs("div", { className: "track", style: { background: t }, children: [
|
|
@@ -2455,7 +2455,7 @@ const $e = () => {
|
|
|
2455
2455
|
/* @__PURE__ */ e.jsx(
|
|
2456
2456
|
"input",
|
|
2457
2457
|
{
|
|
2458
|
-
ref:
|
|
2458
|
+
ref: p,
|
|
2459
2459
|
type: "range",
|
|
2460
2460
|
min: s,
|
|
2461
2461
|
style: S,
|
|
@@ -2490,21 +2490,21 @@ const $e = () => {
|
|
|
2490
2490
|
strokeWidth: a = 20,
|
|
2491
2491
|
radius: d = 100,
|
|
2492
2492
|
colorBg: u = "var(--Surface-container-color)",
|
|
2493
|
-
colorRange:
|
|
2493
|
+
colorRange: m,
|
|
2494
2494
|
pointColor: h,
|
|
2495
|
-
showBase:
|
|
2496
|
-
showIndicator:
|
|
2495
|
+
showBase: x = !0,
|
|
2496
|
+
showIndicator: j = !0,
|
|
2497
2497
|
showPoint: f = !1,
|
|
2498
|
-
rounding:
|
|
2498
|
+
rounding: p = !0,
|
|
2499
2499
|
showValue: C = !0,
|
|
2500
2500
|
style: b,
|
|
2501
2501
|
children: y,
|
|
2502
2502
|
className: v,
|
|
2503
2503
|
startColor: M
|
|
2504
2504
|
}) => {
|
|
2505
|
-
const F =
|
|
2505
|
+
const F = G(null), B = G(!1), A = d * 2, w = d * 2, z = Math.min(A, w), D = A / 2, E = w / 2, N = z / 2 - a / 2, I = c === "point" ? !1 : j, S = c === "point" ? !0 : f, { colors: L } = Ce(sn), T = m ?? L.Primary_color ?? "#0000ff", Y = h ?? L.Primary_color ?? "#0000ff", [q, Z] = g(r);
|
|
2506
2506
|
O(() => {
|
|
2507
|
-
r !== void 0 &&
|
|
2507
|
+
r !== void 0 && Z(r);
|
|
2508
2508
|
}, [r]);
|
|
2509
2509
|
const _ = k(() => {
|
|
2510
2510
|
switch (o) {
|
|
@@ -2521,25 +2521,25 @@ const $e = () => {
|
|
|
2521
2521
|
), K = k(() => {
|
|
2522
2522
|
if (!F.current) return;
|
|
2523
2523
|
const [W, he] = $(), je = (q - n) * he / (t - n);
|
|
2524
|
-
if (
|
|
2524
|
+
if (x) {
|
|
2525
2525
|
const X = F.current.querySelector('[data-el="base"]');
|
|
2526
|
-
X && (X.style.stroke = u, X.style.strokeWidth = a.toString(), X.style.strokeLinecap =
|
|
2526
|
+
X && (X.style.stroke = u, X.style.strokeWidth = a.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = W.toString(), X.style.strokeDasharray = `${he}, ${N * Math.PI * 2 - he}`);
|
|
2527
2527
|
}
|
|
2528
2528
|
if (I) {
|
|
2529
2529
|
const X = F.current.querySelector('[data-el="indicator"]');
|
|
2530
2530
|
if (X) {
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2531
|
+
const xe = parseFloat(X.dataset.percentage ?? "");
|
|
2532
|
+
xe !== null && (xe < H - 2 || xe > H + 2) ? X.style.transition = ".3s" : X.style.transition = B.current ? "none" : ".3s", X.dataset.percentage = H.toString(), X.style.stroke = c === "static-color" ? T : Dn(H / 100, T, M), X.style.strokeWidth = a.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = W.toString(), X.style.strokeDasharray = `${je}, ${N * Math.PI * 2 - je}`;
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
2535
|
if (S) {
|
|
2536
2536
|
const X = F.current.querySelector('[data-el="point"]');
|
|
2537
2537
|
if (X) {
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2538
|
+
const xe = parseFloat(X.dataset.percentage ?? "");
|
|
2539
|
+
xe !== null && (xe < H - 2 || xe > H + 2) ? X.style.transition = ".3s" : X.style.transition = B.current ? "none" : ".3s", X.dataset.percentage = H.toString(), X.style.stroke = Y, X.style.strokeWidth = a.toString(), X.style.strokeLinecap = "round", q === t && o === "semicircle" ? X.style.strokeDashoffset = "0" : X.style.strokeDashoffset = (W - je).toString(), X.style.strokeDasharray = `0, ${N * Math.PI * 2}`;
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
|
-
}, [q, $, t, n, N, a, u, T, Y,
|
|
2542
|
+
}, [q, $, t, n, N, a, u, T, Y, x, I, S, p, H, M]), J = (W) => {
|
|
2543
2543
|
B.current = !0, document.addEventListener("mousemove", te), document.addEventListener("mouseup", Q), ie(W);
|
|
2544
2544
|
}, te = (W) => {
|
|
2545
2545
|
W.preventDefault(), B.current && ie(W);
|
|
@@ -2547,11 +2547,11 @@ const $e = () => {
|
|
|
2547
2547
|
B.current = !1, document.removeEventListener("mousemove", te), document.removeEventListener("mouseup", Q);
|
|
2548
2548
|
}, ie = k((W) => {
|
|
2549
2549
|
if (!F.current) return;
|
|
2550
|
-
const he = _(), je = F.current.getBoundingClientRect(), X = je.left + je.width / 2,
|
|
2550
|
+
const he = _(), je = F.current.getBoundingClientRect(), X = je.left + je.width / 2, xe = je.top + je.height / 2, st = W.clientX, it = W.clientY, lt = xe - it, at = X - st;
|
|
2551
2551
|
let le = Math.atan2(lt, at) * (180 / Math.PI);
|
|
2552
2552
|
he === 270 && (le += 45), le < 0 && (le = 360 + le), le < 0 && (le = 0), le > he && q > (t - n) / 2 ? le = he : le > he && (le = 0);
|
|
2553
2553
|
const ot = he, ct = t - n, Ue = Math.round(le * ct / ot + n);
|
|
2554
|
-
|
|
2554
|
+
Z(Ue), Ue !== r && s && s(Ue);
|
|
2555
2555
|
}, [_, s, t, n, D, E, q]);
|
|
2556
2556
|
O(() => {
|
|
2557
2557
|
K();
|
|
@@ -2570,7 +2570,7 @@ const $e = () => {
|
|
|
2570
2570
|
height: "100%",
|
|
2571
2571
|
onMouseDown: J,
|
|
2572
2572
|
children: [
|
|
2573
|
-
|
|
2573
|
+
x && /* @__PURE__ */ e.jsx(
|
|
2574
2574
|
"circle",
|
|
2575
2575
|
{
|
|
2576
2576
|
"data-el": "base",
|
|
@@ -2661,10 +2661,10 @@ const se = ({ style: n, short: t, text: r }) => r ? /* @__PURE__ */ e.jsxs("div"
|
|
|
2661
2661
|
const l = window.getComputedStyle(r), o = parseFloat(l.getPropertyValue("height")), c = parseFloat(l.getPropertyValue("width")), a = t + o - document.documentElement.clientHeight, d = n + c - document.documentElement.clientWidth;
|
|
2662
2662
|
return a > 0 && (i.y = i.y - a - ((s == null ? void 0 : s.marginBottom) ?? 0)), d > 0 && (i.x = i.x - d - ((s == null ? void 0 : s.marginRight) ?? 0)), i;
|
|
2663
2663
|
}, ar = ({ items: n, onHide: t, smallDisplay: r, globalClick: s, autoHide: i, onGlobalHide: l }) => {
|
|
2664
|
-
const o =
|
|
2665
|
-
function
|
|
2666
|
-
for (let
|
|
2667
|
-
if (
|
|
2664
|
+
const o = G(null), [c, a] = g({ left: "0px", top: "0px" }), [d, u] = g(!1);
|
|
2665
|
+
function m(h) {
|
|
2666
|
+
for (let x of h)
|
|
2667
|
+
if (x.icon)
|
|
2668
2668
|
return !0;
|
|
2669
2669
|
return !1;
|
|
2670
2670
|
}
|
|
@@ -2674,13 +2674,13 @@ const se = ({ style: n, short: t, text: r }) => r ? /* @__PURE__ */ e.jsxs("div"
|
|
|
2674
2674
|
let h = Ye(o.current.parentElement);
|
|
2675
2675
|
if (!h)
|
|
2676
2676
|
return;
|
|
2677
|
-
let
|
|
2677
|
+
let x = Hn(h.left + h.width, h.top, o.current, { marginRight: h.width });
|
|
2678
2678
|
a({
|
|
2679
|
-
left:
|
|
2680
|
-
top:
|
|
2679
|
+
left: x.x - h.left + "px",
|
|
2680
|
+
top: x.y - h.top + "px"
|
|
2681
2681
|
}), u(!0);
|
|
2682
2682
|
}, []), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2683
|
-
/* @__PURE__ */ e.jsx("div", { ref: o, className: `menu-block menu-block_color_surface-container-highest ${r ? "" : "menu-block_sub"}`, style: { ...c, ...d ? {} : { display: "none" } }, children: n.map((h,
|
|
2683
|
+
/* @__PURE__ */ e.jsx("div", { ref: o, className: `menu-block menu-block_color_surface-container-highest ${r ? "" : "menu-block_sub"}`, style: { ...c, ...d ? {} : { display: "none" } }, children: n.map((h, x) => /* @__PURE__ */ e.jsx(lr, { onHide: l, autoHide: i, item: h, isIcon: m(n), globalClick: s }, x)) }),
|
|
2684
2684
|
r ? null : /* @__PURE__ */ e.jsx("div", { style: { zIndex: 4 }, className: "menu-block-backplate", onClick: t })
|
|
2685
2685
|
] });
|
|
2686
2686
|
}, or = ({ onHide: n, autoHide: t, globalClick: r, item: s, isIcon: i, smallDisplay: l }) => {
|
|
@@ -2706,7 +2706,7 @@ function zn({ block: n, smallDisplay: t, onHide: r, globalClick: s, autoHide: i
|
|
|
2706
2706
|
return /* @__PURE__ */ e.jsx("div", { className: "menu-block", children: n.items.map((o, c) => /* @__PURE__ */ e.jsx(or, { globalClick: s, autoHide: i, onHide: r, item: o, isIcon: l(n), smallDisplay: t }, c)) });
|
|
2707
2707
|
}
|
|
2708
2708
|
const cr = 100, dr = (n) => {
|
|
2709
|
-
const t =
|
|
2709
|
+
const t = G(null), [r, s] = g({ left: "0px", top: "0px" }), i = () => {
|
|
2710
2710
|
n.onHide && n.onHide();
|
|
2711
2711
|
};
|
|
2712
2712
|
return dt(() => {
|
|
@@ -2735,24 +2735,24 @@ const cr = 100, dr = (n) => {
|
|
|
2735
2735
|
/* @__PURE__ */ e.jsx(zn, { block: r, smallDisplay: !0, autoHide: n.autoHide, onHide: n.onHide })
|
|
2736
2736
|
] }, s)) }) });
|
|
2737
2737
|
}, Pn = (n) => n.screensize === ee.MOBILE ? /* @__PURE__ */ e.jsx(_e, { container: n.container, children: /* @__PURE__ */ e.jsx(ur, { ...n }) }) : /* @__PURE__ */ e.jsx(_e, { container: n.container, children: /* @__PURE__ */ e.jsx(dr, { ...n }) }), Fs = ne.forwardRef(({ screensize: n, autoHide: t, blocks: r, container: s, onClick: i, ...l }, o) => {
|
|
2738
|
-
const [c, a] = g(!1), [d, u] = g(void 0), { screen:
|
|
2738
|
+
const [c, a] = g(!1), [d, u] = g(void 0), { screen: m } = Ce(we), h = () => {
|
|
2739
2739
|
a(!1), u(void 0);
|
|
2740
|
-
},
|
|
2740
|
+
}, x = (f) => {
|
|
2741
2741
|
f.stopPropagation(), a(!0), u({ x: f.clientX, y: f.clientY }), i == null || i(f);
|
|
2742
|
-
},
|
|
2742
|
+
}, j = n ?? m;
|
|
2743
2743
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2744
2744
|
/* @__PURE__ */ e.jsx(
|
|
2745
2745
|
de,
|
|
2746
2746
|
{
|
|
2747
2747
|
ref: o,
|
|
2748
|
-
onClick:
|
|
2748
|
+
onClick: x,
|
|
2749
2749
|
...l
|
|
2750
2750
|
}
|
|
2751
2751
|
),
|
|
2752
2752
|
/* @__PURE__ */ e.jsx(
|
|
2753
2753
|
Pn,
|
|
2754
2754
|
{
|
|
2755
|
-
marginBottom:
|
|
2755
|
+
marginBottom: j === ee.MOBILE ? 80 : 0,
|
|
2756
2756
|
onHide: h,
|
|
2757
2757
|
autoHide: t,
|
|
2758
2758
|
screensize: n,
|
|
@@ -2808,8 +2808,8 @@ const cr = 100, dr = (n) => {
|
|
|
2808
2808
|
Bn.displayName = "Checkbox";
|
|
2809
2809
|
const Wn = ne.forwardRef(
|
|
2810
2810
|
({ text: n, onDelete: t, big: r, onClick: s, screenSize: i, className: l, disabled: o, ...c }, a) => {
|
|
2811
|
-
const d = (
|
|
2812
|
-
|
|
2811
|
+
const d = (m) => {
|
|
2812
|
+
m.stopPropagation(), t == null || t(m);
|
|
2813
2813
|
}, u = o ? void 0 : s;
|
|
2814
2814
|
return /* @__PURE__ */ e.jsxs(
|
|
2815
2815
|
"div",
|
|
@@ -2853,23 +2853,23 @@ const Gn = ve(
|
|
|
2853
2853
|
size: a = "medium",
|
|
2854
2854
|
variant: d = "primary",
|
|
2855
2855
|
showLabel: u = !0,
|
|
2856
|
-
className:
|
|
2856
|
+
className: m,
|
|
2857
2857
|
...h
|
|
2858
|
-
},
|
|
2859
|
-
const
|
|
2860
|
-
return /* @__PURE__ */ e.jsxs("label", { className: `radio-button-container ${
|
|
2858
|
+
}, x) => {
|
|
2859
|
+
const j = t !== void 0 ? t === r : l !== void 0 ? l : o;
|
|
2860
|
+
return /* @__PURE__ */ e.jsxs("label", { className: `radio-button-container ${m || ""}`, children: [
|
|
2861
2861
|
/* @__PURE__ */ e.jsx(
|
|
2862
2862
|
"input",
|
|
2863
2863
|
{
|
|
2864
|
-
ref:
|
|
2864
|
+
ref: x,
|
|
2865
2865
|
className: "radio-button",
|
|
2866
2866
|
name: n,
|
|
2867
2867
|
type: "radio",
|
|
2868
|
-
checked:
|
|
2868
|
+
checked: j,
|
|
2869
2869
|
value: r,
|
|
2870
2870
|
onChange: s,
|
|
2871
2871
|
readOnly: i,
|
|
2872
|
-
"aria-checked":
|
|
2872
|
+
"aria-checked": j,
|
|
2873
2873
|
"aria-label": c || h["aria-label"],
|
|
2874
2874
|
...h
|
|
2875
2875
|
}
|
|
@@ -2893,15 +2893,15 @@ const Zn = ve(
|
|
|
2893
2893
|
variant: a = "primary",
|
|
2894
2894
|
...d
|
|
2895
2895
|
}, u) => {
|
|
2896
|
-
const [
|
|
2896
|
+
const [m, h] = g([]);
|
|
2897
2897
|
O(() => {
|
|
2898
|
-
h(
|
|
2898
|
+
h(x(t));
|
|
2899
2899
|
}, [t]);
|
|
2900
|
-
const
|
|
2900
|
+
const x = (f) => f === void 0 ? [] : Array.isArray(f) ? f : [f], j = (f, p) => {
|
|
2901
2901
|
if (i) return;
|
|
2902
2902
|
f.preventDefault();
|
|
2903
2903
|
let C;
|
|
2904
|
-
r ? C =
|
|
2904
|
+
r ? C = m.includes(p) ? m.filter((b) => b !== p) : [...m, p] : C = m.includes(p) ? [] : [p], h(C), l == null || l(C, f);
|
|
2905
2905
|
};
|
|
2906
2906
|
return /* @__PURE__ */ e.jsx(
|
|
2907
2907
|
"div",
|
|
@@ -2915,13 +2915,13 @@ const Zn = ve(
|
|
|
2915
2915
|
{
|
|
2916
2916
|
type: "button",
|
|
2917
2917
|
role: "radio",
|
|
2918
|
-
"aria-checked":
|
|
2918
|
+
"aria-checked": m.includes(f),
|
|
2919
2919
|
"aria-label": f,
|
|
2920
2920
|
disabled: i,
|
|
2921
|
-
className: `segmented-button__item ${
|
|
2922
|
-
onClick: (
|
|
2921
|
+
className: `segmented-button__item ${m.includes(f) ? "segmented-button__item--active" : ""}`,
|
|
2922
|
+
onClick: (p) => j(p, f),
|
|
2923
2923
|
children: [
|
|
2924
|
-
|
|
2924
|
+
m.includes(f) && /* @__PURE__ */ e.jsx("span", { className: "segmented-button__icon", children: /* @__PURE__ */ e.jsx(pe, {}) }),
|
|
2925
2925
|
/* @__PURE__ */ e.jsx("span", { className: "segmented-button__text", children: f }),
|
|
2926
2926
|
/* @__PURE__ */ e.jsx(
|
|
2927
2927
|
"input",
|
|
@@ -2929,7 +2929,7 @@ const Zn = ve(
|
|
|
2929
2929
|
type: r ? "checkbox" : "radio",
|
|
2930
2930
|
name: s,
|
|
2931
2931
|
value: f,
|
|
2932
|
-
checked:
|
|
2932
|
+
checked: m.includes(f),
|
|
2933
2933
|
readOnly: !0,
|
|
2934
2934
|
className: "segmented-button__input"
|
|
2935
2935
|
}
|
|
@@ -2984,23 +2984,23 @@ function hr({
|
|
|
2984
2984
|
defaultValue: a,
|
|
2985
2985
|
style: d
|
|
2986
2986
|
}) {
|
|
2987
|
-
const [u,
|
|
2988
|
-
u !== void 0 && (n == null || n(u),
|
|
2989
|
-
}, [u, n, i, s]),
|
|
2987
|
+
const [u, m] = g(a), h = k(() => {
|
|
2988
|
+
u !== void 0 && (n == null || n(u), m(void 0), !i && (s == null || s()));
|
|
2989
|
+
}, [u, n, i, s]), x = k(() => {
|
|
2990
2990
|
s == null || s();
|
|
2991
|
-
}, [s]),
|
|
2992
|
-
|
|
2991
|
+
}, [s]), j = k((f) => {
|
|
2992
|
+
m(f);
|
|
2993
2993
|
}, []);
|
|
2994
2994
|
return /* @__PURE__ */ e.jsxs(
|
|
2995
2995
|
Ee,
|
|
2996
2996
|
{
|
|
2997
2997
|
header: r,
|
|
2998
2998
|
style: d,
|
|
2999
|
-
onHide:
|
|
2999
|
+
onHide: x,
|
|
3000
3000
|
action: /* @__PURE__ */ e.jsx(
|
|
3001
|
-
|
|
3001
|
+
xr,
|
|
3002
3002
|
{
|
|
3003
|
-
onHide:
|
|
3003
|
+
onHide: x,
|
|
3004
3004
|
onSuccess: h,
|
|
3005
3005
|
disabled: u === void 0,
|
|
3006
3006
|
confirmText: o,
|
|
@@ -3016,7 +3016,7 @@ function hr({
|
|
|
3016
3016
|
scroll: !0,
|
|
3017
3017
|
maxHeight: "300px",
|
|
3018
3018
|
"aria-label": "Варианты выбора",
|
|
3019
|
-
children: t.map((f,
|
|
3019
|
+
children: t.map((f, p) => /* @__PURE__ */ e.jsx(
|
|
3020
3020
|
"label",
|
|
3021
3021
|
{
|
|
3022
3022
|
"aria-disabled": f.disabled,
|
|
@@ -3027,11 +3027,11 @@ function hr({
|
|
|
3027
3027
|
header: f.title,
|
|
3028
3028
|
icon: f.icon,
|
|
3029
3029
|
description: f.description,
|
|
3030
|
-
onClick: f.disabled ? void 0 : () =>
|
|
3030
|
+
onClick: f.disabled ? void 0 : () => j(f.data),
|
|
3031
3031
|
control: /* @__PURE__ */ e.jsx(
|
|
3032
3032
|
Gn,
|
|
3033
3033
|
{
|
|
3034
|
-
onClick: f.disabled ? void 0 : () =>
|
|
3034
|
+
onClick: f.disabled ? void 0 : () => j(f.data),
|
|
3035
3035
|
name: l,
|
|
3036
3036
|
checked: f.data === u,
|
|
3037
3037
|
disabled: f.disabled,
|
|
@@ -3041,7 +3041,7 @@ function hr({
|
|
|
3041
3041
|
}
|
|
3042
3042
|
)
|
|
3043
3043
|
},
|
|
3044
|
-
`${l}_${
|
|
3044
|
+
`${l}_${p}`
|
|
3045
3045
|
))
|
|
3046
3046
|
}
|
|
3047
3047
|
),
|
|
@@ -3050,7 +3050,7 @@ function hr({
|
|
|
3050
3050
|
}
|
|
3051
3051
|
);
|
|
3052
3052
|
}
|
|
3053
|
-
function
|
|
3053
|
+
function xr({
|
|
3054
3054
|
onSuccess: n,
|
|
3055
3055
|
onHide: t,
|
|
3056
3056
|
disabled: r = !1,
|
|
@@ -3082,12 +3082,12 @@ const Ve = ne.forwardRef(
|
|
|
3082
3082
|
onClear: a,
|
|
3083
3083
|
icon: d,
|
|
3084
3084
|
onChange: u,
|
|
3085
|
-
name:
|
|
3085
|
+
name: m,
|
|
3086
3086
|
value: h,
|
|
3087
|
-
placeholder:
|
|
3088
|
-
className:
|
|
3087
|
+
placeholder: x,
|
|
3088
|
+
className: j,
|
|
3089
3089
|
validEmptyValue: f,
|
|
3090
|
-
onFocus:
|
|
3090
|
+
onFocus: p,
|
|
3091
3091
|
onBlur: C,
|
|
3092
3092
|
error: b,
|
|
3093
3093
|
max: y,
|
|
@@ -3099,12 +3099,12 @@ const Ve = ne.forwardRef(
|
|
|
3099
3099
|
errorText: w,
|
|
3100
3100
|
onKeyDown: z
|
|
3101
3101
|
}, D) => {
|
|
3102
|
-
const E =
|
|
3102
|
+
const E = G(null), [N, I] = g(!1), [S, L] = g(!1), [T, Y] = g(!!h), q = Be(), Z = () => {
|
|
3103
3103
|
if (!E.current) return;
|
|
3104
3104
|
const J = E.current.querySelector("input");
|
|
3105
3105
|
J == null || J.focus();
|
|
3106
3106
|
}, _ = (J) => {
|
|
3107
|
-
|
|
3107
|
+
p == null || p(J), L(!0);
|
|
3108
3108
|
}, $ = (J) => {
|
|
3109
3109
|
C == null || C(J), L(!1), Y(!!J.target.value);
|
|
3110
3110
|
}, H = k(
|
|
@@ -3119,7 +3119,7 @@ const Ve = ne.forwardRef(
|
|
|
3119
3119
|
medium: "input-field__text-field_medium",
|
|
3120
3120
|
large: "input-field__text-field_large"
|
|
3121
3121
|
};
|
|
3122
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${
|
|
3122
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${j || ""}`, children: [
|
|
3123
3123
|
/* @__PURE__ */ e.jsxs(
|
|
3124
3124
|
"div",
|
|
3125
3125
|
{
|
|
@@ -3135,7 +3135,7 @@ const Ve = ne.forwardRef(
|
|
|
3135
3135
|
${N ? "input-field_error" : ""}
|
|
3136
3136
|
${F ? "input-field_disabled" : ""}
|
|
3137
3137
|
`,
|
|
3138
|
-
onClick:
|
|
3138
|
+
onClick: Z,
|
|
3139
3139
|
children: [
|
|
3140
3140
|
d && /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container", "aria-hidden": "true", children: d }),
|
|
3141
3141
|
/* @__PURE__ */ e.jsxs("div", { className: "input-field__input-container", ref: E, children: [
|
|
@@ -3154,7 +3154,7 @@ const Ve = ne.forwardRef(
|
|
|
3154
3154
|
input-field__input-container__input
|
|
3155
3155
|
${N ? "input-field__input-container__input_error" : ""}
|
|
3156
3156
|
`,
|
|
3157
|
-
name:
|
|
3157
|
+
name: m,
|
|
3158
3158
|
value: h,
|
|
3159
3159
|
onClick: n,
|
|
3160
3160
|
onChange: (J) => u == null ? void 0 : u(J.target.value, J.target.name, J),
|
|
@@ -3163,18 +3163,18 @@ const Ve = ne.forwardRef(
|
|
|
3163
3163
|
onKeyDown: z,
|
|
3164
3164
|
autoFocus: M,
|
|
3165
3165
|
"aria-invalid": N,
|
|
3166
|
-
"aria-describedby": N ? `${
|
|
3166
|
+
"aria-describedby": N ? `${m}-error` : void 0
|
|
3167
3167
|
}
|
|
3168
3168
|
),
|
|
3169
|
-
|
|
3169
|
+
x && /* @__PURE__ */ e.jsx(
|
|
3170
3170
|
"label",
|
|
3171
3171
|
{
|
|
3172
3172
|
htmlFor: q,
|
|
3173
|
-
onClick:
|
|
3173
|
+
onClick: Z,
|
|
3174
3174
|
className: `input-field__input-container__label
|
|
3175
3175
|
${T ? "input-field__input-container__label_filled" : ""}
|
|
3176
3176
|
`,
|
|
3177
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children:
|
|
3177
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: x })
|
|
3178
3178
|
}
|
|
3179
3179
|
)
|
|
3180
3180
|
] }),
|
|
@@ -3203,33 +3203,33 @@ const Vs = ({
|
|
|
3203
3203
|
max: a = 100,
|
|
3204
3204
|
defaultValue: d = "",
|
|
3205
3205
|
confirmText: u = "OK",
|
|
3206
|
-
cancelText:
|
|
3206
|
+
cancelText: m = "Отмена",
|
|
3207
3207
|
validate: h
|
|
3208
3208
|
}) => {
|
|
3209
|
-
const [
|
|
3209
|
+
const [x, j] = g(d), [f, p] = g(!0);
|
|
3210
3210
|
O(() => {
|
|
3211
3211
|
if (h)
|
|
3212
|
-
|
|
3212
|
+
p(h(x));
|
|
3213
3213
|
else if (o === "number") {
|
|
3214
|
-
const v = Number(
|
|
3215
|
-
|
|
3214
|
+
const v = Number(x);
|
|
3215
|
+
p(!isNaN(v) && v >= c && v <= a);
|
|
3216
3216
|
} else
|
|
3217
|
-
|
|
3218
|
-
}, [
|
|
3217
|
+
p(!0);
|
|
3218
|
+
}, [x, h, o, c, a]);
|
|
3219
3219
|
const C = k(() => {
|
|
3220
|
-
f && (s == null || s(
|
|
3221
|
-
}, [
|
|
3220
|
+
f && (s == null || s(x), i == null || i());
|
|
3221
|
+
}, [x, f, s, i]), b = k(() => {
|
|
3222
3222
|
i == null || i();
|
|
3223
3223
|
}, [i]), y = (v) => {
|
|
3224
3224
|
if (o === "number") {
|
|
3225
3225
|
if (v === "") {
|
|
3226
|
-
|
|
3226
|
+
j("");
|
|
3227
3227
|
return;
|
|
3228
3228
|
}
|
|
3229
3229
|
const M = Number(v);
|
|
3230
|
-
isNaN(M) || (M < c && (v = String(c)), M > a && (v = String(a)),
|
|
3230
|
+
isNaN(M) || (M < c && (v = String(c)), M > a && (v = String(a)), j(v));
|
|
3231
3231
|
} else
|
|
3232
|
-
|
|
3232
|
+
j(v);
|
|
3233
3233
|
};
|
|
3234
3234
|
return /* @__PURE__ */ e.jsxs(
|
|
3235
3235
|
Ee,
|
|
@@ -3238,12 +3238,12 @@ const Vs = ({
|
|
|
3238
3238
|
header: r,
|
|
3239
3239
|
onHide: b,
|
|
3240
3240
|
action: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
3241
|
-
/* @__PURE__ */ e.jsx(ce, { onClick: b, children:
|
|
3241
|
+
/* @__PURE__ */ e.jsx(ce, { onClick: b, children: m }),
|
|
3242
3242
|
/* @__PURE__ */ e.jsx(
|
|
3243
3243
|
ce,
|
|
3244
3244
|
{
|
|
3245
3245
|
onClick: C,
|
|
3246
|
-
disabled: !f || o === "number" &&
|
|
3246
|
+
disabled: !f || o === "number" && x === "",
|
|
3247
3247
|
children: u
|
|
3248
3248
|
}
|
|
3249
3249
|
)
|
|
@@ -3259,7 +3259,7 @@ const Vs = ({
|
|
|
3259
3259
|
max: a,
|
|
3260
3260
|
border: !0,
|
|
3261
3261
|
placeholder: l,
|
|
3262
|
-
value:
|
|
3262
|
+
value: x,
|
|
3263
3263
|
onChange: y,
|
|
3264
3264
|
error: !f
|
|
3265
3265
|
}
|
|
@@ -3286,13 +3286,13 @@ const Vs = ({
|
|
|
3286
3286
|
saveText: a,
|
|
3287
3287
|
cancelText: d,
|
|
3288
3288
|
forceFullScreen: u,
|
|
3289
|
-
btns:
|
|
3289
|
+
btns: m
|
|
3290
3290
|
}) => {
|
|
3291
3291
|
const { screen: h } = Ce(we);
|
|
3292
3292
|
Cn(!0, document.body);
|
|
3293
|
-
const
|
|
3293
|
+
const x = () => {
|
|
3294
3294
|
l == null || l();
|
|
3295
|
-
},
|
|
3295
|
+
}, j = () => {
|
|
3296
3296
|
i == null || i();
|
|
3297
3297
|
};
|
|
3298
3298
|
return u || h === ee.MOBILE ? /* @__PURE__ */ e.jsxs(
|
|
@@ -3314,17 +3314,17 @@ const Vs = ({
|
|
|
3314
3314
|
de,
|
|
3315
3315
|
{
|
|
3316
3316
|
transparent: !0,
|
|
3317
|
-
onClick:
|
|
3317
|
+
onClick: x,
|
|
3318
3318
|
icon: /* @__PURE__ */ e.jsx(ue, {}),
|
|
3319
3319
|
"aria-label": "Закрыть"
|
|
3320
3320
|
}
|
|
3321
3321
|
) }),
|
|
3322
3322
|
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__text", children: r }),
|
|
3323
|
-
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__save", children: i && /* @__PURE__ */ e.jsx("button", { onClick:
|
|
3323
|
+
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__save", children: i && /* @__PURE__ */ e.jsx("button", { onClick: j, className: "full-screen-dialog__container__header__save__button", children: /* @__PURE__ */ e.jsx(U, { type: "body", weight: "bold", children: a || "Сохранить" }) }) })
|
|
3324
3324
|
] }),
|
|
3325
3325
|
/* @__PURE__ */ e.jsxs("div", { className: "full-screen-dialog__content", children: [
|
|
3326
3326
|
s,
|
|
3327
|
-
|
|
3327
|
+
m && /* @__PURE__ */ e.jsx(ze, { btns: m.filter((p) => !p.hide && !p.success) })
|
|
3328
3328
|
] })
|
|
3329
3329
|
]
|
|
3330
3330
|
}
|
|
@@ -3335,15 +3335,15 @@ const Vs = ({
|
|
|
3335
3335
|
style: n,
|
|
3336
3336
|
header: r,
|
|
3337
3337
|
className: `full-screen-dialog ${t}`,
|
|
3338
|
-
onHide:
|
|
3339
|
-
action:
|
|
3340
|
-
l && /* @__PURE__ */ e.jsx(ye, { styleType: "outline", onClick:
|
|
3341
|
-
l && /* @__PURE__ */ e.jsx(ye, { onClick:
|
|
3342
|
-
] }) : /* @__PURE__ */ e.jsx(ze, { btns:
|
|
3338
|
+
onHide: x,
|
|
3339
|
+
action: m === void 0 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3340
|
+
l && /* @__PURE__ */ e.jsx(ye, { styleType: "outline", onClick: x, children: d ?? "Отмена" }),
|
|
3341
|
+
l && /* @__PURE__ */ e.jsx(ye, { onClick: j, children: a ?? "Сохранить" })
|
|
3342
|
+
] }) : /* @__PURE__ */ e.jsx(ze, { btns: m, onHide: l, onSuccess: i }),
|
|
3343
3343
|
children: s
|
|
3344
3344
|
}
|
|
3345
3345
|
);
|
|
3346
|
-
},
|
|
3346
|
+
}, mr = ve(
|
|
3347
3347
|
({
|
|
3348
3348
|
className: n = "",
|
|
3349
3349
|
action: t,
|
|
@@ -3356,18 +3356,18 @@ const Vs = ({
|
|
|
3356
3356
|
iconButtonCell: a,
|
|
3357
3357
|
onClick: d,
|
|
3358
3358
|
screenSize: u,
|
|
3359
|
-
rootApp:
|
|
3359
|
+
rootApp: m = "#root",
|
|
3360
3360
|
variant: h = "elevated",
|
|
3361
|
-
loading:
|
|
3362
|
-
style:
|
|
3361
|
+
loading: x = !1,
|
|
3362
|
+
style: j,
|
|
3363
3363
|
elevation: f = 6,
|
|
3364
|
-
...
|
|
3364
|
+
...p
|
|
3365
3365
|
}, C) => {
|
|
3366
3366
|
const { screen: b } = Ce(we), y = u ?? b, v = `elevation-${Math.min(24, Math.max(0, f))}`, M = (A) => {
|
|
3367
3367
|
F(A) && (d == null || d(A), B(A));
|
|
3368
3368
|
}, F = (A) => {
|
|
3369
3369
|
const w = A.target;
|
|
3370
|
-
return !w.closest(".action-container") && !w.closest(".card-icon-button") && !w.closest(".card-child-container") && !w.closest(".card-children") && !!w.closest(
|
|
3370
|
+
return !w.closest(".action-container") && !w.closest(".card-icon-button") && !w.closest(".card-child-container") && !w.closest(".card-children") && !!w.closest(m);
|
|
3371
3371
|
}, B = (A) => {
|
|
3372
3372
|
const w = A.currentTarget, z = w.querySelector(".card-ripple-container");
|
|
3373
3373
|
if (!z) return;
|
|
@@ -3378,15 +3378,15 @@ const Vs = ({
|
|
|
3378
3378
|
"div",
|
|
3379
3379
|
{
|
|
3380
3380
|
ref: C,
|
|
3381
|
-
style:
|
|
3382
|
-
className: `${n} card card--${h} ${v} ${
|
|
3381
|
+
style: j,
|
|
3382
|
+
className: `${n} card card--${h} ${v} ${x ? "card--loading" : ""}`,
|
|
3383
3383
|
onClick: M,
|
|
3384
|
-
...
|
|
3384
|
+
...p,
|
|
3385
3385
|
children: [
|
|
3386
3386
|
/* @__PURE__ */ e.jsx("div", { className: "card-ripple-container" }),
|
|
3387
3387
|
r && /* @__PURE__ */ e.jsxs("div", { className: "card-image-container", children: [
|
|
3388
3388
|
/* @__PURE__ */ e.jsx("img", { src: r, alt: s, loading: "lazy" }),
|
|
3389
|
-
|
|
3389
|
+
x && /* @__PURE__ */ e.jsx("div", { className: "card-image-overlay" })
|
|
3390
3390
|
] }),
|
|
3391
3391
|
/* @__PURE__ */ e.jsxs("div", { className: "card-content", children: [
|
|
3392
3392
|
(i || a) && /* @__PURE__ */ e.jsxs("div", { className: "card-header", children: [
|
|
@@ -3424,30 +3424,30 @@ const Vs = ({
|
|
|
3424
3424
|
c && /* @__PURE__ */ e.jsx("div", { className: "card-children", children: c }),
|
|
3425
3425
|
t && /* @__PURE__ */ e.jsx("div", { className: "card-actions", children: t })
|
|
3426
3426
|
] }),
|
|
3427
|
-
|
|
3427
|
+
x && /* @__PURE__ */ e.jsx("div", { className: "card-loading-indicator" })
|
|
3428
3428
|
]
|
|
3429
3429
|
}
|
|
3430
3430
|
);
|
|
3431
3431
|
}
|
|
3432
3432
|
);
|
|
3433
|
-
|
|
3433
|
+
mr.displayName = "Card";
|
|
3434
3434
|
const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { className: `base-action-card ${t ?? ""}`, children: n }), As = ({ children: n, className: t, id: r, height: s, width: i, pozMove: l, draggable: o = !0 }) => {
|
|
3435
|
-
const [c, a] = g(!1), [d, u] = g(null), [
|
|
3436
|
-
|
|
3437
|
-
},
|
|
3438
|
-
|
|
3439
|
-
}, f = k((
|
|
3435
|
+
const [c, a] = g(!1), [d, u] = g(null), [m, h] = g({ x: 0, y: 0 }), x = (p) => {
|
|
3436
|
+
p.button == 1 && (a(!1), u(null), document.body.style.cursor = "auto");
|
|
3437
|
+
}, j = (p) => {
|
|
3438
|
+
p.button == 1 && o && (u({ x: p.clientX, y: p.clientY }), a(!0), document.body.style.cursor = "move");
|
|
3439
|
+
}, f = k((p) => {
|
|
3440
3440
|
c && (h((C) => {
|
|
3441
3441
|
if (!d)
|
|
3442
3442
|
return C;
|
|
3443
|
-
const b =
|
|
3443
|
+
const b = p.clientX - d.x, y = p.clientY - d.y;
|
|
3444
3444
|
let v = C.x + b, M = C.y + y;
|
|
3445
3445
|
return { x: v, y: M };
|
|
3446
|
-
}), u({ x:
|
|
3446
|
+
}), u({ x: p.clientX, y: p.clientY }));
|
|
3447
3447
|
}, [c, d]);
|
|
3448
3448
|
return O(() => {
|
|
3449
3449
|
l && h({ ...l });
|
|
3450
|
-
}, [l]), /* @__PURE__ */ e.jsx("div", { id: r, style: { height: s, width: i }, className: `big-container ${t}`, onMouseDown:
|
|
3450
|
+
}, [l]), /* @__PURE__ */ e.jsx("div", { id: r, style: { height: s, width: i }, className: `big-container ${t}`, onMouseDown: j, onMouseUp: x, onMouseMove: f, children: /* @__PURE__ */ e.jsx("div", { className: "big-container-content", style: { left: m.x, top: m.y }, children: n }) });
|
|
3451
3451
|
}, Ds = ({
|
|
3452
3452
|
onClick: n,
|
|
3453
3453
|
onContextMenu: t,
|
|
@@ -3460,17 +3460,17 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3460
3460
|
classNameColumn: a,
|
|
3461
3461
|
minColumnWidth: d = "auto"
|
|
3462
3462
|
}) => {
|
|
3463
|
-
const u = ne.useCallback((
|
|
3464
|
-
const f = Array.from({ length:
|
|
3465
|
-
return
|
|
3466
|
-
if (
|
|
3467
|
-
console.error(`Invalid column index. indexCol = ${
|
|
3463
|
+
const u = ne.useCallback((x, j) => {
|
|
3464
|
+
const f = Array.from({ length: x }, () => []);
|
|
3465
|
+
return j.forEach((p) => {
|
|
3466
|
+
if (p.indexCol >= f.length) {
|
|
3467
|
+
console.error(`Invalid column index. indexCol = ${p.indexCol}, column count = ${x}`);
|
|
3468
3468
|
return;
|
|
3469
3469
|
}
|
|
3470
|
-
f[
|
|
3470
|
+
f[p.indexCol].push(p.node);
|
|
3471
3471
|
}), f;
|
|
3472
|
-
}, []),
|
|
3473
|
-
c == null || c(
|
|
3472
|
+
}, []), m = ne.useMemo(() => u(l, o), [u, l, o]), h = ne.useCallback((x, j) => {
|
|
3473
|
+
c == null || c(x, j);
|
|
3474
3474
|
}, [c]);
|
|
3475
3475
|
return /* @__PURE__ */ e.jsx(
|
|
3476
3476
|
"div",
|
|
@@ -3484,15 +3484,15 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3484
3484
|
},
|
|
3485
3485
|
className: `${s} alex-evo-sh-ui-kit-column-layout`,
|
|
3486
3486
|
"data-testid": "column-layout-container",
|
|
3487
|
-
children:
|
|
3487
|
+
children: m.map((x, j) => /* @__PURE__ */ e.jsx(
|
|
3488
3488
|
"div",
|
|
3489
3489
|
{
|
|
3490
|
-
onClick: (f) => h(
|
|
3490
|
+
onClick: (f) => h(j, f),
|
|
3491
3491
|
className: `${a} alex-evo-sh-ui-kit-column-layout-coll`,
|
|
3492
|
-
"data-testid": `column-${
|
|
3493
|
-
children:
|
|
3492
|
+
"data-testid": `column-${j}`,
|
|
3493
|
+
children: x.map((f, p) => /* @__PURE__ */ e.jsx("div", { className: "alex-evo-sh-ui-kit-column-layout-item", children: f }, `item-${j}-${p}`))
|
|
3494
3494
|
},
|
|
3495
|
-
`column-${
|
|
3495
|
+
`column-${j}`
|
|
3496
3496
|
))
|
|
3497
3497
|
}
|
|
3498
3498
|
);
|
|
@@ -3507,16 +3507,16 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3507
3507
|
action: c,
|
|
3508
3508
|
onVisibilityChange: a
|
|
3509
3509
|
}) => {
|
|
3510
|
-
const [d, u] = g(l ? o : !0),
|
|
3511
|
-
if (!
|
|
3512
|
-
const C = Ye(
|
|
3510
|
+
const [d, u] = g(l ? o : !0), m = G(null), h = (p) => {
|
|
3511
|
+
if (!p) return;
|
|
3512
|
+
const C = Ye(p);
|
|
3513
3513
|
if (C)
|
|
3514
3514
|
return C.height + fr;
|
|
3515
|
-
},
|
|
3516
|
-
const C = h(
|
|
3515
|
+
}, x = (p) => {
|
|
3516
|
+
const C = h(p);
|
|
3517
3517
|
return C ? Math.min(C * jr, 1) : 0.4;
|
|
3518
|
-
},
|
|
3519
|
-
const C =
|
|
3518
|
+
}, j = (p) => {
|
|
3519
|
+
const C = p.target;
|
|
3520
3520
|
if (!(C.closest(".action-btn") || C.classList.contains("action-btn")) && l) {
|
|
3521
3521
|
const y = !d;
|
|
3522
3522
|
u(y), a == null || a(y);
|
|
@@ -3526,8 +3526,8 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3526
3526
|
!l && !d && (u(!0), a == null || a(!0));
|
|
3527
3527
|
}, [l, d, a]);
|
|
3528
3528
|
const f = oe(
|
|
3529
|
-
() => m
|
|
3530
|
-
[
|
|
3529
|
+
() => x(m.current),
|
|
3530
|
+
[m.current]
|
|
3531
3531
|
);
|
|
3532
3532
|
return /* @__PURE__ */ e.jsxs(
|
|
3533
3533
|
"div",
|
|
@@ -3540,12 +3540,12 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3540
3540
|
"div",
|
|
3541
3541
|
{
|
|
3542
3542
|
className: "content-box-label",
|
|
3543
|
-
onClick:
|
|
3543
|
+
onClick: j,
|
|
3544
3544
|
role: l ? "button" : void 0,
|
|
3545
3545
|
"aria-label": l ? `${t} - click to ${d ? "collapse" : "expand"}` : t,
|
|
3546
3546
|
tabIndex: l ? 0 : void 0,
|
|
3547
|
-
onKeyDown: (
|
|
3548
|
-
l && (
|
|
3547
|
+
onKeyDown: (p) => {
|
|
3548
|
+
l && (p.key === "Enter" || p.key === " ") && (p.preventDefault(), j(p));
|
|
3549
3549
|
},
|
|
3550
3550
|
children: [
|
|
3551
3551
|
/* @__PURE__ */ e.jsx(U, { type: "title", children: t }),
|
|
@@ -3557,8 +3557,8 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3557
3557
|
"aria-label": c.ariaLabel || "Action",
|
|
3558
3558
|
role: "button",
|
|
3559
3559
|
tabIndex: 0,
|
|
3560
|
-
onKeyDown: (
|
|
3561
|
-
(
|
|
3560
|
+
onKeyDown: (p) => {
|
|
3561
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), c.onClick());
|
|
3562
3562
|
},
|
|
3563
3563
|
children: c.icon
|
|
3564
3564
|
}
|
|
@@ -3581,7 +3581,7 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3581
3581
|
height: d ? "auto" : "0px"
|
|
3582
3582
|
},
|
|
3583
3583
|
"aria-hidden": !d,
|
|
3584
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "content-box-container", ref:
|
|
3584
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "content-box-container", ref: m, children: n })
|
|
3585
3585
|
}
|
|
3586
3586
|
)
|
|
3587
3587
|
]
|
|
@@ -3604,12 +3604,12 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3604
3604
|
itemMaxWith: o,
|
|
3605
3605
|
itemWith: c = "400px"
|
|
3606
3606
|
}) => {
|
|
3607
|
-
const a =
|
|
3607
|
+
const a = G(null), [d, u] = g([]), m = G(null), h = G(null), x = k(() => {
|
|
3608
3608
|
if (!a.current) return;
|
|
3609
3609
|
a.current.style.display = "grid", a.current.style.gridRowGap = s, a.current.style.gridColumnGap = i;
|
|
3610
3610
|
const C = l ?? c, b = o ?? c;
|
|
3611
3611
|
a.current.style.gridTemplateColumns = `repeat(auto-fill, minmax(${C}, ${b}))`, a.current.style.gridAutoRows = "1px";
|
|
3612
|
-
}, [s, i, l, o, c]),
|
|
3612
|
+
}, [s, i, l, o, c]), j = k(() => {
|
|
3613
3613
|
if (a.current) {
|
|
3614
3614
|
const C = a.current.querySelectorAll(".adaptiv-grid-item");
|
|
3615
3615
|
u(Array.from(C));
|
|
@@ -3624,20 +3624,20 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3624
3624
|
v.style.gridRowEnd = `span ${B}`;
|
|
3625
3625
|
}
|
|
3626
3626
|
});
|
|
3627
|
-
}, [d]),
|
|
3627
|
+
}, [d]), p = k(() => {
|
|
3628
3628
|
h.current !== null && cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
|
|
3629
3629
|
f(), h.current = null;
|
|
3630
3630
|
});
|
|
3631
3631
|
}, [f]);
|
|
3632
3632
|
return O(() => {
|
|
3633
|
-
|
|
3634
|
-
}, [
|
|
3635
|
-
|
|
3636
|
-
const C =
|
|
3637
|
-
return d.forEach((b) => C.observe(b)),
|
|
3633
|
+
x(), j();
|
|
3634
|
+
}, [x, j, t]), O(() => {
|
|
3635
|
+
m.current && m.current.disconnect(), m.current = new ResizeObserver(() => p());
|
|
3636
|
+
const C = m.current;
|
|
3637
|
+
return d.forEach((b) => C.observe(b)), p(), () => {
|
|
3638
3638
|
C.disconnect(), h.current !== null && cancelAnimationFrame(h.current);
|
|
3639
3639
|
};
|
|
3640
|
-
}, [d,
|
|
3640
|
+
}, [d, p]), /* @__PURE__ */ e.jsx(
|
|
3641
3641
|
"div",
|
|
3642
3642
|
{
|
|
3643
3643
|
style: { minWidth: n },
|
|
@@ -3679,7 +3679,7 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3679
3679
|
activeTabIndex: l,
|
|
3680
3680
|
tabContainerClassName: o = ""
|
|
3681
3681
|
}) => {
|
|
3682
|
-
const [c, a] = g(0), d = l !== void 0 ? l : c, u =
|
|
3682
|
+
const [c, a] = g(0), d = l !== void 0 ? l : c, u = G(null), m = G(null), [h, x] = g(!1), j = (C) => {
|
|
3683
3683
|
if (u.current) {
|
|
3684
3684
|
const b = t || u.current.offsetWidth / 2;
|
|
3685
3685
|
u.current.scrollBy({
|
|
@@ -3690,25 +3690,25 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3690
3690
|
};
|
|
3691
3691
|
O(() => {
|
|
3692
3692
|
const C = () => {
|
|
3693
|
-
u.current &&
|
|
3693
|
+
u.current && x(
|
|
3694
3694
|
u.current.scrollWidth > u.current.clientWidth
|
|
3695
3695
|
);
|
|
3696
3696
|
};
|
|
3697
3697
|
return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
|
|
3698
3698
|
}, []), O(() => {
|
|
3699
|
-
if (u.current &&
|
|
3699
|
+
if (u.current && m.current) {
|
|
3700
3700
|
const C = u.current.children[d];
|
|
3701
|
-
C && (
|
|
3701
|
+
C && (m.current.style.width = `${C.offsetWidth}px`, m.current.style.transform = `translateX(${C.offsetLeft}px)`);
|
|
3702
3702
|
}
|
|
3703
3703
|
}, [d]);
|
|
3704
3704
|
const f = (C) => {
|
|
3705
|
-
C.key === "ArrowRight" ?
|
|
3706
|
-
},
|
|
3705
|
+
C.key === "ArrowRight" ? p((d + 1) % n.length) : C.key === "ArrowLeft" && p((d - 1 + n.length) % n.length);
|
|
3706
|
+
}, p = (C) => {
|
|
3707
3707
|
l === void 0 && a(C), i && i(C);
|
|
3708
3708
|
};
|
|
3709
3709
|
return /* @__PURE__ */ e.jsxs("div", { className: "alex-evo-ui-kit-tabs-container", children: [
|
|
3710
3710
|
/* @__PURE__ */ e.jsxs("div", { className: `alex-evo-ui-kit-tabs-scroll-buttons ${o}`, children: [
|
|
3711
|
-
h && /* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
3711
|
+
h && /* @__PURE__ */ e.jsx("button", { onClick: () => j("left"), className: "alex-evo-ui-kit-scroll-button", children: "◀" }),
|
|
3712
3712
|
/* @__PURE__ */ e.jsxs(
|
|
3713
3713
|
"div",
|
|
3714
3714
|
{
|
|
@@ -3721,16 +3721,16 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3721
3721
|
"div",
|
|
3722
3722
|
{
|
|
3723
3723
|
className: `alex-evo-ui-kit-tab ${r} ${d === b ? s : ""}`,
|
|
3724
|
-
onClick: () =>
|
|
3724
|
+
onClick: () => p(b),
|
|
3725
3725
|
children: C.label
|
|
3726
3726
|
},
|
|
3727
3727
|
C.label
|
|
3728
3728
|
)),
|
|
3729
|
-
/* @__PURE__ */ e.jsx("div", { className: "alex-evo-ui-kit-indicator", ref:
|
|
3729
|
+
/* @__PURE__ */ e.jsx("div", { className: "alex-evo-ui-kit-indicator", ref: m })
|
|
3730
3730
|
]
|
|
3731
3731
|
}
|
|
3732
3732
|
),
|
|
3733
|
-
h && /* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
3733
|
+
h && /* @__PURE__ */ e.jsx("button", { onClick: () => j("right"), className: "alex-evo-ui-kit-scroll-button", children: "▶" })
|
|
3734
3734
|
] }),
|
|
3735
3735
|
/* @__PURE__ */ e.jsx("div", { className: "alex-evo-ui-kit-tab-content", children: n[d].content })
|
|
3736
3736
|
] });
|
|
@@ -3745,9 +3745,10 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3745
3745
|
margin: c,
|
|
3746
3746
|
flex: a,
|
|
3747
3747
|
gap: d = 0,
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3748
|
+
onObserv: u,
|
|
3749
|
+
...m
|
|
3750
|
+
}, h) => {
|
|
3751
|
+
const x = G(null), j = {
|
|
3751
3752
|
overflowY: r ? s ? "scroll" : "hidden" : void 0,
|
|
3752
3753
|
maxHeight: r,
|
|
3753
3754
|
backgroundColor: i ? "transparent" : void 0,
|
|
@@ -3755,14 +3756,21 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3755
3756
|
padding: o,
|
|
3756
3757
|
margin: c
|
|
3757
3758
|
};
|
|
3758
|
-
a && (
|
|
3759
|
-
|
|
3759
|
+
a && (j.display = "flex", j.flexDirection = "column", d > 0 && (j.gap = d)), O(() => {
|
|
3760
|
+
if (!x.current || !u) return;
|
|
3761
|
+
const p = new IntersectionObserver(u);
|
|
3762
|
+
return p.observe(x.current), () => p.disconnect();
|
|
3763
|
+
}, [u]);
|
|
3764
|
+
const f = [
|
|
3760
3765
|
"list-container",
|
|
3761
3766
|
t,
|
|
3762
3767
|
s ? "list-container_scroll" : "",
|
|
3763
3768
|
i ? "list-container_transparent" : ""
|
|
3764
3769
|
].filter(Boolean).join(" ");
|
|
3765
|
-
return /* @__PURE__ */ e.
|
|
3770
|
+
return /* @__PURE__ */ e.jsxs("ul", { ref: h, style: j, className: f, ...m, children: [
|
|
3771
|
+
n,
|
|
3772
|
+
/* @__PURE__ */ e.jsx("div", { ref: x })
|
|
3773
|
+
] });
|
|
3766
3774
|
}), Cr = ve(({
|
|
3767
3775
|
icon: n,
|
|
3768
3776
|
control: t,
|
|
@@ -3775,28 +3783,28 @@ const Os = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3775
3783
|
className: a = "",
|
|
3776
3784
|
disabled: d = !1,
|
|
3777
3785
|
active: u = !1,
|
|
3778
|
-
shadow:
|
|
3786
|
+
shadow: m = 0,
|
|
3779
3787
|
...h
|
|
3780
|
-
},
|
|
3781
|
-
const
|
|
3782
|
-
!d && !
|
|
3788
|
+
}, x) => {
|
|
3789
|
+
const j = (p) => {
|
|
3790
|
+
!d && !p.target.closest(".control-container") && (o == null || o(p));
|
|
3783
3791
|
}, f = [
|
|
3784
3792
|
"list-item-container",
|
|
3785
3793
|
a,
|
|
3786
|
-
`container_shadow-hover-${
|
|
3794
|
+
`container_shadow-hover-${m}`,
|
|
3787
3795
|
c && !d ? "list-item-container_hovered" : "",
|
|
3788
3796
|
d ? "list-item-container_disabled" : "",
|
|
3789
3797
|
u ? "list-item-container_active" : ""
|
|
3790
3798
|
].filter(Boolean).join(" ");
|
|
3791
|
-
return /* @__PURE__ */ e.jsxs("li", { ref:
|
|
3799
|
+
return /* @__PURE__ */ e.jsxs("li", { ref: x, className: f, onClick: j, "aria-disabled": d, ...h, children: [
|
|
3792
3800
|
(n || l) && /* @__PURE__ */ e.jsx("div", { className: "list-item-container__icon-container", children: n || l && /* @__PURE__ */ e.jsx(U, { type: "body", children: l }) }),
|
|
3793
3801
|
(s || r || i) && /* @__PURE__ */ e.jsxs("div", { className: "list-item-container__text-container", children: [
|
|
3794
3802
|
s && /* @__PURE__ */ e.jsx("div", { className: "list-item-container__text-container__header", children: /* @__PURE__ */ e.jsx(U, { type: "title", children: s }) }),
|
|
3795
3803
|
r && /* @__PURE__ */ e.jsx("div", { className: "list-item-container__text-container__text", children: /* @__PURE__ */ e.jsx(U, { type: "small", children: r }) }),
|
|
3796
3804
|
i && /* @__PURE__ */ e.jsx("div", { className: "list-item-container__text-container__description", children: /* @__PURE__ */ e.jsx(U, { type: "small", color: "variant", children: i }) })
|
|
3797
3805
|
] }),
|
|
3798
|
-
t && /* @__PURE__ */ e.jsx("div", { onClick: (
|
|
3799
|
-
|
|
3806
|
+
t && /* @__PURE__ */ e.jsx("div", { onClick: (p) => {
|
|
3807
|
+
p.stopPropagation();
|
|
3800
3808
|
}, className: "list-item-container__control-container", children: t })
|
|
3801
3809
|
] });
|
|
3802
3810
|
});
|
|
@@ -3849,10 +3857,10 @@ const br = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
3849
3857
|
[c, o, t]
|
|
3850
3858
|
);
|
|
3851
3859
|
return /* @__PURE__ */ e.jsxs("tr", { className: "table-row", onClick: d, children: [
|
|
3852
|
-
r.map((u,
|
|
3860
|
+
r.map((u, m) => /* @__PURE__ */ e.jsx(
|
|
3853
3861
|
br,
|
|
3854
3862
|
{
|
|
3855
|
-
H: a == null ? void 0 : a[
|
|
3863
|
+
H: a == null ? void 0 : a[m],
|
|
3856
3864
|
color: u.color,
|
|
3857
3865
|
backgroundColor: u.backgroundColor,
|
|
3858
3866
|
column: u,
|
|
@@ -3860,14 +3868,14 @@ const br = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
3860
3868
|
},
|
|
3861
3869
|
u.field
|
|
3862
3870
|
)),
|
|
3863
|
-
n && /* @__PURE__ */ e.jsx("td", { className: "w-[180px] no-click", children: /* @__PURE__ */ e.jsx("div", { className: "table-edit-button", children: n.map((u,
|
|
3871
|
+
n && /* @__PURE__ */ e.jsx("td", { className: "w-[180px] no-click", children: /* @__PURE__ */ e.jsx("div", { className: "table-edit-button", children: n.map((u, m) => /* @__PURE__ */ e.jsx(
|
|
3864
3872
|
de,
|
|
3865
3873
|
{
|
|
3866
3874
|
transparent: !0,
|
|
3867
3875
|
icon: u.icon,
|
|
3868
3876
|
onClick: (h) => u.onClick(h, t, c)
|
|
3869
3877
|
},
|
|
3870
|
-
|
|
3878
|
+
m
|
|
3871
3879
|
)) }) }),
|
|
3872
3880
|
(s || i || l) && /* @__PURE__ */ e.jsx("td", { className: "w-[180px] table-edit-button no-click", children: /* @__PURE__ */ e.jsxs("div", { className: "table-edit-button", children: [
|
|
3873
3881
|
l && /* @__PURE__ */ e.jsx(de, { transparent: !0, icon: /* @__PURE__ */ e.jsx($n, {}), onClick: () => l(t, c) }),
|
|
@@ -3902,39 +3910,39 @@ const br = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
3902
3910
|
const a = oe(
|
|
3903
3911
|
() => t ?? vr(n),
|
|
3904
3912
|
[n, t]
|
|
3905
|
-
), d = a.length + (l ? 1 : 0) + (r || s || i ? 1 : 0), u = (h) => h ? (Array.isArray(h) ? h : [h]).map((
|
|
3913
|
+
), d = a.length + (l ? 1 : 0) + (r || s || i ? 1 : 0), u = (h) => h ? (Array.isArray(h) ? h : [h]).map((j, f) => typeof j == "string" || typeof j == "number" ? /* @__PURE__ */ e.jsx("span", { children: j }, f) : /* @__PURE__ */ e.jsx(
|
|
3906
3914
|
"span",
|
|
3907
3915
|
{
|
|
3908
|
-
style: { color:
|
|
3909
|
-
onClick:
|
|
3910
|
-
children:
|
|
3916
|
+
style: { color: j.color },
|
|
3917
|
+
onClick: j.onClick,
|
|
3918
|
+
children: j.content
|
|
3911
3919
|
},
|
|
3912
3920
|
f
|
|
3913
|
-
)) : null,
|
|
3914
|
-
return /* @__PURE__ */ e.jsx("div", { className: `table-container mt-3 ${c ? "clicked" : ""} ${
|
|
3921
|
+
)) : null, m = `container_shadow-${o}`;
|
|
3922
|
+
return /* @__PURE__ */ e.jsx("div", { className: `table-container mt-3 ${c ? "clicked" : ""} ${m}`, children: /* @__PURE__ */ e.jsxs("table", { children: [
|
|
3915
3923
|
/* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { children: [
|
|
3916
3924
|
a.map((h) => /* @__PURE__ */ e.jsx("th", { className: "min-width", children: h.title }, h.field)),
|
|
3917
3925
|
l && /* @__PURE__ */ e.jsx("th", { className: "table-actions-header", children: "actions" }),
|
|
3918
3926
|
(r || s || i) && /* @__PURE__ */ e.jsx("th", { className: "table-actions-header" })
|
|
3919
3927
|
] }) }),
|
|
3920
|
-
/* @__PURE__ */ e.jsx("tbody", { children: n.map((h,
|
|
3928
|
+
/* @__PURE__ */ e.jsx("tbody", { children: n.map((h, x) => {
|
|
3921
3929
|
if ("__all__" in h) {
|
|
3922
|
-
const
|
|
3923
|
-
return /* @__PURE__ */ e.jsx("tr", { className: "table-all-row", children: /* @__PURE__ */ e.jsx("td", { colSpan: d, style: { backgroundColor:
|
|
3930
|
+
const j = gr(h.__all__);
|
|
3931
|
+
return /* @__PURE__ */ e.jsx("tr", { className: "table-all-row", children: /* @__PURE__ */ e.jsx("td", { colSpan: d, style: { backgroundColor: j == null ? void 0 : j.backgroundColor, color: j == null ? void 0 : j.color }, children: u(j) }) }, `all-${x}`);
|
|
3924
3932
|
}
|
|
3925
3933
|
return /* @__PURE__ */ e.jsx(
|
|
3926
3934
|
kr,
|
|
3927
3935
|
{
|
|
3928
3936
|
onClickRow: c,
|
|
3929
3937
|
actions: l,
|
|
3930
|
-
index:
|
|
3938
|
+
index: x,
|
|
3931
3939
|
columns: a,
|
|
3932
3940
|
item: h,
|
|
3933
3941
|
onDelete: r,
|
|
3934
3942
|
onContextMenu: s,
|
|
3935
3943
|
onEdit: i
|
|
3936
3944
|
},
|
|
3937
|
-
|
|
3945
|
+
x
|
|
3938
3946
|
);
|
|
3939
3947
|
}) })
|
|
3940
3948
|
] }) });
|
|
@@ -4119,7 +4127,7 @@ function Er(n, t, r, s) {
|
|
|
4119
4127
|
Fr(i, r, t, s);
|
|
4120
4128
|
});
|
|
4121
4129
|
}
|
|
4122
|
-
function
|
|
4130
|
+
function xn(n, t, r, s) {
|
|
4123
4131
|
if (n.preventDefault(), !t) return;
|
|
4124
4132
|
const i = t.getBoundingClientRect();
|
|
4125
4133
|
let l = n.clientY - i.top;
|
|
@@ -4128,8 +4136,8 @@ function mn(n, t, r, s) {
|
|
|
4128
4136
|
s(c), qn(r, l);
|
|
4129
4137
|
}
|
|
4130
4138
|
function Fr(n, t, r, s) {
|
|
4131
|
-
const i = (o) =>
|
|
4132
|
-
|
|
4139
|
+
const i = (o) => xn(o, r, t, s);
|
|
4140
|
+
xn(n, r, t, s), t.classList.add("dragging"), window.addEventListener("mousemove", i), window.addEventListener("mouseup", l);
|
|
4133
4141
|
function l() {
|
|
4134
4142
|
t.classList.remove("dragging"), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", l);
|
|
4135
4143
|
}
|
|
@@ -4150,11 +4158,11 @@ const Vr = [
|
|
|
4150
4158
|
"#D27AEE",
|
|
4151
4159
|
"#5BA8C4",
|
|
4152
4160
|
"#E64AA9"
|
|
4153
|
-
],
|
|
4161
|
+
], mn = { h: 0, s: 1, v: 0.5 }, Tr = (n) => {
|
|
4154
4162
|
try {
|
|
4155
|
-
return n ? De(Ne(n)) :
|
|
4163
|
+
return n ? De(Ne(n)) : mn;
|
|
4156
4164
|
} catch {
|
|
4157
|
-
return
|
|
4165
|
+
return mn;
|
|
4158
4166
|
}
|
|
4159
4167
|
}, Or = ({
|
|
4160
4168
|
onHide: n,
|
|
@@ -4167,43 +4175,43 @@ const Vr = [
|
|
|
4167
4175
|
width: c = 310,
|
|
4168
4176
|
height: a = "auto"
|
|
4169
4177
|
}) => {
|
|
4170
|
-
const d =
|
|
4171
|
-
`#${ke(Le(
|
|
4172
|
-
), y = oe(() => Le(
|
|
4178
|
+
const d = G(null), u = G(null), m = G(null), h = G(null), [x, j] = g(Tr(t)), [f, p] = g(!1), [C, b] = g(
|
|
4179
|
+
`#${ke(Le(x))}`
|
|
4180
|
+
), y = oe(() => Le(x), [x]), v = oe(() => `#${ke(y)}`, [y]), M = oe(
|
|
4173
4181
|
() => C[0] !== "#" ? `#${C}` : C,
|
|
4174
4182
|
[C]
|
|
4175
4183
|
);
|
|
4176
4184
|
O(() => {
|
|
4177
|
-
!
|
|
4178
|
-
|
|
4185
|
+
!m.current || !d.current || !u.current || !h.current || F(
|
|
4186
|
+
m.current,
|
|
4179
4187
|
h.current,
|
|
4180
4188
|
d.current,
|
|
4181
4189
|
u.current,
|
|
4182
|
-
|
|
4190
|
+
x
|
|
4183
4191
|
);
|
|
4184
|
-
}, [
|
|
4185
|
-
if (!
|
|
4186
|
-
const N =
|
|
4192
|
+
}, [x]), O(() => {
|
|
4193
|
+
if (!m.current || !h.current) return;
|
|
4194
|
+
const N = m.current.getContext("2d");
|
|
4187
4195
|
N && (Mr(
|
|
4188
4196
|
N,
|
|
4189
|
-
|
|
4190
|
-
`#${ke(Le(
|
|
4197
|
+
m.current,
|
|
4198
|
+
`#${ke(Le(x.h, 1, 1))}`
|
|
4191
4199
|
), Lr(
|
|
4192
|
-
|
|
4200
|
+
m.current,
|
|
4193
4201
|
N,
|
|
4194
4202
|
h.current,
|
|
4195
4203
|
(I, S) => {
|
|
4196
|
-
|
|
4204
|
+
j((L) => {
|
|
4197
4205
|
const T = { ...L, s: I / 100, v: S / 100 };
|
|
4198
4206
|
return b(ke(Le(T))), T;
|
|
4199
4207
|
});
|
|
4200
4208
|
}
|
|
4201
4209
|
));
|
|
4202
|
-
}, [
|
|
4210
|
+
}, [x.h]), O(() => {
|
|
4203
4211
|
if (!d.current || !u.current) return;
|
|
4204
4212
|
const N = d.current.getContext("2d");
|
|
4205
4213
|
N && (Rr(N, d.current), Er(N, d.current, u.current, (I) => {
|
|
4206
|
-
|
|
4214
|
+
j((S) => {
|
|
4207
4215
|
const L = { ...S, h: I / 360 };
|
|
4208
4216
|
return b(ke(Le(L))), L;
|
|
4209
4217
|
});
|
|
@@ -4211,21 +4219,21 @@ const Vr = [
|
|
|
4211
4219
|
}, []), O(() => {
|
|
4212
4220
|
if (C.length === 4 || C.length === 7)
|
|
4213
4221
|
try {
|
|
4214
|
-
|
|
4222
|
+
j(De(Ne(C)));
|
|
4215
4223
|
} catch {
|
|
4216
4224
|
console.warn("Invalid HEX color");
|
|
4217
4225
|
}
|
|
4218
4226
|
}, [C]);
|
|
4219
4227
|
const F = (N, I, S, L, T) => {
|
|
4220
4228
|
try {
|
|
4221
|
-
const Y = N.getBoundingClientRect(), q = S.getBoundingClientRect(),
|
|
4222
|
-
Kn(I,
|
|
4229
|
+
const Y = N.getBoundingClientRect(), q = S.getBoundingClientRect(), Z = Math.round(T.s * Y.width), _ = Math.round((1 - T.v) * Y.height), $ = (360 - T.h * 360) / 360 * q.height;
|
|
4230
|
+
Kn(I, Z, _), qn(L, $);
|
|
4223
4231
|
} catch (Y) {
|
|
4224
4232
|
console.error("Error updating cursor positions", Y);
|
|
4225
4233
|
}
|
|
4226
4234
|
}, B = (N) => {
|
|
4227
4235
|
try {
|
|
4228
|
-
|
|
4236
|
+
j(De(Ne(N))), b(N);
|
|
4229
4237
|
} catch {
|
|
4230
4238
|
console.warn("Invalid color format");
|
|
4231
4239
|
}
|
|
@@ -4236,7 +4244,7 @@ const Vr = [
|
|
|
4236
4244
|
}, [r, v]), z = k(
|
|
4237
4245
|
(N, I) => {
|
|
4238
4246
|
const S = Math.min(255, Math.max(0, I));
|
|
4239
|
-
|
|
4247
|
+
j(De({ ...y, [N]: S })), b(ke({ ...y, [N]: S }));
|
|
4240
4248
|
},
|
|
4241
4249
|
[y]
|
|
4242
4250
|
), D = k((N) => {
|
|
@@ -4286,7 +4294,7 @@ const Vr = [
|
|
|
4286
4294
|
/* @__PURE__ */ e.jsx(
|
|
4287
4295
|
"canvas",
|
|
4288
4296
|
{
|
|
4289
|
-
ref:
|
|
4297
|
+
ref: m,
|
|
4290
4298
|
className: "spectrum-canvas spectrum-canvas-color-picker",
|
|
4291
4299
|
"aria-label": "Color spectrum"
|
|
4292
4300
|
}
|
|
@@ -4347,7 +4355,7 @@ const Vr = [
|
|
|
4347
4355
|
"button",
|
|
4348
4356
|
{
|
|
4349
4357
|
className: "button-color-picker mode-toggle",
|
|
4350
|
-
onClick: () =>
|
|
4358
|
+
onClick: () => p((N) => !N),
|
|
4351
4359
|
"aria-label": `Switch to ${f ? "RGB" : "HEX"} mode`,
|
|
4352
4360
|
children: "Mode"
|
|
4353
4361
|
}
|
|
@@ -4419,19 +4427,19 @@ const Vr = [
|
|
|
4419
4427
|
defaultColor: a,
|
|
4420
4428
|
placeholder: d
|
|
4421
4429
|
}) => {
|
|
4422
|
-
const [u,
|
|
4430
|
+
const [u, m] = g(!1), [h, x] = g(s);
|
|
4423
4431
|
O(() => {
|
|
4424
|
-
s !== void 0 &&
|
|
4432
|
+
s !== void 0 && x(s);
|
|
4425
4433
|
}, [s]);
|
|
4426
|
-
const
|
|
4427
|
-
|
|
4434
|
+
const j = k(() => {
|
|
4435
|
+
m(!0);
|
|
4428
4436
|
}, []), f = k(
|
|
4429
4437
|
(b) => {
|
|
4430
|
-
|
|
4438
|
+
x(b), t == null || t(b), m(!1);
|
|
4431
4439
|
},
|
|
4432
4440
|
[t]
|
|
4433
|
-
),
|
|
4434
|
-
|
|
4441
|
+
), p = k(() => {
|
|
4442
|
+
m(!1);
|
|
4435
4443
|
}, []), C = [
|
|
4436
4444
|
"input-field",
|
|
4437
4445
|
"color-field",
|
|
@@ -4447,18 +4455,18 @@ const Vr = [
|
|
|
4447
4455
|
{
|
|
4448
4456
|
className: "color-circle",
|
|
4449
4457
|
style: { backgroundColor: h },
|
|
4450
|
-
onClick:
|
|
4458
|
+
onClick: j,
|
|
4451
4459
|
"aria-label": "Current color"
|
|
4452
4460
|
}
|
|
4453
4461
|
),
|
|
4454
|
-
/* @__PURE__ */ e.jsx("div", { className: "color-indicator-field", onClick:
|
|
4462
|
+
/* @__PURE__ */ e.jsx("div", { className: "color-indicator-field", onClick: j, children: /* @__PURE__ */ e.jsx(U, { type: "body", children: h }) })
|
|
4455
4463
|
] }),
|
|
4456
|
-
d && /* @__PURE__ */ e.jsx("div", { className: "color-field-label", onClick:
|
|
4464
|
+
d && /* @__PURE__ */ e.jsx("div", { className: "color-field-label", onClick: j, children: /* @__PURE__ */ e.jsx(U, { type: "body", className: "data color-field-placeholder", children: d }) }),
|
|
4457
4465
|
/* @__PURE__ */ e.jsx(
|
|
4458
4466
|
"div",
|
|
4459
4467
|
{
|
|
4460
4468
|
className: "color-icon-container icon-container",
|
|
4461
|
-
onClick:
|
|
4469
|
+
onClick: j,
|
|
4462
4470
|
"aria-label": "Open color picker",
|
|
4463
4471
|
children: /* @__PURE__ */ e.jsx(wn, {})
|
|
4464
4472
|
}
|
|
@@ -4472,11 +4480,11 @@ const Vr = [
|
|
|
4472
4480
|
onAddColor: c,
|
|
4473
4481
|
onChange: f,
|
|
4474
4482
|
beginColor: h,
|
|
4475
|
-
onHide:
|
|
4483
|
+
onHide: p
|
|
4476
4484
|
}
|
|
4477
4485
|
) })
|
|
4478
4486
|
] });
|
|
4479
|
-
}, Ar = 2050, fn = 1900,
|
|
4487
|
+
}, Ar = 2050, fn = 1900, me = [
|
|
4480
4488
|
"January",
|
|
4481
4489
|
"February",
|
|
4482
4490
|
"March",
|
|
@@ -4490,17 +4498,17 @@ const Vr = [
|
|
|
4490
4498
|
"November",
|
|
4491
4499
|
"December"
|
|
4492
4500
|
], Dr = () => Array(Ar - fn).fill(0).map((n, t) => fn + t), Ir = ({ onChange: n, onHide: t }) => {
|
|
4493
|
-
const [r] = g(
|
|
4501
|
+
const [r] = g(me[(/* @__PURE__ */ new Date()).getMonth()]), [s] = g((/* @__PURE__ */ new Date()).getFullYear()), [i] = g((/* @__PURE__ */ new Date()).getDate()), [l, o] = g(me[(/* @__PURE__ */ new Date()).getMonth()]), [c, a] = g((/* @__PURE__ */ new Date()).getFullYear()), [d, u] = g({
|
|
4494
4502
|
day: (/* @__PURE__ */ new Date()).getDate(),
|
|
4495
4503
|
type: "NOW_MONTH"
|
|
4496
4504
|
/* NOW_MONTH */
|
|
4497
|
-
}), [
|
|
4505
|
+
}), [m, h] = g(
|
|
4498
4506
|
"DAYS"
|
|
4499
4507
|
/* DAYS */
|
|
4500
|
-
),
|
|
4501
|
-
let F = Array(
|
|
4502
|
-
return F = Array(
|
|
4503
|
-
},
|
|
4508
|
+
), x = (v, M) => new Date(v, M + 1, 0).getDate(), j = (v, M, F) => new Date(v, M, F).getDay(), f = (v, M) => {
|
|
4509
|
+
let F = Array(x(v, M)).fill(0).map((z, D) => ({ type: "NOW_MONTH", day: D + 1 })), B = j(v, M, x(v, M)), A = Array(7 - B).fill(0).map((z, D) => ({ type: "NEXT_MONTH", day: D + 1 }));
|
|
4510
|
+
return F = Array(j(v, M, 0)).fill(0).map((z, D) => ({ type: "PREV_MONTH", day: x(M ? v : v - 1, M ? M - 1 : 11) - D })).reverse().concat(F).concat(A), F;
|
|
4511
|
+
}, p = (v) => {
|
|
4504
4512
|
h(
|
|
4505
4513
|
"DAYS"
|
|
4506
4514
|
/* DAYS */
|
|
@@ -4514,11 +4522,11 @@ const Vr = [
|
|
|
4514
4522
|
u(v);
|
|
4515
4523
|
}, y = k(() => {
|
|
4516
4524
|
let v = /* @__PURE__ */ new Date();
|
|
4517
|
-
v.setFullYear(c), d.type === "NEXT_MONTH" ? l ===
|
|
4525
|
+
v.setFullYear(c), d.type === "NEXT_MONTH" ? l === me[11] ? (v.setMonth(0), v.setFullYear(c + 1)) : v.setMonth(me.indexOf(l) + 1) : d.type === "PREV_MONTH" ? l === me[0] ? (v.setMonth(11), v.setFullYear(c - 1)) : v.setMonth(me.indexOf(l) - 1) : v.setMonth(me.indexOf(l)), v.setDate(d.day), n && n(v.getFullYear(), v.getMonth(), v.getDate()), t && t();
|
|
4518
4526
|
}, [l, c, n, t, d]);
|
|
4519
4527
|
return /* @__PURE__ */ e.jsxs(Ze, { className: "calendar-body-container", style: { maxWidth: "328px" }, children: [
|
|
4520
4528
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-select-container", children: [
|
|
4521
|
-
/* @__PURE__ */ e.jsx("div", { className: "month", children: /* @__PURE__ */ e.jsxs("span", { className:
|
|
4529
|
+
/* @__PURE__ */ e.jsx("div", { className: "month", children: /* @__PURE__ */ e.jsxs("span", { className: m === "MONTHS" ? "active" : "", onClick: () => h(
|
|
4522
4530
|
"MONTHS"
|
|
4523
4531
|
/* MONTHS */
|
|
4524
4532
|
), children: [
|
|
@@ -4526,7 +4534,7 @@ const Vr = [
|
|
|
4526
4534
|
" ",
|
|
4527
4535
|
/* @__PURE__ */ e.jsx(Ie, {})
|
|
4528
4536
|
] }) }),
|
|
4529
|
-
/* @__PURE__ */ e.jsx("div", { className: "years", children: /* @__PURE__ */ e.jsxs("span", { className:
|
|
4537
|
+
/* @__PURE__ */ e.jsx("div", { className: "years", children: /* @__PURE__ */ e.jsxs("span", { className: m === "YEARS" ? "active" : "", onClick: () => h(
|
|
4530
4538
|
"YEARS"
|
|
4531
4539
|
/* YEARS */
|
|
4532
4540
|
), children: [
|
|
@@ -4535,10 +4543,10 @@ const Vr = [
|
|
|
4535
4543
|
/* @__PURE__ */ e.jsx(Ie, {})
|
|
4536
4544
|
] }) })
|
|
4537
4545
|
] }),
|
|
4538
|
-
|
|
4546
|
+
m === "MONTHS" ? /* @__PURE__ */ e.jsx("div", { className: "calendar-body-months-container", children: me.map((v, M) => /* @__PURE__ */ e.jsxs("div", { className: "calendar-body-months-item", onClick: () => C(v), children: [
|
|
4539
4547
|
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: l === v ? /* @__PURE__ */ e.jsx(pe, {}) : null }),
|
|
4540
4548
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: v })
|
|
4541
|
-
] }, M)) }) :
|
|
4549
|
+
] }, M)) }) : m === "YEARS" ? /* @__PURE__ */ e.jsx("div", { className: "calendar-body-years-container", children: Dr().map((v, M) => /* @__PURE__ */ e.jsxs("div", { className: "calendar-body-year-item", onClick: () => p(v), children: [
|
|
4542
4550
|
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: c === v ? /* @__PURE__ */ e.jsx(pe, {}) : null }),
|
|
4543
4551
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: v })
|
|
4544
4552
|
] }, M)) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -4551,7 +4559,7 @@ const Vr = [
|
|
|
4551
4559
|
/* @__PURE__ */ e.jsx("span", { children: "S" }),
|
|
4552
4560
|
/* @__PURE__ */ e.jsx("span", { children: "S" })
|
|
4553
4561
|
] }),
|
|
4554
|
-
/* @__PURE__ */ e.jsx("div", { className: "calendar-body-days-container", children: f(c,
|
|
4562
|
+
/* @__PURE__ */ e.jsx("div", { className: "calendar-body-days-container", children: f(c, me.indexOf(l)).map((v, M) => /* @__PURE__ */ e.jsx("div", { className: `day ${v.type !== "NOW_MONTH" ? "other" : ""} ${i === v.day && c === s && l === r ? "now" : ""} ${v.day === d.day && v.type === d.type ? "select" : ""}`, onClick: () => b(v), children: v.day }, M)) })
|
|
4555
4563
|
] }),
|
|
4556
4564
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-action-container", children: [
|
|
4557
4565
|
/* @__PURE__ */ e.jsx(ce, { className: "little m-0", onClick: t, children: "Cancel" }),
|
|
@@ -4570,12 +4578,12 @@ const Vr = [
|
|
|
4570
4578
|
helperText: a,
|
|
4571
4579
|
size: d = "medium",
|
|
4572
4580
|
disabled: u,
|
|
4573
|
-
placeholder:
|
|
4581
|
+
placeholder: m,
|
|
4574
4582
|
onBlur: h,
|
|
4575
|
-
onFocus:
|
|
4576
|
-
...
|
|
4583
|
+
onFocus: x,
|
|
4584
|
+
...j
|
|
4577
4585
|
}) => {
|
|
4578
|
-
const [f,
|
|
4586
|
+
const [f, p] = g(s ?? ""), [C, b] = g(!1), [y, v] = g(!1), [M, F] = g(!!s), B = Be(), A = l || c, w = () => {
|
|
4579
4587
|
b(!0);
|
|
4580
4588
|
}, z = (L) => {
|
|
4581
4589
|
let T = String(L + 1);
|
|
@@ -4584,7 +4592,7 @@ const Vr = [
|
|
|
4584
4592
|
let T = String(L);
|
|
4585
4593
|
return T.length < 2 && (T = "0" + T), T;
|
|
4586
4594
|
}, E = (L) => {
|
|
4587
|
-
|
|
4595
|
+
x == null || x(L), v(!0);
|
|
4588
4596
|
}, N = (L) => {
|
|
4589
4597
|
h == null || h(L), v(!1), F(!!L.target.value);
|
|
4590
4598
|
};
|
|
@@ -4592,7 +4600,7 @@ const Vr = [
|
|
|
4592
4600
|
F(!!s);
|
|
4593
4601
|
}, [s]);
|
|
4594
4602
|
const I = k((L, T, Y) => {
|
|
4595
|
-
|
|
4603
|
+
p(`${L}-${z(T)}-${D(Y)}`), t && t(`${L}-${z(T)}-${D(Y)}`);
|
|
4596
4604
|
}, [t]), S = {
|
|
4597
4605
|
small: "input-field__date-field_small",
|
|
4598
4606
|
medium: "input-field__date-field_medium",
|
|
@@ -4623,17 +4631,17 @@ const Vr = [
|
|
|
4623
4631
|
onFocus: E,
|
|
4624
4632
|
readOnly: !0,
|
|
4625
4633
|
id: B,
|
|
4626
|
-
...
|
|
4634
|
+
...j
|
|
4627
4635
|
}
|
|
4628
4636
|
),
|
|
4629
|
-
|
|
4637
|
+
m && /* @__PURE__ */ e.jsx(
|
|
4630
4638
|
"label",
|
|
4631
4639
|
{
|
|
4632
4640
|
htmlFor: B,
|
|
4633
4641
|
className: `input-field__input-container__label
|
|
4634
4642
|
${M ? "input-field__input-container__label_filled" : ""}
|
|
4635
4643
|
`,
|
|
4636
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children:
|
|
4644
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: m })
|
|
4637
4645
|
}
|
|
4638
4646
|
)
|
|
4639
4647
|
] })
|
|
@@ -4663,8 +4671,8 @@ const Vr = [
|
|
|
4663
4671
|
}, [t]);
|
|
4664
4672
|
const o = k((a) => (d) => {
|
|
4665
4673
|
l((u) => {
|
|
4666
|
-
const
|
|
4667
|
-
return n == null || n(
|
|
4674
|
+
const m = d.target.checked ? [...u, a] : u.filter((h) => h !== a);
|
|
4675
|
+
return n == null || n(m), m;
|
|
4668
4676
|
});
|
|
4669
4677
|
}, [n]), c = k((a) => i.includes(a), [i]);
|
|
4670
4678
|
return /* @__PURE__ */ e.jsx("div", { className: `days-week-field-container ${r}`, children: Pr.map((a) => /* @__PURE__ */ e.jsxs("label", { className: "day-of-week-label", children: [
|
|
@@ -4694,14 +4702,14 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4694
4702
|
className: a,
|
|
4695
4703
|
ariaLabel: d = "Добавление нового элемента",
|
|
4696
4704
|
chipsAriaLabel: u = "Список элементов",
|
|
4697
|
-
id:
|
|
4705
|
+
id: m,
|
|
4698
4706
|
error: h,
|
|
4699
|
-
errorText:
|
|
4700
|
-
helperText:
|
|
4707
|
+
errorText: x,
|
|
4708
|
+
helperText: j
|
|
4701
4709
|
}) => {
|
|
4702
|
-
const [f,
|
|
4710
|
+
const [f, p] = g([]), [C, b] = g(""), [y, v] = g(null);
|
|
4703
4711
|
O(() => {
|
|
4704
|
-
|
|
4712
|
+
p(Wr(t, o));
|
|
4705
4713
|
}, [t, o]);
|
|
4706
4714
|
const M = (w) => {
|
|
4707
4715
|
b(w);
|
|
@@ -4711,17 +4719,17 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4711
4719
|
if (C.trim() === "" || f.includes(C.trim()))
|
|
4712
4720
|
return;
|
|
4713
4721
|
const w = [...f, C.trim()];
|
|
4714
|
-
|
|
4722
|
+
p(w), r == null || r(jn(w, o)), b(""), v(w.length - 1);
|
|
4715
4723
|
}, [f, C, r, o]), A = (w) => {
|
|
4716
4724
|
const z = f.filter((D, E) => E !== w);
|
|
4717
|
-
|
|
4725
|
+
p(z), r == null || r(jn(z, o)), v(w > 0 ? w - 1 : null);
|
|
4718
4726
|
};
|
|
4719
4727
|
return /* @__PURE__ */ e.jsxs(
|
|
4720
4728
|
"div",
|
|
4721
4729
|
{
|
|
4722
4730
|
className: `more-text ${a ?? ""}`,
|
|
4723
4731
|
style: { minWidth: n },
|
|
4724
|
-
id:
|
|
4732
|
+
id: m,
|
|
4725
4733
|
children: [
|
|
4726
4734
|
/* @__PURE__ */ e.jsx("div", { className: "add-value", children: /* @__PURE__ */ e.jsx(
|
|
4727
4735
|
Ve,
|
|
@@ -4732,11 +4740,11 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4732
4740
|
border: s,
|
|
4733
4741
|
placeholder: i,
|
|
4734
4742
|
error: h,
|
|
4735
|
-
errorText:
|
|
4736
|
-
helperText:
|
|
4743
|
+
errorText: x,
|
|
4744
|
+
helperText: j,
|
|
4737
4745
|
disabled: c,
|
|
4738
4746
|
"aria-label": d,
|
|
4739
|
-
"aria-describedby":
|
|
4747
|
+
"aria-describedby": m ? `${m}-help` : void 0
|
|
4740
4748
|
}
|
|
4741
4749
|
) }),
|
|
4742
4750
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -4781,7 +4789,7 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4781
4789
|
]
|
|
4782
4790
|
}
|
|
4783
4791
|
),
|
|
4784
|
-
|
|
4792
|
+
m && /* @__PURE__ */ e.jsx("div", { id: `${m}-help`, className: "sr-only", children: 'Добавляйте элементы, вводя текст и нажимая Enter или кнопку "Добавить"' })
|
|
4785
4793
|
]
|
|
4786
4794
|
}
|
|
4787
4795
|
);
|
|
@@ -4797,12 +4805,12 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4797
4805
|
name: a,
|
|
4798
4806
|
value: d,
|
|
4799
4807
|
placeholder: u,
|
|
4800
|
-
className:
|
|
4808
|
+
className: m,
|
|
4801
4809
|
validEmptyValue: h,
|
|
4802
|
-
onFocus:
|
|
4803
|
-
onBlur:
|
|
4810
|
+
onFocus: x,
|
|
4811
|
+
onBlur: j,
|
|
4804
4812
|
error: f,
|
|
4805
|
-
max:
|
|
4813
|
+
max: p,
|
|
4806
4814
|
min: C,
|
|
4807
4815
|
size: b = "medium",
|
|
4808
4816
|
disabled: y,
|
|
@@ -4813,7 +4821,7 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4813
4821
|
ariaLabelledby: A,
|
|
4814
4822
|
ariaDescribedby: w
|
|
4815
4823
|
}, z) => {
|
|
4816
|
-
const D =
|
|
4824
|
+
const D = G(null), E = G(null), N = G(null), I = G(null), [S, L] = g(!1), [T, Y] = g(d ?? 0), q = k((P, W) => L(!!(f || P && (!W || W === ""))), [f]), Z = () => {
|
|
4817
4825
|
if (!I.current)
|
|
4818
4826
|
return;
|
|
4819
4827
|
const P = I.current.querySelector("input");
|
|
@@ -4825,9 +4833,9 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4825
4833
|
}, [c]), $ = k(() => {
|
|
4826
4834
|
Y((P) => {
|
|
4827
4835
|
let W = P ? P + v : v;
|
|
4828
|
-
return typeof
|
|
4836
|
+
return typeof p == "number" && W > p && (W = p), _(W, a), W;
|
|
4829
4837
|
});
|
|
4830
|
-
}, [_, a,
|
|
4838
|
+
}, [_, a, p, v]), H = k(() => {
|
|
4831
4839
|
Y((P) => {
|
|
4832
4840
|
let W = P ? P - v : -v;
|
|
4833
4841
|
return typeof C == "number" && W < C && (W = C), _(W, a), W;
|
|
@@ -4839,8 +4847,8 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4839
4847
|
}
|
|
4840
4848
|
P.target.value.length > 1 && P.target.value[0] === "0" && ![",", "."].includes(P.target.value[1]) && (P.target.value = P.target.value.slice(1));
|
|
4841
4849
|
let W = Number(P.target.value);
|
|
4842
|
-
typeof C == "number" && W < C && (W = C), typeof
|
|
4843
|
-
}, [a, _, T,
|
|
4850
|
+
typeof C == "number" && W < C && (W = C), typeof p == "number" && W > p && (W = p), Y(Number(P.target.value)), _(W, a);
|
|
4851
|
+
}, [a, _, T, p, C]), J = k(() => {
|
|
4844
4852
|
D.current && clearTimeout(D.current), E.current && clearInterval(E.current), document.removeEventListener("mouseup", J);
|
|
4845
4853
|
}, []), te = k((P) => {
|
|
4846
4854
|
P === "p" ? $() : P === "m" && H(), D.current && clearTimeout(D.current), E.current && clearInterval(E.current), document.addEventListener("mouseup", J), D.current = setTimeout(() => {
|
|
@@ -4849,7 +4857,7 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4849
4857
|
}, 100);
|
|
4850
4858
|
}, 500);
|
|
4851
4859
|
}, [$, H]), Q = (P) => {
|
|
4852
|
-
T === "" && (Y(0), c == null || c(0)),
|
|
4860
|
+
T === "" && (Y(0), c == null || c(0)), j == null || j(P);
|
|
4853
4861
|
};
|
|
4854
4862
|
O(() => {
|
|
4855
4863
|
q(h, d);
|
|
@@ -4861,7 +4869,7 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4861
4869
|
medium: "input-field__number-field_medium",
|
|
4862
4870
|
large: "input-field__number-field_large"
|
|
4863
4871
|
};
|
|
4864
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${
|
|
4872
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${m}`, children: [
|
|
4865
4873
|
/* @__PURE__ */ e.jsxs(
|
|
4866
4874
|
"div",
|
|
4867
4875
|
{
|
|
@@ -4879,13 +4887,13 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4879
4887
|
"aria-disabled": y,
|
|
4880
4888
|
"aria-invalid": S,
|
|
4881
4889
|
children: [
|
|
4882
|
-
o ? /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container", onClick:
|
|
4883
|
-
/* @__PURE__ */ e.jsxs("div", { ref: I, className: "input-field__input-container", onClick:
|
|
4890
|
+
o ? /* @__PURE__ */ e.jsx("div", { className: "input-field__icon-container", onClick: Z, "aria-hidden": "true", children: o }) : null,
|
|
4891
|
+
/* @__PURE__ */ e.jsxs("div", { ref: I, className: "input-field__input-container", onClick: Z, children: [
|
|
4884
4892
|
/* @__PURE__ */ e.jsx(
|
|
4885
4893
|
"input",
|
|
4886
4894
|
{
|
|
4887
4895
|
ref: n,
|
|
4888
|
-
max:
|
|
4896
|
+
max: p,
|
|
4889
4897
|
step: v,
|
|
4890
4898
|
min: C,
|
|
4891
4899
|
readOnly: s,
|
|
@@ -4895,7 +4903,7 @@ const Wr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), jn =
|
|
|
4895
4903
|
name: a,
|
|
4896
4904
|
value: T,
|
|
4897
4905
|
onChange: K,
|
|
4898
|
-
onFocus:
|
|
4906
|
+
onFocus: x,
|
|
4899
4907
|
onBlur: Q,
|
|
4900
4908
|
"aria-label": B,
|
|
4901
4909
|
"aria-labelledby": A,
|
|
@@ -4982,12 +4990,12 @@ const Qn = ne.forwardRef(
|
|
|
4982
4990
|
onChange: a,
|
|
4983
4991
|
name: d,
|
|
4984
4992
|
value: u,
|
|
4985
|
-
placeholder:
|
|
4993
|
+
placeholder: m,
|
|
4986
4994
|
className: h,
|
|
4987
|
-
validEmptyValue:
|
|
4988
|
-
onFocus:
|
|
4995
|
+
validEmptyValue: x,
|
|
4996
|
+
onFocus: j,
|
|
4989
4997
|
onBlur: f,
|
|
4990
|
-
error:
|
|
4998
|
+
error: p,
|
|
4991
4999
|
autoFocus: C,
|
|
4992
5000
|
disabled: b,
|
|
4993
5001
|
helperText: y,
|
|
@@ -4995,21 +5003,21 @@ const Qn = ne.forwardRef(
|
|
|
4995
5003
|
rows: M = 3,
|
|
4996
5004
|
onKeyDown: F
|
|
4997
5005
|
}, B) => {
|
|
4998
|
-
const A =
|
|
5006
|
+
const A = G(null), [w, z] = g(!1), [D, E] = g(!1), [N, I] = g(!!u), S = Be(), L = () => {
|
|
4999
5007
|
var _;
|
|
5000
|
-
const
|
|
5001
|
-
|
|
5002
|
-
}, T = (
|
|
5003
|
-
|
|
5004
|
-
}, Y = (
|
|
5005
|
-
f == null || f(
|
|
5008
|
+
const Z = (_ = A.current) == null ? void 0 : _.querySelector("textarea");
|
|
5009
|
+
Z == null || Z.focus();
|
|
5010
|
+
}, T = (Z) => {
|
|
5011
|
+
j == null || j(Z), E(!0);
|
|
5012
|
+
}, Y = (Z) => {
|
|
5013
|
+
f == null || f(Z), E(!1), I(!!Z.target.value);
|
|
5006
5014
|
}, q = k(
|
|
5007
|
-
(
|
|
5008
|
-
[
|
|
5015
|
+
(Z, _) => z(!!(p || Z && (!_ || _ === ""))),
|
|
5016
|
+
[p]
|
|
5009
5017
|
);
|
|
5010
5018
|
return O(() => {
|
|
5011
|
-
q(
|
|
5012
|
-
}, [u,
|
|
5019
|
+
q(x, u), I(!!u);
|
|
5020
|
+
}, [u, x, q]), /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${h || ""}`, children: [
|
|
5013
5021
|
/* @__PURE__ */ e.jsxs(
|
|
5014
5022
|
"div",
|
|
5015
5023
|
{
|
|
@@ -5041,7 +5049,7 @@ const Qn = ne.forwardRef(
|
|
|
5041
5049
|
value: u,
|
|
5042
5050
|
className: `input-field__input-container__input input-field__text-area__input-container__textarea ${w ? "input-field__input-container__input_error" : ""}`,
|
|
5043
5051
|
onClick: n,
|
|
5044
|
-
onChange: (
|
|
5052
|
+
onChange: (Z) => a == null ? void 0 : a(Z.target.value, Z.target.name, Z),
|
|
5045
5053
|
onFocus: T,
|
|
5046
5054
|
onBlur: Y,
|
|
5047
5055
|
onKeyDown: F,
|
|
@@ -5050,13 +5058,13 @@ const Qn = ne.forwardRef(
|
|
|
5050
5058
|
"aria-describedby": w ? `${d}-error` : void 0
|
|
5051
5059
|
}
|
|
5052
5060
|
),
|
|
5053
|
-
|
|
5061
|
+
m && /* @__PURE__ */ e.jsx(
|
|
5054
5062
|
"label",
|
|
5055
5063
|
{
|
|
5056
5064
|
htmlFor: S,
|
|
5057
5065
|
onClick: L,
|
|
5058
5066
|
className: `input-field__input-container__label input-field__text-area__label ${N ? "input-field__input-container__label_filled" : ""}`,
|
|
5059
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children:
|
|
5067
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: m })
|
|
5060
5068
|
}
|
|
5061
5069
|
)
|
|
5062
5070
|
] }),
|
|
@@ -5075,7 +5083,7 @@ const Zr = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, o
|
|
|
5075
5083
|
n(h), a(!0);
|
|
5076
5084
|
}, [n]), u = k((h) => {
|
|
5077
5085
|
t(h), a(!1);
|
|
5078
|
-
}, [t]),
|
|
5086
|
+
}, [t]), m = k(() => {
|
|
5079
5087
|
a(!1), l();
|
|
5080
5088
|
}, []);
|
|
5081
5089
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -5094,7 +5102,7 @@ const Zr = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, o
|
|
|
5094
5102
|
/* @__PURE__ */ e.jsx("div", { className: "clock-input-container", children: c ? /* @__PURE__ */ e.jsx(Ur, { setMinutes: u }) : /* @__PURE__ */ e.jsx(Yr, { setHours: d }) }),
|
|
5095
5103
|
/* @__PURE__ */ e.jsxs("div", { className: "enter-time-action", children: [
|
|
5096
5104
|
/* @__PURE__ */ e.jsx("div", { className: "enter-time-icon", onClick: () => r(), children: /* @__PURE__ */ e.jsx(Rn, {}) }),
|
|
5097
|
-
/* @__PURE__ */ e.jsx(ce, { className: "little", onClick:
|
|
5105
|
+
/* @__PURE__ */ e.jsx(ce, { className: "little", onClick: m, children: "Cancel" }),
|
|
5098
5106
|
/* @__PURE__ */ e.jsx(ce, { className: "little", onClick: o, children: "OK" })
|
|
5099
5107
|
] })
|
|
5100
5108
|
] });
|
|
@@ -5203,12 +5211,12 @@ const Xr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5203
5211
|
disabled: a = !1,
|
|
5204
5212
|
errorText: d,
|
|
5205
5213
|
helperText: u,
|
|
5206
|
-
ariaLabel:
|
|
5214
|
+
ariaLabel: m,
|
|
5207
5215
|
size: h = "medium",
|
|
5208
|
-
ariaLabelledby:
|
|
5209
|
-
placeholder:
|
|
5216
|
+
ariaLabelledby: x,
|
|
5217
|
+
placeholder: j,
|
|
5210
5218
|
onBlur: f,
|
|
5211
|
-
onFocus:
|
|
5219
|
+
onFocus: p,
|
|
5212
5220
|
style: C,
|
|
5213
5221
|
...b
|
|
5214
5222
|
}) => {
|
|
@@ -5222,14 +5230,14 @@ const Xr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5222
5230
|
}, S = () => {
|
|
5223
5231
|
a || F(!0);
|
|
5224
5232
|
}, L = (_) => {
|
|
5225
|
-
|
|
5233
|
+
p == null || p(_), A(!0);
|
|
5226
5234
|
}, T = (_) => {
|
|
5227
5235
|
f == null || f(_), A(!1), z(!!_.target.value);
|
|
5228
5236
|
};
|
|
5229
5237
|
O(() => {
|
|
5230
5238
|
z(!!s);
|
|
5231
5239
|
}, [s]);
|
|
5232
|
-
const Y = y && parseInt(y.split(":")[0]) || 0, q = y && parseInt(y.split(":")[1]) || 0,
|
|
5240
|
+
const Y = y && parseInt(y.split(":")[0]) || 0, q = y && parseInt(y.split(":")[1]) || 0, Z = oe(() => E && d ? /* @__PURE__ */ e.jsx(
|
|
5233
5241
|
U,
|
|
5234
5242
|
{
|
|
5235
5243
|
type: "small",
|
|
@@ -5275,7 +5283,7 @@ const Xr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5275
5283
|
children: /* @__PURE__ */ e.jsx(en, {})
|
|
5276
5284
|
}
|
|
5277
5285
|
),
|
|
5278
|
-
/* @__PURE__ */ e.jsxs("div", { "aria-label":
|
|
5286
|
+
/* @__PURE__ */ e.jsxs("div", { "aria-label": m, className: "input-field__input-container", onClick: S, children: [
|
|
5279
5287
|
/* @__PURE__ */ e.jsx(
|
|
5280
5288
|
"input",
|
|
5281
5289
|
{
|
|
@@ -5288,19 +5296,19 @@ const Xr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5288
5296
|
onBlur: T,
|
|
5289
5297
|
onFocus: L,
|
|
5290
5298
|
disabled: a,
|
|
5291
|
-
"aria-labelledby":
|
|
5299
|
+
"aria-labelledby": x,
|
|
5292
5300
|
"aria-invalid": E,
|
|
5293
5301
|
"aria-describedby": E && d ? `${r}-error` : u ? `${r}-helper` : void 0
|
|
5294
5302
|
}
|
|
5295
5303
|
),
|
|
5296
|
-
|
|
5304
|
+
j && /* @__PURE__ */ e.jsx(
|
|
5297
5305
|
"label",
|
|
5298
5306
|
{
|
|
5299
5307
|
htmlFor: D,
|
|
5300
5308
|
className: `input-field__input-container__label
|
|
5301
5309
|
${w ? "input-field__input-container__label_filled" : ""}
|
|
5302
5310
|
`,
|
|
5303
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children:
|
|
5311
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: j })
|
|
5304
5312
|
}
|
|
5305
5313
|
),
|
|
5306
5314
|
/* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__text-field-line" })
|
|
@@ -5308,7 +5316,7 @@ const Xr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5308
5316
|
]
|
|
5309
5317
|
}
|
|
5310
5318
|
),
|
|
5311
|
-
|
|
5319
|
+
Z,
|
|
5312
5320
|
M && /* @__PURE__ */ e.jsx(_e, { container: c, children: /* @__PURE__ */ e.jsx(
|
|
5313
5321
|
Kr,
|
|
5314
5322
|
{
|
|
@@ -5324,22 +5332,22 @@ function Qr(n, t, r, s, i) {
|
|
|
5324
5332
|
return s + (i - s) * ((n - t) / (r - t));
|
|
5325
5333
|
}
|
|
5326
5334
|
const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
5327
|
-
const [r, s] = g(0), [i, l] = g(!1), o =
|
|
5335
|
+
const [r, s] = g(0), [i, l] = g(!1), o = G(null), c = G(null);
|
|
5328
5336
|
O(() => {
|
|
5329
5337
|
t.value ? s(t.value) : s(0);
|
|
5330
5338
|
}, [t.value]);
|
|
5331
5339
|
const a = (h) => {
|
|
5332
5340
|
s(Number(h.target.value)), t.onChange && t.onChange(h);
|
|
5333
|
-
}, d = (h,
|
|
5341
|
+
}, d = (h, x, j) => {
|
|
5334
5342
|
if (o.current && c.current) {
|
|
5335
5343
|
let f = Ye(c.current);
|
|
5336
5344
|
if (f)
|
|
5337
|
-
return Qr(h,
|
|
5345
|
+
return Qr(h, x, j, 0, j - x) * (f.width - 20) / (j - x);
|
|
5338
5346
|
}
|
|
5339
5347
|
return 0;
|
|
5340
5348
|
}, u = k((h) => {
|
|
5341
5349
|
l(!0), t.onFocus && t.onFocus(h);
|
|
5342
|
-
}, [t.onFocus]),
|
|
5350
|
+
}, [t.onFocus]), m = k((h) => {
|
|
5343
5351
|
l(!1), t.onBlur && t.onBlur(h);
|
|
5344
5352
|
}, [t.onBlur]);
|
|
5345
5353
|
return /* @__PURE__ */ e.jsx("div", { className: `range ${t.disabled ? "disabled" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "field", style: t.style, children: [
|
|
@@ -5349,7 +5357,7 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5349
5357
|
/* @__PURE__ */ e.jsx("span", { className: "slider-tooltip-container" }),
|
|
5350
5358
|
/* @__PURE__ */ e.jsx("span", { className: "slider-tooltip-value", children: r })
|
|
5351
5359
|
] }) }) }),
|
|
5352
|
-
/* @__PURE__ */ e.jsx("input", { disabled: t.disabled, onMouseUp: t.onMouseUp, ref: c, step: t.step, type: "range", min: t.min ?? Ke, max: t.max ?? qe, onChange: a, value: r, onFocus: u, onBlur:
|
|
5360
|
+
/* @__PURE__ */ e.jsx("input", { disabled: t.disabled, onMouseUp: t.onMouseUp, ref: c, step: t.step, type: "range", min: t.min ?? Ke, max: t.max ?? qe, onChange: a, value: r, onFocus: u, onBlur: m })
|
|
5353
5361
|
] }),
|
|
5354
5362
|
t.showMinMax ? /* @__PURE__ */ e.jsx("div", { className: "value right", children: t.max ?? qe }) : null
|
|
5355
5363
|
] }) });
|
|
@@ -5358,9 +5366,9 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5358
5366
|
t ? /* @__PURE__ */ e.jsx("p", { children: t }) : null,
|
|
5359
5367
|
o ? /* @__PURE__ */ e.jsx(ye, { styleType: o.styleType ?? "filled", style: o.style, className: o.className, onClick: o.onClick, children: o.text }) : null
|
|
5360
5368
|
] }), es = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: l, onlyStringValue: o }) => {
|
|
5361
|
-
const [c, a] = g(""), [d, u] = g(""), [
|
|
5369
|
+
const [c, a] = g(""), [d, u] = g(""), [m, h] = g(!1), [x, j] = g(!0), f = k((y, v) => {
|
|
5362
5370
|
s({ ...r, [v]: y });
|
|
5363
|
-
}, [s, r]),
|
|
5371
|
+
}, [s, r]), p = k(() => {
|
|
5364
5372
|
u(""), a(""), h(!1);
|
|
5365
5373
|
}, []), C = k(() => {
|
|
5366
5374
|
let y = d;
|
|
@@ -5368,30 +5376,30 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5368
5376
|
o || (y = JSON.parse(y));
|
|
5369
5377
|
} catch {
|
|
5370
5378
|
}
|
|
5371
|
-
|
|
5372
|
-
}, [r, s, c, d,
|
|
5379
|
+
p(), s({ ...r, [c]: y });
|
|
5380
|
+
}, [r, s, c, d, p]), b = k((y) => {
|
|
5373
5381
|
let v = { ...r };
|
|
5374
5382
|
delete v[y], s(v);
|
|
5375
5383
|
}, [r, s]);
|
|
5376
5384
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5377
5385
|
/* @__PURE__ */ e.jsxs("div", { className: "json-line json-object-header", children: [
|
|
5378
|
-
/* @__PURE__ */ e.jsxs("span", { onClick: () =>
|
|
5386
|
+
/* @__PURE__ */ e.jsxs("span", { onClick: () => j((y) => !y), className: "json-element json-object-name json-object-header", children: [
|
|
5379
5387
|
t,
|
|
5380
5388
|
":",
|
|
5381
5389
|
"{",
|
|
5382
|
-
|
|
5390
|
+
x ? null : /* @__PURE__ */ e.jsx("span", { children: "..." })
|
|
5383
5391
|
] }),
|
|
5384
5392
|
n ? null : /* @__PURE__ */ e.jsx("span", { className: "json-element json-btn", onClick: () => h(!0), children: /* @__PURE__ */ e.jsx(rn, {}) })
|
|
5385
5393
|
] }),
|
|
5386
|
-
|
|
5394
|
+
x ? /* @__PURE__ */ e.jsx("div", { className: "json-object-content", children: r ? Object.keys(r).map(
|
|
5387
5395
|
(y, v) => /* @__PURE__ */ e.jsx("div", { className: "json-line", children: /* @__PURE__ */ e.jsx(ln, { readonly: n, onDelete: () => b(y), onChange: (M) => f(M, y), name: y, data: r[y] }) }, v)
|
|
5388
5396
|
) : null }) : null,
|
|
5389
|
-
|
|
5397
|
+
m && !n ? /* @__PURE__ */ e.jsxs("div", { className: "json-object-content", children: [
|
|
5390
5398
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: c.length || 10, placeholder: "key", onChange: (y) => a(y.target.value), className: "json-base-data-input", type: "text", value: c }) }),
|
|
5391
5399
|
":",
|
|
5392
5400
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: d.length || 10, placeholder: "value", onChange: (y) => u(y.target.value), className: "json-base-data-input", type: "text", value: d }) }),
|
|
5393
5401
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick: C, children: "save" }),
|
|
5394
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-cancel json-base-data-btn", onClick:
|
|
5402
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-cancel json-base-data-btn", onClick: p, children: "cancel" })
|
|
5395
5403
|
] }) : null,
|
|
5396
5404
|
/* @__PURE__ */ e.jsxs("div", { className: "json-line", children: [
|
|
5397
5405
|
"}",
|
|
@@ -5399,10 +5407,10 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5399
5407
|
] })
|
|
5400
5408
|
] }) });
|
|
5401
5409
|
}, ns = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: l, onlyStringValue: o }) => {
|
|
5402
|
-
const [c, a] = g(""), [d, u] = g(!1), [
|
|
5410
|
+
const [c, a] = g(""), [d, u] = g(!1), [m, h] = g(!0), x = k((C, b) => {
|
|
5403
5411
|
const y = r.slice();
|
|
5404
5412
|
y[b] = C, s(y);
|
|
5405
|
-
}, [s, r]),
|
|
5413
|
+
}, [s, r]), j = k(() => {
|
|
5406
5414
|
a(""), u(!1);
|
|
5407
5415
|
}, []), f = k(() => {
|
|
5408
5416
|
let C = c;
|
|
@@ -5410,8 +5418,8 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5410
5418
|
o || (C = JSON.parse(C));
|
|
5411
5419
|
} catch {
|
|
5412
5420
|
}
|
|
5413
|
-
|
|
5414
|
-
}, [r, s, c,
|
|
5421
|
+
j(), s([...r, C]);
|
|
5422
|
+
}, [r, s, c, j]), p = k((C) => {
|
|
5415
5423
|
s(r.filter((b, y) => y !== C));
|
|
5416
5424
|
}, [r, s]);
|
|
5417
5425
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
@@ -5420,15 +5428,15 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5420
5428
|
t,
|
|
5421
5429
|
":",
|
|
5422
5430
|
"[",
|
|
5423
|
-
|
|
5431
|
+
m ? null : /* @__PURE__ */ e.jsx("span", { children: "..." })
|
|
5424
5432
|
] }),
|
|
5425
5433
|
n ? null : /* @__PURE__ */ e.jsx("span", { className: "json-element json-btn", onClick: () => u(!0), children: /* @__PURE__ */ e.jsx(rn, {}) })
|
|
5426
5434
|
] }),
|
|
5427
|
-
|
|
5435
|
+
m ? /* @__PURE__ */ e.jsx("div", { className: "json-object-content", children: r && r.map((C, b) => /* @__PURE__ */ e.jsx("div", { className: "json-line", children: /* @__PURE__ */ e.jsx(ln, { readonly: n, onDelete: () => p(b), onChange: (y) => x(y, b), name: String(b), data: C }) }, b)) }) : null,
|
|
5428
5436
|
d ? /* @__PURE__ */ e.jsxs("div", { className: "json-object-content", children: [
|
|
5429
5437
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: c.length || 10, placeholder: "value", onChange: (C) => a(C.target.value), className: "json-base-data-input", type: "text", value: c }) }),
|
|
5430
5438
|
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick: f, children: "save" }),
|
|
5431
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-cancel json-base-data-btn", onClick:
|
|
5439
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-cancel json-base-data-btn", onClick: j, children: "cancel" })
|
|
5432
5440
|
] }) : null,
|
|
5433
5441
|
/* @__PURE__ */ e.jsxs("div", { className: "json-line", children: [
|
|
5434
5442
|
"]",
|
|
@@ -5450,46 +5458,46 @@ const Ke = 0, qe = 100, Xs = ({ showValue: n = !0, ...t }) => {
|
|
|
5450
5458
|
};
|
|
5451
5459
|
var et = /* @__PURE__ */ ((n) => (n.NONE = "NONE", n.ARRAY = "ARRAY", n.OBJECT = "OBJECT", n))(et || {});
|
|
5452
5460
|
const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: l, onlyStringValue: o }) => typeof r == "boolean" || typeof r == "number" || typeof r == "string" ? /* @__PURE__ */ e.jsx(ts, { readonly: n, onDelete: i, onChange: s, data: r, name: t }) : r ? Array.isArray(r) ? /* @__PURE__ */ e.jsx(ns, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: l === "ARRAY", onlyStringValue: o }) : /* @__PURE__ */ e.jsx(es, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: l === "OBJECT", onlyStringValue: o }) : null, qs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: l = et.NONE, onlyStringValue: o }) => {
|
|
5453
|
-
const [c, a] = g(r || void 0), [d, u] = g(""),
|
|
5454
|
-
n || (a(
|
|
5461
|
+
const [c, a] = g(r || void 0), [d, u] = g(""), m = k((j) => {
|
|
5462
|
+
n || (a(j), s && s(j));
|
|
5455
5463
|
}, [s]), h = k(() => {
|
|
5456
5464
|
n || (a(void 0), i && i());
|
|
5457
|
-
}, [i]),
|
|
5465
|
+
}, [i]), x = k(() => {
|
|
5458
5466
|
if (n)
|
|
5459
5467
|
return;
|
|
5460
|
-
let
|
|
5468
|
+
let j = d;
|
|
5461
5469
|
try {
|
|
5462
|
-
|
|
5470
|
+
j = JSON.parse(j);
|
|
5463
5471
|
} catch {
|
|
5464
5472
|
}
|
|
5465
|
-
a(
|
|
5473
|
+
a(j), s && s(j);
|
|
5466
5474
|
}, [s, d]);
|
|
5467
5475
|
return O(() => {
|
|
5468
5476
|
a(r);
|
|
5469
5477
|
}, [r]), !c && n ? /* @__PURE__ */ e.jsx("div", { className: `json-object-content ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: "value" }) }) : c ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
5470
5478
|
/* @__PURE__ */ e.jsx(cn, { transparent: !0, text: JSON.stringify(r) }),
|
|
5471
|
-
/* @__PURE__ */ e.jsx(ln, { readonly: n, onDelete: h, onChange:
|
|
5479
|
+
/* @__PURE__ */ e.jsx(ln, { readonly: n, onDelete: h, onChange: m, data: c, baseType: l, name: t, onlyStringValue: o })
|
|
5472
5480
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: `json-object-content ${n ? "" : "changeable"}`, children: [
|
|
5473
5481
|
/* @__PURE__ */ e.jsx(cn, { transparent: !0, text: JSON.stringify(r) }),
|
|
5474
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: d.length || 10, placeholder: "value", onChange: (
|
|
5475
|
-
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick:
|
|
5482
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data border", children: /* @__PURE__ */ e.jsx("input", { size: d.length || 10, placeholder: "value", onChange: (j) => u(j.target.value), className: "alex-evo-sh-ui-kit-json json-base-data-input", type: "text", value: d }) }),
|
|
5483
|
+
/* @__PURE__ */ e.jsx("span", { className: "json-base-data-btn-save json-base-data-btn", onClick: x, children: "save" })
|
|
5476
5484
|
] });
|
|
5477
5485
|
}, Js = ({ btn: n, btnComponent: t, onSearch: r, placeholder: s, autoChenge: i, border: l = !1 }) => {
|
|
5478
|
-
const o =
|
|
5486
|
+
const o = G(null), [c, a] = g(""), [d, u] = g(!1), m = () => {
|
|
5479
5487
|
o.current && (o.current.focus(), u(!0));
|
|
5480
5488
|
}, h = () => {
|
|
5481
5489
|
o.current && (o.current.focus(), o.current.value = ""), a(""), u(!0), i && r("");
|
|
5482
|
-
},
|
|
5490
|
+
}, x = () => {
|
|
5483
5491
|
h(), o.current && (o.current.blur(), u(!1));
|
|
5484
|
-
},
|
|
5485
|
-
a(
|
|
5486
|
-
}, f = (
|
|
5487
|
-
|
|
5492
|
+
}, j = (p) => {
|
|
5493
|
+
a(p.target.value), i && r(p.target.value);
|
|
5494
|
+
}, f = (p) => {
|
|
5495
|
+
p.code === "Enter" && r(c);
|
|
5488
5496
|
};
|
|
5489
5497
|
return /* @__PURE__ */ e.jsx("div", { className: `search-container ${l ? "border" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "search-field", children: [
|
|
5490
|
-
d ? /* @__PURE__ */ e.jsx("span", { onClick:
|
|
5491
|
-
/* @__PURE__ */ e.jsx("input", { placeholder: s, type: "text", ref: o, onChange:
|
|
5492
|
-
d ? /* @__PURE__ */ e.jsx("span", { onClick: h, children: /* @__PURE__ */ e.jsx(ue, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick:
|
|
5498
|
+
d ? /* @__PURE__ */ e.jsx("span", { onClick: x, children: /* @__PURE__ */ e.jsx(nn, {}) }) : n ? /* @__PURE__ */ e.jsx("span", { onClick: n.onClick, children: n.icon }) : t || null,
|
|
5499
|
+
/* @__PURE__ */ e.jsx("input", { placeholder: s, type: "text", ref: o, onChange: j, onKeyDown: f, value: c, onFocus: () => u(!0) }),
|
|
5500
|
+
d ? /* @__PURE__ */ e.jsx("span", { onClick: h, children: /* @__PURE__ */ e.jsx(ue, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: m, children: /* @__PURE__ */ e.jsx(tn, {}) })
|
|
5493
5501
|
] }) });
|
|
5494
5502
|
}, rs = ({
|
|
5495
5503
|
filters: n,
|
|
@@ -5499,7 +5507,7 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5499
5507
|
onClose: i,
|
|
5500
5508
|
point: l = { x: 50, y: 50 }
|
|
5501
5509
|
}) => {
|
|
5502
|
-
const o =
|
|
5510
|
+
const o = G(null);
|
|
5503
5511
|
if (O(() => {
|
|
5504
5512
|
const d = (u) => {
|
|
5505
5513
|
s && o.current && !o.current.contains(u.target) && i();
|
|
@@ -5507,7 +5515,7 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5507
5515
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
5508
5516
|
}, [s, i]), !s) return null;
|
|
5509
5517
|
const c = (d, u) => {
|
|
5510
|
-
const
|
|
5518
|
+
const m = t[d] || [], h = m.includes(u) ? m.filter((x) => x !== u) : [...m, u];
|
|
5511
5519
|
r({
|
|
5512
5520
|
...t,
|
|
5513
5521
|
[d]: h
|
|
@@ -5517,8 +5525,8 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5517
5525
|
left: `${l.x}px`,
|
|
5518
5526
|
zIndex: 1e3
|
|
5519
5527
|
};
|
|
5520
|
-
return /* @__PURE__ */ e.jsx(We, { onHide: i, children: /* @__PURE__ */ e.jsx(pr, { className: "multi-filter", style: a, children: /* @__PURE__ */ e.jsx("div", { ref: o, children: n.map(({ name: d, options: u },
|
|
5521
|
-
|
|
5528
|
+
return /* @__PURE__ */ e.jsx(We, { onHide: i, children: /* @__PURE__ */ e.jsx(pr, { className: "multi-filter", style: a, children: /* @__PURE__ */ e.jsx("div", { ref: o, children: n.map(({ name: d, options: u }, m) => /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 16 }, children: [
|
|
5529
|
+
m !== 0 && /* @__PURE__ */ e.jsx(se, {}),
|
|
5522
5530
|
/* @__PURE__ */ e.jsx(U, { type: "title-2", weight: "bold", children: d }),
|
|
5523
5531
|
/* @__PURE__ */ e.jsx("div", { className: "filter-block", children: u.map((h) => /* @__PURE__ */ e.jsxs("label", { className: "filter-field", children: [
|
|
5524
5532
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5541,19 +5549,19 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5541
5549
|
onChangeFilter: l,
|
|
5542
5550
|
border: o = !1
|
|
5543
5551
|
}) => {
|
|
5544
|
-
const c =
|
|
5545
|
-
c.current && (c.current.focus(),
|
|
5552
|
+
const c = G(null), [a, d] = g(""), [u, m] = g(!1), [h, x] = g(null), j = () => {
|
|
5553
|
+
c.current && (c.current.focus(), m(!0));
|
|
5546
5554
|
}, f = () => {
|
|
5547
|
-
c.current && (c.current.focus(), c.current.value = ""), d(""),
|
|
5548
|
-
},
|
|
5549
|
-
f(), c.current && (c.current.blur(),
|
|
5555
|
+
c.current && (c.current.focus(), c.current.value = ""), d(""), m(!0), r && n("");
|
|
5556
|
+
}, p = () => {
|
|
5557
|
+
f(), c.current && (c.current.blur(), m(!1));
|
|
5550
5558
|
}, C = (v) => {
|
|
5551
5559
|
d(v.target.value), r && n(v.target.value);
|
|
5552
5560
|
}, b = (v) => {
|
|
5553
5561
|
v.code === "Enter" && n(a);
|
|
5554
5562
|
}, y = (v) => {
|
|
5555
5563
|
const M = v.currentTarget.getBoundingClientRect();
|
|
5556
|
-
|
|
5564
|
+
x({
|
|
5557
5565
|
x: M.left,
|
|
5558
5566
|
y: M.bottom
|
|
5559
5567
|
// ниже элемента
|
|
@@ -5561,11 +5569,11 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5561
5569
|
};
|
|
5562
5570
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
5563
5571
|
/* @__PURE__ */ e.jsx("div", { className: `search-container ${o ? "border" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "search-field", children: [
|
|
5564
|
-
u ? /* @__PURE__ */ e.jsx("span", { onClick:
|
|
5565
|
-
/* @__PURE__ */ e.jsx("input", { placeholder: t, type: "text", ref: c, onChange: C, onKeyDown: b, value: a, onFocus: () =>
|
|
5566
|
-
u ? /* @__PURE__ */ e.jsx("span", { onClick: f, children: /* @__PURE__ */ e.jsx(ue, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick:
|
|
5572
|
+
u ? /* @__PURE__ */ e.jsx("span", { onClick: p, children: /* @__PURE__ */ e.jsx(nn, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: y, children: /* @__PURE__ */ e.jsx(On, {}) }),
|
|
5573
|
+
/* @__PURE__ */ e.jsx("input", { placeholder: t, type: "text", ref: c, onChange: C, onKeyDown: b, value: a, onFocus: () => m(!0) }),
|
|
5574
|
+
u ? /* @__PURE__ */ e.jsx("span", { onClick: f, children: /* @__PURE__ */ e.jsx(ue, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: j, children: /* @__PURE__ */ e.jsx(tn, {}) })
|
|
5567
5575
|
] }) }),
|
|
5568
|
-
/* @__PURE__ */ e.jsx(_e, { container: document.body, children: /* @__PURE__ */ e.jsx(rs, { point: h ?? void 0, onClose: () =>
|
|
5576
|
+
/* @__PURE__ */ e.jsx(_e, { container: document.body, children: /* @__PURE__ */ e.jsx(rs, { point: h ?? void 0, onClose: () => x(null), isOpen: !!h, filters: s, selectedFilters: i, onChange: l }) })
|
|
5569
5577
|
] });
|
|
5570
5578
|
}, ss = ({ visible: n, text: t, option: r }) => {
|
|
5571
5579
|
const [s, i] = g(n), [l, o] = g(!1);
|
|
@@ -5604,15 +5612,15 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5604
5612
|
onContextMenu: a,
|
|
5605
5613
|
...d
|
|
5606
5614
|
}) => {
|
|
5607
|
-
const u =
|
|
5615
|
+
const u = G(null), m = G(null), [h, x] = g(!1), j = n === "heading" || n === "title" || n === "title-2", f = j ? "h3" : "span", p = {
|
|
5608
5616
|
fontSize: bn(n, t),
|
|
5609
5617
|
fontWeight: kn(n, r),
|
|
5610
5618
|
lineHeight: yn(n, s, t),
|
|
5611
5619
|
...o
|
|
5612
|
-
}, C =
|
|
5613
|
-
if (!u.current || !
|
|
5614
|
-
const y = u.current.clientWidth, v =
|
|
5615
|
-
|
|
5620
|
+
}, C = j ? "typography-heading" : "typography-text", b = k(() => {
|
|
5621
|
+
if (!u.current || !m.current) return;
|
|
5622
|
+
const y = u.current.clientWidth, v = m.current.scrollWidth;
|
|
5623
|
+
x(y < v);
|
|
5616
5624
|
}, [l]);
|
|
5617
5625
|
return O(() => (b(), window.addEventListener("resize", b), () => {
|
|
5618
5626
|
window.removeEventListener("resize", b);
|
|
@@ -5628,7 +5636,7 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5628
5636
|
f,
|
|
5629
5637
|
{
|
|
5630
5638
|
...d,
|
|
5631
|
-
style:
|
|
5639
|
+
style: p,
|
|
5632
5640
|
className: `${C} ${i}`,
|
|
5633
5641
|
children: h ? `| ${l} | ${l}` : l
|
|
5634
5642
|
}
|
|
@@ -5638,13 +5646,13 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5638
5646
|
/* @__PURE__ */ e.jsx(
|
|
5639
5647
|
"div",
|
|
5640
5648
|
{
|
|
5641
|
-
ref:
|
|
5649
|
+
ref: m,
|
|
5642
5650
|
style: {
|
|
5643
5651
|
position: "absolute",
|
|
5644
5652
|
visibility: "hidden",
|
|
5645
5653
|
height: "auto",
|
|
5646
5654
|
whiteSpace: "nowrap",
|
|
5647
|
-
...
|
|
5655
|
+
...p
|
|
5648
5656
|
},
|
|
5649
5657
|
className: `${C} ${i}`,
|
|
5650
5658
|
children: l
|
|
@@ -5672,12 +5680,12 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5672
5680
|
border: a,
|
|
5673
5681
|
name: d,
|
|
5674
5682
|
error: u,
|
|
5675
|
-
onBlur:
|
|
5683
|
+
onBlur: m,
|
|
5676
5684
|
onFocus: h,
|
|
5677
|
-
container:
|
|
5678
|
-
size:
|
|
5685
|
+
container: x = document.body,
|
|
5686
|
+
size: j = "medium",
|
|
5679
5687
|
transparent: f,
|
|
5680
|
-
helperText:
|
|
5688
|
+
helperText: p,
|
|
5681
5689
|
errorText: C,
|
|
5682
5690
|
disabled: b
|
|
5683
5691
|
}, y) => {
|
|
@@ -5701,7 +5709,7 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5701
5709
|
/* @__PURE__ */ e.jsx("div", { ref: y, style: t, className: `
|
|
5702
5710
|
input-field
|
|
5703
5711
|
input-field__text-field
|
|
5704
|
-
${I[
|
|
5712
|
+
${I[j]}
|
|
5705
5713
|
${a ? "input-field_border" : ""}
|
|
5706
5714
|
${A ? "input-field_active" : ""}
|
|
5707
5715
|
${f ? "input-field_transparent" : ""}
|
|
@@ -5719,15 +5727,15 @@ const ln = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5719
5727
|
name: d,
|
|
5720
5728
|
value: v,
|
|
5721
5729
|
onFocus: h,
|
|
5722
|
-
onBlur:
|
|
5730
|
+
onBlur: m,
|
|
5723
5731
|
readOnly: !0
|
|
5724
5732
|
}
|
|
5725
5733
|
),
|
|
5726
5734
|
/* @__PURE__ */ e.jsx("label", { className: "input-field__input-container__label", children: o ? /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: o }) : null })
|
|
5727
5735
|
] }) }),
|
|
5728
5736
|
z && C && /* @__PURE__ */ e.jsx(U, { type: "small", className: "input-field-container__error-text", children: C }),
|
|
5729
|
-
|
|
5730
|
-
/* @__PURE__ */ e.jsx(Pn, { marginBottom: r === ee.MOBILE ? 80 : 0, width: F.width, screensize: r, x: F.x, y: F.y, onHide: () => w(!1), container:
|
|
5737
|
+
p && !z && /* @__PURE__ */ e.jsx(U, { type: "small", className: "input-field-container__helper-text", children: p }),
|
|
5738
|
+
/* @__PURE__ */ e.jsx(Pn, { marginBottom: r === ee.MOBILE ? 80 : 0, width: F.width, screensize: r, x: F.x, y: F.y, onHide: () => w(!1), container: x, blocks: [{ items: s.map(E) }], visible: A })
|
|
5731
5739
|
] });
|
|
5732
5740
|
}
|
|
5733
5741
|
);
|
|
@@ -5825,7 +5833,7 @@ const as = {
|
|
|
5825
5833
|
}
|
|
5826
5834
|
}, os = Pe(as), ri = ({ children: n }) => {
|
|
5827
5835
|
var o;
|
|
5828
|
-
const [t, r] = g({ visible: !1, text: "" }), s =
|
|
5836
|
+
const [t, r] = g({ visible: !1, text: "" }), s = G(null), i = k((c, a) => {
|
|
5829
5837
|
r({ visible: !0, text: c, option: a }), s.current && clearTimeout(s.current), a != null && a.closeButton || (s.current = setTimeout(() => l(), (a == null ? void 0 : a.delay) ?? 3e3));
|
|
5830
5838
|
}, []), l = k(() => {
|
|
5831
5839
|
s.current && (clearTimeout(s.current), s.current = null), r({ visible: !1, text: "" });
|
|
@@ -5875,10 +5883,10 @@ const fe = (n) => {
|
|
|
5875
5883
|
error: c(),
|
|
5876
5884
|
change: i
|
|
5877
5885
|
};
|
|
5878
|
-
},
|
|
5886
|
+
}, xs = (n) => {
|
|
5879
5887
|
const { value: t, change: r, error: s } = fe(n.name);
|
|
5880
5888
|
return /* @__PURE__ */ e.jsx(Gr, { ...n, onChange: r, value: String(t), errorText: s, error: !!s });
|
|
5881
|
-
},
|
|
5889
|
+
}, ms = (n) => {
|
|
5882
5890
|
const { value: t, change: r, error: s } = fe(n.name);
|
|
5883
5891
|
return /* @__PURE__ */ e.jsx(Jn, { ...n, value: Number(t), onChange: r, errorText: s, error: !!s });
|
|
5884
5892
|
}, fs = (n) => {
|
|
@@ -5960,31 +5968,31 @@ const fe = (n) => {
|
|
|
5960
5968
|
);
|
|
5961
5969
|
}, bs = ve(
|
|
5962
5970
|
function({ children: t, value: r, name: s, errors: i, onFinish: l, onChangeValue: o, ...c }, a) {
|
|
5963
|
-
const [d, u] = g(r),
|
|
5964
|
-
|
|
5965
|
-
}, [l, d]), h = k((
|
|
5971
|
+
const [d, u] = g(r), m = k((x) => {
|
|
5972
|
+
x.preventDefault(), l == null || l(d);
|
|
5973
|
+
}, [l, d]), h = k((x, j) => {
|
|
5966
5974
|
u((f) => ({
|
|
5967
5975
|
...f,
|
|
5968
|
-
[
|
|
5969
|
-
})), o == null || o(
|
|
5976
|
+
[x]: j
|
|
5977
|
+
})), o == null || o(x, j);
|
|
5970
5978
|
}, [o]);
|
|
5971
5979
|
return ht(a, () => ({
|
|
5972
5980
|
submit: () => l == null ? void 0 : l(d),
|
|
5973
|
-
setFieldValue: (
|
|
5974
|
-
u((f) => ({ ...f, [
|
|
5981
|
+
setFieldValue: (x, j) => {
|
|
5982
|
+
u((f) => ({ ...f, [x]: j }));
|
|
5975
5983
|
},
|
|
5976
|
-
setValues: (
|
|
5984
|
+
setValues: (x) => u(x),
|
|
5977
5985
|
getValues: () => d,
|
|
5978
5986
|
reset: () => u(r)
|
|
5979
|
-
}), [l, d, r]), /* @__PURE__ */ e.jsx(rt.Provider, { value: { value: d, changeField: h, errors: i }, children: /* @__PURE__ */ e.jsx("form", { name: s, onSubmit:
|
|
5987
|
+
}), [l, d, r]), /* @__PURE__ */ e.jsx(rt.Provider, { value: { value: d, changeField: h, errors: i }, children: /* @__PURE__ */ e.jsx("form", { name: s, onSubmit: m, noValidate: !0, ...c, children: t }) });
|
|
5980
5988
|
}
|
|
5981
5989
|
), si = Object.assign(bs, {
|
|
5982
5990
|
TextInput: _s,
|
|
5983
|
-
NumberInput:
|
|
5991
|
+
NumberInput: ms,
|
|
5984
5992
|
SelectInput: fs,
|
|
5985
5993
|
SwitchField: js,
|
|
5986
5994
|
SwitchButtonField: ps,
|
|
5987
|
-
MoreTextField:
|
|
5995
|
+
MoreTextField: xs,
|
|
5988
5996
|
TextArea: Cs,
|
|
5989
5997
|
DateField: vs,
|
|
5990
5998
|
TimeField: gs
|
|
@@ -6005,7 +6013,7 @@ export {
|
|
|
6005
6013
|
vn as BottomSheetsUi,
|
|
6006
6014
|
ye as Button,
|
|
6007
6015
|
Sn as Calendar,
|
|
6008
|
-
|
|
6016
|
+
mr as Card,
|
|
6009
6017
|
pe as Check,
|
|
6010
6018
|
Bn as Checkbox,
|
|
6011
6019
|
Ie as ChevronDown,
|