@redneckz/wildless-cms-uni-blocks 0.3.27 → 0.3.30
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 +120 -84
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +2 -2
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +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/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/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/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/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 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +2 -2
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +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/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/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/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/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 +36 -28
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +2 -2
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +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/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/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/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/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/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/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/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/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/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/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/Gallery/GalleryInner.tsx +2 -1
- 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/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/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/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.tsx +5 -2
- 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/Gallery/GalleryInner.tsx +2 -1
- package/src/components/Header/Header.tsx +2 -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/PictureText/PictureText.tsx +18 -13
- package/src/components/Placeholder/Placeholder.tsx +2 -1
- package/src/components/ProductBlock/ProductBlock.tsx +11 -2
- 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/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/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';
|
|
@@ -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, className, breadcrumbs, version = 'primary' } = props;
|
|
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, { ...
|
|
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) => {
|
|
@@ -957,17 +965,19 @@
|
|
|
957
965
|
primary: 'bg-white text-primary-text',
|
|
958
966
|
secondary: 'bg-primary-main text-white',
|
|
959
967
|
};
|
|
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] }));
|
|
968
|
+
const Accordion = JSX(({ title, accordionItems, context, className = '', version = 'primary', anchor = null }) => {
|
|
969
|
+
return (jsxs("section", { className: `p-[50px] font-sans ${className} ${accordionStyleMap[version]}`, id: anchor, 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] }));
|
|
962
970
|
});
|
|
963
971
|
|
|
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] }));
|
|
972
|
+
const BenefitsBlock = JSX(({ className, title, benefits, anchor = null }) => {
|
|
973
|
+
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
974
|
});
|
|
967
975
|
const renderStep = (benefit, i) => {
|
|
968
976
|
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
977
|
};
|
|
970
978
|
|
|
979
|
+
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
980
|
+
|
|
971
981
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
972
982
|
const BORDER_CLASSES$1 = 'border-main-stroke border-solid border';
|
|
973
983
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -975,8 +985,6 @@
|
|
|
975
985
|
const COLS_LENGTH_FOR_SCROLL$1 = 2;
|
|
976
986
|
const COLUMN_WIDTH$1 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
977
987
|
|
|
978
|
-
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
979
|
-
|
|
980
988
|
const carouselContainerClassesMap = {
|
|
981
989
|
comparison: 'flex gap-4 duration-1000',
|
|
982
990
|
tariff: 'flex flex-grow duration-1000',
|
|
@@ -1037,10 +1045,10 @@
|
|
|
1037
1045
|
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
1046
|
});
|
|
1039
1047
|
|
|
1040
|
-
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, }) => {
|
|
1048
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, anchor = null, }) => {
|
|
1041
1049
|
const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
|
|
1042
1050
|
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
|
|
1051
|
+
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
1052
|
? renderShowMoreToggleButton({ isShowAllRow, onClick: showToggle })
|
|
1045
1053
|
: null] }));
|
|
1046
1054
|
});
|
|
@@ -1051,11 +1059,11 @@
|
|
|
1051
1059
|
const TAB_STYLE = 'px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke';
|
|
1052
1060
|
const ACTIVE_TAB_STYLE = 'px-2 h-16 pt-4 pb-2 text-white bg-primary-main';
|
|
1053
1061
|
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)) }));
|
|
1062
|
+
return (jsx("div", { className: "flex items-end border-b border-main-stroke", role: "tablist", children: tabs?.map(renderTab$1(currentTabIndex, onTabClick)) }));
|
|
1055
1063
|
});
|
|
1056
|
-
const renderTab = (currentTabIndex, onTabClick) => (tab, index) => {
|
|
1064
|
+
const renderTab$1 = (currentTabIndex, onTabClick) => (tab, index) => {
|
|
1057
1065
|
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)));
|
|
1066
|
+
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
1067
|
};
|
|
1060
1068
|
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
1069
|
|
|
@@ -1252,9 +1260,9 @@
|
|
|
1252
1260
|
},
|
|
1253
1261
|
];
|
|
1254
1262
|
|
|
1255
|
-
const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS }) => {
|
|
1263
|
+
const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS, anchor = null }) => {
|
|
1256
1264
|
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 })] }));
|
|
1265
|
+
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
1266
|
});
|
|
1259
1267
|
|
|
1260
1268
|
function useExchangeRates(useAsyncData) {
|
|
@@ -1275,7 +1283,7 @@
|
|
|
1275
1283
|
const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
|
|
1276
1284
|
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
1277
1285
|
|
|
1278
|
-
const TABLE_HEAD_STYLE = 'text-left font-normal text-sm text-secondary-text';
|
|
1286
|
+
const TABLE_HEAD_STYLE = 'font-light text-left font-normal text-sm text-secondary-text';
|
|
1279
1287
|
const CURRENCY_ICONS_MAP = {
|
|
1280
1288
|
USD: 'DollarIcon',
|
|
1281
1289
|
EUR: 'EuroIcon',
|
|
@@ -1285,10 +1293,10 @@
|
|
|
1285
1293
|
});
|
|
1286
1294
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1287
1295
|
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));
|
|
1296
|
+
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
1297
|
};
|
|
1290
1298
|
|
|
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-
|
|
1299
|
+
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
1300
|
|
|
1293
1301
|
const Input = JSX(({ className = '', id, name, type = 'text', placeholder }) => {
|
|
1294
1302
|
return (jsx("input", { className: className, id: id, name: name || id, type: type, placeholder: placeholder }));
|
|
@@ -1303,10 +1311,10 @@
|
|
|
1303
1311
|
});
|
|
1304
1312
|
|
|
1305
1313
|
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-
|
|
1314
|
+
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
1315
|
});
|
|
1308
1316
|
function renderInput(placeholder, codes) {
|
|
1309
|
-
return (jsxs("div", { className: "flex items-center", children: [jsx(Input, { className: "h-10 border pl-
|
|
1317
|
+
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
1318
|
}
|
|
1311
1319
|
|
|
1312
1320
|
const CURRENCY_CODES = ['USD', 'EUR'];
|
|
@@ -1327,12 +1335,12 @@
|
|
|
1327
1335
|
address: 'Москва, ул.Ленина д.28',
|
|
1328
1336
|
distance: '6км',
|
|
1329
1337
|
};
|
|
1330
|
-
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют' }) => {
|
|
1338
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', anchor = null }) => {
|
|
1331
1339
|
const data = useExchangeRates(context.useAsyncData);
|
|
1332
1340
|
const exchangeCurrencyItems = data?.exchangeRate?.currencies?.filter((item) => {
|
|
1333
1341
|
return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
|
|
1334
1342
|
}) || 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
|
|
1343
|
+
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
1344
|
});
|
|
1337
1345
|
|
|
1338
1346
|
const LOGO_PATHS = [
|
|
@@ -1459,8 +1467,8 @@
|
|
|
1459
1467
|
|
|
1460
1468
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[280px]';
|
|
1461
1469
|
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 })] }));
|
|
1470
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, topItems, context, anchor = null, }) => {
|
|
1471
|
+
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
1472
|
});
|
|
1465
1473
|
|
|
1466
1474
|
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
@@ -1485,15 +1493,15 @@
|
|
|
1485
1493
|
isHrefActive(topItem.href, router) ||
|
|
1486
1494
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
1487
1495
|
|
|
1488
|
-
const TEXT_CLASSES$
|
|
1496
|
+
const TEXT_CLASSES$2 = 'font-sans font-normal text-base';
|
|
1489
1497
|
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$
|
|
1498
|
+
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] })));
|
|
1499
|
+
const getTextClasses$2 = (bgColor, active) => {
|
|
1492
1500
|
let classes = 'text-white';
|
|
1493
1501
|
if (bgColor === 'bg-white') {
|
|
1494
1502
|
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1495
1503
|
}
|
|
1496
|
-
return `${classes} ${TEXT_CLASSES$
|
|
1504
|
+
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1497
1505
|
};
|
|
1498
1506
|
const getBorderClasses = (bgColor, active) => {
|
|
1499
1507
|
if (!active) {
|
|
@@ -1502,24 +1510,24 @@
|
|
|
1502
1510
|
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1503
1511
|
};
|
|
1504
1512
|
|
|
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) => {
|
|
1513
|
+
const TEXT_CLASSES$1 = 'font-sans font-normal text-sm';
|
|
1514
|
+
const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1515
|
+
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 }) })));
|
|
1516
|
+
const getLinkClasses$1 = (bgColor, active, flat) => {
|
|
1509
1517
|
let classes = 'border-transparent';
|
|
1510
1518
|
if (active) {
|
|
1511
1519
|
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
1512
1520
|
}
|
|
1513
|
-
return `${classes} ${LINK_CLASSES} ${flat ? '' : 'px-4 py-2'}`;
|
|
1521
|
+
return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
|
|
1514
1522
|
};
|
|
1515
|
-
const getTextClasses = (bgColor, active, flat) => {
|
|
1523
|
+
const getTextClasses$1 = (bgColor, active, flat) => {
|
|
1516
1524
|
let classes = 'text-white';
|
|
1517
1525
|
if (bgColor === 'bg-white') {
|
|
1518
1526
|
classes = active
|
|
1519
1527
|
? 'text-primary-main'
|
|
1520
1528
|
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
1521
1529
|
}
|
|
1522
|
-
return `${classes} ${TEXT_CLASSES}`;
|
|
1530
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
1523
1531
|
};
|
|
1524
1532
|
|
|
1525
1533
|
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 +1553,7 @@
|
|
|
1545
1553
|
'bg-white': 'bg-main-divider',
|
|
1546
1554
|
transparent: 'bg-main-divider opacity-30',
|
|
1547
1555
|
};
|
|
1548
|
-
const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
1556
|
+
const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems, anchor = null }) => {
|
|
1549
1557
|
const router = context.useRouter();
|
|
1550
1558
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1551
1559
|
const { handlerDecorator } = context;
|
|
@@ -1555,27 +1563,50 @@
|
|
|
1555
1563
|
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1556
1564
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
1557
1565
|
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 })] }) }));
|
|
1566
|
+
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
1567
|
});
|
|
1560
1568
|
|
|
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" })] }) }) }));
|
|
1569
|
+
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
|
|
1570
|
+
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
1571
|
});
|
|
1564
1572
|
|
|
1565
1573
|
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
1574
|
|
|
1567
|
-
const Navigation = JSX(({ className, context, title, buttons }) => {
|
|
1575
|
+
const Navigation = JSX(({ className, context, title, buttons, anchor = null }) => {
|
|
1568
1576
|
const router = context.useRouter();
|
|
1569
1577
|
const { handlerDecorator } = context;
|
|
1570
1578
|
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
|
|
1579
|
+
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
1580
|
.filter(({ text }) => text)
|
|
1573
1581
|
.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
1582
|
});
|
|
1575
1583
|
|
|
1584
|
+
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
1585
|
+
const LINK_CLASSES = 'flex-1 flex items-center justify-center';
|
|
1586
|
+
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 }) })));
|
|
1587
|
+
const getLinkClasses = (className, active) => {
|
|
1588
|
+
const classes = active ? 'bg-primary-main' : 'bg-white';
|
|
1589
|
+
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
1590
|
+
};
|
|
1591
|
+
const getTextClasses = (active) => {
|
|
1592
|
+
const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
|
|
1593
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
1594
|
+
};
|
|
1595
|
+
|
|
1596
|
+
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, anchor = null }) => {
|
|
1597
|
+
const router = context.useRouter();
|
|
1598
|
+
const hash = getHash(router.href);
|
|
1599
|
+
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 }));
|
|
1600
|
+
});
|
|
1601
|
+
const renderTab = (hash, router) => (tab, i) => {
|
|
1602
|
+
const anchorHash = `#${tab.anchor}`;
|
|
1603
|
+
const active = hash ? anchorHash === hash : i === 0;
|
|
1604
|
+
return (jsx(NavigatorTabItem, { active: active, onClick: () => router?.replace(anchorHash), ...tab }, tab.anchor));
|
|
1605
|
+
};
|
|
1606
|
+
|
|
1576
1607
|
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() })] }) }));
|
|
1608
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
|
|
1609
|
+
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
1610
|
});
|
|
1580
1611
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
1581
1612
|
.map((_) => Math.floor(_))
|
|
@@ -1583,11 +1614,11 @@
|
|
|
1583
1614
|
const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1584
1615
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1585
1616
|
|
|
1586
|
-
const ProductGallery = JSX(({ className, context, duration = 0, slides = [] }) => {
|
|
1617
|
+
const ProductGallery = JSX(({ className, context, duration = 0, slides = [], anchor = null }) => {
|
|
1587
1618
|
const galleryNav = slides.map((s) => s.nav);
|
|
1588
1619
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1589
1620
|
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({
|
|
1621
|
+
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
1622
|
slide,
|
|
1592
1623
|
i,
|
|
1593
1624
|
activeSlideIndex,
|
|
@@ -1605,11 +1636,11 @@
|
|
|
1605
1636
|
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
1637
|
}
|
|
1607
1638
|
|
|
1608
|
-
const ProductGalleryGreen = JSX(({ className = '', context, slides = [] }) => {
|
|
1639
|
+
const ProductGalleryGreen = JSX(({ className = '', context, slides = [], anchor = null }) => {
|
|
1609
1640
|
const galleryNav = slides.map((s) => s.nav);
|
|
1610
1641
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1611
1642
|
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({
|
|
1643
|
+
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
1644
|
slide,
|
|
1614
1645
|
i,
|
|
1615
1646
|
activeSlideIndex,
|
|
@@ -1623,20 +1654,24 @@
|
|
|
1623
1654
|
const isActiveBtn = i === activeSlideIndex;
|
|
1624
1655
|
const btnClassName = isActiveBtn
|
|
1625
1656
|
? '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
|
-
|
|
1657
|
+
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:pt-[21px] hover:pb-7 ease-in duration-300';
|
|
1658
|
+
const btnTitleClassName = isActiveBtn
|
|
1659
|
+
? 'text-[18px] text-primary-text pb-[10px]'
|
|
1660
|
+
: 'text-m-base text-white pb-[3px]';
|
|
1661
|
+
const btnDescClassName = isActiveBtn
|
|
1662
|
+
? 'text-[18px] text-secondary-text'
|
|
1663
|
+
: 'text-m-base text-white';
|
|
1629
1664
|
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
1665
|
${btnClassName}
|
|
1631
|
-
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `
|
|
1666
|
+
`, 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
1667
|
}
|
|
1633
1668
|
|
|
1634
1669
|
const promoTileStyleMap = {
|
|
1635
1670
|
primary: 'bg-white text-primary-text',
|
|
1636
1671
|
secondary: 'bg-primary-main text-white',
|
|
1637
1672
|
};
|
|
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 })] }) }) }));
|
|
1673
|
+
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', anchor = null, }) => {
|
|
1674
|
+
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
1675
|
});
|
|
1641
1676
|
function formatDate(date) {
|
|
1642
1677
|
const dateObj = new Date(date);
|
|
@@ -1691,11 +1726,11 @@
|
|
|
1691
1726
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
1692
1727
|
const CARD_FULL_VIEW_COUNT = 2;
|
|
1693
1728
|
const CARD_SHIFT = 525;
|
|
1694
|
-
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version }) => {
|
|
1729
|
+
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version, anchor = null }) => {
|
|
1695
1730
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1696
1731
|
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
1697
1732
|
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
|
|
1733
|
+
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
1734
|
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
1700
1735
|
: null }), renderNavButtons({
|
|
1701
1736
|
cardsCount: recommendations.length,
|
|
@@ -1715,8 +1750,8 @@
|
|
|
1715
1750
|
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
1751
|
};
|
|
1717
1752
|
|
|
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] }));
|
|
1753
|
+
const StepsBlock = JSX(({ className, title, showLines = true, steps, anchor = null }) => {
|
|
1754
|
+
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
1755
|
});
|
|
1721
1756
|
const renderStepIcon = (step, i) => {
|
|
1722
1757
|
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 +1777,7 @@
|
|
|
1742
1777
|
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
1778
|
});
|
|
1744
1779
|
|
|
1745
|
-
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns }) => {
|
|
1780
|
+
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns, anchor = null }) => {
|
|
1746
1781
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1747
1782
|
const colData = getColData(columns);
|
|
1748
1783
|
const rowData = getRowData(rowHeaders, colData);
|
|
@@ -1753,7 +1788,7 @@
|
|
|
1753
1788
|
setActiveCardIndex,
|
|
1754
1789
|
});
|
|
1755
1790
|
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] }));
|
|
1791
|
+
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
1792
|
});
|
|
1758
1793
|
const getColData = (columns) => columns?.map(({ data }) => data) || [];
|
|
1759
1794
|
const getRowData = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
@@ -1774,6 +1809,7 @@
|
|
|
1774
1809
|
LinkDocs,
|
|
1775
1810
|
MiniGallery,
|
|
1776
1811
|
MobileAppTile,
|
|
1812
|
+
NavigatorTabs,
|
|
1777
1813
|
PictureText,
|
|
1778
1814
|
ProductBlock,
|
|
1779
1815
|
ProductGallery,
|
|
@@ -1801,9 +1837,9 @@
|
|
|
1801
1837
|
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
1838
|
};
|
|
1803
1839
|
|
|
1804
|
-
const LikeControl = JSX(({ className, context }) => {
|
|
1840
|
+
const LikeControl = JSX(({ className, context, anchor = null }) => {
|
|
1805
1841
|
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 })] }));
|
|
1842
|
+
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
1843
|
});
|
|
1808
1844
|
|
|
1809
1845
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -1818,11 +1854,11 @@
|
|
|
1818
1854
|
}
|
|
1819
1855
|
const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
|
|
1820
1856
|
return blockDecorator({
|
|
1821
|
-
blockClassName: style2className(block.style)
|
|
1857
|
+
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
1822
1858
|
block,
|
|
1823
1859
|
render: (props) => {
|
|
1824
|
-
const { version, content } = props.block;
|
|
1825
|
-
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content }
|
|
1860
|
+
const { version, content, anchor } = props.block;
|
|
1861
|
+
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }));
|
|
1826
1862
|
},
|
|
1827
1863
|
}, `block-${i}`);
|
|
1828
1864
|
}
|