@redneckz/wildless-cms-uni-blocks 0.6.34 → 0.6.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +214 -71
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/constants.d.ts +3 -0
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/bundle/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/bundle/hooks/useIntersectionObserver.d.ts +7 -1
- package/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/bundle/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/bundle/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/bundle/utils/areArraysEqual.d.ts +1 -0
- package/bundle/utils/mapChildren.d.ts +2 -0
- package/bundle/utils/maxBy.d.ts +2 -2
- package/bundle/utils/minBy.d.ts +1 -0
- package/dist/components/Blocks.js +3 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/constants.d.ts +3 -0
- package/dist/components/Calculator/constants.js +10 -1
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/dist/components/Carousel/Carousel.js +14 -15
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +12 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +2 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/dist/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +10 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/hooks/useIntersectionObserver.d.ts +7 -1
- package/dist/hooks/useIntersectionObserver.js +10 -1
- package/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/dist/ui-kit/BlockWrapper.js +1 -11
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/dist/ui-kit/Button/ArrowButton.js +3 -1
- package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +35 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/dist/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +16 -0
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.js +8 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.js +7 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.js +7 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +57 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/dist/utils/areArraysEqual.d.ts +1 -0
- package/dist/utils/areArraysEqual.js +5 -0
- package/dist/utils/areArraysEqual.js.map +1 -0
- package/dist/utils/mapChildren.d.ts +2 -0
- package/dist/utils/mapChildren.js +10 -0
- package/dist/utils/mapChildren.js.map +1 -0
- package/dist/utils/maxBy.d.ts +2 -2
- package/dist/utils/maxBy.js +4 -4
- package/dist/utils/maxBy.js.map +1 -1
- package/dist/utils/minBy.d.ts +1 -0
- package/dist/utils/minBy.js +6 -0
- package/dist/utils/minBy.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +3 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +14 -12
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/constants.d.ts +3 -0
- package/lib/components/Calculator/constants.js +9 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +14 -15
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +8 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +10 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.d.ts +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/lib/components/Header/HeaderSubMenuItem.js +1 -1
- package/lib/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +10 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.d.ts +7 -1
- package/lib/hooks/useIntersectionObserver.js +11 -2
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/hooks/useLink.js +2 -2
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/lib/ui-kit/BlockWrapper.js +1 -11
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/lib/ui-kit/Button/ArrowButton.js +2 -0
- package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +33 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/lib/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +14 -0
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.js +5 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.js +4 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.js +4 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +54 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/lib/utils/areArraysEqual.d.ts +1 -0
- package/lib/utils/areArraysEqual.js +2 -0
- package/lib/utils/areArraysEqual.js.map +1 -0
- package/lib/utils/mapChildren.d.ts +2 -0
- package/lib/utils/mapChildren.js +7 -0
- package/lib/utils/mapChildren.js.map +1 -0
- package/lib/utils/maxBy.d.ts +2 -2
- package/lib/utils/maxBy.js +2 -2
- package/lib/utils/maxBy.js.map +1 -1
- package/lib/utils/minBy.d.ts +1 -0
- package/lib/utils/minBy.js +3 -0
- package/lib/utils/minBy.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +141 -140
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/constants.d.ts +3 -0
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/bundle/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/bundle/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/bundle/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/bundle/utils/areArraysEqual.d.ts +1 -0
- package/mobile/bundle/utils/mapChildren.d.ts +2 -0
- package/mobile/bundle/utils/maxBy.d.ts +2 -2
- package/mobile/bundle/utils/minBy.d.ts +1 -0
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.d.ts +3 -0
- package/mobile/dist/components/Calculator/constants.js +10 -1
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Carousel/Carousel.js +14 -15
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +12 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/dist/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +10 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/dist/hooks/useIntersectionObserver.js +10 -1
- package/mobile/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/mobile/dist/hooks/useLink.js +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/dist/ui-kit/BlockWrapper.js +1 -11
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/dist/ui-kit/Button/ArrowButton.js +3 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +35 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +16 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js +8 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.js +7 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.js +7 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +57 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/mobile/dist/utils/areArraysEqual.d.ts +1 -0
- package/mobile/dist/utils/areArraysEqual.js +5 -0
- package/mobile/dist/utils/areArraysEqual.js.map +1 -0
- package/mobile/dist/utils/mapChildren.d.ts +2 -0
- package/mobile/dist/utils/mapChildren.js +10 -0
- package/mobile/dist/utils/mapChildren.js.map +1 -0
- package/mobile/dist/utils/maxBy.d.ts +2 -2
- package/mobile/dist/utils/maxBy.js +4 -4
- package/mobile/dist/utils/maxBy.js.map +1 -1
- package/mobile/dist/utils/minBy.d.ts +1 -0
- package/mobile/dist/utils/minBy.js +6 -0
- package/mobile/dist/utils/minBy.js.map +1 -0
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +14 -12
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.d.ts +3 -0
- package/mobile/lib/components/Calculator/constants.js +9 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Carousel/Carousel.js +14 -15
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +10 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +10 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/lib/hooks/useIntersectionObserver.js +11 -2
- package/mobile/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/mobile/lib/hooks/useLink.js +2 -2
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/lib/ui-kit/BlockWrapper.js +1 -11
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/lib/ui-kit/Button/ArrowButton.js +2 -0
- package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +33 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js +5 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.js +4 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.js +4 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +54 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/mobile/lib/utils/areArraysEqual.d.ts +1 -0
- package/mobile/lib/utils/areArraysEqual.js +2 -0
- package/mobile/lib/utils/areArraysEqual.js.map +1 -0
- package/mobile/lib/utils/mapChildren.d.ts +2 -0
- package/mobile/lib/utils/mapChildren.js +7 -0
- package/mobile/lib/utils/mapChildren.js.map +1 -0
- package/mobile/lib/utils/maxBy.d.ts +2 -2
- package/mobile/lib/utils/maxBy.js +2 -2
- package/mobile/lib/utils/maxBy.js.map +1 -1
- package/mobile/lib/utils/minBy.d.ts +1 -0
- package/mobile/lib/utils/minBy.js +3 -0
- package/mobile/lib/utils/minBy.js.map +1 -0
- package/mobile/src/common.css +0 -7
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
- package/mobile/src/components/Calculator/constants.ts +11 -0
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
- package/mobile/src/components/Carousel/Carousel.tsx +41 -23
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +25 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +36 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +1 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +13 -0
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +44 -43
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/mobile/src/components/Header/HeaderSubMenu.tsx +2 -4
- package/mobile/src/components/Header/HeaderSubMenuItem.tsx +5 -2
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +10 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
- package/mobile/src/hooks/useIntersectionObserver.ts +23 -2
- package/mobile/src/hooks/useLink.ts +2 -2
- package/mobile/src/services/sitemap/SitemapProps.ts +1 -2
- package/mobile/src/ui-kit/BlockWrapper.tsx +1 -16
- package/mobile/src/ui-kit/Button/ArrowButton.tsx +13 -0
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +3 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +97 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +31 -55
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +25 -59
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +3 -3
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +44 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollBy.ts +10 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollToEnd.ts +3 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollToStart.ts +3 -0
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +84 -0
- package/mobile/src/utils/areArraysEqual.ts +2 -0
- package/mobile/src/utils/mapChildren.ts +11 -0
- package/mobile/src/utils/maxBy.ts +3 -4
- package/mobile/src/utils/minBy.ts +5 -0
- package/package.json +2 -2
- package/src/common.css +0 -7
- package/src/components/Blocks.ts +3 -1
- package/src/components/Calculator/Calculator.fixture.tsx +0 -5
- package/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
- package/src/components/Calculator/constants.ts +11 -0
- package/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
- package/src/components/Carousel/Carousel.fixture.tsx +20 -0
- package/src/components/Carousel/Carousel.tsx +41 -23
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +25 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +38 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +36 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +1 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +13 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +2 -2
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +44 -43
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Header/Header.tsx +2 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/src/components/Header/HeaderSubMenu.tsx +2 -4
- package/src/components/Header/HeaderSubMenuItem.tsx +5 -2
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
- package/src/components/RollupItem/RollupItem.tsx +10 -1
- package/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
- package/src/hooks/useIntersectionObserver.ts +23 -2
- package/src/hooks/useLink.ts +2 -2
- package/src/services/sitemap/SitemapProps.ts +1 -2
- package/src/ui-kit/BlockWrapper.tsx +1 -16
- package/src/ui-kit/Button/ArrowButton.tsx +13 -0
- package/src/ui-kit/Foldable/FoldableSection.tsx +3 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +97 -0
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +31 -55
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +25 -59
- package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +3 -3
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +44 -0
- package/src/ui-kit/SwipeListControl/scrollBy.ts +10 -0
- package/src/ui-kit/SwipeListControl/scrollToEnd.ts +3 -0
- package/src/ui-kit/SwipeListControl/scrollToStart.ts +3 -0
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +84 -0
- package/src/utils/areArraysEqual.ts +2 -0
- package/src/utils/mapChildren.ts +11 -0
- package/src/utils/maxBy.ts +3 -4
- package/src/utils/minBy.ts +5 -0
- package/bundle/components/Carousel/CarouselContainer.d.ts +0 -10
- package/bundle/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/bundle/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/bundle/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/bundle/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/bundle/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/bundle/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/dist/components/Carousel/CarouselContainer.d.ts +0 -10
- package/dist/components/Carousel/CarouselContainer.js +0 -14
- package/dist/components/Carousel/CarouselContainer.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -8
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js +0 -11
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/dist/ui-kit/SwipeListControl/constants.js +0 -12
- package/dist/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -13
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -19
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -33
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/lib/components/Carousel/CarouselContainer.d.ts +0 -10
- package/lib/components/Carousel/CarouselContainer.js +0 -12
- package/lib/components/Carousel/CarouselContainer.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -6
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js +0 -9
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/lib/ui-kit/SwipeListControl/constants.js +0 -10
- package/lib/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -10
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -7
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -16
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -11
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -30
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/bundle/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/bundle/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/dist/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/dist/components/Carousel/CarouselContainer.js +0 -14
- package/mobile/dist/components/Carousel/CarouselContainer.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -8
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js +0 -11
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/dist/ui-kit/SwipeListControl/constants.js +0 -12
- package/mobile/dist/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -13
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -19
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -33
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/lib/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/lib/components/Carousel/CarouselContainer.js +0 -12
- package/mobile/lib/components/Carousel/CarouselContainer.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -6
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js +0 -9
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/lib/ui-kit/SwipeListControl/constants.js +0 -10
- package/mobile/lib/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -10
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -16
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -30
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/src/components/Carousel/CarouselContainer.tsx +0 -34
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlItem.tsx +0 -24
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +0 -50
- package/mobile/src/ui-kit/SwipeListControl/constants.ts +0 -10
- package/mobile/src/ui-kit/SwipeListControl/utils/getContainerStyle.ts +0 -9
- package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +0 -25
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +0 -49
- package/src/components/Carousel/CarouselContainer.tsx +0 -34
- package/src/ui-kit/SwipeListControl/SwipeListControlItem.tsx +0 -24
- package/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +0 -50
- package/src/ui-kit/SwipeListControl/constants.ts +0 -10
- package/src/ui-kit/SwipeListControl/utils/getContainerStyle.ts +0 -9
- package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +0 -25
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +0 -49
|
@@ -19,6 +19,6 @@ const TableInner = (0, uni_jsx_1.JSX)(({ columns = [], rowHeaders, isColoredFirs
|
|
|
19
19
|
const handleSlideChange = (0, hooks_1.useCallback)(() => setColumnsViewState((_) => new Array(_.length).fill(false)), []);
|
|
20
20
|
const getColumnData = (cellData) => cellData?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title }));
|
|
21
21
|
const tableColumns = columns?.map(({ data, header }, colIndex) => ((0, jsx_runtime_1.jsx)(TableColumn_1.TableColumn, { visibleRowLength: visibleRowLength, showRow: columnsViewState[colIndex], header: header, columnData: getColumnData(data), isFillGradient: colIndex === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(colIndex), ...rest }, String(colIndex))));
|
|
22
|
-
return orientation === 'horizontal' ? ((0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, {
|
|
22
|
+
return orientation === 'horizontal' ? ((0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { onVisibleIndicesChange: handleSlideChange, children: tableColumns })) : (tableColumns);
|
|
23
23
|
});
|
|
24
24
|
//# sourceMappingURL=ComparisonTable.mobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonTable.mobile.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/ComparisonTable.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AAEpE,0DAAuD;AACvD,qFAAkF;AAElF,+CAA4C;AAI/B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEnC,OAAO,CACL,qCACE,SAAS,EAAE,2EACT,SAAS,IAAI,EACf,EAAE,aAED,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,kCAAkC,EAAC,KAAK,EAAE,KAAK,GAAI,CACxF,CAAC,CAAC,CAAC,IAAI,EACR,gCAAK,IAAI,EAAC,OAAO,YACf,uBAAC,UAAU,OAAK,KAAK,GAAI,GACrB,IACE,CACX,CAAC;AACJ,CAAC,CAAC,CA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E,CAAC,CAChE,uBAAC,yBAAW,IAEV,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EACnC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,EAC/B,cAAc,EAAE,QAAQ,KAAK,CAAC,IAAI,oBAAoB,EACtD,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAC9C,IAAI,IAPH,MAAM,CAAC,QAAQ,CAAC,CAQrB,CACH,CAAC,CAAC;IAEH,OAAO,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,CACpC,uBAAC,mCAAgB,IAAC,
|
|
1
|
+
{"version":3,"file":"ComparisonTable.mobile.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/ComparisonTable.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AAEpE,0DAAuD;AACvD,qFAAkF;AAElF,+CAA4C;AAI/B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEnC,OAAO,CACL,qCACE,SAAS,EAAE,2EACT,SAAS,IAAI,EACf,EAAE,aAED,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,kCAAkC,EAAC,KAAK,EAAE,KAAK,GAAI,CACxF,CAAC,CAAC,CAAC,IAAI,EACR,gCAAK,IAAI,EAAC,OAAO,YACf,uBAAC,UAAU,OAAK,KAAK,GAAI,GACrB,IACE,CACX,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAA,aAAG,EACpB,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,EAA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IAAI,CAAC,EAC/B,cAAc,EAAE,QAAQ,KAAK,CAAC,IAAI,oBAAoB,EACtD,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAC9C,IAAI,IAPH,MAAM,CAAC,QAAQ,CAAC,CAQrB,CACH,CAAC,CAAC;IAEH,OAAO,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,CACpC,uBAAC,mCAAgB,IAAC,sBAAsB,EAAE,iBAAiB,YAAG,YAAY,GAAoB,CAC/F,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -15,7 +15,7 @@ function renderCardsLayout(orientation, cards) {
|
|
|
15
15
|
return orientation === 'horizontal' ? ((0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { children: cards?.map(renderCard) })) : ((0, jsx_runtime_1.jsx)("div", { className: "grid gap-[14px]", children: cards?.map(renderCard) }));
|
|
16
16
|
}
|
|
17
17
|
function renderCard(card, key) {
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `h-full justify-between box-border
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-main-stroke p-4
|
|
19
19
|
${BlockVersion_1.VersionStyleMap[card.version ?? 'primary']}`, children: [(0, jsx_runtime_1.jsxs)("div", { children: [renderImage(card.icon), card.title ? (0, jsx_runtime_1.jsx)("h3", { className: `text-m-title-xs font-medium m-0`, children: card.title }) : null, card.description ? renderDescription(card) : null, card.items?.length ? renderItems(card.items, card.isDotted, card.version) : null] }), card?.button?.text ? renderButton(card.button) : null] }, key));
|
|
20
20
|
}
|
|
21
21
|
const renderImage = (image) => image?.src || image?.icon ? ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mb-3.5", image: image }) })) : null;
|
|
@@ -17,10 +17,10 @@ const BORDER_COLORS = {
|
|
|
17
17
|
};
|
|
18
18
|
exports.Header = (0, uni_jsx_1.JSX)(({ bgColor = 'bg-white', className = '', showSubMenu = true, ...rest }) => {
|
|
19
19
|
const router = (0, useRouter_1.useRouter)();
|
|
20
|
-
const { topItems, logo, defaultLocation } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
20
|
+
const { topItems, logo, defaultLocation, officesLink } = (0, useSWRResource_1.useSWRResource)(ProjectSettings_1.projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
21
21
|
const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
|
|
22
22
|
const topMenu = topItems?.map((_, i) => ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Logo_1.Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenu_1.HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), (0, jsx_runtime_1.jsx)("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? ((0, jsx_runtime_1.jsx)(HeaderSubMenu_1.HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Logo_1.Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenu_1.HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), (0, jsx_runtime_1.jsx)("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? ((0, jsx_runtime_1.jsx)(HeaderSubMenu_1.HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
24
24
|
});
|
|
25
25
|
const getActiveItem = (topItems, router) => {
|
|
26
26
|
const [firstPortal] = topItems || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qDAA0D;AAI1D,2DAAwD;AACxD,4EAAyE;AAEzE,0EAAuE;AACvE,4DAAyD;AACzD,iDAA8C;AAC9C,0DAAuD;AAEvD,+DAA4D;AAC5D,mDAAgD;AAEhD,MAAM,aAAa,GAAmC;IACpD,UAAU,EAAE,iBAAiB;IAC7B,WAAW,EAAE,4BAA4B;CAC1C,CAAC;AAIW,QAAA,MAAM,GAAG,IAAA,aAAG,EACvB,CAAC,EAAE,OAAO,GAAG,UAAU,EAAE,SAAS,GAAG,EAAE,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACxE,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,IAAA,+BAAc,
|
|
1
|
+
{"version":3,"file":"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CAAC,MAAM,CAAC,CAAC,CAAC,MACzD,EAAE,KACE,IAAI,YAER,iCAAK,SAAS,EAAC,WAAW,aACxB,iCAAK,SAAS,EAAC,mBAAmB,aAChC,uBAAC,WAAI,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAI,EACtD,OAAO,EACR,uBAAC,yCAAmB,IAClB,SAAS,EAAC,SAAS,EACnB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,GAChB,IACE,EACN,gCAAK,SAAS,EAAE,gBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,GAAI,EAC3D,WAAW,IAAI,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAC7C,uBAAC,6BAAa,IAAC,QAAQ,EAAE,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CACnE,CAAC,CAAC,CAAC,IAAI,IACJ,GACO,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,QAAmC,EAAE,MAAc,EAAE,EAAE;IAC5E,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,IAAI,EAAE,CAAC;IAErC,0GAA0G;IAC1G,OAAO,QAAQ,EAAE,IAAI,CAAC,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
2
|
interface HeaderSecondaryMenuContent {
|
|
3
3
|
defaultLocation?: string;
|
|
4
|
+
officesLink?: string;
|
|
4
5
|
bgColor?: BgColorVersion;
|
|
5
6
|
}
|
|
6
7
|
export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
|
|
@@ -18,8 +18,8 @@ const LINKS_ICON_VERSION_MAP = {
|
|
|
18
18
|
'bg-white': 'black',
|
|
19
19
|
transparent: 'white',
|
|
20
20
|
};
|
|
21
|
-
exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
21
|
+
exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
22
22
|
const [city, getCity] = (0, useGeolocation_1.useGeolocation)(defaultLocation);
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(TopItem_1.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 }), (0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-7", flat: true, href:
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(TopItem_1.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 }), officesLink ? ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-7", flat: true, href: officesLink, 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 })) : null, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group 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: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
|
|
24
24
|
});
|
|
25
25
|
//# sourceMappingURL=HeaderSecondaryMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAG5D,8CAA2C;AAC3C,0DAAuD;AACvD,2EAAwE;
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAG5D,8CAA2C;AAC3C,0DAAuD;AACvD,2EAAwE;AAYxE,MAAM,UAAU,GAAmC;IACjD,UAAU,EAAE,2CAA2C;IACvD,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,gBAAgB,GAAmC;IACvD,UAAU,EAAE,i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SAAS,EAAC,2HAAuB,YAEjC,uBAAC,SAAG,IACF,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,EACzE,SAAS,EAAC,4DAA4D,EACtE,cAAc,EAAC,qDAAqD,EACpE,KAAK,SACL,GACwB,IACxB,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -13,7 +13,7 @@ exports.HeaderSubMenu = (0, uni_jsx_1.JSX)(({ subItems = [], bgColor }) => {
|
|
|
13
13
|
const [visibleItemsCount, setVisibleItemsCount] = (0, hooks_1.useState)(subItems.length);
|
|
14
14
|
const dropDownMenuItems = subItems.slice(visibleItemsCount);
|
|
15
15
|
const subItemsListRef = (0, hooks_1.useRef)(null);
|
|
16
|
-
const observerOptions =
|
|
16
|
+
const observerOptions = { rootRef: subItemsListRef };
|
|
17
17
|
const subItemsVisibilityHandlers = (0, hooks_1.useMemo)(() => subItems.map((_, index) => (isIntersecting) => {
|
|
18
18
|
setVisibleItemsCount(isIntersecting
|
|
19
19
|
? handleIntersectionActivation(index)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSubMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSubMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwE;
|
|
1
|
+
{"version":3,"file":"HeaderSubMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSubMenu.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwE;AAExE,qDAAkD;AAGlD,gFAA6E;AAC7E,iDAA8C;AAC9C,2DAAwD;AAO3C,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAClF,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,MAAM,aAAa,GAAG,IAAA,qCAAiB,EAAC,MA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uBAAC,2BAAY,IACX,SAAS,EAAC,wCAAwC,EAClD,KAAK,EAAE,iBAAiB,EACxB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACpG,MAAM,8BAA8B,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type IntersectionObserverOptions } from '../../hooks/useIntersectionObserver';
|
|
1
2
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
4
|
export interface HeaderSubMenuItemProps extends LinkProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
active?: boolean;
|
|
6
7
|
bgColor?: BgColorVersion;
|
|
7
|
-
observerOptions?:
|
|
8
|
+
observerOptions?: IntersectionObserverOptions;
|
|
8
9
|
onVisibilityChange?: (isIntersecting: boolean) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const HeaderSubMenuItem: import("@redneckz/uni-jsx").UNIComponent<HeaderSubMenuItemProps, any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSubMenuItem.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSubMenuItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"HeaderSubMenuItem.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSubMenuItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,iFAG6C;AAG7C,mEAAgE;AAUnD,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE;IAC9F,MAAM,gBAAgB,GAAG,IAAA,mBAAW,EAClC,CAAC,OAAoC,EAAE,EAAE;QACvC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE;YAC1C,OAAO;SACR;QAED,2CAA2C;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAE1C,kBAAkB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,EACD,CAAC,kBAAkB,CAAC,CACrB,CAAC;IACF,MAAM,GAAG,GAAG,IAAA,iDAAuB,EAAkB,gBAAgB,EAAE,eAAe,CAAC,CAAC;IAExF,OAAO,CACL,iCAAM,GAAG,EAAE,GAAG,YACZ,uBAAC,uBAAU,IAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAM,SAAS,YAC9E,QAAQ,GACE,GACR,CACR,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -10,7 +10,7 @@ const FoldableSection_1 = require("../../ui-kit/Foldable/FoldableSection");
|
|
|
10
10
|
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
11
11
|
exports.OtherProductsItem = (0, uni_jsx_1.JSX)(({ className, label = '', isUnfolded: unfoldedByDefault, ...rest }) => {
|
|
12
12
|
const { colorPalette } = (0, getParentBlockContent_1.getParentBlockContent)(rest.options, {});
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => ((0, jsx_runtime_1.jsx)("div", { className: "box-border", children: (0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: (0, renderChildren_1.renderChildren)(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => ((0, jsx_runtime_1.jsx)(DefaultFoldButton_1.DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => ((0, jsx_runtime_1.jsx)("div", { className: "box-border", children: (0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: (0, renderChildren_1.renderChildren)(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => ((0, jsx_runtime_1.jsx)(DefaultFoldButton_1.DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette || rest.options?.page?.colorPalette, onClick: onToggle })) }) }));
|
|
14
14
|
});
|
|
15
15
|
exports.OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
|
|
16
16
|
//# sourceMappingURL=OtherProductsItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherProductsItem.js","sourceRoot":"","sources":["../../../src/components/OtherProductsItem/OtherProductsItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qFAAkF;AAClF,uEAAoE;AAEpE,+EAA4E;AAC5E,6DAA0D;AAC1D,2EAAwE;AAOxE,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAE9C,QAAA,iBAAiB,GAAqC,IAAA,aAAG,EACpE,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EAAC,IAAI,CAAC,OAAO,EAAE,EAA0B,CAAC,CAAC;IAEzF,OAAO,CACL,gCAAK,SAAS,EAAE,sDAAsD,SAAS,EAAE,YAC/E,uBAAC,mBAAQ,IACP,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACzC,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,iCAAe,IACd,SAAS,EAAC,oCAAoC,EAC9C,UAAU,EAAE,UAAU,YAErB,IAAA,+BAAc,EAAC,IAAI,CAAC,GACL,GACd,CACP,EACD,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9C,uBAAC,qCAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,SAAS,EAAE,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAC3D,OAAO,EAAE,QAAQ,GACjB,CACH,GACD,GACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,yBAAiB,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,mCAAmC"}
|
|
@@ -9,7 +9,16 @@ const FoldableSection_1 = require("../../ui-kit/Foldable/FoldableSection");
|
|
|
9
9
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
10
10
|
const getIconWithVersion_1 = require("../../utils/getIconWithVersion");
|
|
11
11
|
exports.RollupItem = (0, uni_jsx_1.JSX)(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => ((0, jsx_runtime_1.jsx)("div", { className: `border-b border-solid border-main-divider w-full ${className}`, children: (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => ((0, jsx_runtime_1.jsx)("div", { className: "box-border", children: (0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { className: `grid grid-cols-12 gap-1 border-box`, isUnfolded: isUnfolded, children: (0, renderChildren_1.renderChildren)(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ isUnfolded, onToggle, label, version }) }) })));
|
|
12
|
-
exports.RollupItem.childrenTypes =
|
|
12
|
+
exports.RollupItem.childrenTypes = {
|
|
13
|
+
exclude: [
|
|
14
|
+
'RollupItem',
|
|
15
|
+
'Accordion',
|
|
16
|
+
'AccordionItem',
|
|
17
|
+
'OtherProducts',
|
|
18
|
+
'OtherProductsItem',
|
|
19
|
+
'VerticalLayout',
|
|
20
|
+
],
|
|
21
|
+
};
|
|
13
22
|
const renderFoldButton = ({ isUnfolded, onToggle, label, version }) => {
|
|
14
23
|
const iconsPrimary = ['PlusIcon', 'MinusIcon'];
|
|
15
24
|
const iconsSecondary = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RollupItem.js","sourceRoot":"","sources":["../../../src/components/RollupItem/RollupItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uEAAoE;AAGpE,+EAA4E;AAC5E,6DAA0D;AAE1D,2EAAwE;AAExE,8CAA2C;AAC3C,uEAAoE;AAgBvD,QAAA,UAAU,GAA8B,IAAA,aAAG,EACtD,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,YAAY,EACpB,UAAU,EACV,iBAAiB,GAAG,IAAI,EACxB,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE,CAAC,CACJ,gCAAK,SAAS,EAAE,oDAAoD,SAAS,EAAE,YAC7E,uBAAC,mBAAQ,IACP,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,UAAU,EAC7B,qBAAqB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACzC,gCAAK,SAAS,EAAC,YAA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C,SAAG,IAAC,KAAK,EAAE,IAAA,uCAAkB,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IACjF,CACV,CAAC,CAAC"}
|
|
@@ -23,13 +23,15 @@ const backgroundStyleMap = {
|
|
|
23
23
|
primary: 'bg-white',
|
|
24
24
|
secondary: 'bg-primary-main',
|
|
25
25
|
};
|
|
26
|
-
exports.VerticalLayout = (0, uni_jsx_1.JSX)(({ className = '', gap = '', align
|
|
26
|
+
exports.VerticalLayout = (0, uni_jsx_1.JSX)(({ className = '', gap = '', align, version = 'transparent', ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: [
|
|
27
27
|
'flex flex-col',
|
|
28
28
|
gapStyleMap[gap],
|
|
29
|
-
alignStyle[align],
|
|
29
|
+
align && alignStyle[align],
|
|
30
30
|
backgroundStyleMap[version],
|
|
31
31
|
className,
|
|
32
|
-
]
|
|
32
|
+
]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(' '), ...rest, children: (0, renderChildren_1.renderChildren)(rest) })));
|
|
33
35
|
exports.VerticalLayout.childrenTypes = {
|
|
34
36
|
exclude: ['VerticalLayout'],
|
|
35
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../src/components/VerticalLayout/VerticalLayout.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uEAAoE;AAIpE,4DAAyD;AAKzD,MAAM,UAAU,GAA8B;IAC5C,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,MAAM,WAAW,GAA+B;IAC9C,GAAG,EAAE,QAAQ;IACb,EAAE,EAAE,OAAO;IACX,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,kBAAkB,GAAgD;IACtE,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEW,QAAA,cAAc,GAAkC,IAAA,aAAG,EAC9D,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../src/components/VerticalLayout/VerticalLayout.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uEAAoE;AAIpE,4DAAyD;AAKzD,MAAM,UAAU,GAA8B;IAC5C,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,MAAM,WAAW,GAA+B;IAC9C,GAAG,EAAE,QAAQ;IACb,EAAE,EAAE,OAAO;IACX,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,kBAAkB,GAAgD;IACtE,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEW,QAAA,cAAc,GAAkC,IAAA,aAAG,EAC9D,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,aAAa,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACzE,uBAAC,2BAAY,IACX,SAAS,EAAE;QACT,eAAe;QACf,WAAW,CAAC,GAAG,CAAC;QAChB,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC;QAC1B,kBAAkB,CAAC,OAAO,CAAC;QAC3B,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,KACR,IAAI,YAEP,IAAA,+BAAc,EAAC,IAAI,CAAC,GACR,CAChB,CACF,CAAC;AAEF,sBAAc,CAAC,aAAa,GAAG;IAC7B,OAAO,EAAE,CAAC,gBAAgB,CAAC;CAC5B,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface IntersectionObserverOptions<E extends Element = Element> {
|
|
2
|
+
sensitivity?: number;
|
|
3
|
+
rootRef?: {
|
|
4
|
+
current: E | null;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare function useIntersectionObserver<R extends Element>(observerCallback: IntersectionObserverCallback, { sensitivity, rootRef }?: IntersectionObserverOptions): {
|
|
2
8
|
current: R | null;
|
|
3
9
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useIntersectionObserver = void 0;
|
|
3
3
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
4
|
-
|
|
4
|
+
const SENSITIVITY_SCALE = 10;
|
|
5
|
+
function useIntersectionObserver(observerCallback, { sensitivity, rootRef } = {}) {
|
|
5
6
|
const ref = (0, hooks_1.useRef)(null);
|
|
7
|
+
const observerOptions = (0, hooks_1.useMemo)(() => ({ threshold: sensitivityToThreshold(sensitivity), root: rootRef?.current }), [sensitivity, rootRef?.current]);
|
|
6
8
|
(0, hooks_1.useEffect)(() => {
|
|
7
9
|
if (!ref.current) {
|
|
8
10
|
return undefined;
|
|
@@ -16,4 +18,11 @@ function useIntersectionObserver(observerCallback, observerOptions) {
|
|
|
16
18
|
return ref;
|
|
17
19
|
}
|
|
18
20
|
exports.useIntersectionObserver = useIntersectionObserver;
|
|
21
|
+
function sensitivityToThreshold(sensitivity = 0) {
|
|
22
|
+
const thresholdsCount = Math.round(sensitivity * SENSITIVITY_SCALE);
|
|
23
|
+
return new Array(thresholdsCount)
|
|
24
|
+
.fill(0)
|
|
25
|
+
.map((_, thi) => Math.min(thi / thresholdsCount), 1)
|
|
26
|
+
.concat(1);
|
|
27
|
+
}
|
|
19
28
|
//# sourceMappingURL=useIntersectionObserver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntersectionObserver.js","sourceRoot":"","sources":["../../src/hooks/useIntersectionObserver.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"useIntersectionObserver.js","sourceRoot":"","sources":["../../src/hooks/useIntersectionObserver.ts"],"names":[],"mappings":";;AAAA,uDAAyE;AAOzE,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,SAAgB,uBAAuB,CACrC,gBAA8C,EAC9C,EAAE,WAAW,EAAE,OAAO,KAAkC,EAAE;IAE1D,MAAM,GAAG,GAAG,IAAA,cAAM,EAAW,IAAI,CAAC,CAAC;IAEnC,MAAM,eAAe,GAAG,IAAA,eAAO,EAC7B,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,sBAAsB,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAClF,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAChC,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;QACzF,oBAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE1C,OAAO,GAAG,EAAE;YACV,oBAAoB,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC;IAExC,OAAO,GAAG,CAAC;AACb,CAAC;AAzBD,0DAyBC;AAED,SAAS,sBAAsB,CAAC,WAAW,GAAG,CAAC;IAC7C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC,CAAC;IAEpE,OAAO,IAAI,KAAK,CAAC,eAAe,CAAC;SAC9B,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,eAAe,CAAC,EAAE,CAAC,CAAC;SACnD,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC"}
|
package/dist/hooks/useLink.js
CHANGED
|
@@ -16,7 +16,7 @@ function useLink() {
|
|
|
16
16
|
props.onClick && props.onClick(ev);
|
|
17
17
|
const isLocalHref = href && !(0, url_1.isURL)(href);
|
|
18
18
|
const isLocalTarget = !props.target || props.target === '_self';
|
|
19
|
-
if (isLocalHref && isLocalTarget) {
|
|
19
|
+
if (isLocalHref && isLocalTarget && !(0, url_1.isHash)(href)) {
|
|
20
20
|
ev?.preventDefault();
|
|
21
21
|
router.push(href);
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,oDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,oDAAiD;AACjD,sCAA6C;AAC7C,yDAAsD;AACtD,2CAAwC;AAMxC,SAAgB,OAAO;IAGrB,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,IAAI,GAAG,IAAA,uBAAU,EAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE5C,OAAO;YACL,GAAG,KAAK;YACR,IAAI;YACJ,YAAY,EAAE,KAAK,CAAC,IAAI;YACxB,OAAO,EAAE,IAAA,mCAAgB,EAAC,CAAC,EAAmC,EAAE,EAAE;gBAChE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;gBACnC,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC;gBACzC,MAAM,aAAa,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC;gBAChE,IAAI,WAAW,IAAI,aAAa,IAAI,CAAC,IAAA,YAAM,EAAC,IAAI,CAAC,EAAE;oBACjD,EAAE,EAAE,cAAc,EAAE,CAAC;oBACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACnB;YACH,CAAC,EAAE,KAAK,CAAC;SACV,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAvBD,0BAuBC"}
|
|
@@ -17,13 +17,12 @@ export interface DispositionItem extends LinkProps {
|
|
|
17
17
|
icon?: Picture;
|
|
18
18
|
}
|
|
19
19
|
export interface SitemapDataProps {
|
|
20
|
-
/** @title Основное меню */
|
|
21
20
|
topItems?: TopMenuItem[];
|
|
22
|
-
/** @title Дополнительное меню */
|
|
23
21
|
dispositions?: DispositionItem[];
|
|
24
22
|
logo?: {
|
|
25
23
|
image?: Picture;
|
|
26
24
|
title?: string;
|
|
27
25
|
};
|
|
28
26
|
defaultLocation?: string;
|
|
27
|
+
officesLink?: string;
|
|
29
28
|
}
|
|
@@ -6,19 +6,13 @@ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
|
6
6
|
const EventBus_1 = require("../EventBus/EventBus");
|
|
7
7
|
const useIntersectionObserver_1 = require("../hooks/useIntersectionObserver");
|
|
8
8
|
const changeHashOnObserve_1 = require("../utils/changeHashOnObserve");
|
|
9
|
-
const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
|
|
10
|
-
const THRESHOLD_ARRAY_LENGTH = 18;
|
|
11
|
-
const THRESHOLD_ARRAY_START_VALUE = (THRESHOLD_ACCURACY - THRESHOLD_ARRAY_LENGTH) / THRESHOLD_ACCURACY;
|
|
12
|
-
const OBSERVER_OPTIONS = {
|
|
13
|
-
threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
|
|
14
|
-
};
|
|
15
9
|
exports.BlockWrapper = (0, uni_jsx_1.JSX)(({ className, block, tag = 'section', role, children }) => {
|
|
16
10
|
const Tag = tag;
|
|
17
11
|
const { anchor, labels } = block || {};
|
|
18
12
|
const [isVisible, setVisible] = (0, hooks_1.useState)(true);
|
|
19
13
|
const anchorClickRef = (0, hooks_1.useRef)({});
|
|
20
14
|
const observerCallback = (0, hooks_1.useMemo)(() => (0, changeHashOnObserve_1.changeHashOnObserve)({ anchor, anchorClickRef }), [anchor]);
|
|
21
|
-
const ref = (0, useIntersectionObserver_1.useIntersectionObserver)(observerCallback,
|
|
15
|
+
const ref = (0, useIntersectionObserver_1.useIntersectionObserver)(observerCallback, { sensitivity: 1 });
|
|
22
16
|
(0, hooks_1.useEffect)(() => EventBus_1.EventBus.inst.subscribe('anchorClick', (e) => {
|
|
23
17
|
setVisible(true);
|
|
24
18
|
anchorClickRef.current = e;
|
|
@@ -35,10 +29,6 @@ exports.BlockWrapper = (0, uni_jsx_1.JSX)(({ className, block, tag = 'section',
|
|
|
35
29
|
}), []);
|
|
36
30
|
return isVisible ? ((0, jsx_runtime_1.jsx)(Tag, { className: className, role: role, ...(anchor ? { id: anchor, ref } : {}), children: children })) : null;
|
|
37
31
|
});
|
|
38
|
-
function getIntersectionThreshold(_, i) {
|
|
39
|
-
const value = (i + 1) / THRESHOLD_ACCURACY + THRESHOLD_ARRAY_START_VALUE;
|
|
40
|
-
return Math.round(value * THRESHOLD_ACCURACY) / THRESHOLD_ACCURACY;
|
|
41
|
-
}
|
|
42
32
|
function changeHash(label) {
|
|
43
33
|
if (label) {
|
|
44
34
|
globalThis.document.location.hash = label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAmF;AAEnF,mDAAgD;AAChD,8EAA2E;AAE3E,sEAAmE;
|
|
1
|
+
{"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAmF;AAEnF,mDAAgD;AAChD,8EAA2E;AAE3E,sEAAmE;AAOtD,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxD,MAAM,GAAG,GAAQ,GAAG,CAAC;IAErB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE,CAAC;IAEvC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,IAAA,cAAM,EAA4B,EAAE,CAAC,CAAC;IAE7D,MAAM,gBAAgB,GAAG,IAAA,eAAO,EAC9B,GAAG,EAAE,CAAC,IAAA,yCAAmB,EAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,EACrD,CAAC,MAAM,CAAC,CACT,CAAC;IACF,MAAM,GAAG,GAAG,IAAA,iDAAuB,EAAC,gBAAgB,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC;IAE1E,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE;QAC3C,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC;IAC7B,CAAC,CAAC,EACJ,EAAE,CACH,CAAC;IACF,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,mBAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACvC,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;YAC1B,MAAM,WAAW,GAAG,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,CAAC;YACpD,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACzF;aAAM;YACL,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACxB,UAAU,CAAC,IAAI,CAAC,CAAC;SAClB;IACH,CAAC,CAAC,EACJ,EAAE,CACH,CAAC;IAEF,OAAO,SAAS,CAAC,CAAC,CAAC,CACjB,uBAAC,GAAG,IAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,KAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YAC3E,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC;AAEF,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,EAAE;QACT,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;KAC3C;AACH,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { ButtonProps } from './ButtonProps';
|
|
2
2
|
export declare const ArrowButton: import("@redneckz/uni-jsx").UNIComponent<ButtonProps, any, any>;
|
|
3
|
+
export declare const ScrollLeftButton: import("@redneckz/uni-jsx").UNIComponent<ButtonProps, any, any>;
|
|
4
|
+
export declare const ScrollRightButton: import("@redneckz/uni-jsx").UNIComponent<ButtonProps, any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ArrowButton = void 0;
|
|
2
|
+
exports.ScrollRightButton = exports.ScrollLeftButton = exports.ArrowButton = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Img_1 = require("../Img/Img");
|
|
@@ -7,4 +7,6 @@ const Button_1 = require("./Button");
|
|
|
7
7
|
exports.ArrowButton = (0, uni_jsx_1.JSX)(({ className, disabled, ...rest }) => ((0, jsx_runtime_1.jsx)(Button_1.Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
8
8
|
? 'bg-secondary-light text-secondary-text'
|
|
9
9
|
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "16", height: "16", asSVG: true }) })));
|
|
10
|
+
exports.ScrollLeftButton = (0, uni_jsx_1.JSX)((props) => ((0, jsx_runtime_1.jsx)(exports.ArrowButton, { ...props, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })));
|
|
11
|
+
exports.ScrollRightButton = (0, uni_jsx_1.JSX)((props) => ((0, jsx_runtime_1.jsx)(exports.ArrowButton, { ...props, className: `${props.className || ''} rotate-180`, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })));
|
|
10
12
|
//# sourceMappingURL=ArrowButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/ArrowButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,oCAAiC;AACjC,qCAAkC;AAGrB,QAAA,WAAW,GAAG,IAAA,aAAG,EAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAChF,uBAAC,eAAM,IACL,OAAO,QACP,SAAS,EAAE,2GACT,QAAQ;QACN,CAAC,CAAC,wCAAwC;QAC1C,CAAC,CAAC,oDACN,IAAI,SAAS,IAAI,EAAE,EAAE,EACrB,QAAQ,EAAE,QAAQ,KACd,IAAI,YAER,uBAAC,SAAG,IACF,SAAS,EAAC,iDAAiD,EAC3D,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,EACtD,cAAc,EAAC,+BAA+B,EAC9C,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,SACL,GACK,CACV,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ArrowButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/ArrowButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,oCAAiC;AACjC,qCAAkC;AAGrB,QAAA,WAAW,GAAG,IAAA,aAAG,EAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAChF,uBAAC,eAAM,IACL,OAAO,QACP,SAAS,EAAE,2GACT,QAAQ;QACN,CAAC,CAAC,wCAAwC;QAC1C,CAAC,CAAC,oDACN,IAAI,SAAS,IAAI,EAAE,EAAE,EACrB,QAAQ,EAAE,QAAQ,KACd,IAAI,YAER,uBAAC,SAAG,IACF,SAAS,EAAC,iDAAiD,EAC3D,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,EACtD,cAAc,EAAC,+BAA+B,EAC9C,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,SACL,GACK,CACV,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAc,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1D,uBAAC,mBAAW,OAAK,KAAK,EAAE,SAAS,EAAC,6FAAkB,wBAAoB,aAAa,GAAG,CACzF,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAAc,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,uBAAC,mBAAW,OACN,KAAK,EACT,SAAS,EAAE,GAAG,KAAK,CAAC,SAAS,IAAI,EAAE,aAAa,EAChD,SAAS,EAAC,mGAAmB,wBACV,cAAc,GACjC,CACH,CAAC,CAAC"}
|
|
@@ -12,6 +12,6 @@ exports.FoldableSection = (0, uni_jsx_1.JSX)(({ className = '', isUnfolded, chil
|
|
|
12
12
|
: '';
|
|
13
13
|
}
|
|
14
14
|
}, [isUnfolded, children?.length]);
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden max-h-0 ${className}`, children: children }));
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
16
16
|
});
|
|
17
17
|
//# sourceMappingURL=FoldableSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FoldableSection.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/FoldableSection.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAgE;AAOnD,QAAA,eAAe,GAAG,IAAA,aAAG,EAChC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,UAAU,EAAE,QAAQ,E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d,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SwipeContainerProps } from './SwipeListControlProps';
|
|
2
|
+
declare type ItemsVisibilityList = Array<IntersectionObserverEntry | undefined>;
|
|
3
|
+
declare type SwipeListItemWidthAuto = 0;
|
|
4
|
+
/**
|
|
5
|
+
* @title Список
|
|
6
|
+
*/
|
|
7
|
+
interface SwipeListContainerProps extends SwipeContainerProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
containerRef?: {
|
|
10
|
+
current: HTMLDivElement | null;
|
|
11
|
+
};
|
|
12
|
+
activeIndex?: number;
|
|
13
|
+
visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3;
|
|
14
|
+
snapAlign?: 'snap-start' | 'snap-center' | 'snap-end';
|
|
15
|
+
onVisibleItemsChange?: (itemsVisibilityList: ItemsVisibilityList) => void;
|
|
16
|
+
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const SwipeListContainer: import("@redneckz/uni-jsx").UNIComponent<SwipeListContainerProps, any, any>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.SwipeListContainer = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const mapChildren_1 = require("../../utils/mapChildren");
|
|
7
|
+
const SwipeListItem_1 = require("./SwipeListItem");
|
|
8
|
+
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]'];
|
|
9
|
+
exports.SwipeListContainer = (0, uni_jsx_1.JSX)(({ className = '', containerRef, activeIndex, visibleItemCount, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
10
|
+
const observerOptions = {
|
|
11
|
+
sensitivity: 1,
|
|
12
|
+
rootRef: containerRef,
|
|
13
|
+
};
|
|
14
|
+
const itemsVisibilityListRef = (0, hooks_1.useRef)([]);
|
|
15
|
+
const handleIntersection = (0, hooks_1.useCallback)((idx, entry) => {
|
|
16
|
+
const itemsVisibilityList = [...(itemsVisibilityListRef.current || [])];
|
|
17
|
+
itemsVisibilityList[idx] = entry;
|
|
18
|
+
itemsVisibilityListRef.current = itemsVisibilityList;
|
|
19
|
+
onVisibleItemsChange && onVisibleItemsChange(itemsVisibilityList);
|
|
20
|
+
onVisibleIndicesChange && onVisibleIndicesChange(getVisibleIndices(itemsVisibilityList));
|
|
21
|
+
}, [onVisibleItemsChange, onVisibleIndicesChange]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `box-border overflow-auto flex horizontal-list no-scrollbar ${className}`, style: { ...getContainerStyle(padding), gap: `${gap}px` }, role: "list", ref: containerRef, children: (0, mapChildren_1.mapChildren)((child, idx) => ((0, jsx_runtime_1.jsx)(SwipeListItem_1.SwipeListItem, { className: `${snapAlign} ${visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''}`, style: getContainerStyle(padding / 4), activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
23
|
+
});
|
|
24
|
+
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
25
|
+
const getContainerStyle = (padding) => ({
|
|
26
|
+
marginLeft: `${-padding}px`,
|
|
27
|
+
marginRight: `${-padding}px`,
|
|
28
|
+
paddingLeft: `${padding}px`,
|
|
29
|
+
paddingRight: `${padding}px`,
|
|
30
|
+
});
|
|
31
|
+
const getVisibleIndices = (itemsVisibilityList) => itemsVisibilityList
|
|
32
|
+
.map((_, i) => [_, i])
|
|
33
|
+
.filter(([_]) => _ && _.intersectionRatio >= 0.9)
|
|
34
|
+
.map(([, i]) => i);
|
|
35
|
+
//# sourceMappingURL=SwipeListContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwipeListContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListContainer.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAkE;AAElE,yDAAsD;AAEtD,mDAAgD;AAmBhD,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;AAE3D,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,GAAG,GAAG,CAAC,EACP,OAAO,GAAG,CAAC,EACX,SAAS,GAAG,aAAa,EACzB,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,GACvB,EAAE,EAAE;IACH,MAAM,eAAe,GAAgC;QACnD,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,YAAY;KACtB,CAAC;IAEF,MAAM,sBAAsB,GAAG,IAAA,cAAM,EAAsB,EAAE,CAAC,CAAC;IAC/D,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EACpC,CAAC,GAAW,EAAE,KAAgC,EAAE,EAAE;QAChD,MAAM,mBAAmB,GAAG,CAAC,GAAG,CAAC,sBAAsB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;QACxE,mBAAmB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACjC,sBAAsB,CAAC,OAAO,GAAG,mBAAmB,CAAC;QAErD,oBAAoB,IAAI,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;QAClE,sBAAsB,IAAI,sBAAsB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC3F,CAAC,EACD,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAC/C,CAAC;IAEF,OAAO,CACL,gCACE,SAAS,EAAE,8DAA8D,SAAS,EAAE,EACpF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AC,CAAC,CAAC,CAAC"}
|
|
@@ -2,44 +2,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.SwipeListControl = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const
|
|
6
|
-
const constants_1 = require("./constants");
|
|
5
|
+
const SwipeListContainer_1 = require("./SwipeListContainer");
|
|
7
6
|
const SwipeListControlDots_1 = require("./SwipeListControlDots");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
// horizontal PADDING / 2 to compensate padding-margin combo of child container
|
|
26
|
-
// without CSS calc function, as wrapper element gets bigger in the DOM, remaining same visually
|
|
27
|
-
const itemWidth = childrenCollection[0].offsetWidth - padding / 2;
|
|
28
|
-
const scrollPoints = (0, getScrollPoints_1.getScrollPoints)({
|
|
29
|
-
gap,
|
|
30
|
-
padding,
|
|
31
|
-
clientWidth,
|
|
32
|
-
scrollWidth,
|
|
33
|
-
childElementCount,
|
|
34
|
-
itemWidth,
|
|
35
|
-
});
|
|
36
|
-
const { index, fraction } = (0, getIndexParts_1.getIndexParts)(scrollLeft, scrollPoints);
|
|
37
|
-
if (index !== activeIndex && onSlideChange) {
|
|
38
|
-
onSlideChange();
|
|
39
|
-
}
|
|
40
|
-
setActiveIndex(index);
|
|
41
|
-
setIndexFraction(fraction);
|
|
42
|
-
}, [gap, padding, activeIndex, onSlideChange]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: className, children: [(0, jsx_runtime_1.jsx)(SwipeListControlList_1.SwipeListControlList, { gap: gap, padding: padding, activeIndex: activeIndex, onScroll: handleScroll, children: children }), (0, jsx_runtime_1.jsx)(SwipeListControlDots_1.SwipeListControlDots, { ...dotsProps })] }));
|
|
7
|
+
const useSwipeListScroll_1 = require("./useSwipeListScroll");
|
|
8
|
+
const DEFAULT_GAP = 14;
|
|
9
|
+
/*
|
|
10
|
+
Horizontal padding used on a container above SwipeListControl.
|
|
11
|
+
Same value used on a SwipeListControlChildren container to compensate it
|
|
12
|
+
and get rid of a clipping effect caused by overflow: hidden.
|
|
13
|
+
*/
|
|
14
|
+
const DEFAULT_PADDING = 16;
|
|
15
|
+
exports.SwipeListControl = (0, uni_jsx_1.JSX)(({ className, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, children, onVisibleIndicesChange, }) => {
|
|
16
|
+
const itemCount = Array.isArray(children) ? children.length : 0;
|
|
17
|
+
const [containerRef, scroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
18
|
+
itemCount,
|
|
19
|
+
onVisibleIndicesChange,
|
|
20
|
+
});
|
|
21
|
+
const [activeIndex] = scroll.visibleIndicesRange;
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: className, children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), showDots ? ((0, jsx_runtime_1.jsx)(SwipeListControlDots_1.SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount })) : null] }));
|
|
44
23
|
});
|
|
45
24
|
//# sourceMappingURL=SwipeListControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/Swipe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
containerRef?: {
|
|
3
|
+
current: HTMLDivElement | null;
|
|
4
|
+
};
|
|
5
|
+
activeIndex?: number;
|
|
6
|
+
dotCount?: number;
|
|
5
7
|
}
|
|
6
8
|
export declare const SwipeListControlDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlDotsProps, any, any>;
|
|
9
|
+
export {};
|