@megafon/ui-shared 8.14.0 → 8.14.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 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +49 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +42 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.js +107 -0
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/es/components/AudioPlayer/AudioProgress.js +96 -0
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +15 -0
- package/dist/es/components/AudioPlayer/AudioRange.js +31 -0
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/es/components/AudioPlayer/AudioVolume.js +77 -0
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.d.ts +3 -0
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +26 -0
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +25 -0
- package/dist/es/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/es/components/BannerBox/BannerBox.js +22 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +30 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +104 -0
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +10 -0
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +51 -0
- package/dist/es/components/BenefitsIcons/helpers.d.ts +8 -0
- package/dist/es/components/BenefitsIcons/helpers.js +102 -0
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -0
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -0
- package/dist/es/components/BenefitsIcons/types.d.ts +54 -0
- package/dist/es/components/BenefitsIcons/types.js +17 -0
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +27 -0
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +111 -0
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -0
- package/dist/es/components/BenefitsPictures/helpers.d.ts +11 -0
- package/dist/es/components/BenefitsPictures/helpers.js +85 -0
- package/dist/es/components/BenefitsPictures/types.d.ts +24 -0
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/BlogBox/BlogBox.css +1 -0
- package/dist/es/components/BlogBox/BlogBox.d.ts +31 -0
- package/dist/es/components/BlogBox/BlogBox.js +72 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.css +1 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +13 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.js +61 -0
- package/dist/es/components/BlogBox/types.d.ts +37 -0
- package/dist/es/components/BlogBox/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +43 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +69 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +30 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +62 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +64 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +96 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +52 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +65 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.css +1 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.d.ts +48 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.js +47 -0
- package/dist/es/components/Card/Card.css +1 -0
- package/dist/es/components/Card/Card.d.ts +55 -0
- package/dist/es/components/Card/Card.js +229 -0
- package/dist/es/components/Card/types.d.ts +86 -0
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.d.ts +14 -0
- package/dist/es/components/CardsBox/CardsBox.js +26 -0
- package/dist/es/components/CardsBox/helpers.d.ts +10 -0
- package/dist/es/components/CardsBox/helpers.js +21 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +10 -0
- package/dist/es/components/CarouselBox/CarouselBox.js +45 -0
- package/dist/es/components/ChipsBox/ChipBox.d.ts +5 -0
- package/dist/es/components/ChipsBox/ChipBox.js +7 -0
- package/dist/es/components/ChipsBox/ChipsBox.css +1 -0
- package/dist/es/components/ChipsBox/ChipsBox.d.ts +16 -0
- package/dist/es/components/ChipsBox/ChipsBox.js +76 -0
- package/dist/es/components/Container/Container.css +1 -0
- package/dist/es/components/Container/Container.d.ts +41 -0
- package/dist/es/components/Container/Container.js +46 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.css +1 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.d.ts +33 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.js +66 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.css +1 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.d.ts +16 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.js +50 -0
- package/dist/es/components/DarkGradientCards/types.d.ts +20 -0
- package/dist/es/components/DarkGradientCards/types.js +1 -0
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -0
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +36 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +61 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.css +1 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +20 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.js +64 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +6 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.js +9 -0
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -0
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +94 -0
- package/dist/es/components/ImageBanner/ImageBanner.js +164 -0
- package/dist/es/components/InfoCards/InfoCards.css +1 -0
- package/dist/es/components/InfoCards/InfoCards.d.ts +24 -0
- package/dist/es/components/InfoCards/InfoCards.js +44 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.d.ts +19 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.js +85 -0
- package/dist/es/components/InfoCards/types.d.ts +31 -0
- package/dist/es/components/InfoCards/types.js +1 -0
- package/dist/es/components/Instructions/Instructions.css +1 -0
- package/dist/es/components/Instructions/Instructions.d.ts +120 -0
- package/dist/es/components/Instructions/Instructions.js +362 -0
- package/dist/es/components/Instructions/img/android-new.png +0 -0
- package/dist/es/components/Instructions/img/android.png +0 -0
- package/dist/es/components/Instructions/img/blackIphone.png +0 -0
- package/dist/es/components/Instructions/img/iphone-new.png +0 -0
- package/dist/es/components/Instructions/img/iphone12.png +0 -0
- package/dist/es/components/Instructions/img/iphone15.png +0 -0
- package/dist/es/components/Instructions/img/laptop-new.png +0 -0
- package/dist/es/components/Instructions/img/laptop.png +0 -0
- package/dist/es/components/Instructions/img/newIphone.png +0 -0
- package/dist/es/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/es/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +15 -0
- package/dist/es/components/NotificationBox/NotificationBox.js +35 -0
- package/dist/es/components/NumbersBox/NumbersBox.css +1 -0
- package/dist/es/components/NumbersBox/NumbersBox.d.ts +35 -0
- package/dist/es/components/NumbersBox/NumbersBox.js +72 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.css +1 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.d.ts +16 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.js +28 -0
- package/dist/es/components/NumbersBox/types.d.ts +7 -0
- package/dist/es/components/NumbersBox/types.js +1 -0
- package/dist/es/components/PageTitle/PageTitle.css +1 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +36 -0
- package/dist/es/components/PageTitle/PageTitle.js +74 -0
- package/dist/es/components/Partners/Partners.css +1 -0
- package/dist/es/components/Partners/Partners.d.ts +37 -0
- package/dist/es/components/Partners/Partners.js +111 -0
- package/dist/es/components/PictureBox/PictureBox.css +1 -0
- package/dist/es/components/PictureBox/PictureBox.d.ts +48 -0
- package/dist/es/components/PictureBox/PictureBox.js +96 -0
- package/dist/es/components/PictureBox/img/mac-book-1x.png +0 -0
- package/dist/es/components/PictureBox/img/mac-book-2x.png +0 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +1 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +32 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +48 -0
- package/dist/es/components/PromoBanner/PromoBanner.d.ts +5 -0
- package/dist/es/components/PromoBanner/PromoBanner.js +26 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +82 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +142 -0
- package/dist/es/components/PromoCards/PromoCards.d.ts +33 -0
- package/dist/es/components/PromoCards/PromoCards.js +61 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.css +1 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.d.ts +25 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.js +175 -0
- package/dist/es/components/PromoCards/types.d.ts +62 -0
- package/dist/es/components/PromoCards/types.js +1 -0
- package/dist/es/components/Property/Property.d.ts +5 -0
- package/dist/es/components/Property/Property.js +10 -0
- package/dist/es/components/ServiceCards/ServiceCards.css +1 -0
- package/dist/es/components/ServiceCards/ServiceCards.d.ts +28 -0
- package/dist/es/components/ServiceCards/ServiceCards.js +42 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.d.ts +19 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.js +81 -0
- package/dist/es/components/ServiceCards/types.d.ts +26 -0
- package/dist/es/components/ServiceCards/types.js +1 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.d.ts +31 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.js +69 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.d.ts +18 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.js +94 -0
- package/dist/es/components/SidePictureCards/types.d.ts +48 -0
- package/dist/es/components/SidePictureCards/types.js +1 -0
- package/dist/es/components/Stepper/Stepper.css +1 -0
- package/dist/es/components/Stepper/Stepper.d.ts +52 -0
- package/dist/es/components/Stepper/Stepper.js +159 -0
- package/dist/es/components/Stepper/StepperItem.css +1 -0
- package/dist/es/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/es/components/Stepper/StepperItem.js +99 -0
- package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/es/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/es/components/Stepper/img/separator.png +0 -0
- package/dist/es/components/Steps/Steps.css +1 -0
- package/dist/es/components/Steps/Steps.d.ts +21 -0
- package/dist/es/components/Steps/Steps.js +32 -0
- package/dist/es/components/Steps/StepsItem.css +1 -0
- package/dist/es/components/Steps/StepsItem.d.ts +10 -0
- package/dist/es/components/Steps/StepsItem.js +21 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +101 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +200 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.css +1 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +36 -0
- package/dist/es/components/StoreButton/StoreButton.js +60 -0
- package/dist/es/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/galaxy-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/mi-store.png +0 -0
- package/dist/es/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/ru-store.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/es/components/Table/Table.css +1 -0
- package/dist/es/components/Table/Table.d.ts +18 -0
- package/dist/es/components/Table/Table.js +127 -0
- package/dist/es/components/Table/TableCell.d.ts +6 -0
- package/dist/es/components/Table/TableCell.js +6 -0
- package/dist/es/components/Table/TableRow.d.ts +11 -0
- package/dist/es/components/Table/TableRow.js +7 -0
- package/dist/es/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/es/components/TabsBox/TabBox.js +2 -0
- package/dist/es/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/es/components/TabsBox/TabsBox.js +24 -0
- package/dist/es/components/TextBox/TextBox.css +1 -0
- package/dist/es/components/TextBox/TextBox.d.ts +17 -0
- package/dist/es/components/TextBox/TextBox.js +43 -0
- package/dist/es/components/TextBox/TextBoxPicture.css +1 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +21 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +30 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +21 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.js +41 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +1 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +25 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +40 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +22 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +60 -0
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +112 -0
- package/dist/es/components/VideoBanner/VideoBanner.js +245 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -0
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +63 -0
- package/dist/es/components/VideoBlock/VideoBlock.js +230 -0
- package/dist/es/constants/throttleTime.d.ts +4 -0
- package/dist/es/constants/throttleTime.js +3 -0
- package/dist/es/helpers/getColumnConfig.d.ts +6 -0
- package/dist/es/helpers/getColumnConfig.js +10 -0
- package/dist/es/helpers/setRelAttribute.d.ts +3 -0
- package/dist/es/helpers/setRelAttribute.js +9 -0
- package/dist/es/hooks/useResolutions.d.ts +8 -0
- package/dist/es/hooks/useResolutions.js +62 -0
- package/dist/es/index.d.ts +67 -0
- package/dist/es/index.js +67 -0
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +49 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +51 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +116 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.js +102 -0
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +15 -0
- package/dist/lib/components/AudioPlayer/AudioRange.js +37 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.js +83 -0
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.d.ts +3 -0
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +33 -0
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +31 -0
- package/dist/lib/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/lib/components/BannerBox/BannerBox.js +31 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +30 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +113 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +10 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +60 -0
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +8 -0
- package/dist/lib/components/BenefitsIcons/helpers.js +108 -0
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -0
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -0
- package/dist/lib/components/BenefitsIcons/types.d.ts +54 -0
- package/dist/lib/components/BenefitsIcons/types.js +23 -0
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +27 -0
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +120 -0
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -0
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +11 -0
- package/dist/lib/components/BenefitsPictures/helpers.js +91 -0
- package/dist/lib/components/BenefitsPictures/types.d.ts +24 -0
- package/dist/lib/components/BenefitsPictures/types.js +5 -0
- package/dist/lib/components/BlogBox/BlogBox.css +1 -0
- package/dist/lib/components/BlogBox/BlogBox.d.ts +31 -0
- package/dist/lib/components/BlogBox/BlogBox.js +81 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.css +1 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +13 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.js +70 -0
- package/dist/lib/components/BlogBox/types.d.ts +37 -0
- package/dist/lib/components/BlogBox/types.js +5 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +43 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +78 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +30 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +71 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +64 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +105 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +52 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +74 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.css +1 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.d.ts +48 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.js +56 -0
- package/dist/lib/components/Card/Card.css +1 -0
- package/dist/lib/components/Card/Card.d.ts +55 -0
- package/dist/lib/components/Card/Card.js +238 -0
- package/dist/lib/components/Card/types.d.ts +86 -0
- package/dist/lib/components/Card/types.js +5 -0
- package/dist/lib/components/CardsBox/CardsBox.d.ts +14 -0
- package/dist/lib/components/CardsBox/CardsBox.js +36 -0
- package/dist/lib/components/CardsBox/helpers.d.ts +10 -0
- package/dist/lib/components/CardsBox/helpers.js +28 -0
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +10 -0
- package/dist/lib/components/CarouselBox/CarouselBox.js +55 -0
- package/dist/lib/components/ChipsBox/ChipBox.d.ts +5 -0
- package/dist/lib/components/ChipsBox/ChipBox.js +17 -0
- package/dist/lib/components/ChipsBox/ChipsBox.css +1 -0
- package/dist/lib/components/ChipsBox/ChipsBox.d.ts +16 -0
- package/dist/lib/components/ChipsBox/ChipsBox.js +85 -0
- package/dist/lib/components/Container/Container.css +1 -0
- package/dist/lib/components/Container/Container.d.ts +41 -0
- package/dist/lib/components/Container/Container.js +54 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.css +1 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.d.ts +33 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.js +75 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.css +1 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.d.ts +16 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.js +59 -0
- package/dist/lib/components/DarkGradientCards/types.d.ts +20 -0
- package/dist/lib/components/DarkGradientCards/types.js +5 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +70 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +1 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +20 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +73 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +6 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +18 -0
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -0
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +94 -0
- package/dist/lib/components/ImageBanner/ImageBanner.js +173 -0
- package/dist/lib/components/InfoCards/InfoCards.css +1 -0
- package/dist/lib/components/InfoCards/InfoCards.d.ts +24 -0
- package/dist/lib/components/InfoCards/InfoCards.js +53 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.d.ts +19 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.js +94 -0
- package/dist/lib/components/InfoCards/types.d.ts +31 -0
- package/dist/lib/components/InfoCards/types.js +5 -0
- package/dist/lib/components/Instructions/Instructions.css +1 -0
- package/dist/lib/components/Instructions/Instructions.d.ts +120 -0
- package/dist/lib/components/Instructions/Instructions.js +371 -0
- package/dist/lib/components/Instructions/img/android-new.png +0 -0
- package/dist/lib/components/Instructions/img/android.png +0 -0
- package/dist/lib/components/Instructions/img/blackIphone.png +0 -0
- package/dist/lib/components/Instructions/img/iphone-new.png +0 -0
- package/dist/lib/components/Instructions/img/iphone12.png +0 -0
- package/dist/lib/components/Instructions/img/iphone15.png +0 -0
- package/dist/lib/components/Instructions/img/laptop-new.png +0 -0
- package/dist/lib/components/Instructions/img/laptop.png +0 -0
- package/dist/lib/components/Instructions/img/newIphone.png +0 -0
- package/dist/lib/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/lib/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +15 -0
- package/dist/lib/components/NotificationBox/NotificationBox.js +44 -0
- package/dist/lib/components/NumbersBox/NumbersBox.css +1 -0
- package/dist/lib/components/NumbersBox/NumbersBox.d.ts +35 -0
- package/dist/lib/components/NumbersBox/NumbersBox.js +81 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.css +1 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.d.ts +16 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.js +37 -0
- package/dist/lib/components/NumbersBox/types.d.ts +7 -0
- package/dist/lib/components/NumbersBox/types.js +5 -0
- package/dist/lib/components/PageTitle/PageTitle.css +1 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +36 -0
- package/dist/lib/components/PageTitle/PageTitle.js +83 -0
- package/dist/lib/components/Partners/Partners.css +1 -0
- package/dist/lib/components/Partners/Partners.d.ts +37 -0
- package/dist/lib/components/Partners/Partners.js +120 -0
- package/dist/lib/components/PictureBox/PictureBox.css +1 -0
- package/dist/lib/components/PictureBox/PictureBox.d.ts +48 -0
- package/dist/lib/components/PictureBox/PictureBox.js +105 -0
- package/dist/lib/components/PictureBox/img/mac-book-1x.png +0 -0
- package/dist/lib/components/PictureBox/img/mac-book-2x.png +0 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +1 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +32 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +56 -0
- package/dist/lib/components/PromoBanner/PromoBanner.d.ts +5 -0
- package/dist/lib/components/PromoBanner/PromoBanner.js +36 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +82 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +151 -0
- package/dist/lib/components/PromoCards/PromoCards.d.ts +33 -0
- package/dist/lib/components/PromoCards/PromoCards.js +71 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.css +1 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.d.ts +25 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.js +184 -0
- package/dist/lib/components/PromoCards/types.d.ts +62 -0
- package/dist/lib/components/PromoCards/types.js +5 -0
- package/dist/lib/components/Property/Property.d.ts +5 -0
- package/dist/lib/components/Property/Property.js +19 -0
- package/dist/lib/components/ServiceCards/ServiceCards.css +1 -0
- package/dist/lib/components/ServiceCards/ServiceCards.d.ts +28 -0
- package/dist/lib/components/ServiceCards/ServiceCards.js +51 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.d.ts +19 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.js +90 -0
- package/dist/lib/components/ServiceCards/types.d.ts +26 -0
- package/dist/lib/components/ServiceCards/types.js +5 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.d.ts +31 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.js +79 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.d.ts +18 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.js +100 -0
- package/dist/lib/components/SidePictureCards/types.d.ts +48 -0
- package/dist/lib/components/SidePictureCards/types.js +5 -0
- package/dist/lib/components/Stepper/Stepper.css +1 -0
- package/dist/lib/components/Stepper/Stepper.d.ts +52 -0
- package/dist/lib/components/Stepper/Stepper.js +168 -0
- package/dist/lib/components/Stepper/StepperItem.css +1 -0
- package/dist/lib/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/lib/components/Stepper/StepperItem.js +108 -0
- package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/lib/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/lib/components/Stepper/img/separator.png +0 -0
- package/dist/lib/components/Steps/Steps.css +1 -0
- package/dist/lib/components/Steps/Steps.d.ts +21 -0
- package/dist/lib/components/Steps/Steps.js +40 -0
- package/dist/lib/components/Steps/StepsItem.css +1 -0
- package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
- package/dist/lib/components/Steps/StepsItem.js +29 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +101 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +209 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.css +1 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +36 -0
- package/dist/lib/components/StoreButton/StoreButton.js +69 -0
- package/dist/lib/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/galaxy-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/mi-store.png +0 -0
- package/dist/lib/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/ru-store.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/lib/components/Table/Table.css +1 -0
- package/dist/lib/components/Table/Table.d.ts +18 -0
- package/dist/lib/components/Table/Table.js +136 -0
- package/dist/lib/components/Table/TableCell.d.ts +6 -0
- package/dist/lib/components/Table/TableCell.js +15 -0
- package/dist/lib/components/Table/TableRow.d.ts +11 -0
- package/dist/lib/components/Table/TableRow.js +17 -0
- package/dist/lib/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/lib/components/TabsBox/TabBox.js +8 -0
- package/dist/lib/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/lib/components/TabsBox/TabsBox.js +33 -0
- package/dist/lib/components/TextBox/TextBox.css +1 -0
- package/dist/lib/components/TextBox/TextBox.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBox.js +51 -0
- package/dist/lib/components/TextBox/TextBoxPicture.css +1 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +21 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +38 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +21 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +50 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +1 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +25 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +49 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +22 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +69 -0
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +112 -0
- package/dist/lib/components/VideoBanner/VideoBanner.js +253 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -0
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +63 -0
- package/dist/lib/components/VideoBlock/VideoBlock.js +238 -0
- package/dist/lib/constants/throttleTime.d.ts +4 -0
- package/dist/lib/constants/throttleTime.js +9 -0
- package/dist/lib/helpers/getColumnConfig.d.ts +6 -0
- package/dist/lib/helpers/getColumnConfig.js +16 -0
- package/dist/lib/helpers/setRelAttribute.d.ts +3 -0
- package/dist/lib/helpers/setRelAttribute.js +15 -0
- package/dist/lib/hooks/useResolutions.d.ts +8 -0
- package/dist/lib/hooks/useResolutions.js +69 -0
- package/dist/lib/index.d.ts +67 -0
- package/dist/lib/index.js +475 -0
- package/package.json +5 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
require("core-js/modules/es.symbol.js");
|
|
10
|
+
require("core-js/modules/es.symbol.description.js");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _uiCore = require("@megafon/ui-core");
|
|
13
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
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 && {}.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; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
var testIdPrefix = 'TitleDescriptionBox';
|
|
18
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-title-description-box');
|
|
19
|
+
var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
|
|
20
|
+
var dataAttrs = _ref.dataAttrs,
|
|
21
|
+
title = _ref.title,
|
|
22
|
+
description = _ref.description,
|
|
23
|
+
textColor = _ref.textColor,
|
|
24
|
+
align = _ref.align,
|
|
25
|
+
rootRef = _ref.rootRef,
|
|
26
|
+
className = _ref.className;
|
|
27
|
+
var renderDescription = React.useCallback(function () {
|
|
28
|
+
if (typeof description === 'string') {
|
|
29
|
+
return /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
|
30
|
+
className: cn('item'),
|
|
31
|
+
hasMargin: false,
|
|
32
|
+
color: "inherit",
|
|
33
|
+
dataAttrs: {
|
|
34
|
+
root: {
|
|
35
|
+
'data-testid': "".concat(testIdPrefix, "-description-text")
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, description);
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: cn('description'),
|
|
42
|
+
"data-testid": "".concat(testIdPrefix, "-description-node")
|
|
43
|
+
}, description);
|
|
44
|
+
}, [description]);
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
46
|
+
className: cn({
|
|
47
|
+
'h-align': align,
|
|
48
|
+
'text-color': textColor
|
|
49
|
+
}, className),
|
|
50
|
+
ref: rootRef
|
|
51
|
+
}), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
|
52
|
+
hAlign: align,
|
|
53
|
+
dataAttrs: {
|
|
54
|
+
container: {
|
|
55
|
+
'data-testid': "".concat(testIdPrefix, "-grid")
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
|
59
|
+
wide: "8",
|
|
60
|
+
desktop: "10"
|
|
61
|
+
}, title && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
62
|
+
className: cn('item', {
|
|
63
|
+
header: true
|
|
64
|
+
}),
|
|
65
|
+
as: "h2",
|
|
66
|
+
color: "inherit"
|
|
67
|
+
}, title), description && renderDescription())));
|
|
68
|
+
};
|
|
69
|
+
var _default = exports["default"] = TitleDescriptionBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-banner{overflow:hidden;position:relative}@media screen and (min-width:1280px){.mfui-video-banner{margin-left:-80px;margin-right:-80px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner{margin-left:-64px;margin-right:-64px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner{margin-left:-48px;margin-right:-48px}}@media screen and (max-width:767px){.mfui-video-banner{margin-left:-16px;margin-right:-16px}}.mfui-video-banner_bottom-shadow:after{background:-webkit-gradient(linear,left top,left bottom,color-stop(95.25%,hsla(0,0%,100%,0)),to(rgba(0,0,0,.024)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 95.25%,rgba(0,0,0,.024));bottom:0;content:"";height:100%;position:absolute;right:0;width:100%}.mfui-video-banner__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:400px}@media screen and (min-width:1440px){.mfui-video-banner__wrapper{height:562px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__wrapper{height:500px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:52px;padding-top:52px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:64px;padding-top:64px}}@media screen and (max-width:767px){.mfui-video-banner__wrapper{max-height:488px;padding-bottom:42px;padding-top:42px}}.mfui-video-banner__background-image,.mfui-video-banner__video{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mfui-video-banner__background-image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-video-banner__content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}@media screen and (min-width:1440px){.mfui-video-banner__content{max-height:422px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__content{max-height:360px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__content{max-height:336px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__content{max-height:312px}}@media screen and (max-width:767px){.mfui-video-banner__content{max-height:404px}}.mfui-video-banner__content_text-color_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color_white{color:var(--stcWhite)}@media screen and (max-width:767px){.mfui-video-banner__content_text-color-mobile_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color-mobile_white{color:var(--stcWhite)}}.mfui-video-banner__description{margin-bottom:32px;white-space:pre-wrap}.mfui-video-banner__title{margin-bottom:24px}@media screen and (max-width:767px){.mfui-video-banner__title{margin-bottom:20px}}.mfui-video-banner__text,.mfui-video-banner__title{white-space:pre-wrap}@media screen and (max-width:767px){.mfui-video-banner__text,.mfui-video-banner__title{text-align:center}}.mfui-video-banner__btns-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:-24px -10px 0}@media screen and (max-width:767px){.mfui-video-banner__btns-wrapper{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}@media screen and (max-width:479px){.mfui-video-banner__btns-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mfui-video-banner__button,.mfui-video-banner__link{margin:24px 10px 0}.mfui-video-banner__cost{font-size:12px;line-height:18px;margin-bottom:18px}.mfui-video-banner__value{display:inline;margin:0 3px}.mfui-video-banner__breadcrumbs,.mfui-video-banner__content{z-index:1}.mfui-video-banner__breadcrumbs{position:absolute;top:32px}.mfui-video-banner__grid{width:100%}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Props as BreadcrumbsPropsType } from '../Breadcrumbs/Breadcrumbs';
|
|
3
|
+
import './VideoBanner.scss';
|
|
4
|
+
export type BreadCrumbsItemsType = BreadcrumbsPropsType['items'];
|
|
5
|
+
export declare const testIdPrefix = "VideoBanner";
|
|
6
|
+
export declare enum ClassName {
|
|
7
|
+
BUTTON = "button",
|
|
8
|
+
LINK = "link"
|
|
9
|
+
}
|
|
10
|
+
export declare const VideoType: {
|
|
11
|
+
readonly YOUTUBE: "youtube";
|
|
12
|
+
readonly VIDEO: "video";
|
|
13
|
+
};
|
|
14
|
+
type VideoType = (typeof VideoType)[keyof typeof VideoType];
|
|
15
|
+
export declare const ButtonColor: {
|
|
16
|
+
readonly GREEN: "green";
|
|
17
|
+
readonly PURPLE: "purple";
|
|
18
|
+
};
|
|
19
|
+
export type ButtonColorType = (typeof ButtonColor)[keyof typeof ButtonColor];
|
|
20
|
+
export declare const TextColor: {
|
|
21
|
+
readonly BLACK: "black";
|
|
22
|
+
readonly WHITE: "white";
|
|
23
|
+
};
|
|
24
|
+
type TextColorType = (typeof TextColor)[keyof typeof TextColor];
|
|
25
|
+
export interface IContent {
|
|
26
|
+
/** Заголовок */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Текст-описание */
|
|
29
|
+
description: string;
|
|
30
|
+
/** Текст кнопки */
|
|
31
|
+
buttonTitle?: string;
|
|
32
|
+
/** Ссылка на кнопке */
|
|
33
|
+
buttonHref?: string;
|
|
34
|
+
/** Target свойство кнопки */
|
|
35
|
+
buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
|
|
36
|
+
/** Добавляет атрибут download для тега <a> компонента Button */
|
|
37
|
+
buttonDownload?: boolean;
|
|
38
|
+
/** Добавляет атрибут rel для тега <a> компонента Button */
|
|
39
|
+
buttonRel?: string;
|
|
40
|
+
/** Цвет кнопки */
|
|
41
|
+
buttonColor?: ButtonColorType;
|
|
42
|
+
/** Обработчик клика по кнопке */
|
|
43
|
+
onButtonClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
44
|
+
/** Обработчик клика по ссылке */
|
|
45
|
+
onLinkClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
46
|
+
/** Цвет текста */
|
|
47
|
+
textColor?: TextColorType;
|
|
48
|
+
/** Цвет текста на мобильном разрешении */
|
|
49
|
+
textColorMobile?: TextColorType;
|
|
50
|
+
/** Текст ссылки */
|
|
51
|
+
linkTitle?: string;
|
|
52
|
+
/** Адрес ссылки */
|
|
53
|
+
linkUrl?: string;
|
|
54
|
+
/** Target свойство ссылки */
|
|
55
|
+
linkTarget?: '_self' | '_blank' | '_parent' | '_top';
|
|
56
|
+
/** Добавляет атрибут download для тега <a> компонента TextLink */
|
|
57
|
+
linkDownload?: boolean;
|
|
58
|
+
/** Добавляет атрибут rel для тега <a> компонента TextLink */
|
|
59
|
+
linkRel?: string;
|
|
60
|
+
/** Строка со стоимостью услуги */
|
|
61
|
+
cost?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface IVideoBannerProps {
|
|
64
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
65
|
+
dataAttrs?: {
|
|
66
|
+
root?: Record<string, string>;
|
|
67
|
+
breadcrumbs?: Record<string, string>;
|
|
68
|
+
breadcrumbsLink?: Record<string, string>;
|
|
69
|
+
button?: Record<string, string>;
|
|
70
|
+
link?: Record<string, string>;
|
|
71
|
+
};
|
|
72
|
+
/** Дополнительный класс корневого элемента */
|
|
73
|
+
className?: string;
|
|
74
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
|
75
|
+
classes?: {
|
|
76
|
+
root?: string;
|
|
77
|
+
button?: string;
|
|
78
|
+
link?: string;
|
|
79
|
+
breadcrumbs?: string;
|
|
80
|
+
video?: string;
|
|
81
|
+
};
|
|
82
|
+
/** Ссылка на корневой элемент */
|
|
83
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
84
|
+
/** Данные для блока с контентом */
|
|
85
|
+
content?: IContent;
|
|
86
|
+
/** Источник видео. */
|
|
87
|
+
videoSrc?: string;
|
|
88
|
+
/** Тип видео */
|
|
89
|
+
videoType?: VideoType;
|
|
90
|
+
/** Разрешить проигрывать видео на мобильном разрешении */
|
|
91
|
+
videoMobile?: boolean;
|
|
92
|
+
/** Наличие звука в видео */
|
|
93
|
+
isMuted?: boolean;
|
|
94
|
+
/** Изображение для мобильного разрешения */
|
|
95
|
+
imageMobile: string;
|
|
96
|
+
/** Изображение для планшетного разрешения */
|
|
97
|
+
imageTablet: string;
|
|
98
|
+
/** Изображение для компьютерного разрешения */
|
|
99
|
+
imageDesktop?: string;
|
|
100
|
+
/** Изображение для большого компьютерного разрешения */
|
|
101
|
+
imageDesktopWide?: string;
|
|
102
|
+
/** Значение тега alt для изображения */
|
|
103
|
+
imageAlt?: string;
|
|
104
|
+
/** Хлебные крошки */
|
|
105
|
+
breadcrumbs?: BreadCrumbsItemsType;
|
|
106
|
+
/** Включить микроразметку хлебных крошек */
|
|
107
|
+
hasBreadcrumbsMicrodata?: boolean;
|
|
108
|
+
/** Включить тень в нижней части компонента */
|
|
109
|
+
bottomShadow?: boolean;
|
|
110
|
+
}
|
|
111
|
+
declare const VideoBanner: React.FC<IVideoBannerProps>;
|
|
112
|
+
export default VideoBanner;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.testIdPrefix = exports["default"] = exports.VideoType = exports.TextColor = exports.ClassName = exports.ButtonColor = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
require("core-js/modules/es.symbol.js");
|
|
11
|
+
require("core-js/modules/es.symbol.description.js");
|
|
12
|
+
require("core-js/modules/es.array.concat.js");
|
|
13
|
+
require("core-js/modules/es.string.link.js");
|
|
14
|
+
var React = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _uiCore = require("@megafon/ui-core");
|
|
16
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
17
|
+
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
18
|
+
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
|
19
|
+
var _Breadcrumbs = _interopRequireDefault(require("../Breadcrumbs/Breadcrumbs"));
|
|
20
|
+
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); }
|
|
21
|
+
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 && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
22
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
23
|
+
var testIdPrefix = exports.testIdPrefix = 'VideoBanner';
|
|
24
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-video-banner');
|
|
25
|
+
var ClassName;
|
|
26
|
+
(function (ClassName) {
|
|
27
|
+
ClassName["BUTTON"] = "button";
|
|
28
|
+
ClassName["LINK"] = "link";
|
|
29
|
+
})(ClassName || (exports.ClassName = ClassName = {}));
|
|
30
|
+
var typographyConfig = {
|
|
31
|
+
b: {
|
|
32
|
+
component: function component(_ref) {
|
|
33
|
+
var children = _ref.children;
|
|
34
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
35
|
+
className: cn('value'),
|
|
36
|
+
as: "h3",
|
|
37
|
+
color: "inherit"
|
|
38
|
+
}, children);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var VideoType = exports.VideoType = {
|
|
43
|
+
YOUTUBE: 'youtube',
|
|
44
|
+
VIDEO: 'video'
|
|
45
|
+
};
|
|
46
|
+
var ButtonColor = exports.ButtonColor = {
|
|
47
|
+
GREEN: 'green',
|
|
48
|
+
PURPLE: 'purple'
|
|
49
|
+
};
|
|
50
|
+
var TextColor = exports.TextColor = {
|
|
51
|
+
BLACK: 'black',
|
|
52
|
+
WHITE: 'white'
|
|
53
|
+
};
|
|
54
|
+
var VideoBanner = function VideoBanner(_ref2) {
|
|
55
|
+
var dataAttrs = _ref2.dataAttrs,
|
|
56
|
+
className = _ref2.className,
|
|
57
|
+
_ref2$classes = _ref2.classes,
|
|
58
|
+
classes = _ref2$classes === void 0 ? {} : _ref2$classes,
|
|
59
|
+
rootRef = _ref2.rootRef,
|
|
60
|
+
videoSrc = _ref2.videoSrc,
|
|
61
|
+
videoType = _ref2.videoType,
|
|
62
|
+
imageMobile = _ref2.imageMobile,
|
|
63
|
+
imageTablet = _ref2.imageTablet,
|
|
64
|
+
_ref2$imageDesktop = _ref2.imageDesktop,
|
|
65
|
+
imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
|
|
66
|
+
_ref2$imageDesktopWid = _ref2.imageDesktopWide,
|
|
67
|
+
imageDesktopWide = _ref2$imageDesktopWid === void 0 ? '' : _ref2$imageDesktopWid,
|
|
68
|
+
imageAlt = _ref2.imageAlt,
|
|
69
|
+
content = _ref2.content,
|
|
70
|
+
_ref2$isMuted = _ref2.isMuted,
|
|
71
|
+
isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
|
|
72
|
+
breadcrumbs = _ref2.breadcrumbs,
|
|
73
|
+
_ref2$videoMobile = _ref2.videoMobile,
|
|
74
|
+
videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile,
|
|
75
|
+
_ref2$hasBreadcrumbsM = _ref2.hasBreadcrumbsMicrodata,
|
|
76
|
+
hasBreadcrumbsMicrodata = _ref2$hasBreadcrumbsM === void 0 ? false : _ref2$hasBreadcrumbsM,
|
|
77
|
+
_ref2$bottomShadow = _ref2.bottomShadow,
|
|
78
|
+
bottomShadow = _ref2$bottomShadow === void 0 ? false : _ref2$bottomShadow;
|
|
79
|
+
var _React$useState = React.useState(true),
|
|
80
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
81
|
+
isMobile = _React$useState2[0],
|
|
82
|
+
setIsMobile = _React$useState2[1];
|
|
83
|
+
var isVideoData = !!videoSrc && !!videoType;
|
|
84
|
+
var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
|
|
85
|
+
var renderContent = React.useCallback(function (_ref3) {
|
|
86
|
+
var title = _ref3.title,
|
|
87
|
+
description = _ref3.description,
|
|
88
|
+
buttonTitle = _ref3.buttonTitle,
|
|
89
|
+
buttonHref = _ref3.buttonHref,
|
|
90
|
+
buttonTarget = _ref3.buttonTarget,
|
|
91
|
+
buttonDownload = _ref3.buttonDownload,
|
|
92
|
+
_ref3$buttonColor = _ref3.buttonColor,
|
|
93
|
+
buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
|
|
94
|
+
buttonRel = _ref3.buttonRel,
|
|
95
|
+
onButtonClick = _ref3.onButtonClick,
|
|
96
|
+
onLinkClick = _ref3.onLinkClick,
|
|
97
|
+
_ref3$textColor = _ref3.textColor,
|
|
98
|
+
textColor = _ref3$textColor === void 0 ? TextColor.BLACK : _ref3$textColor,
|
|
99
|
+
textColorMobile = _ref3.textColorMobile,
|
|
100
|
+
linkTitle = _ref3.linkTitle,
|
|
101
|
+
linkUrl = _ref3.linkUrl,
|
|
102
|
+
linkTarget = _ref3.linkTarget,
|
|
103
|
+
linkDownload = _ref3.linkDownload,
|
|
104
|
+
linkRel = _ref3.linkRel,
|
|
105
|
+
cost = _ref3.cost;
|
|
106
|
+
return /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
|
107
|
+
className: cn('grid'),
|
|
108
|
+
guttersLeft: "medium"
|
|
109
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
|
110
|
+
mobile: "12",
|
|
111
|
+
tablet: "7",
|
|
112
|
+
desktop: "7",
|
|
113
|
+
wide: "6"
|
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: cn('content', {
|
|
116
|
+
'text-color': textColor,
|
|
117
|
+
'text-color-mobile': textColorMobile
|
|
118
|
+
}),
|
|
119
|
+
"data-testid": "".concat(testIdPrefix, "-content")
|
|
120
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
121
|
+
className: cn('title'),
|
|
122
|
+
as: "h1",
|
|
123
|
+
color: "inherit"
|
|
124
|
+
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
className: cn('text')
|
|
126
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
127
|
+
as: "h5",
|
|
128
|
+
color: "inherit",
|
|
129
|
+
className: cn('description')
|
|
130
|
+
}, (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig)), cost && /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: cn('cost')
|
|
132
|
+
}, (0, _uiHelpers.convert)(cost, typographyConfig))), /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: cn('btns-wrapper')
|
|
134
|
+
}, buttonTitle && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
135
|
+
dataAttrs: {
|
|
136
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
137
|
+
},
|
|
138
|
+
className: cn(ClassName.BUTTON, [classes.button]),
|
|
139
|
+
theme: buttonColor,
|
|
140
|
+
href: buttonHref,
|
|
141
|
+
target: buttonTarget,
|
|
142
|
+
onClick: onButtonClick,
|
|
143
|
+
download: buttonDownload,
|
|
144
|
+
rel: buttonRel
|
|
145
|
+
}, buttonTitle), linkTitle && /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
|
146
|
+
dataAttrs: {
|
|
147
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
|
148
|
+
},
|
|
149
|
+
className: cn(ClassName.LINK, [classes.link]),
|
|
150
|
+
href: linkUrl,
|
|
151
|
+
download: linkDownload,
|
|
152
|
+
target: linkTarget,
|
|
153
|
+
onClick: onLinkClick,
|
|
154
|
+
rel: linkRel
|
|
155
|
+
}, linkTitle)))));
|
|
156
|
+
}, [classes.button, classes.link, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
|
|
157
|
+
var renderVideo = React.useCallback(function () {
|
|
158
|
+
switch (videoType) {
|
|
159
|
+
case VideoType.YOUTUBE:
|
|
160
|
+
{
|
|
161
|
+
var url = "https://www.youtube.com/embed/".concat(videoSrc, "?");
|
|
162
|
+
var autoplay = '&autoplay=1';
|
|
163
|
+
var mute = "&mute=".concat(isMuted ? 1 : 0);
|
|
164
|
+
var loop = '&loop=1';
|
|
165
|
+
var rel = '&rel=0';
|
|
166
|
+
var controls = '&controls=0';
|
|
167
|
+
var info = '&showinfo=0e';
|
|
168
|
+
var policy = '&iv_load_policy=3';
|
|
169
|
+
var playlist = "&playlist=".concat(videoSrc);
|
|
170
|
+
var src = "".concat(url).concat(autoplay).concat(mute).concat(loop).concat(rel).concat(controls).concat(info).concat(policy).concat(playlist);
|
|
171
|
+
return /*#__PURE__*/React.createElement("iframe", {
|
|
172
|
+
title: "iframe",
|
|
173
|
+
className: cn('video'),
|
|
174
|
+
src: src,
|
|
175
|
+
width: "100%",
|
|
176
|
+
height: "100%",
|
|
177
|
+
frameBorder: "0",
|
|
178
|
+
allow: "autoplay",
|
|
179
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
case VideoType.VIDEO:
|
|
183
|
+
{
|
|
184
|
+
return /*#__PURE__*/(
|
|
185
|
+
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
186
|
+
React.createElement("video", {
|
|
187
|
+
className: cn('video', [classes.video]),
|
|
188
|
+
autoPlay: true,
|
|
189
|
+
loop: true,
|
|
190
|
+
muted: isMuted,
|
|
191
|
+
"data-testid": "".concat(testIdPrefix, "-video")
|
|
192
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
193
|
+
src: videoSrc,
|
|
194
|
+
type: "video/mp4"
|
|
195
|
+
}))
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
default:
|
|
199
|
+
{
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}, [videoType, videoSrc, isMuted, classes.video]);
|
|
204
|
+
React.useEffect(function () {
|
|
205
|
+
var resizeHandler = function resizeHandler() {
|
|
206
|
+
setIsMobile(window.innerWidth < _uiHelpers.breakpoints.DESKTOP_SMALL_START);
|
|
207
|
+
};
|
|
208
|
+
var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
|
209
|
+
resizeHandler();
|
|
210
|
+
window.addEventListener('resize', resizeHandlerThrottled);
|
|
211
|
+
return function () {
|
|
212
|
+
window.removeEventListener('resize', resizeHandlerThrottled);
|
|
213
|
+
};
|
|
214
|
+
}, [setIsMobile]);
|
|
215
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
216
|
+
ref: rootRef
|
|
217
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
218
|
+
className: cn({
|
|
219
|
+
'bottom-shadow': bottomShadow
|
|
220
|
+
}, [className, classes.root])
|
|
221
|
+
}), /*#__PURE__*/React.createElement(_uiCore.ContentArea, null, /*#__PURE__*/React.createElement("div", {
|
|
222
|
+
className: cn('wrapper')
|
|
223
|
+
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
|
224
|
+
disabledOnMobile: true,
|
|
225
|
+
hasMicrodata: hasBreadcrumbsMicrodata,
|
|
226
|
+
dataAttrs: {
|
|
227
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
|
228
|
+
link: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbsLink
|
|
229
|
+
},
|
|
230
|
+
className: cn('breadcrumbs'),
|
|
231
|
+
items: breadcrumbs,
|
|
232
|
+
color: content === null || content === void 0 ? void 0 : content.textColor,
|
|
233
|
+
classes: {
|
|
234
|
+
item: classes.breadcrumbs
|
|
235
|
+
}
|
|
236
|
+
}), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/React.createElement("picture", {
|
|
237
|
+
"data-testid": "".concat(testIdPrefix, "-picture")
|
|
238
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
239
|
+
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_MIDDLE_START, "px)"),
|
|
240
|
+
srcSet: imageDesktopWide
|
|
241
|
+
}), /*#__PURE__*/React.createElement("source", {
|
|
242
|
+
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
|
|
243
|
+
srcSet: imageDesktop
|
|
244
|
+
}), /*#__PURE__*/React.createElement("source", {
|
|
245
|
+
media: "(min-width: ".concat(_uiHelpers.breakpoints.MOBILE_BIG_START, "px)"),
|
|
246
|
+
srcSet: imageTablet
|
|
247
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
248
|
+
className: cn('background-image'),
|
|
249
|
+
src: imageMobile,
|
|
250
|
+
alt: imageAlt
|
|
251
|
+
})))));
|
|
252
|
+
};
|
|
253
|
+
var _default = exports["default"] = VideoBanner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-video-block,.mfui-video-block__content{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-video-block__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:767px){.mfui-video-block__content{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-block__content{margin-top:32px}}@media screen and (min-width:1024px){.mfui-video-block__content{height:100%;margin-right:20px;padding-right:20px}.mfui-video-block__content_position-right{margin:0 0 0 20px;padding:0 0 0 20px}}.mfui-video-block__header{margin-bottom:24px}@media screen and (max-width:1023px){.mfui-video-block__header{margin-bottom:16px}}.mfui-video-block__description{font-size:15px;font-weight:400;line-height:24px}.mfui-video-block__button{-ms-flex-item-align:start;align-self:flex-start;margin-top:32px;max-width:100%}@media screen and (max-width:767px){.mfui-video-block__button{-ms-flex-item-align:center;align-self:center}}.mfui-video-block__video{-o-object-fit:contain;object-fit:contain;width:100%}.mfui-video-block__video_fix-background{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-video-block__rutube,.mfui-video-block__vk,.mfui-video-block__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './VideoBlock.scss';
|
|
3
|
+
export interface IContent {
|
|
4
|
+
/** Заголовок */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Текст-описание */
|
|
7
|
+
description: string | React.ReactNode[] | React.ReactNode;
|
|
8
|
+
/** Текст кнопки */
|
|
9
|
+
buttonTitle?: string;
|
|
10
|
+
/** Добавляет атрибут download для тега <a> компонента Button */
|
|
11
|
+
buttonDownload?: boolean;
|
|
12
|
+
/** Добавляет атрибут rel для тега <a> компонента Button */
|
|
13
|
+
buttonRel?: string;
|
|
14
|
+
/** Ссылка на кнопке */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Обработчик клика по кнопке */
|
|
17
|
+
onButtonClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const VideoTypes: {
|
|
20
|
+
readonly YOUTUBE: "youtube";
|
|
21
|
+
readonly RUTUBE: "rutube";
|
|
22
|
+
readonly VK: "vk";
|
|
23
|
+
readonly VIDEO: "video";
|
|
24
|
+
};
|
|
25
|
+
type VideoType = (typeof VideoTypes)[keyof typeof VideoTypes];
|
|
26
|
+
export interface IVideoBlockProps {
|
|
27
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
28
|
+
dataAttrs?: {
|
|
29
|
+
root?: Record<string, string>;
|
|
30
|
+
button?: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
/** Дополнительный класс корневого элемента */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
|
35
|
+
classes?: {
|
|
36
|
+
root?: string;
|
|
37
|
+
button?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
};
|
|
40
|
+
/** Ссылка на корневой элемент */
|
|
41
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
42
|
+
/** Данные для блока с контентом */
|
|
43
|
+
content?: IContent;
|
|
44
|
+
/** Тип видео */
|
|
45
|
+
videoType?: VideoType;
|
|
46
|
+
/** Источник видео. Если видео с youtube или rutube, то необходимо указать id. Для видео из VK необходимо указать полный id вместе с _ (например: 22822305_456241864) */
|
|
47
|
+
videoSrc: string;
|
|
48
|
+
/** Наличие звука в видео */
|
|
49
|
+
isMuted?: boolean;
|
|
50
|
+
/** Автоматическое проигрывание видео */
|
|
51
|
+
isAutoplay?: boolean;
|
|
52
|
+
/** Ссылка на изображение для превью к HTML5 видео */
|
|
53
|
+
poster?: string;
|
|
54
|
+
/** Расположение контента справа от видео. Только для десктопа */
|
|
55
|
+
contentPositionRight?: boolean;
|
|
56
|
+
/** Воспроизводит видео на iOS устройствах без перехода в полноэкранный режим */
|
|
57
|
+
playsinline?: boolean;
|
|
58
|
+
/** Фикс для белого фона */
|
|
59
|
+
fixWhiteVideoBackground?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare const testIdPrefix = "VideoBlock";
|
|
62
|
+
declare const VideoBlock: React.FC<IVideoBlockProps>;
|
|
63
|
+
export default VideoBlock;
|