@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,39 +1,25 @@
|
|
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.array.map.js");
|
13
|
-
|
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
|
-
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
21
|
-
|
22
13
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
23
|
-
|
24
|
-
function
|
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
|
-
|
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; }
|
28
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
-
|
30
17
|
var cn = (0, _uiHelpers.cnCreate)('mfui-cards-box');
|
31
|
-
|
32
18
|
var CardsBox = function CardsBox(_ref) {
|
33
19
|
var _ref$renderTwoColumns = _ref.renderTwoColumnsInRow,
|
34
|
-
|
35
|
-
|
36
|
-
|
20
|
+
renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
|
21
|
+
dataAttrs = _ref.dataAttrs,
|
22
|
+
children = _ref.children;
|
37
23
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
38
24
|
className: cn()
|
39
25
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
@@ -47,14 +33,4 @@ var CardsBox = function CardsBox(_ref) {
|
|
47
33
|
}, (0, _helpers["default"])(React.Children.count(children), i, renderTwoColumnsInRow)), child);
|
48
34
|
})));
|
49
35
|
};
|
50
|
-
|
51
|
-
CardsBox.propTypes = {
|
52
|
-
renderTwoColumnsInRow: PropTypes.bool,
|
53
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired,
|
54
|
-
dataAttrs: PropTypes.shape({
|
55
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
56
|
-
column: PropTypes.objectOf(PropTypes.string.isRequired)
|
57
|
-
})
|
58
|
-
};
|
59
|
-
var _default = CardsBox;
|
60
|
-
exports["default"] = _default;
|
36
|
+
var _default = exports["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;
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
|
-
|
8
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
-
|
12
9
|
var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
|
13
10
|
var offset = renderTwoColumnsInRow ? '2' : undefined;
|
14
11
|
var offsetForEvenColumn = index % 2 ? undefined : offset;
|
@@ -17,7 +14,6 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
17
14
|
tablet: '6',
|
18
15
|
mobile: '12'
|
19
16
|
};
|
20
|
-
|
21
17
|
switch (count) {
|
22
18
|
case 2:
|
23
19
|
case 4:
|
@@ -25,11 +21,8 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
25
21
|
leftOffsetWide: offsetForEvenColumn,
|
26
22
|
leftOffsetDesktop: offsetForEvenColumn
|
27
23
|
});
|
28
|
-
|
29
24
|
default:
|
30
25
|
return (0, _extends2["default"])({}, columnSize);
|
31
26
|
}
|
32
27
|
};
|
33
|
-
|
34
|
-
var _default = getColumnConfig;
|
35
|
-
exports["default"] = _default;
|
28
|
+
var _default = exports["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,72 +1,50 @@
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
13
|
-
|
14
|
-
require("core-js/modules/es.array.index-of.js");
|
15
|
-
|
16
10
|
require("core-js/modules/es.symbol.js");
|
17
|
-
|
11
|
+
require("core-js/modules/es.array.index-of.js");
|
18
12
|
var React = _interopRequireWildcard(require("react"));
|
19
|
-
|
20
13
|
var _uiCore = require("@megafon/ui-core");
|
21
|
-
|
22
14
|
var _uiHelpers = require("@megafon/ui-helpers");
|
23
|
-
|
24
|
-
function
|
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
|
-
|
15
|
+
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); }
|
16
|
+
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
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
-
|
30
18
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
31
19
|
var t = {};
|
32
|
-
|
33
|
-
for (var p in s) {
|
34
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
35
|
-
}
|
36
|
-
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
37
21
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
38
22
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
39
23
|
}
|
40
24
|
return t;
|
41
25
|
};
|
42
|
-
|
43
26
|
var getDefaultSlideSettings = function getDefaultSlideSettings(desktopSlidesPerView) {
|
44
|
-
|
45
|
-
|
46
|
-
return _ref = {}, (0, _defineProperty2["default"])(_ref, _uiHelpers.breakpoints.MOBILE_SMALL_START, {
|
27
|
+
return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _uiHelpers.breakpoints.MOBILE_SMALL_START, {
|
47
28
|
slidesPerView: 1,
|
48
29
|
spaceBetween: 16
|
49
|
-
}),
|
30
|
+
}), _uiHelpers.breakpoints.MOBILE_BIG_START, {
|
50
31
|
slidesPerView: 2,
|
51
32
|
spaceBetween: 20
|
52
|
-
}),
|
33
|
+
}), _uiHelpers.breakpoints.DESKTOP_SMALL_START, {
|
53
34
|
slidesPerView: 3,
|
54
35
|
spaceBetween: 20
|
55
|
-
}),
|
36
|
+
}), _uiHelpers.breakpoints.DESKTOP_MIDDLE_START, {
|
56
37
|
slidesPerView: desktopSlidesPerView,
|
57
38
|
spaceBetween: 20
|
58
|
-
})
|
39
|
+
});
|
59
40
|
};
|
60
|
-
|
61
41
|
var cn = (0, _uiHelpers.cnCreate)('mfui-carousel-box');
|
62
|
-
|
63
42
|
var CarouselBox = function CarouselBox(_a) {
|
64
43
|
var children = _a.children,
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
44
|
+
slidesSettings = _a.slidesSettings,
|
45
|
+
_a$desktopSlidesPerVi = _a.desktopSlidesPerView,
|
46
|
+
desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
|
47
|
+
props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
|
70
48
|
var settings = slidesSettings || getDefaultSlideSettings(desktopSlidesPerView);
|
71
49
|
return /*#__PURE__*/React.createElement("div", {
|
72
50
|
className: cn()
|
@@ -74,6 +52,4 @@ var CarouselBox = function CarouselBox(_a) {
|
|
74
52
|
slidesSettings: settings
|
75
53
|
}), children));
|
76
54
|
};
|
77
|
-
|
78
|
-
var _default = CarouselBox;
|
79
|
-
exports["default"] = _default;
|
55
|
+
var _default = exports["default"] = CarouselBox;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './Container.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './Container.scss';
|
3
3
|
export declare const BackgroundColors: {
|
4
4
|
readonly DEFAULT: "default";
|
5
5
|
readonly LIGHT_GRAY: "light-gray";
|
@@ -7,12 +7,12 @@ export declare const BackgroundColors: {
|
|
7
7
|
readonly GREEN: "green";
|
8
8
|
readonly PURPLE: "purple";
|
9
9
|
};
|
10
|
-
|
11
|
-
|
10
|
+
type BackgroundColorType = (typeof BackgroundColors)[keyof typeof BackgroundColors];
|
11
|
+
type Props = {
|
12
12
|
/** Атрибут корневого тега */
|
13
13
|
id?: string;
|
14
14
|
/** Ссылка на корневой элемент */
|
15
|
-
rootRef?: Ref<HTMLDivElement>;
|
15
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
16
16
|
/** Дополнительный класс корневого элемента */
|
17
17
|
className?: string;
|
18
18
|
/** Цвет фона */
|
@@ -23,6 +23,8 @@ declare type Props = {
|
|
23
23
|
disablePaddingBottom?: boolean;
|
24
24
|
/** Включить тень в нижней части компонента */
|
25
25
|
bottomShadow?: boolean;
|
26
|
+
/** Дочерние элементы */
|
27
|
+
children?: React.ReactNode;
|
26
28
|
};
|
27
29
|
declare const Container: React.FC<Props>;
|
28
30
|
export default Container;
|
@@ -1,44 +1,35 @@
|
|
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"] = exports.BackgroundColors = void 0;
|
7
|
-
|
8
|
-
require("core-js/modules/es.object.values.js");
|
9
|
-
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
11
|
-
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
12
9
|
var _uiCore = require("@megafon/ui-core");
|
13
|
-
|
14
10
|
var _uiHelpers = require("@megafon/ui-helpers");
|
15
|
-
|
16
|
-
var
|
17
|
-
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
19
|
-
|
20
|
-
var BackgroundColors = {
|
11
|
+
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); }
|
12
|
+
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; }
|
13
|
+
var BackgroundColors = exports.BackgroundColors = {
|
21
14
|
DEFAULT: 'default',
|
22
15
|
LIGHT_GRAY: 'light-gray',
|
23
16
|
GRAY: 'gray',
|
24
17
|
GREEN: 'green',
|
25
18
|
PURPLE: 'purple'
|
26
19
|
};
|
27
|
-
exports.BackgroundColors = BackgroundColors;
|
28
20
|
var cn = (0, _uiHelpers.cnCreate)('mfui-container');
|
29
|
-
|
30
21
|
var Container = function Container(_ref) {
|
31
22
|
var _ref$backgroundColor = _ref.backgroundColor,
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
return /*#__PURE__*/
|
23
|
+
backgroundColor = _ref$backgroundColor === void 0 ? 'default' : _ref$backgroundColor,
|
24
|
+
rootRef = _ref.rootRef,
|
25
|
+
id = _ref.id,
|
26
|
+
className = _ref.className,
|
27
|
+
children = _ref.children,
|
28
|
+
disablePaddingTop = _ref.disablePaddingTop,
|
29
|
+
disablePaddingBottom = _ref.disablePaddingBottom,
|
30
|
+
_ref$bottomShadow = _ref.bottomShadow,
|
31
|
+
bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow;
|
32
|
+
return /*#__PURE__*/React.createElement("div", {
|
42
33
|
className: cn({
|
43
34
|
'bg-color': backgroundColor,
|
44
35
|
'bottom-shadow': bottomShadow,
|
@@ -47,21 +38,8 @@ var Container = function Container(_ref) {
|
|
47
38
|
}, [className]),
|
48
39
|
ref: rootRef,
|
49
40
|
id: id
|
50
|
-
}, /*#__PURE__*/
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
51
42
|
className: cn('inner')
|
52
|
-
}, /*#__PURE__*/
|
53
|
-
};
|
54
|
-
|
55
|
-
Container.propTypes = {
|
56
|
-
id: _propTypes["default"].string,
|
57
|
-
className: _propTypes["default"].string,
|
58
|
-
backgroundColor: _propTypes["default"].oneOf(Object.values(BackgroundColors)),
|
59
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
60
|
-
current: _propTypes["default"].elementType
|
61
|
-
}), _propTypes["default"].any])]),
|
62
|
-
disablePaddingTop: _propTypes["default"].bool,
|
63
|
-
disablePaddingBottom: _propTypes["default"].bool,
|
64
|
-
bottomShadow: _propTypes["default"].bool
|
43
|
+
}, /*#__PURE__*/React.createElement(_uiCore.ContentArea, null, children)));
|
65
44
|
};
|
66
|
-
var _default = Container;
|
67
|
-
exports["default"] = _default;
|
45
|
+
var _default = exports["default"] = Container;
|
@@ -1,32 +1,19 @@
|
|
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.string.link.js");
|
13
|
-
|
14
9
|
require("core-js/modules/es.array.concat.js");
|
15
|
-
|
10
|
+
require("core-js/modules/es.string.link.js");
|
16
11
|
var React = _interopRequireWildcard(require("react"));
|
17
|
-
|
18
12
|
var _uiCore = require("@megafon/ui-core");
|
19
|
-
|
20
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
21
|
-
|
22
|
-
var
|
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
|
-
|
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; }
|
28
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
-
|
30
17
|
var DownloadIcon = function DownloadIcon(props) {
|
31
18
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
32
19
|
viewBox: "0 0 40 40"
|
@@ -34,36 +21,30 @@ var DownloadIcon = function DownloadIcon(props) {
|
|
34
21
|
d: "M21 6v14l2.68-4 1.65 1-4.44 6.74h-1.77L14.68 17l1.65-1L19 20V6zM8 20H6a14 14 0 0028 0h-2a12 12 0 01-24 0z"
|
35
22
|
}));
|
36
23
|
};
|
37
|
-
|
38
24
|
var cn = (0, _uiHelpers.cnCreate)('mfui-download-link');
|
39
|
-
|
40
25
|
var DownloadLink = function DownloadLink(_ref) {
|
41
26
|
var href = _ref.href,
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
27
|
+
text = _ref.text,
|
28
|
+
extension = _ref.extension,
|
29
|
+
fileSize = _ref.fileSize,
|
30
|
+
onClick = _ref.onClick,
|
31
|
+
className = _ref.className,
|
32
|
+
_ref$classes = _ref.classes,
|
33
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
34
|
+
rootRef = _ref.rootRef,
|
35
|
+
dataAttrs = _ref.dataAttrs,
|
36
|
+
disableDownload = _ref.disableDownload,
|
37
|
+
target = _ref.target,
|
38
|
+
rel = _ref.rel;
|
55
39
|
var setRelAttribute = function setRelAttribute() {
|
56
40
|
if (rel) {
|
57
41
|
return rel;
|
58
42
|
}
|
59
|
-
|
60
43
|
if (target && target !== '_self') {
|
61
44
|
return 'noreferrer noopener';
|
62
45
|
}
|
63
|
-
|
64
46
|
return undefined;
|
65
47
|
};
|
66
|
-
|
67
48
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
68
49
|
className: cn([className, classes.root]),
|
69
50
|
ref: rootRef
|
@@ -86,28 +67,4 @@ var DownloadLink = function DownloadLink(_ref) {
|
|
86
67
|
className: cn('info')
|
87
68
|
}, "".concat(extension).concat(extension && fileSize ? ', ' : '').concat(fileSize))));
|
88
69
|
};
|
89
|
-
|
90
|
-
DownloadLink.propTypes = {
|
91
|
-
dataAttrs: PropTypes.shape({
|
92
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
93
|
-
link: PropTypes.objectOf(PropTypes.string.isRequired)
|
94
|
-
}),
|
95
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
96
|
-
current: PropTypes.elementType
|
97
|
-
}), PropTypes.any])]),
|
98
|
-
href: PropTypes.string.isRequired,
|
99
|
-
text: PropTypes.string.isRequired,
|
100
|
-
extension: PropTypes.string.isRequired,
|
101
|
-
fileSize: PropTypes.string.isRequired,
|
102
|
-
className: PropTypes.string,
|
103
|
-
classes: PropTypes.shape({
|
104
|
-
root: PropTypes.string,
|
105
|
-
link: PropTypes.string
|
106
|
-
}),
|
107
|
-
onClick: PropTypes.func,
|
108
|
-
disableDownload: PropTypes.bool,
|
109
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
110
|
-
rel: PropTypes.string
|
111
|
-
};
|
112
|
-
var _default = DownloadLink;
|
113
|
-
exports["default"] = _default;
|
70
|
+
var _default = exports["default"] = DownloadLink;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { GridColumn } from '@megafon/ui-core';
|
3
|
-
import './DownloadLinks.
|
3
|
+
import './DownloadLinks.scss';
|
4
4
|
import { IDownloadLink } from './DownloadLink';
|
5
|
-
|
6
|
-
|
5
|
+
type GridColumnType = React.ComponentProps<typeof GridColumn>;
|
6
|
+
type ColumnConfig = {
|
7
7
|
wide?: GridColumnType['wide'];
|
8
8
|
desktop?: GridColumnType['desktop'];
|
9
9
|
tablet?: GridColumnType['tablet'];
|
@@ -1,31 +1,19 @@
|
|
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
|
-
exports["default"] =
|
9
|
-
|
7
|
+
exports.getColumnConfig = exports["default"] = void 0;
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
9
|
require("core-js/modules/es.array.map.js");
|
13
|
-
|
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
|
-
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
|
-
var getColumnConfig = function getColumnConfig(itemsCount) {
|
16
|
+
var getColumnConfig = exports.getColumnConfig = function getColumnConfig(itemsCount) {
|
29
17
|
switch (true) {
|
30
18
|
case itemsCount <= 2:
|
31
19
|
{
|
@@ -34,7 +22,6 @@ var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
34
22
|
mobile: '12'
|
35
23
|
};
|
36
24
|
}
|
37
|
-
|
38
25
|
case itemsCount <= 4:
|
39
26
|
{
|
40
27
|
return {
|
@@ -42,7 +29,6 @@ var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
42
29
|
mobile: '12'
|
43
30
|
};
|
44
31
|
}
|
45
|
-
|
46
32
|
default:
|
47
33
|
{
|
48
34
|
return {
|
@@ -54,16 +40,12 @@ var getColumnConfig = function getColumnConfig(itemsCount) {
|
|
54
40
|
}
|
55
41
|
}
|
56
42
|
};
|
57
|
-
|
58
|
-
exports.getColumnConfig = getColumnConfig;
|
59
43
|
var testIdPrefix = 'DownloadLinks';
|
60
44
|
var cn = (0, _uiHelpers.cnCreate)('mfui-download-links');
|
61
|
-
|
62
45
|
var DownloadLinks = function DownloadLinks(_ref) {
|
63
46
|
var _ref$inOneColumn = _ref.inOneColumn,
|
64
|
-
|
65
|
-
|
66
|
-
|
47
|
+
inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
|
48
|
+
children = _ref.children;
|
67
49
|
if (inOneColumn) {
|
68
50
|
return /*#__PURE__*/React.createElement("div", {
|
69
51
|
className: cn(),
|
@@ -74,7 +56,6 @@ var DownloadLinks = function DownloadLinks(_ref) {
|
|
74
56
|
}, child);
|
75
57
|
}));
|
76
58
|
}
|
77
|
-
|
78
59
|
var itemsCount = React.Children.count(children);
|
79
60
|
var columnConfig = getColumnConfig(itemsCount);
|
80
61
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -89,10 +70,4 @@ var DownloadLinks = function DownloadLinks(_ref) {
|
|
89
70
|
}), child);
|
90
71
|
})));
|
91
72
|
};
|
92
|
-
|
93
|
-
DownloadLinks.propTypes = {
|
94
|
-
inOneColumn: PropTypes.bool,
|
95
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired
|
96
|
-
};
|
97
|
-
var _default = DownloadLinks;
|
98
|
-
exports["default"] = _default;
|
73
|
+
var _default = exports["default"] = DownloadLinks;
|
@@ -1,21 +1,18 @@
|
|
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
|
-
var
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
-
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
9
|
+
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); }
|
10
|
+
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; }
|
12
11
|
var FaqWrapper = function FaqWrapper(_ref) {
|
13
12
|
var children = _ref.children;
|
14
|
-
return /*#__PURE__*/
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
15
14
|
itemScope: true,
|
16
15
|
itemType: "http://schema.org/FAQPage"
|
17
16
|
}, children);
|
18
17
|
};
|
19
|
-
|
20
|
-
var _default = FaqWrapper;
|
21
|
-
exports["default"] = _default;
|
18
|
+
var _default = exports["default"] = FaqWrapper;
|