@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
@@ -4,39 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
|
-
|
8
|
-
require("core-js/modules/es.parse-int.js");
|
9
|
-
|
10
7
|
require("core-js/modules/es.array.concat.js");
|
11
|
-
|
8
|
+
require("core-js/modules/es.parse-int.js");
|
12
9
|
var getMinutes = function getMinutes(sec) {
|
13
10
|
var min = parseInt("".concat(sec / 60), 10);
|
14
|
-
|
15
11
|
if (min < 10) {
|
16
12
|
return "0".concat(min);
|
17
13
|
}
|
18
|
-
|
19
14
|
return "".concat(min);
|
20
15
|
};
|
21
16
|
/**
|
22
17
|
* @param {Number} sec
|
23
18
|
* @returns {String}
|
24
19
|
*/
|
25
|
-
|
26
|
-
|
27
20
|
var getSeconds = function getSeconds(sec) {
|
28
21
|
if (sec < 10) {
|
29
22
|
return "0".concat(sec);
|
30
23
|
}
|
31
|
-
|
32
24
|
return "".concat(sec);
|
33
25
|
};
|
34
|
-
|
35
26
|
var timerFormat = function timerFormat(sec) {
|
36
27
|
var min = getMinutes(sec);
|
37
28
|
var seconds = getSeconds(sec % 60);
|
38
29
|
return "".concat(min, ":").concat(seconds);
|
39
30
|
};
|
40
|
-
|
41
|
-
var _default = timerFormat;
|
42
|
-
exports["default"] = _default;
|
31
|
+
var _default = exports["default"] = timerFormat;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Banner } from '@megafon/ui-core';
|
3
|
-
|
3
|
+
type BannerBoxProps = React.ComponentProps<typeof Banner>;
|
4
4
|
declare const BannerBox: React.FC<BannerBoxProps>;
|
5
5
|
export default BannerBox;
|
@@ -1,49 +1,31 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = void 0;
|
9
|
-
|
10
|
-
require("core-js/modules/es.array.index-of.js");
|
11
|
-
|
12
8
|
require("core-js/modules/es.symbol.js");
|
13
|
-
|
9
|
+
require("core-js/modules/es.array.index-of.js");
|
14
10
|
var React = _interopRequireWildcard(require("react"));
|
15
|
-
|
16
11
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
12
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
function
|
21
|
-
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
|
-
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
24
15
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
25
16
|
var t = {};
|
26
|
-
|
27
|
-
for (var p in s) {
|
28
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
29
|
-
}
|
30
|
-
|
17
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
31
18
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
32
19
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
33
20
|
}
|
34
21
|
return t;
|
35
22
|
};
|
36
|
-
|
37
23
|
var cn = (0, _uiHelpers.cnCreate)('mfui-banner-box');
|
38
|
-
|
39
24
|
var BannerBox = function BannerBox(_a) {
|
40
25
|
var children = _a.children,
|
41
|
-
|
42
|
-
|
26
|
+
props = __rest(_a, ["children"]);
|
43
27
|
return /*#__PURE__*/React.createElement("div", {
|
44
28
|
className: cn()
|
45
29
|
}, /*#__PURE__*/React.createElement(_uiCore.Banner, props, children));
|
46
30
|
};
|
47
|
-
|
48
|
-
var _default = BannerBox;
|
49
|
-
exports["default"] = _default;
|
31
|
+
var _default = exports["default"] = BannerBox;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { IconPosition, IBenefit, BackgroundType } from './types';
|
3
|
-
import './style/BenefitsIcons.
|
3
|
+
import './style/BenefitsIcons.scss';
|
4
4
|
export interface IBenefitsIcons {
|
5
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
6
6
|
dataAttrs?: {
|
@@ -1,71 +1,47 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
-
|
14
10
|
require("core-js/modules/es.array.map.js");
|
15
|
-
|
16
|
-
require("core-js/modules/es.object.values.js");
|
17
|
-
|
18
11
|
var React = _interopRequireWildcard(require("react"));
|
19
|
-
|
20
12
|
var _uiCore = require("@megafon/ui-core");
|
21
|
-
|
22
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
23
|
-
|
24
14
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
25
|
-
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
27
|
-
|
28
15
|
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
29
|
-
|
30
16
|
var _BenefitsIconsTile = _interopRequireDefault(require("./BenefitsIconsTile"));
|
31
|
-
|
32
17
|
var _helpers = _interopRequireWildcard(require("./helpers"));
|
33
|
-
|
34
18
|
var _types = require("./types");
|
35
|
-
|
36
|
-
function
|
37
|
-
|
38
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
39
|
-
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
40
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
41
|
-
|
42
22
|
var testIdPrefix = 'BenefitsIcons';
|
43
23
|
var cn = (0, _uiHelpers.cnCreate)('mfui-benefits-icons');
|
44
|
-
|
45
24
|
var BenefitsIcons = function BenefitsIcons(_ref) {
|
46
25
|
var dataAttrs = _ref.dataAttrs,
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
26
|
+
rootRef = _ref.rootRef,
|
27
|
+
_ref$iconPosition = _ref.iconPosition,
|
28
|
+
iconPosition = _ref$iconPosition === void 0 ? 'left-top' : _ref$iconPosition,
|
29
|
+
_ref$background = _ref.background,
|
30
|
+
background = _ref$background === void 0 ? 'transparent' : _ref$background,
|
31
|
+
_ref$inOneColumn = _ref.inOneColumn,
|
32
|
+
inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
|
33
|
+
items = _ref.items,
|
34
|
+
className = _ref.className,
|
35
|
+
_ref$classes = _ref.classes,
|
36
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
59
37
|
var _React$useState = React.useState(iconPosition === _types.IconPositionEnum.CENTER_TOP ? 'center' : 'left'),
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
38
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
39
|
+
itemsAlign = _React$useState2[0],
|
40
|
+
setItemsAlign = _React$useState2[1];
|
64
41
|
var _React$useState3 = React.useState(iconPosition),
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
42
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
43
|
+
localIconPosition = _React$useState4[0],
|
44
|
+
setLocalIconPosition = _React$useState4[1];
|
69
45
|
var resizeHandler = React.useCallback(function () {
|
70
46
|
if (window.innerWidth <= _uiHelpers.breakpoints.MOBILE_MIDDLE_END) {
|
71
47
|
setItemsAlign(_types.ItemsAlignEnum.CENTER);
|
@@ -77,12 +53,10 @@ var BenefitsIcons = function BenefitsIcons(_ref) {
|
|
77
53
|
}, [iconPosition]);
|
78
54
|
React.useEffect(function () {
|
79
55
|
var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
80
|
-
|
81
56
|
if (inOneColumn) {
|
82
57
|
resizeHandler();
|
83
58
|
window.addEventListener('resize', resizeHandlerThrottled);
|
84
59
|
}
|
85
|
-
|
86
60
|
return function () {
|
87
61
|
window.removeEventListener('resize', resizeHandlerThrottled);
|
88
62
|
};
|
@@ -109,11 +83,11 @@ var BenefitsIcons = function BenefitsIcons(_ref) {
|
|
109
83
|
}
|
110
84
|
}, items.map(function (_ref2, i) {
|
111
85
|
var title = _ref2.title,
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
86
|
+
text = _ref2.text,
|
87
|
+
icon = _ref2.icon,
|
88
|
+
alt = _ref2.alt,
|
89
|
+
itemClasses = _ref2.classes,
|
90
|
+
itemDataAttrs = _ref2.dataAttrs;
|
117
91
|
var columnConfig = inOneColumn ? (0, _helpers.getOneColumnConfig)(iconPosition) : (0, _helpers["default"])(iconPosition, items.length, i);
|
118
92
|
return /*#__PURE__*/React.createElement(_uiCore.GridColumn, (0, _extends2["default"])({
|
119
93
|
className: cn('column', [classes.gridColumn]),
|
@@ -136,38 +110,4 @@ var BenefitsIcons = function BenefitsIcons(_ref) {
|
|
136
110
|
}));
|
137
111
|
}))));
|
138
112
|
};
|
139
|
-
|
140
|
-
BenefitsIcons.propTypes = {
|
141
|
-
dataAttrs: _propTypes["default"].shape({
|
142
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
143
|
-
}),
|
144
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
145
|
-
current: _propTypes["default"].elementType
|
146
|
-
}), _propTypes["default"].any])]),
|
147
|
-
iconPosition: _propTypes["default"].oneOf(Object.values(_types.IconPositionEnum)),
|
148
|
-
background: _propTypes["default"].oneOf(Object.values(_types.BackgroundEnum)),
|
149
|
-
inOneColumn: _propTypes["default"].bool,
|
150
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
151
|
-
dataAttrs: _propTypes["default"].shape({
|
152
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
153
|
-
}),
|
154
|
-
classes: _propTypes["default"].shape({
|
155
|
-
root: _propTypes["default"].string,
|
156
|
-
icon: _propTypes["default"].string,
|
157
|
-
title: _propTypes["default"].string,
|
158
|
-
text: _propTypes["default"].string,
|
159
|
-
contentWrapper: _propTypes["default"].string
|
160
|
-
}),
|
161
|
-
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
162
|
-
text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
163
|
-
icon: _propTypes["default"].node.isRequired,
|
164
|
-
alt: _propTypes["default"].string
|
165
|
-
}).isRequired).isRequired,
|
166
|
-
className: _propTypes["default"].string,
|
167
|
-
classes: _propTypes["default"].shape({
|
168
|
-
root: _propTypes["default"].string,
|
169
|
-
item: _propTypes["default"].string
|
170
|
-
})
|
171
|
-
};
|
172
|
-
var _default = BenefitsIcons;
|
173
|
-
exports["default"] = _default;
|
113
|
+
var _default = exports["default"] = BenefitsIcons;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { IBenefit, IconPosition, BackgroundType } from './types';
|
3
|
-
import './style/BenefitsIconsTile.
|
3
|
+
import './style/BenefitsIconsTile.scss';
|
4
4
|
export interface IBenefitsIconsTile extends IBenefit {
|
5
5
|
iconPosition?: IconPosition;
|
6
6
|
background?: BackgroundType;
|
@@ -1,47 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
|
-
require("core-js/modules/es.object.values.js");
|
13
|
-
|
14
9
|
var React = _interopRequireWildcard(require("react"));
|
15
|
-
|
16
10
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
11
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var
|
21
|
-
|
22
|
-
var _types = require("./types");
|
23
|
-
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
-
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
-
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
28
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
-
|
30
15
|
var testIdPrefix = 'BenefitsIconsTile';
|
31
16
|
var cn = (0, _uiHelpers.cnCreate)('mfui-benefits-icons-tile');
|
32
|
-
|
33
17
|
var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
34
18
|
var dataAttrs = _ref.dataAttrs,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
19
|
+
_ref$classes = _ref.classes,
|
20
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
21
|
+
title = _ref.title,
|
22
|
+
text = _ref.text,
|
23
|
+
icon = _ref.icon,
|
24
|
+
iconPosition = _ref.iconPosition,
|
25
|
+
background = _ref.background,
|
26
|
+
alt = _ref.alt,
|
27
|
+
className = _ref.className;
|
45
28
|
var renderIcon = function renderIcon() {
|
46
29
|
if (typeof icon === 'string') {
|
47
30
|
return /*#__PURE__*/React.createElement("img", {
|
@@ -51,13 +34,11 @@ var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
|
51
34
|
"data-testid": "".concat(testIdPrefix, "-img")
|
52
35
|
});
|
53
36
|
}
|
54
|
-
|
55
37
|
return /*#__PURE__*/React.createElement("div", {
|
56
38
|
className: cn('svg-icon', [classes.icon]),
|
57
39
|
"data-testid": "".concat(testIdPrefix, "-svg")
|
58
40
|
}, icon);
|
59
41
|
};
|
60
|
-
|
61
42
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
62
43
|
className: cn({
|
63
44
|
'icon-position': iconPosition,
|
@@ -76,25 +57,4 @@ var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
|
76
57
|
className: cn('content', [classes.text])
|
77
58
|
}, text))));
|
78
59
|
};
|
79
|
-
|
80
|
-
BenefitsIconsTile.propTypes = {
|
81
|
-
dataAttrs: _propTypes["default"].shape({
|
82
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
83
|
-
}),
|
84
|
-
className: _propTypes["default"].string,
|
85
|
-
classes: _propTypes["default"].shape({
|
86
|
-
root: _propTypes["default"].string,
|
87
|
-
icon: _propTypes["default"].string,
|
88
|
-
title: _propTypes["default"].string,
|
89
|
-
text: _propTypes["default"].string,
|
90
|
-
contentWrapper: _propTypes["default"].string
|
91
|
-
}),
|
92
|
-
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
93
|
-
text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
94
|
-
iconPosition: _propTypes["default"].oneOf(Object.values(_types.IconPositionEnum)),
|
95
|
-
background: _propTypes["default"].oneOf(Object.values(_types.BackgroundEnum)),
|
96
|
-
icon: _propTypes["default"].node.isRequired,
|
97
|
-
alt: _propTypes["default"].string
|
98
|
-
};
|
99
|
-
var _default = BenefitsIconsTile;
|
100
|
-
exports["default"] = _default;
|
60
|
+
var _default = exports["default"] = BenefitsIconsTile;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { GridConfig } from './types';
|
1
|
+
import { GridConfig, IconPosition } from './types';
|
2
2
|
declare const getLeftSideConfig: (count: number, index: number) => GridConfig;
|
3
3
|
declare const getLeftTopConfig: (count: number, index: number) => GridConfig;
|
4
4
|
declare const getCenterTopConfig: (count: number, index: number) => GridConfig;
|
5
|
-
declare const getOneColumnConfig: (iconPosition:
|
6
|
-
declare const getMultiColumnConfig: (iconPosition:
|
5
|
+
declare const getOneColumnConfig: (iconPosition: IconPosition) => GridConfig;
|
6
|
+
declare const getMultiColumnConfig: (iconPosition: IconPosition, count: number, index: number) => GridConfig;
|
7
7
|
export default getMultiColumnConfig;
|
8
8
|
export { getLeftSideConfig, getLeftTopConfig, getCenterTopConfig, getOneColumnConfig };
|
@@ -3,23 +3,18 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.getOneColumnConfig = exports.
|
7
|
-
|
6
|
+
exports.getOneColumnConfig = exports.getLeftTopConfig = exports.getLeftSideConfig = exports.getCenterTopConfig = exports["default"] = void 0;
|
8
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
10
8
|
var _types = require("./types");
|
11
|
-
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
13
|
-
|
14
10
|
// left-aligned column with left side icon
|
15
|
-
var getLeftSideConfig = function getLeftSideConfig(count, index) {
|
11
|
+
var getLeftSideConfig = exports.getLeftSideConfig = function getLeftSideConfig(count, index) {
|
16
12
|
var everySecondWithoutOffset = index % 2 ? '1' : undefined;
|
17
13
|
var columnSize = {
|
18
14
|
wide: '4',
|
19
15
|
desktop: '5',
|
20
16
|
tablet: '10'
|
21
17
|
};
|
22
|
-
|
23
18
|
switch (count) {
|
24
19
|
case 2:
|
25
20
|
case 4:
|
@@ -27,21 +22,16 @@ var getLeftSideConfig = function getLeftSideConfig(count, index) {
|
|
27
22
|
leftOffsetWide: everySecondWithoutOffset,
|
28
23
|
leftOffsetDesktop: everySecondWithoutOffset
|
29
24
|
});
|
30
|
-
|
31
25
|
default:
|
32
26
|
return (0, _extends2["default"])((0, _extends2["default"])({}, columnSize), {
|
33
27
|
leftOffsetDesktop: everySecondWithoutOffset
|
34
28
|
});
|
35
29
|
}
|
36
|
-
};
|
37
|
-
|
38
|
-
|
39
|
-
exports.getLeftSideConfig = getLeftSideConfig;
|
40
|
-
|
41
|
-
var getLeftTopConfig = function getLeftTopConfig(count, index) {
|
30
|
+
};
|
31
|
+
// left-aligned column with left-aligned icon on top
|
32
|
+
var getLeftTopConfig = exports.getLeftTopConfig = function getLeftTopConfig(count, index) {
|
42
33
|
var everySecondWithoutOffset = index % 2 ? '1' : undefined;
|
43
34
|
var everyThirdWithoutOffset = index % 3 ? '1' : undefined;
|
44
|
-
|
45
35
|
switch (count) {
|
46
36
|
case 2:
|
47
37
|
return {
|
@@ -52,7 +42,6 @@ var getLeftTopConfig = function getLeftTopConfig(count, index) {
|
|
52
42
|
leftOffsetDesktop: everySecondWithoutOffset,
|
53
43
|
leftOffsetTablet: everySecondWithoutOffset
|
54
44
|
};
|
55
|
-
|
56
45
|
case 4:
|
57
46
|
return {
|
58
47
|
wide: '3',
|
@@ -61,7 +50,6 @@ var getLeftTopConfig = function getLeftTopConfig(count, index) {
|
|
61
50
|
leftOffsetDesktop: everySecondWithoutOffset,
|
62
51
|
leftOffsetTablet: everySecondWithoutOffset
|
63
52
|
};
|
64
|
-
|
65
53
|
default:
|
66
54
|
return {
|
67
55
|
wide: '3',
|
@@ -71,16 +59,12 @@ var getLeftTopConfig = function getLeftTopConfig(count, index) {
|
|
71
59
|
leftOffsetTablet: everySecondWithoutOffset
|
72
60
|
};
|
73
61
|
}
|
74
|
-
};
|
75
|
-
|
76
|
-
|
77
|
-
exports.getLeftTopConfig = getLeftTopConfig;
|
78
|
-
|
79
|
-
var getCenterTopConfig = function getCenterTopConfig(count, index) {
|
62
|
+
};
|
63
|
+
// center-aligned column with center-aligned icon on top
|
64
|
+
var getCenterTopConfig = exports.getCenterTopConfig = function getCenterTopConfig(count, index) {
|
80
65
|
var isEvenIndex = !(index % 2);
|
81
66
|
var everyEvenWithLeftOffset = isEvenIndex ? '1' : undefined;
|
82
67
|
var everyOddWithRightOffset = isEvenIndex ? undefined : '1';
|
83
|
-
|
84
68
|
switch (count) {
|
85
69
|
case 4:
|
86
70
|
return {
|
@@ -92,7 +76,6 @@ var getCenterTopConfig = function getCenterTopConfig(count, index) {
|
|
92
76
|
rightOffsetTablet: everyOddWithRightOffset,
|
93
77
|
rightOffsetDesktop: everyOddWithRightOffset
|
94
78
|
};
|
95
|
-
|
96
79
|
default:
|
97
80
|
return {
|
98
81
|
wide: '4',
|
@@ -101,10 +84,7 @@ var getCenterTopConfig = function getCenterTopConfig(count, index) {
|
|
101
84
|
};
|
102
85
|
}
|
103
86
|
};
|
104
|
-
|
105
|
-
exports.getCenterTopConfig = getCenterTopConfig;
|
106
|
-
|
107
|
-
var getOneColumnConfig = function getOneColumnConfig(iconPosition) {
|
87
|
+
var getOneColumnConfig = exports.getOneColumnConfig = function getOneColumnConfig(iconPosition) {
|
108
88
|
return iconPosition !== _types.IconPositionEnum.CENTER_TOP ? {
|
109
89
|
wide: '10',
|
110
90
|
desktop: '10',
|
@@ -115,21 +95,14 @@ var getOneColumnConfig = function getOneColumnConfig(iconPosition) {
|
|
115
95
|
tablet: '12'
|
116
96
|
};
|
117
97
|
};
|
118
|
-
|
119
|
-
exports.getOneColumnConfig = getOneColumnConfig;
|
120
|
-
|
121
98
|
var getMultiColumnConfig = function getMultiColumnConfig(iconPosition, count, index) {
|
122
99
|
switch (iconPosition) {
|
123
100
|
case _types.IconPositionEnum.LEFT_TOP:
|
124
101
|
return getLeftTopConfig(count, index);
|
125
|
-
|
126
102
|
case _types.IconPositionEnum.CENTER_TOP:
|
127
103
|
return getCenterTopConfig(count, index);
|
128
|
-
|
129
104
|
default:
|
130
105
|
return getLeftSideConfig(count, index);
|
131
106
|
}
|
132
107
|
};
|
133
|
-
|
134
|
-
var _default = getMultiColumnConfig;
|
135
|
-
exports["default"] = _default;
|
108
|
+
var _default = exports["default"] = getMultiColumnConfig;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
2
|
+
type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
3
3
|
export interface IBenefit {
|
4
4
|
/** Дополнительные data атрибуты к внутренним элементам */
|
5
5
|
dataAttrs?: {
|
@@ -27,20 +27,20 @@ export declare const IconPositionEnum: {
|
|
27
27
|
readonly CENTER_TOP: "center-top";
|
28
28
|
readonly LEFT_SIDE: "left-side";
|
29
29
|
};
|
30
|
-
export
|
30
|
+
export type IconPosition = (typeof IconPositionEnum)[keyof typeof IconPositionEnum];
|
31
31
|
export declare const ItemsAlignEnum: {
|
32
32
|
readonly LEFT: "left";
|
33
33
|
readonly CENTER: "center";
|
34
34
|
};
|
35
|
-
export
|
35
|
+
export type ItemsAlignType = (typeof ItemsAlignEnum)[keyof typeof ItemsAlignEnum];
|
36
36
|
export declare const BackgroundEnum: {
|
37
37
|
readonly TRANSPARENT: "transparent";
|
38
38
|
readonly GRAY: "gray";
|
39
39
|
readonly GREEN: "green";
|
40
40
|
readonly PURPLE: "purple";
|
41
41
|
};
|
42
|
-
export
|
43
|
-
export
|
42
|
+
export type BackgroundType = (typeof BackgroundEnum)[keyof typeof BackgroundEnum];
|
43
|
+
export type GridConfig = {
|
44
44
|
wide?: TGridSizeValues;
|
45
45
|
desktop?: TGridSizeValues;
|
46
46
|
tablet?: TGridSizeValues;
|
@@ -3,22 +3,19 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
var IconPositionEnum = {
|
6
|
+
exports.ItemsAlignEnum = exports.IconPositionEnum = exports.BackgroundEnum = void 0;
|
7
|
+
var IconPositionEnum = exports.IconPositionEnum = {
|
8
8
|
LEFT_TOP: 'left-top',
|
9
9
|
CENTER_TOP: 'center-top',
|
10
10
|
LEFT_SIDE: 'left-side'
|
11
11
|
};
|
12
|
-
exports.
|
13
|
-
var ItemsAlignEnum = {
|
12
|
+
var ItemsAlignEnum = exports.ItemsAlignEnum = {
|
14
13
|
LEFT: 'left',
|
15
14
|
CENTER: 'center'
|
16
15
|
};
|
17
|
-
exports.
|
18
|
-
var BackgroundEnum = {
|
16
|
+
var BackgroundEnum = exports.BackgroundEnum = {
|
19
17
|
TRANSPARENT: 'transparent',
|
20
18
|
GRAY: 'gray',
|
21
19
|
GREEN: 'green',
|
22
20
|
PURPLE: 'purple'
|
23
|
-
};
|
24
|
-
exports.BackgroundEnum = BackgroundEnum;
|
21
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { IBenefit, GridGutterSize } from './types';
|
3
|
-
import './BenfitsPictures.
|
3
|
+
import './BenfitsPictures.scss';
|
4
4
|
export declare const ONLY_LEFT_ALIGN_ITEMS_COUNT = 3;
|
5
5
|
export interface IBenefitsPicturesProps {
|
6
6
|
/** Ссылка на корневой элемент */
|