@megafon/ui-shared 4.16.0 → 4.18.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/es/components/Instructions/Instructions.css +7 -0
  3. package/dist/es/components/Instructions/Instructions.d.ts +8 -1
  4. package/dist/es/components/Instructions/Instructions.js +8 -1
  5. package/dist/es/components/StoreBanner/StoreBanner.d.ts +20 -2
  6. package/dist/es/components/StoreBanner/StoreBanner.js +58 -3
  7. package/dist/es/components/StoreButton/StoreButton.css +9 -0
  8. package/dist/es/components/StoreButton/StoreButton.d.ts +5 -2
  9. package/dist/es/components/StoreButton/StoreButton.js +4 -1
  10. package/dist/es/components/StoreButton/img/app-store.png +0 -0
  11. package/dist/es/components/StoreButton/img/galaxy-store.png +0 -0
  12. package/dist/es/components/StoreButton/img/google-play.png +0 -0
  13. package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
  14. package/dist/es/components/StoreButton/img/mi-store.png +0 -0
  15. package/dist/es/components/StoreButton/img/ru-store.png +0 -0
  16. package/dist/lib/components/Instructions/Instructions.css +7 -0
  17. package/dist/lib/components/Instructions/Instructions.d.ts +8 -1
  18. package/dist/lib/components/Instructions/Instructions.js +10 -2
  19. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +20 -2
  20. package/dist/lib/components/StoreBanner/StoreBanner.js +58 -3
  21. package/dist/lib/components/StoreButton/StoreButton.css +9 -0
  22. package/dist/lib/components/StoreButton/StoreButton.d.ts +5 -2
  23. package/dist/lib/components/StoreButton/StoreButton.js +4 -1
  24. package/dist/lib/components/StoreButton/img/app-store.png +0 -0
  25. package/dist/lib/components/StoreButton/img/galaxy-store.png +0 -0
  26. package/dist/lib/components/StoreButton/img/google-play.png +0 -0
  27. package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
  28. package/dist/lib/components/StoreButton/img/mi-store.png +0 -0
  29. package/dist/lib/components/StoreButton/img/ru-store.png +0 -0
  30. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
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.18.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.17.0...@megafon/ui-shared@4.18.0) (2023-04-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **instructions:** fixed screen scroll for iphone devices ([fae9838](https://github.com/MegafonWebLab/megafon-ui/commit/fae98383271ed7a291665cbb7f9011d17ec0bc93))
12
+ * **storebanner:** fix cn for galaxy store ([02f484b](https://github.com/MegafonWebLab/megafon-ui/commit/02f484bee25550f5091a85b1d08a8252a6f361ee))
13
+ * **storebutton:** compress png buttons ([3e0a2a0](https://github.com/MegafonWebLab/megafon-ui/commit/3e0a2a006dd7d102478164acfcda75816d07b7a9))
14
+
15
+
16
+ ### Features
17
+
18
+ * **instructions:** add prop pictureVerticalAlign ([e380224](https://github.com/MegafonWebLab/megafon-ui/commit/e38022435ce3a5eaf2864bf6ed5a0028e81c9ec1))
19
+ * **storebanner:** add Samsung Galaxy Store button ([ed28f42](https://github.com/MegafonWebLab/megafon-ui/commit/ed28f4270033c91acf23cbe113158f1051c6eff7))
20
+
21
+
22
+
23
+
24
+
25
+ # [4.17.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.16.0...@megafon/ui-shared@4.17.0) (2023-04-11)
26
+
27
+
28
+ ### Features
29
+
30
+ * **storebanner:** add RuStore and MiStore buttons ([9ed93d1](https://github.com/MegafonWebLab/megafon-ui/commit/9ed93d1e972276d18e8f955d42b665cf18aa8af4))
31
+
32
+
33
+
34
+
35
+
6
36
  # [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
37
 
8
38
 
@@ -81,6 +81,12 @@ h5 {
81
81
  margin-right: 40px;
82
82
  }
83
83
  }
84
+ @media screen and (min-width: 1024px) {
85
+ .mfui-instructions__picture_vertical-align_top {
86
+ -ms-flex-item-align: start;
87
+ align-self: flex-start;
88
+ }
89
+ }
84
90
  .mfui-instructions_mask_none .mfui-instructions__slide {
85
91
  display: -webkit-box;
86
92
  display: -ms-flexbox;
@@ -119,6 +125,7 @@ h5 {
119
125
  }
120
126
  .mfui-instructions__device-screen {
121
127
  overflow: hidden;
128
+ pointer-events: none;
122
129
  }
123
130
  @media screen and (max-width: 1023px) {
124
131
  .mfui-instructions_mask_black-iphone .mfui-instructions__img-wrapper,
@@ -5,6 +5,10 @@ export declare const pictureAlignTypes: {
5
5
  readonly LEFT: "left";
6
6
  readonly RIGHT: "right";
7
7
  };
8
+ export declare const pictureVerticalAlignTypes: {
9
+ CENTER: string;
10
+ TOP: string;
11
+ };
8
12
  export declare const pictureMaskTypes: {
9
13
  readonly ANDROID: "android";
10
14
  readonly NEW_IPHONE: "new-iphone";
@@ -15,6 +19,7 @@ export declare const pictureMaskTypes: {
15
19
  readonly NONE: "none";
16
20
  };
17
21
  declare type PictureAlignTypesType = typeof pictureAlignTypes[keyof typeof pictureAlignTypes];
22
+ declare type PictureVerticalAlignTypesType = typeof pictureVerticalAlignTypes[keyof typeof pictureVerticalAlignTypes];
18
23
  declare type PictureMaskTypesType = typeof pictureMaskTypes[keyof typeof pictureMaskTypes];
19
24
  export declare type InstructionItemType = {
20
25
  title: string | React.ReactNode | React.ReactNode[];
@@ -49,8 +54,10 @@ export interface IInstructionsProps {
49
54
  instructionItems: InstructionItemType[];
50
55
  /** Описание после инструкции */
51
56
  additionalText?: string;
52
- /** Расположение изображения */
57
+ /** Расположение изображения по горизонтали */
53
58
  pictureAlign?: PictureAlignTypesType;
59
+ /** Расположение изображения по вертикали */
60
+ pictureVerticalAlign?: PictureVerticalAlignTypesType;
54
61
  /** Маска изображения */
55
62
  pictureMask?: PictureMaskTypesType;
56
63
  /** Ref на swiper */
@@ -15,6 +15,10 @@ export var pictureAlignTypes = {
15
15
  LEFT: 'left',
16
16
  RIGHT: 'right'
17
17
  };
18
+ export var pictureVerticalAlignTypes = {
19
+ CENTER: 'center',
20
+ TOP: 'top'
21
+ };
18
22
  export var pictureMaskTypes = {
19
23
  ANDROID: 'android',
20
24
  NEW_IPHONE: 'new-iphone',
@@ -44,6 +48,8 @@ var Instructions = function Instructions(_ref) {
44
48
  instructionItems = _ref.instructionItems,
45
49
  _ref$pictureAlign = _ref.pictureAlign,
46
50
  pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
51
+ _ref$pictureVerticalA = _ref.pictureVerticalAlign,
52
+ pictureVerticalAlign = _ref$pictureVerticalA === void 0 ? 'center' : _ref$pictureVerticalA,
47
53
  _ref$pictureMask = _ref.pictureMask,
48
54
  pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
49
55
  getSwiper = _ref.getSwiper,
@@ -214,7 +220,8 @@ var Instructions = function Instructions(_ref) {
214
220
  className: cn('wrapper')
215
221
  }, /*#__PURE__*/React.createElement("div", {
216
222
  className: cn('picture', {
217
- align: pictureAlign
223
+ align: pictureAlign,
224
+ 'vertical-align': pictureVerticalAlign
218
225
  })
219
226
  }, renderPicture()), /*#__PURE__*/React.createElement("div", {
220
227
  className: cn('articles', {
@@ -31,10 +31,22 @@ export interface IStoreBannerProps {
31
31
  linkGoogle?: LinkHrefType;
32
32
  /** Обработчик клика по ссылке в Google Play */
33
33
  onClickGoogle?: LinkOnClickType;
34
- /** Ссылка на скачивание приложения в Huawei Store */
34
+ /** Ссылка на скачивание приложения в Samsung Galaxy Store */
35
+ linkGalaxyStore?: LinkHrefType;
36
+ /** Обработчик клика по ссылке в Samsung Galaxy Store */
37
+ onClickGalaxyStore?: LinkOnClickType;
38
+ /** Ссылка на скачивание приложения в Huawei AppGallery */
35
39
  linkHuawei?: LinkHrefType;
36
- /** Обработчик клика по ссылке в Huawei Store */
40
+ /** Обработчик клика по ссылке в Huawei AppGallery */
37
41
  onClickHuawei?: LinkOnClickType;
42
+ /** Ссылка на скачивание приложения в RuStore */
43
+ linkRuStore?: LinkHrefType;
44
+ /** Обработчик клика по ссылке в RuStore */
45
+ onClickRuStore?: LinkOnClickType;
46
+ /** Ссылка на скачивание приложения в Mi App Store */
47
+ linkMiStore?: LinkHrefType;
48
+ /** Обработчик клика по ссылке в Mi App Store */
49
+ onClickMiStore?: LinkOnClickType;
38
50
  /** Текст кнопки */
39
51
  textButton?: string;
40
52
  /** Ссылка для кнопки */
@@ -57,8 +69,11 @@ export interface IStoreBannerProps {
57
69
  classes?: {
58
70
  root?: string;
59
71
  appleLink?: string;
72
+ galaxyStoreLink?: string;
60
73
  googleLink?: string;
61
74
  huaweiLink?: string;
75
+ miStoreLink?: string;
76
+ ruStoreLink?: string;
62
77
  };
63
78
  /** Ссылка на корневой элемент */
64
79
  rootRef?: React.Ref<HTMLDivElement>;
@@ -67,8 +82,11 @@ export interface IStoreBannerProps {
67
82
  root?: Record<string, string>;
68
83
  button?: Record<string, string>;
69
84
  linkApple?: Record<string, string>;
85
+ linkGalaxyStore?: Record<string, string>;
70
86
  linkGoogle?: Record<string, string>;
71
87
  linkHuawei?: Record<string, string>;
88
+ linkMiStore?: Record<string, string>;
89
+ linkRuStore?: Record<string, string>;
72
90
  };
73
91
  }
74
92
  declare const StoreBanner: React.FC<IStoreBannerProps>;
@@ -27,13 +27,19 @@ var StoreBanner = function StoreBanner(_ref) {
27
27
  _ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
28
28
  var rootClassName = _ref$classes.root,
29
29
  appleLinkClassName = _ref$classes.appleLink,
30
+ galaxyStoreLinkClassName = _ref$classes.galaxyStoreLink,
30
31
  googleLinkClassName = _ref$classes.googleLink,
31
32
  huaweiLinkClassName = _ref$classes.huaweiLink,
33
+ miStoreLinkClassName = _ref$classes.miStoreLink,
34
+ ruStoreLinkClassName = _ref$classes.ruStoreLink,
32
35
  title = _ref.title,
33
36
  text = _ref.text,
34
37
  linkApple = _ref.linkApple,
38
+ linkGalaxyStore = _ref.linkGalaxyStore,
35
39
  linkGoogle = _ref.linkGoogle,
36
40
  linkHuawei = _ref.linkHuawei,
41
+ linkMiStore = _ref.linkMiStore,
42
+ linkRuStore = _ref.linkRuStore,
37
43
  linkButton = _ref.linkButton,
38
44
  _ref$textButton = _ref.textButton,
39
45
  textButton = _ref$textButton === void 0 ? 'Установите приложение' : _ref$textButton,
@@ -47,8 +53,11 @@ var StoreBanner = function StoreBanner(_ref) {
47
53
  rootRef = _ref.rootRef,
48
54
  dataAttrs = _ref.dataAttrs,
49
55
  onClickApple = _ref.onClickApple,
56
+ onClickGalaxyStore = _ref.onClickGalaxyStore,
50
57
  onClickGoogle = _ref.onClickGoogle,
51
- onClickHuawei = _ref.onClickHuawei;
58
+ onClickHuawei = _ref.onClickHuawei,
59
+ onClickMiStore = _ref.onClickMiStore,
60
+ onClickRuStore = _ref.onClickRuStore;
52
61
  return /*#__PURE__*/React.createElement("div", _extends({
53
62
  className: cn({
54
63
  theme: theme,
@@ -106,6 +115,28 @@ var StoreBanner = function StoreBanner(_ref) {
106
115
  'google-play': true
107
116
  }, googleLinkClassName),
108
117
  onClick: onClickGoogle
118
+ }), linkRuStore && /*#__PURE__*/React.createElement(StoreButton, {
119
+ dataAttrs: {
120
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkRuStore
121
+ },
122
+ theme: StoreButtonTheme.RU_STORE,
123
+ href: linkRuStore,
124
+ rel: rel,
125
+ className: cn('store-link', {
126
+ 'ru-store': true
127
+ }, ruStoreLinkClassName),
128
+ onClick: onClickRuStore
129
+ }), linkGalaxyStore && /*#__PURE__*/React.createElement(StoreButton, {
130
+ dataAttrs: {
131
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkGalaxyStore
132
+ },
133
+ theme: StoreButtonTheme.GALAXY_STORE,
134
+ href: linkGalaxyStore,
135
+ rel: rel,
136
+ className: cn('store-link', {
137
+ 'galaxy-store': true
138
+ }, galaxyStoreLinkClassName),
139
+ onClick: onClickGalaxyStore
109
140
  }), linkHuawei && /*#__PURE__*/React.createElement(StoreButton, {
110
141
  dataAttrs: {
111
142
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkHuawei
@@ -117,6 +148,17 @@ var StoreBanner = function StoreBanner(_ref) {
117
148
  'huawei-store': true
118
149
  }, huaweiLinkClassName),
119
150
  onClick: onClickHuawei
151
+ }), linkMiStore && /*#__PURE__*/React.createElement(StoreButton, {
152
+ dataAttrs: {
153
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkMiStore
154
+ },
155
+ theme: StoreButtonTheme.MI_STORE,
156
+ href: linkMiStore,
157
+ rel: rel,
158
+ className: cn('store-link', {
159
+ 'mi-store': true
160
+ }, miStoreLinkClassName),
161
+ onClick: onClickMiStore
120
162
  })), linkButton && /*#__PURE__*/React.createElement(Button, {
121
163
  dataAttrs: {
122
164
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
@@ -146,10 +188,16 @@ StoreBanner.propTypes = {
146
188
  text: PropTypes.string.isRequired,
147
189
  linkApple: PropTypes.string,
148
190
  onClickApple: PropTypes.func,
191
+ linkGalaxyStore: PropTypes.string,
192
+ onClickGalaxyStore: PropTypes.func,
149
193
  linkGoogle: PropTypes.string,
150
194
  onClickGoogle: PropTypes.func,
151
195
  linkHuawei: PropTypes.string,
152
196
  onClickHuawei: PropTypes.func,
197
+ linkMiStore: PropTypes.string,
198
+ onClickMiStore: PropTypes.func,
199
+ linkRuStore: PropTypes.string,
200
+ onClickRuStore: PropTypes.func,
153
201
  textButton: PropTypes.string,
154
202
  linkButton: PropTypes.string,
155
203
  rel: PropTypes.string,
@@ -159,7 +207,11 @@ StoreBanner.propTypes = {
159
207
  className: PropTypes.string,
160
208
  classes: PropTypes.shape({
161
209
  appleLink: PropTypes.string,
162
- googleLink: PropTypes.string
210
+ galaxyStoreLink: PropTypes.string,
211
+ googleLink: PropTypes.string,
212
+ huaweiLink: PropTypes.string,
213
+ miStoreLink: PropTypes.string,
214
+ ruStoreLink: PropTypes.string
163
215
  }),
164
216
  rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
165
217
  current: PropTypes.elementType
@@ -169,8 +221,11 @@ StoreBanner.propTypes = {
169
221
  root: PropTypes.objectOf(PropTypes.string.isRequired),
170
222
  button: PropTypes.objectOf(PropTypes.string.isRequired),
171
223
  linkApple: PropTypes.objectOf(PropTypes.string.isRequired),
224
+ linkGalaxyStore: PropTypes.objectOf(PropTypes.string.isRequired),
172
225
  linkGoogle: PropTypes.objectOf(PropTypes.string.isRequired),
173
- linkHuawei: PropTypes.objectOf(PropTypes.string.isRequired)
226
+ linkHuawei: PropTypes.objectOf(PropTypes.string.isRequired),
227
+ linkMiStore: PropTypes.objectOf(PropTypes.string.isRequired),
228
+ linkRuStore: PropTypes.objectOf(PropTypes.string.isRequired)
174
229
  })
175
230
  };
176
231
  export default StoreBanner;
@@ -7,9 +7,18 @@
7
7
  .mfui-store-button_theme_app-store {
8
8
  background-image: url('./img/app-store.png');
9
9
  }
10
+ .mfui-store-button_theme_galaxy-store {
11
+ background-image: url('./img/galaxy-store.png');
12
+ }
10
13
  .mfui-store-button_theme_google-play {
11
14
  background-image: url('./img/google-play.png');
12
15
  }
13
16
  .mfui-store-button_theme_huawei-store {
14
17
  background-image: url('./img/huawei-store.png');
15
18
  }
19
+ .mfui-store-button_theme_mi-store {
20
+ background-image: url('./img/mi-store.png');
21
+ }
22
+ .mfui-store-button_theme_ru-store {
23
+ background-image: url('./img/ru-store.png');
24
+ }
@@ -2,9 +2,12 @@ import * as React from 'react';
2
2
  import { Link } from '@megafon/ui-core';
3
3
  import './StoreButton.less';
4
4
  export declare enum Theme {
5
- GOOGLE_PLAY = "google-play",
6
5
  APP_STORE = "app-store",
7
- HUAWEI_STORE = "huawei-store"
6
+ GALAXY_STORE = "galaxy-store",
7
+ GOOGLE_PLAY = "google-play",
8
+ HUAWEI_STORE = "huawei-store",
9
+ MI_STORE = "mi-store",
10
+ RU_STORE = "ru-store"
8
11
  }
9
12
  declare type LinkPropTypes = React.ComponentProps<typeof Link>;
10
13
  export declare type Props = Required<Pick<LinkPropTypes, 'href'>> & Pick<LinkPropTypes, 'target' | 'rel' | 'onClick' | 'dataAttrs'> & {
@@ -24,9 +24,12 @@ import "./StoreButton.css";
24
24
  export var Theme;
25
25
 
26
26
  (function (Theme) {
27
- Theme["GOOGLE_PLAY"] = "google-play";
28
27
  Theme["APP_STORE"] = "app-store";
28
+ Theme["GALAXY_STORE"] = "galaxy-store";
29
+ Theme["GOOGLE_PLAY"] = "google-play";
29
30
  Theme["HUAWEI_STORE"] = "huawei-store";
31
+ Theme["MI_STORE"] = "mi-store";
32
+ Theme["RU_STORE"] = "ru-store";
30
33
  })(Theme || (Theme = {}));
31
34
 
32
35
  var cn = cnCreate('mfui-store-button');
@@ -81,6 +81,12 @@ h5 {
81
81
  margin-right: 40px;
82
82
  }
83
83
  }
84
+ @media screen and (min-width: 1024px) {
85
+ .mfui-instructions__picture_vertical-align_top {
86
+ -ms-flex-item-align: start;
87
+ align-self: flex-start;
88
+ }
89
+ }
84
90
  .mfui-instructions_mask_none .mfui-instructions__slide {
85
91
  display: -webkit-box;
86
92
  display: -ms-flexbox;
@@ -119,6 +125,7 @@ h5 {
119
125
  }
120
126
  .mfui-instructions__device-screen {
121
127
  overflow: hidden;
128
+ pointer-events: none;
122
129
  }
123
130
  @media screen and (max-width: 1023px) {
124
131
  .mfui-instructions_mask_black-iphone .mfui-instructions__img-wrapper,
@@ -5,6 +5,10 @@ export declare const pictureAlignTypes: {
5
5
  readonly LEFT: "left";
6
6
  readonly RIGHT: "right";
7
7
  };
8
+ export declare const pictureVerticalAlignTypes: {
9
+ CENTER: string;
10
+ TOP: string;
11
+ };
8
12
  export declare const pictureMaskTypes: {
9
13
  readonly ANDROID: "android";
10
14
  readonly NEW_IPHONE: "new-iphone";
@@ -15,6 +19,7 @@ export declare const pictureMaskTypes: {
15
19
  readonly NONE: "none";
16
20
  };
17
21
  declare type PictureAlignTypesType = typeof pictureAlignTypes[keyof typeof pictureAlignTypes];
22
+ declare type PictureVerticalAlignTypesType = typeof pictureVerticalAlignTypes[keyof typeof pictureVerticalAlignTypes];
18
23
  declare type PictureMaskTypesType = typeof pictureMaskTypes[keyof typeof pictureMaskTypes];
19
24
  export declare type InstructionItemType = {
20
25
  title: string | React.ReactNode | React.ReactNode[];
@@ -49,8 +54,10 @@ export interface IInstructionsProps {
49
54
  instructionItems: InstructionItemType[];
50
55
  /** Описание после инструкции */
51
56
  additionalText?: string;
52
- /** Расположение изображения */
57
+ /** Расположение изображения по горизонтали */
53
58
  pictureAlign?: PictureAlignTypesType;
59
+ /** Расположение изображения по вертикали */
60
+ pictureVerticalAlign?: PictureVerticalAlignTypesType;
54
61
  /** Маска изображения */
55
62
  pictureMask?: PictureMaskTypesType;
56
63
  /** Ref на swiper */
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.pictureMaskTypes = exports.pictureAlignTypes = void 0;
6
+ exports["default"] = exports.pictureMaskTypes = exports.pictureVerticalAlignTypes = exports.pictureAlignTypes = void 0;
7
7
 
8
8
  require("core-js/modules/es.array.map");
9
9
 
@@ -31,6 +31,11 @@ var pictureAlignTypes = {
31
31
  RIGHT: 'right'
32
32
  };
33
33
  exports.pictureAlignTypes = pictureAlignTypes;
34
+ var pictureVerticalAlignTypes = {
35
+ CENTER: 'center',
36
+ TOP: 'top'
37
+ };
38
+ exports.pictureVerticalAlignTypes = pictureVerticalAlignTypes;
34
39
  var pictureMaskTypes = {
35
40
  ANDROID: 'android',
36
41
  NEW_IPHONE: 'new-iphone',
@@ -61,6 +66,8 @@ var Instructions = function Instructions(_ref) {
61
66
  instructionItems = _ref.instructionItems,
62
67
  _ref$pictureAlign = _ref.pictureAlign,
63
68
  pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
69
+ _ref$pictureVerticalA = _ref.pictureVerticalAlign,
70
+ pictureVerticalAlign = _ref$pictureVerticalA === void 0 ? 'center' : _ref$pictureVerticalA,
64
71
  _ref$pictureMask = _ref.pictureMask,
65
72
  pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
66
73
  getSwiper = _ref.getSwiper,
@@ -242,7 +249,8 @@ var Instructions = function Instructions(_ref) {
242
249
  className: cn('wrapper')
243
250
  }, /*#__PURE__*/_react["default"].createElement("div", {
244
251
  className: cn('picture', {
245
- align: pictureAlign
252
+ align: pictureAlign,
253
+ 'vertical-align': pictureVerticalAlign
246
254
  })
247
255
  }, renderPicture()), /*#__PURE__*/_react["default"].createElement("div", {
248
256
  className: cn('articles', {
@@ -31,10 +31,22 @@ export interface IStoreBannerProps {
31
31
  linkGoogle?: LinkHrefType;
32
32
  /** Обработчик клика по ссылке в Google Play */
33
33
  onClickGoogle?: LinkOnClickType;
34
- /** Ссылка на скачивание приложения в Huawei Store */
34
+ /** Ссылка на скачивание приложения в Samsung Galaxy Store */
35
+ linkGalaxyStore?: LinkHrefType;
36
+ /** Обработчик клика по ссылке в Samsung Galaxy Store */
37
+ onClickGalaxyStore?: LinkOnClickType;
38
+ /** Ссылка на скачивание приложения в Huawei AppGallery */
35
39
  linkHuawei?: LinkHrefType;
36
- /** Обработчик клика по ссылке в Huawei Store */
40
+ /** Обработчик клика по ссылке в Huawei AppGallery */
37
41
  onClickHuawei?: LinkOnClickType;
42
+ /** Ссылка на скачивание приложения в RuStore */
43
+ linkRuStore?: LinkHrefType;
44
+ /** Обработчик клика по ссылке в RuStore */
45
+ onClickRuStore?: LinkOnClickType;
46
+ /** Ссылка на скачивание приложения в Mi App Store */
47
+ linkMiStore?: LinkHrefType;
48
+ /** Обработчик клика по ссылке в Mi App Store */
49
+ onClickMiStore?: LinkOnClickType;
38
50
  /** Текст кнопки */
39
51
  textButton?: string;
40
52
  /** Ссылка для кнопки */
@@ -57,8 +69,11 @@ export interface IStoreBannerProps {
57
69
  classes?: {
58
70
  root?: string;
59
71
  appleLink?: string;
72
+ galaxyStoreLink?: string;
60
73
  googleLink?: string;
61
74
  huaweiLink?: string;
75
+ miStoreLink?: string;
76
+ ruStoreLink?: string;
62
77
  };
63
78
  /** Ссылка на корневой элемент */
64
79
  rootRef?: React.Ref<HTMLDivElement>;
@@ -67,8 +82,11 @@ export interface IStoreBannerProps {
67
82
  root?: Record<string, string>;
68
83
  button?: Record<string, string>;
69
84
  linkApple?: Record<string, string>;
85
+ linkGalaxyStore?: Record<string, string>;
70
86
  linkGoogle?: Record<string, string>;
71
87
  linkHuawei?: Record<string, string>;
88
+ linkMiStore?: Record<string, string>;
89
+ linkRuStore?: Record<string, string>;
72
90
  };
73
91
  }
74
92
  declare const StoreBanner: React.FC<IStoreBannerProps>;
@@ -50,13 +50,19 @@ var StoreBanner = function StoreBanner(_ref) {
50
50
  _ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
51
51
  var rootClassName = _ref$classes.root,
52
52
  appleLinkClassName = _ref$classes.appleLink,
53
+ galaxyStoreLinkClassName = _ref$classes.galaxyStoreLink,
53
54
  googleLinkClassName = _ref$classes.googleLink,
54
55
  huaweiLinkClassName = _ref$classes.huaweiLink,
56
+ miStoreLinkClassName = _ref$classes.miStoreLink,
57
+ ruStoreLinkClassName = _ref$classes.ruStoreLink,
55
58
  title = _ref.title,
56
59
  text = _ref.text,
57
60
  linkApple = _ref.linkApple,
61
+ linkGalaxyStore = _ref.linkGalaxyStore,
58
62
  linkGoogle = _ref.linkGoogle,
59
63
  linkHuawei = _ref.linkHuawei,
64
+ linkMiStore = _ref.linkMiStore,
65
+ linkRuStore = _ref.linkRuStore,
60
66
  linkButton = _ref.linkButton,
61
67
  _ref$textButton = _ref.textButton,
62
68
  textButton = _ref$textButton === void 0 ? 'Установите приложение' : _ref$textButton,
@@ -70,8 +76,11 @@ var StoreBanner = function StoreBanner(_ref) {
70
76
  rootRef = _ref.rootRef,
71
77
  dataAttrs = _ref.dataAttrs,
72
78
  onClickApple = _ref.onClickApple,
79
+ onClickGalaxyStore = _ref.onClickGalaxyStore,
73
80
  onClickGoogle = _ref.onClickGoogle,
74
- onClickHuawei = _ref.onClickHuawei;
81
+ onClickHuawei = _ref.onClickHuawei,
82
+ onClickMiStore = _ref.onClickMiStore,
83
+ onClickRuStore = _ref.onClickRuStore;
75
84
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
76
85
  className: cn({
77
86
  theme: theme,
@@ -129,6 +138,28 @@ var StoreBanner = function StoreBanner(_ref) {
129
138
  'google-play': true
130
139
  }, googleLinkClassName),
131
140
  onClick: onClickGoogle
141
+ }), linkRuStore && /*#__PURE__*/React.createElement(_StoreButton["default"], {
142
+ dataAttrs: {
143
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkRuStore
144
+ },
145
+ theme: _StoreButton.Theme.RU_STORE,
146
+ href: linkRuStore,
147
+ rel: rel,
148
+ className: cn('store-link', {
149
+ 'ru-store': true
150
+ }, ruStoreLinkClassName),
151
+ onClick: onClickRuStore
152
+ }), linkGalaxyStore && /*#__PURE__*/React.createElement(_StoreButton["default"], {
153
+ dataAttrs: {
154
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkGalaxyStore
155
+ },
156
+ theme: _StoreButton.Theme.GALAXY_STORE,
157
+ href: linkGalaxyStore,
158
+ rel: rel,
159
+ className: cn('store-link', {
160
+ 'galaxy-store': true
161
+ }, galaxyStoreLinkClassName),
162
+ onClick: onClickGalaxyStore
132
163
  }), linkHuawei && /*#__PURE__*/React.createElement(_StoreButton["default"], {
133
164
  dataAttrs: {
134
165
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkHuawei
@@ -140,6 +171,17 @@ var StoreBanner = function StoreBanner(_ref) {
140
171
  'huawei-store': true
141
172
  }, huaweiLinkClassName),
142
173
  onClick: onClickHuawei
174
+ }), linkMiStore && /*#__PURE__*/React.createElement(_StoreButton["default"], {
175
+ dataAttrs: {
176
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.linkMiStore
177
+ },
178
+ theme: _StoreButton.Theme.MI_STORE,
179
+ href: linkMiStore,
180
+ rel: rel,
181
+ className: cn('store-link', {
182
+ 'mi-store': true
183
+ }, miStoreLinkClassName),
184
+ onClick: onClickMiStore
143
185
  })), linkButton && /*#__PURE__*/React.createElement(_uiCore.Button, {
144
186
  dataAttrs: {
145
187
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
@@ -169,10 +211,16 @@ StoreBanner.propTypes = {
169
211
  text: _propTypes["default"].string.isRequired,
170
212
  linkApple: _propTypes["default"].string,
171
213
  onClickApple: _propTypes["default"].func,
214
+ linkGalaxyStore: _propTypes["default"].string,
215
+ onClickGalaxyStore: _propTypes["default"].func,
172
216
  linkGoogle: _propTypes["default"].string,
173
217
  onClickGoogle: _propTypes["default"].func,
174
218
  linkHuawei: _propTypes["default"].string,
175
219
  onClickHuawei: _propTypes["default"].func,
220
+ linkMiStore: _propTypes["default"].string,
221
+ onClickMiStore: _propTypes["default"].func,
222
+ linkRuStore: _propTypes["default"].string,
223
+ onClickRuStore: _propTypes["default"].func,
176
224
  textButton: _propTypes["default"].string,
177
225
  linkButton: _propTypes["default"].string,
178
226
  rel: _propTypes["default"].string,
@@ -182,7 +230,11 @@ StoreBanner.propTypes = {
182
230
  className: _propTypes["default"].string,
183
231
  classes: _propTypes["default"].shape({
184
232
  appleLink: _propTypes["default"].string,
185
- googleLink: _propTypes["default"].string
233
+ galaxyStoreLink: _propTypes["default"].string,
234
+ googleLink: _propTypes["default"].string,
235
+ huaweiLink: _propTypes["default"].string,
236
+ miStoreLink: _propTypes["default"].string,
237
+ ruStoreLink: _propTypes["default"].string
186
238
  }),
187
239
  rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
188
240
  current: _propTypes["default"].elementType
@@ -192,8 +244,11 @@ StoreBanner.propTypes = {
192
244
  root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
193
245
  button: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
194
246
  linkApple: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
247
+ linkGalaxyStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
195
248
  linkGoogle: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
196
- linkHuawei: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
249
+ linkHuawei: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
250
+ linkMiStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
251
+ linkRuStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
197
252
  })
198
253
  };
199
254
  var _default = StoreBanner;
@@ -7,9 +7,18 @@
7
7
  .mfui-store-button_theme_app-store {
8
8
  background-image: url('./img/app-store.png');
9
9
  }
10
+ .mfui-store-button_theme_galaxy-store {
11
+ background-image: url('./img/galaxy-store.png');
12
+ }
10
13
  .mfui-store-button_theme_google-play {
11
14
  background-image: url('./img/google-play.png');
12
15
  }
13
16
  .mfui-store-button_theme_huawei-store {
14
17
  background-image: url('./img/huawei-store.png');
15
18
  }
19
+ .mfui-store-button_theme_mi-store {
20
+ background-image: url('./img/mi-store.png');
21
+ }
22
+ .mfui-store-button_theme_ru-store {
23
+ background-image: url('./img/ru-store.png');
24
+ }
@@ -2,9 +2,12 @@ import * as React from 'react';
2
2
  import { Link } from '@megafon/ui-core';
3
3
  import './StoreButton.less';
4
4
  export declare enum Theme {
5
- GOOGLE_PLAY = "google-play",
6
5
  APP_STORE = "app-store",
7
- HUAWEI_STORE = "huawei-store"
6
+ GALAXY_STORE = "galaxy-store",
7
+ GOOGLE_PLAY = "google-play",
8
+ HUAWEI_STORE = "huawei-store",
9
+ MI_STORE = "mi-store",
10
+ RU_STORE = "ru-store"
8
11
  }
9
12
  declare type LinkPropTypes = React.ComponentProps<typeof Link>;
10
13
  export declare type Props = Required<Pick<LinkPropTypes, 'href'>> & Pick<LinkPropTypes, 'target' | 'rel' | 'onClick' | 'dataAttrs'> & {
@@ -46,9 +46,12 @@ var Theme;
46
46
  exports.Theme = Theme;
47
47
 
48
48
  (function (Theme) {
49
- Theme["GOOGLE_PLAY"] = "google-play";
50
49
  Theme["APP_STORE"] = "app-store";
50
+ Theme["GALAXY_STORE"] = "galaxy-store";
51
+ Theme["GOOGLE_PLAY"] = "google-play";
51
52
  Theme["HUAWEI_STORE"] = "huawei-store";
53
+ Theme["MI_STORE"] = "mi-store";
54
+ Theme["RU_STORE"] = "ru-store";
52
55
  })(Theme || (exports.Theme = Theme = {}));
53
56
 
54
57
  var cn = (0, _uiHelpers.cnCreate)('mfui-store-button');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "4.16.0",
3
+ "version": "4.18.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -52,7 +52,7 @@
52
52
  "@babel/preset-env": "^7.8.6",
53
53
  "@babel/preset-react": "^7.8.3",
54
54
  "@babel/preset-typescript": "^7.8.3",
55
- "@megafon/ui-icons": "^2.8.1",
55
+ "@megafon/ui-icons": "^2.9.0",
56
56
  "@svgr/core": "^2.4.1",
57
57
  "@testing-library/jest-dom": "5.16.2",
58
58
  "@testing-library/react": "12.1.2",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "dependencies": {
88
88
  "@babel/runtime": "^7.8.4",
89
- "@megafon/ui-core": "^4.15.1",
89
+ "@megafon/ui-core": "^4.15.3",
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": "ff8786e64e8cc9220fc248899a2328d28bd159b0"
97
+ "gitHead": "f51175c15bbd3009ef1a67aebb8107d21f43052a"
98
98
  }