@megafon/ui-shared 6.0.0-beta.3 → 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,37 +1,62 @@
|
|
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
|
-
exports
|
8
|
+
exports["default"] = exports.TextColor = exports.ButtonColor = exports.VideoType = exports.ClassName = exports.testIdPrefix = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
9
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
+
|
10
14
|
require("core-js/modules/es.symbol.js");
|
15
|
+
|
11
16
|
require("core-js/modules/es.symbol.description.js");
|
12
|
-
|
17
|
+
|
13
18
|
require("core-js/modules/es.string.link.js");
|
14
|
-
|
19
|
+
|
20
|
+
require("core-js/modules/es.array.concat.js");
|
21
|
+
|
22
|
+
require("core-js/modules/es.object.values.js");
|
23
|
+
|
24
|
+
var _react = _interopRequireDefault(require("react"));
|
25
|
+
|
15
26
|
var _uiCore = require("@megafon/ui-core");
|
27
|
+
|
16
28
|
var _uiHelpers = require("@megafon/ui-helpers");
|
29
|
+
|
17
30
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
31
|
+
|
32
|
+
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
33
|
+
|
18
34
|
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
35
|
+
|
19
36
|
var _Breadcrumbs = _interopRequireDefault(require("../Breadcrumbs/Breadcrumbs"));
|
20
|
-
|
21
|
-
function
|
37
|
+
|
38
|
+
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); }
|
39
|
+
|
40
|
+
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; }
|
41
|
+
|
22
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
|
-
|
43
|
+
|
44
|
+
var testIdPrefix = 'VideoBanner';
|
45
|
+
exports.testIdPrefix = testIdPrefix;
|
24
46
|
var cn = (0, _uiHelpers.cnCreate)('mfui-video-banner');
|
25
47
|
var ClassName;
|
48
|
+
exports.ClassName = ClassName;
|
49
|
+
|
26
50
|
(function (ClassName) {
|
27
51
|
ClassName["BUTTON"] = "button";
|
28
52
|
ClassName["LINK"] = "link";
|
29
53
|
})(ClassName || (exports.ClassName = ClassName = {}));
|
54
|
+
|
30
55
|
var typographyConfig = {
|
31
56
|
b: {
|
32
57
|
component: function component(_ref) {
|
33
58
|
var children = _ref.children;
|
34
|
-
return /*#__PURE__*/
|
59
|
+
return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
35
60
|
className: cn('value'),
|
36
61
|
as: "h3",
|
37
62
|
color: "inherit"
|
@@ -39,99 +64,106 @@ var typographyConfig = {
|
|
39
64
|
}
|
40
65
|
}
|
41
66
|
};
|
42
|
-
var VideoType =
|
67
|
+
var VideoType = {
|
43
68
|
YOUTUBE: 'youtube',
|
44
69
|
VIDEO: 'video'
|
45
70
|
};
|
46
|
-
|
71
|
+
exports.VideoType = VideoType;
|
72
|
+
var ButtonColor = {
|
47
73
|
GREEN: 'green',
|
48
74
|
PURPLE: 'purple'
|
49
75
|
};
|
50
|
-
|
76
|
+
exports.ButtonColor = ButtonColor;
|
77
|
+
var TextColor = {
|
51
78
|
BLACK: 'black',
|
52
79
|
WHITE: 'white'
|
53
80
|
};
|
81
|
+
exports.TextColor = TextColor;
|
82
|
+
|
54
83
|
var VideoBanner = function VideoBanner(_ref2) {
|
55
84
|
var dataAttrs = _ref2.dataAttrs,
|
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
|
-
|
85
|
+
className = _ref2.className,
|
86
|
+
_ref2$classes = _ref2.classes,
|
87
|
+
classes = _ref2$classes === void 0 ? {} : _ref2$classes,
|
88
|
+
rootRef = _ref2.rootRef,
|
89
|
+
videoSrc = _ref2.videoSrc,
|
90
|
+
videoType = _ref2.videoType,
|
91
|
+
imageMobile = _ref2.imageMobile,
|
92
|
+
imageTablet = _ref2.imageTablet,
|
93
|
+
_ref2$imageDesktop = _ref2.imageDesktop,
|
94
|
+
imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
|
95
|
+
_ref2$imageDesktopWid = _ref2.imageDesktopWide,
|
96
|
+
imageDesktopWide = _ref2$imageDesktopWid === void 0 ? '' : _ref2$imageDesktopWid,
|
97
|
+
imageAlt = _ref2.imageAlt,
|
98
|
+
content = _ref2.content,
|
99
|
+
_ref2$isMuted = _ref2.isMuted,
|
100
|
+
isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
|
101
|
+
breadcrumbs = _ref2.breadcrumbs,
|
102
|
+
_ref2$videoMobile = _ref2.videoMobile,
|
103
|
+
videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile,
|
104
|
+
_ref2$hasBreadcrumbsM = _ref2.hasBreadcrumbsMicrodata,
|
105
|
+
hasBreadcrumbsMicrodata = _ref2$hasBreadcrumbsM === void 0 ? false : _ref2$hasBreadcrumbsM,
|
106
|
+
_ref2$bottomShadow = _ref2.bottomShadow,
|
107
|
+
bottomShadow = _ref2$bottomShadow === void 0 ? false : _ref2$bottomShadow;
|
108
|
+
|
109
|
+
var _React$useState = _react["default"].useState(true),
|
110
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
111
|
+
isMobile = _React$useState2[0],
|
112
|
+
setIsMobile = _React$useState2[1];
|
113
|
+
|
83
114
|
var isVideoData = !!videoSrc && !!videoType;
|
84
115
|
var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
|
85
|
-
|
116
|
+
|
117
|
+
var renderContent = _react["default"].useCallback(function (_ref3) {
|
86
118
|
var title = _ref3.title,
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
return /*#__PURE__*/
|
119
|
+
description = _ref3.description,
|
120
|
+
buttonTitle = _ref3.buttonTitle,
|
121
|
+
buttonHref = _ref3.buttonHref,
|
122
|
+
buttonTarget = _ref3.buttonTarget,
|
123
|
+
buttonDownload = _ref3.buttonDownload,
|
124
|
+
_ref3$buttonColor = _ref3.buttonColor,
|
125
|
+
buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
|
126
|
+
buttonRel = _ref3.buttonRel,
|
127
|
+
onButtonClick = _ref3.onButtonClick,
|
128
|
+
onLinkClick = _ref3.onLinkClick,
|
129
|
+
_ref3$textColor = _ref3.textColor,
|
130
|
+
textColor = _ref3$textColor === void 0 ? TextColor.BLACK : _ref3$textColor,
|
131
|
+
textColorMobile = _ref3.textColorMobile,
|
132
|
+
linkTitle = _ref3.linkTitle,
|
133
|
+
linkUrl = _ref3.linkUrl,
|
134
|
+
linkTarget = _ref3.linkTarget,
|
135
|
+
linkDownload = _ref3.linkDownload,
|
136
|
+
linkRel = _ref3.linkRel,
|
137
|
+
cost = _ref3.cost;
|
138
|
+
return /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, {
|
107
139
|
className: cn('grid'),
|
108
140
|
guttersLeft: "medium"
|
109
|
-
}, /*#__PURE__*/
|
141
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, {
|
110
142
|
mobile: "12",
|
111
143
|
tablet: "7",
|
112
144
|
desktop: "7",
|
113
145
|
wide: "6"
|
114
|
-
}, /*#__PURE__*/
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
115
147
|
className: cn('content', {
|
116
148
|
'text-color': textColor,
|
117
149
|
'text-color-mobile': textColorMobile
|
118
150
|
}),
|
119
151
|
"data-testid": "".concat(testIdPrefix, "-content")
|
120
|
-
}, /*#__PURE__*/
|
152
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
121
153
|
className: cn('title'),
|
122
154
|
as: "h1",
|
123
155
|
color: "inherit"
|
124
|
-
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/
|
156
|
+
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/_react["default"].createElement("div", {
|
125
157
|
className: cn('text')
|
126
|
-
}, /*#__PURE__*/
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
127
159
|
as: "h5",
|
128
160
|
color: "inherit",
|
129
161
|
className: cn('description')
|
130
|
-
}, (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig)), cost && /*#__PURE__*/
|
162
|
+
}, (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig)), cost && /*#__PURE__*/_react["default"].createElement("div", {
|
131
163
|
className: cn('cost')
|
132
|
-
}, (0, _uiHelpers.convert)(cost, typographyConfig))), /*#__PURE__*/
|
164
|
+
}, (0, _uiHelpers.convert)(cost, typographyConfig))), /*#__PURE__*/_react["default"].createElement("div", {
|
133
165
|
className: cn('btns-wrapper')
|
134
|
-
}, buttonTitle && /*#__PURE__*/
|
166
|
+
}, buttonTitle && /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
135
167
|
dataAttrs: {
|
136
168
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
137
169
|
},
|
@@ -142,7 +174,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
142
174
|
onClick: onButtonClick,
|
143
175
|
download: buttonDownload,
|
144
176
|
rel: buttonRel
|
145
|
-
}, buttonTitle), linkTitle && /*#__PURE__*/
|
177
|
+
}, buttonTitle), linkTitle && /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
|
146
178
|
dataAttrs: {
|
147
179
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
148
180
|
},
|
@@ -154,7 +186,8 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
154
186
|
rel: linkRel
|
155
187
|
}, linkTitle)))));
|
156
188
|
}, [classes.button, classes.link, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
|
157
|
-
|
189
|
+
|
190
|
+
var renderVideo = _react["default"].useCallback(function () {
|
158
191
|
switch (videoType) {
|
159
192
|
case VideoType.YOUTUBE:
|
160
193
|
{
|
@@ -168,7 +201,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
168
201
|
var policy = '&iv_load_policy=3';
|
169
202
|
var playlist = "&playlist=".concat(videoSrc);
|
170
203
|
var src = "".concat(url).concat(autoplay).concat(mute).concat(loop).concat(rel).concat(controls).concat(info).concat(policy).concat(playlist);
|
171
|
-
return /*#__PURE__*/
|
204
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
172
205
|
title: "iframe",
|
173
206
|
className: cn('video'),
|
174
207
|
src: src,
|
@@ -179,32 +212,37 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
179
212
|
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
180
213
|
});
|
181
214
|
}
|
215
|
+
|
182
216
|
case VideoType.VIDEO:
|
183
217
|
{
|
184
|
-
return
|
218
|
+
return (
|
219
|
+
/*#__PURE__*/
|
185
220
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
186
|
-
|
221
|
+
_react["default"].createElement("video", {
|
187
222
|
className: cn('video', [classes.video]),
|
188
223
|
autoPlay: true,
|
189
224
|
loop: true,
|
190
225
|
muted: isMuted,
|
191
226
|
"data-testid": "".concat(testIdPrefix, "-video")
|
192
|
-
}, /*#__PURE__*/
|
227
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
193
228
|
src: videoSrc,
|
194
229
|
type: "video/mp4"
|
195
230
|
}))
|
196
231
|
);
|
197
232
|
}
|
233
|
+
|
198
234
|
default:
|
199
235
|
{
|
200
236
|
return null;
|
201
237
|
}
|
202
238
|
}
|
203
239
|
}, [videoType, videoSrc, isMuted, classes.video]);
|
204
|
-
|
240
|
+
|
241
|
+
_react["default"].useEffect(function () {
|
205
242
|
var resizeHandler = function resizeHandler() {
|
206
243
|
setIsMobile(window.innerWidth < _uiHelpers.breakpoints.DESKTOP_SMALL_START);
|
207
244
|
};
|
245
|
+
|
208
246
|
var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
209
247
|
resizeHandler();
|
210
248
|
window.addEventListener('resize', resizeHandlerThrottled);
|
@@ -212,15 +250,16 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
212
250
|
window.removeEventListener('resize', resizeHandlerThrottled);
|
213
251
|
};
|
214
252
|
}, [setIsMobile]);
|
215
|
-
|
253
|
+
|
254
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
216
255
|
ref: rootRef
|
217
256
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
218
257
|
className: cn({
|
219
258
|
'bottom-shadow': bottomShadow
|
220
259
|
}, [className, classes.root])
|
221
|
-
}), /*#__PURE__*/
|
260
|
+
}), /*#__PURE__*/_react["default"].createElement(_uiCore.ContentArea, null, /*#__PURE__*/_react["default"].createElement("div", {
|
222
261
|
className: cn('wrapper')
|
223
|
-
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/
|
262
|
+
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/_react["default"].createElement(_Breadcrumbs["default"], {
|
224
263
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
225
264
|
dataAttrs: {
|
226
265
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -232,21 +271,75 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
232
271
|
classes: {
|
233
272
|
item: classes.breadcrumbs
|
234
273
|
}
|
235
|
-
}), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/
|
274
|
+
}), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/_react["default"].createElement("picture", {
|
236
275
|
"data-testid": "".concat(testIdPrefix, "-picture")
|
237
|
-
}, /*#__PURE__*/
|
276
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
238
277
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_MIDDLE_START, "px)"),
|
239
278
|
srcSet: imageDesktopWide
|
240
|
-
}), /*#__PURE__*/
|
279
|
+
}), /*#__PURE__*/_react["default"].createElement("source", {
|
241
280
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
|
242
281
|
srcSet: imageDesktop
|
243
|
-
}), /*#__PURE__*/
|
282
|
+
}), /*#__PURE__*/_react["default"].createElement("source", {
|
244
283
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.MOBILE_BIG_START, "px)"),
|
245
284
|
srcSet: imageTablet
|
246
|
-
}), /*#__PURE__*/
|
285
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
247
286
|
className: cn('background-image'),
|
248
287
|
src: imageMobile,
|
249
288
|
alt: imageAlt
|
250
289
|
})))));
|
251
290
|
};
|
252
|
-
|
291
|
+
|
292
|
+
VideoBanner.propTypes = {
|
293
|
+
dataAttrs: PropTypes.shape({
|
294
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
295
|
+
breadcrumbs: PropTypes.objectOf(PropTypes.string.isRequired),
|
296
|
+
breadcrumbsLink: PropTypes.objectOf(PropTypes.string.isRequired),
|
297
|
+
button: PropTypes.objectOf(PropTypes.string.isRequired),
|
298
|
+
link: PropTypes.objectOf(PropTypes.string.isRequired)
|
299
|
+
}),
|
300
|
+
className: PropTypes.string,
|
301
|
+
classes: PropTypes.shape({
|
302
|
+
root: PropTypes.string,
|
303
|
+
button: PropTypes.string,
|
304
|
+
link: PropTypes.string,
|
305
|
+
breadcrumbs: PropTypes.string
|
306
|
+
}),
|
307
|
+
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
308
|
+
current: PropTypes.elementType
|
309
|
+
}), PropTypes.any])]),
|
310
|
+
videoSrc: PropTypes.string,
|
311
|
+
videoType: PropTypes.oneOf(Object.values(VideoType)),
|
312
|
+
videoMobile: PropTypes.bool,
|
313
|
+
content: PropTypes.shape({
|
314
|
+
title: PropTypes.string.isRequired,
|
315
|
+
description: PropTypes.string.isRequired,
|
316
|
+
buttonTitle: PropTypes.string,
|
317
|
+
buttonHref: PropTypes.string,
|
318
|
+
buttonDownload: PropTypes.bool,
|
319
|
+
buttonColor: PropTypes.oneOf(Object.values(ButtonColor)),
|
320
|
+
buttonRel: PropTypes.string,
|
321
|
+
onButtonClick: PropTypes.func,
|
322
|
+
onLinkClick: PropTypes.func,
|
323
|
+
textColor: PropTypes.oneOf(Object.values(TextColor)),
|
324
|
+
textColorMobile: PropTypes.oneOf(Object.values(TextColor)),
|
325
|
+
linkTitle: PropTypes.string,
|
326
|
+
linkUrl: PropTypes.string,
|
327
|
+
linkDownload: PropTypes.bool,
|
328
|
+
linkRel: PropTypes.string,
|
329
|
+
cost: PropTypes.string
|
330
|
+
}),
|
331
|
+
isMuted: PropTypes.bool,
|
332
|
+
imageMobile: PropTypes.string.isRequired,
|
333
|
+
imageTablet: PropTypes.string.isRequired,
|
334
|
+
imageDesktop: PropTypes.string,
|
335
|
+
imageDesktopWide: PropTypes.string,
|
336
|
+
imageAlt: PropTypes.string,
|
337
|
+
breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
|
338
|
+
title: PropTypes.string.isRequired,
|
339
|
+
href: PropTypes.string
|
340
|
+
}).isRequired),
|
341
|
+
hasBreadcrumbsMicrodata: PropTypes.bool,
|
342
|
+
bottomShadow: PropTypes.bool
|
343
|
+
};
|
344
|
+
var _default = VideoBanner;
|
345
|
+
exports["default"] = _default;
|
@@ -1 +1,106 @@
|
|
1
|
-
h1,
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-video-block {
|
9
|
+
display: -webkit-box;
|
10
|
+
display: -ms-flexbox;
|
11
|
+
display: flex;
|
12
|
+
-webkit-box-align: center;
|
13
|
+
-ms-flex-align: center;
|
14
|
+
align-items: center;
|
15
|
+
}
|
16
|
+
.mfui-video-block__content {
|
17
|
+
display: -webkit-box;
|
18
|
+
display: -ms-flexbox;
|
19
|
+
display: flex;
|
20
|
+
-webkit-box-orient: vertical;
|
21
|
+
-webkit-box-direction: normal;
|
22
|
+
-ms-flex-direction: column;
|
23
|
+
flex-direction: column;
|
24
|
+
-webkit-box-pack: center;
|
25
|
+
-ms-flex-pack: center;
|
26
|
+
justify-content: center;
|
27
|
+
}
|
28
|
+
@media screen and (max-width: 767px) {
|
29
|
+
.mfui-video-block__content {
|
30
|
+
margin-top: 24px;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
34
|
+
.mfui-video-block__content {
|
35
|
+
margin-top: 32px;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
@media screen and (min-width: 1024px) {
|
39
|
+
.mfui-video-block__content {
|
40
|
+
height: 100%;
|
41
|
+
margin-right: 20px;
|
42
|
+
padding-right: 20px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
@media screen and (min-width: 1024px) {
|
46
|
+
.mfui-video-block__content_position-right {
|
47
|
+
margin: 0 0 0 20px;
|
48
|
+
padding: 0 0 0 20px;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
.mfui-video-block__header {
|
52
|
+
margin-bottom: 24px;
|
53
|
+
}
|
54
|
+
@media screen and (max-width: 1023px) {
|
55
|
+
.mfui-video-block__header {
|
56
|
+
margin-bottom: 16px;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
.mfui-video-block__description {
|
60
|
+
font-size: 15px;
|
61
|
+
line-height: 24px;
|
62
|
+
font-weight: 400;
|
63
|
+
}
|
64
|
+
.mfui-video-block__button {
|
65
|
+
-ms-flex-item-align: start;
|
66
|
+
align-self: flex-start;
|
67
|
+
max-width: 100%;
|
68
|
+
margin-top: 32px;
|
69
|
+
}
|
70
|
+
@media screen and (max-width: 767px) {
|
71
|
+
.mfui-video-block__button {
|
72
|
+
-ms-flex-item-align: center;
|
73
|
+
align-self: center;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
.mfui-video-block__video {
|
77
|
+
width: 100%;
|
78
|
+
-o-object-fit: contain;
|
79
|
+
object-fit: contain;
|
80
|
+
}
|
81
|
+
.mfui-video-block__video_fix-background {
|
82
|
+
-webkit-filter: brightness(108.5%);
|
83
|
+
filter: brightness(108.5%);
|
84
|
+
}
|
85
|
+
.mfui-video-block__youtube {
|
86
|
+
position: relative;
|
87
|
+
padding-bottom: 56.25%;
|
88
|
+
}
|
89
|
+
.mfui-video-block__iframe {
|
90
|
+
position: absolute;
|
91
|
+
top: 0;
|
92
|
+
left: 0;
|
93
|
+
}
|
94
|
+
.mfui-video-block__grid {
|
95
|
+
width: 100%;
|
96
|
+
}
|
97
|
+
.mfui-video-block__content-column_position-right {
|
98
|
+
-webkit-box-ordinal-group: 3;
|
99
|
+
-ms-flex-order: 2;
|
100
|
+
order: 2;
|
101
|
+
}
|
102
|
+
.mfui-video-block__video-column_position-left {
|
103
|
+
-webkit-box-ordinal-group: 2;
|
104
|
+
-ms-flex-order: 1;
|
105
|
+
order: 1;
|
106
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './VideoBlock.
|
1
|
+
import React, { Ref } from 'react';
|
2
|
+
import './VideoBlock.less';
|
3
3
|
export interface IContent {
|
4
4
|
/** Заголовок */
|
5
5
|
title: string;
|
@@ -20,7 +20,7 @@ export declare const VideoTypes: {
|
|
20
20
|
readonly YOUTUBE: "youtube";
|
21
21
|
readonly VIDEO: "video";
|
22
22
|
};
|
23
|
-
type VideoType =
|
23
|
+
declare type VideoType = typeof VideoTypes[keyof typeof VideoTypes];
|
24
24
|
export interface IVideoBlockProps {
|
25
25
|
/** Дополнительные data атрибуты к внутренним элементам */
|
26
26
|
dataAttrs?: {
|
@@ -36,7 +36,7 @@ export interface IVideoBlockProps {
|
|
36
36
|
description?: string;
|
37
37
|
};
|
38
38
|
/** Ссылка на корневой элемент */
|
39
|
-
rootRef?:
|
39
|
+
rootRef?: Ref<HTMLDivElement>;
|
40
40
|
/** Данные для блока с контентом */
|
41
41
|
content?: IContent;
|
42
42
|
/** Тип видео */
|