@megafon/ui-shared 8.14.0 → 8.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/AccordionBox/AccordionBox.css +1 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +49 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +42 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.js +107 -0
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/es/components/AudioPlayer/AudioProgress.js +96 -0
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +15 -0
- package/dist/es/components/AudioPlayer/AudioRange.js +31 -0
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/es/components/AudioPlayer/AudioVolume.js +77 -0
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.d.ts +3 -0
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +26 -0
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -0
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +25 -0
- package/dist/es/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/es/components/BannerBox/BannerBox.js +22 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +30 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +104 -0
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +10 -0
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +51 -0
- package/dist/es/components/BenefitsIcons/helpers.d.ts +8 -0
- package/dist/es/components/BenefitsIcons/helpers.js +102 -0
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -0
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -0
- package/dist/es/components/BenefitsIcons/types.d.ts +54 -0
- package/dist/es/components/BenefitsIcons/types.js +17 -0
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +27 -0
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +111 -0
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -0
- package/dist/es/components/BenefitsPictures/helpers.d.ts +11 -0
- package/dist/es/components/BenefitsPictures/helpers.js +85 -0
- package/dist/es/components/BenefitsPictures/types.d.ts +24 -0
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/BlogBox/BlogBox.css +1 -0
- package/dist/es/components/BlogBox/BlogBox.d.ts +31 -0
- package/dist/es/components/BlogBox/BlogBox.js +72 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.css +1 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +13 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.js +61 -0
- package/dist/es/components/BlogBox/types.d.ts +37 -0
- package/dist/es/components/BlogBox/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +43 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +69 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +30 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +62 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +64 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +96 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +52 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +65 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.css +1 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.d.ts +48 -0
- package/dist/es/components/ButtonsBox/ButtonsBox.js +47 -0
- package/dist/es/components/Card/Card.css +1 -0
- package/dist/es/components/Card/Card.d.ts +55 -0
- package/dist/es/components/Card/Card.js +229 -0
- package/dist/es/components/Card/types.d.ts +86 -0
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.d.ts +14 -0
- package/dist/es/components/CardsBox/CardsBox.js +26 -0
- package/dist/es/components/CardsBox/helpers.d.ts +10 -0
- package/dist/es/components/CardsBox/helpers.js +21 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +10 -0
- package/dist/es/components/CarouselBox/CarouselBox.js +45 -0
- package/dist/es/components/ChipsBox/ChipBox.d.ts +5 -0
- package/dist/es/components/ChipsBox/ChipBox.js +7 -0
- package/dist/es/components/ChipsBox/ChipsBox.css +1 -0
- package/dist/es/components/ChipsBox/ChipsBox.d.ts +16 -0
- package/dist/es/components/ChipsBox/ChipsBox.js +76 -0
- package/dist/es/components/Container/Container.css +1 -0
- package/dist/es/components/Container/Container.d.ts +41 -0
- package/dist/es/components/Container/Container.js +46 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.css +1 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.d.ts +33 -0
- package/dist/es/components/DarkGradientCards/DarkGradientCards.js +66 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.css +1 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.d.ts +16 -0
- package/dist/es/components/DarkGradientCards/components/DarkGradientCard.js +50 -0
- package/dist/es/components/DarkGradientCards/types.d.ts +20 -0
- package/dist/es/components/DarkGradientCards/types.js +1 -0
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -0
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +36 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +61 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.css +1 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +20 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.js +64 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +6 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.js +9 -0
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -0
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +94 -0
- package/dist/es/components/ImageBanner/ImageBanner.js +164 -0
- package/dist/es/components/InfoCards/InfoCards.css +1 -0
- package/dist/es/components/InfoCards/InfoCards.d.ts +24 -0
- package/dist/es/components/InfoCards/InfoCards.js +44 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.d.ts +19 -0
- package/dist/es/components/InfoCards/components/InfoCard/InfoCard.js +85 -0
- package/dist/es/components/InfoCards/types.d.ts +31 -0
- package/dist/es/components/InfoCards/types.js +1 -0
- package/dist/es/components/Instructions/Instructions.css +1 -0
- package/dist/es/components/Instructions/Instructions.d.ts +120 -0
- package/dist/es/components/Instructions/Instructions.js +362 -0
- package/dist/es/components/Instructions/img/android-new.png +0 -0
- package/dist/es/components/Instructions/img/android.png +0 -0
- package/dist/es/components/Instructions/img/blackIphone.png +0 -0
- package/dist/es/components/Instructions/img/iphone-new.png +0 -0
- package/dist/es/components/Instructions/img/iphone12.png +0 -0
- package/dist/es/components/Instructions/img/iphone15.png +0 -0
- package/dist/es/components/Instructions/img/laptop-new.png +0 -0
- package/dist/es/components/Instructions/img/laptop.png +0 -0
- package/dist/es/components/Instructions/img/newIphone.png +0 -0
- package/dist/es/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/es/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +15 -0
- package/dist/es/components/NotificationBox/NotificationBox.js +35 -0
- package/dist/es/components/NumbersBox/NumbersBox.css +1 -0
- package/dist/es/components/NumbersBox/NumbersBox.d.ts +35 -0
- package/dist/es/components/NumbersBox/NumbersBox.js +72 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.css +1 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.d.ts +16 -0
- package/dist/es/components/NumbersBox/components/NumbersCard/NumbersCard.js +28 -0
- package/dist/es/components/NumbersBox/types.d.ts +7 -0
- package/dist/es/components/NumbersBox/types.js +1 -0
- package/dist/es/components/PageTitle/PageTitle.css +1 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +36 -0
- package/dist/es/components/PageTitle/PageTitle.js +74 -0
- package/dist/es/components/Partners/Partners.css +1 -0
- package/dist/es/components/Partners/Partners.d.ts +37 -0
- package/dist/es/components/Partners/Partners.js +111 -0
- package/dist/es/components/PictureBox/PictureBox.css +1 -0
- package/dist/es/components/PictureBox/PictureBox.d.ts +48 -0
- package/dist/es/components/PictureBox/PictureBox.js +96 -0
- package/dist/es/components/PictureBox/img/mac-book-1x.png +0 -0
- package/dist/es/components/PictureBox/img/mac-book-2x.png +0 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +1 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +32 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +48 -0
- package/dist/es/components/PromoBanner/PromoBanner.d.ts +5 -0
- package/dist/es/components/PromoBanner/PromoBanner.js +26 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +82 -0
- package/dist/es/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +142 -0
- package/dist/es/components/PromoCards/PromoCards.d.ts +33 -0
- package/dist/es/components/PromoCards/PromoCards.js +61 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.css +1 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.d.ts +25 -0
- package/dist/es/components/PromoCards/components/PromoCard/PromoCard.js +175 -0
- package/dist/es/components/PromoCards/types.d.ts +62 -0
- package/dist/es/components/PromoCards/types.js +1 -0
- package/dist/es/components/Property/Property.d.ts +5 -0
- package/dist/es/components/Property/Property.js +10 -0
- package/dist/es/components/ServiceCards/ServiceCards.css +1 -0
- package/dist/es/components/ServiceCards/ServiceCards.d.ts +28 -0
- package/dist/es/components/ServiceCards/ServiceCards.js +42 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.d.ts +19 -0
- package/dist/es/components/ServiceCards/components/ServiceCard/ServiceCard.js +81 -0
- package/dist/es/components/ServiceCards/types.d.ts +26 -0
- package/dist/es/components/ServiceCards/types.js +1 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.d.ts +31 -0
- package/dist/es/components/SidePictureCards/SidePictureCards.js +69 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.d.ts +18 -0
- package/dist/es/components/SidePictureCards/components/SidePictureCard.js +94 -0
- package/dist/es/components/SidePictureCards/types.d.ts +48 -0
- package/dist/es/components/SidePictureCards/types.js +1 -0
- package/dist/es/components/Stepper/Stepper.css +1 -0
- package/dist/es/components/Stepper/Stepper.d.ts +52 -0
- package/dist/es/components/Stepper/Stepper.js +159 -0
- package/dist/es/components/Stepper/StepperItem.css +1 -0
- package/dist/es/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/es/components/Stepper/StepperItem.js +99 -0
- package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/es/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/es/components/Stepper/img/separator.png +0 -0
- package/dist/es/components/Steps/Steps.css +1 -0
- package/dist/es/components/Steps/Steps.d.ts +21 -0
- package/dist/es/components/Steps/Steps.js +32 -0
- package/dist/es/components/Steps/StepsItem.css +1 -0
- package/dist/es/components/Steps/StepsItem.d.ts +10 -0
- package/dist/es/components/Steps/StepsItem.js +21 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +1 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +101 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +200 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.css +1 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +36 -0
- package/dist/es/components/StoreButton/StoreButton.js +60 -0
- package/dist/es/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/galaxy-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/mi-store.png +0 -0
- package/dist/es/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/ru-store.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/es/components/Table/Table.css +1 -0
- package/dist/es/components/Table/Table.d.ts +18 -0
- package/dist/es/components/Table/Table.js +127 -0
- package/dist/es/components/Table/TableCell.d.ts +6 -0
- package/dist/es/components/Table/TableCell.js +6 -0
- package/dist/es/components/Table/TableRow.d.ts +11 -0
- package/dist/es/components/Table/TableRow.js +7 -0
- package/dist/es/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/es/components/TabsBox/TabBox.js +2 -0
- package/dist/es/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/es/components/TabsBox/TabsBox.js +24 -0
- package/dist/es/components/TextBox/TextBox.css +1 -0
- package/dist/es/components/TextBox/TextBox.d.ts +17 -0
- package/dist/es/components/TextBox/TextBox.js +43 -0
- package/dist/es/components/TextBox/TextBoxPicture.css +1 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +21 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +30 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.css +1 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +21 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.js +41 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +1 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +25 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +40 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +22 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +60 -0
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +112 -0
- package/dist/es/components/VideoBanner/VideoBanner.js +245 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -0
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +63 -0
- package/dist/es/components/VideoBlock/VideoBlock.js +230 -0
- package/dist/es/constants/throttleTime.d.ts +4 -0
- package/dist/es/constants/throttleTime.js +3 -0
- package/dist/es/helpers/getColumnConfig.d.ts +6 -0
- package/dist/es/helpers/getColumnConfig.js +10 -0
- package/dist/es/helpers/setRelAttribute.d.ts +3 -0
- package/dist/es/helpers/setRelAttribute.js +9 -0
- package/dist/es/hooks/useResolutions.d.ts +8 -0
- package/dist/es/hooks/useResolutions.js +62 -0
- package/dist/es/index.d.ts +67 -0
- package/dist/es/index.js +67 -0
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +49 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +51 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +116 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.js +102 -0
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +15 -0
- package/dist/lib/components/AudioPlayer/AudioRange.js +37 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.js +83 -0
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.d.ts +3 -0
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +33 -0
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -0
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +31 -0
- package/dist/lib/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/lib/components/BannerBox/BannerBox.js +31 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +30 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +113 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +10 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +60 -0
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +8 -0
- package/dist/lib/components/BenefitsIcons/helpers.js +108 -0
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -0
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -0
- package/dist/lib/components/BenefitsIcons/types.d.ts +54 -0
- package/dist/lib/components/BenefitsIcons/types.js +23 -0
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +27 -0
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +120 -0
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -0
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +11 -0
- package/dist/lib/components/BenefitsPictures/helpers.js +91 -0
- package/dist/lib/components/BenefitsPictures/types.d.ts +24 -0
- package/dist/lib/components/BenefitsPictures/types.js +5 -0
- package/dist/lib/components/BlogBox/BlogBox.css +1 -0
- package/dist/lib/components/BlogBox/BlogBox.d.ts +31 -0
- package/dist/lib/components/BlogBox/BlogBox.js +81 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.css +1 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +13 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.js +70 -0
- package/dist/lib/components/BlogBox/types.d.ts +37 -0
- package/dist/lib/components/BlogBox/types.js +5 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +43 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +78 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +1 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +30 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +71 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +64 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +105 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +52 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +74 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.css +1 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.d.ts +48 -0
- package/dist/lib/components/ButtonsBox/ButtonsBox.js +56 -0
- package/dist/lib/components/Card/Card.css +1 -0
- package/dist/lib/components/Card/Card.d.ts +55 -0
- package/dist/lib/components/Card/Card.js +238 -0
- package/dist/lib/components/Card/types.d.ts +86 -0
- package/dist/lib/components/Card/types.js +5 -0
- package/dist/lib/components/CardsBox/CardsBox.d.ts +14 -0
- package/dist/lib/components/CardsBox/CardsBox.js +36 -0
- package/dist/lib/components/CardsBox/helpers.d.ts +10 -0
- package/dist/lib/components/CardsBox/helpers.js +28 -0
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +10 -0
- package/dist/lib/components/CarouselBox/CarouselBox.js +55 -0
- package/dist/lib/components/ChipsBox/ChipBox.d.ts +5 -0
- package/dist/lib/components/ChipsBox/ChipBox.js +17 -0
- package/dist/lib/components/ChipsBox/ChipsBox.css +1 -0
- package/dist/lib/components/ChipsBox/ChipsBox.d.ts +16 -0
- package/dist/lib/components/ChipsBox/ChipsBox.js +85 -0
- package/dist/lib/components/Container/Container.css +1 -0
- package/dist/lib/components/Container/Container.d.ts +41 -0
- package/dist/lib/components/Container/Container.js +54 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.css +1 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.d.ts +33 -0
- package/dist/lib/components/DarkGradientCards/DarkGradientCards.js +75 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.css +1 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.d.ts +16 -0
- package/dist/lib/components/DarkGradientCards/components/DarkGradientCard.js +59 -0
- package/dist/lib/components/DarkGradientCards/types.d.ts +20 -0
- package/dist/lib/components/DarkGradientCards/types.js +5 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +70 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +1 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +20 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +73 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +6 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +18 -0
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -0
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +94 -0
- package/dist/lib/components/ImageBanner/ImageBanner.js +173 -0
- package/dist/lib/components/InfoCards/InfoCards.css +1 -0
- package/dist/lib/components/InfoCards/InfoCards.d.ts +24 -0
- package/dist/lib/components/InfoCards/InfoCards.js +53 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.css +1 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.d.ts +19 -0
- package/dist/lib/components/InfoCards/components/InfoCard/InfoCard.js +94 -0
- package/dist/lib/components/InfoCards/types.d.ts +31 -0
- package/dist/lib/components/InfoCards/types.js +5 -0
- package/dist/lib/components/Instructions/Instructions.css +1 -0
- package/dist/lib/components/Instructions/Instructions.d.ts +120 -0
- package/dist/lib/components/Instructions/Instructions.js +371 -0
- package/dist/lib/components/Instructions/img/android-new.png +0 -0
- package/dist/lib/components/Instructions/img/android.png +0 -0
- package/dist/lib/components/Instructions/img/blackIphone.png +0 -0
- package/dist/lib/components/Instructions/img/iphone-new.png +0 -0
- package/dist/lib/components/Instructions/img/iphone12.png +0 -0
- package/dist/lib/components/Instructions/img/iphone15.png +0 -0
- package/dist/lib/components/Instructions/img/laptop-new.png +0 -0
- package/dist/lib/components/Instructions/img/laptop.png +0 -0
- package/dist/lib/components/Instructions/img/newIphone.png +0 -0
- package/dist/lib/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/lib/components/NotificationBox/NotificationBox.css +1 -0
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +15 -0
- package/dist/lib/components/NotificationBox/NotificationBox.js +44 -0
- package/dist/lib/components/NumbersBox/NumbersBox.css +1 -0
- package/dist/lib/components/NumbersBox/NumbersBox.d.ts +35 -0
- package/dist/lib/components/NumbersBox/NumbersBox.js +81 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.css +1 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.d.ts +16 -0
- package/dist/lib/components/NumbersBox/components/NumbersCard/NumbersCard.js +37 -0
- package/dist/lib/components/NumbersBox/types.d.ts +7 -0
- package/dist/lib/components/NumbersBox/types.js +5 -0
- package/dist/lib/components/PageTitle/PageTitle.css +1 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +36 -0
- package/dist/lib/components/PageTitle/PageTitle.js +83 -0
- package/dist/lib/components/Partners/Partners.css +1 -0
- package/dist/lib/components/Partners/Partners.d.ts +37 -0
- package/dist/lib/components/Partners/Partners.js +120 -0
- package/dist/lib/components/PictureBox/PictureBox.css +1 -0
- package/dist/lib/components/PictureBox/PictureBox.d.ts +48 -0
- package/dist/lib/components/PictureBox/PictureBox.js +105 -0
- package/dist/lib/components/PictureBox/img/mac-book-1x.png +0 -0
- package/dist/lib/components/PictureBox/img/mac-book-2x.png +0 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +1 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +32 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +56 -0
- package/dist/lib/components/PromoBanner/PromoBanner.d.ts +5 -0
- package/dist/lib/components/PromoBanner/PromoBanner.js +36 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.css +1 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.d.ts +82 -0
- package/dist/lib/components/PromoBanner/components/PromoBannerSlide/PromoBannerSlide.js +151 -0
- package/dist/lib/components/PromoCards/PromoCards.d.ts +33 -0
- package/dist/lib/components/PromoCards/PromoCards.js +71 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.css +1 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.d.ts +25 -0
- package/dist/lib/components/PromoCards/components/PromoCard/PromoCard.js +184 -0
- package/dist/lib/components/PromoCards/types.d.ts +62 -0
- package/dist/lib/components/PromoCards/types.js +5 -0
- package/dist/lib/components/Property/Property.d.ts +5 -0
- package/dist/lib/components/Property/Property.js +19 -0
- package/dist/lib/components/ServiceCards/ServiceCards.css +1 -0
- package/dist/lib/components/ServiceCards/ServiceCards.d.ts +28 -0
- package/dist/lib/components/ServiceCards/ServiceCards.js +51 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.css +1 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.d.ts +19 -0
- package/dist/lib/components/ServiceCards/components/ServiceCard/ServiceCard.js +90 -0
- package/dist/lib/components/ServiceCards/types.d.ts +26 -0
- package/dist/lib/components/ServiceCards/types.js +5 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.d.ts +31 -0
- package/dist/lib/components/SidePictureCards/SidePictureCards.js +79 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.css +1 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.d.ts +18 -0
- package/dist/lib/components/SidePictureCards/components/SidePictureCard.js +100 -0
- package/dist/lib/components/SidePictureCards/types.d.ts +48 -0
- package/dist/lib/components/SidePictureCards/types.js +5 -0
- package/dist/lib/components/Stepper/Stepper.css +1 -0
- package/dist/lib/components/Stepper/Stepper.d.ts +52 -0
- package/dist/lib/components/Stepper/Stepper.js +168 -0
- package/dist/lib/components/Stepper/StepperItem.css +1 -0
- package/dist/lib/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/lib/components/Stepper/StepperItem.js +108 -0
- package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/lib/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/lib/components/Stepper/img/separator.png +0 -0
- package/dist/lib/components/Steps/Steps.css +1 -0
- package/dist/lib/components/Steps/Steps.d.ts +21 -0
- package/dist/lib/components/Steps/Steps.js +40 -0
- package/dist/lib/components/Steps/StepsItem.css +1 -0
- package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
- package/dist/lib/components/Steps/StepsItem.js +29 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +1 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +101 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +209 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/iphone12.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.css +1 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +36 -0
- package/dist/lib/components/StoreButton/StoreButton.js +69 -0
- package/dist/lib/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/galaxy-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/mi-store.png +0 -0
- package/dist/lib/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/ru-store.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/lib/components/Table/Table.css +1 -0
- package/dist/lib/components/Table/Table.d.ts +18 -0
- package/dist/lib/components/Table/Table.js +136 -0
- package/dist/lib/components/Table/TableCell.d.ts +6 -0
- package/dist/lib/components/Table/TableCell.js +15 -0
- package/dist/lib/components/Table/TableRow.d.ts +11 -0
- package/dist/lib/components/Table/TableRow.js +17 -0
- package/dist/lib/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/lib/components/TabsBox/TabBox.js +8 -0
- package/dist/lib/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/lib/components/TabsBox/TabsBox.js +33 -0
- package/dist/lib/components/TextBox/TextBox.css +1 -0
- package/dist/lib/components/TextBox/TextBox.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBox.js +51 -0
- package/dist/lib/components/TextBox/TextBoxPicture.css +1 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +21 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +38 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +1 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +21 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +50 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +1 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +25 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +49 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +1 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +22 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +69 -0
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +112 -0
- package/dist/lib/components/VideoBanner/VideoBanner.js +253 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -0
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +63 -0
- package/dist/lib/components/VideoBlock/VideoBlock.js +238 -0
- package/dist/lib/constants/throttleTime.d.ts +4 -0
- package/dist/lib/constants/throttleTime.js +9 -0
- package/dist/lib/helpers/getColumnConfig.d.ts +6 -0
- package/dist/lib/helpers/getColumnConfig.js +16 -0
- package/dist/lib/helpers/setRelAttribute.d.ts +3 -0
- package/dist/lib/helpers/setRelAttribute.js +15 -0
- package/dist/lib/hooks/useResolutions.d.ts +8 -0
- package/dist/lib/hooks/useResolutions.js +69 -0
- package/dist/lib/index.d.ts +67 -0
- package/dist/lib/index.js +475 -0
- package/package.json +5 -5
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
require("core-js/modules/es.symbol.js");
|
|
10
|
+
require("core-js/modules/es.array.concat.js");
|
|
11
|
+
require("core-js/modules/es.array.index-of.js");
|
|
12
|
+
require("core-js/modules/es.array.map.js");
|
|
13
|
+
require("core-js/modules/es.string.link.js");
|
|
14
|
+
var React = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _uiCore = require("@megafon/ui-core");
|
|
16
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
17
|
+
var _setRelAttribute = require("../../../../helpers/setRelAttribute");
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
21
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
24
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
var listItemConvertConfig = {
|
|
30
|
+
b: {
|
|
31
|
+
component: function component(_ref) {
|
|
32
|
+
var children = _ref.children;
|
|
33
|
+
return /*#__PURE__*/React.createElement("b", null, children);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-promo-card');
|
|
38
|
+
var PromoCard = function PromoCard(_ref2) {
|
|
39
|
+
var title = _ref2.title,
|
|
40
|
+
subtitle = _ref2.subtitle,
|
|
41
|
+
_ref2$list = _ref2.list,
|
|
42
|
+
list = _ref2$list === void 0 ? [] : _ref2$list,
|
|
43
|
+
link = _ref2.link,
|
|
44
|
+
_ref2$background = _ref2.background,
|
|
45
|
+
background = _ref2$background === void 0 ? 'shadow' : _ref2$background,
|
|
46
|
+
image = _ref2.image,
|
|
47
|
+
logo = _ref2.logo,
|
|
48
|
+
badge = _ref2.badge,
|
|
49
|
+
_ref2$promoBadge = _ref2.promoBadge,
|
|
50
|
+
promoBadge = _ref2$promoBadge === void 0 ? null : _ref2$promoBadge,
|
|
51
|
+
_ref2$priceBadge = _ref2.priceBadge,
|
|
52
|
+
priceBadge = _ref2$priceBadge === void 0 ? null : _ref2$priceBadge,
|
|
53
|
+
_ref2$adMark = _ref2.adMark,
|
|
54
|
+
adMark = _ref2$adMark === void 0 ? null : _ref2$adMark,
|
|
55
|
+
className = _ref2.className,
|
|
56
|
+
classes = _ref2.classes,
|
|
57
|
+
dataAttrs = _ref2.dataAttrs,
|
|
58
|
+
onClick = _ref2.onClick;
|
|
59
|
+
var adTriggerRef = React.useRef(null);
|
|
60
|
+
var imageSrc = image.src,
|
|
61
|
+
imageSrc2x = image.src2x,
|
|
62
|
+
imageAlt = image.alt;
|
|
63
|
+
var linkHref = link.href,
|
|
64
|
+
_link$target = link.target,
|
|
65
|
+
linkTarget = _link$target === void 0 ? '_self' : _link$target,
|
|
66
|
+
linkRel = link.rel,
|
|
67
|
+
linkTitle = link.title;
|
|
68
|
+
var _ref3 = promoBadge || {},
|
|
69
|
+
promoBadgeText = _ref3.text,
|
|
70
|
+
promoBadgeColor = _ref3.color;
|
|
71
|
+
var _ref4 = priceBadge || {},
|
|
72
|
+
priceBadgeText = _ref4.text,
|
|
73
|
+
priceBadgeIcon = _ref4.iconType,
|
|
74
|
+
priceBadgeTheme = _ref4.theme;
|
|
75
|
+
var imageSrcSet = imageSrc2x ? "".concat(imageSrc, ", ").concat(imageSrc2x, " 2x") : undefined;
|
|
76
|
+
var hasBadge = !!promoBadgeText || !!priceBadgeText || !!badge;
|
|
77
|
+
var handleAdTitleClick = React.useCallback(function (e) {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
}, []);
|
|
81
|
+
var renderBadge = React.useMemo(function () {
|
|
82
|
+
switch (true) {
|
|
83
|
+
case !!promoBadgeText:
|
|
84
|
+
return /*#__PURE__*/React.createElement(_uiCore.PromoBadge, {
|
|
85
|
+
className: cn('badge'),
|
|
86
|
+
dataAttrs: {
|
|
87
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.badge
|
|
88
|
+
},
|
|
89
|
+
color: promoBadgeColor
|
|
90
|
+
}, promoBadgeText);
|
|
91
|
+
case !!priceBadgeText:
|
|
92
|
+
return /*#__PURE__*/React.createElement(_uiCore.PriceBadge, {
|
|
93
|
+
className: cn('badge'),
|
|
94
|
+
dataAttrs: {
|
|
95
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.badge
|
|
96
|
+
},
|
|
97
|
+
iconType: priceBadgeIcon,
|
|
98
|
+
theme: priceBadgeTheme
|
|
99
|
+
}, priceBadgeText);
|
|
100
|
+
default:
|
|
101
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.badge), {
|
|
102
|
+
className: cn('badge')
|
|
103
|
+
}), badge);
|
|
104
|
+
}
|
|
105
|
+
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.badge, promoBadgeText, promoBadgeColor, priceBadgeText, priceBadgeIcon, priceBadgeTheme, badge]);
|
|
106
|
+
var renderAdMark = function renderAdMark() {
|
|
107
|
+
var _ref5 = adMark || {},
|
|
108
|
+
adTitle = _ref5.title,
|
|
109
|
+
adTooltip = _ref5.tooltip;
|
|
110
|
+
var _a = adTooltip || {},
|
|
111
|
+
placement = _a.placement,
|
|
112
|
+
offset = _a.offset,
|
|
113
|
+
triggerEvent = _a.triggerEvent,
|
|
114
|
+
colorTheme = _a.colorTheme,
|
|
115
|
+
children = _a.children,
|
|
116
|
+
restAdTooltip = __rest(_a, ["placement", "offset", "triggerEvent", "colorTheme", "children"]);
|
|
117
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!adTitle && /*#__PURE__*/React.createElement("button", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.adTitle), {
|
|
118
|
+
className: cn('ad-title'),
|
|
119
|
+
ref: adTriggerRef,
|
|
120
|
+
onClick: handleAdTitleClick,
|
|
121
|
+
type: "button"
|
|
122
|
+
}), adTitle), !!adTooltip && /*#__PURE__*/React.createElement(_uiCore.Tooltip, (0, _extends2["default"])({
|
|
123
|
+
className: cn('ad-tooltip')
|
|
124
|
+
}, restAdTooltip, {
|
|
125
|
+
placement: placement || 'bottom',
|
|
126
|
+
offset: offset || 'small',
|
|
127
|
+
triggerEvent: triggerEvent || 'hover',
|
|
128
|
+
colorTheme: colorTheme || 'blue',
|
|
129
|
+
triggerElement: adTriggerRef
|
|
130
|
+
}), !!children && /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: cn('ad-tooltip-content')
|
|
132
|
+
}, typeof children === 'string' ? (0, _uiHelpers.convert)(children, {}) : children)));
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/React.createElement("a", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
135
|
+
className: cn({
|
|
136
|
+
background: background
|
|
137
|
+
}, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
138
|
+
href: linkHref,
|
|
139
|
+
target: linkTarget,
|
|
140
|
+
rel: (0, _setRelAttribute.setRelAttribute)(linkRel, linkTarget),
|
|
141
|
+
onClick: onClick
|
|
142
|
+
}), !!adMark && renderAdMark(), /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({
|
|
143
|
+
className: cn('image')
|
|
144
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
|
|
145
|
+
srcSet: imageSrcSet,
|
|
146
|
+
src: imageSrc,
|
|
147
|
+
alt: imageAlt || ''
|
|
148
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: cn('content')
|
|
150
|
+
}, hasBadge && renderBadge, !!(logo === null || logo === void 0 ? void 0 : logo.src) && !hasBadge && /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.logo), {
|
|
151
|
+
className: cn('logo')
|
|
152
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
153
|
+
className: cn('logo-img'),
|
|
154
|
+
src: logo.src,
|
|
155
|
+
alt: logo.alt || ''
|
|
156
|
+
})), /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
157
|
+
as: "h3",
|
|
158
|
+
className: classes === null || classes === void 0 ? void 0 : classes.title,
|
|
159
|
+
dataAttrs: {
|
|
160
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title
|
|
161
|
+
}
|
|
162
|
+
}, (0, _uiHelpers.convert)(title, {})), !!subtitle && /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: cn('subtitle')
|
|
164
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
|
165
|
+
hasMargin: false,
|
|
166
|
+
dataAttrs: {
|
|
167
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.subtitle
|
|
168
|
+
}
|
|
169
|
+
}, (0, _uiHelpers.convert)(subtitle, {}))), !!list.length && /*#__PURE__*/React.createElement("ul", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list), {
|
|
170
|
+
className: cn('list')
|
|
171
|
+
}), list.map(function (item, i) {
|
|
172
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
173
|
+
className: cn('list-item'),
|
|
174
|
+
key: i
|
|
175
|
+
}, (0, _uiHelpers.convert)(item, listItemConvertConfig));
|
|
176
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
className: cn('footer')
|
|
178
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
179
|
+
sizeAll: "small",
|
|
180
|
+
type: "text",
|
|
181
|
+
showArrow: true
|
|
182
|
+
}, linkTitle))));
|
|
183
|
+
};
|
|
184
|
+
var _default = exports["default"] = PromoCard;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { IPriceBadgeProps } from '@megafon/ui-core/dist/lib/components/Badges/PriceBadge/PriceBadge';
|
|
2
|
+
import type { IPromoBadgeProps } from '@megafon/ui-core/dist/lib/components/Badges/PromoBadge/PromoBadge';
|
|
3
|
+
import type { ITooltipProps } from '@megafon/ui-core/dist/lib/components/Tooltip/Tooltip';
|
|
4
|
+
type ImageType = {
|
|
5
|
+
src: string;
|
|
6
|
+
src2x?: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
};
|
|
9
|
+
type LogoType = {
|
|
10
|
+
src?: string;
|
|
11
|
+
alt?: string;
|
|
12
|
+
};
|
|
13
|
+
type LinkType = {
|
|
14
|
+
title: string;
|
|
15
|
+
href: string;
|
|
16
|
+
target?: '_self' | '_blank';
|
|
17
|
+
rel?: string;
|
|
18
|
+
};
|
|
19
|
+
type PromoBadgeType = {
|
|
20
|
+
text: string;
|
|
21
|
+
color: IPromoBadgeProps['color'];
|
|
22
|
+
};
|
|
23
|
+
type PriceBadgeType = {
|
|
24
|
+
text: string;
|
|
25
|
+
iconType?: IPriceBadgeProps['iconType'];
|
|
26
|
+
theme?: IPriceBadgeProps['theme'];
|
|
27
|
+
};
|
|
28
|
+
type AdMarkType = {
|
|
29
|
+
/** Заголовок */
|
|
30
|
+
title: string;
|
|
31
|
+
/** Параметры тултипа (пропсы компонента Tooltip из ui-core) */
|
|
32
|
+
tooltip: Omit<ITooltipProps, 'triggerElement'>;
|
|
33
|
+
};
|
|
34
|
+
export interface IPromoCardSettings {
|
|
35
|
+
/** Фон карточки */
|
|
36
|
+
background?: 'gray' | 'white' | 'shadow';
|
|
37
|
+
}
|
|
38
|
+
export interface IPromoCardData {
|
|
39
|
+
/** Заголовок карточки */
|
|
40
|
+
title: string;
|
|
41
|
+
/** Подзаголовок карточки */
|
|
42
|
+
subtitle?: string;
|
|
43
|
+
/** Список карточки (может принимать тег b в пунктах) */
|
|
44
|
+
list?: string[];
|
|
45
|
+
/** Параметры для ссылки в карточке */
|
|
46
|
+
link: LinkType;
|
|
47
|
+
/** Параметры для изображения в карточке */
|
|
48
|
+
image: ImageType;
|
|
49
|
+
/** Параметры для логотипа в карточке */
|
|
50
|
+
logo?: LogoType;
|
|
51
|
+
/** Бейдж в карточке */
|
|
52
|
+
badge?: React.ReactElement | null;
|
|
53
|
+
/** Параметры для отображения компонента PromoBadge в карточке */
|
|
54
|
+
promoBadge?: PromoBadgeType | null;
|
|
55
|
+
/** Параметры для отображения компонента PriceBadge в карточке */
|
|
56
|
+
priceBadge?: PriceBadgeType | null;
|
|
57
|
+
/** Рекламная метка */
|
|
58
|
+
adMark?: AdMarkType | null;
|
|
59
|
+
/** Обработчик клика по карточке */
|
|
60
|
+
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _uiCore = require("@megafon/ui-core");
|
|
10
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-property');
|
|
14
|
+
var Property = function Property(props) {
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: cn()
|
|
17
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Parameter, props));
|
|
18
|
+
};
|
|
19
|
+
var _default = exports["default"] = Property;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-service-cards__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:20px}@media screen and (min-width:768px){.mfui-service-cards__items{display:grid;grid-auto-rows:290px;grid-template-columns:repeat(2,1fr)}}@media screen and (min-width:1280px){.mfui-service-cards__items{grid-template-columns:repeat(3,1fr)}}@media screen and (min-width:768px){.mfui-service-cards__item_size_big{grid-row-end:span 2;grid-row-start:1}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ServiceCardDataType, BackgroundType } from './types';
|
|
3
|
+
import './ServiceCards.scss';
|
|
4
|
+
export interface IServiceCardsProps {
|
|
5
|
+
/** Цвет фона плиток */
|
|
6
|
+
background?: BackgroundType;
|
|
7
|
+
/** Список плиток */
|
|
8
|
+
items: [ServiceCardDataType, ServiceCardDataType, ServiceCardDataType, ServiceCardDataType, ServiceCardDataType];
|
|
9
|
+
/** Дополнительный класс для компонента */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Дополнительные классы для внутренних элементов */
|
|
12
|
+
classes?: {
|
|
13
|
+
root?: string;
|
|
14
|
+
card?: string;
|
|
15
|
+
cardTitle?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
18
|
+
dataAttrs?: {
|
|
19
|
+
root?: Record<string, string>;
|
|
20
|
+
item?: Record<string, string>;
|
|
21
|
+
card?: Record<string, string>;
|
|
22
|
+
cardTitle?: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
/** Ссылка на корневой элемент */
|
|
25
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
26
|
+
}
|
|
27
|
+
declare const ServiceCards: React.FC<IServiceCardsProps>;
|
|
28
|
+
export default ServiceCards;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
require("core-js/modules/es.array.concat.js");
|
|
10
|
+
require("core-js/modules/es.array.map.js");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
13
|
+
var _ServiceCard = _interopRequireDefault(require("./components/ServiceCard/ServiceCard"));
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-service-cards');
|
|
18
|
+
var ServiceCards = function ServiceCards(_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
classes = _ref.classes,
|
|
21
|
+
items = _ref.items,
|
|
22
|
+
background = _ref.background,
|
|
23
|
+
dataAttrs = _ref.dataAttrs,
|
|
24
|
+
rootRef = _ref.rootRef;
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
26
|
+
className: cn([className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
27
|
+
ref: rootRef
|
|
28
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: cn('items')
|
|
30
|
+
}, items.map(function (item, i) {
|
|
31
|
+
var size = i === 0 ? 'big' : 'small';
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
|
33
|
+
className: cn('item', {
|
|
34
|
+
size: size
|
|
35
|
+
}),
|
|
36
|
+
key: "".concat(item.title, "_").concat(i)
|
|
37
|
+
}), /*#__PURE__*/React.createElement(_ServiceCard["default"], (0, _extends2["default"])({}, item, {
|
|
38
|
+
background: background,
|
|
39
|
+
size: size,
|
|
40
|
+
classes: {
|
|
41
|
+
root: classes === null || classes === void 0 ? void 0 : classes.card,
|
|
42
|
+
title: classes === null || classes === void 0 ? void 0 : classes.cardTitle
|
|
43
|
+
},
|
|
44
|
+
dataAttrs: {
|
|
45
|
+
root: (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.card, i + 1),
|
|
46
|
+
title: (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.cardTitle, i + 1)
|
|
47
|
+
}
|
|
48
|
+
})));
|
|
49
|
+
})));
|
|
50
|
+
};
|
|
51
|
+
var _default = exports["default"] = ServiceCards;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-service-card{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;background-color:var(--base);border-radius:24px;color:var(--content);height:100%;justify-content:space-between;overflow:hidden;padding:24px 24px 22px;-webkit-transition:background-color,-webkit-box-shadow;transition:background-color,-webkit-box-shadow;transition:background-color,box-shadow;transition:background-color,box-shadow,-webkit-box-shadow;-webkit-transition-duration:.3s;transition-duration:.3s;width:100%}@media screen and (min-width:768px){.mfui-service-card{padding-bottom:32px}}.mfui-service-card:hover{text-decoration:none}.mfui-service-card__title{font-size:22px;font-weight:600;letter-spacing:.5px;line-height:28px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-service-card__title{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-service-card__title{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-service-card__title{font-size:32px;line-height:40px}}.mfui-service-card__subtitle{font-size:15px;font-weight:400;line-height:24px;margin-top:12px}.mfui-service-card__image-wrapper{overflow:hidden}.mfui-service-card__image{display:block;height:240px;width:240px}.mfui-service-card__circle,.mfui-service-card__price{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-service-card__circle{-webkit-box-pack:center;-ms-flex-pack:center;border:1px solid var(--brandGreen);border-radius:50%;height:48px;justify-content:center;width:48px}.mfui-service-card:hover .mfui-service-card__circle{-webkit-animation:scale-circle 1s ease-out forwards;animation:scale-circle 1s ease-out forwards;-webkit-transform-origin:center;transform-origin:center}.mfui-service-card__arrow{height:32px;min-width:32px;width:32px;fill:var(--brandGreen)}.mfui-service-card__value{font-size:15px;font-weight:500;line-height:24px;margin-left:8px}.mfui-service-card_size_big .mfui-service-card__image-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:24px;justify-content:center;margin:32px auto}@media screen and (min-width:768px){.mfui-service-card_size_big .mfui-service-card__image{height:auto;max-height:100%;max-width:100%;width:auto}}.mfui-service-card_size_small .mfui-service-card__title{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-service-card_size_small .mfui-service-card__title{font-size:20px;line-height:28px}}.mfui-service-card_size_small .mfui-service-card__subtitle{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3}.mfui-service-card_size_small .mfui-service-card__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width:767px){.mfui-service-card_size_small .mfui-service-card__footer{margin-top:20px}}.mfui-service-card_size_small .mfui-service-card__image-wrapper{margin-bottom:-22px;margin-right:-24px}@media screen and (min-width:768px){.mfui-service-card_size_small .mfui-service-card__image-wrapper{margin-bottom:-32px}}.mfui-service-card_size_small .mfui-service-card__image{height:110px;width:110px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-service-card_size_small .mfui-service-card__image{height:125px;width:125px}}@media screen and (min-width:1024px){.mfui-service-card_size_small .mfui-service-card__image{height:150px;width:150px}}@media screen and (max-width:767px){.mfui-service-card_size_small .mfui-service-card__circle{height:32px;width:32px}.mfui-service-card_size_small .mfui-service-card__arrow{height:20px;min-width:20px;width:20px}}.mfui-service-card:hover:not(.mfui-service-card_background_gray){-webkit-box-shadow:0 8px 28px rgba(0,0,0,.1);box-shadow:0 8px 28px rgba(0,0,0,.1)}.mfui-service-card_background_shadow{-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1)}.mfui-service-card_background_gray{background-color:var(--spbSky0)}.mfui-service-card_background_gray:hover{background-color:var(--spbSky1)}@-webkit-keyframes scale-circle{0%{scale:1}50%{scale:.6875}to{scale:1}}@keyframes scale-circle{0%{scale:1}50%{scale:.6875}to{scale:1}}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SizeType, ServiceCardDataType, BackgroundType } from '../../types';
|
|
3
|
+
import './ServiceCard.scss';
|
|
4
|
+
export interface IServiceCardProps extends ServiceCardDataType {
|
|
5
|
+
size: SizeType;
|
|
6
|
+
background?: BackgroundType;
|
|
7
|
+
classes?: {
|
|
8
|
+
root?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
dataAttrs?: {
|
|
12
|
+
root?: Record<string, string>;
|
|
13
|
+
title?: Record<string, string>;
|
|
14
|
+
subtitle?: Record<string, string>;
|
|
15
|
+
footer?: Record<string, string>;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare const ServiceCard: React.FC<IServiceCardProps>;
|
|
19
|
+
export default ServiceCard;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
require("core-js/modules/es.array.concat.js");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
12
|
+
var _setRelAttribute = require("../../../../helpers/setRelAttribute");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
+
var ArrowRight = function ArrowRight(props) {
|
|
17
|
+
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
18
|
+
viewBox: "0 0 32 32"
|
|
19
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M12.5 20.8l4.8-4.8-4.8-4.8 1.6-1.7 6.4 6.5-6.4 6.5z"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-service-card');
|
|
24
|
+
var ServiceCard = function ServiceCard(_ref) {
|
|
25
|
+
var title = _ref.title,
|
|
26
|
+
subtitle = _ref.subtitle,
|
|
27
|
+
value = _ref.value,
|
|
28
|
+
_ref$background = _ref.background,
|
|
29
|
+
background = _ref$background === void 0 ? 'shadow' : _ref$background,
|
|
30
|
+
_ref$size = _ref.size,
|
|
31
|
+
size = _ref$size === void 0 ? 'big' : _ref$size,
|
|
32
|
+
imageSrc = _ref.imageSrc,
|
|
33
|
+
imageSrc2x = _ref.imageSrc2x,
|
|
34
|
+
_ref$imageAlt = _ref.imageAlt,
|
|
35
|
+
imageAlt = _ref$imageAlt === void 0 ? 'image' : _ref$imageAlt,
|
|
36
|
+
href = _ref.href,
|
|
37
|
+
_ref$target = _ref.target,
|
|
38
|
+
target = _ref$target === void 0 ? '_self' : _ref$target,
|
|
39
|
+
rel = _ref.rel,
|
|
40
|
+
classes = _ref.classes,
|
|
41
|
+
dataAttrs = _ref.dataAttrs,
|
|
42
|
+
onClick = _ref.onClick;
|
|
43
|
+
var isSizeSmall = size === 'small';
|
|
44
|
+
var currentRel = (0, _setRelAttribute.setRelAttribute)(rel, target);
|
|
45
|
+
var imageSrcSet = imageSrc2x ? "".concat(imageSrc, ", ").concat(imageSrc2x, " 2x") : undefined;
|
|
46
|
+
var footerElement = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: cn('image-wrapper')
|
|
48
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
49
|
+
className: cn('image'),
|
|
50
|
+
src: imageSrc,
|
|
51
|
+
srcSet: imageSrcSet,
|
|
52
|
+
alt: imageAlt
|
|
53
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: cn('price')
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: cn('circle')
|
|
57
|
+
}, /*#__PURE__*/React.createElement(ArrowRight, {
|
|
58
|
+
className: cn('arrow')
|
|
59
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: cn('value')
|
|
61
|
+
}, value)));
|
|
62
|
+
var renderFooter = function renderFooter() {
|
|
63
|
+
if (isSizeSmall) {
|
|
64
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
65
|
+
className: cn('footer')
|
|
66
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.footer)), footerElement);
|
|
67
|
+
}
|
|
68
|
+
return footerElement;
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/React.createElement("a", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
71
|
+
className: cn({
|
|
72
|
+
background: background,
|
|
73
|
+
size: size
|
|
74
|
+
}, [classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
75
|
+
href: href,
|
|
76
|
+
target: target,
|
|
77
|
+
rel: currentRel,
|
|
78
|
+
onClick: onClick
|
|
79
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: cn('header')
|
|
81
|
+
}, /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title), {
|
|
82
|
+
className: cn('title', [classes === null || classes === void 0 ? void 0 : classes.title])
|
|
83
|
+
}), typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), subtitle && /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.subtitle), {
|
|
84
|
+
className: cn('subtitle'),
|
|
85
|
+
style: {
|
|
86
|
+
WebkitBoxOrient: 'vertical'
|
|
87
|
+
}
|
|
88
|
+
}), typeof subtitle === 'string' ? (0, _uiHelpers.convert)(subtitle, _uiHelpers.textConvertConfig) : subtitle)), renderFooter());
|
|
89
|
+
};
|
|
90
|
+
var _default = exports["default"] = ServiceCard;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TargetType = '_self' | '_blank' | '_parent' | '_top';
|
|
3
|
+
export type ServiceCardDataType = {
|
|
4
|
+
/** Заголовок */
|
|
5
|
+
title: string | React.ReactNode | ReactNode[];
|
|
6
|
+
/** Подзаголовок */
|
|
7
|
+
subtitle?: string | React.ReactNode | ReactNode[];
|
|
8
|
+
/** Значение */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Изображение */
|
|
11
|
+
imageSrc: string;
|
|
12
|
+
/** Изображение 2x */
|
|
13
|
+
imageSrc2x?: string;
|
|
14
|
+
/** Значение тега alt для изображения */
|
|
15
|
+
imageAlt?: string;
|
|
16
|
+
/** Ссылка */
|
|
17
|
+
href: string;
|
|
18
|
+
/** Атрибут ссылки target */
|
|
19
|
+
target?: TargetType;
|
|
20
|
+
/** Атрибут ссылки rel */
|
|
21
|
+
rel?: string;
|
|
22
|
+
/** Обработчик клика по кнопке */
|
|
23
|
+
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
24
|
+
};
|
|
25
|
+
export type SizeType = 'big' | 'small';
|
|
26
|
+
export type BackgroundType = 'white' | 'gray' | 'shadow';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Carousel } from '@megafon/ui-core';
|
|
3
|
+
import { BackgroundType, CardDataType } from './types';
|
|
4
|
+
type CarouselProps = React.ComponentProps<typeof Carousel>;
|
|
5
|
+
export interface ISidePictureCards {
|
|
6
|
+
/** Карточки. Минимальное количество 2 карточки */
|
|
7
|
+
items: CardDataType[];
|
|
8
|
+
/** Цвет фона карточек */
|
|
9
|
+
background?: BackgroundType;
|
|
10
|
+
/** Выстраивать карточки в карусель */
|
|
11
|
+
hasCarousel?: boolean;
|
|
12
|
+
/** Дополнительный класс для компонента */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Дополнительные классы для внутренних элементов */
|
|
15
|
+
classes?: {
|
|
16
|
+
root?: string;
|
|
17
|
+
item?: string;
|
|
18
|
+
itemTitle?: string;
|
|
19
|
+
};
|
|
20
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
21
|
+
dataAttrs?: {
|
|
22
|
+
root?: Record<string, string>;
|
|
23
|
+
item?: Record<string, string>;
|
|
24
|
+
};
|
|
25
|
+
/** Обработчик смены слайда карусели */
|
|
26
|
+
onCarouselChange?: CarouselProps['onChange'];
|
|
27
|
+
/** Ссылка на корневой элемент */
|
|
28
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
29
|
+
}
|
|
30
|
+
declare const SidePictureCards: React.FC<ISidePictureCards>;
|
|
31
|
+
export default SidePictureCards;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
require("core-js/modules/es.array.concat.js");
|
|
11
|
+
require("core-js/modules/es.array.map.js");
|
|
12
|
+
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _uiCore = require("@megafon/ui-core");
|
|
14
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
15
|
+
var _SidePictureCard = _interopRequireDefault(require("./components/SidePictureCard"));
|
|
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 slidesSettings = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _uiHelpers.breakpoints.MOBILE_SMALL_START, {
|
|
20
|
+
slidesPerView: 1,
|
|
21
|
+
spaceBetween: 16
|
|
22
|
+
}), _uiHelpers.breakpoints.MOBILE_BIG_START, {
|
|
23
|
+
slidesPerView: 2,
|
|
24
|
+
spaceBetween: 20
|
|
25
|
+
});
|
|
26
|
+
var MIN_ITEMS_COUNT = 2;
|
|
27
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-side-picture-cards');
|
|
28
|
+
var SidePictureCards = function SidePictureCards(_ref) {
|
|
29
|
+
var items = _ref.items,
|
|
30
|
+
_ref$background = _ref.background,
|
|
31
|
+
background = _ref$background === void 0 ? 'gray' : _ref$background,
|
|
32
|
+
_ref$hasCarousel = _ref.hasCarousel,
|
|
33
|
+
hasCarousel = _ref$hasCarousel === void 0 ? false : _ref$hasCarousel,
|
|
34
|
+
className = _ref.className,
|
|
35
|
+
_ref$classes = _ref.classes,
|
|
36
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
37
|
+
dataAttrs = _ref.dataAttrs,
|
|
38
|
+
onCarouselChange = _ref.onCarouselChange,
|
|
39
|
+
rootRef = _ref.rootRef;
|
|
40
|
+
if (items.length < MIN_ITEMS_COUNT) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
var renderItem = function renderItem(item, index) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(_SidePictureCard["default"], (0, _extends2["default"])({}, item, {
|
|
45
|
+
background: background,
|
|
46
|
+
key: "".concat(item === null || item === void 0 ? void 0 : item.title, "_").concat(index),
|
|
47
|
+
classes: {
|
|
48
|
+
root: classes.item,
|
|
49
|
+
title: classes.itemTitle
|
|
50
|
+
},
|
|
51
|
+
dataAttrs: {
|
|
52
|
+
root: (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, index + 1))
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
var renderContent = function renderContent() {
|
|
57
|
+
if (hasCarousel) {
|
|
58
|
+
return /*#__PURE__*/React.createElement(_uiCore.Carousel, {
|
|
59
|
+
slidesSettings: slidesSettings,
|
|
60
|
+
onChange: onCarouselChange
|
|
61
|
+
}, items.map(renderItem));
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
|
64
|
+
guttersLeft: "medium",
|
|
65
|
+
guttersBottom: "medium"
|
|
66
|
+
}, items.map(function (item, i) {
|
|
67
|
+
return /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
|
68
|
+
all: "6",
|
|
69
|
+
mobile: "12",
|
|
70
|
+
key: "".concat(item === null || item === void 0 ? void 0 : item.title, "_").concat(i)
|
|
71
|
+
}, renderItem(item, i));
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
75
|
+
className: cn([className, classes.root]),
|
|
76
|
+
ref: rootRef
|
|
77
|
+
}), renderContent());
|
|
78
|
+
};
|
|
79
|
+
var _default = exports["default"] = SidePictureCards;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-side-picture-card{background-color:var(--base);border-radius:24px;color:var(--content);display:grid;gap:20px;grid-template-columns:auto;grid-template-rows:1fr auto;min-height:100%;padding:12px;text-decoration:none;-webkit-transition:background-color,-webkit-box-shadow;transition:background-color,-webkit-box-shadow;transition:background-color,box-shadow;transition:background-color,box-shadow,-webkit-box-shadow;-webkit-transition-duration:.3s;transition-duration:.3s}@media screen and (min-width:1280px){.mfui-side-picture-card{grid-template-columns:1fr 1fr;grid-template-rows:none}}.mfui-side-picture-card:hover{text-decoration:none}.mfui-side-picture-card__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:12px}@media screen and (min-width:1280px){.mfui-side-picture-card__content{padding:12px 0 12px 12px}}.mfui-side-picture-card__title{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin-bottom:16px}@media screen and (min-width:1280px){.mfui-side-picture-card__title{margin-bottom:24px}}.mfui-side-picture-card__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;margin-bottom:auto}@media screen and (min-width:1280px){.mfui-side-picture-card__items{gap:16px}}.mfui-side-picture-card__item{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.mfui-side-picture-card__item-icon{display:block;max-height:32px;min-width:32px;width:32px}.mfui-side-picture-card__item-icon svg{display:block;height:100%;width:100%;fill:var(--brandGreen)}.mfui-side-picture-card__item-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-side-picture-card__item-text{-webkit-line-clamp:3;font-size:15px;font-weight:400}.mfui-side-picture-card__item-info,.mfui-side-picture-card__item-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;line-height:24px}.mfui-side-picture-card__item-info{-webkit-line-clamp:2;font-size:18px;font-weight:500;letter-spacing:.5px}@media screen and (min-width:1280px){.mfui-side-picture-card__item-info{font-size:20px;line-height:28px}}.mfui-side-picture-card__button{margin-top:32px}.mfui-side-picture-card__picture{height:172px;position:relative}@media screen and (min-width:768px) and (max-width:1023px){.mfui-side-picture-card__picture{height:197px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-side-picture-card__picture{height:270px}}@media screen and (min-width:1280px){.mfui-side-picture-card__picture{height:100%}}.mfui-side-picture-card__image{border-radius:24px;height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;width:100%}.mfui-side-picture-card_active:hover:not(.mfui-side-picture-card_background_gray){-webkit-box-shadow:0 8px 28px rgba(0,0,0,.1);box-shadow:0 8px 28px rgba(0,0,0,.1)}.mfui-side-picture-card_background_gray{background-color:var(--spbSky0)}.mfui-side-picture-card_background_gray.mfui-side-picture-card_active:hover{background-color:var(--spbSky1)}
|