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
- }, q = ({ isOpen: n, onClose: a }) => {
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
- q as default
508
+ O as default
503
509
  };
@@ -1,91 +1,104 @@
1
- import { jsxs as n, Fragment as I, jsx as e } from "react/jsx-runtime";
2
- import { memo as _ } from "react";
3
- import { ButtonsList as B } from "../ButtonsList/ButtonsList.js";
4
- import { IconList as j } from "../IconList/IconList.js";
5
- import { C as k } from "../ComponentContainer-dca711c6.js";
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 d } from "../index-df8034eb.js";
8
- import { S as C } from "../SafeHtml-c00e29eb.js";
9
- import { c as h } from "../cn-6a4bf187.js";
10
- import { HeroIconsBannerArrows as F } from "./HeroIconsBannerArrows.js";
11
- import { HeroIconsBannerIndicator as H } from "./HeroIconsBannerIndicator.js";
12
- import { propsToEdit as L } from "./schema.js";
13
- import { useHeroIconsBanner as z } from "./useHeroIconsBanner.js";
14
- import '../assets/HeroIconsBanner.15c9ffb1.css';const p = _(j), D = ({
15
- autoplay_delay_seconds: f,
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: u
17
+ slides: b
18
18
  }) => {
19
19
  const {
20
20
  activeSlide: t,
21
- activeSlideIndex: l,
22
- goToNextSlide: b,
23
- goToPrevSlide: x,
24
- handleBannerClick: g,
25
- handleBannerKeyDown: v,
26
- hasBannerLink: i,
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: y,
31
- visibleBackgroundIndexes: w
32
- } = z({
33
- autoplay_delay_seconds: f,
34
- slides: u
35
- });
36
- return /* @__PURE__ */ n(I, { children: [
37
- /* @__PURE__ */ n(
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: h(
54
+ className: u(
43
55
  "relative w-full h-[100svh] overflow-hidden",
44
- i && "cursor-pointer"
56
+ l && "cursor-pointer"
45
57
  ),
46
- onClick: g,
47
- onKeyDown: v,
48
- role: i ? "link" : void 0,
49
- tabIndex: i ? 0 : void 0,
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__ */ n("div", { className: "absolute inset-0 z-0 bg-black", children: [
52
- w.map((a) => {
53
- const o = m[a];
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: h(
70
+ className: u(
58
71
  "absolute inset-0 bg-black transition-opacity duration-700 ease-out",
59
- l === a ? "opacity-100" : "opacity-0"
72
+ i === n ? "opacity-100" : "opacity-0"
60
73
  ),
61
74
  children: /* @__PURE__ */ e(
62
- d,
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: a === 0 ? "eager" : "lazy",
69
- fetchPriority: a === 0 ? "high" : "auto",
81
+ loading: n === 0 ? "eager" : "lazy",
82
+ fetchPriority: n === 0 ? "high" : "auto",
70
83
  disableLoadingEffect: !0
71
84
  }
72
85
  )
73
86
  },
74
- `${a}-${o.bg_image}`
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
- F,
94
+ S,
82
95
  {
83
- onNext: b,
84
- onPrev: x
96
+ onNext: x,
97
+ onPrev: w
85
98
  }
86
99
  ),
87
- /* @__PURE__ */ n(k, { className: "relative z-10 flex flex-col justify-between pb-[10px] pt-[116px] h-full", children: [
88
- /* @__PURE__ */ e("div", { className: "hero-icons-banner__content flex-1 min-h-0", children: /* @__PURE__ */ n(
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
- C,
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
- d,
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: l === 0 ? "eager" : "lazy",
126
- fetchPriority: l === 0 ? "high" : "auto"
138
+ loading: i === 0 ? "eager" : "lazy",
139
+ fetchPriority: i === 0 ? "high" : "auto"
127
140
  }
128
141
  )
129
142
  }
130
143
  ),
131
- /* @__PURE__ */ e(B, { buttons: t == null ? void 0 : t.buttons })
144
+ /* @__PURE__ */ e(E, { buttons: t == null ? void 0 : t.buttons })
132
145
  ]
133
146
  }
134
147
  ) }),
135
- /* @__PURE__ */ n(
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
- H,
156
+ D,
144
157
  {
145
158
  count: m.length,
146
- activeIndex: l,
147
- duration: y,
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
- D.propsToEdit = L;
175
+ W.propsToEdit = P;
163
176
  export {
164
- D as HeroIconsBanner
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: n = 0,
11
- onChange: s
10
+ activeSegment: s = 0,
11
+ onChange: n
12
12
  }) => {
13
13
  var x;
14
- const [o, d] = b(n), [u, w] = 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(n);
20
- }, [n]), f(() => {
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), s == null || s(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-all 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",
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: [
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "md-components-mdigial-azamat",
3
3
  "author": "Azamat Raimbekov",
4
4
  "private": false,
5
- "version": "0.0.310",
5
+ "version": "0.0.311",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",