@redneckz/wildless-cms-uni-blocks 0.3.34 → 0.3.37
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 +301 -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 +13 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- 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 +33 -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/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 +13 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- 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 +31 -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/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 +80 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +13 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- 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 +33 -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/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 +13 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- 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 +31 -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/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 +18 -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 +46 -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/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 +18 -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 +46 -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/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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { JSX, PropsWithChildren } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { BlockDef, ContentPageDef, UniBlockProps } from '../../types';
|
|
3
|
+
import { changeHashOnScroll } from '../../utils/changeHashOnScroll';
|
|
4
|
+
import { isSSR } from '../../utils/isSSR';
|
|
3
5
|
import type { BlockContent } from '../BlockContent';
|
|
4
6
|
import { LikeControl } from '../LikeControl/LikeControl';
|
|
5
7
|
import { Placeholder } from '../Placeholder/Placeholder';
|
|
@@ -36,22 +38,34 @@ export interface RenderBlockFunc {
|
|
|
36
38
|
context: ContentPageContext;
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
const isClient = !isSSR();
|
|
42
|
+
|
|
39
43
|
const defaultBlockDecorator: BlockDecorator = ({ blockClassName, block, render }) =>
|
|
40
44
|
render({ blockClassName, block });
|
|
41
45
|
|
|
42
46
|
export const ContentPage = JSX<ContentPageProps>(
|
|
43
47
|
({
|
|
44
|
-
className,
|
|
48
|
+
className = '',
|
|
45
49
|
context,
|
|
46
50
|
blocksRegistry,
|
|
47
51
|
data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' },
|
|
48
52
|
blockDecorator = defaultBlockDecorator,
|
|
49
53
|
}) => {
|
|
50
54
|
const { header } = slots;
|
|
55
|
+
const router = context.useRouter();
|
|
56
|
+
|
|
57
|
+
// listener is for NavigatorTabs
|
|
58
|
+
isClient &&
|
|
59
|
+
globalThis.addEventListener('load', () => {
|
|
60
|
+
const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
|
|
61
|
+
globalThis.document.addEventListener('scroll', () =>
|
|
62
|
+
changeHashOnScroll(router, sectionsWithAnchors),
|
|
63
|
+
);
|
|
64
|
+
});
|
|
51
65
|
|
|
52
66
|
return (
|
|
53
67
|
<section
|
|
54
|
-
className={`relative ${style2className(pageStyle)} ${className
|
|
68
|
+
className={`relative ${style2className(pageStyle)} ${className}`}
|
|
55
69
|
data-theme={colorPalette}
|
|
56
70
|
>
|
|
57
71
|
{header?.blocks?.length ? (
|
|
@@ -73,6 +87,7 @@ export const ContentPage = JSX<ContentPageProps>(
|
|
|
73
87
|
{likeControl && (
|
|
74
88
|
<div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
|
|
75
89
|
<LikeControl
|
|
90
|
+
key="LikeControl"
|
|
76
91
|
className="rounded-tl-lg sticky bottom-0 pointer-events-auto"
|
|
77
92
|
context={context}
|
|
78
93
|
/>
|
|
@@ -100,6 +115,7 @@ function renderBlock(
|
|
|
100
115
|
const { version, content, anchor } = props.block;
|
|
101
116
|
return (
|
|
102
117
|
<BlockComponent
|
|
118
|
+
key={`${type}-${i}`}
|
|
103
119
|
className={props.blockClassName}
|
|
104
120
|
version={version}
|
|
105
121
|
context={context}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import { tableFunc } from '../../utils/tableFunc';
|
|
2
|
+
|
|
3
|
+
const func = tableFunc<number, string>([
|
|
4
|
+
[(_) => _ === 1, 'год'],
|
|
5
|
+
[(_) => _ <= 4, 'года'],
|
|
6
|
+
[() => true, 'лет'],
|
|
7
|
+
]);
|
|
8
|
+
|
|
1
9
|
export function renderButton(number: number, i: number, handleClick: (number: number) => void) {
|
|
10
|
+
const string = func(number);
|
|
11
|
+
|
|
2
12
|
return (
|
|
3
13
|
<button
|
|
4
14
|
key={String(i)}
|
|
@@ -6,7 +16,7 @@ export function renderButton(number: number, i: number, handleClick: (number: nu
|
|
|
6
16
|
onClick={() => handleClick(number)}
|
|
7
17
|
>
|
|
8
18
|
<span className="font-semibold text-sm">
|
|
9
|
-
{number} {
|
|
19
|
+
{number} {string}
|
|
10
20
|
</span>
|
|
11
21
|
</button>
|
|
12
22
|
);
|
|
@@ -9,17 +9,17 @@ export interface ContactsProps extends UniBlockProps {
|
|
|
9
9
|
hasButton?: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const Contacts = JSX<ContactsProps>(({ className, items, hasButton, context }) => {
|
|
12
|
+
export const Contacts = JSX<ContactsProps>(({ className = '', items, hasButton, context }) => {
|
|
13
13
|
const router = context.useRouter();
|
|
14
14
|
const { handlerDecorator } = context;
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
<div className={
|
|
17
|
+
<div className={className}>
|
|
18
18
|
{items?.length ? items.map(renderContact) : null}
|
|
19
19
|
{hasButton ? (
|
|
20
20
|
<Button
|
|
21
21
|
version="primary"
|
|
22
|
-
className="
|
|
22
|
+
className="mb-6 w-full"
|
|
23
23
|
{...useLink(
|
|
24
24
|
{ router, handlerDecorator },
|
|
25
25
|
{
|
|
@@ -38,9 +38,9 @@ const renderContact = (item: ContactInfo, index: number) => {
|
|
|
38
38
|
const { type, text, description } = item;
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
|
-
<div className="mb-
|
|
41
|
+
<div className="mb-4" key={String(index)}>
|
|
42
42
|
<div>{renderText(type, text)}</div>
|
|
43
|
-
<div className="font-sans text-sm text-secondary-text">{description}</div>
|
|
43
|
+
<div className="mt-1 font-sans font-light text-sm text-secondary-text">{description}</div>
|
|
44
44
|
</div>
|
|
45
45
|
);
|
|
46
46
|
};
|
|
@@ -50,7 +50,7 @@ const renderText = (type: ContactInfo['type'], text = '') => {
|
|
|
50
50
|
case 'tel':
|
|
51
51
|
return (
|
|
52
52
|
<a
|
|
53
|
-
className="font-sans
|
|
53
|
+
className="font-sans text-xl text-primary-text no-underline"
|
|
54
54
|
href={`tel:${formatTel(text)}`}
|
|
55
55
|
>
|
|
56
56
|
{text}
|
|
@@ -58,10 +58,7 @@ const renderText = (type: ContactInfo['type'], text = '') => {
|
|
|
58
58
|
);
|
|
59
59
|
case 'email':
|
|
60
60
|
return (
|
|
61
|
-
<a
|
|
62
|
-
className="font-sans font-medium text-xl text-primary-text no-underline"
|
|
63
|
-
href={`mailto:${text}`}
|
|
64
|
-
>
|
|
61
|
+
<a className="font-sans text-xl text-primary-text no-underline" href={`mailto:${text}`}>
|
|
65
62
|
{text}
|
|
66
63
|
</a>
|
|
67
64
|
);
|
|
@@ -70,6 +70,7 @@ export default {
|
|
|
70
70
|
{ href: 'https://vk.com' },
|
|
71
71
|
{ href: 'https://ok.ru' },
|
|
72
72
|
]}
|
|
73
|
+
mobileApps={[{ href: 'https://apps.apple.com' }, { href: 'https://play.google.com' }]}
|
|
73
74
|
contacts={[
|
|
74
75
|
{
|
|
75
76
|
text: '+7 (495) 787-7-787',
|
|
@@ -77,9 +78,9 @@ export default {
|
|
|
77
78
|
type: 'tel',
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
|
-
text: '
|
|
81
|
-
description: '
|
|
82
|
-
type: '
|
|
81
|
+
text: '8 (800) 100-01-00',
|
|
82
|
+
description: 'По России',
|
|
83
|
+
type: 'tel',
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
86
|
text: '7787',
|
|
@@ -9,8 +9,7 @@ import { Sitemap } from './Sitemap';
|
|
|
9
9
|
import { SocialMedia } from './SocialMedia';
|
|
10
10
|
import { TextInformation } from './TextInformation';
|
|
11
11
|
|
|
12
|
-
const LEFT_COL_WIDTH_FULL_HD = 'w-[
|
|
13
|
-
const LEFT_COL_WIDTH_SMALL_DESKTOP = 'xl:w-[220px]';
|
|
12
|
+
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
14
13
|
|
|
15
14
|
export interface FooterProps extends FooterContent, UniBlockProps {}
|
|
16
15
|
|
|
@@ -21,27 +20,30 @@ export const Footer = JSX<FooterProps>(
|
|
|
21
20
|
relatedEnterprises,
|
|
22
21
|
contacts,
|
|
23
22
|
socialMedia,
|
|
23
|
+
mobileApps,
|
|
24
24
|
topItems,
|
|
25
25
|
context,
|
|
26
26
|
anchor = null,
|
|
27
27
|
}) => {
|
|
28
28
|
return (
|
|
29
|
-
<footer className={`px-9
|
|
30
|
-
<div className="flex items-stretch gap-[54px] pb-
|
|
31
|
-
<Logo className={
|
|
29
|
+
<footer className={`px-9 pt-9 pb-8 bg-white ${className || ''}`} id={anchor}>
|
|
30
|
+
<div className="flex items-stretch gap-[54px] pb-[30px] xl:gap-8">
|
|
31
|
+
<Logo className={LEFT_COL_WIDTH_FULL_HD} />
|
|
32
32
|
<SearchBar context={context} className="grow" />
|
|
33
33
|
</div>
|
|
34
34
|
<div className="flex items-stretch gap-[54px] xl:gap-8">
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
<div className={`${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`}>
|
|
36
|
+
<Contacts items={contacts} context={context} hasButton />
|
|
37
|
+
<SocialMedia media={socialMedia} context={context}>
|
|
38
|
+
Соцсети
|
|
39
|
+
</SocialMedia>
|
|
40
|
+
<SocialMedia className="mt-6" media={mobileApps} context={context}>
|
|
41
|
+
Мобильное приложение
|
|
42
|
+
</SocialMedia>
|
|
43
|
+
</div>
|
|
41
44
|
<Sitemap className="pt-[3px]" context={context} items={topItems} />
|
|
42
45
|
</div>
|
|
43
|
-
<
|
|
44
|
-
<HorizontalNavigation links={relatedEnterprises} context={context} />
|
|
46
|
+
<HorizontalNavigation className="mt-24" links={relatedEnterprises} context={context} />
|
|
45
47
|
<TextInformation links={documents} context={context} />
|
|
46
48
|
</footer>
|
|
47
49
|
);
|
|
@@ -48,6 +48,8 @@ export interface FooterContent extends SitemapProps {
|
|
|
48
48
|
contacts?: ContactInfo[];
|
|
49
49
|
/** @title Социальные сети */
|
|
50
50
|
socialMedia?: SocialMedia[];
|
|
51
|
+
/** @title Мобильные приложения */
|
|
52
|
+
mobileApps?: SocialMedia[];
|
|
51
53
|
/** @title Заголовок для меню */
|
|
52
54
|
horizontalNavigationTitle?: string; // TODO: для мобильной версии
|
|
53
55
|
/** @title Подменю */
|
|
@@ -40,7 +40,7 @@ interface HorizontalNavigationLinkProps extends LinkProps {
|
|
|
40
40
|
const HorizontalNavigationLink = JSX<Partial<HorizontalNavigationLinkProps>>(
|
|
41
41
|
({ className = '', index, text, href, target, onClick }) => (
|
|
42
42
|
<a
|
|
43
|
-
className={`font-sans font-
|
|
43
|
+
className={`font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`}
|
|
44
44
|
href={href}
|
|
45
45
|
target={target}
|
|
46
46
|
onClick={onClick}
|
|
@@ -30,6 +30,20 @@ const ICONS_MAP: Array<{
|
|
|
30
30
|
width: '12px',
|
|
31
31
|
height: '20px',
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
origins: ['apps.apple.com'],
|
|
35
|
+
icon: { icon: 'AppleIcon' },
|
|
36
|
+
label: 'App Store',
|
|
37
|
+
width: '20px',
|
|
38
|
+
height: '22px',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
origins: ['play.google.com'],
|
|
42
|
+
icon: { icon: 'PlayMarketIcon' },
|
|
43
|
+
label: 'Google Play',
|
|
44
|
+
width: '21px',
|
|
45
|
+
height: '21px',
|
|
46
|
+
},
|
|
33
47
|
];
|
|
34
48
|
|
|
35
49
|
interface MediaButtonProps {
|
|
@@ -44,7 +58,7 @@ export const MediaButton = JSX<MediaButtonProps>(({ href }) => {
|
|
|
44
58
|
|
|
45
59
|
return (
|
|
46
60
|
<a
|
|
47
|
-
className="flex items-center justify-center border border-solid border-main-divider
|
|
61
|
+
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"
|
|
48
62
|
href={href}
|
|
49
63
|
aria-label={label}
|
|
50
64
|
target="_blank"
|
|
@@ -10,7 +10,7 @@ export interface SitemapProps extends UniBlockProps {
|
|
|
10
10
|
items?: TopMenuItem[];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const Sitemap = JSX<SitemapProps>(({ className, items, context }) => {
|
|
13
|
+
export const Sitemap = JSX<SitemapProps>(({ className = '', items, context }) => {
|
|
14
14
|
const sitemap = useSitemap(context.useAsyncData);
|
|
15
15
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
16
16
|
const linkParams = {
|
|
@@ -19,7 +19,7 @@ export const Sitemap = JSX<SitemapProps>(({ className, items, context }) => {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<div className={`flex items-start justify-
|
|
22
|
+
<div className={`flex items-start justify-between gap-11 xl:gap-5 ${className}`}>
|
|
23
23
|
{mergedItems?.map((_, i) => renderColumn(_, i, linkParams))}
|
|
24
24
|
</div>
|
|
25
25
|
);
|
|
@@ -29,9 +29,9 @@ const renderColumn = (c: TopMenuItem, index: number, { router, handlerDecorator
|
|
|
29
29
|
const { text, href, items, target } = c;
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<div key={String(index)} className="flex flex-col gap-[14px]">
|
|
32
|
+
<div key={String(index)} className="flex flex-col w-1/5 last:w-1/4 gap-[14px]">
|
|
33
33
|
<a
|
|
34
|
-
className="block font-sans
|
|
34
|
+
className="block font-sans leading-5 text-base text-primary-text no-underline"
|
|
35
35
|
href={href}
|
|
36
36
|
target={target || '_self'}
|
|
37
37
|
>
|
|
@@ -50,7 +50,7 @@ interface ColumnItemProps extends LinkProps {
|
|
|
50
50
|
|
|
51
51
|
const ColumnItem = JSX<ColumnItemProps>(({ text, href, target, index }) => (
|
|
52
52
|
<a
|
|
53
|
-
className="block font-sans font-
|
|
53
|
+
className="block font-sans font-light text-base text-secondary-text hover:text-primary-main no-underline"
|
|
54
54
|
href={href}
|
|
55
55
|
target={target || '_self'}
|
|
56
56
|
>
|
|
@@ -8,14 +8,17 @@ export interface SocialMediaProps extends UniBlockProps {
|
|
|
8
8
|
media?: Omit<LinkProps, 'text'>[];
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const SocialMedia = JSX<SocialMediaProps>(({ className, media, context }) => {
|
|
11
|
+
export const SocialMedia = JSX<SocialMediaProps>(({ className = '', media, context, children }) => {
|
|
12
12
|
const router = context.useRouter();
|
|
13
13
|
const { handlerDecorator } = context;
|
|
14
14
|
return (
|
|
15
|
-
<div
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
<div>
|
|
16
|
+
<div className={`flex gap-2.5 mb-1.5 ${className}`}>
|
|
17
|
+
{media?.map((_, index) => (
|
|
18
|
+
<MediaButton key={String(index)} {...useLink({ router, handlerDecorator }, _)} />
|
|
19
|
+
))}
|
|
20
|
+
</div>
|
|
21
|
+
<span className="font-light text-sm text-secondary-text">{children}</span>
|
|
19
22
|
</div>
|
|
20
23
|
);
|
|
21
24
|
});
|
|
@@ -9,7 +9,7 @@ export const TextInformation = JSX<FooterLink>(({ className, links, context }) =
|
|
|
9
9
|
return (
|
|
10
10
|
<div className={`${className || ''}`}>
|
|
11
11
|
<div className="pt-5 pb-[5px]">
|
|
12
|
-
<span className="font-sans font-
|
|
12
|
+
<span className="font-sans font-light text-xs text-secondary-text">
|
|
13
13
|
{`\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.`}
|
|
14
14
|
</span>
|
|
15
15
|
</div>
|
|
@@ -37,7 +37,7 @@ interface TextInformationLinkProps extends LinkProps {
|
|
|
37
37
|
const TextInformationLink = JSX<Partial<TextInformationLinkProps>>(
|
|
38
38
|
({ className, index, text, href, target, onClick }) => (
|
|
39
39
|
<a
|
|
40
|
-
className={`font-sans font-
|
|
40
|
+
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] ${
|
|
41
41
|
className || ''
|
|
42
42
|
}`}
|
|
43
43
|
href={href}
|
|
@@ -7,9 +7,9 @@ import type { GalleryCard, GalleryItem } from './GalleryContent';
|
|
|
7
7
|
|
|
8
8
|
export const GalleryCardInner = JSX<GalleryCard>(
|
|
9
9
|
({ title, description, image, items, button, version }) => {
|
|
10
|
-
const titleStyleClasses = getTitleStyle(version
|
|
10
|
+
const titleStyleClasses = getTitleStyle(version);
|
|
11
11
|
return (
|
|
12
|
-
<div className="h-full flex flex-col justify-between">
|
|
12
|
+
<div className="h-full flex flex-col justify-between text-center">
|
|
13
13
|
<div>
|
|
14
14
|
{image?.src ? (
|
|
15
15
|
<div className="flex justify-center">
|
|
@@ -18,7 +18,7 @@ export const GalleryCardInner = JSX<GalleryCard>(
|
|
|
18
18
|
) : null}
|
|
19
19
|
{title ? renderCardTitle(title, titleStyleClasses) : null}
|
|
20
20
|
{description ? (
|
|
21
|
-
<div className={`font-
|
|
21
|
+
<div className={`font-light text-m-md-new ${title ? 'mt-2' : ''}`}>{description}</div>
|
|
22
22
|
) : null}
|
|
23
23
|
{items?.length ? renderItems(items, version) : null}
|
|
24
24
|
</div>
|
|
@@ -39,7 +39,7 @@ function renderButton(button) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function renderCardTitle(title: string, className: string) {
|
|
42
|
-
return <div className={`
|
|
42
|
+
return <div className={`text-xl m-0 ${className}`}>{title}</div>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
|
|
@@ -55,9 +55,8 @@ function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
function getTitleStyle(version
|
|
59
|
-
return `
|
|
58
|
+
function getTitleStyle(version) {
|
|
59
|
+
return `text-xl m-0
|
|
60
60
|
${version !== 'secondary' ? 'text-primary-text' : ''}
|
|
61
|
-
${!description && !items?.length ? 'text-center' : ''}
|
|
62
61
|
`;
|
|
63
62
|
}
|
|
@@ -25,7 +25,7 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
|
|
|
25
25
|
<div className="flex flex-col items-center mb-8">
|
|
26
26
|
{title ? <Heading headingType="h2" className="text-center" title={title} /> : null}
|
|
27
27
|
{description ? (
|
|
28
|
-
<div className="font-
|
|
28
|
+
<div className="font-light text-md max-w-[600px] mt-2.5">{description}</div>
|
|
29
29
|
) : null}
|
|
30
30
|
</div>
|
|
31
31
|
<div
|
|
@@ -45,7 +45,7 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
|
|
|
45
45
|
function renderCard({ card, version }: GalleryCardData, i: number) {
|
|
46
46
|
return (
|
|
47
47
|
<section
|
|
48
|
-
className={`box-border border-solid border
|
|
48
|
+
className={`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
|
|
49
49
|
items-stretch ${cardStyleMap[version]} ${
|
|
50
50
|
cardVersionMap[card.version ?? 'primary']
|
|
51
51
|
} w-full col-span-4`}
|
|
@@ -27,7 +27,7 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<section
|
|
30
|
-
className={`relative font-sans text-primary-text bg-white p-[
|
|
30
|
+
className={`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`}
|
|
31
31
|
id={anchor}
|
|
32
32
|
>
|
|
33
33
|
<GalleryContainer
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
3
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
4
|
-
import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem';
|
|
5
4
|
import { isTopItemActive } from '../../services/sitemap/isTopItemActive';
|
|
6
5
|
import { mergeTopItems } from '../../services/sitemap/mergeTopItems';
|
|
7
6
|
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
8
7
|
import type { UniBlockProps } from '../../types';
|
|
9
|
-
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
10
8
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
11
9
|
import { TopItem } from '../../ui-kit/TopItem/TopItem';
|
|
12
10
|
import type { HeaderContent } from './HeaderContent';
|
|
13
11
|
import { HeaderSecondaryMenu } from './HeaderSecondaryMenu';
|
|
12
|
+
import { HeaderSubMenu } from './HeaderSubMenu';
|
|
14
13
|
|
|
15
14
|
const BORDER_COLORS: Record<BgColorVersion, string> = {
|
|
16
15
|
'bg-white': 'bg-main-divider',
|
|
@@ -21,7 +20,7 @@ export interface HeaderProps extends HeaderContent, UniBlockProps {}
|
|
|
21
20
|
|
|
22
21
|
export const Header = JSX<HeaderProps>(
|
|
23
22
|
({
|
|
24
|
-
className,
|
|
23
|
+
className = '',
|
|
25
24
|
defaultLocation = 'Москва',
|
|
26
25
|
bgColor = 'bg-white',
|
|
27
26
|
context,
|
|
@@ -34,31 +33,19 @@ export const Header = JSX<HeaderProps>(
|
|
|
34
33
|
|
|
35
34
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
36
35
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
37
|
-
const subItems = activeTopItem?.items;
|
|
38
|
-
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
39
36
|
|
|
40
37
|
const topMenu = mergedItems.map((_, i) => (
|
|
41
38
|
<TopItem
|
|
42
39
|
key={String(i)}
|
|
43
40
|
active={_ === activeTopItem}
|
|
44
41
|
{...useLink({ router, handlerDecorator }, _)}
|
|
45
|
-
|
|
46
|
-
bgColor={bgColor}
|
|
47
|
-
/>
|
|
48
|
-
));
|
|
49
|
-
|
|
50
|
-
const subMenu = subItems?.map((_) => (
|
|
51
|
-
<HeaderItem
|
|
52
|
-
key={_.href}
|
|
53
|
-
className="mr-8"
|
|
54
|
-
active={_ === activeSubItem}
|
|
55
|
-
{...useLink({ router, handlerDecorator }, _)}
|
|
42
|
+
aria-label={_.text}
|
|
56
43
|
bgColor={bgColor}
|
|
57
44
|
/>
|
|
58
45
|
));
|
|
59
46
|
|
|
60
47
|
return (
|
|
61
|
-
<header className={`pt-
|
|
48
|
+
<header className={`pt-6 pb-8 px-20 ${bgColor} ${className}`} id={anchor}>
|
|
62
49
|
<div className="container">
|
|
63
50
|
<div className="flex items-center">
|
|
64
51
|
<Logo className="mr-8" bgColor={bgColor} />
|
|
@@ -70,8 +57,8 @@ export const Header = JSX<HeaderProps>(
|
|
|
70
57
|
bgColor={bgColor}
|
|
71
58
|
/>
|
|
72
59
|
</div>
|
|
73
|
-
<div className={`mt-
|
|
74
|
-
<
|
|
60
|
+
<div className={`mt-6 h-[1px] ${BORDER_COLORS[bgColor]}`} />
|
|
61
|
+
<HeaderSubMenu context={context} subItems={activeTopItem?.items} bgColor={bgColor} />
|
|
75
62
|
</div>
|
|
76
63
|
</header>
|
|
77
64
|
);
|
|
@@ -17,11 +17,11 @@ const COLORS_MAP: Record<BgColorVersion, string> = {
|
|
|
17
17
|
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
18
18
|
transparent: 'text-white',
|
|
19
19
|
};
|
|
20
|
-
const
|
|
20
|
+
const LINKS_COLORS_MAP: Record<BgColorVersion, string> = {
|
|
21
21
|
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
22
22
|
transparent: 'text-white',
|
|
23
23
|
};
|
|
24
|
-
const
|
|
24
|
+
const LINKS_ICON_NAME_MAP: Record<BgColorVersion, IconName> = {
|
|
25
25
|
'bg-white': 'GridIcon',
|
|
26
26
|
transparent: 'GridIconWhite',
|
|
27
27
|
};
|
|
@@ -54,14 +54,11 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
54
54
|
>
|
|
55
55
|
<Img image="LoupeIcon" className="h-full" asSVG color="none" />
|
|
56
56
|
</HeaderSecondaryMenuButton>
|
|
57
|
-
<HeaderSecondaryMenuButton className={`mr-5 ${COLORS_MAP[bgColor]}`} ariaLabel="Профиль">
|
|
58
|
-
<Img image="ProfileIcon" className="h-full" asSVG color="none" />
|
|
59
|
-
</HeaderSecondaryMenuButton>
|
|
60
57
|
<HeaderSecondaryMenuButton
|
|
61
|
-
className={`${
|
|
58
|
+
className={`${LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`}
|
|
62
59
|
ariaLabel="Дополнительные ссылки"
|
|
63
60
|
>
|
|
64
|
-
<Img image={
|
|
61
|
+
<Img image={LINKS_ICON_NAME_MAP[bgColor]} className="h-full" asSVG color="none" />
|
|
65
62
|
</HeaderSecondaryMenuButton>
|
|
66
63
|
</div>
|
|
67
64
|
);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLink } from '../../hooks/useLink';
|
|
3
|
+
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
4
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
5
|
+
import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem';
|
|
6
|
+
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
7
|
+
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
8
|
+
import { headerSubMenuObserver } from './HeaderSubMenuObserver';
|
|
9
|
+
|
|
10
|
+
export interface HeaderSubMenuProps {
|
|
11
|
+
context: ContentPageContext;
|
|
12
|
+
subItems?: LinkProps[];
|
|
13
|
+
bgColor?: BgColorVersion;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const HeaderSubMenu = JSX<HeaderSubMenuProps>(({ context, subItems, bgColor }) => {
|
|
17
|
+
const [subMenuIsShow, setHiddenMenuIsShow] = context.useState(false);
|
|
18
|
+
const router = context.useRouter();
|
|
19
|
+
const { handlerDecorator } = context;
|
|
20
|
+
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
|
|
23
|
+
headerSubMenu.forEach((_) => {
|
|
24
|
+
headerSubMenuObserver?.observe(_);
|
|
25
|
+
});
|
|
26
|
+
}, 200);
|
|
27
|
+
|
|
28
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
29
|
+
const toggleSubMenu = () => setHiddenMenuIsShow(!subMenuIsShow);
|
|
30
|
+
|
|
31
|
+
const subMenu = subItems?.map((_) => (
|
|
32
|
+
<HeaderItem
|
|
33
|
+
key={_.href}
|
|
34
|
+
className="mr-8"
|
|
35
|
+
active={_ === activeSubItem}
|
|
36
|
+
{...useLink({ router, handlerDecorator }, _)}
|
|
37
|
+
dataItemName="header-submenu"
|
|
38
|
+
bgColor={bgColor}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<nav className="relative mt-5">
|
|
44
|
+
<div className="overflow-hidden whitespace-nowrap mr-52">{subMenu}</div>
|
|
45
|
+
{renderDotsSubMenu({
|
|
46
|
+
subMenuIsShow,
|
|
47
|
+
toggleSubMenu,
|
|
48
|
+
subItems,
|
|
49
|
+
router,
|
|
50
|
+
handlerDecorator,
|
|
51
|
+
})}
|
|
52
|
+
</nav>
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// TODO: add types
|
|
57
|
+
const renderDotsSubMenu = ({
|
|
58
|
+
subMenuIsShow,
|
|
59
|
+
toggleSubMenu,
|
|
60
|
+
subItems,
|
|
61
|
+
router,
|
|
62
|
+
handlerDecorator,
|
|
63
|
+
}) => (
|
|
64
|
+
<div
|
|
65
|
+
className={`absolute w-52 -top-4 right-0 pt-4 z-40 ${
|
|
66
|
+
subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''
|
|
67
|
+
}`}
|
|
68
|
+
data-header-submenu-visible="toggled"
|
|
69
|
+
>
|
|
70
|
+
<button
|
|
71
|
+
className="flex justify-between items-center cursor-pointer h-6 ml-6"
|
|
72
|
+
onClick={toggleSubMenu}
|
|
73
|
+
aria-label={`${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`}
|
|
74
|
+
>
|
|
75
|
+
{Array(3)
|
|
76
|
+
.fill(0)
|
|
77
|
+
.map((_, i) => renderDot(i))}
|
|
78
|
+
</button>
|
|
79
|
+
<div
|
|
80
|
+
className={`flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`}
|
|
81
|
+
aria-hidden={!subMenuIsShow}
|
|
82
|
+
>
|
|
83
|
+
{renderDotsSubMenuItems(subItems, router, handlerDecorator)}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
// TODO: add types
|
|
89
|
+
const renderDotsSubMenuItems = (subItems, router, handlerDecorator) =>
|
|
90
|
+
subItems?.map((_) => (
|
|
91
|
+
<a
|
|
92
|
+
key={_.href}
|
|
93
|
+
{...useLink({ router, handlerDecorator }, _)}
|
|
94
|
+
data-item-name="dots-header-submenu"
|
|
95
|
+
className="text-base font-light pb-4 hover:text-primary-main"
|
|
96
|
+
>
|
|
97
|
+
{_.text}
|
|
98
|
+
</a>
|
|
99
|
+
));
|
|
100
|
+
|
|
101
|
+
const renderDot = (i: number) => (
|
|
102
|
+
<div key={String(i)} className="w-[3px] h-[3px] rounded bg-black mr-1" />
|
|
103
|
+
);
|