@redneckz/wildless-cms-uni-blocks 0.3.33 → 0.3.36
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 +298 -158
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/ArrowLeftIcon.svg +1 -0
- package/cosmos-static/icons/BurgerIcon.svg +1 -1
- package/cosmos-static/icons/Calendar2Icon.svg +1 -1
- package/cosmos-static/icons/CalendarCircleIcon.svg +1 -1
- package/cosmos-static/icons/CalendarIcon.svg +1 -1
- package/cosmos-static/icons/CalendarTickIcon.svg +1 -1
- package/cosmos-static/icons/CalendarWhiteIcon.svg +1 -1
- package/cosmos-static/icons/CardIcon.svg +1 -1
- package/cosmos-static/icons/CardPosIcon.svg +1 -1
- package/cosmos-static/icons/CardTickIcon.svg +1 -1
- package/cosmos-static/icons/ChartSquareIcon.svg +1 -1
- package/cosmos-static/icons/CloseIcon.svg +1 -1
- package/cosmos-static/icons/DiscountShapeIcon.svg +1 -1
- package/cosmos-static/icons/DocIcon.svg +1 -1
- package/cosmos-static/icons/DocumentTextIcon.svg +1 -1
- package/cosmos-static/icons/EmptyWalletChangeIcon.svg +1 -1
- package/cosmos-static/icons/EmptyWalletIcon.svg +1 -1
- package/cosmos-static/icons/GlobalIcon.svg +1 -1
- package/cosmos-static/icons/GpsIcon.svg +1 -1
- package/cosmos-static/icons/InterestIcon.svg +1 -1
- package/cosmos-static/icons/MoneyIcon.svg +1 -1
- package/cosmos-static/icons/MonitorMobileIcon.svg +1 -1
- package/cosmos-static/icons/PercentageRoundIcon.svg +1 -1
- package/cosmos-static/icons/PercentageSquareIcon.svg +1 -1
- package/cosmos-static/icons/PersonalCardIcon.svg +1 -1
- package/cosmos-static/icons/Profile2UserIcon.svg +1 -1
- package/cosmos-static/icons/RoundRubleIcon.svg +1 -1
- package/cosmos-static/icons/SafeIcon.svg +1 -1
- package/cosmos-static/icons/ShieldTickIcon.svg +1 -1
- package/cosmos-static/icons/SmallClockIcon.svg +1 -1
- package/cosmos-static/icons/UserTickIcon.svg +1 -1
- package/cosmos-static/icons/WalletAdd2Icon.svg +1 -1
- package/cosmos-static/icons/WalletAddIcon.svg +1 -1
- package/cosmos-static/icons/WalletIcon.svg +1 -1
- package/cosmos-static/icons/WalletWithMoneyIcon.svg +1 -1
- package/dist/components/Blocks.js +1 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +1 -1
- package/dist/components/ContentPage/ContentPage.js +10 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -2
- package/dist/components/CreditCalculator/renderButton.js +8 -1
- package/dist/components/CreditCalculator/renderButton.js.map +1 -1
- package/dist/components/Footer/Contacts.js +5 -5
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/Footer.js +3 -4
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +2 -0
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +15 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/Sitemap.js +4 -4
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +2 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +2 -2
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +5 -6
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContainer.js +2 -2
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +1 -1
- package/dist/components/Header/Header.js +4 -8
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +3 -3
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.d.ts +9 -0
- package/dist/components/Header/HeaderSubMenu.js +37 -0
- package/dist/components/Header/HeaderSubMenu.js.map +1 -0
- package/dist/components/Header/HeaderSubMenuObserver.d.ts +1 -0
- package/dist/components/Header/HeaderSubMenuObserver.js +32 -0
- package/dist/components/Header/HeaderSubMenuObserver.js.map +1 -0
- package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsList.js +1 -1
- package/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +5 -5
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -0
- package/dist/components/ProductBlock/renderBackwardButton.js +18 -0
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -0
- package/dist/components/ProductBlock/renderBenefit.js +2 -2
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.js +2 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
- package/dist/components/StepsBlock/StepsBlock.js +6 -5
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/dist/components/TariffsTable/TariffsTableCell.js +2 -1
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
- package/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
- package/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
- package/dist/components/Tile/Tile.js +3 -3
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/hooks/useLink.d.ts +1 -1
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/icons/IconName.d.ts +5 -3
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/setup-fixture.js +0 -4
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/Button/Button.js +6 -1
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +2 -2
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.d.ts +2 -1
- package/dist/ui-kit/Heading/Heading.js +3 -3
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.mobile.d.ts +2 -1
- package/dist/ui-kit/Heading/Heading.mobile.js +2 -2
- package/dist/ui-kit/Heading/Heading.mobile.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +2 -2
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/List/List.js +2 -0
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js +19 -5
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/List/ListProps.d.ts +1 -1
- package/dist/ui-kit/Logo/Logo.js +1 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -0
- package/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/changeHashOnScroll.d.ts +2 -0
- package/dist/utils/changeHashOnScroll.js +16 -0
- package/dist/utils/changeHashOnScroll.js.map +1 -0
- package/dist/utils/isSSR.d.ts +1 -0
- package/dist/utils/isSSR.js +5 -0
- package/dist/utils/isSSR.js.map +1 -0
- package/dist/utils/tableFunc.d.ts +2 -0
- package/dist/utils/tableFunc.js +8 -0
- package/dist/utils/tableFunc.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +1 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +1 -1
- package/lib/components/ContentPage/ContentPage.js +10 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -2
- package/lib/components/CreditCalculator/renderButton.js +8 -1
- package/lib/components/CreditCalculator/renderButton.js.map +1 -1
- package/lib/components/Footer/Contacts.js +5 -5
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Footer.js +3 -4
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +2 -0
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +15 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/Sitemap.js +4 -4
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +3 -3
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +2 -2
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +5 -6
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContainer.js +2 -2
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +1 -1
- package/lib/components/Header/Header.js +4 -8
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +3 -3
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.d.ts +9 -0
- package/lib/components/Header/HeaderSubMenu.js +35 -0
- package/lib/components/Header/HeaderSubMenu.js.map +1 -0
- package/lib/components/Header/HeaderSubMenuObserver.d.ts +1 -0
- package/lib/components/Header/HeaderSubMenuObserver.js +30 -0
- package/lib/components/Header/HeaderSubMenuObserver.js.map +1 -0
- package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsList.js +1 -1
- package/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +2 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +5 -5
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -0
- package/lib/components/ProductBlock/renderBackwardButton.js +15 -0
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -0
- package/lib/components/ProductBlock/renderBenefit.js +2 -2
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +2 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -0
- package/lib/components/StepsBlock/StepsBlock.js +6 -5
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/lib/components/TariffsTable/TariffsTableCell.js +2 -1
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
- package/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
- package/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
- package/lib/components/Tile/Tile.js +3 -3
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/hooks/useLink.d.ts +1 -1
- package/lib/hooks/useLink.js +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/icons/IconName.d.ts +5 -3
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/setup-fixture.js +0 -4
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/Button/Button.js +6 -1
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +2 -2
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.d.ts +2 -1
- package/lib/ui-kit/Heading/Heading.js +3 -3
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.mobile.d.ts +2 -1
- package/lib/ui-kit/Heading/Heading.mobile.js +2 -2
- package/lib/ui-kit/Heading/Heading.mobile.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +2 -2
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/List/List.js +2 -0
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListItem.js +19 -5
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/List/ListProps.d.ts +1 -1
- package/lib/ui-kit/Logo/Logo.js +1 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -0
- package/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/changeHashOnScroll.d.ts +2 -0
- package/lib/utils/changeHashOnScroll.js +13 -0
- package/lib/utils/changeHashOnScroll.js.map +1 -0
- package/lib/utils/isSSR.d.ts +1 -0
- package/lib/utils/isSSR.js +2 -0
- package/lib/utils/isSSR.js.map +1 -0
- package/lib/utils/tableFunc.d.ts +2 -0
- package/lib/utils/tableFunc.js +5 -0
- package/lib/utils/tableFunc.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +76 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +10 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -2
- package/mobile/dist/components/CreditCalculator/renderButton.js +8 -1
- package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.js +5 -5
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Footer/FooterContent.d.ts +2 -0
- package/mobile/dist/components/Footer/MediaButton.js +15 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Footer/Sitemap.js +4 -4
- package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +5 -6
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +3 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.d.ts +9 -0
- package/mobile/dist/components/Header/HeaderSubMenu.js +37 -0
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -0
- package/mobile/dist/components/Header/HeaderSubMenuObserver.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderSubMenuObserver.js +32 -0
- package/mobile/dist/components/Header/HeaderSubMenuObserver.js.map +1 -0
- package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsList.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -0
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +18 -0
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +2 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +2 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
- package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
- package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
- package/mobile/dist/components/Tile/Tile.js +3 -3
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +1 -1
- package/mobile/dist/hooks/useLink.js +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +5 -3
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/setup-fixture.js +0 -4
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +2 -2
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Heading/Heading.d.ts +2 -1
- package/mobile/dist/ui-kit/Heading/Heading.js +2 -2
- package/mobile/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +2 -2
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.js +2 -0
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +19 -5
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -0
- package/mobile/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/changeHashOnScroll.d.ts +2 -0
- package/mobile/dist/utils/changeHashOnScroll.js +16 -0
- package/mobile/dist/utils/changeHashOnScroll.js.map +1 -0
- package/mobile/dist/utils/isSSR.d.ts +1 -0
- package/mobile/dist/utils/isSSR.js +5 -0
- package/mobile/dist/utils/isSSR.js.map +1 -0
- package/mobile/dist/utils/tableFunc.d.ts +2 -0
- package/mobile/dist/utils/tableFunc.js +8 -0
- package/mobile/dist/utils/tableFunc.js.map +1 -0
- package/mobile/lib/components/ContentPage/ContentPage.js +10 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -2
- package/mobile/lib/components/CreditCalculator/renderButton.js +8 -1
- package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.js +5 -5
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/FooterContent.d.ts +2 -0
- package/mobile/lib/components/Footer/MediaButton.js +15 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Footer/Sitemap.js +4 -4
- package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +5 -6
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +3 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.d.ts +9 -0
- package/mobile/lib/components/Header/HeaderSubMenu.js +35 -0
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -0
- package/mobile/lib/components/Header/HeaderSubMenuObserver.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderSubMenuObserver.js +30 -0
- package/mobile/lib/components/Header/HeaderSubMenuObserver.js.map +1 -0
- package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsList.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -0
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +15 -0
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +2 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +2 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
- package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
- package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
- package/mobile/lib/components/Tile/Tile.js +3 -3
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +1 -1
- package/mobile/lib/hooks/useLink.js +1 -1
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +5 -3
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/setup-fixture.js +0 -4
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +2 -2
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Heading/Heading.d.ts +2 -1
- package/mobile/lib/ui-kit/Heading/Heading.js +2 -2
- package/mobile/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +2 -2
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.js +2 -0
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +19 -5
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -0
- package/mobile/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/changeHashOnScroll.d.ts +2 -0
- package/mobile/lib/utils/changeHashOnScroll.js +13 -0
- package/mobile/lib/utils/changeHashOnScroll.js.map +1 -0
- package/mobile/lib/utils/isSSR.d.ts +1 -0
- package/mobile/lib/utils/isSSR.js +2 -0
- package/mobile/lib/utils/isSSR.js.map +1 -0
- package/mobile/lib/utils/tableFunc.d.ts +2 -0
- package/mobile/lib/utils/tableFunc.js +5 -0
- package/mobile/lib/utils/tableFunc.js.map +1 -0
- package/mobile/src/components/ContentPage/ContentPage.page.json +98 -238
- package/mobile/src/components/ContentPage/ContentPage.tsx +14 -2
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +2 -2
- package/mobile/src/components/CreditCalculator/renderButton.tsx +11 -1
- package/mobile/src/components/Footer/Contacts.tsx +7 -10
- package/mobile/src/components/Footer/FooterContent.ts +2 -0
- package/mobile/src/components/Footer/MediaButton.tsx +15 -1
- package/mobile/src/components/Footer/Sitemap.tsx +5 -5
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -7
- package/mobile/src/components/Gallery/GalleryContainer.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +4 -7
- package/mobile/src/components/Header/HeaderSubMenu.tsx +103 -0
- package/mobile/src/components/Header/HeaderSubMenuObserver.ts +44 -0
- package/mobile/src/components/LinkDocs/LinkDocsList.tsx +3 -3
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
- package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +35 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +2 -1
- package/mobile/src/components/Recommendation/RecommendationContent.ts +4 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -0
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
- package/mobile/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
- package/mobile/src/components/Tile/Tile.example.json +1 -1
- package/mobile/src/components/Tile/Tile.tsx +13 -3
- package/mobile/src/hooks/useLink.ts +1 -1
- package/mobile/src/icons/ArrowDownIcon.svg +1 -1
- package/mobile/src/icons/ArrowLeftIcon.svg +4 -0
- package/mobile/src/icons/BurgerIcon.svg +4 -4
- package/mobile/src/icons/Calendar2Icon.svg +1 -1
- package/mobile/src/icons/CalendarCircleIcon.svg +4 -1
- package/mobile/src/icons/CalendarIcon.svg +1 -1
- package/mobile/src/icons/CalendarTickIcon.svg +6 -1
- package/mobile/src/icons/CalendarWhiteIcon.svg +2 -2
- package/mobile/src/icons/CardIcon.svg +5 -1
- package/mobile/src/icons/CardPosIcon.svg +5 -1
- package/mobile/src/icons/CardTickIcon.svg +5 -1
- package/mobile/src/icons/ChartSquareIcon.svg +6 -1
- package/mobile/src/icons/CloseIcon.svg +4 -4
- package/mobile/src/icons/DiscountShapeIcon.svg +4 -1
- package/mobile/src/icons/DocIcon.svg +1 -1
- package/mobile/src/icons/DocumentTextIcon.svg +2 -2
- package/mobile/src/icons/EmptyWalletChangeIcon.svg +8 -1
- package/mobile/src/icons/EmptyWalletIcon.svg +2 -2
- package/mobile/src/icons/GlobalIcon.svg +5 -1
- package/mobile/src/icons/GpsIcon.svg +6 -6
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/InterestIcon.svg +6 -1
- package/mobile/src/icons/MasterCardIcon.svg +5 -1
- package/mobile/src/icons/MinusIcon.svg +3 -1
- package/mobile/src/icons/MoneyIcon.svg +5 -1
- package/mobile/src/icons/MonitorMobileIcon.svg +4 -1
- package/mobile/src/icons/PercentageRoundIcon.svg +4 -1
- package/mobile/src/icons/PercentageSquareIcon.svg +1 -1
- package/mobile/src/icons/PersonalCardIcon.svg +4 -1
- package/mobile/src/icons/PlayMarketIcon.svg +3 -1
- package/mobile/src/icons/PlusIcon.svg +3 -1
- package/mobile/src/icons/Profile2UserIcon.svg +6 -1
- package/mobile/src/icons/RoundRubleIcon.svg +5 -1
- package/mobile/src/icons/SafeIcon.svg +7 -1
- package/mobile/src/icons/ShieldTickIcon.svg +4 -1
- package/mobile/src/icons/SmallClockIcon.svg +4 -1
- package/mobile/src/icons/UserTickIcon.svg +5 -1
- package/mobile/src/icons/WalletAdd2Icon.svg +6 -1
- package/mobile/src/icons/WalletAddIcon.svg +7 -1
- package/mobile/src/icons/WalletIcon.svg +7 -1
- package/mobile/src/icons/WalletWithMoneyIcon.svg +5 -1
- package/mobile/src/setup-fixture.ts +4 -6
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/mobile/src/ui-kit/Heading/Heading.tsx +5 -2
- package/mobile/src/ui-kit/Icon/Icon.tsx +2 -2
- package/mobile/src/ui-kit/List/List.tsx +2 -0
- package/mobile/src/ui-kit/List/ListItem.tsx +19 -5
- package/mobile/src/ui-kit/List/ListProps.ts +1 -1
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/mobile/src/utils/changeHashOnScroll.ts +15 -0
- package/mobile/src/utils/isSSR.ts +2 -0
- package/mobile/src/utils/tableFunc.ts +8 -0
- package/package.json +1 -1
- package/src/components/Blocks.ts +1 -1
- package/src/components/ComparisonTable/HeaderCell.tsx +1 -1
- package/src/components/ComparisonTable/TableCell.tsx +1 -1
- package/src/components/ContentPage/ContentPage.page.json +98 -238
- package/src/components/ContentPage/ContentPage.tsx +14 -2
- package/src/components/ContentPage/ContentPageContext.tsx +2 -2
- package/src/components/CreditCalculator/renderButton.tsx +11 -1
- package/src/components/Footer/Contacts.tsx +7 -10
- package/src/components/Footer/Footer.fixture.mobile.tsx +3 -3
- package/src/components/Footer/Footer.fixture.tsx +4 -3
- package/src/components/Footer/Footer.tsx +15 -13
- package/src/components/Footer/FooterContent.ts +2 -0
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/Footer/MediaButton.tsx +15 -1
- package/src/components/Footer/Sitemap.tsx +5 -5
- package/src/components/Footer/SocialMedia.tsx +8 -5
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/Gallery/GalleryCardInner.tsx +6 -7
- package/src/components/Gallery/GalleryContainer.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +1 -1
- package/src/components/Header/Header.tsx +6 -19
- package/src/components/Header/HeaderSecondaryMenu.tsx +4 -7
- package/src/components/Header/HeaderSubMenu.tsx +103 -0
- package/src/components/Header/HeaderSubMenuObserver.ts +44 -0
- package/src/components/LinkDocs/LinkDocsList.tsx +3 -3
- package/src/components/LinkDocs/LinkDocsListItem.tsx +3 -3
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +2 -2
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
- package/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
- package/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +35 -34
- package/src/components/ProductBlock/ProductBlock.tsx +2 -0
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +14 -8
- package/src/components/ProductBlock/renderBackwardButton.tsx +35 -0
- package/src/components/ProductBlock/renderBenefit.tsx +4 -4
- package/src/components/Recommendation/RecommendationCard.tsx +2 -1
- package/src/components/Recommendation/RecommendationContent.ts +4 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +59 -0
- package/src/components/StepsBlock/StepsBlock.tsx +34 -11
- package/src/components/StepsBlock/StepsBlockContent.ts +3 -0
- package/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
- package/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +6 -6
- package/src/components/Tile/Tile.tsx +13 -3
- package/src/hooks/useLink.ts +1 -1
- package/src/icons/ArrowDownIcon.svg +1 -1
- package/src/icons/ArrowLeftIcon.svg +4 -0
- package/src/icons/BurgerIcon.svg +4 -4
- package/src/icons/Calendar2Icon.svg +1 -1
- package/src/icons/CalendarCircleIcon.svg +4 -1
- package/src/icons/CalendarIcon.svg +1 -1
- package/src/icons/CalendarTickIcon.svg +6 -1
- package/src/icons/CalendarWhiteIcon.svg +2 -2
- package/src/icons/CardIcon.svg +5 -1
- package/src/icons/CardPosIcon.svg +5 -1
- package/src/icons/CardTickIcon.svg +5 -1
- package/src/icons/ChartSquareIcon.svg +6 -1
- package/src/icons/CloseIcon.svg +4 -4
- package/src/icons/DiscountShapeIcon.svg +4 -1
- package/src/icons/DocIcon.svg +1 -1
- package/src/icons/DocumentTextIcon.svg +2 -2
- package/src/icons/EmptyWalletChangeIcon.svg +8 -1
- package/src/icons/EmptyWalletIcon.svg +2 -2
- package/src/icons/GlobalIcon.svg +5 -1
- package/src/icons/GpsIcon.svg +6 -6
- package/src/icons/IconName.ts +5 -2
- package/src/icons/InterestIcon.svg +6 -1
- package/src/icons/MasterCardIcon.svg +5 -1
- package/src/icons/MinusIcon.svg +3 -1
- package/src/icons/MoneyIcon.svg +5 -1
- package/src/icons/MonitorMobileIcon.svg +4 -1
- package/src/icons/PercentageRoundIcon.svg +4 -1
- package/src/icons/PercentageSquareIcon.svg +1 -1
- package/src/icons/PersonalCardIcon.svg +4 -1
- package/src/icons/PlayMarketIcon.svg +3 -1
- package/src/icons/PlusIcon.svg +3 -1
- package/src/icons/Profile2UserIcon.svg +6 -1
- package/src/icons/RoundRubleIcon.svg +5 -1
- package/src/icons/SafeIcon.svg +7 -1
- package/src/icons/ShieldTickIcon.svg +4 -1
- package/src/icons/SmallClockIcon.svg +4 -1
- package/src/icons/UserTickIcon.svg +5 -1
- package/src/icons/WalletAdd2Icon.svg +6 -1
- package/src/icons/WalletAddIcon.svg +7 -1
- package/src/icons/WalletIcon.svg +7 -1
- package/src/icons/WalletWithMoneyIcon.svg +5 -1
- package/src/setup-fixture.ts +4 -6
- package/src/ui-kit/Button/Button.tsx +20 -15
- package/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +14 -3
- package/src/ui-kit/Heading/Heading.mobile.tsx +5 -2
- package/src/ui-kit/Heading/Heading.tsx +6 -3
- package/src/ui-kit/Icon/Icon.tsx +2 -2
- package/src/ui-kit/List/List.tsx +2 -0
- package/src/ui-kit/List/ListItem.tsx +19 -5
- package/src/ui-kit/List/ListProps.ts +1 -1
- package/src/ui-kit/Logo/Logo.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBar.tsx +2 -2
- package/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/src/utils/changeHashOnScroll.ts +15 -0
- package/src/utils/isSSR.ts +2 -0
- package/src/utils/tableFunc.ts +8 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
const HEADING_STYLE_MAP = {
|
|
190
|
-
h1: 'text-title-
|
|
190
|
+
h1: 'text-title-xl tracking-[-0.3px]',
|
|
191
191
|
h2: 'text-title',
|
|
192
192
|
h3: 'text-title-sm',
|
|
193
193
|
h4: 'text-title-xs',
|
|
@@ -195,11 +195,11 @@
|
|
|
195
195
|
h6: 'text-title-2xs tracking-[0.2px]',
|
|
196
196
|
};
|
|
197
197
|
const Heading = JSX((props) => {
|
|
198
|
-
const { className = '', headingType, title } = props;
|
|
198
|
+
const { className = '', headingType, title, as } = props;
|
|
199
199
|
if (!headingType) {
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
|
-
const Tag = headingType;
|
|
202
|
+
const Tag = as || headingType;
|
|
203
203
|
return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
|
|
204
204
|
});
|
|
205
205
|
|
|
@@ -269,6 +269,7 @@
|
|
|
269
269
|
IconMap["ActualBalanceIcon"] = "ActualBalanceIcon";
|
|
270
270
|
IconMap["AppleIcon"] = "AppleIcon";
|
|
271
271
|
IconMap["ArrowDownIcon"] = "ArrowDownIcon";
|
|
272
|
+
IconMap["ArrowLeftIcon"] = "ArrowLeftIcon";
|
|
272
273
|
IconMap["ArrowsRewindRight"] = "ArrowsRewindRight";
|
|
273
274
|
IconMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
274
275
|
IconMap["AtmIcon"] = "AtmIcon";
|
|
@@ -346,7 +347,8 @@
|
|
|
346
347
|
(function (IconTitleMap) {
|
|
347
348
|
IconTitleMap["ActualBalanceIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
|
|
348
349
|
IconTitleMap["AppleIcon"] = "\u041B\u043E\u0433\u043E \u00ABApple\u00BB";
|
|
349
|
-
IconTitleMap["ArrowDownIcon"] = "
|
|
350
|
+
IconTitleMap["ArrowDownIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043D\u0438\u0437'";
|
|
351
|
+
IconTitleMap["ArrowLeftIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043B\u0435\u0432\u043E'";
|
|
350
352
|
IconTitleMap["ArrowsRewindRight"] = "ArrowsRewindRight";
|
|
351
353
|
IconTitleMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
352
354
|
IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
|
|
@@ -423,8 +425,8 @@
|
|
|
423
425
|
|
|
424
426
|
const svgColorsMap = {
|
|
425
427
|
none: '',
|
|
426
|
-
primary: 'text-
|
|
427
|
-
secondary: 'text-
|
|
428
|
+
primary: 'text-white',
|
|
429
|
+
secondary: 'text-white',
|
|
428
430
|
};
|
|
429
431
|
const Icon = JSX(({ className = '', name = '', alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, asSVG, color = 'primary', ...imgProps }) => {
|
|
430
432
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
@@ -483,10 +485,10 @@
|
|
|
483
485
|
return index !== -1 ? href.substring(index + 1) : '';
|
|
484
486
|
};
|
|
485
487
|
|
|
486
|
-
const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-
|
|
488
|
+
const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-3.5 min-w-6 min-h-6 text-primary-text", textClassName: "self-center font-light", suffixClassName: "text-secondary-text group-hover:text-primary-main", doc: doc, icon: icon })));
|
|
487
489
|
|
|
488
490
|
const LinkDocsList = JSX(({ className, documents, columnsMode = 'double', icon }) => {
|
|
489
|
-
return documents?.length ? (jsx("div", { className: className, role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { className: "group flex
|
|
491
|
+
return documents?.length ? (jsx("div", { className: className, role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { className: "group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main", doc: doc, icon: icon }) }, String(i)))) })) : null;
|
|
490
492
|
});
|
|
491
493
|
|
|
492
494
|
const titleAlignStyleMap = {
|
|
@@ -570,7 +572,7 @@
|
|
|
570
572
|
return {
|
|
571
573
|
...link,
|
|
572
574
|
href,
|
|
573
|
-
|
|
575
|
+
'aria-label': link.text,
|
|
574
576
|
onClick: handlerDecorator((ev) => {
|
|
575
577
|
const isLocalHref = href && !isURL(href);
|
|
576
578
|
const isLocalTarget = !link.target || link.target === '_self';
|
|
@@ -597,14 +599,14 @@
|
|
|
597
599
|
|
|
598
600
|
const ButtonInner = JSX((props) => {
|
|
599
601
|
const { text, aboveText, appendLeft } = props;
|
|
600
|
-
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs font-light text-left", children: aboveText }), jsx("div", { className: "text-
|
|
602
|
+
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs font-light text-left", children: aboveText }), jsx("div", { className: "text-button-sm text-left", children: text })] })) : null] }));
|
|
601
603
|
});
|
|
602
604
|
const getButtonStyle = (props) => {
|
|
603
605
|
const { version, aboveText, rounded } = props;
|
|
604
606
|
if (version === 'link') {
|
|
605
607
|
return '';
|
|
606
608
|
}
|
|
607
|
-
const withTextStyle = `px-8 gap-2 ${aboveText ? 'py-2' : 'py-
|
|
609
|
+
const withTextStyle = `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[18px]'}`;
|
|
608
610
|
return [
|
|
609
611
|
'flex items-center justify-center',
|
|
610
612
|
isWithText(props) ? withTextStyle : 'h-12 w-12',
|
|
@@ -629,7 +631,12 @@
|
|
|
629
631
|
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
|
|
630
632
|
return disabled ? (jsx(DisabledButton, { ...props, children: buttonInner })) : (jsx(RegularButton, { ...props, children: buttonInner }));
|
|
631
633
|
});
|
|
632
|
-
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) =>
|
|
634
|
+
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => {
|
|
635
|
+
// Pick Button props to prevent forwarding into HTML <a> tag leading to errors being printed in console.
|
|
636
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
637
|
+
const { aboveText, appendLeft, ...linkProps } = rest;
|
|
638
|
+
return (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...linkProps, children: children }));
|
|
639
|
+
});
|
|
633
640
|
const DisabledButton = JSX(({ className, children, ariaLabel, version = 'none', rounded }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${buttonStyle} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: children })));
|
|
634
641
|
|
|
635
642
|
const ButtonSection = JSX(({ context, className = '', buttons }) => {
|
|
@@ -648,24 +655,40 @@
|
|
|
648
655
|
return jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
649
656
|
});
|
|
650
657
|
|
|
651
|
-
const LIST_STYLE_CLASSES =
|
|
658
|
+
const LIST_STYLE_CLASSES = {
|
|
659
|
+
primary: 'rounded-full inline-block mr-3 mt-2',
|
|
660
|
+
secondary: 'rounded-full inline-block mr-3 mt-2',
|
|
661
|
+
gray: 'rounded-full inline-block mr-3 mt-2',
|
|
662
|
+
tile: 'rounded-full inline-block mr-4',
|
|
663
|
+
'tile-white': 'rounded-full inline-block mr-4',
|
|
664
|
+
};
|
|
652
665
|
const LIST_DOT_STYLE_MAP = {
|
|
653
|
-
primary: 'bg-primary-
|
|
666
|
+
primary: 'bg-primary-text',
|
|
654
667
|
secondary: 'bg-white',
|
|
655
668
|
gray: 'bg-secondary-text',
|
|
669
|
+
tile: 'bg-black',
|
|
670
|
+
'tile-white': 'bg-white',
|
|
656
671
|
};
|
|
657
672
|
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
|
|
658
|
-
return (jsxs("div", { className: `font-sans flex items-
|
|
673
|
+
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && jsx("div", { className: getListStyle(version) }), jsx("span", { children: children })] }));
|
|
659
674
|
});
|
|
660
675
|
const getListStyle = (version) => {
|
|
661
|
-
const size =
|
|
662
|
-
|
|
676
|
+
const size = {
|
|
677
|
+
primary: 'w-2 h-2 min-w-2 min-h-2',
|
|
678
|
+
secondary: 'w-2 h-2 min-w-2 min-h-2',
|
|
679
|
+
gray: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5',
|
|
680
|
+
tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
681
|
+
'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
682
|
+
};
|
|
683
|
+
return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
|
|
663
684
|
};
|
|
664
685
|
|
|
665
686
|
const TEXT_STYLE_MAP = {
|
|
666
687
|
primary: 'text-primary-text',
|
|
667
688
|
secondary: 'text-white',
|
|
668
689
|
gray: 'text-secondary-text',
|
|
690
|
+
tile: 'text-primary-text',
|
|
691
|
+
'tile-white': 'text-white',
|
|
669
692
|
};
|
|
670
693
|
const List = JSX((props) => {
|
|
671
694
|
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
@@ -679,7 +702,7 @@
|
|
|
679
702
|
});
|
|
680
703
|
|
|
681
704
|
const benefitIconBgStyleMap = {
|
|
682
|
-
primary: 'bg-main',
|
|
705
|
+
primary: 'bg-primary-main',
|
|
683
706
|
secondary: 'bg-white/30',
|
|
684
707
|
};
|
|
685
708
|
const benefitTitleStyleMap = {
|
|
@@ -691,21 +714,32 @@
|
|
|
691
714
|
secondary: 'text-white',
|
|
692
715
|
};
|
|
693
716
|
function renderBenefit(benefit, i, version) {
|
|
694
|
-
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: `w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${benefitIconBgStyleMap[version]}`, image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-
|
|
717
|
+
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: `w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border text-white ${benefitIconBgStyleMap[version]}`, image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-0.5 flex-col h-full max-w-[149px]", children: [jsx("div", { className: `font-medium text-xl m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `font-normal text-m-md ${benefitDescStyleMap[version]}`, children: benefit.description }))] })] }, String(i)));
|
|
695
718
|
}
|
|
696
719
|
|
|
697
720
|
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
698
721
|
const textColor = version === 'secondary' ? 'text-white' : 'text-primary-text';
|
|
699
|
-
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
|
|
722
|
+
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), buttons: getButtons(context, buttons), children: [description && (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, 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-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
700
723
|
});
|
|
701
|
-
const getTitle = (title, headingType
|
|
702
|
-
|
|
703
|
-
return (title && jsx(Tag, { className: `font-sans font-medium m-0 text-title-xl ${textColor}`, children: title }));
|
|
724
|
+
const getTitle = (title, headingType) => {
|
|
725
|
+
return (title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })));
|
|
704
726
|
};
|
|
705
727
|
const getButtons = (context, buttons) => {
|
|
706
|
-
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-
|
|
728
|
+
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-4" })) : null;
|
|
707
729
|
};
|
|
708
730
|
|
|
731
|
+
const backwardBgStyleMap = {
|
|
732
|
+
primary: 'bg-primary-main',
|
|
733
|
+
secondary: 'bg-white',
|
|
734
|
+
};
|
|
735
|
+
const backwardIconStyleMap = {
|
|
736
|
+
primary: 'text-white',
|
|
737
|
+
secondary: 'text-primary-text',
|
|
738
|
+
};
|
|
739
|
+
function renderBackwardButton(text, version, className) {
|
|
740
|
+
return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { rounded: true, className: `w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`, ariaLabel: text, children: jsx(Img, { className: `w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`, image: { icon: 'ArrowLeftIcon' }, color: "none", width: "24", height: "24", asSVG: true }) }), text ? jsx("span", { className: "text-m-md", children: text }) : null] }));
|
|
741
|
+
}
|
|
742
|
+
|
|
709
743
|
const productBlockStyleMap$1 = {
|
|
710
744
|
primary: 'bg-white text-primary-text',
|
|
711
745
|
secondary: 'bg-primary-main text-white',
|
|
@@ -718,7 +752,7 @@
|
|
|
718
752
|
const { context, className = '', breadcrumbs, version = 'primary', anchor = null, ...otherProps } = props;
|
|
719
753
|
const router = context.useRouter();
|
|
720
754
|
const { handlerDecorator } = context;
|
|
721
|
-
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, 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 })] }));
|
|
755
|
+
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, id: anchor, children: [renderBackwardButton('Все дебетовые карты', version, 'mb-10'), 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 })] }));
|
|
722
756
|
});
|
|
723
757
|
|
|
724
758
|
const textBlockStyleMaps = {
|
|
@@ -803,11 +837,11 @@
|
|
|
803
837
|
};
|
|
804
838
|
const Tile = JSX((props) => {
|
|
805
839
|
const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
|
|
806
|
-
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' : ''}
|
|
807
|
-
${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)] }) }));
|
|
840
|
+
return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 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), as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
841
|
+
${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] text-title-new-sm font-light", description: description })), children, renderList$1(items, version)] }) }));
|
|
808
842
|
});
|
|
809
843
|
function renderList$1(items, version) {
|
|
810
|
-
return items?.length ? (jsx(List, { items: items, itemClassName: "mt-2.5 first:mt-0", version: version })) : null;
|
|
844
|
+
return items?.length ? (jsx(List, { items: items, itemClassName: "text-title-new-sm font-light mt-2.5 first:mt-0", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
|
|
811
845
|
}
|
|
812
846
|
|
|
813
847
|
const productTileStyleMap = {
|
|
@@ -866,30 +900,29 @@
|
|
|
866
900
|
};
|
|
867
901
|
|
|
868
902
|
const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
|
|
869
|
-
const titleStyleClasses = getTitleStyle(version
|
|
870
|
-
return (jsxs("div", { className: "h-full flex flex-col justify-between", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-
|
|
903
|
+
const titleStyleClasses = getTitleStyle(version);
|
|
904
|
+
return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version) : null] }), button?.text ? renderButton$1(button) : null] }));
|
|
871
905
|
});
|
|
872
906
|
function renderButton$1(button) {
|
|
873
907
|
return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Img, { image: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
|
|
874
908
|
}
|
|
875
909
|
function renderCardTitle(title, className) {
|
|
876
|
-
return jsx("div", { className: `
|
|
910
|
+
return jsx("div", { className: `text-xl m-0 ${className}`, children: title });
|
|
877
911
|
}
|
|
878
912
|
function renderItems(items, version = 'primary') {
|
|
879
913
|
return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), version: version }));
|
|
880
914
|
}
|
|
881
|
-
function getTitleStyle(version
|
|
882
|
-
return `
|
|
915
|
+
function getTitleStyle(version) {
|
|
916
|
+
return `text-xl m-0
|
|
883
917
|
${version !== 'secondary' ? 'text-primary-text' : ''}
|
|
884
|
-
${!description && !items?.length ? 'text-center' : ''}
|
|
885
918
|
`;
|
|
886
919
|
}
|
|
887
920
|
|
|
888
921
|
const GalleryContainer = JSX(({ context, title, description, cards = [], version = 'normal', activeCardIndex }) => {
|
|
889
|
-
return (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Heading, { headingType: "h2", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "font-
|
|
922
|
+
return (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Heading, { headingType: "h2", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "font-light text-md max-w-[600px] mt-2.5", children: description })) : null] }), jsx("div", { className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version, context }, i)) })] }));
|
|
890
923
|
});
|
|
891
924
|
function renderCard({ card, version }, i) {
|
|
892
|
-
return (jsx("section", { className: `box-border border-solid border
|
|
925
|
+
return (jsx("section", { className: `box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
|
|
893
926
|
items-stretch ${cardStyleMap[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
894
927
|
}
|
|
895
928
|
|
|
@@ -901,7 +934,7 @@
|
|
|
901
934
|
const showNextButton = isGalleryScrollAvailable &&
|
|
902
935
|
cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
|
|
903
936
|
const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
|
|
904
|
-
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[
|
|
937
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] 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" })] }));
|
|
905
938
|
});
|
|
906
939
|
|
|
907
940
|
const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
@@ -1002,7 +1035,7 @@
|
|
|
1002
1035
|
};
|
|
1003
1036
|
const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
|
|
1004
1037
|
|
|
1005
|
-
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && jsx(Heading, { headingType: "h4", className: "text-center text-white", title: title }), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
|
|
1038
|
+
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && jsx(Heading, { headingType: "h4", as: "h3", className: "text-center text-white", title: title }), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
|
|
1006
1039
|
|
|
1007
1040
|
const ComparisonTableColumnHeaders = JSX(({ colHeaders, activeCardIndex, router, handlerDecorator }) => {
|
|
1008
1041
|
return (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader", scope: "col" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] }));
|
|
@@ -1013,7 +1046,7 @@
|
|
|
1013
1046
|
const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : 'border-b-0'}`;
|
|
1014
1047
|
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
|
|
1015
1048
|
});
|
|
1016
|
-
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("
|
|
1049
|
+
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h4", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
|
|
1017
1050
|
|
|
1018
1051
|
const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : 'border-b-0'}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
|
|
1019
1052
|
|
|
@@ -1163,8 +1196,19 @@
|
|
|
1163
1196
|
}
|
|
1164
1197
|
};
|
|
1165
1198
|
|
|
1199
|
+
const tableFunc = (table) => (input) => {
|
|
1200
|
+
const [, output] = table.find(([predicate]) => predicate(input)) || [];
|
|
1201
|
+
return output;
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
const func = tableFunc([
|
|
1205
|
+
[(_) => _ === 1, 'год'],
|
|
1206
|
+
[(_) => _ <= 4, 'года'],
|
|
1207
|
+
[() => true, 'лет'],
|
|
1208
|
+
]);
|
|
1166
1209
|
function renderButton(number, i, handleClick) {
|
|
1167
|
-
|
|
1210
|
+
const string = func(number);
|
|
1211
|
+
return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", string] }) }, String(i)));
|
|
1168
1212
|
}
|
|
1169
1213
|
|
|
1170
1214
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
@@ -1370,21 +1414,21 @@
|
|
|
1370
1414
|
transparent: 'text-white',
|
|
1371
1415
|
};
|
|
1372
1416
|
const Logo = JSX(({ className, href, children, targetBlank, bgColor = 'bg-white', hideTitle }) => {
|
|
1373
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), !hideTitle && (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-
|
|
1417
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), !hideTitle && (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-m-title-xs font-medium ml-2.5`, children: children || 'Россельхозбанк' }))] }));
|
|
1374
1418
|
});
|
|
1375
1419
|
|
|
1376
1420
|
const SearchBar = JSX(({ className, context }) => {
|
|
1377
1421
|
const { term, setTerm } = context.useSearch();
|
|
1378
|
-
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-
|
|
1422
|
+
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-light text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: 'h-12 pl-12 w-full peer font-sans font-light text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text', value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input" }), jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (e) => {
|
|
1379
1423
|
e.preventDefault();
|
|
1380
1424
|
console.log('click');
|
|
1381
1425
|
}, children: jsx("div", { className: "font-normal text-sm px-9 py-[9px]", children: "\u041D\u0430\u0439\u0442\u0438" }) })] }));
|
|
1382
1426
|
});
|
|
1383
1427
|
|
|
1384
|
-
const Contacts = JSX(({ className, items, hasButton, context }) => {
|
|
1428
|
+
const Contacts = JSX(({ className = '', items, hasButton, context }) => {
|
|
1385
1429
|
const router = context.useRouter();
|
|
1386
1430
|
const { handlerDecorator } = context;
|
|
1387
|
-
return (jsxs("div", { className:
|
|
1431
|
+
return (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", ...useLink({ router, handlerDecorator }, {
|
|
1388
1432
|
text: 'Обратная связь',
|
|
1389
1433
|
href: '/',
|
|
1390
1434
|
target: '_blank',
|
|
@@ -1392,14 +1436,14 @@
|
|
|
1392
1436
|
});
|
|
1393
1437
|
const renderContact = (item, index) => {
|
|
1394
1438
|
const { type, text, description } = item;
|
|
1395
|
-
return (jsxs("div", { className: "mb-
|
|
1439
|
+
return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 font-sans font-light text-sm text-secondary-text", children: description })] }, String(index)));
|
|
1396
1440
|
};
|
|
1397
1441
|
const renderText = (type, text = '') => {
|
|
1398
1442
|
switch (type) {
|
|
1399
1443
|
case 'tel':
|
|
1400
|
-
return (jsx("a", { className: "font-sans
|
|
1444
|
+
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
|
|
1401
1445
|
case 'email':
|
|
1402
|
-
return (jsx("a", { className: "font-sans
|
|
1446
|
+
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `mailto:${text}`, children: text }));
|
|
1403
1447
|
default:
|
|
1404
1448
|
return jsx("span", { children: text });
|
|
1405
1449
|
}
|
|
@@ -1411,7 +1455,7 @@
|
|
|
1411
1455
|
const { handlerDecorator } = context;
|
|
1412
1456
|
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
1413
1457
|
});
|
|
1414
|
-
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-
|
|
1458
|
+
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1415
1459
|
|
|
1416
1460
|
const cmp = (a) => (b) => a?.href === b?.href;
|
|
1417
1461
|
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
@@ -1430,20 +1474,20 @@
|
|
|
1430
1474
|
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
1431
1475
|
}
|
|
1432
1476
|
|
|
1433
|
-
const Sitemap = JSX(({ className, items, context }) => {
|
|
1477
|
+
const Sitemap = JSX(({ className = '', items, context }) => {
|
|
1434
1478
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1435
1479
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
1436
1480
|
const linkParams = {
|
|
1437
1481
|
router: context.useRouter(),
|
|
1438
1482
|
handlerDecorator: context.handlerDecorator,
|
|
1439
1483
|
};
|
|
1440
|
-
return (jsx("div", { className: `flex items-start justify-
|
|
1484
|
+
return (jsx("div", { className: `flex items-start justify-between gap-11 xl:gap-5 ${className}`, children: mergedItems?.map((_, i) => renderColumn(_, i, linkParams)) }));
|
|
1441
1485
|
});
|
|
1442
1486
|
const renderColumn = (c, index, { router, handlerDecorator }) => {
|
|
1443
1487
|
const { text, href, items, target } = c;
|
|
1444
|
-
return (jsxs("div", { className: "flex flex-col gap-[14px]", children: [jsx("a", { className: "block font-sans
|
|
1488
|
+
return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-[14px]", children: [jsx("a", { className: "block font-sans leading-5 text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _), index: i }, String(i))))] }, String(index)));
|
|
1445
1489
|
};
|
|
1446
|
-
const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-
|
|
1490
|
+
const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-light text-base text-secondary-text hover:text-primary-main no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` })));
|
|
1447
1491
|
|
|
1448
1492
|
const ICONS_MAP = [
|
|
1449
1493
|
{
|
|
@@ -1467,34 +1511,47 @@
|
|
|
1467
1511
|
width: '12px',
|
|
1468
1512
|
height: '20px',
|
|
1469
1513
|
},
|
|
1514
|
+
{
|
|
1515
|
+
origins: ['apps.apple.com'],
|
|
1516
|
+
icon: { icon: 'AppleIcon' },
|
|
1517
|
+
label: 'App Store',
|
|
1518
|
+
width: '20px',
|
|
1519
|
+
height: '22px',
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
origins: ['play.google.com'],
|
|
1523
|
+
icon: { icon: 'PlayMarketIcon' },
|
|
1524
|
+
label: 'Google Play',
|
|
1525
|
+
width: '21px',
|
|
1526
|
+
height: '21px',
|
|
1527
|
+
},
|
|
1470
1528
|
];
|
|
1471
1529
|
const MediaButton = JSX(({ href }) => {
|
|
1472
1530
|
const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1473
1531
|
if (!icon)
|
|
1474
1532
|
return null;
|
|
1475
|
-
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider
|
|
1533
|
+
return (jsx("a", { className: "flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main", href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, width: width, height: height, asSVG: true, className: "block", color: "none" })) : null }));
|
|
1476
1534
|
});
|
|
1477
1535
|
|
|
1478
|
-
const SocialMedia = JSX(({ className, media, context }) => {
|
|
1536
|
+
const SocialMedia = JSX(({ className = '', media, context, children }) => {
|
|
1479
1537
|
const router = context.useRouter();
|
|
1480
1538
|
const { handlerDecorator } = context;
|
|
1481
|
-
return (jsx("div", { className: `flex
|
|
1539
|
+
return (jsxs("div", { children: [jsx("div", { className: `flex gap-2.5 mb-1.5 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { ...useLink({ router, handlerDecorator }, _) }, String(index)))) }), jsx("span", { className: "font-light text-sm text-secondary-text", children: children })] }));
|
|
1482
1540
|
});
|
|
1483
1541
|
|
|
1484
1542
|
const TextInformation = JSX(({ className, links, context }) => {
|
|
1485
1543
|
const router = context.useRouter();
|
|
1486
1544
|
const { handlerDecorator } = context;
|
|
1487
|
-
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-
|
|
1545
|
+
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-[5px]", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1488
1546
|
});
|
|
1489
|
-
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-
|
|
1547
|
+
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1490
1548
|
|
|
1491
|
-
const LEFT_COL_WIDTH_FULL_HD = 'w-[
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
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 })] }));
|
|
1549
|
+
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1550
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, anchor = null, }) => {
|
|
1551
|
+
return (jsxs("footer", { className: `px-9 pt-9 pb-8 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-24", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1495
1552
|
});
|
|
1496
1553
|
|
|
1497
|
-
const
|
|
1554
|
+
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
1498
1555
|
|
|
1499
1556
|
const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
|
|
1500
1557
|
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
@@ -1502,40 +1559,13 @@
|
|
|
1502
1559
|
|
|
1503
1560
|
const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
|
|
1504
1561
|
|
|
1505
|
-
const findActiveSubItem = (router) => (items = []) => {
|
|
1506
|
-
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
1507
|
-
const activeSubItem = possibleActiveSubItems?.length
|
|
1508
|
-
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
1509
|
-
: null;
|
|
1510
|
-
return activeSubItem;
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
1514
|
-
|
|
1515
1562
|
const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) ||
|
|
1516
1563
|
isHrefActive(topItem.href, router) ||
|
|
1517
1564
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
1518
1565
|
|
|
1519
|
-
const TEXT_CLASSES$2 = 'font-sans font-
|
|
1520
|
-
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1521
|
-
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] })));
|
|
1522
|
-
const getTextClasses$2 = (bgColor, active) => {
|
|
1523
|
-
let classes = 'text-white';
|
|
1524
|
-
if (bgColor === 'bg-white') {
|
|
1525
|
-
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1526
|
-
}
|
|
1527
|
-
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1528
|
-
};
|
|
1529
|
-
const getBorderClasses = (bgColor, active) => {
|
|
1530
|
-
if (!active) {
|
|
1531
|
-
return BORDER_CLASSES;
|
|
1532
|
-
}
|
|
1533
|
-
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
const TEXT_CLASSES$1 = 'font-sans font-normal text-sm';
|
|
1566
|
+
const TEXT_CLASSES$2 = 'font-sans font-light text-sm';
|
|
1537
1567
|
const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1538
|
-
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$
|
|
1568
|
+
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$2(bgColor, active, flat), children: text || children }) })));
|
|
1539
1569
|
const getLinkClasses$1 = (bgColor, active, flat) => {
|
|
1540
1570
|
let classes = 'border-transparent';
|
|
1541
1571
|
if (active) {
|
|
@@ -1543,14 +1573,14 @@
|
|
|
1543
1573
|
}
|
|
1544
1574
|
return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
|
|
1545
1575
|
};
|
|
1546
|
-
const getTextClasses$
|
|
1576
|
+
const getTextClasses$2 = (bgColor, active, flat) => {
|
|
1547
1577
|
let classes = 'text-white';
|
|
1548
1578
|
if (bgColor === 'bg-white') {
|
|
1549
1579
|
classes = active
|
|
1550
1580
|
? 'text-primary-main'
|
|
1551
1581
|
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
1552
1582
|
}
|
|
1553
|
-
return `${classes} ${TEXT_CLASSES$
|
|
1583
|
+
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1554
1584
|
};
|
|
1555
1585
|
|
|
1556
1586
|
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 })));
|
|
@@ -1559,34 +1589,118 @@
|
|
|
1559
1589
|
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
1560
1590
|
transparent: 'text-white',
|
|
1561
1591
|
};
|
|
1562
|
-
const
|
|
1592
|
+
const LINKS_COLORS_MAP = {
|
|
1563
1593
|
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
1564
1594
|
transparent: 'text-white',
|
|
1565
1595
|
};
|
|
1566
|
-
const
|
|
1596
|
+
const LINKS_ICON_NAME_MAP = {
|
|
1567
1597
|
'bg-white': 'GridIcon',
|
|
1568
1598
|
transparent: 'GridIconWhite',
|
|
1569
1599
|
};
|
|
1570
1600
|
const HeaderSecondaryMenu = JSX(({ context, className, defaultLocation = '', bgColor = 'bg-white' }) => {
|
|
1571
1601
|
const [city, getCity] = context.useGeolocation(defaultLocation);
|
|
1572
|
-
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: "LoupeIcon", className: "h-full", asSVG: true, color: "none" }) }), jsx(HeaderSecondaryMenuButton, { className:
|
|
1602
|
+
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: "LoupeIcon", className: "h-full", asSVG: true, color: "none" }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Img, { image: LINKS_ICON_NAME_MAP[bgColor], className: "h-full", asSVG: true, color: "none" }) })] }));
|
|
1573
1603
|
});
|
|
1574
1604
|
|
|
1605
|
+
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1606
|
+
|
|
1607
|
+
const findActiveSubItem = (router) => (items = []) => {
|
|
1608
|
+
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
1609
|
+
const activeSubItem = possibleActiveSubItems?.length
|
|
1610
|
+
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
1611
|
+
: null;
|
|
1612
|
+
return activeSubItem;
|
|
1613
|
+
};
|
|
1614
|
+
|
|
1615
|
+
const TEXT_CLASSES$1 = 'font-sans font-light text-base';
|
|
1616
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1617
|
+
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses$1(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
1618
|
+
const getTextClasses$1 = (bgColor, active) => {
|
|
1619
|
+
let classes = 'text-white';
|
|
1620
|
+
if (bgColor === 'bg-white') {
|
|
1621
|
+
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1622
|
+
}
|
|
1623
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
1624
|
+
};
|
|
1625
|
+
const getBorderClasses = (bgColor, active) => {
|
|
1626
|
+
if (!active) {
|
|
1627
|
+
return BORDER_CLASSES;
|
|
1628
|
+
}
|
|
1629
|
+
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1630
|
+
};
|
|
1631
|
+
|
|
1632
|
+
const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
1633
|
+
|
|
1634
|
+
const headerSubMenuObserver = isSSR()
|
|
1635
|
+
? undefined
|
|
1636
|
+
: new IntersectionObserver((entries) => {
|
|
1637
|
+
const headerSubMenuButtonElement = window.document.querySelector('[data-header-submenu-visible=toggled]');
|
|
1638
|
+
const headerSubMenuItems = Array.from(window.document.querySelectorAll('[data-item-name=header-submenu]'));
|
|
1639
|
+
const dotsHeaderSubMenuItems = Array.from(window.document.querySelectorAll('[data-item-name=dots-header-submenu]'));
|
|
1640
|
+
const visibilityList = {};
|
|
1641
|
+
entries.forEach((j) => {
|
|
1642
|
+
visibilityList[String(j.target.toString())] = j.isIntersecting;
|
|
1643
|
+
});
|
|
1644
|
+
const isHeaderSubMenuButtonShow = toggleVisibilityInItems(visibilityList, dotsHeaderSubMenuItems, 'hidden');
|
|
1645
|
+
toggleVisibilityInItems(visibilityList, headerSubMenuItems, 'invisible');
|
|
1646
|
+
if (headerSubMenuButtonElement) {
|
|
1647
|
+
isHeaderSubMenuButtonShow
|
|
1648
|
+
? headerSubMenuButtonElement.classList.remove('hidden')
|
|
1649
|
+
: headerSubMenuButtonElement.classList.add('hidden');
|
|
1650
|
+
}
|
|
1651
|
+
}, { root: window.document, threshold: 1.0 });
|
|
1652
|
+
// TODO: add types
|
|
1653
|
+
const toggleVisibilityInItems = (visibilityList, items, className) => {
|
|
1654
|
+
const isReversed = className !== 'hidden';
|
|
1655
|
+
return items.some((item) => {
|
|
1656
|
+
const key = item.toString();
|
|
1657
|
+
const option = isReversed ? !visibilityList[key] : visibilityList[key];
|
|
1658
|
+
key in visibilityList ? item.classList.toggle(className, option) : null;
|
|
1659
|
+
return isReversed ? item.classList.contains('hidden') : !item.classList.contains('hidden');
|
|
1660
|
+
});
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
const HeaderSubMenu = JSX(({ context, subItems, bgColor }) => {
|
|
1664
|
+
const [subMenuIsShow, setHiddenMenuIsShow] = context.useState(false);
|
|
1665
|
+
const router = context.useRouter();
|
|
1666
|
+
const { handlerDecorator } = context;
|
|
1667
|
+
setTimeout(() => {
|
|
1668
|
+
const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
|
|
1669
|
+
headerSubMenu.forEach((_) => {
|
|
1670
|
+
headerSubMenuObserver?.observe(_);
|
|
1671
|
+
});
|
|
1672
|
+
}, 200);
|
|
1673
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1674
|
+
const toggleSubMenu = () => setHiddenMenuIsShow(!subMenuIsShow);
|
|
1675
|
+
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), dataItemName: "header-submenu", bgColor: bgColor }, _.href)));
|
|
1676
|
+
return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subMenu }), renderDotsSubMenu({
|
|
1677
|
+
subMenuIsShow,
|
|
1678
|
+
toggleSubMenu,
|
|
1679
|
+
subItems,
|
|
1680
|
+
router,
|
|
1681
|
+
handlerDecorator,
|
|
1682
|
+
})] }));
|
|
1683
|
+
});
|
|
1684
|
+
// TODO: add types
|
|
1685
|
+
const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, "aria-label": `${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3)
|
|
1686
|
+
.fill(0)
|
|
1687
|
+
.map((_, i) => renderDot(i)) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, "aria-hidden": !subMenuIsShow, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
|
|
1688
|
+
// TODO: add types
|
|
1689
|
+
const renderDotsSubMenuItems = (subItems, router, handlerDecorator) => subItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), "data-item-name": "dots-header-submenu", className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
|
|
1690
|
+
const renderDot = (i) => (jsx("div", { className: "w-[3px] h-[3px] rounded bg-black mr-1" }, String(i)));
|
|
1691
|
+
|
|
1575
1692
|
const BORDER_COLORS = {
|
|
1576
1693
|
'bg-white': 'bg-main-divider',
|
|
1577
1694
|
transparent: 'bg-main-divider opacity-30',
|
|
1578
1695
|
};
|
|
1579
|
-
const Header = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1696
|
+
const Header = JSX(({ className = '', defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1580
1697
|
const router = context.useRouter();
|
|
1581
1698
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1582
1699
|
const { handlerDecorator } = context;
|
|
1583
1700
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
1584
1701
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
-
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
1588
|
-
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }, _.href)));
|
|
1589
|
-
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 })] }) }));
|
|
1702
|
+
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
|
|
1703
|
+
return (jsx("header", { className: `pt-6 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-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx(HeaderSubMenu, { context: context, subItems: activeTopItem?.items, bgColor: bgColor })] }) }));
|
|
1590
1704
|
});
|
|
1591
1705
|
|
|
1592
1706
|
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
|
|
@@ -1605,28 +1719,69 @@
|
|
|
1605
1719
|
});
|
|
1606
1720
|
|
|
1607
1721
|
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
1608
|
-
const LINK_CLASSES = 'flex-1 flex items-center justify-center';
|
|
1609
|
-
const NavigatorTabItem = JSX(({ className = '', label, active, children, onClick,
|
|
1722
|
+
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
1723
|
+
const NavigatorTabItem = JSX(({ className = '', label, active, children, onClick, href, target = '_self' }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: label || children }) })));
|
|
1610
1724
|
const getLinkClasses = (className, active) => {
|
|
1611
|
-
const classes = active ? 'bg-primary-main' : 'bg-white';
|
|
1725
|
+
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
1612
1726
|
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
1613
1727
|
};
|
|
1614
1728
|
const getTextClasses = (active) => {
|
|
1615
|
-
const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
|
|
1729
|
+
const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
|
|
1616
1730
|
return `${classes} ${TEXT_CLASSES}`;
|
|
1617
1731
|
};
|
|
1618
1732
|
|
|
1619
1733
|
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, anchor = null }) => {
|
|
1620
1734
|
const router = context.useRouter();
|
|
1621
|
-
const
|
|
1622
|
-
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(
|
|
1735
|
+
const href = globalThis.location.href;
|
|
1736
|
+
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(href, router)) : null }));
|
|
1623
1737
|
});
|
|
1624
|
-
const renderTab = (
|
|
1625
|
-
const
|
|
1626
|
-
const active = hash ?
|
|
1627
|
-
return (jsx(NavigatorTabItem, { active: active, onClick: () => router
|
|
1738
|
+
const renderTab = (href, router) => (tab, i) => {
|
|
1739
|
+
const hash = getHash(href);
|
|
1740
|
+
const active = hash ? tab.href === hash : i === 0;
|
|
1741
|
+
return (jsx(NavigatorTabItem, { active: active, onClick: () => handleRoute(router, tab.href), ...tab }, tab.href));
|
|
1742
|
+
};
|
|
1743
|
+
const handleRoute = (router, href) => {
|
|
1744
|
+
if (isURL(href))
|
|
1745
|
+
return; // if href if full URL - move to HTML href action, do not touch router
|
|
1746
|
+
router?.replace(href || '');
|
|
1628
1747
|
};
|
|
1629
1748
|
|
|
1749
|
+
const useActiveHandler = ({ context, blocks, initialState = false }) => {
|
|
1750
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
1751
|
+
const hasContent = blocks?.length;
|
|
1752
|
+
const icon = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
1753
|
+
const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
|
|
1754
|
+
const handleToggle = (e) => {
|
|
1755
|
+
if (!hasContent) {
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
setIsActive(!isActive);
|
|
1759
|
+
const contentBlock = getContentBlock(e);
|
|
1760
|
+
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
1761
|
+
? null
|
|
1762
|
+
: `${contentBlock.scrollHeight}px`;
|
|
1763
|
+
};
|
|
1764
|
+
return { isActive, hasContent, icon, handleToggle };
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
|
+
const OtherProductsItemInner = JSX(({ blocks, columns = 1, context }) => {
|
|
1768
|
+
const className = 'box-border p-5';
|
|
1769
|
+
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: jsx("div", { className: `box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`, children: renderBlocksList({ context, className, columns, blocks }) }) }));
|
|
1770
|
+
});
|
|
1771
|
+
|
|
1772
|
+
const OtherProductsItem = JSX(({ label, isExpanded, blocks, columns, context }) => {
|
|
1773
|
+
const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
|
|
1774
|
+
context,
|
|
1775
|
+
blocks,
|
|
1776
|
+
initialState: isExpanded,
|
|
1777
|
+
});
|
|
1778
|
+
return (jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (jsx(OtherProductsItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, context: context })) : null, jsxs("button", { className: "border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer", onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1781
|
+
const OtherProducts = JSX(({ blockItems, context, className }) => {
|
|
1782
|
+
return (jsx("section", { className: `font-sans bg-white text-primary-text ${className || ''}`, children: blockItems?.length ? (jsx("div", { className: "list-none m-0 p-0", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, context: context }, `BlockItem${i}`))) })) : null }));
|
|
1783
|
+
});
|
|
1784
|
+
|
|
1630
1785
|
const GOLDEN_RATIO = 1.618;
|
|
1631
1786
|
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
|
|
1632
1787
|
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() })] }) }));
|
|
@@ -1732,44 +1887,8 @@
|
|
|
1732
1887
|
return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
|
|
1733
1888
|
}
|
|
1734
1889
|
|
|
1735
|
-
const useActiveHandler = ({ context, blocks, initialState = false }) => {
|
|
1736
|
-
const [isActive, setIsActive] = context.useState(initialState);
|
|
1737
|
-
const hasContent = blocks?.length;
|
|
1738
|
-
const icon = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
1739
|
-
const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
|
|
1740
|
-
const handleToggle = (e) => {
|
|
1741
|
-
if (!hasContent) {
|
|
1742
|
-
return;
|
|
1743
|
-
}
|
|
1744
|
-
setIsActive(!isActive);
|
|
1745
|
-
const contentBlock = getContentBlock(e);
|
|
1746
|
-
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
1747
|
-
? null
|
|
1748
|
-
: `${contentBlock.scrollHeight}px`;
|
|
1749
|
-
};
|
|
1750
|
-
return { isActive, hasContent, icon, handleToggle };
|
|
1751
|
-
};
|
|
1752
|
-
|
|
1753
|
-
const OtherProductsItemInner = JSX(({ blocks, columns = 1, context }) => {
|
|
1754
|
-
const className = 'box-border p-5';
|
|
1755
|
-
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: jsx("div", { className: `box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`, children: renderBlocksList({ context, className, columns, blocks }) }) }));
|
|
1756
|
-
});
|
|
1757
|
-
|
|
1758
|
-
const OtherProductsItem = JSX(({ label, isExpanded, blocks, columns, context }) => {
|
|
1759
|
-
const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
|
|
1760
|
-
context,
|
|
1761
|
-
blocks,
|
|
1762
|
-
initialState: isExpanded,
|
|
1763
|
-
});
|
|
1764
|
-
return (jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (jsx(OtherProductsItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, context: context })) : null, jsxs("button", { className: "border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer", onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
|
|
1765
|
-
});
|
|
1766
|
-
|
|
1767
|
-
const OtherProducts = JSX(({ blockItems, context, className }) => {
|
|
1768
|
-
return (jsx("section", { className: `font-sans bg-white text-primary-text ${className || ''}`, children: blockItems?.length ? (jsx("div", { className: "list-none m-0 p-0", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, context: context }, `BlockItem${i}`))) })) : null }));
|
|
1769
|
-
});
|
|
1770
|
-
|
|
1771
1890
|
const RecommendationCard = JSX(({ context, className = '', title, description, items, image, version, socialMedia }) => {
|
|
1772
|
-
return (jsx("section", { className: `border border-solid box-border py-[30px] px-9 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, className: "flex justify-between", title: title ? (jsx("h4",
|
|
1891
|
+
return (jsx("section", { className: `border border-solid box-border py-[30px] px-9 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, className: "flex justify-between", title: title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "font-normal mb-3.5", title: title })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? jsx(Description, { className: "text-left", description: description }) : null, items?.length ? (jsx(List, { className: "text-md font-light flex flex-col gap-2", items: items, version: version })) : null, jsx(SocialMedia, { className: "pt-[42px] pb-0", media: socialMedia, context: context })] }) }));
|
|
1773
1892
|
});
|
|
1774
1893
|
|
|
1775
1894
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
@@ -1799,20 +1918,20 @@
|
|
|
1799
1918
|
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" }))] }));
|
|
1800
1919
|
};
|
|
1801
1920
|
|
|
1802
|
-
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], anchor = null }) => {
|
|
1921
|
+
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null }) => {
|
|
1803
1922
|
const shortGaps = steps.length > 3;
|
|
1804
1923
|
return (jsxs("section", { className: [
|
|
1805
1924
|
'box-border font-sans text-primary-text bg-white',
|
|
1806
1925
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
1807
1926
|
'py-[50px] flex flex-col items-center',
|
|
1808
1927
|
className,
|
|
1809
|
-
].join(' '), 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(renderStepIcon)) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle) })] })) : null] }));
|
|
1928
|
+
].join(' '), 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(renderStepIcon)) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map((step, i) => renderStepTitle(step, i, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "box-border mt-[43px] py-3 h-12 w-full max-w-[240px]", version: "primary", href: "#", children: button.text })) : null] }));
|
|
1810
1929
|
});
|
|
1811
1930
|
const renderStepIcon = (step, i) => {
|
|
1812
|
-
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?.icon && jsx(Img, { image: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-
|
|
1931
|
+
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?.icon && jsx(Img, { image: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-normal text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
|
|
1813
1932
|
};
|
|
1814
|
-
const renderStepTitle = (step, i) => {
|
|
1815
|
-
return (jsxs("div", { className: "flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [step.label && jsx("div", { className: "font-
|
|
1933
|
+
const renderStepTitle = (step, i, isMainButton) => {
|
|
1934
|
+
return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label && jsx("div", { className: "font-normal text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-light text-base text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-[38px] py-3 h-12 w-full max-w-[240px]", version: "primary", href: "#", children: step.button.text })) : null] }, String(i)));
|
|
1816
1935
|
};
|
|
1817
1936
|
|
|
1818
1937
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -1820,13 +1939,15 @@
|
|
|
1820
1939
|
const COLS_LENGTH_FOR_SCROLL = 2;
|
|
1821
1940
|
const COLUMN_WIDTH = 4 * 80 + 40; // w-80 + pl-10 = 360px
|
|
1822
1941
|
|
|
1942
|
+
const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
|
|
1943
|
+
|
|
1823
1944
|
const TariffsTableCell = JSX(({ cell, isLastRow }) => {
|
|
1824
1945
|
const cellWrapperClasses = `first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
|
|
1825
1946
|
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { children: cell.map(renderCellInner) }) }));
|
|
1826
1947
|
});
|
|
1827
1948
|
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label ? jsx("div", { className: "text-xl font-medium m-0", children: label }) : null, description ? jsx("div", { className: "text-sm text-secondary-text", children: description }) : null, list?.items?.length ? renderList(list) : null, image && jsx(Img, { image: image }), buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
1828
1949
|
const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-sm", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
1829
|
-
const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) }));
|
|
1950
|
+
const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) }));
|
|
1830
1951
|
|
|
1831
1952
|
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow }) => {
|
|
1832
1953
|
return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
|
|
@@ -1881,6 +2002,19 @@
|
|
|
1881
2002
|
Placeholder,
|
|
1882
2003
|
};
|
|
1883
2004
|
|
|
2005
|
+
const changeHashOnScroll = (router, blocks) => {
|
|
2006
|
+
blocks?.forEach((block) => {
|
|
2007
|
+
const currentHash = globalThis.location.hash;
|
|
2008
|
+
const anchorHash = `#${block?.id}`;
|
|
2009
|
+
if (currentHash === anchorHash)
|
|
2010
|
+
return;
|
|
2011
|
+
const position = block?.getBoundingClientRect();
|
|
2012
|
+
if (position && position.top > 0 && position.top < 150) {
|
|
2013
|
+
router.replace(`#${block?.id}`);
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
};
|
|
2017
|
+
|
|
1884
2018
|
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
1885
2019
|
const renderLikeIcon = () => {
|
|
1886
2020
|
const params = {
|
|
@@ -1898,9 +2032,15 @@
|
|
|
1898
2032
|
});
|
|
1899
2033
|
|
|
1900
2034
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
1901
|
-
const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
|
|
2035
|
+
const ContentPage = JSX(({ className = '', context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
|
|
1902
2036
|
const { header } = slots;
|
|
1903
|
-
|
|
2037
|
+
const router = context.useRouter();
|
|
2038
|
+
// listener is for NavigatorTabs
|
|
2039
|
+
globalThis.addEventListener('load', () => {
|
|
2040
|
+
const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
|
|
2041
|
+
globalThis.document.addEventListener('scroll', () => changeHashOnScroll(router, sectionsWithAnchors));
|
|
2042
|
+
});
|
|
2043
|
+
return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }))] }));
|
|
1904
2044
|
});
|
|
1905
2045
|
function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
|
|
1906
2046
|
const { type } = block;
|
|
@@ -1913,7 +2053,7 @@
|
|
|
1913
2053
|
block,
|
|
1914
2054
|
render: (props) => {
|
|
1915
2055
|
const { version, content, anchor } = props.block;
|
|
1916
|
-
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }));
|
|
2056
|
+
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }, `${type}-${i}`));
|
|
1917
2057
|
},
|
|
1918
2058
|
}, `block-${i}`);
|
|
1919
2059
|
}
|