@megafon/ui-shared 5.17.0 → 6.0.0-beta.2
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/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/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.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.d.ts +4 -4
- package/dist/es/components/Card/Card.js +25 -115
- package/dist/es/components/Card/types.d.ts +10 -10
- 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.d.ts +7 -5
- package/dist/es/components/Container/Container.js +10 -25
- 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.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.d.ts +8 -7
- package/dist/es/components/ImageBanner/ImageBanner.js +37 -88
- 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.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
- 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.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +17 -48
- 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.d.ts +4 -4
- package/dist/es/components/Property/Property.js +37 -81
- 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.d.ts +2 -1
- package/dist/es/components/Steps/Steps.js +4 -19
- 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.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
- 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.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.d.ts +2 -1
- package/dist/es/components/TextBox/TextBox.js +8 -23
- 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.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
- 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.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
- 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.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/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/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.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.d.ts +4 -4
- package/dist/lib/components/Card/Card.js +67 -164
- package/dist/lib/components/Card/types.d.ts +10 -10
- 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.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +18 -40
- 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.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.d.ts +8 -7
- package/dist/lib/components/ImageBanner/ImageBanner.js +61 -138
- 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.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
- 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.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +21 -65
- 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.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +60 -120
- 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.d.ts +2 -1
- package/dist/lib/components/Steps/Steps.js +8 -35
- 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.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
- 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.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.d.ts +2 -1
- package/dist/lib/components/TextBox/TextBox.js +12 -36
- 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.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
- 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.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
- 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.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 +87 -92
- package/CHANGELOG.md +0 -4002
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +0 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +0 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +0 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +0 -34
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
- package/dist/es/components/Card/Card.css +0 -354
- package/dist/es/components/Container/Container.css +0 -3245
- package/dist/es/components/DownloadLinks/DownloadLink.css +0 -37
- package/dist/es/components/DownloadLinks/DownloadLinks.css +0 -36
- package/dist/es/components/ImageBanner/ImageBanner.css +0 -252
- package/dist/es/components/Instructions/Instructions.css +0 -790
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/es/components/PageTitle/PageTitle.css +0 -80
- package/dist/es/components/Partners/Partners.css +0 -53
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +0 -80
- package/dist/es/components/Property/Property.css +0 -156
- package/dist/es/components/Property/PropertyDescription.css +0 -17
- package/dist/es/components/Steps/Steps.css +0 -41
- package/dist/es/components/Steps/StepsItem.css +0 -42
- package/dist/es/components/StoreBanner/StoreBanner.css +0 -346
- 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/es/components/StoreButton/StoreButton.css +0 -327
- package/dist/es/components/Table/Table.css +0 -157
- package/dist/es/components/TextBox/TextBox.css +0 -25
- package/dist/es/components/TextBox/TextBoxPicture.css +0 -27
- package/dist/es/components/TextWithIcon/TextWithIcon.css +0 -10
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +0 -29
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
- package/dist/es/components/VideoBanner/VideoBanner.css +0 -225
- package/dist/es/components/VideoBlock/VideoBlock.css +0 -106
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +0 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +0 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +0 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +0 -34
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
- package/dist/lib/components/Card/Card.css +0 -354
- package/dist/lib/components/Container/Container.css +0 -3245
- package/dist/lib/components/DownloadLinks/DownloadLink.css +0 -37
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +0 -36
- package/dist/lib/components/ImageBanner/ImageBanner.css +0 -252
- package/dist/lib/components/Instructions/Instructions.css +0 -790
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/lib/components/PageTitle/PageTitle.css +0 -80
- package/dist/lib/components/Partners/Partners.css +0 -53
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +0 -80
- package/dist/lib/components/Property/Property.css +0 -156
- package/dist/lib/components/Property/PropertyDescription.css +0 -17
- package/dist/lib/components/Steps/Steps.css +0 -41
- package/dist/lib/components/Steps/StepsItem.css +0 -42
- package/dist/lib/components/StoreBanner/StoreBanner.css +0 -346
- 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
- package/dist/lib/components/StoreButton/StoreButton.css +0 -327
- package/dist/lib/components/Table/Table.css +0 -157
- package/dist/lib/components/TextBox/TextBox.css +0 -25
- package/dist/lib/components/TextBox/TextBoxPicture.css +0 -27
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +0 -10
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +0 -29
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
- package/dist/lib/components/VideoBanner/VideoBanner.css +0 -225
- package/dist/lib/components/VideoBlock/VideoBlock.css +0 -106
@@ -3,7 +3,6 @@ import "core-js/modules/es.array.map.js";
|
|
3
3
|
import * as React from 'react';
|
4
4
|
import { Grid, GridColumn } from '@megafon/ui-core';
|
5
5
|
import { cnCreate } from '@megafon/ui-helpers';
|
6
|
-
import * as PropTypes from 'prop-types';
|
7
6
|
import "./DownloadLinks.css";
|
8
7
|
export var getColumnConfig = function getColumnConfig(itemsCount) {
|
9
8
|
switch (true) {
|
@@ -14,7 +13,6 @@ export var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
14
13
|
mobile: '12'
|
15
14
|
};
|
16
15
|
}
|
17
|
-
|
18
16
|
case itemsCount <= 4:
|
19
17
|
{
|
20
18
|
return {
|
@@ -22,7 +20,6 @@ export var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
22
20
|
mobile: '12'
|
23
21
|
};
|
24
22
|
}
|
25
|
-
|
26
23
|
default:
|
27
24
|
{
|
28
25
|
return {
|
@@ -36,12 +33,10 @@ export var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
36
33
|
};
|
37
34
|
var testIdPrefix = 'DownloadLinks';
|
38
35
|
var cn = cnCreate('mfui-download-links');
|
39
|
-
|
40
36
|
var DownloadLinks = function DownloadLinks(_ref) {
|
41
37
|
var _ref$inOneColumn = _ref.inOneColumn,
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
|
39
|
+
children = _ref.children;
|
45
40
|
if (inOneColumn) {
|
46
41
|
return /*#__PURE__*/React.createElement("div", {
|
47
42
|
className: cn(),
|
@@ -52,7 +47,6 @@ var DownloadLinks = function DownloadLinks(_ref) {
|
|
52
47
|
}, child);
|
53
48
|
}));
|
54
49
|
}
|
55
|
-
|
56
50
|
var itemsCount = React.Children.count(children);
|
57
51
|
var columnConfig = getColumnConfig(itemsCount);
|
58
52
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -67,9 +61,4 @@ var DownloadLinks = function DownloadLinks(_ref) {
|
|
67
61
|
}), child);
|
68
62
|
})));
|
69
63
|
};
|
70
|
-
|
71
|
-
DownloadLinks.propTypes = {
|
72
|
-
inOneColumn: PropTypes.bool,
|
73
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired
|
74
|
-
};
|
75
64
|
export default DownloadLinks;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
|
1
|
+
import * as React from 'react';
|
3
2
|
var FaqWrapper = function FaqWrapper(_ref) {
|
4
3
|
var children = _ref.children;
|
5
4
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -7,5 +6,4 @@ var FaqWrapper = function FaqWrapper(_ref) {
|
|
7
6
|
itemType: "http://schema.org/FAQPage"
|
8
7
|
}, children);
|
9
8
|
};
|
10
|
-
|
11
9
|
export default FaqWrapper;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './ImageBanner.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './ImageBanner.scss';
|
3
3
|
export declare const BackgroundColor: {
|
4
4
|
readonly TRANSPARENT: "transparent";
|
5
5
|
readonly GREEN: "green";
|
@@ -8,23 +8,23 @@ export declare const BackgroundColor: {
|
|
8
8
|
readonly GRADIENT: "gradient";
|
9
9
|
readonly LIGHT: "light";
|
10
10
|
};
|
11
|
-
export
|
11
|
+
export type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
|
12
12
|
export declare const Radius: {
|
13
13
|
readonly CORNERS: "corners";
|
14
14
|
readonly ROUNDED: "rounded";
|
15
15
|
};
|
16
|
-
export
|
16
|
+
export type RadiusType = (typeof Radius)[keyof typeof Radius];
|
17
17
|
export declare const NavTheme: {
|
18
18
|
readonly LIGHT: "light";
|
19
19
|
readonly DARK: "dark";
|
20
20
|
};
|
21
|
-
export
|
21
|
+
export type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
|
22
22
|
export declare const ImageVerticalAlign: {
|
23
23
|
readonly TOP: "top";
|
24
24
|
readonly CENTER: "center";
|
25
25
|
readonly BOTTOM: "bottom";
|
26
26
|
};
|
27
|
-
export
|
27
|
+
export type ImageVerticalAlignType = (typeof ImageVerticalAlign)[keyof typeof ImageVerticalAlign];
|
28
28
|
export interface IImageBannerProps {
|
29
29
|
/** Дополнительные data атрибуты к внутренним элементам */
|
30
30
|
dataAttrs?: {
|
@@ -47,7 +47,7 @@ export interface IImageBannerProps {
|
|
47
47
|
children?: string;
|
48
48
|
};
|
49
49
|
/** Ссылка на корневой элемент */
|
50
|
-
rootRef?: Ref<HTMLDivElement>;
|
50
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
51
51
|
/** Заголовок */
|
52
52
|
title?: string | React.ReactNode | React.ReactNode[];
|
53
53
|
/** Текст-описание */
|
@@ -82,6 +82,7 @@ export interface IImageBannerProps {
|
|
82
82
|
badges?: JSX.Element[] | JSX.Element;
|
83
83
|
/** Элемент блока с рекламой */
|
84
84
|
adBlock?: JSX.Element | null;
|
85
|
+
children?: React.ReactNode;
|
85
86
|
}
|
86
87
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
87
88
|
export default ImageBanner;
|
@@ -3,11 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "core-js/modules/es.symbol.js";
|
4
4
|
import "core-js/modules/es.symbol.description.js";
|
5
5
|
import "core-js/modules/es.array.concat.js";
|
6
|
-
import
|
7
|
-
import React from 'react';
|
6
|
+
import * as React from 'react';
|
8
7
|
import { Header } from '@megafon/ui-core';
|
9
8
|
import { breakpoints, cnCreate, filterDataAttrs, convert, titleConvertConfig } from '@megafon/ui-helpers';
|
10
|
-
import * as PropTypes from 'prop-types';
|
11
9
|
import "./ImageBanner.css";
|
12
10
|
export var BackgroundColor = {
|
13
11
|
TRANSPARENT: 'transparent',
|
@@ -30,18 +28,15 @@ export var ImageVerticalAlign = {
|
|
30
28
|
CENTER: 'center',
|
31
29
|
BOTTOM: 'bottom'
|
32
30
|
};
|
33
|
-
|
34
31
|
var getTheme = function getTheme(backgrounColor) {
|
35
32
|
switch (backgrounColor) {
|
36
33
|
case BackgroundColor.GREEN:
|
37
34
|
case BackgroundColor.PURPLE:
|
38
35
|
return NavTheme.LIGHT;
|
39
|
-
|
40
36
|
default:
|
41
37
|
return NavTheme.DARK;
|
42
38
|
}
|
43
39
|
};
|
44
|
-
|
45
40
|
var cn = cnCreate('mfui-image-banner');
|
46
41
|
var typographyConfig = {
|
47
42
|
b: {
|
@@ -55,56 +50,51 @@ var typographyConfig = {
|
|
55
50
|
}
|
56
51
|
}
|
57
52
|
};
|
58
|
-
|
59
53
|
var ImageBanner = function ImageBanner(_ref2) {
|
60
54
|
var dataAttrs = _ref2.dataAttrs,
|
61
|
-
|
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
|
-
|
94
|
-
|
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$headerLevelMobi = _ref2.headerLevelMobile,
|
75
|
+
headerLevelMobile = _ref2$headerLevelMobi === void 0 ? 'h1' : _ref2$headerLevelMobi,
|
76
|
+
_ref2$headerLevel = _ref2.headerLevel,
|
77
|
+
headerLevel = _ref2$headerLevel === void 0 ? 'h1' : _ref2$headerLevel,
|
78
|
+
_ref2$backgroundColor = _ref2.backgroundColor,
|
79
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
|
80
|
+
_ref2$radius = _ref2.radius,
|
81
|
+
radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
|
82
|
+
autoHeight = _ref2.autoHeight,
|
83
|
+
isImageFullWidth = _ref2.isImageFullWidth,
|
84
|
+
badges = _ref2.badges,
|
85
|
+
adBlock = _ref2.adBlock,
|
86
|
+
_ref2$children = _ref2.children,
|
87
|
+
children = _ref2$children === void 0 ? [] : _ref2$children;
|
95
88
|
var _React$useState = React.useState(false),
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
89
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
90
|
+
isMobile = _React$useState2[0],
|
91
|
+
setIsMobile = _React$useState2[1];
|
100
92
|
React.useEffect(function () {
|
101
93
|
var mediaQuery = window.matchMedia("(max-width: ".concat(breakpoints.MOBILE_MIDDLE_END, "px)"));
|
102
|
-
|
103
94
|
var handleMediaChange = function handleMediaChange(_ref3) {
|
104
95
|
var matches = _ref3.matches;
|
105
96
|
setIsMobile(matches);
|
106
97
|
};
|
107
|
-
|
108
98
|
setIsMobile(mediaQuery.matches);
|
109
99
|
mediaQuery.addEventListener('change', handleMediaChange);
|
110
100
|
return function () {
|
@@ -162,45 +152,4 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
162
152
|
ref: rootRef
|
163
153
|
}), renderContent, hasImage && renderImage);
|
164
154
|
};
|
165
|
-
|
166
|
-
ImageBanner.propTypes = {
|
167
|
-
dataAttrs: PropTypes.shape({
|
168
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
169
|
-
image: PropTypes.objectOf(PropTypes.string.isRequired)
|
170
|
-
}),
|
171
|
-
className: PropTypes.string,
|
172
|
-
classes: PropTypes.shape({
|
173
|
-
root: PropTypes.string,
|
174
|
-
image: PropTypes.string,
|
175
|
-
imageSource: PropTypes.string,
|
176
|
-
title: PropTypes.string,
|
177
|
-
description: PropTypes.string,
|
178
|
-
cost: PropTypes.string,
|
179
|
-
badgesContainer: PropTypes.string,
|
180
|
-
badges: PropTypes.string,
|
181
|
-
badge: PropTypes.string,
|
182
|
-
adBlock: PropTypes.string,
|
183
|
-
children: PropTypes.string
|
184
|
-
}),
|
185
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
186
|
-
current: PropTypes.elementType
|
187
|
-
}), PropTypes.any])]),
|
188
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
189
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
190
|
-
cost: PropTypes.string,
|
191
|
-
headerLevelMobile: PropTypes.oneOf(['h1', 'h2']),
|
192
|
-
headerLevel: PropTypes.oneOf(['h1', 'h2']),
|
193
|
-
backgroundColor: PropTypes.oneOf(Object.values(BackgroundColor)),
|
194
|
-
radius: PropTypes.oneOf(Object.values(Radius)),
|
195
|
-
imageMobile: PropTypes.string,
|
196
|
-
imageMobile2x: PropTypes.string,
|
197
|
-
imageDesktop: PropTypes.string,
|
198
|
-
imageDesktop2x: PropTypes.string,
|
199
|
-
imageAlt: PropTypes.string,
|
200
|
-
imageVerticalAlign: PropTypes.oneOf(Object.values(ImageVerticalAlign)),
|
201
|
-
autoHeight: PropTypes.bool,
|
202
|
-
isImageFullWidth: PropTypes.bool,
|
203
|
-
badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
|
204
|
-
adBlock: PropTypes.element
|
205
|
-
};
|
206
155
|
export default ImageBanner;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
2
|
import SwiperCore from 'swiper';
|
3
|
-
import './Instructions.
|
3
|
+
import './Instructions.scss';
|
4
4
|
export declare const pictureAlignTypes: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly RIGHT: "right";
|
@@ -34,13 +34,13 @@ export declare const elementOrderTypes: {
|
|
34
34
|
readonly DEFAULT: "default";
|
35
35
|
readonly REVERSED: "reversed";
|
36
36
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
export
|
37
|
+
type PictureAlignTypesType = (typeof pictureAlignTypes)[keyof typeof pictureAlignTypes];
|
38
|
+
type PictureVerticalAlignTypesType = (typeof pictureVerticalAlignTypes)[keyof typeof pictureVerticalAlignTypes];
|
39
|
+
type PictureMaskTypesType = (typeof pictureMaskTypes)[keyof typeof pictureMaskTypes];
|
40
|
+
type PictureBackgroundColorsType = (typeof pictureBackgroundColorTypes)[keyof typeof pictureBackgroundColorTypes];
|
41
|
+
type ArrowThemeType = (typeof arrowTheme)[keyof typeof arrowTheme];
|
42
|
+
type ElementOrderType = (typeof elementOrderTypes)[keyof typeof elementOrderTypes];
|
43
|
+
export type InstructionItemType = {
|
44
44
|
title: string | React.ReactNode | React.ReactNode[];
|
45
45
|
mediaUrl: string;
|
46
46
|
isVideo: boolean;
|
@@ -62,7 +62,7 @@ export interface IInstructionsProps {
|
|
62
62
|
arrowNext?: Record<string, string>;
|
63
63
|
};
|
64
64
|
/** Ссылка на корневой элемент */
|
65
|
-
rootRef?: Ref<HTMLDivElement>;
|
65
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
66
66
|
/** Дополнительные классы для внутренних элементов */
|
67
67
|
classes?: {
|
68
68
|
instructionItem?: string;
|
@@ -99,5 +99,5 @@ export interface IInstructionsProps {
|
|
99
99
|
/** Ref на swiper */
|
100
100
|
getSwiper?: (instance: SwiperCore) => void;
|
101
101
|
}
|
102
|
-
declare const Instructions: React.FC<IInstructionsProps
|
102
|
+
declare const Instructions: React.FC<React.PropsWithChildren<IInstructionsProps>>;
|
103
103
|
export default Instructions;
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
3
|
import "core-js/modules/es.array.map.js";
|
4
|
-
|
5
4
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
6
|
-
|
7
5
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
8
|
-
import React from 'react';
|
6
|
+
import * as React from 'react';
|
9
7
|
import { Grid, GridColumn, Header, NavArrow, Paragraph, Tile } from '@megafon/ui-core';
|
10
8
|
import { cnCreate, filterDataAttrs, titleConvertConfig, convert, textConvertConfig } from '@megafon/ui-helpers';
|
11
|
-
import PropTypes from 'prop-types';
|
12
9
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
13
10
|
import "./Instructions.css";
|
14
11
|
export var pictureAlignTypes = {
|
@@ -47,51 +44,47 @@ export var elementOrderTypes = {
|
|
47
44
|
var testIdPrefix = 'Instructions';
|
48
45
|
var cn = cnCreate('mfui-instructions');
|
49
46
|
var swiperSlideCn = cn('slide');
|
50
|
-
|
51
47
|
var Instructions = function Instructions(_ref) {
|
52
48
|
var dataAttrs = _ref.dataAttrs,
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
49
|
+
rootRef = _ref.rootRef,
|
50
|
+
_ref$classes = _ref.classes,
|
51
|
+
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
52
|
+
instructionItem = _ref$classes2.instructionItem,
|
53
|
+
desktopInstructionItem = _ref$classes2.desktopInstructionItem,
|
54
|
+
mobileInstructionItem = _ref$classes2.mobileInstructionItem,
|
55
|
+
activeInstructionItem = _ref$classes2.activeInstructionItem,
|
56
|
+
desktopItemTitle = _ref$classes2.desktopItemTitle,
|
57
|
+
mobileItemTitle = _ref$classes2.mobileItemTitle,
|
58
|
+
instructionItemImg = _ref$classes2.instructionItemImg,
|
59
|
+
additionalText = _ref$classes2.additionalText,
|
60
|
+
arrowPrev = _ref$classes2.arrowPrev,
|
61
|
+
arrowNext = _ref$classes2.arrowNext,
|
62
|
+
_ref$title = _ref.title,
|
63
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
64
|
+
instructionItems = _ref.instructionItems,
|
65
|
+
_ref$pictureAlign = _ref.pictureAlign,
|
66
|
+
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
67
|
+
_ref$pictureVerticalA = _ref.pictureVerticalAlign,
|
68
|
+
pictureVerticalAlign = _ref$pictureVerticalA === void 0 ? 'center' : _ref$pictureVerticalA,
|
69
|
+
_ref$pictureMask = _ref.pictureMask,
|
70
|
+
pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
|
71
|
+
pictureBackgroundColor = _ref.pictureBackgroundColor,
|
72
|
+
getSwiper = _ref.getSwiper,
|
73
|
+
text = _ref.additionalText,
|
74
|
+
showArrows = _ref.showArrows,
|
75
|
+
_ref$arrowsTheme = _ref.arrowsTheme,
|
76
|
+
arrowsTheme = _ref$arrowsTheme === void 0 ? arrowTheme.DARK : _ref$arrowsTheme,
|
77
|
+
_ref$elementOrder = _ref.elementOrder,
|
78
|
+
elementOrder = _ref$elementOrder === void 0 ? 'default' : _ref$elementOrder,
|
79
|
+
children = _ref.children;
|
85
80
|
var _React$useState = React.useState(),
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
81
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
82
|
+
swiperInstance = _React$useState2[0],
|
83
|
+
setSwiperInstance = _React$useState2[1];
|
90
84
|
var _React$useState3 = React.useState(0),
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
85
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
86
|
+
slideIndex = _React$useState4[0],
|
87
|
+
setSlideIndex = _React$useState4[1];
|
95
88
|
var isMobileReversed = elementOrder === 'reversed';
|
96
89
|
var getSwiperInstance = React.useCallback(function (swiper) {
|
97
90
|
setSwiperInstance(swiper);
|
@@ -101,7 +94,6 @@ var Instructions = function Instructions(_ref) {
|
|
101
94
|
if (articleIndex !== activeIndex) {
|
102
95
|
return undefined;
|
103
96
|
}
|
104
|
-
|
105
97
|
return activeInstructionItem;
|
106
98
|
}, [activeInstructionItem]);
|
107
99
|
var handleArticleClick = React.useCallback(function (ind) {
|
@@ -118,14 +110,12 @@ var Instructions = function Instructions(_ref) {
|
|
118
110
|
if (!swiperInstance) {
|
119
111
|
return;
|
120
112
|
}
|
121
|
-
|
122
113
|
swiperInstance.slidePrev();
|
123
114
|
}, [swiperInstance]);
|
124
115
|
var handleNextClick = React.useCallback(function () {
|
125
116
|
if (!swiperInstance) {
|
126
117
|
return;
|
127
118
|
}
|
128
|
-
|
129
119
|
swiperInstance.slideNext();
|
130
120
|
}, [swiperInstance]);
|
131
121
|
var renderVideo = React.useCallback(function (mediaUrl, index) {
|
@@ -167,8 +157,8 @@ var Instructions = function Instructions(_ref) {
|
|
167
157
|
className: cn('swiper')
|
168
158
|
}, instructionItems.map(function (_ref3, i) {
|
169
159
|
var mediaUrl = _ref3.mediaUrl,
|
170
|
-
|
171
|
-
|
160
|
+
isVideo = _ref3.isVideo,
|
161
|
+
imageAlt = _ref3.imageAlt;
|
172
162
|
return /*#__PURE__*/React.createElement(SwiperSlide, {
|
173
163
|
className: swiperSlideCn,
|
174
164
|
key: i + mediaUrl
|
@@ -191,7 +181,7 @@ var Instructions = function Instructions(_ref) {
|
|
191
181
|
var renderQrCode = React.useCallback(function () {
|
192
182
|
return /*#__PURE__*/React.createElement(React.Fragment, null, instructionItems.map(function (_ref4, i) {
|
193
183
|
var qrCode = _ref4.qrCode,
|
194
|
-
|
184
|
+
qrCodeText = _ref4.qrCodeText;
|
195
185
|
return slideIndex === i && !!qrCode && /*#__PURE__*/React.createElement(Tile, {
|
196
186
|
className: cn('qr-code'),
|
197
187
|
radius: "rounded",
|
@@ -216,7 +206,6 @@ var Instructions = function Instructions(_ref) {
|
|
216
206
|
if (pictureMask === pictureMaskTypes.NONE) {
|
217
207
|
return renderSlider();
|
218
208
|
}
|
219
|
-
|
220
209
|
return /*#__PURE__*/React.createElement("div", {
|
221
210
|
className: cn('img-wrapper'),
|
222
211
|
"data-testid": "".concat(testIdPrefix, "-img-wrapper")
|
@@ -323,46 +312,4 @@ var Instructions = function Instructions(_ref) {
|
|
323
312
|
})
|
324
313
|
}, !!title && renderTitle('desktop'), !isMobileReversed && renderMobileArticles(), renderDesktopArticles(), text && renderText(), children)))));
|
325
314
|
};
|
326
|
-
|
327
|
-
Instructions.propTypes = {
|
328
|
-
dataAttrs: PropTypes.shape({
|
329
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
330
|
-
item: PropTypes.objectOf(PropTypes.string.isRequired),
|
331
|
-
image: PropTypes.objectOf(PropTypes.string.isRequired),
|
332
|
-
mobileItemText: PropTypes.objectOf(PropTypes.string.isRequired),
|
333
|
-
wrapper: PropTypes.objectOf(PropTypes.string.isRequired),
|
334
|
-
arrowPrev: PropTypes.objectOf(PropTypes.string.isRequired),
|
335
|
-
arrowNext: PropTypes.objectOf(PropTypes.string.isRequired)
|
336
|
-
}),
|
337
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
338
|
-
current: PropTypes.elementType
|
339
|
-
}), PropTypes.any])]),
|
340
|
-
classes: PropTypes.shape({
|
341
|
-
instructionItem: PropTypes.string,
|
342
|
-
desktopInstructionItem: PropTypes.string,
|
343
|
-
mobileInstructionItem: PropTypes.string,
|
344
|
-
activeInstructionItem: PropTypes.string,
|
345
|
-
desktopItemTitle: PropTypes.string,
|
346
|
-
mobileItemTitle: PropTypes.string,
|
347
|
-
instructionItemImg: PropTypes.string,
|
348
|
-
arrowPrev: PropTypes.string,
|
349
|
-
arrowNext: PropTypes.string
|
350
|
-
}),
|
351
|
-
title: PropTypes.string,
|
352
|
-
additionalText: PropTypes.string,
|
353
|
-
instructionItems: PropTypes.arrayOf(PropTypes.shape({
|
354
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired,
|
355
|
-
mediaUrl: PropTypes.string.isRequired,
|
356
|
-
isVideo: PropTypes.bool.isRequired,
|
357
|
-
imageAlt: PropTypes.string
|
358
|
-
}).isRequired).isRequired,
|
359
|
-
pictureAlign: PropTypes.oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
360
|
-
pictureVerticalAlign: PropTypes.oneOf([pictureVerticalAlignTypes.CENTER, pictureVerticalAlignTypes.TOP, pictureVerticalAlignTypes.UNSET]),
|
361
|
-
pictureMask: PropTypes.oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.ANDROID_CROPPED, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.LAPTOP_NEW, pictureMaskTypes.IPHONE_12, pictureMaskTypes.IPHONE_15, pictureMaskTypes.IPHONE_CROPPED, pictureMaskTypes.NONE]),
|
362
|
-
pictureBackgroundColor: PropTypes.oneOf([pictureBackgroundColorTypes.SPB_SKY_0]),
|
363
|
-
showArrows: PropTypes.bool,
|
364
|
-
arrowsTheme: PropTypes.oneOf([arrowTheme.DARK, arrowTheme.PURPLE]),
|
365
|
-
elementOrder: PropTypes.oneOf([elementOrderTypes.DEFAULT, elementOrderTypes.REVERSED]),
|
366
|
-
getSwiper: PropTypes.func
|
367
|
-
};
|
368
315
|
export default Instructions;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Notification } from '@megafon/ui-core';
|
3
|
-
import './
|
3
|
+
import './NotificationBox.scss';
|
4
4
|
export declare const Align: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly CENTER: "center";
|
7
7
|
};
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
type AlignType = (typeof Align)[keyof typeof Align];
|
9
|
+
type NotificationProps = React.ComponentProps<typeof Notification>;
|
10
|
+
type NotificationBoxProps = Omit<NotificationProps, 'isColored'> & {
|
11
11
|
/** Горизонтальное выравнивание */
|
12
12
|
align?: AlignType;
|
13
13
|
};
|
@@ -1,37 +1,27 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import "core-js/modules/es.array.index-of.js";
|
3
2
|
import "core-js/modules/es.symbol.js";
|
4
|
-
import "core-js/modules/es.
|
5
|
-
|
3
|
+
import "core-js/modules/es.array.index-of.js";
|
6
4
|
var __rest = this && this.__rest || function (s, e) {
|
7
5
|
var t = {};
|
8
|
-
|
9
|
-
for (var p in s) {
|
10
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
11
|
-
}
|
12
|
-
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
13
7
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
14
8
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
15
9
|
}
|
16
10
|
return t;
|
17
11
|
};
|
18
|
-
|
19
12
|
import * as React from 'react';
|
20
13
|
import { Notification } from '@megafon/ui-core';
|
21
14
|
import { cnCreate } from '@megafon/ui-helpers';
|
22
|
-
import
|
23
|
-
import "./style/NotificationBox.css";
|
15
|
+
import "./NotificationBox.css";
|
24
16
|
export var Align = {
|
25
17
|
LEFT: 'left',
|
26
18
|
CENTER: 'center'
|
27
19
|
};
|
28
20
|
var cn = cnCreate('mfui-notification-box');
|
29
|
-
|
30
21
|
var NotificationBox = function NotificationBox(_a) {
|
31
22
|
var _a$align = _a.align,
|
32
|
-
|
33
|
-
|
34
|
-
|
23
|
+
align = _a$align === void 0 ? 'left' : _a$align,
|
24
|
+
restProps = __rest(_a, ["align"]);
|
35
25
|
return /*#__PURE__*/React.createElement("div", {
|
36
26
|
className: cn({
|
37
27
|
align: align
|
@@ -42,8 +32,4 @@ var NotificationBox = function NotificationBox(_a) {
|
|
42
32
|
isColored: false
|
43
33
|
}))));
|
44
34
|
};
|
45
|
-
|
46
|
-
NotificationBox.propTypes = {
|
47
|
-
align: PropTypes.oneOf(Object.values(Align))
|
48
|
-
};
|
49
35
|
export default NotificationBox;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './PageTitle.less';
|
3
2
|
import { Props as BreadcrumbsType } from '../Breadcrumbs/Breadcrumbs';
|
4
|
-
|
3
|
+
import './PageTitle.scss';
|
4
|
+
export type PageTitleProps = {
|
5
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
6
6
|
dataAttrs?: {
|
7
7
|
root?: Record<string, string>;
|