alex-evo-sh-ui-kit 1.1.102 → 1.1.104
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import te, { useEffect as V, useState as b, useRef as Y, useCallback as
|
|
1
|
+
import te, { useEffect as V, useState as b, useRef as Y, useCallback as k, createContext as Be, forwardRef as fe, useContext as je, useMemo as oe, useLayoutEffect as ct, useId as We, memo as ot, useImperativeHandle as dt } from "react";
|
|
2
2
|
import ut from "react-dom";
|
|
3
3
|
import { NavLink as en } from "react-router-dom";
|
|
4
4
|
import './index.css';var Qe = { exports: {} }, Se = {};
|
|
@@ -128,7 +128,7 @@ function xt() {
|
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
130
|
function a(C) {
|
|
131
|
-
if (
|
|
131
|
+
if (y.call(C, "key")) {
|
|
132
132
|
var L = Object.getOwnPropertyDescriptor(C, "key").get;
|
|
133
133
|
if (L && L.isReactWarning) return !1;
|
|
134
134
|
}
|
|
@@ -198,7 +198,7 @@ function xt() {
|
|
|
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
200
|
else m(J);
|
|
201
|
-
if (
|
|
201
|
+
if (y.call(L, "key")) {
|
|
202
202
|
J = n(C);
|
|
203
203
|
var le = Object.keys(L).filter(function(Z) {
|
|
204
204
|
return Z !== "key";
|
|
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
function h(C) {
|
|
240
240
|
return typeof C == "object" && C !== null && C.$$typeof === f;
|
|
241
241
|
}
|
|
242
|
-
var x = te, f = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), A = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
242
|
+
var x = te, f = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), A = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, D = Array.isArray, M = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
x = {
|
|
@@ -315,7 +315,7 @@ const Cn = (n) => /* @__PURE__ */ e.jsx(
|
|
|
315
315
|
large: "btn--large"
|
|
316
316
|
};
|
|
317
317
|
return /* @__PURE__ */ e.jsx("button", { ...t, className: (t.className ?? "") + " btn " + s[n], onClick: r, children: /* @__PURE__ */ e.jsx("span", { children: t.children }) });
|
|
318
|
-
},
|
|
318
|
+
}, Ne = ({ styleType: n = "base", ...t }) => n === "outline" ? /* @__PURE__ */ e.jsx(Cn, { ...t }) : n === "text" ? /* @__PURE__ */ e.jsx(de, { ...t }) : n === "filledTotal" ? /* @__PURE__ */ e.jsx(mt, { ...t }) : n === "filled" ? /* @__PURE__ */ e.jsx(ft, { ...t }) : /* @__PURE__ */ e.jsx(Fe, { ...t }), vn = (n, t) => {
|
|
319
319
|
V(() => {
|
|
320
320
|
if (n) {
|
|
321
321
|
const r = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -349,7 +349,7 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
349
349
|
}
|
|
350
350
|
);
|
|
351
351
|
}, gn = ({ bottom: n = 0, ...t }) => {
|
|
352
|
-
const [r, s] = b(!1), [i, l] = b(!0), a = Y(null), o =
|
|
352
|
+
const [r, s] = b(!1), [i, l] = b(!0), a = Y(null), o = k(() => {
|
|
353
353
|
s(!0), setTimeout(() => {
|
|
354
354
|
t.onHide(), s(!1), l(!0);
|
|
355
355
|
}, 200);
|
|
@@ -359,7 +359,7 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
359
359
|
}, [t.visible]), V(() => {
|
|
360
360
|
!t.visible && !i && o();
|
|
361
361
|
}, [t.visible, o, i]);
|
|
362
|
-
const c =
|
|
362
|
+
const c = k((h) => {
|
|
363
363
|
window.innerHeight - h.changedTouches[0].clientY <= 150 && o(), a.current && (a.current.style.height = `${window.innerHeight - h.changedTouches[0].clientY + 20 - n}px`);
|
|
364
364
|
}, [o]), d = (h) => {
|
|
365
365
|
window.innerHeight - h.clientY + 20 <= 150 && o(), a.current && (a.current.style.height = `${window.innerHeight - h.clientY + 20 - n}px`);
|
|
@@ -378,16 +378,16 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
378
378
|
[ee.MOBILE]: "small-screen",
|
|
379
379
|
[ee.STANDART]: "standart-screen",
|
|
380
380
|
[ee.BIG_SCREEN]: "big-screen"
|
|
381
|
-
}, jt = (n, t = ee.STANDART) => `var(--${n}-${bn[t]})`, pt = (n, t = "standart") => `var(--${n}-${t})`, _t = (n, t = "normal", r = ee.STANDART) => `var(--${n}-heights-${bn[r]}-${t})`,
|
|
381
|
+
}, jt = (n, t = ee.STANDART) => `var(--${n}-${bn[t]})`, pt = (n, t = "standart") => `var(--${n}-${t})`, _t = (n, t = "normal", r = ee.STANDART) => `var(--${n}-heights-${bn[r]}-${t})`, be = {
|
|
382
382
|
mobileSize: 720,
|
|
383
383
|
bigSize: 1400
|
|
384
384
|
}, Ct = (n = {}) => {
|
|
385
385
|
const t = {
|
|
386
|
-
bigSize: n.bigSize ??
|
|
387
|
-
mobileSize: n.mobileSize ??
|
|
386
|
+
bigSize: n.bigSize ?? be.bigSize,
|
|
387
|
+
mobileSize: n.mobileSize ?? be.mobileSize
|
|
388
388
|
};
|
|
389
|
-
t.bigSize <= 100 && (console.error("useScreenSize: invalid option"), t.bigSize =
|
|
390
|
-
const [r, s] = b(ee.STANDART), i =
|
|
389
|
+
t.bigSize <= 100 && (console.error("useScreenSize: invalid option"), t.bigSize = be.bigSize), t.mobileSize <= 100 && (console.error("useScreenSize: invalid option"), t.mobileSize = be.mobileSize), t.mobileSize >= t.bigSize && (console.error("useScreenSize: invalid option"), t.mobileSize = be.mobileSize, t.bigSize = be.bigSize);
|
|
390
|
+
const [r, s] = b(ee.STANDART), i = k(() => {
|
|
391
391
|
window.innerWidth < t.mobileSize ? s(ee.MOBILE) : window.innerWidth < t.bigSize ? s(ee.STANDART) : s(ee.BIG_SCREEN);
|
|
392
392
|
}, [window.innerWidth]);
|
|
393
393
|
return V(() => {
|
|
@@ -397,9 +397,9 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
397
397
|
}), [i]), { screen: r };
|
|
398
398
|
}, vt = {
|
|
399
399
|
screen: ee.STANDART
|
|
400
|
-
},
|
|
400
|
+
}, ge = Be(vt), Ss = ({ children: n, option: t }) => {
|
|
401
401
|
const r = Ct(t);
|
|
402
|
-
return /* @__PURE__ */ e.jsx(
|
|
402
|
+
return /* @__PURE__ */ e.jsx(ge.Provider, { value: r, children: n });
|
|
403
403
|
}, K = fe(({
|
|
404
404
|
type: n,
|
|
405
405
|
screensize: t = ee.STANDART,
|
|
@@ -410,7 +410,7 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
410
410
|
className: a = "",
|
|
411
411
|
...o
|
|
412
412
|
}, c) => {
|
|
413
|
-
const d =
|
|
413
|
+
const d = je(ge), u = d ? d.screen : t, m = n === "heading" || n === "title" || n === "title-2", h = m ? "h3" : "span", x = {
|
|
414
414
|
fontSize: jt(n, u),
|
|
415
415
|
fontWeight: pt(n, r),
|
|
416
416
|
lineHeight: _t(n, s, u),
|
|
@@ -441,7 +441,7 @@ const Ge = ({ children: n, onHide: t, disableBackplate: r }) => {
|
|
|
441
441
|
shadow: u = 0,
|
|
442
442
|
...m
|
|
443
443
|
}, h) => {
|
|
444
|
-
const x =
|
|
444
|
+
const x = k(
|
|
445
445
|
(j) => {
|
|
446
446
|
o || (l == null || l(j), !d && f(j));
|
|
447
447
|
},
|
|
@@ -497,7 +497,7 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
497
497
|
/* @__PURE__ */ e.jsx("rect", { id: "Rectangle", fillRule: "nonzero", x: "0", y: "0", width: "24", height: "24" }),
|
|
498
498
|
/* @__PURE__ */ e.jsx("line", { x1: "16.9999", y1: "7", x2: "7.00001", y2: "16.9999", id: "Path", stroke: "var(--On-surface-color)", strokeWidth: "2", strokeLinecap: "round" }),
|
|
499
499
|
/* @__PURE__ */ e.jsx("line", { x1: "7.00006", y1: "7", x2: "17", y2: "16.9999", id: "Path", stroke: "var(--On-surface-color)", strokeWidth: "2", strokeLinecap: "round" })
|
|
500
|
-
] }) }) }),
|
|
500
|
+
] }) }) }), Ce = (n) => {
|
|
501
501
|
const t = F(n);
|
|
502
502
|
return /* @__PURE__ */ e.jsx($, { ...n, children: /* @__PURE__ */ e.jsx("path", { fill: "none", d: "M4 12.6111L8.92308 17.5L20 6.5", stroke: t.primaryColor, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
503
503
|
}, He = (n) => {
|
|
@@ -1841,7 +1841,7 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1841
1841
|
forceModal: r = !1,
|
|
1842
1842
|
...s
|
|
1843
1843
|
}) => {
|
|
1844
|
-
const { screen: i } =
|
|
1844
|
+
const { screen: i } = je(ge);
|
|
1845
1845
|
vn(!0, document.body);
|
|
1846
1846
|
const l = () => {
|
|
1847
1847
|
var o;
|
|
@@ -1879,7 +1879,7 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1879
1879
|
},
|
|
1880
1880
|
s.text
|
|
1881
1881
|
) : /* @__PURE__ */ e.jsx(
|
|
1882
|
-
|
|
1882
|
+
Ne,
|
|
1883
1883
|
{
|
|
1884
1884
|
style: s.style,
|
|
1885
1885
|
styleType: s.styleType,
|
|
@@ -1902,11 +1902,11 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1902
1902
|
customActions: u,
|
|
1903
1903
|
btns: m
|
|
1904
1904
|
}) => {
|
|
1905
|
-
const h =
|
|
1905
|
+
const h = k(() => {
|
|
1906
1906
|
l == null || l(), o == null || o();
|
|
1907
|
-
}, [l, o]), x =
|
|
1907
|
+
}, [l, o]), x = k(() => {
|
|
1908
1908
|
a == null || a(), o == null || o();
|
|
1909
|
-
}, [a, o]), f =
|
|
1909
|
+
}, [a, o]), f = k(() => u || (d ? null : m ? /* @__PURE__ */ e.jsx(Pe, { onHide: x, onSuccess: h, btns: m }) : /* @__PURE__ */ e.jsx(Pe, { onHide: x, onSuccess: h, btns: [
|
|
1910
1910
|
{
|
|
1911
1911
|
text: i,
|
|
1912
1912
|
hide: !0,
|
|
@@ -1930,14 +1930,14 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1930
1930
|
]
|
|
1931
1931
|
}
|
|
1932
1932
|
);
|
|
1933
|
-
},
|
|
1933
|
+
}, ve = ({ children: n, container: t = document.body }) => t ? ut.createPortal(
|
|
1934
1934
|
n,
|
|
1935
1935
|
t
|
|
1936
1936
|
) : /* @__PURE__ */ e.jsx("p", { children: "container not found" }), Kt = ({ container: n, text: t, header: r, onClick: s, styleType: i, ...l }) => {
|
|
1937
1937
|
const [a, o] = b(null);
|
|
1938
1938
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1939
|
-
/* @__PURE__ */ e.jsx(
|
|
1940
|
-
a !== null && /* @__PURE__ */ e.jsx(
|
|
1939
|
+
/* @__PURE__ */ e.jsx(Ne, { styleType: i ?? "filled", ...l, onClick: o }),
|
|
1940
|
+
a !== null && /* @__PURE__ */ e.jsx(ve, { container: n, children: /* @__PURE__ */ e.jsx(Xt, { header: r, text: t, onSuccess: () => s == null ? void 0 : s(a), onHide: () => o(null) }) })
|
|
1941
1941
|
] });
|
|
1942
1942
|
}, dn = ({
|
|
1943
1943
|
text: n,
|
|
@@ -1948,7 +1948,7 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1948
1948
|
disabled: l,
|
|
1949
1949
|
...a
|
|
1950
1950
|
}) => {
|
|
1951
|
-
const [o, c] = b(!1), d =
|
|
1951
|
+
const [o, c] = b(!1), d = k(async (h) => {
|
|
1952
1952
|
if (!l) {
|
|
1953
1953
|
try {
|
|
1954
1954
|
await navigator.clipboard.writeText(n), c(!0), setTimeout(() => c(!1), r);
|
|
@@ -1957,7 +1957,7 @@ const kn = (n) => /* @__PURE__ */ e.jsx($, { ...n, className: `${n.className} ic
|
|
|
1957
1957
|
}
|
|
1958
1958
|
i == null || i(h);
|
|
1959
1959
|
}
|
|
1960
|
-
}, [n, l, r, i]), u = o ? /* @__PURE__ */ e.jsx(
|
|
1960
|
+
}, [n, l, r, i]), u = o ? /* @__PURE__ */ e.jsx(Ce, { "aria-hidden": "true" }) : /* @__PURE__ */ e.jsx(En, { "aria-hidden": "true" }), m = o ? "Скопировано!" : "Копировать";
|
|
1961
1961
|
return t ? /* @__PURE__ */ e.jsxs("div", { className: "copy-button", children: [
|
|
1962
1962
|
/* @__PURE__ */ e.jsx(
|
|
1963
1963
|
ue,
|
|
@@ -2064,12 +2064,12 @@ function Le(n, t, r) {
|
|
|
2064
2064
|
b: Math.round(l * 255)
|
|
2065
2065
|
};
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function ke(n) {
|
|
2068
2068
|
let t = n.toString(16);
|
|
2069
2069
|
return t.length === 1 && (t = "0" + t), t;
|
|
2070
2070
|
}
|
|
2071
|
-
function
|
|
2072
|
-
return t ? "#" +
|
|
2071
|
+
function ye(n, t = !1) {
|
|
2072
|
+
return t ? "#" + ke(n.r) + ke(n.g) + ke(n.b) : ke(n.r) + ke(n.g) + ke(n.b);
|
|
2073
2073
|
}
|
|
2074
2074
|
function Ie(n, t, r) {
|
|
2075
2075
|
arguments.length === 1 && (t = n.g, r = n.b, n = n.r);
|
|
@@ -2094,7 +2094,7 @@ function Ie(n, t, r) {
|
|
|
2094
2094
|
v: c
|
|
2095
2095
|
};
|
|
2096
2096
|
}
|
|
2097
|
-
function
|
|
2097
|
+
function we(n) {
|
|
2098
2098
|
var t = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
2099
2099
|
n = n.replace(t, function(s, i, l, a) {
|
|
2100
2100
|
return i + i + l + l + a + a;
|
|
@@ -2106,7 +2106,7 @@ function Ne(n) {
|
|
|
2106
2106
|
b: parseInt(r[3], 16)
|
|
2107
2107
|
} : null;
|
|
2108
2108
|
}
|
|
2109
|
-
const Jt =
|
|
2109
|
+
const Jt = we, Qt = (n) => {
|
|
2110
2110
|
if (!n)
|
|
2111
2111
|
return "linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0))";
|
|
2112
2112
|
const t = Jt(n);
|
|
@@ -2115,7 +2115,7 @@ const Jt = Ne, Qt = (n) => {
|
|
|
2115
2115
|
function On(n, t, r) {
|
|
2116
2116
|
if (n === 0) return r ?? "#e0e0e0";
|
|
2117
2117
|
if (n === 1) return t;
|
|
2118
|
-
const s = r ?
|
|
2118
|
+
const s = r ? we(r) : null, i = (s == null ? void 0 : s.r) ?? 224, l = (s == null ? void 0 : s.g) ?? 224, a = (s == null ? void 0 : s.b) ?? 224, o = parseInt(t.substring(1, 3), 16), c = parseInt(t.substring(3, 5), 16), d = parseInt(t.substring(5, 7), 16), u = Math.round(i + n * (o - i)), m = Math.round(l + n * (c - l)), h = Math.round(a + n * (d - a));
|
|
2119
2119
|
return `rgb(${u}, ${m}, ${h})`;
|
|
2120
2120
|
}
|
|
2121
2121
|
const ce = (n, t, r = "", s) => {
|
|
@@ -2141,7 +2141,7 @@ ce.pSBCr = (n) => {
|
|
|
2141
2141
|
return s;
|
|
2142
2142
|
};
|
|
2143
2143
|
function re(n) {
|
|
2144
|
-
const t =
|
|
2144
|
+
const t = we(n);
|
|
2145
2145
|
return t ? t.r * 0.299 + t.g * 0.589 + t.b * 0.114 > 186 ? "#000000" : "#FFFFFF" : "#fff";
|
|
2146
2146
|
}
|
|
2147
2147
|
function Te(n, t = !1) {
|
|
@@ -2250,7 +2250,7 @@ const An = {
|
|
|
2250
2250
|
})
|
|
2251
2251
|
};
|
|
2252
2252
|
function nr(n, t = !1) {
|
|
2253
|
-
const [r, s] = b({ ...An, ...n }), [i, l] = b(t), a =
|
|
2253
|
+
const [r, s] = b({ ...An, ...n }), [i, l] = b(t), a = k(
|
|
2254
2254
|
(c, d) => {
|
|
2255
2255
|
const u = er[c];
|
|
2256
2256
|
if (!u) return;
|
|
@@ -2310,7 +2310,7 @@ const tr = {
|
|
|
2310
2310
|
function sr(n = "light") {
|
|
2311
2311
|
const [t, r] = b(
|
|
2312
2312
|
Ke
|
|
2313
|
-
), [s, i] = b(n), { colors: l, setColor: a, setReverse: o } = nr(t[s].colors, t[s].reverse), c =
|
|
2313
|
+
), [s, i] = b(n), { colors: l, setColor: a, setReverse: o } = nr(t[s].colors, t[s].reverse), c = k(
|
|
2314
2314
|
(x) => {
|
|
2315
2315
|
const f = t[x].colors;
|
|
2316
2316
|
f && (Object.entries(f).forEach(([j, p]) => {
|
|
@@ -2322,7 +2322,7 @@ function sr(n = "light") {
|
|
|
2322
2322
|
V(() => {
|
|
2323
2323
|
c(s);
|
|
2324
2324
|
}, [s, c]);
|
|
2325
|
-
const d =
|
|
2325
|
+
const d = k(
|
|
2326
2326
|
(x, f, j) => {
|
|
2327
2327
|
r((p) => ({
|
|
2328
2328
|
...p,
|
|
@@ -2333,17 +2333,17 @@ function sr(n = "light") {
|
|
|
2333
2333
|
}));
|
|
2334
2334
|
},
|
|
2335
2335
|
[]
|
|
2336
|
-
), u =
|
|
2336
|
+
), u = k((x, f = "light", j) => {
|
|
2337
2337
|
r((p) => ({
|
|
2338
2338
|
...p,
|
|
2339
2339
|
[x]: { colors: p[f].colors, reverse: j === void 0 ? p[f].reverse : j }
|
|
2340
2340
|
}));
|
|
2341
|
-
}, []), m =
|
|
2341
|
+
}, []), m = k((x) => {
|
|
2342
2342
|
r((f) => {
|
|
2343
2343
|
const j = { ...f };
|
|
2344
2344
|
return delete j[x], j;
|
|
2345
2345
|
}), s === x && i("light");
|
|
2346
|
-
}, [s]), h =
|
|
2346
|
+
}, [s]), h = k(
|
|
2347
2347
|
(x) => {
|
|
2348
2348
|
Ke[x] && r((f) => ({
|
|
2349
2349
|
...f,
|
|
@@ -2394,7 +2394,7 @@ const $e = () => {
|
|
|
2394
2394
|
className: f = "",
|
|
2395
2395
|
...j
|
|
2396
2396
|
}) => {
|
|
2397
|
-
const p = Y(null), v = Y(null), [N, g] = b(o ?? s), [_, S] = b("200px"), { colors: T } =
|
|
2397
|
+
const p = Y(null), v = Y(null), [N, g] = b(o ?? s), [_, S] = b("200px"), { colors: T } = je(ln), { showPopup: P, popupState: B } = qt({ valueDisplayDuration: m }), w = n ?? T.Primary_color ?? "#0000ff";
|
|
2398
2398
|
V(() => {
|
|
2399
2399
|
var E;
|
|
2400
2400
|
if (c === "vertical" && ((E = v.current) != null && E.parentElement)) {
|
|
@@ -2410,7 +2410,7 @@ const $e = () => {
|
|
|
2410
2410
|
}, [c]), V(() => {
|
|
2411
2411
|
o !== void 0 && (g(o), W());
|
|
2412
2412
|
}, [o]);
|
|
2413
|
-
const W =
|
|
2413
|
+
const W = k(() => {
|
|
2414
2414
|
u && P();
|
|
2415
2415
|
}, [P]), O = (E) => {
|
|
2416
2416
|
const U = parseFloat(E.target.value);
|
|
@@ -2418,7 +2418,7 @@ const $e = () => {
|
|
|
2418
2418
|
}, A = oe(
|
|
2419
2419
|
() => i !== s ? (N - s) / (i - s) * 100 : 0,
|
|
2420
2420
|
[N, s, i]
|
|
2421
|
-
),
|
|
2421
|
+
), y = oe(() => ({
|
|
2422
2422
|
...j.style,
|
|
2423
2423
|
[c === "vertical" ? "height" : "width"]: `${A}%`,
|
|
2424
2424
|
background: d === "point" ? "transperent" : d === "static-color" ? w : On(A / 100, w, x)
|
|
@@ -2451,7 +2451,7 @@ const $e = () => {
|
|
|
2451
2451
|
style: D,
|
|
2452
2452
|
children: [
|
|
2453
2453
|
/* @__PURE__ */ e.jsxs("div", { className: "track", style: { background: t }, children: [
|
|
2454
|
-
/* @__PURE__ */ e.jsx("div", { className: "active-track", style:
|
|
2454
|
+
/* @__PURE__ */ e.jsx("div", { className: "active-track", style: y }),
|
|
2455
2455
|
/* @__PURE__ */ e.jsx(Tn, { text: Math.round(N).toString(), state: B, className: "value-popup" })
|
|
2456
2456
|
] }),
|
|
2457
2457
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2504,11 +2504,11 @@ const $e = () => {
|
|
|
2504
2504
|
className: _,
|
|
2505
2505
|
startColor: S
|
|
2506
2506
|
}) => {
|
|
2507
|
-
const T = Y(null), P = Y(!1), B = d * 2, w = d * 2, W = Math.min(B, w), O = B / 2, A = w / 2,
|
|
2507
|
+
const T = Y(null), P = Y(!1), B = d * 2, w = d * 2, W = Math.min(B, w), O = B / 2, A = w / 2, y = W / 2 - c / 2, D = o === "point" ? !1 : f, M = o === "point" ? !0 : j, { colors: E } = je(ln), U = m ?? E.Primary_color ?? "#0000ff", I = h ?? E.Primary_color ?? "#0000ff", [H, G] = b(r);
|
|
2508
2508
|
V(() => {
|
|
2509
2509
|
r !== void 0 && G(r);
|
|
2510
2510
|
}, [r]);
|
|
2511
|
-
const C =
|
|
2511
|
+
const C = k(() => {
|
|
2512
2512
|
switch (a) {
|
|
2513
2513
|
case "semicircle":
|
|
2514
2514
|
return 180;
|
|
@@ -2517,39 +2517,39 @@ const $e = () => {
|
|
|
2517
2517
|
default:
|
|
2518
2518
|
return 360;
|
|
2519
2519
|
}
|
|
2520
|
-
}, [a]), L =
|
|
2520
|
+
}, [a]), L = k(() => a === "semicircle" ? [y * Math.PI, y * Math.PI] : a === "brokenCircle" ? [y * Math.PI * 1.25, y * Math.PI * 1.5] : [y * Math.PI, y * Math.PI * 2], [a, y]), R = oe(
|
|
2521
2521
|
() => t !== n ? (H - n) / (t - n) * 100 : 0,
|
|
2522
2522
|
[H, n, t]
|
|
2523
|
-
), q =
|
|
2523
|
+
), q = k(() => {
|
|
2524
2524
|
if (!T.current) return;
|
|
2525
|
-
const [Z, he] = L(),
|
|
2525
|
+
const [Z, he] = L(), _e = (H - n) * he / (t - n);
|
|
2526
2526
|
if (x) {
|
|
2527
2527
|
const X = T.current.querySelector('[data-el="base"]');
|
|
2528
|
-
X && (X.style.stroke = u, X.style.strokeWidth = c.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = Z.toString(), X.style.strokeDasharray = `${he}, ${
|
|
2528
|
+
X && (X.style.stroke = u, X.style.strokeWidth = c.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = Z.toString(), X.style.strokeDasharray = `${he}, ${y * Math.PI * 2 - he}`);
|
|
2529
2529
|
}
|
|
2530
2530
|
if (D) {
|
|
2531
2531
|
const X = T.current.querySelector('[data-el="indicator"]');
|
|
2532
2532
|
if (X) {
|
|
2533
2533
|
const xe = parseFloat(X.dataset.percentage ?? "");
|
|
2534
|
-
xe !== null && (xe < R - 2 || xe > R + 2) ? X.style.transition = ".3s" : X.style.transition = P.current ? "none" : ".3s", X.dataset.percentage = R.toString(), X.style.stroke = o === "static-color" ? U : On(R / 100, U, S), X.style.strokeWidth = c.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = Z.toString(), X.style.strokeDasharray = `${
|
|
2534
|
+
xe !== null && (xe < R - 2 || xe > R + 2) ? X.style.transition = ".3s" : X.style.transition = P.current ? "none" : ".3s", X.dataset.percentage = R.toString(), X.style.stroke = o === "static-color" ? U : On(R / 100, U, S), X.style.strokeWidth = c.toString(), X.style.strokeLinecap = p ? "round" : "", X.style.strokeDashoffset = Z.toString(), X.style.strokeDasharray = `${_e}, ${y * Math.PI * 2 - _e}`;
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
2537
|
if (M) {
|
|
2538
2538
|
const X = T.current.querySelector('[data-el="point"]');
|
|
2539
2539
|
if (X) {
|
|
2540
2540
|
const xe = parseFloat(X.dataset.percentage ?? "");
|
|
2541
|
-
xe !== null && (xe < R - 2 || xe > R + 2) ? X.style.transition = ".3s" : X.style.transition = P.current ? "none" : ".3s", X.dataset.percentage = R.toString(), X.style.stroke = I, X.style.strokeWidth = c.toString(), X.style.strokeLinecap = "round", H === t && a === "semicircle" ? X.style.strokeDashoffset = "0" : X.style.strokeDashoffset = (Z -
|
|
2541
|
+
xe !== null && (xe < R - 2 || xe > R + 2) ? X.style.transition = ".3s" : X.style.transition = P.current ? "none" : ".3s", X.dataset.percentage = R.toString(), X.style.stroke = I, X.style.strokeWidth = c.toString(), X.style.strokeLinecap = "round", H === t && a === "semicircle" ? X.style.strokeDashoffset = "0" : X.style.strokeDashoffset = (Z - _e).toString(), X.style.strokeDasharray = `0, ${y * Math.PI * 2}`;
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
|
-
}, [H, L, t, n,
|
|
2544
|
+
}, [H, L, t, n, y, c, u, U, I, x, D, M, p, R, S]), Q = (Z) => {
|
|
2545
2545
|
P.current = !0, document.addEventListener("mousemove", ne), document.addEventListener("mouseup", J), le(Z);
|
|
2546
2546
|
}, ne = (Z) => {
|
|
2547
2547
|
Z.preventDefault(), P.current && le(Z);
|
|
2548
2548
|
}, J = () => {
|
|
2549
2549
|
P.current = !1, document.removeEventListener("mousemove", ne), document.removeEventListener("mouseup", J);
|
|
2550
|
-
}, le =
|
|
2550
|
+
}, le = k((Z) => {
|
|
2551
2551
|
if (!T.current) return;
|
|
2552
|
-
const he = C(),
|
|
2552
|
+
const he = C(), _e = T.current.getBoundingClientRect(), X = _e.left + _e.width / 2, xe = _e.top + _e.height / 2, tt = Z.clientX, rt = Z.clientY, st = xe - rt, it = X - tt;
|
|
2553
2553
|
let ae = Math.atan2(st, it) * (180 / Math.PI);
|
|
2554
2554
|
he === 270 && (ae += 45), ae < 0 && (ae = 360 + ae), ae < 0 && (ae = 0), ae > he && H > (t - n) / 2 ? ae = he : ae > he && (ae = 0);
|
|
2555
2555
|
const lt = he, at = t - n, Xe = Math.round(ae * at / lt + n);
|
|
@@ -2579,7 +2579,7 @@ const $e = () => {
|
|
|
2579
2579
|
fill: "none",
|
|
2580
2580
|
cx: O,
|
|
2581
2581
|
cy: A,
|
|
2582
|
-
r:
|
|
2582
|
+
r: y
|
|
2583
2583
|
}
|
|
2584
2584
|
),
|
|
2585
2585
|
D && /* @__PURE__ */ e.jsx(
|
|
@@ -2589,7 +2589,7 @@ const $e = () => {
|
|
|
2589
2589
|
fill: "none",
|
|
2590
2590
|
cx: O,
|
|
2591
2591
|
cy: A,
|
|
2592
|
-
r:
|
|
2592
|
+
r: y
|
|
2593
2593
|
}
|
|
2594
2594
|
),
|
|
2595
2595
|
M && /* @__PURE__ */ e.jsx(
|
|
@@ -2599,7 +2599,7 @@ const $e = () => {
|
|
|
2599
2599
|
fill: "none",
|
|
2600
2600
|
cx: O,
|
|
2601
2601
|
cy: A,
|
|
2602
|
-
r:
|
|
2602
|
+
r: y
|
|
2603
2603
|
}
|
|
2604
2604
|
)
|
|
2605
2605
|
]
|
|
@@ -2646,7 +2646,7 @@ const se = ({ style: n, short: t, text: r }) => r ? /* @__PURE__ */ e.jsxs("div"
|
|
|
2646
2646
|
return /* @__PURE__ */ e.jsxs("div", { className: `menu-item menu-item__info ${n.disabled ? "menu-item_disabled" : ""}`, onClick: l, children: [
|
|
2647
2647
|
t ? /* @__PURE__ */ e.jsx("div", { className: "menu-icon-container", children: n.icon }) : null,
|
|
2648
2648
|
/* @__PURE__ */ e.jsx("div", { className: "menu-text-container", children: n.title }),
|
|
2649
|
-
/* @__PURE__ */ e.jsx("div", { className: "menu-status-container", children: n.activated ? /* @__PURE__ */ e.jsx(
|
|
2649
|
+
/* @__PURE__ */ e.jsx("div", { className: "menu-status-container", children: n.activated ? /* @__PURE__ */ e.jsx(Ce, {}) : null })
|
|
2650
2650
|
] });
|
|
2651
2651
|
}, Ue = (n) => {
|
|
2652
2652
|
if (!n) return;
|
|
@@ -2686,14 +2686,14 @@ const se = ({ style: n, short: t, text: r }) => r ? /* @__PURE__ */ e.jsxs("div"
|
|
|
2686
2686
|
r ? null : /* @__PURE__ */ e.jsx("div", { style: { zIndex: 4 }, className: "menu-block-backplate", onClick: t })
|
|
2687
2687
|
] });
|
|
2688
2688
|
}, or = ({ onHide: n, autoHide: t, globalClick: r, item: s, isIcon: i, smallDisplay: l }) => {
|
|
2689
|
-
const [a, o] = b(!1), c =
|
|
2689
|
+
const [a, o] = b(!1), c = k(() => {
|
|
2690
2690
|
s.subItems ? o((d) => !d) : (s.onClick && s.onClick(), r && r(), t && n && n());
|
|
2691
2691
|
}, [s.onClick]);
|
|
2692
2692
|
return /* @__PURE__ */ e.jsxs("div", { className: `menu-item ${s.disabled ? "menu-item_disabled" : ""}`, children: [
|
|
2693
2693
|
/* @__PURE__ */ e.jsxs("div", { className: "menu-item__info", onClick: c, children: [
|
|
2694
2694
|
i ? /* @__PURE__ */ e.jsx("div", { className: "menu-item__info__icon", children: s.icon }) : null,
|
|
2695
2695
|
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__text", children: s.title }),
|
|
2696
|
-
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__status ", children: s.subItems ? /* @__PURE__ */ e.jsx("span", { className: `menu-item__info__status__arrow ${a ? "menu-item__info__status__arrow_active" : ""}` }) : s.activated ? /* @__PURE__ */ e.jsx(
|
|
2696
|
+
/* @__PURE__ */ e.jsx("div", { className: "menu-item__info__status ", children: s.subItems ? /* @__PURE__ */ e.jsx("span", { className: `menu-item__info__status__arrow ${a ? "menu-item__info__status__arrow_active" : ""}` }) : s.activated ? /* @__PURE__ */ e.jsx(Ce, {}) : /* @__PURE__ */ e.jsx("span", { className: "menu-item__info__status__none" }) })
|
|
2697
2697
|
] }),
|
|
2698
2698
|
a && s.subItems ? /* @__PURE__ */ e.jsx(cr, { autoHide: t, items: s.subItems, onGlobalHide: n, onHide: () => o(!1), smallDisplay: l }) : null
|
|
2699
2699
|
] });
|
|
@@ -2736,8 +2736,8 @@ const dr = 100, ur = (n) => {
|
|
|
2736
2736
|
s !== 0 ? /* @__PURE__ */ e.jsx(se, {}) : null,
|
|
2737
2737
|
/* @__PURE__ */ e.jsx(In, { block: r, smallDisplay: !0, autoHide: n.autoHide, onHide: n.onHide })
|
|
2738
2738
|
] }, s)) }) });
|
|
2739
|
-
}, Hn = (n) => n.screensize === ee.MOBILE ? /* @__PURE__ */ e.jsx(
|
|
2740
|
-
const [o, c] = b(!1), [d, u] = b(void 0), { screen: m } =
|
|
2739
|
+
}, Hn = (n) => n.screensize === ee.MOBILE ? /* @__PURE__ */ e.jsx(ve, { container: n.container, children: /* @__PURE__ */ e.jsx(hr, { ...n }) }) : /* @__PURE__ */ e.jsx(ve, { container: n.container, children: /* @__PURE__ */ e.jsx(ur, { ...n }) }), Vs = te.forwardRef(({ screensize: n, autoHide: t, blocks: r, container: s, onClick: i, ...l }, a) => {
|
|
2740
|
+
const [o, c] = b(!1), [d, u] = b(void 0), { screen: m } = je(ge), h = () => {
|
|
2741
2741
|
c(!1), u(void 0);
|
|
2742
2742
|
}, x = (j) => {
|
|
2743
2743
|
j.stopPropagation(), c(!0), u({ x: j.clientX, y: j.clientY }), i == null || i(j);
|
|
@@ -2773,7 +2773,7 @@ const dr = 100, ur = (n) => {
|
|
|
2773
2773
|
onChange: r,
|
|
2774
2774
|
readOnly: s,
|
|
2775
2775
|
disabled: i,
|
|
2776
|
-
checkIcon: l = /* @__PURE__ */ e.jsx(
|
|
2776
|
+
checkIcon: l = /* @__PURE__ */ e.jsx(Ce, { baseColor: "var(--On-primary-color)" }),
|
|
2777
2777
|
size: a = "medium",
|
|
2778
2778
|
className: o,
|
|
2779
2779
|
...c
|
|
@@ -2923,7 +2923,7 @@ const Wn = fe(
|
|
|
2923
2923
|
className: `segmented-button__item ${m.includes(j) ? "segmented-button__item--active" : ""}`,
|
|
2924
2924
|
onClick: (p) => f(p, j),
|
|
2925
2925
|
children: [
|
|
2926
|
-
m.includes(j) && /* @__PURE__ */ e.jsx("span", { className: "segmented-button__icon", children: /* @__PURE__ */ e.jsx(
|
|
2926
|
+
m.includes(j) && /* @__PURE__ */ e.jsx("span", { className: "segmented-button__icon", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
|
|
2927
2927
|
/* @__PURE__ */ e.jsx("span", { className: "segmented-button__text", children: j }),
|
|
2928
2928
|
/* @__PURE__ */ e.jsx(
|
|
2929
2929
|
"input",
|
|
@@ -2986,11 +2986,11 @@ function xr({
|
|
|
2986
2986
|
defaultValue: c,
|
|
2987
2987
|
style: d
|
|
2988
2988
|
}) {
|
|
2989
|
-
const [u, m] = b(c), h =
|
|
2989
|
+
const [u, m] = b(c), h = k(() => {
|
|
2990
2990
|
u !== void 0 && (n == null || n(u), m(void 0), !i && (s == null || s()));
|
|
2991
|
-
}, [u, n, i, s]), x =
|
|
2991
|
+
}, [u, n, i, s]), x = k(() => {
|
|
2992
2992
|
s == null || s();
|
|
2993
|
-
}, [s]), f =
|
|
2993
|
+
}, [s]), f = k((j) => {
|
|
2994
2994
|
m(j);
|
|
2995
2995
|
}, []);
|
|
2996
2996
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -3101,7 +3101,7 @@ const Ve = te.forwardRef(
|
|
|
3101
3101
|
errorText: w,
|
|
3102
3102
|
onKeyDown: W
|
|
3103
3103
|
}, O) => {
|
|
3104
|
-
const A = Y(null), [
|
|
3104
|
+
const A = Y(null), [y, D] = b(!1), [M, E] = b(!1), [U, I] = b(!!h), H = We(), G = () => {
|
|
3105
3105
|
if (!A.current) return;
|
|
3106
3106
|
const Q = A.current.querySelector("input");
|
|
3107
3107
|
Q == null || Q.focus();
|
|
@@ -3109,7 +3109,7 @@ const Ve = te.forwardRef(
|
|
|
3109
3109
|
p == null || p(Q), E(!0);
|
|
3110
3110
|
}, L = (Q) => {
|
|
3111
3111
|
v == null || v(Q), E(!1), I(!!Q.target.value);
|
|
3112
|
-
}, R =
|
|
3112
|
+
}, R = k(
|
|
3113
3113
|
(Q, ne) => D(!!(N || Q && (!ne || ne === ""))),
|
|
3114
3114
|
[N]
|
|
3115
3115
|
);
|
|
@@ -3134,7 +3134,7 @@ const Ve = te.forwardRef(
|
|
|
3134
3134
|
${o ? "input-field_border" : ""}
|
|
3135
3135
|
${M ? "input-field_active" : ""}
|
|
3136
3136
|
${i ? "input-field_transparent" : ""}
|
|
3137
|
-
${
|
|
3137
|
+
${y ? "input-field_error" : ""}
|
|
3138
3138
|
${T ? "input-field_disabled" : ""}
|
|
3139
3139
|
`,
|
|
3140
3140
|
onClick: G,
|
|
@@ -3154,7 +3154,7 @@ const Ve = te.forwardRef(
|
|
|
3154
3154
|
type: a ? "password" : s,
|
|
3155
3155
|
className: `
|
|
3156
3156
|
input-field__input-container__input
|
|
3157
|
-
${
|
|
3157
|
+
${y ? "input-field__input-container__input_error" : ""}
|
|
3158
3158
|
`,
|
|
3159
3159
|
name: m,
|
|
3160
3160
|
value: h,
|
|
@@ -3164,8 +3164,8 @@ const Ve = te.forwardRef(
|
|
|
3164
3164
|
onBlur: L,
|
|
3165
3165
|
onKeyDown: W,
|
|
3166
3166
|
autoFocus: S,
|
|
3167
|
-
"aria-invalid":
|
|
3168
|
-
"aria-describedby":
|
|
3167
|
+
"aria-invalid": y,
|
|
3168
|
+
"aria-describedby": y ? `${m}-error` : void 0
|
|
3169
3169
|
}
|
|
3170
3170
|
),
|
|
3171
3171
|
x && /* @__PURE__ */ e.jsx(
|
|
@@ -3187,8 +3187,8 @@ const Ve = te.forwardRef(
|
|
|
3187
3187
|
]
|
|
3188
3188
|
}
|
|
3189
3189
|
),
|
|
3190
|
-
|
|
3191
|
-
B && !
|
|
3190
|
+
y && w && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__error-text", children: w }),
|
|
3191
|
+
B && !y && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__helper-text", children: B })
|
|
3192
3192
|
] });
|
|
3193
3193
|
}
|
|
3194
3194
|
);
|
|
@@ -3218,9 +3218,9 @@ const Ts = ({
|
|
|
3218
3218
|
} else
|
|
3219
3219
|
p(!0);
|
|
3220
3220
|
}, [x, h, a, o, c]);
|
|
3221
|
-
const v =
|
|
3221
|
+
const v = k(() => {
|
|
3222
3222
|
j && (s == null || s(x), i == null || i());
|
|
3223
|
-
}, [x, j, s, i]), N =
|
|
3223
|
+
}, [x, j, s, i]), N = k(() => {
|
|
3224
3224
|
i == null || i();
|
|
3225
3225
|
}, [i]), g = (_) => {
|
|
3226
3226
|
if (a === "number") {
|
|
@@ -3289,16 +3289,17 @@ const Ts = ({
|
|
|
3289
3289
|
saveText: d,
|
|
3290
3290
|
cancelText: u,
|
|
3291
3291
|
forceFullScreen: m,
|
|
3292
|
-
|
|
3292
|
+
maxWidth: h,
|
|
3293
|
+
btns: x
|
|
3293
3294
|
}) => {
|
|
3294
|
-
const { screen:
|
|
3295
|
+
const { screen: f } = je(ge);
|
|
3295
3296
|
vn(!0, document.body);
|
|
3296
|
-
const
|
|
3297
|
+
const j = k(() => {
|
|
3297
3298
|
a == null || a();
|
|
3298
|
-
},
|
|
3299
|
+
}, [a]), p = k(() => {
|
|
3299
3300
|
l == null || l();
|
|
3300
|
-
};
|
|
3301
|
-
return m ||
|
|
3301
|
+
}, [l]);
|
|
3302
|
+
return m || f === ee.MOBILE ? /* @__PURE__ */ e.jsxs(
|
|
3302
3303
|
"div",
|
|
3303
3304
|
{
|
|
3304
3305
|
style: {
|
|
@@ -3317,32 +3318,33 @@ const Ts = ({
|
|
|
3317
3318
|
ue,
|
|
3318
3319
|
{
|
|
3319
3320
|
transparent: !0,
|
|
3320
|
-
onClick:
|
|
3321
|
+
onClick: j,
|
|
3321
3322
|
icon: /* @__PURE__ */ e.jsx(ie, {}),
|
|
3322
3323
|
"aria-label": "Закрыть"
|
|
3323
3324
|
}
|
|
3324
3325
|
) }),
|
|
3325
3326
|
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__text", children: s }),
|
|
3326
|
-
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__save", children: l && /* @__PURE__ */ e.jsx("button", { onClick:
|
|
3327
|
+
/* @__PURE__ */ e.jsx("div", { className: "full-screen-dialog__container__header__save", children: l && /* @__PURE__ */ e.jsx("button", { onClick: p, className: "full-screen-dialog__container__header__save__button", children: /* @__PURE__ */ e.jsx(K, { type: "body", weight: "bold", children: d || "Сохранить" }) }) })
|
|
3327
3328
|
] }),
|
|
3328
3329
|
/* @__PURE__ */ e.jsxs("div", { className: "full-screen-dialog__content", style: t, children: [
|
|
3329
3330
|
i,
|
|
3330
|
-
|
|
3331
|
+
x && /* @__PURE__ */ e.jsx(Pe, { btns: x.filter((N) => !N.hide && !N.success) })
|
|
3331
3332
|
] })
|
|
3332
3333
|
]
|
|
3333
3334
|
}
|
|
3334
3335
|
) : /* @__PURE__ */ e.jsx(
|
|
3335
3336
|
Ye,
|
|
3336
3337
|
{
|
|
3338
|
+
maxWidth: h,
|
|
3337
3339
|
disableBackplate: c,
|
|
3338
3340
|
style: n,
|
|
3339
3341
|
header: s,
|
|
3340
3342
|
className: `full-screen-dialog ${r}`,
|
|
3341
|
-
onHide:
|
|
3342
|
-
action:
|
|
3343
|
-
a && /* @__PURE__ */ e.jsx(
|
|
3344
|
-
a && /* @__PURE__ */ e.jsx(
|
|
3345
|
-
] }) : /* @__PURE__ */ e.jsx(Pe, { btns:
|
|
3343
|
+
onHide: j,
|
|
3344
|
+
action: x === void 0 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3345
|
+
a && /* @__PURE__ */ e.jsx(Ne, { styleType: "outline", onClick: j, children: u ?? "Отмена" }),
|
|
3346
|
+
a && /* @__PURE__ */ e.jsx(Ne, { onClick: p, children: d ?? "Сохранить" })
|
|
3347
|
+
] }) : /* @__PURE__ */ e.jsx(Pe, { btns: x, onHide: a, onSuccess: l }),
|
|
3346
3348
|
children: i
|
|
3347
3349
|
}
|
|
3348
3350
|
);
|
|
@@ -3366,7 +3368,7 @@ const Ts = ({
|
|
|
3366
3368
|
elevation: j = 6,
|
|
3367
3369
|
...p
|
|
3368
3370
|
}, v) => {
|
|
3369
|
-
const { screen: N } =
|
|
3371
|
+
const { screen: N } = je(ge), g = u ?? N, _ = `elevation-${Math.min(24, Math.max(0, j))}`, S = (B) => {
|
|
3370
3372
|
T(B) && (d == null || d(B), P(B));
|
|
3371
3373
|
}, T = (B) => {
|
|
3372
3374
|
const w = B.target;
|
|
@@ -3374,8 +3376,8 @@ const Ts = ({
|
|
|
3374
3376
|
}, P = (B) => {
|
|
3375
3377
|
const w = B.currentTarget, W = w.querySelector(".card-ripple-container");
|
|
3376
3378
|
if (!W) return;
|
|
3377
|
-
const O = w.getBoundingClientRect(), A = Math.max(O.width, O.height),
|
|
3378
|
-
M.className = "card-ripple", M.style.width = M.style.height = `${A}px`, M.style.left = `${
|
|
3379
|
+
const O = w.getBoundingClientRect(), A = Math.max(O.width, O.height), y = B.clientX - O.left - A / 2, D = B.clientY - O.top - A / 2, M = document.createElement("span");
|
|
3380
|
+
M.className = "card-ripple", M.style.width = M.style.height = `${A}px`, M.style.left = `${y}px`, M.style.top = `${D}px`, W.appendChild(M), setTimeout(() => M.remove(), 600);
|
|
3379
3381
|
};
|
|
3380
3382
|
return /* @__PURE__ */ e.jsxs(
|
|
3381
3383
|
"div",
|
|
@@ -3439,7 +3441,7 @@ const As = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3439
3441
|
p.button == 1 && (c(!1), u(null), document.body.style.cursor = "auto");
|
|
3440
3442
|
}, f = (p) => {
|
|
3441
3443
|
p.button == 1 && a && (u({ x: p.clientX, y: p.clientY }), c(!0), document.body.style.cursor = "move");
|
|
3442
|
-
}, j =
|
|
3444
|
+
}, j = k((p) => {
|
|
3443
3445
|
o && (h((v) => {
|
|
3444
3446
|
if (!d)
|
|
3445
3447
|
return v;
|
|
@@ -3607,17 +3609,17 @@ const As = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3607
3609
|
itemMaxWith: a,
|
|
3608
3610
|
itemWith: o = "400px"
|
|
3609
3611
|
}) => {
|
|
3610
|
-
const c = Y(null), [d, u] = b([]), m = Y(null), h = Y(null), x =
|
|
3612
|
+
const c = Y(null), [d, u] = b([]), m = Y(null), h = Y(null), x = k(() => {
|
|
3611
3613
|
if (!c.current) return;
|
|
3612
3614
|
c.current.style.display = "grid", c.current.style.gridRowGap = s, c.current.style.gridColumnGap = i;
|
|
3613
3615
|
const v = l ?? o, N = a ?? o;
|
|
3614
3616
|
c.current.style.gridTemplateColumns = `repeat(auto-fill, minmax(${v}, ${N}))`, c.current.style.gridAutoRows = "1px";
|
|
3615
|
-
}, [s, i, l, a, o]), f =
|
|
3617
|
+
}, [s, i, l, a, o]), f = k(() => {
|
|
3616
3618
|
if (c.current) {
|
|
3617
3619
|
const v = c.current.querySelectorAll(".adaptiv-grid-item");
|
|
3618
3620
|
u(Array.from(v));
|
|
3619
3621
|
}
|
|
3620
|
-
}, []), j =
|
|
3622
|
+
}, []), j = k(() => {
|
|
3621
3623
|
if (!c.current) return;
|
|
3622
3624
|
const v = window.getComputedStyle(c.current), N = parseInt(v.getPropertyValue("grid-row-gap")) || 0, g = parseInt(v.getPropertyValue("grid-auto-rows")) || 1;
|
|
3623
3625
|
d.forEach((_) => {
|
|
@@ -3627,7 +3629,7 @@ const As = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3627
3629
|
_.style.gridRowEnd = `span ${P}`;
|
|
3628
3630
|
}
|
|
3629
3631
|
});
|
|
3630
|
-
}, [d]), p =
|
|
3632
|
+
}, [d]), p = k(() => {
|
|
3631
3633
|
h.current !== null && cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
|
|
3632
3634
|
j(), h.current = null;
|
|
3633
3635
|
});
|
|
@@ -3751,7 +3753,7 @@ const As = ({ children: n, className: t }) => /* @__PURE__ */ e.jsx("div", { cla
|
|
|
3751
3753
|
onContextMenu: c,
|
|
3752
3754
|
...d
|
|
3753
3755
|
}) => {
|
|
3754
|
-
const u = Y(null), m = Y(null), [h, x] = b(!1), f =
|
|
3756
|
+
const u = Y(null), m = Y(null), [h, x] = b(!1), f = k(() => {
|
|
3755
3757
|
if (!u.current || !m.current) return;
|
|
3756
3758
|
const j = u.current.clientWidth, p = m.current.scrollWidth;
|
|
3757
3759
|
x(j < p);
|
|
@@ -3920,7 +3922,7 @@ const kr = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
3920
3922
|
index: o,
|
|
3921
3923
|
maxH: c
|
|
3922
3924
|
}) => {
|
|
3923
|
-
const d =
|
|
3925
|
+
const d = k(
|
|
3924
3926
|
(u) => {
|
|
3925
3927
|
u.target.closest(".no-click") || a == null || a(t, o);
|
|
3926
3928
|
},
|
|
@@ -4095,9 +4097,13 @@ const kr = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4095
4097
|
) })
|
|
4096
4098
|
] });
|
|
4097
4099
|
}, Ys = ({ visible: n, firstBtn: t, mainBtn: r, onHide: s, otherBtn: i, backBtn: l, openAlways: a }) => {
|
|
4098
|
-
const o = (c,
|
|
4100
|
+
const { screen: o } = je(ge), c = (d, u) => d.type === "button" ? /* @__PURE__ */ e.jsx(Re, { active: d.active, onClick: d.onClick, title: d.text, icon: d.icon }, u) : d.type === "link" ? /* @__PURE__ */ e.jsx(Yn, { onClick: () => s(), title: d.text, icon: d.icon, to: d.to }, u) : d.type === "submenu" ? /* @__PURE__ */ e.jsx(Sr, { item: d, onHide: s }, u) : null;
|
|
4099
4101
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4100
|
-
/* @__PURE__ */ e.jsxs("div", { className: `
|
|
4102
|
+
/* @__PURE__ */ e.jsxs("div", { className: `
|
|
4103
|
+
navigation-drawer
|
|
4104
|
+
${n || a ? "navigation-drawer_show" : "navigation-drawer_hide"}
|
|
4105
|
+
${o === ee.BIG_SCREEN ? "navigation-drawer_z500" : "navigation-drawer_z1200"}
|
|
4106
|
+
`, children: [
|
|
4101
4107
|
t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4102
4108
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4103
4109
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
@@ -4107,12 +4113,12 @@ const kr = ({ data: n, column: t, color: r, backgroundColor: s, H: i }) => {
|
|
|
4107
4113
|
] }) : null,
|
|
4108
4114
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4109
4115
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
4110
|
-
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: r && r.map(
|
|
4116
|
+
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: r && r.map(c) })
|
|
4111
4117
|
] }),
|
|
4112
4118
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__divider", children: /* @__PURE__ */ e.jsx(se, {}) }),
|
|
4113
4119
|
/* @__PURE__ */ e.jsxs("div", { className: "navigation-drawer__block", children: [
|
|
4114
4120
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__header" }),
|
|
4115
|
-
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: i && i.map(
|
|
4121
|
+
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block__content", children: i && i.map(c) })
|
|
4116
4122
|
] }),
|
|
4117
4123
|
/* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__divider", children: /* @__PURE__ */ e.jsx(se, {}) }),
|
|
4118
4124
|
l ? /* @__PURE__ */ e.jsx("div", { className: "navigation-drawer__block", children: /* @__PURE__ */ e.jsx(Re, { active: l.active, onClick: l.onClick, title: l.text, icon: l.icon }) }) : null
|
|
@@ -4230,7 +4236,7 @@ const Tr = [
|
|
|
4230
4236
|
"#E64AA9"
|
|
4231
4237
|
], fn = { h: 0, s: 1, v: 0.5 }, Or = (n) => {
|
|
4232
4238
|
try {
|
|
4233
|
-
return n ? Ie(
|
|
4239
|
+
return n ? Ie(we(n)) : fn;
|
|
4234
4240
|
} catch {
|
|
4235
4241
|
return fn;
|
|
4236
4242
|
}
|
|
@@ -4246,8 +4252,8 @@ const Tr = [
|
|
|
4246
4252
|
height: c = "auto"
|
|
4247
4253
|
}) => {
|
|
4248
4254
|
const d = Y(null), u = Y(null), m = Y(null), h = Y(null), [x, f] = b(Or(t)), [j, p] = b(!1), [v, N] = b(
|
|
4249
|
-
`#${
|
|
4250
|
-
), g = oe(() => Le(x), [x]), _ = oe(() => `#${
|
|
4255
|
+
`#${ye(Le(x))}`
|
|
4256
|
+
), g = oe(() => Le(x), [x]), _ = oe(() => `#${ye(g)}`, [g]), S = oe(
|
|
4251
4257
|
() => v[0] !== "#" ? `#${v}` : v,
|
|
4252
4258
|
[v]
|
|
4253
4259
|
);
|
|
@@ -4261,65 +4267,65 @@ const Tr = [
|
|
|
4261
4267
|
);
|
|
4262
4268
|
}, [x]), V(() => {
|
|
4263
4269
|
if (!m.current || !h.current) return;
|
|
4264
|
-
const
|
|
4265
|
-
|
|
4266
|
-
|
|
4270
|
+
const y = m.current.getContext("2d");
|
|
4271
|
+
y && (Lr(
|
|
4272
|
+
y,
|
|
4267
4273
|
m.current,
|
|
4268
|
-
`#${
|
|
4274
|
+
`#${ye(Le(x.h, 1, 1))}`
|
|
4269
4275
|
), $r(
|
|
4270
4276
|
m.current,
|
|
4271
|
-
|
|
4277
|
+
y,
|
|
4272
4278
|
h.current,
|
|
4273
4279
|
(D, M) => {
|
|
4274
4280
|
f((E) => {
|
|
4275
4281
|
const U = { ...E, s: D / 100, v: M / 100 };
|
|
4276
|
-
return N(
|
|
4282
|
+
return N(ye(Le(U))), U;
|
|
4277
4283
|
});
|
|
4278
4284
|
}
|
|
4279
4285
|
));
|
|
4280
4286
|
}, [x.h]), V(() => {
|
|
4281
4287
|
if (!d.current || !u.current) return;
|
|
4282
|
-
const
|
|
4283
|
-
|
|
4288
|
+
const y = d.current.getContext("2d");
|
|
4289
|
+
y && (Er(y, d.current), Fr(y, d.current, u.current, (D) => {
|
|
4284
4290
|
f((M) => {
|
|
4285
4291
|
const E = { ...M, h: D / 360 };
|
|
4286
|
-
return N(
|
|
4292
|
+
return N(ye(Le(E))), E;
|
|
4287
4293
|
});
|
|
4288
4294
|
}));
|
|
4289
4295
|
}, []), V(() => {
|
|
4290
4296
|
if (v.length === 4 || v.length === 7)
|
|
4291
4297
|
try {
|
|
4292
|
-
f(Ie(
|
|
4298
|
+
f(Ie(we(v)));
|
|
4293
4299
|
} catch {
|
|
4294
4300
|
console.warn("Invalid HEX color");
|
|
4295
4301
|
}
|
|
4296
4302
|
}, [v]);
|
|
4297
|
-
const T = (
|
|
4303
|
+
const T = (y, D, M, E, U) => {
|
|
4298
4304
|
try {
|
|
4299
|
-
const I =
|
|
4305
|
+
const I = y.getBoundingClientRect(), H = M.getBoundingClientRect(), G = Math.round(U.s * I.width), C = Math.round((1 - U.v) * I.height), L = (360 - U.h * 360) / 360 * H.height;
|
|
4300
4306
|
Un(D, G, C), Xn(E, L);
|
|
4301
4307
|
} catch (I) {
|
|
4302
4308
|
console.error("Error updating cursor positions", I);
|
|
4303
4309
|
}
|
|
4304
|
-
}, P = (
|
|
4310
|
+
}, P = (y) => {
|
|
4305
4311
|
try {
|
|
4306
|
-
f(Ie(
|
|
4312
|
+
f(Ie(we(y))), N(y);
|
|
4307
4313
|
} catch {
|
|
4308
4314
|
console.warn("Invalid color format");
|
|
4309
4315
|
}
|
|
4310
|
-
}, B =
|
|
4316
|
+
}, B = k(() => {
|
|
4311
4317
|
s == null || s([...a, _]);
|
|
4312
|
-
}, [s, a, _]), w =
|
|
4318
|
+
}, [s, a, _]), w = k(() => {
|
|
4313
4319
|
r == null || r(_), i && (n == null || n());
|
|
4314
|
-
}, [r, _]), W =
|
|
4315
|
-
(
|
|
4320
|
+
}, [r, _]), W = k(
|
|
4321
|
+
(y, D) => {
|
|
4316
4322
|
const M = Math.min(255, Math.max(0, D));
|
|
4317
|
-
f(Ie({ ...g, [
|
|
4323
|
+
f(Ie({ ...g, [y]: M })), N(ye({ ...g, [y]: M }));
|
|
4318
4324
|
},
|
|
4319
4325
|
[g]
|
|
4320
|
-
), O =
|
|
4321
|
-
N(
|
|
4322
|
-
}, []), A =
|
|
4326
|
+
), O = k((y) => {
|
|
4327
|
+
N(y);
|
|
4328
|
+
}, []), A = k(() => {
|
|
4323
4329
|
l && (r == null || r(l), i && (n == null || n()), P(l));
|
|
4324
4330
|
}, [l, r, P]);
|
|
4325
4331
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -4331,13 +4337,13 @@ const Tr = [
|
|
|
4331
4337
|
style: { width: o, height: c },
|
|
4332
4338
|
children: [
|
|
4333
4339
|
/* @__PURE__ */ e.jsxs("div", { className: "panel-row", style: { padding: 0 }, children: [
|
|
4334
|
-
/* @__PURE__ */ e.jsx("div", { className: "swatches default-swatches", children: Tr.map((
|
|
4340
|
+
/* @__PURE__ */ e.jsx("div", { className: "swatches default-swatches", children: Tr.map((y, D) => /* @__PURE__ */ e.jsx(
|
|
4335
4341
|
"button",
|
|
4336
4342
|
{
|
|
4337
|
-
onClick: () => P(
|
|
4343
|
+
onClick: () => P(y),
|
|
4338
4344
|
className: "swatch",
|
|
4339
|
-
style: { backgroundColor:
|
|
4340
|
-
"aria-label": `Color ${
|
|
4345
|
+
style: { backgroundColor: y },
|
|
4346
|
+
"aria-label": `Color ${y}`
|
|
4341
4347
|
},
|
|
4342
4348
|
D
|
|
4343
4349
|
)) }),
|
|
@@ -4390,9 +4396,9 @@ const Tr = [
|
|
|
4390
4396
|
] })
|
|
4391
4397
|
] }),
|
|
4392
4398
|
/* @__PURE__ */ e.jsxs("div", { className: "panel-row", style: { padding: 0 }, children: [
|
|
4393
|
-
/* @__PURE__ */ e.jsx("div", { className: `field-group value-fields rgb-fields ${j ? "" : "active"}`, children: ["r", "g", "b"].map((
|
|
4399
|
+
/* @__PURE__ */ e.jsx("div", { className: `field-group value-fields rgb-fields ${j ? "" : "active"}`, children: ["r", "g", "b"].map((y) => /* @__PURE__ */ e.jsxs("div", { className: "field-group", children: [
|
|
4394
4400
|
/* @__PURE__ */ e.jsxs("label", { className: "field-label", children: [
|
|
4395
|
-
|
|
4401
|
+
y.toUpperCase(),
|
|
4396
4402
|
":"
|
|
4397
4403
|
] }),
|
|
4398
4404
|
/* @__PURE__ */ e.jsx(
|
|
@@ -4401,13 +4407,13 @@ const Tr = [
|
|
|
4401
4407
|
type: "number",
|
|
4402
4408
|
max: "255",
|
|
4403
4409
|
min: "0",
|
|
4404
|
-
value: g[
|
|
4405
|
-
onChange: (D) => W(
|
|
4410
|
+
value: g[y],
|
|
4411
|
+
onChange: (D) => W(y, Number(D.target.value)),
|
|
4406
4412
|
className: "field-input rgb-input",
|
|
4407
|
-
"aria-label": `${
|
|
4413
|
+
"aria-label": `${y.toUpperCase()} value`
|
|
4408
4414
|
}
|
|
4409
4415
|
)
|
|
4410
|
-
] },
|
|
4416
|
+
] }, y)) }),
|
|
4411
4417
|
/* @__PURE__ */ e.jsxs("div", { className: `field-group value-fields hex-field ${j ? "active" : ""}`, children: [
|
|
4412
4418
|
/* @__PURE__ */ e.jsx("label", { className: "field-label", children: "Hex:" }),
|
|
4413
4419
|
/* @__PURE__ */ e.jsx(
|
|
@@ -4416,7 +4422,7 @@ const Tr = [
|
|
|
4416
4422
|
type: "text",
|
|
4417
4423
|
className: "field-input",
|
|
4418
4424
|
value: S,
|
|
4419
|
-
onChange: (
|
|
4425
|
+
onChange: (y) => O(y.target.value),
|
|
4420
4426
|
"aria-label": "HEX color value"
|
|
4421
4427
|
}
|
|
4422
4428
|
)
|
|
@@ -4425,7 +4431,7 @@ const Tr = [
|
|
|
4425
4431
|
"button",
|
|
4426
4432
|
{
|
|
4427
4433
|
className: "button-color-picker mode-toggle",
|
|
4428
|
-
onClick: () => p((
|
|
4434
|
+
onClick: () => p((y) => !y),
|
|
4429
4435
|
"aria-label": `Switch to ${j ? "RGB" : "HEX"} mode`,
|
|
4430
4436
|
children: "Mode"
|
|
4431
4437
|
}
|
|
@@ -4433,13 +4439,13 @@ const Tr = [
|
|
|
4433
4439
|
] }),
|
|
4434
4440
|
a.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "panel-row", style: { padding: 0 }, children: [
|
|
4435
4441
|
/* @__PURE__ */ e.jsx("h2", { className: "panel-header", children: "User Colors" }),
|
|
4436
|
-
/* @__PURE__ */ e.jsx("div", { id: "user-swatches", className: "swatches custom-swatches", children: a.map((
|
|
4442
|
+
/* @__PURE__ */ e.jsx("div", { id: "user-swatches", className: "swatches custom-swatches", children: a.map((y, D) => /* @__PURE__ */ e.jsx(
|
|
4437
4443
|
"button",
|
|
4438
4444
|
{
|
|
4439
|
-
onClick: () => P(
|
|
4445
|
+
onClick: () => P(y),
|
|
4440
4446
|
className: "swatch",
|
|
4441
|
-
style: { backgroundColor:
|
|
4442
|
-
"aria-label": `User color ${
|
|
4447
|
+
style: { backgroundColor: y },
|
|
4448
|
+
"aria-label": `User color ${y}`
|
|
4443
4449
|
},
|
|
4444
4450
|
D
|
|
4445
4451
|
)) })
|
|
@@ -4501,14 +4507,14 @@ const Tr = [
|
|
|
4501
4507
|
V(() => {
|
|
4502
4508
|
s !== void 0 && x(s);
|
|
4503
4509
|
}, [s]);
|
|
4504
|
-
const f =
|
|
4510
|
+
const f = k(() => {
|
|
4505
4511
|
m(!0);
|
|
4506
|
-
}, []), j =
|
|
4512
|
+
}, []), j = k(
|
|
4507
4513
|
(N) => {
|
|
4508
4514
|
x(N), t == null || t(N), m(!1);
|
|
4509
4515
|
},
|
|
4510
4516
|
[t]
|
|
4511
|
-
), p =
|
|
4517
|
+
), p = k(() => {
|
|
4512
4518
|
m(!1);
|
|
4513
4519
|
}, []), v = [
|
|
4514
4520
|
"input-field",
|
|
@@ -4542,7 +4548,7 @@ const Tr = [
|
|
|
4542
4548
|
}
|
|
4543
4549
|
)
|
|
4544
4550
|
] }),
|
|
4545
|
-
u && /* @__PURE__ */ e.jsx(
|
|
4551
|
+
u && /* @__PURE__ */ e.jsx(ve, { container: r, children: /* @__PURE__ */ e.jsx(
|
|
4546
4552
|
Ar,
|
|
4547
4553
|
{
|
|
4548
4554
|
defaultColor: c,
|
|
@@ -4590,7 +4596,7 @@ const Tr = [
|
|
|
4590
4596
|
), a(_);
|
|
4591
4597
|
}, N = (_) => {
|
|
4592
4598
|
u(_);
|
|
4593
|
-
}, g =
|
|
4599
|
+
}, g = k(() => {
|
|
4594
4600
|
let _ = /* @__PURE__ */ new Date();
|
|
4595
4601
|
_.setFullYear(o), d.type === "NEXT_MONTH" ? l === me[11] ? (_.setMonth(0), _.setFullYear(o + 1)) : _.setMonth(me.indexOf(l) + 1) : d.type === "PREV_MONTH" ? l === me[0] ? (_.setMonth(11), _.setFullYear(o - 1)) : _.setMonth(me.indexOf(l) - 1) : _.setMonth(me.indexOf(l)), _.setDate(d.day), n && n(_.getFullYear(), _.getMonth(), _.getDate()), t && t();
|
|
4596
4602
|
}, [l, o, n, t, d]);
|
|
@@ -4614,10 +4620,10 @@ const Tr = [
|
|
|
4614
4620
|
] }) })
|
|
4615
4621
|
] }),
|
|
4616
4622
|
m === "MONTHS" ? /* @__PURE__ */ e.jsx("div", { className: "calendar-body-months-container", children: me.map((_, S) => /* @__PURE__ */ e.jsxs("div", { className: "calendar-body-months-item", onClick: () => v(_), children: [
|
|
4617
|
-
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: l === _ ? /* @__PURE__ */ e.jsx(
|
|
4623
|
+
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: l === _ ? /* @__PURE__ */ e.jsx(Ce, {}) : null }),
|
|
4618
4624
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: _ })
|
|
4619
4625
|
] }, S)) }) : m === "YEARS" ? /* @__PURE__ */ e.jsx("div", { className: "calendar-body-years-container", children: Ir().map((_, S) => /* @__PURE__ */ e.jsxs("div", { className: "calendar-body-year-item", onClick: () => p(_), children: [
|
|
4620
|
-
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: o === _ ? /* @__PURE__ */ e.jsx(
|
|
4626
|
+
/* @__PURE__ */ e.jsx("div", { className: "status-container", children: o === _ ? /* @__PURE__ */ e.jsx(Ce, {}) : null }),
|
|
4621
4627
|
/* @__PURE__ */ e.jsx("div", { className: "content", children: _ })
|
|
4622
4628
|
] }, S)) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4623
4629
|
/* @__PURE__ */ e.jsxs("div", { className: "calendar-body-dayofweek-container", children: [
|
|
@@ -4662,17 +4668,17 @@ const Tr = [
|
|
|
4662
4668
|
}, A = (I) => {
|
|
4663
4669
|
let H = String(I);
|
|
4664
4670
|
return H.length < 2 && (H = "0" + H), H;
|
|
4665
|
-
},
|
|
4671
|
+
}, y = (I) => {
|
|
4666
4672
|
x == null || x(I), S(!0);
|
|
4667
4673
|
}, D = (I) => {
|
|
4668
4674
|
h == null || h(I), S(!1), P(!!I.target.value);
|
|
4669
|
-
}, M =
|
|
4675
|
+
}, M = k(() => {
|
|
4670
4676
|
v(""), f == null || f(), t == null || t("");
|
|
4671
4677
|
}, [f, t]);
|
|
4672
4678
|
V(() => {
|
|
4673
4679
|
P(!!s);
|
|
4674
4680
|
}, [s]);
|
|
4675
|
-
const E =
|
|
4681
|
+
const E = k((I, H, G) => {
|
|
4676
4682
|
v(`${I}-${O(H)}-${A(G)}`), t && t(`${I}-${O(H)}-${A(G)}`);
|
|
4677
4683
|
}, [t]), U = {
|
|
4678
4684
|
small: "input-field__date-field_small",
|
|
@@ -4701,7 +4707,7 @@ const Tr = [
|
|
|
4701
4707
|
name: r,
|
|
4702
4708
|
value: p,
|
|
4703
4709
|
onBlur: D,
|
|
4704
|
-
onFocus:
|
|
4710
|
+
onFocus: y,
|
|
4705
4711
|
readOnly: !0,
|
|
4706
4712
|
id: B,
|
|
4707
4713
|
...j
|
|
@@ -4723,7 +4729,7 @@ const Tr = [
|
|
|
4723
4729
|
input-field__icon-container_clear-btn
|
|
4724
4730
|
`, onClick: M, children: /* @__PURE__ */ e.jsx(ie, { "aria-label": "Clear input" }) })
|
|
4725
4731
|
] }),
|
|
4726
|
-
N ? /* @__PURE__ */ e.jsx(
|
|
4732
|
+
N ? /* @__PURE__ */ e.jsx(ve, { container: a, children: /* @__PURE__ */ e.jsx(Hr, { onChange: E, onHide: () => g(!1) }) }) : null,
|
|
4727
4733
|
w && o && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__error-text", children: o }),
|
|
4728
4734
|
c && !w && /* @__PURE__ */ e.jsx(K, { type: "small", className: "input-field-container__helper-text", children: c })
|
|
4729
4735
|
] });
|
|
@@ -4746,12 +4752,12 @@ const Tr = [
|
|
|
4746
4752
|
V(() => {
|
|
4747
4753
|
t && l(t);
|
|
4748
4754
|
}, [t]);
|
|
4749
|
-
const a =
|
|
4755
|
+
const a = k((c) => (d) => {
|
|
4750
4756
|
l((u) => {
|
|
4751
4757
|
const m = d.target.checked ? [...u, c] : u.filter((h) => h !== c);
|
|
4752
4758
|
return n == null || n(m), m;
|
|
4753
4759
|
});
|
|
4754
|
-
}, [n]), o =
|
|
4760
|
+
}, [n]), o = k((c) => i.includes(c), [i]);
|
|
4755
4761
|
return /* @__PURE__ */ e.jsx("div", { className: `days-week-field-container ${r}`, children: Br.map((c) => /* @__PURE__ */ e.jsxs("label", { className: "day-of-week-label", children: [
|
|
4756
4762
|
/* @__PURE__ */ e.jsx(
|
|
4757
4763
|
"input",
|
|
@@ -4792,7 +4798,7 @@ const Gr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), pn =
|
|
|
4792
4798
|
N(w);
|
|
4793
4799
|
}, T = (w) => {
|
|
4794
4800
|
w.key === "Enter" && (w.preventDefault(), P());
|
|
4795
|
-
}, P =
|
|
4801
|
+
}, P = k(() => {
|
|
4796
4802
|
if (v.trim() === "" || j.includes(v.trim()))
|
|
4797
4803
|
return;
|
|
4798
4804
|
const w = [...j, v.trim()];
|
|
@@ -4854,7 +4860,7 @@ const Gr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), pn =
|
|
|
4854
4860
|
}
|
|
4855
4861
|
),
|
|
4856
4862
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
4857
|
-
|
|
4863
|
+
Ne,
|
|
4858
4864
|
{
|
|
4859
4865
|
onClick: P,
|
|
4860
4866
|
className: "more-text-btn",
|
|
@@ -4898,26 +4904,26 @@ const Gr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), pn =
|
|
|
4898
4904
|
ariaLabelledby: B,
|
|
4899
4905
|
ariaDescribedby: w
|
|
4900
4906
|
}, W) => {
|
|
4901
|
-
const O = Y(null), A = Y(null),
|
|
4907
|
+
const O = Y(null), A = Y(null), y = Y(null), D = Y(null), [M, E] = b(!1), [U, I] = b(d ?? 0), H = k((z, Z) => E(!!(j || z && (!Z || Z === ""))), [j]), G = () => {
|
|
4902
4908
|
if (!D.current)
|
|
4903
4909
|
return;
|
|
4904
4910
|
const z = D.current.querySelector("input");
|
|
4905
4911
|
z && z.focus();
|
|
4906
|
-
}, C =
|
|
4907
|
-
o && (
|
|
4908
|
-
|
|
4912
|
+
}, C = k((z, Z) => {
|
|
4913
|
+
o && (y.current && (clearTimeout(y.current), y.current = null), y.current = setTimeout(() => {
|
|
4914
|
+
y.current && (clearTimeout(y.current), y.current = null), o(z, Z);
|
|
4909
4915
|
}, 100));
|
|
4910
|
-
}, [o]), L =
|
|
4916
|
+
}, [o]), L = k(() => {
|
|
4911
4917
|
I((z) => {
|
|
4912
4918
|
let Z = z ? z + _ : _;
|
|
4913
4919
|
return typeof p == "number" && Z > p && (Z = p), C(Z, c), Z;
|
|
4914
4920
|
});
|
|
4915
|
-
}, [C, c, p, _]), R =
|
|
4921
|
+
}, [C, c, p, _]), R = k(() => {
|
|
4916
4922
|
I((z) => {
|
|
4917
4923
|
let Z = z ? z - _ : -_;
|
|
4918
4924
|
return typeof v == "number" && Z < v && (Z = v), C(Z, c), Z;
|
|
4919
4925
|
});
|
|
4920
|
-
}, [C, c, v, _]), q =
|
|
4926
|
+
}, [C, c, v, _]), q = k((z) => {
|
|
4921
4927
|
if (z.target.value === "") {
|
|
4922
4928
|
I("");
|
|
4923
4929
|
return;
|
|
@@ -4925,9 +4931,9 @@ const Gr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), pn =
|
|
|
4925
4931
|
z.target.value.length > 1 && z.target.value[0] === "0" && ![",", "."].includes(z.target.value[1]) && (z.target.value = z.target.value.slice(1));
|
|
4926
4932
|
let Z = Number(z.target.value);
|
|
4927
4933
|
typeof v == "number" && Z < v && (Z = v), typeof p == "number" && Z > p && (Z = p), I(Number(z.target.value)), C(Z, c);
|
|
4928
|
-
}, [c, C, U, p, v]), Q =
|
|
4934
|
+
}, [c, C, U, p, v]), Q = k(() => {
|
|
4929
4935
|
O.current && clearTimeout(O.current), A.current && clearInterval(A.current), document.removeEventListener("mouseup", Q);
|
|
4930
|
-
}, []), ne =
|
|
4936
|
+
}, []), ne = k((z) => {
|
|
4931
4937
|
z === "p" ? L() : z === "m" && R(), O.current && clearTimeout(O.current), A.current && clearInterval(A.current), document.addEventListener("mouseup", Q), O.current = setTimeout(() => {
|
|
4932
4938
|
A.current = setInterval(() => {
|
|
4933
4939
|
z === "p" ? L() : z === "m" && R();
|
|
@@ -4939,7 +4945,7 @@ const Gr = (n, t = ",") => n === "" ? [] : n.split(t).map((r) => r.trim()), pn =
|
|
|
4939
4945
|
V(() => {
|
|
4940
4946
|
H(h, d);
|
|
4941
4947
|
}, [d, h, H]), V(() => {
|
|
4942
|
-
d !== void 0 && !
|
|
4948
|
+
d !== void 0 && !y.current && I(d);
|
|
4943
4949
|
}, [d]);
|
|
4944
4950
|
const le = {
|
|
4945
4951
|
small: "input-field__number-field_small",
|
|
@@ -5080,7 +5086,7 @@ const qn = te.forwardRef(
|
|
|
5080
5086
|
rows: S = 3,
|
|
5081
5087
|
onKeyDown: T
|
|
5082
5088
|
}, P) => {
|
|
5083
|
-
const B = Y(null), [w, W] = b(!1), [O, A] = b(!1), [
|
|
5089
|
+
const B = Y(null), [w, W] = b(!1), [O, A] = b(!1), [y, D] = b(!!u), M = We(), E = () => {
|
|
5084
5090
|
var C;
|
|
5085
5091
|
const G = (C = B.current) == null ? void 0 : C.querySelector("textarea");
|
|
5086
5092
|
G == null || G.focus();
|
|
@@ -5088,7 +5094,7 @@ const qn = te.forwardRef(
|
|
|
5088
5094
|
f == null || f(G), A(!0);
|
|
5089
5095
|
}, I = (G) => {
|
|
5090
5096
|
j == null || j(G), A(!1), D(!!G.target.value);
|
|
5091
|
-
}, H =
|
|
5097
|
+
}, H = k(
|
|
5092
5098
|
(G, C) => W(!!(p || G && (!C || C === ""))),
|
|
5093
5099
|
[p]
|
|
5094
5100
|
);
|
|
@@ -5140,7 +5146,7 @@ const qn = te.forwardRef(
|
|
|
5140
5146
|
{
|
|
5141
5147
|
htmlFor: M,
|
|
5142
5148
|
onClick: E,
|
|
5143
|
-
className: `input-field__input-container__label input-field__text-area__label ${
|
|
5149
|
+
className: `input-field__input-container__label input-field__text-area__label ${y ? "input-field__input-container__label_filled" : ""}`,
|
|
5144
5150
|
children: /* @__PURE__ */ e.jsx("span", { className: "input-field__input-container__label__span", children: m })
|
|
5145
5151
|
}
|
|
5146
5152
|
)
|
|
@@ -5156,11 +5162,11 @@ const qn = te.forwardRef(
|
|
|
5156
5162
|
);
|
|
5157
5163
|
qn.displayName = "TextArea";
|
|
5158
5164
|
const Yr = ({ setHours: n, setMinutes: t, switchMode: r, hours: s, minutes: i, onCancel: l, onOK: a }) => {
|
|
5159
|
-
const [o, c] = b(!1), d =
|
|
5165
|
+
const [o, c] = b(!1), d = k((h) => {
|
|
5160
5166
|
n(h), c(!0);
|
|
5161
|
-
}, [n]), u =
|
|
5167
|
+
}, [n]), u = k((h) => {
|
|
5162
5168
|
t(h), c(!1);
|
|
5163
|
-
}, [t]), m =
|
|
5169
|
+
}, [t]), m = k(() => {
|
|
5164
5170
|
c(!1), l();
|
|
5165
5171
|
}, []);
|
|
5166
5172
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -5266,9 +5272,9 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5266
5272
|
}, qr = (n) => {
|
|
5267
5273
|
const [t, r] = b(n.minutes ?? 0), [s, i] = b(n.hours ?? 0), [l, a] = b(!0), o = () => {
|
|
5268
5274
|
n.onHide && n.onHide(), r(0), i(0);
|
|
5269
|
-
}, c =
|
|
5275
|
+
}, c = k((u) => {
|
|
5270
5276
|
r(u), n.onChange && n.onChange(s, u), n.onHide && n.onHide();
|
|
5271
|
-
}, [s]), d =
|
|
5277
|
+
}, [s]), d = k(() => {
|
|
5272
5278
|
n.onChange && n.onChange(s, t), n.onHide && n.onHide();
|
|
5273
5279
|
}, [s, t]);
|
|
5274
5280
|
return l ? /* @__PURE__ */ e.jsx(Ee, { className: "enter-time-container", children: /* @__PURE__ */ e.jsx(Yr, { setMinutes: c, setHours: i, minutes: t, hours: s, switchMode: () => a(!1), onCancel: o, onOK: d }) }) : /* @__PURE__ */ e.jsx(Ee, { className: "enter-time-container", children: /* @__PURE__ */ e.jsx(Kr, { setMinutes: r, setHours: i, minutes: t, hours: s, switchMode: () => a(!0), onCancel: o, onOK: d }) });
|
|
@@ -5298,11 +5304,11 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5298
5304
|
style: N,
|
|
5299
5305
|
...g
|
|
5300
5306
|
}) => {
|
|
5301
|
-
const [_, S] = b(s), [T, P] = b(!1), [B, w] = b(!1), [W, O] = b(!!s), A = We(),
|
|
5307
|
+
const [_, S] = b(s), [T, P] = b(!1), [B, w] = b(!1), [W, O] = b(!!s), A = We(), y = a || !!d;
|
|
5302
5308
|
V(() => {
|
|
5303
5309
|
S(s);
|
|
5304
5310
|
}, [s]);
|
|
5305
|
-
const D =
|
|
5311
|
+
const D = k(() => y || l && !_ ? "error" : "", [_, y, l]), M = (R, q) => {
|
|
5306
5312
|
const Q = String(R).padStart(2, "0"), ne = String(q).padStart(2, "0"), J = `${Q}:${ne}`;
|
|
5307
5313
|
S(J), t == null || t(J);
|
|
5308
5314
|
}, E = () => {
|
|
@@ -5311,13 +5317,13 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5311
5317
|
p == null || p(R), w(!0);
|
|
5312
5318
|
}, I = (R) => {
|
|
5313
5319
|
j == null || j(R), w(!1), O(!!R.target.value);
|
|
5314
|
-
}, H =
|
|
5320
|
+
}, H = k(() => {
|
|
5315
5321
|
S(""), v == null || v(), t == null || t("");
|
|
5316
5322
|
}, [v, t]);
|
|
5317
5323
|
V(() => {
|
|
5318
5324
|
O(!!s);
|
|
5319
5325
|
}, [s]);
|
|
5320
|
-
const G = _ && parseInt(_.split(":")[0]) || 0, C = _ && parseInt(_.split(":")[1]) || 0, L = oe(() =>
|
|
5326
|
+
const G = _ && parseInt(_.split(":")[0]) || 0, C = _ && parseInt(_.split(":")[1]) || 0, L = oe(() => y && d ? /* @__PURE__ */ e.jsx(
|
|
5321
5327
|
K,
|
|
5322
5328
|
{
|
|
5323
5329
|
type: "small",
|
|
@@ -5326,7 +5332,7 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5326
5332
|
id: `${r}-error`,
|
|
5327
5333
|
children: d
|
|
5328
5334
|
}
|
|
5329
|
-
) : u && !
|
|
5335
|
+
) : u && !y ? /* @__PURE__ */ e.jsx(
|
|
5330
5336
|
K,
|
|
5331
5337
|
{
|
|
5332
5338
|
type: "small",
|
|
@@ -5334,7 +5340,7 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5334
5340
|
id: `${r}-helper`,
|
|
5335
5341
|
children: u
|
|
5336
5342
|
}
|
|
5337
|
-
) : null, [
|
|
5343
|
+
) : null, [y, d, u, r]);
|
|
5338
5344
|
return /* @__PURE__ */ e.jsxs("div", { className: `input-field-container ${i}`, children: [
|
|
5339
5345
|
/* @__PURE__ */ e.jsxs(
|
|
5340
5346
|
"div",
|
|
@@ -5345,7 +5351,7 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5345
5351
|
${Jr[h]}
|
|
5346
5352
|
${n ? "input-field_border" : ""}
|
|
5347
5353
|
${B ? "input-field_active" : ""}
|
|
5348
|
-
${
|
|
5354
|
+
${y ? "input-field_error" : ""}
|
|
5349
5355
|
${c ? "input-field_disabled" : ""}
|
|
5350
5356
|
`,
|
|
5351
5357
|
"aria-disabled": c,
|
|
@@ -5377,8 +5383,8 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5377
5383
|
onFocus: U,
|
|
5378
5384
|
disabled: c,
|
|
5379
5385
|
"aria-labelledby": x,
|
|
5380
|
-
"aria-invalid":
|
|
5381
|
-
"aria-describedby":
|
|
5386
|
+
"aria-invalid": y,
|
|
5387
|
+
"aria-describedby": y && d ? `${r}-error` : u ? `${r}-helper` : void 0
|
|
5382
5388
|
}
|
|
5383
5389
|
),
|
|
5384
5390
|
f && /* @__PURE__ */ e.jsx(
|
|
@@ -5401,7 +5407,7 @@ const Kr = ({ setHours: n, setMinutes: t, switchMode: r, minutes: s, hours: i, o
|
|
|
5401
5407
|
}
|
|
5402
5408
|
),
|
|
5403
5409
|
L,
|
|
5404
|
-
T && /* @__PURE__ */ e.jsx(
|
|
5410
|
+
T && /* @__PURE__ */ e.jsx(ve, { container: o, children: /* @__PURE__ */ e.jsx(
|
|
5405
5411
|
qr,
|
|
5406
5412
|
{
|
|
5407
5413
|
onHide: () => P(!1),
|
|
@@ -5429,9 +5435,9 @@ const qe = 0, Je = 100, Ks = ({ showValue: n = !0, ...t }) => {
|
|
|
5429
5435
|
return es(h, x, f, 0, f - x) * (j.width - 20) / (f - x);
|
|
5430
5436
|
}
|
|
5431
5437
|
return 0;
|
|
5432
|
-
}, u =
|
|
5438
|
+
}, u = k((h) => {
|
|
5433
5439
|
l(!0), t.onFocus && t.onFocus(h);
|
|
5434
|
-
}, [t.onFocus]), m =
|
|
5440
|
+
}, [t.onFocus]), m = k((h) => {
|
|
5435
5441
|
l(!1), t.onBlur && t.onBlur(h);
|
|
5436
5442
|
}, [t.onBlur]);
|
|
5437
5443
|
return /* @__PURE__ */ e.jsx("div", { className: `range ${t.disabled ? "disabled" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "field", style: t.style, children: [
|
|
@@ -5448,20 +5454,20 @@ const qe = 0, Je = 100, Ks = ({ showValue: n = !0, ...t }) => {
|
|
|
5448
5454
|
}, qs = ({ className: n, text: t, title: r, hexColor: s, hexBackground: i, style: l, btn: a }) => /* @__PURE__ */ e.jsxs("div", { className: `alex-evo-sh-ui-kit-empty-page ${n ?? ""}`, style: { background: Qt(i), color: s, ...l }, children: [
|
|
5449
5455
|
/* @__PURE__ */ e.jsx("h2", { children: r }),
|
|
5450
5456
|
t ? /* @__PURE__ */ e.jsx("p", { children: t }) : null,
|
|
5451
|
-
a ? /* @__PURE__ */ e.jsx(
|
|
5457
|
+
a ? /* @__PURE__ */ e.jsx(Ne, { styleType: a.styleType ?? "filled", style: a.style, className: a.className, onClick: a.onClick, children: a.text }) : null
|
|
5452
5458
|
] }), ns = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: l, onlyStringValue: a }) => {
|
|
5453
|
-
const [o, c] = b(""), [d, u] = b(""), [m, h] = b(!1), [x, f] = b(!0), j =
|
|
5459
|
+
const [o, c] = b(""), [d, u] = b(""), [m, h] = b(!1), [x, f] = b(!0), j = k((g, _) => {
|
|
5454
5460
|
s({ ...r, [_]: g });
|
|
5455
|
-
}, [s, r]), p =
|
|
5461
|
+
}, [s, r]), p = k(() => {
|
|
5456
5462
|
u(""), c(""), h(!1);
|
|
5457
|
-
}, []), v =
|
|
5463
|
+
}, []), v = k(() => {
|
|
5458
5464
|
let g = d;
|
|
5459
5465
|
try {
|
|
5460
5466
|
a || (g = JSON.parse(g));
|
|
5461
5467
|
} catch {
|
|
5462
5468
|
}
|
|
5463
5469
|
p(), s({ ...r, [o]: g });
|
|
5464
|
-
}, [r, s, o, d, p]), N =
|
|
5470
|
+
}, [r, s, o, d, p]), N = k((g) => {
|
|
5465
5471
|
let _ = { ...r };
|
|
5466
5472
|
delete _[g], s(_);
|
|
5467
5473
|
}, [r, s]);
|
|
@@ -5491,19 +5497,19 @@ const qe = 0, Je = 100, Ks = ({ showValue: n = !0, ...t }) => {
|
|
|
5491
5497
|
] })
|
|
5492
5498
|
] }) });
|
|
5493
5499
|
}, ts = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, initComponent: l, onlyStringValue: a }) => {
|
|
5494
|
-
const [o, c] = b(""), [d, u] = b(!1), [m, h] = b(!0), x =
|
|
5500
|
+
const [o, c] = b(""), [d, u] = b(!1), [m, h] = b(!0), x = k((v, N) => {
|
|
5495
5501
|
const g = r.slice();
|
|
5496
5502
|
g[N] = v, s(g);
|
|
5497
|
-
}, [s, r]), f =
|
|
5503
|
+
}, [s, r]), f = k(() => {
|
|
5498
5504
|
c(""), u(!1);
|
|
5499
|
-
}, []), j =
|
|
5505
|
+
}, []), j = k(() => {
|
|
5500
5506
|
let v = o;
|
|
5501
5507
|
try {
|
|
5502
5508
|
a || (v = JSON.parse(v));
|
|
5503
5509
|
} catch {
|
|
5504
5510
|
}
|
|
5505
5511
|
f(), s([...r, v]);
|
|
5506
|
-
}, [r, s, o, f]), p =
|
|
5512
|
+
}, [r, s, o, f]), p = k((v) => {
|
|
5507
5513
|
s(r.filter((N, g) => g !== v));
|
|
5508
5514
|
}, [r, s]);
|
|
5509
5515
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
@@ -5528,7 +5534,7 @@ const qe = 0, Je = 100, Ks = ({ showValue: n = !0, ...t }) => {
|
|
|
5528
5534
|
] })
|
|
5529
5535
|
] }) });
|
|
5530
5536
|
}, rs = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i }) => {
|
|
5531
|
-
const l =
|
|
5537
|
+
const l = k((a) => {
|
|
5532
5538
|
s(a.target.value);
|
|
5533
5539
|
}, [s]);
|
|
5534
5540
|
return /* @__PURE__ */ e.jsx("div", { className: `json-card-container ${n ? "" : "changeable"}`, children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "json-line", children: [
|
|
@@ -5542,11 +5548,11 @@ const qe = 0, Je = 100, Ks = ({ showValue: n = !0, ...t }) => {
|
|
|
5542
5548
|
};
|
|
5543
5549
|
var Jn = /* @__PURE__ */ ((n) => (n.NONE = "NONE", n.ARRAY = "ARRAY", n.OBJECT = "OBJECT", n))(Jn || {});
|
|
5544
5550
|
const an = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: l, onlyStringValue: a }) => typeof r == "boolean" || typeof r == "number" || typeof r == "string" ? /* @__PURE__ */ e.jsx(rs, { readonly: n, onDelete: i, onChange: s, data: r, name: t }) : r ? Array.isArray(r) ? /* @__PURE__ */ e.jsx(ts, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: l === "ARRAY", onlyStringValue: a }) : /* @__PURE__ */ e.jsx(ns, { readonly: n, onDelete: i, onChange: s, data: r, name: t, initComponent: l === "OBJECT", onlyStringValue: a }) : null, Js = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType: l = Jn.NONE, onlyStringValue: a }) => {
|
|
5545
|
-
const [o, c] = b(r || void 0), [d, u] = b(""), m =
|
|
5551
|
+
const [o, c] = b(r || void 0), [d, u] = b(""), m = k((f) => {
|
|
5546
5552
|
n || (c(f), s && s(f));
|
|
5547
|
-
}, [s]), h =
|
|
5553
|
+
}, [s]), h = k(() => {
|
|
5548
5554
|
n || (c(void 0), i && i());
|
|
5549
|
-
}, [i]), x =
|
|
5555
|
+
}, [i]), x = k(() => {
|
|
5550
5556
|
if (n)
|
|
5551
5557
|
return;
|
|
5552
5558
|
let f = d;
|
|
@@ -5657,7 +5663,7 @@ const an = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5657
5663
|
/* @__PURE__ */ e.jsx("input", { placeholder: t, type: "text", ref: o, onChange: v, onKeyDown: N, value: c, onFocus: () => m(!0) }),
|
|
5658
5664
|
u ? /* @__PURE__ */ e.jsx("span", { onClick: j, children: /* @__PURE__ */ e.jsx(ie, {}) }) : /* @__PURE__ */ e.jsx("span", { onClick: f, children: /* @__PURE__ */ e.jsx(rn, {}) })
|
|
5659
5665
|
] }) }),
|
|
5660
|
-
/* @__PURE__ */ e.jsx(
|
|
5666
|
+
/* @__PURE__ */ e.jsx(ve, { container: document.body, children: /* @__PURE__ */ e.jsx(ss, { point: h ?? void 0, onClose: () => x(null), isOpen: !!h, filters: s, selectedFilters: i, onChange: l }) })
|
|
5661
5667
|
] });
|
|
5662
5668
|
}, is = ({ visible: n, text: t, option: r }) => {
|
|
5663
5669
|
const [s, i] = b(n), [l, a] = b(!1);
|
|
@@ -5718,9 +5724,9 @@ const an = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5718
5724
|
V(() => {
|
|
5719
5725
|
S(_n(s, l ?? ""));
|
|
5720
5726
|
}, [l, s]);
|
|
5721
|
-
const O =
|
|
5727
|
+
const O = k((M) => {
|
|
5722
5728
|
S(_n(s, M)), i && i(M), w(!1);
|
|
5723
|
-
}, [s, i]), A =
|
|
5729
|
+
}, [s, i]), A = k((M) => typeof M == "string" ? { title: M, onClick: () => O(M) } : { title: M.title, onClick: () => O(M.value), icon: M.icon, disabled: M.disabled }, [O]), y = k((M) => {
|
|
5724
5730
|
if (N) return;
|
|
5725
5731
|
M.preventDefault();
|
|
5726
5732
|
let E = Ue(M.currentTarget), U = (E == null ? void 0 : E.left) ?? M.pageX, I = E != null && E.top ? E.top + E.height : M.pageY;
|
|
@@ -5740,7 +5746,7 @@ const an = ({ readonly: n, name: t, data: r, onChange: s, onDelete: i, baseType:
|
|
|
5740
5746
|
${j ? "input-field_transparent" : ""}
|
|
5741
5747
|
${W ? "input-field_error" : ""}
|
|
5742
5748
|
${N ? "input-field_disabled" : ""}
|
|
5743
|
-
`, children: /* @__PURE__ */ e.jsxs("div", { className: "input-field__input-container", onClick:
|
|
5749
|
+
`, children: /* @__PURE__ */ e.jsxs("div", { className: "input-field__input-container", onClick: y, children: [
|
|
5744
5750
|
/* @__PURE__ */ e.jsx(
|
|
5745
5751
|
"input",
|
|
5746
5752
|
{
|
|
@@ -5782,7 +5788,7 @@ const ls = ({ icons: n, value: t, onChange: r, disabled: s, placeholder: i, cont
|
|
|
5782
5788
|
placeholder: i
|
|
5783
5789
|
}
|
|
5784
5790
|
),
|
|
5785
|
-
a && /* @__PURE__ */ e.jsx(
|
|
5791
|
+
a && /* @__PURE__ */ e.jsx(ve, { container: l, children: /* @__PURE__ */ e.jsx(
|
|
5786
5792
|
xr,
|
|
5787
5793
|
{
|
|
5788
5794
|
header: "Icons",
|
|
@@ -5816,7 +5822,7 @@ const ls = ({ icons: n, value: t, onChange: r, disabled: s, placeholder: i, cont
|
|
|
5816
5822
|
MoreVertical: wn,
|
|
5817
5823
|
CircleMinus: Ze,
|
|
5818
5824
|
Calendar: Nn,
|
|
5819
|
-
Check:
|
|
5825
|
+
Check: Ce,
|
|
5820
5826
|
ChevronDown: He,
|
|
5821
5827
|
CirclePlus: sn,
|
|
5822
5828
|
Clock: nn,
|
|
@@ -5858,9 +5864,9 @@ const cs = {
|
|
|
5858
5864
|
}
|
|
5859
5865
|
}, os = Be(cs), ri = ({ children: n }) => {
|
|
5860
5866
|
var a;
|
|
5861
|
-
const [t, r] = b({ visible: !1, text: "" }), s = Y(null), i =
|
|
5867
|
+
const [t, r] = b({ visible: !1, text: "" }), s = Y(null), i = k((o, c) => {
|
|
5862
5868
|
r({ visible: !0, text: o, option: c }), s.current && clearTimeout(s.current), c != null && c.closeButton || (s.current = setTimeout(() => l(), (c == null ? void 0 : c.delay) ?? 3e3));
|
|
5863
|
-
}, []), l =
|
|
5869
|
+
}, []), l = k(() => {
|
|
5864
5870
|
s.current && (clearTimeout(s.current), s.current = null), r({ visible: !1, text: "" });
|
|
5865
5871
|
}, []);
|
|
5866
5872
|
return /* @__PURE__ */ e.jsxs(os.Provider, { value: { showSnackbar: i, hideSnackbar: l }, children: [
|
|
@@ -5879,7 +5885,7 @@ const cs = {
|
|
|
5879
5885
|
] });
|
|
5880
5886
|
}, nt = Be({});
|
|
5881
5887
|
function ds() {
|
|
5882
|
-
return
|
|
5888
|
+
return je(nt);
|
|
5883
5889
|
}
|
|
5884
5890
|
function us(n) {
|
|
5885
5891
|
return typeof n == "string";
|
|
@@ -5890,15 +5896,15 @@ function hs(n) {
|
|
|
5890
5896
|
function xs(n) {
|
|
5891
5897
|
return typeof n == "boolean";
|
|
5892
5898
|
}
|
|
5893
|
-
const
|
|
5894
|
-
const { value: t, changeField: r, errors: s } = ds(), i =
|
|
5899
|
+
const pe = (n) => {
|
|
5900
|
+
const { value: t, changeField: r, errors: s } = ds(), i = k((c) => {
|
|
5895
5901
|
r && r(n, c);
|
|
5896
|
-
}, [n]), l =
|
|
5902
|
+
}, [n]), l = k(() => {
|
|
5897
5903
|
const c = t == null ? void 0 : t[n];
|
|
5898
5904
|
return xs(c) ? !!c : hs(c) ? Number(c) : us(c) ? c ?? "" : "";
|
|
5899
|
-
}, [t, n]), a =
|
|
5905
|
+
}, [t, n]), a = k(() => {
|
|
5900
5906
|
r && r(n, "");
|
|
5901
|
-
}, [n]), o =
|
|
5907
|
+
}, [n]), o = k(() => {
|
|
5902
5908
|
if (s && Object.keys(s).includes(n))
|
|
5903
5909
|
return s[n];
|
|
5904
5910
|
}, [s, n]);
|
|
@@ -5909,16 +5915,16 @@ const je = (n) => {
|
|
|
5909
5915
|
change: i
|
|
5910
5916
|
};
|
|
5911
5917
|
}, ms = (n) => {
|
|
5912
|
-
const { value: t, change: r, error: s } =
|
|
5918
|
+
const { value: t, change: r, error: s } = pe(n.name);
|
|
5913
5919
|
return /* @__PURE__ */ e.jsx(Zr, { ...n, onChange: r, value: String(t), errorText: s, error: !!s });
|
|
5914
5920
|
}, fs = (n) => {
|
|
5915
|
-
const { value: t, change: r, error: s } =
|
|
5921
|
+
const { value: t, change: r, error: s } = pe(n.name);
|
|
5916
5922
|
return /* @__PURE__ */ e.jsx(Kn, { ...n, value: Number(t), onChange: r, errorText: s, error: !!s });
|
|
5917
5923
|
}, js = (n) => {
|
|
5918
|
-
const { value: t, change: r, error: s } =
|
|
5924
|
+
const { value: t, change: r, error: s } = pe(n.name);
|
|
5919
5925
|
return /* @__PURE__ */ e.jsx(Qn, { ...n, container: n.container ?? document.body, value: t, onChange: r, errorText: s, error: !!s });
|
|
5920
5926
|
}, ps = ({ placeholder: n, ref: t, style: r, readOnly: s, className: i, name: l }) => {
|
|
5921
|
-
const { value: a, change: o } =
|
|
5927
|
+
const { value: a, change: o } = pe(l), c = (d) => {
|
|
5922
5928
|
o && o(d.target.checked);
|
|
5923
5929
|
};
|
|
5924
5930
|
return /* @__PURE__ */ e.jsx("div", { className: `input-field form-switch ${i}`, style: r, children: /* @__PURE__ */ e.jsx(
|
|
@@ -5933,11 +5939,11 @@ const je = (n) => {
|
|
|
5933
5939
|
}
|
|
5934
5940
|
) });
|
|
5935
5941
|
}, _s = ({ placeholder: n, ref: t, style: r, readOnly: s, className: i, name: l }) => {
|
|
5936
|
-
const { value: a, change: o } =
|
|
5942
|
+
const { value: a, change: o } = pe(l), c = (u) => {
|
|
5937
5943
|
if (u.length > 0)
|
|
5938
5944
|
return o && o(!0);
|
|
5939
5945
|
o && o(!1);
|
|
5940
|
-
}, d =
|
|
5946
|
+
}, d = k(() => a ? [n ?? l] : [], [a, l, n]);
|
|
5941
5947
|
return /* @__PURE__ */ e.jsx(
|
|
5942
5948
|
Wn,
|
|
5943
5949
|
{
|
|
@@ -5952,7 +5958,7 @@ const je = (n) => {
|
|
|
5952
5958
|
}
|
|
5953
5959
|
);
|
|
5954
5960
|
}, Cs = (n) => {
|
|
5955
|
-
const { error: t, value: r, change: s, clearHandler: i } =
|
|
5961
|
+
const { error: t, value: r, change: s, clearHandler: i } = pe(n.name);
|
|
5956
5962
|
return /* @__PURE__ */ e.jsx(
|
|
5957
5963
|
Ve,
|
|
5958
5964
|
{
|
|
@@ -5965,10 +5971,10 @@ const je = (n) => {
|
|
|
5965
5971
|
}
|
|
5966
5972
|
);
|
|
5967
5973
|
}, vs = (n) => {
|
|
5968
|
-
const { error: t, value: r, change: s, clearHandler: i } =
|
|
5974
|
+
const { error: t, value: r, change: s, clearHandler: i } = pe(n.name);
|
|
5969
5975
|
return /* @__PURE__ */ e.jsx(qn, { ...n, onChange: s, onClear: n.clear ? i : void 0, value: String(r), error: !!t, errorText: t });
|
|
5970
5976
|
}, gs = (n) => {
|
|
5971
|
-
const { error: t, value: r, change: s } =
|
|
5977
|
+
const { error: t, value: r, change: s } = pe(n.name);
|
|
5972
5978
|
return /* @__PURE__ */ e.jsx(
|
|
5973
5979
|
zr,
|
|
5974
5980
|
{
|
|
@@ -5980,7 +5986,7 @@ const je = (n) => {
|
|
|
5980
5986
|
}
|
|
5981
5987
|
);
|
|
5982
5988
|
}, bs = (n) => {
|
|
5983
|
-
const { error: t, value: r, change: s } =
|
|
5989
|
+
const { error: t, value: r, change: s } = pe(n.name);
|
|
5984
5990
|
return /* @__PURE__ */ e.jsx(
|
|
5985
5991
|
Qr,
|
|
5986
5992
|
{
|
|
@@ -5993,9 +5999,9 @@ const je = (n) => {
|
|
|
5993
5999
|
);
|
|
5994
6000
|
}, ks = fe(
|
|
5995
6001
|
function({ children: t, value: r, name: s, errors: i, onFinish: l, onChangeValue: a, ...o }, c) {
|
|
5996
|
-
const [d, u] = b(r), m =
|
|
6002
|
+
const [d, u] = b(r), m = k((x) => {
|
|
5997
6003
|
x.preventDefault(), l == null || l(d);
|
|
5998
|
-
}, [l, d]), h =
|
|
6004
|
+
}, [l, d]), h = k((x, f) => {
|
|
5999
6005
|
u((j) => ({
|
|
6000
6006
|
...j,
|
|
6001
6007
|
[x]: f
|
|
@@ -6036,10 +6042,10 @@ export {
|
|
|
6036
6042
|
Ee as BasicTemplateDialog,
|
|
6037
6043
|
Ds as BigContainer,
|
|
6038
6044
|
gn as BottomSheetsUi,
|
|
6039
|
-
|
|
6045
|
+
Ne as Button,
|
|
6040
6046
|
Nn as Calendar,
|
|
6041
6047
|
fr as Card,
|
|
6042
|
-
|
|
6048
|
+
Ce as Check,
|
|
6043
6049
|
zn as Checkbox,
|
|
6044
6050
|
He as ChevronDown,
|
|
6045
6051
|
Pn as Chips,
|
|
@@ -6073,7 +6079,7 @@ export {
|
|
|
6073
6079
|
Ps as GridLayout,
|
|
6074
6080
|
zs as GridLayoutItem,
|
|
6075
6081
|
Ft as Group,
|
|
6076
|
-
|
|
6082
|
+
we as HEXtoRGB,
|
|
6077
6083
|
Ls as HSLtoHSV,
|
|
6078
6084
|
$s as HSVtoHSL,
|
|
6079
6085
|
Le as HSVtoRGB,
|
|
@@ -6094,7 +6100,7 @@ export {
|
|
|
6094
6100
|
Rn as Minus,
|
|
6095
6101
|
$t as MinusUserIcon,
|
|
6096
6102
|
Ye as ModalDialogTemplate,
|
|
6097
|
-
|
|
6103
|
+
ve as ModalPortal,
|
|
6098
6104
|
Ge as ModalTemplate,
|
|
6099
6105
|
ze as MoreHorizontal,
|
|
6100
6106
|
Zr as MoreText,
|
|
@@ -6130,7 +6136,7 @@ export {
|
|
|
6130
6136
|
zt as Sensor2,
|
|
6131
6137
|
Pt as Sensor3,
|
|
6132
6138
|
Bt as SensorWarning,
|
|
6133
|
-
|
|
6139
|
+
ge as SizeContext,
|
|
6134
6140
|
Ss as SizeProvider,
|
|
6135
6141
|
Ks as Slider,
|
|
6136
6142
|
hr as SmallWindowMenu,
|