@megafon/ui-shared 3.4.1 → 4.0.0-beta.3

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 (34) hide show
  1. package/CHANGELOG.md +23 -24
  2. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +1 -1
  3. package/dist/es/components/DownloadLinks/DownloadLink.css +1 -1
  4. package/dist/es/components/Instructions/Instructions.css +0 -3
  5. package/dist/es/components/Instructions/Instructions.js +11 -19
  6. package/dist/es/components/PageTitle/PageTitle.css +1 -1
  7. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +2 -2
  8. package/dist/es/components/Table/Table.css +6 -1
  9. package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -1
  10. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +0 -4
  11. package/dist/es/components/TextWithIcon/TextWithIcon.js +10 -27
  12. package/dist/es/components/TextWithIcon/TextWithIconItem.css +12 -13
  13. package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +0 -2
  14. package/dist/es/components/TextWithIcon/TextWithIconItem.js +1 -6
  15. package/dist/es/components/VideoBanner/VideoBanner.css +4 -3
  16. package/dist/es/components/VideoBanner/VideoBanner.d.ts +0 -2
  17. package/dist/es/components/VideoBanner/VideoBanner.js +33 -20
  18. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
  19. package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -1
  20. package/dist/lib/components/Instructions/Instructions.css +0 -3
  21. package/dist/lib/components/Instructions/Instructions.js +11 -20
  22. package/dist/lib/components/PageTitle/PageTitle.css +1 -1
  23. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +2 -2
  24. package/dist/lib/components/Table/Table.css +6 -1
  25. package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -1
  26. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +0 -4
  27. package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -27
  28. package/dist/lib/components/TextWithIcon/TextWithIconItem.css +12 -13
  29. package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +0 -2
  30. package/dist/lib/components/TextWithIcon/TextWithIconItem.js +1 -6
  31. package/dist/lib/components/VideoBanner/VideoBanner.css +4 -3
  32. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +0 -2
  33. package/dist/lib/components/VideoBanner/VideoBanner.js +33 -20
  34. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,27 +3,25 @@
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
- ## [3.4.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.4.0...@megafon/ui-shared@3.4.1) (2022-06-07)
7
-
8
- **Note:** Version bump only for package @megafon/ui-shared
9
-
10
-
6
+ # [4.0.0-beta.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.2...@megafon/ui-shared@4.0.0-beta.3) (2022-06-08)
11
7
 
12
8
 
9
+ ### Features
13
10
 
