@megafon/ui-shared 4.15.1 → 4.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 +11 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +42 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +3 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +5 -2
- package/dist/es/components/StoreBanner/doc/img/iphone12Screen.png +0 -0
- package/dist/es/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +42 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +3 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +5 -2
- package/dist/lib/components/StoreBanner/doc/img/iphone12Screen.png +0 -0
- package/dist/lib/components/StoreBanner/img/iphone12.png +0 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
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
|
+
# [4.16.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.15.1...@megafon/ui-shared@4.16.0) (2023-04-04)
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* **storebanner:** add new mask for iphone 12 and content left on mobile ([8702938](https://github.com/MegafonWebLab/megafon-ui/commit/8702938d1bf9c0b1bbdc80f045e2bc329da1c99d))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [4.15.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.15.0...@megafon/ui-shared@4.15.1) (2023-03-27)
|
7
18
|
|
8
19
|
|
@@ -92,6 +92,48 @@ h5 {
|
|
92
92
|
top: 63px;
|
93
93
|
}
|
94
94
|
}
|
95
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__device-mask {
|
96
|
+
position: relative;
|
97
|
+
z-index: 2;
|
98
|
+
background-image: url('./img/iphone12.png');
|
99
|
+
}
|
100
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
101
|
+
top: 16px;
|
102
|
+
z-index: 1;
|
103
|
+
width: 87%;
|
104
|
+
}
|
105
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
106
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
107
|
+
top: 18px;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
111
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
112
|
+
top: 13px;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
@media screen and (max-width: 767px) {
|
116
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
117
|
+
top: 35px;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
@media screen and (max-width: 767px) {
|
121
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__content {
|
122
|
+
text-align: left;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
@media screen and (max-width: 767px) {
|
126
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__stores {
|
127
|
+
-webkit-box-pack: start;
|
128
|
+
-ms-flex-pack: start;
|
129
|
+
justify-content: flex-start;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
@media screen and (max-width: 767px) {
|
133
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__button {
|
134
|
+
margin: 0;
|
135
|
+
}
|
136
|
+
}
|
95
137
|
@media screen and (min-width: 1024px) {
|
96
138
|
.mfui-store-banner__container {
|
97
139
|
padding-top: 30px;
|
@@ -13,6 +13,7 @@ export declare const DeviceMask: {
|
|
13
13
|
readonly NEW_IPHONE: "new-iphone";
|
14
14
|
readonly BLACK_IPHONE: "black-iphone";
|
15
15
|
readonly WHITE_IPHONE: "white-iphone";
|
16
|
+
readonly IPHONE_12: "iphone-12";
|
16
17
|
};
|
17
18
|
declare type DeviceMaskType = typeof DeviceMask[keyof typeof DeviceMask];
|
18
19
|
declare type LinkHrefType = StoreButtonPropsType['href'];
|
@@ -48,6 +49,8 @@ export interface IStoreBannerProps {
|
|
48
49
|
deviceMask: DeviceMaskType;
|
49
50
|
/** Изображение на дисплее телефона */
|
50
51
|
imageSrc: string;
|
52
|
+
/** Выравнивание контента слева на мобильном разрешении */
|
53
|
+
isContentLeftMobile?: boolean;
|
51
54
|
/** Дополнительный класс корневого элемента */
|
52
55
|
className?: string;
|
53
56
|
/** Дополнительные классы для корневого и внутренних элементов */
|
@@ -16,7 +16,8 @@ export var DeviceMask = {
|
|
16
16
|
ANDROID: 'android',
|
17
17
|
NEW_IPHONE: 'new-iphone',
|
18
18
|
BLACK_IPHONE: 'black-iphone',
|
19
|
-
WHITE_IPHONE: 'white-iphone'
|
19
|
+
WHITE_IPHONE: 'white-iphone',
|
20
|
+
IPHONE_12: 'iphone-12'
|
20
21
|
};
|
21
22
|
var cn = cnCreate('mfui-store-banner');
|
22
23
|
|
@@ -42,6 +43,7 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
42
43
|
_ref$theme = _ref.theme,
|
43
44
|
theme = _ref$theme === void 0 ? 'default' : _ref$theme,
|
44
45
|
deviceMask = _ref.deviceMask,
|
46
|
+
isContentLeftMobile = _ref.isContentLeftMobile,
|
45
47
|
rootRef = _ref.rootRef,
|
46
48
|
dataAttrs = _ref.dataAttrs,
|
47
49
|
onClickApple = _ref.onClickApple,
|
@@ -50,7 +52,8 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
50
52
|
return /*#__PURE__*/React.createElement("div", _extends({
|
51
53
|
className: cn({
|
52
54
|
theme: theme,
|
53
|
-
mask: deviceMask
|
55
|
+
mask: deviceMask,
|
56
|
+
'content-left-mobile': isContentLeftMobile
|
54
57
|
}, [className, rootClassName]),
|
55
58
|
ref: rootRef
|
56
59
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
|
Binary file
|
Binary file
|
@@ -92,6 +92,48 @@ h5 {
|
|
92
92
|
top: 63px;
|
93
93
|
}
|
94
94
|
}
|
95
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__device-mask {
|
96
|
+
position: relative;
|
97
|
+
z-index: 2;
|
98
|
+
background-image: url('./img/iphone12.png');
|
99
|
+
}
|
100
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
101
|
+
top: 16px;
|
102
|
+
z-index: 1;
|
103
|
+
width: 87%;
|
104
|
+
}
|
105
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
106
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
107
|
+
top: 18px;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
111
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
112
|
+
top: 13px;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
@media screen and (max-width: 767px) {
|
116
|
+
.mfui-store-banner_mask_iphone-12 .mfui-store-banner__screen {
|
117
|
+
top: 35px;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
@media screen and (max-width: 767px) {
|
121
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__content {
|
122
|
+
text-align: left;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
@media screen and (max-width: 767px) {
|
126
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__stores {
|
127
|
+
-webkit-box-pack: start;
|
128
|
+
-ms-flex-pack: start;
|
129
|
+
justify-content: flex-start;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
@media screen and (max-width: 767px) {
|
133
|
+
.mfui-store-banner_content-left-mobile .mfui-store-banner__button {
|
134
|
+
margin: 0;
|
135
|
+
}
|
136
|
+
}
|
95
137
|
@media screen and (min-width: 1024px) {
|
96
138
|
.mfui-store-banner__container {
|
97
139
|
padding-top: 30px;
|
@@ -13,6 +13,7 @@ export declare const DeviceMask: {
|
|
13
13
|
readonly NEW_IPHONE: "new-iphone";
|
14
14
|
readonly BLACK_IPHONE: "black-iphone";
|
15
15
|
readonly WHITE_IPHONE: "white-iphone";
|
16
|
+
readonly IPHONE_12: "iphone-12";
|
16
17
|
};
|
17
18
|
declare type DeviceMaskType = typeof DeviceMask[keyof typeof DeviceMask];
|
18
19
|
declare type LinkHrefType = StoreButtonPropsType['href'];
|
@@ -48,6 +49,8 @@ export interface IStoreBannerProps {
|
|
48
49
|
deviceMask: DeviceMaskType;
|
49
50
|
/** Изображение на дисплее телефона */
|
50
51
|
imageSrc: string;
|
52
|
+
/** Выравнивание контента слева на мобильном разрешении */
|
53
|
+
isContentLeftMobile?: boolean;
|
51
54
|
/** Дополнительный класс корневого элемента */
|
52
55
|
className?: string;
|
53
56
|
/** Дополнительные классы для корневого и внутренних элементов */
|
@@ -38,7 +38,8 @@ var DeviceMask = {
|
|
38
38
|
ANDROID: 'android',
|
39
39
|
NEW_IPHONE: 'new-iphone',
|
40
40
|
BLACK_IPHONE: 'black-iphone',
|
41
|
-
WHITE_IPHONE: 'white-iphone'
|
41
|
+
WHITE_IPHONE: 'white-iphone',
|
42
|
+
IPHONE_12: 'iphone-12'
|
42
43
|
};
|
43
44
|
exports.DeviceMask = DeviceMask;
|
44
45
|
var cn = (0, _uiHelpers.cnCreate)('mfui-store-banner');
|
@@ -65,6 +66,7 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
65
66
|
_ref$theme = _ref.theme,
|
66
67
|
theme = _ref$theme === void 0 ? 'default' : _ref$theme,
|
67
68
|
deviceMask = _ref.deviceMask,
|
69
|
+
isContentLeftMobile = _ref.isContentLeftMobile,
|
68
70
|
rootRef = _ref.rootRef,
|
69
71
|
dataAttrs = _ref.dataAttrs,
|
70
72
|
onClickApple = _ref.onClickApple,
|
@@ -73,7 +75,8 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
73
75
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
74
76
|
className: cn({
|
75
77
|
theme: theme,
|
76
|
-
mask: deviceMask
|
78
|
+
mask: deviceMask,
|
79
|
+
'content-left-mobile': isContentLeftMobile
|
77
80
|
}, [className, rootClassName]),
|
78
81
|
ref: rootRef
|
79
82
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
|
Binary file
|
Binary file
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.16.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -86,7 +86,7 @@
|
|
86
86
|
},
|
87
87
|
"dependencies": {
|
88
88
|
"@babel/runtime": "^7.8.4",
|
89
|
-
"@megafon/ui-core": "^4.15.
|
89
|
+
"@megafon/ui-core": "^4.15.1",
|
90
90
|
"@megafon/ui-helpers": "^2.4.0",
|
91
91
|
"core-js": "^3.6.4",
|
92
92
|
"htmr": "^0.9.2",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"prop-types": "^15.7.2",
|
95
95
|
"swiper": "^6.5.6"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "ff8786e64e8cc9220fc248899a2328d28bd159b0"
|
98
98
|
}
|