@megafon/ui-shared 2.0.0-beta.223 → 2.0.0-beta.227

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 (74) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +2 -0
  3. package/dist/es/components/BenefitsIcons/BenefitsIcons.js +4 -1
  4. package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
  5. package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +2 -2
  6. package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -1
  7. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -1
  8. package/dist/es/components/ButtonBanner/ButtonBanner.css +6 -6
  9. package/dist/es/components/Card/Card.css +16 -12
  10. package/dist/es/components/Card/Card.d.ts +2 -2
  11. package/dist/es/components/Card/Card.js +4 -5
  12. package/dist/es/components/Container/Container.css +26 -18
  13. package/dist/es/components/Instructions/Instructions.css +42 -32
  14. package/dist/es/components/Instructions/Instructions.js +9 -23
  15. package/dist/es/components/PageTitle/PageTitle.css +7 -7
  16. package/dist/es/components/PageTitle/PageTitle.js +12 -7
  17. package/dist/es/components/Partners/Partners.css +2 -2
  18. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +2 -2
  19. package/dist/es/components/Property/Property.css +12 -12
  20. package/dist/es/components/Property/PropertyDescription.css +1 -1
  21. package/dist/es/components/Steps/Steps.css +2 -2
  22. package/dist/es/components/Steps/StepsItem.css +3 -3
  23. package/dist/es/components/StoreBanner/StoreBanner.css +51 -8
  24. package/dist/es/components/StoreBanner/StoreBanner.d.ts +11 -2
  25. package/dist/es/components/StoreBanner/StoreBanner.js +39 -19
  26. package/dist/es/components/StoreButton/StoreButton.css +5 -2
  27. package/dist/es/components/StoreButton/StoreButton.d.ts +2 -1
  28. package/dist/es/components/StoreButton/StoreButton.js +1 -0
  29. package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
  30. package/dist/es/components/Table/Table.css +48 -48
  31. package/dist/es/components/TextBox/TextBoxPicture.css +23 -0
  32. package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
  33. package/dist/es/components/TextBox/TextBoxPicture.js +31 -0
  34. package/dist/es/components/VideoBanner/VideoBanner.css +8 -9
  35. package/dist/es/components/VideoBlock/VideoBlock.css +3 -3
  36. package/dist/es/index.d.ts +1 -0
  37. package/dist/es/index.js +1 -0
  38. package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +2 -0
  39. package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +4 -1
  40. package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
  41. package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +2 -2
  42. package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -1
  43. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -1
  44. package/dist/lib/components/ButtonBanner/ButtonBanner.css +6 -6
  45. package/dist/lib/components/Card/Card.css +16 -12
  46. package/dist/lib/components/Card/Card.d.ts +2 -2
  47. package/dist/lib/components/Card/Card.js +3 -4
  48. package/dist/lib/components/Container/Container.css +26 -18
  49. package/dist/lib/components/Instructions/Instructions.css +42 -32
  50. package/dist/lib/components/Instructions/Instructions.js +8 -25
  51. package/dist/lib/components/PageTitle/PageTitle.css +7 -7
  52. package/dist/lib/components/PageTitle/PageTitle.js +12 -7
  53. package/dist/lib/components/Partners/Partners.css +2 -2
  54. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +2 -2
  55. package/dist/lib/components/Property/Property.css +12 -12
  56. package/dist/lib/components/Property/PropertyDescription.css +1 -1
  57. package/dist/lib/components/Steps/Steps.css +2 -2
  58. package/dist/lib/components/Steps/StepsItem.css +3 -3
  59. package/dist/lib/components/StoreBanner/StoreBanner.css +51 -8
  60. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +11 -2
  61. package/dist/lib/components/StoreBanner/StoreBanner.js +38 -18
  62. package/dist/lib/components/StoreButton/StoreButton.css +5 -2
  63. package/dist/lib/components/StoreButton/StoreButton.d.ts +2 -1
  64. package/dist/lib/components/StoreButton/StoreButton.js +1 -0
  65. package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
  66. package/dist/lib/components/Table/Table.css +48 -48
  67. package/dist/lib/components/TextBox/TextBoxPicture.css +23 -0
  68. package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
  69. package/dist/lib/components/TextBox/TextBoxPicture.js +48 -0
  70. package/dist/lib/components/VideoBanner/VideoBanner.css +8 -9
  71. package/dist/lib/components/VideoBlock/VideoBlock.css +3 -3
  72. package/dist/lib/index.d.ts +1 -0
  73. package/dist/lib/index.js +8 -0
  74. package/package.json +9 -12