14
- # [3.4.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.5...@megafon/ui-shared@3.4.0) (2022-05-30)
11
+ * **tabs:** update by new design ([0a8a175](https://github.com/MegafonWebLab/megafon-ui/commit/0a8a175aa5e30758742c1c663da8a406e30dc3dd))
15
12
 
16
13
 
17
- ### Features
14
+ ### BREAKING CHANGES
18
15
 
19
- * **instructions:** add swipe to picture ([eb9eb09](https://github.com/MegafonWebLab/megafon-ui/commit/eb9eb0991444e113baf95d2d014d1c690cd1e99a))
20
- * **textwithicon:** add isFullWidth and centeringOnMobile props ([b86ad8b](https://github.com/MegafonWebLab/megafon-ui/commit/b86ad8b1ad5e41c87e83ebadeb3a0a157bc41a2c))
16
+ * **tabs:** new prop autoWidth added
17
+ size prop small vallue removed
18
+ new sizes
21
19
 
22
20
 
23
21
 
24
22
 
25
23
 
26
- ## [3.3.5](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.4...@megafon/ui-shared@3.3.5) (2022-05-27)
24
+ # [4.0.0-beta.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.1...@megafon/ui-shared@4.0.0-beta.2) (2022-06-01)
27
25
 
28
26
  **Note:** Version bump only for package @megafon/ui-shared
29
27
 
@@ -31,35 +29,39 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
31
29
 
32
30
 
33
31
 
34
- ## [3.3.4](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.3...@megafon/ui-shared@3.3.4) (2022-05-24)
32
+ # [4.0.0-beta.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.0...@megafon/ui-shared@4.0.0-beta.1) (2022-05-27)
35
33
 
34
+ **Note:** Version bump only for package @megafon/ui-shared
36
35
 
37
- ### Bug Fixes
38
36
 
39
- * **instructions:** remove css prorerty filter for image ([d4ee221](https://github.com/MegafonWebLab/megafon-ui/commit/d4ee22123565b82ec777c1526093a94251e59809))
40
- * **picturewithdescription:** fix clearing indents for first and last element ([d9263e3](https://github.com/MegafonWebLab/megafon-ui/commit/d9263e3670b2d493ec4bf194a2cdd6440d1ea86f))
41
37
 
42
38
 
43
39
 
40
+ # [4.0.0-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.2.3-beta.1...@megafon/ui-shared@4.0.0-beta.0) (2022-05-24)
44
41
 
45
42
 
46
- ## [3.3.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.2...@megafon/ui-shared@3.3.3) (2022-05-17)
43
+ ### Bug Fixes
47
44
 
48
- **Note:** Version bump only for package @megafon/ui-shared
45
+ * **breadcrumbs:** change default color prop value from black to default ([9c2c0fc](https://github.com/MegafonWebLab/megafon-ui/commit/9c2c0fca7d559a67d3d167b2a8a3c30b420ab7da))
49
46
 
50
47
 
48
+ ### Features
51
49
 
50
+ * **paragraph:** remove prop size; add new prop; add 'pale' option to colors ([ef15841](https://github.com/MegafonWebLab/megafon-ui/commit/ef15841474473739d3ac88da7a8737e183ff288a))
52
51
 
53
52
 
54
- ## [3.3.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.1...@megafon/ui-shared@3.3.2) (2022-05-05)
53
+ ### BREAKING CHANGES
55
54
 
56
- **Note:** Version bump only for package @megafon/ui-shared
55
+ * **paragraph:** prop 'size' is no longer exists.
56
+ use component Caption instead of Paragraph size="small"
57
+ * **breadcrumbs:** color is now depends on current theme. by default it matches content text color.
58
+ for keep black color on light background use 'black' value for prop 'color'.
57
59
 
58
60
 
59
61
 
60
62
 
61
63
 
62
- ## [3.3.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.3.0...@megafon/ui-shared@3.3.1) (2022-04-25)
64
+ ## [3.2.3-beta.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.2.3-beta.0...@megafon/ui-shared@3.2.3-beta.1) (2022-05-06)
63
65
 
64
66
  **Note:** Version bump only for package @megafon/ui-shared
65
67
 
@@ -67,12 +69,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
67
69
 
68
70
 
69
71
 
70
- # [3.3.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.2.2...@megafon/ui-shared@3.3.0) (2022-04-18)
72
+ ## [3.2.3-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.2.2...@megafon/ui-shared@3.2.3-beta.0) (2022-04-13)
71
73
 
72
-
73
- ### Features
74
-
75
- * **videobanner:** add proprety for mobile video, use picture for background image ([c21c927](https://github.com/MegafonWebLab/megafon-ui/commit/c21c9278d2ff1e192195a5113d43d50753fd02c5))
74
+ **Note:** Version bump only for package @megafon/ui-shared
76
75
 
77
76
 
78
77
 
@@ -26,7 +26,7 @@ var cn = cnCreate('mfui-breadcrumbs');
26
26
  var Breadcrumbs = function Breadcrumbs(_ref) {
27
27
  var items = _ref.items,
28
28
  _ref$color = _ref.color,
29
- color = _ref$color === void 0 ? 'black' : _ref$color,
29
+ color = _ref$color === void 0 ? 'default' : _ref$color,
30
30
  className = _ref.className,
31
31
  _ref$classes = _ref.classes,
32
32
  classes = _ref$classes === void 0 ? {} : _ref$classes,
@@ -31,7 +31,7 @@ h5 {
31
31
  .mfui-download-link__info {
32
32
  margin: 0;
33
33
  font-size: 12px;
34
- line-height: 16px;
34
+ line-height: 18px;
35
35
  color: var(--spbSky3);
36
36
  text-transform: uppercase;
37
37
  }
@@ -89,9 +89,6 @@ h5 {
89
89
  .mfui-instructions__swiper-img {
90
90
  width: 100%;
91
91
  height: 100%;
92
- }
93
- .mfui-instructions__swiper-img_video {
94
- /* hack for fix not white video background */
95
92
  -webkit-filter: brightness(108.5%);
96
93
  filter: brightness(108.5%);
97
94
  }
@@ -78,19 +78,13 @@ var Instructions = function Instructions(_ref) {
78
78
  swiperInstance && swiperInstance.slideTo(ind);
79
79
  };
80
80
  }, [swiperInstance]);
81
- var handleSlideChange = React.useCallback(function (_ref2) {
82
- var activeIndex = _ref2.activeIndex;
83
- setSlideIndex(activeIndex);
84
- }, []);
85
81
  var renderVideo = React.useCallback(function (mediaUrl, index) {
86
82
  return /*#__PURE__*/React.createElement("video", _extends({
87
83
  loop: true,
88
84
  muted: true,
89
85
  autoPlay: true,
90
86
  playsInline: true,
91
- className: cn('swiper-img', {
92
- video: true
93
- })
87
+ className: cn('swiper-img')
94
88
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/React.createElement("source", {
95
89
  src: mediaUrl,
96
90
  type: "video/mp4"
@@ -98,14 +92,12 @@ var Instructions = function Instructions(_ref) {
98
92
  }, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
99
93
  var renderSlider = React.useCallback(function () {
100
94
  return /*#__PURE__*/React.createElement(Swiper, {
101
- noSwiping: false,
95
+ className: cn('swiper'),
102
96
  onSwiper: getSwiperInstance,
103
- noSwipingClass: swiperSlideCn,
104
- onSlideChange: handleSlideChange,
105
- className: cn('swiper')
106
- }, instructionItems.map(function (_ref3, i) {
107
- var mediaUrl = _ref3.mediaUrl,
108
- isVideo = _ref3.isVideo;
97
+ noSwipingClass: swiperSlideCn
98
+ }, instructionItems.map(function (_ref2, i) {
99
+ var mediaUrl = _ref2.mediaUrl,
100
+ isVideo = _ref2.isVideo;
109
101
  return /*#__PURE__*/React.createElement(SwiperSlide, {
110
102
  className: swiperSlideCn,
111
103
  key: i + mediaUrl
@@ -116,7 +108,7 @@ var Instructions = function Instructions(_ref) {
116
108
  className: cn('swiper-img', [instructionItemImg])
117
109
  })));
118
110
  }));
119
- }, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, handleSlideChange]);
111
+ }, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
120
112
  var renderTitle = React.useCallback(function (resolution) {
121
113
  return /*#__PURE__*/React.createElement(Header, {
122
114
  className: cn('title', {
@@ -148,8 +140,8 @@ var Instructions = function Instructions(_ref) {
148
140
  'text-after': !!text,
149
141
  desktop: true
150
142
  })
151
- }, instructionItems.map(function (_ref4, i) {
152
- var itemTitle = _ref4.title;
143
+ }, instructionItems.map(function (_ref3, i) {
144
+ var itemTitle = _ref3.title;
153
145
  return (
154
146
  /*#__PURE__*/
155
147
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
@@ -177,8 +169,8 @@ var Instructions = function Instructions(_ref) {
177
169
  })
178
170
  }, /*#__PURE__*/React.createElement("div", {
179
171
  className: cn('articles-title-block')
180
- }, instructionItems.map(function (_ref5, i) {
181
- var itemTitle = _ref5.title;
172
+ }, instructionItems.map(function (_ref4, i) {
173
+ var itemTitle = _ref4.title;
182
174
  return slideIndex === i && /*#__PURE__*/React.createElement("div", _extends({
183
175
  key: i,
184
176
  "data-index": i
@@ -37,7 +37,7 @@ h5 {
37
37
  }
38
38
  .mfui-page-title__badge {
39
39
  font-size: 12px;
40
- line-height: 16px;
40
+ line-height: 18px;
41
41
  display: inline-block;
42
42
  margin-top: 16px;
43
43
  padding: 2px 14px;
@@ -53,10 +53,10 @@ h5 {
53
53
  max-width: 550px;
54
54
  height: 100%;
55
55
  }
56
- .mfui-picture-with-description__content > :first-child {
56
+ .mfui-picture-with-description__content :first-child {
57
57
  margin-top: 0 !important;
58
58
  }
59
- .mfui-picture-with-description__content > :last-child {
59
+ .mfui-picture-with-description__content :last-child {
60
60
  margin-bottom: 0 !important;
61
61
  }
62
62
  @media screen and (min-width: 1024px) {
@@ -45,6 +45,7 @@ h5 {
45
45
  }
46
46
  }
47
47
  .mfui-table__top-shadow {
48
+ position: -webkit-sticky;
48
49
  position: sticky;
49
50
  top: 0;
50
51
  z-index: 2;
@@ -57,6 +58,7 @@ h5 {
57
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%);
58
59
  }
59
60
  .mfui-table__left-shadow {
61
+ position: -webkit-sticky;
60
62
  position: sticky;
61
63
  top: 0;
62
64
  bottom: 0;
@@ -68,6 +70,7 @@ h5 {
68
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%);
69
71
  }
70
72
  .mfui-table__bottom-gradient {
73
+ position: -webkit-sticky;
71
74
  position: sticky;
72
75
  bottom: 0;
73
76
  z-index: 1;
@@ -81,6 +84,7 @@ h5 {
81
84
  background: linear-gradient(to top, var(--base) 25%, rgba(255, 255, 255, 0));
82
85
  }
83
86
  .mfui-table__right-gradient {
87
+ position: -webkit-sticky;
84
88
  position: sticky;
85
89
  right: 0;
86
90
  z-index: 1;
@@ -121,7 +125,7 @@ h5 {
121
125
  }
122
126
  .mfui-table__row_head .mfui-table__cell {
123
127
  font-size: 12px;
124
- line-height: 16px;
128
+ line-height: 18px;
125
129
  height: 72px;
126
130
  padding-bottom: 12px;
127
131
  color: var(--spbSky3);
@@ -138,6 +142,7 @@ h5 {
138
142
  min-width: 144px;
139
143
  }
140
144
  .mfui-table_fix-column .mfui-table__cell:first-child {
145
+ position: -webkit-sticky;
141
146
  position: sticky;
142
147
  }
143
148
  .mfui-table_fix-column .mfui-table__left-shadow {
@@ -9,7 +9,7 @@ h5 {
9
9
  margin-bottom: 24px;
10
10
  }
11
11
  @media screen and (max-width: 767px) {
12
- .mfui-text-with-icon_centering-on-mobile .mfui-text-with-icon__header {
12
+ .mfui-text-with-icon__header {
13
13
  text-align: center;
14
14
  }
15
15
  }
@@ -12,10 +12,6 @@ export interface ITextWithIconProps {
12
12
  };
13
13
  /** Дополнительный класс для корневого элемента */
14
14
  className?: string;
15
- /** Включить растягивание на всю ширину контейнера */
16
- isFullWidth?: boolean;
17
- /** Выравнивание по центру на мобильных */
18
- centeringOnMobile?: boolean;
19
15
  /** Допустимый дочерний компонент */
20
16
  children: React.ReactElement<ITextWithIconItem>[] | React.ReactElement<ITextWithIconItem>;
21
17
  }
@@ -11,34 +11,19 @@ var TextWithIcon = function TextWithIcon(_ref) {
11
11
  rootRef = _ref.rootRef,
12
12
  dataAttrs = _ref.dataAttrs,
13
13
  className = _ref.className,
14
- _ref$isFullWidth = _ref.isFullWidth,
15
- isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
16
- _ref$centeringOnMobil = _ref.centeringOnMobile,
17
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
18
14
  children = _ref.children;
19
-
20
- var renderContent = function renderContent() {
21
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(Header, {
22
- className: cn('header'),
23
- as: "h5"
24
- }, title), children);
25
- };
26
-
27
- var renderContentWithGrid = function renderContentWithGrid() {
28
- return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(GridColumn, {
29
- mobile: '12',
30
- tablet: '7',
31
- desktop: '6',
32
- wide: '6'
33
- }, renderContent()));
34
- };
35
-
36
15
  return /*#__PURE__*/React.createElement("div", _extends({
37
- className: cn({
38
- 'centering-on-mobile': centeringOnMobile
39
- }, [className]),
16
+ className: cn([className]),
40
17
  ref: rootRef
41
- }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), isFullWidth ? renderContent() : renderContentWithGrid());
18
+ }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(GridColumn, {
19
+ mobile: '12',
20
+ tablet: '7',
21
+ desktop: '6',
22
+ wide: '6'
23
+ }, title && /*#__PURE__*/React.createElement(Header, {
24
+ className: cn('header'),
25
+ as: "h5"
26
+ }, title), children)));
42
27
  };
43
28
 
44
29
  TextWithIcon.propTypes = {
@@ -50,8 +35,6 @@ TextWithIcon.propTypes = {
50
35
  root: PropTypes.objectOf(PropTypes.string.isRequired)
51
36
  }),
52
37
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element.isRequired]).isRequired,
53
- isFullWidth: PropTypes.bool,
54
- centeringOnMobile: PropTypes.bool,
55
38
  className: PropTypes.string
56
39
  };
57
40
  export default TextWithIcon;
@@ -13,6 +13,14 @@ h5 {
13
13
  -ms-flex-align: center;
14
14
  align-items: center;
15
15
  }
16
+ @media screen and (max-width: 767px) {
17
+ .mfui-text-with-icon-item {
18
+ -webkit-box-orient: vertical;
19
+ -webkit-box-direction: normal;
20
+ -ms-flex-direction: column;
21
+ flex-direction: column;
22
+ }
23
+ }
16
24
  .mfui-text-with-icon-item:not(:first-of-type) {
17
25
  margin-top: 16px;
18
26
  }
@@ -26,25 +34,16 @@ h5 {
26
34
  min-width: 40px;
27
35
  height: 40px;
28
36
  min-height: 40px;
29
- margin-right: 16px;
30
37
  overflow: hidden;
31
38
  }
32
- @media screen and (max-width: 767px) {
33
- .mfui-text-with-icon-item_centering-on-mobile {
34
- -webkit-box-orient: vertical;
35
- -webkit-box-direction: normal;
36
- -ms-flex-direction: column;
37
- flex-direction: column;
39
+ @media screen and (min-width: 768px) {
40
+ .mfui-text-with-icon-item__svg-icon {
41
+ margin-right: 16px;
38
42
  }
39
43
  }
40
44
  @media screen and (max-width: 767px) {
41
- .mfui-text-with-icon-item_centering-on-mobile .mfui-text-with-icon-item__text {
45
+ .mfui-text-with-icon-item__text {
42
46
  margin-top: 12px;
43
47
  text-align: center;
44
48
  }
45
49
  }
46
- @media screen and (max-width: 767px) {
47
- .mfui-text-with-icon-item_centering-on-mobile .mfui-text-with-icon-item__svg-icon {
48
- margin-right: 0;
49
- }
50
- }
@@ -11,8 +11,6 @@ export interface ITextWithIconItem {
11
11
  dataAttrs?: {
12
12
  root?: Record<string, string>;
13
13
  };
14
- /** Выравнивание по центру на мобильных */
15
- centeringOnMobile?: boolean;
16
14
  /** Дополнительный класс для корневого элемента */
17
15
  className?: string;
18
16
  }
@@ -10,13 +10,9 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
10
10
  icon = _ref.icon,
11
11
  rootRef = _ref.rootRef,
12
12
  dataAttrs = _ref.dataAttrs,
13
- _ref$centeringOnMobil = _ref.centeringOnMobile,
14
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
15
13
  className = _ref.className;
16
14
  return /*#__PURE__*/React.createElement("div", _extends({
17
- className: cn({
18
- 'centering-on-mobile': centeringOnMobile
19
- }, [className]),
15
+ className: cn([className]),
20
16
  ref: rootRef
21
17
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
22
18
  className: cn('svg-icon')
@@ -34,7 +30,6 @@ TextWithIconItem.propTypes = {
34
30
  dataAttrs: PropTypes.shape({
35
31
  root: PropTypes.objectOf(PropTypes.string.isRequired)
36
32
  }),
37
- centeringOnMobile: PropTypes.bool,
38
33
  className: PropTypes.string
39
34
  };
40
35
  export default TextWithIconItem;
@@ -84,8 +84,9 @@ h5 {
84
84
  .mfui-video-banner__background-image {
85
85
  width: 100%;
86
86
  height: 100%;
87
- -o-object-fit: cover;
88
- object-fit: cover;
87
+ background-repeat: no-repeat;
88
+ background-position: center;
89
+ background-size: cover;
89
90
  }
90
91
  .mfui-video-banner__content {
91
92
  position: relative;
@@ -190,7 +191,7 @@ h5 {
190
191
  }
191
192
  .mfui-video-banner__cost {
192
193
  font-size: 12px;
193
- line-height: 16px;
194
+ line-height: 18px;
194
195
  margin-bottom: 18px;
195
196
  }
196
197
  .mfui-video-banner__value {
@@ -78,8 +78,6 @@ interface IVideoBannerProps {
78
78
  videoSrc?: string;
79
79
  /** Тип видео */
80
80
  videoType?: VideoType;
81
- /** Разрешить проигрывать видео на мобильном разрешении */
82
- videoMobile?: boolean;
83
81
  /** Наличие звука в видео */
84
82
  isMuted?: boolean;
85
83
  /** Изображение для мобильного разрешения */
@@ -63,17 +63,20 @@ var VideoBanner = function VideoBanner(_ref2) {
63
63
  content = _ref2.content,
64
64
  _ref2$isMuted = _ref2.isMuted,
65
65
  isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
66
- breadcrumbs = _ref2.breadcrumbs,
67
- _ref2$videoMobile = _ref2.videoMobile,
68
- videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile;
66
+ breadcrumbs = _ref2.breadcrumbs;
69
67
 
70
68
  var _React$useState = React.useState(true),
71
69
  _React$useState2 = _slicedToArray(_React$useState, 2),
72
70
  isMobile = _React$useState2[0],
73
71
  setIsMobile = _React$useState2[1];
74
72
 
73
+ var _React$useState3 = React.useState(imageMobile),
74
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
75
+ imageSrc = _React$useState4[0],
76
+ setImageSrc = _React$useState4[1];
77
+
75
78
  var isVideoData = !!videoSrc && !!videoType;
76
- var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
79
+ var isRenderVideo = !isMobile && isVideoData;
77
80
  var renderContent = React.useCallback(function (_ref3) {
78
81
  var title = _ref3.title,
79
82
  description = _ref3.description,
@@ -186,8 +189,27 @@ var VideoBanner = function VideoBanner(_ref2) {
186
189
  }
187
190
  }, [videoType, videoSrc, isMuted, classes.video]);
188
191
  React.useEffect(function () {
192
+ var getImageSrc = function getImageSrc() {
193
+ var windowWidth = window.innerWidth;
194
+
195
+ switch (true) {
196
+ case windowWidth >= breakpoints.DESKTOP_MIDDLE_START:
197
+ return imageDesktopWide;
198
+
199
+ case windowWidth >= breakpoints.DESKTOP_SMALL_START && windowWidth <= breakpoints.DESKTOP_SMALL_END:
200
+ return imageDesktop;
201
+
202
+ case windowWidth >= breakpoints.MOBILE_BIG_START && windowWidth <= breakpoints.MOBILE_BIG_END:
203
+ return imageTablet;
204
+
205
+ default:
206
+ return imageMobile;
207
+ }
208
+ };
209
+
189
210
  var resizeHandler = function resizeHandler() {
190
211
  setIsMobile(window.innerWidth < breakpoints.DESKTOP_SMALL_START);
212
+ setImageSrc(getImageSrc());
191
213
  };
192
214
 
193
215
  var resizeHandlerThrottled = throttle(resizeHandler, throttleTime.resize);
@@ -196,7 +218,7 @@ var VideoBanner = function VideoBanner(_ref2) {
196
218
  return function () {
197
219
  window.removeEventListener('resize', resizeHandlerThrottled);
198
220
  };
199
- }, [setIsMobile]);
221
+ }, [imageDesktop, imageDesktopWide, imageMobile, imageTablet]);
200
222
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
201
223
  className: cn([className, classes.root]),
202
224
  ref: rootRef
@@ -213,20 +235,12 @@ var VideoBanner = function VideoBanner(_ref2) {
213
235
  classes: {
214
236
  item: classes.breadcrumbs
215
237
  }
216
- }), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/React.createElement("picture", null, /*#__PURE__*/React.createElement("source", {
217
- media: "(min-width: ".concat(breakpoints.DESKTOP_MIDDLE_START, "px)"),
218
- srcSet: imageDesktopWide
219
- }), /*#__PURE__*/React.createElement("source", {
220
- media: "(min-width: ".concat(breakpoints.DESKTOP_SMALL_START, "px)"),
221
- srcSet: imageDesktop
222
- }), /*#__PURE__*/React.createElement("source", {
223
- media: "(min-width: ".concat(breakpoints.MOBILE_BIG_START, "px)"),
224
- srcSet: imageTablet
225
- }), /*#__PURE__*/React.createElement("img", {
226
- className: cn('background-image'),
227
- src: imageMobile,
228
- alt: ""
229
- })))));
238
+ }), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/React.createElement("div", {
239
+ style: {
240
+ backgroundImage: "url(".concat(imageSrc, ")")
241
+ },
242
+ className: cn('background-image')
243
+ }))));
230
244
  };
231
245
 
232
246
  VideoBanner.propTypes = {
@@ -249,7 +263,6 @@ VideoBanner.propTypes = {
249
263
  }), PropTypes.any])]),
250
264
  videoSrc: PropTypes.string,
251
265
  videoType: PropTypes.oneOf(Object.values(VideoType)),
252
- videoMobile: PropTypes.bool,
253
266
  content: PropTypes.shape({
254
267
  title: PropTypes.string.isRequired,
255
268
  description: PropTypes.string.isRequired,
@@ -43,7 +43,7 @@ var cn = (0, _uiHelpers.cnCreate)('mfui-breadcrumbs');
43
43
  var Breadcrumbs = function Breadcrumbs(_ref) {
44
44
  var items = _ref.items,
45
45
  _ref$color = _ref.color,
46
- color = _ref$color === void 0 ? 'black' : _ref$color,
46
+ color = _ref$color === void 0 ? 'default' : _ref$color,
47
47
  className = _ref.className,
48
48
  _ref$classes = _ref.classes,
49
49
  classes = _ref$classes === void 0 ? {} : _ref$classes,
@@ -31,7 +31,7 @@ h5 {
31
31
  .mfui-download-link__info {
32
32
  margin: 0;
33
33
  font-size: 12px;
34
- line-height: 16px;
34
+ line-height: 18px;
35
35
  color: var(--spbSky3);
36
36
  text-transform: uppercase;
37
37
  }
@@ -89,9 +89,6 @@ h5 {
89
89
  .mfui-instructions__swiper-img {
90
90
  width: 100%;
91
91
  height: 100%;
92
- }
93
- .mfui-instructions__swiper-img_video {
94
- /* hack for fix not white video background */
95
92
  -webkit-filter: brightness(108.5%);
96
93
  filter: brightness(108.5%);
97
94
  }
@@ -99,20 +99,13 @@ var Instructions = function Instructions(_ref) {
99
99
  };
100
100
  }, [swiperInstance]);
101
101
 
102
- var handleSlideChange = _react["default"].useCallback(function (_ref2) {
103
- var activeIndex = _ref2.activeIndex;
104
- setSlideIndex(activeIndex);
105
- }, []);
106
-
107
102
  var renderVideo = _react["default"].useCallback(function (mediaUrl, index) {
108
103
  return /*#__PURE__*/_react["default"].createElement("video", (0, _extends2["default"])({
109
104
  loop: true,
110
105
  muted: true,
111
106
  autoPlay: true,
112
107
  playsInline: true,
113
- className: cn('swiper-img', {
114
- video: true
115
- })
108
+ className: cn('swiper-img')
116
109
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/_react["default"].createElement("source", {
117
110
  src: mediaUrl,
118
111
  type: "video/mp4"
@@ -121,14 +114,12 @@ var Instructions = function Instructions(_ref) {
121
114
 
122
115
  var renderSlider = _react["default"].useCallback(function () {
123
116
  return /*#__PURE__*/_react["default"].createElement(_react2.Swiper, {
124
- noSwiping: false,
117
+ className: cn('swiper'),
125
118
  onSwiper: getSwiperInstance,
126
- noSwipingClass: swiperSlideCn,
127
- onSlideChange: handleSlideChange,
128
- className: cn('swiper')
129
- }, instructionItems.map(function (_ref3, i) {
130
- var mediaUrl = _ref3.mediaUrl,
131
- isVideo = _ref3.isVideo;
119
+ noSwipingClass: swiperSlideCn
120
+ }, instructionItems.map(function (_ref2, i) {
121
+ var mediaUrl = _ref2.mediaUrl,
122
+ isVideo = _ref2.isVideo;
132
123
  return /*#__PURE__*/_react["default"].createElement(_react2.SwiperSlide, {
133
124
  className: swiperSlideCn,
134
125
  key: i + mediaUrl
@@ -139,7 +130,7 @@ var Instructions = function Instructions(_ref) {
139
130
  className: cn('swiper-img', [instructionItemImg])
140
131
  })));
141
132
  }));
142
- }, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, handleSlideChange]);
133
+ }, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
143
134
 
144
135
  var renderTitle = _react["default"].useCallback(function (resolution) {
145
136
  return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
@@ -175,8 +166,8 @@ var Instructions = function Instructions(_ref) {
175
166
  'text-after': !!text,
176
167
  desktop: true
177
168
  })
178
- }, instructionItems.map(function (_ref4, i) {
179
- var itemTitle = _ref4.title;
169
+ }, instructionItems.map(function (_ref3, i) {
170
+ var itemTitle = _ref3.title;
180
171
  return (
181
172
  /*#__PURE__*/
182
173
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
@@ -205,8 +196,8 @@ var Instructions = function Instructions(_ref) {
205
196
  })
206
197
  }, /*#__PURE__*/_react["default"].createElement("div", {
207
198
  className: cn('articles-title-block')
208
- }, instructionItems.map(function (_ref5, i) {
209
- var itemTitle = _ref5.title;
199
+ }, instructionItems.map(function (_ref4, i) {
200
+ var itemTitle = _ref4.title;
210
201
  return slideIndex === i && /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
211
202
  key: i,
212
203
  "data-index": i
@@ -37,7 +37,7 @@ h5 {
37
37
  }
38
38
  .mfui-page-title__badge {
39
39
  font-size: 12px;
40
- line-height: 16px;
40
+ line-height: 18px;
41
41
  display: inline-block;
42
42
  margin-top: 16px;
43
43
  padding: 2px 14px;
@@ -53,10 +53,10 @@ h5 {
53
53
  max-width: 550px;
54
54
  height: 100%;
55
55
  }
56
- .mfui-picture-with-description__content > :first-child {
56
+ .mfui-picture-with-description__content :first-child {
57
57
  margin-top: 0 !important;
58
58
  }
59
- .mfui-picture-with-description__content > :last-child {
59
+ .mfui-picture-with-description__content :last-child {
60
60
  margin-bottom: 0 !important;
61
61
  }
62
62
  @media screen and (min-width: 1024px) {
@@ -45,6 +45,7 @@ h5 {
45
45
  }
46
46
  }
47
47
  .mfui-table__top-shadow {
48
+ position: -webkit-sticky;
48
49
  position: sticky;
49
50
  top: 0;
50
51
  z-index: 2;
@@ -57,6 +58,7 @@ h5 {
57
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%);
58
59
  }
59
60
  .mfui-table__left-shadow {
61
+ position: -webkit-sticky;
60
62
  position: sticky;
61
63
  top: 0;
62
64
  bottom: 0;
@@ -68,6 +70,7 @@ h5 {
68
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%);
69
71
  }
70
72
  .mfui-table__bottom-gradient {
73
+ position: -webkit-sticky;
71
74
  position: sticky;
72
75
  bottom: 0;
73
76
  z-index: 1;
@@ -81,6 +84,7 @@ h5 {
81
84
  background: linear-gradient(to top, var(--base) 25%, rgba(255, 255, 255, 0));
82
85
  }
83
86
  .mfui-table__right-gradient {
87
+ position: -webkit-sticky;
84
88
  position: sticky;
85
89
  right: 0;
86
90
  z-index: 1;
@@ -121,7 +125,7 @@ h5 {
121
125
  }
122
126
  .mfui-table__row_head .mfui-table__cell {
123
127
  font-size: 12px;
124
- line-height: 16px;
128
+ line-height: 18px;
125
129
  height: 72px;
126
130
  padding-bottom: 12px;
127
131
  color: var(--spbSky3);
@@ -138,6 +142,7 @@ h5 {
138
142
  min-width: 144px;
139
143
  }
140
144
  .mfui-table_fix-column .mfui-table__cell:first-child {
145
+ position: -webkit-sticky;
141
146
  position: sticky;
142
147
  }
143
148
  .mfui-table_fix-column .mfui-table__left-shadow {
@@ -9,7 +9,7 @@ h5 {
9
9
  margin-bottom: 24px;
10
10
  }
11
11
  @media screen and (max-width: 767px) {
12
- .mfui-text-with-icon_centering-on-mobile .mfui-text-with-icon__header {
12
+ .mfui-text-with-icon__header {
13
13
  text-align: center;
14
14
  }
15
15
  }
@@ -12,10 +12,6 @@ export interface ITextWithIconProps {
12
12
  };
13
13
  /** Дополнительный класс для корневого элемента */
14
14
  className?: string;
15
- /** Включить растягивание на всю ширину контейнера */
16
- isFullWidth?: boolean;
17
- /** Выравнивание по центру на мобильных */
18
- centeringOnMobile?: boolean;
19
15
  /** Допустимый дочерний компонент */
20
16
  children: React.ReactElement<ITextWithIconItem>[] | React.ReactElement<ITextWithIconItem>;
21
17
  }
@@ -30,34 +30,19 @@ var TextWithIcon = function TextWithIcon(_ref) {
30
30
  rootRef = _ref.rootRef,
31
31
  dataAttrs = _ref.dataAttrs,
32
32
  className = _ref.className,
33
- _ref$isFullWidth = _ref.isFullWidth,
34
- isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
35
- _ref$centeringOnMobil = _ref.centeringOnMobile,
36
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
37
33
  children = _ref.children;
38
-
39
- var renderContent = function renderContent() {
40
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(_uiCore.Header, {
41
- className: cn('header'),
42
- as: "h5"
43
- }, title), children);
44
- };
45
-
46
- var renderContentWithGrid = function renderContentWithGrid() {
47
- return /*#__PURE__*/React.createElement(_uiCore.Grid, null, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
48
- mobile: '12',
49
- tablet: '7',
50
- desktop: '6',
51
- wide: '6'
52
- }, renderContent()));
53
- };
54
-
55
34
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
56
- className: cn({
57
- 'centering-on-mobile': centeringOnMobile
58
- }, [className]),
35
+ className: cn([className]),
59
36
  ref: rootRef
60
- }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), isFullWidth ? renderContent() : renderContentWithGrid());
37
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(_uiCore.Grid, null, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
38
+ mobile: '12',
39
+ tablet: '7',
40
+ desktop: '6',
41
+ wide: '6'
42
+ }, title && /*#__PURE__*/React.createElement(_uiCore.Header, {
43
+ className: cn('header'),
44
+ as: "h5"
45
+ }, title), children)));
61
46
  };
62
47
 
63
48
  TextWithIcon.propTypes = {
@@ -69,8 +54,6 @@ TextWithIcon.propTypes = {
69
54
  root: PropTypes.objectOf(PropTypes.string.isRequired)
70
55
  }),
71
56
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element.isRequired]).isRequired,
72
- isFullWidth: PropTypes.bool,
73
- centeringOnMobile: PropTypes.bool,
74
57
  className: PropTypes.string
75
58
  };
76
59
  var _default = TextWithIcon;
@@ -13,6 +13,14 @@ h5 {
13
13
  -ms-flex-align: center;
14
14
  align-items: center;
15
15
  }
16
+ @media screen and (max-width: 767px) {
17
+ .mfui-text-with-icon-item {
18
+ -webkit-box-orient: vertical;
19
+ -webkit-box-direction: normal;
20
+ -ms-flex-direction: column;
21
+ flex-direction: column;
22
+ }
23
+ }
16
24
  .mfui-text-with-icon-item:not(:first-of-type) {
17
25
  margin-top: 16px;
18
26
  }
@@ -26,25 +34,16 @@ h5 {
26
34
  min-width: 40px;
27
35
  height: 40px;
28
36
  min-height: 40px;
29
- margin-right: 16px;
30
37
  overflow: hidden;
31
38
  }
32
- @media screen and (max-width: 767px) {
33
- .mfui-text-with-icon-item_centering-on-mobile {
34
- -webkit-box-orient: vertical;
35
- -webkit-box-direction: normal;
36
- -ms-flex-direction: column;
37
- flex-direction: column;
39
+ @media screen and (min-width: 768px) {
40
+ .mfui-text-with-icon-item__svg-icon {
41
+ margin-right: 16px;
38
42
  }
39
43
  }
40
44
  @media screen and (max-width: 767px) {
41
- .mfui-text-with-icon-item_centering-on-mobile .mfui-text-with-icon-item__text {
45
+ .mfui-text-with-icon-item__text {
42
46
  margin-top: 12px;
43
47
  text-align: center;
44
48
  }
45
49
  }
46
- @media screen and (max-width: 767px) {
47
- .mfui-text-with-icon-item_centering-on-mobile .mfui-text-with-icon-item__svg-icon {
48
- margin-right: 0;
49
- }
50
- }
@@ -11,8 +11,6 @@ export interface ITextWithIconItem {
11
11
  dataAttrs?: {
12
12
  root?: Record<string, string>;
13
13
  };
14
- /** Выравнивание по центру на мобильных */
15
- centeringOnMobile?: boolean;
16
14
  /** Дополнительный класс для корневого элемента */
17
15
  className?: string;
18
16
  }
@@ -28,13 +28,9 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
28
28
  icon = _ref.icon,
29
29
  rootRef = _ref.rootRef,
30
30
  dataAttrs = _ref.dataAttrs,
31
- _ref$centeringOnMobil = _ref.centeringOnMobile,
32
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
33
31
  className = _ref.className;
34
32
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
35
- className: cn({
36
- 'centering-on-mobile': centeringOnMobile
37
- }, [className]),
33
+ className: cn([className]),
38
34
  ref: rootRef
39
35
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
40
36
  className: cn('svg-icon')
@@ -52,7 +48,6 @@ TextWithIconItem.propTypes = {
52
48
  dataAttrs: PropTypes.shape({
53
49
  root: PropTypes.objectOf(PropTypes.string.isRequired)
54
50
  }),
55
- centeringOnMobile: PropTypes.bool,
56
51
  className: PropTypes.string
57
52
  };
58
53
  var _default = TextWithIconItem;
@@ -84,8 +84,9 @@ h5 {
84
84
  .mfui-video-banner__background-image {
85
85
  width: 100%;
86
86
  height: 100%;
87
- -o-object-fit: cover;
88
- object-fit: cover;
87
+ background-repeat: no-repeat;
88
+ background-position: center;
89
+ background-size: cover;
89
90
  }
90
91
  .mfui-video-banner__content {
91
92
  position: relative;
@@ -190,7 +191,7 @@ h5 {
190
191
  }
191
192
  .mfui-video-banner__cost {
192
193
  font-size: 12px;
193
- line-height: 16px;
194
+ line-height: 18px;
194
195
  margin-bottom: 18px;
195
196
  }
196
197
  .mfui-video-banner__value {
@@ -78,8 +78,6 @@ interface IVideoBannerProps {
78
78
  videoSrc?: string;
79
79
  /** Тип видео */
80
80
  videoType?: VideoType;
81
- /** Разрешить проигрывать видео на мобильном разрешении */
82
- videoMobile?: boolean;
83
81
  /** Наличие звука в видео */
84
82
  isMuted?: boolean;
85
83
  /** Изображение для мобильного разрешения */
@@ -95,17 +95,20 @@ var VideoBanner = function VideoBanner(_ref2) {
95
95
  content = _ref2.content,
96
96
  _ref2$isMuted = _ref2.isMuted,
97
97
  isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
98
- breadcrumbs = _ref2.breadcrumbs,
99
- _ref2$videoMobile = _ref2.videoMobile,
100
- videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile;
98
+ breadcrumbs = _ref2.breadcrumbs;
101
99
 
102
100
  var _React$useState = _react["default"].useState(true),
103
101
  _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
104
102
  isMobile = _React$useState2[0],
105
103
  setIsMobile = _React$useState2[1];
106
104
 
105
+ var _React$useState3 = _react["default"].useState(imageMobile),
106
+ _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
107
+ imageSrc = _React$useState4[0],
108
+ setImageSrc = _React$useState4[1];
109
+
107
110
  var isVideoData = !!videoSrc && !!videoType;
108
- var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
111
+ var isRenderVideo = !isMobile && isVideoData;
109
112
 
110
113
  var renderContent = _react["default"].useCallback(function (_ref3) {
111
114
  var title = _ref3.title,
@@ -221,8 +224,27 @@ var VideoBanner = function VideoBanner(_ref2) {
221
224
  }, [videoType, videoSrc, isMuted, classes.video]);
222
225
 
223
226
  _react["default"].useEffect(function () {
227
+ var getImageSrc = function getImageSrc() {
228
+ var windowWidth = window.innerWidth;
229
+
230
+ switch (true) {
231
+ case windowWidth >= _uiHelpers.breakpoints.DESKTOP_MIDDLE_START:
232
+ return imageDesktopWide;
233
+
234
+ case windowWidth >= _uiHelpers.breakpoints.DESKTOP_SMALL_START && windowWidth <= _uiHelpers.breakpoints.DESKTOP_SMALL_END:
235
+ return imageDesktop;
236
+
237
+ case windowWidth >= _uiHelpers.breakpoints.MOBILE_BIG_START && windowWidth <= _uiHelpers.breakpoints.MOBILE_BIG_END:
238
+ return imageTablet;
239
+
240
+ default:
241
+ return imageMobile;
242
+ }
243
+ };
244
+
224
245
  var resizeHandler = function resizeHandler() {
225
246
  setIsMobile(window.innerWidth < _uiHelpers.breakpoints.DESKTOP_SMALL_START);
247
+ setImageSrc(getImageSrc());
226
248
  };
227
249
 
228
250
  var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
@@ -231,7 +253,7 @@ var VideoBanner = function VideoBanner(_ref2) {
231
253
  return function () {
232
254
  window.removeEventListener('resize', resizeHandlerThrottled);
233
255
  };
234
- }, [setIsMobile]);
256
+ }, [imageDesktop, imageDesktopWide, imageMobile, imageTablet]);
235
257
 
236
258
  return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
237
259
  className: cn([className, classes.root]),
@@ -249,20 +271,12 @@ var VideoBanner = function VideoBanner(_ref2) {
249
271
  classes: {
250
272
  item: classes.breadcrumbs
251
273
  }
252
- }), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/_react["default"].createElement("picture", null, /*#__PURE__*/_react["default"].createElement("source", {
253
- media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_MIDDLE_START, "px)"),
254
- srcSet: imageDesktopWide
255
- }), /*#__PURE__*/_react["default"].createElement("source", {
256
- media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
257
- srcSet: imageDesktop
258
- }), /*#__PURE__*/_react["default"].createElement("source", {
259
- media: "(min-width: ".concat(_uiHelpers.breakpoints.MOBILE_BIG_START, "px)"),
260
- srcSet: imageTablet
261
- }), /*#__PURE__*/_react["default"].createElement("img", {
262
- className: cn('background-image'),
263
- src: imageMobile,
264
- alt: ""
265
- })))));
274
+ }), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/_react["default"].createElement("div", {
275
+ style: {
276
+ backgroundImage: "url(".concat(imageSrc, ")")
277
+ },
278
+ className: cn('background-image')
279
+ }))));
266
280
  };
267
281
 
268
282
  VideoBanner.propTypes = {
@@ -285,7 +299,6 @@ VideoBanner.propTypes = {
285
299
  }), PropTypes.any])]),
286
300
  videoSrc: PropTypes.string,
287
301
  videoType: PropTypes.oneOf(Object.values(VideoType)),
288
- videoMobile: PropTypes.bool,
289
302
  content: PropTypes.shape({
290
303
  title: PropTypes.string.isRequired,
291
304
  description: PropTypes.string.isRequired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "3.4.1",
3
+ "version": "4.0.0-beta.3",
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": "^1.2.2",
55
+ "@megafon/ui-icons": "^2.0.0-beta.1",
56
56
  "@svgr/core": "^2.4.1",
57
57
  "@types/enzyme": "^3.10.5",
58
58
  "@types/enzyme-adapter-react-16": "^1.0.6",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@babel/runtime": "^7.8.4",
85
- "@megafon/ui-core": "^3.10.1",
85
+ "@megafon/ui-core": "^4.0.0-beta.3",
86
86
  "@megafon/ui-helpers": "^2.1.2",
87
87
  "core-js": "^3.6.4",
88
88
  "htmr": "^0.9.2",
@@ -90,5 +90,5 @@
90
90
  "prop-types": "^15.7.2",
91
91
  "swiper": "^6.5.6"
92
92
  },
93
- "gitHead": "ab5598d6f428c21c22d939ed586a3795b3d6467a"
93
+ "gitHead": "671bc9c3df88aa07361efdcaf196095f957fbf64"
94
94
  }