@megafon/ui-shared 6.4.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -4178
- 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 -7
- package/dist/es/components/ImageBanner/ImageBanner.js +37 -88
- package/dist/es/components/InfoCards/InfoCards.css +1 -75
- package/dist/es/components/InfoCards/InfoCards.d.ts +1 -1
- package/dist/es/components/InfoCards/InfoCards.js +10 -37
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.css +1 -237
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.d.ts +1 -1
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.js +17 -46
- 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 +1 -1
- package/dist/es/components/SidePictureCards/SidePictureCards.js +8 -41
- package/dist/es/components/SidePictureCards/components/SidePictureCard.css +1 -183
- package/dist/es/components/SidePictureCards/components/SidePictureCard.d.ts +2 -2
- package/dist/es/components/SidePictureCards/components/SidePictureCard.js +21 -23
- package/dist/es/components/SidePictureCards/types.d.ts +8 -8
- 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 -38
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +8 -24
- 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/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 -4178
- 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 -7
- package/dist/lib/components/ImageBanner/ImageBanner.js +62 -139
- package/dist/lib/components/InfoCards/InfoCards.css +1 -75
- package/dist/lib/components/InfoCards/InfoCards.d.ts +1 -1
- package/dist/lib/components/InfoCards/InfoCards.js +15 -55
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.css +1 -237
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.d.ts +1 -1
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.js +22 -63
- package/dist/lib/components/InfoCards/types.js +5 -1
- 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 +1 -1
- package/dist/lib/components/SidePictureCards/SidePictureCards.js +17 -58
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.css +1 -183
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.d.ts +2 -2
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.js +23 -36
- package/dist/lib/components/SidePictureCards/types.d.ts +8 -8
- package/dist/lib/components/SidePictureCards/types.js +5 -1
- 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 -38
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +13 -41
- 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.js +11 -64
- package/package.json +87 -92
- package/CHANGELOG.md +0 -4104
- 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,252 +1 @@
|
|
1
|
-
h1,
|
2
|
-
h2,
|
3
|
-
h3,
|
4
|
-
h4,
|
5
|
-
h5 {
|
6
|
-
margin: 0;
|
7
|
-
}
|
8
|
-
.mfui-image-banner {
|
9
|
-
position: relative;
|
10
|
-
display: -webkit-box;
|
11
|
-
display: -ms-flexbox;
|
12
|
-
display: flex;
|
13
|
-
-webkit-box-orient: vertical;
|
14
|
-
-webkit-box-direction: normal;
|
15
|
-
-ms-flex-direction: column;
|
16
|
-
flex-direction: column;
|
17
|
-
-webkit-box-pack: justify;
|
18
|
-
-ms-flex-pack: justify;
|
19
|
-
justify-content: space-between;
|
20
|
-
overflow: hidden;
|
21
|
-
}
|
22
|
-
@media screen and (min-width: 1024px) {
|
23
|
-
.mfui-image-banner {
|
24
|
-
-webkit-box-orient: horizontal;
|
25
|
-
-webkit-box-direction: normal;
|
26
|
-
-ms-flex-direction: row;
|
27
|
-
flex-direction: row;
|
28
|
-
-webkit-box-align: center;
|
29
|
-
-ms-flex-align: center;
|
30
|
-
align-items: center;
|
31
|
-
height: 420px;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
.mfui-image-banner__picture {
|
35
|
-
display: -webkit-box;
|
36
|
-
display: -ms-flexbox;
|
37
|
-
display: flex;
|
38
|
-
-ms-flex-negative: 0;
|
39
|
-
flex-shrink: 0;
|
40
|
-
-webkit-box-pack: center;
|
41
|
-
-ms-flex-pack: center;
|
42
|
-
justify-content: center;
|
43
|
-
}
|
44
|
-
@media screen and (min-width: 1024px) {
|
45
|
-
.mfui-image-banner__picture {
|
46
|
-
width: 50%;
|
47
|
-
max-width: 672px;
|
48
|
-
height: 100%;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
.mfui-image-banner__picture_v-align_top {
|
52
|
-
-webkit-box-align: start;
|
53
|
-
-ms-flex-align: start;
|
54
|
-
align-items: flex-start;
|
55
|
-
}
|
56
|
-
.mfui-image-banner__picture_v-align_center {
|
57
|
-
-webkit-box-align: center;
|
58
|
-
-ms-flex-align: center;
|
59
|
-
align-items: center;
|
60
|
-
}
|
61
|
-
.mfui-image-banner__picture_v-align_bottom {
|
62
|
-
-webkit-box-align: end;
|
63
|
-
-ms-flex-align: end;
|
64
|
-
align-items: flex-end;
|
65
|
-
}
|
66
|
-
.mfui-image-banner__image {
|
67
|
-
display: block;
|
68
|
-
max-width: 100%;
|
69
|
-
max-height: 150px;
|
70
|
-
}
|
71
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
72
|
-
.mfui-image-banner__image {
|
73
|
-
max-height: 230px;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
@media screen and (min-width: 1024px) {
|
77
|
-
.mfui-image-banner__image {
|
78
|
-
max-height: 100%;
|
79
|
-
-o-object-fit: contain;
|
80
|
-
object-fit: contain;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
.mfui-image-banner__content {
|
84
|
-
z-index: 1;
|
85
|
-
-webkit-box-flex: 1;
|
86
|
-
-ms-flex-positive: 1;
|
87
|
-
flex-grow: 1;
|
88
|
-
}
|
89
|
-
@media screen and (max-width: 1023px) {
|
90
|
-
.mfui-image-banner__content {
|
91
|
-
padding: 24px;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
95
|
-
.mfui-image-banner__content {
|
96
|
-
text-align: center;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
@media screen and (min-width: 1024px) {
|
100
|
-
.mfui-image-banner__content {
|
101
|
-
width: 50%;
|
102
|
-
padding: 0 80px;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
.mfui-image-banner__description {
|
106
|
-
margin-top: 16px;
|
107
|
-
white-space: pre-wrap;
|
108
|
-
}
|
109
|
-
.mfui-image-banner__cost {
|
110
|
-
font-size: 15px;
|
111
|
-
line-height: 24px;
|
112
|
-
font-weight: 500;
|
113
|
-
margin-top: 16px;
|
114
|
-
}
|
115
|
-
.mfui-image-banner__value {
|
116
|
-
display: inline;
|
117
|
-
margin: 0 4px;
|
118
|
-
}
|
119
|
-
@media screen and (max-width: 1023px), screen and (min-width: 1024px) and (max-width: 1279px) {
|
120
|
-
.mfui-image-banner__value {
|
121
|
-
line-height: 21px;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
.mfui-image-banner__title,
|
125
|
-
.mfui-image-banner__text {
|
126
|
-
white-space: pre-wrap;
|
127
|
-
}
|
128
|
-
.mfui-image-banner__children {
|
129
|
-
display: -webkit-box;
|
130
|
-
display: -ms-flexbox;
|
131
|
-
display: flex;
|
132
|
-
-webkit-box-orient: vertical;
|
133
|
-
-webkit-box-direction: normal;
|
134
|
-
-ms-flex-direction: column;
|
135
|
-
flex-direction: column;
|
136
|
-
-ms-flex-wrap: wrap;
|
137
|
-
flex-wrap: wrap;
|
138
|
-
gap: 16px;
|
139
|
-
-webkit-box-pack: center;
|
140
|
-
-ms-flex-pack: center;
|
141
|
-
justify-content: center;
|
142
|
-
margin-top: 32px;
|
143
|
-
}
|
144
|
-
@media screen and (max-width: 767px) {
|
145
|
-
.mfui-image-banner__children {
|
146
|
-
-webkit-box-align: center;
|
147
|
-
-ms-flex-align: center;
|
148
|
-
align-items: center;
|
149
|
-
}
|
150
|
-
}
|
151
|
-
@media screen and (min-width: 768px) {
|
152
|
-
.mfui-image-banner__children {
|
153
|
-
-webkit-box-orient: horizontal;
|
154
|
-
-webkit-box-direction: normal;
|
155
|
-
-ms-flex-direction: row;
|
156
|
-
flex-direction: row;
|
157
|
-
}
|
158
|
-
}
|
159
|
-
@media screen and (min-width: 1024px) {
|
160
|
-
.mfui-image-banner__children {
|
161
|
-
-webkit-box-pack: start;
|
162
|
-
-ms-flex-pack: start;
|
163
|
-
justify-content: flex-start;
|
164
|
-
}
|
165
|
-
}
|
166
|
-
@media screen and (max-width: 1023px) {
|
167
|
-
.mfui-image-banner__badges-container {
|
168
|
-
display: -webkit-box;
|
169
|
-
display: -ms-flexbox;
|
170
|
-
display: flex;
|
171
|
-
gap: 8px;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
.mfui-image-banner__badges {
|
175
|
-
display: -webkit-box;
|
176
|
-
display: -ms-flexbox;
|
177
|
-
display: flex;
|
178
|
-
-webkit-box-flex: 1;
|
179
|
-
-ms-flex-positive: 1;
|
180
|
-
flex-grow: 1;
|
181
|
-
-ms-flex-wrap: wrap;
|
182
|
-
flex-wrap: wrap;
|
183
|
-
gap: 8px;
|
184
|
-
margin-bottom: 16px;
|
185
|
-
}
|
186
|
-
.mfui-image-banner__ad-block {
|
187
|
-
margin: 0 0 16px auto;
|
188
|
-
}
|
189
|
-
@media screen and (min-width: 1024px) {
|
190
|
-
.mfui-image-banner__ad-block {
|
191
|
-
position: absolute;
|
192
|
-
top: 24px;
|
193
|
-
right: 24px;
|
194
|
-
}
|
195
|
-
}
|
196
|
-
.mfui-image-banner_radius_rounded {
|
197
|
-
border-radius: 24px;
|
198
|
-
}
|
199
|
-
@media screen and (min-width: 1024px) {
|
200
|
-
.mfui-image-banner_auto-height .mfui-image-banner__content {
|
201
|
-
padding: 48px 80px;
|
202
|
-
}
|
203
|
-
}
|
204
|
-
@media screen and (min-width: 1024px) {
|
205
|
-
.mfui-image-banner_auto-height {
|
206
|
-
height: auto;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
@media screen and (min-width: 1024px) {
|
210
|
-
.mfui-image-banner_has-image .mfui-image-banner__content {
|
211
|
-
padding-right: 0;
|
212
|
-
}
|
213
|
-
}
|
214
|
-
@media screen and (min-width: 1024px) {
|
215
|
-
.mfui-image-banner_full-width .mfui-image-banner__image {
|
216
|
-
position: absolute;
|
217
|
-
right: 0;
|
218
|
-
bottom: 0;
|
219
|
-
display: block;
|
220
|
-
max-width: unset;
|
221
|
-
}
|
222
|
-
}
|
223
|
-
@media screen and (min-width: 1024px) {
|
224
|
-
.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image {
|
225
|
-
width: 100%;
|
226
|
-
height: 100%;
|
227
|
-
-o-object-fit: cover;
|
228
|
-
object-fit: cover;
|
229
|
-
}
|
230
|
-
}
|
231
|
-
.mfui-image-banner_background-color_green {
|
232
|
-
background-color: var(--brandGreen);
|
233
|
-
}
|
234
|
-
.mfui-image-banner_background-color_purple {
|
235
|
-
background-color: var(--brandPurple);
|
236
|
-
}
|
237
|
-
.mfui-image-banner_background-color_gradient {
|
238
|
-
background: -webkit-gradient(linear, right top, left top, from(#ADA6BA), to(#F6F2F9));
|
239
|
-
background: linear-gradient(270deg, #ADA6BA 0%, #F6F2F9 100%);
|
240
|
-
}
|
241
|
-
.mfui-image-banner_background-color_light {
|
242
|
-
background-color: #F6F2F9;
|
243
|
-
}
|
244
|
-
.mfui-image-banner_background-color_spbSky0 {
|
245
|
-
background-color: var(--spbSky0);
|
246
|
-
}
|
247
|
-
.mfui-image-banner_text-color_light .mfui-image-banner__content {
|
248
|
-
color: var(--stcWhite);
|
249
|
-
}
|
250
|
-
.mfui-image-banner_text-color_dark .mfui-image-banner__content {
|
251
|
-
color: var(--stcBlack);
|
252
|
-
}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './ImageBanner.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './ImageBanner.scss';
|
3
3
|
export declare const BackgroundColor: {
|
4
4
|
readonly TRANSPARENT: "transparent";
|
5
5
|
readonly GREEN: "green";
|
@@ -8,23 +8,23 @@ export declare const BackgroundColor: {
|
|
8
8
|
readonly GRADIENT: "gradient";
|
9
9
|
readonly LIGHT: "light";
|
10
10
|
};
|
11
|
-
export
|
11
|
+
export type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
|
12
12
|
export declare const Radius: {
|
13
13
|
readonly CORNERS: "corners";
|
14
14
|
readonly ROUNDED: "rounded";
|
15
15
|
};
|
16
|
-
export
|
16
|
+
export type RadiusType = (typeof Radius)[keyof typeof Radius];
|
17
17
|
export declare const NavTheme: {
|
18
18
|
readonly LIGHT: "light";
|
19
19
|
readonly DARK: "dark";
|
20
20
|
};
|
21
|
-
export
|
21
|
+
export type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
|
22
22
|
export declare const ImageVerticalAlign: {
|
23
23
|
readonly TOP: "top";
|
24
24
|
readonly CENTER: "center";
|
25
25
|
readonly BOTTOM: "bottom";
|
26
26
|
};
|
27
|
-
export
|
27
|
+
export type ImageVerticalAlignType = (typeof ImageVerticalAlign)[keyof typeof ImageVerticalAlign];
|
28
28
|
export interface IImageBannerProps {
|
29
29
|
/** Дополнительные data атрибуты к внутренним элементам */
|
30
30
|
dataAttrs?: {
|
@@ -47,7 +47,7 @@ export interface IImageBannerProps {
|
|
47
47
|
children?: string;
|
48
48
|
};
|
49
49
|
/** Ссылка на корневой элемент */
|
50
|
-
rootRef?: Ref<HTMLDivElement>;
|
50
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
51
51
|
/** Заголовок */
|
52
52
|
title?: string | React.ReactNode | React.ReactNode[];
|
53
53
|
/** Текст-описание */
|
@@ -82,6 +82,7 @@ export interface IImageBannerProps {
|
|
82
82
|
badges?: JSX.Element[] | JSX.Element;
|
83
83
|
/** Элемент блока с рекламой */
|
84
84
|
adBlock?: JSX.Element | null;
|
85
|
+
children?: React.ReactNode;
|
85
86
|
}
|
86
87
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
87
88
|
export default ImageBanner;
|
@@ -1,39 +1,22 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
|
-
exports["default"] = exports.
|
9
|
-
|
7
|
+
exports["default"] = exports.Radius = exports.NavTheme = exports.ImageVerticalAlign = exports.BackgroundColor = 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
12
|
require("core-js/modules/es.array.concat.js");
|
19
|
-
|
20
|
-
require("core-js/modules/es.object.values.js");
|
21
|
-
|
22
|
-
var _react = _interopRequireDefault(require("react"));
|
23
|
-
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
24
14
|
var _uiCore = require("@megafon/ui-core");
|
25
|
-
|
26
15
|
var _uiHelpers = require("@megafon/ui-helpers");
|
27
|
-
|
28
|
-
var
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
33
|
-
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
35
|
-
|
36
|
-
var BackgroundColor = {
|
16
|
+
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); }
|
17
|
+
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; }
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
19
|
+
var BackgroundColor = exports.BackgroundColor = {
|
37
20
|
TRANSPARENT: 'transparent',
|
38
21
|
GREEN: 'green',
|
39
22
|
PURPLE: 'purple',
|
@@ -41,41 +24,34 @@ var BackgroundColor = {
|
|
41
24
|
GRADIENT: 'gradient',
|
42
25
|
LIGHT: 'light'
|
43
26
|
};
|
44
|
-
exports.
|
45
|
-
var Radius = {
|
27
|
+
var Radius = exports.Radius = {
|
46
28
|
CORNERS: 'corners',
|
47
29
|
ROUNDED: 'rounded'
|
48
30
|
};
|
49
|
-
exports.
|
50
|
-
var NavTheme = {
|
31
|
+
var NavTheme = exports.NavTheme = {
|
51
32
|
LIGHT: 'light',
|
52
33
|
DARK: 'dark'
|
53
34
|
};
|
54
|
-
exports.
|
55
|
-
var ImageVerticalAlign = {
|
35
|
+
var ImageVerticalAlign = exports.ImageVerticalAlign = {
|
56
36
|
TOP: 'top',
|
57
37
|
CENTER: 'center',
|
58
38
|
BOTTOM: 'bottom'
|
59
39
|
};
|
60
|
-
exports.ImageVerticalAlign = ImageVerticalAlign;
|
61
|
-
|
62
40
|
var getTheme = function getTheme(backgrounColor) {
|
63
41
|
switch (backgrounColor) {
|
64
42
|
case BackgroundColor.GREEN:
|
65
43
|
case BackgroundColor.PURPLE:
|
66
44
|
return NavTheme.LIGHT;
|
67
|
-
|
68
45
|
default:
|
69
46
|
return NavTheme.DARK;
|
70
47
|
}
|
71
48
|
};
|
72
|
-
|
73
49
|
var cn = (0, _uiHelpers.cnCreate)('mfui-image-banner');
|
74
50
|
var typographyConfig = {
|
75
51
|
b: {
|
76
52
|
component: function component(_ref) {
|
77
53
|
var children = _ref.children;
|
78
|
-
return /*#__PURE__*/
|
54
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
79
55
|
className: cn('value'),
|
80
56
|
as: "h3",
|
81
57
|
color: "inherit"
|
@@ -83,108 +59,97 @@ var typographyConfig = {
|
|
83
59
|
}
|
84
60
|
}
|
85
61
|
};
|
86
|
-
|
87
62
|
var ImageBanner = function ImageBanner(_ref2) {
|
88
63
|
var dataAttrs = _ref2.dataAttrs,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
_react["default"].useEffect(function () {
|
64
|
+
className = _ref2.className,
|
65
|
+
_ref2$classes = _ref2.classes,
|
66
|
+
classes = _ref2$classes === void 0 ? {} : _ref2$classes,
|
67
|
+
rootRef = _ref2.rootRef,
|
68
|
+
_ref2$imageMobile = _ref2.imageMobile,
|
69
|
+
imageMobile = _ref2$imageMobile === void 0 ? '' : _ref2$imageMobile,
|
70
|
+
_ref2$imageMobile2x = _ref2.imageMobile2x,
|
71
|
+
imageMobile2x = _ref2$imageMobile2x === void 0 ? '' : _ref2$imageMobile2x,
|
72
|
+
_ref2$imageDesktop = _ref2.imageDesktop,
|
73
|
+
imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
|
74
|
+
_ref2$imageDesktop2x = _ref2.imageDesktop2x,
|
75
|
+
imageDesktop2x = _ref2$imageDesktop2x === void 0 ? '' : _ref2$imageDesktop2x,
|
76
|
+
_ref2$imageAlt = _ref2.imageAlt,
|
77
|
+
imageAlt = _ref2$imageAlt === void 0 ? '' : _ref2$imageAlt,
|
78
|
+
_ref2$imageVerticalAl = _ref2.imageVerticalAlign,
|
79
|
+
imageVerticalAlign = _ref2$imageVerticalAl === void 0 ? ImageVerticalAlign.CENTER : _ref2$imageVerticalAl,
|
80
|
+
title = _ref2.title,
|
81
|
+
description = _ref2.description,
|
82
|
+
cost = _ref2.cost,
|
83
|
+
_ref2$headerLevelMobi = _ref2.headerLevelMobile,
|
84
|
+
headerLevelMobile = _ref2$headerLevelMobi === void 0 ? 'h1' : _ref2$headerLevelMobi,
|
85
|
+
_ref2$headerLevel = _ref2.headerLevel,
|
86
|
+
headerLevel = _ref2$headerLevel === void 0 ? 'h1' : _ref2$headerLevel,
|
87
|
+
_ref2$backgroundColor = _ref2.backgroundColor,
|
88
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
|
89
|
+
_ref2$radius = _ref2.radius,
|
90
|
+
radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
|
91
|
+
autoHeight = _ref2.autoHeight,
|
92
|
+
isImageFullWidth = _ref2.isImageFullWidth,
|
93
|
+
badges = _ref2.badges,
|
94
|
+
adBlock = _ref2.adBlock,
|
95
|
+
_ref2$children = _ref2.children,
|
96
|
+
children = _ref2$children === void 0 ? [] : _ref2$children;
|
97
|
+
var _React$useState = React.useState(false),
|
98
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
99
|
+
isMobile = _React$useState2[0],
|
100
|
+
setIsMobile = _React$useState2[1];
|
101
|
+
React.useEffect(function () {
|
129
102
|
var mediaQuery = window.matchMedia("(max-width: ".concat(_uiHelpers.breakpoints.MOBILE_MIDDLE_END, "px)"));
|
130
|
-
|
131
103
|
var handleMediaChange = function handleMediaChange(_ref3) {
|
132
104
|
var matches = _ref3.matches;
|
133
105
|
setIsMobile(matches);
|
134
106
|
};
|
135
|
-
|
136
107
|
setIsMobile(mediaQuery.matches);
|
137
108
|
mediaQuery.addEventListener('change', handleMediaChange);
|
138
109
|
return function () {
|
139
110
|
mediaQuery.removeEventListener('change', handleMediaChange);
|
140
111
|
};
|
141
112
|
}, []);
|
142
|
-
|
143
113
|
var navTheme = getTheme(backgroundColor);
|
144
114
|
var hasImage = !!(imageMobile || imageMobile2x || imageDesktop || imageDesktop2x);
|
145
|
-
|
146
|
-
var renderBadges = !!badges && /*#__PURE__*/_react["default"].createElement("div", {
|
115
|
+
var renderBadges = !!badges && /*#__PURE__*/React.createElement("div", {
|
147
116
|
className: cn('badges', [classes.badges])
|
148
117
|
}, badges);
|
149
|
-
|
150
|
-
var renderAdBlock = !!adBlock && /*#__PURE__*/_react["default"].createElement("div", {
|
118
|
+
var renderAdBlock = !!adBlock && /*#__PURE__*/React.createElement("div", {
|
151
119
|
className: cn('ad-block', [classes.adBlock])
|
152
120
|
}, adBlock);
|
153
|
-
|
154
|
-
var renderContent = /*#__PURE__*/_react["default"].createElement("div", {
|
121
|
+
var renderContent = /*#__PURE__*/React.createElement("div", {
|
155
122
|
className: cn('content')
|
156
|
-
}, /*#__PURE__*/
|
123
|
+
}, /*#__PURE__*/React.createElement("div", {
|
157
124
|
className: cn('badges-container', [classes.badgesContainer])
|
158
|
-
}, renderBadges, renderAdBlock), !!title && /*#__PURE__*/
|
125
|
+
}, renderBadges, renderAdBlock), !!title && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
159
126
|
className: cn('title', [classes.title]),
|
160
127
|
color: "inherit",
|
161
128
|
as: isMobile ? headerLevelMobile : headerLevel
|
162
|
-
}, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/
|
129
|
+
}, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
163
130
|
className: cn('description', [classes.description]),
|
164
131
|
as: "h5",
|
165
132
|
color: "inherit"
|
166
|
-
}, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/
|
133
|
+
}, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/React.createElement("div", {
|
167
134
|
className: cn('cost', [classes.cost])
|
168
|
-
}, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!
|
135
|
+
}, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!React.Children.count(children) && /*#__PURE__*/React.createElement("div", {
|
169
136
|
className: cn('children', [classes.children])
|
170
137
|
}, children));
|
171
|
-
|
172
|
-
var renderImage = /*#__PURE__*/_react["default"].createElement("picture", {
|
138
|
+
var renderImage = /*#__PURE__*/React.createElement("picture", {
|
173
139
|
className: cn('picture', {
|
174
140
|
'v-align': imageVerticalAlign
|
175
141
|
})
|
176
|
-
}, /*#__PURE__*/
|
142
|
+
}, /*#__PURE__*/React.createElement("source", {
|
177
143
|
className: classes.imageSource,
|
178
144
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
|
179
145
|
srcSet: "".concat(imageDesktop, ", ").concat(imageDesktop2x, " 2x")
|
180
|
-
}), /*#__PURE__*/
|
146
|
+
}), /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
|
181
147
|
className: cn('image', [classes.image]),
|
182
148
|
src: imageMobile || imageMobile2x,
|
183
149
|
srcSet: imageMobile2x ? "".concat(imageMobile2x, " 2x") : undefined,
|
184
150
|
alt: imageAlt
|
185
151
|
})));
|
186
|
-
|
187
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
152
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
188
153
|
className: cn({
|
189
154
|
'background-color': backgroundColor,
|
190
155
|
'text-color': navTheme,
|
@@ -196,46 +161,4 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
196
161
|
ref: rootRef
|
197
162
|
}), renderContent, hasImage && renderImage);
|
198
163
|
};
|
199
|
-
|
200
|
-
ImageBanner.propTypes = {
|
201
|
-
dataAttrs: PropTypes.shape({
|
202
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
203
|
-
image: PropTypes.objectOf(PropTypes.string.isRequired)
|
204
|
-
}),
|
205
|
-
className: PropTypes.string,
|
206
|
-
classes: PropTypes.shape({
|
207
|
-
root: PropTypes.string,
|
208
|
-
image: PropTypes.string,
|
209
|
-
imageSource: PropTypes.string,
|
210
|
-
title: PropTypes.string,
|
211
|
-
description: PropTypes.string,
|
212
|
-
cost: PropTypes.string,
|
213
|
-
badgesContainer: PropTypes.string,
|
214
|
-
badges: PropTypes.string,
|
215
|
-
badge: PropTypes.string,
|
216
|
-
adBlock: PropTypes.string,
|
217
|
-
children: PropTypes.string
|
218
|
-
}),
|
219
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
220
|
-
current: PropTypes.elementType
|
221
|
-
}), PropTypes.any])]),
|
222
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
223
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
224
|
-
cost: PropTypes.string,
|
225
|
-
headerLevelMobile: PropTypes.oneOf(['h1', 'h2']),
|
226
|
-
headerLevel: PropTypes.oneOf(['h1', 'h2']),
|
227
|
-
backgroundColor: PropTypes.oneOf(Object.values(BackgroundColor)),
|
228
|
-
radius: PropTypes.oneOf(Object.values(Radius)),
|
229
|
-
imageMobile: PropTypes.string,
|
230
|
-
imageMobile2x: PropTypes.string,
|
231
|
-
imageDesktop: PropTypes.string,
|
232
|
-
imageDesktop2x: PropTypes.string,
|
233
|
-
imageAlt: PropTypes.string,
|
234
|
-
imageVerticalAlign: PropTypes.oneOf(Object.values(ImageVerticalAlign)),
|
235
|
-
autoHeight: PropTypes.bool,
|
236
|
-
isImageFullWidth: PropTypes.bool,
|
237
|
-
badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
|
238
|
-
adBlock: PropTypes.element
|
239
|
-
};
|
240
|
-
var _default = ImageBanner;
|
241
|
-
exports["default"] = _default;
|
164
|
+
var _default = exports["default"] = ImageBanner;
|