@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,93 +1,75 @@
|
|
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"] = exports.
|
9
|
-
|
7
|
+
exports["default"] = exports.Theme = exports.DeviceMask = void 0;
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
|
-
require("core-js/modules/es.object.values.js");
|
13
|
-
|
14
9
|
var React = _interopRequireWildcard(require("react"));
|
15
|
-
|
16
10
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
11
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
21
|
-
|
22
12
|
var _StoreButton = _interopRequireWildcard(require("../StoreButton/StoreButton"));
|
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
|
-
|
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; }
|
28
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
29
|
-
|
30
|
-
var Theme = {
|
16
|
+
var Theme = exports.Theme = {
|
31
17
|
DEFAULT: 'default',
|
32
18
|
GREEN: 'green',
|
33
19
|
SPB_SKY_1: 'spbSky1',
|
34
20
|
SPB_SKY_0: 'spbSky0'
|
35
21
|
};
|
36
|
-
exports.
|
37
|
-
var DeviceMask = {
|
22
|
+
var DeviceMask = exports.DeviceMask = {
|
38
23
|
ANDROID: 'android',
|
39
24
|
NEW_IPHONE: 'new-iphone',
|
40
|
-
|
41
25
|
/** DEPRECATED: 'black-iphone', 'white-iphone', 'iphone-12' */
|
42
26
|
BLACK_IPHONE: 'black-iphone',
|
43
27
|
WHITE_IPHONE: 'white-iphone',
|
44
28
|
IPHONE_12: 'iphone-12'
|
45
29
|
};
|
46
|
-
exports.DeviceMask = DeviceMask;
|
47
30
|
var testIdPrefix = 'StoreBanner';
|
48
31
|
var cn = (0, _uiHelpers.cnCreate)('mfui-store-banner');
|
49
|
-
|
50
32
|
var StoreBanner = function StoreBanner(_ref) {
|
51
33
|
var className = _ref.className,
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
34
|
+
_ref$classes = _ref.classes,
|
35
|
+
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
36
|
+
rootClassName = _ref$classes2.root,
|
37
|
+
appleLinkClassName = _ref$classes2.appleLink,
|
38
|
+
galaxyStoreLinkClassName = _ref$classes2.galaxyStoreLink,
|
39
|
+
googleLinkClassName = _ref$classes2.googleLink,
|
40
|
+
huaweiLinkClassName = _ref$classes2.huaweiLink,
|
41
|
+
miStoreLinkClassName = _ref$classes2.miStoreLink,
|
42
|
+
ruStoreLinkClassName = _ref$classes2.ruStoreLink,
|
43
|
+
vAppstoreLinkClassName = _ref$classes2.vAppstoreLink,
|
44
|
+
buttonClassName = _ref$classes2.button,
|
45
|
+
title = _ref.title,
|
46
|
+
text = _ref.text,
|
47
|
+
linkApple = _ref.linkApple,
|
48
|
+
linkGalaxyStore = _ref.linkGalaxyStore,
|
49
|
+
linkGoogle = _ref.linkGoogle,
|
50
|
+
linkHuawei = _ref.linkHuawei,
|
51
|
+
linkMiStore = _ref.linkMiStore,
|
52
|
+
linkRuStore = _ref.linkRuStore,
|
53
|
+
linkVAppstore = _ref.linkVAppstore,
|
54
|
+
linkButton = _ref.linkButton,
|
55
|
+
_ref$textButton = _ref.textButton,
|
56
|
+
textButton = _ref$textButton === void 0 ? 'Установите приложение' : _ref$textButton,
|
57
|
+
rel = _ref.rel,
|
58
|
+
qrCode = _ref.qrCode,
|
59
|
+
imageSrc = _ref.imageSrc,
|
60
|
+
_ref$theme = _ref.theme,
|
61
|
+
theme = _ref$theme === void 0 ? 'default' : _ref$theme,
|
62
|
+
deviceMask = _ref.deviceMask,
|
63
|
+
isContentLeftMobile = _ref.isContentLeftMobile,
|
64
|
+
rootRef = _ref.rootRef,
|
65
|
+
dataAttrs = _ref.dataAttrs,
|
66
|
+
onClickApple = _ref.onClickApple,
|
67
|
+
onClickGalaxyStore = _ref.onClickGalaxyStore,
|
68
|
+
onClickGoogle = _ref.onClickGoogle,
|
69
|
+
onClickHuawei = _ref.onClickHuawei,
|
70
|
+
onClickMiStore = _ref.onClickMiStore,
|
71
|
+
onClickRuStore = _ref.onClickRuStore,
|
72
|
+
onClickVAppstore = _ref.onClickVAppstore;
|
91
73
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
92
74
|
className: cn({
|
93
75
|
theme: theme,
|
@@ -109,9 +91,8 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
109
91
|
as: "h2",
|
110
92
|
className: cn('title'),
|
111
93
|
color: "inherit"
|
112
|
-
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/React.createElement(
|
94
|
+
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
113
95
|
className: cn('text'),
|
114
|
-
hasMargin: false,
|
115
96
|
color: "inherit"
|
116
97
|
}, (0, _uiHelpers.convert)(text, _uiHelpers.textConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
117
98
|
className: cn('links', {
|
@@ -225,56 +206,4 @@ var StoreBanner = function StoreBanner(_ref) {
|
|
225
206
|
alt: "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0430 \u044D\u043A\u0440\u0430\u043D\u0435 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430"
|
226
207
|
})))))));
|
227
208
|
};
|
228
|
-
|
229
|
-
StoreBanner.propTypes = {
|
230
|
-
title: _propTypes["default"].string.isRequired,
|
231
|
-
text: _propTypes["default"].string.isRequired,
|
232
|
-
linkApple: _propTypes["default"].string,
|
233
|
-
onClickApple: _propTypes["default"].func,
|
234
|
-
linkGalaxyStore: _propTypes["default"].string,
|
235
|
-
onClickGalaxyStore: _propTypes["default"].func,
|
236
|
-
linkGoogle: _propTypes["default"].string,
|
237
|
-
onClickGoogle: _propTypes["default"].func,
|
238
|
-
linkHuawei: _propTypes["default"].string,
|
239
|
-
onClickHuawei: _propTypes["default"].func,
|
240
|
-
linkMiStore: _propTypes["default"].string,
|
241
|
-
onClickMiStore: _propTypes["default"].func,
|
242
|
-
linkRuStore: _propTypes["default"].string,
|
243
|
-
onClickRuStore: _propTypes["default"].func,
|
244
|
-
linkVAppstore: _propTypes["default"].string,
|
245
|
-
onClickVAppstore: _propTypes["default"].func,
|
246
|
-
textButton: _propTypes["default"].string,
|
247
|
-
linkButton: _propTypes["default"].string,
|
248
|
-
rel: _propTypes["default"].string,
|
249
|
-
qrCode: _propTypes["default"].string,
|
250
|
-
deviceMask: _propTypes["default"].oneOf(Object.values(DeviceMask)).isRequired,
|
251
|
-
imageSrc: _propTypes["default"].string.isRequired,
|
252
|
-
className: _propTypes["default"].string,
|
253
|
-
classes: _propTypes["default"].shape({
|
254
|
-
appleLink: _propTypes["default"].string,
|
255
|
-
galaxyStoreLink: _propTypes["default"].string,
|
256
|
-
googleLink: _propTypes["default"].string,
|
257
|
-
huaweiLink: _propTypes["default"].string,
|
258
|
-
miStoreLink: _propTypes["default"].string,
|
259
|
-
ruStoreLink: _propTypes["default"].string,
|
260
|
-
vAppstoreLink: _propTypes["default"].string,
|
261
|
-
button: _propTypes["default"].string
|
262
|
-
}),
|
263
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
264
|
-
current: _propTypes["default"].elementType
|
265
|
-
}), _propTypes["default"].any])]),
|
266
|
-
theme: _propTypes["default"].oneOf(Object.values(Theme)),
|
267
|
-
dataAttrs: _propTypes["default"].shape({
|
268
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
269
|
-
button: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
270
|
-
linkApple: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
271
|
-
linkGalaxyStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
272
|
-
linkGoogle: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
273
|
-
linkHuawei: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
274
|
-
linkMiStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
275
|
-
linkRuStore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
276
|
-
linkVAppstore: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
277
|
-
})
|
278
|
-
};
|
279
|
-
var _default = StoreBanner;
|
280
|
-
exports["default"] = _default;
|
209
|
+
var _default = exports["default"] = StoreBanner;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Link } from '@megafon/ui-core';
|
3
|
-
import './StoreButton.
|
3
|
+
import './StoreButton.scss';
|
4
4
|
export declare enum ButtonSizes {
|
5
5
|
SMALL = "small",
|
6
6
|
MEDIUM = "medium",
|
@@ -15,8 +15,8 @@ export declare enum Theme {
|
|
15
15
|
RU_STORE = "ru-store",
|
16
16
|
V_APPSTORE = "v-appstore"
|
17
17
|
}
|
18
|
-
|
19
|
-
export
|
18
|
+
type LinkPropTypes = React.ComponentProps<typeof Link>;
|
19
|
+
export type Props = Required<Pick<LinkPropTypes, 'href'>> & Pick<LinkPropTypes, 'target' | 'rel' | 'onClick' | 'dataAttrs'> & {
|
20
20
|
/** Тема кнопки */
|
21
21
|
theme: Theme;
|
22
22
|
/** Дополнительный класс */
|
@@ -1,59 +1,34 @@
|
|
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"] = exports.Theme = exports.ButtonSizes = void 0;
|
9
|
-
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
|
-
require("core-js/modules/es.array.index-of.js");
|
13
|
-
|
14
9
|
require("core-js/modules/es.symbol.js");
|
15
|
-
|
16
|
-
require("core-js/modules/es.object.values.js");
|
17
|
-
|
10
|
+
require("core-js/modules/es.array.index-of.js");
|
18
11
|
var React = _interopRequireWildcard(require("react"));
|
19
|
-
|
20
12
|
var _uiCore = require("@megafon/ui-core");
|
21
|
-
|
22
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
23
|
-
|
24
|
-
var
|
25
|
-
|
26
|
-
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); }
|
27
|
-
|
28
|
-
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; }
|
29
|
-
|
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; }
|
30
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
31
|
-
|
32
17
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
33
18
|
var t = {};
|
34
|
-
|
35
|
-
for (var p in s) {
|
36
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
37
|
-
}
|
38
|
-
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
39
20
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
40
21
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
41
22
|
}
|
42
23
|
return t;
|
43
24
|
};
|
44
|
-
|
45
25
|
var ButtonSizes;
|
46
|
-
exports.ButtonSizes = ButtonSizes;
|
47
|
-
|
48
26
|
(function (ButtonSizes) {
|
49
27
|
ButtonSizes["SMALL"] = "small";
|
50
28
|
ButtonSizes["MEDIUM"] = "medium";
|
51
29
|
ButtonSizes["LARGE"] = "large";
|
52
30
|
})(ButtonSizes || (exports.ButtonSizes = ButtonSizes = {}));
|
53
|
-
|
54
31
|
var Theme;
|
55
|
-
exports.Theme = Theme;
|
56
|
-
|
57
32
|
(function (Theme) {
|
58
33
|
Theme["APP_STORE"] = "app-store";
|
59
34
|
Theme["GALAXY_STORE"] = "galaxy-store";
|
@@ -63,23 +38,20 @@ exports.Theme = Theme;
|
|
63
38
|
Theme["RU_STORE"] = "ru-store";
|
64
39
|
Theme["V_APPSTORE"] = "v-appstore";
|
65
40
|
})(Theme || (exports.Theme = Theme = {}));
|
66
|
-
|
67
41
|
var cn = (0, _uiHelpers.cnCreate)('mfui-store-button');
|
68
|
-
|
69
42
|
var StoreButton = function StoreButton(_a) {
|
70
43
|
var href = _a.href,
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
44
|
+
rel = _a.rel,
|
45
|
+
onClick = _a.onClick,
|
46
|
+
theme = _a.theme,
|
47
|
+
className = _a.className,
|
48
|
+
_a$sizeAll = _a.sizeAll,
|
49
|
+
sizeAll = _a$sizeAll === void 0 ? ButtonSizes.MEDIUM : _a$sizeAll,
|
50
|
+
sizeWide = _a.sizeWide,
|
51
|
+
sizeDesktop = _a.sizeDesktop,
|
52
|
+
sizeTablet = _a.sizeTablet,
|
53
|
+
sizeMobile = _a.sizeMobile,
|
54
|
+
rest = __rest(_a, ["href", "rel", "onClick", "theme", "className", "sizeAll", "sizeWide", "sizeDesktop", "sizeTablet", "sizeMobile"]);
|
83
55
|
return /*#__PURE__*/React.createElement(_uiCore.Link, (0, _extends2["default"])({}, rest, {
|
84
56
|
href: href,
|
85
57
|
rel: rel,
|
@@ -94,22 +66,4 @@ var StoreButton = function StoreButton(_a) {
|
|
94
66
|
}, className)
|
95
67
|
}));
|
96
68
|
};
|
97
|
-
|
98
|
-
StoreButton.propTypes = {
|
99
|
-
href: _propTypes["default"].string.isRequired,
|
100
|
-
rel: _propTypes["default"].string,
|
101
|
-
theme: _propTypes["default"].oneOf(Object.values(Theme)).isRequired,
|
102
|
-
onClick: _propTypes["default"].func,
|
103
|
-
className: _propTypes["default"].string,
|
104
|
-
target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
|
105
|
-
sizeAll: _propTypes["default"].oneOf(Object.values(ButtonSizes)),
|
106
|
-
sizeWide: _propTypes["default"].oneOf(Object.values(ButtonSizes)),
|
107
|
-
sizeDesktop: _propTypes["default"].oneOf(Object.values(ButtonSizes)),
|
108
|
-
sizeTablet: _propTypes["default"].oneOf(Object.values(ButtonSizes)),
|
109
|
-
sizeMobile: _propTypes["default"].oneOf(Object.values(ButtonSizes)),
|
110
|
-
dataAttrs: _propTypes["default"].shape({
|
111
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
112
|
-
})
|
113
|
-
};
|
114
|
-
var _default = StoreButton;
|
115
|
-
exports["default"] = _default;
|
69
|
+
var _default = exports["default"] = StoreButton;
|
@@ -1,83 +1,61 @@
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
|
12
9
|
require("core-js/modules/es.array.map.js");
|
13
|
-
|
14
10
|
var React = _interopRequireWildcard(require("react"));
|
15
|
-
|
16
11
|
var _uiHelpers = require("@megafon/ui-helpers");
|
17
|
-
|
18
12
|
var _htmr = _interopRequireDefault(require("htmr"));
|
19
|
-
|
20
13
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
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 cn = (0, _uiHelpers.cnCreate)('mfui-table');
|
31
|
-
|
32
18
|
var Table = function Table(_ref) {
|
33
19
|
var className = _ref.className,
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
20
|
+
_ref$fixColumn = _ref.fixColumn,
|
21
|
+
fixColumn = _ref$fixColumn === void 0 ? true : _ref$fixColumn,
|
22
|
+
_ref$minCellSize = _ref.minCellSize,
|
23
|
+
minCellSize = _ref$minCellSize === void 0 ? 'large' : _ref$minCellSize,
|
24
|
+
_ref$disableHeightLim = _ref.disableHeightLimit,
|
25
|
+
disableHeightLimit = _ref$disableHeightLim === void 0 ? false : _ref$disableHeightLim,
|
26
|
+
children = _ref.children;
|
41
27
|
var scrollRef = React.useRef(null);
|
42
|
-
|
43
28
|
var _React$useState = React.useState(false),
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
29
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
30
|
+
isTopShadow = _React$useState2[0],
|
31
|
+
setTopShadow = _React$useState2[1];
|
48
32
|
var _React$useState3 = React.useState(false),
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
33
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
34
|
+
isLeftShadow = _React$useState4[0],
|
35
|
+
setLeftShadow = _React$useState4[1];
|
53
36
|
var _React$useState5 = React.useState(false),
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
37
|
+
_React$useState6 = (0, _slicedToArray2["default"])(_React$useState5, 2),
|
38
|
+
isRightGradient = _React$useState6[0],
|
39
|
+
setRightGradient = _React$useState6[1];
|
58
40
|
var _React$useState7 = React.useState(false),
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
41
|
+
_React$useState8 = (0, _slicedToArray2["default"])(_React$useState7, 2),
|
42
|
+
isBottomGradient = _React$useState8[0],
|
43
|
+
setBottomGradient = _React$useState8[1];
|
63
44
|
var _React$useState9 = React.useState(false),
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
45
|
+
_React$useState10 = (0, _slicedToArray2["default"])(_React$useState9, 2),
|
46
|
+
isTouchDevice = _React$useState10[0],
|
47
|
+
setTouchDevice = _React$useState10[1];
|
68
48
|
var handleTableScroll = React.useCallback(function () {
|
69
49
|
var scrollNode = scrollRef.current;
|
70
|
-
|
71
50
|
if (!scrollNode) {
|
72
51
|
return;
|
73
52
|
}
|
74
|
-
|
75
53
|
var scrollHeight = scrollNode.scrollHeight,
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
54
|
+
clientHeight = scrollNode.clientHeight,
|
55
|
+
scrollTop = scrollNode.scrollTop,
|
56
|
+
scrollWidth = scrollNode.scrollWidth,
|
57
|
+
clientWidth = scrollNode.clientWidth,
|
58
|
+
scrollLeft = scrollNode.scrollLeft;
|
81
59
|
var deltaHeight = scrollHeight - clientHeight;
|
82
60
|
var deltaWidth = scrollWidth - clientWidth;
|
83
61
|
setRightGradient(deltaWidth !== Math.floor(scrollLeft));
|
@@ -96,14 +74,13 @@ var Table = function Table(_ref) {
|
|
96
74
|
React.useEffect(function () {
|
97
75
|
setTouchDevice((0, _uiHelpers.detectTouch)());
|
98
76
|
}, []);
|
99
|
-
|
100
77
|
var renderRows = function renderRows() {
|
101
78
|
return React.Children.map(children, function (_ref2, index) {
|
102
79
|
var _ref2$props = _ref2.props,
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
80
|
+
cells = _ref2$props.children,
|
81
|
+
head = _ref2$props.head,
|
82
|
+
_ref2$props$vAlign = _ref2$props.vAlign,
|
83
|
+
vAlign = _ref2$props$vAlign === void 0 ? 'default' : _ref2$props$vAlign;
|
107
84
|
return /*#__PURE__*/React.createElement("tr", {
|
108
85
|
key: index,
|
109
86
|
className: cn('row', {
|
@@ -120,7 +97,6 @@ var Table = function Table(_ref) {
|
|
120
97
|
}));
|
121
98
|
});
|
122
99
|
};
|
123
|
-
|
124
100
|
return /*#__PURE__*/React.createElement("div", {
|
125
101
|
className: cn({
|
126
102
|
'fix-column': fixColumn,
|
@@ -145,13 +121,4 @@ var Table = function Table(_ref) {
|
|
145
121
|
className: cn('bottom-gradient')
|
146
122
|
})));
|
147
123
|
};
|
148
|
-
|
149
|
-
Table.propTypes = {
|
150
|
-
className: PropTypes.string,
|
151
|
-
fixColumn: PropTypes.bool,
|
152
|
-
minCellSize: PropTypes.oneOf(['small', 'large']),
|
153
|
-
disableHeightLimit: PropTypes.bool,
|
154
|
-
children: PropTypes.arrayOf(PropTypes.element.isRequired).isRequired
|
155
|
-
};
|
156
|
-
var _default = Table;
|
157
|
-
exports["default"] = _default;
|
124
|
+
var _default = exports["default"] = Table;
|
@@ -1,27 +1,15 @@
|
|
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 React = _interopRequireWildcard(require("react"));
|
11
|
-
|
12
|
-
var
|
13
|
-
|
14
|
-
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); }
|
15
|
-
|
16
|
-
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; }
|
17
|
-
|
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; }
|
18
11
|
var TableCell = function TableCell(_ref) {
|
19
12
|
var children = _ref.children;
|
20
13
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children && children);
|
21
14
|
};
|
22
|
-
|
23
|
-
TableCell.propTypes = {
|
24
|
-
children: PropTypes.node
|
25
|
-
};
|
26
|
-
var _default = TableCell;
|
27
|
-
exports["default"] = _default;
|
15
|
+
var _default = exports["default"] = TableCell;
|
@@ -1,31 +1,17 @@
|
|
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 React = _interopRequireWildcard(require("react"));
|
11
|
-
|
12
|
-
var
|
13
|
-
|
14
|
-
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); }
|
15
|
-
|
16
|
-
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; }
|
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; }
|
11
|
+
/* eslint-disable react/no-unused-prop-types */
|
17
12
|
|
18
13
|
var TableRow = function TableRow(_ref) {
|
19
14
|
var children = _ref.children;
|
20
15
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
21
16
|
};
|
22
|
-
|
23
|
-
TableRow.propTypes = {
|
24
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
25
|
-
head: PropTypes.bool,
|
26
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
27
|
-
vAlign: PropTypes.oneOf(['default', 'bottom', 'top']),
|
28
|
-
children: PropTypes.arrayOf(PropTypes.element.isRequired).isRequired
|
29
|
-
};
|
30
|
-
var _default = TableRow;
|
31
|
-
exports["default"] = _default;
|
17
|
+
var _default = exports["default"] = TableRow;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Tabs } from '@megafon/ui-core';
|
3
|
-
export
|
3
|
+
export type TabsPropsType = React.ComponentProps<typeof Tabs> & {
|
4
4
|
/** Ссылка на корневой элемент */
|
5
5
|
rootRef?: React.Ref<HTMLDivElement>;
|
6
6
|
};
|