@megafon/ui-shared 6.0.0-beta.4 → 6.0.0
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/CHANGELOG.md +4031 -0
- package/dist/es/components/AccordionBox/AccordionBox.css +15 -1
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +49 -6
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +27 -11
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +22 -10
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +10 -8
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +12 -3
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +10 -4
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +58 -1
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +35 -1
- package/dist/es/components/AudioPlayer/style/AudioRange.css +68 -1
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +34 -1
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +9 -1
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +12 -3
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +64 -23
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +36 -9
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +20 -6
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
- 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 +49 -19
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +43 -1
- package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/es/components/BenefitsPictures/helpers.js +14 -0
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/es/components/BenefitsPictures/types.js +0 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +43 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +39 -10
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +36 -11
- package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -1
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +53 -22
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +51 -20
- package/dist/es/components/Card/Card.css +354 -1
- package/dist/es/components/Card/Card.d.ts +4 -4
- package/dist/es/components/Card/Card.js +115 -25
- package/dist/es/components/Card/types.d.ts +10 -10
- package/dist/es/components/Card/types.js +0 -1
- package/dist/es/components/CardsBox/CardsBox.js +14 -3
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +4 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +24 -11
- package/dist/es/components/Container/Container.css +3287 -1
- package/dist/es/components/Container/Container.d.ts +5 -7
- package/dist/es/components/Container/Container.js +25 -10
- package/dist/es/components/DownloadLinks/DownloadLink.css +37 -1
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +44 -13
- package/dist/es/components/DownloadLinks/DownloadLinks.css +36 -1
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +13 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +2 -5
- package/dist/es/components/FaqWrapper/FaqWrapper.js +3 -1
- package/dist/es/components/ImageBanner/ImageBanner.css +252 -1
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +7 -8
- package/dist/es/components/ImageBanner/ImageBanner.js +88 -37
- package/dist/es/components/Instructions/Instructions.css +790 -1
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +94 -41
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +19 -5
- package/dist/es/components/NotificationBox/style/NotificationBox.css +28 -0
- package/dist/es/components/PageTitle/PageTitle.css +80 -1
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +37 -12
- package/dist/es/components/Partners/Partners.css +53 -1
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +48 -17
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +80 -1
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +28 -10
- package/dist/es/components/Property/Property.css +156 -1
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +81 -37
- package/dist/es/components/Property/PropertyDescription.css +17 -1
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +28 -8
- package/dist/es/components/Property/types.d.ts +5 -7
- package/dist/es/components/Property/types.js +0 -1
- package/dist/es/components/Steps/Steps.css +41 -1
- package/dist/es/components/Steps/Steps.d.ts +1 -2
- package/dist/es/components/Steps/Steps.js +19 -4
- package/dist/es/components/Steps/StepsItem.css +42 -1
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +9 -2
- package/dist/es/components/StoreBanner/StoreBanner.css +346 -1
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +97 -41
- 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 +327 -1
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +44 -13
- package/dist/es/components/Table/Table.css +157 -1
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +51 -31
- package/dist/es/components/Table/TableCell.js +6 -0
- package/dist/es/components/Table/TableRow.js +10 -1
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +13 -4
- package/dist/es/components/TextBox/TextBox.css +25 -1
- package/dist/es/components/TextBox/TextBox.d.ts +1 -2
- package/dist/es/components/TextBox/TextBox.js +23 -8
- package/dist/es/components/TextBox/TextBoxPicture.css +27 -1
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +14 -5
- package/dist/es/components/TextWithIcon/TextWithIcon.css +10 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +24 -6
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +29 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +21 -6
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +23 -6
- package/dist/es/components/VideoBanner/VideoBanner.css +225 -1
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +110 -47
- package/dist/es/components/VideoBlock/VideoBlock.css +106 -1
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +75 -35
- package/dist/es/helpers/getColumnConfig.d.ts +1 -5
- package/dist/lib/components/AccordionBox/AccordionBox.css +15 -1
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +66 -10
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +56 -32
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +43 -12
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +17 -9
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +23 -4
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +16 -5
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +58 -1
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +35 -1
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +68 -1
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +34 -1
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +13 -2
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +25 -7
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +86 -26
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +53 -13
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +37 -10
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/lib/components/BenefitsIcons/types.js +8 -5
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +71 -24
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +43 -1
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/lib/components/BenefitsPictures/helpers.js +40 -9
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/lib/components/BenefitsPictures/types.js +1 -5
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +43 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +60 -18
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +55 -22
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -1
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +89 -40
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +72 -29
- package/dist/lib/components/Card/Card.css +354 -1
- package/dist/lib/components/Card/Card.d.ts +4 -4
- package/dist/lib/components/Card/Card.js +164 -67
- package/dist/lib/components/Card/types.d.ts +10 -10
- package/dist/lib/components/Card/types.js +1 -5
- package/dist/lib/components/CardsBox/CardsBox.js +31 -7
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +8 -1
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +39 -15
- package/dist/lib/components/Container/Container.css +3287 -1
- package/dist/lib/components/Container/Container.d.ts +5 -7
- package/dist/lib/components/Container/Container.js +40 -18
- package/dist/lib/components/DownloadLinks/DownloadLink.css +37 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +60 -17
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +36 -1
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +33 -8
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +2 -5
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +9 -6
- package/dist/lib/components/ImageBanner/ImageBanner.css +252 -1
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +7 -8
- package/dist/lib/components/ImageBanner/ImageBanner.js +138 -61
- package/dist/lib/components/Instructions/Instructions.css +790 -1
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +186 -103
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +37 -9
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +28 -0
- package/dist/lib/components/PageTitle/PageTitle.css +80 -1
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +52 -15
- package/dist/lib/components/Partners/Partners.css +53 -1
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +65 -21
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +80 -1
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +46 -16
- package/dist/lib/components/Property/Property.css +156 -1
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +120 -60
- package/dist/lib/components/Property/PropertyDescription.css +17 -1
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +46 -15
- package/dist/lib/components/Property/types.d.ts +5 -7
- package/dist/lib/components/Property/types.js +1 -5
- package/dist/lib/components/Steps/Steps.css +41 -1
- package/dist/lib/components/Steps/Steps.d.ts +1 -2
- package/dist/lib/components/Steps/Steps.js +35 -8
- package/dist/lib/components/Steps/StepsItem.css +42 -1
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +23 -11
- package/dist/lib/components/StoreBanner/StoreBanner.css +346 -1
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +118 -47
- 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 +327 -1
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +63 -17
- package/dist/lib/components/Table/Table.css +157 -1
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +68 -35
- package/dist/lib/components/Table/TableCell.js +16 -4
- package/dist/lib/components/Table/TableRow.js +19 -5
- package/dist/lib/components/TabsBox/TabBox.js +4 -1
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +26 -8
- package/dist/lib/components/TextBox/TextBox.css +25 -1
- package/dist/lib/components/TextBox/TextBox.d.ts +1 -2
- package/dist/lib/components/TextBox/TextBox.js +36 -12
- package/dist/lib/components/TextBox/TextBoxPicture.css +27 -1
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +29 -11
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +10 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +39 -10
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +29 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +37 -10
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +40 -10
- package/dist/lib/components/VideoBanner/VideoBanner.css +225 -1
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +176 -83
- package/dist/lib/components/VideoBlock/VideoBlock.css +106 -1
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +114 -58
- package/dist/lib/constants/throttleTime.js +3 -2
- package/dist/lib/helpers/getColumnConfig.d.ts +1 -5
- package/dist/lib/helpers/getColumnConfig.js +5 -2
- package/dist/lib/index.js +57 -10
- package/package.json +92 -87
- package/dist/es/components/NotificationBox/NotificationBox.css +0 -1
- package/dist/lib/components/NotificationBox/NotificationBox.css +0 -1
@@ -1,188 +1,209 @@
|
|
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); }
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
6
|
exports["default"] = void 0;
|
7
|
+
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
9
|
+
|
10
10
|
require("core-js/modules/es.string.link.js");
|
11
|
-
|
11
|
+
|
12
|
+
require("core-js/modules/es.array.map.js");
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
12
16
|
var _uiCore = require("@megafon/ui-core");
|
17
|
+
|
13
18
|
var _uiHelpers = require("@megafon/ui-helpers");
|
14
|
-
|
15
|
-
|
19
|
+
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
21
|
+
|
16
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
|
+
|
17
24
|
var textsConvertConfig = {
|
18
25
|
b: {
|
19
26
|
component: function component(_ref) {
|
20
27
|
var children = _ref.children;
|
21
|
-
return /*#__PURE__*/
|
28
|
+
return /*#__PURE__*/_react["default"].createElement("b", null, children);
|
22
29
|
}
|
23
30
|
},
|
24
31
|
ul: {
|
25
32
|
component: function component(_ref2) {
|
26
33
|
var children = _ref2.children;
|
27
|
-
return /*#__PURE__*/
|
34
|
+
return /*#__PURE__*/_react["default"].createElement("ul", null, children);
|
28
35
|
}
|
29
36
|
},
|
30
37
|
ol: {
|
31
38
|
component: function component(_ref3) {
|
32
39
|
var children = _ref3.children;
|
33
|
-
return /*#__PURE__*/
|
40
|
+
return /*#__PURE__*/_react["default"].createElement("ol", null, children);
|
34
41
|
}
|
35
42
|
},
|
36
43
|
li: {
|
37
44
|
component: function component(_ref4) {
|
38
45
|
var children = _ref4.children;
|
39
|
-
return /*#__PURE__*/
|
46
|
+
return /*#__PURE__*/_react["default"].createElement("li", null, children);
|
40
47
|
}
|
41
48
|
}
|
42
49
|
};
|
43
50
|
var cn = (0, _uiHelpers.cnCreate)('mfui-card');
|
51
|
+
|
44
52
|
var Card = function Card(_ref5) {
|
45
53
|
var dataAttrs = _ref5.dataAttrs,
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
className = _ref5.className,
|
55
|
+
classes = _ref5.classes,
|
56
|
+
rootRef = _ref5.rootRef,
|
57
|
+
_ref5$isFullHeight = _ref5.isFullHeight,
|
58
|
+
isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
|
59
|
+
link = _ref5.link,
|
60
|
+
_ref5$view = _ref5.view,
|
61
|
+
view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
|
62
|
+
image = _ref5.image,
|
63
|
+
icon = _ref5.icon,
|
64
|
+
title = _ref5.title,
|
65
|
+
markerList = _ref5.markerList,
|
66
|
+
textsList = _ref5.textsList,
|
67
|
+
featuresList = _ref5.featuresList,
|
68
|
+
iconsList = _ref5.iconsList,
|
69
|
+
price = _ref5.price,
|
70
|
+
button = _ref5.button,
|
71
|
+
extraButton = _ref5.extraButton,
|
72
|
+
badge = _ref5.badge,
|
73
|
+
onClick = _ref5.onClick;
|
66
74
|
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
67
75
|
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
68
76
|
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
69
77
|
var ElementType = isLink ? 'a' : 'div';
|
78
|
+
|
70
79
|
var renderImage = function renderImage() {
|
71
80
|
if (!image) {
|
72
81
|
return null;
|
73
82
|
}
|
83
|
+
|
74
84
|
var _image$position = image.position,
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
return /*#__PURE__*/
|
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), {
|
79
89
|
className: cn('img-box', {
|
80
90
|
position: position
|
81
91
|
})
|
82
|
-
}), /*#__PURE__*/
|
92
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
83
93
|
className: cn('img'),
|
84
94
|
src: src,
|
85
95
|
alt: alt
|
86
96
|
}));
|
87
97
|
};
|
98
|
+
|
88
99
|
var renderIcon = function renderIcon() {
|
89
100
|
if (!icon) {
|
90
101
|
return null;
|
91
102
|
}
|
92
|
-
|
103
|
+
|
104
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
93
105
|
className: cn('icon')
|
94
106
|
}), icon);
|
95
107
|
};
|
108
|
+
|
96
109
|
var renderContent = function renderContent() {
|
97
110
|
if (markerList) {
|
98
|
-
return /*#__PURE__*/
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("ul", {
|
99
112
|
className: cn('marker-list')
|
100
113
|
}, markerList.map(function (item, i) {
|
101
|
-
return /*#__PURE__*/
|
114
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
102
115
|
className: cn('marker-item'),
|
103
116
|
key: i
|
104
|
-
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/
|
117
|
+
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/_react["default"].createElement("span", {
|
105
118
|
className: cn('marker-note')
|
106
119
|
}, (0, _uiHelpers.convert)(item.note, {})));
|
107
120
|
}));
|
108
121
|
}
|
122
|
+
|
109
123
|
if (textsList) {
|
110
|
-
return /*#__PURE__*/
|
124
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
111
125
|
className: cn('texts')
|
112
126
|
}, textsList.map(function (item, i) {
|
113
|
-
return /*#__PURE__*/
|
127
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
114
128
|
className: cn('texts-item'),
|
115
129
|
key: i
|
116
|
-
}, !!item.title && /*#__PURE__*/
|
130
|
+
}, !!item.title && /*#__PURE__*/_react["default"].createElement("div", {
|
117
131
|
className: cn('texts-title')
|
118
|
-
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/
|
132
|
+
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/_react["default"].createElement("div", {
|
119
133
|
className: cn('texts-desc')
|
120
134
|
}, (0, _uiHelpers.convert)(item.desc, textsConvertConfig)));
|
121
135
|
}));
|
122
136
|
}
|
137
|
+
|
123
138
|
if (featuresList) {
|
124
|
-
return /*#__PURE__*/
|
139
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
125
140
|
className: cn('features')
|
126
|
-
}, /*#__PURE__*/
|
141
|
+
}, /*#__PURE__*/_react["default"].createElement("ul", {
|
127
142
|
className: cn('features-list')
|
128
143
|
}, featuresList.items.map(function (item, i) {
|
129
|
-
return /*#__PURE__*/
|
144
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
130
145
|
className: cn('features-item'),
|
131
146
|
key: i
|
132
|
-
}, /*#__PURE__*/
|
147
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
133
148
|
className: cn('features-item-title')
|
134
|
-
}, /*#__PURE__*/
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
135
150
|
className: cn('features-item-text')
|
136
|
-
}, item.title)), /*#__PURE__*/
|
151
|
+
}, item.title)), /*#__PURE__*/_react["default"].createElement("div", {
|
137
152
|
className: cn('features-item-value')
|
138
|
-
}, /*#__PURE__*/
|
153
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
139
154
|
className: cn('features-item-text')
|
140
155
|
}, item.value)));
|
141
156
|
})), featuresList.desc);
|
142
157
|
}
|
158
|
+
|
143
159
|
if (iconsList) {
|
144
|
-
return /*#__PURE__*/
|
160
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
145
161
|
className: cn('icons')
|
146
|
-
}, !!iconsList.desc && /*#__PURE__*/
|
162
|
+
}, !!iconsList.desc && /*#__PURE__*/_react["default"].createElement("div", {
|
147
163
|
className: cn('icons-desc')
|
148
|
-
}, iconsList.desc), /*#__PURE__*/
|
164
|
+
}, iconsList.desc), /*#__PURE__*/_react["default"].createElement("div", {
|
149
165
|
className: cn('icons-list')
|
150
166
|
}, iconsList.items.map(function (item, i) {
|
151
|
-
return /*#__PURE__*/
|
167
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
152
168
|
className: cn('icons-item'),
|
153
169
|
key: i
|
154
|
-
}, /*#__PURE__*/
|
170
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
155
171
|
className: cn('icons-item-icon')
|
156
|
-
}, item.icon), /*#__PURE__*/
|
172
|
+
}, item.icon), /*#__PURE__*/_react["default"].createElement("div", {
|
157
173
|
className: cn('icons-item-text')
|
158
174
|
}, item.text));
|
159
175
|
})));
|
160
176
|
}
|
177
|
+
|
161
178
|
return null;
|
162
179
|
};
|
180
|
+
|
163
181
|
var renderPrice = function renderPrice() {
|
164
182
|
if (!price) {
|
165
183
|
return null;
|
166
184
|
}
|
167
|
-
|
185
|
+
|
186
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
168
187
|
className: cn('price')
|
169
|
-
}, !!price.oldValue && /*#__PURE__*/
|
188
|
+
}, !!price.oldValue && /*#__PURE__*/_react["default"].createElement("div", {
|
170
189
|
className: cn('price-old-value')
|
171
|
-
}, price.oldValue), /*#__PURE__*/
|
190
|
+
}, price.oldValue), /*#__PURE__*/_react["default"].createElement("div", {
|
172
191
|
className: cn('price-value')
|
173
|
-
}, price.value), !!price.period && /*#__PURE__*/
|
192
|
+
}, price.value), !!price.period && /*#__PURE__*/_react["default"].createElement("div", {
|
174
193
|
className: cn('price-period')
|
175
194
|
}, price.period));
|
176
195
|
};
|
196
|
+
|
177
197
|
var renderButtons = function renderButtons() {
|
178
198
|
if (!button && !extraButton) {
|
179
199
|
return null;
|
180
200
|
}
|
181
|
-
|
201
|
+
|
202
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
182
203
|
className: cn('buttons', {
|
183
204
|
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
184
205
|
})
|
185
|
-
}, !!button && /*#__PURE__*/
|
206
|
+
}, !!button && /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
186
207
|
dataAttrs: {
|
187
208
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
188
209
|
},
|
@@ -190,7 +211,7 @@ var Card = function Card(_ref5) {
|
|
190
211
|
href: button.href,
|
191
212
|
target: button.target,
|
192
213
|
onClick: button === null || button === void 0 ? void 0 : button.onClick
|
193
|
-
}, button.title), !!extraButton && /*#__PURE__*/
|
214
|
+
}, button.title), !!extraButton && /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
194
215
|
dataAttrs: {
|
195
216
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.extraButton
|
196
217
|
},
|
@@ -201,15 +222,18 @@ var Card = function Card(_ref5) {
|
|
201
222
|
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
202
223
|
}, extraButton.title));
|
203
224
|
};
|
225
|
+
|
204
226
|
var renderFooter = function renderFooter() {
|
205
227
|
if (!price && !button && !extraButton && !image) {
|
206
228
|
return null;
|
207
229
|
}
|
208
|
-
|
230
|
+
|
231
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
209
232
|
className: cn('footer')
|
210
233
|
}, isBottomImage && renderImage(), renderPrice(), renderButtons());
|
211
234
|
};
|
212
|
-
|
235
|
+
|
236
|
+
return /*#__PURE__*/_react["default"].createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
213
237
|
className: cn({
|
214
238
|
'only-title': isOnlyTitle,
|
215
239
|
view: view,
|
@@ -220,12 +244,85 @@ var Card = function Card(_ref5) {
|
|
220
244
|
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
221
245
|
onClick: isLink ? onClick : undefined,
|
222
246
|
ref: rootRef
|
223
|
-
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/
|
247
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/_react["default"].createElement("div", {
|
224
248
|
className: cn('header')
|
225
|
-
}, /*#__PURE__*/
|
249
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
226
250
|
className: cn('title'),
|
227
251
|
as: "h3",
|
228
252
|
align: title.align
|
229
253
|
}, title.text), badge), renderContent(), renderFooter());
|
230
254
|
};
|
231
|
-
|
255
|
+
|
256
|
+
Card.propTypes = {
|
257
|
+
dataAttrs: _propTypes["default"].shape({
|
258
|
+
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
259
|
+
icon: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
260
|
+
imgBox: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
261
|
+
button: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
262
|
+
extraButton: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
263
|
+
}),
|
264
|
+
className: _propTypes["default"].string,
|
265
|
+
classes: _propTypes["default"].shape({
|
266
|
+
root: _propTypes["default"].string,
|
267
|
+
button: _propTypes["default"].string,
|
268
|
+
extraButton: _propTypes["default"].string
|
269
|
+
}),
|
270
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
271
|
+
current: _propTypes["default"].elementType
|
272
|
+
}), _propTypes["default"].any])]),
|
273
|
+
view: _propTypes["default"].oneOf(['shadow', 'background']),
|
274
|
+
link: _propTypes["default"].shape({
|
275
|
+
href: _propTypes["default"].string,
|
276
|
+
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top'])
|
277
|
+
}),
|
278
|
+
image: _propTypes["default"].shape({
|
279
|
+
src: _propTypes["default"].string.isRequired,
|
280
|
+
alt: _propTypes["default"].string,
|
281
|
+
position: _propTypes["default"].oneOf(['top', 'bottom'])
|
282
|
+
}),
|
283
|
+
icon: _propTypes["default"].node,
|
284
|
+
title: _propTypes["default"].shape({
|
285
|
+
text: _propTypes["default"].string.isRequired,
|
286
|
+
align: _propTypes["default"].oneOf(['left', 'center'])
|
287
|
+
}).isRequired,
|
288
|
+
textsList: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
289
|
+
title: _propTypes["default"].string,
|
290
|
+
desc: _propTypes["default"].string.isRequired
|
291
|
+
}).isRequired),
|
292
|
+
featuresList: _propTypes["default"].shape({
|
293
|
+
desc: _propTypes["default"].string,
|
294
|
+
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
295
|
+
title: _propTypes["default"].string.isRequired,
|
296
|
+
value: _propTypes["default"].string.isRequired
|
297
|
+
}).isRequired).isRequired
|
298
|
+
}),
|
299
|
+
iconsList: _propTypes["default"].shape({
|
300
|
+
desc: _propTypes["default"].string,
|
301
|
+
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
302
|
+
icon: _propTypes["default"].node.isRequired,
|
303
|
+
text: _propTypes["default"].string.isRequired
|
304
|
+
}).isRequired).isRequired
|
305
|
+
}),
|
306
|
+
price: _propTypes["default"].shape({
|
307
|
+
oldValue: _propTypes["default"].string,
|
308
|
+
value: _propTypes["default"].string.isRequired,
|
309
|
+
period: _propTypes["default"].string
|
310
|
+
}),
|
311
|
+
button: _propTypes["default"].shape({
|
312
|
+
title: _propTypes["default"].string.isRequired,
|
313
|
+
href: _propTypes["default"].string,
|
314
|
+
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
|
315
|
+
isCentered: _propTypes["default"].bool,
|
316
|
+
onClick: _propTypes["default"].func
|
317
|
+
}),
|
318
|
+
extraButton: _propTypes["default"].shape({
|
319
|
+
title: _propTypes["default"].string.isRequired,
|
320
|
+
href: _propTypes["default"].string,
|
321
|
+
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
|
322
|
+
isCentered: _propTypes["default"].bool,
|
323
|
+
onClick: _propTypes["default"].func
|
324
|
+
}),
|
325
|
+
onClick: _propTypes["default"].func
|
326
|
+
};
|
327
|
+
var _default = Card;
|
328
|
+
exports["default"] = _default;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
type Target = '_self' | '_blank' | '_parent' | '_top';
|
3
|
-
export type Link = {
|
2
|
+
declare type Target = '_self' | '_blank' | '_parent' | '_top';
|
3
|
+
export declare type Link = {
|
4
4
|
/** Ссылка */
|
5
5
|
href?: string;
|
6
6
|
/** Target свойство ссылки */
|
7
7
|
target?: Target;
|
8
8
|
};
|
9
|
-
export type Image = {
|
9
|
+
export declare type Image = {
|
10
10
|
/** Ссылка на изображение */
|
11
11
|
src: string;
|
12
12
|
/** Значение тега alt для изображения */
|
@@ -14,25 +14,25 @@ export type Image = {
|
|
14
14
|
/** Позиция изображения */
|
15
15
|
position?: 'top' | 'bottom';
|
16
16
|
};
|
17
|
-
export type Title = {
|
17
|
+
export declare type Title = {
|
18
18
|
/** Текст */
|
19
19
|
text: string;
|
20
20
|
/** Выравнивание */
|
21
21
|
align?: 'left' | 'center';
|
22
22
|
};
|
23
|
-
export type MarkerList = {
|
23
|
+
export declare type MarkerList = {
|
24
24
|
/** Заголовок */
|
25
25
|
title: string;
|
26
26
|
/** Примечание */
|
27
27
|
note?: string;
|
28
28
|
}[];
|
29
|
-
export type TextsList = {
|
29
|
+
export declare type TextsList = {
|
30
30
|
/** Заголовок */
|
31
31
|
title?: string;
|
32
32
|
/** Описание */
|
33
33
|
desc: string;
|
34
34
|
}[];
|
35
|
-
export type FeaturesList = {
|
35
|
+
export declare type FeaturesList = {
|
36
36
|
/** Список */
|
37
37
|
items: {
|
38
38
|
/** Заголовок */
|
@@ -43,7 +43,7 @@ export type FeaturesList = {
|
|
43
43
|
/** Описание */
|
44
44
|
desc?: string;
|
45
45
|
};
|
46
|
-
export type IconsList = {
|
46
|
+
export declare type IconsList = {
|
47
47
|
/** Список */
|
48
48
|
items: {
|
49
49
|
/** Иконка */
|
@@ -54,7 +54,7 @@ export type IconsList = {
|
|
54
54
|
/** Описание */
|
55
55
|
desc?: string;
|
56
56
|
};
|
57
|
-
export type Price = {
|
57
|
+
export declare type Price = {
|
58
58
|
/** Старая цена */
|
59
59
|
oldValue?: string;
|
60
60
|
/** Текущая цена */
|
@@ -62,7 +62,7 @@ export type Price = {
|
|
62
62
|
/** Период */
|
63
63
|
period?: string;
|
64
64
|
};
|
65
|
-
export type ButtonType = {
|
65
|
+
export declare type ButtonType = {
|
66
66
|
/** Название */
|
67
67
|
title: string;
|
68
68
|
/** Ссылка */
|
@@ -1,25 +1,39 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
exports["default"] = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
9
12
|
require("core-js/modules/es.array.map.js");
|
13
|
+
|
10
14
|
var React = _interopRequireWildcard(require("react"));
|
15
|
+
|
11
16
|
var _uiCore = require("@megafon/ui-core");
|
17
|
+
|
12
18
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
+
|
20
|
+
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
21
|
+
|
13
22
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
14
|
-
|
15
|
-
function
|
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
|
+
|
16
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
+
|
17
30
|
var cn = (0, _uiHelpers.cnCreate)('mfui-cards-box');
|
31
|
+
|
18
32
|
var CardsBox = function CardsBox(_ref) {
|
19
33
|
var _ref$renderTwoColumns = _ref.renderTwoColumnsInRow,
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
|
35
|
+
dataAttrs = _ref.dataAttrs,
|
36
|
+
children = _ref.children;
|
23
37
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
24
38
|
className: cn()
|
25
39
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
@@ -33,4 +47,14 @@ var CardsBox = function CardsBox(_ref) {
|
|
33
47
|
}, (0, _helpers["default"])(React.Children.count(children), i, renderTwoColumnsInRow)), child);
|
34
48
|
})));
|
35
49
|
};
|
36
|
-
|
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;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
2
|
-
type GridConfig = {
|
1
|
+
declare type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
2
|
+
declare type GridConfig = {
|
3
3
|
all?: TGridSizeValues;
|
4
4
|
tablet?: TGridSizeValues;
|
5
5
|
mobile?: TGridSizeValues;
|
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
|
+
|
7
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
8
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
|
+
|
9
12
|
var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
|
10
13
|
var offset = renderTwoColumnsInRow ? '2' : undefined;
|
11
14
|
var offsetForEvenColumn = index % 2 ? undefined : offset;
|
@@ -14,6 +17,7 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
14
17
|
tablet: '6',
|
15
18
|
mobile: '12'
|
16
19
|
};
|
20
|
+
|
17
21
|
switch (count) {
|
18
22
|
case 2:
|
19
23
|
case 4:
|
@@ -21,8 +25,11 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
|
|
21
25
|
leftOffsetWide: offsetForEvenColumn,
|
22
26
|
leftOffsetDesktop: offsetForEvenColumn
|
23
27
|
});
|
28
|
+
|
24
29
|
default:
|
25
30
|
return (0, _extends2["default"])({}, columnSize);
|
26
31
|
}
|
27
32
|
};
|
28
|
-
|
33
|
+
|
34
|
+
var _default = getColumnConfig;
|
35
|
+
exports["default"] = _default;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Carousel } from '@megafon/ui-core';
|
3
|
-
type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
|
4
|
-
type DesktopSlidesPerView = 3 | 4;
|
3
|
+
declare type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
|
4
|
+
declare type DesktopSlidesPerView = 3 | 4;
|
5
5
|
interface ICarouselBox extends CarouselPropsTypes {
|
6
6
|
/** Количество видимых слайдов на разрешении 1280 и выше */
|
7
7
|
desktopSlidesPerView?: DesktopSlidesPerView;
|