mimir-ui-kit 1.43.27 → 1.43.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/assets/Drawer.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._drawerContainer_1rv8z_2{position:fixed;z-index:1000000}._drawer_1rv8z_2{--drawer-width: 808px;--drawer-z-index: 10000;position:fixed;z-index:10000;z-index:var(--drawer-z-index);display:flex;flex-direction:column;width:808px;width:var(--drawer-width);height:100%;overflow:auto;background-color:var(--black-5);transition:all .3s ease;pointer-events:none}._drawer_1rv8z_2::-webkit-scrollbar{width:3px}._drawer_1rv8z_2::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._drawer_1rv8z_2::-webkit-scrollbar-track{background-color:var(--white)}._drawer_1rv8z_2 ._content_1rv8z_31{position:relative;display:flex;flex:1;flex-direction:column;padding:var(--mimir-space-m) var(--mimir-space-xs) var(--mimir-space-3xs) var(--mimir-space-4xl);overflow:hidden;transition:all .3s ease}@media (max-width: 600px){._drawer_1rv8z_2 ._content_1rv8z_31{--drawer-width: 100%;padding:var(--mimir-space-m)}}._drawer_1rv8z_2 ._header_1rv8z_46{display:flex;gap:var(--mimir-space-xs);min-height:68px}._drawer_1rv8z_2 ._header_1rv8z_46:not(:last-child){margin-bottom:var(--mimir-space-2xl)}._drawer_1rv8z_2 ._header_1rv8z_46._sticky-header_1rv8z_54{position:-webkit-sticky;position:sticky;top:0;left:0;background-color:var(--black-5)}._drawer_1rv8z_2 ._header_1rv8z_46 ._title_1rv8z_60{flex:1;align-self:flex-end;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-xl3);line-height:var(--mimir-space-2xxl);letter-spacing:.7px}@media (max-width: 600px){._drawer_1rv8z_2 ._header_1rv8z_46 ._title_1rv8z_60{font-size:var(--mimir-size-text-xl2);line-height:var(--mimir-line-height-text-xs)}}._drawer_1rv8z_2 ._header_1rv8z_46 ._space_1rv8z_74{flex:0 0 var(--button-height-m)}@media (max-width: 600px){._drawer_1rv8z_2 ._header_1rv8z_46{min-height:55px}._drawer_1rv8z_2 ._header_1rv8z_46:not(:last-child){margin-bottom:var(--mimir-space-m)}}._drawer_1rv8z_2 ._inner_1rv8z_85{flex:1;padding-right:var(--mimir-space-xxl);overflow-y:auto}._drawer_1rv8z_2 ._inner_1rv8z_85._is-loading_1rv8z_90{display:flex;flex-direction:column;align-items:center;justify-content:center}@media (max-width: 600px){._drawer_1rv8z_2 ._inner_1rv8z_85{padding-right:0}}._drawer_1rv8z_2 ._button_1rv8z_101{position:absolute;top:var(--mimir-space-m);right:var(--mimir-space-m)}._drawer_1rv8z_2 ._footer_1rv8z_106{display:block;padding:var(--mimir-space-2xl) var(--mimir-space-xxl) var(--mimir-space-4xl) var(--mimir-space-xxl)}@media (max-width: 600px){._drawer_1rv8z_2 ._footer_1rv8z_106{padding:var(--mimir-space-m)}}._drawer_1rv8z_2 ._footer_1rv8z_106._has-scroll_1rv8z_115{box-shadow:var(--mimir-modal-window-bottom-panel-shadow)}._drawer_1rv8z_2 ._footer-button_1rv8z_118{display:block;margin-left:auto}._drawer_1rv8z_2._left_1rv8z_122{top:0;left:-100%}._drawer_1rv8z_2._right_1rv8z_126{top:0;right:-100%}._drawer_1rv8z_2._full_1rv8z_130{top:0;right:0;bottom:0;left:0;width:100%;height:100%;max-height:100vh;border-radius:0;transform:scale(.95);opacity:0;transition:transform .3s ease-in-out,opacity .3s ease-in-out}._drawer_1rv8z_2._bottom_1rv8z_140{--drawer-width: calc(100% - var(--mimir-space-m));right:50%;bottom:-100%;left:50%;height:-webkit-max-content;height:-moz-max-content;height:max-content;max-height:calc(100% - var(--mimir-space-xs));border-top-left-radius:var(--mimir-control-radius);border-top-right-radius:var(--mimir-control-radius);transform:translate(-50%)}._drawer_1rv8z_2._bottom_1rv8z_140._full-bottom-height_1rv8z_151{height:calc(100% - var(--mimir-space-xs))}._drawer_1rv8z_2._bottom_1rv8z_140._is-loading_1rv8z_90{height:50vh}._drawer_1rv8z_2._opened_1rv8z_157{transition:all .3s ease;pointer-events:auto}._drawer_1rv8z_2._opened_1rv8z_157._left_1rv8z_122{left:0%;transition:left .3s ease}._drawer_1rv8z_2._opened_1rv8z_157._right_1rv8z_126{right:0%;transition:right .3s ease}._drawer_1rv8z_2._opened_1rv8z_157._bottom_1rv8z_140{bottom:0%}._drawer_1rv8z_2._opened_1rv8z_157._full_1rv8z_130{transform:scale(1);opacity:1}._drawer_1rv8z_2._is-closing_1rv8z_176._left_1rv8z_122{left:-100%}._drawer_1rv8z_2._is-closing_1rv8z_176._right_1rv8z_126{right:-100%}._drawer_1rv8z_2._is-closing_1rv8z_176._bottom_1rv8z_140{bottom:-100%}._drawer_1rv8z_2._is-closing_1rv8z_176._full_1rv8z_130{transform:scale(.95);opacity:0}@media (max-width: 1440px){._drawer_1rv8z_2{--drawer-width: 608px}}@media (max-width: 1280px){._drawer_1rv8z_2{--drawer-width: 648px}}@media (max-width: 768px){._drawer_1rv8z_2{--drawer-width: 584px}}@media (max-width: 600px){._drawer_1rv8z_2{--drawer-width: 100%}._drawer_1rv8z_2._bottom_1rv8z_140{--drawer-width: calc(100% - var(--mimir-space-m))}}._overlay_1rv8z_213{--overlay-z-index: 9990;position:fixed;top:0;left:0;z-index:9990;z-index:var(--overlay-z-index);width:100%;height:100%;background-color:#0009;opacity:0;transition:all .3s ease;pointer-events:none}._overlay_1rv8z_213._opened_1rv8z_157{opacity:1;transition:all .3s ease;pointer-events:auto}._overlay_1rv8z_213._opened_1rv8z_157._unmount_1rv8z_231{z-index:var(--overlay-z-index);-webkit-appearance:none;-moz-appearance:none;appearance:none}._overlay_1rv8z_213._is-closing_1rv8z_176{opacity:0;transition:all .3s ease}._overlay_1rv8z_213._unmount_1rv8z_231{z-index:-1;-webkit-appearance:none;-moz-appearance:none;appearance:none}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { c as t } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
3
|
+
import { forwardRef as re, useState as p, useRef as L, useEffect as M, useCallback as z } from "react";
|
4
4
|
import { EDrawerPosition as R } from "./constants.js";
|
5
|
-
import { useContainer as
|
5
|
+
import { useContainer as ne } from "./hooks.js";
|
6
6
|
import { ScrollWrapper as se } from "./ScrollWrapper/index.js";
|
7
7
|
import { useMediaQuery as ie } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
8
8
|
import { EMediaQuery as ae } from "../../hooks/useMediaQuery/constants.js";
|
@@ -13,27 +13,27 @@ import { EButtonVariantDefault as de, EButtonSize as c } from "../Button/constan
|
|
13
13
|
import { Loader as ue } from "../Loader/Loader.js";
|
14
14
|
import { Portal as me } from "../Portal/Portal.js";
|
15
15
|
import { EScrollBarVariant as fe, EScrollBarSize as _e } from "../ScrollBar/constants.js";
|
16
|
-
import '../../assets/Drawer.css';const
|
17
|
-
drawerContainer:
|
16
|
+
import '../../assets/Drawer.css';const ve = "_drawerContainer_1rv8z_2", he = "_drawer_1rv8z_2", pe = "_content_1rv8z_31", ze = "_header_1rv8z_46", Ce = "_title_1rv8z_60", ge = "_space_1rv8z_74", we = "_inner_1rv8z_85", ye = "_button_1rv8z_101", be = "_footer_1rv8z_106", Ne = "_left_1rv8z_122", ke = "_right_1rv8z_126", Se = "_full_1rv8z_130", Be = "_bottom_1rv8z_140", Ee = "_opened_1rv8z_157", Ie = "_overlay_1rv8z_213", Oe = "_unmount_1rv8z_231", e = {
|
17
|
+
drawerContainer: ve,
|
18
18
|
drawer: he,
|
19
|
-
content:
|
20
|
-
header:
|
21
|
-
"sticky-header": "_sticky-
|
22
|
-
title:
|
23
|
-
space:
|
24
|
-
inner:
|
25
|
-
"is-loading": "_is-
|
26
|
-
button:
|
27
|
-
footer:
|
28
|
-
"has-scroll": "_has-
|
29
|
-
"footer-button": "_footer-
|
19
|
+
content: pe,
|
20
|
+
header: ze,
|
21
|
+
"sticky-header": "_sticky-header_1rv8z_54",
|
22
|
+
title: Ce,
|
23
|
+
space: ge,
|
24
|
+
inner: we,
|
25
|
+
"is-loading": "_is-loading_1rv8z_90",
|
26
|
+
button: ye,
|
27
|
+
footer: be,
|
28
|
+
"has-scroll": "_has-scroll_1rv8z_115",
|
29
|
+
"footer-button": "_footer-button_1rv8z_118",
|
30
30
|
left: Ne,
|
31
31
|
right: ke,
|
32
32
|
full: Se,
|
33
33
|
bottom: Be,
|
34
|
-
"full-bottom-height": "_full-bottom-
|
34
|
+
"full-bottom-height": "_full-bottom-height_1rv8z_151",
|
35
35
|
opened: Ee,
|
36
|
-
"is-closing": "_is-
|
36
|
+
"is-closing": "_is-closing_1rv8z_176",
|
37
37
|
overlay: Ie,
|
38
38
|
unmount: Oe
|
39
39
|
}, Le = 300, Me = (d) => d ? {
|
@@ -45,15 +45,15 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
45
45
|
position: "absolute",
|
46
46
|
zIndex: 90
|
47
47
|
}
|
48
|
-
} : {}, qe =
|
48
|
+
} : {}, qe = re(
|
49
49
|
(d, T) => {
|
50
50
|
const {
|
51
51
|
as: x = "div",
|
52
|
-
isOpen:
|
52
|
+
isOpen: n,
|
53
53
|
onClose: u,
|
54
54
|
title: D,
|
55
55
|
className: A,
|
56
|
-
unmount:
|
56
|
+
unmount: C = !0,
|
57
57
|
isLoading: s = !1,
|
58
58
|
stickyHeader: P,
|
59
59
|
fullBottomHeight: X = !1,
|
@@ -67,13 +67,13 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
67
67
|
classNameDrawerContainer: F,
|
68
68
|
classNameContent: K,
|
69
69
|
classNameFooter: Y,
|
70
|
-
closeOnClickOutside:
|
71
|
-
showCloseButton:
|
70
|
+
closeOnClickOutside: g = !0,
|
71
|
+
showCloseButton: w = !0,
|
72
72
|
getContainer: _,
|
73
73
|
...q
|
74
|
-
} = d, [
|
74
|
+
} = d, [y, b] = p(!1), [J, N] = p(!1), k = L(), v = ie(ae.XS1), { ref: U } = ce({
|
75
75
|
enabled: m === R.BOTTOM
|
76
|
-
}), S =
|
76
|
+
}), S = ne(_), i = L(null), [Z, $] = p(!1);
|
77
77
|
M(() => {
|
78
78
|
const a = () => {
|
79
79
|
if (i.current) {
|
@@ -86,32 +86,32 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
86
86
|
return i.current && O.observe(i.current), () => {
|
87
87
|
O.disconnect();
|
88
88
|
};
|
89
|
-
}, [
|
90
|
-
on:
|
89
|
+
}, [n, s]), le({
|
90
|
+
on: n && !y,
|
91
91
|
paddingRight: j
|
92
92
|
});
|
93
|
-
const
|
94
|
-
u && (
|
95
|
-
u(),
|
93
|
+
const r = z(() => {
|
94
|
+
u && (b(!0), k.current = setTimeout(() => {
|
95
|
+
u(), b(!1);
|
96
96
|
}, Le));
|
97
|
-
}, [u]), ee =
|
98
|
-
|
99
|
-
}, [
|
97
|
+
}, [u]), ee = z(() => {
|
98
|
+
g && r();
|
99
|
+
}, [g, r]), h = z(
|
100
100
|
(a) => {
|
101
|
-
a.key === "Escape" &&
|
101
|
+
a.key === "Escape" && r();
|
102
102
|
},
|
103
|
-
[
|
103
|
+
[r]
|
104
104
|
);
|
105
|
-
M(() => (
|
105
|
+
M(() => (n && (N(!0), window.addEventListener("keydown", h)), () => {
|
106
106
|
N(!1), clearTimeout(k.current), window.removeEventListener("keydown", h);
|
107
|
-
}), [
|
107
|
+
}), [n, h]);
|
108
108
|
const B = {
|
109
109
|
[e.opened]: J,
|
110
|
-
[e["is-closing"]]:
|
110
|
+
[e["is-closing"]]: y,
|
111
111
|
[e["full-bottom-height"]]: X,
|
112
112
|
[e["is-loading"]]: s
|
113
113
|
};
|
114
|
-
if (!
|
114
|
+
if (!n && C)
|
115
115
|
return null;
|
116
116
|
const E = Me(_ !== void 0 && _ !== !1), I = /* @__PURE__ */ l(
|
117
117
|
"div",
|
@@ -122,7 +122,7 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
122
122
|
x,
|
123
123
|
{
|
124
124
|
ref: T,
|
125
|
-
"aria-hidden": !
|
125
|
+
"aria-hidden": !n,
|
126
126
|
role: "dialog",
|
127
127
|
style: E.drawer,
|
128
128
|
className: t(e.drawer, e[m], B, A),
|
@@ -149,14 +149,14 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
149
149
|
}),
|
150
150
|
children: [
|
151
151
|
/* @__PURE__ */ o("h2", { className: t(e.title, Q), children: D }),
|
152
|
-
/* @__PURE__ */ o("div", { className: e.space, children:
|
152
|
+
/* @__PURE__ */ o("div", { className: e.space, children: w && /* @__PURE__ */ o(
|
153
153
|
H,
|
154
154
|
{
|
155
155
|
variant: de.SecondaryWhite,
|
156
156
|
isIconButton: !0,
|
157
|
-
size:
|
157
|
+
size: v ? c.S : c.M,
|
158
158
|
iconName: "Close16px",
|
159
|
-
onClick:
|
159
|
+
onClick: r,
|
160
160
|
className: e.button
|
161
161
|
}
|
162
162
|
) })
|
@@ -188,12 +188,12 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
188
188
|
className: t(e.footer, Y, {
|
189
189
|
[e["has-scroll"]]: Z
|
190
190
|
}),
|
191
|
-
children: typeof f == "function" ? f({ handleClose:
|
191
|
+
children: typeof f == "function" ? f({ handleClose: r }) : f || w && /* @__PURE__ */ o(
|
192
192
|
H,
|
193
193
|
{
|
194
|
-
size:
|
195
|
-
full:
|
196
|
-
onClick:
|
194
|
+
size: v ? c.L : c.XXL,
|
195
|
+
full: v,
|
196
|
+
onClick: r,
|
197
197
|
className: e["footer-button"],
|
198
198
|
children: "Закрыть"
|
199
199
|
}
|
@@ -209,7 +209,7 @@ import '../../assets/Drawer.css';const ye = "_drawerContainer_yzb8n_2", he = "_d
|
|
209
209
|
className: t(
|
210
210
|
e.overlay,
|
211
211
|
{
|
212
|
-
[e.unmount]: !
|
212
|
+
[e.unmount]: !C
|
213
213
|
},
|
214
214
|
B
|
215
215
|
),
|