md-components-mdigial-azamat 0.0.312 → 0.0.313

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,7 +1,7 @@
1
1
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
2
  import { warningCardVariant as b, WarningCardVariant as s, WarningCardVariantKey as h } from "./model.js";
3
3
  import { HtmlContent as w } from "../../HtmlContent/HtmlContent.js";
4
- import { I as C } from "../../Icon-70ea6cb8.js";
4
+ import { I as C } from "../../Icon-0d3cbe94.js";
5
5
  import { B as N } from "../../const-6b683c28.js";
6
6
  import { B as u } from "../../index-db918f20.js";
7
7
  import { C as y } from "../../ComponentContainer-dca711c6.js";
@@ -1,44 +1,45 @@
1
- import { jsx as e, jsxs as x } from "react/jsx-runtime";
2
- import { downloadFile as N } from "../../../Actions/downloadFile/downloadFile.js";
3
- import { DataTypesEnum as d, FieldTypes as r } from "../../../Types/FiledTypes.js";
4
- import { I as c } from "../../../Icon-70ea6cb8.js";
5
- import { c as g } from "../../../createBoolean-56064b0d.js";
6
- import { p as f } from "../../../palette-256cf77a.js";
7
- import { B as j } from "../../../index-db918f20.js";
8
- import { a as b } from "../../../const-6b683c28.js";
9
- import { C as k } from "../../../ComponentContainer-dca711c6.js";
10
- import { I as B } from "../../../index-df8034eb.js";
11
- import { S as z } from "../../../SafeHtml-c00e29eb.js";
12
- import { c as i } from "../../../cn-6a4bf187.js";
13
- import { u as C } from "../../../useScreenSize-c1b64c02.js";
14
- const E = g({
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { downloadFile as F } from "../../../Actions/downloadFile/downloadFile.js";
3
+ import { openFileInNewTab as G } from "../../openFile.js";
4
+ import { DataTypesEnum as k, FieldTypes as l } from "../../../Types/FiledTypes.js";
5
+ import { I as s } from "../../../Icon-0d3cbe94.js";
6
+ import { c as v } from "../../../createBoolean-56064b0d.js";
7
+ import { p as c } from "../../../palette-256cf77a.js";
8
+ import { B as T } from "../../../index-db918f20.js";
9
+ import { a as i } from "../../../const-6b683c28.js";
10
+ import { C as P } from "../../../ComponentContainer-dca711c6.js";
11
+ import { I as R } from "../../../index-df8034eb.js";
12
+ import { S as E } from "../../../SafeHtml-c00e29eb.js";
13
+ import { c as n } from "../../../cn-6a4bf187.js";
14
+ import { u as _ } from "../../../useScreenSize-c1b64c02.js";
15
+ const $ = v({
15
16
  label: "Светлый вариант",
16
17
  type: "isLight"
17
- }), F = g({
18
+ }), D = v({
18
19
  label: "Скрыть картинку",
19
20
  type: "hide_image"
20
- }), P = {
21
- dataType: d.select,
21
+ }), M = {
22
+ dataType: k.select,
22
23
  key: "image_size",
23
24
  label: "Размер картинки",
24
25
  options: [
25
26
  { label: "Стандарт", value: "standard" },
26
27
  { label: "Крупный", value: "large" }
27
28
  ]
28
- }, G = {
29
+ }, H = {
29
30
  type: "media",
30
31
  label: "Файл и изображение",
31
- dataType: d.object,
32
+ dataType: k.object,
32
33
  data: {
33
34
  keys: {
34
35
  file: {
35
- type: r.STRING,
36
- dataType: r.STRING,
36
+ type: l.STRING,
37
+ dataType: l.STRING,
37
38
  label: "Ссылка на файл"
38
39
  },
39
40
  image: {
40
- type: r.FILE,
41
- dataType: r.FILE,
41
+ type: l.FILE,
42
+ dataType: l.FILE,
42
43
  label: "Изображение справа"
43
44
  }
44
45
  }
@@ -46,102 +47,156 @@ const E = g({
46
47
  }, L = [
47
48
  "title",
48
49
  "text",
49
- G,
50
+ H,
50
51
  "button_text",
51
- E,
52
- F,
53
- P,
52
+ {
53
+ key: "button_hex",
54
+ dataType: "color",
55
+ label: "Цвет кнопки скачивания"
56
+ },
57
+ {
58
+ key: "button_text_color",
59
+ dataType: "color",
60
+ label: "Цвет текста кнопки скачивания"
61
+ },
62
+ {
63
+ type: l.STRING,
64
+ dataType: l.STRING,
65
+ key: "view_button_text",
66
+ label: "Текст кнопки просмотра"
67
+ },
68
+ {
69
+ key: "view_button_hex",
70
+ dataType: "color",
71
+ label: "Цвет кнопки просмотра"
72
+ },
73
+ {
74
+ key: "view_button_text_color",
75
+ dataType: "color",
76
+ label: "Цвет текста кнопки просмотра"
77
+ },
78
+ $,
79
+ D,
80
+ M,
54
81
  "background_color"
55
- ], R = ({
56
- title: n,
57
- text: s,
58
- link: h,
59
- file: y,
60
- image: u,
61
- media: t,
62
- button_text: w = "Скачать",
63
- isLight: a = !0,
82
+ ], V = ({
83
+ title: x,
84
+ text: b,
85
+ link: I,
86
+ file: N,
87
+ image: S,
88
+ media: a,
89
+ button_text: B = "Скачать",
90
+ view_button_text: d,
91
+ button_hex: f,
92
+ button_text_color: y,
93
+ view_button_hex: g,
94
+ view_button_text_color: h,
95
+ isLight: t = !0,
64
96
  background_color: m,
65
- hide_image: v = !1,
66
- image_size: I = "standard"
97
+ hide_image: j = !1,
98
+ image_size: z = "standard"
67
99
  }) => {
68
- const o = C(960), S = (t == null ? void 0 : t.file) || y || h, p = (t == null ? void 0 : t.image) || u, T = !v, l = I === "large";
69
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ x(
100
+ const o = _(960), u = (a == null ? void 0 : a.file) || N || I, w = (a == null ? void 0 : a.image) || S, C = !j, r = z === "large";
101
+ return /* @__PURE__ */ e(P, { children: /* @__PURE__ */ p(
70
102
  "div",
71
103
  {
72
104
  "data-testid": "download-file-banner",
73
- className: i(
105
+ className: n(
74
106
  "relative rounded-[20px] flex items-center justify-between gap-[64px] p-[48px] max-tablet:flex-col-reverse max-tablet:items-start max-tablet:justify-start max-tablet:gap-[16px] max-tablet:p-[20px]",
75
- !m && (a ? "bg-white" : "bg-[#1f2425]")
107
+ !m && (t ? "bg-white" : "bg-[#1f2425]")
76
108
  ),
77
109
  style: m ? { backgroundColor: m } : void 0,
78
110
  children: [
79
111
  /* @__PURE__ */ e(
80
112
  "div",
81
113
  {
82
- className: i(
114
+ className: n(
83
115
  "flex flex-col",
84
- l && "min-[961px]:w-[calc(100%-239px)]",
116
+ r && "min-[961px]:w-[calc(100%-239px)]",
85
117
  "max-tablet:w-full"
86
118
  ),
87
- children: /* @__PURE__ */ x("div", { children: [
119
+ children: /* @__PURE__ */ p("div", { children: [
88
120
  /* @__PURE__ */ e(
89
121
  "p",
90
122
  {
91
- className: `m-0 mb-4 text-[24px] font-bold leading-[32px] max-tablet:mt-0 max-tablet:mb-[12px] max-tablet:text-[24px] max-tablet:leading-[28px] ${a ? "text-[#0e0f11]" : "text-[#f4f6f7]"}`,
92
- children: n
123
+ className: `m-0 mb-4 text-[24px] font-bold leading-[32px] max-tablet:mt-0 max-tablet:mb-[12px] max-tablet:text-[24px] max-tablet:leading-[28px] ${t ? "text-[#0e0f11]" : "text-[#f4f6f7]"}`,
124
+ children: x
93
125
  }
94
126
  ),
95
- s && /* @__PURE__ */ e(
96
- z,
127
+ b && /* @__PURE__ */ e(
128
+ E,
97
129
  {
98
- html: s,
130
+ html: b,
99
131
  as: "div",
100
- className: `m-0 text-[16px] leading-6 ${a ? "text-[#40474f]" : "text-[#f4f6f7]"}`
132
+ className: `m-0 text-[16px] leading-6 ${t ? "text-[#40474f]" : "text-[#f4f6f7]"}`
101
133
  }
102
134
  ),
103
- /* @__PURE__ */ e(
104
- j,
105
- {
106
- onClick: () => N({ props: { link: S } }),
107
- variant: a ? b.Primary : b.Secondary,
108
- iconRight: /* @__PURE__ */ e(
109
- c,
110
- {
111
- name: "download",
112
- size: 20,
113
- color: f.blackBG
114
- }
115
- ),
116
- className: `w-fit max-tablet:w-full mt-8 max-tablet:mt-[24px] ${a ? "" : "!bg-white hover:!bg-grayBlue"}`,
117
- children: w
118
- }
119
- )
135
+ /* @__PURE__ */ p("div", { className: "flex flex-wrap gap-3 mt-8 max-tablet:mt-[24px]", children: [
136
+ d && /* @__PURE__ */ e(
137
+ T,
138
+ {
139
+ onClick: () => G(u),
140
+ button_hex: g,
141
+ button_text_color: h,
142
+ variant: t ? i.Primary : i.Secondary,
143
+ iconRight: /* @__PURE__ */ e(
144
+ s,
145
+ {
146
+ name: "eye",
147
+ size: 20,
148
+ color: h || c.blackBG
149
+ }
150
+ ),
151
+ className: `w-fit max-tablet:w-full ${t || g ? "" : "!bg-white hover:!bg-grayBlue"}`,
152
+ children: d
153
+ }
154
+ ),
155
+ /* @__PURE__ */ e(
156
+ T,
157
+ {
158
+ onClick: () => F({ props: { link: u } }),
159
+ button_hex: f,
160
+ button_text_color: y,
161
+ variant: t ? i.Primary : i.Secondary,
162
+ iconRight: /* @__PURE__ */ e(
163
+ s,
164
+ {
165
+ name: "download",
166
+ size: 20,
167
+ color: y || c.blackBG
168
+ }
169
+ ),
170
+ className: `w-fit max-tablet:w-full ${t || f ? "" : "!bg-white hover:!bg-grayBlue"}`,
171
+ children: B
172
+ }
173
+ )
174
+ ] })
120
175
  ] })
121
176
  }
122
177
  ),
123
- T && (p ? /* @__PURE__ */ e(
124
- B,
178
+ C && (w ? /* @__PURE__ */ e(
179
+ R,
125
180
  {
126
- src: p,
127
- alt: n || "",
128
- width: l ? o ? 120 : 215 : o ? 120 : 220,
129
- height: l ? o ? 120 : 215 : o ? 120 : 180,
130
- className: i(
181
+ src: w,
182
+ alt: x || "",
183
+ width: r ? o ? 120 : 215 : o ? 120 : 220,
184
+ height: r ? o ? 120 : 215 : o ? 120 : 180,
185
+ className: n(
131
186
  "flex-shrink-0 max-tablet:self-center",
132
- l ? "min-[961px]:absolute min-[961px]:right-[48px] min-[961px]:top-0 min-[961px]:!h-auto min-[961px]:!w-[215px]" : ""
187
+ r ? "min-[961px]:absolute min-[961px]:right-[48px] min-[961px]:top-0 min-[961px]:!h-auto min-[961px]:!w-[215px]" : ""
133
188
  ),
134
- imageStyles: i(
189
+ imageStyles: n(
135
190
  "object-contain",
136
- l && "min-[961px]:object-cover min-[961px]:object-bottom"
191
+ r && "min-[961px]:object-cover min-[961px]:object-bottom"
137
192
  )
138
193
  }
139
194
  ) : /* @__PURE__ */ e(
140
- c,
195
+ s,
141
196
  {
142
197
  className: "flex-shrink-0",
143
198
  name: "file",
144
- color: f.greenLight,
199
+ color: c.greenLight,
145
200
  size: o ? 56 : 82
146
201
  }
147
202
  ))
@@ -149,8 +204,8 @@ const E = g({
149
204
  }
150
205
  ) });
151
206
  };
152
- R.propsToEdit = L;
207
+ V.propsToEdit = L;
153
208
  export {
154
- R as DownloadFileBanner,
209
+ V as DownloadFileBanner,
155
210
  L as propsToEdit
156
211
  };
@@ -1,95 +1,129 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { downloadFile as f } from "../../../Actions/downloadFile/downloadFile.js";
3
- import { c as d } from "../../../createBoolean-56064b0d.js";
4
- import { B as b } from "../../../index-db918f20.js";
5
- import { B as g, a as h } from "../../../const-6b683c28.js";
6
- import { C as w } from "../../../ComponentContainer-dca711c6.js";
7
- import { S as y } from "../../../SafeHtml-c00e29eb.js";
8
- import { c as a } from "../../../cn-6a4bf187.js";
9
- import { u as B } from "../../../useScreenSize-c1b64c02.js";
10
- const u = d({
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { downloadFile as h } from "../../../Actions/downloadFile/downloadFile.js";
3
+ import { openFileInNewTab as v } from "../../openFile.js";
4
+ import { FieldTypes as f } from "../../../Types/FiledTypes.js";
5
+ import { c as N } from "../../../createBoolean-56064b0d.js";
6
+ import { B as d } from "../../../index-db918f20.js";
7
+ import { B as S, a as b } from "../../../const-6b683c28.js";
8
+ import { C as k } from "../../../ComponentContainer-dca711c6.js";
9
+ import { S as B } from "../../../SafeHtml-c00e29eb.js";
10
+ import { c as l } from "../../../cn-6a4bf187.js";
11
+ import { u as T } from "../../../useScreenSize-c1b64c02.js";
12
+ const j = N({
11
13
  label: "Светлый вариант",
12
14
  type: "isLight"
13
- }), S = [
15
+ }), M = [
14
16
  "title",
15
17
  "description",
16
18
  "icon",
17
- u,
19
+ j,
18
20
  "background_color",
19
- g
20
- ], j = ({
21
- title: r,
22
- description: s,
23
- icon: c,
24
- button: t,
21
+ S,
22
+ {
23
+ type: f.STRING,
24
+ dataType: f.STRING,
25
+ key: "view_button_text",
26
+ label: "Текст кнопки просмотра"
27
+ },
28
+ {
29
+ key: "view_button_hex",
30
+ dataType: "color",
31
+ label: "Цвет кнопки просмотра"
32
+ },
33
+ {
34
+ key: "view_button_text_color",
35
+ dataType: "color",
36
+ label: "Цвет текста кнопки просмотра"
37
+ }
38
+ ], z = ({
39
+ title: s,
40
+ description: p,
41
+ icon: g,
42
+ button: e,
43
+ view_button_text: c,
44
+ view_button_hex: y,
45
+ view_button_text_color: w,
25
46
  variant: i = "big",
26
- isLight: l = !0,
47
+ isLight: a = !0,
27
48
  background_color: m
28
49
  }) => {
29
- const n = B(960), x = i === "big" ? n ? 106 : 343 : n ? 106 : 64, o = i === "big" ? 48 : 32;
30
- return /* @__PURE__ */ p(
31
- w,
50
+ const n = T(960), x = i === "big" ? n ? 106 : 343 : n ? 106 : 64, r = i === "big" ? 48 : 32;
51
+ return /* @__PURE__ */ o(
52
+ k,
32
53
  {
33
- className: a(
54
+ className: l(
34
55
  "flex flex-nowrap justify-between items-stretch gap-10 rounded-[20px]",
35
56
  "max-tablet:flex-col max-tablet:items-center max-tablet:justify-start max-tablet:p-[24px] max-tablet:my-[48px] my-[88px]",
36
- !m && (l ? "bg-white" : "bg-black7"),
57
+ !m && (a ? "bg-white" : "bg-black7"),
37
58
  "w-[calc(100%-239px)] max-tablet:w-full"
38
59
  ),
39
60
  style: m ? { backgroundColor: m } : void 0,
40
61
  children: [
41
- /* @__PURE__ */ p(
62
+ /* @__PURE__ */ o(
42
63
  "div",
43
64
  {
44
- className: a(
65
+ className: l(
45
66
  "flex flex-col min-w-0 flex-1 max-tablet:p-0",
46
67
  "max-tablet:order-2 max-tablet:w-full"
47
68
  ),
48
69
  style: {
49
- paddingTop: o,
50
- paddingBottom: o,
51
- paddingLeft: o
70
+ paddingTop: r,
71
+ paddingBottom: r,
72
+ paddingLeft: r
52
73
  },
53
74
  children: [
54
- /* @__PURE__ */ e(
75
+ /* @__PURE__ */ t(
55
76
  "p",
56
77
  {
57
- className: a(
78
+ className: l(
58
79
  "font-[700] mb-[16px] max-tablet:mt-[24px] max-tablet:mb-[12px] max-tablet:text-center",
59
- l ? "text-[#0e0f11]" : "text-[#f4f6f7]",
80
+ a ? "text-[#0e0f11]" : "text-[#f4f6f7]",
60
81
  i === "big" ? "text-[32px] leading-[40px]" : "text-[24px] leading-[32px]",
61
82
  "max-tablet:text-[24px] max-tablet:leading-[28px]"
62
83
  ),
63
- children: r
84
+ children: s
64
85
  }
65
86
  ),
66
- s && /* @__PURE__ */ e(
67
- y,
87
+ p && /* @__PURE__ */ t(
88
+ B,
68
89
  {
69
- html: s,
90
+ html: p,
70
91
  as: "div",
71
- className: a(
92
+ className: l(
72
93
  "font-[400] text-[16px] leading-[24px] mb-[32px] max-tablet:mb-[24px] max-tablet:text-center",
73
- l ? "text-[#40474f]" : "text-[#f4f6f7]"
94
+ a ? "text-[#40474f]" : "text-[#f4f6f7]"
74
95
  )
75
96
  }
76
97
  ),
77
- /* @__PURE__ */ e(
78
- b,
79
- {
80
- className: "w-fit max-tablet:w-full flex items-center justify-center mt-auto",
81
- ...t,
82
- variant: l ? (t == null ? void 0 : t.variant) ?? void 0 : h.Primary,
83
- onClick: () => f({ props: { link: t == null ? void 0 : t.link } })
84
- }
85
- )
98
+ /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-3 mt-auto max-tablet:flex-col", children: [
99
+ c && /* @__PURE__ */ t(
100
+ d,
101
+ {
102
+ className: "w-fit max-tablet:w-full flex items-center justify-center",
103
+ button_hex: y,
104
+ button_text_color: w,
105
+ variant: a ? (e == null ? void 0 : e.variant) ?? void 0 : b.Primary,
106
+ onClick: () => v(e == null ? void 0 : e.link),
107
+ children: c
108
+ }
109
+ ),
110
+ /* @__PURE__ */ t(
111
+ d,
112
+ {
113
+ className: "w-fit max-tablet:w-full flex items-center justify-center",
114
+ ...e,
115
+ variant: a ? (e == null ? void 0 : e.variant) ?? void 0 : b.Primary,
116
+ onClick: () => h({ props: { link: e == null ? void 0 : e.link } })
117
+ }
118
+ )
119
+ ] })
86
120
  ]
87
121
  }
88
122
  ),
89
- /* @__PURE__ */ e(
123
+ /* @__PURE__ */ t(
90
124
  "div",
91
125
  {
92
- className: a(
126
+ className: l(
93
127
  "flex shrink-0 self-stretch items-center justify-center overflow-hidden min-h-0",
94
128
  "max-tablet:order-1 max-tablet:min-h-[120px] max-tablet:max-h-[280px] max-tablet:w-full"
95
129
  ),
@@ -98,11 +132,11 @@ const u = d({
98
132
  minWidth: x,
99
133
  maxWidth: x
100
134
  },
101
- children: /* @__PURE__ */ e(
135
+ children: /* @__PURE__ */ t(
102
136
  "img",
103
137
  {
104
- src: c,
105
- alt: r,
138
+ src: g,
139
+ alt: s,
106
140
  loading: "lazy",
107
141
  className: "w-full h-full object-contain object-center"
108
142
  }
@@ -113,8 +147,8 @@ const u = d({
113
147
  }
114
148
  );
115
149
  };
116
- j.propsToEdit = S;
150
+ z.propsToEdit = M;
117
151
  export {
118
- j as DownloadFileBright,
119
- S as propsToEdit
152
+ z as DownloadFileBright,
153
+ M as propsToEdit
120
154
  };