md-components-mdigial-azamat 0.0.308 → 0.0.310

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { f as n } from "../AllModuleData-92370dde.js";
2
+ import { f as n } from "../AllModuleData-b5062f11.js";
3
3
  const a = (p) => p.map((r) => {
4
4
  var i;
5
5
  const o = n[r.key];
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, Fragment as t } from "react/jsx-runtime";
2
- import { f as p } from "../AllModuleData-92370dde.js";
2
+ import { f as p } from "../AllModuleData-b5062f11.js";
3
3
  const s = ({ components: o }) => /* @__PURE__ */ n(t, { children: o.map((r) => {
4
4
  const e = p[r.key];
5
5
  return e ? /* @__PURE__ */ n(
@@ -1,49 +1,49 @@
1
- import { jsx as n, jsxs as e } from "react/jsx-runtime";
2
- import { useState as c, useEffect as N } from "react";
3
- import { actionsGenerator as B } from "../Actions/actionsGenerator.js";
4
- import { SegmentsIcons as L } from "../SegmentsIcons/SegmentsIcons.js";
1
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
+ import { useState as g, useEffect as S } from "react";
3
+ import { actionsGenerator as N } from "../Actions/actionsGenerator.js";
4
+ import { SegmentsIcons as j } from "../SegmentsIcons/SegmentsIcons.js";
5
5
  import "../SegmentsIcons/schema.js";
6
6
  import "../SegmentsIcons/info.js";
7
- import { Bullet as _ } from "../SwiperList/components/Bullet/Bullet.js";
8
- import { S as M, a as b } from "../swiper-react-f34d3a3b.js";
7
+ import { Bullet as B } from "../SwiperList/components/Bullet/Bullet.js";
8
+ import { S as L, a as u } from "../swiper-react-f34d3a3b.js";
9
9
  import { B as f } from "../index-db918f20.js";
10
- import { a as T, b as y } from "../const-6b683c28.js";
11
- import { C as z } from "../ComponentContainer-dca711c6.js";
12
- import { F as w } from "../Flex-86aee720.js";
13
- import { G as D } from "../Grid-331af266.js";
14
- import { c as E } from "../cn-6a4bf187.js";
10
+ import { a as M, b as T } from "../const-6b683c28.js";
11
+ import { C as y } from "../ComponentContainer-dca711c6.js";
12
+ import { F as C } from "../Flex-86aee720.js";
13
+ import { G as z } from "../Grid-331af266.js";
14
+ import { c as D } from "../cn-6a4bf187.js";
15
15
  import { ContentCard as a } from "./components/ContentCard.js";
16
- import { propsToEdit as W } from "./schema.js";
17
- import '../assets/swiper.816446ca.css';/* empty css */const j = ({
16
+ import { propsToEdit as E } from "./schema.js";
17
+ import '../assets/swiper.816446ca.css';/* empty css */const O = ({
18
18
  gradient: s = "",
19
- color: t,
19
+ color: e,
20
20
  className: l,
21
21
  size: i = 24
22
22
  }) => /* @__PURE__ */ n(
23
23
  "div",
24
24
  {
25
- className: E(l),
25
+ className: D(l),
26
26
  style: {
27
27
  width: i,
28
28
  height: i,
29
- background: t || s,
29
+ background: e || s,
30
30
  WebkitMaskImage: `url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='12' height='22' viewBox='0 0 12 22'> <path fill='black' d='M8.58579 10L0 1.41421L1.41421 0L10 8.58579C10.0128 8.59862 10.0257 8.61144 10.0385 8.62425C10.3384 8.92405 10.6299 9.21542 10.8379 9.48809C11.0724 9.79548 11.2929 10.1934 11.2929 10.7071C11.2929 11.2208 11.0724 11.6187 10.8379 11.9261C10.6299 12.1988 10.3384 12.4901 10.0385 12.7899C10.0257 12.8027 10.0128 12.8156 10 12.8284L1.41421 21.4142L0 20L8.58579 11.4142C8.93911 11.0609 9.13147 10.8655 9.24787 10.713C9.24939 10.711 9.25087 10.709 9.25231 10.7071C9.25087 10.7052 9.24939 10.7032 9.24787 10.7013C9.13147 10.5487 8.93911 10.3533 8.58579 10Z'/> </svg>")`,
31
31
  WebkitMaskRepeat: "no-repeat",
32
32
  WebkitMaskSize: "contain",
33
33
  WebkitMaskPosition: "center"
34
34
  }
35
35
  }
36
- ), F = ({ title: s, items: t }) => {
37
- var u;
38
- const [l, i] = c(0), [m, C] = c(0), [d, k] = c(null), o = t == null ? void 0 : t[l], p = B(o == null ? void 0 : o.action), x = ((u = o == null ? void 0 : o.link) == null ? void 0 : u.trim()) ?? "", g = p.onClick ?? (x ? () => window.open(x, "_self") : void 0), h = (o == null ? void 0 : o.buttonTextMobile) ?? (o == null ? void 0 : o.buttonText), S = (t == null ? void 0 : t.map((r) => ({
39
- title: r.title,
40
- icon: r.icon,
41
- activeColor: r.color
36
+ ), W = ({ title: s, items: e }) => {
37
+ var h;
38
+ const [l, i] = g(0), [w, m] = g(0), [d, k] = g(null), o = e == null ? void 0 : e[l], p = N(o == null ? void 0 : o.action), c = ((h = o == null ? void 0 : o.link) == null ? void 0 : h.trim()) ?? "", b = p.onClick ?? (c ? () => window.open(c, "_self") : void 0), x = (o == null ? void 0 : o.buttonTextMobile) ?? (o == null ? void 0 : o.buttonText), _ = (e == null ? void 0 : e.map((t) => ({
39
+ title: t.title,
40
+ icon: t.icon,
41
+ activeColor: t.color
42
42
  }))) || [];
43
- return N(() => {
43
+ return S(() => {
44
44
  d && d.slideTo(0);
45
- }, [l, d]), t != null && t.length ? /* @__PURE__ */ n(z, { children: /* @__PURE__ */ e(
46
- w,
45
+ }, [l, d]), e != null && e.length ? /* @__PURE__ */ n(y, { children: /* @__PURE__ */ r(
46
+ C,
47
47
  {
48
48
  vertical: !0,
49
49
  align: "center",
@@ -51,15 +51,15 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
51
51
  children: [
52
52
  /* @__PURE__ */ n("h2", { className: "text-center text-[#0E0F11] max-tablet:text-[28px] max-tablet:leading-[34px] font-bold text-[44px] leading-[52px]", children: s }),
53
53
  /* @__PURE__ */ n(
54
- L,
54
+ j,
55
55
  {
56
- data: S,
56
+ data: _,
57
57
  activeSegment: l,
58
58
  onChange: i
59
59
  }
60
60
  ),
61
- /* @__PURE__ */ e(
62
- D,
61
+ /* @__PURE__ */ r(
62
+ z,
63
63
  {
64
64
  gap: 24,
65
65
  cols: 2,
@@ -71,11 +71,12 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
71
71
  title: o == null ? void 0 : o.left_title,
72
72
  description: o == null ? void 0 : o.text,
73
73
  image: o == null ? void 0 : o.image,
74
+ imageObjectCover: o == null ? void 0 : o.image_object_cover,
74
75
  imageHeight: "h-[350px]"
75
76
  }
76
77
  ),
77
- /* @__PURE__ */ e(
78
- w,
78
+ /* @__PURE__ */ r(
79
+ C,
79
80
  {
80
81
  vertical: !0,
81
82
  gap: 16,
@@ -86,6 +87,7 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
86
87
  title: o == null ? void 0 : o.subtitle,
87
88
  description: o == null ? void 0 : o.banner_title,
88
89
  image: o == null ? void 0 : o.bg_image,
90
+ imageObjectCover: o == null ? void 0 : o.bg_image_object_cover,
89
91
  imageHeight: "h-[316px]"
90
92
  }
91
93
  ),
@@ -96,8 +98,8 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
96
98
  style: { background: o == null ? void 0 : o.color },
97
99
  title: o == null ? void 0 : o.buttonText,
98
100
  ...p,
99
- onClick: g,
100
- iconRight: /* @__PURE__ */ n("div", { className: "p-3 rounded-2xl bg-white", children: /* @__PURE__ */ n(j, { gradient: o == null ? void 0 : o.color }) })
101
+ onClick: b,
102
+ iconRight: /* @__PURE__ */ n("div", { className: "p-3 rounded-2xl bg-white", children: /* @__PURE__ */ n(O, { gradient: o == null ? void 0 : o.color }) })
101
103
  }
102
104
  )
103
105
  ]
@@ -106,9 +108,9 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
106
108
  ]
107
109
  }
108
110
  ),
109
- /* @__PURE__ */ e("div", { className: "w-full hidden max-tablet:block", children: [
110
- /* @__PURE__ */ e(
111
- M,
111
+ /* @__PURE__ */ r("div", { className: "w-full hidden max-tablet:block", children: [
112
+ /* @__PURE__ */ r(
113
+ L,
112
114
  {
113
115
  spaceBetween: 12,
114
116
  slidesPerView: "auto",
@@ -118,45 +120,47 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
118
120
  }
119
121
  },
120
122
  onSwiper: k,
121
- onSlideChange: (r) => C(r.realIndex),
123
+ onSlideChange: (t) => m(t.realIndex),
122
124
  className: "w-full",
123
125
  children: [
124
- /* @__PURE__ */ n(b, { className: "!h-auto !w-[280px] sm:!w-[calc(50%-6px)]", children: /* @__PURE__ */ e("div", { className: "relative h-full", children: [
126
+ /* @__PURE__ */ n(u, { className: "!h-auto !w-[280px] sm:!w-[calc(50%-6px)]", children: /* @__PURE__ */ r("div", { className: "relative h-full", children: [
125
127
  /* @__PURE__ */ n(
126
128
  a,
127
129
  {
128
130
  title: o == null ? void 0 : o.left_title,
129
131
  description: o == null ? void 0 : o.text,
130
- image: o == null ? void 0 : o.image
132
+ image: o == null ? void 0 : o.image,
133
+ imageObjectCover: o == null ? void 0 : o.image_object_cover
131
134
  }
132
135
  ),
133
- h && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-6 z-[2] flex justify-center px-4", children: /* @__PURE__ */ n(
136
+ x && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-6 z-[2] flex justify-center px-4", children: /* @__PURE__ */ n(
134
137
  f,
135
138
  {
136
- variant: T.Primary,
137
- size: y.XL,
138
- title: h,
139
+ variant: M.Primary,
140
+ size: T.XL,
141
+ title: x,
139
142
  ...p,
140
- onClick: g
143
+ onClick: b
141
144
  }
142
145
  ) })
143
146
  ] }) }),
144
- /* @__PURE__ */ n(b, { className: "!h-auto !w-[280px] sm:!w-[calc(50%-6px)]", children: /* @__PURE__ */ n(
147
+ /* @__PURE__ */ n(u, { className: "!h-auto !w-[280px] sm:!w-[calc(50%-6px)]", children: /* @__PURE__ */ n(
145
148
  a,
146
149
  {
147
150
  title: o == null ? void 0 : o.subtitle,
148
151
  description: o == null ? void 0 : o.banner_title,
149
- image: o == null ? void 0 : o.bg_image
152
+ image: o == null ? void 0 : o.bg_image,
153
+ imageObjectCover: o == null ? void 0 : o.bg_image_object_cover
150
154
  }
151
155
  ) })
152
156
  ]
153
157
  }
154
158
  ),
155
159
  /* @__PURE__ */ n(
156
- _,
160
+ B,
157
161
  {
158
162
  count: 2,
159
- active: m,
163
+ active: w,
160
164
  activeColor: "#FDDB2B",
161
165
  anActiveColor: "#D7DCE1",
162
166
  itemSize: 6,
@@ -169,7 +173,7 @@ import '../assets/swiper.816446ca.css';/* empty css */const j =
169
173
  }
170
174
  ) }) : null;
171
175
  };
172
- F.propsToEdit = W;
176
+ W.propsToEdit = E;
173
177
  export {
174
- F as SegmentedContent
178
+ W as SegmentedContent
175
179
  };
@@ -1,38 +1,39 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { F as m } from "../../Flex-86aee720.js";
3
- import { I as o } from "../../index-df8034eb.js";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { F as x } from "../../Flex-86aee720.js";
3
+ import { I as c } from "../../index-df8034eb.js";
4
4
  import { S as p } from "../../SafeHtml-c00e29eb.js";
5
- import { c as x } from "../../cn-6a4bf187.js";
6
- const u = ({
5
+ import { c as e } from "../../cn-6a4bf187.js";
6
+ const g = ({
7
7
  title: a,
8
- description: e,
8
+ description: l,
9
9
  image: r,
10
- imageHeight: n,
11
- className: i,
12
- children: s
13
- }) => /* @__PURE__ */ l(
14
- m,
10
+ imageObjectCover: n = !1,
11
+ imageHeight: o,
12
+ className: s,
13
+ children: i
14
+ }) => /* @__PURE__ */ m(
15
+ x,
15
16
  {
16
17
  vertical: !0,
17
18
  justify: "between",
18
19
  align: "center",
19
- className: x(
20
+ className: e(
20
21
  "overflow-hidden bg-white w-full max-tablet:min-h-[266px] max-tablet:min-w-[280px] flex-1 rounded-2xl max-tablet:rounded-3xl max-tablet:gap-[22px] max-tablet:h-full",
21
- i
22
+ s
22
23
  ),
23
24
  children: [
24
- /* @__PURE__ */ l(
25
- m,
25
+ /* @__PURE__ */ m(
26
+ x,
26
27
  {
27
28
  vertical: !0,
28
29
  gap: 20,
29
30
  className: "w-full px-12 pt-8 pb-6 min-h-[208px] max-tablet:min-h-fit max-tablet:p-4",
30
31
  children: [
31
32
  /* @__PURE__ */ t("h3", { className: "text-[#0E0F11] text-[32px] leading-10 font-bold max-tablet:text-base", children: a }),
32
- e && /* @__PURE__ */ t(
33
+ l && /* @__PURE__ */ t(
33
34
  p,
34
35
  {
35
- html: e,
36
+ html: l,
36
37
  as: "div",
37
38
  className: "text-[#40474F] text-lg leading-[26px] max-tablet:hidden"
38
39
  }
@@ -41,18 +42,18 @@ const u = ({
41
42
  }
42
43
  ),
43
44
  /* @__PURE__ */ t(
44
- o,
45
+ c,
45
46
  {
46
47
  src: r,
47
48
  alt: a,
48
- className: x("w-full", n, "max-tablet:h-[162px]"),
49
- imageStyles: "h-auto object-contain"
49
+ className: e("w-full", o, "max-tablet:h-[162px]"),
50
+ imageStyles: e("h-auto", n ? "object-cover" : "object-contain")
50
51
  }
51
52
  ),
52
- s
53
+ i
53
54
  ]
54
55
  }
55
56
  );
56
57
  export {
57
- u as ContentCard
58
+ g as ContentCard
58
59
  };
@@ -1,6 +1,6 @@
1
1
  import { AllActionsObject as l } from "../Actions/types.js";
2
2
  import { DataTypesEnum as t, FieldTypes as e } from "../Types/FiledTypes.js";
3
- const i = [
3
+ const y = [
4
4
  "title",
5
5
  {
6
6
  dataType: t.array,
@@ -38,6 +38,11 @@ const i = [
38
38
  label: "Левая карточка: Изображение",
39
39
  key: "image"
40
40
  },
41
+ image_object_cover: {
42
+ type: e.BOOLEAN,
43
+ label: "Левая карточка: Заполнить изображением всю область",
44
+ key: "image_object_cover"
45
+ },
41
46
  subtitle: {
42
47
  type: e.STRING,
43
48
  label: "Правая карточка: Заголовок",
@@ -53,6 +58,11 @@ const i = [
53
58
  label: "Правая карточка: Изображение",
54
59
  key: "bg_image"
55
60
  },
61
+ bg_image_object_cover: {
62
+ type: e.BOOLEAN,
63
+ label: "Правая карточка: Заполнить изображением всю область",
64
+ key: "bg_image_object_cover"
65
+ },
56
66
  buttonText: {
57
67
  dataType: t.string,
58
68
  label: "Текст кнопки",
@@ -76,5 +86,5 @@ const i = [
76
86
  }
77
87
  ];
78
88
  export {
79
- i as propsToEdit
89
+ y as propsToEdit
80
90
  };
@@ -1,26 +1,26 @@
1
- import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
- import { useState as u, useRef as y, useEffect as p } from "react";
3
- import { u as E } from "../useDraggableScroll-440da9b7.js";
4
- import { F as x } from "../Flex-86aee720.js";
1
+ import { jsxs as p, jsx as c } from "react/jsx-runtime";
2
+ import { useState as b, useRef as y, useEffect as f } from "react";
3
+ import { u as S } from "../useDraggableScroll-440da9b7.js";
4
+ import { F as h } from "../Flex-86aee720.js";
5
5
  import { I as j } from "../index-df8034eb.js";
6
- import { c as n } from "../cn-6a4bf187.js";
6
+ 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: s = 0,
11
- onChange: a
10
+ activeSegment: n = 0,
11
+ onChange: s
12
12
  }) => {
13
- var d;
14
- const [o, l] = u(s), [c, b] = u({
13
+ var x;
14
+ const [o, d] = b(n), [u, w] = b({
15
15
  left: 0,
16
16
  width: 0
17
- }), m = y([]), { ref: w, events: h } = E();
18
- p(() => {
19
- l(s);
20
- }, [s]), p(() => {
17
+ }), i = y([]), { ref: l, events: v } = S();
18
+ f(() => {
19
+ d(n);
20
+ }, [n]), f(() => {
21
21
  const t = () => {
22
- const e = m.current[o];
23
- e && b({
22
+ const e = i.current[o];
23
+ e && w({
24
24
  left: e.offsetLeft,
25
25
  width: e.offsetWidth
26
26
  });
@@ -28,44 +28,53 @@ const N = ({
28
28
  return t(), window.addEventListener("resize", t), () => {
29
29
  window.removeEventListener("resize", t);
30
30
  };
31
- }, [o, r]);
32
- const v = (t) => {
33
- l(t), a == null || a(t);
31
+ }, [o, r]), f(() => {
32
+ const t = l.current, e = i.current[o];
33
+ if (!t || !e)
34
+ return;
35
+ const a = e.offsetLeft - (t.clientWidth - e.offsetWidth) / 2, E = Math.max(
36
+ t.scrollWidth - t.clientWidth,
37
+ 0
38
+ ), L = Math.min(Math.max(a, 0), E);
39
+ t.scrollTo({ left: L, behavior: "smooth" });
40
+ }, [o, l]);
41
+ const g = (t) => {
42
+ d(t), s == null || s(t);
34
43
  };
35
- return /* @__PURE__ */ f(
36
- x,
44
+ return /* @__PURE__ */ p(
45
+ h,
37
46
  {
38
- ref: w,
39
- ...h,
40
- className: n(
47
+ ref: l,
48
+ ...v,
49
+ className: m(
41
50
  "w-full mx-auto overflow-x-auto no-scrollbar cursor-grab active:cursor-grabbing relative",
42
51
  "rounded-3xl max-tablet:rounded-2xl bg-white"
43
52
  ),
44
53
  children: [
45
- /* @__PURE__ */ i(
54
+ /* @__PURE__ */ c(
46
55
  "div",
47
56
  {
48
57
  className: "absolute top-0 bottom-0 my-auto rounded-2xl transition-all duration-300 ease-in-out",
49
58
  style: {
50
- left: c.left,
51
- width: c.width,
52
- background: ((d = r[o]) == null ? void 0 : d.activeColor) || "transparent",
59
+ left: u.left,
60
+ width: u.width,
61
+ background: ((x = r[o]) == null ? void 0 : x.activeColor) || "transparent",
53
62
  height: "100%"
54
63
  }
55
64
  }
56
65
  ),
57
- r == null ? void 0 : r.map((t, e) => /* @__PURE__ */ f(
58
- x,
66
+ r == null ? void 0 : r.map((t, e) => /* @__PURE__ */ p(
67
+ h,
59
68
  {
60
- ref: (g) => m.current[e] = g,
69
+ ref: (a) => i.current[e] = a,
61
70
  align: "center",
62
- onClick: () => v(e),
63
- className: n(
71
+ onClick: () => g(e),
72
+ className: m(
64
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",
65
74
  "min-w-[186px] max-tablet:min-w-min"
66
75
  ),
67
76
  children: [
68
- t.icon && /* @__PURE__ */ i(
77
+ t.icon && /* @__PURE__ */ c(
69
78
  j,
70
79
  {
71
80
  src: t.icon,
@@ -76,10 +85,10 @@ const N = ({
76
85
  draggable: !1
77
86
  }
78
87
  ),
79
- /* @__PURE__ */ i(
88
+ /* @__PURE__ */ c(
80
89
  "span",
81
90
  {
82
- className: n(
91
+ className: m(
83
92
  "text-sm font-semibold leading-5 select-none transition-colors duration-300",
84
93
  e === o ? "text-white" : "text-[#40474F]"
85
94
  ),