@megafon/ui-shared 4.21.1 → 5.0.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 +32 -0
- package/dist/es/components/Card/Card.css +226 -83
- package/dist/es/components/Card/Card.d.ts +30 -62
- package/dist/es/components/Card/Card.js +237 -157
- package/dist/es/components/Card/types.d.ts +71 -0
- package/dist/es/components/Card/types.js +0 -0
- package/dist/es/components/CardsBox/CardsBox.d.ts +4 -7
- package/dist/es/components/CardsBox/CardsBox.js +21 -67
- package/dist/es/components/CardsBox/helpers.d.ts +10 -0
- package/dist/es/components/CardsBox/helpers.js +25 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +6 -1
- package/dist/es/components/CarouselBox/CarouselBox.js +27 -3
- package/dist/es/components/Instructions/img/android.png +0 -0
- package/dist/es/components/Instructions/img/blackIphone.png +0 -0
- package/dist/es/components/Instructions/img/laptop.png +0 -0
- package/dist/es/components/Instructions/img/newIphone.png +0 -0
- package/dist/es/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/es/components/Property/Property.js +2 -2
- package/dist/es/components/Property/types.d.ts +1 -1
- package/dist/es/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +1 -0
- package/dist/lib/components/Card/Card.css +226 -83
- package/dist/lib/components/Card/Card.d.ts +30 -62
- package/dist/lib/components/Card/Card.js +233 -160
- package/dist/lib/components/Card/types.d.ts +71 -0
- package/dist/lib/components/Card/types.js +1 -0
- package/dist/lib/components/CardsBox/CardsBox.d.ts +4 -7
- package/dist/lib/components/CardsBox/CardsBox.js +19 -67
- package/dist/lib/components/CardsBox/helpers.d.ts +10 -0
- package/dist/lib/components/CardsBox/helpers.js +35 -0
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +6 -1
- package/dist/lib/components/CarouselBox/CarouselBox.js +29 -2
- package/dist/lib/components/Instructions/img/android.png +0 -0
- package/dist/lib/components/Instructions/img/blackIphone.png +0 -0
- package/dist/lib/components/Instructions/img/laptop.png +0 -0
- package/dist/lib/components/Instructions/img/newIphone.png +0 -0
- package/dist/lib/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/lib/components/Property/Property.js +2 -2
- package/dist/lib/components/Property/types.d.ts +1 -1
- package/dist/lib/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +8 -0
- package/package.json +3 -3
@@ -0,0 +1,25 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
|
3
|
+
var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
|
4
|
+
var offset = renderTwoColumnsInRow ? '2' : undefined;
|
5
|
+
var offsetForEvenColumn = index % 2 ? undefined : offset;
|
6
|
+
var columnSize = {
|
7
|
+
all: '4',
|
8
|
+
tablet: '6',
|
9
|
+
mobile: '12'
|
10
|
+
};
|
11
|
+
|
12
|
+
switch (count) {
|
13
|
+
case 2:
|
14
|
+
case 4:
|
15
|
+
return _extends(_extends({}, columnSize), {
|
16
|
+
leftOffsetWide: offsetForEvenColumn,
|
17
|
+
leftOffsetDesktop: offsetForEvenColumn
|
18
|
+
});
|
19
|
+
|
20
|
+
default:
|
21
|
+
return _extends({}, columnSize);
|
22
|
+
}
|
23
|
+
};
|
24
|
+
|
25
|
+
export default getColumnConfig;
|
@@ -1,5 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Carousel } from '@megafon/ui-core';
|
3
3
|
declare type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
|
4
|
-
declare
|
4
|
+
declare type DesktopSlidesPerView = 3 | 4;
|
5
|
+
interface ICarouselBox extends CarouselPropsTypes {
|
6
|
+
/** Количество видимых слайдов на разрешении 1024 и выше */
|
7
|
+
desktopSlidesPerView?: DesktopSlidesPerView;
|
8
|
+
}
|
9
|
+
declare const CarouselBox: React.FC<ICarouselBox>;
|
5
10
|
export default CarouselBox;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
1
3
|
import "core-js/modules/es.array.index-of.js";
|
2
4
|
import "core-js/modules/es.symbol.js";
|
3
5
|
|
@@ -16,16 +18,38 @@ var __rest = this && this.__rest || function (s, e) {
|
|
16
18
|
|
17
19
|
import * as React from 'react';
|
18
20
|
import { Carousel } from '@megafon/ui-core';
|
19
|
-
import { cnCreate } from '@megafon/ui-helpers';
|
21
|
+
import { cnCreate, breakpoints } from '@megafon/ui-helpers';
|
22
|
+
|
23
|
+
var getDefaultSlideSettings = function getDefaultSlideSettings(desktopSlidesPerView) {
|
24
|
+
var _ref;
|
25
|
+
|
26
|
+
return _ref = {}, _defineProperty(_ref, breakpoints.MOBILE_SMALL_START, {
|
27
|
+
slidesPerView: 1,
|
28
|
+
spaceBetween: 16
|
29
|
+
}), _defineProperty(_ref, breakpoints.MOBILE_BIG_START, {
|
30
|
+
slidesPerView: 2,
|
31
|
+
spaceBetween: 20
|
32
|
+
}), _defineProperty(_ref, breakpoints.DESKTOP_SMALL_START, {
|
33
|
+
slidesPerView: desktopSlidesPerView,
|
34
|
+
spaceBetween: 20
|
35
|
+
}), _ref;
|
36
|
+
};
|
37
|
+
|
20
38
|
var cn = cnCreate('mfui-carousel-box');
|
21
39
|
|
22
40
|
var CarouselBox = function CarouselBox(_a) {
|
23
41
|
var children = _a.children,
|
24
|
-
|
42
|
+
slidesSettings = _a.slidesSettings,
|
43
|
+
_a$desktopSlidesPerVi = _a.desktopSlidesPerView,
|
44
|
+
desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
|
45
|
+
props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
|
25
46
|
|
47
|
+
var settings = slidesSettings || getDefaultSlideSettings(desktopSlidesPerView);
|
26
48
|
return /*#__PURE__*/React.createElement("div", {
|
27
49
|
className: cn()
|
28
|
-
}, /*#__PURE__*/React.createElement(Carousel, props,
|
50
|
+
}, /*#__PURE__*/React.createElement(Carousel, _extends({}, props, {
|
51
|
+
slidesSettings: settings
|
52
|
+
}), children));
|
29
53
|
};
|
30
54
|
|
31
55
|
export default CarouselBox;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -128,7 +128,7 @@ var Property = function Property(_ref) {
|
|
128
128
|
_ref3$titleSize = _ref3.titleSize,
|
129
129
|
titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
|
130
130
|
_ref3$valueFrameColor = _ref3.valueFrameColor,
|
131
|
-
valueFrameColor = _ref3$valueFrameColor === void 0 ? '
|
131
|
+
valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
|
132
132
|
var isFirstItem = i === 0;
|
133
133
|
var isRenderBadge = isFirstItem && !!badge;
|
134
134
|
return /*#__PURE__*/React.createElement(Fragment, {
|
@@ -160,7 +160,7 @@ Property.propTypes = {
|
|
160
160
|
value: PropTypes.string,
|
161
161
|
titleSize: PropTypes.oneOf(['default', 'big']),
|
162
162
|
valueUnit: PropTypes.string,
|
163
|
-
valueFrameColor: PropTypes.oneOf(['default', 'gray'])
|
163
|
+
valueFrameColor: PropTypes.oneOf(['none', 'default', 'gray'])
|
164
164
|
}).isRequired).isRequired,
|
165
165
|
className: PropTypes.string,
|
166
166
|
badge: PropTypes.string,
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/dist/es/index.d.ts
CHANGED
@@ -18,6 +18,7 @@ export { default as Container } from './components/Container/Container';
|
|
18
18
|
export { default as DownloadLink } from './components/DownloadLinks/DownloadLink';
|
19
19
|
export { default as DownloadLinks } from './components/DownloadLinks/DownloadLinks';
|
20
20
|
export { default as FaqWrapper } from './components/FaqWrapper/FaqWrapper';
|
21
|
+
export { default as helpers } from './components/CardsBox/helpers';
|
21
22
|
export { default as Instructions } from './components/Instructions/Instructions';
|
22
23
|
export { default as NotificationBox } from './components/NotificationBox/NotificationBox';
|
23
24
|
export { default as PageTitle } from './components/PageTitle/PageTitle';
|
package/dist/es/index.js
CHANGED
@@ -18,6 +18,7 @@ export { default as Container } from "./components/Container/Container";
|
|
18
18
|
export { default as DownloadLink } from "./components/DownloadLinks/DownloadLink";
|
19
19
|
export { default as DownloadLinks } from "./components/DownloadLinks/DownloadLinks";
|
20
20
|
export { default as FaqWrapper } from "./components/FaqWrapper/FaqWrapper";
|
21
|
+
export { default as helpers } from "./components/CardsBox/helpers";
|
21
22
|
export { default as Instructions } from "./components/Instructions/Instructions";
|
22
23
|
export { default as NotificationBox } from "./components/NotificationBox/NotificationBox";
|
23
24
|
export { default as PageTitle } from "./components/PageTitle/PageTitle";
|
@@ -5,17 +5,99 @@ h4,
|
|
5
5
|
h5 {
|
6
6
|
margin: 0;
|
7
7
|
}
|
8
|
-
.mfui-card
|
8
|
+
.mfui-card {
|
9
|
+
font-family: inherit;
|
10
|
+
font-size: 15px;
|
11
|
+
line-height: 24px;
|
12
|
+
font-weight: 400;
|
9
13
|
display: -webkit-box;
|
10
14
|
display: -ms-flexbox;
|
11
15
|
display: flex;
|
16
|
+
-webkit-box-orient: vertical;
|
17
|
+
-webkit-box-direction: normal;
|
18
|
+
-ms-flex-direction: column;
|
19
|
+
flex-direction: column;
|
20
|
+
padding: 16px 16px 24px;
|
12
21
|
border-radius: 12px;
|
13
|
-
|
22
|
+
color: var(--content);
|
23
|
+
text-decoration: none;
|
14
24
|
background-color: var(--base);
|
15
|
-
-webkit-box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
16
|
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
17
25
|
}
|
18
|
-
|
26
|
+
@media screen and (min-width: 1280px) {
|
27
|
+
.mfui-card {
|
28
|
+
padding: 24px 24px 32px;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
.mfui-card_full-height {
|
32
|
+
height: 100%;
|
33
|
+
}
|
34
|
+
.mfui-card_link {
|
35
|
+
cursor: pointer;
|
36
|
+
}
|
37
|
+
.mfui-card_view_shadow {
|
38
|
+
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
39
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
40
|
+
}
|
41
|
+
.mfui-card_link.mfui-card_view_shadow:hover {
|
42
|
+
-webkit-box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
43
|
+
box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.1);
|
44
|
+
}
|
45
|
+
.mfui-card_view_background {
|
46
|
+
background-color: var(--spbSky0);
|
47
|
+
}
|
48
|
+
.mfui-card_link.mfui-card_view_background:hover {
|
49
|
+
background-color: var(--spbSky1);
|
50
|
+
}
|
51
|
+
.mfui-card_only-title {
|
52
|
+
padding: 24px;
|
53
|
+
}
|
54
|
+
@media screen and (min-width: 1280px) {
|
55
|
+
.mfui-card_only-title {
|
56
|
+
padding: 32px;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
.mfui-card__icon {
|
60
|
+
width: 40px;
|
61
|
+
height: 40px;
|
62
|
+
margin-bottom: 32px;
|
63
|
+
}
|
64
|
+
.mfui-card__img-box {
|
65
|
+
position: relative;
|
66
|
+
margin-bottom: 24px;
|
67
|
+
padding-bottom: 56.25%;
|
68
|
+
border-radius: 12px;
|
69
|
+
overflow: hidden;
|
70
|
+
}
|
71
|
+
@media screen and (min-width: 1280px) {
|
72
|
+
.mfui-card__img-box {
|
73
|
+
margin-bottom: 32px;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
.mfui-card__img-box_position_bottom {
|
77
|
+
margin-top: 24px;
|
78
|
+
margin-bottom: 0;
|
79
|
+
}
|
80
|
+
@media screen and (min-width: 1280px) {
|
81
|
+
.mfui-card__img-box_position_bottom {
|
82
|
+
margin-top: 32px;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
.mfui-card__img {
|
86
|
+
position: absolute;
|
87
|
+
width: 100%;
|
88
|
+
height: 100%;
|
89
|
+
-o-object-fit: cover;
|
90
|
+
object-fit: cover;
|
91
|
+
-webkit-transition: -webkit-transform 0.3s;
|
92
|
+
transition: -webkit-transform 0.3s;
|
93
|
+
transition: transform 0.3s;
|
94
|
+
transition: transform 0.3s, -webkit-transform 0.3s;
|
95
|
+
}
|
96
|
+
.mfui-card_link:hover .mfui-card__img {
|
97
|
+
-webkit-transform: scale(1.2);
|
98
|
+
transform: scale(1.2);
|
99
|
+
}
|
100
|
+
.mfui-card__texts {
|
19
101
|
display: -webkit-box;
|
20
102
|
display: -ms-flexbox;
|
21
103
|
display: flex;
|
@@ -23,108 +105,169 @@ h5 {
|
|
23
105
|
-webkit-box-direction: normal;
|
24
106
|
-ms-flex-direction: column;
|
25
107
|
flex-direction: column;
|
26
|
-
|
27
|
-
|
28
|
-
flex-grow: 0;
|
29
|
-
-ms-flex-negative: 1;
|
30
|
-
flex-shrink: 1;
|
31
|
-
-webkit-box-sizing: border-box;
|
32
|
-
box-sizing: border-box;
|
33
|
-
width: 100%;
|
34
|
-
padding: 32px 20px;
|
108
|
+
gap: 12px;
|
109
|
+
margin-top: 16px;
|
35
110
|
}
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
111
|
+
.mfui-card__texts ol,
|
112
|
+
.mfui-card__texts ul {
|
113
|
+
margin: 0;
|
114
|
+
padding-left: 24px;
|
40
115
|
}
|
41
|
-
.mfui-
|
42
|
-
font-
|
43
|
-
line-height: 24px;
|
44
|
-
font-weight: 400;
|
45
|
-
margin-top: 12px;
|
46
|
-
color: var(--content);
|
116
|
+
.mfui-card__texts-title {
|
117
|
+
font-weight: 500;
|
47
118
|
}
|
48
|
-
.mfui-
|
119
|
+
.mfui-card__features {
|
49
120
|
display: -webkit-box;
|
50
121
|
display: -ms-flexbox;
|
51
122
|
display: flex;
|
52
|
-
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
-
|
58
|
-
-ms-flex-pack: space-evenly;
|
59
|
-
justify-content: space-evenly;
|
60
|
-
margin-top: auto;
|
61
|
-
padding-top: 12px;
|
123
|
+
-webkit-box-orient: vertical;
|
124
|
+
-webkit-box-direction: normal;
|
125
|
+
-ms-flex-direction: column;
|
126
|
+
flex-direction: column;
|
127
|
+
gap: 12px;
|
128
|
+
margin-top: 16px;
|
62
129
|
}
|
63
|
-
.mfui-
|
64
|
-
-webkit-box
|
65
|
-
|
66
|
-
|
130
|
+
.mfui-card__features-item {
|
131
|
+
display: -webkit-box;
|
132
|
+
display: -ms-flexbox;
|
133
|
+
display: flex;
|
134
|
+
gap: 4px;
|
135
|
+
-webkit-box-align: baseline;
|
136
|
+
-ms-flex-align: baseline;
|
137
|
+
align-items: baseline;
|
138
|
+
-webkit-box-pack: justify;
|
139
|
+
-ms-flex-pack: justify;
|
140
|
+
justify-content: space-between;
|
67
141
|
}
|
68
|
-
.mfui-
|
69
|
-
|
142
|
+
.mfui-card__features-item-separator {
|
143
|
+
-webkit-box-flex: 1;
|
144
|
+
-ms-flex-positive: 1;
|
145
|
+
flex-grow: 1;
|
146
|
+
height: 2px;
|
147
|
+
background-image: radial-gradient(circle, var(--spbSky3) 1px, transparent 1px);
|
148
|
+
background-size: 6px 2px;
|
70
149
|
}
|
71
|
-
.mfui-
|
72
|
-
|
73
|
-
.mfui-card-old__fake-link {
|
74
|
-
margin: 12px 10px;
|
150
|
+
.mfui-card__icons {
|
151
|
+
margin-top: 16px;
|
75
152
|
}
|
76
|
-
.mfui-
|
77
|
-
margin-bottom:
|
153
|
+
.mfui-card__icons-desc {
|
154
|
+
margin-bottom: 12px;
|
78
155
|
}
|
79
|
-
.mfui-
|
80
|
-
|
81
|
-
|
156
|
+
.mfui-card__icons-list {
|
157
|
+
display: -webkit-box;
|
158
|
+
display: -ms-flexbox;
|
159
|
+
display: flex;
|
160
|
+
-webkit-box-orient: vertical;
|
161
|
+
-webkit-box-direction: normal;
|
162
|
+
-ms-flex-direction: column;
|
163
|
+
flex-direction: column;
|
164
|
+
gap: 12px;
|
165
|
+
}
|
166
|
+
.mfui-card__icons-item {
|
167
|
+
display: -webkit-box;
|
168
|
+
display: -ms-flexbox;
|
169
|
+
display: flex;
|
170
|
+
}
|
171
|
+
.mfui-card__icons-item-icon {
|
172
|
+
-ms-flex-negative: 0;
|
173
|
+
flex-shrink: 0;
|
174
|
+
width: 32px;
|
175
|
+
height: 32px;
|
176
|
+
margin-right: 8px;
|
82
177
|
}
|
83
|
-
.mfui-
|
84
|
-
|
178
|
+
.mfui-card__icons-item-text {
|
179
|
+
margin-top: 4px;
|
85
180
|
}
|
86
|
-
.mfui-
|
181
|
+
.mfui-card__price {
|
87
182
|
display: -webkit-box;
|
88
183
|
display: -ms-flexbox;
|
89
184
|
display: flex;
|
90
|
-
-
|
91
|
-
|
92
|
-
|
185
|
+
-ms-flex-wrap: wrap;
|
186
|
+
flex-wrap: wrap;
|
187
|
+
gap: 8px;
|
188
|
+
-webkit-box-align: baseline;
|
189
|
+
-ms-flex-align: baseline;
|
190
|
+
align-items: baseline;
|
93
191
|
-webkit-box-pack: center;
|
94
192
|
-ms-flex-pack: center;
|
95
193
|
justify-content: center;
|
96
|
-
margin-top:
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
margin-top: -24px;
|
104
|
-
margin-right: -16px;
|
105
|
-
margin-bottom: 24px;
|
106
|
-
margin-left: -16px;
|
194
|
+
margin-top: 24px;
|
195
|
+
padding-top: 24px;
|
196
|
+
border-top: 1px solid var(--spbSky1);
|
197
|
+
}
|
198
|
+
@media screen and (min-width: 1280px) {
|
199
|
+
.mfui-card__price {
|
200
|
+
margin-top: 32px;
|
107
201
|
}
|
108
202
|
}
|
109
|
-
.mfui-
|
110
|
-
|
111
|
-
|
203
|
+
.mfui-card__img-box + .mfui-card__price {
|
204
|
+
padding-top: 0;
|
205
|
+
border: none;
|
112
206
|
}
|
113
|
-
.mfui-
|
114
|
-
|
115
|
-
|
207
|
+
.mfui-card__price-old-value {
|
208
|
+
position: relative;
|
209
|
+
color: var(--spbSky3);
|
116
210
|
}
|
117
|
-
.mfui-
|
118
|
-
|
211
|
+
.mfui-card__price-old-value:before {
|
212
|
+
content: '';
|
213
|
+
position: absolute;
|
214
|
+
top: 50%;
|
215
|
+
right: -1px;
|
216
|
+
left: -1px;
|
217
|
+
height: 1px;
|
218
|
+
background-color: var(--warmRedC);
|
119
219
|
}
|
120
|
-
.mfui-
|
121
|
-
-
|
122
|
-
|
220
|
+
.mfui-card__price-value {
|
221
|
+
font-weight: 600;
|
222
|
+
font-size: 22px;
|
223
|
+
line-height: 28px;
|
224
|
+
letter-spacing: 0.5px;
|
123
225
|
}
|
124
|
-
|
125
|
-
|
226
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
227
|
+
.mfui-card__price-value {
|
228
|
+
font-size: 26px;
|
229
|
+
line-height: 32px;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
@media screen and (min-width: 1024px) {
|
233
|
+
.mfui-card__price-value {
|
234
|
+
font-size: 28px;
|
235
|
+
line-height: 36px;
|
236
|
+
}
|
237
|
+
}
|
238
|
+
@media screen and (min-width: 1280px) {
|
239
|
+
.mfui-card__price-value {
|
240
|
+
font-size: 32px;
|
241
|
+
line-height: 40px;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
.mfui-card__buttons {
|
245
|
+
display: -webkit-box;
|
246
|
+
display: -ms-flexbox;
|
247
|
+
display: flex;
|
248
|
+
-ms-flex-wrap: wrap;
|
249
|
+
flex-wrap: wrap;
|
250
|
+
gap: 16px;
|
251
|
+
margin-top: 32px;
|
252
|
+
}
|
253
|
+
.mfui-card__price + .mfui-card__buttons {
|
254
|
+
margin-top: 24px;
|
255
|
+
}
|
256
|
+
.mfui-card__buttons_centered {
|
257
|
+
-webkit-box-pack: center;
|
258
|
+
-ms-flex-pack: center;
|
259
|
+
justify-content: center;
|
260
|
+
}
|
261
|
+
.mfui-card__button {
|
262
|
+
-ms-flex-preferred-size: 190px;
|
263
|
+
flex-basis: 190px;
|
264
|
+
-webkit-box-flex: 1;
|
265
|
+
-ms-flex-positive: 1;
|
266
|
+
flex-grow: 1;
|
267
|
+
-ms-flex-negative: 1;
|
268
|
+
flex-shrink: 1;
|
269
|
+
max-width: 320px;
|
126
270
|
}
|
127
|
-
.mfui-
|
128
|
-
|
129
|
-
text-align: center;
|
271
|
+
.mfui-card__footer {
|
272
|
+
margin-top: auto;
|
130
273
|
}
|
@@ -1,74 +1,42 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import './Card.less';
|
3
|
-
|
4
|
-
readonly SELF: "_self";
|
5
|
-
readonly BLANK: "_blank";
|
6
|
-
};
|
7
|
-
declare type TargetType = typeof Target[keyof typeof Target];
|
8
|
-
interface IButton {
|
9
|
-
title: string;
|
10
|
-
href?: string;
|
11
|
-
target?: TargetType;
|
12
|
-
download?: boolean;
|
13
|
-
rel?: string;
|
14
|
-
onClick?: () => void;
|
15
|
-
}
|
16
|
-
interface ILink {
|
17
|
-
title: string;
|
18
|
-
href?: string;
|
19
|
-
target?: TargetType;
|
20
|
-
download?: boolean;
|
21
|
-
rel?: string;
|
22
|
-
}
|
23
|
-
export declare const ObjectFit: {
|
24
|
-
readonly FILL: "fill";
|
25
|
-
readonly CONTAIN: "contain";
|
26
|
-
};
|
27
|
-
declare type ObjectFitType = typeof ObjectFit[keyof typeof ObjectFit];
|
3
|
+
import { ButtonType, FeaturesList, IconsList, Image, Link, Price, TextsList, Title } from './types';
|
28
4
|
export interface ICard {
|
29
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
30
6
|
dataAttrs?: {
|
31
7
|
root?: Record<string, string>;
|
32
|
-
|
8
|
+
icon?: Record<string, string>;
|
9
|
+
imgBox?: Record<string, string>;
|
33
10
|
button?: Record<string, string>;
|
11
|
+
extraButton?: Record<string, string>;
|
34
12
|
};
|
35
|
-
/** Дополнительный класс
|
13
|
+
/** Дополнительный класс для компонента */
|
36
14
|
className?: string;
|
37
|
-
/** Дополнительные классы для корневого и внутренних элементов */
|
38
|
-
classes?: {
|
39
|
-
root?: string;
|
40
|
-
button?: string;
|
41
|
-
link?: string;
|
42
|
-
inner?: string;
|
43
|
-
};
|
44
|
-
/** Ссылка на корневой элемент */
|
45
|
-
rootRef?: Ref<HTMLDivElement>;
|
46
|
-
/** Изображение в карточке */
|
47
|
-
imageSrc?: string;
|
48
|
-
/** Значение тега alt для изображения */
|
49
|
-
imageAlt?: string;
|
50
|
-
/** Иконка в карточке */
|
51
|
-
svgSrc?: React.ReactNode;
|
52
|
-
/** Заголовок карточки */
|
53
|
-
title: string | React.ReactNode[] | React.ReactNode;
|
54
|
-
/** Текст карточки */
|
55
|
-
text?: string | React.ReactNode[] | React.ReactNode;
|
56
|
-
/** Данные для кнопки */
|
57
|
-
button?: IButton;
|
58
|
-
/** Данные для ссылки */
|
59
|
-
link?: ILink;
|
60
|
-
/** Выравнивание текста по центру */
|
61
|
-
isCenteredText?: boolean;
|
62
|
-
/** Расположение кнопки/ссылки по левой стороне */
|
63
|
-
isLeftHAlign?: boolean;
|
64
|
-
/** Высота корневого элемента 100% */
|
65
15
|
isFullHeight?: boolean;
|
66
|
-
/**
|
67
|
-
|
68
|
-
/**
|
69
|
-
|
70
|
-
/**
|
71
|
-
|
16
|
+
/** Вид */
|
17
|
+
view?: 'shadow' | 'background';
|
18
|
+
/** Ссылка для карточки */
|
19
|
+
link?: Link;
|
20
|
+
/** Изображение */
|
21
|
+
image?: Image;
|
22
|
+
/** Иконка */
|
23
|
+
icon?: React.ReactNode;
|
24
|
+
/** Заголовок */
|
25
|
+
title: Title;
|
26
|
+
/** Список текстов */
|
27
|
+
textsList?: TextsList;
|
28
|
+
/** Список характеристик */
|
29
|
+
featuresList?: FeaturesList;
|
30
|
+
/** Список иконок */
|
31
|
+
iconsList?: IconsList;
|
32
|
+
/** Цена */
|
33
|
+
price?: Price;
|
34
|
+
/** Кнопка */
|
35
|
+
button?: ButtonType;
|
36
|
+
/** Дополнительная кнопка */
|
37
|
+
extraButton?: ButtonType;
|
38
|
+
/** Обработчик клика по карточке */
|
39
|
+
onClick?: () => void;
|
72
40
|
}
|
73
41
|
declare const Card: React.FC<ICard>;
|
74
42
|
export default Card;
|