@redneckz/wildless-cms-uni-blocks 0.3.80 → 0.3.81
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +117 -129
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +3 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +2 -2
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +3 -2
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +3 -2
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Catalog/Catalog.js +3 -2
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +3 -2
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +0 -10
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Footer.js +3 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +4 -3
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriod.js +3 -2
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlock.js +5 -4
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Insurance/Insurance.js +3 -2
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LikeControl/LikeControl.js +3 -2
- package/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +3 -2
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkList/LinkList.js +3 -2
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +4 -3
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +3 -2
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/dist/components/OtherProducts/OtherProducts.js +3 -2
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +3 -2
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +3 -2
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +3 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/dist/components/ProductGallery/ProductGallery.js +4 -3
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +3 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +3 -2
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +4 -3
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +5 -4
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +3 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +3 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +3 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/react/IntersectionObserverTag.d.ts +1 -1
- package/dist/react/IntersectionObserverTag.js +2 -2
- package/dist/react/IntersectionObserverTag.js.map +1 -1
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.d.ts +9 -0
- package/dist/ui-kit/BlockWrapper.js +10 -0
- package/dist/ui-kit/BlockWrapper.js.map +1 -0
- package/dist/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/dist/utils/changeHashOnObserve.d.ts +1 -0
- package/dist/utils/changeHashOnObserve.js +13 -0
- package/dist/utils/changeHashOnObserve.js.map +1 -0
- package/lib/components/Accordion/Accordion.js +3 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +2 -2
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +3 -2
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +3 -2
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Catalog/Catalog.js +3 -2
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +3 -2
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +0 -10
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Footer.js +3 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +4 -3
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.js +3 -2
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlock.js +5 -4
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/lib/components/Header/Header.js +3 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Insurance/Insurance.js +3 -2
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LikeControl/LikeControl.js +3 -2
- package/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +3 -2
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkList/LinkList.js +3 -2
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +4 -3
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/Navigation/Navigation.js +3 -2
- package/lib/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/lib/components/OtherProducts/OtherProducts.js +3 -2
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +3 -2
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +3 -2
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +3 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/lib/components/ProductGallery/ProductGallery.js +4 -3
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +3 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +3 -2
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +4 -3
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +5 -4
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +3 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +3 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +3 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/react/IntersectionObserverTag.d.ts +1 -1
- package/lib/react/IntersectionObserverTag.js +2 -2
- package/lib/react/IntersectionObserverTag.js.map +1 -1
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.d.ts +9 -0
- package/lib/ui-kit/BlockWrapper.js +8 -0
- package/lib/ui-kit/BlockWrapper.js.map +1 -0
- package/lib/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/lib/utils/changeHashOnObserve.d.ts +1 -0
- package/lib/utils/changeHashOnObserve.js +10 -0
- package/lib/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +23 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +2 -2
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +3 -2
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +3 -2
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +3 -2
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +0 -10
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +4 -3
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.js +3 -2
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.js +5 -4
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js +3 -2
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/LikeControl/LikeControl.js +3 -2
- package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js +3 -2
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/Navigation/Navigation.js +3 -2
- package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +3 -2
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +3 -2
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +3 -2
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js +3 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +3 -2
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +4 -3
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +3 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/react/IntersectionObserverTag.d.ts +1 -1
- package/mobile/dist/react/IntersectionObserverTag.js +2 -2
- package/mobile/dist/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +9 -0
- package/mobile/dist/ui-kit/BlockWrapper.js +10 -0
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -0
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/mobile/dist/utils/changeHashOnObserve.d.ts +1 -0
- package/mobile/dist/utils/changeHashOnObserve.js +13 -0
- package/mobile/dist/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/lib/components/BaseTile/BaseTile.js +2 -2
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +3 -2
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +3 -2
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +3 -2
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +0 -10
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +4 -3
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.js +3 -2
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.js +5 -4
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js +3 -2
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/LikeControl/LikeControl.js +3 -2
- package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js +3 -2
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/Navigation/Navigation.js +3 -2
- package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +3 -2
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +3 -2
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +3 -2
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js +3 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +3 -2
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +4 -3
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +3 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/react/IntersectionObserverTag.d.ts +1 -1
- package/mobile/lib/react/IntersectionObserverTag.js +2 -2
- package/mobile/lib/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +9 -0
- package/mobile/lib/ui-kit/BlockWrapper.js +8 -0
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -0
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/mobile/lib/utils/changeHashOnObserve.d.ts +1 -0
- package/mobile/lib/utils/changeHashOnObserve.js +10 -0
- package/mobile/lib/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -4
- package/mobile/src/components/Bonus/Bonus.tsx +4 -3
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +5 -4
- package/mobile/src/components/Calculator/Calculator.tsx +6 -4
- package/mobile/src/components/Catalog/Catalog.tsx +6 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +0 -14
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +3 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -4
- package/mobile/src/components/Gallery/GalleryInner.tsx +8 -6
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +4 -3
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +6 -5
- package/mobile/src/components/Insurance/Insurance.tsx +7 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -6
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +5 -5
- package/mobile/src/components/LikeControl/LikeControl.tsx +7 -4
- package/mobile/src/components/LinkList/LinkList.tsx +4 -3
- package/mobile/src/components/Navigation/Navigation.tsx +6 -4
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +1 -1
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +13 -13
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +8 -3
- package/mobile/src/components/PictureText/PictureText.tsx +6 -5
- package/mobile/src/components/Placeholder/Placeholder.tsx +6 -4
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +6 -4
- package/mobile/src/components/PromoTile/PromoTile.tsx +6 -4
- package/mobile/src/components/Recommendation/Recommendation.tsx +7 -5
- package/mobile/src/components/Tile/Tile.tsx +6 -6
- package/mobile/src/react/IntersectionObserverTag.tsx +11 -3
- package/mobile/src/react/setup-fixture.ts +0 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +33 -0
- package/mobile/src/ui-kit/Button/ButtonProps.ts +14 -1
- package/mobile/src/utils/changeHashOnObserve.ts +10 -0
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +9 -4
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -4
- package/src/components/Bonus/Bonus.tsx +4 -3
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +5 -4
- package/src/components/Calculator/Calculator.tsx +6 -4
- package/src/components/Catalog/Catalog.tsx +6 -4
- package/src/components/ComparisonTable/ComparisonTable.tsx +6 -4
- package/src/components/ContentPage/ContentPage.tsx +0 -14
- package/src/components/ContentPage/ContentPageContext.tsx +3 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -4
- package/src/components/Footer/Footer.tsx +9 -3
- package/src/components/Gallery/GalleryInner.tsx +8 -6
- package/src/components/GracePeriod/GracePeriod.tsx +4 -3
- package/src/components/GroupBlock/GroupBlock.tsx +6 -5
- package/src/components/Header/Header.tsx +9 -3
- package/src/components/Headline/Headline.tsx +5 -4
- package/src/components/Insurance/Insurance.tsx +7 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -6
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +5 -5
- package/src/components/LikeControl/LikeControl.tsx +7 -4
- package/src/components/LinkDocs/LinkDocs.tsx +8 -3
- package/src/components/LinkList/LinkList.tsx +4 -3
- package/src/components/MobileAppTile/MobileAppTile.tsx +6 -4
- package/src/components/Navigation/Navigation.tsx +6 -4
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +1 -1
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +13 -13
- package/src/components/OtherProducts/OtherProducts.tsx +8 -3
- package/src/components/PictureText/PictureText.tsx +6 -5
- package/src/components/Placeholder/Placeholder.tsx +6 -4
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +5 -4
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
- package/src/components/ProductGallery/ProductGallery.tsx +6 -4
- package/src/components/ProductTile/ProductTile.tsx +6 -4
- package/src/components/PromoTile/PromoTile.tsx +6 -4
- package/src/components/Recommendation/Recommendation.tsx +7 -5
- package/src/components/StepsBlock/StepsBlock.tsx +7 -5
- package/src/components/TariffsTable/TariffsTable.tsx +6 -13
- package/src/components/TextBlock/TextBlock.tsx +5 -12
- package/src/components/Tile/Tile.tsx +6 -6
- package/src/react/IntersectionObserverTag.tsx +11 -3
- package/src/react/setup-fixture.ts +0 -1
- package/src/ui-kit/BlockWrapper.tsx +33 -0
- package/src/ui-kit/Button/ButtonProps.ts +14 -1
- package/src/utils/changeHashOnObserve.ts +10 -0
- package/dist/utils/changeHashOnScroll.d.ts +0 -2
- package/dist/utils/changeHashOnScroll.js +0 -17
- package/dist/utils/changeHashOnScroll.js.map +0 -1
- package/lib/utils/changeHashOnScroll.d.ts +0 -2
- package/lib/utils/changeHashOnScroll.js +0 -14
- package/lib/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/dist/utils/changeHashOnScroll.d.ts +0 -2
- package/mobile/dist/utils/changeHashOnScroll.js +0 -17
- package/mobile/dist/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/lib/utils/changeHashOnScroll.d.ts +0 -2
- package/mobile/lib/utils/changeHashOnScroll.js +0 -14
- package/mobile/lib/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/src/utils/changeHashOnScroll.ts +0 -17
- package/src/utils/changeHashOnScroll.ts +0 -17
package/bundle/bundle.umd.js
CHANGED
|
@@ -186,6 +186,19 @@
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
const changeHashOnObserve = (entries) => {
|
|
190
|
+
if (!entries.length) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const [entry] = entries;
|
|
194
|
+
if (entry.isIntersecting) ;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const BlockWrapper = JSX(({ anchor, className, context, children, Tag = 'section', ...rest }) => {
|
|
198
|
+
const { IntersectionObserverTag } = context;
|
|
199
|
+
return anchor ? (jsx(IntersectionObserverTag, { Tag: Tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, ...rest, children: children })) : (jsx(Tag, { className: className, ...rest, children: children }));
|
|
200
|
+
});
|
|
201
|
+
|
|
189
202
|
const HEADING_STYLE_MAP = {
|
|
190
203
|
h1: 'text-title-xl tracking-[-0.3px]',
|
|
191
204
|
h2: 'text-title-lg',
|
|
@@ -473,9 +486,9 @@
|
|
|
473
486
|
},
|
|
474
487
|
};
|
|
475
488
|
|
|
476
|
-
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description,
|
|
489
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description, headingType = 'h2', ...rest }) => {
|
|
477
490
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
478
|
-
return (jsxs(
|
|
491
|
+
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col gap-4 ${STYLE_MAPS.background} ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: headingType, className: `text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })) : null, description ? (jsx("p", { className: `text-base ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, children: description })) : null] }));
|
|
479
492
|
});
|
|
480
493
|
|
|
481
494
|
const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
|
|
@@ -506,16 +519,16 @@
|
|
|
506
519
|
double: 'flex gap-x-5 gap-y-[26px] flex-wrap',
|
|
507
520
|
single: 'flex gap-3.5 flex-col',
|
|
508
521
|
};
|
|
509
|
-
const LinkDocs = JSX(({ context, className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double',
|
|
510
|
-
return (jsxs(
|
|
522
|
+
const LinkDocs = JSX(({ context, className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => {
|
|
523
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans text-primary-text p-[50px] bg-white ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, context: context, align: align, headingType: "h3" }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
511
524
|
});
|
|
512
525
|
|
|
513
526
|
const pictureTextStyleMap = {
|
|
514
527
|
primary: 'bg-white text-primary-text',
|
|
515
528
|
secondary: 'bg-primary-main text-white',
|
|
516
529
|
};
|
|
517
|
-
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false,
|
|
518
|
-
return (jsxs(
|
|
530
|
+
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false, ...rest }) => {
|
|
531
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, ...rest, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map((_, i) => renderBenefit$2(_, i, version)) })) : null] })] }));
|
|
519
532
|
});
|
|
520
533
|
function renderBenefit$2(benefit, i, version) {
|
|
521
534
|
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon ? (jsx(Img, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", image: benefit.icon, width: "48", height: "48", asSVG: true })) : null, jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit?.label ? (jsx("div", { className: `font-medium text-xl-light m-0 ${version === 'primary' ? 'text-primary-text' : ''}`, children: benefit.label })) : null, benefit?.description ? (jsx("div", { className: `font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`, children: benefit.description })) : null] })] }, String(i)));
|
|
@@ -699,8 +712,8 @@
|
|
|
699
712
|
: null }));
|
|
700
713
|
});
|
|
701
714
|
|
|
702
|
-
const BaseTile = JSX(({ className = '', title, children, buttons, image
|
|
703
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`,
|
|
715
|
+
const BaseTile = JSX(({ className = '', title, children, buttons, image }) => {
|
|
716
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { children: buttons }) : null] }), image] })] }));
|
|
704
717
|
});
|
|
705
718
|
|
|
706
719
|
const benefitTitleStyleMap = {
|
|
@@ -752,10 +765,10 @@
|
|
|
752
765
|
secondary: 'text-white/80',
|
|
753
766
|
};
|
|
754
767
|
const ProductBlock = JSX((props) => {
|
|
755
|
-
const { context, className = '', breadcrumbs, backwardButton, version = 'primary',
|
|
768
|
+
const { context, className = '', breadcrumbs, backwardButton, version = 'primary', ...otherProps } = props;
|
|
756
769
|
const router = context.useRouter();
|
|
757
770
|
const { handlerDecorator } = context;
|
|
758
|
-
return (jsxs(
|
|
771
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, ...otherProps, children: [backwardButton?.text ? renderBackwardButton(backwardButton, version, 'mb-10 -mt-2.5') : null, breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
759
772
|
});
|
|
760
773
|
|
|
761
774
|
const textBlockStyleMaps = {
|
|
@@ -778,9 +791,9 @@
|
|
|
778
791
|
description: 'text-secondary-text',
|
|
779
792
|
},
|
|
780
793
|
};
|
|
781
|
-
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className,
|
|
794
|
+
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, ...rest }) => {
|
|
782
795
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
783
|
-
return (jsxs(
|
|
796
|
+
return (jsxs(BlockWrapper, { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, ...rest, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
|
|
784
797
|
});
|
|
785
798
|
function renderIcon(className) {
|
|
786
799
|
return (jsx("div", { className: "pt-1.5 pl-1 pr-4", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
|
|
@@ -826,8 +839,8 @@
|
|
|
826
839
|
secondary: 'bg-primary-main text-white',
|
|
827
840
|
};
|
|
828
841
|
const Tile = JSX((props) => {
|
|
829
|
-
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary',
|
|
830
|
-
return (jsx(
|
|
842
|
+
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', ...rest } = props;
|
|
843
|
+
return (jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
831
844
|
${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$2(items, version, isDotted)] }) }));
|
|
832
845
|
});
|
|
833
846
|
function renderList$2(items, version, isDotted) {
|
|
@@ -838,8 +851,8 @@
|
|
|
838
851
|
primary: 'bg-white text-primary-text',
|
|
839
852
|
secondary: 'bg-primary-main text-white',
|
|
840
853
|
};
|
|
841
|
-
const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary',
|
|
842
|
-
return (jsxs(
|
|
854
|
+
const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary', ...rest }) => {
|
|
855
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsxs("div", { className: "z-[1]", children: [title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap text-h4` })) : null, description ? (jsx(Description, { className: "mt-2 text-md font-light", description: description })) : null, renderBenefits$1(benefits || [], version), additionalDescription
|
|
843
856
|
? renderAdditionalDescription(additionalDescription, version)
|
|
844
857
|
: null] }), buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1]" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
845
858
|
});
|
|
@@ -864,6 +877,14 @@
|
|
|
864
877
|
return jsx("div", { className: `text-m mt-2.5 ${descStyleMap[version]}`, children: additionalDescription });
|
|
865
878
|
}
|
|
866
879
|
|
|
880
|
+
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
881
|
+
? 'bg-secondary-light text-secondary-text'
|
|
882
|
+
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
|
|
883
|
+
|
|
884
|
+
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
885
|
+
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
886
|
+
}
|
|
887
|
+
|
|
867
888
|
const cardVersionMap = {
|
|
868
889
|
primary: 'bg-white text-secondary-text',
|
|
869
890
|
secondary: 'bg-primary-main text-white',
|
|
@@ -908,15 +929,7 @@
|
|
|
908
929
|
items-stretch ${cardStyleMap$1[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
909
930
|
}
|
|
910
931
|
|
|
911
|
-
const
|
|
912
|
-
? 'bg-secondary-light text-secondary-text'
|
|
913
|
-
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
|
|
914
|
-
|
|
915
|
-
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
916
|
-
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', anchor = null, ...rest }) => {
|
|
932
|
+
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', ...rest }) => {
|
|
920
933
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
921
934
|
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
922
935
|
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
@@ -924,7 +937,7 @@
|
|
|
924
937
|
const showNextButton = isGalleryScrollAvailable &&
|
|
925
938
|
cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
|
|
926
939
|
const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
|
|
927
|
-
return (jsxs(
|
|
940
|
+
return (jsxs(BlockWrapper, { context: context, className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, ...rest, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), renderArrows({
|
|
928
941
|
handler: [handlePrevClick, handleNextClick],
|
|
929
942
|
isShown: [showPrevButton, showNextButton],
|
|
930
943
|
btnClass: ['left-8', 'right-8'],
|
|
@@ -936,8 +949,8 @@
|
|
|
936
949
|
|
|
937
950
|
const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
|
|
938
951
|
|
|
939
|
-
const LinkList = JSX(({ className = '', documents,
|
|
940
|
-
return (jsx(
|
|
952
|
+
const LinkList = JSX(({ className = '', documents, ...rest }) => {
|
|
953
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white mt-[10px] ${className}`, ...rest, children: jsx("ul", { className: "flex flex-col text-sm text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
|
|
941
954
|
});
|
|
942
955
|
const renderLinkListItem = (documents) => {
|
|
943
956
|
return documents.map((doc, i) => {
|
|
@@ -1008,12 +1021,12 @@
|
|
|
1008
1021
|
center: 'text-center',
|
|
1009
1022
|
right: 'text-right',
|
|
1010
1023
|
};
|
|
1011
|
-
const Accordion = JSX(({ title, description, accordionItems, context, className = '',
|
|
1012
|
-
return (jsxs(
|
|
1024
|
+
const Accordion = JSX(({ title, description, accordionItems, context, className = '', accordionAlignTitle = 'center', ...rest }) => {
|
|
1025
|
+
return (jsxs(BlockWrapper, { context: context, className: `p-[50px] font-sans bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h4", className: `mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`, title: title })) : null, description ? jsx("div", { className: "mb-2.5 text-base", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
1013
1026
|
});
|
|
1014
1027
|
|
|
1015
|
-
const BenefitsBlock = JSX(({ className = '', headingType = 'h2', title, benefitList,
|
|
1016
|
-
return (jsxs(
|
|
1028
|
+
const BenefitsBlock = JSX(({ className = '', headingType = 'h2', title, benefitList, ...rest }) => {
|
|
1029
|
+
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: headingType, as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? renderBenefits(benefitList) : null] }));
|
|
1017
1030
|
});
|
|
1018
1031
|
const renderBenefits = (benefits) => {
|
|
1019
1032
|
return (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-9", children: benefits.map(renderStep) }));
|
|
@@ -1038,8 +1051,8 @@
|
|
|
1038
1051
|
};
|
|
1039
1052
|
|
|
1040
1053
|
const Bonus = JSX((props) => {
|
|
1041
|
-
const { className = '', title, description, bonusItems,
|
|
1042
|
-
return (jsx(
|
|
1054
|
+
const { className = '', title, description, bonusItems, ...rest } = props;
|
|
1055
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [title ? jsx(Heading, { headingType: "h3", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "text-md font-light text-center mt-[10px]", children: description })) : null, jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems
|
|
1043
1056
|
? bonusItems.map((_, i) => {
|
|
1044
1057
|
return (jsx("div", { className: "flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "mr-4", children: [jsx("div", { className: "text-title-sm", children: _.title }), jsx("div", { className: "text-md font-light mt-[14px] max-w-[488px]", children: _.description })] }), _.bonusCount ? (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount }), jsx("span", { className: "text-[44px] bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })] })) : null] }) }, String(i)));
|
|
1045
1058
|
})
|
|
@@ -1059,8 +1072,8 @@
|
|
|
1059
1072
|
}
|
|
1060
1073
|
}
|
|
1061
1074
|
|
|
1062
|
-
const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits,
|
|
1063
|
-
return (jsxs(
|
|
1075
|
+
const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits, ...rest }) => {
|
|
1076
|
+
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-50 flex flex-col text-center ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-[10px]", title: title }) : null, subtitle ? jsx("span", { className: "text-md font-normal", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
|
|
1064
1077
|
});
|
|
1065
1078
|
const renderBonusBenefit = (bonusBenefit, i) => {
|
|
1066
1079
|
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "title-2xs m-0", children: bonusBenefit.label }) : null })] }, String(i)));
|
|
@@ -1372,7 +1385,7 @@
|
|
|
1372
1385
|
return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...blockCalcTabs, className: "flex justify-between" }) }) }, String(i)));
|
|
1373
1386
|
};
|
|
1374
1387
|
|
|
1375
|
-
const Calculator = JSX(({ className = '', context, calcTabs = [],
|
|
1388
|
+
const Calculator = JSX(({ className = '', context, calcTabs = [], ...rest }) => {
|
|
1376
1389
|
const tabsNav = calcTabs.map((_) => _.nav || {});
|
|
1377
1390
|
const blockCalcTabs = calcTabs.map(({ calculatorBlock }) => calculatorBlock || {});
|
|
1378
1391
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
@@ -1382,7 +1395,7 @@
|
|
|
1382
1395
|
const isGalleryScrollAvailable = calcTabs?.length > 3;
|
|
1383
1396
|
const showNextButton = isGalleryScrollAvailable && calcTabs?.length > tabsShift + 3;
|
|
1384
1397
|
const showPrevButton = tabsShift > 0;
|
|
1385
|
-
return (jsxs(
|
|
1398
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, ...rest, children: [jsxs("div", { children: [tabsNav.length > 1
|
|
1386
1399
|
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
1387
1400
|
: null, renderArrows({
|
|
1388
1401
|
handler: [handlePrevClick, handleNextClick],
|
|
@@ -1425,9 +1438,9 @@
|
|
|
1425
1438
|
const BLUR_BLOCK_CLASSES$1 = 'absolute top-0 bottom-0 w-[84px]';
|
|
1426
1439
|
const CARD_FULL_VIEW_COUNT$1 = 3;
|
|
1427
1440
|
const CARD_SHIFT$1 = 430;
|
|
1428
|
-
const Catalog = JSX(({ context, cards = [], className = '', title, description,
|
|
1441
|
+
const Catalog = JSX(({ context, cards = [], className = '', title, description, ...rest }) => {
|
|
1429
1442
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1430
|
-
return (jsxs(
|
|
1443
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white relative font-sans p-9 overflow-hidden text-center ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h2", className: "mb-6", title: title }) : null, description ? jsx(Description, { className: "mb-6", description: description }) : null, jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT$1}px)` }, role: "list", children: cards?.length ? cards.map(renderCatalogCard(context)) : null }), renderNavButtons$1({
|
|
1431
1444
|
cardsCount: cards.length,
|
|
1432
1445
|
activeCardIndex,
|
|
1433
1446
|
setActiveCardIndex,
|
|
@@ -1528,10 +1541,10 @@
|
|
|
1528
1541
|
return (jsxs("div", { children: [jsxs("div", { role: "table", children: [colHeaders?.length ? (jsx(ComparisonTableColumnHeaders, { colHeaders: colHeaders, activeCardIndex: activeCardIndex, router: router, handlerDecorator: handlerDecorator })) : null, rowData?.length ? (jsx(ComparisonTableRows, { rowData: rowData, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn, ...tableArrowScrollProps })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
1529
1542
|
});
|
|
1530
1543
|
|
|
1531
|
-
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false,
|
|
1544
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, ...rest }) => {
|
|
1532
1545
|
const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
|
|
1533
1546
|
const showToggle = () => setIsShowAllRow(!isShowAllRow);
|
|
1534
|
-
return (jsxs(
|
|
1547
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center mb-9 mx-auto", title: title }), jsx(ComparisonTableBody, { context: context, columns: columns, rowHeaders: rowHeaders, isShowAllRow: isShowAllRow, isColoredFirstColumn: isColoredFirstColumn, visibleRowLength: visibleRowLength }), visibleRowLength
|
|
1535
1548
|
? renderShowMoreToggleButton({ isShowAllRow, onClick: showToggle })
|
|
1536
1549
|
: null] }));
|
|
1537
1550
|
});
|
|
@@ -1766,13 +1779,13 @@
|
|
|
1766
1779
|
address: 'Москва, ул.Ленина д.28',
|
|
1767
1780
|
distance: '6км',
|
|
1768
1781
|
};
|
|
1769
|
-
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют',
|
|
1782
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', ...rest }) => {
|
|
1770
1783
|
const currencyRates = useExchangeRates(context.useAsyncData);
|
|
1771
1784
|
const currencyRatesBuy = currencyRates.filter((_) => _.buy);
|
|
1772
1785
|
currencyRatesBuy.unshift({ code: Currency.RUB });
|
|
1773
1786
|
const currencyRatesSell = currencyRates.filter((_) => _.sell);
|
|
1774
1787
|
currencyRatesSell.push({ code: Currency.RUB });
|
|
1775
|
-
return (jsx(
|
|
1788
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell })) : null] }) }) }));
|
|
1776
1789
|
});
|
|
1777
1790
|
|
|
1778
1791
|
const LOGO_PATHS = [
|
|
@@ -1923,12 +1936,12 @@
|
|
|
1923
1936
|
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1924
1937
|
|
|
1925
1938
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1926
|
-
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context,
|
|
1927
|
-
return (jsxs("footer",
|
|
1939
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, ...rest }) => {
|
|
1940
|
+
return (jsxs(BlockWrapper, { Tag: "footer", context: context, className: `p-9 bg-white ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1928
1941
|
});
|
|
1929
1942
|
|
|
1930
|
-
const GracePeriod = JSX(({ className = '', title, description, calendar,
|
|
1931
|
-
return (jsxs(
|
|
1943
|
+
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => {
|
|
1944
|
+
return (jsxs(BlockWrapper, { className: `font-sans bg-white p-[50px] ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", className: "text-center", title: title }), jsx("div", { className: "font-light text-base-md text-center mt-3", children: description }), calendar ? renderCalendar(calendar) : null] }));
|
|
1932
1945
|
});
|
|
1933
1946
|
const renderCalendar = (calendar) => {
|
|
1934
1947
|
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
@@ -1944,18 +1957,8 @@
|
|
|
1944
1957
|
const renderMonthNames = (item, colSize) => item.month.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
|
|
1945
1958
|
const renderMonthImages = (item) => item.month.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
1946
1959
|
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick, isShowCounter, currentTag)) }));
|
|
1950
|
-
});
|
|
1951
|
-
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
|
|
1952
|
-
const renderTab$1 = (onTabClick, isShowCounter, currentTag) => (tab, i) => {
|
|
1953
|
-
const isActive = currentTag === tab.tag;
|
|
1954
|
-
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
1955
|
-
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
1956
|
-
const counterBlockStyle = `${badgeStyle}
|
|
1957
|
-
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
|
|
1958
|
-
return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 text-s-bold ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
1960
|
+
const filterBlocksByTag = (blocks, tag) => {
|
|
1961
|
+
return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
|
|
1959
1962
|
};
|
|
1960
1963
|
|
|
1961
1964
|
const EmbeddableGroupBlocks = {
|
|
@@ -1976,11 +1979,21 @@
|
|
|
1976
1979
|
return (jsx(EmbeddedBlock, { context: context, ...block, className: classNameBlock }, `block_${i}`));
|
|
1977
1980
|
};
|
|
1978
1981
|
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1982
|
+
const GroupBlockTabs = JSX((props) => {
|
|
1983
|
+
const { tabs, currentTag, onTabClick, className = '', isShowCounter } = props;
|
|
1984
|
+
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick, isShowCounter, currentTag)) }));
|
|
1985
|
+
});
|
|
1986
|
+
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
|
|
1987
|
+
const renderTab$1 = (onTabClick, isShowCounter, currentTag) => (tab, i) => {
|
|
1988
|
+
const isActive = currentTag === tab.tag;
|
|
1989
|
+
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
1990
|
+
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
1991
|
+
const counterBlockStyle = `${badgeStyle}
|
|
1992
|
+
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
|
|
1993
|
+
return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 text-s-bold ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
1981
1994
|
};
|
|
1982
1995
|
|
|
1983
|
-
const GroupBlock = JSX(({ className = '', tabs, context,
|
|
1996
|
+
const GroupBlock = JSX(({ className = '', tabs, context, groupBlocks = [], isShowCounter, ...rest }) => {
|
|
1984
1997
|
const [currentTag, setCurrentTag] = context.useState(tabs?.[0]?.tag);
|
|
1985
1998
|
const filteredBlocks = filterBlocksByTag(groupBlocks, currentTag);
|
|
1986
1999
|
const tabsNewMap = tabs?.map((tab) => {
|
|
@@ -1989,7 +2002,7 @@
|
|
|
1989
2002
|
: groupBlocks.length;
|
|
1990
2003
|
return { ...tab, count };
|
|
1991
2004
|
});
|
|
1992
|
-
return (jsxs(
|
|
2005
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border gap-1 ${className}`, ...rest, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap, isShowCounter: isShowCounter })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
|
|
1993
2006
|
});
|
|
1994
2007
|
|
|
1995
2008
|
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
@@ -2108,18 +2121,18 @@
|
|
|
2108
2121
|
'bg-white': 'bg-main-divider',
|
|
2109
2122
|
transparent: 'bg-main-divider opacity-30',
|
|
2110
2123
|
};
|
|
2111
|
-
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems,
|
|
2124
|
+
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems, logo, ...rest }) => {
|
|
2112
2125
|
const router = context.useRouter();
|
|
2113
2126
|
const sitemap = useSitemap(context.useAsyncData);
|
|
2114
2127
|
const { handlerDecorator } = context;
|
|
2115
2128
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
2116
2129
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
2117
2130
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
|
|
2118
|
-
return (jsx("header",
|
|
2131
|
+
return (jsx(BlockWrapper, { Tag: "header", context: context, className: `pt-6 pb-8 px-20 ${bgColor} ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { context: context, subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2119
2132
|
});
|
|
2120
2133
|
|
|
2121
|
-
const Insurance = JSX(({ className = '', title, description, image, benefits, sum, monthLimit }) => {
|
|
2122
|
-
return (jsxs(
|
|
2134
|
+
const Insurance = JSX(({ className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
2135
|
+
return (jsxs(BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center" }) : null, description ? jsx("div", { className: "text-center text-md mt-3", children: description }) : null, jsx("div", { children: jsxs("div", { className: "mt-5 mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? jsx(Img, { image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
2123
2136
|
});
|
|
2124
2137
|
function renderBenefit(benefit, i) {
|
|
2125
2138
|
return (jsxs("div", { className: "flex items-center gap-4", children: [benefit?.icon ? (jsx(Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, jsxs("div", { children: [benefit?.label ? jsx("div", { className: "text-title-2xs font-normal", children: benefit.label }) : null, benefit?.description ? (jsx("div", { className: "mt-0.5 font-light text-secondary-text font-light", children: benefit.description })) : null] })] }, String(i)));
|
|
@@ -2134,7 +2147,7 @@
|
|
|
2134
2147
|
return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-base", children: title }), jsxs("span", { className: "text-primary-main text-title-2xs", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
|
|
2135
2148
|
}
|
|
2136
2149
|
|
|
2137
|
-
const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = []
|
|
2150
|
+
const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = [] }) => {
|
|
2138
2151
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2139
2152
|
const [tabsShift, setTabsShift] = context.useState(0);
|
|
2140
2153
|
const handleNextClick = () => setTabsShift(tabsShift + 1);
|
|
@@ -2144,7 +2157,7 @@
|
|
|
2144
2157
|
const showNextButton = isGalleryScrollAvailable && galleryLength > tabsShift + 2;
|
|
2145
2158
|
const isLastShift = galleryLength === tabsShift + 2;
|
|
2146
2159
|
const showPrevButton = tabsShift > 0;
|
|
2147
|
-
return (jsx("section", {
|
|
2160
|
+
return (jsx("section", { className: `min-w-full ${className}`, children: jsxs("div", { className: "relative mt-7 overflow-hidden", children: [galleryLength
|
|
2148
2161
|
? renderGallery({
|
|
2149
2162
|
tabsShift,
|
|
2150
2163
|
cards,
|
|
@@ -2182,9 +2195,9 @@
|
|
|
2182
2195
|
return isActive ? (jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4`, image: "DoneIcon", width: "24", height: "24" })) : null;
|
|
2183
2196
|
}
|
|
2184
2197
|
|
|
2185
|
-
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button,
|
|
2198
|
+
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button, ...rest }) => {
|
|
2186
2199
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2187
|
-
return (jsxs(
|
|
2200
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, jsx("div", { className: "p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2188
2201
|
title: item?.title,
|
|
2189
2202
|
i,
|
|
2190
2203
|
activeSlideIndex,
|
|
@@ -2213,12 +2226,12 @@
|
|
|
2213
2226
|
primary: 'bg-white text-primary-text',
|
|
2214
2227
|
secondary: 'bg-primary-main text-white',
|
|
2215
2228
|
};
|
|
2216
|
-
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons,
|
|
2229
|
+
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, ...rest }) => {
|
|
2217
2230
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2218
|
-
return (jsxs(
|
|
2231
|
+
return (jsxs(BlockWrapper, { context: context, className: `flex justify-between font-sans p-9 box-border relative
|
|
2219
2232
|
${getTileRightPadding(className)} ${getTileMinHeight(className)}
|
|
2220
2233
|
${mobileAppStyleMap[version]}
|
|
2221
|
-
${className}`,
|
|
2234
|
+
${className}`, ...rest, children: [jsx(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: "h3", title: title, className: `whitespace-pre-wrap max-w-[509px] mb-6
|
|
2222
2235
|
${textColorClass}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-[30px] gap-4" })) : null, children: jsxs("div", { className: "flex flex-1 items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", "aria-label": title, children: jsx("img", { src: qr.src, alt: title, title: title, width: "122", height: "122", className: "w-[122px] h-[122px] min-w-[122px] min-h-[122px] bg-secondary-light mr-[23px] rounded-md" }) })), renderList$1(version, items)] }) }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(Img, { image: image }) })) : null] }));
|
|
2223
2236
|
});
|
|
2224
2237
|
const renderList$1 = (version, items) => {
|
|
@@ -2227,18 +2240,18 @@
|
|
|
2227
2240
|
|
|
2228
2241
|
const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
2229
2242
|
|
|
2230
|
-
const Navigation = JSX(({ className, context, title, buttons,
|
|
2243
|
+
const Navigation = JSX(({ className, context, title, buttons, ...rest }) => {
|
|
2231
2244
|
const router = context.useRouter();
|
|
2232
2245
|
const { handlerDecorator } = context;
|
|
2233
2246
|
const activeButton = findActiveSubItem(router)(buttons);
|
|
2234
|
-
return (jsxs(
|
|
2247
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, ...rest, children: [jsx("h2", { className: "font-medium text-xl-light m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
2235
2248
|
.filter(({ text }) => text)
|
|
2236
2249
|
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2237
2250
|
});
|
|
2238
2251
|
|
|
2239
2252
|
const TEXT_CLASSES = 'font-sans font-normal text-m-md';
|
|
2240
2253
|
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2241
|
-
const NavigatorTabItem = JSX(({ className = '', text, active,
|
|
2254
|
+
const NavigatorTabItem = JSX(({ className = '', text, active, onClick, href, target = '_self', children }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: text || children }) })));
|
|
2242
2255
|
const getLinkClasses = (className, active) => {
|
|
2243
2256
|
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
2244
2257
|
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
@@ -2248,16 +2261,15 @@
|
|
|
2248
2261
|
return `${classes} ${TEXT_CLASSES}`;
|
|
2249
2262
|
};
|
|
2250
2263
|
|
|
2251
|
-
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context,
|
|
2252
|
-
|
|
2253
|
-
return (jsx("section", { className: `sticky top-0 z-20 box-border flex gap-x-1 h-14 ${className}`, id: anchor, children: navigatorTabs ? navigatorTabs.map(renderTab(context, href)) : null }));
|
|
2264
|
+
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, ...rest }) => {
|
|
2265
|
+
return (jsx(BlockWrapper, { context: context, className: `sticky top-0 z-20 box-border flex gap-x-1 h-14 ${className}`, ...rest, children: navigatorTabs ? navigatorTabs.map(renderTab(context)) : null }));
|
|
2254
2266
|
});
|
|
2255
|
-
const renderTab = (context
|
|
2256
|
-
const {
|
|
2267
|
+
const renderTab = (context) => (tab, i) => {
|
|
2268
|
+
const { handlerDecorator, useRouter } = context;
|
|
2257
2269
|
const router = useRouter();
|
|
2258
|
-
const hash = getHash(href);
|
|
2270
|
+
const hash = getHash(router.href);
|
|
2259
2271
|
const active = hash ? tab.href === hash : i === 0;
|
|
2260
|
-
return (jsx(NavigatorTabItem, { active: active, ...useLink({ router, handlerDecorator }, tab) }, tab.
|
|
2272
|
+
return (jsx(NavigatorTabItem, { active: active, ...useLink({ router, handlerDecorator }, tab) }, tab.text));
|
|
2261
2273
|
};
|
|
2262
2274
|
|
|
2263
2275
|
const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
@@ -2305,13 +2317,13 @@
|
|
|
2305
2317
|
return jsx("div", { className: "box-border", children: children });
|
|
2306
2318
|
});
|
|
2307
2319
|
|
|
2308
|
-
const OtherProducts = JSX(({ blockItems, colorPalette, context, className = '' }) => {
|
|
2309
|
-
return (jsx(
|
|
2320
|
+
const OtherProducts = JSX(({ blockItems, colorPalette, context, className = '', ...rest }) => {
|
|
2321
|
+
return (jsx(BlockWrapper, { context: context, className: `font-sans text-primary-text ${className}`, ...rest, children: blockItems?.length ? (jsx("div", { className: "box-border1", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, dataTheme: colorPalette, context: context }, `BlockItem${i}`))) })) : null }));
|
|
2310
2322
|
});
|
|
2311
2323
|
|
|
2312
2324
|
const GOLDEN_RATIO = 1.618;
|
|
2313
|
-
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...',
|
|
2314
|
-
return (jsx(
|
|
2325
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
|
|
2326
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
|
|
2315
2327
|
});
|
|
2316
2328
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
2317
2329
|
.map((_) => Math.floor(_))
|
|
@@ -2331,12 +2343,12 @@
|
|
|
2331
2343
|
primary: 'bg-white text-primary-text',
|
|
2332
2344
|
secondary: 'bg-primary-main text-white',
|
|
2333
2345
|
};
|
|
2334
|
-
const ProductGallery = JSX(({ className = '', context, slides = [], version = 'primary',
|
|
2346
|
+
const ProductGallery = JSX(({ className = '', context, slides = [], version = 'primary', ...rest }) => {
|
|
2335
2347
|
const galleryNav = slides.map((s) => s.nav);
|
|
2336
2348
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
2337
2349
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2338
|
-
return (jsxs(
|
|
2339
|
-
${productGalleryStyleMap[version]}`, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2350
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border pt-[50px] overflow-hidden relative font-sans w-100 ${className}
|
|
2351
|
+
${productGalleryStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2340
2352
|
slide,
|
|
2341
2353
|
i,
|
|
2342
2354
|
activeSlideIndex,
|
|
@@ -2371,8 +2383,8 @@
|
|
|
2371
2383
|
primary: 'bg-white text-primary-text',
|
|
2372
2384
|
secondary: 'bg-primary-main text-white',
|
|
2373
2385
|
};
|
|
2374
|
-
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary',
|
|
2375
|
-
return (jsx(
|
|
2386
|
+
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
2387
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-sm mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-base", children: description })] }) }) }));
|
|
2376
2388
|
});
|
|
2377
2389
|
function formatDate(date) {
|
|
2378
2390
|
const dateObj = new Date(date);
|
|
@@ -2391,11 +2403,11 @@
|
|
|
2391
2403
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
2392
2404
|
const CARD_FULL_VIEW_COUNT = 2;
|
|
2393
2405
|
const CARD_SHIFT = 525;
|
|
2394
|
-
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version,
|
|
2406
|
+
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version, ...rest }) => {
|
|
2395
2407
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
2396
2408
|
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
2397
2409
|
const cardClassName = version === 'secondary' ? 'border-white/50' : 'border-main-stroke';
|
|
2398
|
-
return (jsxs(
|
|
2410
|
+
return (jsxs(BlockWrapper, { context: context, className: `relative font-sans p-9 overflow-hidden text-center ${blockClassName} ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h2", className: "mb-6", title: title }) : null, jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
2399
2411
|
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
2400
2412
|
: null }), renderNavButtons({
|
|
2401
2413
|
cardsCount: recommendations.length,
|
|
@@ -2420,6 +2432,8 @@
|
|
|
2420
2432
|
}) }));
|
|
2421
2433
|
};
|
|
2422
2434
|
|
|
2435
|
+
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
2436
|
+
|
|
2423
2437
|
const STEPS_BLOCK_STYLE_MAPS = {
|
|
2424
2438
|
primary: {
|
|
2425
2439
|
background: 'bg-white',
|
|
@@ -2438,19 +2452,17 @@
|
|
|
2438
2452
|
};
|
|
2439
2453
|
const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
2440
2454
|
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2443
|
-
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null, version = 'primary', }) => {
|
|
2455
|
+
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, version = 'primary', ...rest }) => {
|
|
2444
2456
|
const styleMap = getStyleMap(version);
|
|
2445
2457
|
const shortGaps = steps.length > 3;
|
|
2446
|
-
return (jsxs(
|
|
2458
|
+
return (jsxs(BlockWrapper, { className: [
|
|
2447
2459
|
'box-border font-sans text-primary-text bg-white',
|
|
2448
2460
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
2449
2461
|
'py-[50px] flex flex-col items-center',
|
|
2450
2462
|
styleMap.background,
|
|
2451
2463
|
styleMap.title,
|
|
2452
2464
|
className,
|
|
2453
|
-
].join(' '),
|
|
2465
|
+
].join(' '), ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle(styleMap, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "mt-8 w-full max-w-[240px]", version: "primary", ...button })) : null] }));
|
|
2454
2466
|
});
|
|
2455
2467
|
const renderStepIcon = (styleMap) => ({ icon }, i) => {
|
|
2456
2468
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`, children: checkIsIconRenderable(icon) ? (jsx(Img, { image: icon, width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `font-normal text-title-sm ${styleMap.title}`, children: i + 1 })) }) }, String(i)));
|
|
@@ -2478,7 +2490,7 @@
|
|
|
2478
2490
|
return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
|
|
2479
2491
|
});
|
|
2480
2492
|
|
|
2481
|
-
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns,
|
|
2493
|
+
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns, hiddenRowsNum = 0, ...rest }) => {
|
|
2482
2494
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
2483
2495
|
const colData = getColData(columns);
|
|
2484
2496
|
const rowData = getRowData(rowHeaders, colData);
|
|
@@ -2489,7 +2501,7 @@
|
|
|
2489
2501
|
setActiveCardIndex,
|
|
2490
2502
|
});
|
|
2491
2503
|
const foldableBlocks = rowData?.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i))));
|
|
2492
|
-
return (jsxs(
|
|
2504
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${description ? 'mb-2.5' : 'mb-9'}`, title: title })) : null, description ? jsx("div", { className: "mb-9 text-center text-m-base", children: description }) : null, rowData?.length ? (jsx(Foldable, { blocks: foldableBlocks, hiddenBlocksNum: hiddenRowsNum, context: context, render: (children) => (jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: children })), foldButtonLabel: "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C" })) : null] }));
|
|
2493
2505
|
});
|
|
2494
2506
|
const getColData = (columns) => columns?.map(({ data }) => data) || [];
|
|
2495
2507
|
const getRowData = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
@@ -2537,22 +2549,6 @@
|
|
|
2537
2549
|
BonusBenefitsBlock,
|
|
2538
2550
|
};
|
|
2539
2551
|
|
|
2540
|
-
const changeHashOnScroll = (router, blocks) => {
|
|
2541
|
-
blocks?.forEach((block) => {
|
|
2542
|
-
const currentHash = globalThis.location?.hash; // TODO: remove globalThis, use href from router
|
|
2543
|
-
const anchorHash = `#${block?.id}`;
|
|
2544
|
-
if (currentHash === anchorHash) {
|
|
2545
|
-
return;
|
|
2546
|
-
}
|
|
2547
|
-
const position = block?.getBoundingClientRect();
|
|
2548
|
-
if (position && position.top > 0 && position.top < 150) {
|
|
2549
|
-
router.replace(`#${block?.id}`);
|
|
2550
|
-
}
|
|
2551
|
-
});
|
|
2552
|
-
};
|
|
2553
|
-
|
|
2554
|
-
const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
2555
|
-
|
|
2556
2552
|
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
2557
2553
|
const renderLikeIcon = () => {
|
|
2558
2554
|
const params = {
|
|
@@ -2564,22 +2560,14 @@
|
|
|
2564
2560
|
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
|
|
2565
2561
|
};
|
|
2566
2562
|
|
|
2567
|
-
const LikeControl = JSX(({ className, context,
|
|
2563
|
+
const LikeControl = JSX(({ className, context, ...rest }) => {
|
|
2568
2564
|
const likeService = context.useLikeService();
|
|
2569
|
-
return (jsxs("div",
|
|
2565
|
+
return (jsxs(BlockWrapper, { Tag: "div", context: context, className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, ...rest, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
2570
2566
|
});
|
|
2571
2567
|
|
|
2572
|
-
const isClient = !isSSR();
|
|
2573
2568
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
2574
2569
|
const ContentPage = JSX(({ className = '', context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
|
|
2575
2570
|
const { header } = slots;
|
|
2576
|
-
const router = context.useRouter();
|
|
2577
|
-
// listener is for NavigatorTabs
|
|
2578
|
-
isClient &&
|
|
2579
|
-
globalThis.addEventListener('load', () => {
|
|
2580
|
-
const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
|
|
2581
|
-
globalThis.document.addEventListener('scroll', () => changeHashOnScroll(router, sectionsWithAnchors));
|
|
2582
|
-
});
|
|
2583
2571
|
return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl ? (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") })) : null] }));
|
|
2584
2572
|
});
|
|
2585
2573
|
function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
|