mimir-ui-kit 1.42.0 → 1.42.2
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/CardTrail.css +1 -1
- package/dist/assets/ClearButton.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/components/CardTrail/CardTrail.d.ts +4 -0
- package/dist/components/CardTrail/CardTrail.js +112 -91
- package/dist/components/Image/Image.d.ts +16 -0
- package/dist/components/Image/Image.js +65 -37
- package/dist/components/InputClearButton/ClearButton.js +12 -12
- package/dist/components/ListFiles/ListFiles.js +37 -37
- package/dist/components/PromoSlider/PromoSlider.d.ts +5 -1
- package/dist/components/PromoSlider/PromoSlider.js +139 -138
- package/package.json +1 -1
- package/src/assets/styles/mixins/media.scss +1 -3
@@ -1 +1 @@
|
|
1
|
-
._card-
|
1
|
+
._card-trail_1wzbr_3{display:flex;flex-direction:column}._card-trail-header_1wzbr_7{display:flex;align-items:flex-end;justify-content:space-between}._card-trail-header_1wzbr_7:not(:last-child){margin-bottom:var(--mimir-space-xs)}._card-trail-header-title_1wzbr_15{margin-bottom:0;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-montserrat);line-height:var(--mimir-line-height-text-s1);letter-spacing:calc(var(--mimir-size-text-l) * -.02)}@media (max-width: 600px){._card-trail-header-title_1wzbr_15{font-size:var(--mimir-size-text-m);letter-spacing:calc(var(--mimir-size-text-m) * -.02)}}._card-trail-header-merged-button_1wzbr_29{margin-left:auto}._card-trail-list_1wzbr_32{display:flex;margin-bottom:0;padding:0;overflow:auto;white-space:nowrap;scroll-behavior:smooth;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}._card-trail-list_1wzbr_32::-webkit-scrollbar{display:none}._card-trail-list-item_1wzbr_46{white-space:normal;white-space:initial;scroll-snap-align:start}._card-trail-list-item_1wzbr_46._pointer_1wzbr_50{cursor:pointer}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._clear_n3to9_2{display:flex;flex-shrink:0;align-items:center;justify-content:center;color:var(--asphalt-normal);border-radius:var(--mimir-control-radius-xs)}._clear_n3to9_2 svg{color:currentcolor;fill:currentcolor}._clear_n3to9_2 svg path{color:currentcolor;fill:currentcolor}._clear_n3to9_2._gray_n3to9_18{background:var(--gray-normal)}._clear_n3to9_2:hover{color:var(--counter-text);box-shadow:none}._clear_n3to9_2:active{color:var(--asphalt-active);box-shadow:none}._clear_n3to9_2:disabled{color:var(--disabled)}._clear_n3to9_2._l_n3to9_32{width:var(--button-height-xs);height:var(--button-height-xs)}._clear_n3to9_2._m-s_n3to9_36{width:var(--button-height-ms);height:var(--button-height-ms)}
|
@@ -1 +1 @@
|
|
1
|
-
._file-
|
1
|
+
._file-info_hpqrc_2{display:flex;flex-direction:column;gap:var(--mimir-space-xs);overflow:hidden}._file-info_hpqrc_2 ._file-info-size_hpqrc_8{display:flex;align-items:center;height:var(--mimir-space-2m);color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-m);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xxs);text-align:left}._file-info_hpqrc_2 ._file-info-name-wrapper_hpqrc_19{display:table;width:100%;table-layout:fixed}._file-info_hpqrc_2 ._file-info-name-wrapper_hpqrc_19 ._file-info-name_hpqrc_19{display:table-cell;overflow:hidden;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l2);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xl);white-space:nowrap;text-align:left;text-overflow:ellipsis}._file-upload-container_hpqrc_37{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%;margin-bottom:0;padding-left:0}._file-upload-container_hpqrc_37 ._file-upload-container-item_hpqrc_45{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--mimir-space-xs) var(--mimir-space-m);background:var(--file-upload-container-background);border-radius:var(--mimir-control-radius)}._file-upload-container_hpqrc_37 ._file-upload-container-item_hpqrc_45 ._delete-button_hpqrc_54{position:absolute;top:var(--mimir-space-2xs);right:var(--mimir-space-2xs);background:var(--delete-button-background)}._white_hpqrc_61{--file-upload-container-background: var(--white);--delete-button-background: var(--black-5)}._gray_hpqrc_66{--file-upload-container-background: var(--black-5);--delete-button-background: var(--white)}
|
@@ -25,6 +25,10 @@ export type TProps = {
|
|
25
25
|
* Флаг, определяющий, нужно ли при клике на карточку скроллиться до нее.
|
26
26
|
*/
|
27
27
|
scrollToCard?: boolean;
|
28
|
+
/**
|
29
|
+
* Значение, которое раздвигает отрицательными и положительным отступами.
|
30
|
+
*/
|
31
|
+
padding?: number;
|
28
32
|
/**
|
29
33
|
* Флаг, определяющий, нужны ли кнопки для перелистывания.
|
30
34
|
*/
|
@@ -1,118 +1,135 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as
|
4
|
-
import { DEFAULT_SPACE_BETWEEN as
|
5
|
-
import { hasHorizontalScroll as
|
6
|
-
import { useMergeRefs as
|
7
|
-
import { useThrottledCallback as
|
8
|
-
import { MergedButton as
|
9
|
-
import '../../assets/CardTrail.css';const
|
10
|
-
"card-trail": "_card-
|
11
|
-
"card-trail-header": "_card-trail-
|
12
|
-
"card-trail-header-title": "_card-trail-header-
|
13
|
-
"card-trail-header-merged-button": "_card-trail-header-merged-
|
14
|
-
"card-trail-list": "_card-trail-
|
15
|
-
"card-trail-list-item": "_card-trail-list-
|
16
|
-
pointer:
|
17
|
-
}
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
2
|
+
import { c as n } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as q, useRef as f, useState as _, useEffect as P, Children as X } from "react";
|
4
|
+
import { DEFAULT_SPACE_BETWEEN as Y, DEFAULT_SCROLL_STEP as G, DEFAULT_DIVIDED as J, DEFAULT_CARD_INDEX as K } from "./constants.js";
|
5
|
+
import { hasHorizontalScroll as g, isScrollAtEdge as T } from "./utils.js";
|
6
|
+
import { useMergeRefs as Q } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
|
+
import { useThrottledCallback as Z } from "../../hooks/useThrottledCallback/index.js";
|
8
|
+
import { MergedButton as rr } from "../MergedButton/MergedButton.js";
|
9
|
+
import '../../assets/CardTrail.css';const tr = "_pointer_1wzbr_50", i = {
|
10
|
+
"card-trail": "_card-trail_1wzbr_3",
|
11
|
+
"card-trail-header": "_card-trail-header_1wzbr_7",
|
12
|
+
"card-trail-header-title": "_card-trail-header-title_1wzbr_15",
|
13
|
+
"card-trail-header-merged-button": "_card-trail-header-merged-button_1wzbr_29",
|
14
|
+
"card-trail-list": "_card-trail-list_1wzbr_32",
|
15
|
+
"card-trail-list-item": "_card-trail-list-item_1wzbr_46",
|
16
|
+
pointer: tr
|
17
|
+
};
|
18
|
+
let v = {};
|
19
|
+
const dr = q((w, D) => {
|
18
20
|
const {
|
19
|
-
cardClassName:
|
21
|
+
cardClassName: L,
|
20
22
|
cardTrailClassName: z,
|
21
|
-
cardTrailHeaderClassName:
|
23
|
+
cardTrailHeaderClassName: W,
|
22
24
|
cardTrailListClassName: A,
|
23
|
-
cardTrailMergedButtonClassName:
|
24
|
-
children:
|
25
|
-
title:
|
26
|
-
spaceBetween:
|
27
|
-
scrollStep:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
cardTrailMergedButtonClassName: R,
|
26
|
+
children: b,
|
27
|
+
title: p,
|
28
|
+
spaceBetween: o = Y,
|
29
|
+
scrollStep: C = G,
|
30
|
+
dividedCardWidth: k = J,
|
31
|
+
currentCardIndex: h = K,
|
32
|
+
mergedButtonProps: c,
|
33
|
+
scrollToCard: B = !1,
|
34
|
+
needButtons: I = !0,
|
35
|
+
padding: l = 0
|
36
|
+
} = w, r = f(null), N = f(!0), s = f(null), [d, y] = _({
|
34
37
|
leftButton: !0,
|
35
38
|
rightButton: !1
|
36
|
-
}), [
|
37
|
-
() =>
|
38
|
-
),
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
}), [M, x] = _(0), [U, E] = _(
|
40
|
+
() => g(r == null ? void 0 : r.current)
|
41
|
+
), F = Q(r, D), H = Z(() => {
|
42
|
+
var a;
|
43
|
+
if (N.current) {
|
44
|
+
N.current = !1;
|
45
|
+
const m = r.current, V = ((a = m == null ? void 0 : m.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
|
46
|
+
x(
|
47
|
+
V / k + l + o
|
48
|
+
);
|
49
|
+
}
|
50
|
+
v = {
|
51
|
+
paddingLeft: l,
|
52
|
+
paddingRight: l,
|
53
|
+
marginLeft: -l,
|
54
|
+
marginRight: -l
|
55
|
+
};
|
56
|
+
const t = !T(r.current, "left"), e = !T(r.current, "right");
|
57
|
+
y({
|
58
|
+
leftButton: !t,
|
59
|
+
rightButton: !e
|
43
60
|
});
|
44
|
-
}, 300),
|
61
|
+
}, 300), O = (t) => () => {
|
45
62
|
var a;
|
46
|
-
if (!
|
63
|
+
if (!B)
|
47
64
|
return;
|
48
|
-
const
|
49
|
-
`[data-active-card='${
|
65
|
+
const e = (a = r == null ? void 0 : r.current) == null ? void 0 : a.querySelector(
|
66
|
+
`[data-active-card='${t}']`
|
50
67
|
);
|
51
|
-
|
68
|
+
e && (e == null || e.scrollIntoView({
|
52
69
|
behavior: "smooth",
|
53
70
|
block: "nearest",
|
54
71
|
inline: "center"
|
55
72
|
}));
|
56
|
-
},
|
73
|
+
}, $ = () => {
|
57
74
|
var a;
|
58
|
-
if (!r.current ||
|
59
|
-
const
|
60
|
-
|
61
|
-
left: -(
|
75
|
+
if (!r.current || d.leftButton) return;
|
76
|
+
const t = r.current, e = ((a = t.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
|
77
|
+
t.scrollBy({
|
78
|
+
left: -(e + o) * C,
|
62
79
|
behavior: "smooth"
|
63
80
|
});
|
64
|
-
},
|
81
|
+
}, j = () => {
|
65
82
|
var a;
|
66
|
-
if (!r.current ||
|
67
|
-
const
|
68
|
-
|
69
|
-
left: (
|
83
|
+
if (!r.current || d.rightButton) return;
|
84
|
+
const t = r.current, e = ((a = t.children[h]) == null ? void 0 : a.clientWidth) ?? 0;
|
85
|
+
t.scrollBy({
|
86
|
+
left: (e + o) * C,
|
70
87
|
behavior: "smooth"
|
71
88
|
});
|
72
89
|
};
|
73
|
-
return
|
74
|
-
const
|
75
|
-
if (
|
76
|
-
return
|
77
|
-
|
78
|
-
}),
|
79
|
-
|
90
|
+
return P(() => {
|
91
|
+
const t = r.current;
|
92
|
+
if (t)
|
93
|
+
return s.current = new ResizeObserver(() => {
|
94
|
+
E(g(r == null ? void 0 : r.current));
|
95
|
+
}), s.current.observe(t), E(g(r == null ? void 0 : r.current)), () => {
|
96
|
+
s.current && s.current.disconnect();
|
80
97
|
};
|
81
|
-
}, [
|
82
|
-
/* @__PURE__ */
|
98
|
+
}, [b]), /* @__PURE__ */ S("section", { className: n(i["card-trail"], z), children: [
|
99
|
+
/* @__PURE__ */ S(
|
83
100
|
"header",
|
84
101
|
{
|
85
|
-
className:
|
86
|
-
|
87
|
-
|
102
|
+
className: n(
|
103
|
+
i["card-trail-header"],
|
104
|
+
W
|
88
105
|
),
|
89
106
|
children: [
|
90
|
-
|
91
|
-
|
92
|
-
|
107
|
+
p && /* @__PURE__ */ u("h3", { className: i["card-trail-header-title"], children: p }),
|
108
|
+
U && I && /* @__PURE__ */ u(
|
109
|
+
rr,
|
93
110
|
{
|
94
|
-
buttonsWrapperClassName:
|
95
|
-
|
96
|
-
|
111
|
+
buttonsWrapperClassName: n(
|
112
|
+
i["card-trail-header-merged-button"],
|
113
|
+
R
|
97
114
|
),
|
98
115
|
buttons: [
|
99
116
|
{
|
100
117
|
isIconButton: !0,
|
101
118
|
iconName: "ArrowLeft16px",
|
102
119
|
variant: "gray",
|
103
|
-
onClick:
|
104
|
-
disabled:
|
120
|
+
onClick: $,
|
121
|
+
disabled: d.leftButton,
|
105
122
|
size: "s",
|
106
|
-
...
|
123
|
+
...c == null ? void 0 : c.leftButton
|
107
124
|
},
|
108
125
|
{
|
109
126
|
isIconButton: !0,
|
110
127
|
iconName: "ArrowRight16px",
|
111
128
|
variant: "gray",
|
112
|
-
onClick:
|
129
|
+
onClick: j,
|
113
130
|
size: "s",
|
114
|
-
disabled:
|
115
|
-
...
|
131
|
+
disabled: d.rightButton,
|
132
|
+
...c == null ? void 0 : c.rightButton
|
116
133
|
}
|
117
134
|
]
|
118
135
|
}
|
@@ -120,25 +137,29 @@ import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
|
|
120
137
|
]
|
121
138
|
}
|
122
139
|
),
|
123
|
-
/* @__PURE__ */
|
140
|
+
/* @__PURE__ */ u(
|
124
141
|
"ul",
|
125
142
|
{
|
126
|
-
onScroll:
|
127
|
-
style: {
|
128
|
-
|
129
|
-
|
130
|
-
|
143
|
+
onScroll: H,
|
144
|
+
style: {
|
145
|
+
gap: o,
|
146
|
+
scrollPadding: `0 ${M}px`,
|
147
|
+
...v
|
148
|
+
},
|
149
|
+
className: n(i["card-trail-list"], A),
|
150
|
+
ref: F,
|
151
|
+
children: X.map(b, (t, e) => /* @__PURE__ */ u(
|
131
152
|
"li",
|
132
153
|
{
|
133
|
-
onClick:
|
134
|
-
"data-active-card":
|
135
|
-
"data-testid": `card-trail-item-${
|
136
|
-
className:
|
137
|
-
|
138
|
-
{ [
|
139
|
-
|
154
|
+
onClick: O(e),
|
155
|
+
"data-active-card": e,
|
156
|
+
"data-testid": `card-trail-item-${e}`,
|
157
|
+
className: n(
|
158
|
+
i["card-trail-list-item"],
|
159
|
+
{ [i.pointer]: B },
|
160
|
+
L
|
140
161
|
),
|
141
|
-
children:
|
162
|
+
children: t
|
142
163
|
}
|
143
164
|
))
|
144
165
|
}
|
@@ -146,5 +167,5 @@ import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
|
|
146
167
|
] });
|
147
168
|
});
|
148
169
|
export {
|
149
|
-
|
170
|
+
dr as CardTrail
|
150
171
|
};
|
@@ -25,6 +25,22 @@ type TProps = ComponentProps<'img'> & {
|
|
25
25
|
* Изображение для мобильной версии
|
26
26
|
*/
|
27
27
|
mobileImage?: string;
|
28
|
+
/**
|
29
|
+
* Изображение для Retina (2x) десктопной версии
|
30
|
+
*/
|
31
|
+
desktopImage2x?: string;
|
32
|
+
/**
|
33
|
+
* Изображение для Retina (2x) мобильной версии
|
34
|
+
*/
|
35
|
+
mobileImage2x?: string;
|
36
|
+
/**
|
37
|
+
* Изображение для Super Retina (3x) десктопной версии
|
38
|
+
*/
|
39
|
+
desktopImage3x?: string;
|
40
|
+
/**
|
41
|
+
* Изображение для Super Retina (3x) мобильной версии
|
42
|
+
*/
|
43
|
+
mobileImage3x?: string;
|
28
44
|
};
|
29
45
|
/**
|
30
46
|
* Компонент для отображения изображения с возможность показа загрузки и ошибки
|
@@ -1,49 +1,77 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
4
|
-
import { EMediaQuery as
|
5
|
-
import '../../assets/Image.css';const
|
6
|
-
picture:
|
7
|
-
image:
|
8
|
-
loading:
|
9
|
-
},
|
1
|
+
import { jsxs as M, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { c as S } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as j, useState as _, useLayoutEffect as Q } from "react";
|
4
|
+
import { EMediaQuery as $, EMinMediaQuery as w } from "../../hooks/useMediaQuery/constants.js";
|
5
|
+
import '../../assets/Image.css';const z = "_picture_1hx49_2", A = "_image_1hx49_3", C = "_loading_1hx49_10", a = {
|
6
|
+
picture: z,
|
7
|
+
image: A,
|
8
|
+
loading: C
|
9
|
+
}, q = j((h) => {
|
10
10
|
const {
|
11
|
-
className:
|
12
|
-
src:
|
13
|
-
alt:
|
14
|
-
desktopImage:
|
15
|
-
mobileImage:
|
16
|
-
pictureClassName:
|
17
|
-
errorFallback:
|
18
|
-
fallback:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
className: b,
|
12
|
+
src: o,
|
13
|
+
alt: k = "image",
|
14
|
+
desktopImage: r,
|
15
|
+
mobileImage: s,
|
16
|
+
pictureClassName: E,
|
17
|
+
errorFallback: l,
|
18
|
+
fallback: n,
|
19
|
+
desktopImage2x: g,
|
20
|
+
mobileImage2x: u,
|
21
|
+
desktopImage3x: d,
|
22
|
+
mobileImage3x: p,
|
23
|
+
...N
|
24
|
+
} = h, [t, f] = _(!0), [y, L] = _(!1);
|
25
|
+
if (Q(() => {
|
26
|
+
const e = new Image();
|
27
|
+
e.src = o ?? r ?? s ?? "", e.onload = () => {
|
28
|
+
f(!1);
|
29
|
+
}, e.onerror = () => {
|
30
|
+
f(!1), L(!0);
|
27
31
|
};
|
28
|
-
}, [
|
32
|
+
}, [o, r, s]), t && n)
|
33
|
+
return n;
|
34
|
+
if (y && l)
|
35
|
+
return l;
|
36
|
+
const i = (e, x, I) => {
|
37
|
+
let c = e;
|
38
|
+
return x && (c += `, ${x} 2x`), I && (c += `, ${I} 3x`), c;
|
39
|
+
};
|
40
|
+
return /* @__PURE__ */ M(
|
29
41
|
"picture",
|
30
42
|
{
|
31
|
-
className:
|
32
|
-
[
|
43
|
+
className: S(a.picture, E, {
|
44
|
+
[a.loading]: t
|
33
45
|
}),
|
34
46
|
children: [
|
35
|
-
|
36
|
-
|
37
|
-
|
47
|
+
s && /* @__PURE__ */ m(
|
48
|
+
"source",
|
49
|
+
{
|
50
|
+
srcSet: i(s, u, p),
|
51
|
+
media: $.XS1
|
52
|
+
}
|
53
|
+
),
|
54
|
+
r && /* @__PURE__ */ m(
|
55
|
+
"source",
|
56
|
+
{
|
57
|
+
srcSet: i(r, g, d),
|
58
|
+
media: w.S
|
59
|
+
}
|
60
|
+
),
|
61
|
+
/* @__PURE__ */ m(
|
38
62
|
"img",
|
39
63
|
{
|
40
|
-
...
|
41
|
-
className:
|
42
|
-
[
|
64
|
+
...N,
|
65
|
+
className: S(a.image, b, {
|
66
|
+
[a.loading]: t
|
43
67
|
}),
|
44
68
|
loading: "lazy",
|
45
|
-
|
46
|
-
|
69
|
+
srcSet: i(
|
70
|
+
o ?? "",
|
71
|
+
g ?? u,
|
72
|
+
d ?? p
|
73
|
+
),
|
74
|
+
alt: k
|
47
75
|
}
|
48
76
|
)
|
49
77
|
]
|
@@ -51,5 +79,5 @@ import '../../assets/Image.css';const b = "_picture_1hx49_2", k = "_image_1hx49_
|
|
51
79
|
);
|
52
80
|
});
|
53
81
|
export {
|
54
|
-
|
82
|
+
q as AppImage
|
55
83
|
};
|
@@ -1,36 +1,36 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { c as _ } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as p } from "react";
|
4
4
|
import { EClearButtonSize as a, EClearButtonVariant as f } from "./constants.js";
|
5
5
|
import { Icon as u } from "../../icons/Icon.js";
|
6
|
-
import '../../assets/ClearButton.css';const C = "
|
6
|
+
import '../../assets/ClearButton.css';const C = "_clear_n3to9_2", y = "_gray_n3to9_18", N = "_l_n3to9_32", o = {
|
7
7
|
clear: C,
|
8
8
|
gray: y,
|
9
9
|
l: N,
|
10
|
-
"m-s": "_m-
|
11
|
-
}, d =
|
10
|
+
"m-s": "_m-s_n3to9_36"
|
11
|
+
}, d = p(
|
12
12
|
(s, e) => {
|
13
13
|
const {
|
14
14
|
disabled: l = !1,
|
15
|
-
size:
|
15
|
+
size: t = a.MS,
|
16
16
|
variant: n = f.Gray,
|
17
17
|
className: c,
|
18
18
|
...m
|
19
|
-
} = s,
|
19
|
+
} = s, i = _(
|
20
20
|
o.clear,
|
21
|
-
|
21
|
+
t === a.L ? o.l : o["m-s"],
|
22
22
|
o[n],
|
23
23
|
c
|
24
24
|
);
|
25
|
-
return /* @__PURE__ */
|
25
|
+
return /* @__PURE__ */ r(
|
26
26
|
"button",
|
27
27
|
{
|
28
28
|
type: "button",
|
29
29
|
ref: e,
|
30
30
|
...m,
|
31
31
|
disabled: l,
|
32
|
-
className:
|
33
|
-
children: /* @__PURE__ */
|
32
|
+
className: i,
|
33
|
+
children: /* @__PURE__ */ r(u, { iconName: t === "l" ? "Close16px" : "Close12px" })
|
34
34
|
}
|
35
35
|
);
|
36
36
|
}
|
@@ -1,57 +1,57 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { c as
|
3
|
-
import { useState as
|
4
|
-
import { EFileItemVariant as
|
5
|
-
import { formating as
|
6
|
-
import { ClearButton as
|
7
|
-
import '../../assets/ListFiles.css';const
|
8
|
-
"file-info": "_file-
|
9
|
-
"file-info-size": "_file-info-
|
10
|
-
"file-info-name-wrapper": "_file-info-name-
|
11
|
-
"file-info-name": "_file-info-
|
12
|
-
"file-upload-container": "_file-upload-
|
13
|
-
"file-upload-container-item": "_file-upload-container-
|
14
|
-
"delete-button": "_delete-
|
15
|
-
white:
|
16
|
-
gray:
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
2
|
+
import { c as d } from "../../index-DIxK0V-G.js";
|
3
|
+
import { useState as h, useEffect as u } from "react";
|
4
|
+
import { EFileItemVariant as q } from "./constants.js";
|
5
|
+
import { formating as w } from "../../utils/index.js";
|
6
|
+
import { ClearButton as z } from "../InputClearButton/ClearButton.js";
|
7
|
+
import '../../assets/ListFiles.css';const N = "_white_hpqrc_61", y = "_gray_hpqrc_66", e = {
|
8
|
+
"file-info": "_file-info_hpqrc_2",
|
9
|
+
"file-info-size": "_file-info-size_hpqrc_8",
|
10
|
+
"file-info-name-wrapper": "_file-info-name-wrapper_hpqrc_19",
|
11
|
+
"file-info-name": "_file-info-name_hpqrc_19",
|
12
|
+
"file-upload-container": "_file-upload-container_hpqrc_37",
|
13
|
+
"file-upload-container-item": "_file-upload-container-item_hpqrc_45",
|
14
|
+
"delete-button": "_delete-button_hpqrc_54",
|
15
|
+
white: N,
|
16
|
+
gray: y
|
17
17
|
};
|
18
|
-
function
|
18
|
+
function E({
|
19
19
|
value: n,
|
20
|
-
onChange:
|
20
|
+
onChange: o,
|
21
21
|
classNameWrapper: l,
|
22
|
-
variant:
|
23
|
-
disabled:
|
22
|
+
variant: c = q.white,
|
23
|
+
disabled: m
|
24
24
|
}) {
|
25
|
-
const [
|
26
|
-
|
27
|
-
|
25
|
+
const [a, f] = h(n);
|
26
|
+
u(() => {
|
27
|
+
f(n);
|
28
28
|
}, [n]);
|
29
|
-
const
|
30
|
-
const t = [...
|
31
|
-
|
29
|
+
const p = async (i) => {
|
30
|
+
const t = [...a.filter((_) => _.id !== i)];
|
31
|
+
f(t), o == null || o({ deleteId: i, list: t });
|
32
32
|
};
|
33
|
-
return
|
33
|
+
return a.length ? /* @__PURE__ */ r(
|
34
34
|
"ul",
|
35
35
|
{
|
36
|
-
className:
|
36
|
+
className: d(
|
37
37
|
e["file-upload-container"],
|
38
38
|
l,
|
39
|
-
e[
|
39
|
+
e[c]
|
40
40
|
),
|
41
|
-
children:
|
42
|
-
/* @__PURE__ */
|
43
|
-
(i == null ? void 0 : i.size) && /* @__PURE__ */
|
41
|
+
children: a.map((i, t) => /* @__PURE__ */ s("li", { className: e["file-upload-container-item"], children: [
|
42
|
+
/* @__PURE__ */ s("div", { className: e["file-info"], children: [
|
43
|
+
(i == null ? void 0 : i.size) && /* @__PURE__ */ s("span", { className: e["file-info-size"], children: [
|
44
44
|
" ",
|
45
|
-
|
45
|
+
w.Size(i == null ? void 0 : i.size)
|
46
46
|
] }),
|
47
47
|
/* @__PURE__ */ r("div", { className: e["file-info-name-wrapper"], children: /* @__PURE__ */ r("div", { className: e["file-info-name"], children: i.name }) })
|
48
48
|
] }),
|
49
|
-
!
|
50
|
-
|
49
|
+
!m && /* @__PURE__ */ r(
|
50
|
+
z,
|
51
51
|
{
|
52
52
|
size: "m-s",
|
53
53
|
variant: "gray",
|
54
|
-
onClick: () =>
|
54
|
+
onClick: () => p(i.id)
|
55
55
|
}
|
56
56
|
)
|
57
57
|
] }, t))
|
@@ -59,5 +59,5 @@ function F({
|
|
59
59
|
) : null;
|
60
60
|
}
|
61
61
|
export {
|
62
|
-
|
62
|
+
E as ListFiles
|
63
63
|
};
|
@@ -50,6 +50,10 @@ type TProps = {
|
|
50
50
|
* Расстояние между слайдами.
|
51
51
|
*/
|
52
52
|
spaceBetween?: number;
|
53
|
+
/**
|
54
|
+
* Функция, которая будет вызвана при клике на слайд.
|
55
|
+
*/
|
56
|
+
onSlideClick?: VoidFunction;
|
53
57
|
};
|
54
|
-
export declare const PromoSlider: ({ slides, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
|
58
|
+
export declare const PromoSlider: ({ slides, onSlideClick, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
|
55
59
|
export {};
|
@@ -1,80 +1,80 @@
|
|
1
|
-
import { jsxs as Y, jsx as L, Fragment as
|
2
|
-
import { c as
|
1
|
+
import { jsxs as Y, jsx as L, Fragment as F } from "react/jsx-runtime";
|
2
|
+
import { c as C } from "../../index-DIxK0V-G.js";
|
3
3
|
import { useState as j } from "react";
|
4
|
-
import { g as R, b as G, e as U, c as $, n as B, d as
|
4
|
+
import { g as R, b as G, e as U, c as $, n as B, d as A, S as q, A as Z, a as J } from "../../swiper-react-BvAw14a4.js";
|
5
5
|
import { Chip as Q } from "../Chip/Chip.js";
|
6
6
|
import { AppImage as ee } from "../Image/Image.js";
|
7
7
|
import '../../assets/PromoSlider.css';function te(P) {
|
8
8
|
let {
|
9
9
|
swiper: e,
|
10
|
-
extendParams:
|
11
|
-
on:
|
12
|
-
emit:
|
10
|
+
extendParams: k,
|
11
|
+
on: T,
|
12
|
+
emit: x
|
13
13
|
} = P;
|
14
|
-
const
|
14
|
+
const p = R(), v = G();
|
15
15
|
e.keyboard = {
|
16
16
|
enabled: !1
|
17
|
-
},
|
17
|
+
}, k({
|
18
18
|
keyboard: {
|
19
19
|
enabled: !1,
|
20
20
|
onlyInViewport: !0,
|
21
21
|
pageUpDown: !0
|
22
22
|
}
|
23
23
|
});
|
24
|
-
function I(
|
24
|
+
function I(n) {
|
25
25
|
if (!e.enabled) return;
|
26
26
|
const {
|
27
|
-
rtlTranslate:
|
27
|
+
rtlTranslate: u
|
28
28
|
} = e;
|
29
|
-
let
|
30
|
-
|
31
|
-
const
|
32
|
-
if (!e.allowSlideNext && (e.isHorizontal() && M || e.isVertical() && s ||
|
29
|
+
let o = n;
|
30
|
+
o.originalEvent && (o = o.originalEvent);
|
31
|
+
const g = o.keyCode || o.charCode, H = e.params.keyboard.pageUpDown, b = H && g === 33, _ = H && g === 34, y = g === 37, M = g === 39, t = g === 38, s = g === 40;
|
32
|
+
if (!e.allowSlideNext && (e.isHorizontal() && M || e.isVertical() && s || _) || !e.allowSlidePrev && (e.isHorizontal() && y || e.isVertical() && t || b))
|
33
33
|
return !1;
|
34
|
-
if (!(
|
35
|
-
if (e.params.keyboard.onlyInViewport && (
|
34
|
+
if (!(o.shiftKey || o.altKey || o.ctrlKey || o.metaKey) && !(p.activeElement && p.activeElement.nodeName && (p.activeElement.nodeName.toLowerCase() === "input" || p.activeElement.nodeName.toLowerCase() === "textarea"))) {
|
35
|
+
if (e.params.keyboard.onlyInViewport && (b || _ || y || M || t || s)) {
|
36
36
|
let N = !1;
|
37
37
|
if (U(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && U(e.el, `.${e.params.slideActiveClass}`).length === 0)
|
38
38
|
return;
|
39
|
-
const
|
40
|
-
|
41
|
-
const D = [[
|
39
|
+
const w = e.el, m = w.clientWidth, d = w.clientHeight, a = v.innerWidth, f = v.innerHeight, l = $(w);
|
40
|
+
u && (l.left -= w.scrollLeft);
|
41
|
+
const D = [[l.left, l.top], [l.left + m, l.top], [l.left, l.top + d], [l.left + m, l.top + d]];
|
42
42
|
for (let r = 0; r < D.length; r += 1) {
|
43
|
-
const
|
44
|
-
if (
|
45
|
-
if (
|
43
|
+
const c = D[r];
|
44
|
+
if (c[0] >= 0 && c[0] <= a && c[1] >= 0 && c[1] <= f) {
|
45
|
+
if (c[0] === 0 && c[1] === 0) continue;
|
46
46
|
N = !0;
|
47
47
|
}
|
48
48
|
}
|
49
49
|
if (!N) return;
|
50
50
|
}
|
51
|
-
e.isHorizontal() ? ((
|
51
|
+
e.isHorizontal() ? ((b || _ || y || M) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), ((_ || M) && !u || (b || y) && u) && e.slideNext(), ((b || y) && !u || (_ || M) && u) && e.slidePrev()) : ((b || _ || t || s) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), (_ || s) && e.slideNext(), (b || t) && e.slidePrev()), x("keyPress", g);
|
52
52
|
}
|
53
53
|
}
|
54
|
-
function
|
55
|
-
e.keyboard.enabled || (
|
54
|
+
function h() {
|
55
|
+
e.keyboard.enabled || (p.addEventListener("keydown", I), e.keyboard.enabled = !0);
|
56
56
|
}
|
57
|
-
function
|
58
|
-
e.keyboard.enabled && (
|
57
|
+
function i() {
|
58
|
+
e.keyboard.enabled && (p.removeEventListener("keydown", I), e.keyboard.enabled = !1);
|
59
59
|
}
|
60
|
-
|
61
|
-
e.params.keyboard.enabled &&
|
62
|
-
}),
|
63
|
-
e.keyboard.enabled &&
|
60
|
+
T("init", () => {
|
61
|
+
e.params.keyboard.enabled && h();
|
62
|
+
}), T("destroy", () => {
|
63
|
+
e.keyboard.enabled && i();
|
64
64
|
}), Object.assign(e.keyboard, {
|
65
|
-
enable:
|
66
|
-
disable:
|
65
|
+
enable: h,
|
66
|
+
disable: i
|
67
67
|
});
|
68
68
|
}
|
69
69
|
function ne(P) {
|
70
70
|
let {
|
71
71
|
swiper: e,
|
72
|
-
extendParams:
|
73
|
-
on:
|
74
|
-
emit:
|
72
|
+
extendParams: k,
|
73
|
+
on: T,
|
74
|
+
emit: x
|
75
75
|
} = P;
|
76
|
-
const
|
77
|
-
|
76
|
+
const p = G();
|
77
|
+
k({
|
78
78
|
mousewheel: {
|
79
79
|
enabled: !1,
|
80
80
|
releaseOnEdges: !1,
|
@@ -89,123 +89,123 @@ function ne(P) {
|
|
89
89
|
}), e.mousewheel = {
|
90
90
|
enabled: !1
|
91
91
|
};
|
92
|
-
let
|
93
|
-
const
|
94
|
-
function
|
95
|
-
let
|
96
|
-
return "detail" in
|
97
|
-
spinX:
|
98
|
-
spinY:
|
92
|
+
let v, I = A(), h;
|
93
|
+
const i = [];
|
94
|
+
function n(t) {
|
95
|
+
let m = 0, d = 0, a = 0, f = 0;
|
96
|
+
return "detail" in t && (d = t.detail), "wheelDelta" in t && (d = -t.wheelDelta / 120), "wheelDeltaY" in t && (d = -t.wheelDeltaY / 120), "wheelDeltaX" in t && (m = -t.wheelDeltaX / 120), "axis" in t && t.axis === t.HORIZONTAL_AXIS && (m = d, d = 0), a = m * 10, f = d * 10, "deltaY" in t && (f = t.deltaY), "deltaX" in t && (a = t.deltaX), t.shiftKey && !a && (a = f, f = 0), (a || f) && t.deltaMode && (t.deltaMode === 1 ? (a *= 40, f *= 40) : (a *= 800, f *= 800)), a && !m && (m = a < 1 ? -1 : 1), f && !d && (d = f < 1 ? -1 : 1), {
|
97
|
+
spinX: m,
|
98
|
+
spinY: d,
|
99
99
|
pixelX: a,
|
100
|
-
pixelY:
|
100
|
+
pixelY: f
|
101
101
|
};
|
102
102
|
}
|
103
|
-
function
|
103
|
+
function u() {
|
104
104
|
e.enabled && (e.mouseEntered = !0);
|
105
105
|
}
|
106
|
-
function
|
106
|
+
function o() {
|
107
107
|
e.enabled && (e.mouseEntered = !1);
|
108
108
|
}
|
109
|
-
function
|
110
|
-
return e.params.mousewheel.thresholdDelta &&
|
109
|
+
function g(t) {
|
110
|
+
return e.params.mousewheel.thresholdDelta && t.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && A() - I < e.params.mousewheel.thresholdTime ? !1 : t.delta >= 6 && A() - I < 60 ? !0 : (t.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), x("scroll", t.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), x("scroll", t.raw)), I = new p.Date().getTime(), !1);
|
111
111
|
}
|
112
|
-
function H(
|
112
|
+
function H(t) {
|
113
113
|
const s = e.params.mousewheel;
|
114
|
-
if (
|
114
|
+
if (t.direction < 0) {
|
115
115
|
if (e.isEnd && !e.params.loop && s.releaseOnEdges)
|
116
116
|
return !0;
|
117
117
|
} else if (e.isBeginning && !e.params.loop && s.releaseOnEdges)
|
118
118
|
return !0;
|
119
119
|
return !1;
|
120
120
|
}
|
121
|
-
function
|
122
|
-
let s =
|
123
|
-
if (!e.enabled ||
|
124
|
-
const
|
121
|
+
function b(t) {
|
122
|
+
let s = t, N = !0;
|
123
|
+
if (!e.enabled || t.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
|
124
|
+
const w = e.params.mousewheel;
|
125
125
|
e.params.cssMode && s.preventDefault();
|
126
|
-
let
|
127
|
-
e.params.mousewheel.eventsTarget !== "container" && (
|
128
|
-
const
|
129
|
-
if (!e.mouseEntered && !
|
126
|
+
let m = e.el;
|
127
|
+
e.params.mousewheel.eventsTarget !== "container" && (m = document.querySelector(e.params.mousewheel.eventsTarget));
|
128
|
+
const d = m && m.contains(s.target);
|
129
|
+
if (!e.mouseEntered && !d && !w.releaseOnEdges) return !0;
|
130
130
|
s.originalEvent && (s = s.originalEvent);
|
131
131
|
let a = 0;
|
132
|
-
const
|
133
|
-
if (
|
132
|
+
const f = e.rtlTranslate ? -1 : 1, l = n(s);
|
133
|
+
if (w.forceToAxis)
|
134
134
|
if (e.isHorizontal())
|
135
|
-
if (Math.abs(
|
135
|
+
if (Math.abs(l.pixelX) > Math.abs(l.pixelY)) a = -l.pixelX * f;
|
136
136
|
else return !0;
|
137
|
-
else if (Math.abs(
|
137
|
+
else if (Math.abs(l.pixelY) > Math.abs(l.pixelX)) a = -l.pixelY;
|
138
138
|
else return !0;
|
139
139
|
else
|
140
|
-
a = Math.abs(
|
140
|
+
a = Math.abs(l.pixelX) > Math.abs(l.pixelY) ? -l.pixelX * f : -l.pixelY;
|
141
141
|
if (a === 0) return !0;
|
142
|
-
|
143
|
-
let D = e.getTranslate() + a *
|
142
|
+
w.invert && (a = -a);
|
143
|
+
let D = e.getTranslate() + a * w.sensitivity;
|
144
144
|
if (D >= e.minTranslate() && (D = e.minTranslate()), D <= e.maxTranslate() && (D = e.maxTranslate()), N = e.params.loop ? !0 : !(D === e.minTranslate() || D === e.maxTranslate()), N && e.params.nested && s.stopPropagation(), !e.params.freeMode || !e.params.freeMode.enabled) {
|
145
145
|
const r = {
|
146
|
-
time:
|
146
|
+
time: A(),
|
147
147
|
delta: Math.abs(a),
|
148
148
|
direction: Math.sign(a),
|
149
|
-
raw:
|
149
|
+
raw: t
|
150
150
|
};
|
151
|
-
|
152
|
-
const
|
153
|
-
if (
|
151
|
+
i.length >= 2 && i.shift();
|
152
|
+
const c = i.length ? i[i.length - 1] : void 0;
|
153
|
+
if (i.push(r), c ? (r.direction !== c.direction || r.delta > c.delta || r.time > c.time + 150) && g(r) : g(r), H(r))
|
154
154
|
return !0;
|
155
155
|
} else {
|
156
156
|
const r = {
|
157
|
-
time:
|
157
|
+
time: A(),
|
158
158
|
delta: Math.abs(a),
|
159
159
|
direction: Math.sign(a)
|
160
|
-
},
|
161
|
-
if (!
|
162
|
-
|
163
|
-
let
|
164
|
-
const W = e.isBeginning,
|
165
|
-
if (
|
160
|
+
}, c = h && r.time < h.time + 500 && r.delta <= h.delta && r.direction === h.direction;
|
161
|
+
if (!c) {
|
162
|
+
h = void 0;
|
163
|
+
let S = e.getTranslate() + a * w.sensitivity;
|
164
|
+
const W = e.isBeginning, K = e.isEnd;
|
165
|
+
if (S >= e.minTranslate() && (S = e.minTranslate()), S <= e.maxTranslate() && (S = e.maxTranslate()), e.setTransition(0), e.setTranslate(S), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!W && e.isBeginning || !K && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
|
166
166
|
direction: r.direction < 0 ? "next" : "prev",
|
167
167
|
byMousewheel: !0
|
168
168
|
}), e.params.freeMode.sticky) {
|
169
|
-
clearTimeout(
|
170
|
-
const X =
|
171
|
-
if (
|
172
|
-
|
173
|
-
else if (
|
169
|
+
clearTimeout(v), v = void 0, i.length >= 15 && i.shift();
|
170
|
+
const X = i.length ? i[i.length - 1] : void 0, z = i[0];
|
171
|
+
if (i.push(r), X && (r.delta > X.delta || r.direction !== X.direction))
|
172
|
+
i.splice(0);
|
173
|
+
else if (i.length >= 15 && r.time - z.time < 500 && z.delta - r.delta >= 1 && r.delta <= 6) {
|
174
174
|
const O = a > 0 ? 0.8 : 0.2;
|
175
|
-
|
175
|
+
h = r, i.splice(0), v = B(() => {
|
176
176
|
e.slideToClosest(e.params.speed, !0, void 0, O);
|
177
177
|
}, 0);
|
178
178
|
}
|
179
|
-
|
180
|
-
|
179
|
+
v || (v = B(() => {
|
180
|
+
h = r, i.splice(0), e.slideToClosest(e.params.speed, !0, void 0, 0.5);
|
181
181
|
}, 500));
|
182
182
|
}
|
183
|
-
if (
|
183
|
+
if (c || x("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), w.releaseOnEdges && (S === e.minTranslate() || S === e.maxTranslate()))
|
184
184
|
return !0;
|
185
185
|
}
|
186
186
|
}
|
187
187
|
return s.preventDefault ? s.preventDefault() : s.returnValue = !1, !1;
|
188
188
|
}
|
189
|
-
function
|
189
|
+
function _(t) {
|
190
190
|
let s = e.el;
|
191
|
-
e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[
|
191
|
+
e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[t]("mouseenter", u), s[t]("mouseleave", o), s[t]("wheel", b);
|
192
192
|
}
|
193
193
|
function y() {
|
194
|
-
return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel",
|
194
|
+
return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", b), !0) : e.mousewheel.enabled ? !1 : (_("addEventListener"), e.mousewheel.enabled = !0, !0);
|
195
195
|
}
|
196
196
|
function M() {
|
197
|
-
return e.params.cssMode ? (e.wrapperEl.addEventListener(event,
|
197
|
+
return e.params.cssMode ? (e.wrapperEl.addEventListener(event, b), !0) : e.mousewheel.enabled ? (_("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
|
198
198
|
}
|
199
|
-
|
199
|
+
T("init", () => {
|
200
200
|
!e.params.mousewheel.enabled && e.params.cssMode && M(), e.params.mousewheel.enabled && y();
|
201
|
-
}),
|
201
|
+
}), T("destroy", () => {
|
202
202
|
e.params.cssMode && y(), e.mousewheel.enabled && M();
|
203
203
|
}), Object.assign(e.mousewheel, {
|
204
204
|
enable: y,
|
205
205
|
disable: M
|
206
206
|
});
|
207
207
|
}
|
208
|
-
const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie = "_chip_f3z07_21", le = "_content_f3z07_27", oe = "_bullet_f3z07_46",
|
208
|
+
const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie = "_chip_f3z07_21", le = "_content_f3z07_27", oe = "_bullet_f3z07_46", E = {
|
209
209
|
swiper: ae,
|
210
210
|
slide: se,
|
211
211
|
image: re,
|
@@ -216,90 +216,91 @@ const ae = "_swiper_f3z07_2", se = "_slide_f3z07_7", re = "_image_f3z07_14", ie
|
|
216
216
|
"bullet-active": "_bullet-active_f3z07_47",
|
217
217
|
"bullet-s": "_bullet-s_f3z07_48",
|
218
218
|
"bullet-xs": "_bullet-xs_f3z07_49"
|
219
|
-
}, V = 5,
|
220
|
-
const
|
221
|
-
return
|
219
|
+
}, V = 5, fe = 5e3, ue = 8, de = (P, e) => {
|
220
|
+
const k = e % V, T = Math.abs(P - k), x = 0, p = 1;
|
221
|
+
return T === x ? E["bullet-active"] : T === p ? E["bullet-s"] : E["bullet-xs"];
|
222
222
|
}, be = ({
|
223
223
|
slides: P,
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
224
|
+
onSlideClick: e,
|
225
|
+
delay: k = fe,
|
226
|
+
spaceBetween: T = ue,
|
227
|
+
imageClassName: x,
|
228
|
+
slideClassName: p,
|
229
|
+
swiperClassName: v,
|
230
|
+
contentClassName: I
|
230
231
|
}) => {
|
231
|
-
const [
|
232
|
+
const [h, i] = j(0);
|
232
233
|
return /* @__PURE__ */ Y(
|
233
234
|
q,
|
234
235
|
{
|
235
236
|
direction: "horizontal",
|
236
|
-
spaceBetween:
|
237
|
+
spaceBetween: T,
|
237
238
|
modules: [Z, te, ne],
|
238
|
-
onSlideChange: (
|
239
|
+
onSlideChange: (n) => i(n.realIndex),
|
239
240
|
loop: !0,
|
240
241
|
mousewheel: !0,
|
241
242
|
keyboard: {
|
242
|
-
enabled: !0
|
243
|
-
onlyInViewport: !0
|
243
|
+
enabled: !0
|
244
244
|
},
|
245
245
|
autoplay: {
|
246
|
-
delay:
|
246
|
+
delay: k,
|
247
247
|
disableOnInteraction: !1,
|
248
248
|
pauseOnMouseEnter: !0
|
249
249
|
},
|
250
|
-
className:
|
250
|
+
className: C(E.swiper, v),
|
251
251
|
children: [
|
252
|
-
P.map((
|
253
|
-
if (!
|
254
|
-
const
|
252
|
+
P.map((n) => {
|
253
|
+
if (!n) return null;
|
254
|
+
const u = n != null && n.imageUrl ? /* @__PURE__ */ L(
|
255
255
|
ee,
|
256
256
|
{
|
257
|
-
className:
|
258
|
-
src:
|
259
|
-
desktopImage:
|
260
|
-
mobileImage:
|
261
|
-
alt:
|
257
|
+
className: C(E.image, x),
|
258
|
+
src: n.imageUrl,
|
259
|
+
desktopImage: n.imageDesktop,
|
260
|
+
mobileImage: n.imageMobile,
|
261
|
+
alt: n.title
|
262
262
|
}
|
263
|
-
) : null,
|
263
|
+
) : null, o = /* @__PURE__ */ L(
|
264
264
|
"a",
|
265
265
|
{
|
266
|
-
className:
|
267
|
-
href:
|
266
|
+
className: E.link,
|
267
|
+
href: n.url,
|
268
268
|
rel: "noopener noreferrer",
|
269
269
|
target: "_blank",
|
270
|
-
children:
|
270
|
+
children: u
|
271
271
|
}
|
272
|
-
),
|
272
|
+
), g = () => n.url ? o : u;
|
273
273
|
return /* @__PURE__ */ L(
|
274
274
|
J,
|
275
275
|
{
|
276
|
-
|
277
|
-
|
278
|
-
|
276
|
+
onClick: e,
|
277
|
+
className: C(E.slide, p),
|
278
|
+
children: /* @__PURE__ */ Y(F, { children: [
|
279
|
+
n.isPromotion && /* @__PURE__ */ L(
|
279
280
|
Q,
|
280
281
|
{
|
281
|
-
...
|
282
|
-
className:
|
283
|
-
|
284
|
-
|
282
|
+
...n.promotionProps,
|
283
|
+
className: C(
|
284
|
+
n.promotionProps.className,
|
285
|
+
E.chip
|
285
286
|
)
|
286
287
|
}
|
287
288
|
),
|
288
|
-
|
289
|
-
(
|
289
|
+
g(),
|
290
|
+
(n == null ? void 0 : n.content) && /* @__PURE__ */ L("div", { className: C(E.content, I), children: n == null ? void 0 : n.content })
|
290
291
|
] })
|
291
292
|
},
|
292
|
-
|
293
|
+
n.id
|
293
294
|
);
|
294
295
|
}),
|
295
|
-
/* @__PURE__ */ L("div", { className:
|
296
|
+
/* @__PURE__ */ L("div", { className: E["custom-pagination"], children: Array.from({ length: V }).map((n, u) => /* @__PURE__ */ L(
|
296
297
|
"button",
|
297
298
|
{
|
299
|
+
tabIndex: u,
|
298
300
|
type: "button",
|
299
|
-
|
300
|
-
className: A(g.bullet, de(E, I))
|
301
|
+
className: C(E.bullet, de(u, h))
|
301
302
|
},
|
302
|
-
|
303
|
+
u
|
303
304
|
)) })
|
304
305
|
]
|
305
306
|
}
|
package/package.json
CHANGED