@@ -22,13 +22,21 @@ export interface IStoreBannerProps {
22
22
  /** Текст */
23
23
  text: string;
24
24
  /** Ссылка на скачивание приложения в App Store */
25
- linkApple: LinkHrefType;
25
+ linkApple?: LinkHrefType;
26
26
  /** Обработчик клика по ссылке в App Store */
27
27
  onClickApple?: LinkOnClickType;
28
28
  /** Ссылка на скачивание приложения в Google Play */
29
- linkGoogle: LinkHrefType;
29
+ linkGoogle?: LinkHrefType;
30
30
  /** Обработчик клика по ссылке в Google Play */
31
31
  onClickGoogle?: LinkOnClickType;
32
+ /** Ссылка на скачивание приложения в Huawei Store */
33
+ linkHuawei?: LinkHrefType;
34
+ /** Обработчик клика по ссылке в Huawei Store */
35
+ onClickHuawei?: LinkOnClickType;
36
+ /** Текст кнопки */
37
+ textButton?: string;
38
+ /** Ссылка для кнопки */
39
+ linkButton?: string;
32
40
  /** Ссылка на картинку с QR-кодом */
33
41
  qrCode?: string;
34
42
  /** Цветовая тема компонента */
@@ -44,6 +52,7 @@ export interface IStoreBannerProps {
44
52
  root?: string;
45
53
  appleLink?: string;
46
54
  googleLink?: string;
55
+ huaweiLink?: string;
47
56
  };
48
57
  /** Ссылка на корневой элемент */
49
58
  rootRef?: React.Ref<HTMLDivElement>;
@@ -40,28 +40,35 @@ var DeviceMask = {
40
40
  WHITE_IPHONE: 'white-iphone'
41
41
  };
42
42
  exports.DeviceMask = DeviceMask;
43
+ var DEFAULT_TEXT_BUTTON = 'Установите приложение';
43
44
  var cn = (0, _uiHelpers.cnCreate)('mfui-beta-store-banner');
44
45
 
45
46
  var StoreBanner = function StoreBanner(_ref) {
46
- var title = _ref.title,
47
+ var className = _ref.className,
48
+ _ref$classes = _ref.classes;
49
+ _ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
50
+ var rootClassName = _ref$classes.root,
51
+ appleLinkClassName = _ref$classes.appleLink,
52
+ googleLinkClassName = _ref$classes.googleLink,
53
+ huaweiLinkClassName = _ref$classes.huaweiLink,
54
+ title = _ref.title,
47
55
  text = _ref.text,
48
56
  linkApple = _ref.linkApple,
49
- onClickApple = _ref.onClickApple,
50
57
  linkGoogle = _ref.linkGoogle,
51
- onClickGoogle = _ref.onClickGoogle,
58
+ linkHuawei = _ref.linkHuawei,
59
+ linkButton = _ref.linkButton,
60
+ _ref$textButton = _ref.textButton,
61
+ textButton = _ref$textButton === void 0 ? DEFAULT_TEXT_BUTTON : _ref$textButton,
52
62
  qrCode = _ref.qrCode,
53
63
  imageSrc = _ref.imageSrc,
54
64
  _ref$theme = _ref.theme,
55
65
  theme = _ref$theme === void 0 ? Theme.CLEAR_WHITE : _ref$theme,
56
66
  deviceMask = _ref.deviceMask,
57
- className = _ref.className,
58
- _ref$classes = _ref.classes;
59
- _ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
60
- var rootClassName = _ref$classes.root,
61
- appleLinkClassName = _ref$classes.appleLink,
62
- googleLinkClassName = _ref$classes.googleLink,
63
67
  rootRef = _ref.rootRef,
64
- dataAttrs = _ref.dataAttrs;
68
+ dataAttrs = _ref.dataAttrs,
69
+ onClickApple = _ref.onClickApple,
70
+ onClickGoogle = _ref.onClickGoogle,
71
+ onClickHuawei = _ref.onClickHuawei;
65
72
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
66
73
  className: cn({
67
74
  theme: theme,
@@ -87,28 +94,41 @@ var StoreBanner = function StoreBanner(_ref) {
87
94
  hasMargin: false,
88
95
  color: "inherit"
89
96
  }, text), /*#__PURE__*/React.createElement("div", {
90
- className: cn('links')
91
- }, qrCode && /*#__PURE__*/React.createElement("img", {
97
+ className: cn('links', {
98
+ 'three': !!linkApple && !!linkGoogle && !!linkHuawei
99
+ })
100
+ }, !linkButton && qrCode && /*#__PURE__*/React.createElement("img", {
92
101
  src: qrCode,
93
102
  className: cn('qr-code'),
94
103
  alt: "QR-\u043A\u043E\u0434"
95
- }), /*#__PURE__*/React.createElement("div", {
104
+ }), !linkButton && /*#__PURE__*/React.createElement("div", {
96
105
  className: cn('stores')
97
- }, /*#__PURE__*/React.createElement(_StoreButton["default"], {
106
+ }, linkApple && /*#__PURE__*/React.createElement(_StoreButton["default"], {
98
107
  theme: _StoreButton.Theme.APP_STORE,
99
108
  href: linkApple,
100
109
  onClick: onClickApple,
101
110
  className: cn('store-link', {
102
111
  'app-store': true
103
112
  }, appleLinkClassName)
104
- }), /*#__PURE__*/React.createElement(_StoreButton["default"], {
113
+ }), linkGoogle && /*#__PURE__*/React.createElement(_StoreButton["default"], {
105
114
  theme: _StoreButton.Theme.GOOGLE_PLAY,
106
115
  href: linkGoogle,
107
116
  className: cn('store-link', {
108
117
  'google-play': true
109
118
  }, googleLinkClassName),
110
119
  onClick: onClickGoogle
111
- }))))), /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
120
+ }), linkHuawei && /*#__PURE__*/React.createElement(_StoreButton["default"], {
121
+ theme: _StoreButton.Theme.HUAWEI_STORE,
122
+ href: linkHuawei,
123
+ className: cn('store-link', {
124
+ 'huawei-store': true
125
+ }, huaweiLinkClassName),
126
+ onClick: onClickHuawei
127
+ })), linkButton && /*#__PURE__*/React.createElement(_uiCore.Button, {
128
+ className: cn('button'),
129
+ href: linkButton,
130
+ theme: theme === 'green' ? 'purple' : 'green'
131
+ }, textButton)))), /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
112
132
  all: "4",
