mimir-ui-kit 1.37.16 → 1.37.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/Slider.css +1 -1
- package/dist/components/Drawer/Drawer.d.ts +5 -1
- package/dist/components/Drawer/Drawer.js +45 -44
- package/dist/components/Slider/Slider.d.ts +19 -1
- package/dist/components/Slider/Slider.js +570 -533
- package/dist/components/Slider/constants.d.ts +4 -0
- package/dist/components/Slider/constants.js +4 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +14 -12
- package/dist/index.js +31 -29
- package/package.json +1 -1
package/dist/assets/Slider.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGB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vq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:ease;transition-timing-function:initial;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-left:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-top:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid #007aff;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.
|
1
|
+
@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMn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imrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:ease;transition-timing-function:initial;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-left:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-top:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid #007aff;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._swiper_1f4c7_3{position:relative;display:flex;flex-direction:column}._slide_1f4c7_9{position:relative;display:flex;align-items:center;justify-content:center}._link_1f4c7_16{display:block;width:100%;height:100%}._image_1f4c7_22{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}._navigation_1f4c7_29{display:flex;flex-direction:column;align-items:flex-end;-moz-column-gap:var(--mimir-space-2xl);column-gap:var(--mimir-space-2xl)}._navigation_1f4c7_29:not(:last-child){margin-bottom:var(--mimir-space-xs)}._pagination_1f4c7_39{display:flex;align-items:center;-moz-column-gap:var(--mimir-space-4xl);column-gap:var(--mimir-space-4xl)}._pagination_1f4c7_39:not(:last-child){margin-bottom:var(--mimir-space-xl)}@media (max-width: 768px){._pagination_1f4c7_39{justify-content:space-between;width:100%}}._pagination_1f4c7_39._is-full_1f4c7_53{justify-content:space-between;width:100%}._slides_1f4c7_58{display:flex;align-items:center;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs)}._separator_1f4c7_64{display:block;width:50px;height:1px;background-color:var(--black-100)}._progress_1f4c7_71{position:relative;width:100%;height:2px;overflow:hidden;background-color:var(--black-20)}._progress_1f4c7_71._progress-bar-bottom_1f4c7_78{margin-top:var(--mimir-space-m)}._progress-bar_1f4c7_78{width:0%;height:100%;background-color:var(--sapphire-100)}._descriptions_1f4c7_88{display:flex;justify-content:space-between;margin-top:var(--mimir-space-m)}
|
@@ -57,6 +57,10 @@ type TProps = {
|
|
57
57
|
* Дополнительный класс для header.
|
58
58
|
*/
|
59
59
|
classNameHeader?: string;
|
60
|
+
/**
|
61
|
+
* Дополнительный класс для content.
|
62
|
+
*/
|
63
|
+
classNameContent?: string;
|
60
64
|
/**
|
61
65
|
* Дополнительный класс для inner.
|
62
66
|
*/
|
@@ -77,5 +81,5 @@ type TProps = {
|
|
77
81
|
/**
|
78
82
|
* Компонент шторки, который может выезжать слева, справа или внизу.
|
79
83
|
*/
|
80
|
-
export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameTitle, classNameHeader, classNameInner, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
|
84
|
+
export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameTitle, classNameHeader, classNameInner, classNameContent, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
|
81
85
|
export {};
|
@@ -1,37 +1,37 @@
|
|
1
|
-
import { jsxs as m, jsx as t, Fragment as
|
1
|
+
import { jsxs as m, jsx as t, Fragment as Q } from "react/jsx-runtime";
|
2
2
|
import { c as s } from "../../index-DIxK0V-G.js";
|
3
|
-
import { useState as N, useRef as
|
3
|
+
import { useState as N, useRef as F, useCallback as u, useEffect as G } from "react";
|
4
4
|
import { EDrawerPosition as w } from "./constants.js";
|
5
|
-
import { useMediaQuery as
|
6
|
-
import { EMediaQuery as
|
7
|
-
import { useLockBodyScroll as
|
8
|
-
import { useResizeObserver as
|
5
|
+
import { useMediaQuery as H } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
6
|
+
import { EMediaQuery as K } from "../../hooks/useMediaQuery/constants.js";
|
7
|
+
import { useLockBodyScroll as V } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
|
8
|
+
import { useResizeObserver as W } from "../../hooks/useResizeObserver/useResizeObserver.js";
|
9
9
|
import { Button as k } from "../Button/Button.js";
|
10
|
-
import { EButtonVariantDefault as
|
11
|
-
import { Loader as
|
12
|
-
import { Portal as
|
13
|
-
import '../../assets/Drawer.css';const
|
14
|
-
drawer:
|
15
|
-
content:
|
10
|
+
import { EButtonVariantDefault as Y, EButtonSize as n } from "../Button/constants.js";
|
11
|
+
import { Loader as q } from "../Loader/Loader.js";
|
12
|
+
import { Portal as J } from "../Portal/Portal.js";
|
13
|
+
import '../../assets/Drawer.css';const U = "_drawer_1xs4d_3", Z = "_content_1xs4d_27", $ = "_header_1xs4d_45", O = "_title_1xs4d_59", ee = "_space_1xs4d_73", te = "_inner_1xs4d_84", oe = "_button_1xs4d_87", se = "_footer_1xs4d_92", re = "_left_1xs4d_105", ne = "_right_1xs4d_109", ae = "_full_1xs4d_113", ie = "_bottom_1xs4d_123", le = "_opened_1xs4d_140", ce = "_overlay_1xs4d_196", de = "_unmount_1xs4d_212", e = {
|
14
|
+
drawer: U,
|
15
|
+
content: Z,
|
16
16
|
"is-loading": "_is-loading_1xs4d_41",
|
17
|
-
header:
|
17
|
+
header: $,
|
18
18
|
"sticky-header": "_sticky-header_1xs4d_53",
|
19
|
-
title:
|
20
|
-
space:
|
21
|
-
inner:
|
22
|
-
button:
|
23
|
-
footer:
|
19
|
+
title: O,
|
20
|
+
space: ee,
|
21
|
+
inner: te,
|
22
|
+
button: oe,
|
23
|
+
footer: se,
|
24
24
|
"footer-button": "_footer-button_1xs4d_101",
|
25
|
-
left:
|
26
|
-
right:
|
27
|
-
full:
|
28
|
-
bottom:
|
25
|
+
left: re,
|
26
|
+
right: ne,
|
27
|
+
full: ae,
|
28
|
+
bottom: ie,
|
29
29
|
"full-bottom-height": "_full-bottom-height_1xs4d_134",
|
30
|
-
opened:
|
30
|
+
opened: le,
|
31
31
|
"is-closing": "_is-closing_1xs4d_159",
|
32
|
-
overlay:
|
33
|
-
unmount:
|
34
|
-
},
|
32
|
+
overlay: ce,
|
33
|
+
unmount: de
|
34
|
+
}, _e = 300, ke = ({
|
35
35
|
isOpen: r,
|
36
36
|
onClose: a,
|
37
37
|
title: E,
|
@@ -47,39 +47,40 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
|
|
47
47
|
classNameTitle: C,
|
48
48
|
classNameHeader: D,
|
49
49
|
classNameInner: z,
|
50
|
-
|
50
|
+
classNameContent: L,
|
51
|
+
classNameFooter: R,
|
51
52
|
closeOnClickOutside: h = !0,
|
52
53
|
showCloseButton: x = !0
|
53
54
|
}) => {
|
54
|
-
const [p, y] = N(!1), [
|
55
|
+
const [p, y] = N(!1), [A, b] = N(!1), g = F(), d = H(K.XS1), { ref: X } = W({
|
55
56
|
enabled: l === w.BOTTOM
|
56
57
|
});
|
57
|
-
|
58
|
+
V({
|
58
59
|
on: r && !p,
|
59
60
|
paddingRight: S
|
60
61
|
});
|
61
62
|
const o = u(() => {
|
62
63
|
a && (y(!0), g.current = setTimeout(() => {
|
63
64
|
a(), y(!1);
|
64
|
-
},
|
65
|
-
}, [a]),
|
65
|
+
}, _e));
|
66
|
+
}, [a]), j = u(() => {
|
66
67
|
h && o();
|
67
68
|
}, [h, o]), _ = u(
|
68
|
-
(
|
69
|
-
|
69
|
+
(P) => {
|
70
|
+
P.key === "Escape" && o();
|
70
71
|
},
|
71
72
|
[o]
|
72
73
|
);
|
73
|
-
|
74
|
+
G(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
|
74
75
|
b(!1), clearTimeout(g.current), window.removeEventListener("keydown", _);
|
75
76
|
}), [r, _]);
|
76
77
|
const v = {
|
77
|
-
[e.opened]:
|
78
|
+
[e.opened]: A,
|
78
79
|
[e["is-closing"]]: p,
|
79
80
|
[e["full-bottom-height"]]: I,
|
80
81
|
[e["is-loading"]]: i
|
81
82
|
};
|
82
|
-
return !r && f ? null : /* @__PURE__ */ m(
|
83
|
+
return !r && f ? null : /* @__PURE__ */ m(J, { children: [
|
83
84
|
/* @__PURE__ */ t(
|
84
85
|
"div",
|
85
86
|
{
|
@@ -89,11 +90,11 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
|
|
89
90
|
children: /* @__PURE__ */ t(
|
90
91
|
"section",
|
91
92
|
{
|
92
|
-
ref:
|
93
|
-
className: s(e.content, e[l], {
|
93
|
+
ref: X,
|
94
|
+
className: s(e.content, L, e[l], {
|
94
95
|
[e["is-loading"]]: !!i
|
95
96
|
}),
|
96
|
-
children: i ? /* @__PURE__ */ t(
|
97
|
+
children: i ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ m(Q, { children: [
|
97
98
|
/* @__PURE__ */ m(
|
98
99
|
"header",
|
99
100
|
{
|
@@ -105,7 +106,7 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
|
|
105
106
|
/* @__PURE__ */ t("div", { className: e.space, children: x && /* @__PURE__ */ t(
|
106
107
|
k,
|
107
108
|
{
|
108
|
-
variant:
|
109
|
+
variant: Y.SecondaryWhite,
|
109
110
|
isIconButton: !0,
|
110
111
|
size: d ? n.S : n.M,
|
111
112
|
iconName: "Close16px",
|
@@ -117,7 +118,7 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
|
|
117
118
|
}
|
118
119
|
),
|
119
120
|
/* @__PURE__ */ t("div", { className: s(e.inner, z), children: T }),
|
120
|
-
/* @__PURE__ */ t("footer", { className: s(e.footer,
|
121
|
+
/* @__PURE__ */ t("footer", { className: s(e.footer, R), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
|
121
122
|
k,
|
122
123
|
{
|
123
124
|
size: d ? n.M : n.XXL,
|
@@ -143,12 +144,12 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
|
|
143
144
|
v
|
144
145
|
),
|
145
146
|
"data-testid": "drawer-overlay",
|
146
|
-
onClick:
|
147
|
+
onClick: j
|
147
148
|
}
|
148
149
|
)
|
149
150
|
] });
|
150
151
|
};
|
151
152
|
export {
|
152
|
-
|
153
|
-
|
153
|
+
_e as ANIMATION_DELAY,
|
154
|
+
ke as Drawer
|
154
155
|
};
|
@@ -1,10 +1,28 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
1
2
|
import { SwiperProps } from 'swiper/react';
|
3
|
+
import { EProgressBarPosition } from './constants';
|
2
4
|
|
3
5
|
type TProps = SwiperProps & {
|
4
6
|
/**
|
5
7
|
* Задержка перехода между слайдами
|
6
8
|
*/
|
7
9
|
delay?: number;
|
10
|
+
/**
|
11
|
+
* Ширина пагинации слайдера на весь размер родительского контейнера
|
12
|
+
*/
|
13
|
+
isFullPaginationWidth?: boolean;
|
14
|
+
/**
|
15
|
+
* Положение прогресс бара.
|
16
|
+
*/
|
17
|
+
progressBarPosition?: EProgressBarPosition | `${EProgressBarPosition}`;
|
18
|
+
/**
|
19
|
+
* Левая подпись под прогресс баром. (Отобразится, если progressBarPosition === 'bottom')
|
20
|
+
*/
|
21
|
+
leftDescription?: ReactNode;
|
22
|
+
/**
|
23
|
+
* Правая подпись под прогресс баром. (Отобразится, если progressBarPosition === 'bottom')
|
24
|
+
*/
|
25
|
+
rightDescription?: ReactNode;
|
8
26
|
/**
|
9
27
|
* Дополнительные классы для слайдов
|
10
28
|
*/
|
@@ -28,5 +46,5 @@ type TProps = SwiperProps & {
|
|
28
46
|
id?: number;
|
29
47
|
}[];
|
30
48
|
};
|
31
|
-
export default function Slider({ images, swiperClassName, slideClassName, imageClassName, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
49
|
+
export default function Slider({ images, swiperClassName, slideClassName, imageClassName, progressBarPosition, isFullPaginationWidth, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
32
50
|
export {};
|