@megafon/ui-shared 2.0.0-beta.24 → 2.0.0-beta.240
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/CHANGELOG.md +2292 -0
- package/README.md +0 -5
- package/dist/es/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +33 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +62 -0
- package/dist/es/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/es/components/BannerBox/BannerBox.js +31 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +16 -5
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +79 -14
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +3 -2
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +13 -12
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +11 -4
- package/dist/es/components/BenefitsIcons/types.d.ts +16 -7
- package/dist/es/components/BenefitsIcons/types.js +9 -7
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +12 -3
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +25 -11
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +49 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +107 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +32 -8
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +45 -10
- package/dist/es/components/Card/Card.css +130 -0
- package/dist/es/components/Card/Card.d.ts +67 -0
- package/dist/es/components/Card/Card.js +176 -0
- package/dist/es/components/CardsBox/CardsBox.d.ts +15 -0
- package/dist/es/components/CardsBox/CardsBox.js +80 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +5 -0
- package/dist/es/components/CarouselBox/CarouselBox.js +31 -0
- package/dist/es/components/Container/Container.css +2830 -0
- package/dist/es/components/Container/Container.d.ts +26 -0
- package/dist/es/components/Container/Container.js +46 -0
- package/dist/es/components/DownloadLinks/DownloadLink.css +36 -0
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +25 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +62 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.css +36 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +10 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.js +75 -0
- package/dist/es/components/Instructions/Instructions.css +489 -0
- package/dist/es/components/Instructions/Instructions.d.ts +52 -0
- package/dist/es/components/Instructions/Instructions.js +229 -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/iphone12.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/PageTitle/PageTitle.css +80 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/es/components/PageTitle/PageTitle.js +65 -0
- package/dist/es/components/Partners/Partners.css +53 -0
- package/dist/es/components/Partners/Partners.d.ts +32 -0
- package/dist/es/components/Partners/Partners.js +114 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +80 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +28 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +61 -0
- package/dist/es/components/Property/Property.css +125 -0
- package/dist/es/components/Property/Property.d.ts +33 -0
- package/dist/es/components/Property/Property.js +130 -0
- package/dist/es/components/Property/PropertyDescription.css +17 -0
- package/dist/es/components/Property/PropertyDescription.d.ts +5 -0
- package/dist/es/components/Property/PropertyDescription.js +51 -0
- package/dist/es/components/Property/types.d.ts +14 -0
- package/dist/es/components/Property/types.js +0 -0
- package/dist/es/components/Steps/Steps.css +41 -0
- package/dist/es/components/Steps/Steps.d.ts +10 -0
- package/dist/es/components/Steps/Steps.js +35 -0
- package/dist/es/components/Steps/StepsItem.css +37 -0
- package/dist/es/components/Steps/StepsItem.d.ts +10 -0
- package/dist/es/components/Steps/StepsItem.js +26 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +145 -0
- package/dist/es/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/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/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.css +15 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/es/components/StoreButton/StoreButton.js +37 -0
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/Table/Table.css +153 -0
- package/dist/es/components/Table/Table.d.ts +14 -0
- package/dist/es/components/Table/Table.js +124 -0
- package/dist/es/components/Table/TableCell.d.ts +6 -0
- package/dist/es/components/Table/TableCell.js +12 -0
- package/dist/es/components/Table/TableRow.d.ts +9 -0
- package/dist/es/components/Table/TableRow.js +13 -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 +32 -0
- package/dist/es/components/TextBox/TextBox.css +16 -0
- package/dist/es/components/TextBox/TextBox.d.ts +16 -0
- package/dist/es/components/TextBox/TextBox.js +53 -0
- package/dist/es/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +31 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +11 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +13 -7
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +33 -13
- package/dist/es/components/VideoBanner/VideoBanner.css +216 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +90 -0
- package/dist/es/components/VideoBanner/VideoBanner.js +272 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +127 -0
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +49 -0
- package/dist/es/components/VideoBlock/VideoBlock.js +147 -0
- package/dist/es/constants/throttleTime.d.ts +4 -0
- package/dist/es/constants/throttleTime.js +3 -0
- package/dist/es/index.d.ts +29 -17
- package/dist/es/index.js +30 -18
- package/dist/lib/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +33 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +80 -0
- package/dist/lib/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/lib/components/BannerBox/BannerBox.js +49 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +16 -5
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +82 -17
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +3 -2
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +14 -15
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +11 -4
- package/dist/lib/components/BenefitsIcons/types.d.ts +16 -7
- package/dist/lib/components/BenefitsIcons/types.js +11 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +12 -3
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +27 -13
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +65 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +133 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +32 -8
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +53 -13
- package/dist/lib/components/Card/Card.css +130 -0
- package/dist/lib/components/Card/Card.d.ts +67 -0
- package/dist/lib/components/Card/Card.js +199 -0
- package/dist/lib/components/CardsBox/CardsBox.d.ts +15 -0
- package/dist/lib/components/CardsBox/CardsBox.js +105 -0
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +5 -0
- package/dist/lib/components/CarouselBox/CarouselBox.js +49 -0
- package/dist/lib/components/Container/Container.css +2830 -0
- package/dist/lib/components/Container/Container.d.ts +26 -0
- package/dist/lib/components/Container/Container.js +61 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.css +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +25 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +83 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +10 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +95 -0
- package/dist/lib/components/Instructions/Instructions.css +489 -0
- package/dist/lib/components/Instructions/Instructions.d.ts +52 -0
- package/dist/lib/components/Instructions/Instructions.js +258 -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/iphone12.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/PageTitle/PageTitle.css +80 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/lib/components/PageTitle/PageTitle.js +85 -0
- package/dist/lib/components/Partners/Partners.css +53 -0
- package/dist/lib/components/Partners/Partners.d.ts +32 -0
- package/dist/lib/components/Partners/Partners.js +136 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +80 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +28 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +81 -0
- package/dist/lib/components/Property/Property.css +125 -0
- package/dist/lib/components/Property/Property.d.ts +33 -0
- package/dist/lib/components/Property/Property.js +152 -0
- package/dist/lib/components/Property/PropertyDescription.css +17 -0
- package/dist/lib/components/Property/PropertyDescription.d.ts +5 -0
- package/dist/lib/components/Property/PropertyDescription.js +71 -0
- package/dist/lib/components/Property/types.d.ts +14 -0
- package/dist/lib/components/Property/types.js +1 -0
- package/dist/lib/components/Steps/Steps.css +41 -0
- package/dist/lib/components/Steps/Steps.d.ts +10 -0
- package/dist/lib/components/Steps/Steps.js +55 -0
- package/dist/lib/components/Steps/StepsItem.css +37 -0
- package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
- package/dist/lib/components/Steps/StepsItem.js +39 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +169 -0
- package/dist/lib/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- 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/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.css +15 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/lib/components/StoreButton/StoreButton.js +58 -0
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/Table/Table.css +153 -0
- package/dist/lib/components/Table/Table.d.ts +14 -0
- package/dist/lib/components/Table/Table.js +146 -0
- package/dist/lib/components/Table/TableCell.d.ts +6 -0
- package/dist/lib/components/Table/TableCell.js +27 -0
- package/dist/lib/components/Table/TableRow.d.ts +9 -0
- package/dist/lib/components/Table/TableRow.js +28 -0
- package/dist/lib/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/lib/components/TabsBox/TabBox.js +11 -0
- package/dist/lib/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/lib/components/TabsBox/TabsBox.js +50 -0
- package/dist/lib/components/TextBox/TextBox.css +16 -0
- package/dist/lib/components/TextBox/TextBox.d.ts +16 -0
- package/dist/lib/components/TextBox/TextBox.js +70 -0
- package/dist/lib/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +48 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +11 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +13 -7
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +37 -17
- package/dist/lib/components/VideoBanner/VideoBanner.css +216 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +90 -0
- package/dist/lib/components/VideoBanner/VideoBanner.js +309 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +127 -0
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +49 -0
- package/dist/lib/components/VideoBlock/VideoBlock.js +170 -0
- package/dist/lib/constants/throttleTime.d.ts +4 -0
- package/dist/lib/constants/throttleTime.js +10 -0
- package/dist/lib/index.d.ts +29 -17
- package/dist/lib/index.js +147 -51
- package/package.json +22 -77
- package/dist/es/components/ProductCard/ProductCardFeatures.css +0 -35
- package/dist/es/components/ProductCard/ProductCardFeatures.d.ts +0 -61
- package/dist/es/components/ProductCard/ProductCardFeatures.js +0 -82
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.css +0 -41
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.d.ts +0 -22
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.js +0 -80
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.css +0 -16
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.d.ts +0 -25
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.js +0 -67
- package/dist/es/components/ProductCard/ProductCardInfo.css +0 -236
- package/dist/es/components/ProductCard/ProductCardInfo.d.ts +0 -75
- package/dist/es/components/ProductCard/ProductCardInfo.js +0 -169
- package/dist/es/components/ProductCard/ProductCardTotal.css +0 -113
- package/dist/es/components/ProductCard/ProductCardTotal.d.ts +0 -86
- package/dist/es/components/ProductCard/ProductCardTotal.js +0 -161
- package/dist/es/components/ProductCard/ProductCardWrapper.css +0 -162
- package/dist/es/components/ProductCard/ProductCardWrapper.d.ts +0 -53
- package/dist/es/components/ProductCard/ProductCardWrapper.js +0 -109
- package/dist/es/components/ProductSwitcher/ProductSwitcher.css +0 -372
- package/dist/es/components/ProductSwitcher/ProductSwitcher.d.ts +0 -86
- package/dist/es/components/ProductSwitcher/ProductSwitcher.js +0 -612
- package/dist/es/components/ProductTile/ProductTile.d.ts +0 -287
- package/dist/es/components/ProductTile/ProductTile.js +0 -497
- package/dist/es/components/ProductTile/ProductTileBuy.d.ts +0 -53
- package/dist/es/components/ProductTile/ProductTileBuy.js +0 -99
- package/dist/es/components/ProductTile/ProductTileCashback.d.ts +0 -20
- package/dist/es/components/ProductTile/ProductTileCashback.js +0 -60
- package/dist/es/components/ProductTile/ProductTileDynamic.d.ts +0 -42
- package/dist/es/components/ProductTile/ProductTileDynamic.js +0 -109
- package/dist/es/components/ProductTile/ProductTileHint.d.ts +0 -24
- package/dist/es/components/ProductTile/ProductTileHint.js +0 -67
- package/dist/es/components/ProductTile/ProductTileOptions.d.ts +0 -31
- package/dist/es/components/ProductTile/ProductTileOptions.js +0 -130
- package/dist/es/components/ProductTile/ProductTilePrice.d.ts +0 -26
- package/dist/es/components/ProductTile/ProductTilePrice.js +0 -75
- package/dist/es/components/ProductTile/ProductTileStatic.d.ts +0 -20
- package/dist/es/components/ProductTile/ProductTileStatic.js +0 -60
- package/dist/es/components/ProductTile/ProductTileValue.d.ts +0 -31
- package/dist/es/components/ProductTile/ProductTileValue.js +0 -111
- package/dist/es/components/ProductTile/style/ProductTile.css +0 -146
- package/dist/es/components/ProductTile/style/ProductTileBuy.css +0 -76
- package/dist/es/components/ProductTile/style/ProductTileCashback.css +0 -23
- package/dist/es/components/ProductTile/style/ProductTileDynamic.css +0 -38
- package/dist/es/components/ProductTile/style/ProductTileHint.css +0 -93
- package/dist/es/components/ProductTile/style/ProductTileOptions.css +0 -84
- package/dist/es/components/ProductTile/style/ProductTilePrice.css +0 -105
- package/dist/es/components/ProductTile/style/ProductTileStatic.css +0 -23
- package/dist/es/components/ProductTile/style/ProductTileValue.css +0 -58
- package/dist/es/components/ProductTileRest/ProductTileRest.css +0 -226
- package/dist/es/components/ProductTileRest/ProductTileRest.d.ts +0 -109
- package/dist/es/components/ProductTileRest/ProductTileRest.js +0 -291
- package/dist/es/constants/breakpoints.d.ts +0 -1
- package/dist/es/constants/breakpoints.js +0 -1
- package/dist/lib/components/ProductCard/ProductCardFeatures.css +0 -35
- package/dist/lib/components/ProductCard/ProductCardFeatures.d.ts +0 -61
- package/dist/lib/components/ProductCard/ProductCardFeatures.js +0 -141
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.css +0 -41
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.d.ts +0 -22
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.js +0 -140
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.css +0 -16
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.d.ts +0 -25
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.js +0 -124
- package/dist/lib/components/ProductCard/ProductCardInfo.css +0 -236
- package/dist/lib/components/ProductCard/ProductCardInfo.d.ts +0 -75
- package/dist/lib/components/ProductCard/ProductCardInfo.js +0 -241
- package/dist/lib/components/ProductCard/ProductCardTotal.css +0 -113
- package/dist/lib/components/ProductCard/ProductCardTotal.d.ts +0 -86
- package/dist/lib/components/ProductCard/ProductCardTotal.js +0 -218
- package/dist/lib/components/ProductCard/ProductCardWrapper.css +0 -162
- package/dist/lib/components/ProductCard/ProductCardWrapper.d.ts +0 -53
- package/dist/lib/components/ProductCard/ProductCardWrapper.js +0 -170
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.css +0 -372
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.d.ts +0 -86
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.js +0 -686
- package/dist/lib/components/ProductTile/ProductTile.d.ts +0 -287
- package/dist/lib/components/ProductTile/ProductTile.js +0 -590
- package/dist/lib/components/ProductTile/ProductTileBuy.d.ts +0 -53
- package/dist/lib/components/ProductTile/ProductTileBuy.js +0 -156
- package/dist/lib/components/ProductTile/ProductTileCashback.d.ts +0 -20
- package/dist/lib/components/ProductTile/ProductTileCashback.js +0 -117
- package/dist/lib/components/ProductTile/ProductTileDynamic.d.ts +0 -42
- package/dist/lib/components/ProductTile/ProductTileDynamic.js +0 -174
- package/dist/lib/components/ProductTile/ProductTileHint.d.ts +0 -24
- package/dist/lib/components/ProductTile/ProductTileHint.js +0 -124
- package/dist/lib/components/ProductTile/ProductTileOptions.d.ts +0 -31
- package/dist/lib/components/ProductTile/ProductTileOptions.js +0 -193
- package/dist/lib/components/ProductTile/ProductTilePrice.d.ts +0 -26
- package/dist/lib/components/ProductTile/ProductTilePrice.js +0 -136
- package/dist/lib/components/ProductTile/ProductTileStatic.d.ts +0 -20
- package/dist/lib/components/ProductTile/ProductTileStatic.js +0 -123
- package/dist/lib/components/ProductTile/ProductTileValue.d.ts +0 -31
- package/dist/lib/components/ProductTile/ProductTileValue.js +0 -171
- package/dist/lib/components/ProductTile/style/ProductTile.css +0 -146
- package/dist/lib/components/ProductTile/style/ProductTileBuy.css +0 -76
- package/dist/lib/components/ProductTile/style/ProductTileCashback.css +0 -23
- package/dist/lib/components/ProductTile/style/ProductTileDynamic.css +0 -38
- package/dist/lib/components/ProductTile/style/ProductTileHint.css +0 -93
- package/dist/lib/components/ProductTile/style/ProductTileOptions.css +0 -84
- package/dist/lib/components/ProductTile/style/ProductTilePrice.css +0 -105
- package/dist/lib/components/ProductTile/style/ProductTileStatic.css +0 -23
- package/dist/lib/components/ProductTile/style/ProductTileValue.css +0 -58
- package/dist/lib/components/ProductTileRest/ProductTileRest.css +0 -226
- package/dist/lib/components/ProductTileRest/ProductTileRest.d.ts +0 -109
- package/dist/lib/components/ProductTileRest/ProductTileRest.js +0 -364
- package/dist/lib/constants/breakpoints.d.ts +0 -1
- package/dist/lib/constants/breakpoints.js +0 -8
@@ -2,10 +2,6 @@
|
|
2
2
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
4
|
|
5
|
-
require("core-js/modules/es.array.map");
|
6
|
-
|
7
|
-
require("core-js/modules/es.object.values");
|
8
|
-
|
9
5
|
Object.defineProperty(exports, "__esModule", {
|
10
6
|
value: true
|
11
7
|
});
|
@@ -15,6 +11,8 @@ require("core-js/modules/es.array.map");
|
|
15
11
|
|
16
12
|
require("core-js/modules/es.object.values");
|
17
13
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
15
|
+
|
18
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
19
17
|
|
20
18
|
var React = _interopRequireWildcard(require("react"));
|
@@ -23,10 +21,16 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
24
22
|
var _uiCore = require("@megafon/ui-core");
|
25
23
|
|
24
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
25
|
+
|
26
26
|
var _BenefitsIconsTile = _interopRequireDefault(require("./BenefitsIconsTile"));
|
27
27
|
|
28
28
|
var _types = require("./types");
|
29
29
|
|
30
|
+
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
31
|
+
|
32
|
+
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
33
|
+
|
30
34
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
31
35
|
|
32
36
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -120,7 +124,19 @@ var getCenterTopConfig = function getCenterTopConfig(count, index) {
|
|
120
124
|
}
|
121
125
|
};
|
122
126
|
|
123
|
-
var
|
127
|
+
var getOneColumnConfig = function getOneColumnConfig(iconPosition) {
|
128
|
+
return iconPosition !== _types.IconPositionEnum.CENTER_TOP ? {
|
129
|
+
wide: '10',
|
130
|
+
desktop: '10',
|
131
|
+
tablet: '10'
|
132
|
+
} : {
|
133
|
+
wide: '12',
|
134
|
+
desktop: '12',
|
135
|
+
tablet: '12'
|
136
|
+
};
|
137
|
+
};
|
138
|
+
|
139
|
+
var getMultiColumnConfig = function getMultiColumnConfig(iconPosition, count, index) {
|
124
140
|
switch (iconPosition) {
|
125
141
|
case _types.IconPositionEnum.LEFT_TOP:
|
126
142
|
return getLeftTopConfig(count, index);
|
@@ -133,44 +149,93 @@ var getColumnConfig = function getColumnConfig(iconPosition, count, index) {
|
|
133
149
|
}
|
134
150
|
};
|
135
151
|
|
136
|
-
var cn = (0,
|
152
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-beta-benefits-icons');
|
137
153
|
|
138
154
|
var BenefitsIcons = function BenefitsIcons(_ref) {
|
139
|
-
var
|
155
|
+
var rootRef = _ref.rootRef,
|
156
|
+
_ref$iconPosition = _ref.iconPosition,
|
140
157
|
iconPosition = _ref$iconPosition === void 0 ? _types.IconPositionEnum.LEFT_TOP : _ref$iconPosition,
|
158
|
+
_ref$inOneColumn = _ref.inOneColumn,
|
159
|
+
inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
|
141
160
|
items = _ref.items,
|
142
|
-
className = _ref.className
|
143
|
-
|
161
|
+
className = _ref.className,
|
162
|
+
_ref$classes = _ref.classes,
|
163
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
164
|
+
|
165
|
+
var _React$useState = React.useState(iconPosition === _types.IconPositionEnum.CENTER_TOP ? 'center' : 'left'),
|
166
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
167
|
+
itemsAlign = _React$useState2[0],
|
168
|
+
setItemsAlign = _React$useState2[1];
|
169
|
+
|
170
|
+
var _React$useState3 = React.useState(iconPosition),
|
171
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
172
|
+
localIconPosition = _React$useState4[0],
|
173
|
+
setLocalIconPosition = _React$useState4[1];
|
174
|
+
|
175
|
+
var resizeHandler = React.useCallback(function () {
|
176
|
+
if (window.innerWidth <= _uiHelpers.breakpoints.MOBILE_MIDDLE_END) {
|
177
|
+
setItemsAlign(_types.ItemsAlignEnum.CENTER);
|
178
|
+
setLocalIconPosition(_types.IconPositionEnum.CENTER_TOP);
|
179
|
+
} else {
|
180
|
+
setItemsAlign(_types.ItemsAlignEnum.LEFT);
|
181
|
+
setLocalIconPosition(iconPosition);
|
182
|
+
}
|
183
|
+
}, [iconPosition]);
|
184
|
+
React.useEffect(function () {
|
185
|
+
var resizeHandlerThrottled = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
186
|
+
|
187
|
+
if (inOneColumn) {
|
188
|
+
resizeHandler();
|
189
|
+
window.addEventListener('resize', resizeHandlerThrottled);
|
190
|
+
}
|
191
|
+
|
192
|
+
return function () {
|
193
|
+
window.removeEventListener('resize', resizeHandlerThrottled);
|
194
|
+
};
|
195
|
+
}, [iconPosition, inOneColumn, resizeHandler]);
|
144
196
|
return /*#__PURE__*/React.createElement("div", {
|
145
|
-
className: cn(className)
|
197
|
+
className: cn([className, classes.root]),
|
198
|
+
ref: rootRef
|
146
199
|
}, /*#__PURE__*/React.createElement("div", {
|
147
200
|
className: cn('inner')
|
148
201
|
}, /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
202
|
+
className: classes.grid,
|
149
203
|
guttersLeft: "medium",
|
150
|
-
hAlign:
|
204
|
+
hAlign: itemsAlign
|
151
205
|
}, items.map(function (_ref2, i) {
|
152
206
|
var title = _ref2.title,
|
153
207
|
text = _ref2.text,
|
154
208
|
icon = _ref2.icon;
|
155
|
-
|
209
|
+
var columnConfig = inOneColumn ? getOneColumnConfig(iconPosition) : getMultiColumnConfig(iconPosition, items.length, i);
|
210
|
+
return /*#__PURE__*/React.createElement(_uiCore.GridColumn, (0, _extends2["default"])({
|
211
|
+
className: classes.gridColumn,
|
156
212
|
key: i
|
157
|
-
}), /*#__PURE__*/React.createElement(_BenefitsIconsTile["default"], {
|
213
|
+
}, columnConfig), /*#__PURE__*/React.createElement(_BenefitsIconsTile["default"], {
|
214
|
+
className: classes.item,
|
158
215
|
title: title,
|
159
216
|
text: text,
|
160
217
|
icon: icon,
|
161
|
-
iconPosition:
|
218
|
+
iconPosition: localIconPosition
|
162
219
|
}));
|
163
220
|
}))));
|
164
221
|
};
|
165
222
|
|
166
223
|
BenefitsIcons.propTypes = {
|
224
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
225
|
+
current: _propTypes["default"].elementType
|
226
|
+
}), _propTypes["default"].any])]),
|
167
227
|
iconPosition: _propTypes["default"].oneOf(Object.values(_types.IconPositionEnum)),
|
228
|
+
inOneColumn: _propTypes["default"].bool,
|
168
229
|
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
169
|
-
title: _propTypes["default"].string,
|
170
|
-
text: _propTypes["default"].string,
|
230
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
231
|
+
text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
171
232
|
icon: _propTypes["default"].node.isRequired
|
172
233
|
}).isRequired).isRequired,
|
173
|
-
className: _propTypes["default"].string
|
234
|
+
className: _propTypes["default"].string,
|
235
|
+
classes: _propTypes["default"].shape({
|
236
|
+
root: _propTypes["default"].string,
|
237
|
+
item: _propTypes["default"].string
|
238
|
+
})
|
174
239
|
};
|
175
240
|
var _default = BenefitsIcons;
|
176
241
|
exports["default"] = _default;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import './style/BenefitsIconsTile.less';
|
3
|
-
import { IBenefit,
|
3
|
+
import { IBenefit, IconPosition } from './types';
|
4
4
|
export interface IBenefitsIconsTile extends IBenefit {
|
5
|
-
iconPosition?:
|
5
|
+
iconPosition?: IconPosition;
|
6
|
+
className?: string;
|
6
7
|
}
|
7
8
|
declare const BenefitsIconsTile: React.FC<IBenefitsIconsTile>;
|
8
9
|
export default BenefitsIconsTile;
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
4
|
|
5
|
-
require("core-js/modules/es.object.values");
|
6
|
-
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
8
6
|
value: true
|
9
7
|
});
|
@@ -15,10 +13,10 @@ var React = _interopRequireWildcard(require("react"));
|
|
15
13
|
|
16
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
17
15
|
|
18
|
-
var _htmr = _interopRequireDefault(require("htmr"));
|
19
|
-
|
20
16
|
var _uiCore = require("@megafon/ui-core");
|
21
17
|
|
18
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
+
|
22
20
|
var _types = require("./types");
|
23
21
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
@@ -27,18 +25,19 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
27
25
|
|
28
26
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
29
27
|
|
30
|
-
var cn = (0,
|
28
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-beta-benefits-icons-tile');
|
31
29
|
|
32
30
|
var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
33
31
|
var title = _ref.title,
|
34
32
|
text = _ref.text,
|
35
33
|
icon = _ref.icon,
|
36
34
|
_ref$iconPosition = _ref.iconPosition,
|
37
|
-
iconPosition = _ref$iconPosition === void 0 ? _types.IconPositionEnum.LEFT_TOP : _ref$iconPosition
|
35
|
+
iconPosition = _ref$iconPosition === void 0 ? _types.IconPositionEnum.LEFT_TOP : _ref$iconPosition,
|
36
|
+
className = _ref.className;
|
38
37
|
return /*#__PURE__*/React.createElement("div", {
|
39
|
-
className: cn(
|
38
|
+
className: cn({
|
40
39
|
'icon-position': iconPosition
|
41
|
-
})
|
40
|
+
}, [className])
|
42
41
|
}, /*#__PURE__*/React.createElement("div", {
|
43
42
|
className: cn('svg-icon')
|
44
43
|
}, icon), /*#__PURE__*/React.createElement("div", {
|
@@ -46,17 +45,17 @@ var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
|
46
45
|
}, title && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
47
46
|
className: cn('title'),
|
48
47
|
as: "h5"
|
49
|
-
},
|
50
|
-
className: cn('
|
51
|
-
|
52
|
-
}, (0, _htmr["default"])(text))));
|
48
|
+
}, title), text && /*#__PURE__*/React.createElement("div", {
|
49
|
+
className: cn('content')
|
50
|
+
}, text)));
|
53
51
|
};
|
54
52
|
|
55
53
|
BenefitsIconsTile.propTypes = {
|
56
|
-
|
57
|
-
|
54
|
+
className: _propTypes["default"].string,
|
55
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
56
|
+
text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
58
57
|
iconPosition: _propTypes["default"].oneOf(Object.values(_types.IconPositionEnum)),
|
59
|
-
icon: _propTypes["default"].node
|
58
|
+
icon: _propTypes["default"].node.isRequired
|
60
59
|
};
|
61
60
|
var _default = BenefitsIconsTile;
|
62
61
|
exports["default"] = _default;
|
@@ -7,17 +7,24 @@ h5 {
|
|
7
7
|
}
|
8
8
|
.mfui-beta-benefits-icons-tile {
|
9
9
|
margin-bottom: 48px;
|
10
|
-
padding: 0 16px;
|
11
10
|
}
|
12
11
|
.mfui-beta-benefits-icons-tile .mfui-beta-benefits-icons-tile__svg-icon {
|
13
12
|
margin-bottom: 10px;
|
14
13
|
}
|
15
|
-
.mfui-beta-benefits-icons-
|
14
|
+
.mfui-beta-benefits-icons-tile__content {
|
15
|
+
font-size: 15px;
|
16
|
+
line-height: 24px;
|
17
|
+
font-weight: 400;
|
18
|
+
}
|
19
|
+
.mfui-beta-benefits-icons-tile__title + .mfui-beta-benefits-icons-tile__content {
|
16
20
|
margin-top: 4px;
|
17
21
|
}
|
22
|
+
.mfui-beta-benefits-icons-tile__text {
|
23
|
+
margin-bottom: 0;
|
24
|
+
}
|
18
25
|
.mfui-beta-benefits-icons-tile__svg-icon {
|
19
|
-
width:
|
20
|
-
height:
|
26
|
+
width: 40px;
|
27
|
+
height: 40px;
|
21
28
|
overflow: hidden;
|
22
29
|
}
|
23
30
|
.mfui-beta-benefits-icons-tile_icon-position_left-side {
|
@@ -1,15 +1,24 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
3
3
|
export interface IBenefit {
|
4
|
-
|
5
|
-
|
4
|
+
/** Заголовок бенефита */
|
5
|
+
title?: string | React.ReactNode | React.ReactNode[];
|
6
|
+
/** Основной текст в бенефите */
|
7
|
+
text?: string | React.ReactNode | React.ReactNode[];
|
8
|
+
/** Иконка */
|
6
9
|
icon: React.ReactNode;
|
7
10
|
}
|
8
|
-
export declare
|
9
|
-
LEFT_TOP
|
10
|
-
CENTER_TOP
|
11
|
-
LEFT_SIDE
|
12
|
-
}
|
11
|
+
export declare const IconPositionEnum: {
|
12
|
+
readonly LEFT_TOP: "left-top";
|
13
|
+
readonly CENTER_TOP: "center-top";
|
14
|
+
readonly LEFT_SIDE: "left-side";
|
15
|
+
};
|
16
|
+
export declare type IconPosition = typeof IconPositionEnum[keyof typeof IconPositionEnum];
|
17
|
+
export declare const ItemsAlignEnum: {
|
18
|
+
readonly LEFT: "left";
|
19
|
+
readonly CENTER: "center";
|
20
|
+
};
|
21
|
+
export declare type ItemsAlignType = typeof ItemsAlignEnum[keyof typeof ItemsAlignEnum];
|
13
22
|
export declare type GridConfig = {
|
14
23
|
wide?: TGridSizeValues;
|
15
24
|
desktop?: TGridSizeValues;
|
@@ -3,12 +3,15 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.IconPositionEnum = void 0;
|
7
|
-
var IconPositionEnum
|
6
|
+
exports.ItemsAlignEnum = exports.IconPositionEnum = void 0;
|
7
|
+
var IconPositionEnum = {
|
8
|
+
LEFT_TOP: 'left-top',
|
9
|
+
CENTER_TOP: 'center-top',
|
10
|
+
LEFT_SIDE: 'left-side'
|
11
|
+
};
|
8
12
|
exports.IconPositionEnum = IconPositionEnum;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
})(IconPositionEnum || (exports.IconPositionEnum = IconPositionEnum = {}));
|
13
|
+
var ItemsAlignEnum = {
|
14
|
+
LEFT: 'left',
|
15
|
+
CENTER: 'center'
|
16
|
+
};
|
17
|
+
exports.ItemsAlignEnum = ItemsAlignEnum;
|
@@ -2,12 +2,21 @@ import * as React from 'react';
|
|
2
2
|
import './BenfitsPictures.less';
|
3
3
|
import { IBenefit, GridGutterSize } from './types';
|
4
4
|
export interface IBenefitsPicturesProps {
|
5
|
-
/**
|
5
|
+
/** Ссылка на корневой элемент */
|
6
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
7
|
+
/** Данные для бенефитов */
|
6
8
|
items: IBenefit[];
|
7
|
-
/**
|
9
|
+
/** Горизонтальное выравнивание */
|
8
10
|
hAlign?: 'left' | 'center';
|
9
|
-
/**
|
11
|
+
/** Расстояние между бенефитами */
|
10
12
|
gridGap?: GridGutterSize;
|
13
|
+
/** Дополнительный css класс для корневого элемента */
|
14
|
+
className?: string;
|
15
|
+
/** Дополнительные css классы для корневого и внутренних элементов */
|
16
|
+
classes?: {
|
17
|
+
root?: string;
|
18
|
+
item?: string;
|
19
|
+
};
|
11
20
|
}
|
12
21
|
declare const BenefitsPictures: React.FC<IBenefitsPicturesProps>;
|
13
22
|
export default BenefitsPictures;
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
4
|
|
5
|
-
require("core-js/modules/es.array.map");
|
6
|
-
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
8
6
|
value: true
|
9
7
|
});
|
@@ -23,7 +21,11 @@ var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
23
21
|
|
24
22
|
var _uiCore = require("@megafon/ui-core");
|
25
23
|
|
26
|
-
var
|
24
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
25
|
+
|
26
|
+
var _htmr = _interopRequireDefault(require("htmr"));
|
27
|
+
|
28
|
+
var _throttleTime = _interopRequireDefault(require("../../constants/throttleTime"));
|
27
29
|
|
28
30
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
29
31
|
|
@@ -31,7 +33,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
31
33
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
33
35
|
|
34
|
-
var THROTTLE_TIME = 500;
|
35
36
|
var ONLY_LEFT_ALIGN_ITEMS_COUNT = 3;
|
36
37
|
var columnSize = {
|
37
38
|
wide: '4',
|
@@ -131,14 +132,18 @@ var getCenterConfig = function getCenterConfig(count, index, gutterSize) {
|
|
131
132
|
}
|
132
133
|
};
|
133
134
|
|
134
|
-
var cn = (0,
|
135
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-beta-benefits-pictures');
|
135
136
|
|
136
137
|
var BenefitsPictures = function BenefitsPictures(_ref) {
|
137
138
|
var items = _ref.items,
|
138
139
|
_ref$hAlign = _ref.hAlign,
|
139
140
|
hAlign = _ref$hAlign === void 0 ? 'left' : _ref$hAlign,
|
140
141
|
_ref$gridGap = _ref.gridGap,
|
141
|
-
gridGap = _ref$gridGap === void 0 ? 'large' : _ref$gridGap
|
142
|
+
gridGap = _ref$gridGap === void 0 ? 'large' : _ref$gridGap,
|
143
|
+
rootRef = _ref.rootRef,
|
144
|
+
className = _ref.className,
|
145
|
+
_ref$classes = _ref.classes,
|
146
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
142
147
|
var isLargeGutter = gridGap === 'large';
|
143
148
|
var isGridCenterAlign = hAlign === 'center' && items.length !== ONLY_LEFT_ALIGN_ITEMS_COUNT;
|
144
149
|
|
@@ -152,14 +157,14 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
152
157
|
return;
|
153
158
|
}
|
154
159
|
|
155
|
-
if (window.innerWidth <
|
160
|
+
if (window.innerWidth < _uiHelpers.breakpoints.DESKTOP_MIDDLE_START) {
|
156
161
|
setCurrentGutter('medium');
|
157
162
|
} else {
|
158
163
|
setCurrentGutter('large');
|
159
164
|
}
|
160
165
|
}, []);
|
161
166
|
React.useEffect(function () {
|
162
|
-
var throttledResizeHandler = (0, _lodash["default"])(resizeHandler,
|
167
|
+
var throttledResizeHandler = (0, _lodash["default"])(resizeHandler, _throttleTime["default"].resize);
|
163
168
|
resizeHandler();
|
164
169
|
window.addEventListener('resize', throttledResizeHandler);
|
165
170
|
return function () {
|
@@ -167,7 +172,8 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
167
172
|
};
|
168
173
|
}, []);
|
169
174
|
return /*#__PURE__*/React.createElement("div", {
|
170
|
-
className: cn()
|
175
|
+
className: cn([className, classes.root]),
|
176
|
+
ref: rootRef
|
171
177
|
}, /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
172
178
|
guttersLeft: currentGutter,
|
173
179
|
hAlign: isGridCenterAlign ? 'center' : 'left'
|
@@ -178,7 +184,7 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
178
184
|
return /*#__PURE__*/React.createElement(_uiCore.GridColumn, (0, _extends2["default"])({}, hAlign === 'left' ? getLeftConfig(items.length, index) : getCenterConfig(items.length, index, gridGap), {
|
179
185
|
key: index
|
180
186
|
}), /*#__PURE__*/React.createElement("div", {
|
181
|
-
className: cn('item')
|
187
|
+
className: cn('item', [classes.item])
|
182
188
|
}, /*#__PURE__*/React.createElement("img", {
|
183
189
|
className: cn('img', {
|
184
190
|
'h-align': hAlign
|
@@ -189,20 +195,28 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
189
195
|
className: cn('title'),
|
190
196
|
hAlign: hAlign,
|
191
197
|
as: "h3"
|
192
|
-
}, title), /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
198
|
+
}, (0, _htmr["default"])(title)), /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
193
199
|
align: hAlign
|
194
|
-
}, text)));
|
200
|
+
}, (0, _htmr["default"])(text))));
|
195
201
|
})));
|
196
202
|
};
|
197
203
|
|
198
204
|
BenefitsPictures.propTypes = {
|
205
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
206
|
+
current: _propTypes["default"].elementType
|
207
|
+
}), _propTypes["default"].any])]),
|
199
208
|
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
200
209
|
title: _propTypes["default"].string.isRequired,
|
201
210
|
text: _propTypes["default"].string.isRequired,
|
202
211
|
img: _propTypes["default"].string.isRequired
|
203
212
|
}).isRequired).isRequired,
|
204
213
|
hAlign: _propTypes["default"].oneOf(['left', 'center']),
|
205
|
-
gridGap: _propTypes["default"].oneOf(['medium', 'large'])
|
214
|
+
gridGap: _propTypes["default"].oneOf(['medium', 'large']),
|
215
|
+
className: _propTypes["default"].string,
|
216
|
+
classes: _propTypes["default"].shape({
|
217
|
+
root: _propTypes["default"].string,
|
218
|
+
item: _propTypes["default"].string
|
219
|
+
})
|
206
220
|
};
|
207
221
|
var _default = BenefitsPictures;
|
208
222
|
exports["default"] = _default;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
export interface IBenefit {
|
2
|
+
/** Заголовок бенефита */
|
2
3
|
title: string;
|
4
|
+
/** Основной текст в бенефите */
|
3
5
|
text: string;
|
6
|
+
/** Изображение */
|
4
7
|
img: string;
|
5
8
|
}
|
6
9
|
declare type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-beta-breadcrumbs {
|
9
|
+
display: -webkit-box;
|
10
|
+
display: -ms-flexbox;
|
11
|
+
display: flex;
|
12
|
+
-ms-flex-wrap: wrap;
|
13
|
+
flex-wrap: wrap;
|
14
|
+
}
|
15
|
+
.mfui-beta-breadcrumbs_color_black .mfui-beta-breadcrumbs__item:before {
|
16
|
+
color: #333333;
|
17
|
+
}
|
18
|
+
.mfui-beta-breadcrumbs_color_white .mfui-beta-breadcrumbs__item:before {
|
19
|
+
color: #FFFFFF;
|
20
|
+
}
|
21
|
+
.mfui-beta-breadcrumbs__icon {
|
22
|
+
position: relative;
|
23
|
+
width: 14px;
|
24
|
+
height: 3px;
|
25
|
+
margin-right: 10px;
|
26
|
+
}
|
27
|
+
.mfui-beta-breadcrumbs__item {
|
28
|
+
position: relative;
|
29
|
+
margin-right: 10px;
|
30
|
+
padding-left: 22px;
|
31
|
+
}
|
32
|
+
.mfui-beta-breadcrumbs__item:before {
|
33
|
+
content: '→';
|
34
|
+
position: absolute;
|
35
|
+
top: -2px;
|
36
|
+
left: 0;
|
37
|
+
}
|
38
|
+
.mfui-beta-breadcrumbs__item:first-child {
|
39
|
+
padding-left: 0;
|
40
|
+
}
|
41
|
+
.mfui-beta-breadcrumbs__item:first-child:before {
|
42
|
+
display: none;
|
43
|
+
}
|
44
|
+
.mfui-beta-breadcrumbs__item:last-child {
|
45
|
+
pointer-events: none;
|
46
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './Breadcrumbs.less';
|
3
|
+
declare type ItemType = {
|
4
|
+
title: string;
|
5
|
+
href?: string;
|
6
|
+
};
|
7
|
+
export declare const TextColor: {
|
8
|
+
readonly BLACK: "black";
|
9
|
+
readonly WHITE: "white";
|
10
|
+
};
|
11
|
+
declare type TextColorType = typeof TextColor[keyof typeof TextColor];
|
12
|
+
export declare type Props = {
|
13
|
+
className?: string;
|
14
|
+
classes?: {
|
15
|
+
item?: string;
|
16
|
+
};
|
17
|
+
items: ItemType[];
|
18
|
+
color?: TextColorType;
|
19
|
+
};
|
20
|
+
declare const Breadcrumbs: React.FC<Props>;
|
21
|
+
export default Breadcrumbs;
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports["default"] = exports.TextColor = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.array.map");
|
9
|
+
|
10
|
+
require("core-js/modules/es.object.values");
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
15
|
+
|
16
|
+
var _uiCore = require("@megafon/ui-core");
|
17
|
+
|
18
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
+
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
21
|
+
|
22
|
+
var TextColor = {
|
23
|
+
BLACK: 'black',
|
24
|
+
WHITE: 'white'
|
25
|
+
};
|
26
|
+
exports.TextColor = TextColor;
|
27
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-beta-breadcrumbs');
|
28
|
+
|
29
|
+
var Breadcrumbs = function Breadcrumbs(_ref) {
|
30
|
+
var items = _ref.items,
|
31
|
+
_ref$color = _ref.color,
|
32
|
+
color = _ref$color === void 0 ? 'black' : _ref$color,
|
33
|
+
className = _ref.className,
|
34
|
+
_ref$classes = _ref.classes,
|
35
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
36
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
37
|
+
className: cn({
|
38
|
+
color: color
|
39
|
+
}, className)
|
40
|
+
}, items.map(function (_ref2) {
|
41
|
+
var title = _ref2.title,
|
42
|
+
href = _ref2.href;
|
43
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
44
|
+
className: cn('item', classes.item),
|
45
|
+
key: title
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
|
47
|
+
href: href,
|
48
|
+
color: color
|
49
|
+
}, title));
|
50
|
+
}));
|
51
|
+
};
|
52
|
+
|
53
|
+
Breadcrumbs.propTypes = {
|
54
|
+
className: _propTypes["default"].string,
|
55
|
+
classes: _propTypes["default"].shape({
|
56
|
+
item: _propTypes["default"].string
|
57
|
+
}),
|
58
|
+
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
59
|
+
title: _propTypes["default"].string.isRequired,
|
60
|
+
href: _propTypes["default"].string
|
61
|
+
}).isRequired).isRequired,
|
62
|
+
color: _propTypes["default"].oneOf(Object.values(TextColor))
|
63
|
+
};
|
64
|
+
var _default = Breadcrumbs;
|
65
|
+
exports["default"] = _default;
|