113
133
  desktop: "6",
114
134
  tablet: "6",
@@ -127,9 +147,9 @@ var StoreBanner = function StoreBanner(_ref) {
127
147
  StoreBanner.propTypes = {
128
148
  title: _propTypes["default"].string.isRequired,
129
149
  text: _propTypes["default"].string.isRequired,
130
- linkApple: _propTypes["default"].string.isRequired,
150
+ linkApple: _propTypes["default"].string,
131
151
  onClickApple: _propTypes["default"].func,
132
- linkGoogle: _propTypes["default"].string.isRequired,
152
+ linkGoogle: _propTypes["default"].string,
133
153
  onClickGoogle: _propTypes["default"].func,
134
154
  qrCode: _propTypes["default"].string,
135
155
  theme: _propTypes["default"].oneOf(Object.values(Theme)),
@@ -1,8 +1,8 @@
1
1
  .mfui-beta-store-button {
2
- background-size: cover;
2
+ border-radius: 8px;
3
3
  background-repeat: no-repeat;
4
4
  background-position: center;
5
- border-radius: 8px;
5
+ background-size: cover;
6
6
  }
7
7
  .mfui-beta-store-button_theme_app-store {
8
8
  background-image: url('./img/app-store.png');
@@ -10,3 +10,6 @@
10
10
  .mfui-beta-store-button_theme_google-play {
11
11
  background-image: url('./img/google-play.png');
12
12
  }
13
+ .mfui-beta-store-button_theme_huawei-store {
14
+ background-image: url('./img/huawei-store.png');
15
+ }
@@ -3,7 +3,8 @@ import { Link } from '@megafon/ui-core';
3
3
  import './StoreButton.less';
4
4
  export declare enum Theme {
5
5
  GOOGLE_PLAY = "google-play",
6
- APP_STORE = "app-store"
6
+ APP_STORE = "app-store",
7
+ HUAWEI_STORE = "huawei-store"
7
8
  }
8
9
  declare type LinkPropTypes = React.ComponentProps<typeof Link>;
9
10
  export declare type Props = Required<Pick<LinkPropTypes, 'href'>> & Pick<LinkPropTypes, 'onClick'> & {
@@ -29,6 +29,7 @@ exports.Theme = Theme;
29
29
  (function (Theme) {
30
30
  Theme["GOOGLE_PLAY"] = "google-play";
31
31
  Theme["APP_STORE"] = "app-store";
32
+ Theme["HUAWEI_STORE"] = "huawei-store";
32
33
  })(Theme || (exports.Theme = Theme = {}));
33
34
 
34
35
  var cn = (0, _uiHelpers.cnCreate)('mfui-beta-store-button');
@@ -6,20 +6,38 @@ h5 {
6
6
  margin: 0;
7
7
  }
8
8
  .mfui-beta-table {
9
- font-family: inherit;
10
- font-size: 15px;
11
- line-height: 24px;
12
9
  display: -webkit-box;
13
10
  display: -ms-flexbox;
14
11
  display: flex;
12
+ font-family: inherit;
13
+ font-size: 15px;
14
+ line-height: 24px;
15
+ }
16
+ .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar {
17
+ width: 8px;
18
+ height: 8px;
19
+ }
20
+ .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-track {
21
+ background-color: #EDEDED;
22
+ }
23
+ .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-thumb {
24
+ border-radius: 4px;
25
+ background-color: #D8D8D8;
26
+ }
27
+ .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-corner {
28
+ background-color: #FFFFFF;
29
+ }
30
+ .mfui-beta-table:not(.mfui-beta-table_touch) .mfui-beta-table__scroll {
31
+ scrollbar-color: #D8D8D8 #EDEDED;
32
+ scrollbar-width: thin;
15
33
  }
16
34
  .mfui-beta-table__scroll {
35
+ position: relative;
17
36
  display: grid;
18
37
  grid-template-columns: auto auto auto;
19
38
  max-width: 100%;
20
- overflow: auto;
21
- position: relative;
22
39
  border: 1px solid #D8D8D8;
40
+ overflow: auto;
23
41
  }
24
42
  @media screen and (min-width: 1024px) {
25
43
  .mfui-beta-table__scroll {
@@ -30,76 +48,76 @@ h5 {
30
48
  position: -webkit-sticky;
31
49
  position: sticky;
32
50
  top: 0;
33
- width: 100%;
51
+ z-index: 2;
34
52
  display: block;
35
- grid-column-end: 4;
36
53
  grid-column-start: 1;
37
- z-index: 2;
38
- margin-bottom: -6px;
54
+ grid-column-end: 4;
55
+ width: 100%;
39
56
  height: 6px;
57
+ margin-bottom: -6px;
40
58
  background: linear-gradient(359.94deg, rgba(0, 0, 0, 0.0001) 0.06%, rgba(0, 0, 0, 0.03) 38.08%, rgba(0, 0, 0, 0.08) 74.98%);
41
59
  }
42
60
  .mfui-beta-table__left-shadow {
43
61
  position: -webkit-sticky;
44
62
  position: sticky;
45
- z-index: 2;
46
- width: 6px;
47
- left: 0;
48
63
  top: 0;
49
64
  bottom: 0;
65
+ left: 0;
66
+ z-index: 2;
67
+ width: 6px;
50
68
  margin-right: -6px;
51
69
  background: -webkit-gradient(linear, right top, left top, color-stop(16.3%, rgba(0, 0, 0, 0.0001)), color-stop(51.81%, rgba(0, 0, 0, 0.03)), color-stop(86.27%, rgba(0, 0, 0, 0.08)));
52
70
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.0001) 16.3%, rgba(0, 0, 0, 0.03) 51.81%, rgba(0, 0, 0, 0.08) 86.27%);
53
71
  }
54
72
  .mfui-beta-table__bottom-gradient {
55
- display: block;
56
- height: 48px;
57
- width: 100%;
58
- margin-top: -48px;
59
73
  position: -webkit-sticky;
60
74
  position: sticky;
61
- z-index: 1;
62
75
  bottom: 0;
76
+ z-index: 1;
77
+ display: block;
78
+ grid-column-start: 1;
79
+ grid-column-end: 4;
80
+ width: 100%;
81
+ height: 48px;
82
+ margin-top: -48px;
63
83
  background: -webkit-gradient(linear, left bottom, left top, color-stop(25%, #FFFFFF), to(rgba(255, 255, 255, 0)));
64
84
  background: linear-gradient(to top, #FFFFFF 25%, rgba(255, 255, 255, 0));
65
- grid-column-end: 4;
66
- grid-column-start: 1;
67
85
  }
68
86
  .mfui-beta-table__right-gradient {
69
- display: block;
70
- height: 100%;
71
- width: 48px;
72
87
  position: -webkit-sticky;
73
88
  position: sticky;
74
- z-index: 1;
75
89
  right: 0;
90
+ z-index: 1;
91
+ display: block;
92
+ width: 48px;
93
+ height: 100%;
76
94
  margin-left: -48px;
77
95
  background: -webkit-gradient(linear, right top, left top, color-stop(25%, #FFFFFF), to(rgba(255, 255, 255, 0)));
78
96
  background: linear-gradient(to left, #FFFFFF 25%, rgba(255, 255, 255, 0));
79
97
  }
80
98
  .mfui-beta-table__table {
81
- border-spacing: 0;
82
99
  border-width: 0;
83
100
  border-collapse: separate;
101
+ border-spacing: 0;
84
102
  background-color: #FFFFFF;
85
103
  }
86
104
  .mfui-beta-table__cell {
87
- padding: 24px;
88
105
  -webkit-box-sizing: border-box;
89
106
  box-sizing: border-box;
107
+ padding: 24px;
90
108
  background-color: #FFFFFF;
91
109
  }
92
110
  @media screen and (max-width: 767px) {
93
111
  .mfui-beta-table__cell {
94
- padding-left: 16px;
95
112
  padding-right: 16px;
113
+ padding-left: 16px;
96
114
  }
97
115
  }
98
116
  .mfui-beta-table__cell:first-child {
117
+ position: relative;
99
118
  left: 0;
100
- min-width: 144px;
101
119
  width: 144px;
102
- position: relative;
120
+ min-width: 144px;
103
121
  border-right: 1px solid #D8D8D8;
104
122
  }
105
123
  .mfui-beta-table__cell:not(:first-child) {
@@ -109,10 +127,10 @@ h5 {
109
127
  font-size: 12px;
110
128
  line-height: 16px;
111
129
  height: 72px;
112
- background-color: #F6F6F6;
113
- color: rgba(51, 51, 51, 0.5);
114
130
  padding-bottom: 12px;
131
+ color: rgba(51, 51, 51, 0.5);
115
132
  vertical-align: bottom;
133
+ background-color: #F6F6F6;
116
134
  }
117
135
  .mfui-beta-table__row:not(:last-child) .mfui-beta-table__cell {
118
136
  border-bottom: 1px solid #D8D8D8;
@@ -133,21 +151,3 @@ h5 {
133
151
  .mfui-beta-table_fix-column .mfui-beta-table__bottom-gradient {
134
152
  z-index: 3;
135
153
  }
136
- .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar {
137
- width: 8px;
138
- height: 8px;
139
- }
140
- .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-track {
141
- background-color: #EDEDED;
142
- }
143
- .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-thumb {
144
- border-radius: 4px;
145
- background-color: #D8D8D8;
146
- }
147
- .mfui-beta-table:not(.mfui-beta-table_touch) ::-webkit-scrollbar-corner {
148
- background-color: #FFFFFF;
149
- }
150
- .mfui-beta-table:not(.mfui-beta-table_touch) .mfui-beta-table__scroll {
151
- scrollbar-color: #D8D8D8 #EDEDED;
152
- scrollbar-width: thin;
153
- }
@@ -0,0 +1,23 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-beta-text-box-picture_margin_default {
9
+ margin: 16px 0;
10
+ }
11
+ .mfui-beta-text-box-picture_margin_big-top {
12
+ margin: 24px 0 16px;
13
+ }
14
+ .mfui-beta-text-box-picture_margin_big-bottom {
15
+ margin: 16px 0 24px;
16
+ }
17
+ .mfui-beta-text-box-picture_margin_big-vertical {
18
+ margin: 24px 0;
19
+ }
20
+ .mfui-beta-text-box-picture__img {
21
+ width: 100%;
22
+ height: 100%;
23
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import './TextBoxPicture.less';
3
+ export declare const pictureMarginTypes: {
4
+ readonly DEFAULT: "default";
5
+ readonly BIG_TOP: "big-top";
6
+ readonly BIG_BOTTOM: "big-bottom";
7
+ readonly BIG_VERTICAL: "big-vertical";
8
+ };
9
+ declare type PictureMarginTypesType = typeof pictureMarginTypes[keyof typeof pictureMarginTypes];
10
+ export interface ITextBoxPictureProps {
11
+ /** URL картинки */
12
+ url: string;
13
+ /** Значение вертикальных отступов */
14
+ margin?: PictureMarginTypesType;
15
+ }
16
+ declare const TextBoxPicture: React.FC<ITextBoxPictureProps>;
17
+ export default TextBoxPicture;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.pictureMarginTypes = void 0;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ var PropTypes = _interopRequireWildcard(require("prop-types"));
13
+
14
+ var _uiHelpers = require("@megafon/ui-helpers");
15
+
16
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
17
+
18
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ var pictureMarginTypes = {
21
+ DEFAULT: 'default',
22
+ BIG_TOP: 'big-top',
23
+ BIG_BOTTOM: 'big-bottom',
24
+ BIG_VERTICAL: 'big-vertical'
25
+ };
26
+ exports.pictureMarginTypes = pictureMarginTypes;
27
+ var cn = (0, _uiHelpers.cnCreate)('mfui-beta-text-box-picture');
28
+
29
+ var TextBoxPicture = function TextBoxPicture(_ref) {
30
+ var url = _ref.url,
31
+ _ref$margin = _ref.margin,
32
+ margin = _ref$margin === void 0 ? pictureMarginTypes.DEFAULT : _ref$margin;
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: cn({
35
+ margin: margin
36
+ })
37
+ }, /*#__PURE__*/React.createElement("img", {
38
+ className: cn('img'),
39
+ src: url
40
+ }));
41
+ };
42
+
43
+ TextBoxPicture.propTypes = {
44
+ url: PropTypes.string.isRequired,
45
+ margin: PropTypes.oneOf([pictureMarginTypes.DEFAULT, pictureMarginTypes.BIG_TOP, pictureMarginTypes.BIG_BOTTOM, pictureMarginTypes.BIG_VERTICAL])
46
+ };
47
+ var _default = TextBoxPicture;
48
+ exports["default"] = _default;
@@ -11,26 +11,26 @@ h5 {
11
11
  }
12
12
  @media screen and (min-width: 1280px) {
13
13
  .mfui-beta-video-banner {
14
- margin-left: -80px;
15
14
  margin-right: -80px;
15
+ margin-left: -80px;
16
16
  }
17
17
  }
18
18
  @media screen and (min-width: 1024px) and (max-width: 1279px) {
19
19
  .mfui-beta-video-banner {
20
- margin-left: -64px;
21
20
  margin-right: -64px;
21
+ margin-left: -64px;
22
22
  }
23
23
  }
24
24
  @media screen and (min-width: 768px) and (max-width: 1023px) {
25
25
  .mfui-beta-video-banner {
26
- margin-left: -48px;
27
26
  margin-right: -48px;
27
+ margin-left: -48px;
28
28
  }
29
29
  }
30
30
  @media screen and (max-width: 767px) {
31
31
  .mfui-beta-video-banner {
32
- margin-left: -16px;
33
32
  margin-right: -16px;
33
+ margin-left: -16px;
34
34
  }
35
35
  }
36
36
  .mfui-beta-video-banner__wrapper {
@@ -76,18 +76,17 @@ h5 {
76
76
  .mfui-beta-video-banner__background-image,
77
77
  .mfui-beta-video-banner__video {
78
78
  position: absolute;
79
- left: 50%;
80
79
  top: 50%;
80
+ left: 50%;
81
81
  -webkit-transform: translate(-50%, -50%);
82
82
  transform: translate(-50%, -50%);
83
- max-width: 1440px;
84
83
  }
85
84
  .mfui-beta-video-banner__background-image {
86
85
  width: 100%;
87
86
  height: 100%;
87
+ background-repeat: no-repeat;
88
88
  background-position: center;
89
89
  background-size: cover;
90
- background-repeat: no-repeat;
91
90
  }
92
91
  .mfui-beta-video-banner__content {
93
92
  position: relative;
@@ -161,14 +160,14 @@ h5 {
161
160
  display: -webkit-box;
162
161
  display: -ms-flexbox;
163
162
  display: flex;
163
+ -ms-flex-wrap: wrap;
164
+ flex-wrap: wrap;
164
165
  -webkit-box-align: center;
165
166
  -ms-flex-align: center;
166
167
  align-items: center;
167
168
  -webkit-box-pack: start;
168
169
  -ms-flex-pack: start;
169
170
  justify-content: flex-start;
170
- -ms-flex-wrap: wrap;
171
- flex-wrap: wrap;
172
171
  margin: -24px -10px 0;
173
172
  }
174
173
  @media screen and (max-width: 767px) {
@@ -21,10 +21,10 @@ h5 {
21
21
  -webkit-box-direction: normal;
22
22
  -ms-flex-direction: column;
23
23
  flex-direction: column;
24
- height: 100%;
25
24
  -webkit-box-pack: center;
26
25
  -ms-flex-pack: center;
27
26
  justify-content: center;
27
+ height: 100%;
28
28
  }
29
29
  @media screen and (max-width: 767px) {
30
30
  .mfui-beta-video-block__content {
@@ -38,8 +38,8 @@ h5 {
38
38
  }
39
39
  @media screen and (min-width: 768px) {
40
40
  .mfui-beta-video-block__content {
41
- padding-right: 20px;
42
41
  margin-right: 20px;
42
+ padding-right: 20px;
43
43
  }
44
44
  }
45
45
  .mfui-beta-video-block__header {
@@ -54,8 +54,8 @@ h5 {
54
54
  margin-top: 24px;
55
55
  }
56
56
  .mfui-beta-video-block__button {
57
- margin-top: 32px;
58
57
  width: 171px;
58
+ margin-top: 32px;
59
59
  }
60
60
  @media screen and (max-width: 767px) {
61
61
  .mfui-beta-video-block__button {
@@ -28,6 +28,7 @@ export { default as TableCell } from './components/Table/TableCell';
28
28
  export { default as TableRow } from './components/Table/TableRow';
29
29
  export { default as TabsBox } from './components/TabsBox/TabsBox';
30
30
  export { default as TextBox } from './components/TextBox/TextBox';
31
+ export { default as TextBoxPicture } from './components/TextBox/TextBoxPicture';
31
32
  export { default as TitleDescriptionBox } from './components/TitleDescriptionBox/TitleDescriptionBox';
32
33
  export { default as VideoBanner } from './components/VideoBanner/VideoBanner';
33
34
  export { default as VideoBlock } from './components/VideoBlock/VideoBlock';
package/dist/lib/index.js CHANGED
@@ -183,6 +183,12 @@ Object.defineProperty(exports, "TextBox", {
183
183
  return _TextBox["default"];
184
184
  }
185
185
  });
186
+ Object.defineProperty(exports, "TextBoxPicture", {
187
+ enumerable: true,
188
+ get: function get() {
189
+ return _TextBoxPicture["default"];
190
+ }
191
+ });
186
192
  Object.defineProperty(exports, "TitleDescriptionBox", {
187
193
  enumerable: true,
188
194
  get: function get() {
@@ -262,6 +268,8 @@ var _TabsBox = _interopRequireDefault(require("./components/TabsBox/TabsBox"));
262
268
 
263
269
  var _TextBox = _interopRequireDefault(require("./components/TextBox/TextBox"));
264
270
 
271
+ var _TextBoxPicture = _interopRequireDefault(require("./components/TextBox/TextBoxPicture"));
272
+
265
273
  var _TitleDescriptionBox = _interopRequireDefault(require("./components/TitleDescriptionBox/TitleDescriptionBox"));
266
274
 
267
275
  var _VideoBanner = _interopRequireDefault(require("./components/VideoBanner/VideoBanner"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "2.0.0-beta.223",
3
+ "version": "2.0.0-beta.227",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -23,8 +23,8 @@
23
23
  "coverage:unit": "jest --ci --collectCoverage --coverageDirectory=coverage",
24
24
  "typecheck": "tsc --noEmit -p .",
25
25
  "lint": "yarn lint:ts && yarn lint:less",
26
- "lint:less": "stylelint --syntax less src/**/*.less src/**/**/*.less",
27
26
  "lint:ts": "tslint -c tslint.json '{src,scripts}/**/*.ts?(x)'",
27
+ "lint:less": "stylelint --syntax less src/**/*.less src/**/**/*.less",
28
28
  "test": "yarn test:unit",
29
29
  "test:unit": "jest",
30
30
  "test:update": "jest --updateSnapshot"
@@ -33,8 +33,8 @@
33
33
  "access": "public"
34
34
  },
35
35
  "peerDependencies": {
36
- "react": ">=16.4.1",
37
- "react-dom": ">=16.4.1"
36
+ "react": ">=16.13.0",
37
+ "react-dom": ">=16.13.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/core": "^7.8.6",
@@ -43,13 +43,14 @@
43
43
  "@babel/preset-env": "^7.8.6",
44
44
  "@babel/preset-react": "^7.8.3",
45
45
  "@babel/preset-typescript": "^7.8.3",
46
+ "@megafon/ui-icons": "^0.0.2-beta.2",
47
+ "@svgr/core": "^2.4.1",
46
48
  "@types/enzyme": "^3.10.5",
47
49
  "@types/enzyme-adapter-react-16": "^1.0.6",
48
50
  "@types/jest": "^25.1.3",
49
51
  "@types/prop-types": "^15.7.3",
50
52
  "@types/react": "^16.9.23",
51
53
  "@types/react-dom": "^16.9.5",
52
- "@types/webpack-env": "^1.15.1",
53
54
  "babel-plugin-module-resolver": "^3.2.0",
54
55
  "del": "^3.0.0",
55
56
  "enzyme": "^3.11.0",
@@ -70,21 +71,17 @@
70
71
  "through2": "^2.0.5",
71
72
  "tslint": "^5.20.1",
72
73
  "tslint-react": "^3.6.0",
73
- "typescript": "^3.8.3",
74
- "webpack-filter-warnings-plugin": "^1.2.1"
74
+ "typescript": "^3.8.3"
75
75
  },
76
76
  "dependencies": {
77
77
  "@babel/runtime": "^7.8.4",
78
- "@megafon/ui-core": "^2.0.0-beta.154",
78
+ "@megafon/ui-core": "^2.0.0-beta.158",
79
79
  "@megafon/ui-helpers": "^1.0.0-beta.0",
80
- "@megafon/ui-icons": "^0.0.2-beta.1",
81
80
  "core-js": "^3.6.4",
82
- "deep-equal": "^1.1.1",
83
81
  "htmr": "^0.9.2",
84
82
  "lodash.throttle": "^4.1.1",
85
83
  "prop-types": "^15.7.2",
86
- "react-input-mask": "^2.0.4",
87
84
  "swiper": "^6.5.6"
88
85
  },
89
- "gitHead": "9fadd54dfdf1595b74a436fdcf092e4472195dbf"
86
+ "gitHead": "31392180db10be2b81fdc179b38c5cf4fe6ac04f"
90
87
  }