@redneckz/wildless-cms-uni-blocks 0.13.17 → 0.13.19
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/bin/migration-scripts/0.13.14.js +25 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +34 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +0 -2
- package/bundle/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/cosmos-static/icons/RutubeIcon.svg +1 -0
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +2 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +0 -2
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.js +3 -5
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/dist/components/ContentPage/toMobileBlock.js +12 -0
- package/dist/components/ContentPage/toMobileBlock.js.map +1 -0
- package/dist/components/Footer/iconsMap.js +5 -0
- package/dist/components/Footer/iconsMap.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +5 -5
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Header/isHrefActive.js +3 -1
- package/dist/components/Header/isHrefActive.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -3
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/dist/components/ProductBlock/renderBackwardButton.js +8 -7
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/dist/components/StickyBottomMenu/RenderItem.js +7 -5
- package/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/dist/components/StickyBottomMenu/RenderMenuItems.js +12 -0
- package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +2 -2
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/dist/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +2 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +0 -2
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.js +3 -5
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/lib/components/ContentPage/toMobileBlock.js +9 -0
- package/lib/components/ContentPage/toMobileBlock.js.map +1 -0
- package/lib/components/DepositFiltration/DepositFiltration.fixture.mobile.d.ts +6 -0
- package/lib/components/Footer/iconsMap.js +5 -0
- package/lib/components/Footer/iconsMap.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +5 -5
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Header/isHrefActive.js +3 -1
- package/lib/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltration.fixture.mobile.d.ts +6 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -3
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/lib/components/ProductBlock/renderBackwardButton.js +8 -7
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/lib/components/StickyBottomMenu/RenderItem.js +7 -5
- package/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/lib/components/StickyBottomMenu/RenderMenuItems.js +10 -0
- package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +2 -2
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/lib/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.d.ts +0 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +240 -46
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/bundle/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +2 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.js +3 -5
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/dist/components/ContentPage/toMobileBlock.js +12 -0
- package/mobile/dist/components/ContentPage/toMobileBlock.js.map +1 -0
- package/mobile/dist/components/Footer/iconsMap.js +5 -0
- package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +5 -5
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Header/isHrefActive.js +3 -1
- package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +12 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +8 -7
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js +7 -5
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +12 -0
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +2 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.js +3 -5
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/lib/components/ContentPage/toMobileBlock.js +9 -0
- package/mobile/lib/components/ContentPage/toMobileBlock.js.map +1 -0
- package/mobile/lib/components/Footer/iconsMap.js +5 -0
- package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +5 -5
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Header/isHrefActive.js +3 -1
- package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +12 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +8 -7
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js +7 -5
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +10 -0
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/Carousel/Carousel.tsx +6 -9
- package/mobile/src/components/Carousel/CarouselContent.ts +0 -2
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +0 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/ContentPage/normalizeBlock.ts +3 -10
- package/mobile/src/components/ContentPage/toMobileBlock.ts +11 -0
- package/mobile/src/components/Footer/iconsMap.ts +5 -0
- package/mobile/src/components/Header/HeaderTop.tsx +34 -28
- package/mobile/src/components/Header/isHrefActive.ts +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -4
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +27 -16
- package/mobile/src/components/ProductBlock/ProductBlock.ui.json +0 -8
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -3
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +11 -16
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +4 -4
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +9 -1
- package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +9 -6
- package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +24 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.example.json +4 -4
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +2 -2
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +1 -1
- package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/RutubeIcon.svg +1 -0
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +3 -3
- package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +3 -3
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +5 -1
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +0 -8
- package/src/components/Carousel/Carousel.tsx +6 -9
- package/src/components/Carousel/CarouselContent.ts +0 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +0 -1
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/ContentPage/normalizeBlock.mobile.ts +3 -10
- package/src/components/ContentPage/toMobileBlock.ts +11 -0
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +203 -0
- package/src/components/Footer/iconsMap.ts +5 -0
- package/src/components/Header/HeaderTop.tsx +34 -28
- package/src/components/Header/isHrefActive.ts +3 -1
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +205 -0
- package/src/components/ProductBlock/ProductBlock.example.json +1 -4
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +3 -9
- package/src/components/ProductBlock/ProductBlock.tsx +27 -16
- package/src/components/ProductBlock/ProductBlock.ui.json +0 -8
- package/src/components/ProductBlock/ProductBlockContent.ts +2 -3
- package/src/components/ProductBlock/renderBackwardButton.tsx +11 -16
- package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +4 -4
- package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +9 -1
- package/src/components/StickyBottomMenu/RenderItem.tsx +9 -6
- package/src/components/StickyBottomMenu/RenderMenuItems.tsx +24 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.example.json +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.tsx +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.tsx +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +2 -2
- package/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +1 -1
- package/src/components/StickyBottomMenu/TopItemMobile.tsx +1 -1
- package/src/icons/IconName.ts +4 -1
- package/src/icons/RutubeIcon.svg +1 -0
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +3 -3
- package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +3 -3
- package/src/ui-kit/DialogManager/Dialog.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +5 -1
- package/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/dist/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/dist/components/StickyBottomMenu/renderMenuItems.js +0 -8
- package/dist/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/lib/components/StickyBottomMenu/renderMenuItems.d.ts +0 -2
- package/lib/components/StickyBottomMenu/renderMenuItems.js +0 -5
- package/lib/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +0 -8
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js +0 -5
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +0 -13
- package/src/components/StickyBottomMenu/renderMenuItems.tsx +0 -13
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import type { BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
|
|
4
|
+
import { Blocks } from '../Blocks';
|
|
5
|
+
import { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
|
|
6
|
+
import { MortgageFiltration } from './MortgageFiltration';
|
|
7
|
+
import type {
|
|
8
|
+
MortgageFiltrationContent,
|
|
9
|
+
MortgageFiltrationHotFilter,
|
|
10
|
+
} from './MortgageFiltrationContent';
|
|
11
|
+
|
|
12
|
+
const PROPERTY_APARTMENT = {
|
|
13
|
+
propertyType: ['apartment'],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const PROPERTY_FLAT = {
|
|
17
|
+
propertyType: ['flat'],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const PROPERTY_HOUSE = {
|
|
21
|
+
propertyType: ['house'],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const STAGE_BUILT = {
|
|
25
|
+
stage: ['built'],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const STAGE_IN_PROGRESS = {
|
|
29
|
+
stage: ['inProgress'],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const EXTRA_MORTGAGE = {
|
|
33
|
+
extraOptions: ['preferentialMortgage'],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const EXTRA_CHILDREN = {
|
|
37
|
+
extraOptions: ['children'],
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const CATEGORY_IT = {
|
|
41
|
+
categories: ['IT'],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const CATEGORY_SALARY = {
|
|
45
|
+
categories: ['salaryClient'],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const generateBlock = (...presets: any[]) => ({
|
|
49
|
+
type: 'ProductTile',
|
|
50
|
+
style: ['col-span-6'],
|
|
51
|
+
content: { ...presets.reduce((acc, p) => ({ ...acc, ...p })) },
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const SCHEMA: MortgageFiltrationContent['filtrationSchema'] = {
|
|
55
|
+
propertyType: {
|
|
56
|
+
title: 'Тип недвижимости',
|
|
57
|
+
type: 'array',
|
|
58
|
+
items: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
enum: ['flat', 'apartment', 'house', 'storeRoom', 'parkingSpace', 'suburban'],
|
|
61
|
+
enumNames: [
|
|
62
|
+
'Квартира',
|
|
63
|
+
'Апартаменты',
|
|
64
|
+
'Жилой дом',
|
|
65
|
+
'Кладовая',
|
|
66
|
+
'Машино-место',
|
|
67
|
+
'Загородная недвижимость',
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
stage: {
|
|
72
|
+
title: 'Этап строительства',
|
|
73
|
+
type: 'array',
|
|
74
|
+
items: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
enum: ['built', 'inProgress'],
|
|
77
|
+
enumNames: ['Готовое жильё', 'Строящиеся'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
categories: {
|
|
81
|
+
title: 'Категории',
|
|
82
|
+
type: 'array',
|
|
83
|
+
items: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['salaryClient', 'IT', 'youngFamily', 'military', 'medicalWorker', 'scientist'],
|
|
86
|
+
enumNames: [
|
|
87
|
+
'Зарплатный клиент',
|
|
88
|
+
'IT-специалист',
|
|
89
|
+
'Молодая семья',
|
|
90
|
+
'Военнослужащий',
|
|
91
|
+
'Медицинский работник',
|
|
92
|
+
'Научный сотрудник',
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
extraOptions: {
|
|
97
|
+
title: 'Дополнительно',
|
|
98
|
+
type: 'array',
|
|
99
|
+
items: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
enum: ['preferentialMortgage', 'children', 'refinancing'],
|
|
102
|
+
enumNames: ['Льготная ипотека', 'Дети', 'Рефинансирование'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const HOT_FILTERS: MortgageFiltrationHotFilter[] = [
|
|
108
|
+
{ text: 'Все программы' },
|
|
109
|
+
{
|
|
110
|
+
text: 'Льготные программы',
|
|
111
|
+
filter: {
|
|
112
|
+
categories: [],
|
|
113
|
+
extraOptions: ['preferentialMortgage'],
|
|
114
|
+
propertyType: [],
|
|
115
|
+
stage: [],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
text: 'Строящееся жилье',
|
|
120
|
+
filter: { stage: ['inProgress'], categories: [], extraOptions: [], propertyType: [] },
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
text: 'Готовое жилье',
|
|
124
|
+
filter: { stage: ['built'], categories: [], extraOptions: [], propertyType: [] },
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
text: 'Загородная недвижимость',
|
|
128
|
+
filter: { propertyType: ['suburban'], categories: [], extraOptions: [], stage: [] },
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
text: 'Рефинансирование',
|
|
132
|
+
filter: { categories: [], extraOptions: ['refinancing'], propertyType: [], stage: [] },
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
const options = {
|
|
137
|
+
blocksRegistry: Blocks,
|
|
138
|
+
} as BlockRendererOptions;
|
|
139
|
+
|
|
140
|
+
export default {
|
|
141
|
+
default: (
|
|
142
|
+
<div className="container grid grid-cols-12">
|
|
143
|
+
<MortgageFiltration
|
|
144
|
+
className="col-span-12"
|
|
145
|
+
label="Другие ипотечные программы"
|
|
146
|
+
filtrationSchema={SCHEMA}
|
|
147
|
+
topItemsCount={2}
|
|
148
|
+
hotFilters={HOT_FILTERS}
|
|
149
|
+
resetButton={{ text: 'Очистить фильтры', version: 'secondary' }}
|
|
150
|
+
notFound={{
|
|
151
|
+
title: 'Нет подходящей программы',
|
|
152
|
+
description: 'Попробуйте очистить фильтры',
|
|
153
|
+
}}
|
|
154
|
+
block={{
|
|
155
|
+
type: 'MortgageFiltration',
|
|
156
|
+
blocks: [
|
|
157
|
+
generateBlock(
|
|
158
|
+
PRODUCT_TILE,
|
|
159
|
+
PROPERTY_APARTMENT,
|
|
160
|
+
STAGE_IN_PROGRESS,
|
|
161
|
+
EXTRA_MORTGAGE,
|
|
162
|
+
CATEGORY_IT,
|
|
163
|
+
),
|
|
164
|
+
generateBlock(
|
|
165
|
+
PRODUCT_TILE,
|
|
166
|
+
PROPERTY_APARTMENT,
|
|
167
|
+
STAGE_BUILT,
|
|
168
|
+
EXTRA_CHILDREN,
|
|
169
|
+
CATEGORY_SALARY,
|
|
170
|
+
),
|
|
171
|
+
generateBlock(
|
|
172
|
+
PRODUCT_TILE,
|
|
173
|
+
PROPERTY_FLAT,
|
|
174
|
+
STAGE_IN_PROGRESS,
|
|
175
|
+
EXTRA_MORTGAGE,
|
|
176
|
+
CATEGORY_SALARY,
|
|
177
|
+
),
|
|
178
|
+
generateBlock(
|
|
179
|
+
PRODUCT_TILE,
|
|
180
|
+
PROPERTY_FLAT,
|
|
181
|
+
STAGE_BUILT,
|
|
182
|
+
EXTRA_MORTGAGE,
|
|
183
|
+
CATEGORY_SALARY,
|
|
184
|
+
),
|
|
185
|
+
generateBlock(
|
|
186
|
+
PRODUCT_TILE,
|
|
187
|
+
PROPERTY_APARTMENT,
|
|
188
|
+
STAGE_BUILT,
|
|
189
|
+
EXTRA_CHILDREN,
|
|
190
|
+
CATEGORY_IT,
|
|
191
|
+
),
|
|
192
|
+
generateBlock(
|
|
193
|
+
PRODUCT_TILE,
|
|
194
|
+
PROPERTY_HOUSE,
|
|
195
|
+
STAGE_BUILT,
|
|
196
|
+
EXTRA_MORTGAGE,
|
|
197
|
+
CATEGORY_SALARY,
|
|
198
|
+
),
|
|
199
|
+
],
|
|
200
|
+
}}
|
|
201
|
+
options={options}
|
|
202
|
+
/>
|
|
203
|
+
</div>
|
|
204
|
+
),
|
|
205
|
+
};
|
|
@@ -67,12 +67,6 @@ const items = [
|
|
|
67
67
|
'Расходы для бизнеса на УСН 15% позволят снизить налоговую базу',
|
|
68
68
|
];
|
|
69
69
|
|
|
70
|
-
const backwardButton: ButtonContent = {
|
|
71
|
-
href: 'https://rshb.ru',
|
|
72
|
-
text: 'Все кредитные карты',
|
|
73
|
-
icon: { icon: 'ArrowLeftIcon' },
|
|
74
|
-
};
|
|
75
|
-
|
|
76
70
|
export const PRODUCT_BLOCK: ProductBlockContent = {
|
|
77
71
|
title: 'Оплата проходит в 180 странах мира',
|
|
78
72
|
headlineVersion: 'L',
|
|
@@ -81,7 +75,7 @@ export const PRODUCT_BLOCK: ProductBlockContent = {
|
|
|
81
75
|
};
|
|
82
76
|
|
|
83
77
|
const PRODUCT_BLOCK_WITH_BACK_BUTTON: ProductBlockContent = {
|
|
84
|
-
backwardButton,
|
|
78
|
+
backwardButton: true,
|
|
85
79
|
headlineVersion: 'L',
|
|
86
80
|
title: 'Потребительский кредит наличными',
|
|
87
81
|
description:
|
|
@@ -102,7 +96,7 @@ export default {
|
|
|
102
96
|
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
103
97
|
benefits={benefits}
|
|
104
98
|
benefitsVersion="normal"
|
|
105
|
-
backwardButton={
|
|
99
|
+
backwardButton={true}
|
|
106
100
|
buttons={buttons}
|
|
107
101
|
image={image}
|
|
108
102
|
/>
|
|
@@ -157,7 +151,7 @@ export default {
|
|
|
157
151
|
<div className="container grid grid-cols-12">
|
|
158
152
|
<ProductBlock
|
|
159
153
|
className="col-span-12"
|
|
160
|
-
backwardButton={
|
|
154
|
+
backwardButton={true}
|
|
161
155
|
headlineVersion="XL"
|
|
162
156
|
title="Потребительский кредит наличными"
|
|
163
157
|
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
@@ -5,25 +5,36 @@ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
|
5
5
|
import { style } from '../../utils/style';
|
|
6
6
|
import type { ProductBlockContent } from './ProductBlockContent';
|
|
7
7
|
import { renderBackwardButton } from './renderBackwardButton';
|
|
8
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
9
|
+
import type { PreventableEvent } from '../../ui-kit/PreventableEvent';
|
|
10
|
+
import { useRouter } from '../../hooks/useRouter';
|
|
8
11
|
|
|
9
12
|
export interface ProductBlockProps extends UniBlockProps, ProductBlockContent {}
|
|
10
13
|
|
|
11
14
|
export const ProductBlock = JSX<ProductBlockProps>(
|
|
12
|
-
({ className, padding, backwardButton, ...rest }) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
>
|
|
19
|
-
{backwardButton?.text
|
|
20
|
-
? renderBackwardButton(
|
|
21
|
-
backwardButton,
|
|
22
|
-
!rest.version || rest.version === 'primary' ? 'primary' : 'white',
|
|
23
|
-
)
|
|
24
|
-
: null}
|
|
15
|
+
({ className, padding, backwardButton, ...rest }) => {
|
|
16
|
+
const router = useRouter();
|
|
17
|
+
const handleClick = useCallback((ev?: PreventableEvent) => {
|
|
18
|
+
ev?.preventDefault();
|
|
19
|
+
router.back();
|
|
20
|
+
}, []);
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
return (
|
|
23
|
+
<BlockWrapper
|
|
24
|
+
className={style('overflow-hidden flex flex-col gap-3xl box-border', className)}
|
|
25
|
+
defaultPadding="p-6xl"
|
|
26
|
+
padding={padding}
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{backwardButton
|
|
30
|
+
? renderBackwardButton(
|
|
31
|
+
!rest.version || rest.version === 'primary' ? 'primary' : 'white',
|
|
32
|
+
handleClick,
|
|
33
|
+
)
|
|
34
|
+
: null}
|
|
35
|
+
|
|
36
|
+
<BaseProductTile className="grow h-full" {...rest} />
|
|
37
|
+
</BlockWrapper>
|
|
38
|
+
);
|
|
39
|
+
},
|
|
29
40
|
);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
2
2
|
import type { BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
3
|
-
import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* @title Продуктовый блок
|
|
7
6
|
*/
|
|
8
7
|
export type ProductBlockContent = UniBlockContent &
|
|
9
8
|
BaseProductTileContent & {
|
|
10
|
-
/** @title
|
|
11
|
-
backwardButton?:
|
|
9
|
+
/** @title Отображать кнопку возврата */
|
|
10
|
+
backwardButton?: boolean;
|
|
12
11
|
};
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
2
2
|
import { Button } from '../../ui-kit/Button/Button';
|
|
3
3
|
import { Img } from '../../ui-kit/Img/Img';
|
|
4
|
-
import
|
|
4
|
+
import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
|
|
5
5
|
|
|
6
|
-
export function renderBackwardButton(
|
|
7
|
-
{ text, href, target, icon }: ButtonContent,
|
|
8
|
-
version: ButtonVersion,
|
|
9
|
-
) {
|
|
6
|
+
export function renderBackwardButton(version: ButtonVersion, handleClick: () => void) {
|
|
10
7
|
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
11
|
-
const
|
|
8
|
+
const className = 'w-12 h-12 min-h-12 min-w-12 flex items-center justify-center';
|
|
9
|
+
const text = 'Вернуться назад';
|
|
12
10
|
|
|
13
11
|
return (
|
|
14
12
|
<div className="flex items-center gap-s">
|
|
15
|
-
<
|
|
16
|
-
className=
|
|
17
|
-
|
|
18
|
-
rounded
|
|
19
|
-
{...commonProps}
|
|
13
|
+
<div
|
|
14
|
+
className={getRegularButtonClasses({ className, version, rounded: true })}
|
|
15
|
+
onClick={handleClick}
|
|
20
16
|
>
|
|
21
17
|
<Img
|
|
22
18
|
className="w-4 h-4"
|
|
23
19
|
image={{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
iconVersion: icon?.iconVersion || iconVersion,
|
|
20
|
+
icon: 'ArrowLeftIcon',
|
|
21
|
+
iconVersion: iconVersion,
|
|
27
22
|
}}
|
|
28
23
|
/>
|
|
29
|
-
</
|
|
30
|
-
<Button version="link" {
|
|
24
|
+
</div>
|
|
25
|
+
<Button version="link" text={text} ariaLabel={text} onClick={handleClick} />
|
|
31
26
|
</div>
|
|
32
27
|
);
|
|
33
28
|
}
|
|
@@ -6,12 +6,12 @@ interface ActiveSubMenuProps {
|
|
|
6
6
|
activeMenuSubItems?: LinkProps[];
|
|
7
7
|
basePath?: string;
|
|
8
8
|
}
|
|
9
|
-
export const ActiveSubMenu = JSX<ActiveSubMenuProps>(({ activeMenuSubItems, basePath }) =>
|
|
10
|
-
|
|
9
|
+
export const ActiveSubMenu = JSX<ActiveSubMenuProps>(({ activeMenuSubItems, basePath }) =>
|
|
10
|
+
activeMenuSubItems ? (
|
|
11
11
|
<div className="mb-5">
|
|
12
12
|
{activeMenuSubItems.map((_, i) => (
|
|
13
13
|
<ActiveSubMenuItem item={_} key={String(i)} basePath={basePath} />
|
|
14
14
|
))}
|
|
15
15
|
</div>
|
|
16
|
-
) : null
|
|
17
|
-
|
|
16
|
+
) : null,
|
|
17
|
+
);
|
|
@@ -3,6 +3,9 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
3
3
|
import { useLink } from '../../hooks/useLink';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
|
+
import { useRouter } from '../../hooks/useRouter';
|
|
7
|
+
import { isHrefActive } from '../Header/isHrefActive';
|
|
8
|
+
import { style } from '../../utils/style';
|
|
6
9
|
|
|
7
10
|
interface ActiveSubMenuItemProps {
|
|
8
11
|
item: LinkProps;
|
|
@@ -15,10 +18,15 @@ export const ActiveSubMenuItem = JSX<ActiveSubMenuItemProps>(({ item, basePath }
|
|
|
15
18
|
|
|
16
19
|
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
17
20
|
const { href, target, onClick } = link(item);
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
const isActive = isHrefActive(router)({ href });
|
|
18
23
|
|
|
19
24
|
return (
|
|
20
25
|
<a
|
|
21
|
-
className=
|
|
26
|
+
className={style(
|
|
27
|
+
isActive ? 'text-primary-main' : 'text-primary-text',
|
|
28
|
+
`py-3 text-h5 font-light flex justify-between cursor-pointer`,
|
|
29
|
+
)}
|
|
22
30
|
href={href}
|
|
23
31
|
target={target}
|
|
24
32
|
onClick={onClick}
|
|
@@ -6,13 +6,14 @@ import { style } from '../../utils/style';
|
|
|
6
6
|
import type { MenuItemProps } from './StickyBottomMenuProps';
|
|
7
7
|
|
|
8
8
|
interface RenderItemProps {
|
|
9
|
+
isActive?: boolean;
|
|
9
10
|
item: MenuItemProps;
|
|
10
11
|
onClick?: () => void;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const RenderItem = JSX<RenderItemProps>(({ item, onClick }) => {
|
|
14
|
+
export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
|
|
14
15
|
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
15
|
-
? !item.
|
|
16
|
+
? !item.href?.startsWith(projectSettings?.BASE_PATH)
|
|
16
17
|
: true;
|
|
17
18
|
|
|
18
19
|
const link = useLink({ isRemote: isAnotherPortal });
|
|
@@ -21,15 +22,17 @@ export const RenderItem = JSX<RenderItemProps>(({ item, onClick }) => {
|
|
|
21
22
|
target,
|
|
22
23
|
onClick: handleClick,
|
|
23
24
|
} = link({
|
|
24
|
-
href: item.
|
|
25
|
+
href: item.href,
|
|
25
26
|
target: '_self',
|
|
26
27
|
});
|
|
28
|
+
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
29
|
+
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
27
30
|
|
|
28
31
|
return (
|
|
29
32
|
<a
|
|
30
33
|
className={style(
|
|
31
|
-
|
|
32
|
-
`w-10 m-4 flex justify-center items-center flex-col text-
|
|
34
|
+
isActiveItem ? 'text-primary-main' : 'text-primary-text',
|
|
35
|
+
`w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
|
|
33
36
|
)}
|
|
34
37
|
onClick={() => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick())}
|
|
35
38
|
href={href}
|
|
@@ -39,7 +42,7 @@ export const RenderItem = JSX<RenderItemProps>(({ item, onClick }) => {
|
|
|
39
42
|
className="w-6 h-6"
|
|
40
43
|
image={{
|
|
41
44
|
icon: item?.icon?.icon,
|
|
42
|
-
iconVersion:
|
|
45
|
+
iconVersion: iconVersion,
|
|
43
46
|
}}
|
|
44
47
|
/>
|
|
45
48
|
{item.title}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { MenuItemProps } from './StickyBottomMenuProps';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
+
import { RenderItem } from './RenderItem';
|
|
5
|
+
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
6
|
+
|
|
7
|
+
interface RenderMenuItems {
|
|
8
|
+
menuItems: MenuItemProps[];
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const RenderMenuItems = JSX<RenderMenuItems>(({ menuItems, onClick }) => {
|
|
13
|
+
const [activeIndex] = useActiveRoute(menuItems);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<BlockWrapper className="sticky bottom-0 left-0 right-0 bg-transparent z-[100]" padding="p-0">
|
|
17
|
+
<div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
|
|
18
|
+
{menuItems.map((_, i) => (
|
|
19
|
+
<RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
|
|
20
|
+
))}
|
|
21
|
+
</div>
|
|
22
|
+
</BlockWrapper>
|
|
23
|
+
);
|
|
24
|
+
});
|
|
@@ -4,28 +4,28 @@
|
|
|
4
4
|
"menuItems": [
|
|
5
5
|
{
|
|
6
6
|
"title": "Кредиты",
|
|
7
|
-
"
|
|
7
|
+
"href": "#EmptyWalletIcon",
|
|
8
8
|
"icon": {
|
|
9
9
|
"icon": "EmptyWalletIcon"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "Карты",
|
|
14
|
-
"
|
|
14
|
+
"href": "#CardIcon",
|
|
15
15
|
"icon": {
|
|
16
16
|
"icon": "CardIcon"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"title": "Вклады",
|
|
21
|
-
"
|
|
21
|
+
"href": "#SafeIcon",
|
|
22
22
|
"icon": {
|
|
23
23
|
"icon": "SafeIcon"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"title": "Инвестиции",
|
|
28
|
-
"
|
|
28
|
+
"href": "#ChartIcon",
|
|
29
29
|
"icon": {
|
|
30
30
|
"icon": "ChartIcon"
|
|
31
31
|
}
|
|
@@ -6,22 +6,22 @@ import type { MenuItem } from './StickyBottomMenuContent';
|
|
|
6
6
|
const MENU_ITEMS: MenuItem[] = [
|
|
7
7
|
{
|
|
8
8
|
title: 'Кредиты',
|
|
9
|
-
|
|
9
|
+
href: '#EmptyWalletIcon',
|
|
10
10
|
icon: { icon: 'EmptyWalletIcon' },
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
title: 'Карты',
|
|
14
|
-
|
|
14
|
+
href: '#CardIcon',
|
|
15
15
|
icon: { icon: 'CardIcon' },
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
title: 'Вклады',
|
|
19
|
-
|
|
19
|
+
href: '#SafeIcon',
|
|
20
20
|
icon: { icon: 'SafeIcon' },
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
title: 'Инвестиции',
|
|
24
|
-
|
|
24
|
+
href: '#ChartIcon',
|
|
25
25
|
icon: { icon: 'ChartIcon' },
|
|
26
26
|
},
|
|
27
27
|
];
|
|
@@ -6,22 +6,22 @@ import type { MenuItem } from './StickyBottomMenuContent';
|
|
|
6
6
|
export const MENU_ITEMS: MenuItem[] = [
|
|
7
7
|
{
|
|
8
8
|
title: 'Кредиты',
|
|
9
|
-
|
|
9
|
+
href: '#EmptyWalletIcon',
|
|
10
10
|
icon: { icon: 'EmptyWalletIcon' },
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
title: 'Карты',
|
|
14
|
-
|
|
14
|
+
href: '#CardIcon',
|
|
15
15
|
icon: { icon: 'CardIcon' },
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
title: 'Вклады',
|
|
19
|
-
|
|
19
|
+
href: '#SafeIcon',
|
|
20
20
|
icon: { icon: 'SafeIcon' },
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
title: 'Инвестиции',
|
|
24
|
-
|
|
24
|
+
href: '#ChartIcon',
|
|
25
25
|
icon: { icon: 'ChartIcon' },
|
|
26
26
|
},
|
|
27
27
|
];
|
|
@@ -4,7 +4,7 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
4
4
|
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
5
5
|
import { BurgerMenuDialog } from './BurgerMenuDialog';
|
|
6
6
|
import type { MenuItemProps, StickyBottomMenuProps } from './StickyBottomMenuProps';
|
|
7
|
-
import {
|
|
7
|
+
import { RenderMenuItems } from './RenderMenuItems';
|
|
8
8
|
import { useBurgerMenuDialog } from './useBurgerMenuDialog';
|
|
9
9
|
|
|
10
10
|
export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
@@ -36,7 +36,7 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<div className="contents">
|
|
39
|
-
{
|
|
39
|
+
{<RenderMenuItems menuItems={menuItemsWithButton} onClick={toggle} />}
|
|
40
40
|
{isBurgerMenuDialogOpen ? <BurgerMenuDialog /> : null}
|
|
41
41
|
</div>
|
|
42
42
|
);
|
|
@@ -9,7 +9,7 @@ interface TopItemProps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const TopItemMobile = ({ item, isActive, onClick }: TopItemProps) => (
|
|
12
|
-
<button type="button" onClick={onClick}>
|
|
12
|
+
<button type="button" className="relative" onClick={onClick}>
|
|
13
13
|
<span className={style('whitespace-nowrap', isActive ? 'text-primary-main' : '')}>
|
|
14
14
|
{item.text}
|
|
15
15
|
</span>
|