@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,6 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
2
|
import SwiperCore from 'swiper';
|
3
|
-
import './Instructions.
|
3
|
+
import './Instructions.scss';
|
4
4
|
export declare const pictureAlignTypes: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly RIGHT: "right";
|
@@ -34,13 +34,13 @@ export declare const elementOrderTypes: {
|
|
34
34
|
readonly DEFAULT: "default";
|
35
35
|
readonly REVERSED: "reversed";
|
36
36
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
export
|
37
|
+
type PictureAlignTypesType = (typeof pictureAlignTypes)[keyof typeof pictureAlignTypes];
|
38
|
+
type PictureVerticalAlignTypesType = (typeof pictureVerticalAlignTypes)[keyof typeof pictureVerticalAlignTypes];
|
39
|
+
type PictureMaskTypesType = (typeof pictureMaskTypes)[keyof typeof pictureMaskTypes];
|
40
|
+
type PictureBackgroundColorsType = (typeof pictureBackgroundColorTypes)[keyof typeof pictureBackgroundColorTypes];
|
41
|
+
type ArrowThemeType = (typeof arrowTheme)[keyof typeof arrowTheme];
|
42
|
+
type ElementOrderType = (typeof elementOrderTypes)[keyof typeof elementOrderTypes];
|
43
|
+
export type InstructionItemType = {
|
44
44
|
title: string | React.ReactNode | React.ReactNode[];
|
45
45
|
mediaUrl: string;
|
46
46
|
isVideo: boolean;
|
@@ -62,7 +62,7 @@ export interface IInstructionsProps {
|
|
62
62
|
arrowNext?: Record<string, string>;
|
63
63
|
};
|
64
64
|
/** Ссылка на корневой элемент */
|
65
|
-
rootRef?: Ref<HTMLDivElement>;
|
65
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
66
66
|
/** Дополнительные классы для внутренних элементов */
|
67
67
|
classes?: {
|
68
68
|
instructionItem?: string;
|
@@ -101,5 +101,5 @@ export interface IInstructionsProps {
|
|
101
101
|
/** Ref на swiper */
|
102
102
|
getSwiper?: (instance: SwiperCore) => void;
|
103
103
|
}
|
104
|
-
declare const Instructions: React.FC<IInstructionsProps
|
104
|
+
declare const Instructions: React.FC<React.PropsWithChildren<IInstructionsProps>>;
|
105
105
|
export default Instructions;
|
@@ -1,43 +1,43 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
6
|
-
exports
|
7
|
-
|
7
|
+
exports.pictureVerticalAlignTypes = exports.pictureMaskTypes = exports.pictureBackgroundColorTypes = exports.pictureAlignTypes = exports.elementOrderTypes = exports["default"] = exports.arrowTheme = void 0;
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
10
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
|
12
10
|
require("core-js/modules/es.array.map.js");
|
13
|
-
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
15
|
-
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
16
12
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var
|
21
|
-
|
22
|
-
var _react2 = require("swiper/react");
|
23
|
-
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
25
|
-
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
26
17
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
27
|
-
|
28
18
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
29
|
-
|
19
|
+
|
20
|
+
var Swiper = null;
|
21
|
+
var SwiperSlide = null;
|
22
|
+
try {
|
23
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
24
|
+
var SwiperAll = require('swiper/react');
|
25
|
+
Swiper = SwiperAll.Swiper;
|
26
|
+
SwiperSlide = SwiperAll.SwiperSlide;
|
27
|
+
} catch (e) {
|
28
|
+
// eslint-disable-next-line no-console
|
29
|
+
console.warn("\n WARNING: megafon/ui-share is using the latest version of swiper. \n For more information about server-side rendering\n please check the Instructions component documentation at:\n https://ui.megafon.ru/components/instructions\n ");
|
30
|
+
}
|
31
|
+
var pictureAlignTypes = exports.pictureAlignTypes = {
|
30
32
|
LEFT: 'left',
|
31
33
|
RIGHT: 'right'
|
32
34
|
};
|
33
|
-
exports.
|
34
|
-
var pictureVerticalAlignTypes = {
|
35
|
+
var pictureVerticalAlignTypes = exports.pictureVerticalAlignTypes = {
|
35
36
|
CENTER: 'center',
|
36
37
|
TOP: 'top',
|
37
38
|
UNSET: 'unset'
|
38
39
|
};
|
39
|
-
exports.
|
40
|
-
var pictureMaskTypes = {
|
40
|
+
var pictureMaskTypes = exports.pictureMaskTypes = {
|
41
41
|
ANDROID: 'android',
|
42
42
|
ANDROID_CROPPED: 'android-cropped',
|
43
43
|
NEW_IPHONE: 'new-iphone',
|
@@ -50,115 +50,97 @@ var pictureMaskTypes = {
|
|
50
50
|
IPHONE_CROPPED: 'iphone-cropped',
|
51
51
|
NONE: 'none'
|
52
52
|
};
|
53
|
-
exports.
|
54
|
-
var pictureBackgroundColorTypes = {
|
53
|
+
var pictureBackgroundColorTypes = exports.pictureBackgroundColorTypes = {
|
55
54
|
SPB_SKY_0: 'spbSky0'
|
56
55
|
};
|
57
|
-
exports.
|
58
|
-
var arrowTheme = {
|
56
|
+
var arrowTheme = exports.arrowTheme = {
|
59
57
|
PURPLE: 'purple',
|
60
58
|
DARK: 'dark'
|
61
59
|
};
|
62
|
-
exports.
|
63
|
-
var elementOrderTypes = {
|
60
|
+
var elementOrderTypes = exports.elementOrderTypes = {
|
64
61
|
DEFAULT: 'default',
|
65
62
|
REVERSED: 'reversed'
|
66
63
|
};
|
67
|
-
exports.elementOrderTypes = elementOrderTypes;
|
68
64
|
var testIdPrefix = 'Instructions';
|
69
65
|
var cn = (0, _uiHelpers.cnCreate)('mfui-instructions');
|
70
66
|
var swiperSlideCn = cn('slide');
|
71
|
-
|
72
67
|
var Instructions = function Instructions(_ref) {
|
73
68
|
var dataAttrs = _ref.dataAttrs,
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
-
|
113
|
-
|
114
|
-
slideIndex = _React$useState4[0],
|
115
|
-
setSlideIndex = _React$useState4[1];
|
116
|
-
|
69
|
+
rootRef = _ref.rootRef,
|
70
|
+
_ref$classes = _ref.classes,
|
71
|
+
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
72
|
+
instructionItem = _ref$classes2.instructionItem,
|
73
|
+
desktopInstructionItem = _ref$classes2.desktopInstructionItem,
|
74
|
+
mobileInstructionItem = _ref$classes2.mobileInstructionItem,
|
75
|
+
activeInstructionItem = _ref$classes2.activeInstructionItem,
|
76
|
+
desktopItemTitle = _ref$classes2.desktopItemTitle,
|
77
|
+
mobileItemTitle = _ref$classes2.mobileItemTitle,
|
78
|
+
instructionItemImg = _ref$classes2.instructionItemImg,
|
79
|
+
additionalText = _ref$classes2.additionalText,
|
80
|
+
arrowPrev = _ref$classes2.arrowPrev,
|
81
|
+
arrowNext = _ref$classes2.arrowNext,
|
82
|
+
_ref$title = _ref.title,
|
83
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
84
|
+
instructionItems = _ref.instructionItems,
|
85
|
+
_ref$pictureAlign = _ref.pictureAlign,
|
86
|
+
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
87
|
+
_ref$pictureVerticalA = _ref.pictureVerticalAlign,
|
88
|
+
pictureVerticalAlign = _ref$pictureVerticalA === void 0 ? 'center' : _ref$pictureVerticalA,
|
89
|
+
_ref$pictureMask = _ref.pictureMask,
|
90
|
+
pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
|
91
|
+
pictureBackgroundColor = _ref.pictureBackgroundColor,
|
92
|
+
getSwiper = _ref.getSwiper,
|
93
|
+
text = _ref.additionalText,
|
94
|
+
showArrows = _ref.showArrows,
|
95
|
+
_ref$arrowsTheme = _ref.arrowsTheme,
|
96
|
+
arrowsTheme = _ref$arrowsTheme === void 0 ? arrowTheme.DARK : _ref$arrowsTheme,
|
97
|
+
_ref$elementOrder = _ref.elementOrder,
|
98
|
+
elementOrder = _ref$elementOrder === void 0 ? 'default' : _ref$elementOrder,
|
99
|
+
showMobileNumeration = _ref.showMobileNumeration,
|
100
|
+
children = _ref.children;
|
101
|
+
var _React$useState = React.useState(),
|
102
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
103
|
+
swiperInstance = _React$useState2[0],
|
104
|
+
setSwiperInstance = _React$useState2[1];
|
105
|
+
var _React$useState3 = React.useState(0),
|
106
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
107
|
+
slideIndex = _React$useState4[0],
|
108
|
+
setSlideIndex = _React$useState4[1];
|
117
109
|
var isMobileReversed = elementOrder === 'reversed';
|
118
|
-
|
119
|
-
var getSwiperInstance = _react["default"].useCallback(function (swiper) {
|
110
|
+
var getSwiperInstance = React.useCallback(function (swiper) {
|
120
111
|
setSwiperInstance(swiper);
|
121
112
|
getSwiper && getSwiper(swiper);
|
122
113
|
}, [getSwiper]);
|
123
|
-
|
124
|
-
var getActiveCustomClass = _react["default"].useCallback(function (articleIndex, activeIndex) {
|
114
|
+
var getActiveCustomClass = React.useCallback(function (articleIndex, activeIndex) {
|
125
115
|
if (articleIndex !== activeIndex) {
|
126
116
|
return undefined;
|
127
117
|
}
|
128
|
-
|
129
118
|
return activeInstructionItem;
|
130
119
|
}, [activeInstructionItem]);
|
131
|
-
|
132
|
-
var handleArticleClick = _react["default"].useCallback(function (ind) {
|
120
|
+
var handleArticleClick = React.useCallback(function (ind) {
|
133
121
|
return function () {
|
134
122
|
setSlideIndex(ind);
|
135
123
|
swiperInstance && swiperInstance.slideTo(ind);
|
136
124
|
};
|
137
125
|
}, [swiperInstance]);
|
138
|
-
|
139
|
-
var handleSlideChange = _react["default"].useCallback(function (_ref2) {
|
126
|
+
var handleSlideChange = React.useCallback(function (_ref2) {
|
140
127
|
var activeIndex = _ref2.activeIndex;
|
141
128
|
setSlideIndex(activeIndex);
|
142
129
|
}, []);
|
143
|
-
|
144
|
-
var handlePrevClick = _react["default"].useCallback(function () {
|
130
|
+
var handlePrevClick = React.useCallback(function () {
|
145
131
|
if (!swiperInstance) {
|
146
132
|
return;
|
147
133
|
}
|
148
|
-
|
149
134
|
swiperInstance.slidePrev();
|
150
135
|
}, [swiperInstance]);
|
151
|
-
|
152
|
-
var handleNextClick = _react["default"].useCallback(function () {
|
136
|
+
var handleNextClick = React.useCallback(function () {
|
153
137
|
if (!swiperInstance) {
|
154
138
|
return;
|
155
139
|
}
|
156
|
-
|
157
140
|
swiperInstance.slideNext();
|
158
141
|
}, [swiperInstance]);
|
159
|
-
|
160
|
-
|
161
|
-
return /*#__PURE__*/_react["default"].createElement("video", (0, _extends2["default"])({
|
142
|
+
var renderVideo = React.useCallback(function (mediaUrl, index) {
|
143
|
+
return /*#__PURE__*/React.createElement("video", (0, _extends2["default"])({
|
162
144
|
loop: true,
|
163
145
|
muted: true,
|
164
146
|
autoPlay: true,
|
@@ -166,20 +148,19 @@ var Instructions = function Instructions(_ref) {
|
|
166
148
|
className: cn('swiper-img', {
|
167
149
|
video: true
|
168
150
|
})
|
169
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/
|
151
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/React.createElement("source", {
|
170
152
|
src: mediaUrl,
|
171
153
|
type: "video/mp4"
|
172
154
|
}));
|
173
155
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
|
174
|
-
|
175
|
-
|
176
|
-
return /*#__PURE__*/_react["default"].createElement("ul", {
|
156
|
+
var renderMobileDots = React.useCallback(function () {
|
157
|
+
return /*#__PURE__*/React.createElement("ul", {
|
177
158
|
className: cn('articles-dots', {
|
178
159
|
reversed: isMobileReversed
|
179
160
|
}),
|
180
161
|
"data-testid": "".concat(testIdPrefix, "-articles-dots-mobile")
|
181
162
|
}, instructionItems.map(function (_item, i) {
|
182
|
-
return /*#__PURE__*/
|
163
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
183
164
|
key: i,
|
184
165
|
className: cn('articles-dot', {
|
185
166
|
active: slideIndex === i
|
@@ -188,9 +169,11 @@ var Instructions = function Instructions(_ref) {
|
|
188
169
|
}));
|
189
170
|
}));
|
190
171
|
}, [instructionItems, dataAttrs, slideIndex, instructionItem, mobileInstructionItem, getActiveCustomClass, handleArticleClick, isMobileReversed]);
|
191
|
-
|
192
|
-
|
193
|
-
|
172
|
+
var renderSlider = React.useCallback(function () {
|
173
|
+
if (!Swiper || !SwiperSlide) {
|
174
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
175
|
+
}
|
176
|
+
return /*#__PURE__*/React.createElement(Swiper, {
|
194
177
|
noSwiping: false,
|
195
178
|
onSwiper: getSwiperInstance,
|
196
179
|
noSwipingClass: swiperSlideCn,
|
@@ -198,12 +181,12 @@ var Instructions = function Instructions(_ref) {
|
|
198
181
|
className: cn('swiper')
|
199
182
|
}, instructionItems.map(function (_ref3, i) {
|
200
183
|
var mediaUrl = _ref3.mediaUrl,
|
201
|
-
|
202
|
-
|
203
|
-
return /*#__PURE__*/
|
184
|
+
isVideo = _ref3.isVideo,
|
185
|
+
imageAlt = _ref3.imageAlt;
|
186
|
+
return /*#__PURE__*/React.createElement(SwiperSlide, {
|
204
187
|
className: swiperSlideCn,
|
205
188
|
key: i + mediaUrl
|
206
|
-
}, isVideo ? renderVideo(mediaUrl, i) : /*#__PURE__*/
|
189
|
+
}, isVideo ? renderVideo(mediaUrl, i) : /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({
|
207
190
|
alt: imageAlt,
|
208
191
|
src: mediaUrl
|
209
192
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, i + 1), {
|
@@ -211,57 +194,51 @@ var Instructions = function Instructions(_ref) {
|
|
211
194
|
})));
|
212
195
|
}));
|
213
196
|
}, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, handleSlideChange]);
|
214
|
-
|
215
|
-
|
216
|
-
return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
197
|
+
var renderTitle = React.useCallback(function (resolution) {
|
198
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
217
199
|
className: cn('title', {
|
218
200
|
resolution: resolution
|
219
201
|
}),
|
220
202
|
as: "h2"
|
221
203
|
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig));
|
222
204
|
}, [title]);
|
223
|
-
|
224
|
-
|
225
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, instructionItems.map(function (_ref4, i) {
|
205
|
+
var renderQrCode = React.useCallback(function () {
|
206
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, instructionItems.map(function (_ref4, i) {
|
226
207
|
var qrCode = _ref4.qrCode,
|
227
|
-
|
228
|
-
return slideIndex === i && !!qrCode && /*#__PURE__*/
|
208
|
+
qrCodeText = _ref4.qrCodeText;
|
209
|
+
return slideIndex === i && !!qrCode && /*#__PURE__*/React.createElement(_uiCore.Tile, {
|
229
210
|
className: cn('qr-code'),
|
230
211
|
radius: "rounded",
|
231
212
|
shadowLevel: "default",
|
232
213
|
key: qrCode
|
233
|
-
}, !!qrCodeText && /*#__PURE__*/
|
214
|
+
}, !!qrCodeText && /*#__PURE__*/React.createElement("div", {
|
234
215
|
className: cn('qr-code-text')
|
235
|
-
}, qrCodeText), /*#__PURE__*/
|
216
|
+
}, qrCodeText), /*#__PURE__*/React.createElement("img", {
|
236
217
|
src: qrCode,
|
237
218
|
className: cn('qr-code-image'),
|
238
219
|
alt: "QR-\u043A\u043E\u0434"
|
239
220
|
}));
|
240
221
|
}));
|
241
222
|
}, [instructionItems, slideIndex]);
|
242
|
-
|
243
|
-
|
244
|
-
return /*#__PURE__*/_react["default"].createElement(_uiCore.Paragraph, {
|
223
|
+
var renderText = React.useCallback(function () {
|
224
|
+
return /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
245
225
|
className: cn('text', [additionalText]),
|
246
226
|
hasMargin: false
|
247
227
|
}, (0, _uiHelpers.convert)(text, _uiHelpers.textConvertConfig));
|
248
228
|
}, [text, additionalText]);
|
249
|
-
|
250
|
-
var renderPicture = _react["default"].useCallback(function () {
|
229
|
+
var renderPicture = React.useCallback(function () {
|
251
230
|
if (pictureMask === pictureMaskTypes.NONE) {
|
252
231
|
return renderSlider();
|
253
232
|
}
|
254
|
-
|
255
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
233
|
+
return /*#__PURE__*/React.createElement("div", {
|
256
234
|
className: cn('img-wrapper'),
|
257
235
|
"data-testid": "".concat(testIdPrefix, "-img-wrapper")
|
258
|
-
}, /*#__PURE__*/
|
236
|
+
}, /*#__PURE__*/React.createElement("div", {
|
259
237
|
className: cn('device-screen')
|
260
238
|
}), renderSlider());
|
261
239
|
}, [pictureMask, renderSlider]);
|
262
|
-
|
263
|
-
|
264
|
-
return /*#__PURE__*/_react["default"].createElement("ul", {
|
240
|
+
var renderDesktopArticles = React.useCallback(function () {
|
241
|
+
return /*#__PURE__*/React.createElement("ul", {
|
265
242
|
className: cn('articles-list', {
|
266
243
|
'text-after': !!text,
|
267
244
|
desktop: true
|
@@ -269,54 +246,51 @@ var Instructions = function Instructions(_ref) {
|
|
269
246
|
"data-testid": "".concat(testIdPrefix, "-articles-list-desktop")
|
270
247
|
}, instructionItems.map(function (_ref5, i) {
|
271
248
|
var itemTitle = _ref5.title;
|
272
|
-
return (
|
273
|
-
/*#__PURE__*/
|
249
|
+
return /*#__PURE__*/(
|
274
250
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
275
|
-
|
251
|
+
React.createElement("li", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
276
252
|
className: cn('articles-item', {
|
277
253
|
active: slideIndex === i
|
278
254
|
}, [getActiveCustomClass(i, slideIndex), instructionItem, desktopInstructionItem]),
|
279
255
|
"data-index": i,
|
280
256
|
onClick: handleArticleClick(i),
|
281
257
|
key: i
|
282
|
-
}), /*#__PURE__*/
|
258
|
+
}), /*#__PURE__*/React.createElement("div", {
|
283
259
|
className: cn('articles-item-dot')
|
284
|
-
}, /*#__PURE__*/
|
260
|
+
}, /*#__PURE__*/React.createElement("span", {
|
285
261
|
className: cn('articles-item-dot-number')
|
286
|
-
}, i + 1)), /*#__PURE__*/
|
262
|
+
}, i + 1)), /*#__PURE__*/React.createElement("div", {
|
287
263
|
className: cn('articles-item-title', [desktopItemTitle])
|
288
264
|
}, itemTitle))
|
289
265
|
);
|
290
266
|
}));
|
291
267
|
}, [desktopInstructionItem, desktopItemTitle, getActiveCustomClass, handleArticleClick, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, instructionItem, instructionItems, slideIndex, text]);
|
292
|
-
|
293
|
-
|
294
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
268
|
+
var renderMobileArticles = React.useCallback(function () {
|
269
|
+
return /*#__PURE__*/React.createElement("div", {
|
295
270
|
className: cn('articles-list', {
|
296
271
|
mobile: true
|
297
272
|
}),
|
298
273
|
"data-testid": "".concat(testIdPrefix, "-articles-list-mobile")
|
299
|
-
}, /*#__PURE__*/
|
274
|
+
}, /*#__PURE__*/React.createElement("div", {
|
300
275
|
className: cn('articles-title-block', {
|
301
276
|
reversed: isMobileReversed,
|
302
277
|
'with-numeration': showMobileNumeration
|
303
278
|
})
|
304
279
|
}, instructionItems.map(function (_ref6, i) {
|
305
280
|
var itemTitle = _ref6.title;
|
306
|
-
return slideIndex === i && /*#__PURE__*/
|
281
|
+
return slideIndex === i && /*#__PURE__*/React.createElement("div", {
|
307
282
|
key: i,
|
308
283
|
"data-index": i,
|
309
284
|
className: cn('articles-title')
|
310
|
-
}, showMobileNumeration && /*#__PURE__*/
|
285
|
+
}, showMobileNumeration && /*#__PURE__*/React.createElement("span", {
|
311
286
|
className: cn('articles-num')
|
312
|
-
}, i + 1), /*#__PURE__*/
|
287
|
+
}, i + 1), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, i + 1), {
|
313
288
|
className: cn('articles-title-text', [mobileItemTitle])
|
314
289
|
}), itemTitle));
|
315
290
|
})));
|
316
291
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, instructionItems, mobileItemTitle, slideIndex, isMobileReversed, showMobileNumeration]);
|
317
|
-
|
318
|
-
|
319
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_uiCore.NavArrow, {
|
292
|
+
var renderArrows = React.useCallback(function () {
|
293
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_uiCore.NavArrow, {
|
320
294
|
dataAttrs: {
|
321
295
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowPrev
|
322
296
|
},
|
@@ -326,7 +300,7 @@ var Instructions = function Instructions(_ref) {
|
|
326
300
|
theme: arrowsTheme,
|
327
301
|
disabled: slideIndex === 0,
|
328
302
|
onClick: handlePrevClick
|
329
|
-
}), /*#__PURE__*/
|
303
|
+
}), /*#__PURE__*/React.createElement(_uiCore.NavArrow, {
|
330
304
|
dataAttrs: {
|
331
305
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowNext
|
332
306
|
},
|
@@ -339,74 +313,30 @@ var Instructions = function Instructions(_ref) {
|
|
339
313
|
onClick: handleNextClick
|
340
314
|
}));
|
341
315
|
}, [handlePrevClick, handleNextClick, arrowsTheme, arrowPrev, arrowNext, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowPrev, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowNext, slideIndex, instructionItems.length]);
|
342
|
-
|
343
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
316
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
344
317
|
className: cn({
|
345
318
|
mask: pictureMask,
|
346
319
|
reversed: isMobileReversed
|
347
320
|
}),
|
348
321
|
ref: rootRef
|
349
|
-
}), /*#__PURE__*/
|
322
|
+
}), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
350
323
|
hAlign: "center"
|
351
|
-
}, /*#__PURE__*/
|
324
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
352
325
|
all: "12"
|
353
|
-
}, !!title && renderTitle('mobile'), /*#__PURE__*/
|
326
|
+
}, !!title && renderTitle('mobile'), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
354
327
|
className: cn('wrapper', {
|
355
328
|
'vertical-align': pictureVerticalAlign
|
356
329
|
})
|
357
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.wrapper)), /*#__PURE__*/
|
330
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.wrapper)), /*#__PURE__*/React.createElement("div", {
|
358
331
|
className: cn('picture', {
|
359
332
|
align: pictureAlign,
|
360
333
|
background: pictureBackgroundColor
|
361
334
|
}),
|
362
335
|
"data-testid": "".concat(testIdPrefix, "-picture")
|
363
|
-
}, isMobileReversed && renderMobileArticles(), renderPicture(), !!showArrows && renderArrows(), renderQrCode()), renderMobileDots(), /*#__PURE__*/
|
336
|
+
}, isMobileReversed && renderMobileArticles(), renderPicture(), !!showArrows && renderArrows(), renderQrCode()), renderMobileDots(), /*#__PURE__*/React.createElement("div", {
|
364
337
|
className: cn('articles', {
|
365
338
|
align: pictureAlign
|
366
339
|
})
|
367
340
|
}, !!title && renderTitle('desktop'), !isMobileReversed && renderMobileArticles(), renderDesktopArticles(), text && renderText(), children)))));
|
368
341
|
};
|
369
|
-
|
370
|
-
Instructions.propTypes = {
|
371
|
-
dataAttrs: _propTypes["default"].shape({
|
372
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
373
|
-
item: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
374
|
-
image: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
375
|
-
mobileItemText: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
376
|
-
wrapper: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
377
|
-
arrowPrev: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
378
|
-
arrowNext: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
379
|
-
}),
|
380
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
381
|
-
current: _propTypes["default"].elementType
|
382
|
-
}), _propTypes["default"].any])]),
|
383
|
-
classes: _propTypes["default"].shape({
|
384
|
-
instructionItem: _propTypes["default"].string,
|
385
|
-
desktopInstructionItem: _propTypes["default"].string,
|
386
|
-
mobileInstructionItem: _propTypes["default"].string,
|
387
|
-
activeInstructionItem: _propTypes["default"].string,
|
388
|
-
desktopItemTitle: _propTypes["default"].string,
|
389
|
-
mobileItemTitle: _propTypes["default"].string,
|
390
|
-
instructionItemImg: _propTypes["default"].string,
|
391
|
-
arrowPrev: _propTypes["default"].string,
|
392
|
-
arrowNext: _propTypes["default"].string
|
393
|
-
}),
|
394
|
-
title: _propTypes["default"].string,
|
395
|
-
additionalText: _propTypes["default"].string,
|
396
|
-
instructionItems: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
397
|
-
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
398
|
-
mediaUrl: _propTypes["default"].string.isRequired,
|
399
|
-
isVideo: _propTypes["default"].bool.isRequired,
|
400
|
-
imageAlt: _propTypes["default"].string
|
401
|
-
}).isRequired).isRequired,
|
402
|
-
pictureAlign: _propTypes["default"].oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
403
|
-
pictureVerticalAlign: _propTypes["default"].oneOf([pictureVerticalAlignTypes.CENTER, pictureVerticalAlignTypes.TOP, pictureVerticalAlignTypes.UNSET]),
|
404
|
-
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.ANDROID_CROPPED, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.LAPTOP_NEW, pictureMaskTypes.IPHONE_12, pictureMaskTypes.IPHONE_15, pictureMaskTypes.IPHONE_CROPPED, pictureMaskTypes.NONE]),
|
405
|
-
pictureBackgroundColor: _propTypes["default"].oneOf([pictureBackgroundColorTypes.SPB_SKY_0]),
|
406
|
-
showArrows: _propTypes["default"].bool,
|
407
|
-
arrowsTheme: _propTypes["default"].oneOf([arrowTheme.DARK, arrowTheme.PURPLE]),
|
408
|
-
elementOrder: _propTypes["default"].oneOf([elementOrderTypes.DEFAULT, elementOrderTypes.REVERSED]),
|
409
|
-
getSwiper: _propTypes["default"].func
|
410
|
-
};
|
411
|
-
var _default = Instructions;
|
412
|
-
exports["default"] = _default;
|
342
|
+
var _default = exports["default"] = Instructions;
|
@@ -0,0 +1 @@
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-notification-box{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-notification-box:not(:first-child){margin-top:24px}.mfui-notification-box__notification{max-width:740px}.mfui-notification-box_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-notification-box_align_center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Notification } from '@megafon/ui-core';
|
3
|
-
import './
|
3
|
+
import './NotificationBox.scss';
|
4
4
|
export declare const Align: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly CENTER: "center";
|
7
7
|
};
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
type AlignType = (typeof Align)[keyof typeof Align];
|
9
|
+
type NotificationProps = React.ComponentProps<typeof Notification>;
|
10
|
+
type NotificationBoxProps = Omit<NotificationProps, 'isColored'> & {
|
11
11
|
/** Горизонтальное выравнивание */
|
12
12
|
align?: AlignType;
|
13
13
|
};
|