@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
@@ -1,61 +1,48 @@
|
|
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
|
require("core-js/modules/es.string.link.js");
|
13
|
-
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
15
|
-
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
16
11
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
12
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var
|
21
|
-
|
22
|
-
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); }
|
23
|
-
|
24
|
-
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; }
|
25
|
-
|
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; }
|
26
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
27
|
-
|
28
16
|
var cn = (0, _uiHelpers.cnCreate)('mfui-button-link-box');
|
29
|
-
|
30
17
|
var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
31
18
|
var dataAttrs = _ref.dataAttrs,
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
return /*#__PURE__*/
|
19
|
+
rootRef = _ref.rootRef,
|
20
|
+
buttonTitle = _ref.buttonTitle,
|
21
|
+
buttonUrl = _ref.buttonUrl,
|
22
|
+
buttonDownload = _ref.buttonDownload,
|
23
|
+
_ref$buttonColor = _ref.buttonColor,
|
24
|
+
buttonColor = _ref$buttonColor === void 0 ? 'green' : _ref$buttonColor,
|
25
|
+
buttonRel = _ref.buttonRel,
|
26
|
+
linkTitle = _ref.linkTitle,
|
27
|
+
linkUrl = _ref.linkUrl,
|
28
|
+
linkDownload = _ref.linkDownload,
|
29
|
+
linkRel = _ref.linkRel,
|
30
|
+
align = _ref.align,
|
31
|
+
className = _ref.className,
|
32
|
+
buttonTarget = _ref.buttonTarget,
|
33
|
+
linkTarget = _ref.linkTarget,
|
34
|
+
_ref$classes = _ref.classes,
|
35
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
36
|
+
onButtonClick = _ref.onButtonClick,
|
37
|
+
onLinkClick = _ref.onLinkClick;
|
38
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
52
39
|
className: cn({
|
53
40
|
'h-align': align
|
54
41
|
}, [className, classes.root]),
|
55
42
|
ref: rootRef
|
56
|
-
}), buttonTitle && /*#__PURE__*/
|
43
|
+
}), buttonTitle && /*#__PURE__*/React.createElement("div", {
|
57
44
|
className: cn('row')
|
58
|
-
}, /*#__PURE__*/
|
45
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Button, {
|
59
46
|
dataAttrs: {
|
60
47
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
61
48
|
},
|
@@ -66,9 +53,9 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
66
53
|
target: buttonTarget,
|
67
54
|
download: buttonDownload,
|
68
55
|
rel: buttonRel
|
69
|
-
}, buttonTitle)), linkTitle && /*#__PURE__*/
|
56
|
+
}, buttonTitle)), linkTitle && /*#__PURE__*/React.createElement("div", {
|
70
57
|
className: cn('row')
|
71
|
-
}, /*#__PURE__*/
|
58
|
+
}, /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
72
59
|
dataAttrs: {
|
73
60
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
74
61
|
},
|
@@ -81,34 +68,4 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
81
68
|
onClick: onLinkClick
|
82
69
|
}, linkTitle)));
|
83
70
|
};
|
84
|
-
|
85
|
-
ButtonLinkBox.propTypes = {
|
86
|
-
dataAttrs: PropTypes.shape({
|
87
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
88
|
-
link: PropTypes.objectOf(PropTypes.string.isRequired),
|
89
|
-
button: PropTypes.objectOf(PropTypes.string.isRequired)
|
90
|
-
}),
|
91
|
-
className: PropTypes.string,
|
92
|
-
classes: PropTypes.shape({
|
93
|
-
root: PropTypes.string,
|
94
|
-
button: PropTypes.string,
|
95
|
-
link: PropTypes.string
|
96
|
-
}),
|
97
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
98
|
-
current: PropTypes.elementType
|
99
|
-
}), PropTypes.any])]),
|
100
|
-
buttonTitle: PropTypes.string,
|
101
|
-
buttonUrl: PropTypes.string,
|
102
|
-
buttonDownload: PropTypes.bool,
|
103
|
-
buttonColor: PropTypes.oneOf(['green', 'purple']),
|
104
|
-
buttonRel: PropTypes.string,
|
105
|
-
linkTitle: PropTypes.string,
|
106
|
-
linkUrl: PropTypes.string,
|
107
|
-
linkDownload: PropTypes.bool,
|
108
|
-
linkRel: PropTypes.string,
|
109
|
-
align: PropTypes.oneOf(['center', 'left']),
|
110
|
-
onButtonClick: PropTypes.func,
|
111
|
-
onLinkClick: PropTypes.func
|
112
|
-
};
|
113
|
-
var _default = ButtonLinkBox;
|
114
|
-
exports["default"] = _default;
|
71
|
+
var _default = exports["default"] = ButtonLinkBox;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './Card.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './Card.scss';
|
3
3
|
import { ButtonType, FeaturesList, IconsList, Image, Link, MarkerList, Price, TextsList, Title } from './types';
|
4
4
|
export interface ICard {
|
5
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
@@ -19,7 +19,7 @@ export interface ICard {
|
|
19
19
|
extraButton?: string;
|
20
20
|
};
|
21
21
|
/** Ссылка на корневой элемент */
|
22
|
-
rootRef?: Ref<HTMLDivElement | HTMLAnchorElement>;
|
22
|
+
rootRef?: React.Ref<HTMLDivElement | HTMLAnchorElement>;
|
23
23
|
isFullHeight?: boolean;
|
24
24
|
/** Вид */
|
25
25
|
view?: 'shadow' | 'hover-shadow' | 'background';
|
@@ -46,7 +46,7 @@ export interface ICard {
|
|
46
46
|
/** Дополнительная кнопка */
|
47
47
|
extraButton?: ButtonType;
|
48
48
|
/** Бейдж */
|
49
|
-
badge?: ReactElement;
|
49
|
+
badge?: React.ReactElement;
|
50
50
|
/** Обработчик клика по карточке */
|
51
51
|
onClick?: () => void;
|
52
52
|
}
|
@@ -1,209 +1,188 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
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); }
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
6
7
|
exports["default"] = void 0;
|
7
|
-
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
10
|
-
require("core-js/modules/es.string.link.js");
|
11
|
-
|
12
9
|
require("core-js/modules/es.array.map.js");
|
13
|
-
|
14
|
-
var
|
15
|
-
|
10
|
+
require("core-js/modules/es.string.link.js");
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
16
12
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var
|
21
|
-
|
14
|
+
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); }
|
15
|
+
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; }
|
22
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
|
-
|
24
17
|
var textsConvertConfig = {
|
25
18
|
b: {
|
26
19
|
component: function component(_ref) {
|
27
20
|
var children = _ref.children;
|
28
|
-
return /*#__PURE__*/
|
21
|
+
return /*#__PURE__*/React.createElement("b", null, children);
|
29
22
|
}
|
30
23
|
},
|
31
24
|
ul: {
|
32
25
|
component: function component(_ref2) {
|
33
26
|
var children = _ref2.children;
|
34
|
-
return /*#__PURE__*/
|
27
|
+
return /*#__PURE__*/React.createElement("ul", null, children);
|
35
28
|
}
|
36
29
|
},
|
37
30
|
ol: {
|
38
31
|
component: function component(_ref3) {
|
39
32
|
var children = _ref3.children;
|
40
|
-
return /*#__PURE__*/
|
33
|
+
return /*#__PURE__*/React.createElement("ol", null, children);
|
41
34
|
}
|
42
35
|
},
|
43
36
|
li: {
|
44
37
|
component: function component(_ref4) {
|
45
38
|
var children = _ref4.children;
|
46
|
-
return /*#__PURE__*/
|
39
|
+
return /*#__PURE__*/React.createElement("li", null, children);
|
47
40
|
}
|
48
41
|
}
|
49
42
|
};
|
50
43
|
var cn = (0, _uiHelpers.cnCreate)('mfui-card');
|
51
|
-
|
52
44
|
var Card = function Card(_ref5) {
|
53
45
|
var dataAttrs = _ref5.dataAttrs,
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
46
|
+
className = _ref5.className,
|
47
|
+
classes = _ref5.classes,
|
48
|
+
rootRef = _ref5.rootRef,
|
49
|
+
_ref5$isFullHeight = _ref5.isFullHeight,
|
50
|
+
isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
|
51
|
+
link = _ref5.link,
|
52
|
+
_ref5$view = _ref5.view,
|
53
|
+
view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
|
54
|
+
image = _ref5.image,
|
55
|
+
icon = _ref5.icon,
|
56
|
+
title = _ref5.title,
|
57
|
+
markerList = _ref5.markerList,
|
58
|
+
textsList = _ref5.textsList,
|
59
|
+
featuresList = _ref5.featuresList,
|
60
|
+
iconsList = _ref5.iconsList,
|
61
|
+
price = _ref5.price,
|
62
|
+
button = _ref5.button,
|
63
|
+
extraButton = _ref5.extraButton,
|
64
|
+
badge = _ref5.badge,
|
65
|
+
onClick = _ref5.onClick;
|
74
66
|
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
75
67
|
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
76
68
|
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
77
69
|
var ElementType = isLink ? 'a' : 'div';
|
78
|
-
|
79
70
|
var renderImage = function renderImage() {
|
80
71
|
if (!image) {
|
81
72
|
return null;
|
82
73
|
}
|
83
|
-
|
84
74
|
var _image$position = image.position,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
return /*#__PURE__*/
|
75
|
+
position = _image$position === void 0 ? 'top' : _image$position,
|
76
|
+
src = image.src,
|
77
|
+
alt = image.alt;
|
78
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
89
79
|
className: cn('img-box', {
|
90
80
|
position: position
|
91
81
|
})
|
92
|
-
}), /*#__PURE__*/
|
82
|
+
}), /*#__PURE__*/React.createElement("img", {
|
93
83
|
className: cn('img'),
|
94
84
|
src: src,
|
95
85
|
alt: alt
|
96
86
|
}));
|
97
87
|
};
|
98
|
-
|
99
88
|
var renderIcon = function renderIcon() {
|
100
89
|
if (!icon) {
|
101
90
|
return null;
|
102
91
|
}
|
103
|
-
|
104
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
92
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
105
93
|
className: cn('icon')
|
106
94
|
}), icon);
|
107
95
|
};
|
108
|
-
|
109
96
|
var renderContent = function renderContent() {
|
110
97
|
if (markerList) {
|
111
|
-
return /*#__PURE__*/
|
98
|
+
return /*#__PURE__*/React.createElement("ul", {
|
112
99
|
className: cn('marker-list')
|
113
100
|
}, markerList.map(function (item, i) {
|
114
|
-
return /*#__PURE__*/
|
101
|
+
return /*#__PURE__*/React.createElement("li", {
|
115
102
|
className: cn('marker-item'),
|
116
103
|
key: i
|
117
|
-
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/
|
104
|
+
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/React.createElement("span", {
|
118
105
|
className: cn('marker-note')
|
119
106
|
}, (0, _uiHelpers.convert)(item.note, {})));
|
120
107
|
}));
|
121
108
|
}
|
122
|
-
|
123
109
|
if (textsList) {
|
124
|
-
return /*#__PURE__*/
|
110
|
+
return /*#__PURE__*/React.createElement("div", {
|
125
111
|
className: cn('texts')
|
126
112
|
}, textsList.map(function (item, i) {
|
127
|
-
return /*#__PURE__*/
|
113
|
+
return /*#__PURE__*/React.createElement("div", {
|
128
114
|
className: cn('texts-item'),
|
129
115
|
key: i
|
130
|
-
}, !!item.title && /*#__PURE__*/
|
116
|
+
}, !!item.title && /*#__PURE__*/React.createElement("div", {
|
131
117
|
className: cn('texts-title')
|
132
|
-
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/
|
118
|
+
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
133
119
|
className: cn('texts-desc')
|
134
120
|
}, (0, _uiHelpers.convert)(item.desc, textsConvertConfig)));
|
135
121
|
}));
|
136
122
|
}
|
137
|
-
|
138
123
|
if (featuresList) {
|
139
|
-
return /*#__PURE__*/
|
124
|
+
return /*#__PURE__*/React.createElement("div", {
|
140
125
|
className: cn('features')
|
141
|
-
}, /*#__PURE__*/
|
126
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
142
127
|
className: cn('features-list')
|
143
128
|
}, featuresList.items.map(function (item, i) {
|
144
|
-
return /*#__PURE__*/
|
129
|
+
return /*#__PURE__*/React.createElement("li", {
|
145
130
|
className: cn('features-item'),
|
146
131
|
key: i
|
147
|
-
}, /*#__PURE__*/
|
132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
148
133
|
className: cn('features-item-title')
|
149
|
-
}, /*#__PURE__*/
|
134
|
+
}, /*#__PURE__*/React.createElement("span", {
|
150
135
|
className: cn('features-item-text')
|
151
|
-
}, item.title)), /*#__PURE__*/
|
136
|
+
}, item.title)), /*#__PURE__*/React.createElement("div", {
|
152
137
|
className: cn('features-item-value')
|
153
|
-
}, /*#__PURE__*/
|
138
|
+
}, /*#__PURE__*/React.createElement("span", {
|
154
139
|
className: cn('features-item-text')
|
155
140
|
}, item.value)));
|
156
141
|
})), featuresList.desc);
|
157
142
|
}
|
158
|
-
|
159
143
|
if (iconsList) {
|
160
|
-
return /*#__PURE__*/
|
144
|
+
return /*#__PURE__*/React.createElement("div", {
|
161
145
|
className: cn('icons')
|
162
|
-
}, !!iconsList.desc && /*#__PURE__*/
|
146
|
+
}, !!iconsList.desc && /*#__PURE__*/React.createElement("div", {
|
163
147
|
className: cn('icons-desc')
|
164
|
-
}, iconsList.desc), /*#__PURE__*/
|
148
|
+
}, iconsList.desc), /*#__PURE__*/React.createElement("div", {
|
165
149
|
className: cn('icons-list')
|
166
150
|
}, iconsList.items.map(function (item, i) {
|
167
|
-
return /*#__PURE__*/
|
151
|
+
return /*#__PURE__*/React.createElement("div", {
|
168
152
|
className: cn('icons-item'),
|
169
153
|
key: i
|
170
|
-
}, /*#__PURE__*/
|
154
|
+
}, /*#__PURE__*/React.createElement("div", {
|
171
155
|
className: cn('icons-item-icon')
|
172
|
-
}, item.icon), /*#__PURE__*/
|
156
|
+
}, item.icon), /*#__PURE__*/React.createElement("div", {
|
173
157
|
className: cn('icons-item-text')
|
174
158
|
}, item.text));
|
175
159
|
})));
|
176
160
|
}
|
177
|
-
|
178
161
|
return null;
|
179
162
|
};
|
180
|
-
|
181
163
|
var renderPrice = function renderPrice() {
|
182
164
|
if (!price) {
|
183
165
|
return null;
|
184
166
|
}
|
185
|
-
|
186
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
167
|
+
return /*#__PURE__*/React.createElement("div", {
|
187
168
|
className: cn('price')
|
188
|
-
}, !!price.oldValue && /*#__PURE__*/
|
169
|
+
}, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
|
189
170
|
className: cn('price-old-value')
|
190
|
-
}, price.oldValue), /*#__PURE__*/
|
171
|
+
}, price.oldValue), /*#__PURE__*/React.createElement("div", {
|
191
172
|
className: cn('price-value')
|
192
|
-
}, price.value), !!price.period && /*#__PURE__*/
|
173
|
+
}, price.value), !!price.period && /*#__PURE__*/React.createElement("div", {
|
193
174
|
className: cn('price-period')
|
194
175
|
}, price.period));
|
195
176
|
};
|
196
|
-
|
197
177
|
var renderButtons = function renderButtons() {
|
198
178
|
if (!button && !extraButton) {
|
199
179
|
return null;
|
200
180
|
}
|
201
|
-
|
202
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
181
|
+
return /*#__PURE__*/React.createElement("div", {
|
203
182
|
className: cn('buttons', {
|
204
183
|
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
205
184
|
})
|
206
|
-
}, !!button && /*#__PURE__*/
|
185
|
+
}, !!button && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
207
186
|
dataAttrs: {
|
208
187
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
209
188
|
},
|
@@ -211,7 +190,7 @@ var Card = function Card(_ref5) {
|
|
211
190
|
href: button.href,
|
212
191
|
target: button.target,
|
213
192
|
onClick: button === null || button === void 0 ? void 0 : button.onClick
|
214
|
-
}, button.title), !!extraButton && /*#__PURE__*/
|
193
|
+
}, button.title), !!extraButton && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
215
194
|
dataAttrs: {
|
216
195
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.extraButton
|
217
196
|
},
|
@@ -222,18 +201,15 @@ var Card = function Card(_ref5) {
|
|
222
201
|
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
223
202
|
}, extraButton.title));
|
224
203
|
};
|
225
|
-
|
226
204
|
var renderFooter = function renderFooter() {
|
227
205
|
if (!price && !button && !extraButton && !image) {
|
228
206
|
return null;
|
229
207
|
}
|
230
|
-
|
231
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
208
|
+
return /*#__PURE__*/React.createElement("div", {
|
232
209
|
className: cn('footer')
|
233
210
|
}, isBottomImage && renderImage(), renderPrice(), renderButtons());
|
234
211
|
};
|
235
|
-
|
236
|
-
return /*#__PURE__*/_react["default"].createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
212
|
+
return /*#__PURE__*/React.createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
237
213
|
className: cn({
|
238
214
|
'only-title': isOnlyTitle,
|
239
215
|
view: view,
|
@@ -244,85 +220,12 @@ var Card = function Card(_ref5) {
|
|
244
220
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
245
221
|
onClick: isLink ? onClick : undefined,
|
246
222
|
ref: rootRef
|
247
|
-
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/
|
223
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement("div", {
|
248
224
|
className: cn('header')
|
249
|
-
}, /*#__PURE__*/
|
225
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
250
226
|
className: cn('title'),
|
251
227
|
as: "h3",
|
252
228
|
align: title.align
|
253
229
|
}, title.text), badge), renderContent(), renderFooter());
|
254
230
|
};
|
255
|
-
|
256
|
-
Card.propTypes = {
|
257
|
-
dataAttrs: _propTypes["default"].shape({
|
258
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
259
|
-
icon: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
260
|
-
imgBox: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
261
|
-
button: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
262
|
-
extraButton: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
263
|
-
}),
|
264
|
-
className: _propTypes["default"].string,
|
265
|
-
classes: _propTypes["default"].shape({
|
266
|
-
root: _propTypes["default"].string,
|
267
|
-
button: _propTypes["default"].string,
|
268
|
-
extraButton: _propTypes["default"].string
|
269
|
-
}),
|
270
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
271
|
-
current: _propTypes["default"].elementType
|
272
|
-
}), _propTypes["default"].any])]),
|
273
|
-
view: _propTypes["default"].oneOf(['shadow', 'background']),
|
274
|
-
link: _propTypes["default"].shape({
|
275
|
-
href: _propTypes["default"].string,
|
276
|
-
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top'])
|
277
|
-
}),
|
278
|
-
image: _propTypes["default"].shape({
|
279
|
-
src: _propTypes["default"].string.isRequired,
|
280
|
-
alt: _propTypes["default"].string,
|
281
|
-
position: _propTypes["default"].oneOf(['top', 'bottom'])
|
282
|
-
}),
|
283
|
-
icon: _propTypes["default"].node,
|
284
|
-
title: _propTypes["default"].shape({
|
285
|
-
text: _propTypes["default"].string.isRequired,
|
286
|
-
align: _propTypes["default"].oneOf(['left', 'center'])
|
287
|
-
}).isRequired,
|
288
|
-
textsList: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
289
|
-
title: _propTypes["default"].string,
|
290
|
-
desc: _propTypes["default"].string.isRequired
|
291
|
-
}).isRequired),
|
292
|
-
featuresList: _propTypes["default"].shape({
|
293
|
-
desc: _propTypes["default"].string,
|
294
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
295
|
-
title: _propTypes["default"].string.isRequired,
|
296
|
-
value: _propTypes["default"].string.isRequired
|
297
|
-
}).isRequired).isRequired
|
298
|
-
}),
|
299
|
-
iconsList: _propTypes["default"].shape({
|
300
|
-
desc: _propTypes["default"].string,
|
301
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
302
|
-
icon: _propTypes["default"].node.isRequired,
|
303
|
-
text: _propTypes["default"].string.isRequired
|
304
|
-
}).isRequired).isRequired
|
305
|
-
}),
|
306
|
-
price: _propTypes["default"].shape({
|
307
|
-
oldValue: _propTypes["default"].string,
|
308
|
-
value: _propTypes["default"].string.isRequired,
|
309
|
-
period: _propTypes["default"].string
|
310
|
-
}),
|
311
|
-
button: _propTypes["default"].shape({
|
312
|
-
title: _propTypes["default"].string.isRequired,
|
313
|
-
href: _propTypes["default"].string,
|
314
|
-
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
|
315
|
-
isCentered: _propTypes["default"].bool,
|
316
|
-
onClick: _propTypes["default"].func
|
317
|
-
}),
|
318
|
-
extraButton: _propTypes["default"].shape({
|
319
|
-
title: _propTypes["default"].string.isRequired,
|
320
|
-
href: _propTypes["default"].string,
|
321
|
-
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
|
322
|
-
isCentered: _propTypes["default"].bool,
|
323
|
-
onClick: _propTypes["default"].func
|
324
|
-
}),
|
325
|
-
onClick: _propTypes["default"].func
|
326
|
-
};
|
327
|
-
var _default = Card;
|
328
|
-
exports["default"] = _default;
|
231
|
+
var _default = exports["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,25 @@ 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
|
23
|
+
export type MarkerList = {
|
24
24
|
/** Заголовок */
|
25
25
|
title: string;
|
26
26
|
/** Примечание */
|
27
27
|
note?: string;
|
28
28
|
}[];
|
29
|
-
export
|
29
|
+
export type TextsList = {
|
30
30
|
/** Заголовок */
|
31
31
|
title?: string;
|
32
32
|
/** Описание */
|
33
33
|
desc: string;
|
34
34
|
}[];
|
35
|
-
export
|
35
|
+
export type FeaturesList = {
|
36
36
|
/** Список */
|
37
37
|
items: {
|
38
38
|
/** Заголовок */
|
@@ -43,7 +43,7 @@ export declare type FeaturesList = {
|
|
43
43
|
/** Описание */
|
44
44
|
desc?: string;
|
45
45
|
};
|
46
|
-
export
|
46
|
+
export type IconsList = {
|
47
47
|
/** Список */
|
48
48
|
items: {
|
49
49
|
/** Иконка */
|
@@ -54,7 +54,7 @@ export declare type IconsList = {
|
|
54
54
|
/** Описание */
|
55
55
|
desc?: string;
|
56
56
|
};
|
57
|
-
export
|
57
|
+
export type Price = {
|
58
58
|
/** Старая цена */
|
59
59
|
oldValue?: string;
|
60
60
|
/** Текущая цена */
|
@@ -62,7 +62,7 @@ export declare type Price = {
|
|
62
62
|
/** Период */
|
63
63
|
period?: string;
|
64
64
|
};
|
65
|
-
export
|
65
|
+
export type ButtonType = {
|
66
66
|
/** Название */
|
67
67
|
title: string;
|
68
68
|
/** Ссылка */
|