mimir-ui-kit 1.43.8 → 1.43.9
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.
@@ -27,6 +27,10 @@ type TProps = SwiperProps & {
|
|
27
27
|
* Показывать стрелки навигации и количество слайдов.
|
28
28
|
*/
|
29
29
|
needNavigation?: boolean;
|
30
|
+
/**
|
31
|
+
* Приостанавливать автопрокрутку при наведении на слайдер.
|
32
|
+
*/
|
33
|
+
pauseOnMouseEnter?: boolean;
|
30
34
|
/**
|
31
35
|
* Функция, которая будет вызвана при клике на слайд.
|
32
36
|
*/
|
@@ -88,5 +92,5 @@ type TProps = SwiperProps & {
|
|
88
92
|
*/
|
89
93
|
images?: TSlideImage[];
|
90
94
|
};
|
91
|
-
export default function Slider({ images, children, gap, onSlideClick, swiperClassName, slideClassName, imageClassName, navigationClassName, navigationContent, sliderBottomPanelClassName, descriptionsClassName, navigationContentClassName, buttonsVariant, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
95
|
+
export default function Slider({ images, children, gap, onSlideClick, swiperClassName, slideClassName, imageClassName, navigationClassName, navigationContent, sliderBottomPanelClassName, descriptionsClassName, navigationContentClassName, buttonsVariant, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, pauseOnMouseEnter, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
92
96
|
export {};
|
@@ -1,35 +1,35 @@
|
|
1
1
|
import { jsx as s, jsxs as o, Fragment as N } from "react/jsx-runtime";
|
2
2
|
import { c as a } from "../../index-DIxK0V-G.js";
|
3
|
-
import { memo as F, useCallback as u, useMemo as
|
4
|
-
import { u as
|
3
|
+
import { memo as F, useCallback as u, useMemo as Z, forwardRef as V, useRef as B, useState as W, Children as I } from "react";
|
4
|
+
import { u as ee, S as se, A as re, a as T } from "../../swiper-react-BvAw14a4.js";
|
5
5
|
import { EProgressBarPosition as S } from "./constants.js";
|
6
6
|
import { formatSlideNumber as O } from "./utils.js";
|
7
7
|
import { AppImage as P } from "../Image/Image.js";
|
8
|
-
import { MergedButton as
|
9
|
-
import '../../assets/Slider.css';const
|
10
|
-
swiper:
|
11
|
-
slide:
|
12
|
-
link:
|
13
|
-
image:
|
14
|
-
navigation:
|
8
|
+
import { MergedButton as te } from "../MergedButton/MergedButton.js";
|
9
|
+
import '../../assets/Slider.css';const ne = "_swiper_zqjj3_2", ae = "_slide_zqjj3_8", oe = "_link_zqjj3_15", ie = "_image_zqjj3_21", le = "_navigation_zqjj3_28", ce = "_pagination_zqjj3_46", de = "_slides_zqjj3_65", pe = "_separator_zqjj3_71", ue = "_progress_zqjj3_78", me = "_descriptions_zqjj3_95", e = {
|
10
|
+
swiper: ne,
|
11
|
+
slide: ae,
|
12
|
+
link: oe,
|
13
|
+
image: ie,
|
14
|
+
navigation: le,
|
15
15
|
"navigation-content": "_navigation-content_zqjj3_37",
|
16
|
-
pagination:
|
16
|
+
pagination: ce,
|
17
17
|
"is-full": "_is-full_zqjj3_60",
|
18
|
-
slides:
|
19
|
-
separator:
|
20
|
-
progress:
|
18
|
+
slides: de,
|
19
|
+
separator: pe,
|
20
|
+
progress: ue,
|
21
21
|
"progress-bar-bottom": "_progress-bar-bottom_zqjj3_85",
|
22
22
|
"progress-bar": "_progress-bar_zqjj3_85",
|
23
|
-
descriptions:
|
24
|
-
},
|
23
|
+
descriptions: me
|
24
|
+
}, _e = 15e3, E = F(
|
25
25
|
({
|
26
26
|
variant: t = "white"
|
27
27
|
}) => {
|
28
|
-
const n =
|
28
|
+
const n = ee(), p = u(() => {
|
29
29
|
n.slideNext();
|
30
30
|
}, [n]), c = u(() => {
|
31
31
|
n.slidePrev();
|
32
|
-
}, [n]), m =
|
32
|
+
}, [n]), m = Z(
|
33
33
|
() => [
|
34
34
|
{
|
35
35
|
isIconButton: !0,
|
@@ -46,10 +46,10 @@ import '../../assets/Slider.css';const te = "_swiper_zqjj3_2", ne = "_slide_zqjj
|
|
46
46
|
],
|
47
47
|
[c, t, p]
|
48
48
|
);
|
49
|
-
return /* @__PURE__ */ s(
|
49
|
+
return /* @__PURE__ */ s(te, { buttons: m });
|
50
50
|
}
|
51
51
|
), b = F(
|
52
|
-
|
52
|
+
V((t, n) => /* @__PURE__ */ s(
|
53
53
|
"div",
|
54
54
|
{
|
55
55
|
"data-testid": "progress-bar-wrapper",
|
@@ -65,7 +65,7 @@ import '../../assets/Slider.css';const te = "_swiper_zqjj3_2", ne = "_slide_zqjj
|
|
65
65
|
}
|
66
66
|
))
|
67
67
|
);
|
68
|
-
function
|
68
|
+
function ze({
|
69
69
|
images: t,
|
70
70
|
children: n,
|
71
71
|
gap: p,
|
@@ -84,17 +84,18 @@ function qe({
|
|
84
84
|
needNavigation: i = !0,
|
85
85
|
leftDescription: C,
|
86
86
|
rightDescription: y,
|
87
|
-
delay: D =
|
88
|
-
|
87
|
+
delay: D = _e,
|
88
|
+
pauseOnMouseEnter: U = !1,
|
89
|
+
...Y
|
89
90
|
}) {
|
90
|
-
const d = B(null), h = B(null), [
|
91
|
-
j ?
|
92
|
-
),
|
91
|
+
const d = B(null), h = B(null), [G, H] = W(1), j = !(typeof n == "function") && !!n, J = j ? I.count(n) : 0, K = (t == null ? void 0 : t.length) ?? 0, A = O(G), x = O(
|
92
|
+
j ? J : K
|
93
|
+
), Q = u(() => {
|
93
94
|
if (h.current && i) {
|
94
95
|
const r = h.current.swiper;
|
95
|
-
|
96
|
+
H(r.realIndex + 1);
|
96
97
|
}
|
97
|
-
}, [i]),
|
98
|
+
}, [i]), X = u(
|
98
99
|
(r, l) => {
|
99
100
|
if (d.current && i) {
|
100
101
|
const g = r.params.autoplay.delay, w = l / g * 100;
|
@@ -104,23 +105,24 @@ function qe({
|
|
104
105
|
[i]
|
105
106
|
);
|
106
107
|
return /* @__PURE__ */ o(
|
107
|
-
|
108
|
+
se,
|
108
109
|
{
|
109
|
-
...
|
110
|
+
...Y,
|
110
111
|
ref: h,
|
111
112
|
className: a(e.swiper, m),
|
112
113
|
loop: !0,
|
113
114
|
spaceBetween: p,
|
114
115
|
autoplay: {
|
115
116
|
delay: D,
|
116
|
-
disableOnInteraction: !1
|
117
|
+
disableOnInteraction: !1,
|
118
|
+
pauseOnMouseEnter: U
|
117
119
|
},
|
118
120
|
fadeEffect: {
|
119
121
|
crossFade: !0
|
120
122
|
},
|
121
|
-
modules: [
|
122
|
-
onAutoplayTimeLeft:
|
123
|
-
onSlideChange:
|
123
|
+
modules: [re],
|
124
|
+
onAutoplayTimeLeft: X,
|
125
|
+
onSlideChange: Q,
|
124
126
|
children: [
|
125
127
|
/* @__PURE__ */ s(
|
126
128
|
"div",
|
@@ -246,5 +248,5 @@ function qe({
|
|
246
248
|
);
|
247
249
|
}
|
248
250
|
export {
|
249
|
-
|
251
|
+
ze as default
|
250
252
|
};
|