@megafon/ui-shared 5.15.0 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +3 -12
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +6 -20
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/es/components/BenefitsPictures/helpers.js +0 -14
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
- package/dist/es/components/Card/Card.css +1 -308
- package/dist/es/components/Card/Card.d.ts +3 -3
- package/dist/es/components/Card/Card.js +20 -109
- package/dist/es/components/Card/types.d.ts +9 -9
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.js +3 -14
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +0 -4
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
- package/dist/es/components/Container/Container.css +1 -3101
- package/dist/es/components/Container/Container.d.ts +7 -5
- package/dist/es/components/Container/Container.js +10 -25
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
- package/dist/es/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -239
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +14 -16
- package/dist/es/components/ImageBanner/ImageBanner.js +41 -111
- package/dist/es/components/Instructions/Instructions.css +1 -790
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +41 -94
- package/dist/es/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
- package/dist/es/components/PageTitle/PageTitle.css +1 -80
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +12 -37
- package/dist/es/components/Partners/Partners.css +1 -53
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +17 -48
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
- package/dist/es/components/Property/Property.css +1 -156
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +37 -81
- package/dist/es/components/Property/PropertyDescription.css +1 -17
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +8 -28
- package/dist/es/components/Property/types.d.ts +7 -5
- package/dist/es/components/Property/types.js +1 -0
- package/dist/es/components/Steps/Steps.css +1 -41
- package/dist/es/components/Steps/Steps.d.ts +2 -1
- package/dist/es/components/Steps/Steps.js +4 -19
- package/dist/es/components/Steps/StepsItem.css +1 -42
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +2 -9
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
- package/dist/es/components/StoreButton/StoreButton.css +1 -327
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +13 -44
- package/dist/es/components/Table/Table.css +1 -157
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +31 -51
- package/dist/es/components/Table/TableCell.js +0 -6
- package/dist/es/components/Table/TableRow.js +1 -10
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +4 -13
- package/dist/es/components/TextBox/TextBox.css +1 -25
- package/dist/es/components/TextBox/TextBox.d.ts +2 -1
- package/dist/es/components/TextBox/TextBox.js +8 -23
- package/dist/es/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
- package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +1 -31
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +6 -21
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +35 -75
- package/dist/es/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +10 -66
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +32 -56
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +12 -43
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +9 -17
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +4 -23
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +5 -16
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +7 -25
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +26 -86
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +13 -53
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +10 -37
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/lib/components/BenefitsIcons/types.js +5 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +24 -71
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/lib/components/BenefitsPictures/helpers.js +9 -40
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/lib/components/BenefitsPictures/types.js +5 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +18 -60
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +22 -55
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +40 -89
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +29 -72
- package/dist/lib/components/Card/Card.css +1 -308
- package/dist/lib/components/Card/Card.d.ts +3 -3
- package/dist/lib/components/Card/Card.js +58 -154
- package/dist/lib/components/Card/types.d.ts +9 -9
- package/dist/lib/components/Card/types.js +5 -1
- package/dist/lib/components/CardsBox/CardsBox.js +7 -31
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +1 -8
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +15 -39
- package/dist/lib/components/Container/Container.css +1 -3101
- package/dist/lib/components/Container/Container.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +17 -39
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +17 -60
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +8 -33
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -239
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +14 -16
- package/dist/lib/components/ImageBanner/ImageBanner.js +64 -161
- package/dist/lib/components/Instructions/Instructions.css +1 -790
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +103 -186
- package/dist/lib/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
- package/dist/lib/components/PageTitle/PageTitle.css +1 -80
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +15 -52
- package/dist/lib/components/Partners/Partners.css +1 -53
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +21 -65
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
- package/dist/lib/components/Property/Property.css +1 -156
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +60 -120
- package/dist/lib/components/Property/PropertyDescription.css +1 -17
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +15 -46
- package/dist/lib/components/Property/types.d.ts +7 -5
- package/dist/lib/components/Property/types.js +5 -1
- package/dist/lib/components/Steps/Steps.css +1 -41
- package/dist/lib/components/Steps/Steps.d.ts +2 -1
- package/dist/lib/components/Steps/Steps.js +8 -35
- package/dist/lib/components/Steps/StepsItem.css +1 -42
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +11 -23
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
- package/dist/lib/components/StoreButton/StoreButton.css +1 -327
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +17 -63
- package/dist/lib/components/Table/Table.css +1 -157
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +35 -68
- package/dist/lib/components/Table/TableCell.js +4 -16
- package/dist/lib/components/Table/TableRow.js +5 -19
- package/dist/lib/components/TabsBox/TabBox.js +1 -4
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +8 -26
- package/dist/lib/components/TextBox/TextBox.css +1 -25
- package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
- package/dist/lib/components/TextBox/TextBox.js +12 -36
- package/dist/lib/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +1 -31
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +10 -37
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +83 -176
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +58 -114
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/helpers/getColumnConfig.js +2 -5
- package/dist/lib/index.js +10 -57
- package/package.json +89 -92
- package/CHANGELOG.md +0 -3962
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
@@ -1,14 +1,11 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
2
|
import "core-js/modules/es.symbol.js";
|
4
3
|
import "core-js/modules/es.symbol.description.js";
|
5
|
-
import "core-js/modules/es.array.map.js";
|
6
4
|
import "core-js/modules/es.array.concat.js";
|
7
|
-
import "core-js/modules/es.
|
8
|
-
import React from 'react';
|
5
|
+
import "core-js/modules/es.array.map.js";
|
6
|
+
import * as React from 'react';
|
9
7
|
import { Header, PriceBadge } from '@megafon/ui-core';
|
10
8
|
import { breakpoints, cnCreate, filterDataAttrs, convert, titleConvertConfig } from '@megafon/ui-helpers';
|
11
|
-
import * as PropTypes from 'prop-types';
|
12
9
|
import "./ImageBanner.css";
|
13
10
|
export var BackgroundColor = {
|
14
11
|
TRANSPARENT: 'transparent',
|
@@ -31,18 +28,15 @@ export var ImageVerticalAlign = {
|
|
31
28
|
CENTER: 'center',
|
32
29
|
BOTTOM: 'bottom'
|
33
30
|
};
|
34
|
-
|
35
31
|
var getTheme = function getTheme(backgrounColor) {
|
36
32
|
switch (backgrounColor) {
|
37
33
|
case BackgroundColor.GREEN:
|
38
34
|
case BackgroundColor.PURPLE:
|
39
35
|
return NavTheme.LIGHT;
|
40
|
-
|
41
36
|
default:
|
42
37
|
return NavTheme.DARK;
|
43
38
|
}
|
44
39
|
};
|
45
|
-
|
46
40
|
var cn = cnCreate('mfui-image-banner');
|
47
41
|
var typographyConfig = {
|
48
42
|
b: {
|
@@ -56,70 +50,46 @@ var typographyConfig = {
|
|
56
50
|
}
|
57
51
|
}
|
58
52
|
};
|
59
|
-
|
60
53
|
var ImageBanner = function ImageBanner(_ref2) {
|
61
54
|
var dataAttrs = _ref2.dataAttrs,
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
adBlock = _ref2.adBlock,
|
94
|
-
_ref2$children = _ref2.children,
|
95
|
-
children = _ref2$children === void 0 ? [] : _ref2$children;
|
96
|
-
|
97
|
-
var _React$useState = React.useState(false),
|
98
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
99
|
-
isMobile = _React$useState2[0],
|
100
|
-
setIsMobile = _React$useState2[1];
|
101
|
-
|
102
|
-
React.useEffect(function () {
|
103
|
-
var mediaQuery = window.matchMedia("(max-width: ".concat(breakpoints.MOBILE_MIDDLE_END, "px)"));
|
104
|
-
|
105
|
-
var handleMediaChange = function handleMediaChange(_ref3) {
|
106
|
-
var matches = _ref3.matches;
|
107
|
-
setIsMobile(matches);
|
108
|
-
};
|
109
|
-
|
110
|
-
setIsMobile(mediaQuery.matches);
|
111
|
-
mediaQuery.addEventListener('change', handleMediaChange);
|
112
|
-
return function () {
|
113
|
-
mediaQuery.removeEventListener('change', handleMediaChange);
|
114
|
-
};
|
115
|
-
}, []);
|
55
|
+
className = _ref2.className,
|
56
|
+
_ref2$classes = _ref2.classes,
|
57
|
+
classes = _ref2$classes === void 0 ? {} : _ref2$classes,
|
58
|
+
rootRef = _ref2.rootRef,
|
59
|
+
_ref2$imageMobile = _ref2.imageMobile,
|
60
|
+
imageMobile = _ref2$imageMobile === void 0 ? '' : _ref2$imageMobile,
|
61
|
+
_ref2$imageMobile2x = _ref2.imageMobile2x,
|
62
|
+
imageMobile2x = _ref2$imageMobile2x === void 0 ? '' : _ref2$imageMobile2x,
|
63
|
+
_ref2$imageDesktop = _ref2.imageDesktop,
|
64
|
+
imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
|
65
|
+
_ref2$imageDesktop2x = _ref2.imageDesktop2x,
|
66
|
+
imageDesktop2x = _ref2$imageDesktop2x === void 0 ? '' : _ref2$imageDesktop2x,
|
67
|
+
_ref2$imageAlt = _ref2.imageAlt,
|
68
|
+
imageAlt = _ref2$imageAlt === void 0 ? '' : _ref2$imageAlt,
|
69
|
+
_ref2$imageVerticalAl = _ref2.imageVerticalAlign,
|
70
|
+
imageVerticalAlign = _ref2$imageVerticalAl === void 0 ? ImageVerticalAlign.CENTER : _ref2$imageVerticalAl,
|
71
|
+
title = _ref2.title,
|
72
|
+
description = _ref2.description,
|
73
|
+
cost = _ref2.cost,
|
74
|
+
_ref2$backgroundColor = _ref2.backgroundColor,
|
75
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
|
76
|
+
_ref2$radius = _ref2.radius,
|
77
|
+
radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
|
78
|
+
autoHeight = _ref2.autoHeight,
|
79
|
+
isImageFullWidth = _ref2.isImageFullWidth,
|
80
|
+
_ref2$badges = _ref2.badges,
|
81
|
+
badges = _ref2$badges === void 0 ? [] : _ref2$badges,
|
82
|
+
hasBottomOffset = _ref2.hasBottomOffset,
|
83
|
+
adBlock = _ref2.adBlock,
|
84
|
+
_ref2$children = _ref2.children,
|
85
|
+
children = _ref2$children === void 0 ? [] : _ref2$children;
|
116
86
|
var navTheme = getTheme(backgroundColor);
|
117
87
|
var hasImage = !!(imageMobile || imageMobile2x || imageDesktop || imageDesktop2x);
|
118
88
|
var renderBadges = !!badges.length && /*#__PURE__*/React.createElement("div", {
|
119
89
|
className: cn('badges', [classes.badges])
|
120
|
-
}, badges.map(function (
|
121
|
-
var text =
|
122
|
-
|
90
|
+
}, badges.map(function (_ref3) {
|
91
|
+
var text = _ref3.text,
|
92
|
+
iconType = _ref3.iconType;
|
123
93
|
return /*#__PURE__*/React.createElement(PriceBadge, {
|
124
94
|
className: classes.badge,
|
125
95
|
theme: navTheme,
|
@@ -136,8 +106,7 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
136
106
|
className: cn('badges-container', [classes.badgesContainer])
|
137
107
|
}, renderBadges, renderAdBlock), !!title && /*#__PURE__*/React.createElement(Header, {
|
138
108
|
className: cn('title', [classes.title]),
|
139
|
-
color: "inherit"
|
140
|
-
as: isMobile ? headerLevelMobile : headerLevel
|
109
|
+
color: "inherit"
|
141
110
|
}, typeof title === 'string' ? convert(title, titleConvertConfig) : title), !!description && /*#__PURE__*/React.createElement(Header, {
|
142
111
|
className: cn('description', [classes.description]),
|
143
112
|
as: "h5",
|
@@ -167,51 +136,12 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
167
136
|
'has-image': hasImage,
|
168
137
|
'auto-height': autoHeight,
|
169
138
|
'full-width': isImageFullWidth,
|
139
|
+
'bottom-offset': hasBottomOffset && !hasImage,
|
170
140
|
radius: radius
|
171
141
|
}, [className, classes.root]),
|
172
142
|
ref: rootRef
|
173
|
-
}),
|
174
|
-
|
175
|
-
|
176
|
-
ImageBanner.propTypes = {
|
177
|
-
dataAttrs: PropTypes.shape({
|
178
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
179
|
-
image: PropTypes.objectOf(PropTypes.string.isRequired)
|
180
|
-
}),
|
181
|
-
className: PropTypes.string,
|
182
|
-
classes: PropTypes.shape({
|
183
|
-
root: PropTypes.string,
|
184
|
-
image: PropTypes.string,
|
185
|
-
title: PropTypes.string,
|
186
|
-
description: PropTypes.string,
|
187
|
-
cost: PropTypes.string,
|
188
|
-
badgesContainer: PropTypes.string,
|
189
|
-
badges: PropTypes.string,
|
190
|
-
badge: PropTypes.string,
|
191
|
-
adBlock: PropTypes.string
|
192
|
-
}),
|
193
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
194
|
-
current: PropTypes.elementType
|
195
|
-
}), PropTypes.any])]),
|
196
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
197
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
198
|
-
cost: PropTypes.string,
|
199
|
-
headerLevelMobile: PropTypes.oneOf(['h1', 'h2']),
|
200
|
-
headerLevel: PropTypes.oneOf(['h1', 'h2']),
|
201
|
-
backgroundColor: PropTypes.oneOf(Object.values(BackgroundColor)),
|
202
|
-
radius: PropTypes.oneOf(Object.values(Radius)),
|
203
|
-
imageMobile: PropTypes.string,
|
204
|
-
imageMobile2x: PropTypes.string,
|
205
|
-
imageDesktop: PropTypes.string,
|
206
|
-
imageDesktop2x: PropTypes.string,
|
207
|
-
imageAlt: PropTypes.string,
|
208
|
-
imageVerticalAlign: PropTypes.oneOf(Object.values(ImageVerticalAlign)),
|
209
|
-
autoHeight: PropTypes.bool,
|
210
|
-
isImageFullWidth: PropTypes.bool,
|
211
|
-
badges: PropTypes.arrayOf(PropTypes.shape({
|
212
|
-
iconType: PropTypes.oneOf(['timer', 'price', 'check', 'attention', 'info', 'profile']).isRequired,
|
213
|
-
text: PropTypes.string.isRequired
|
214
|
-
}).isRequired),
|
215
|
-
adBlock: PropTypes.element
|
143
|
+
}), /*#__PURE__*/React.createElement("div", {
|
144
|
+
className: cn('wrapper')
|
145
|
+
}, renderContent, hasImage && renderImage));
|
216
146
|
};
|
217
147
|
export default ImageBanner;
|