@redneckz/wildless-cms-uni-blocks 0.3.34 → 0.3.35
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 +180 -84
- 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/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/Header/Header.js +3 -7
- 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 +34 -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/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/Tile/Tile.js +3 -3
- package/dist/components/Tile/Tile.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/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.js +2 -2
- package/dist/ui-kit/Heading/Heading.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/isSSR.d.ts +1 -0
- package/dist/utils/isSSR.js +5 -0
- package/dist/utils/isSSR.js.map +1 -0
- package/lib/common.css +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/Header/Header.js +3 -7
- 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 +32 -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/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/Tile/Tile.js +3 -3
- package/lib/components/Tile/Tile.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/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.js +2 -2
- package/lib/ui-kit/Heading/Heading.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/isSSR.d.ts +1 -0
- package/lib/utils/isSSR.js +2 -0
- package/lib/utils/isSSR.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +48 -16
- package/mobile/bundle/bundle.umd.min.js +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/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 +34 -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/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/Tile/Tile.js +3 -3
- package/mobile/dist/components/Tile/Tile.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/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/isSSR.d.ts +1 -0
- package/mobile/dist/utils/isSSR.js +5 -0
- package/mobile/dist/utils/isSSR.js.map +1 -0
- 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/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 +32 -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/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/Tile/Tile.js +3 -3
- package/mobile/lib/components/Tile/Tile.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/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/isSSR.d.ts +1 -0
- package/mobile/lib/utils/isSSR.js +2 -0
- package/mobile/lib/utils/isSSR.js.map +1 -0
- package/mobile/src/components/ContentPage/ContentPage.page.json +4 -4
- package/mobile/src/components/Footer/Contacts.tsx +7 -10
- package/mobile/src/components/Footer/FooterContent.ts +3 -0
- package/mobile/src/components/Footer/MediaButton.tsx +15 -1
- package/mobile/src/components/Footer/Sitemap.tsx +5 -5
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +4 -7
- package/mobile/src/components/Header/HeaderSubMenu.tsx +93 -0
- package/mobile/src/components/Header/HeaderSubMenuObserver.ts +44 -0
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +34 -0
- package/mobile/src/components/Tile/Tile.example.json +1 -1
- package/mobile/src/components/Tile/Tile.tsx +12 -3
- 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/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/isSSR.ts +2 -0
- package/package.json +1 -1
- package/src/components/ContentPage/ContentPage.page.json +4 -4
- 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 +3 -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/Header/Header.tsx +5 -18
- package/src/components/Header/HeaderSecondaryMenu.tsx +4 -7
- package/src/components/Header/HeaderSubMenu.tsx +93 -0
- package/src/components/Header/HeaderSubMenuObserver.ts +44 -0
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +2 -2
- 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 +34 -0
- package/src/components/ProductBlock/renderBenefit.tsx +4 -4
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +6 -6
- package/src/components/Tile/Tile.tsx +12 -3
- 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/ButtonInner.tsx +2 -2
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +14 -3
- package/src/ui-kit/Heading/Heading.tsx +2 -2
- 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/isSSR.ts +2 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
const HEADING_STYLE_MAP = {
|
|
190
|
-
h1: 'text-title-
|
|
191
|
-
h2: 'text-title',
|
|
190
|
+
h1: 'text-title-xl tracking-[-0.3px]',
|
|
191
|
+
h2: 'text-title-lg',
|
|
192
192
|
h3: 'text-title-sm',
|
|
193
193
|
h4: 'text-title-xs',
|
|
194
194
|
h5: 'text-title-2xs tracking-[0.2px]',
|
|
@@ -269,6 +269,7 @@
|
|
|
269
269
|
IconMap["ActualBalanceIcon"] = "ActualBalanceIcon";
|
|
270
270
|
IconMap["AppleIcon"] = "AppleIcon";
|
|
271
271
|
IconMap["ArrowDownIcon"] = "ArrowDownIcon";
|
|
272
|
+
IconMap["ArrowLeftIcon"] = "ArrowLeftIcon";
|
|
272
273
|
IconMap["ArrowsRewindRight"] = "ArrowsRewindRight";
|
|
273
274
|
IconMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
274
275
|
IconMap["AtmIcon"] = "AtmIcon";
|
|
@@ -346,7 +347,8 @@
|
|
|
346
347
|
(function (IconTitleMap) {
|
|
347
348
|
IconTitleMap["ActualBalanceIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
|
|
348
349
|
IconTitleMap["AppleIcon"] = "\u041B\u043E\u0433\u043E \u00ABApple\u00BB";
|
|
349
|
-
IconTitleMap["ArrowDownIcon"] = "
|
|
350
|
+
IconTitleMap["ArrowDownIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043D\u0438\u0437'";
|
|
351
|
+
IconTitleMap["ArrowLeftIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043B\u0435\u0432\u043E'";
|
|
350
352
|
IconTitleMap["ArrowsRewindRight"] = "ArrowsRewindRight";
|
|
351
353
|
IconTitleMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
352
354
|
IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
|
|
@@ -423,8 +425,8 @@
|
|
|
423
425
|
|
|
424
426
|
const svgColorsMap = {
|
|
425
427
|
none: '',
|
|
426
|
-
primary: 'text-
|
|
427
|
-
secondary: 'text-
|
|
428
|
+
primary: 'text-white',
|
|
429
|
+
secondary: 'text-white',
|
|
428
430
|
};
|
|
429
431
|
const Icon = JSX(({ className = '', name = '', alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, asSVG, color = 'primary', ...imgProps }) => {
|
|
430
432
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
@@ -597,14 +599,14 @@
|
|
|
597
599
|
|
|
598
600
|
const ButtonInner = JSX((props) => {
|
|
599
601
|
const { text, aboveText, appendLeft } = props;
|
|
600
|
-
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs font-light text-left", children: aboveText }), jsx("div", { className: "text-
|
|
602
|
+
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs font-light text-left", children: aboveText }), jsx("div", { className: "text-button-sm text-left", children: text })] })) : null] }));
|
|
601
603
|
});
|
|
602
604
|
const getButtonStyle = (props) => {
|
|
603
605
|
const { version, aboveText, rounded } = props;
|
|
604
606
|
if (version === 'link') {
|
|
605
607
|
return '';
|
|
606
608
|
}
|
|
607
|
-
const withTextStyle = `px-8 gap-2 ${aboveText ? 'py-2' : 'py-
|
|
609
|
+
const withTextStyle = `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[18px]'}`;
|
|
608
610
|
return [
|
|
609
611
|
'flex items-center justify-center',
|
|
610
612
|
isWithText(props) ? withTextStyle : 'h-12 w-12',
|
|
@@ -648,24 +650,40 @@
|
|
|
648
650
|
return jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
649
651
|
});
|
|
650
652
|
|
|
651
|
-
const LIST_STYLE_CLASSES =
|
|
653
|
+
const LIST_STYLE_CLASSES = {
|
|
654
|
+
primary: 'rounded-full inline-block mr-3 mt-2',
|
|
655
|
+
secondary: 'rounded-full inline-block mr-3 mt-2',
|
|
656
|
+
gray: 'rounded-full inline-block mr-3 mt-2',
|
|
657
|
+
tile: 'rounded-full inline-block mr-4',
|
|
658
|
+
'tile-white': 'rounded-full inline-block mr-4',
|
|
659
|
+
};
|
|
652
660
|
const LIST_DOT_STYLE_MAP = {
|
|
653
|
-
primary: 'bg-primary-
|
|
661
|
+
primary: 'bg-primary-text',
|
|
654
662
|
secondary: 'bg-white',
|
|
655
663
|
gray: 'bg-secondary-text',
|
|
664
|
+
tile: 'bg-black',
|
|
665
|
+
'tile-white': 'bg-white',
|
|
656
666
|
};
|
|
657
667
|
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
|
|
658
|
-
return (jsxs("div", { className: `font-sans flex items-
|
|
668
|
+
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && jsx("div", { className: getListStyle(version) }), jsx("span", { children: children })] }));
|
|
659
669
|
});
|
|
660
670
|
const getListStyle = (version) => {
|
|
661
|
-
const size =
|
|
662
|
-
|
|
671
|
+
const size = {
|
|
672
|
+
primary: 'w-2 h-2 min-w-2 min-h-2',
|
|
673
|
+
secondary: 'w-2 h-2 min-w-2 min-h-2',
|
|
674
|
+
gray: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5',
|
|
675
|
+
tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
676
|
+
'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
677
|
+
};
|
|
678
|
+
return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
|
|
663
679
|
};
|
|
664
680
|
|
|
665
681
|
const TEXT_STYLE_MAP = {
|
|
666
682
|
primary: 'text-primary-text',
|
|
667
683
|
secondary: 'text-white',
|
|
668
684
|
gray: 'text-secondary-text',
|
|
685
|
+
tile: 'text-primary-text',
|
|
686
|
+
'tile-white': 'text-white',
|
|
669
687
|
};
|
|
670
688
|
const List = JSX((props) => {
|
|
671
689
|
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
@@ -679,7 +697,7 @@
|
|
|
679
697
|
});
|
|
680
698
|
|
|
681
699
|
const benefitIconBgStyleMap = {
|
|
682
|
-
primary: 'bg-main',
|
|
700
|
+
primary: 'bg-primary-main',
|
|
683
701
|
secondary: 'bg-white/30',
|
|
684
702
|
};
|
|
685
703
|
const benefitTitleStyleMap = {
|
|
@@ -691,20 +709,31 @@
|
|
|
691
709
|
secondary: 'text-white',
|
|
692
710
|
};
|
|
693
711
|
function renderBenefit(benefit, i, version) {
|
|
694
|
-
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: `w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${benefitIconBgStyleMap[version]}`, image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-
|
|
712
|
+
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: `w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border text-white ${benefitIconBgStyleMap[version]}`, image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-0.5 flex-col h-full max-w-[149px]", children: [jsx("div", { className: `font-medium text-xl m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `font-normal text-m-md ${benefitDescStyleMap[version]}`, children: benefit.description }))] })] }, String(i)));
|
|
695
713
|
}
|
|
696
714
|
|
|
697
715
|
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
698
716
|
const textColor = version === 'secondary' ? 'text-white' : 'text-primary-text';
|
|
699
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType
|
|
717
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description && (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })), benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
700
718
|
});
|
|
701
|
-
const getTitle = (title, headingType
|
|
702
|
-
|
|
703
|
-
return (title && jsx(Tag, { className: `font-sans font-medium m-0 text-title-xl ${textColor}`, children: title }));
|
|
719
|
+
const getTitle = (title, headingType) => {
|
|
720
|
+
return (title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })));
|
|
704
721
|
};
|
|
705
722
|
const getButtons = (context, buttons) => {
|
|
706
|
-
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-
|
|
723
|
+
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-4" })) : null;
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
const backwardBgStyleMap = {
|
|
727
|
+
primary: 'bg-primary-main',
|
|
728
|
+
secondary: 'bg-white',
|
|
729
|
+
};
|
|
730
|
+
const backwardIconStyleMap = {
|
|
731
|
+
primary: 'text-white',
|
|
732
|
+
secondary: 'text-primary-text',
|
|
707
733
|
};
|
|
734
|
+
function renderBackwardButton(text, version, className) {
|
|
735
|
+
return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { rounded: true, className: `w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`, children: jsx(Img, { className: `w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`, image: { icon: 'ArrowLeftIcon' }, color: "none", width: "24", height: "24", asSVG: true }) }), text ? jsx("span", { className: "text-m-md", children: text }) : null] }));
|
|
736
|
+
}
|
|
708
737
|
|
|
709
738
|
const productBlockStyleMap$1 = {
|
|
710
739
|
primary: 'bg-white text-primary-text',
|
|
@@ -718,7 +747,7 @@
|
|
|
718
747
|
const { context, className = '', breadcrumbs, version = 'primary', anchor = null, ...otherProps } = props;
|
|
719
748
|
const router = context.useRouter();
|
|
720
749
|
const { handlerDecorator } = context;
|
|
721
|
-
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, id: anchor, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
750
|
+
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, id: anchor, children: [renderBackwardButton('Все дебетовые карты', version, 'mb-10'), breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
722
751
|
});
|
|
723
752
|
|
|
724
753
|
const textBlockStyleMaps = {
|
|
@@ -803,11 +832,11 @@
|
|
|
803
832
|
};
|
|
804
833
|
const Tile = JSX((props) => {
|
|
805
834
|
const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
|
|
806
|
-
return (jsx("section", { className: `overflow-hidden font-sans p-9 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
807
|
-
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), children, renderList$1(items, version)] }) }));
|
|
835
|
+
return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
836
|
+
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && (jsx(Description, { className: "mt-4 max-w-[600px] text-title-new-sm font-light", description: description })), children, renderList$1(items, version)] }) }));
|
|
808
837
|
});
|
|
809
838
|
function renderList$1(items, version) {
|
|
810
|
-
return items?.length ? (jsx(List, { items: items, itemClassName: "mt-2.5 first:mt-0", version: version })) : null;
|
|
839
|
+
return items?.length ? (jsx(List, { items: items, itemClassName: "text-title-new-sm font-light mt-2.5 first:mt-0", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
|
|
811
840
|
}
|
|
812
841
|
|
|
813
842
|
const productTileStyleMap = {
|
|
@@ -1370,21 +1399,21 @@
|
|
|
1370
1399
|
transparent: 'text-white',
|
|
1371
1400
|
};
|
|
1372
1401
|
const Logo = JSX(({ className, href, children, targetBlank, bgColor = 'bg-white', hideTitle }) => {
|
|
1373
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), !hideTitle && (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-
|
|
1402
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), !hideTitle && (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-m-title-xs font-medium ml-2.5`, children: children || 'Россельхозбанк' }))] }));
|
|
1374
1403
|
});
|
|
1375
1404
|
|
|
1376
1405
|
const SearchBar = JSX(({ className, context }) => {
|
|
1377
1406
|
const { term, setTerm } = context.useSearch();
|
|
1378
|
-
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-
|
|
1407
|
+
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-light text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: 'h-12 pl-12 w-full peer font-sans font-light text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text', value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input" }), jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (e) => {
|
|
1379
1408
|
e.preventDefault();
|
|
1380
1409
|
console.log('click');
|
|
1381
1410
|
}, children: jsx("div", { className: "font-normal text-sm px-9 py-[9px]", children: "\u041D\u0430\u0439\u0442\u0438" }) })] }));
|
|
1382
1411
|
});
|
|
1383
1412
|
|
|
1384
|
-
const Contacts = JSX(({ className, items, hasButton, context }) => {
|
|
1413
|
+
const Contacts = JSX(({ className = '', items, hasButton, context }) => {
|
|
1385
1414
|
const router = context.useRouter();
|
|
1386
1415
|
const { handlerDecorator } = context;
|
|
1387
|
-
return (jsxs("div", { className:
|
|
1416
|
+
return (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", ...useLink({ router, handlerDecorator }, {
|
|
1388
1417
|
text: 'Обратная связь',
|
|
1389
1418
|
href: '/',
|
|
1390
1419
|
target: '_blank',
|
|
@@ -1392,14 +1421,14 @@
|
|
|
1392
1421
|
});
|
|
1393
1422
|
const renderContact = (item, index) => {
|
|
1394
1423
|
const { type, text, description } = item;
|
|
1395
|
-
return (jsxs("div", { className: "mb-
|
|
1424
|
+
return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 font-sans font-light text-sm text-secondary-text", children: description })] }, String(index)));
|
|
1396
1425
|
};
|
|
1397
1426
|
const renderText = (type, text = '') => {
|
|
1398
1427
|
switch (type) {
|
|
1399
1428
|
case 'tel':
|
|
1400
|
-
return (jsx("a", { className: "font-sans
|
|
1429
|
+
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
|
|
1401
1430
|
case 'email':
|
|
1402
|
-
return (jsx("a", { className: "font-sans
|
|
1431
|
+
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `mailto:${text}`, children: text }));
|
|
1403
1432
|
default:
|
|
1404
1433
|
return jsx("span", { children: text });
|
|
1405
1434
|
}
|
|
@@ -1411,7 +1440,7 @@
|
|
|
1411
1440
|
const { handlerDecorator } = context;
|
|
1412
1441
|
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
1413
1442
|
});
|
|
1414
|
-
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-
|
|
1443
|
+
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1415
1444
|
|
|
1416
1445
|
const cmp = (a) => (b) => a?.href === b?.href;
|
|
1417
1446
|
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
@@ -1430,20 +1459,20 @@
|
|
|
1430
1459
|
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
1431
1460
|
}
|
|
1432
1461
|
|
|
1433
|
-
const Sitemap = JSX(({ className, items, context }) => {
|
|
1462
|
+
const Sitemap = JSX(({ className = '', items, context }) => {
|
|
1434
1463
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1435
1464
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
1436
1465
|
const linkParams = {
|
|
1437
1466
|
router: context.useRouter(),
|
|
1438
1467
|
handlerDecorator: context.handlerDecorator,
|
|
1439
1468
|
};
|
|
1440
|
-
return (jsx("div", { className: `flex items-start justify-
|
|
1469
|
+
return (jsx("div", { className: `flex items-start justify-between gap-11 xl:gap-5 ${className}`, children: mergedItems?.map((_, i) => renderColumn(_, i, linkParams)) }));
|
|
1441
1470
|
});
|
|
1442
1471
|
const renderColumn = (c, index, { router, handlerDecorator }) => {
|
|
1443
1472
|
const { text, href, items, target } = c;
|
|
1444
|
-
return (jsxs("div", { className: "flex flex-col gap-[14px]", children: [jsx("a", { className: "block font-sans
|
|
1473
|
+
return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-[14px]", children: [jsx("a", { className: "block font-sans leading-5 text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _), index: i }, String(i))))] }, String(index)));
|
|
1445
1474
|
};
|
|
1446
|
-
const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-
|
|
1475
|
+
const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-light text-base text-secondary-text hover:text-primary-main no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` })));
|
|
1447
1476
|
|
|
1448
1477
|
const ICONS_MAP = [
|
|
1449
1478
|
{
|
|
@@ -1467,34 +1496,47 @@
|
|
|
1467
1496
|
width: '12px',
|
|
1468
1497
|
height: '20px',
|
|
1469
1498
|
},
|
|
1499
|
+
{
|
|
1500
|
+
origins: ['apps.apple.com'],
|
|
1501
|
+
icon: { icon: 'AppleIcon' },
|
|
1502
|
+
label: 'App Store',
|
|
1503
|
+
width: '20px',
|
|
1504
|
+
height: '22px',
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
origins: ['play.google.com'],
|
|
1508
|
+
icon: { icon: 'PlayMarketIcon' },
|
|
1509
|
+
label: 'Google Play',
|
|
1510
|
+
width: '21px',
|
|
1511
|
+
height: '21px',
|
|
1512
|
+
},
|
|
1470
1513
|
];
|
|
1471
1514
|
const MediaButton = JSX(({ href }) => {
|
|
1472
1515
|
const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1473
1516
|
if (!icon)
|
|
1474
1517
|
return null;
|
|
1475
|
-
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider
|
|
1518
|
+
return (jsx("a", { className: "flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main", href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, width: width, height: height, asSVG: true, className: "block", color: "none" })) : null }));
|
|
1476
1519
|
});
|
|
1477
1520
|
|
|
1478
|
-
const SocialMedia = JSX(({ className, media, context }) => {
|
|
1521
|
+
const SocialMedia = JSX(({ className = '', media, context, children }) => {
|
|
1479
1522
|
const router = context.useRouter();
|
|
1480
1523
|
const { handlerDecorator } = context;
|
|
1481
|
-
return (jsx("div", { className: `flex
|
|
1524
|
+
return (jsxs("div", { children: [jsx("div", { className: `flex gap-2.5 mb-1.5 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { ...useLink({ router, handlerDecorator }, _) }, String(index)))) }), jsx("span", { className: "font-light text-sm text-secondary-text", children: children })] }));
|
|
1482
1525
|
});
|
|
1483
1526
|
|
|
1484
1527
|
const TextInformation = JSX(({ className, links, context }) => {
|
|
1485
1528
|
const router = context.useRouter();
|
|
1486
1529
|
const { handlerDecorator } = context;
|
|
1487
|
-
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-
|
|
1530
|
+
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-[5px]", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1488
1531
|
});
|
|
1489
|
-
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-
|
|
1532
|
+
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1490
1533
|
|
|
1491
|
-
const LEFT_COL_WIDTH_FULL_HD = 'w-[
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
return (jsxs("footer", { className: `px-9 py-10 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1534
|
+
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1535
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, anchor = null, }) => {
|
|
1536
|
+
return (jsxs("footer", { className: `px-9 pt-9 pb-8 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-24", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1495
1537
|
});
|
|
1496
1538
|
|
|
1497
|
-
const
|
|
1539
|
+
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
1498
1540
|
|
|
1499
1541
|
const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
|
|
1500
1542
|
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
@@ -1502,40 +1544,13 @@
|
|
|
1502
1544
|
|
|
1503
1545
|
const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
|
|
1504
1546
|
|
|
1505
|
-
const findActiveSubItem = (router) => (items = []) => {
|
|
1506
|
-
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
1507
|
-
const activeSubItem = possibleActiveSubItems?.length
|
|
1508
|
-
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
1509
|
-
: null;
|
|
1510
|
-
return activeSubItem;
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
1514
|
-
|
|
1515
1547
|
const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) ||
|
|
1516
1548
|
isHrefActive(topItem.href, router) ||
|
|
1517
1549
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
1518
1550
|
|
|
1519
|
-
const TEXT_CLASSES$2 = 'font-sans font-
|
|
1520
|
-
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1521
|
-
const HeaderItem = JSX(({ className, text, href, target, active, onClick, children, bgColor = 'bg-white' }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses$2(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
1522
|
-
const getTextClasses$2 = (bgColor, active) => {
|
|
1523
|
-
let classes = 'text-white';
|
|
1524
|
-
if (bgColor === 'bg-white') {
|
|
1525
|
-
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1526
|
-
}
|
|
1527
|
-
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1528
|
-
};
|
|
1529
|
-
const getBorderClasses = (bgColor, active) => {
|
|
1530
|
-
if (!active) {
|
|
1531
|
-
return BORDER_CLASSES;
|
|
1532
|
-
}
|
|
1533
|
-
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
const TEXT_CLASSES$1 = 'font-sans font-normal text-sm';
|
|
1551
|
+
const TEXT_CLASSES$2 = 'font-sans font-light text-sm';
|
|
1537
1552
|
const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
1538
|
-
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$
|
|
1553
|
+
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$2(bgColor, active, flat), children: text || children }) })));
|
|
1539
1554
|
const getLinkClasses$1 = (bgColor, active, flat) => {
|
|
1540
1555
|
let classes = 'border-transparent';
|
|
1541
1556
|
if (active) {
|
|
@@ -1543,14 +1558,14 @@
|
|
|
1543
1558
|
}
|
|
1544
1559
|
return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
|
|
1545
1560
|
};
|
|
1546
|
-
const getTextClasses$
|
|
1561
|
+
const getTextClasses$2 = (bgColor, active, flat) => {
|
|
1547
1562
|
let classes = 'text-white';
|
|
1548
1563
|
if (bgColor === 'bg-white') {
|
|
1549
1564
|
classes = active
|
|
1550
1565
|
? 'text-primary-main'
|
|
1551
1566
|
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
1552
1567
|
}
|
|
1553
|
-
return `${classes} ${TEXT_CLASSES$
|
|
1568
|
+
return `${classes} ${TEXT_CLASSES$2}`;
|
|
1554
1569
|
};
|
|
1555
1570
|
|
|
1556
1571
|
const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
|
|
@@ -1559,34 +1574,115 @@
|
|
|
1559
1574
|
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
1560
1575
|
transparent: 'text-white',
|
|
1561
1576
|
};
|
|
1562
|
-
const
|
|
1577
|
+
const LINKS_COLORS_MAP = {
|
|
1563
1578
|
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
1564
1579
|
transparent: 'text-white',
|
|
1565
1580
|
};
|
|
1566
|
-
const
|
|
1581
|
+
const LINKS_ICON_NAME_MAP = {
|
|
1567
1582
|
'bg-white': 'GridIcon',
|
|
1568
1583
|
transparent: 'GridIconWhite',
|
|
1569
1584
|
};
|
|
1570
1585
|
const HeaderSecondaryMenu = JSX(({ context, className, defaultLocation = '', bgColor = 'bg-white' }) => {
|
|
1571
1586
|
const [city, getCity] = context.useGeolocation(defaultLocation);
|
|
1572
|
-
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: "LoupeIcon", className: "h-full", asSVG: true, color: "none" }) }), jsx(HeaderSecondaryMenuButton, { className:
|
|
1587
|
+
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: "LoupeIcon", className: "h-full", asSVG: true, color: "none" }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Img, { image: LINKS_ICON_NAME_MAP[bgColor], className: "h-full", asSVG: true, color: "none" }) })] }));
|
|
1573
1588
|
});
|
|
1574
1589
|
|
|
1590
|
+
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1591
|
+
|
|
1592
|
+
const findActiveSubItem = (router) => (items = []) => {
|
|
1593
|
+
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
1594
|
+
const activeSubItem = possibleActiveSubItems?.length
|
|
1595
|
+
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
1596
|
+
: null;
|
|
1597
|
+
return activeSubItem;
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
const TEXT_CLASSES$1 = 'font-sans font-light text-base';
|
|
1601
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1602
|
+
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses$1(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
1603
|
+
const getTextClasses$1 = (bgColor, active) => {
|
|
1604
|
+
let classes = 'text-white';
|
|
1605
|
+
if (bgColor === 'bg-white') {
|
|
1606
|
+
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
1607
|
+
}
|
|
1608
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
1609
|
+
};
|
|
1610
|
+
const getBorderClasses = (bgColor, active) => {
|
|
1611
|
+
if (!active) {
|
|
1612
|
+
return BORDER_CLASSES;
|
|
1613
|
+
}
|
|
1614
|
+
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
1618
|
+
|
|
1619
|
+
const headerSubMenuObserver = isSSR()
|
|
1620
|
+
? undefined
|
|
1621
|
+
: new IntersectionObserver((entries) => {
|
|
1622
|
+
const headerSubMenuButtonElement = window.document.querySelector('[data-header-submenu-visible=toggled]');
|
|
1623
|
+
const headerSubMenuItems = Array.from(window.document.querySelectorAll('[data-item-name=header-submenu]'));
|
|
1624
|
+
const dotsHeaderSubMenuItems = Array.from(window.document.querySelectorAll('[data-item-name=dots-header-submenu]'));
|
|
1625
|
+
const visibilityList = {};
|
|
1626
|
+
entries.forEach((j) => {
|
|
1627
|
+
visibilityList[String(j.target.toString())] = j.isIntersecting;
|
|
1628
|
+
});
|
|
1629
|
+
const isHeaderSubMenuButtonShow = toggleVisibilityInItems(visibilityList, dotsHeaderSubMenuItems, 'hidden');
|
|
1630
|
+
toggleVisibilityInItems(visibilityList, headerSubMenuItems, 'invisible');
|
|
1631
|
+
if (headerSubMenuButtonElement) {
|
|
1632
|
+
isHeaderSubMenuButtonShow
|
|
1633
|
+
? headerSubMenuButtonElement.classList.remove('hidden')
|
|
1634
|
+
: headerSubMenuButtonElement.classList.add('hidden');
|
|
1635
|
+
}
|
|
1636
|
+
}, { root: window.document, threshold: 1.0 });
|
|
1637
|
+
// TODO: add types
|
|
1638
|
+
const toggleVisibilityInItems = (visibilityList, items, className) => {
|
|
1639
|
+
const isReversed = className !== 'hidden';
|
|
1640
|
+
return items.some((item) => {
|
|
1641
|
+
const key = item.toString();
|
|
1642
|
+
const option = isReversed ? !visibilityList[key] : visibilityList[key];
|
|
1643
|
+
key in visibilityList ? item.classList.toggle(className, option) : null;
|
|
1644
|
+
return isReversed ? item.classList.contains('hidden') : !item.classList.contains('hidden');
|
|
1645
|
+
});
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
const HeaderSubMenu = JSX(({ context, subItems, bgColor }) => {
|
|
1649
|
+
const [subMenuIsShow, setHiddenMenuIsShow] = context.useState(false);
|
|
1650
|
+
const router = context.useRouter();
|
|
1651
|
+
const { handlerDecorator } = context;
|
|
1652
|
+
setTimeout(() => {
|
|
1653
|
+
const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
|
|
1654
|
+
headerSubMenu.forEach((_) => {
|
|
1655
|
+
headerSubMenuObserver?.observe(_);
|
|
1656
|
+
});
|
|
1657
|
+
}, 200);
|
|
1658
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1659
|
+
const toggleSubMenu = () => setHiddenMenuIsShow(!subMenuIsShow);
|
|
1660
|
+
const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), dataItemName: "header-submenu", bgColor: bgColor }, _.href)));
|
|
1661
|
+
return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subMenu }), renderDotsSubMenu({
|
|
1662
|
+
subMenuIsShow,
|
|
1663
|
+
toggleSubMenu,
|
|
1664
|
+
subItems,
|
|
1665
|
+
router,
|
|
1666
|
+
handlerDecorator,
|
|
1667
|
+
})] }));
|
|
1668
|
+
});
|
|
1669
|
+
// TODO: add types
|
|
1670
|
+
const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, children: Array(3).fill(jsx("div", { className: "w-[3px] h-[3px] rounded bg-black mr-1" })) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
|
|
1671
|
+
// TODO: add types
|
|
1672
|
+
const renderDotsSubMenuItems = (subItems, router, handlerDecorator) => subItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), "data-item-name": "dots-header-submenu", className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
|
|
1673
|
+
|
|
1575
1674
|
const BORDER_COLORS = {
|
|
1576
1675
|
'bg-white': 'bg-main-divider',
|
|
1577
1676
|
transparent: 'bg-main-divider opacity-30',
|
|
1578
1677
|
};
|
|
1579
|
-
const Header = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1678
|
+
const Header = JSX(({ className = '', defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1580
1679
|
const router = context.useRouter();
|
|
1581
1680
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1582
1681
|
const { handlerDecorator } = context;
|
|
1583
1682
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
1584
1683
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
1585
|
-
const subItems = activeTopItem?.items;
|
|
1586
|
-
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1587
1684
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
1588
|
-
|
|
1589
|
-
return (jsx("header", { className: `pt-5 pb-8 px-20 ${bgColor} ${className || ''}`, id: anchor, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-5 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx("nav", { className: "mt-5", children: subMenu })] }) }));
|
|
1685
|
+
return (jsx("header", { className: `pt-6 pb-8 px-20 ${bgColor} ${className}`, id: anchor, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx(HeaderSubMenu, { context: context, subItems: activeTopItem?.items, bgColor: bgColor })] }) }));
|
|
1590
1686
|
});
|
|
1591
1687
|
|
|
1592
1688
|
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
|