@megafon/ui-shared 6.3.0 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +3 -12
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +6 -20
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/es/components/BenefitsIcons/types.d.ts +5 -6
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/es/components/BenefitsPictures/helpers.js +0 -14
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -4
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/BlogBox/BlogBox.css +1 -92
- package/dist/es/components/BlogBox/BlogBox.d.ts +2 -2
- package/dist/es/components/BlogBox/BlogBox.js +10 -44
- package/dist/es/components/BlogBox/components/BlogBoxTile.css +1 -197
- package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +4 -4
- package/dist/es/components/BlogBox/components/BlogBoxTile.js +13 -20
- package/dist/es/components/BlogBox/types.d.ts +5 -5
- package/dist/es/components/BlogBox/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
- package/dist/es/components/Card/Card.css +1 -354
- package/dist/es/components/Card/Card.d.ts +4 -4
- package/dist/es/components/Card/Card.js +25 -115
- package/dist/es/components/Card/types.d.ts +10 -11
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.js +3 -14
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +0 -4
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
- package/dist/es/components/Container/Container.css +1 -3287
- package/dist/es/components/Container/Container.d.ts +7 -5
- package/dist/es/components/Container/Container.js +10 -25
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
- package/dist/es/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -252
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +8 -9
- package/dist/es/components/ImageBanner/ImageBanner.js +38 -93
- package/dist/es/components/InfoCards/InfoCards.css +1 -0
- package/dist/es/components/InfoCards/InfoCards.d.ts +21 -0
- package/dist/es/components/InfoCards/InfoCards.js +39 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.d.ts +15 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.js +79 -0
- package/dist/es/components/InfoCards/types.d.ts +26 -0
- package/dist/es/components/InfoCards/types.js +1 -0
- package/dist/es/components/Instructions/Instructions.css +1 -827
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +56 -96
- package/dist/es/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
- package/dist/es/components/PageTitle/PageTitle.css +1 -80
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +12 -37
- package/dist/es/components/Partners/Partners.css +1 -53
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +17 -48
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
- package/dist/es/components/Property/Property.css +1 -156
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +37 -81
- package/dist/es/components/Property/PropertyDescription.css +1 -17
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +8 -28
- package/dist/es/components/Property/types.d.ts +7 -5
- package/dist/es/components/Property/types.js +1 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.d.ts +22 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.js +44 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.d.ts +16 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.js +89 -0
- package/dist/es/components/SidePictureCards/types.d.ts +46 -0
- package/dist/es/components/SidePictureCards/types.js +1 -0
- package/dist/es/components/Steps/Steps.css +1 -41
- package/dist/es/components/Steps/Steps.d.ts +2 -1
- package/dist/es/components/Steps/Steps.js +4 -19
- package/dist/es/components/Steps/StepsItem.css +1 -42
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +2 -9
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
- package/dist/es/components/StoreButton/StoreButton.css +1 -327
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +13 -44
- package/dist/es/components/Table/Table.css +1 -157
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +31 -51
- package/dist/es/components/Table/TableCell.js +0 -6
- package/dist/es/components/Table/TableRow.js +1 -10
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +4 -13
- package/dist/es/components/TextBox/TextBox.css +1 -25
- package/dist/es/components/TextBox/TextBox.d.ts +2 -1
- package/dist/es/components/TextBox/TextBox.js +8 -23
- package/dist/es/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
- package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +1 -29
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +3 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +11 -22
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +37 -77
- package/dist/es/helpers/getColumnConfig.d.ts +5 -1
- package/dist/es/helpers/setRelAttribute.d.ts +3 -1
- package/dist/es/helpers/setRelAttribute.js +0 -2
- package/dist/es/hooks/useResolutions.d.ts +1 -1
- package/dist/es/hooks/useResolutions.js +13 -21
- package/dist/es/index.d.ts +4 -0
- package/dist/es/index.js +4 -0
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +11 -67
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +33 -57
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +13 -44
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +10 -18
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +5 -24
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +6 -17
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +1 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -34
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +7 -25
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +27 -87
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +14 -54
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +11 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -6
- package/dist/lib/components/BenefitsIcons/types.js +5 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +25 -72
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/lib/components/BenefitsPictures/helpers.js +10 -41
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -4
- package/dist/lib/components/BenefitsPictures/types.js +5 -1
- package/dist/lib/components/BlogBox/BlogBox.css +1 -92
- package/dist/lib/components/BlogBox/BlogBox.d.ts +2 -2
- package/dist/lib/components/BlogBox/BlogBox.js +21 -65
- package/dist/lib/components/BlogBox/components/BlogBoxTile.css +1 -197
- package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +4 -4
- package/dist/lib/components/BlogBox/components/BlogBoxTile.js +27 -38
- package/dist/lib/components/BlogBox/types.d.ts +5 -5
- package/dist/lib/components/BlogBox/types.js +5 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +19 -61
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -16
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +23 -56
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +41 -90
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +30 -73
- package/dist/lib/components/Card/Card.css +1 -354
- package/dist/lib/components/Card/Card.d.ts +4 -4
- package/dist/lib/components/Card/Card.js +68 -165
- package/dist/lib/components/Card/types.d.ts +10 -11
- package/dist/lib/components/Card/types.js +5 -1
- package/dist/lib/components/CardsBox/CardsBox.js +8 -32
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +2 -9
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +16 -40
- package/dist/lib/components/Container/Container.css +1 -3287
- package/dist/lib/components/Container/Container.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +18 -40
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -37
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +18 -61
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +1 -36
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +9 -34
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -252
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +8 -9
- package/dist/lib/components/ImageBanner/ImageBanner.js +63 -144
- package/dist/lib/components/InfoCards/InfoCards.css +1 -0
- package/dist/lib/components/InfoCards/InfoCards.d.ts +21 -0
- package/dist/lib/components/InfoCards/InfoCards.js +48 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.d.ts +15 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.js +88 -0
- package/dist/lib/components/InfoCards/types.d.ts +26 -0
- package/dist/lib/components/InfoCards/types.js +5 -0
- package/dist/lib/components/Instructions/Instructions.css +1 -827
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +121 -191
- package/dist/lib/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +10 -38
- package/dist/lib/components/PageTitle/PageTitle.css +1 -80
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +16 -53
- package/dist/lib/components/Partners/Partners.css +1 -53
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +22 -66
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +1 -80
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
- package/dist/lib/components/Property/Property.css +1 -156
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +61 -121
- package/dist/lib/components/Property/PropertyDescription.css +1 -17
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +16 -47
- package/dist/lib/components/Property/types.d.ts +7 -5
- package/dist/lib/components/Property/types.js +5 -1
- package/dist/lib/components/SidePictureCards/SidePictureCards.d.ts +22 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.js +54 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.d.ts +16 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.js +95 -0
- package/dist/lib/components/SidePictureCards/types.d.ts +46 -0
- package/dist/lib/components/SidePictureCards/types.js +5 -0
- package/dist/lib/components/Steps/Steps.css +1 -41
- package/dist/lib/components/Steps/Steps.d.ts +2 -1
- package/dist/lib/components/Steps/Steps.js +8 -35
- package/dist/lib/components/Steps/StepsItem.css +1 -42
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +11 -23
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -346
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +48 -119
- package/dist/lib/components/StoreButton/StoreButton.css +1 -327
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +18 -64
- package/dist/lib/components/Table/Table.css +1 -157
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +36 -69
- package/dist/lib/components/Table/TableCell.js +4 -16
- package/dist/lib/components/Table/TableRow.js +5 -19
- package/dist/lib/components/TabsBox/TabBox.js +1 -4
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +8 -26
- package/dist/lib/components/TextBox/TextBox.css +1 -25
- package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
- package/dist/lib/components/TextBox/TextBox.js +12 -36
- package/dist/lib/components/TextBox/TextBoxPicture.css +1 -27
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -10
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +11 -40
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +1 -29
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +3 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +16 -39
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -31
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +11 -41
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -225
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +84 -177
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -106
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +59 -115
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/helpers/getColumnConfig.js +2 -5
- package/dist/lib/helpers/setRelAttribute.d.ts +3 -1
- package/dist/lib/helpers/setRelAttribute.js +2 -7
- package/dist/lib/hooks/useResolutions.d.ts +1 -1
- package/dist/lib/hooks/useResolutions.js +15 -31
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +39 -60
- package/package.json +87 -92
- package/CHANGELOG.md +0 -4088
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
@@ -1,62 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
|
-
exports["default"] = exports.
|
9
|
-
|
7
|
+
exports.testIdPrefix = exports["default"] = exports.VideoType = exports.TextColor = exports.ClassName = exports.ButtonColor = void 0;
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
-
|
14
10
|
require("core-js/modules/es.symbol.js");
|
15
|
-
|
16
11
|
require("core-js/modules/es.symbol.description.js");
|
17
|
-
|
18
|
-
require("core-js/modules/es.string.link.js");
|
19
|
-
|
20
12
|
require("core-js/modules/es.array.concat.js");
|
21
|
-
|
22
|
-
require("
|
23
|
-
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
25
|
-
|
13
|
+
require("core-js/modules/es.string.link.js");
|
14
|
+
var React = _interopRequireWildcard(require("react"));
|
26
15
|
var _uiCore = require("@megafon/ui-core");
|
27
|
-
|
28
16
|
var _uiHelpers = require("@megafon/ui-helpers");
|
29
|
-
|
30
17
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
31
|
-
|
32
|
-
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
33
|
-
|
34
18
|
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
35
|
-
|
36
19
|
var _Breadcrumbs = _interopRequireDefault(require("../Breadcrumbs/Breadcrumbs"));
|
37
|
-
|
38
|
-
function
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
43
|
-
|
44
|
-
var testIdPrefix = 'VideoBanner';
|
45
|
-
exports.testIdPrefix = testIdPrefix;
|
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';
|
46
24
|
var cn = (0, _uiHelpers.cnCreate)('mfui-video-banner');
|
47
25
|
var ClassName;
|
48
|
-
exports.ClassName = ClassName;
|
49
|
-
|
50
26
|
(function (ClassName) {
|
51
27
|
ClassName["BUTTON"] = "button";
|
52
28
|
ClassName["LINK"] = "link";
|
53
29
|
})(ClassName || (exports.ClassName = ClassName = {}));
|
54
|
-
|
55
30
|
var typographyConfig = {
|
56
31
|
b: {
|
57
32
|
component: function component(_ref) {
|
58
33
|
var children = _ref.children;
|
59
|
-
return /*#__PURE__*/
|
34
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
60
35
|
className: cn('value'),
|
61
36
|
as: "h3",
|
62
37
|
color: "inherit"
|
@@ -64,106 +39,99 @@ var typographyConfig = {
|
|
64
39
|
}
|
65
40
|
}
|
66
41
|
};
|
67
|
-
var VideoType = {
|
42
|
+
var VideoType = exports.VideoType = {
|
68
43
|
YOUTUBE: 'youtube',
|
69
44
|
VIDEO: 'video'
|
70
45
|
};
|
71
|
-
exports.
|
72
|
-
var ButtonColor = {
|
46
|
+
var ButtonColor = exports.ButtonColor = {
|
73
47
|
GREEN: 'green',
|
74
48
|
PURPLE: 'purple'
|
75
49
|
};
|
76
|
-
exports.
|
77
|
-
var TextColor = {
|
50
|
+
var TextColor = exports.TextColor = {
|
78
51
|
BLACK: 'black',
|
79
52
|
WHITE: 'white'
|
80
53
|
};
|
81
|
-
exports.TextColor = TextColor;
|
82
|
-
|
83
54
|
var VideoBanner = function VideoBanner(_ref2) {
|
84
55
|
var dataAttrs = _ref2.dataAttrs,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
setIsMobile = _React$useState2[1];
|
113
|
-
|
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];
|
114
83
|
var isVideoData = !!videoSrc && !!videoType;
|
115
84
|
var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
|
116
|
-
|
117
|
-
var renderContent = _react["default"].useCallback(function (_ref3) {
|
85
|
+
var renderContent = React.useCallback(function (_ref3) {
|
118
86
|
var title = _ref3.title,
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
return /*#__PURE__*/
|
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, {
|
139
107
|
className: cn('grid'),
|
140
108
|
guttersLeft: "medium"
|
141
|
-
}, /*#__PURE__*/
|
109
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
142
110
|
mobile: "12",
|
143
111
|
tablet: "7",
|
144
112
|
desktop: "7",
|
145
113
|
wide: "6"
|
146
|
-
}, /*#__PURE__*/
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
147
115
|
className: cn('content', {
|
148
116
|
'text-color': textColor,
|
149
117
|
'text-color-mobile': textColorMobile
|
150
118
|
}),
|
151
119
|
"data-testid": "".concat(testIdPrefix, "-content")
|
152
|
-
}, /*#__PURE__*/
|
120
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
153
121
|
className: cn('title'),
|
154
122
|
as: "h1",
|
155
123
|
color: "inherit"
|
156
|
-
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/
|
124
|
+
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
157
125
|
className: cn('text')
|
158
|
-
}, /*#__PURE__*/
|
126
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
159
127
|
as: "h5",
|
160
128
|
color: "inherit",
|
161
129
|
className: cn('description')
|
162
|
-
}, (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig)), cost && /*#__PURE__*/
|
130
|
+
}, (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig)), cost && /*#__PURE__*/React.createElement("div", {
|
163
131
|
className: cn('cost')
|
164
|
-
}, (0, _uiHelpers.convert)(cost, typographyConfig))), /*#__PURE__*/
|
132
|
+
}, (0, _uiHelpers.convert)(cost, typographyConfig))), /*#__PURE__*/React.createElement("div", {
|
165
133
|
className: cn('btns-wrapper')
|
166
|
-
}, buttonTitle && /*#__PURE__*/
|
134
|
+
}, buttonTitle && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
167
135
|
dataAttrs: {
|
168
136
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
169
137
|
},
|
@@ -174,7 +142,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
174
142
|
onClick: onButtonClick,
|
175
143
|
download: buttonDownload,
|
176
144
|
rel: buttonRel
|
177
|
-
}, buttonTitle), linkTitle && /*#__PURE__*/
|
145
|
+
}, buttonTitle), linkTitle && /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
178
146
|
dataAttrs: {
|
179
147
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
180
148
|
},
|
@@ -186,8 +154,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
186
154
|
rel: linkRel
|
187
155
|
}, linkTitle)))));
|
188
156
|
}, [classes.button, classes.link, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
|
189
|
-
|
190
|
-
var renderVideo = _react["default"].useCallback(function () {
|
157
|
+
var renderVideo = React.useCallback(function () {
|
191
158
|
switch (videoType) {
|
192
159
|
case VideoType.YOUTUBE:
|
193
160
|
{
|
@@ -201,7 +168,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
201
168
|
var policy = '&iv_load_policy=3';
|
202
169
|
var playlist = "&playlist=".concat(videoSrc);
|
203
170
|
var src = "".concat(url).concat(autoplay).concat(mute).concat(loop).concat(rel).concat(controls).concat(info).concat(policy).concat(playlist);
|
204
|
-
return /*#__PURE__*/
|
171
|
+
return /*#__PURE__*/React.createElement("iframe", {
|
205
172
|
title: "iframe",
|
206
173
|
className: cn('video'),
|
207
174
|
src: src,
|
@@ -212,37 +179,32 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
212
179
|
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
213
180
|
});
|
214
181
|
}
|
215
|
-
|
216
182
|
case VideoType.VIDEO:
|
217
183
|
{
|
218
|
-
return (
|
219
|
-
/*#__PURE__*/
|
184
|
+
return /*#__PURE__*/(
|
220
185
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
221
|
-
|
186
|
+
React.createElement("video", {
|
222
187
|
className: cn('video', [classes.video]),
|
223
188
|
autoPlay: true,
|
224
189
|
loop: true,
|
225
190
|
muted: isMuted,
|
226
191
|
"data-testid": "".concat(testIdPrefix, "-video")
|
227
|
-
}, /*#__PURE__*/
|
192
|
+
}, /*#__PURE__*/React.createElement("source", {
|
228
193
|
src: videoSrc,
|
229
194
|
type: "video/mp4"
|
230
195
|
}))
|
231
196
|
);
|
232
197
|
}
|
233
|
-
|
234
198
|
default:
|
235
199
|
{
|
236
200
|
return null;
|
237
201
|
}
|
238
202
|
}
|
239
203
|
}, [videoType, videoSrc, isMuted, classes.video]);
|
240
|
-
|
241
|
-
_react["default"].useEffect(function () {
|
204
|
+
React.useEffect(function () {
|
242
205
|
var resizeHandler = function resizeHandler() {
|
243
206
|
setIsMobile(window.innerWidth < _uiHelpers.breakpoints.DESKTOP_SMALL_START);
|
244
207
|
};
|
245
|
-
|
246
208
|
var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
247
209
|
resizeHandler();
|
248
210
|
window.addEventListener('resize', resizeHandlerThrottled);
|
@@ -250,16 +212,15 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
250
212
|
window.removeEventListener('resize', resizeHandlerThrottled);
|
251
213
|
};
|
252
214
|
}, [setIsMobile]);
|
253
|
-
|
254
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
215
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
255
216
|
ref: rootRef
|
256
217
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
257
218
|
className: cn({
|
258
219
|
'bottom-shadow': bottomShadow
|
259
220
|
}, [className, classes.root])
|
260
|
-
}), /*#__PURE__*/
|
221
|
+
}), /*#__PURE__*/React.createElement(_uiCore.ContentArea, null, /*#__PURE__*/React.createElement("div", {
|
261
222
|
className: cn('wrapper')
|
262
|
-
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/
|
223
|
+
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
263
224
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
264
225
|
dataAttrs: {
|
265
226
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -271,75 +232,21 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
271
232
|
classes: {
|
272
233
|
item: classes.breadcrumbs
|
273
234
|
}
|
274
|
-
}), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/
|
235
|
+
}), content && renderContent(content), isRenderVideo && renderVideo(), !isRenderVideo && /*#__PURE__*/React.createElement("picture", {
|
275
236
|
"data-testid": "".concat(testIdPrefix, "-picture")
|
276
|
-
}, /*#__PURE__*/
|
237
|
+
}, /*#__PURE__*/React.createElement("source", {
|
277
238
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_MIDDLE_START, "px)"),
|
278
239
|
srcSet: imageDesktopWide
|
279
|
-
}), /*#__PURE__*/
|
240
|
+
}), /*#__PURE__*/React.createElement("source", {
|
280
241
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
|
281
242
|
srcSet: imageDesktop
|
282
|
-
}), /*#__PURE__*/
|
243
|
+
}), /*#__PURE__*/React.createElement("source", {
|
283
244
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.MOBILE_BIG_START, "px)"),
|
284
245
|
srcSet: imageTablet
|
285
|
-
}), /*#__PURE__*/
|
246
|
+
}), /*#__PURE__*/React.createElement("img", {
|
286
247
|
className: cn('background-image'),
|
287
248
|
src: imageMobile,
|
288
249
|
alt: imageAlt
|
289
250
|
})))));
|
290
251
|
};
|
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;
|
252
|
+
var _default = exports["default"] = VideoBanner;
|
@@ -1,106 +1 @@
|
|
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
|
+
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__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './VideoBlock.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './VideoBlock.scss';
|
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
|
-
|
23
|
+
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?: Ref<HTMLDivElement>;
|
39
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
40
40
|
/** Данные для блока с контентом */
|
41
41
|
content?: IContent;
|
42
42
|
/** Тип видео */
|