@efficiency-point/design-system 0.1.45 → 0.1.46
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/README.md +6 -0
- package/dist/components/DSFloating/DSFloating.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +212 -202
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3505,37 +3505,47 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3505
3505
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3506
3506
|
};
|
|
3507
3507
|
}, [t]), n ? _(e, n) : null;
|
|
3508
|
-
}, un = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3509
|
-
let o =
|
|
3508
|
+
}, un = typeof window > "u" ? d : p, dn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3509
|
+
let [o, s] = g(null), [c, u] = g({
|
|
3510
3510
|
position: "fixed",
|
|
3511
3511
|
visibility: "hidden",
|
|
3512
3512
|
zIndex: 1100
|
|
3513
|
-
}),
|
|
3514
|
-
let t = e.current, n = o
|
|
3513
|
+
}), d = l(() => {
|
|
3514
|
+
let t = e.current, n = o;
|
|
3515
3515
|
if (!t || !n) return;
|
|
3516
|
-
let a = t.getBoundingClientRect(), s = n.getBoundingClientRect(),
|
|
3517
|
-
c({
|
|
3516
|
+
let a = t.getBoundingClientRect(), s = n.getBoundingClientRect(), c = window.innerHeight - a.bottom - 8, l = a.top - 8, d = (c >= s.height || c >= l ? "bottom" : "top") == "bottom" ? a.bottom + i : a.top - s.height - i, f = a.left, p = window.innerWidth - s.width - 8, m = Math.max(8, Math.min(f, p)), h = {
|
|
3518
3517
|
position: "fixed",
|
|
3519
|
-
top:
|
|
3518
|
+
top: Math.max(8, Math.min(d, window.innerHeight - s.height - 8)),
|
|
3520
3519
|
left: m,
|
|
3521
3520
|
...r ? { width: a.width } : {},
|
|
3522
3521
|
zIndex: 1100,
|
|
3523
3522
|
visibility: "visible"
|
|
3524
|
-
}
|
|
3523
|
+
};
|
|
3524
|
+
u((e) => e.top === h.top && e.left === h.left && e.width === h.width && e.visibility === h.visibility ? e : h);
|
|
3525
3525
|
}, [
|
|
3526
3526
|
e,
|
|
3527
3527
|
r,
|
|
3528
|
+
o,
|
|
3528
3529
|
i
|
|
3529
3530
|
]);
|
|
3530
|
-
return
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3531
|
+
return un(() => {
|
|
3532
|
+
if (!o) return;
|
|
3533
|
+
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3534
|
+
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
3535
|
+
return t?.observe(o), e.current && t?.observe(e.current), () => {
|
|
3536
|
+
window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), t?.disconnect();
|
|
3537
|
+
};
|
|
3538
|
+
}, [
|
|
3539
|
+
e,
|
|
3540
|
+
o,
|
|
3541
|
+
d
|
|
3542
|
+
]), /* @__PURE__ */ t(ln, { children: /* @__PURE__ */ t("div", {
|
|
3543
|
+
ref: s,
|
|
3534
3544
|
className: a,
|
|
3535
|
-
style:
|
|
3545
|
+
style: c,
|
|
3536
3546
|
children: n
|
|
3537
3547
|
}) });
|
|
3538
|
-
},
|
|
3548
|
+
}, fn = {
|
|
3539
3549
|
wrapper: "_wrapper_x2gki_1",
|
|
3540
3550
|
control: "_control_x2gki_15",
|
|
3541
3551
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3549,12 +3559,12 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3549
3559
|
clearAction: "_clearAction_x2gki_171",
|
|
3550
3560
|
messages: "_messages_x2gki_251",
|
|
3551
3561
|
counter: "_counter_x2gki_265"
|
|
3552
|
-
},
|
|
3553
|
-
function
|
|
3562
|
+
}, pn = 2;
|
|
3563
|
+
function mn(e) {
|
|
3554
3564
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3555
3565
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3556
3566
|
}
|
|
3557
|
-
function
|
|
3567
|
+
function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = pn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3558
3568
|
let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, P = [
|
|
3559
3569
|
A,
|
|
3560
3570
|
j,
|
|
@@ -3562,7 +3572,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3562
3572
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3563
3573
|
let e = k.current;
|
|
3564
3574
|
if (!e || !T) return;
|
|
3565
|
-
let t = window.getComputedStyle(e), n =
|
|
3575
|
+
let t = window.getComputedStyle(e), n = mn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
|
|
3566
3576
|
e.style.height = "auto";
|
|
3567
3577
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3568
3578
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3594,7 +3604,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3594
3604
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3595
3605
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3596
3606
|
return /* @__PURE__ */ n("div", {
|
|
3597
|
-
className: `${
|
|
3607
|
+
className: `${fn.wrapper} ${m}`,
|
|
3598
3608
|
children: [
|
|
3599
3609
|
c && /* @__PURE__ */ t(ee, {
|
|
3600
3610
|
htmlFor: O,
|
|
@@ -3604,12 +3614,12 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3604
3614
|
}),
|
|
3605
3615
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3606
3616
|
id: O,
|
|
3607
|
-
className: `${
|
|
3617
|
+
className: `${fn.disabledText} ${fn[v]}`,
|
|
3608
3618
|
style: B,
|
|
3609
3619
|
"aria-describedby": P,
|
|
3610
3620
|
children: e || i
|
|
3611
3621
|
}) : /* @__PURE__ */ n("div", {
|
|
3612
|
-
className:
|
|
3622
|
+
className: fn.control,
|
|
3613
3623
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3614
3624
|
ref: k,
|
|
3615
3625
|
id: O,
|
|
@@ -3624,12 +3634,12 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3624
3634
|
style: B,
|
|
3625
3635
|
"aria-invalid": !!u,
|
|
3626
3636
|
"aria-describedby": P,
|
|
3627
|
-
className: `${
|
|
3637
|
+
className: `${fn.textarea} ${fn[v]} ${T ? fn.autoResize : fn.manualResize} ${u ? fn.textareaError : ""}`,
|
|
3628
3638
|
onChange: R,
|
|
3629
3639
|
...E
|
|
3630
3640
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3631
3641
|
type: "button",
|
|
3632
|
-
className:
|
|
3642
|
+
className: fn.clearAction,
|
|
3633
3643
|
"aria-label": "Очистить поле",
|
|
3634
3644
|
onClick: z,
|
|
3635
3645
|
children: /* @__PURE__ */ t(Y, {
|
|
@@ -3640,7 +3650,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3640
3650
|
})]
|
|
3641
3651
|
}),
|
|
3642
3652
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3643
|
-
className:
|
|
3653
|
+
className: fn.messages,
|
|
3644
3654
|
children: [
|
|
3645
3655
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3646
3656
|
id: A,
|
|
@@ -3653,7 +3663,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3653
3663
|
}),
|
|
3654
3664
|
M && /* @__PURE__ */ n("span", {
|
|
3655
3665
|
id: M,
|
|
3656
|
-
className:
|
|
3666
|
+
className: fn.counter,
|
|
3657
3667
|
children: [
|
|
3658
3668
|
e.length,
|
|
3659
3669
|
" / ",
|
|
@@ -3667,11 +3677,11 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3667
3677
|
}
|
|
3668
3678
|
//#endregion
|
|
3669
3679
|
//#region src/components/DSModal/modal.store.ts
|
|
3670
|
-
var
|
|
3680
|
+
var gn = 0, _n = S((e, t) => ({
|
|
3671
3681
|
modals: [],
|
|
3672
3682
|
openModal: (t, n = {}, r = {}) => {
|
|
3673
|
-
|
|
3674
|
-
let i = `ds-modal-${
|
|
3683
|
+
gn += 1;
|
|
3684
|
+
let i = `ds-modal-${gn}`;
|
|
3675
3685
|
return e((e) => ({ modals: [...e.modals, {
|
|
3676
3686
|
id: i,
|
|
3677
3687
|
name: t,
|
|
@@ -3695,10 +3705,10 @@ var hn = 0, gn = S((e, t) => ({
|
|
|
3695
3705
|
let n = t().modals;
|
|
3696
3706
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3697
3707
|
}
|
|
3698
|
-
})),
|
|
3699
|
-
|
|
3700
|
-
},
|
|
3701
|
-
function
|
|
3708
|
+
})), vn = () => {
|
|
3709
|
+
_n.getState().closeAllModals(), gn = 0;
|
|
3710
|
+
}, yn = 8, bn = 96, xn = .55;
|
|
3711
|
+
function Sn(e, t, n) {
|
|
3702
3712
|
return {
|
|
3703
3713
|
startX: e,
|
|
3704
3714
|
startY: t,
|
|
@@ -3706,16 +3716,16 @@ function xn(e, t, n) {
|
|
|
3706
3716
|
intent: "pending"
|
|
3707
3717
|
};
|
|
3708
3718
|
}
|
|
3709
|
-
function
|
|
3719
|
+
function Cn(e, t, n) {
|
|
3710
3720
|
let r = t - e.startX, i = n - e.startY;
|
|
3711
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3721
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= yn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3712
3722
|
}
|
|
3713
|
-
function
|
|
3723
|
+
function wn(e, t, n) {
|
|
3714
3724
|
if (e.intent !== "vertical") return !1;
|
|
3715
3725
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3716
|
-
return r >=
|
|
3726
|
+
return r >= bn || r >= 32 && r / i >= xn;
|
|
3717
3727
|
}
|
|
3718
|
-
var
|
|
3728
|
+
var Tn = {
|
|
3719
3729
|
layer: "_layer_w9isk_1",
|
|
3720
3730
|
backdrop: "_backdrop_w9isk_15",
|
|
3721
3731
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3728,10 +3738,10 @@ var wn = {
|
|
|
3728
3738
|
close: "_close_w9isk_141",
|
|
3729
3739
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3730
3740
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3731
|
-
},
|
|
3732
|
-
function
|
|
3741
|
+
}, En = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Dn = a({});
|
|
3742
|
+
function On(e) {
|
|
3733
3743
|
if (e.key !== "Tab") return;
|
|
3734
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3744
|
+
let t = Array.from(e.currentTarget.querySelectorAll(En));
|
|
3735
3745
|
if (!t.length) {
|
|
3736
3746
|
e.preventDefault();
|
|
3737
3747
|
return;
|
|
@@ -3739,18 +3749,18 @@ function Dn(e) {
|
|
|
3739
3749
|
let n = t[0], r = t.at(-1);
|
|
3740
3750
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3741
3751
|
}
|
|
3742
|
-
var
|
|
3743
|
-
let l = u(
|
|
3752
|
+
var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3753
|
+
let l = u(Dn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = _n((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3744
3754
|
d(() => {
|
|
3745
3755
|
let e = document.activeElement, t = y.current;
|
|
3746
|
-
return (t?.querySelector(
|
|
3756
|
+
return (t?.querySelector(En) ?? t)?.focus(), () => e?.focus();
|
|
3747
3757
|
}, []);
|
|
3748
3758
|
let A = (e) => {
|
|
3749
3759
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3750
3760
|
};
|
|
3751
3761
|
return /* @__PURE__ */ n("div", {
|
|
3752
3762
|
ref: y,
|
|
3753
|
-
className: `${
|
|
3763
|
+
className: `${Tn.panel} ${s}`,
|
|
3754
3764
|
"data-closing": l.closing || void 0,
|
|
3755
3765
|
"data-dragging": w || void 0,
|
|
3756
3766
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3759,36 +3769,36 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3759
3769
|
"aria-labelledby": O ? _ : void 0,
|
|
3760
3770
|
"aria-describedby": k ? v : void 0,
|
|
3761
3771
|
tabIndex: -1,
|
|
3762
|
-
onKeyDown:
|
|
3772
|
+
onKeyDown: On,
|
|
3763
3773
|
children: [
|
|
3764
3774
|
/* @__PURE__ */ t("button", {
|
|
3765
3775
|
type: "button",
|
|
3766
|
-
className:
|
|
3776
|
+
className: Tn.dragHandle,
|
|
3767
3777
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3768
3778
|
onPointerDown: (e) => {
|
|
3769
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3779
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = Sn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3770
3780
|
},
|
|
3771
3781
|
onPointerMove: (e) => {
|
|
3772
3782
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3773
|
-
let t =
|
|
3783
|
+
let t = Cn(b.current, e.clientX, e.clientY);
|
|
3774
3784
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3775
3785
|
},
|
|
3776
3786
|
onPointerUp: (e) => {
|
|
3777
3787
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3778
|
-
let t =
|
|
3788
|
+
let t = wn(b.current, e.clientY, e.timeStamp);
|
|
3779
3789
|
A(e.currentTarget), t && D();
|
|
3780
3790
|
},
|
|
3781
3791
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3782
3792
|
children: /* @__PURE__ */ t("span", {})
|
|
3783
3793
|
}),
|
|
3784
3794
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3785
|
-
className:
|
|
3795
|
+
className: Tn.header,
|
|
3786
3796
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3787
3797
|
id: _,
|
|
3788
|
-
className:
|
|
3798
|
+
className: Tn.title,
|
|
3789
3799
|
children: p
|
|
3790
3800
|
}), /* @__PURE__ */ t(j, {
|
|
3791
|
-
className:
|
|
3801
|
+
className: Tn.close,
|
|
3792
3802
|
variant: "empty",
|
|
3793
3803
|
size: "sm",
|
|
3794
3804
|
"aria-label": o,
|
|
@@ -3802,17 +3812,17 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3802
3812
|
}),
|
|
3803
3813
|
k && /* @__PURE__ */ t("p", {
|
|
3804
3814
|
id: v,
|
|
3805
|
-
className:
|
|
3815
|
+
className: Tn.description,
|
|
3806
3816
|
children: m
|
|
3807
3817
|
}),
|
|
3808
3818
|
/* @__PURE__ */ t("div", {
|
|
3809
|
-
className:
|
|
3819
|
+
className: Tn.content,
|
|
3810
3820
|
children: e
|
|
3811
3821
|
})
|
|
3812
3822
|
]
|
|
3813
3823
|
});
|
|
3814
|
-
},
|
|
3815
|
-
let n =
|
|
3824
|
+
}, An = ({ registry: e }) => {
|
|
3825
|
+
let n = _n((e) => e.modals), r = _n((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3816
3826
|
if (o.current.has(e)) return;
|
|
3817
3827
|
a((t) => new Set(t).add(e));
|
|
3818
3828
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3828,7 +3838,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3828
3838
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3829
3839
|
}, []), d(() => {
|
|
3830
3840
|
let e = (e) => {
|
|
3831
|
-
let t =
|
|
3841
|
+
let t = _n.getState().modals.at(-1);
|
|
3832
3842
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3833
3843
|
};
|
|
3834
3844
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3841,21 +3851,21 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3841
3851
|
n,
|
|
3842
3852
|
e
|
|
3843
3853
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3844
|
-
className:
|
|
3854
|
+
className: Tn.layer,
|
|
3845
3855
|
"aria-label": "Модальные окна",
|
|
3846
3856
|
children: n.map((r, a) => {
|
|
3847
3857
|
let o = e[r.name];
|
|
3848
3858
|
if (!o) return null;
|
|
3849
3859
|
let c = i.has(r.id);
|
|
3850
3860
|
return /* @__PURE__ */ t("div", {
|
|
3851
|
-
className:
|
|
3861
|
+
className: Tn.backdrop,
|
|
3852
3862
|
"data-closing": c || void 0,
|
|
3853
3863
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3854
3864
|
inert: a !== n.length - 1 || void 0,
|
|
3855
3865
|
onMouseDown: (e) => {
|
|
3856
3866
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3857
3867
|
},
|
|
3858
|
-
children: /* @__PURE__ */ t(
|
|
3868
|
+
children: /* @__PURE__ */ t(Dn.Provider, {
|
|
3859
3869
|
value: {
|
|
3860
3870
|
title: r.title ?? r.payload.title,
|
|
3861
3871
|
description: r.description ?? r.payload.description,
|
|
@@ -3872,31 +3882,31 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3872
3882
|
}, r.id);
|
|
3873
3883
|
})
|
|
3874
3884
|
}), document.body);
|
|
3875
|
-
},
|
|
3876
|
-
let o =
|
|
3885
|
+
}, jn = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3886
|
+
let o = _n((e) => e.modals.length);
|
|
3877
3887
|
return d(() => {
|
|
3878
3888
|
if (!a || o === 0) return;
|
|
3879
3889
|
let e = document.body.style.overflow;
|
|
3880
3890
|
return document.body.style.overflow = "hidden", () => {
|
|
3881
3891
|
document.body.style.overflow = e;
|
|
3882
3892
|
};
|
|
3883
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3884
|
-
},
|
|
3893
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(An, { registry: r })] });
|
|
3894
|
+
}, Mn = (e) => e, Nn = {
|
|
3885
3895
|
message: "_message_c23ie_1",
|
|
3886
3896
|
actions: "_actions_c23ie_13"
|
|
3887
|
-
},
|
|
3897
|
+
}, Pn = /* @__PURE__ */ new Map(), Fn = 0, In = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3888
3898
|
let u = (e) => {
|
|
3889
|
-
|
|
3899
|
+
Pn.get(l)?.(e), Pn.delete(l), r();
|
|
3890
3900
|
};
|
|
3891
|
-
return /* @__PURE__ */ n(
|
|
3901
|
+
return /* @__PURE__ */ n(kn, {
|
|
3892
3902
|
modalId: e,
|
|
3893
3903
|
title: i,
|
|
3894
3904
|
role: "alertdialog",
|
|
3895
3905
|
children: [/* @__PURE__ */ t("p", {
|
|
3896
|
-
className:
|
|
3906
|
+
className: Nn.message,
|
|
3897
3907
|
children: a
|
|
3898
3908
|
}), /* @__PURE__ */ n("div", {
|
|
3899
|
-
className:
|
|
3909
|
+
className: Nn.actions,
|
|
3900
3910
|
children: [/* @__PURE__ */ t(j, {
|
|
3901
3911
|
variant: "outline",
|
|
3902
3912
|
onClick: () => u(!1),
|
|
@@ -3908,46 +3918,46 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3908
3918
|
})]
|
|
3909
3919
|
})]
|
|
3910
3920
|
});
|
|
3911
|
-
},
|
|
3921
|
+
}, Ln = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(kn, {
|
|
3912
3922
|
modalId: e,
|
|
3913
3923
|
title: i,
|
|
3914
3924
|
role: "alertdialog",
|
|
3915
3925
|
children: [/* @__PURE__ */ t("p", {
|
|
3916
|
-
className:
|
|
3926
|
+
className: Nn.message,
|
|
3917
3927
|
children: a
|
|
3918
3928
|
}), /* @__PURE__ */ t("div", {
|
|
3919
|
-
className:
|
|
3929
|
+
className: Nn.actions,
|
|
3920
3930
|
children: /* @__PURE__ */ t(j, {
|
|
3921
3931
|
onClick: r,
|
|
3922
3932
|
children: o
|
|
3923
3933
|
})
|
|
3924
3934
|
})]
|
|
3925
|
-
}),
|
|
3926
|
-
ConfirmModal:
|
|
3927
|
-
ErrorModal:
|
|
3928
|
-
}),
|
|
3929
|
-
let e =
|
|
3935
|
+
}), Rn = Mn({
|
|
3936
|
+
ConfirmModal: In,
|
|
3937
|
+
ErrorModal: Ln
|
|
3938
|
+
}), zn = () => {
|
|
3939
|
+
let e = _n((e) => e.openModal);
|
|
3930
3940
|
return (t = {}) => new Promise((n) => {
|
|
3931
|
-
|
|
3932
|
-
let r = `confirm-${
|
|
3933
|
-
|
|
3941
|
+
Fn += 1;
|
|
3942
|
+
let r = `confirm-${Fn}`;
|
|
3943
|
+
Pn.set(r, n), e("ConfirmModal", {
|
|
3934
3944
|
...t,
|
|
3935
3945
|
requestId: r
|
|
3936
3946
|
}, {
|
|
3937
3947
|
closeOnEscape: !1,
|
|
3938
3948
|
onClose: () => {
|
|
3939
|
-
|
|
3949
|
+
Pn.get(r)?.(!1), Pn.delete(r);
|
|
3940
3950
|
}
|
|
3941
3951
|
});
|
|
3942
3952
|
});
|
|
3943
|
-
},
|
|
3944
|
-
let e =
|
|
3953
|
+
}, Bn = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Vn = () => {
|
|
3954
|
+
let e = _n((e) => e.openModal);
|
|
3945
3955
|
return { showError: (t, n) => e("ErrorModal", {
|
|
3946
3956
|
title: n,
|
|
3947
|
-
message:
|
|
3957
|
+
message: Bn(t)
|
|
3948
3958
|
}) };
|
|
3949
|
-
},
|
|
3950
|
-
let e =
|
|
3959
|
+
}, Hn = S(() => ({})), Un = S(() => ({})), Wn = () => {
|
|
3960
|
+
let e = _n((e) => e.modals), t = _n((e) => e.openModal), n = _n((e) => e.closeModal), r = _n((e) => e.closeTopModal), i = _n((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
3951
3961
|
return m(() => ({
|
|
3952
3962
|
openModal: a,
|
|
3953
3963
|
closeModal: n,
|
|
@@ -3963,7 +3973,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3963
3973
|
e.length,
|
|
3964
3974
|
a
|
|
3965
3975
|
]);
|
|
3966
|
-
},
|
|
3976
|
+
}, Gn = {
|
|
3967
3977
|
layer: "_layer_ct7yp_1",
|
|
3968
3978
|
backdrop: "_backdrop_ct7yp_13",
|
|
3969
3979
|
panel: "_panel_ct7yp_27",
|
|
@@ -3983,16 +3993,16 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3983
3993
|
"enter-right": "_enter-right_ct7yp_1",
|
|
3984
3994
|
"enter-left": "_enter-left_ct7yp_1",
|
|
3985
3995
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
3986
|
-
},
|
|
3996
|
+
}, Kn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", qn = a(null), Jn = (e) => {
|
|
3987
3997
|
if (e.key !== "Tab") return;
|
|
3988
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3998
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Kn));
|
|
3989
3999
|
if (!t.length) {
|
|
3990
4000
|
e.preventDefault();
|
|
3991
4001
|
return;
|
|
3992
4002
|
}
|
|
3993
4003
|
let n = t[0], r = t.at(-1);
|
|
3994
4004
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
3995
|
-
},
|
|
4005
|
+
}, Yn = () => u(qn), Xn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
|
|
3996
4006
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
3997
4007
|
g || r(e);
|
|
3998
4008
|
};
|
|
@@ -4001,7 +4011,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4001
4011
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4002
4012
|
document.body.style.overflow = "hidden";
|
|
4003
4013
|
let a = S.current;
|
|
4004
|
-
(y?.current ?? a?.querySelector(
|
|
4014
|
+
(y?.current ?? a?.querySelector(Kn) ?? a)?.focus();
|
|
4005
4015
|
let o = (e) => {
|
|
4006
4016
|
e.key === "Escape" && p && !g && r("escape");
|
|
4007
4017
|
};
|
|
@@ -4016,29 +4026,29 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4016
4026
|
g,
|
|
4017
4027
|
b
|
|
4018
4028
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4019
|
-
className:
|
|
4029
|
+
className: Gn.layer,
|
|
4020
4030
|
children: /* @__PURE__ */ t("div", {
|
|
4021
|
-
className:
|
|
4031
|
+
className: Gn.backdrop,
|
|
4022
4032
|
onMouseDown: (e) => {
|
|
4023
4033
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4024
4034
|
},
|
|
4025
|
-
children: /* @__PURE__ */ t(
|
|
4035
|
+
children: /* @__PURE__ */ t(qn.Provider, {
|
|
4026
4036
|
value: { requestClose: T },
|
|
4027
4037
|
children: /* @__PURE__ */ n("section", {
|
|
4028
4038
|
ref: S,
|
|
4029
|
-
className: `${
|
|
4039
|
+
className: `${Gn.panel} ${Gn[l]} ${Gn[u]} ${x}`,
|
|
4030
4040
|
role: "dialog",
|
|
4031
4041
|
"aria-modal": "true",
|
|
4032
4042
|
"aria-labelledby": a ? C : void 0,
|
|
4033
4043
|
"aria-describedby": o ? w : void 0,
|
|
4034
4044
|
tabIndex: -1,
|
|
4035
|
-
onKeyDown:
|
|
4045
|
+
onKeyDown: Jn,
|
|
4036
4046
|
children: [
|
|
4037
4047
|
/* @__PURE__ */ n("header", {
|
|
4038
|
-
className:
|
|
4048
|
+
className: Gn.header,
|
|
4039
4049
|
children: [
|
|
4040
4050
|
/* @__PURE__ */ n("div", {
|
|
4041
|
-
className:
|
|
4051
|
+
className: Gn.heading,
|
|
4042
4052
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4043
4053
|
id: C,
|
|
4044
4054
|
children: a
|
|
@@ -4048,7 +4058,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4048
4058
|
})]
|
|
4049
4059
|
}),
|
|
4050
4060
|
s && /* @__PURE__ */ t("div", {
|
|
4051
|
-
className:
|
|
4061
|
+
className: Gn.headerActions,
|
|
4052
4062
|
children: s
|
|
4053
4063
|
}),
|
|
4054
4064
|
/* @__PURE__ */ t(j, {
|
|
@@ -4066,11 +4076,11 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4066
4076
|
]
|
|
4067
4077
|
}),
|
|
4068
4078
|
/* @__PURE__ */ t("div", {
|
|
4069
|
-
className:
|
|
4079
|
+
className: Gn.content,
|
|
4070
4080
|
children: i
|
|
4071
4081
|
}),
|
|
4072
4082
|
c && /* @__PURE__ */ t("footer", {
|
|
4073
|
-
className:
|
|
4083
|
+
className: Gn.footer,
|
|
4074
4084
|
children: c
|
|
4075
4085
|
})
|
|
4076
4086
|
]
|
|
@@ -4078,17 +4088,17 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4078
4088
|
})
|
|
4079
4089
|
})
|
|
4080
4090
|
}), document.body);
|
|
4081
|
-
},
|
|
4091
|
+
}, Zn = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Xn, {
|
|
4082
4092
|
...n,
|
|
4083
4093
|
placement: e
|
|
4084
|
-
}),
|
|
4094
|
+
}), Qn = (e) => /* @__PURE__ */ t(Xn, {
|
|
4085
4095
|
...e,
|
|
4086
4096
|
placement: "bottom"
|
|
4087
|
-
}),
|
|
4097
|
+
}), $n = (e) => /* @__PURE__ */ t(Xn, {
|
|
4088
4098
|
...e,
|
|
4089
4099
|
placement: "fullscreen",
|
|
4090
4100
|
size: "xl"
|
|
4091
|
-
}),
|
|
4101
|
+
}), er = {
|
|
4092
4102
|
wrapper: "_wrapper_1hyyy_1",
|
|
4093
4103
|
container: "_container_1hyyy_15",
|
|
4094
4104
|
inner: "_inner_1hyyy_35",
|
|
@@ -4103,29 +4113,29 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4103
4113
|
empty: "_empty_1hyyy_153",
|
|
4104
4114
|
destructive: "_destructive_1hyyy_161",
|
|
4105
4115
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
4106
|
-
},
|
|
4107
|
-
className:
|
|
4116
|
+
}, tr = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4117
|
+
className: er.wrapper,
|
|
4108
4118
|
children: /* @__PURE__ */ t("div", {
|
|
4109
|
-
className:
|
|
4119
|
+
className: er.container,
|
|
4110
4120
|
children: /* @__PURE__ */ n("div", {
|
|
4111
|
-
className:
|
|
4121
|
+
className: er.inner,
|
|
4112
4122
|
children: [
|
|
4113
4123
|
/* @__PURE__ */ t("div", {
|
|
4114
|
-
className:
|
|
4115
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4124
|
+
className: er.cube,
|
|
4125
|
+
children: /* @__PURE__ */ t("div", { className: `${er.cube__inner} ${er[e]}` })
|
|
4116
4126
|
}),
|
|
4117
4127
|
/* @__PURE__ */ t("div", {
|
|
4118
|
-
className:
|
|
4119
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4128
|
+
className: er.cube,
|
|
4129
|
+
children: /* @__PURE__ */ t("div", { className: `${er.cube__inner} ${er[e]}` })
|
|
4120
4130
|
}),
|
|
4121
4131
|
/* @__PURE__ */ t("div", {
|
|
4122
|
-
className:
|
|
4123
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4132
|
+
className: er.cube,
|
|
4133
|
+
children: /* @__PURE__ */ t("div", { className: `${er.cube__inner} ${er[e]}` })
|
|
4124
4134
|
})
|
|
4125
4135
|
]
|
|
4126
4136
|
})
|
|
4127
4137
|
})
|
|
4128
|
-
}),
|
|
4138
|
+
}), nr = {
|
|
4129
4139
|
viewport: "_viewport_bu4eh_1",
|
|
4130
4140
|
"top-right": "_top-right_bu4eh_21",
|
|
4131
4141
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -4141,12 +4151,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4141
4151
|
success: "_success_bu4eh_195",
|
|
4142
4152
|
warning: "_warning_bu4eh_203",
|
|
4143
4153
|
error: "_error_bu4eh_211"
|
|
4144
|
-
},
|
|
4154
|
+
}, rr = {
|
|
4145
4155
|
info: "IconInfoCircle",
|
|
4146
4156
|
success: "IconSuccessCircle",
|
|
4147
4157
|
warning: "IconWarning",
|
|
4148
4158
|
error: "IconWarning"
|
|
4149
|
-
},
|
|
4159
|
+
}, ir = ({ toast: e, onClose: r }) => {
|
|
4150
4160
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4151
4161
|
return d(() => {
|
|
4152
4162
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4166,7 +4176,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4166
4176
|
let e = () => s(document.hidden);
|
|
4167
4177
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4168
4178
|
}, []), /* @__PURE__ */ n("article", {
|
|
4169
|
-
className: `${
|
|
4179
|
+
className: `${nr.toast} ${nr[e.variant]}`,
|
|
4170
4180
|
role: e.variant === "error" ? "alert" : "status",
|
|
4171
4181
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4172
4182
|
onMouseEnter: () => a(!0),
|
|
@@ -4175,24 +4185,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4175
4185
|
onBlur: () => a(!1),
|
|
4176
4186
|
children: [
|
|
4177
4187
|
/* @__PURE__ */ t("div", {
|
|
4178
|
-
className:
|
|
4188
|
+
className: nr.icon,
|
|
4179
4189
|
"aria-hidden": "true",
|
|
4180
4190
|
children: /* @__PURE__ */ t(Y, {
|
|
4181
|
-
name:
|
|
4191
|
+
name: rr[e.variant],
|
|
4182
4192
|
color: "var(--ds-toast-accent)",
|
|
4183
4193
|
width: 20,
|
|
4184
4194
|
height: 20
|
|
4185
4195
|
})
|
|
4186
4196
|
}),
|
|
4187
4197
|
/* @__PURE__ */ n("div", {
|
|
4188
|
-
className:
|
|
4198
|
+
className: nr.body,
|
|
4189
4199
|
children: [
|
|
4190
4200
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4191
|
-
className:
|
|
4201
|
+
className: nr.title,
|
|
4192
4202
|
children: e.title
|
|
4193
4203
|
}),
|
|
4194
4204
|
/* @__PURE__ */ t("div", {
|
|
4195
|
-
className:
|
|
4205
|
+
className: nr.message,
|
|
4196
4206
|
children: e.message
|
|
4197
4207
|
}),
|
|
4198
4208
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -4218,15 +4228,15 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4218
4228
|
})
|
|
4219
4229
|
]
|
|
4220
4230
|
});
|
|
4221
|
-
},
|
|
4231
|
+
}, ar = 0, or = S((e, t) => ({
|
|
4222
4232
|
toasts: [],
|
|
4223
4233
|
showToast: (n) => {
|
|
4224
4234
|
if (n.dedupeKey) {
|
|
4225
4235
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4226
4236
|
if (e) return e.id;
|
|
4227
4237
|
}
|
|
4228
|
-
|
|
4229
|
-
let r = `ds-toast-${
|
|
4238
|
+
ar += 1;
|
|
4239
|
+
let r = `ds-toast-${ar}`;
|
|
4230
4240
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4231
4241
|
variant: "info",
|
|
4232
4242
|
duration: 5e3,
|
|
@@ -4237,18 +4247,18 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4237
4247
|
},
|
|
4238
4248
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4239
4249
|
clearToasts: () => e({ toasts: [] })
|
|
4240
|
-
})),
|
|
4241
|
-
let r =
|
|
4250
|
+
})), sr = () => or.setState({ toasts: [] }), cr = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4251
|
+
let r = or((e) => e.toasts), i = or((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4242
4252
|
return /* @__PURE__ */ t("div", {
|
|
4243
|
-
className: `${
|
|
4253
|
+
className: `${nr.viewport} ${nr[e]}`,
|
|
4244
4254
|
"aria-label": "Уведомления",
|
|
4245
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4255
|
+
children: a.map((e) => /* @__PURE__ */ t(ir, {
|
|
4246
4256
|
toast: e,
|
|
4247
4257
|
onClose: i
|
|
4248
4258
|
}, e.id))
|
|
4249
4259
|
});
|
|
4250
|
-
},
|
|
4251
|
-
let e =
|
|
4260
|
+
}, lr = () => {
|
|
4261
|
+
let e = or((e) => e.showToast), t = or((e) => e.removeToast), n = or((e) => e.clearToasts), r = l((t) => e({
|
|
4252
4262
|
...t,
|
|
4253
4263
|
variant: "info"
|
|
4254
4264
|
}), [e]), i = l((t) => e({
|
|
@@ -4278,24 +4288,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4278
4288
|
i,
|
|
4279
4289
|
a
|
|
4280
4290
|
]);
|
|
4281
|
-
},
|
|
4291
|
+
}, ur = {
|
|
4282
4292
|
root: "_root_ncmxp_1",
|
|
4283
4293
|
tooltip: "_tooltip_ncmxp_11",
|
|
4284
4294
|
"ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
|
|
4285
|
-
},
|
|
4295
|
+
}, dr = 8, fr = 16, pr = {
|
|
4286
4296
|
top: "bottom",
|
|
4287
4297
|
right: "left",
|
|
4288
4298
|
bottom: "top",
|
|
4289
4299
|
left: "right"
|
|
4290
|
-
},
|
|
4300
|
+
}, mr = (e, t, n) => e === "top" ? t.top >= n.height + dr + fr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + dr + fr : e === "left" ? t.left >= n.width + dr + fr : window.innerWidth - t.right >= n.width + dr + fr, hr = (e, t, n) => {
|
|
4291
4301
|
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4292
|
-
let r =
|
|
4293
|
-
return r === "top" && (a = t.top - n.height -
|
|
4302
|
+
let r = mr(e, t, n) ? e : mr(pr[e], t, n) ? pr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4303
|
+
return r === "top" && (a = t.top - n.height - dr), r === "bottom" && (a = t.bottom + dr), r === "left" && (i = t.left - n.width - dr), r === "right" && (i = t.right + dr), i = Math.min(Math.max(i, fr), Math.max(fr, window.innerWidth - n.width - fr)), a = Math.min(Math.max(a, fr), Math.max(fr, window.innerHeight - n.height - fr)), {
|
|
4294
4304
|
left: i,
|
|
4295
4305
|
top: a,
|
|
4296
4306
|
visibility: "visible"
|
|
4297
4307
|
};
|
|
4298
|
-
},
|
|
4308
|
+
}, gr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4299
4309
|
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4300
4310
|
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4301
4311
|
}, []), E = l(() => {
|
|
@@ -4313,7 +4323,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4313
4323
|
let e = () => {
|
|
4314
4324
|
let e = w.current;
|
|
4315
4325
|
if (!e || !x) return;
|
|
4316
|
-
let t =
|
|
4326
|
+
let t = hr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4317
4327
|
if (!t) {
|
|
4318
4328
|
T();
|
|
4319
4329
|
return;
|
|
@@ -4350,24 +4360,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4350
4360
|
});
|
|
4351
4361
|
return /* @__PURE__ */ n("span", {
|
|
4352
4362
|
ref: w,
|
|
4353
|
-
className: `${
|
|
4363
|
+
className: `${ur.root} ${p}`,
|
|
4354
4364
|
onPointerDown: _ ? T : E,
|
|
4355
4365
|
children: [O, _ && /* @__PURE__ */ t(ln, { children: /* @__PURE__ */ t("span", {
|
|
4356
4366
|
ref: S,
|
|
4357
4367
|
id: m,
|
|
4358
4368
|
role: "tooltip",
|
|
4359
|
-
className:
|
|
4369
|
+
className: ur.tooltip,
|
|
4360
4370
|
style: D,
|
|
4361
4371
|
children: e
|
|
4362
4372
|
}) })]
|
|
4363
4373
|
});
|
|
4364
|
-
},
|
|
4374
|
+
}, _r = {
|
|
4365
4375
|
root: "_root_bs28m_1",
|
|
4366
4376
|
tabList: "_tabList_bs28m_11",
|
|
4367
4377
|
tab: "_tab_bs28m_11",
|
|
4368
4378
|
panels: "_panels_bs28m_127",
|
|
4369
4379
|
panel: "_panel_bs28m_127"
|
|
4370
|
-
},
|
|
4380
|
+
}, vr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4371
4381
|
let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
|
|
4372
4382
|
let n = e[t];
|
|
4373
4383
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4397,10 +4407,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4397
4407
|
t.preventDefault(), _(a);
|
|
4398
4408
|
};
|
|
4399
4409
|
return /* @__PURE__ */ n("div", {
|
|
4400
|
-
className: `${
|
|
4410
|
+
className: `${_r.root} ${c}`,
|
|
4401
4411
|
"aria-busy": s || void 0,
|
|
4402
4412
|
children: [/* @__PURE__ */ t("div", {
|
|
4403
|
-
className:
|
|
4413
|
+
className: _r.tabList,
|
|
4404
4414
|
role: "tablist",
|
|
4405
4415
|
"aria-label": a,
|
|
4406
4416
|
"aria-orientation": "horizontal",
|
|
@@ -4412,7 +4422,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4412
4422
|
u.current[n] = e;
|
|
4413
4423
|
},
|
|
4414
4424
|
id: a,
|
|
4415
|
-
className:
|
|
4425
|
+
className: _r.tab,
|
|
4416
4426
|
type: "button",
|
|
4417
4427
|
role: "tab",
|
|
4418
4428
|
"aria-selected": i,
|
|
@@ -4425,12 +4435,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4425
4435
|
}, e.id);
|
|
4426
4436
|
})
|
|
4427
4437
|
}), /* @__PURE__ */ t("div", {
|
|
4428
|
-
className:
|
|
4438
|
+
className: _r.panels,
|
|
4429
4439
|
children: e.map((e, n) => {
|
|
4430
4440
|
let i = e.id === r;
|
|
4431
4441
|
return /* @__PURE__ */ t("div", {
|
|
4432
4442
|
id: `${l}-panel-${n}`,
|
|
4433
|
-
className:
|
|
4443
|
+
className: _r.panel,
|
|
4434
4444
|
role: "tabpanel",
|
|
4435
4445
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4436
4446
|
tabIndex: 0,
|
|
@@ -4440,7 +4450,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4440
4450
|
})
|
|
4441
4451
|
})]
|
|
4442
4452
|
});
|
|
4443
|
-
},
|
|
4453
|
+
}, yr = (e) => {
|
|
4444
4454
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4445
4455
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4446
4456
|
return n ? `${n}:${a}` : a;
|
|
@@ -4473,19 +4483,19 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4473
4483
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4474
4484
|
caption: "_caption_14cqp_705",
|
|
4475
4485
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4476
|
-
},
|
|
4486
|
+
}, br = 2500, xr = 5, Sr = .05, Cr = [
|
|
4477
4487
|
.5,
|
|
4478
4488
|
.75,
|
|
4479
4489
|
1,
|
|
4480
4490
|
1.25,
|
|
4481
4491
|
1.5,
|
|
4482
4492
|
2
|
|
4483
|
-
],
|
|
4493
|
+
], wr = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4484
4494
|
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, V] = g(1), [H, U] = g(!!v.muted), [W, te] = g(1), [ne, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, G] = g(!0), [le, ue] = g(!1), [de, K] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
|
|
4485
4495
|
track: e,
|
|
4486
4496
|
index: t
|
|
4487
4497
|
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, ge = !he && !me && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4488
|
-
G(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => G(!1),
|
|
4498
|
+
G(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => G(!1), br));
|
|
4489
4499
|
}, [A, oe]);
|
|
4490
4500
|
d(() => {
|
|
4491
4501
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
@@ -4544,7 +4554,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4544
4554
|
let t = e.target;
|
|
4545
4555
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4546
4556
|
let n = e.key.toLowerCase();
|
|
4547
|
-
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && pe.length ? (e.preventDefault(), Te(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ?
|
|
4557
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && pe.length ? (e.preventDefault(), Te(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? xr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? Sr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4548
4558
|
}, q = () => {
|
|
4549
4559
|
let e = x.current;
|
|
4550
4560
|
w(!1), E(!0), e?.load();
|
|
@@ -4643,7 +4653,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4643
4653
|
"aria-hidden": "true",
|
|
4644
4654
|
children: /* @__PURE__ */ t("div", {
|
|
4645
4655
|
className: $.loaderScale,
|
|
4646
|
-
children: /* @__PURE__ */ t(
|
|
4656
|
+
children: /* @__PURE__ */ t(tr, {})
|
|
4647
4657
|
})
|
|
4648
4658
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4649
4659
|
}),
|
|
@@ -4711,7 +4721,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4711
4721
|
let t = Number(e.target.value);
|
|
4712
4722
|
x.current && (x.current.playbackRate = t);
|
|
4713
4723
|
},
|
|
4714
|
-
children:
|
|
4724
|
+
children: Cr.map((e) => /* @__PURE__ */ n("option", {
|
|
4715
4725
|
value: e,
|
|
4716
4726
|
children: [e, "×"]
|
|
4717
4727
|
}, e))
|
|
@@ -4798,7 +4808,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4798
4808
|
children: [
|
|
4799
4809
|
/* @__PURE__ */ t("span", {
|
|
4800
4810
|
className: $.time,
|
|
4801
|
-
children:
|
|
4811
|
+
children: yr(P)
|
|
4802
4812
|
}),
|
|
4803
4813
|
/* @__PURE__ */ t("input", {
|
|
4804
4814
|
className: $.timeline,
|
|
@@ -4809,12 +4819,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4809
4819
|
step: .01,
|
|
4810
4820
|
value: Math.min(P, I || 0),
|
|
4811
4821
|
"aria-label": "Позиция воспроизведения",
|
|
4812
|
-
"aria-valuetext": `${
|
|
4822
|
+
"aria-valuetext": `${yr(P)} из ${yr(I)}`,
|
|
4813
4823
|
onChange: (e) => Se(Number(e.target.value))
|
|
4814
4824
|
}),
|
|
4815
4825
|
/* @__PURE__ */ t("span", {
|
|
4816
4826
|
className: $.time,
|
|
4817
|
-
children:
|
|
4827
|
+
children: yr(I)
|
|
4818
4828
|
})
|
|
4819
4829
|
]
|
|
4820
4830
|
}),
|
|
@@ -4854,7 +4864,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4854
4864
|
children: a
|
|
4855
4865
|
})]
|
|
4856
4866
|
});
|
|
4857
|
-
},
|
|
4867
|
+
}, Tr = {
|
|
4858
4868
|
root: "_root_ymidq_1",
|
|
4859
4869
|
trigger: "_trigger_ymidq_15",
|
|
4860
4870
|
heading: "_heading_ymidq_41",
|
|
@@ -4864,7 +4874,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4864
4874
|
open: "_open_ymidq_91",
|
|
4865
4875
|
content: "_content_ymidq_99",
|
|
4866
4876
|
contentInner: "_contentInner_ymidq_119"
|
|
4867
|
-
},
|
|
4877
|
+
}, Er = (e, t, n, r = 16) => {
|
|
4868
4878
|
if (t > Math.max(0, n - r * 2)) {
|
|
4869
4879
|
let t = e - r;
|
|
4870
4880
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4886,7 +4896,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4886
4896
|
alignment: "none",
|
|
4887
4897
|
delta: 0
|
|
4888
4898
|
};
|
|
4889
|
-
},
|
|
4899
|
+
}, Dr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4890
4900
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4891
4901
|
return d(() => {
|
|
4892
4902
|
let e = x.current;
|
|
@@ -4896,7 +4906,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4896
4906
|
let r = !1, i = () => {
|
|
4897
4907
|
if (r) return;
|
|
4898
4908
|
r = !0;
|
|
4899
|
-
let e = t.getBoundingClientRect(), n =
|
|
4909
|
+
let e = t.getBoundingClientRect(), n = Er(e.top, e.height, window.innerHeight, l);
|
|
4900
4910
|
if (n.alignment === "none") return;
|
|
4901
4911
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4902
4912
|
window.scrollBy({
|
|
@@ -4917,10 +4927,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4917
4927
|
l
|
|
4918
4928
|
]), /* @__PURE__ */ n("section", {
|
|
4919
4929
|
ref: y,
|
|
4920
|
-
className: `${
|
|
4930
|
+
className: `${Tr.root} ${v ? Tr.open : ""} ${u}`,
|
|
4921
4931
|
children: [/* @__PURE__ */ n("button", {
|
|
4922
4932
|
type: "button",
|
|
4923
|
-
className:
|
|
4933
|
+
className: Tr.trigger,
|
|
4924
4934
|
"aria-expanded": v,
|
|
4925
4935
|
"aria-controls": p,
|
|
4926
4936
|
onClick: () => {
|
|
@@ -4928,16 +4938,16 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4928
4938
|
o === void 0 && _(e), s?.(e);
|
|
4929
4939
|
},
|
|
4930
4940
|
children: [/* @__PURE__ */ n("span", {
|
|
4931
|
-
className:
|
|
4941
|
+
className: Tr.heading,
|
|
4932
4942
|
children: [/* @__PURE__ */ t("span", {
|
|
4933
|
-
className:
|
|
4943
|
+
className: Tr.title,
|
|
4934
4944
|
children: e
|
|
4935
4945
|
}), r && /* @__PURE__ */ t("span", {
|
|
4936
|
-
className:
|
|
4946
|
+
className: Tr.subtitle,
|
|
4937
4947
|
children: r
|
|
4938
4948
|
})]
|
|
4939
4949
|
}), /* @__PURE__ */ t("span", {
|
|
4940
|
-
className:
|
|
4950
|
+
className: Tr.icon,
|
|
4941
4951
|
"aria-hidden": "true",
|
|
4942
4952
|
children: /* @__PURE__ */ t(Y, {
|
|
4943
4953
|
name: "IconChevron",
|
|
@@ -4948,15 +4958,15 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4948
4958
|
}), /* @__PURE__ */ t("div", {
|
|
4949
4959
|
ref: b,
|
|
4950
4960
|
id: p,
|
|
4951
|
-
className:
|
|
4961
|
+
className: Tr.content,
|
|
4952
4962
|
"aria-hidden": !v,
|
|
4953
4963
|
children: /* @__PURE__ */ t("div", {
|
|
4954
|
-
className:
|
|
4964
|
+
className: Tr.contentInner,
|
|
4955
4965
|
children: i
|
|
4956
4966
|
})
|
|
4957
4967
|
})]
|
|
4958
4968
|
});
|
|
4959
|
-
},
|
|
4969
|
+
}, Or = {
|
|
4960
4970
|
root: "_root_14ewt_1",
|
|
4961
4971
|
topSlot: "_topSlot_14ewt_29",
|
|
4962
4972
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -4974,14 +4984,14 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4974
4984
|
description: "_description_14ewt_235",
|
|
4975
4985
|
badge: "_badge_14ewt_269",
|
|
4976
4986
|
empty: "_empty_14ewt_281"
|
|
4977
|
-
},
|
|
4987
|
+
}, kr = (e, t, n) => {
|
|
4978
4988
|
if (e.length === 0) return -1;
|
|
4979
4989
|
for (let r = 1; r <= e.length; r += 1) {
|
|
4980
4990
|
let i = (t + n * r + e.length) % e.length;
|
|
4981
4991
|
if (!e[i]?.disabled) return i;
|
|
4982
4992
|
}
|
|
4983
4993
|
return -1;
|
|
4984
|
-
},
|
|
4994
|
+
}, Ar = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
4985
4995
|
let m = f(), g = h(null), _ = h({
|
|
4986
4996
|
value: "",
|
|
4987
4997
|
time: 0
|
|
@@ -4993,7 +5003,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4993
5003
|
let n = v.findIndex((e) => e.id === t.id);
|
|
4994
5004
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
4995
5005
|
e.preventDefault();
|
|
4996
|
-
let t =
|
|
5006
|
+
let t = kr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
4997
5007
|
x(v[t]);
|
|
4998
5008
|
return;
|
|
4999
5009
|
}
|
|
@@ -5013,26 +5023,26 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5013
5023
|
let a = r.id === i, o = {
|
|
5014
5024
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5015
5025
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5016
|
-
className:
|
|
5026
|
+
className: Or.icon,
|
|
5017
5027
|
"aria-hidden": "true",
|
|
5018
5028
|
children: r.icon
|
|
5019
5029
|
}),
|
|
5020
5030
|
/* @__PURE__ */ n("span", {
|
|
5021
|
-
className:
|
|
5031
|
+
className: Or.copy,
|
|
5022
5032
|
children: [/* @__PURE__ */ t("span", {
|
|
5023
|
-
className:
|
|
5033
|
+
className: Or.label,
|
|
5024
5034
|
children: r.label
|
|
5025
5035
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5026
|
-
className:
|
|
5036
|
+
className: Or.description,
|
|
5027
5037
|
children: r.description
|
|
5028
5038
|
})]
|
|
5029
5039
|
}),
|
|
5030
5040
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5031
|
-
className:
|
|
5041
|
+
className: Or.badge,
|
|
5032
5042
|
children: r.badge
|
|
5033
5043
|
})
|
|
5034
5044
|
] }),
|
|
5035
|
-
className: `${
|
|
5045
|
+
className: `${Or.link} ${a ? Or.current : ""}`,
|
|
5036
5046
|
tabIndex: r.id === b ? 0 : -1,
|
|
5037
5047
|
"aria-current": a ? "page" : void 0,
|
|
5038
5048
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5048,7 +5058,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5048
5058
|
onKeyDown: (e) => S(e, r)
|
|
5049
5059
|
};
|
|
5050
5060
|
return /* @__PURE__ */ t("li", {
|
|
5051
|
-
className:
|
|
5061
|
+
className: Or.item,
|
|
5052
5062
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5053
5063
|
href: r.href,
|
|
5054
5064
|
...o,
|
|
@@ -5063,45 +5073,45 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5063
5073
|
};
|
|
5064
5074
|
return /* @__PURE__ */ n("nav", {
|
|
5065
5075
|
ref: g,
|
|
5066
|
-
className: `${
|
|
5076
|
+
className: `${Or.root} ${p}`,
|
|
5067
5077
|
"aria-label": a,
|
|
5068
5078
|
children: [
|
|
5069
5079
|
s && /* @__PURE__ */ t("div", {
|
|
5070
|
-
className:
|
|
5080
|
+
className: Or.topSlot,
|
|
5071
5081
|
children: s
|
|
5072
5082
|
}),
|
|
5073
5083
|
o && /* @__PURE__ */ t("div", {
|
|
5074
|
-
className:
|
|
5084
|
+
className: Or.searchSlot,
|
|
5075
5085
|
children: o
|
|
5076
5086
|
}),
|
|
5077
5087
|
/* @__PURE__ */ n("div", {
|
|
5078
|
-
className:
|
|
5088
|
+
className: Or.groups,
|
|
5079
5089
|
children: [r.map((e) => {
|
|
5080
5090
|
let r = `${m}-${e.id}`;
|
|
5081
5091
|
return /* @__PURE__ */ n("section", {
|
|
5082
|
-
className:
|
|
5092
|
+
className: Or.group,
|
|
5083
5093
|
"aria-labelledby": e.label ? r : void 0,
|
|
5084
5094
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5085
5095
|
id: r,
|
|
5086
|
-
className:
|
|
5096
|
+
className: Or.groupLabel,
|
|
5087
5097
|
children: e.label
|
|
5088
5098
|
}), /* @__PURE__ */ t("ul", {
|
|
5089
|
-
className:
|
|
5099
|
+
className: Or.list,
|
|
5090
5100
|
children: e.items.map(C)
|
|
5091
5101
|
})]
|
|
5092
5102
|
}, e.id);
|
|
5093
5103
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5094
|
-
className:
|
|
5104
|
+
className: Or.empty,
|
|
5095
5105
|
children: l
|
|
5096
5106
|
})]
|
|
5097
5107
|
}),
|
|
5098
5108
|
c && /* @__PURE__ */ t("div", {
|
|
5099
|
-
className:
|
|
5109
|
+
className: Or.bottomSlot,
|
|
5100
5110
|
children: c
|
|
5101
5111
|
})
|
|
5102
5112
|
]
|
|
5103
5113
|
});
|
|
5104
|
-
},
|
|
5114
|
+
}, jr = {
|
|
5105
5115
|
root: "_root_2mdgb_1",
|
|
5106
5116
|
list: "_list_2mdgb_19",
|
|
5107
5117
|
item: "_item_2mdgb_37",
|
|
@@ -5111,7 +5121,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5111
5121
|
icon: "_icon_2mdgb_141",
|
|
5112
5122
|
badge: "_badge_2mdgb_149",
|
|
5113
5123
|
label: "_label_2mdgb_163"
|
|
5114
|
-
},
|
|
5124
|
+
}, Mr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5115
5125
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5116
5126
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5117
5127
|
}, p = (e, t) => {
|
|
@@ -5128,27 +5138,27 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5128
5138
|
};
|
|
5129
5139
|
return /* @__PURE__ */ t("nav", {
|
|
5130
5140
|
ref: l,
|
|
5131
|
-
className: `${
|
|
5141
|
+
className: `${jr.root} ${c}`,
|
|
5132
5142
|
"aria-label": a,
|
|
5133
5143
|
children: /* @__PURE__ */ t("ul", {
|
|
5134
|
-
className:
|
|
5144
|
+
className: jr.list,
|
|
5135
5145
|
children: r.map((r) => {
|
|
5136
5146
|
let a = r.id === i, c = {
|
|
5137
5147
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5138
|
-
className:
|
|
5148
|
+
className: jr.visual,
|
|
5139
5149
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5140
|
-
className:
|
|
5150
|
+
className: jr.icon,
|
|
5141
5151
|
"aria-hidden": "true",
|
|
5142
5152
|
children: r.icon
|
|
5143
5153
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5144
|
-
className:
|
|
5154
|
+
className: jr.badge,
|
|
5145
5155
|
children: r.badge
|
|
5146
5156
|
})]
|
|
5147
5157
|
}), /* @__PURE__ */ t("span", {
|
|
5148
|
-
className:
|
|
5158
|
+
className: jr.label,
|
|
5149
5159
|
children: r.label
|
|
5150
5160
|
})] }),
|
|
5151
|
-
className: `${
|
|
5161
|
+
className: `${jr.link} ${a ? jr.current : ""}`,
|
|
5152
5162
|
tabIndex: r.id === d ? 0 : -1,
|
|
5153
5163
|
"aria-current": a ? "page" : void 0,
|
|
5154
5164
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5164,7 +5174,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5164
5174
|
onKeyDown: (e) => p(e, r)
|
|
5165
5175
|
};
|
|
5166
5176
|
return /* @__PURE__ */ t("li", {
|
|
5167
|
-
className:
|
|
5177
|
+
className: jr.item,
|
|
5168
5178
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5169
5179
|
href: r.href,
|
|
5170
5180
|
...c,
|
|
@@ -5181,4 +5191,4 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5181
5191
|
});
|
|
5182
5192
|
};
|
|
5183
5193
|
//#endregion
|
|
5184
|
-
export {
|
|
5194
|
+
export { In as ConfirmModal, Dr as DSAccordion, w as DSBadge, Mr as DSBottomNavigation, Qn as DSBottomSheet, j as DSButton, Ne as DSCheckbox, D as DSCounterBadge, zt as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, Zn as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, cn as DSFileInput, Qt as DSFilters, dn as DSFloatingMenu, en as DSFormGrid, tn as DSFormGridItem, $n as DSFullscreenDialog, Y as DSIcon, je as DSIconNames, Xt as DSInfoBlock, mt as DSInput, k as DSLoader, An as DSModal, kn as DSModalFrame, Ar as DSNavigationSurface, Xn as DSOverlay, tr as DSPageLoader, ln as DSPortal, xt as DSRadioButton, Jt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, vr as DSTabs, hn as DSTextarea, ir as DSToast, cr as DSToastProvider, gr as DSTooltip, nn as DSValidationSummary, wr as DSVideoPlayerFrame, Ln as ErrorModal, jn as ModalSystemProvider, Rn as builtInModalRegistry, Mn as defineModalRegistry, E as formatDSCounterValue, ze as formatDateInputValue, Ge as formatDateTimeLocalValue, Er as getDSAccordionScrollTarget, Dt as getDSDataTableColumnStyle, kt as getDSDataTablePaginationItems, Ot as getDSDataTableStickyColumnStyle, Bn as getErrorMessage, Et as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, vn as resetModalStore, sr as resetToastStore, zn as useConfirmModal, Hn as useConfirmModalStore, Yn as useDSOverlay, Vn as useErrorModal, Un as useErrorModalStore, Wn as useModals, _n as useModalsStore, lr as useToast, or as useToastStore, At as validateDSDataTableData };
|