md-components-mdigial-azamat 0.0.331 → 0.0.332

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,126 +1,152 @@
1
- import { jsxs as f, jsx as l } from "react/jsx-runtime";
2
- import { DataTypesEnum as v } from "../Types/FiledTypes.js";
3
- import { e as S, t as k, a as C } from "../themeProps-d4f49292.js";
4
- import { B as N } from "../index-4ceee683.js";
5
- import { b as j } from "../const-9ea436d6.js";
6
- import { C as B } from "../ComponentContainer-dca711c6.js";
7
- import { H as E } from "../Heading-f935c90a.js";
8
- import { I as o } from "../index-df8034eb.js";
9
- import { S as P } from "../SafeHtml-c32fde04.js";
10
- import { c as p } from "../cn-6a4bf187.js";
11
- const T = {
1
+ import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
+ import { DataTypesEnum as s, FieldTypes as H } from "../Types/FiledTypes.js";
3
+ import { e as T, t as E, a as j } from "../themeProps-d4f49292.js";
4
+ import { B } from "../index-4ceee683.js";
5
+ import { b as I } from "../const-9ea436d6.js";
6
+ import { C as _ } from "../ComponentContainer-dca711c6.js";
7
+ import { H as L } from "../Heading-f935c90a.js";
8
+ import { I as p } from "../index-df8034eb.js";
9
+ import { S as M } from "../SafeHtml-c32fde04.js";
10
+ import { c as r } from "../cn-6a4bf187.js";
11
+ const P = {
12
+ label: "Высота картинки",
13
+ key: "image_height_mode",
14
+ dataType: s.select,
15
+ options: [
16
+ { value: "fixed", label: "450 px — как было" },
17
+ { value: "content", label: "По содержимому картинки" },
18
+ { value: "custom", label: "Своя высота" }
19
+ ]
20
+ }, z = {
21
+ label: "Своя высота, px",
22
+ key: "image_height",
23
+ type: H.NUMBER,
24
+ dataType: s.number
25
+ }, A = {
12
26
  label: "Размер логотипа",
13
27
  key: "logo_size",
14
- dataType: v.select,
28
+ dataType: s.select,
15
29
  options: [
16
30
  { value: "small", label: "Маленький" },
17
31
  { value: "medium", label: "Средний" },
18
32
  { value: "large", label: "Большой" }
19
33
  ]
20
- }, z = [
34
+ }, D = [
21
35
  "title",
22
36
  "description",
23
- S,
24
- k,
25
- C,
37
+ T,
38
+ E,
39
+ j,
26
40
  "image",
27
41
  "image_mob",
42
+ P,
43
+ z,
28
44
  "logo",
29
- T,
45
+ A,
30
46
  "grid",
31
- j
32
- ], h = {
47
+ I
48
+ ], u = 450, F = (l, o) => {
49
+ if (l === "content")
50
+ return;
51
+ if (l === "fixed")
52
+ return u;
53
+ const t = Number(o);
54
+ return Number.isFinite(t) && t > 0 ? t : u;
55
+ }, y = {
33
56
  small: "w-[280px] h-[70px] max-tablet:w-full max-tablet:h-[40px] max-tablet:my-[12px] max-tablet:mb-[24px]",
34
57
  medium: "w-[427px] h-[94px] max-tablet:w-full max-tablet:h-[45px] max-tablet:my-[12px] max-tablet:mb-[24px]",
35
58
  large: "w-[550px] h-[150px] max-tablet:w-full max-tablet:h-[65px] max-tablet:my-[12px] max-tablet:mb-[24px]"
36
- }, H = ({
37
- title: e,
38
- title_tag: g,
39
- description: i,
40
- buttons: t,
41
- image: r,
42
- image_mob: s,
43
- logo: c,
44
- logo_size: y = "medium",
45
- grid: b,
46
- background_color: n,
47
- title_color: d,
48
- text_color: m
59
+ }, G = ({
60
+ title: l,
61
+ title_tag: o,
62
+ description: t,
63
+ buttons: m,
64
+ image: c,
65
+ image_mob: n,
66
+ logo: b,
67
+ logo_size: v = "medium",
68
+ grid: d,
69
+ background_color: f,
70
+ title_color: h,
71
+ text_color: x,
72
+ image_height: w,
73
+ image_height_mode: S
49
74
  }) => {
50
- const u = (x, a) => (a == null ? void 0 : a.length) % 2 !== 0 && x === (a == null ? void 0 : a.length) - 1, w = h[y] ?? h.medium;
51
- return /* @__PURE__ */ f(
75
+ const k = (i, e) => (e == null ? void 0 : e.length) % 2 !== 0 && i === (e == null ? void 0 : e.length) - 1, N = y[v] ?? y.medium, C = F(S, w);
76
+ return /* @__PURE__ */ g(
52
77
  "section",
53
78
  {
54
- style: n ? { backgroundColor: n } : void 0,
79
+ style: f ? { backgroundColor: f } : void 0,
55
80
  children: [
56
- /* @__PURE__ */ f(B, { className: "flex flex-col items-center", children: [
57
- c && /* @__PURE__ */ l(
58
- o,
81
+ /* @__PURE__ */ g(_, { className: "flex flex-col items-center", children: [
82
+ b && /* @__PURE__ */ a(
83
+ p,
59
84
  {
60
- src: c,
61
- alt: e,
62
- className: p(
85
+ src: b,
86
+ alt: l,
87
+ className: r(
63
88
  "mb-[36px] object-contain mt-[40px] flex items-center",
64
- w
89
+ N
65
90
  ),
66
91
  imageStyles: "h-full w-full object-contain"
67
92
  }
68
93
  ),
69
- /* @__PURE__ */ l(
70
- E,
94
+ /* @__PURE__ */ a(
95
+ L,
71
96
  {
72
- tag: g,
97
+ tag: o,
73
98
  fallback: "h1",
74
99
  className: "text-black2 text-[40px] font-bold leading-[50px] mb-[24px] text-center max-tablet:text-[26px] max-tablet:leading-[34px] max-tablet:mb-[20px]",
75
- style: d ? { color: d } : void 0,
76
- children: e
100
+ style: h ? { color: h } : void 0,
101
+ children: l
77
102
  }
78
103
  ),
79
- i && /* @__PURE__ */ l("div", { style: m ? { color: m } : void 0, children: /* @__PURE__ */ l(
80
- P,
104
+ t && /* @__PURE__ */ a("div", { style: x ? { color: x } : void 0, children: /* @__PURE__ */ a(
105
+ M,
81
106
  {
82
- html: i,
107
+ html: t,
83
108
  as: "div",
84
- className: p(
109
+ className: r(
85
110
  "text-center text-[20px] font-normal leading-[25px] mb-[32px] w-[75%] mx-auto max-tablet:text-[16px] max-tablet:leading-[20px] max-tablet:w-full",
86
- !m && "text-black2"
111
+ !x && "text-black2"
87
112
  )
88
113
  }
89
114
  ) }),
90
- /* @__PURE__ */ l(
115
+ !!(m != null && m.length) && /* @__PURE__ */ a(
91
116
  "div",
92
117
  {
93
- className: `grid grid-cols-${b} items-center gap-[16px] mb-[60px]
118
+ className: `grid grid-cols-${d} items-center gap-[16px] mb-[60px]
94
119
  max-tablet:grid-cols-1 max-tablet:w-full max-tablet:mb-[40px]`,
95
- children: t == null ? void 0 : t.map((x, a) => /* @__PURE__ */ l(
96
- N,
120
+ children: m.map((i, e) => /* @__PURE__ */ a(
121
+ B,
97
122
  {
98
- ...x,
123
+ ...i,
99
124
  target: "_blank",
100
- className: p(
125
+ className: r(
101
126
  "flex items-center h-[56px] mx-auto px-[32px] py-[12px] max-tablet:px-[32px] max-tablet:py-[12px]",
102
- { [`col-span-${b}`]: u(a, t) }
127
+ { [`col-span-${d}`]: k(e, m) }
103
128
  )
104
129
  },
105
- a
130
+ e
106
131
  ))
107
132
  }
108
133
  )
109
134
  ] }),
110
- r && /* @__PURE__ */ l(
111
- o,
135
+ c && /* @__PURE__ */ a(
136
+ p,
112
137
  {
113
- src: r,
114
- alt: e,
115
- className: "w-full h-[450px] mb-[64px] block max-mobile:hidden",
116
- imageStyles: "w-full h-full object-contain max-mobile:object-cover"
138
+ src: c,
139
+ alt: l,
140
+ height: C,
141
+ className: "w-full mb-[64px] block max-mobile:hidden",
142
+ imageStyles: "block w-full h-full object-contain max-mobile:object-cover"
117
143
  }
118
144
  ),
119
- s && /* @__PURE__ */ l(
120
- o,
145
+ n && /* @__PURE__ */ a(
146
+ p,
121
147
  {
122
- src: s,
123
- alt: e,
148
+ src: n,
149
+ alt: l,
124
150
  className: "w-full h-fit max-h-[450px] overflow-hidden hidden max-mobile:block mb-[64px] max-mobile:mb-[40px]",
125
151
  imageStyles: "w-full h-full object-contain"
126
152
  }
@@ -129,8 +155,8 @@ const T = {
129
155
  }
130
156
  );
131
157
  };
132
- H.propsToEdit = z;
158
+ G.propsToEdit = D;
133
159
  export {
134
- H as MainBanner,
135
- z as propsToEdit
160
+ G as MainBanner,
161
+ D as propsToEdit
136
162
  };
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.331",
5
+ "version": "0.0.332",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",