@megafon/ui-shared 5.16.0 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +3 -12
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +6 -20
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/es/components/BenefitsPictures/helpers.js +0 -14
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
- package/dist/es/components/Card/Card.css +1 -354
- package/dist/es/components/Card/Card.d.ts +5 -9
- package/dist/es/components/Card/Card.js +26 -136
- package/dist/es/components/Card/types.d.ts +9 -15
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.js +3 -14
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +0 -4
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
- package/dist/es/components/Container/Container.css +1 -3230
- package/dist/es/components/Container/Container.d.ts +7 -5
- package/dist/es/components/Container/Container.js +10 -25
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
- package/dist/es/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -248
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/es/components/ImageBanner/ImageBanner.js +51 -109
- package/dist/es/components/Instructions/Instructions.css +1 -790
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +41 -94
- package/dist/es/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
- package/dist/es/components/PageTitle/PageTitle.css +1 -80
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +12 -37
- package/dist/es/components/Partners/Partners.css +1 -53
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +17 -48
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
- package/dist/es/components/Property/Property.css +1 -156
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +37 -81
- package/dist/es/components/Property/PropertyDescription.css +1 -17
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +8 -28
- package/dist/es/components/Property/types.d.ts +7 -5
- package/dist/es/components/Property/types.js +1 -0
- package/dist/es/components/Steps/Steps.css +1 -41
- package/dist/es/components/Steps/Steps.d.ts +2 -1
- package/dist/es/components/Steps/Steps.js +4 -19
- package/dist/es/components/Steps/StepsItem.css +1 -42
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +2 -9
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
- package/dist/es/components/StoreButton/StoreButton.css +1 -327
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +13 -44
- package/dist/es/components/Table/Table.css +1 -157
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +31 -51
- package/dist/es/components/Table/TableCell.js +0 -6
- package/dist/es/components/Table/TableRow.js +1 -10
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +4 -13
- package/dist/es/components/TextBox/TextBox.css +1 -25
- package/dist/es/components/TextBox/TextBox.d.ts +2 -1
- package/dist/es/components/TextBox/TextBox.js +8 -23
- package/dist/es/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
- package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +1 -29
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +6 -21
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +35 -75
- package/dist/es/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +10 -66
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +32 -56
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +12 -43
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +9 -17
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +4 -23
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +5 -16
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +7 -25
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +26 -86
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +13 -53
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +10 -37
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/lib/components/BenefitsIcons/types.js +5 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +24 -71
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/lib/components/BenefitsPictures/helpers.js +9 -40
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/lib/components/BenefitsPictures/types.js +5 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +18 -60
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +22 -55
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +40 -89
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +29 -72
- package/dist/lib/components/Card/Card.css +1 -354
- package/dist/lib/components/Card/Card.d.ts +5 -9
- package/dist/lib/components/Card/Card.js +63 -180
- package/dist/lib/components/Card/types.d.ts +9 -15
- package/dist/lib/components/Card/types.js +5 -1
- package/dist/lib/components/CardsBox/CardsBox.js +7 -31
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +1 -8
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +15 -39
- package/dist/lib/components/Container/Container.css +1 -3230
- package/dist/lib/components/Container/Container.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +17 -39
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +17 -60
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +8 -33
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -248
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/lib/components/ImageBanner/ImageBanner.js +71 -155
- package/dist/lib/components/Instructions/Instructions.css +1 -790
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +103 -186
- package/dist/lib/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
- package/dist/lib/components/PageTitle/PageTitle.css +1 -80
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +15 -52
- package/dist/lib/components/Partners/Partners.css +1 -53
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +21 -65
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
- package/dist/lib/components/Property/Property.css +1 -156
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +60 -120
- package/dist/lib/components/Property/PropertyDescription.css +1 -17
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +15 -46
- package/dist/lib/components/Property/types.d.ts +7 -5
- package/dist/lib/components/Property/types.js +5 -1
- package/dist/lib/components/Steps/Steps.css +1 -41
- package/dist/lib/components/Steps/Steps.d.ts +2 -1
- package/dist/lib/components/Steps/Steps.js +8 -35
- package/dist/lib/components/Steps/StepsItem.css +1 -42
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +11 -23
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
- package/dist/lib/components/StoreButton/StoreButton.css +1 -327
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +17 -63
- package/dist/lib/components/Table/Table.css +1 -157
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +35 -68
- package/dist/lib/components/Table/TableCell.js +4 -16
- package/dist/lib/components/Table/TableRow.js +5 -19
- package/dist/lib/components/TabsBox/TabBox.js +1 -4
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +8 -26
- package/dist/lib/components/TextBox/TextBox.css +1 -25
- package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
- package/dist/lib/components/TextBox/TextBox.js +12 -36
- package/dist/lib/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +1 -29
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +10 -37
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +83 -176
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +58 -114
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/helpers/getColumnConfig.js +2 -5
- package/dist/lib/index.js +10 -57
- package/package.json +89 -92
- package/CHANGELOG.md +0 -3984
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
@@ -1,209 +1,170 @@
|
|
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
|
-
onClick = _ref5.onClick;
|
74
|
-
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
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
|
+
textsList = _ref5.textsList,
|
58
|
+
featuresList = _ref5.featuresList,
|
59
|
+
iconsList = _ref5.iconsList,
|
60
|
+
price = _ref5.price,
|
61
|
+
button = _ref5.button,
|
62
|
+
extraButton = _ref5.extraButton,
|
63
|
+
onClick = _ref5.onClick;
|
64
|
+
var isOnlyTitle = !image && !icon && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
75
65
|
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
76
66
|
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
77
67
|
var ElementType = isLink ? 'a' : 'div';
|
78
|
-
|
79
68
|
var renderImage = function renderImage() {
|
80
69
|
if (!image) {
|
81
70
|
return null;
|
82
71
|
}
|
83
|
-
|
84
|
-
var _image$position = image.position,
|
85
|
-
position = _image$position === void 0 ? 'top' : _image$position,
|
86
|
-
src = image.src,
|
87
|
-
alt = image.alt;
|
88
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
72
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
89
73
|
className: cn('img-box', {
|
90
|
-
position: position
|
74
|
+
position: image.position
|
91
75
|
})
|
92
|
-
}), /*#__PURE__*/
|
76
|
+
}), /*#__PURE__*/React.createElement("img", {
|
93
77
|
className: cn('img'),
|
94
|
-
src: src,
|
95
|
-
alt: alt
|
78
|
+
src: image.src,
|
79
|
+
alt: image.alt
|
96
80
|
}));
|
97
81
|
};
|
98
|
-
|
99
82
|
var renderIcon = function renderIcon() {
|
100
83
|
if (!icon) {
|
101
84
|
return null;
|
102
85
|
}
|
103
|
-
|
104
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
86
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
105
87
|
className: cn('icon')
|
106
88
|
}), icon);
|
107
89
|
};
|
108
|
-
|
109
90
|
var renderContent = function renderContent() {
|
110
|
-
if (markerList) {
|
111
|
-
return /*#__PURE__*/_react["default"].createElement("ul", {
|
112
|
-
className: cn('marker-list')
|
113
|
-
}, markerList.map(function (item, i) {
|
114
|
-
return /*#__PURE__*/_react["default"].createElement("li", {
|
115
|
-
className: cn('marker-item'),
|
116
|
-
key: i
|
117
|
-
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/_react["default"].createElement("span", {
|
118
|
-
className: cn('marker-note')
|
119
|
-
}, (0, _uiHelpers.convert)(item.note, {})));
|
120
|
-
}));
|
121
|
-
}
|
122
|
-
|
123
91
|
if (textsList) {
|
124
|
-
return /*#__PURE__*/
|
92
|
+
return /*#__PURE__*/React.createElement("div", {
|
125
93
|
className: cn('texts')
|
126
94
|
}, textsList.map(function (item, i) {
|
127
|
-
return /*#__PURE__*/
|
95
|
+
return /*#__PURE__*/React.createElement("div", {
|
128
96
|
className: cn('texts-item'),
|
129
97
|
key: i
|
130
|
-
}, !!item.title && /*#__PURE__*/
|
98
|
+
}, !!item.title && /*#__PURE__*/React.createElement("div", {
|
131
99
|
className: cn('texts-title')
|
132
|
-
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/
|
100
|
+
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
133
101
|
className: cn('texts-desc')
|
134
102
|
}, (0, _uiHelpers.convert)(item.desc, textsConvertConfig)));
|
135
103
|
}));
|
136
104
|
}
|
137
|
-
|
138
105
|
if (featuresList) {
|
139
|
-
return /*#__PURE__*/
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
140
107
|
className: cn('features')
|
141
|
-
}, /*#__PURE__*/
|
108
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
142
109
|
className: cn('features-list')
|
143
110
|
}, featuresList.items.map(function (item, i) {
|
144
|
-
return /*#__PURE__*/
|
111
|
+
return /*#__PURE__*/React.createElement("li", {
|
145
112
|
className: cn('features-item'),
|
146
113
|
key: i
|
147
|
-
}, /*#__PURE__*/
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
148
115
|
className: cn('features-item-title')
|
149
|
-
}, /*#__PURE__*/
|
116
|
+
}, /*#__PURE__*/React.createElement("span", {
|
150
117
|
className: cn('features-item-text')
|
151
|
-
}, item.title)), /*#__PURE__*/
|
118
|
+
}, item.title)), /*#__PURE__*/React.createElement("div", {
|
152
119
|
className: cn('features-item-value')
|
153
|
-
}, /*#__PURE__*/
|
120
|
+
}, /*#__PURE__*/React.createElement("span", {
|
154
121
|
className: cn('features-item-text')
|
155
122
|
}, item.value)));
|
156
123
|
})), featuresList.desc);
|
157
124
|
}
|
158
|
-
|
159
125
|
if (iconsList) {
|
160
|
-
return /*#__PURE__*/
|
126
|
+
return /*#__PURE__*/React.createElement("div", {
|
161
127
|
className: cn('icons')
|
162
|
-
}, !!iconsList.desc && /*#__PURE__*/
|
128
|
+
}, !!iconsList.desc && /*#__PURE__*/React.createElement("div", {
|
163
129
|
className: cn('icons-desc')
|
164
|
-
}, iconsList.desc), /*#__PURE__*/
|
130
|
+
}, iconsList.desc), /*#__PURE__*/React.createElement("div", {
|
165
131
|
className: cn('icons-list')
|
166
132
|
}, iconsList.items.map(function (item, i) {
|
167
|
-
return /*#__PURE__*/
|
133
|
+
return /*#__PURE__*/React.createElement("div", {
|
168
134
|
className: cn('icons-item'),
|
169
135
|
key: i
|
170
|
-
}, /*#__PURE__*/
|
136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
171
137
|
className: cn('icons-item-icon')
|
172
|
-
}, item.icon), /*#__PURE__*/
|
138
|
+
}, item.icon), /*#__PURE__*/React.createElement("div", {
|
173
139
|
className: cn('icons-item-text')
|
174
140
|
}, item.text));
|
175
141
|
})));
|
176
142
|
}
|
177
|
-
|
178
143
|
return null;
|
179
144
|
};
|
180
|
-
|
181
145
|
var renderPrice = function renderPrice() {
|
182
146
|
if (!price) {
|
183
147
|
return null;
|
184
148
|
}
|
185
|
-
|
186
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
149
|
+
return /*#__PURE__*/React.createElement("div", {
|
187
150
|
className: cn('price')
|
188
|
-
}, !!price.oldValue && /*#__PURE__*/
|
151
|
+
}, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
|
189
152
|
className: cn('price-old-value')
|
190
|
-
}, price.oldValue), /*#__PURE__*/
|
153
|
+
}, price.oldValue), /*#__PURE__*/React.createElement("div", {
|
191
154
|
className: cn('price-value')
|
192
|
-
}, price.value), !!price.period && /*#__PURE__*/
|
155
|
+
}, price.value), !!price.period && /*#__PURE__*/React.createElement("div", {
|
193
156
|
className: cn('price-period')
|
194
157
|
}, price.period));
|
195
158
|
};
|
196
|
-
|
197
159
|
var renderButtons = function renderButtons() {
|
198
160
|
if (!button && !extraButton) {
|
199
161
|
return null;
|
200
162
|
}
|
201
|
-
|
202
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
163
|
+
return /*#__PURE__*/React.createElement("div", {
|
203
164
|
className: cn('buttons', {
|
204
165
|
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
205
166
|
})
|
206
|
-
}, !!button && /*#__PURE__*/
|
167
|
+
}, !!button && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
207
168
|
dataAttrs: {
|
208
169
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
209
170
|
},
|
@@ -211,7 +172,7 @@ var Card = function Card(_ref5) {
|
|
211
172
|
href: button.href,
|
212
173
|
target: button.target,
|
213
174
|
onClick: button === null || button === void 0 ? void 0 : button.onClick
|
214
|
-
}, button.title), !!extraButton && /*#__PURE__*/
|
175
|
+
}, button.title), !!extraButton && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
215
176
|
dataAttrs: {
|
216
177
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.extraButton
|
217
178
|
},
|
@@ -222,18 +183,15 @@ var Card = function Card(_ref5) {
|
|
222
183
|
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
223
184
|
}, extraButton.title));
|
224
185
|
};
|
225
|
-
|
226
186
|
var renderFooter = function renderFooter() {
|
227
187
|
if (!price && !button && !extraButton && !image) {
|
228
188
|
return null;
|
229
189
|
}
|
230
|
-
|
231
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
190
|
+
return /*#__PURE__*/React.createElement("div", {
|
232
191
|
className: cn('footer')
|
233
192
|
}, isBottomImage && renderImage(), renderPrice(), renderButtons());
|
234
193
|
};
|
235
|
-
|
236
|
-
return /*#__PURE__*/_react["default"].createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
194
|
+
return /*#__PURE__*/React.createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
237
195
|
className: cn({
|
238
196
|
'only-title': isOnlyTitle,
|
239
197
|
view: view,
|
@@ -244,85 +202,10 @@ var Card = function Card(_ref5) {
|
|
244
202
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
245
203
|
onClick: isLink ? onClick : undefined,
|
246
204
|
ref: rootRef
|
247
|
-
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/
|
248
|
-
className: cn('header')
|
249
|
-
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
205
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement(_uiCore.Header, {
|
250
206
|
className: cn('title'),
|
251
207
|
as: "h3",
|
252
208
|
align: title.align
|
253
|
-
}, title.text),
|
254
|
-
};
|
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
|
209
|
+
}, title.text), renderContent(), renderFooter());
|
326
210
|
};
|
327
|
-
var _default = Card;
|
328
|
-
exports["default"] = _default;
|
211
|
+
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,19 @@ export declare type Image = {
|
|
14
14
|
/** Позиция изображения */
|
15
15
|
position?: 'top' | 'bottom';
|
16
16
|
};
|
17
|
-
export
|
17
|
+
export type Title = {
|
18
18
|
/** Текст */
|
19
19
|
text: string;
|
20
20
|
/** Выравнивание */
|
21
21
|
align?: 'left' | 'center';
|
22
22
|
};
|
23
|
-
export
|
24
|
-
/** Заголовок */
|
25
|
-
title: string;
|
26
|
-
/** Примечание */
|
27
|
-
note?: string;
|
28
|
-
}[];
|
29
|
-
export declare type TextsList = {
|
23
|
+
export type TextsList = {
|
30
24
|
/** Заголовок */
|
31
25
|
title?: string;
|
32
26
|
/** Описание */
|
33
27
|
desc: string;
|
34
28
|
}[];
|
35
|
-
export
|
29
|
+
export type FeaturesList = {
|
36
30
|
/** Список */
|
37
31
|
items: {
|
38
32
|
/** Заголовок */
|
@@ -43,7 +37,7 @@ export declare type FeaturesList = {
|
|
43
37
|
/** Описание */
|
44
38
|
desc?: string;
|
45
39
|
};
|
46
|
-
export
|
40
|
+
export type IconsList = {
|
47
41
|
/** Список */
|
48
42
|
items: {
|
49
43
|
/** Иконка */
|
@@ -54,7 +48,7 @@ export declare type IconsList = {
|
|
54
48
|
/** Описание */
|
55
49
|
desc?: string;
|
56
50
|
};
|
57
|
-
export
|
51
|
+
export type Price = {
|
58
52
|
/** Старая цена */
|
59
53
|
oldValue?: string;
|
60
54
|
/** Текущая цена */
|
@@ -62,7 +56,7 @@ export declare type Price = {
|
|
62
56
|
/** Период */
|
63
57
|
period?: string;
|
64
58
|
};
|
65
|
-
export
|
59
|
+
export type ButtonType = {
|
66
60
|
/** Название */
|
67
61
|
title: string;
|
68
62
|
/** Ссылка */
|
@@ -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;
|