md-components-mdigial-azamat 0.0.310 → 0.0.311
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.
|
@@ -198,7 +198,7 @@ const R = ({
|
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
] });
|
|
201
|
-
},
|
|
201
|
+
}, O = ({ isOpen: n, onClose: a }) => {
|
|
202
202
|
const [t, c] = x(
|
|
203
203
|
f
|
|
204
204
|
), [m, h] = x(!1), { ref: u } = L(n, a);
|
|
@@ -316,6 +316,12 @@ const R = ({
|
|
|
316
316
|
ref: u,
|
|
317
317
|
className: s(
|
|
318
318
|
"fixed right-[-100%] top-1/2 z-[10041] flex max-h-[80vh] w-[560px] -translate-y-1/2 flex-col rounded-[24px] bg-white shadow-[0_4px_12px_rgba(0,0,0,0.15)] transition-all duration-500",
|
|
319
|
+
// В закрытом состоянии гасим по видимости, а не только геометрией:
|
|
320
|
+
// fixed-слой при анимации адресной строки дёргается и модалка мелькает.
|
|
321
|
+
// `visibility` анимируется дискретно — при transition-all элемент виден
|
|
322
|
+
// всю анимацию открытия/закрытия и становится invisible только по её
|
|
323
|
+
// завершении, поэтому шторка снизу выезжает так же плавно.
|
|
324
|
+
!n && "invisible pointer-events-none",
|
|
319
325
|
n && "right-[44px]",
|
|
320
326
|
// На мобилке прячем через translateY(100%) от собственной высоты
|
|
321
327
|
// (тоже 100dvh), а не bottom:-100% в % вьюпорта — иначе при анимации
|
|
@@ -499,5 +505,5 @@ const R = ({
|
|
|
499
505
|
] });
|
|
500
506
|
};
|
|
501
507
|
export {
|
|
502
|
-
|
|
508
|
+
O as default
|
|
503
509
|
};
|
|
@@ -1,91 +1,104 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ButtonsList as
|
|
4
|
-
import { IconList as
|
|
5
|
-
import { C
|
|
1
|
+
import { jsxs as a, Fragment as j, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as k, useState as H, useEffect as L } from "react";
|
|
3
|
+
import { ButtonsList as E } from "../ButtonsList/ButtonsList.js";
|
|
4
|
+
import { IconList as z } from "../IconList/IconList.js";
|
|
5
|
+
import { C } from "../ComponentContainer-dca711c6.js";
|
|
6
6
|
import { F as r } from "../Flex-86aee720.js";
|
|
7
|
-
import { I as
|
|
8
|
-
import { S as
|
|
9
|
-
import { c as
|
|
10
|
-
import { HeroIconsBannerArrows as
|
|
11
|
-
import { HeroIconsBannerIndicator as
|
|
12
|
-
import { propsToEdit as
|
|
13
|
-
import { useHeroIconsBanner as
|
|
14
|
-
import '../assets/HeroIconsBanner.15c9ffb1.css';const p =
|
|
15
|
-
autoplay_delay_seconds:
|
|
7
|
+
import { I as f } from "../index-df8034eb.js";
|
|
8
|
+
import { S as F } from "../SafeHtml-c00e29eb.js";
|
|
9
|
+
import { c as u } from "../cn-6a4bf187.js";
|
|
10
|
+
import { HeroIconsBannerArrows as S } from "./HeroIconsBannerArrows.js";
|
|
11
|
+
import { HeroIconsBannerIndicator as D } from "./HeroIconsBannerIndicator.js";
|
|
12
|
+
import { propsToEdit as P } from "./schema.js";
|
|
13
|
+
import { useHeroIconsBanner as T } from "./useHeroIconsBanner.js";
|
|
14
|
+
import '../assets/HeroIconsBanner.15c9ffb1.css';const p = k(z), W = ({
|
|
15
|
+
autoplay_delay_seconds: g,
|
|
16
16
|
icon_list: s,
|
|
17
|
-
slides:
|
|
17
|
+
slides: b
|
|
18
18
|
}) => {
|
|
19
19
|
const {
|
|
20
20
|
activeSlide: t,
|
|
21
|
-
activeSlideIndex:
|
|
22
|
-
goToNextSlide:
|
|
23
|
-
goToPrevSlide:
|
|
24
|
-
handleBannerClick:
|
|
25
|
-
handleBannerKeyDown:
|
|
26
|
-
hasBannerLink:
|
|
21
|
+
activeSlideIndex: i,
|
|
22
|
+
goToNextSlide: x,
|
|
23
|
+
goToPrevSlide: w,
|
|
24
|
+
handleBannerClick: v,
|
|
25
|
+
handleBannerKeyDown: y,
|
|
26
|
+
hasBannerLink: l,
|
|
27
27
|
hasMultipleSlides: c,
|
|
28
28
|
resolvedSlides: m,
|
|
29
29
|
setActiveSlideIndex: N,
|
|
30
|
-
slideChangeDelay:
|
|
31
|
-
visibleBackgroundIndexes:
|
|
32
|
-
} =
|
|
33
|
-
autoplay_delay_seconds:
|
|
34
|
-
slides:
|
|
35
|
-
});
|
|
36
|
-
return
|
|
37
|
-
|
|
30
|
+
slideChangeDelay: I,
|
|
31
|
+
visibleBackgroundIndexes: _
|
|
32
|
+
} = T({
|
|
33
|
+
autoplay_delay_seconds: g,
|
|
34
|
+
slides: b
|
|
35
|
+
}), [d, B] = H(void 0);
|
|
36
|
+
return L(() => {
|
|
37
|
+
if (typeof window > "u")
|
|
38
|
+
return;
|
|
39
|
+
const n = () => B(window.innerHeight);
|
|
40
|
+
n();
|
|
41
|
+
let o = window.innerWidth;
|
|
42
|
+
const h = () => {
|
|
43
|
+
window.innerWidth !== o && (o = window.innerWidth, n());
|
|
44
|
+
};
|
|
45
|
+
return window.addEventListener("resize", h), window.addEventListener("orientationchange", n), () => {
|
|
46
|
+
window.removeEventListener("resize", h), window.removeEventListener("orientationchange", n);
|
|
47
|
+
};
|
|
48
|
+
}, []), /* @__PURE__ */ a(j, { children: [
|
|
49
|
+
/* @__PURE__ */ a(
|
|
38
50
|
r,
|
|
39
51
|
{
|
|
40
52
|
component: "section",
|
|
41
53
|
vertical: !0,
|
|
42
|
-
className:
|
|
54
|
+
className: u(
|
|
43
55
|
"relative w-full h-[100svh] overflow-hidden",
|
|
44
|
-
|
|
56
|
+
l && "cursor-pointer"
|
|
45
57
|
),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
style: d ? { height: `${d}px` } : void 0,
|
|
59
|
+
onClick: v,
|
|
60
|
+
onKeyDown: y,
|
|
61
|
+
role: l ? "link" : void 0,
|
|
62
|
+
tabIndex: l ? 0 : void 0,
|
|
50
63
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
const o = m[
|
|
64
|
+
/* @__PURE__ */ a("div", { className: "absolute inset-0 z-0 bg-black", children: [
|
|
65
|
+
_.map((n) => {
|
|
66
|
+
const o = m[n];
|
|
54
67
|
return o != null && o.bg_image ? /* @__PURE__ */ e(
|
|
55
68
|
"div",
|
|
56
69
|
{
|
|
57
|
-
className:
|
|
70
|
+
className: u(
|
|
58
71
|
"absolute inset-0 bg-black transition-opacity duration-700 ease-out",
|
|
59
|
-
|
|
72
|
+
i === n ? "opacity-100" : "opacity-0"
|
|
60
73
|
),
|
|
61
74
|
children: /* @__PURE__ */ e(
|
|
62
|
-
|
|
75
|
+
f,
|
|
63
76
|
{
|
|
64
77
|
src: o.bg_image,
|
|
65
78
|
alt: "background",
|
|
66
79
|
className: "absolute inset-0 h-full w-full",
|
|
67
80
|
imageStyles: "h-full w-full object-cover object-center",
|
|
68
|
-
loading:
|
|
69
|
-
fetchPriority:
|
|
81
|
+
loading: n === 0 ? "eager" : "lazy",
|
|
82
|
+
fetchPriority: n === 0 ? "high" : "auto",
|
|
70
83
|
disableLoadingEffect: !0
|
|
71
84
|
}
|
|
72
85
|
)
|
|
73
86
|
},
|
|
74
|
-
`${
|
|
87
|
+
`${n}-${o.bg_image}`
|
|
75
88
|
) : null;
|
|
76
89
|
}),
|
|
77
90
|
/* @__PURE__ */ e("div", { className: "hero-icons-banner__media-overlay pointer-events-none absolute inset-0" }),
|
|
78
91
|
/* @__PURE__ */ e("div", { className: "hero-icons-banner__bottom-fade pointer-events-none absolute inset-x-0 bottom-0 h-[320px] max-tablet:h-[40px]" })
|
|
79
92
|
] }),
|
|
80
93
|
c && /* @__PURE__ */ e(
|
|
81
|
-
|
|
94
|
+
S,
|
|
82
95
|
{
|
|
83
|
-
onNext:
|
|
84
|
-
onPrev:
|
|
96
|
+
onNext: x,
|
|
97
|
+
onPrev: w
|
|
85
98
|
}
|
|
86
99
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */ e("div", { className: "hero-icons-banner__content flex-1 min-h-0", children: /* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ a(C, { className: "relative z-10 flex flex-col justify-between pb-[10px] pt-[116px] h-full", children: [
|
|
101
|
+
/* @__PURE__ */ e("div", { className: "hero-icons-banner__content flex-1 min-h-0", children: /* @__PURE__ */ a(
|
|
89
102
|
r,
|
|
90
103
|
{
|
|
91
104
|
vertical: !0,
|
|
@@ -102,7 +115,7 @@ import '../assets/HeroIconsBanner.15c9ffb1.css';const p = _(j), D = ({
|
|
|
102
115
|
}
|
|
103
116
|
),
|
|
104
117
|
(t == null ? void 0 : t.description) && /* @__PURE__ */ e(
|
|
105
|
-
|
|
118
|
+
F,
|
|
106
119
|
{
|
|
107
120
|
html: t.description,
|
|
108
121
|
as: "div",
|
|
@@ -116,23 +129,23 @@ import '../assets/HeroIconsBanner.15c9ffb1.css';const p = _(j), D = ({
|
|
|
116
129
|
align: "center",
|
|
117
130
|
className: "hero-icons-banner__central_image",
|
|
118
131
|
children: (t == null ? void 0 : t.central_image) && /* @__PURE__ */ e(
|
|
119
|
-
|
|
132
|
+
f,
|
|
120
133
|
{
|
|
121
134
|
src: t.central_image,
|
|
122
135
|
alt: "central",
|
|
123
136
|
className: "w-full h-full",
|
|
124
137
|
imageStyles: "h-full w-full object-contain",
|
|
125
|
-
loading:
|
|
126
|
-
fetchPriority:
|
|
138
|
+
loading: i === 0 ? "eager" : "lazy",
|
|
139
|
+
fetchPriority: i === 0 ? "high" : "auto"
|
|
127
140
|
}
|
|
128
141
|
)
|
|
129
142
|
}
|
|
130
143
|
),
|
|
131
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(E, { buttons: t == null ? void 0 : t.buttons })
|
|
132
145
|
]
|
|
133
146
|
}
|
|
134
147
|
) }),
|
|
135
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ a(
|
|
136
149
|
r,
|
|
137
150
|
{
|
|
138
151
|
vertical: !0,
|
|
@@ -140,11 +153,11 @@ import '../assets/HeroIconsBanner.15c9ffb1.css';const p = _(j), D = ({
|
|
|
140
153
|
className: "shrink-0 gap-3 mt-2 max-tablet:mt-0 max-tablet:mb-10",
|
|
141
154
|
children: [
|
|
142
155
|
c && /* @__PURE__ */ e(
|
|
143
|
-
|
|
156
|
+
D,
|
|
144
157
|
{
|
|
145
158
|
count: m.length,
|
|
146
|
-
activeIndex:
|
|
147
|
-
duration:
|
|
159
|
+
activeIndex: i,
|
|
160
|
+
duration: I,
|
|
148
161
|
onSelect: N
|
|
149
162
|
}
|
|
150
163
|
),
|
|
@@ -159,7 +172,7 @@ import '../assets/HeroIconsBanner.15c9ffb1.css';const p = _(j), D = ({
|
|
|
159
172
|
/* @__PURE__ */ e("div", { className: "mt-8 hidden w-full justify-center max-tablet:flex", children: /* @__PURE__ */ e(p, { items: s }) })
|
|
160
173
|
] });
|
|
161
174
|
};
|
|
162
|
-
|
|
175
|
+
W.propsToEdit = P;
|
|
163
176
|
export {
|
|
164
|
-
|
|
177
|
+
W as HeroIconsBanner
|
|
165
178
|
};
|
|
@@ -7,17 +7,17 @@ import { c as m } from "../cn-6a4bf187.js";
|
|
|
7
7
|
import { propsToEdit as I } from "./schema.js";
|
|
8
8
|
const N = ({
|
|
9
9
|
data: r,
|
|
10
|
-
activeSegment:
|
|
11
|
-
onChange:
|
|
10
|
+
activeSegment: s = 0,
|
|
11
|
+
onChange: n
|
|
12
12
|
}) => {
|
|
13
13
|
var x;
|
|
14
|
-
const [o, d] = b(
|
|
14
|
+
const [o, d] = b(s), [u, w] = b({
|
|
15
15
|
left: 0,
|
|
16
16
|
width: 0
|
|
17
17
|
}), i = y([]), { ref: l, events: v } = S();
|
|
18
18
|
f(() => {
|
|
19
|
-
d(
|
|
20
|
-
}, [
|
|
19
|
+
d(s);
|
|
20
|
+
}, [s]), f(() => {
|
|
21
21
|
const t = () => {
|
|
22
22
|
const e = i.current[o];
|
|
23
23
|
e && w({
|
|
@@ -39,7 +39,7 @@ const N = ({
|
|
|
39
39
|
t.scrollTo({ left: L, behavior: "smooth" });
|
|
40
40
|
}, [o, l]);
|
|
41
41
|
const g = (t) => {
|
|
42
|
-
d(t),
|
|
42
|
+
d(t), n == null || n(t);
|
|
43
43
|
};
|
|
44
44
|
return /* @__PURE__ */ p(
|
|
45
45
|
h,
|
|
@@ -70,7 +70,7 @@ const N = ({
|
|
|
70
70
|
align: "center",
|
|
71
71
|
onClick: () => g(e),
|
|
72
72
|
className: m(
|
|
73
|
-
"gap-3 justify-start max-tablet:justify-center cursor-pointer whitespace-nowrap transition-
|
|
73
|
+
"gap-3 justify-start max-tablet:justify-center cursor-pointer whitespace-nowrap transition-colors duration-300 ease-in-out p-4 flex-1 max-tablet:flex-none rounded-[20px] max-tablet:pl-3 max-tablet:pr-4 relative z-10",
|
|
74
74
|
"min-w-[186px] max-tablet:min-w-min"
|
|
75
75
|
),
|
|
76
76
|
children: [
|