@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX, PropsWithChildren } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { BlockDef, ContentPageDef, UniBlockProps } from '../../types';
|
|
3
|
+
import { changeHashOnScroll } from '../../utils/changeHashOnScroll';
|
|
3
4
|
import type { BlockContent } from '../BlockContent';
|
|
4
5
|
import { LikeControl } from '../LikeControl/LikeControl';
|
|
5
6
|
import { Placeholder } from '../Placeholder/Placeholder';
|
|
@@ -41,17 +42,26 @@ const defaultBlockDecorator: BlockDecorator = ({ blockClassName, block, render }
|
|
|
41
42
|
|
|
42
43
|
export const ContentPage = JSX<ContentPageProps>(
|
|
43
44
|
({
|
|
44
|
-
className,
|
|
45
|
+
className = '',
|
|
45
46
|
context,
|
|
46
47
|
blocksRegistry,
|
|
47
48
|
data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' },
|
|
48
49
|
blockDecorator = defaultBlockDecorator,
|
|
49
50
|
}) => {
|
|
50
51
|
const { header } = slots;
|
|
52
|
+
const router = context.useRouter();
|
|
53
|
+
|
|
54
|
+
// listener is for NavigatorTabs
|
|
55
|
+
globalThis.addEventListener('load', () => {
|
|
56
|
+
const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
|
|
57
|
+
globalThis.document.addEventListener('scroll', () =>
|
|
58
|
+
changeHashOnScroll(router, sectionsWithAnchors),
|
|
59
|
+
);
|
|
60
|
+
});
|
|
51
61
|
|
|
52
62
|
return (
|
|
53
63
|
<section
|
|
54
|
-
className={`relative ${style2className(pageStyle)} ${className
|
|
64
|
+
className={`relative ${style2className(pageStyle)} ${className}`}
|
|
55
65
|
data-theme={colorPalette}
|
|
56
66
|
>
|
|
57
67
|
{header?.blocks?.length ? (
|
|
@@ -73,6 +83,7 @@ export const ContentPage = JSX<ContentPageProps>(
|
|
|
73
83
|
{likeControl && (
|
|
74
84
|
<div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
|
|
75
85
|
<LikeControl
|
|
86
|
+
key="LikeControl"
|
|
76
87
|
className="rounded-tl-lg sticky bottom-0 pointer-events-auto"
|
|
77
88
|
context={context}
|
|
78
89
|
/>
|
|
@@ -100,6 +111,7 @@ function renderBlock(
|
|
|
100
111
|
const { version, content, anchor } = props.block;
|
|
101
112
|
return (
|
|
102
113
|
<BlockComponent
|
|
114
|
+
key={`${type}-${i}`}
|
|
103
115
|
className={props.blockClassName}
|
|
104
116
|
version={version}
|
|
105
117
|
context={context}
|
|
@@ -3,8 +3,8 @@ export interface Router {
|
|
|
3
3
|
query: Record<string, string | string[] | undefined>;
|
|
4
4
|
href?: string;
|
|
5
5
|
basePath?: string;
|
|
6
|
-
push: (url
|
|
7
|
-
replace: (url
|
|
6
|
+
push: (url: string) => void;
|
|
7
|
+
replace: (url: string) => void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface LikeService {
|
|
@@ -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
|
);
|
|
@@ -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 Подменю */
|
|
@@ -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
|
>
|
|
@@ -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
|
|
@@ -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
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isSSR } from '../../utils/isSSR';
|
|
2
|
+
|
|
3
|
+
export const headerSubMenuObserver = isSSR()
|
|
4
|
+
? undefined
|
|
5
|
+
: new IntersectionObserver(
|
|
6
|
+
(entries) => {
|
|
7
|
+
const headerSubMenuButtonElement = window.document.querySelector(
|
|
8
|
+
'[data-header-submenu-visible=toggled]',
|
|
9
|
+
);
|
|
10
|
+
const headerSubMenuItems = Array.from(
|
|
11
|
+
window.document.querySelectorAll('[data-item-name=header-submenu]'),
|
|
12
|
+
);
|
|
13
|
+
const dotsHeaderSubMenuItems = Array.from(
|
|
14
|
+
window.document.querySelectorAll('[data-item-name=dots-header-submenu]'),
|
|
15
|
+
);
|
|
16
|
+
const visibilityList = {};
|
|
17
|
+
entries.forEach((j) => {
|
|
18
|
+
visibilityList[String(j.target.toString())] = j.isIntersecting;
|
|
19
|
+
});
|
|
20
|
+
const isHeaderSubMenuButtonShow = toggleVisibilityInItems(
|
|
21
|
+
visibilityList,
|
|
22
|
+
dotsHeaderSubMenuItems,
|
|
23
|
+
'hidden',
|
|
24
|
+
);
|
|
25
|
+
toggleVisibilityInItems(visibilityList, headerSubMenuItems, 'invisible');
|
|
26
|
+
if (headerSubMenuButtonElement) {
|
|
27
|
+
isHeaderSubMenuButtonShow
|
|
28
|
+
? headerSubMenuButtonElement.classList.remove('hidden')
|
|
29
|
+
: headerSubMenuButtonElement.classList.add('hidden');
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{ root: window.document, threshold: 1.0 },
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// TODO: add types
|
|
36
|
+
const toggleVisibilityInItems = (visibilityList, items, className) => {
|
|
37
|
+
const isReversed = className !== 'hidden';
|
|
38
|
+
return items.some((item) => {
|
|
39
|
+
const key = item.toString();
|
|
40
|
+
const option = isReversed ? !visibilityList[key] : visibilityList[key];
|
|
41
|
+
key in visibilityList ? item.classList.toggle(className, option) : null;
|
|
42
|
+
return isReversed ? item.classList.contains('hidden') : !item.classList.contains('hidden');
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
3
|
-
import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
|
|
4
2
|
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
|
|
4
|
+
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
5
5
|
|
|
6
6
|
export interface LinkDocsListProps {
|
|
7
7
|
className?: string;
|
|
@@ -21,7 +21,7 @@ export const LinkDocsList = JSX<LinkDocsListProps>(
|
|
|
21
21
|
role="listitem"
|
|
22
22
|
>
|
|
23
23
|
<LinkDocsListItem
|
|
24
|
-
className="group flex
|
|
24
|
+
className="group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main"
|
|
25
25
|
doc={doc}
|
|
26
26
|
icon={icon}
|
|
27
27
|
/>
|
|
@@ -8,22 +8,24 @@ export interface NavigatorTabItemProps extends NavigatorTab {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
11
|
-
const LINK_CLASSES = 'flex-1 flex items-center justify-center';
|
|
11
|
+
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
12
12
|
|
|
13
13
|
export const NavigatorTabItem = JSX<NavigatorTabItemProps>(
|
|
14
|
-
({ className = '', label, active, children, onClick,
|
|
15
|
-
<a className={getLinkClasses(className, active)} href={
|
|
14
|
+
({ className = '', label, active, children, onClick, href, target = '_self' }) => (
|
|
15
|
+
<a className={getLinkClasses(className, active)} target={target} href={href} onClick={onClick}>
|
|
16
16
|
<span className={getTextClasses(active)}>{label || children}</span>
|
|
17
17
|
</a>
|
|
18
18
|
),
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
const getLinkClasses = (className: string, active?: boolean) => {
|
|
22
|
-
const classes = active ? 'bg-primary-main' : 'bg-white';
|
|
22
|
+
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
23
|
+
|
|
23
24
|
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
const getTextClasses = (active?: boolean) => {
|
|
27
|
-
const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
|
|
28
|
+
const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
|
|
29
|
+
|
|
28
30
|
return `${classes} ${TEXT_CLASSES}`;
|
|
29
31
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"navigatorTabs": [
|
|
3
|
-
{ "label": "Tab1", "
|
|
4
|
-
{ "label": "Tab2", "
|
|
5
|
-
{ "label": "
|
|
3
|
+
{ "label": "Tab1", "href": "#tab1" },
|
|
4
|
+
{ "label": "Tab2", "href": "#tab2" },
|
|
5
|
+
{ "label": "Link", "href": "https://rshb.ru", "target": "_blank" }
|
|
6
6
|
]
|
|
7
7
|
}
|
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import { getHash } from '../../utils/url';
|
|
3
|
+
import { getHash, isURL } from '../../utils/url';
|
|
4
4
|
import type { Router } from '../ContentPage/ContentPageContext';
|
|
5
5
|
import { NavigatorTabItem } from './NavigatorTabItem';
|
|
6
6
|
import type { NavigatorTab, NavigatorTabsContent } from './NavigatorTabsContent';
|
|
7
7
|
|
|
8
|
-
export interface TabsBlockProps extends
|
|
8
|
+
export interface TabsBlockProps extends UniBlockProps, NavigatorTabsContent {}
|
|
9
9
|
|
|
10
10
|
export const NavigatorTabs = JSX<TabsBlockProps>(
|
|
11
11
|
({ className = '', navigatorTabs, context, anchor = null }) => {
|
|
12
12
|
const router = context.useRouter();
|
|
13
|
-
const
|
|
13
|
+
const href = globalThis.location.href;
|
|
14
|
+
|
|
14
15
|
return (
|
|
15
16
|
<section
|
|
16
17
|
className={`sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`}
|
|
17
18
|
id={anchor}
|
|
18
19
|
>
|
|
19
|
-
{navigatorTabs ? navigatorTabs.map(renderTab(
|
|
20
|
+
{navigatorTabs ? navigatorTabs.map(renderTab(href, router)) : null}
|
|
20
21
|
</section>
|
|
21
22
|
);
|
|
22
23
|
},
|
|
23
24
|
);
|
|
24
25
|
|
|
25
|
-
const renderTab = (
|
|
26
|
-
const
|
|
27
|
-
const active = hash ?
|
|
26
|
+
const renderTab = (href?: string, router?: Router) => (tab: NavigatorTab, i: number) => {
|
|
27
|
+
const hash = getHash(href);
|
|
28
|
+
const active = hash ? tab.href === hash : i === 0;
|
|
29
|
+
|
|
28
30
|
return (
|
|
29
31
|
<NavigatorTabItem
|
|
30
|
-
key={tab.
|
|
32
|
+
key={tab.href}
|
|
31
33
|
active={active}
|
|
32
|
-
onClick={() => router
|
|
34
|
+
onClick={() => handleRoute(router, tab.href)}
|
|
33
35
|
{...tab}
|
|
34
36
|
/>
|
|
35
37
|
);
|
|
36
38
|
};
|
|
39
|
+
|
|
40
|
+
const handleRoute = (router?: Router, href?: string) => {
|
|
41
|
+
if (isURL(href)) return; // if href if full URL - move to HTML href action, do not touch router
|
|
42
|
+
|
|
43
|
+
router?.replace(href || '');
|
|
44
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
-
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import type { ButtonContent, ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
4
|
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
5
5
|
import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
|
|
6
6
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
@@ -32,6 +32,8 @@ export type ProductBlockInnerContent = HeadingContent &
|
|
|
32
32
|
* @hidden
|
|
33
33
|
*/
|
|
34
34
|
textBlockClassName?: string;
|
|
35
|
+
/** @title Текст кнопки возврата */
|
|
36
|
+
backwardButton?: ButtonProps;
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
2
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
|
+
|
|
5
|
+
const backwardBgStyleMap: Record<BlockVersion, string> = {
|
|
6
|
+
primary: 'bg-primary-main',
|
|
7
|
+
secondary: 'bg-white',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const backwardIconStyleMap: Record<BlockVersion, string> = {
|
|
11
|
+
primary: 'text-white',
|
|
12
|
+
secondary: 'text-primary-text',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function renderBackwardButton(text: string, version: BlockVersion, className: string) {
|
|
16
|
+
return (
|
|
17
|
+
<div className={`flex items-center ${className}`}>
|
|
18
|
+
<Button
|
|
19
|
+
rounded
|
|
20
|
+
className={`w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`}
|
|
21
|
+
ariaLabel={text}
|
|
22
|
+
>
|
|
23
|
+
<Img
|
|
24
|
+
className={`w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`}
|
|
25
|
+
image={{ icon: 'ArrowLeftIcon' }}
|
|
26
|
+
color="none"
|
|
27
|
+
width="24"
|
|
28
|
+
height="24"
|
|
29
|
+
asSVG
|
|
30
|
+
/>
|
|
31
|
+
</Button>
|
|
32
|
+
{text ? <span className="text-m-md">{text}</span> : null}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|