@megafon/ui-shared 5.16.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 -354
- package/dist/es/components/Card/Card.d.ts +5 -9
- package/dist/es/components/Card/Card.js +26 -136
- package/dist/es/components/Card/types.d.ts +9 -15
- 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 -3230
- 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 -248
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/es/components/ImageBanner/ImageBanner.js +51 -109
- 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 -29
- 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 -354
- package/dist/lib/components/Card/Card.d.ts +5 -9
- package/dist/lib/components/Card/Card.js +63 -180
- package/dist/lib/components/Card/types.d.ts +9 -15
- 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 -3230
- 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 -248
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/lib/components/ImageBanner/ImageBanner.js +71 -155
- 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 -29
- 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 -3984
- 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,10 +1,9 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import "core-js/modules/es.string.link.js";
|
3
2
|
import "core-js/modules/es.array.map.js";
|
4
|
-
import
|
3
|
+
import "core-js/modules/es.string.link.js";
|
4
|
+
import * as React from 'react';
|
5
5
|
import { Button, Header } from '@megafon/ui-core';
|
6
6
|
import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
|
7
|
-
import PropTypes from 'prop-types';
|
8
7
|
import "./Card.css";
|
9
8
|
var textsConvertConfig = {
|
10
9
|
b: {
|
@@ -33,78 +32,53 @@ var textsConvertConfig = {
|
|
33
32
|
}
|
34
33
|
};
|
35
34
|
var cn = cnCreate('mfui-card');
|
36
|
-
|
37
35
|
var Card = function Card(_ref5) {
|
38
36
|
var dataAttrs = _ref5.dataAttrs,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
onClick = _ref5.onClick;
|
59
|
-
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
37
|
+
className = _ref5.className,
|
38
|
+
classes = _ref5.classes,
|
39
|
+
rootRef = _ref5.rootRef,
|
40
|
+
_ref5$isFullHeight = _ref5.isFullHeight,
|
41
|
+
isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
|
42
|
+
link = _ref5.link,
|
43
|
+
_ref5$view = _ref5.view,
|
44
|
+
view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
|
45
|
+
image = _ref5.image,
|
46
|
+
icon = _ref5.icon,
|
47
|
+
title = _ref5.title,
|
48
|
+
textsList = _ref5.textsList,
|
49
|
+
featuresList = _ref5.featuresList,
|
50
|
+
iconsList = _ref5.iconsList,
|
51
|
+
price = _ref5.price,
|
52
|
+
button = _ref5.button,
|
53
|
+
extraButton = _ref5.extraButton,
|
54
|
+
onClick = _ref5.onClick;
|
55
|
+
var isOnlyTitle = !image && !icon && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
60
56
|
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
61
57
|
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
62
58
|
var ElementType = isLink ? 'a' : 'div';
|
63
|
-
|
64
59
|
var renderImage = function renderImage() {
|
65
60
|
if (!image) {
|
66
61
|
return null;
|
67
62
|
}
|
68
|
-
|
69
|
-
var _image$position = image.position,
|
70
|
-
position = _image$position === void 0 ? 'top' : _image$position,
|
71
|
-
src = image.src,
|
72
|
-
alt = image.alt;
|
73
63
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
74
64
|
className: cn('img-box', {
|
75
|
-
position: position
|
65
|
+
position: image.position
|
76
66
|
})
|
77
67
|
}), /*#__PURE__*/React.createElement("img", {
|
78
68
|
className: cn('img'),
|
79
|
-
src: src,
|
80
|
-
alt: alt
|
69
|
+
src: image.src,
|
70
|
+
alt: image.alt
|
81
71
|
}));
|
82
72
|
};
|
83
|
-
|
84
73
|
var renderIcon = function renderIcon() {
|
85
74
|
if (!icon) {
|
86
75
|
return null;
|
87
76
|
}
|
88
|
-
|
89
77
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
90
78
|
className: cn('icon')
|
91
79
|
}), icon);
|
92
80
|
};
|
93
|
-
|
94
81
|
var renderContent = function renderContent() {
|
95
|
-
if (markerList) {
|
96
|
-
return /*#__PURE__*/React.createElement("ul", {
|
97
|
-
className: cn('marker-list')
|
98
|
-
}, markerList.map(function (item, i) {
|
99
|
-
return /*#__PURE__*/React.createElement("li", {
|
100
|
-
className: cn('marker-item'),
|
101
|
-
key: i
|
102
|
-
}, convert(item.title, {}), !!item.note && /*#__PURE__*/React.createElement("span", {
|
103
|
-
className: cn('marker-note')
|
104
|
-
}, convert(item.note, {})));
|
105
|
-
}));
|
106
|
-
}
|
107
|
-
|
108
82
|
if (textsList) {
|
109
83
|
return /*#__PURE__*/React.createElement("div", {
|
110
84
|
className: cn('texts')
|
@@ -119,7 +93,6 @@ var Card = function Card(_ref5) {
|
|
119
93
|
}, convert(item.desc, textsConvertConfig)));
|
120
94
|
}));
|
121
95
|
}
|
122
|
-
|
123
96
|
if (featuresList) {
|
124
97
|
return /*#__PURE__*/React.createElement("div", {
|
125
98
|
className: cn('features')
|
@@ -140,7 +113,6 @@ var Card = function Card(_ref5) {
|
|
140
113
|
}, item.value)));
|
141
114
|
})), featuresList.desc);
|
142
115
|
}
|
143
|
-
|
144
116
|
if (iconsList) {
|
145
117
|
return /*#__PURE__*/React.createElement("div", {
|
146
118
|
className: cn('icons')
|
@@ -159,15 +131,12 @@ var Card = function Card(_ref5) {
|
|
159
131
|
}, item.text));
|
160
132
|
})));
|
161
133
|
}
|
162
|
-
|
163
134
|
return null;
|
164
135
|
};
|
165
|
-
|
166
136
|
var renderPrice = function renderPrice() {
|
167
137
|
if (!price) {
|
168
138
|
return null;
|
169
139
|
}
|
170
|
-
|
171
140
|
return /*#__PURE__*/React.createElement("div", {
|
172
141
|
className: cn('price')
|
173
142
|
}, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
|
@@ -178,12 +147,10 @@ var Card = function Card(_ref5) {
|
|
178
147
|
className: cn('price-period')
|
179
148
|
}, price.period));
|
180
149
|
};
|
181
|
-
|
182
150
|
var renderButtons = function renderButtons() {
|
183
151
|
if (!button && !extraButton) {
|
184
152
|
return null;
|
185
153
|
}
|
186
|
-
|
187
154
|
return /*#__PURE__*/React.createElement("div", {
|
188
155
|
className: cn('buttons', {
|
189
156
|
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
@@ -207,17 +174,14 @@ var Card = function Card(_ref5) {
|
|
207
174
|
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
208
175
|
}, extraButton.title));
|
209
176
|
};
|
210
|
-
|
211
177
|
var renderFooter = function renderFooter() {
|
212
178
|
if (!price && !button && !extraButton && !image) {
|
213
179
|
return null;
|
214
180
|
}
|
215
|
-
|
216
181
|
return /*#__PURE__*/React.createElement("div", {
|
217
182
|
className: cn('footer')
|
218
183
|
}, isBottomImage && renderImage(), renderPrice(), renderButtons());
|
219
184
|
};
|
220
|
-
|
221
185
|
return /*#__PURE__*/React.createElement(ElementType, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
222
186
|
className: cn({
|
223
187
|
'only-title': isOnlyTitle,
|
@@ -229,84 +193,10 @@ var Card = function Card(_ref5) {
|
|
229
193
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
230
194
|
onClick: isLink ? onClick : undefined,
|
231
195
|
ref: rootRef
|
232
|
-
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement(
|
233
|
-
className: cn('header')
|
234
|
-
}, /*#__PURE__*/React.createElement(Header, {
|
196
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement(Header, {
|
235
197
|
className: cn('title'),
|
236
198
|
as: "h3",
|
237
199
|
align: title.align
|
238
|
-
}, title.text),
|
239
|
-
};
|
240
|
-
|
241
|
-
Card.propTypes = {
|
242
|
-
dataAttrs: PropTypes.shape({
|
243
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
244
|
-
icon: PropTypes.objectOf(PropTypes.string.isRequired),
|
245
|
-
imgBox: PropTypes.objectOf(PropTypes.string.isRequired),
|
246
|
-
button: PropTypes.objectOf(PropTypes.string.isRequired),
|
247
|
-
extraButton: PropTypes.objectOf(PropTypes.string.isRequired)
|
248
|
-
}),
|
249
|
-
className: PropTypes.string,
|
250
|
-
classes: PropTypes.shape({
|
251
|
-
root: PropTypes.string,
|
252
|
-
button: PropTypes.string,
|
253
|
-
extraButton: PropTypes.string
|
254
|
-
}),
|
255
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
256
|
-
current: PropTypes.elementType
|
257
|
-
}), PropTypes.any])]),
|
258
|
-
view: PropTypes.oneOf(['shadow', 'background']),
|
259
|
-
link: PropTypes.shape({
|
260
|
-
href: PropTypes.string,
|
261
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
|
262
|
-
}),
|
263
|
-
image: PropTypes.shape({
|
264
|
-
src: PropTypes.string.isRequired,
|
265
|
-
alt: PropTypes.string,
|
266
|
-
position: PropTypes.oneOf(['top', 'bottom'])
|
267
|
-
}),
|
268
|
-
icon: PropTypes.node,
|
269
|
-
title: PropTypes.shape({
|
270
|
-
text: PropTypes.string.isRequired,
|
271
|
-
align: PropTypes.oneOf(['left', 'center'])
|
272
|
-
}).isRequired,
|
273
|
-
textsList: PropTypes.arrayOf(PropTypes.shape({
|
274
|
-
title: PropTypes.string,
|
275
|
-
desc: PropTypes.string.isRequired
|
276
|
-
}).isRequired),
|
277
|
-
featuresList: PropTypes.shape({
|
278
|
-
desc: PropTypes.string,
|
279
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
280
|
-
title: PropTypes.string.isRequired,
|
281
|
-
value: PropTypes.string.isRequired
|
282
|
-
}).isRequired).isRequired
|
283
|
-
}),
|
284
|
-
iconsList: PropTypes.shape({
|
285
|
-
desc: PropTypes.string,
|
286
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
287
|
-
icon: PropTypes.node.isRequired,
|
288
|
-
text: PropTypes.string.isRequired
|
289
|
-
}).isRequired).isRequired
|
290
|
-
}),
|
291
|
-
price: PropTypes.shape({
|
292
|
-
oldValue: PropTypes.string,
|
293
|
-
value: PropTypes.string.isRequired,
|
294
|
-
period: PropTypes.string
|
295
|
-
}),
|
296
|
-
button: PropTypes.shape({
|
297
|
-
title: PropTypes.string.isRequired,
|
298
|
-
href: PropTypes.string,
|
299
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
300
|
-
isCentered: PropTypes.bool,
|
301
|
-
onClick: PropTypes.func
|
302
|
-
}),
|
303
|
-
extraButton: PropTypes.shape({
|
304
|
-
title: PropTypes.string.isRequired,
|
305
|
-
href: PropTypes.string,
|
306
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
307
|
-
isCentered: PropTypes.bool,
|
308
|
-
onClick: PropTypes.func
|
309
|
-
}),
|
310
|
-
onClick: PropTypes.func
|
200
|
+
}, title.text), renderContent(), renderFooter());
|
311
201
|
};
|
312
202
|
export default Card;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
3
|
-
export
|
2
|
+
type Target = '_self' | '_blank' | '_parent' | '_top';
|
3
|
+
export type Link = {
|
4
4
|
/** Ссылка */
|
5
5
|
href?: string;
|
6
6
|
/** Target свойство ссылки */
|
7
7
|
target?: Target;
|
8
8
|
};
|
9
|
-
export
|
9
|
+
export type Image = {
|
10
10
|
/** Ссылка на изображение */
|
11
11
|
src: string;
|
12
12
|
/** Значение тега alt для изображения */
|
@@ -14,25 +14,19 @@ export declare type Image = {
|
|
14
14
|
/** Позиция изображения */
|
15
15
|
position?: 'top' | 'bottom';
|
16
16
|
};
|
17
|
-
export
|
17
|
+
export type Title = {
|
18
18
|
/** Текст */
|
19
19
|
text: string;
|
20
20
|
/** Выравнивание */
|
21
21
|
align?: 'left' | 'center';
|
22
22
|
};
|
23
|
-
export
|
24
|
-
/** Заголовок */
|
25
|
-
title: string;
|
26
|
-
/** Примечание */
|
27
|
-
note?: string;
|
28
|
-
}[];
|
29
|
-
export declare type TextsList = {
|
23
|
+
export type TextsList = {
|
30
24
|
/** Заголовок */
|
31
25
|
title?: string;
|
32
26
|
/** Описание */
|
33
27
|
desc: string;
|
34
28
|
}[];
|
35
|
-
export
|
29
|
+
export type FeaturesList = {
|
36
30
|
/** Список */
|
37
31
|
items: {
|
38
32
|
/** Заголовок */
|
@@ -43,7 +37,7 @@ export declare type FeaturesList = {
|
|
43
37
|
/** Описание */
|
44
38
|
desc?: string;
|
45
39
|
};
|
46
|
-
export
|
40
|
+
export type IconsList = {
|
47
41
|
/** Список */
|
48
42
|
items: {
|
49
43
|
/** Иконка */
|
@@ -54,7 +48,7 @@ export declare type IconsList = {
|
|
54
48
|
/** Описание */
|
55
49
|
desc?: string;
|
56
50
|
};
|
57
|
-
export
|
51
|
+
export type Price = {
|
58
52
|
/** Старая цена */
|
59
53
|
oldValue?: string;
|
60
54
|
/** Текущая цена */
|
@@ -62,7 +56,7 @@ export declare type Price = {
|
|
62
56
|
/** Период */
|
63
57
|
period?: string;
|
64
58
|
};
|
65
|
-
export
|
59
|
+
export type ButtonType = {
|
66
60
|
/** Название */
|
67
61
|
title: string;
|
68
62
|
/** Ссылка */
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -3,15 +3,13 @@ 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, filterDataAttrs } from '@megafon/ui-helpers';
|
6
|
-
import * as PropTypes from 'prop-types';
|
7
6
|
import getColumnConfig from "./helpers";
|
8
7
|
var cn = cnCreate('mfui-cards-box');
|
9
|
-
|
10
8
|
var CardsBox = function CardsBox(_ref) {
|
11
9
|
var _ref$renderTwoColumns = _ref.renderTwoColumnsInRow,
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
|
11
|
+
dataAttrs = _ref.dataAttrs,
|
12
|
+
children = _ref.children;
|
15
13
|
return /*#__PURE__*/React.createElement("div", _extends({
|
16
14
|
className: cn()
|
17
15
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(Grid, {
|
@@ -25,13 +23,4 @@ var CardsBox = function CardsBox(_ref) {
|
|
25
23
|
}, getColumnConfig(React.Children.count(children), i, renderTwoColumnsInRow)), child);
|
26
24
|
})));
|
27
25
|
};
|
28
|
-
|
29
|
-
CardsBox.propTypes = {
|
30
|
-
renderTwoColumnsInRow: PropTypes.bool,
|
31
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired,
|
32
|
-
dataAttrs: PropTypes.shape({
|
33
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
34
|
-
column: PropTypes.objectOf(PropTypes.string.isRequired)
|
35
|
-
})
|
36
|
-
};
|
37
26
|
export default CardsBox;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
2
|
+
type GridConfig = {
|
3
3
|
all?: TGridSizeValues;
|
4
4
|
tablet?: TGridSizeValues;
|
5
5
|
mobile?: TGridSizeValues;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
|
3
2
|
var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
|
4
3
|
var offset = renderTwoColumnsInRow ? '2' : undefined;
|
5
4
|
var offsetForEvenColumn = index % 2 ? undefined : offset;
|
@@ -8,7 +7,6 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
8
7
|
tablet: '6',
|
9
8
|
mobile: '12'
|
10
9
|
};
|
11
|
-
|
12
10
|
switch (count) {
|
13
11
|
case 2:
|
14
12
|
case 4:
|
@@ -16,10 +14,8 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
16
14
|
leftOffsetWide: offsetForEvenColumn,
|
17
15
|
leftOffsetDesktop: offsetForEvenColumn
|
18
16
|
});
|
19
|
-
|
20
17
|
default:
|
21
18
|
return _extends({}, columnSize);
|
22
19
|
}
|
23
20
|
};
|
24
|
-
|
25
21
|
export default getColumnConfig;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Carousel } from '@megafon/ui-core';
|
3
|
-
|
4
|
-
|
3
|
+
type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
|
4
|
+
type DesktopSlidesPerView = 3 | 4;
|
5
5
|
interface ICarouselBox extends CarouselPropsTypes {
|
6
6
|
/** Количество видимых слайдов на разрешении 1280 и выше */
|
7
7
|
desktopSlidesPerView?: DesktopSlidesPerView;
|
@@ -1,52 +1,40 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
import "core-js/modules/es.array.index-of.js";
|
4
3
|
import "core-js/modules/es.symbol.js";
|
5
|
-
|
4
|
+
import "core-js/modules/es.array.index-of.js";
|
6
5
|
var __rest = this && this.__rest || function (s, e) {
|
7
6
|
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
|
-
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
13
8
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
14
9
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
15
10
|
}
|
16
11
|
return t;
|
17
12
|
};
|
18
|
-
|
19
13
|
import * as React from 'react';
|
20
14
|
import { Carousel } from '@megafon/ui-core';
|
21
15
|
import { cnCreate, breakpoints } from '@megafon/ui-helpers';
|
22
|
-
|
23
16
|
var getDefaultSlideSettings = function getDefaultSlideSettings(desktopSlidesPerView) {
|
24
|
-
|
25
|
-
|
26
|
-
return _ref = {}, _defineProperty(_ref, breakpoints.MOBILE_SMALL_START, {
|
17
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, breakpoints.MOBILE_SMALL_START, {
|
27
18
|
slidesPerView: 1,
|
28
19
|
spaceBetween: 16
|
29
|
-
}),
|
20
|
+
}), breakpoints.MOBILE_BIG_START, {
|
30
21
|
slidesPerView: 2,
|
31
22
|
spaceBetween: 20
|
32
|
-
}),
|
23
|
+
}), breakpoints.DESKTOP_SMALL_START, {
|
33
24
|
slidesPerView: 3,
|
34
25
|
spaceBetween: 20
|
35
|
-
}),
|
26
|
+
}), breakpoints.DESKTOP_MIDDLE_START, {
|
36
27
|
slidesPerView: desktopSlidesPerView,
|
37
28
|
spaceBetween: 20
|
38
|
-
})
|
29
|
+
});
|
39
30
|
};
|
40
|
-
|
41
31
|
var cn = cnCreate('mfui-carousel-box');
|
42
|
-
|
43
32
|
var CarouselBox = function CarouselBox(_a) {
|
44
33
|
var children = _a.children,
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
34
|
+
slidesSettings = _a.slidesSettings,
|
35
|
+
_a$desktopSlidesPerVi = _a.desktopSlidesPerView,
|
36
|
+
desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
|
37
|
+
props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
|
50
38
|
var settings = slidesSettings || getDefaultSlideSettings(desktopSlidesPerView);
|
51
39
|
return /*#__PURE__*/React.createElement("div", {
|
52
40
|
className: cn()
|
@@ -54,5 +42,4 @@ var CarouselBox = function CarouselBox(_a) {
|
|
54
42
|
slidesSettings: settings
|
55
43
|
}), children));
|
56
44
|
};
|
57
|
-
|
58
45
|
export default CarouselBox;
|