@redneckz/wildless-cms-uni-blocks 0.3.28 → 0.3.31
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 +132 -107
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +2 -6
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +3 -3
- package/dist/components/Accordion/AccordionItem.js +4 -11
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +6 -3
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.js +2 -2
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +2 -3
- package/dist/components/Accordion/AccordionItemInner.mobile.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 +2 -2
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BlockContent.d.ts +3 -2
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +3 -3
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/dist/components/ContentPage/normalizeBlock.d.ts +1 -0
- package/dist/components/CreditCalculator/CreditCalculator.js +2 -2
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +1 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -2
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Headline/Headline.js +2 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/LikeControl/LikeControl.js +2 -2
- package/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkList/LinkList.js +2 -2
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +2 -2
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/dist/components/PictureText/PictureText.js +2 -2
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +2 -2
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +2 -2
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +2 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +2 -2
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +2 -2
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +2 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +2 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/setup-fixture.js +22 -6
- package/dist/setup-fixture.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +8 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.js +17 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.js.map +1 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/dist/ui-kit/Tabs/Tabs.js +1 -1
- package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +9 -1
- package/dist/utils/url.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -6
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +3 -3
- package/lib/components/Accordion/AccordionItem.js +4 -11
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +6 -3
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.js +2 -2
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +2 -3
- package/lib/components/Accordion/AccordionItemInner.mobile.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 +2 -2
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BlockContent.d.ts +3 -2
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +3 -3
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +3 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/lib/components/ContentPage/normalizeBlock.d.ts +1 -0
- package/lib/components/CreditCalculator/CreditCalculator.js +2 -2
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +1 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Headline/Headline.js +2 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/LikeControl/LikeControl.js +2 -2
- package/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +2 -2
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkList/LinkList.js +2 -2
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/Navigation/Navigation.js +2 -2
- package/lib/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.fixture.d.ts +4 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/lib/components/PictureText/PictureText.js +2 -2
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +2 -2
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +2 -2
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +2 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +2 -2
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +2 -2
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +2 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +2 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/setup-fixture.js +22 -6
- package/lib/setup-fixture.js.map +1 -1
- package/lib/types.d.ts +2 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +8 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.js +15 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.js.map +1 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.d.ts +3 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +4 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/lib/ui-kit/Tabs/Tabs.js +1 -1
- package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/lib/utils/url.d.ts +1 -0
- package/lib/utils/url.js +7 -0
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +104 -204
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +3 -3
- package/mobile/dist/components/Accordion/AccordionItem.js +6 -3
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.js +2 -3
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +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 +2 -2
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BlockContent.d.ts +3 -2
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js +2 -2
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.js +1 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/LikeControl/LikeControl.js +2 -2
- package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js +2 -2
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/Navigation/Navigation.js +2 -2
- package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/mobile/dist/components/PictureText/PictureText.js +2 -2
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +2 -2
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +2 -2
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +2 -2
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/setup-fixture.js +22 -6
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/types.d.ts +2 -0
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +0 -4
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js +0 -8
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/utils/url.d.ts +1 -0
- package/mobile/dist/utils/url.js +9 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +3 -3
- package/mobile/lib/components/Accordion/AccordionItem.js +6 -3
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.js +2 -3
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- 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 +2 -2
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +3 -2
- package/mobile/lib/components/ContentPage/ContentPage.js +3 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js +2 -2
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.js +1 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/LikeControl/LikeControl.js +2 -2
- package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js +2 -2
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/Navigation/Navigation.js +2 -2
- package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/mobile/lib/components/PictureText/PictureText.js +2 -2
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +2 -2
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +2 -2
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +2 -2
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/setup-fixture.js +22 -6
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/types.d.ts +2 -0
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +0 -4
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js +0 -8
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/utils/url.d.ts +1 -0
- package/mobile/lib/utils/url.js +7 -0
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/common.css +4 -0
- package/mobile/src/components/Accordion/Accordion.example.json +3 -0
- package/mobile/src/components/Accordion/AccordionContent.ts +4 -5
- package/mobile/src/components/Accordion/AccordionItem.tsx +32 -27
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +8 -11
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +30 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +2 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryInner.tsx +2 -1
- package/mobile/src/components/Header/Header.example.json +3 -0
- package/mobile/src/components/LikeControl/LikeControl.tsx +3 -2
- package/mobile/src/components/LinkList/LinkList.tsx +2 -2
- package/mobile/src/components/Navigation/Navigation.tsx +31 -28
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
- package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +3 -12
- package/mobile/src/components/PictureText/PictureText.tsx +18 -13
- package/mobile/src/components/Placeholder/Placeholder.tsx +2 -1
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -0
- package/mobile/src/components/PromoTile/PromoTile.tsx +2 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +2 -1
- package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/mobile/src/components/Tile/Tile.tsx +2 -0
- package/mobile/src/services/sitemap/isTopItemActive.spec.ts +1 -0
- package/mobile/src/setup-fixture.ts +23 -8
- package/mobile/src/types.ts +2 -0
- package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +0 -8
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +4 -12
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.spec.ts +18 -0
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +10 -2
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +1 -1
- package/mobile/src/utils/url.ts +9 -0
- package/package.json +1 -1
- package/src/common.css +4 -0
- package/src/components/Accordion/Accordion.example.json +3 -0
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +1 -0
- package/src/components/Accordion/Accordion.fixture.tsx +2 -0
- package/src/components/Accordion/Accordion.tsx +4 -14
- package/src/components/Accordion/AccordionContent.ts +4 -5
- package/src/components/Accordion/AccordionItem.mobile.tsx +32 -27
- package/src/components/Accordion/AccordionItem.tsx +23 -49
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +8 -11
- package/src/components/Accordion/AccordionItemInner.tsx +8 -10
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.tsx +4 -2
- package/src/components/ContentPage/ContentPage.page.json +30 -0
- package/src/components/ContentPage/ContentPage.tsx +3 -3
- package/src/components/ContentPage/ContentPageContext.tsx +2 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
- package/src/components/Footer/Footer.tsx +11 -2
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Gallery/GalleryInner.tsx +2 -1
- package/src/components/Header/Header.example.json +3 -0
- package/src/components/Header/Header.tsx +9 -2
- package/src/components/Headline/Headline.tsx +9 -2
- package/src/components/LikeControl/LikeControl.tsx +3 -2
- package/src/components/LinkDocs/LinkDocs.tsx +2 -1
- package/src/components/LinkList/LinkList.tsx +2 -2
- package/src/components/MobileAppTile/MobileAppTile.tsx +9 -1
- package/src/components/Navigation/Navigation.tsx +31 -28
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
- package/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
- package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +11 -0
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
- package/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +61 -6
- package/src/components/OtherProducts/OtherProductsContent.ts +3 -12
- package/src/components/PictureText/PictureText.tsx +18 -13
- package/src/components/Placeholder/Placeholder.tsx +2 -1
- package/src/components/ProductBlock/ProductBlock.tsx +10 -1
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.tsx +5 -2
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
- package/src/components/ProductTile/ProductTile.tsx +2 -0
- package/src/components/PromoTile/PromoTile.tsx +2 -0
- package/src/components/Recommendation/Recommendation.tsx +2 -1
- package/src/components/StepsBlock/StepsBlock.tsx +25 -22
- package/src/components/TariffsTable/TariffsTable.tsx +2 -1
- package/src/components/TextBlock/TextBlock.tsx +10 -1
- package/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/src/components/Tile/Tile.tsx +2 -0
- package/src/services/sitemap/isTopItemActive.spec.ts +1 -0
- package/src/setup-fixture.ts +23 -8
- package/src/types.ts +2 -0
- package/src/ui-kit/BlocksList/EmbeddableBlocks.mobile.tsx +15 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +4 -12
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +24 -6
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.spec.ts +18 -0
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +10 -2
- package/src/ui-kit/Tabs/Tabs.tsx +1 -1
- package/src/utils/url.ts +9 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -429,9 +429,9 @@
|
|
|
429
429
|
},
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
-
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description }) => {
|
|
432
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description, anchor = null, }) => {
|
|
433
433
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
434
|
-
return (jsxs("section", { className: `p-[50px] ${STYLE_MAPS.background} ${className}`, children: [title && (jsx(Heading, { headingType: "h2", className: `text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })), description && (jsx("p", { className: `font-normal text-base mt-4 ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, children: description }))] }));
|
|
434
|
+
return (jsxs("section", { className: `p-[50px] ${STYLE_MAPS.background} ${className}`, id: anchor, children: [title && (jsx(Heading, { headingType: "h2", className: `text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })), description && (jsx("p", { className: `font-normal text-base mt-4 ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, children: description }))] }));
|
|
435
435
|
});
|
|
436
436
|
|
|
437
437
|
const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
|
|
@@ -470,8 +470,8 @@
|
|
|
470
470
|
double: 'flex gap-x-5 gap-y-[26px] flex-wrap',
|
|
471
471
|
single: 'flex gap-3.5 flex-col',
|
|
472
472
|
};
|
|
473
|
-
const LinkDocs = JSX(({ className = '', title, subtitle, align, documents, icon = 'DocIcon', columnsMode = 'double', }) => {
|
|
474
|
-
return (jsxs("section", { className: `font-sans text-primary-text p-12 bg-white ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `${subtitle ? 'mb-2.5' : titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, title: title })) : null, subtitle ? (jsx("h3", { className: `text-base mt-0 font-normal ${titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, children: subtitle })) : null, jsx(LinkDocsList, { className: linkColumnsModeStyleMap[columnsMode], columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
473
|
+
const LinkDocs = JSX(({ className = '', title, subtitle, align, documents, icon = 'DocIcon', columnsMode = 'double', anchor = null, }) => {
|
|
474
|
+
return (jsxs("section", { className: `font-sans text-primary-text p-12 bg-white ${className}`, id: anchor, children: [title ? (jsx(Heading, { headingType: "h2", className: `${subtitle ? 'mb-2.5' : titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, title: title })) : null, subtitle ? (jsx("h3", { className: `text-base mt-0 font-normal ${titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, children: subtitle })) : null, jsx(LinkDocsList, { className: linkColumnsModeStyleMap[columnsMode], columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
475
475
|
});
|
|
476
476
|
|
|
477
477
|
const Img = JSX(({ className = '', image: { size, ...image }, imageClassName = '' }) => {
|
|
@@ -489,8 +489,8 @@
|
|
|
489
489
|
return format ? `image/${String(format)}` : undefined;
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
const PictureText = JSX(({ className = '', title, image, benefits }) => {
|
|
493
|
-
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-14 ${className}`, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: "mr-6", image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map(renderBenefit$1) })) : null] })] }));
|
|
492
|
+
const PictureText = JSX(({ className = '', title, image, benefits, anchor = null }) => {
|
|
493
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-14 ${className}`, id: anchor, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: "mr-6", image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map(renderBenefit$1) })) : null] })] }));
|
|
494
494
|
});
|
|
495
495
|
function renderBenefit$1(benefit, i) {
|
|
496
496
|
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon && (jsx(Icon, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", name: benefit.icon, width: "48", height: "48", asSVG: true })), jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit.label && (jsx("div", { className: "font-medium text-primary-text text-xl m-0", children: benefit.label })), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
|
|
@@ -508,12 +508,20 @@
|
|
|
508
508
|
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
509
509
|
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
510
510
|
};
|
|
511
|
+
const getHash = (href) => {
|
|
512
|
+
if (!href || !isURL(href)) {
|
|
513
|
+
return undefined;
|
|
514
|
+
}
|
|
515
|
+
const hashIndex = href.indexOf('#');
|
|
516
|
+
return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
|
|
517
|
+
};
|
|
511
518
|
|
|
512
519
|
var url = /*#__PURE__*/Object.freeze({
|
|
513
520
|
__proto__: null,
|
|
514
521
|
isURL: isURL,
|
|
515
522
|
withoutQuery: withoutQuery,
|
|
516
|
-
getOrigin: getOrigin
|
|
523
|
+
getOrigin: getOrigin,
|
|
524
|
+
getHash: getHash
|
|
517
525
|
});
|
|
518
526
|
|
|
519
527
|
const MOBILE_URL_PATH = '/mobile';
|
|
@@ -584,7 +592,7 @@
|
|
|
584
592
|
};
|
|
585
593
|
const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
|
|
586
594
|
|
|
587
|
-
const buttonStyleMap
|
|
595
|
+
const buttonStyleMap = {
|
|
588
596
|
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
589
597
|
secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
|
|
590
598
|
link: '',
|
|
@@ -600,7 +608,7 @@
|
|
|
600
608
|
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
|
|
601
609
|
return disabled ? (jsx(DisabledButton, { ...props, children: buttonInner })) : (jsx(RegularButton, { ...props, children: buttonInner }));
|
|
602
610
|
});
|
|
603
|
-
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap
|
|
611
|
+
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children })));
|
|
604
612
|
const DisabledButton = JSX(({ className, children, ariaLabel, version = 'none', rounded }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${buttonStyle} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: children })));
|
|
605
613
|
|
|
606
614
|
const ButtonSection = JSX(({ context, className = '', buttons }) => {
|
|
@@ -645,8 +653,8 @@
|
|
|
645
653
|
: null }));
|
|
646
654
|
});
|
|
647
655
|
|
|
648
|
-
const BaseTile = JSX(({ className = '', title, children, buttons, image }) => {
|
|
649
|
-
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] })] }));
|
|
656
|
+
const BaseTile = JSX(({ className = '', title, children, buttons, image, anchor = null }) => {
|
|
657
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, id: anchor, 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] })] }));
|
|
650
658
|
});
|
|
651
659
|
|
|
652
660
|
const benefitIconBgStyleMap = {
|
|
@@ -667,7 +675,7 @@
|
|
|
667
675
|
|
|
668
676
|
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
669
677
|
const textColor = version === 'secondary' ? 'text-white' : '';
|
|
670
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType, textColor), buttons: getButtons(context, buttons), children: [description && (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })), benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? (jsx(List, { className: "mt-5", items: items, itemClassName: "mb-[10px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
678
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType, textColor), buttons: getButtons(context, buttons), children: [description && (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })), benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-m-base", items: items, itemClassName: "mb-[10px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
671
679
|
});
|
|
672
680
|
const getTitle = (title, headingType, textColor) => {
|
|
673
681
|
return (title && (jsx(Heading, { headingType: headingType, title: title, className: `whitespace-pre-wrap max-w-[600px] ${textColor}` })));
|
|
@@ -685,10 +693,10 @@
|
|
|
685
693
|
secondary: 'text-white/80',
|
|
686
694
|
};
|
|
687
695
|
const ProductBlock = JSX((props) => {
|
|
688
|
-
const { context, version = 'primary',
|
|
696
|
+
const { context, className, breadcrumbs, version = 'primary', anchor = null, ...otherProps } = props;
|
|
689
697
|
const router = context.useRouter();
|
|
690
698
|
const { handlerDecorator } = context;
|
|
691
|
-
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''} ${productBlockStyleMap[version]}`, children: [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 })] }));
|
|
699
|
+
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''} ${productBlockStyleMap[version]}`, id: anchor, children: [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 })] }));
|
|
692
700
|
});
|
|
693
701
|
|
|
694
702
|
const textBlockStyleMaps = {
|
|
@@ -711,9 +719,9 @@
|
|
|
711
719
|
description: 'text-secondary-text',
|
|
712
720
|
},
|
|
713
721
|
};
|
|
714
|
-
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className }) => {
|
|
722
|
+
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, anchor = null, }) => {
|
|
715
723
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
716
|
-
return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, children: [iconVersion === 'small' ? renderIcon$1(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 })), description && (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description }))] })] }));
|
|
724
|
+
return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, id: anchor, children: [iconVersion === 'small' ? renderIcon$1(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 })), description && (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description }))] })] }));
|
|
717
725
|
});
|
|
718
726
|
function renderIcon$1(className) {
|
|
719
727
|
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" }) }));
|
|
@@ -772,8 +780,8 @@
|
|
|
772
780
|
secondary: 'bg-primary-main text-white',
|
|
773
781
|
};
|
|
774
782
|
const Tile = JSX((props) => {
|
|
775
|
-
const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, } = props;
|
|
776
|
-
return (jsx("section", { className: `overflow-hidden font-sans p-9 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
783
|
+
const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
|
|
784
|
+
return (jsx("section", { className: `overflow-hidden font-sans p-9 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
777
785
|
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), children, renderList$1(items, version)] }) }));
|
|
778
786
|
});
|
|
779
787
|
function renderList$1(items, version) {
|
|
@@ -784,8 +792,8 @@
|
|
|
784
792
|
primary: 'bg-white text-primary-text',
|
|
785
793
|
secondary: 'bg-primary-main text-white',
|
|
786
794
|
};
|
|
787
|
-
const ProductTile = JSX(({ context, className = '', title, description, benefits, buttons, image, version = 'primary', }) => {
|
|
788
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), jsxs("div", { className: "flex mt-5 mb-1", children: [benefits?.length ? (jsx("div", { className: "mr-8", children: benefits.map(renderBenefitLabel) })) : null, benefits?.length ? (jsx("div", { className: "pt-1", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] })] }) }));
|
|
795
|
+
const ProductTile = JSX(({ context, className = '', title, description, benefits, buttons, image, version = 'primary', anchor = null, }) => {
|
|
796
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), jsxs("div", { className: "flex mt-5 mb-1", children: [benefits?.length ? (jsx("div", { className: "mr-8", children: benefits.map(renderBenefitLabel) })) : null, benefits?.length ? (jsx("div", { className: "pt-1", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] })] }) }));
|
|
789
797
|
});
|
|
790
798
|
function renderBenefitLabel(benefit, i) {
|
|
791
799
|
return (jsx("div", { className: `text-xl font-medium ${i ? 'mt-2.5' : ''}`, children: benefit.label }, String(i)));
|
|
@@ -863,7 +871,7 @@
|
|
|
863
871
|
items-stretch ${cardStyleMap[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
864
872
|
}
|
|
865
873
|
|
|
866
|
-
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', ...rest }) => {
|
|
874
|
+
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', anchor = null, ...rest }) => {
|
|
867
875
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
868
876
|
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
869
877
|
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
@@ -871,15 +879,15 @@
|
|
|
871
879
|
const showNextButton = isGalleryScrollAvailable &&
|
|
872
880
|
cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
|
|
873
881
|
const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
|
|
874
|
-
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px]", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
|
|
882
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px]", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
|
|
875
883
|
});
|
|
876
884
|
|
|
877
885
|
const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
878
886
|
|
|
879
887
|
const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
|
|
880
888
|
|
|
881
|
-
const LinkList = JSX(({ className = '', documents }) => {
|
|
882
|
-
return (jsx("section", { className: `font-sans bg-white mt-[10px] ${className}`, children: jsx("ul", { className: "flex flex-col text-sm text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
|
|
889
|
+
const LinkList = JSX(({ className = '', documents, anchor = null }) => {
|
|
890
|
+
return (jsx("section", { className: `font-sans bg-white mt-[10px] ${className}`, id: anchor, children: jsx("ul", { className: "flex flex-col text-sm text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
|
|
883
891
|
});
|
|
884
892
|
const renderLinkListItem = (documents) => {
|
|
885
893
|
return documents.map((doc, i) => {
|
|
@@ -901,20 +909,20 @@
|
|
|
901
909
|
LinkList,
|
|
902
910
|
};
|
|
903
911
|
|
|
904
|
-
const renderBlocksList = ({ blocks, context, className, columns
|
|
905
|
-
const renderBlock$1 = ({ context, columns, className
|
|
912
|
+
const renderBlocksList = ({ blocks, context, className, columns }) => blocks?.length ? blocks.map(renderBlock$1({ context, className, columns })) : null;
|
|
913
|
+
const renderBlock$1 = ({ context, columns, className }) => (block, i) => {
|
|
906
914
|
const type = block?.blockListType;
|
|
907
915
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
908
916
|
return null;
|
|
909
917
|
}
|
|
910
918
|
const columnsCountClass = columns === 2 ? 'w-1/2' : '';
|
|
911
919
|
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
912
|
-
return (jsx("div", { className: `${className} ${columnsCountClass}`, children: jsx(EmbeddedBlock, { context: context, ...block,
|
|
920
|
+
return (jsx("div", { className: `${className} ${columnsCountClass}`, children: jsx(EmbeddedBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
|
|
913
921
|
};
|
|
914
922
|
|
|
915
|
-
const AccordionItemInner = JSX(({ blocks,
|
|
923
|
+
const AccordionItemInner = JSX(({ blocks, context }) => {
|
|
916
924
|
const className = 'mb-5 last:mb-0 pb-5';
|
|
917
|
-
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: renderBlocksList({ context, className,
|
|
925
|
+
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: renderBlocksList({ context, className, blocks }) }));
|
|
918
926
|
});
|
|
919
927
|
|
|
920
928
|
const useActiveHandler$1 = ({ context, blocks, initialState = false }) => {
|
|
@@ -935,39 +943,30 @@
|
|
|
935
943
|
return { isActive, hasContent, icon, handleToggle };
|
|
936
944
|
};
|
|
937
945
|
|
|
938
|
-
const
|
|
939
|
-
primary: 'text-primary-text',
|
|
940
|
-
secondary: 'text-white',
|
|
941
|
-
};
|
|
942
|
-
const buttonHoverStyleMap = {
|
|
943
|
-
primary: 'group-hover:text-primary-main',
|
|
944
|
-
secondary: 'group-hover:text-white',
|
|
945
|
-
};
|
|
946
|
-
const AccordionItem = JSX(({ label, isExpanded, blocks, columns, context, version = 'primary' }) => {
|
|
946
|
+
const AccordionItem = JSX(({ label, isExpanded, blocks, context }) => {
|
|
947
947
|
const { isActive, hasContent, icon, handleToggle } = useActiveHandler$1({
|
|
948
948
|
context,
|
|
949
949
|
blocks,
|
|
950
950
|
initialState: isExpanded,
|
|
951
951
|
});
|
|
952
|
-
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans
|
|
953
|
-
|
|
952
|
+
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans
|
|
953
|
+
${hasContent ? 'group cursor-pointer' : ''}
|
|
954
|
+
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl pr-2.5 font-medium`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
954
955
|
});
|
|
955
956
|
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
secondary: 'bg-primary-main text-white',
|
|
959
|
-
};
|
|
960
|
-
const Accordion = JSX(({ title, accordionItems, context, className = '', version = 'primary' }) => {
|
|
961
|
-
return (jsxs("section", { className: `p-[50px] font-sans ${className} ${accordionStyleMap[version]}`, children: [title ? jsx(Heading, { headingType: "h4", className: "mb-2.5", title: title }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, version: version, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
957
|
+
const Accordion = JSX(({ title, description, accordionItems, context, className = '', anchor = null }) => {
|
|
958
|
+
return (jsxs("section", { className: `p-[50px] font-sans bg-white text-primary-text ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h4", className: "mb-2.5", 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] }));
|
|
962
959
|
});
|
|
963
960
|
|
|
964
|
-
const BenefitsBlock = JSX(({ className, title, benefits }) => {
|
|
965
|
-
return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-8 mt-9", children: benefits.map(renderStep) })) : null] }));
|
|
961
|
+
const BenefitsBlock = JSX(({ className, title, benefits, anchor = null }) => {
|
|
962
|
+
return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className || ''}`, id: anchor, children: [title ? (jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-8 mt-9", children: benefits.map(renderStep) })) : null] }));
|
|
966
963
|
});
|
|
967
964
|
const renderStep = (benefit, i) => {
|
|
968
965
|
return (jsxs("div", { className: "flex items-center gap-5 max-w-[500px]", children: [benefit.icon && (jsx(Icon, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px]", name: benefit.icon, width: "70", height: "70" })), jsxs("div", { children: [jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm mt-2", children: benefit.description }))] })] }, String(i)));
|
|
969
966
|
};
|
|
970
967
|
|
|
968
|
+
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
969
|
+
|
|
971
970
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
972
971
|
const BORDER_CLASSES$1 = 'border-main-stroke border-solid border';
|
|
973
972
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -975,8 +974,6 @@
|
|
|
975
974
|
const COLS_LENGTH_FOR_SCROLL$1 = 2;
|
|
976
975
|
const COLUMN_WIDTH$1 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
977
976
|
|
|
978
|
-
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
979
|
-
|
|
980
977
|
const carouselContainerClassesMap = {
|
|
981
978
|
comparison: 'flex gap-4 duration-1000',
|
|
982
979
|
tariff: 'flex flex-grow duration-1000',
|
|
@@ -1037,10 +1034,10 @@
|
|
|
1037
1034
|
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] }));
|
|
1038
1035
|
});
|
|
1039
1036
|
|
|
1040
|
-
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, }) => {
|
|
1037
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, anchor = null, }) => {
|
|
1041
1038
|
const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
|
|
1042
1039
|
const showToggle = () => setIsShowAllRow(!isShowAllRow);
|
|
1043
|
-
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, 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
|
|
1040
|
+
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, id: anchor, 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
|
|
1044
1041
|
? renderShowMoreToggleButton({ isShowAllRow, onClick: showToggle })
|
|
1045
1042
|
: null] }));
|
|
1046
1043
|
});
|
|
@@ -1051,11 +1048,11 @@
|
|
|
1051
1048
|
const TAB_STYLE = 'px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke';
|
|
1052
1049
|
const ACTIVE_TAB_STYLE = 'px-2 h-16 pt-4 pb-2 text-white bg-primary-main';
|
|
1053
1050
|
const Tabs = JSX(({ tabs, currentTabIndex, onTabClick }) => {
|
|
1054
|
-
return (jsx("div", { className: "flex items-end border-b border-main-stroke", role: "tablist", children: tabs?.map(renderTab(currentTabIndex, onTabClick)) }));
|
|
1051
|
+
return (jsx("div", { className: "flex items-end border-b border-main-stroke", role: "tablist", children: tabs?.map(renderTab$1(currentTabIndex, onTabClick)) }));
|
|
1055
1052
|
});
|
|
1056
|
-
const renderTab = (currentTabIndex, onTabClick) => (tab, index) => {
|
|
1053
|
+
const renderTab$1 = (currentTabIndex, onTabClick) => (tab, index) => {
|
|
1057
1054
|
const isActive = currentTabIndex === index;
|
|
1058
|
-
return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
|
|
1055
|
+
return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
|
|
1059
1056
|
};
|
|
1060
1057
|
const renderIcon = (tab, isActive) => (jsx("div", { className: "h-full mt-1", style: isActive ? { filter: 'invert(1)' } : null, children: jsx(Icon, { className: "w-5 h-5 mr-3", name: tab?.icon || 'CardIcon', asSVG: !isActive }) }));
|
|
1061
1058
|
|
|
@@ -1252,9 +1249,9 @@
|
|
|
1252
1249
|
},
|
|
1253
1250
|
];
|
|
1254
1251
|
|
|
1255
|
-
const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS }) => {
|
|
1252
|
+
const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS, anchor = null }) => {
|
|
1256
1253
|
const [currentTabIndex, setCurrentTabIndex] = context.useState(0);
|
|
1257
|
-
return (jsxs("section", { className: `font-sans text-primary-text py-10 bg-white ${className}`, children: [jsx(Heading, { className: "w-full text-center mb-8", headingType: getTileHeadingType(className), title: "\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440" }), jsx(Tabs, { tabs: tabs, currentTabIndex: currentTabIndex, onTabClick: setCurrentTabIndex }), jsx(CreditCalculatorForm, { context: context, directoryName: tabs[currentTabIndex]?.directoryName })] }));
|
|
1254
|
+
return (jsxs("section", { className: `font-sans text-primary-text py-10 bg-white ${className}`, id: anchor, children: [jsx(Heading, { className: "w-full text-center mb-8", headingType: getTileHeadingType(className), title: "\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440" }), jsx(Tabs, { tabs: tabs, currentTabIndex: currentTabIndex, onTabClick: setCurrentTabIndex }), jsx(CreditCalculatorForm, { context: context, directoryName: tabs[currentTabIndex]?.directoryName })] }));
|
|
1258
1255
|
});
|
|
1259
1256
|
|
|
1260
1257
|
function useExchangeRates(useAsyncData) {
|
|
@@ -1275,7 +1272,7 @@
|
|
|
1275
1272
|
const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
|
|
1276
1273
|
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
1277
1274
|
|
|
1278
|
-
const TABLE_HEAD_STYLE = 'text-left font-normal text-sm text-secondary-text';
|
|
1275
|
+
const TABLE_HEAD_STYLE = 'font-light text-left font-normal text-sm text-secondary-text';
|
|
1279
1276
|
const CURRENCY_ICONS_MAP = {
|
|
1280
1277
|
USD: 'DollarIcon',
|
|
1281
1278
|
EUR: 'EuroIcon',
|
|
@@ -1285,10 +1282,10 @@
|
|
|
1285
1282
|
});
|
|
1286
1283
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1287
1284
|
const code = exchangeCurrencyItem?.currency?.currency;
|
|
1288
|
-
return (jsxs("tr", { children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Icon, { name: CURRENCY_ICONS_MAP[code], width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem.buyExchangeRate) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem.saleExchangeRate) })] }, code));
|
|
1285
|
+
return (jsxs("tr", { className: "pb-1", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Icon, { name: CURRENCY_ICONS_MAP[code], width: "24", height: "24" }) : null, jsx("span", { className: "text-m-title-md ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.buyExchangeRate) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.saleExchangeRate) })] }, code));
|
|
1289
1286
|
};
|
|
1290
1287
|
|
|
1291
|
-
const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex text-sm ${className}`, children: [jsx(Icon, { className: "min-w-fit", name: "GpsIcon", width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-
|
|
1288
|
+
const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex text-sm ${className}`, children: [jsx(Icon, { className: "min-w-fit", name: "GpsIcon", width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3 font-light", children: [address ? jsx("p", { className: "m-0 mb-[3px]", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
|
|
1292
1289
|
|
|
1293
1290
|
const Input = JSX(({ className = '', id, name, type = 'text', placeholder }) => {
|
|
1294
1291
|
return (jsx("input", { className: className, id: id, name: name || id, type: type, placeholder: placeholder }));
|
|
@@ -1303,10 +1300,10 @@
|
|
|
1303
1300
|
});
|
|
1304
1301
|
|
|
1305
1302
|
const ExchangeCurrencyCalculator = JSX(({ codes, className = '' }) => {
|
|
1306
|
-
return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput('Хочу продать', codes), renderInput('Получу', codes), jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-
|
|
1303
|
+
return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput('Хочу продать', codes), renderInput('Получу', codes), jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-full", version: "primary", href: "#", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" })] }));
|
|
1307
1304
|
});
|
|
1308
1305
|
function renderInput(placeholder, codes) {
|
|
1309
|
-
return (jsxs("div", { className: "flex items-center", children: [jsx(Input, { className: "h-10 border pl-
|
|
1306
|
+
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12", type: "number", placeholder: `${placeholder}` }), codes.length ? (jsx(Select, { className: "h-9 -translate-x-4", children: codes.map((code, i) => (jsx(SelectOption, { value: code, children: code }, String(i)))) })) : null] }));
|
|
1310
1307
|
}
|
|
1311
1308
|
|
|
1312
1309
|
const CURRENCY_CODES = ['USD', 'EUR'];
|
|
@@ -1327,12 +1324,12 @@
|
|
|
1327
1324
|
address: 'Москва, ул.Ленина д.28',
|
|
1328
1325
|
distance: '6км',
|
|
1329
1326
|
};
|
|
1330
|
-
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют' }) => {
|
|
1327
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', anchor = null }) => {
|
|
1331
1328
|
const data = useExchangeRates(context.useAsyncData);
|
|
1332
1329
|
const exchangeCurrencyItems = data?.exchangeRate?.currencies?.filter((item) => {
|
|
1333
1330
|
return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
|
|
1334
1331
|
}) || DEFAULT_CURRENCY_ITEMS;
|
|
1335
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap
|
|
1332
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, id: anchor, 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: [exchangeCurrencyItems ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: exchangeCurrencyItems })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), exchangeCurrencyItems?.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", exchangeCurrencyItems: exchangeCurrencyItems, codes: EXCHANGE_CODES })) : null] }) }) }));
|
|
1336
1333
|
});
|
|
1337
1334
|
|
|
1338
1335
|
const LOGO_PATHS = [
|
|
@@ -1441,7 +1438,7 @@
|
|
|
1441
1438
|
const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1442
1439
|
if (!icon)
|
|
1443
1440
|
return null;
|
|
1444
|
-
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[
|
|
1441
|
+
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[40px] h-[40px] box-border hover:text-primary-main", href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: Icon && (jsx(Icon, { name: icon, width: width, height: height, asSVG: true, className: "block", color: "none" })) }));
|
|
1445
1442
|
});
|
|
1446
1443
|
|
|
1447
1444
|
const SocialMedia = JSX(({ className, media, context }) => {
|
|
@@ -1459,8 +1456,8 @@
|
|
|
1459
1456
|
|
|
1460
1457
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[280px]';
|
|
1461
1458
|
const LEFT_COL_WIDTH_SMALL_DESKTOP = 'xl:w-[220px]';
|
|
1462
|
-
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, topItems, context }) => {
|
|
1463
|
-
return (jsxs("footer", { className: `px-9 py-10 bg-white ${className || ''}`, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1459
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, topItems, context, anchor = null, }) => {
|
|
1460
|
+
return (jsxs("footer", { className: `px-9 py-10 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1464
1461
|
});
|
|
1465
1462
|
|
|
1466
1463
|
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
@@ -1485,15 +1482,15 @@
|
|
|
1485
1482
|
isHrefActive(topItem.href, router) ||
|
|
1486
1483
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
1487
1484
|
|
|
1488
|
-
const TEXT_CLASSES$
|
|
1485
|
+
const TEXT_CLASSES$2 = 'font-sans font-normal text-base';
|
|
1489
1486
|
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1490
|
-
const HeaderItem = JSX(({ className, text, href, target, active, onClick, children, bgColor = 'bg-white' }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses$
|
|
1491
|
-
const getTextClasses$
|
|
1487
|
+
const HeaderItem = JSX(({ className, text, href, target, active, onClick, children, bgColor = 'bg-white' }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses$2(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
1488
|
+
const getTextClasses$2 = (bgColor, active) => {
|
|
1492
1489
|
let classes = 'text-white';
|
|
1493
1490
|
if (bgColor === 'bg-white') {
|
|
1494
1491
|
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1495
1492
|
}
|
|
1496
|
-
return `${classes} ${TEXT_CLASSES$
|
|
1493
|
+
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1497
1494
|
};
|
|
1498
1495
|
const getBorderClasses = (bgColor, active) => {
|
|
1499
1496
|
if (!active) {
|
|
@@ -1502,24 +1499,24 @@
|
|
|
1502
1499
|
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1503
1500
|
};
|
|
1504
1501
|
|
|
1505
|
-
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
1506
|
-
const LINK_CLASSES = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1507
|
-
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses(bgColor, active, flat), children: text || children }) })));
|
|
1508
|
-
const getLinkClasses = (bgColor, active, flat) => {
|
|
1502
|
+
const TEXT_CLASSES$1 = 'font-sans font-normal text-sm';
|
|
1503
|
+
const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1504
|
+
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$1(bgColor, active, flat), children: text || children }) })));
|
|
1505
|
+
const getLinkClasses$1 = (bgColor, active, flat) => {
|
|
1509
1506
|
let classes = 'border-transparent';
|
|
1510
1507
|
if (active) {
|
|
1511
1508
|
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
1512
1509
|
}
|
|
1513
|
-
return `${classes} ${LINK_CLASSES} ${flat ? '' : 'px-4 py-2'}`;
|
|
1510
|
+
return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
|
|
1514
1511
|
};
|
|
1515
|
-
const getTextClasses = (bgColor, active, flat) => {
|
|
1512
|
+
const getTextClasses$1 = (bgColor, active, flat) => {
|
|
1516
1513
|
let classes = 'text-white';
|
|
1517
1514
|
if (bgColor === 'bg-white') {
|
|
1518
1515
|
classes = active
|
|
1519
1516
|
? 'text-primary-main'
|
|
1520
1517
|
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
1521
1518
|
}
|
|
1522
|
-
return `${classes} ${TEXT_CLASSES}`;
|
|
1519
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
1523
1520
|
};
|
|
1524
1521
|
|
|
1525
1522
|
const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
|
|
@@ -1545,7 +1542,7 @@
|
|
|
1545
1542
|
'bg-white': 'bg-main-divider',
|
|
1546
1543
|
transparent: 'bg-main-divider opacity-30',
|
|
1547
1544
|
};
|
|
1548
|
-
const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
1545
|
+
const Header = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1549
1546
|
const router = context.useRouter();
|
|
1550
1547
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1551
1548
|
const { handlerDecorator } = context;
|
|
@@ -1555,27 +1552,50 @@
|
|
|
1555
1552
|
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1556
1553
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
1557
1554
|
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }, _.href)));
|
|
1558
|
-
return (jsx("header", { className: `pt-5 pb-8 px-20 ${bgColor} ${className || ''}`, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-5 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx("nav", { className: "mt-5", children: subMenu })] }) }));
|
|
1555
|
+
return (jsx("header", { className: `pt-5 pb-8 px-20 ${bgColor} ${className || ''}`, id: anchor, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-5 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx("nav", { className: "mt-5", children: subMenu })] }) }));
|
|
1559
1556
|
});
|
|
1560
1557
|
|
|
1561
|
-
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [] }) => {
|
|
1562
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("div", { className: "flex 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: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }) }));
|
|
1558
|
+
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
|
|
1559
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("div", { className: "flex 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: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }) }));
|
|
1563
1560
|
});
|
|
1564
1561
|
|
|
1565
1562
|
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 })));
|
|
1566
1563
|
|
|
1567
|
-
const Navigation = JSX(({ className, context, title, buttons }) => {
|
|
1564
|
+
const Navigation = JSX(({ className, context, title, buttons, anchor = null }) => {
|
|
1568
1565
|
const router = context.useRouter();
|
|
1569
1566
|
const { handlerDecorator } = context;
|
|
1570
1567
|
const activeButton = findActiveSubItem(router)(buttons);
|
|
1571
|
-
return (jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, children: [jsx("h2", { className: "font-medium text-xl m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
1568
|
+
return (jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, id: anchor, children: [jsx("h2", { className: "font-medium text-xl m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
1572
1569
|
.filter(({ text }) => text)
|
|
1573
1570
|
.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] }));
|
|
1574
1571
|
});
|
|
1575
1572
|
|
|
1573
|
+
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
1574
|
+
const LINK_CLASSES = 'flex-1 flex items-center justify-center';
|
|
1575
|
+
const NavigatorTabItem = JSX(({ className = '', label, active, children, onClick, anchor }) => (jsx("a", { className: getLinkClasses(className, active), href: `#${anchor}`, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: label || children }) })));
|
|
1576
|
+
const getLinkClasses = (className, active) => {
|
|
1577
|
+
const classes = active ? 'bg-primary-main' : 'bg-white';
|
|
1578
|
+
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
1579
|
+
};
|
|
1580
|
+
const getTextClasses = (active) => {
|
|
1581
|
+
const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
|
|
1582
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, anchor = null }) => {
|
|
1586
|
+
const router = context.useRouter();
|
|
1587
|
+
const hash = getHash(router.href);
|
|
1588
|
+
return (jsx("section", { className: `sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`, id: anchor, children: navigatorTabs ? navigatorTabs.map(renderTab(hash, router)) : null }));
|
|
1589
|
+
});
|
|
1590
|
+
const renderTab = (hash, router) => (tab, i) => {
|
|
1591
|
+
const anchorHash = `#${tab.anchor}`;
|
|
1592
|
+
const active = hash ? anchorHash === hash : i === 0;
|
|
1593
|
+
return (jsx(NavigatorTabItem, { active: active, onClick: () => router?.replace(anchorHash), ...tab }, tab.anchor));
|
|
1594
|
+
};
|
|
1595
|
+
|
|
1576
1596
|
const GOLDEN_RATIO = 1.618;
|
|
1577
|
-
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...' }) => {
|
|
1578
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, 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() })] }) }));
|
|
1597
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
|
|
1598
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, 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() })] }) }));
|
|
1579
1599
|
});
|
|
1580
1600
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
1581
1601
|
.map((_) => Math.floor(_))
|
|
@@ -1583,11 +1603,11 @@
|
|
|
1583
1603
|
const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1584
1604
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1585
1605
|
|
|
1586
|
-
const ProductGallery = JSX(({ className, context, duration = 0, slides = [] }) => {
|
|
1606
|
+
const ProductGallery = JSX(({ className, context, duration = 0, slides = [], anchor = null }) => {
|
|
1587
1607
|
const galleryNav = slides.map((s) => s.nav);
|
|
1588
1608
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1589
1609
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
1590
|
-
return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock$1(_, i, context)) }), jsx("div", { className: "flex", children: galleryNav.map((slide, i) => renderNavButton$1({
|
|
1610
|
+
return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, id: anchor, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock$1(_, i, context)) }), jsx("div", { className: "flex", children: galleryNav.map((slide, i) => renderNavButton$1({
|
|
1591
1611
|
slide,
|
|
1592
1612
|
i,
|
|
1593
1613
|
activeSlideIndex,
|
|
@@ -1605,11 +1625,11 @@
|
|
|
1605
1625
|
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0`, children: [jsxs("div", { className: "border-0 border-r border-solid border-main-divider px-6", children: [jsx("div", { className: `text-sm font-medium pb-[3px] group-hover:text-primary-text ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: "text-xs text-secondary-text", children: slide.desc })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
|
|
1606
1626
|
}
|
|
1607
1627
|
|
|
1608
|
-
const ProductGalleryGreen = JSX(({ className = '', context, slides = [] }) => {
|
|
1628
|
+
const ProductGalleryGreen = JSX(({ className = '', context, slides = [], anchor = null }) => {
|
|
1609
1629
|
const galleryNav = slides.map((s) => s.nav);
|
|
1610
1630
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1611
1631
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
1612
|
-
return (jsxs("section", { className: `box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${className}`, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-9 box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
1632
|
+
return (jsxs("section", { className: `box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${className}`, id: anchor, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-9 box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
1613
1633
|
slide,
|
|
1614
1634
|
i,
|
|
1615
1635
|
activeSlideIndex,
|
|
@@ -1623,20 +1643,24 @@
|
|
|
1623
1643
|
const isActiveBtn = i === activeSlideIndex;
|
|
1624
1644
|
const btnClassName = isActiveBtn
|
|
1625
1645
|
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0'
|
|
1626
|
-
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:
|
|
1627
|
-
const btnTitleClassName = isActiveBtn
|
|
1628
|
-
|
|
1646
|
+
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:pt-[21px] hover:pb-7 ease-in duration-300';
|
|
1647
|
+
const btnTitleClassName = isActiveBtn
|
|
1648
|
+
? 'text-[18px] text-primary-text pb-[10px]'
|
|
1649
|
+
: 'text-m-base text-white pb-[3px]';
|
|
1650
|
+
const btnDescClassName = isActiveBtn
|
|
1651
|
+
? 'text-[18px] text-secondary-text'
|
|
1652
|
+
: 'text-m-base text-white';
|
|
1629
1653
|
return (jsx("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border font-sans group relative overflow-hidden border-white/50 border-[1px] cursor-pointer text-left mb-6a mx-1 grow basis-0 backdrop-blur-sm
|
|
1630
1654
|
${btnClassName}
|
|
1631
|
-
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `
|
|
1655
|
+
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }) }, String(i)));
|
|
1632
1656
|
}
|
|
1633
1657
|
|
|
1634
1658
|
const promoTileStyleMap = {
|
|
1635
1659
|
primary: 'bg-white text-primary-text',
|
|
1636
1660
|
secondary: 'bg-primary-main text-white',
|
|
1637
1661
|
};
|
|
1638
|
-
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', }) => {
|
|
1639
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, 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 })] }) }) }));
|
|
1662
|
+
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', anchor = null, }) => {
|
|
1663
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, 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 })] }) }) }));
|
|
1640
1664
|
});
|
|
1641
1665
|
function formatDate(date) {
|
|
1642
1666
|
const dateObj = new Date(date);
|
|
@@ -1691,11 +1715,11 @@
|
|
|
1691
1715
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
1692
1716
|
const CARD_FULL_VIEW_COUNT = 2;
|
|
1693
1717
|
const CARD_SHIFT = 525;
|
|
1694
|
-
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version }) => {
|
|
1718
|
+
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version, anchor = null }) => {
|
|
1695
1719
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1696
1720
|
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
1697
1721
|
const cardClassName = version === 'secondary' ? 'border-main-divider' : 'border-main-stroke';
|
|
1698
|
-
return (jsxs("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-8", title: title }) : null, jsx("div", { className: "flex duration-1000 gap-4", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
1722
|
+
return (jsxs("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-8", title: title }) : null, jsx("div", { className: "flex duration-1000 gap-4", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
1699
1723
|
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
1700
1724
|
: null }), renderNavButtons({
|
|
1701
1725
|
cardsCount: recommendations.length,
|
|
@@ -1715,8 +1739,8 @@
|
|
|
1715
1739
|
return (jsxs("div", { children: [showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }))] }));
|
|
1716
1740
|
};
|
|
1717
1741
|
|
|
1718
|
-
const StepsBlock = JSX(({ className, title, showLines = true, steps }) => {
|
|
1719
|
-
return (jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${className || ''}`, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${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((step, i) => renderStepIcon(step, i))) }), jsx("div", { className: "flex justify-between gap-x-[101px]", children: steps.map(renderStepTitle) })] })) : null] }));
|
|
1742
|
+
const StepsBlock = JSX(({ className, title, showLines = true, steps, anchor = null }) => {
|
|
1743
|
+
return (jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${className || ''}`, id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${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((step, i) => renderStepIcon(step, i))) }), jsx("div", { className: "flex justify-between gap-x-[101px]", children: steps.map(renderStepTitle) })] })) : null] }));
|
|
1720
1744
|
});
|
|
1721
1745
|
const renderStepIcon = (step, i) => {
|
|
1722
1746
|
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] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon && jsx(Icon, { name: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-medium text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
|
|
@@ -1742,7 +1766,7 @@
|
|
|
1742
1766
|
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(Icon, { className: "mr-[14px] max-w-6 max-h-6", name: header.icon, width: "24px", height: "24px", asSVG: true })), 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] }));
|
|
1743
1767
|
});
|
|
1744
1768
|
|
|
1745
|
-
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns }) => {
|
|
1769
|
+
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns, anchor = null }) => {
|
|
1746
1770
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1747
1771
|
const colData = getColData(columns);
|
|
1748
1772
|
const rowData = getRowData(rowHeaders, colData);
|
|
@@ -1753,7 +1777,7 @@
|
|
|
1753
1777
|
setActiveCardIndex,
|
|
1754
1778
|
});
|
|
1755
1779
|
const { isScrollAvailable } = tableArrowScrollControlProps;
|
|
1756
|
-
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, 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 ? (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i)))), jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] })) : null] }));
|
|
1780
|
+
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, id: anchor, 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 ? (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i)))), jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] })) : null] }));
|
|
1757
1781
|
});
|
|
1758
1782
|
const getColData = (columns) => columns?.map(({ data }) => data) || [];
|
|
1759
1783
|
const getRowData = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
@@ -1774,6 +1798,7 @@
|
|
|
1774
1798
|
LinkDocs,
|
|
1775
1799
|
MiniGallery,
|
|
1776
1800
|
MobileAppTile,
|
|
1801
|
+
NavigatorTabs,
|
|
1777
1802
|
PictureText,
|
|
1778
1803
|
ProductBlock,
|
|
1779
1804
|
ProductGallery,
|
|
@@ -1801,9 +1826,9 @@
|
|
|
1801
1826
|
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" })] }));
|
|
1802
1827
|
};
|
|
1803
1828
|
|
|
1804
|
-
const LikeControl = JSX(({ className, context }) => {
|
|
1829
|
+
const LikeControl = JSX(({ className, context, anchor = null }) => {
|
|
1805
1830
|
const likeService = context.useLikeService();
|
|
1806
|
-
return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, 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 })] }));
|
|
1831
|
+
return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, id: anchor, 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 })] }));
|
|
1807
1832
|
});
|
|
1808
1833
|
|
|
1809
1834
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -1818,11 +1843,11 @@
|
|
|
1818
1843
|
}
|
|
1819
1844
|
const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
|
|
1820
1845
|
return blockDecorator({
|
|
1821
|
-
blockClassName: style2className(block.style)
|
|
1846
|
+
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
1822
1847
|
block,
|
|
1823
1848
|
render: (props) => {
|
|
1824
|
-
const { version, content } = props.block;
|
|
1825
|
-
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content }
|
|
1849
|
+
const { version, content, anchor } = props.block;
|
|
1850
|
+
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }));
|
|
1826
1851
|
},
|
|
1827
1852
|
}, `block-${i}`);
|
|
1828
1853
|
}
|