@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,105 @@
|
|
|
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"] = exports.ImageScaling = exports.ButtonTypes = exports.ButtonTarget = exports.ButtonColor = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _uiCore = require("@megafon/ui-core");
|
|
11
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
var ButtonColor = exports.ButtonColor = {
|
|
16
|
+
GREEN: 'green',
|
|
17
|
+
PURPLE: 'purple'
|
|
18
|
+
};
|
|
19
|
+
var ButtonTypes = exports.ButtonTypes = {
|
|
20
|
+
PRIMARY: 'primary',
|
|
21
|
+
OUTLINE: 'outline'
|
|
22
|
+
};
|
|
23
|
+
var ButtonTarget = exports.ButtonTarget = {
|
|
24
|
+
SELF: '_self',
|
|
25
|
+
BLANK: '_blank'
|
|
26
|
+
};
|
|
27
|
+
var ImageScaling = exports.ImageScaling = {
|
|
28
|
+
COVER: 'cover',
|
|
29
|
+
CONTAIN: 'contain'
|
|
30
|
+
};
|
|
31
|
+
var getMediaStyle = function getMediaStyle(imageUrl) {
|
|
32
|
+
return imageUrl ? {
|
|
33
|
+
backgroundImage: "url(".concat(imageUrl, ")")
|
|
34
|
+
} : undefined;
|
|
35
|
+
};
|
|
36
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-button-banner');
|
|
37
|
+
var testIdPrefix = 'ButtonBanner';
|
|
38
|
+
var ButtonBanner = function ButtonBanner(_ref) {
|
|
39
|
+
var dataAttrs = _ref.dataAttrs,
|
|
40
|
+
className = _ref.className,
|
|
41
|
+
_ref$classes = _ref.classes,
|
|
42
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
43
|
+
rootRef = _ref.rootRef,
|
|
44
|
+
title = _ref.title,
|
|
45
|
+
text = _ref.text,
|
|
46
|
+
_ref$imageUrl = _ref.imageUrl,
|
|
47
|
+
imageUrl = _ref$imageUrl === void 0 ? '' : _ref$imageUrl,
|
|
48
|
+
buttonText = _ref.buttonText,
|
|
49
|
+
buttonUrl = _ref.buttonUrl,
|
|
50
|
+
buttonDownload = _ref.buttonDownload,
|
|
51
|
+
_ref$buttonTarget = _ref.buttonTarget,
|
|
52
|
+
buttonTarget = _ref$buttonTarget === void 0 ? '_self' : _ref$buttonTarget,
|
|
53
|
+
_ref$buttonColor = _ref.buttonColor,
|
|
54
|
+
buttonColor = _ref$buttonColor === void 0 ? 'green' : _ref$buttonColor,
|
|
55
|
+
_ref$buttonType = _ref.buttonType,
|
|
56
|
+
buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
|
|
57
|
+
buttonRel = _ref.buttonRel,
|
|
58
|
+
_ref$imageScaling = _ref.imageScaling,
|
|
59
|
+
imageScaling = _ref$imageScaling === void 0 ? 'cover' : _ref$imageScaling,
|
|
60
|
+
onButtonClick = _ref.onButtonClick;
|
|
61
|
+
var buttonElem = /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
62
|
+
dataAttrs: {
|
|
63
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
64
|
+
},
|
|
65
|
+
className: cn('button', [classes.button]),
|
|
66
|
+
href: buttonUrl,
|
|
67
|
+
rel: buttonRel,
|
|
68
|
+
target: buttonTarget,
|
|
69
|
+
theme: buttonColor,
|
|
70
|
+
type: buttonType,
|
|
71
|
+
onClick: onButtonClick,
|
|
72
|
+
download: buttonDownload
|
|
73
|
+
}, buttonText);
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
75
|
+
className: cn({
|
|
76
|
+
image: !!imageUrl,
|
|
77
|
+
scaling: imageScaling
|
|
78
|
+
}, [className, classes.root]),
|
|
79
|
+
ref: rootRef
|
|
80
|
+
}), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
|
81
|
+
guttersLeft: "medium"
|
|
82
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
|
83
|
+
all: "6",
|
|
84
|
+
mobile: "12",
|
|
85
|
+
leftOffsetTablet: "1",
|
|
86
|
+
leftOffsetDesktop: "1",
|
|
87
|
+
leftOffsetWide: "1"
|
|
88
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: cn('content'),
|
|
90
|
+
"data-testid": "".concat(testIdPrefix, "-content")
|
|
91
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
92
|
+
className: cn('header'),
|
|
93
|
+
as: "h2"
|
|
94
|
+
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: cn('text')
|
|
96
|
+
}, typeof text === 'string' ? (0, _uiHelpers.convert)(text, _uiHelpers.textConvertConfig) : text), !!imageUrl && buttonElem)), /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
|
97
|
+
all: "5",
|
|
98
|
+
mobile: "12"
|
|
99
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: cn('media'),
|
|
101
|
+
style: getMediaStyle(imageUrl),
|
|
102
|
+
"data-testid": "".concat(testIdPrefix, "-media")
|
|
103
|
+
}, !imageUrl && buttonElem))));
|
|
104
|
+
};
|
|
105
|
+
var _default = exports["default"] = ButtonBanner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-button-link-box{font-family:inherit;font-size:15px;font-weight:400;line-height:24px}.mfui-button-link-box__row:not(:last-child){margin-bottom:32px}.mfui-button-link-box_h-align_center{text-align:center}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './ButtonLinkBox.scss';
|
|
3
|
+
export interface IButtonLinkBoxProps {
|
|
4
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
5
|
+
dataAttrs?: {
|
|
6
|
+
root?: Record<string, string>;
|
|
7
|
+
link?: Record<string, string>;
|
|
8
|
+
button?: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
/** Дополнительный класс корневого элемента */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
|
13
|
+
classes?: {
|
|
14
|
+
root?: string;
|
|
15
|
+
button?: string;
|
|
16
|
+
link?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Ссылка на корневой элемент */
|
|
19
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
20
|
+
/** Заголовок кнопки */
|
|
21
|
+
buttonTitle?: string;
|
|
22
|
+
/** Ссылка кнопки */
|
|
23
|
+
buttonUrl?: string;
|
|
24
|
+
/** Добавляет атрибут download для тега <a> компонента Button */
|
|
25
|
+
buttonDownload?: boolean;
|
|
26
|
+
/** Цвет кнопки */
|
|
27
|
+
buttonColor?: 'green' | 'purple' | 'green-soft' | 'purple-soft' | 'black';
|
|
28
|
+
/** Тип кнопки */
|
|
29
|
+
buttonType?: 'primary' | 'outline';
|
|
30
|
+
/** Target свойство кнопки */
|
|
31
|
+
buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
|
|
32
|
+
/** Rel - атрибут тега <a> для кнопки */
|
|
33
|
+
buttonRel?: string;
|
|
34
|
+
/** Заголовок ссылки */
|
|
35
|
+
linkTitle?: string;
|
|
36
|
+
/** Добавляет атрибут download для тега <a> компонента Button */
|
|
37
|
+
linkUrl?: string;
|
|
38
|
+
/** Target свойство ссылки */
|
|
39
|
+
linkTarget?: '_self' | '_blank' | '_parent' | '_top';
|
|
40
|
+
/** Rel - атрибут тега <a> для ссылки */
|
|
41
|
+
linkRel?: string;
|
|
42
|
+
/** Добавляет атрибут download к свойству тега <a> */
|
|
43
|
+
linkDownload?: boolean;
|
|
44
|
+
/** Горизонтальное выравнивание */
|
|
45
|
+
align?: 'center' | 'left';
|
|
46
|
+
/** Обработчик клика по кнопке */
|
|
47
|
+
onButtonClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
48
|
+
/** Обработчик клика по ссылке */
|
|
49
|
+
onLinkClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
50
|
+
}
|
|
51
|
+
declare const ButtonLinkBox: React.FC<IButtonLinkBoxProps>;
|
|
52
|
+
export default ButtonLinkBox;
|
|
@@ -0,0 +1,74 @@
|
|
|
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.string.link.js");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _uiCore = require("@megafon/ui-core");
|
|
12
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
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 cn = (0, _uiHelpers.cnCreate)('mfui-button-link-box');
|
|
17
|
+
var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
18
|
+
var dataAttrs = _ref.dataAttrs,
|
|
19
|
+
rootRef = _ref.rootRef,
|
|
20
|
+
buttonTitle = _ref.buttonTitle,
|
|
21
|
+
buttonUrl = _ref.buttonUrl,
|
|
22
|
+
buttonDownload = _ref.buttonDownload,
|
|
23
|
+
_ref$buttonColor = _ref.buttonColor,
|
|
24
|
+
buttonColor = _ref$buttonColor === void 0 ? 'green' : _ref$buttonColor,
|
|
25
|
+
_ref$buttonType = _ref.buttonType,
|
|
26
|
+
buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
|
|
27
|
+
buttonRel = _ref.buttonRel,
|
|
28
|
+
linkTitle = _ref.linkTitle,
|
|
29
|
+
linkUrl = _ref.linkUrl,
|
|
30
|
+
linkDownload = _ref.linkDownload,
|
|
31
|
+
linkRel = _ref.linkRel,
|
|
32
|
+
align = _ref.align,
|
|
33
|
+
className = _ref.className,
|
|
34
|
+
buttonTarget = _ref.buttonTarget,
|
|
35
|
+
linkTarget = _ref.linkTarget,
|
|
36
|
+
_ref$classes = _ref.classes,
|
|
37
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
38
|
+
onButtonClick = _ref.onButtonClick,
|
|
39
|
+
onLinkClick = _ref.onLinkClick;
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
41
|
+
className: cn({
|
|
42
|
+
'h-align': align
|
|
43
|
+
}, [className, classes.root]),
|
|
44
|
+
ref: rootRef
|
|
45
|
+
}), buttonTitle && /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: cn('row')
|
|
47
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
48
|
+
dataAttrs: {
|
|
49
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
50
|
+
},
|
|
51
|
+
className: classes.button,
|
|
52
|
+
href: buttonUrl,
|
|
53
|
+
theme: buttonColor,
|
|
54
|
+
type: buttonType,
|
|
55
|
+
onClick: onButtonClick,
|
|
56
|
+
target: buttonTarget,
|
|
57
|
+
download: buttonDownload,
|
|
58
|
+
rel: buttonRel
|
|
59
|
+
}, buttonTitle)), linkTitle && /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: cn('row')
|
|
61
|
+
}, /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
|
62
|
+
dataAttrs: {
|
|
63
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
|
64
|
+
},
|
|
65
|
+
className: classes.link,
|
|
66
|
+
href: linkUrl,
|
|
67
|
+
download: linkDownload,
|
|
68
|
+
underlineVisibility: "always",
|
|
69
|
+
target: linkTarget,
|
|
70
|
+
rel: linkRel,
|
|
71
|
+
onClick: onLinkClick
|
|
72
|
+
}, linkTitle)));
|
|
73
|
+
};
|
|
74
|
+
var _default = exports["default"] = ButtonLinkBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-buttons-box{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-buttons-box__buttons_equal-width{display:grid;gap:20px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}@media screen and (max-width:767px){.mfui-buttons-box__buttons_equal-width{grid-template-rows:repeat(2,1fr)}}@media screen and (min-width:768px){.mfui-buttons-box__buttons_equal-width{grid-template-columns:repeat(2,1fr)}}.mfui-buttons-box_h-align_center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './ButtonsBox.scss';
|
|
3
|
+
export type ButtonType = {
|
|
4
|
+
/** Тип */
|
|
5
|
+
type?: 'primary' | 'outline';
|
|
6
|
+
/** Иконка */
|
|
7
|
+
icon?: React.JSX.Element;
|
|
8
|
+
/** Название */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Ссылка */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** Target свойство кнопки */
|
|
13
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
14
|
+
/** Rel - атрибут тега <a> */
|
|
15
|
+
rel?: string;
|
|
16
|
+
/** Задает атрибут download для тега <a> */
|
|
17
|
+
download?: boolean;
|
|
18
|
+
/** Показать стелку */
|
|
19
|
+
showArrow?: boolean;
|
|
20
|
+
/** Обработчик клика */
|
|
21
|
+
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
22
|
+
};
|
|
23
|
+
export interface IButtonsBox {
|
|
24
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
25
|
+
dataAttrs?: {
|
|
26
|
+
root?: Record<string, string>;
|
|
27
|
+
button?: Record<string, string>;
|
|
28
|
+
extraButton?: Record<string, string>;
|
|
29
|
+
};
|
|
30
|
+
/** Дополнительный класс корневого элемента */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Дополнительные классы для внутренних элементов */
|
|
33
|
+
classes?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
button?: string;
|
|
36
|
+
extraButton?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Кнопка */
|
|
39
|
+
button: ButtonType;
|
|
40
|
+
/** Дополнительная кнопка */
|
|
41
|
+
extraButton?: ButtonType;
|
|
42
|
+
/** Горизонтальное выравнивание */
|
|
43
|
+
align?: 'center' | 'left';
|
|
44
|
+
/** Ссылка на корневой элемент */
|
|
45
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
|
46
|
+
}
|
|
47
|
+
declare const ButtonsBox: React.FC<IButtonsBox>;
|
|
48
|
+
export default ButtonsBox;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _uiCore = require("@megafon/ui-core");
|
|
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 cn = (0, _uiHelpers.cnCreate)('mfui-buttons-box');
|
|
17
|
+
var ButtonsBox = function ButtonsBox(_ref) {
|
|
18
|
+
var className = _ref.className,
|
|
19
|
+
_ref$classes = _ref.classes,
|
|
20
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
21
|
+
dataAttrs = _ref.dataAttrs,
|
|
22
|
+
button = _ref.button,
|
|
23
|
+
extraButton = _ref.extraButton,
|
|
24
|
+
align = _ref.align,
|
|
25
|
+
rootRef = _ref.rootRef;
|
|
26
|
+
var showTwoButtons = !!button && !!extraButton;
|
|
27
|
+
var renderButton = function renderButton(btnProps, btnClassName, dataAttr) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
29
|
+
dataAttrs: {
|
|
30
|
+
root: dataAttr
|
|
31
|
+
},
|
|
32
|
+
className: btnClassName,
|
|
33
|
+
fullWidth: showTwoButtons,
|
|
34
|
+
type: btnProps.type,
|
|
35
|
+
theme: "green",
|
|
36
|
+
icon: btnProps.icon,
|
|
37
|
+
href: btnProps.href,
|
|
38
|
+
target: btnProps.target,
|
|
39
|
+
download: btnProps.download,
|
|
40
|
+
showArrow: btnProps.showArrow,
|
|
41
|
+
rel: (0, _setRelAttribute.setRelAttribute)(btnProps.rel, btnProps.target),
|
|
42
|
+
onClick: btnProps.onClick
|
|
43
|
+
}, btnProps.title);
|
|
44
|
+
};
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
46
|
+
className: cn({
|
|
47
|
+
'h-align': align
|
|
48
|
+
}, [className, classes.root]),
|
|
49
|
+
ref: rootRef
|
|
50
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: cn('buttons', {
|
|
52
|
+
'equal-width': showTwoButtons
|
|
53
|
+
})
|
|
54
|
+
}, !!button && renderButton(button, classes.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button), !!extraButton && renderButton(extraButton, classes.extraButton, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.extraButton)));
|
|
55
|
+
};
|
|
56
|
+
var _default = exports["default"] = ButtonsBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-card{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:15px;font-weight:400;line-height:24px;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:24px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);-ms-flex-direction:column;flex-direction:column;padding:16px 16px 24px;text-decoration:none!important;-webkit-transition:background-color .3s,.3s,-webkit-box-shadow;transition:background-color .3s,.3s,-webkit-box-shadow;transition:background-color .3s,box-shadow,.3s;transition:background-color .3s,box-shadow,.3s,-webkit-box-shadow}@media screen and (min-width:1280px){.mfui-card{padding:24px 24px 32px}}.mfui-card_full-height{height:100%}.mfui-card_link{cursor:pointer}.mfui-card_view_shadow{-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.mfui-card_link.mfui-card_view_hover-shadow:hover,.mfui-card_link.mfui-card_view_shadow:hover{-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-card_view_background{background-color:var(--spbSky0)}.mfui-card_link.mfui-card_view_background:hover{background-color:var(--spbSky1)}.mfui-card_only-title{padding:24px}@media screen and (min-width:1280px){.mfui-card_only-title{padding:32px}}.mfui-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-card__icon{height:40px;margin-bottom:32px;width:40px}.mfui-card__img-box{border-radius:24px;overflow:hidden;padding-bottom:56.25%;position:relative}.mfui-card__img-box_position_top{margin:-6px -6px 24px}@media screen and (min-width:1280px){.mfui-card__img-box_position_top{margin:-12px -12px 32px}}.mfui-card__img-box_position_bottom{margin:24px -6px 0}@media screen and (min-width:1280px){.mfui-card__img-box_position_bottom{margin:32px -12px 0}}.mfui-card__img{height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;width:100%}.mfui-card_link:hover .mfui-card__img{-webkit-transform:scale(1.2);transform:scale(1.2)}.mfui-card__marker-list{list-style-type:none;margin:16px 0 0;padding:0}.mfui-card__marker-item{padding-left:20px;position:relative}.mfui-card__marker-item:not(:last-child){margin-bottom:12px}.mfui-card__marker-item:before{background-color:var(--spbSky2);border-radius:50%;content:"";height:6px;left:0;opacity:.8;position:absolute;top:7px;width:6px}.mfui-card__marker-note{display:block;font-weight:500;margin:4px 0 0;padding:0}.mfui-card__texts{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-top:16px}.mfui-card__texts ol,.mfui-card__texts ul{margin:0;padding-left:24px}.mfui-card__texts ol{list-style-type:decimal}.mfui-card__texts ul{list-style-type:disc}.mfui-card__texts-item_center .mfui-card__texts-desc,.mfui-card__texts-item_center .mfui-card__texts-title{text-align:center}.mfui-card__texts-title{font-weight:500}.mfui-card__features{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-top:16px;overflow:hidden}.mfui-card__features-list{list-style:none;margin:0;padding:0}.mfui-card__features-item{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-card__features-item:before{background-image:radial-gradient(circle,var(--spbSky3) 1px,transparent 1px);background-size:6px 2px;bottom:.4em;content:"";height:2px;position:absolute;width:100%}.mfui-card__features-item-value{-ms-flex-negative:0;flex-shrink:0;text-align:end}.mfui-card__features-item-text{background-color:var(--base);position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;z-index:1}.mfui-card_view_background .mfui-card__features-item-text{background-color:var(--spbSky0)}.mfui-card_link.mfui-card_view_background:hover .mfui-card__features-item-text{background-color:var(--spbSky1)}.mfui-card__features-item-title .mfui-card__features-item-text{padding-right:4px}.mfui-card__features-item-value .mfui-card__features-item-text{padding-left:4px}.mfui-card__icons{margin-top:16px}.mfui-card__icons-desc{margin-bottom:12px}.mfui-card__icons-list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.mfui-card__icons-item,.mfui-card__icons-list{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-card__icons-item-icon{-ms-flex-negative:0;flex-shrink:0;height:32px;margin-right:8px;width:32px}.mfui-card__icons-item-text{margin-top:4px}.mfui-card__price{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-ms-flex-pack:center;border-top:1px solid var(--spbSky1);justify-content:center;margin-top:24px;padding-top:24px}@media screen and (min-width:1280px){.mfui-card__price{margin-top:32px}}.mfui-card__img-box+.mfui-card__price{border:none;padding-top:0}.mfui-card__price-old-value{color:var(--spbSky3);position:relative}.mfui-card__price-old-value:before{background-color:var(--fury);content:"";height:1px;left:-1px;position:absolute;right:-1px;top:50%}.mfui-card__price-value{font-size:22px;font-weight:600;letter-spacing:.5px;line-height:28px}@media screen and (min-width:768px) and (max-width:1023px){.mfui-card__price-value{font-size:26px;line-height:32px}}@media screen and (min-width:1024px){.mfui-card__price-value{font-size:28px;line-height:36px}}@media screen and (min-width:1280px){.mfui-card__price-value{font-size:32px;line-height:40px}}.mfui-card__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;margin-top:32px}.mfui-card__price+.mfui-card__buttons{margin-top:24px}.mfui-card__buttons_centered{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-card__button{-ms-flex-preferred-size:190px;flex-basis:190px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;max-width:320px}.mfui-card__footer{margin-top:auto}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './Card.scss';
|
|
3
|
+
import { ExtraButtonType, FeaturesList, IconsList, Image, Link, MainButtonType, MarkerList, Price, TextsList, Title } from './types';
|
|
4
|
+
export interface ICard {
|
|
5
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
6
|
+
dataAttrs?: {
|
|
7
|
+
root?: Record<string, string>;
|
|
8
|
+
icon?: Record<string, string>;
|
|
9
|
+
imgBox?: Record<string, string>;
|
|
10
|
+
button?: Record<string, string>;
|
|
11
|
+
extraButton?: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
/** Дополнительный класс для компонента */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Дополнительные классы для внутренних элементов */
|
|
16
|
+
classes?: {
|
|
17
|
+
root?: string;
|
|
18
|
+
button?: string;
|
|
19
|
+
extraButton?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Ссылка на корневой элемент */
|
|
22
|
+
rootRef?: React.Ref<HTMLDivElement | HTMLAnchorElement>;
|
|
23
|
+
isFullHeight?: boolean;
|
|
24
|
+
isCenteredText?: boolean;
|
|
25
|
+
/** Вид */
|
|
26
|
+
view?: 'shadow' | 'hover-shadow' | 'background';
|
|
27
|
+
/** Ссылка для карточки */
|
|
28
|
+
link?: Link;
|
|
29
|
+
/** Изображение */
|
|
30
|
+
image?: Image;
|
|
31
|
+
/** Иконка */
|
|
32
|
+
icon?: React.ReactNode;
|
|
33
|
+
/** Заголовок */
|
|
34
|
+
title: Title;
|
|
35
|
+
/** Маркированный список */
|
|
36
|
+
markerList?: MarkerList;
|
|
37
|
+
/** Список текстов */
|
|
38
|
+
textsList?: TextsList;
|
|
39
|
+
/** Список характеристик */
|
|
40
|
+
featuresList?: FeaturesList;
|
|
41
|
+
/** Список иконок */
|
|
42
|
+
iconsList?: IconsList;
|
|
43
|
+
/** Цена */
|
|
44
|
+
price?: Price;
|
|
45
|
+
/** Кнопка */
|
|
46
|
+
button?: MainButtonType;
|
|
47
|
+
/** Дополнительная кнопка */
|
|
48
|
+
extraButton?: ExtraButtonType;
|
|
49
|
+
/** Бейдж */
|
|
50
|
+
badge?: React.ReactElement;
|
|
51
|
+
/** Обработчик клика по карточке */
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
}
|
|
54
|
+
declare const Card: React.FC<ICard>;
|
|
55
|
+
export default Card;
|
|
@@ -0,0 +1,238 @@
|
|
|
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.map.js");
|
|
10
|
+
require("core-js/modules/es.string.link.js");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _uiCore = require("@megafon/ui-core");
|
|
13
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
var textsConvertConfig = (0, _extends2["default"])((0, _extends2["default"])({}, _uiHelpers.textConvertConfig), {
|
|
18
|
+
ul: {
|
|
19
|
+
component: function component(_ref) {
|
|
20
|
+
var children = _ref.children;
|
|
21
|
+
return /*#__PURE__*/React.createElement("ul", null, children);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
ol: {
|
|
25
|
+
component: function component(_ref2) {
|
|
26
|
+
var children = _ref2.children;
|
|
27
|
+
return /*#__PURE__*/React.createElement("ol", null, children);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
li: {
|
|
31
|
+
component: function component(_ref3) {
|
|
32
|
+
var children = _ref3.children;
|
|
33
|
+
return /*#__PURE__*/React.createElement("li", null, children);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
p: {
|
|
37
|
+
component: function component(_ref4) {
|
|
38
|
+
var children = _ref4.children;
|
|
39
|
+
return /*#__PURE__*/React.createElement("p", null, children);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-card');
|
|
44
|
+
var Card = function Card(_ref5) {
|
|
45
|
+
var dataAttrs = _ref5.dataAttrs,
|
|
46
|
+
className = _ref5.className,
|
|
47
|
+
classes = _ref5.classes,
|
|
48
|
+
rootRef = _ref5.rootRef,
|
|
49
|
+
_ref5$isFullHeight = _ref5.isFullHeight,
|
|
50
|
+
isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
|
|
51
|
+
_ref5$isCenteredText = _ref5.isCenteredText,
|
|
52
|
+
isCenteredText = _ref5$isCenteredText === void 0 ? false : _ref5$isCenteredText,
|
|
53
|
+
link = _ref5.link,
|
|
54
|
+
_ref5$view = _ref5.view,
|
|
55
|
+
view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
|
|
56
|
+
image = _ref5.image,
|
|
57
|
+
icon = _ref5.icon,
|
|
58
|
+
title = _ref5.title,
|
|
59
|
+
markerList = _ref5.markerList,
|
|
60
|
+
textsList = _ref5.textsList,
|
|
61
|
+
featuresList = _ref5.featuresList,
|
|
62
|
+
iconsList = _ref5.iconsList,
|
|
63
|
+
price = _ref5.price,
|
|
64
|
+
button = _ref5.button,
|
|
65
|
+
extraButton = _ref5.extraButton,
|
|
66
|
+
badge = _ref5.badge,
|
|
67
|
+
onClick = _ref5.onClick;
|
|
68
|
+
var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
|
|
69
|
+
var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
|
|
70
|
+
var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
|
|
71
|
+
var ElementType = isLink ? 'a' : 'div';
|
|
72
|
+
var renderImage = function renderImage() {
|
|
73
|
+
if (!image) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
var _image$position = image.position,
|
|
77
|
+
position = _image$position === void 0 ? 'top' : _image$position,
|
|
78
|
+
src = image.src,
|
|
79
|
+
alt = image.alt;
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
|
|
81
|
+
className: cn('img-box', {
|
|
82
|
+
position: position
|
|
83
|
+
})
|
|
84
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
85
|
+
className: cn('img'),
|
|
86
|
+
src: src,
|
|
87
|
+
alt: alt
|
|
88
|
+
}));
|
|
89
|
+
};
|
|
90
|
+
var renderIcon = function renderIcon() {
|
|
91
|
+
if (!icon) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
|
|
95
|
+
className: cn('icon')
|
|
96
|
+
}), icon);
|
|
97
|
+
};
|
|
98
|
+
var renderContent = function renderContent() {
|
|
99
|
+
if (markerList) {
|
|
100
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
101
|
+
className: cn('marker-list')
|
|
102
|
+
}, markerList.map(function (item, i) {
|
|
103
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
104
|
+
className: cn('marker-item'),
|
|
105
|
+
key: i
|
|
106
|
+
}, (0, _uiHelpers.convert)(item.title, {}), !!item.note && /*#__PURE__*/React.createElement("span", {
|
|
107
|
+
className: cn('marker-note')
|
|
108
|
+
}, (0, _uiHelpers.convert)(item.note, {})));
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
if (textsList) {
|
|
112
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: cn('texts')
|
|
114
|
+
}, textsList.map(function (item, i) {
|
|
115
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
116
|
+
className: cn('texts-item', {
|
|
117
|
+
center: isCenteredText
|
|
118
|
+
}),
|
|
119
|
+
key: i
|
|
120
|
+
}, !!item.title && /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: cn('texts-title')
|
|
122
|
+
}, (0, _uiHelpers.convert)(item.title, textsConvertConfig)), /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: cn('texts-desc')
|
|
124
|
+
}, (0, _uiHelpers.convert)(item.desc, textsConvertConfig)));
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
if (featuresList) {
|
|
128
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: cn('features')
|
|
130
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
131
|
+
className: cn('features-list')
|
|
132
|
+
}, featuresList.items.map(function (item, i) {
|
|
133
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
134
|
+
className: cn('features-item'),
|
|
135
|
+
key: i
|
|
136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: cn('features-item-title')
|
|
138
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
139
|
+
className: cn('features-item-text')
|
|
140
|
+
}, item.title)), /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: cn('features-item-value')
|
|
142
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
143
|
+
className: cn('features-item-text')
|
|
144
|
+
}, item.value)));
|
|
145
|
+
})), featuresList.desc);
|
|
146
|
+
}
|
|
147
|
+
if (iconsList) {
|
|
148
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: cn('icons')
|
|
150
|
+
}, !!iconsList.desc && /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
className: cn('icons-desc')
|
|
152
|
+
}, iconsList.desc), /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
className: cn('icons-list')
|
|
154
|
+
}, iconsList.items.map(function (item, i) {
|
|
155
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
156
|
+
className: cn('icons-item'),
|
|
157
|
+
key: i
|
|
158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: cn('icons-item-icon')
|
|
160
|
+
}, item.icon), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: cn('icons-item-text')
|
|
162
|
+
}, item.text));
|
|
163
|
+
})));
|
|
164
|
+
}
|
|
165
|
+
return null;
|
|
166
|
+
};
|
|
167
|
+
var renderPrice = function renderPrice() {
|
|
168
|
+
if (!price) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
172
|
+
className: cn('price')
|
|
173
|
+
}, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
|
|
174
|
+
className: cn('price-old-value')
|
|
175
|
+
}, price.oldValue), /*#__PURE__*/React.createElement("div", {
|
|
176
|
+
className: cn('price-value')
|
|
177
|
+
}, price.value), !!price.period && /*#__PURE__*/React.createElement("div", {
|
|
178
|
+
className: cn('price-period')
|
|
179
|
+
}, price.period));
|
|
180
|
+
};
|
|
181
|
+
var renderButtons = function renderButtons() {
|
|
182
|
+
if (!button && !extraButton) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
var extraButtonType = (button === null || button === void 0 ? void 0 : button.type) === 'outline' ? 'text' : extraButton === null || extraButton === void 0 ? void 0 : extraButton.type;
|
|
186
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
187
|
+
className: cn('buttons', {
|
|
188
|
+
centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
|
|
189
|
+
})
|
|
190
|
+
}, !!button && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
191
|
+
dataAttrs: {
|
|
192
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
193
|
+
},
|
|
194
|
+
className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.button]),
|
|
195
|
+
href: button.href,
|
|
196
|
+
target: button.target,
|
|
197
|
+
type: button.type || 'primary',
|
|
198
|
+
theme: button.theme || 'green',
|
|
199
|
+
onClick: button === null || button === void 0 ? void 0 : button.onClick
|
|
200
|
+
}, button.title), !!extraButton && /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
201
|
+
dataAttrs: {
|
|
202
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.extraButton
|
|
203
|
+
},
|
|
204
|
+
className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.extraButton]),
|
|
205
|
+
href: extraButton.href,
|
|
206
|
+
target: extraButton.target,
|
|
207
|
+
type: extraButtonType || 'outline',
|
|
208
|
+
onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
|
|
209
|
+
}, extraButton.title));
|
|
210
|
+
};
|
|
211
|
+
var renderFooter = function renderFooter() {
|
|
212
|
+
if (!price && !button && !extraButton && !image) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: cn('footer')
|
|
217
|
+
}, isBottomImage && renderImage(), renderPrice(), renderButtons());
|
|
218
|
+
};
|
|
219
|
+
return /*#__PURE__*/React.createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
220
|
+
className: cn({
|
|
221
|
+
'only-title': isOnlyTitle,
|
|
222
|
+
view: view,
|
|
223
|
+
link: isLink,
|
|
224
|
+
'full-height': isFullHeight
|
|
225
|
+
}, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
|
|
226
|
+
href: isLink ? link === null || link === void 0 ? void 0 : link.href : undefined,
|
|
227
|
+
target: isLink ? link === null || link === void 0 ? void 0 : link.target : undefined,
|
|
228
|
+
onClick: isLink ? onClick : undefined,
|
|
229
|
+
ref: rootRef
|
|
230
|
+
}), renderIcon(), !isBottomImage && renderImage(), /*#__PURE__*/React.createElement("div", {
|
|
231
|
+
className: cn('header')
|
|
232
|
+
}, /*#__PURE__*/React.createElement(_uiCore.Header, {
|
|
233
|
+
className: cn('title'),
|
|
234
|
+
as: "h3",
|
|
235
|
+
align: title.align
|
|
236
|
+
}, title.text), badge), renderContent(), renderFooter());
|
|
237
|
+
};
|
|
238
|
+
var _default = exports["default"] = Card;
|