@megafon/ui-shared 5.15.0 → 5.16.0
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.
- package/CHANGELOG.md +22 -0
- package/dist/es/components/Card/Card.css +52 -6
- package/dist/es/components/Card/Card.d.ts +7 -3
- package/dist/es/components/Card/Card.js +27 -6
- package/dist/es/components/Card/types.d.ts +6 -0
- package/dist/es/components/Container/Container.css +130 -1
- package/dist/es/components/ImageBanner/ImageBanner.css +22 -13
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +3 -9
- package/dist/es/components/ImageBanner/ImageBanner.js +8 -20
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +8 -10
- package/dist/lib/components/Card/Card.css +52 -6
- package/dist/lib/components/Card/Card.d.ts +7 -3
- package/dist/lib/components/Card/Card.js +27 -6
- package/dist/lib/components/Card/types.d.ts +6 -0
- package/dist/lib/components/Container/Container.css +130 -1
- package/dist/lib/components/ImageBanner/ImageBanner.css +22 -13
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +3 -9
- package/dist/lib/components/ImageBanner/ImageBanner.js +7 -20
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +8 -10
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,28 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [5.16.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-shared@5.15.0...@megafon/ui-shared@5.16.0) (2024-07-08)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **imagebanner:** fix size for mobile ([45e6e67](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/45e6e67a914d27f9b91c81a1216917cf399d4973))
|
12
|
+
* **imagebanner:** review fixes ([1522d02](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/1522d0292428c7d04636d73b04ed679b81a1771c))
|
13
|
+
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* **card:** add new props: markerList, badge; add new value hover-shadow to prop view; ([c73c54b](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/c73c54b158e4b6e38a77e569e874763feaa593b4))
|
18
|
+
* **container:** add border-radius to root element ([419ec1f](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/419ec1fb16fffe138c772438768eab04e43f3589))
|
19
|
+
* **imagebanner:** update badges for ImageBanner ([554e1ad](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/554e1ada1dc9dc7b7e7f9214056cdb83e4af9ba0))
|
20
|
+
* **imagebanner:** update classes props for ImageBanner ([8ec0df4](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/8ec0df4ce74e1e4f00fc5edab52357f9f6aa9ede))
|
21
|
+
* **imagebanner:** update image size for ImageBanner ([cd0242e](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/cd0242e24085bc2e1e8f0339ae8c7f0781c3fb39))
|
22
|
+
* **textwithicon:** add border for icon ([1af5774](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/1af57741ebc67abe503c842ee181f0d36f04db26))
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
6
28
|
# [5.15.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-shared@5.14.0...@megafon/ui-shared@5.15.0) (2024-07-01)
|
7
29
|
|
8
30
|
|
@@ -42,6 +42,7 @@ h5 {
|
|
42
42
|
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
43
43
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
44
44
|
}
|
45
|
+
.mfui-card_link.mfui-card_view_hover-shadow:hover,
|
45
46
|
.mfui-card_link.mfui-card_view_shadow:hover {
|
46
47
|
-webkit-box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
47
48
|
box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
@@ -60,6 +61,18 @@ h5 {
|
|
60
61
|
padding: 32px;
|
61
62
|
}
|
62
63
|
}
|
64
|
+
.mfui-card__header {
|
65
|
+
display: -webkit-box;
|
66
|
+
display: -ms-flexbox;
|
67
|
+
display: flex;
|
68
|
+
gap: 12px;
|
69
|
+
-webkit-box-align: start;
|
70
|
+
-ms-flex-align: start;
|
71
|
+
align-items: start;
|
72
|
+
-webkit-box-pack: justify;
|
73
|
+
-ms-flex-pack: justify;
|
74
|
+
justify-content: space-between;
|
75
|
+
}
|
63
76
|
.mfui-card__icon {
|
64
77
|
width: 40px;
|
65
78
|
height: 40px;
|
@@ -67,23 +80,24 @@ h5 {
|
|
67
80
|
}
|
68
81
|
.mfui-card__img-box {
|
69
82
|
position: relative;
|
70
|
-
margin-bottom: 24px;
|
71
83
|
padding-bottom: 56.25%;
|
72
84
|
border-radius: 12px;
|
73
85
|
overflow: hidden;
|
74
86
|
}
|
87
|
+
.mfui-card__img-box_position_top {
|
88
|
+
margin: -6px -6px 24px -6px;
|
89
|
+
}
|
75
90
|
@media screen and (min-width: 1280px) {
|
76
|
-
.mfui-card__img-
|
77
|
-
margin
|
91
|
+
.mfui-card__img-box_position_top {
|
92
|
+
margin: -12px -12px 32px -12px;
|
78
93
|
}
|
79
94
|
}
|
80
95
|
.mfui-card__img-box_position_bottom {
|
81
|
-
margin
|
82
|
-
margin-bottom: 0;
|
96
|
+
margin: 24px -6px 0 -6px;
|
83
97
|
}
|
84
98
|
@media screen and (min-width: 1280px) {
|
85
99
|
.mfui-card__img-box_position_bottom {
|
86
|
-
margin
|
100
|
+
margin: 32px -12px 0 -12px;
|
87
101
|
}
|
88
102
|
}
|
89
103
|
.mfui-card__img {
|
@@ -101,6 +115,35 @@ h5 {
|
|
101
115
|
-webkit-transform: scale(1.2);
|
102
116
|
transform: scale(1.2);
|
103
117
|
}
|
118
|
+
.mfui-card__marker-list {
|
119
|
+
margin: 16px 0 0 0;
|
120
|
+
padding: 0;
|
121
|
+
list-style-type: none;
|
122
|
+
}
|
123
|
+
.mfui-card__marker-item {
|
124
|
+
position: relative;
|
125
|
+
padding-left: 20px;
|
126
|
+
}
|
127
|
+
.mfui-card__marker-item:not(:last-child) {
|
128
|
+
margin-bottom: 12px;
|
129
|
+
}
|
130
|
+
.mfui-card__marker-item:before {
|
131
|
+
content: '';
|
132
|
+
position: absolute;
|
133
|
+
top: 7px;
|
134
|
+
left: 0;
|
135
|
+
width: 6px;
|
136
|
+
height: 6px;
|
137
|
+
border-radius: 50%;
|
138
|
+
background-color: var(--stcBlack20);
|
139
|
+
opacity: 0.8;
|
140
|
+
}
|
141
|
+
.mfui-card__marker-note {
|
142
|
+
display: block;
|
143
|
+
margin: 4px 0 0 0;
|
144
|
+
padding: 0;
|
145
|
+
font-weight: 500;
|
146
|
+
}
|
104
147
|
.mfui-card__texts {
|
105
148
|
display: -webkit-box;
|
106
149
|
display: -ms-flexbox;
|
@@ -117,6 +160,9 @@ h5 {
|
|
117
160
|
margin: 0;
|
118
161
|
padding-left: 24px;
|
119
162
|
}
|
163
|
+
.mfui-card__texts ul {
|
164
|
+
list-style-type: disc;
|
165
|
+
}
|
120
166
|
.mfui-card__texts-title {
|
121
167
|
font-weight: 500;
|
122
168
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import React, { Ref } from 'react';
|
1
|
+
import React, { ReactElement, Ref } from 'react';
|
2
2
|
import './Card.less';
|
3
|
-
import { ButtonType, FeaturesList, IconsList, Image, Link, Price, TextsList, Title } from './types';
|
3
|
+
import { ButtonType, FeaturesList, IconsList, Image, Link, MarkerList, Price, TextsList, Title } from './types';
|
4
4
|
export interface ICard {
|
5
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
6
6
|
dataAttrs?: {
|
@@ -22,7 +22,7 @@ export interface ICard {
|
|
22
22
|
rootRef?: Ref<HTMLDivElement | HTMLAnchorElement>;
|
23
23
|
isFullHeight?: boolean;
|
24
24
|
/** Вид */
|
25
|
-
view?: 'shadow' | 'background';
|
25
|
+
view?: 'shadow' | 'hover-shadow' | 'background';
|
26
26
|
/** Ссылка для карточки */
|
27
27
|
link?: Link;
|
28
28
|
/** Изображение */
|
@@ -31,6 +31,8 @@ export interface ICard {
|
|
31
31
|
icon?: React.ReactNode;
|
32
32
|
/** Заголовок */
|
33
33
|
title: Title;
|
34
|
+
/** Маркированный список */
|
35
|
+
markerList?: MarkerList;
|
34
36
|
/** Список текстов */
|
35
37
|
textsList?: TextsList;
|
36
38
|
/** Список характеристик */
|
@@ -43,6 +45,8 @@ export interface ICard {
|
|
43
45
|
button?: ButtonType;
|
44
46
|
/** Дополнительная кнопка */
|
45
47
|
extraButton?: ButtonType;
|
48
|
+
/** Бейдж */
|
49
|
+
badge?: ReactElement;
|
46
50
|
/** Обработчик клика по карточке */
|
47
51
|
onClick?: () => void;
|
48
52
|
}
|
@@ -47,14 +47,16 @@ var Card = function Card(_ref5) {
|
|
47
47
|
image = _ref5.image,
|
48
48
|
icon = _ref5.icon,
|
49
49
|
title = _ref5.title,
|
50
|
+
markerList = _ref5.markerList,
|
50
51
|
textsList = _ref5.textsList,
|
51
52
|
featuresList = _ref5.featuresList,
|
52
53
|
iconsList = _ref5.iconsList,
|
53
54
|
price = _ref5.price,
|
54
55
|
button = _ref5.button,
|
55
56
|
extraButton = _ref5.extraButton,
|
57
|
+
badge = _ref5.badge,
|
56
58
|
onClick = _ref5.onClick;
|
57
|
-
var isOnlyTitle = !image && !icon && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
59
|
+
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
58
60
|
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
59
61
|
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
60
62
|
var ElementType = isLink ? 'a' : 'div';
|
@@ -64,14 +66,18 @@ var Card = function Card(_ref5) {
|
|
64
66
|
return null;
|
65
67
|
}
|
66
68
|
|
69
|
+
var _image$position = image.position,
|
70
|
+
position = _image$position === void 0 ? 'top' : _image$position,
|
71
|
+
src = image.src,
|
72
|
+
alt = image.alt;
|
67
73
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
68
74
|
className: cn('img-box', {
|
69
|
-
position:
|
75
|
+
position: position
|
70
76
|
})
|
71
77
|
}), /*#__PURE__*/React.createElement("img", {
|
72
78
|
className: cn('img'),
|
73
|
-
src:
|
74
|
-
alt:
|
79
|
+
src: src,
|
80
|
+
alt: alt
|
75
81
|
}));
|
76
82
|
};
|
77
83
|
|
@@ -86,6 +92,19 @@ var Card = function Card(_ref5) {
|
|
86
92
|
};
|
87
93
|
|
88
94
|
var renderContent = function renderContent() {
|
95
|
+
if (markerList) {
|
96
|
+
return /*#__PURE__*/React.createElement("ul", {
|
97
|
+
className: cn('marker-list')
|
98
|
+
}, markerList.map(function (item, i) {
|
99
|
+
return /*#__PURE__*/React.createElement("li", {
|
100
|
+
className: cn('marker-item'),
|
101
|
+
key: i
|
102
|
+
}, convert(item.title, {}), !!item.note && /*#__PURE__*/React.createElement("span", {
|
103
|
+
className: cn('marker-note')
|
104
|
+
}, convert(item.note, {})));
|
105
|
+
}));
|
106
|
+
}
|
107
|
+
|
89
108
|
if (textsList) {
|
90
109
|
return /*#__PURE__*/React.createElement("div", {
|
91
110
|
className: cn('texts')
|
@@ -210,11 +229,13 @@ var Card = function Card(_ref5) {
|
|
210
229
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
211
230
|
onClick: isLink ? onClick : undefined,
|
212
231
|
ref: rootRef
|
213
|
-
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement(
|
232
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement("div", {
|
233
|
+
className: cn('header')
|
234
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
214
235
|
className: cn('title'),
|
215
236
|
as: "h3",
|
216
237
|
align: title.align
|
217
|
-
}, title.text), renderContent(), renderFooter());
|
238
|
+
}, title.text), badge), renderContent(), renderFooter());
|
218
239
|
};
|
219
240
|
|
220
241
|
Card.propTypes = {
|
@@ -20,6 +20,12 @@ export declare type Title = {
|
|
20
20
|
/** Выравнивание */
|
21
21
|
align?: 'left' | 'center';
|
22
22
|
};
|
23
|
+
export declare type MarkerList = {
|
24
|
+
/** Заголовок */
|
25
|
+
title: string;
|
26
|
+
/** Примечание */
|
27
|
+
note?: string;
|
28
|
+
}[];
|
23
29
|
export declare type TextsList = {
|
24
30
|
/** Заголовок */
|
25
31
|
title?: string;
|
@@ -8,9 +8,10 @@ h5 {
|
|
8
8
|
.mfui-container {
|
9
9
|
position: relative;
|
10
10
|
padding-bottom: 96px;
|
11
|
+
border-radius: 24px;
|
11
12
|
}
|
12
13
|
.mfui-container_bg-color_default {
|
13
|
-
background-color: var(--
|
14
|
+
background-color: var(--background);
|
14
15
|
}
|
15
16
|
.mfui-container_bg-color_light-gray {
|
16
17
|
background-color: var(--spbSky0);
|
@@ -105,6 +106,14 @@ h5 {
|
|
105
106
|
padding-top: 48px;
|
106
107
|
}
|
107
108
|
}
|
109
|
+
.mfui-container_bg-color_light-gray:has( + .mfui-container_bg-color_light-gray) {
|
110
|
+
border-bottom-right-radius: 0;
|
111
|
+
border-bottom-left-radius: 0;
|
112
|
+
}
|
113
|
+
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_light-gray {
|
114
|
+
border-top-left-radius: 0;
|
115
|
+
border-top-right-radius: 0;
|
116
|
+
}
|
108
117
|
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_gray {
|
109
118
|
padding-top: 96px;
|
110
119
|
}
|
@@ -118,6 +127,14 @@ h5 {
|
|
118
127
|
padding-top: 48px;
|
119
128
|
}
|
120
129
|
}
|
130
|
+
.mfui-container_bg-color_light-gray:has( + .mfui-container_bg-color_gray) {
|
131
|
+
border-bottom-right-radius: 0;
|
132
|
+
border-bottom-left-radius: 0;
|
133
|
+
}
|
134
|
+
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_gray {
|
135
|
+
border-top-left-radius: 0;
|
136
|
+
border-top-right-radius: 0;
|
137
|
+
}
|
121
138
|
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_green {
|
122
139
|
padding-top: 96px;
|
123
140
|
}
|
@@ -131,6 +148,14 @@ h5 {
|
|
131
148
|
padding-top: 48px;
|
132
149
|
}
|
133
150
|
}
|
151
|
+
.mfui-container_bg-color_light-gray:has( + .mfui-container_bg-color_green) {
|
152
|
+
border-bottom-right-radius: 0;
|
153
|
+
border-bottom-left-radius: 0;
|
154
|
+
}
|
155
|
+
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_green {
|
156
|
+
border-top-left-radius: 0;
|
157
|
+
border-top-right-radius: 0;
|
158
|
+
}
|
134
159
|
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_purple {
|
135
160
|
padding-top: 96px;
|
136
161
|
}
|
@@ -144,6 +169,14 @@ h5 {
|
|
144
169
|
padding-top: 48px;
|
145
170
|
}
|
146
171
|
}
|
172
|
+
.mfui-container_bg-color_light-gray:has( + .mfui-container_bg-color_purple) {
|
173
|
+
border-bottom-right-radius: 0;
|
174
|
+
border-bottom-left-radius: 0;
|
175
|
+
}
|
176
|
+
.mfui-container_bg-color_light-gray + .mfui-container_bg-color_purple {
|
177
|
+
border-top-left-radius: 0;
|
178
|
+
border-top-right-radius: 0;
|
179
|
+
}
|
147
180
|
.mfui-container_bg-color_gray + .mfui-container_bg-color_default {
|
148
181
|
padding-top: 96px;
|
149
182
|
}
|
@@ -170,6 +203,22 @@ h5 {
|
|
170
203
|
padding-top: 48px;
|
171
204
|
}
|
172
205
|
}
|
206
|
+
.mfui-container_bg-color_gray:has( + .mfui-container_bg-color_light-gray) {
|
207
|
+
border-bottom-right-radius: 0;
|
208
|
+
border-bottom-left-radius: 0;
|
209
|
+
}
|
210
|
+
.mfui-container_bg-color_gray + .mfui-container_bg-color_light-gray {
|
211
|
+
border-top-left-radius: 0;
|
212
|
+
border-top-right-radius: 0;
|
213
|
+
}
|
214
|
+
.mfui-container_bg-color_gray:has( + .mfui-container_bg-color_gray) {
|
215
|
+
border-bottom-right-radius: 0;
|
216
|
+
border-bottom-left-radius: 0;
|
217
|
+
}
|
218
|
+
.mfui-container_bg-color_gray + .mfui-container_bg-color_gray {
|
219
|
+
border-top-left-radius: 0;
|
220
|
+
border-top-right-radius: 0;
|
221
|
+
}
|
173
222
|
.mfui-container_bg-color_gray + .mfui-container_bg-color_green {
|
174
223
|
padding-top: 96px;
|
175
224
|
}
|
@@ -183,6 +232,14 @@ h5 {
|
|
183
232
|
padding-top: 48px;
|
184
233
|
}
|
185
234
|
}
|
235
|
+
.mfui-container_bg-color_gray:has( + .mfui-container_bg-color_green) {
|
236
|
+
border-bottom-right-radius: 0;
|
237
|
+
border-bottom-left-radius: 0;
|
238
|
+
}
|
239
|
+
.mfui-container_bg-color_gray + .mfui-container_bg-color_green {
|
240
|
+
border-top-left-radius: 0;
|
241
|
+
border-top-right-radius: 0;
|
242
|
+
}
|
186
243
|
.mfui-container_bg-color_gray + .mfui-container_bg-color_purple {
|
187
244
|
padding-top: 96px;
|
188
245
|
}
|
@@ -196,6 +253,14 @@ h5 {
|
|
196
253
|
padding-top: 48px;
|
197
254
|
}
|
198
255
|
}
|
256
|
+
.mfui-container_bg-color_gray:has( + .mfui-container_bg-color_purple) {
|
257
|
+
border-bottom-right-radius: 0;
|
258
|
+
border-bottom-left-radius: 0;
|
259
|
+
}
|
260
|
+
.mfui-container_bg-color_gray + .mfui-container_bg-color_purple {
|
261
|
+
border-top-left-radius: 0;
|
262
|
+
border-top-right-radius: 0;
|
263
|
+
}
|
199
264
|
.mfui-container_bg-color_green + .mfui-container_bg-color_default {
|
200
265
|
padding-top: 96px;
|
201
266
|
}
|
@@ -222,6 +287,14 @@ h5 {
|
|
222
287
|
padding-top: 48px;
|
223
288
|
}
|
224
289
|
}
|
290
|
+
.mfui-container_bg-color_green:has( + .mfui-container_bg-color_light-gray) {
|
291
|
+
border-bottom-right-radius: 0;
|
292
|
+
border-bottom-left-radius: 0;
|
293
|
+
}
|
294
|
+
.mfui-container_bg-color_green + .mfui-container_bg-color_light-gray {
|
295
|
+
border-top-left-radius: 0;
|
296
|
+
border-top-right-radius: 0;
|
297
|
+
}
|
225
298
|
.mfui-container_bg-color_green + .mfui-container_bg-color_gray {
|
226
299
|
padding-top: 96px;
|
227
300
|
}
|
@@ -235,6 +308,22 @@ h5 {
|
|
235
308
|
padding-top: 48px;
|
236
309
|
}
|
237
310
|
}
|
311
|
+
.mfui-container_bg-color_green:has( + .mfui-container_bg-color_gray) {
|
312
|
+
border-bottom-right-radius: 0;
|
313
|
+
border-bottom-left-radius: 0;
|
314
|
+
}
|
315
|
+
.mfui-container_bg-color_green + .mfui-container_bg-color_gray {
|
316
|
+
border-top-left-radius: 0;
|
317
|
+
border-top-right-radius: 0;
|
318
|
+
}
|
319
|
+
.mfui-container_bg-color_green:has( + .mfui-container_bg-color_green) {
|
320
|
+
border-bottom-right-radius: 0;
|
321
|
+
border-bottom-left-radius: 0;
|
322
|
+
}
|
323
|
+
.mfui-container_bg-color_green + .mfui-container_bg-color_green {
|
324
|
+
border-top-left-radius: 0;
|
325
|
+
border-top-right-radius: 0;
|
326
|
+
}
|
238
327
|
.mfui-container_bg-color_green + .mfui-container_bg-color_purple {
|
239
328
|
padding-top: 96px;
|
240
329
|
}
|
@@ -248,6 +337,14 @@ h5 {
|
|
248
337
|
padding-top: 48px;
|
249
338
|
}
|
250
339
|
}
|
340
|
+
.mfui-container_bg-color_green:has( + .mfui-container_bg-color_purple) {
|
341
|
+
border-bottom-right-radius: 0;
|
342
|
+
border-bottom-left-radius: 0;
|
343
|
+
}
|
344
|
+
.mfui-container_bg-color_green + .mfui-container_bg-color_purple {
|
345
|
+
border-top-left-radius: 0;
|
346
|
+
border-top-right-radius: 0;
|
347
|
+
}
|
251
348
|
.mfui-container_bg-color_purple + .mfui-container_bg-color_default {
|
252
349
|
padding-top: 96px;
|
253
350
|
}
|
@@ -274,6 +371,14 @@ h5 {
|
|
274
371
|
padding-top: 48px;
|
275
372
|
}
|
276
373
|
}
|
374
|
+
.mfui-container_bg-color_purple:has( + .mfui-container_bg-color_light-gray) {
|
375
|
+
border-bottom-right-radius: 0;
|
376
|
+
border-bottom-left-radius: 0;
|
377
|
+
}
|
378
|
+
.mfui-container_bg-color_purple + .mfui-container_bg-color_light-gray {
|
379
|
+
border-top-left-radius: 0;
|
380
|
+
border-top-right-radius: 0;
|
381
|
+
}
|
277
382
|
.mfui-container_bg-color_purple + .mfui-container_bg-color_gray {
|
278
383
|
padding-top: 96px;
|
279
384
|
}
|
@@ -287,6 +392,14 @@ h5 {
|
|
287
392
|
padding-top: 48px;
|
288
393
|
}
|
289
394
|
}
|
395
|
+
.mfui-container_bg-color_purple:has( + .mfui-container_bg-color_gray) {
|
396
|
+
border-bottom-right-radius: 0;
|
397
|
+
border-bottom-left-radius: 0;
|
398
|
+
}
|
399
|
+
.mfui-container_bg-color_purple + .mfui-container_bg-color_gray {
|
400
|
+
border-top-left-radius: 0;
|
401
|
+
border-top-right-radius: 0;
|
402
|
+
}
|
290
403
|
.mfui-container_bg-color_purple + .mfui-container_bg-color_green {
|
291
404
|
padding-top: 96px;
|
292
405
|
}
|
@@ -300,6 +413,22 @@ h5 {
|
|
300
413
|
padding-top: 48px;
|
301
414
|
}
|
302
415
|
}
|
416
|
+
.mfui-container_bg-color_purple:has( + .mfui-container_bg-color_green) {
|
417
|
+
border-bottom-right-radius: 0;
|
418
|
+
border-bottom-left-radius: 0;
|
419
|
+
}
|
420
|
+
.mfui-container_bg-color_purple + .mfui-container_bg-color_green {
|
421
|
+
border-top-left-radius: 0;
|
422
|
+
border-top-right-radius: 0;
|
423
|
+
}
|
424
|
+
.mfui-container_bg-color_purple:has( + .mfui-container_bg-color_purple) {
|
425
|
+
border-bottom-right-radius: 0;
|
426
|
+
border-bottom-left-radius: 0;
|
427
|
+
}
|
428
|
+
.mfui-container_bg-color_purple + .mfui-container_bg-color_purple {
|
429
|
+
border-top-left-radius: 0;
|
430
|
+
border-top-right-radius: 0;
|
431
|
+
}
|
303
432
|
.mfui-container .mfui-title-description-box + .mfui-benefits-icons {
|
304
433
|
margin-top: 56px;
|
305
434
|
}
|
@@ -29,7 +29,6 @@ h5 {
|
|
29
29
|
-ms-flex-align: center;
|
30
30
|
align-items: center;
|
31
31
|
height: 420px;
|
32
|
-
padding: 0 80px;
|
33
32
|
}
|
34
33
|
}
|
35
34
|
.mfui-image-banner__picture {
|
@@ -41,18 +40,14 @@ h5 {
|
|
41
40
|
-webkit-box-pack: center;
|
42
41
|
-ms-flex-pack: center;
|
43
42
|
justify-content: center;
|
43
|
+
max-width: 672px;
|
44
44
|
}
|
45
45
|
@media screen and (min-width: 1024px) {
|
46
46
|
.mfui-image-banner__picture {
|
47
|
-
width:
|
47
|
+
width: 50%;
|
48
48
|
height: 100%;
|
49
49
|
}
|
50
50
|
}
|
51
|
-
@media screen and (min-width: 1280px) {
|
52
|
-
.mfui-image-banner__picture {
|
53
|
-
width: 408px;
|
54
|
-
}
|
55
|
-
}
|
56
51
|
.mfui-image-banner__picture_v-align_top {
|
57
52
|
-webkit-box-align: start;
|
58
53
|
-ms-flex-align: start;
|
@@ -68,18 +63,18 @@ h5 {
|
|
68
63
|
-ms-flex-align: end;
|
69
64
|
align-items: flex-end;
|
70
65
|
}
|
71
|
-
.mfui-image-
|
66
|
+
.mfui-image-banner__image {
|
72
67
|
display: block;
|
73
68
|
max-width: 100%;
|
74
69
|
max-height: 150px;
|
75
70
|
}
|
76
71
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
77
|
-
.mfui-image-
|
72
|
+
.mfui-image-banner__image {
|
78
73
|
max-height: 230px;
|
79
74
|
}
|
80
75
|
}
|
81
76
|
@media screen and (min-width: 1024px) {
|
82
|
-
.mfui-image-
|
77
|
+
.mfui-image-banner__image {
|
83
78
|
max-height: 100%;
|
84
79
|
-o-object-fit: contain;
|
85
80
|
object-fit: contain;
|
@@ -87,6 +82,9 @@ h5 {
|
|
87
82
|
}
|
88
83
|
.mfui-image-banner__content {
|
89
84
|
z-index: 1;
|
85
|
+
-webkit-box-flex: 1;
|
86
|
+
-ms-flex-positive: 1;
|
87
|
+
flex-grow: 1;
|
90
88
|
}
|
91
89
|
@media screen and (max-width: 1023px) {
|
92
90
|
.mfui-image-banner__content {
|
@@ -98,6 +96,12 @@ h5 {
|
|
98
96
|
text-align: center;
|
99
97
|
}
|
100
98
|
}
|
99
|
+
@media screen and (min-width: 1024px) {
|
100
|
+
.mfui-image-banner__content {
|
101
|
+
width: 50%;
|
102
|
+
padding: 0 80px;
|
103
|
+
}
|
104
|
+
}
|
101
105
|
.mfui-image-banner__description {
|
102
106
|
margin-top: 16px;
|
103
107
|
white-space: pre-wrap;
|
@@ -190,7 +194,7 @@ h5 {
|
|
190
194
|
}
|
191
195
|
@media screen and (min-width: 1024px) {
|
192
196
|
.mfui-image-banner_auto-height .mfui-image-banner__content {
|
193
|
-
padding: 48px
|
197
|
+
padding: 48px 80px;
|
194
198
|
}
|
195
199
|
}
|
196
200
|
@media screen and (min-width: 1024px) {
|
@@ -199,7 +203,12 @@ h5 {
|
|
199
203
|
}
|
200
204
|
}
|
201
205
|
@media screen and (min-width: 1024px) {
|
202
|
-
.mfui-image-
|
206
|
+
.mfui-image-banner_has-image .mfui-image-banner__content {
|
207
|
+
padding-right: 0;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
@media screen and (min-width: 1024px) {
|
211
|
+
.mfui-image-banner_full-width .mfui-image-banner__image {
|
203
212
|
position: absolute;
|
204
213
|
right: 0;
|
205
214
|
bottom: 0;
|
@@ -208,7 +217,7 @@ h5 {
|
|
208
217
|
}
|
209
218
|
}
|
210
219
|
@media screen and (min-width: 1024px) {
|
211
|
-
.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-
|
220
|
+
.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image {
|
212
221
|
width: 100%;
|
213
222
|
height: 100%;
|
214
223
|
-o-object-fit: cover;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import React, { Ref } from 'react';
|
2
|
-
import { PriceBadge } from '@megafon/ui-core';
|
3
2
|
import './ImageBanner.less';
|
4
3
|
export declare const BackgroundColor: {
|
5
4
|
readonly TRANSPARENT: "transparent";
|
@@ -26,11 +25,6 @@ export declare const ImageVerticalAlign: {
|
|
26
25
|
readonly BOTTOM: "bottom";
|
27
26
|
};
|
28
27
|
export declare type ImageVerticalAlignType = typeof ImageVerticalAlign[keyof typeof ImageVerticalAlign];
|
29
|
-
declare type PriceBadgeTypes = React.ComponentProps<typeof PriceBadge>;
|
30
|
-
export declare type PriceBadgePropsType = Pick<PriceBadgeTypes, 'iconType'> & {
|
31
|
-
/** Текст бейджа */
|
32
|
-
text: string;
|
33
|
-
};
|
34
28
|
export interface IImageBannerProps {
|
35
29
|
/** Дополнительные data атрибуты к внутренним элементам */
|
36
30
|
dataAttrs?: {
|
@@ -43,12 +37,12 @@ export interface IImageBannerProps {
|
|
43
37
|
classes?: {
|
44
38
|
root?: string;
|
45
39
|
image?: string;
|
40
|
+
imageSource?: string;
|
46
41
|
title?: string;
|
47
42
|
description?: string;
|
48
43
|
cost?: string;
|
49
44
|
badgesContainer?: string;
|
50
45
|
badges?: string;
|
51
|
-
badge?: string;
|
52
46
|
adBlock?: string;
|
53
47
|
};
|
54
48
|
/** Ссылка на корневой элемент */
|
@@ -83,8 +77,8 @@ export interface IImageBannerProps {
|
|
83
77
|
autoHeight?: boolean;
|
84
78
|
/** Изображение растягивается на всю ширину или вписывается в фиксированный фрейм (по умолчанию фрейм) */
|
85
79
|
isImageFullWidth?: boolean;
|
86
|
-
/**
|
87
|
-
badges?:
|
80
|
+
/** Бейджи */
|
81
|
+
badges?: JSX.Element[] | JSX.Element;
|
88
82
|
/** Элемент блока с рекламой */
|
89
83
|
adBlock?: JSX.Element | null;
|
90
84
|
}
|