@redneckz/wildless-cms-uni-blocks 0.3.74 → 0.3.75
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 +262 -194
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/DaDataAPI.js.map +1 -1
- package/dist/api/LikeAPI.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +1 -1
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.js +1 -2
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +1 -2
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +5 -3
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/renderRate.js.map +1 -1
- package/dist/components/Catalog/Catalog.d.ts +5 -0
- package/dist/components/Catalog/Catalog.js +36 -0
- package/dist/components/Catalog/Catalog.js.map +1 -0
- package/dist/components/Catalog/CatalogCard.d.ts +7 -0
- package/dist/components/Catalog/CatalogCard.js +16 -0
- package/dist/components/Catalog/CatalogCard.js.map +1 -0
- package/dist/components/Catalog/CatalogContent.d.ts +22 -0
- package/{mobile/dist/model/Insurance.js → dist/components/Catalog/CatalogContent.js} +1 -1
- package/dist/components/Catalog/CatalogContent.js.map +1 -0
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Footer/TextInformation.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/dist/components/Header/HeaderBurger.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +5 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +16 -2
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js +2 -2
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/dist/components/OtherProducts/OtherProducts.js +1 -1
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/dist/components/OtherProducts/OtherProductsItem.js +4 -6
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +10 -6
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +12 -31
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +21 -0
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/content-page-repository/mapJSON.js.map +1 -1
- package/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/dist/hooks/useExchangeRates.js.map +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/dist/ui-kit/Foldable/Foldable.js +5 -5
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustHref.js.map +1 -1
- package/dist/utils/getColSpan.js.map +1 -1
- package/dist/utils/roundTo.js.map +1 -1
- package/dist/utils/tableFunc.js.map +1 -1
- package/dist/utils/url.js.map +1 -1
- package/lib/api/DaDataAPI.js.map +1 -1
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +1 -1
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.js +1 -2
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +1 -2
- package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +5 -3
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/renderRate.js.map +1 -1
- package/lib/components/Catalog/Catalog.d.ts +5 -0
- package/lib/components/Catalog/Catalog.fixture.d.ts +6 -0
- package/lib/components/Catalog/Catalog.js +34 -0
- package/lib/components/Catalog/Catalog.js.map +1 -0
- package/lib/components/Catalog/CatalogCard.d.ts +7 -0
- package/lib/components/Catalog/CatalogCard.js +14 -0
- package/lib/components/Catalog/CatalogCard.js.map +1 -0
- package/lib/components/Catalog/CatalogContent.d.ts +22 -0
- package/lib/components/Catalog/CatalogContent.js +2 -0
- package/lib/components/Catalog/CatalogContent.js.map +1 -0
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Footer/TextInformation.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/lib/components/Header/HeaderBurger.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +5 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.fixture.d.ts +2 -0
- package/lib/components/MobileAppTile/MobileAppTile.js +16 -2
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js +2 -2
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +0 -1
- package/lib/components/OtherProducts/OtherProducts.js +1 -1
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/lib/components/OtherProducts/OtherProductsItem.js +4 -6
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +10 -6
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +12 -31
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +18 -0
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/content-page-repository/mapJSON.js.map +1 -1
- package/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/lib/hooks/useExchangeRates.js.map +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/lib/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/lib/ui-kit/Foldable/Foldable.js +5 -5
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustHref.js.map +1 -1
- package/lib/utils/getColSpan.js.map +1 -1
- package/lib/utils/roundTo.js.map +1 -1
- package/lib/utils/tableFunc.js.map +1 -1
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +34 -37
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/api/DaDataAPI.js.map +1 -1
- package/mobile/dist/api/LikeAPI.js.map +1 -1
- package/mobile/dist/components/Accordion/Accordion.js +1 -1
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.js +1 -2
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.d.ts +5 -0
- package/mobile/dist/components/Catalog/Catalog.js +36 -0
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -0
- package/mobile/dist/components/Catalog/CatalogCard.d.ts +7 -0
- package/mobile/dist/components/Catalog/CatalogCard.js +16 -0
- package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -0
- package/mobile/dist/components/Catalog/CatalogContent.d.ts +22 -0
- package/{dist/model/Insurance.js → mobile/dist/components/Catalog/CatalogContent.js} +1 -1
- package/mobile/dist/components/Catalog/CatalogContent.js.map +1 -0
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +5 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +4 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +12 -31
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +21 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/dist/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js +5 -5
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/dist/utils/getColSpan.js.map +1 -1
- package/mobile/dist/utils/roundTo.js.map +1 -1
- package/mobile/dist/utils/tableFunc.js.map +1 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/api/DaDataAPI.js.map +1 -1
- package/mobile/lib/api/LikeAPI.js.map +1 -1
- package/mobile/lib/components/Accordion/Accordion.js +1 -1
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.js +1 -2
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.d.ts +5 -0
- package/mobile/lib/components/Catalog/Catalog.js +34 -0
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -0
- package/mobile/lib/components/Catalog/CatalogCard.d.ts +7 -0
- package/mobile/lib/components/Catalog/CatalogCard.js +14 -0
- package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -0
- package/mobile/lib/components/Catalog/CatalogContent.d.ts +22 -0
- package/mobile/lib/components/Catalog/CatalogContent.js +2 -0
- package/mobile/lib/components/Catalog/CatalogContent.js.map +1 -0
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +5 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +4 -6
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +12 -31
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +18 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/lib/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js +5 -5
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/lib/utils/getColSpan.js.map +1 -1
- package/mobile/lib/utils/roundTo.js.map +1 -1
- package/mobile/lib/utils/tableFunc.js.map +1 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/api/DaDataAPI.ts +2 -0
- package/mobile/src/api/LikeAPI.ts +4 -0
- package/mobile/src/components/Accordion/Accordion.tsx +1 -1
- package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +3 -4
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -0
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +1 -0
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +1 -0
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +1 -0
- package/mobile/src/components/Calculator/renderRate.tsx +1 -0
- package/mobile/src/components/Catalog/Catalog.example.json +57 -0
- package/mobile/src/components/Catalog/Catalog.tsx +73 -0
- package/mobile/src/components/Catalog/CatalogCard.tsx +47 -0
- package/mobile/src/components/Catalog/CatalogContent.ts +26 -0
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +1 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -0
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -0
- package/mobile/src/components/ContentPage/normalizeBlock.ts +1 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/mobile/src/components/ExchangeRateTile/calculateResult.ts +1 -0
- package/mobile/src/components/Footer/Footer.tsx +2 -0
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -0
- package/mobile/src/components/Footer/TextInformation.tsx +1 -0
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +1 -0
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +1 -0
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +1 -0
- package/mobile/src/components/Header/HeaderBurger.tsx +2 -0
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +1 -0
- package/mobile/src/components/Headline/Headline.tsx +1 -0
- package/mobile/src/components/Insurance/Insurance.tsx +1 -0
- package/mobile/src/components/Insurance/InsuranceContent.ts +5 -2
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +4 -4
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +5 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -0
- package/mobile/src/components/LinkList/LinkList.tsx +1 -0
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +2 -4
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +7 -1
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +2 -2
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +3 -8
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +6 -18
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +1 -0
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +1 -0
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -0
- package/mobile/src/components/PromoTile/PromoTile.tsx +1 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +58 -82
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +6 -3
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +28 -0
- package/mobile/src/components/TextBlock/TextBlock.tsx +1 -0
- package/mobile/src/content-page-repository/ContentPageRepository.ts +5 -0
- package/mobile/src/content-page-repository/mapJSON.ts +3 -0
- package/mobile/src/content-page-repository/transformContentPage.ts +2 -0
- package/mobile/src/content-page-repository/transformMarkdown.ts +1 -0
- package/mobile/src/content-page-repository/transformPicture.ts +2 -0
- package/mobile/src/hooks/useCreditCalculatorData.ts +2 -0
- package/mobile/src/hooks/useExchangeRates.ts +3 -0
- package/mobile/src/hooks/useLink.ts +1 -0
- package/mobile/src/react/setup-fixture.ts +1 -0
- package/mobile/src/services/sitemap/findActiveSubItem.ts +1 -0
- package/mobile/src/services/sitemap/useSitemap.ts +2 -0
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +25 -15
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +14 -9
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -0
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +1 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +8 -4
- package/mobile/src/ui-kit/Input/Input.tsx +1 -0
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -0
- package/mobile/src/ui-kit/List/ListItem.tsx +1 -0
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -0
- package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +1 -0
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +1 -0
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -0
- package/mobile/src/utils/adjustHref.ts +2 -0
- package/mobile/src/utils/getColSpan.ts +1 -0
- package/mobile/src/utils/roundTo.ts +1 -0
- package/mobile/src/utils/tableFunc.ts +1 -0
- package/mobile/src/utils/url.ts +2 -0
- package/package.json +1 -1
- package/src/api/DaDataAPI.ts +2 -0
- package/src/api/LikeAPI.ts +4 -0
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +8 -19
- package/src/components/Accordion/Accordion.fixture.tsx +10 -2
- package/src/components/Accordion/Accordion.mobile.tsx +1 -1
- package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +3 -4
- package/src/components/Accordion/AccordionItemInner.tsx +3 -4
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -0
- package/src/components/Blocks.ts +5 -3
- package/src/components/Calculator/getMonthlyPayment.ts +1 -0
- package/src/components/Calculator/renderCalculatorBlock.tsx +1 -0
- package/src/components/Calculator/renderMonthsInput.tsx +1 -0
- package/src/components/Calculator/renderRate.tsx +1 -0
- package/src/components/Catalog/Catalog.example.json +57 -0
- package/src/components/Catalog/Catalog.fixture.tsx +48 -0
- package/src/components/Catalog/Catalog.tsx +73 -0
- package/src/components/Catalog/CatalogCard.tsx +47 -0
- package/src/components/Catalog/CatalogContent.ts +26 -0
- package/src/components/ComparisonTable/TableColumn.tsx +1 -0
- package/src/components/ContentPage/ContentPage.tsx +2 -0
- package/src/components/ContentPage/ContentPageHead.tsx +1 -0
- package/src/components/ContentPage/normalizeBlock.mobile.ts +1 -0
- package/src/components/ContentPage/normalizeBlock.ts +1 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/src/components/ExchangeRateTile/calculateResult.ts +1 -0
- package/src/components/Footer/Footer.mobile.tsx +2 -0
- package/src/components/Footer/SocialMedia.mobile.tsx +1 -0
- package/src/components/Footer/SocialMedia.tsx +1 -0
- package/src/components/Footer/TextInformation.mobile.tsx +1 -0
- package/src/components/Footer/TextInformation.tsx +1 -0
- package/src/components/Gallery/GalleryCardInner.tsx +1 -0
- package/src/components/GroupBlock/GroupBlocksItem.tsx +1 -0
- package/src/components/GroupBlock/renderBlocksTypes.tsx +1 -0
- package/src/components/Header/HeaderBurger.tsx +2 -0
- package/src/components/Header/HeaderSecondaryMenu.tsx +1 -0
- package/src/components/Headline/Headline.mobile.tsx +1 -0
- package/src/components/Insurance/Insurance.tsx +1 -0
- package/src/components/Insurance/InsuranceContent.ts +5 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +4 -4
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +0 -5
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +5 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -0
- package/src/components/LinkList/LinkList.tsx +1 -0
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +69 -13
- package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +2 -4
- package/src/components/MobileAppTile/MobileAppTile.tsx +44 -12
- package/src/components/MobileAppTile/MobileAppTileContent.ts +7 -1
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +16 -53
- package/src/components/OtherProducts/OtherProducts.tsx +2 -2
- package/src/components/OtherProducts/OtherProductsContent.ts +3 -8
- package/src/components/OtherProducts/OtherProductsItem.tsx +6 -18
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
- package/src/components/ProductBlock/ProductBlock.tsx +1 -0
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -0
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +1 -0
- package/src/components/ProductBlock/renderBenefit.tsx +1 -0
- package/src/components/ProductTile/ProductTile.tsx +2 -0
- package/src/components/PromoTile/PromoTile.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +58 -82
- package/src/components/StepsBlock/StepsBlock.tsx +27 -11
- package/src/components/StepsBlock/StepsBlockContent.ts +6 -3
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +28 -0
- package/src/components/TextBlock/TextBlock.mobile.tsx +1 -0
- package/src/components/TextBlock/TextBlock.tsx +1 -0
- package/src/content-page-repository/ContentPageRepository.ts +5 -0
- package/src/content-page-repository/mapJSON.ts +3 -0
- package/src/content-page-repository/transformContentPage.ts +2 -0
- package/src/content-page-repository/transformMarkdown.ts +1 -0
- package/src/content-page-repository/transformPicture.ts +2 -0
- package/src/hooks/useCreditCalculatorData.ts +2 -0
- package/src/hooks/useExchangeRates.ts +3 -0
- package/src/hooks/useLink.ts +1 -0
- package/src/react/setup-fixture.ts +1 -0
- package/src/services/sitemap/findActiveSubItem.ts +1 -0
- package/src/services/sitemap/useSitemap.ts +2 -0
- package/src/ui-kit/BlocksList/BlocksListProps.ts +25 -15
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +14 -9
- package/src/ui-kit/Button/ButtonInner.tsx +1 -0
- package/src/ui-kit/Button/ButtonSection.tsx +1 -0
- package/src/ui-kit/Foldable/Foldable.tsx +8 -4
- package/src/ui-kit/Input/Input.tsx +1 -0
- package/src/ui-kit/InputRange/InputRange.tsx +1 -0
- package/src/ui-kit/List/ListItem.tsx +1 -0
- package/src/ui-kit/Logo/Logo.tsx +1 -0
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -0
- package/src/ui-kit/SearchBar/SearchBar.tsx +1 -0
- package/src/ui-kit/SearchBar.mobile.tsx +1 -0
- package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +1 -0
- package/src/ui-kit/Tabs/Tabs.tsx +1 -0
- package/src/ui-kit/TopItem/TopItem.tsx +1 -0
- package/src/utils/adjustHref.ts +2 -0
- package/src/utils/getColSpan.ts +1 -0
- package/src/utils/roundTo.ts +1 -0
- package/src/utils/tableFunc.ts +1 -0
- package/src/utils/url.ts +2 -0
- package/dist/model/Insurance.d.ts +0 -6
- package/dist/model/Insurance.js.map +0 -1
- package/lib/model/Insurance.d.ts +0 -6
- package/lib/model/Insurance.js +0 -2
- package/lib/model/Insurance.js.map +0 -1
- package/mobile/dist/model/Insurance.d.ts +0 -6
- package/mobile/dist/model/Insurance.js.map +0 -1
- package/mobile/lib/model/Insurance.d.ts +0 -6
- package/mobile/lib/model/Insurance.js +0 -2
- package/mobile/lib/model/Insurance.js.map +0 -1
- package/mobile/src/model/Insurance.ts +0 -6
- package/src/model/Insurance.ts +0 -6
|
@@ -46,5 +46,6 @@ export const getListStyle = (version: ListItemVersion) => {
|
|
|
46
46
|
tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
47
47
|
'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
48
48
|
};
|
|
49
|
+
|
|
49
50
|
return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
|
|
50
51
|
};
|
|
@@ -4,6 +4,7 @@ import { Img } from '../Img/Img';
|
|
|
4
4
|
|
|
5
5
|
export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
6
6
|
const { term, setTerm } = context.useSearch();
|
|
7
|
+
|
|
7
8
|
return (
|
|
8
9
|
<form className={`relative ${className || ''}`}>
|
|
9
10
|
<div className="absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none">
|
|
@@ -60,5 +60,6 @@ const getTextClasses = (bgColor: BgColorVersion, active = false, flat = false) =
|
|
|
60
60
|
const nonActiveAtoms = `${
|
|
61
61
|
flat ? 'text-primary-text' : 'text-secondary-text'
|
|
62
62
|
} hover:text-primary-main`;
|
|
63
|
+
|
|
63
64
|
return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES}`;
|
|
64
65
|
};
|
|
@@ -11,6 +11,7 @@ export const adjustHref = (
|
|
|
11
11
|
|
|
12
12
|
const relativeHref = toRelativeHref(href, router) || '';
|
|
13
13
|
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
14
|
+
|
|
14
15
|
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -20,5 +21,6 @@ const toRelativeHref = (href: string | undefined, router: { href?: string }) =>
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const origin = getOrigin(router?.href);
|
|
24
|
+
|
|
23
25
|
return origin ? href.replace(origin, '') || '/' : href;
|
|
24
26
|
};
|
package/mobile/src/utils/url.ts
CHANGED
|
@@ -11,6 +11,7 @@ export const getOrigin = (href?: string) => {
|
|
|
11
11
|
const protoSeparator = '//';
|
|
12
12
|
const endOfProto = url.indexOf(protoSeparator);
|
|
13
13
|
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
14
|
+
|
|
14
15
|
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -20,5 +21,6 @@ export const getHash = (href?: string) => {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const hashIndex = href.indexOf('#');
|
|
24
|
+
|
|
23
25
|
return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
|
|
24
26
|
};
|
package/package.json
CHANGED
package/src/api/DaDataAPI.ts
CHANGED
package/src/api/LikeAPI.ts
CHANGED
|
@@ -37,6 +37,7 @@ export function LikeAPI(projectId: string, baseURL = '') {
|
|
|
37
37
|
return likes || [];
|
|
38
38
|
} catch (e) {
|
|
39
39
|
console.error(e);
|
|
40
|
+
|
|
40
41
|
return [];
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -67,6 +68,7 @@ export function LikeAPI(projectId: string, baseURL = '') {
|
|
|
67
68
|
return likes || 0;
|
|
68
69
|
} catch (e) {
|
|
69
70
|
console.error(e);
|
|
71
|
+
|
|
70
72
|
return 0;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
@@ -100,6 +102,7 @@ export function LikeAPI(projectId: string, baseURL = '') {
|
|
|
100
102
|
return likes || 0;
|
|
101
103
|
} catch (e) {
|
|
102
104
|
console.error(e);
|
|
105
|
+
|
|
103
106
|
return 0;
|
|
104
107
|
}
|
|
105
108
|
}
|
|
@@ -133,6 +136,7 @@ export function LikeAPI(projectId: string, baseURL = '') {
|
|
|
133
136
|
return { token, name } as UserData;
|
|
134
137
|
} catch (e) {
|
|
135
138
|
console.error(e);
|
|
139
|
+
|
|
136
140
|
return {} as UserData;
|
|
137
141
|
}
|
|
138
142
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { context } from '../../react/setup-fixture';
|
|
2
|
-
import { HEADLINE } from '../Headline/Headline.fixture';
|
|
3
|
-
import { linkDocsContentExample } from '../LinkDocs/linkDocsContentExample';
|
|
4
|
-
import { PICTURE_TEXT } from '../PictureText/PictureText.fixture';
|
|
5
|
-
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
6
|
-
import type { AccordionProps } from './Accordion';
|
|
7
|
-
import { Accordion } from './Accordion';
|
|
8
2
|
import type {
|
|
9
3
|
HeadlineBlockListDef,
|
|
10
4
|
LinkDocsBlockListDef,
|
|
11
|
-
PictureTextBlockListDef,
|
|
12
5
|
TextBlockBlockListDef,
|
|
13
6
|
} from '../../ui-kit/BlocksList/BlocksListProps';
|
|
7
|
+
import { HEADLINE } from '../Headline/Headline.fixture';
|
|
8
|
+
import { linkDocsContentExample } from '../LinkDocs/linkDocsContentExample';
|
|
9
|
+
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
10
|
+
import type { AccordionProps } from './Accordion';
|
|
11
|
+
import { Accordion } from './Accordion';
|
|
14
12
|
|
|
15
13
|
const TEXT_BLOCK_ACCORDION_BLOCK: TextBlockBlockListDef = {
|
|
16
14
|
blockListType: 'TextBlock',
|
|
@@ -22,11 +20,6 @@ const HEADLINE_ACCORDION_BLOCK: HeadlineBlockListDef = {
|
|
|
22
20
|
...HEADLINE,
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
const PICTURE_TEXT_ACCORDION_BLOCK: PictureTextBlockListDef = {
|
|
26
|
-
blockListType: 'PictureText',
|
|
27
|
-
...PICTURE_TEXT,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
23
|
const LINK_DOCS_ACCORDION_BLOCK: LinkDocsBlockListDef = {
|
|
31
24
|
blockListType: 'LinkDocs',
|
|
32
25
|
...linkDocsContentExample,
|
|
@@ -41,21 +34,17 @@ const propsTextBlock: AccordionProps = {
|
|
|
41
34
|
accordionItems: [
|
|
42
35
|
{
|
|
43
36
|
label: 'Accordion label 1',
|
|
44
|
-
blocks: [TEXT_BLOCK_ACCORDION_BLOCK, TEXT_BLOCK_ACCORDION_BLOCK],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: 'Accordion label 2',
|
|
48
37
|
labelIcon: {
|
|
49
38
|
icon: 'CardIcon',
|
|
50
39
|
},
|
|
51
|
-
blocks: [
|
|
40
|
+
blocks: [TEXT_BLOCK_ACCORDION_BLOCK, TEXT_BLOCK_ACCORDION_BLOCK],
|
|
52
41
|
},
|
|
53
42
|
{
|
|
54
|
-
label: 'Accordion label
|
|
43
|
+
label: 'Accordion label 2',
|
|
55
44
|
blocks: [HEADLINE_ACCORDION_BLOCK],
|
|
56
45
|
},
|
|
57
46
|
{
|
|
58
|
-
label: 'Accordion label
|
|
47
|
+
label: 'Accordion label 3',
|
|
59
48
|
blocks: [LINK_DOCS_ACCORDION_BLOCK],
|
|
60
49
|
},
|
|
61
50
|
],
|
|
@@ -22,42 +22,50 @@ import { Accordion } from './Accordion';
|
|
|
22
22
|
|
|
23
23
|
const TEXT_BLOCK_ACCORDION_BLOCK: TextBlockBlockListDef = {
|
|
24
24
|
blockListType: 'TextBlock',
|
|
25
|
+
style: ['col-span-12'],
|
|
25
26
|
...TEXT_BLOCK,
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const HEADLINE_ACCORDION_BLOCK: HeadlineBlockListDef = {
|
|
29
30
|
blockListType: 'Headline',
|
|
31
|
+
style: ['col-span-12'],
|
|
30
32
|
...HEADLINE,
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
const PICTURE_TEXT_ACCORDION_BLOCK: PictureTextBlockListDef = {
|
|
34
36
|
blockListType: 'PictureText',
|
|
37
|
+
style: ['col-span-12'],
|
|
35
38
|
...PICTURE_TEXT,
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
const LINK_DOCS_ACCORDION_BLOCK: LinkDocsBlockListDef = {
|
|
39
42
|
blockListType: 'LinkDocs',
|
|
43
|
+
style: ['col-span-12'],
|
|
40
44
|
...linkDocsContentExample,
|
|
41
45
|
title: '',
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
const TILES_ACCORDION_BLOCK: TileBlockListDef = {
|
|
45
49
|
blockListType: 'Tile',
|
|
50
|
+
style: ['col-span-6'],
|
|
46
51
|
...TILE,
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
const PRODUCT_TILES_ACCORDION_BLOCK: ProductTileBlockListDef = {
|
|
50
55
|
blockListType: 'ProductTile',
|
|
56
|
+
style: ['col-span-6'],
|
|
51
57
|
...PRODUCT_TILE,
|
|
52
58
|
};
|
|
53
59
|
|
|
54
60
|
const GALLERY_ACCORDION_BLOCK: GalleryBlockListDef = {
|
|
55
61
|
blockListType: 'Gallery',
|
|
62
|
+
style: ['col-span-12'],
|
|
56
63
|
...GALLERY,
|
|
57
64
|
};
|
|
58
65
|
|
|
59
66
|
const MINI_GALLERY_ACCORDION_BLOCK: MiniGalleryBlockListDef = {
|
|
60
67
|
blockListType: 'MiniGallery',
|
|
68
|
+
style: ['col-span-12'],
|
|
61
69
|
...MINI_GALLERY,
|
|
62
70
|
};
|
|
63
71
|
|
|
@@ -84,11 +92,11 @@ const propsDefaultBlock: AccordionProps = {
|
|
|
84
92
|
},
|
|
85
93
|
{
|
|
86
94
|
label: 'Accordion label 5',
|
|
87
|
-
blocks: [TILES_ACCORDION_BLOCK],
|
|
95
|
+
blocks: [TILES_ACCORDION_BLOCK, TILES_ACCORDION_BLOCK],
|
|
88
96
|
},
|
|
89
97
|
{
|
|
90
98
|
label: 'Accordion label 6',
|
|
91
|
-
blocks: [PRODUCT_TILES_ACCORDION_BLOCK],
|
|
99
|
+
blocks: [PRODUCT_TILES_ACCORDION_BLOCK, PRODUCT_TILES_ACCORDION_BLOCK],
|
|
92
100
|
},
|
|
93
101
|
{
|
|
94
102
|
label: 'Accordion label 7',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
3
4
|
import type { AccordionItemCommonProps } from './AccordionContent';
|
|
4
5
|
import { AccordionItemInner } from './AccordionItemInner';
|
|
5
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
6
6
|
import { useActiveHandler } from './useActiveHandler';
|
|
7
7
|
|
|
8
8
|
export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
|
|
@@ -40,6 +40,6 @@ export const AccordionItem = JSX<AccordionItemProps>(
|
|
|
40
40
|
},
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
function borderedLiClass(bordered) {
|
|
43
|
+
function borderedLiClass(bordered?: boolean) {
|
|
44
44
|
return bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0';
|
|
45
45
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { AccordionItemProps } from './AccordionItem';
|
|
3
2
|
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
3
|
+
import type { AccordionItemProps } from './AccordionItem';
|
|
4
4
|
|
|
5
5
|
export const AccordionItemInner = JSX<AccordionItemProps>(({ blocks, context }) => {
|
|
6
|
-
const className = 'mb-5 last:mb-0 first:mt-2';
|
|
7
6
|
return (
|
|
8
|
-
<div className="transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
|
|
9
|
-
{renderBlocksList({ context,
|
|
7
|
+
<div className="flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
|
|
8
|
+
{renderBlocksList({ context, blocks, className: '!px-0' })}
|
|
10
9
|
</div>
|
|
11
10
|
);
|
|
12
11
|
});
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { AccordionItemProps } from './AccordionItem';
|
|
3
2
|
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
3
|
+
import type { AccordionItemProps } from './AccordionItem';
|
|
4
4
|
|
|
5
5
|
export const AccordionItemInner = JSX<AccordionItemProps>(({ blocks, context }) => {
|
|
6
|
-
const className = 'mb-5 last:mb-0 pb-5';
|
|
7
6
|
return (
|
|
8
|
-
<div className="transition-all duration-300 max-h-0 overflow-hidden">
|
|
9
|
-
{renderBlocksList({ context,
|
|
7
|
+
<div className="grid grid-cols-12 transition-all duration-300 max-h-0 overflow-hidden">
|
|
8
|
+
{renderBlocksList({ context, blocks, className: '!p-0 mb-5' })}
|
|
10
9
|
</div>
|
|
11
10
|
);
|
|
12
11
|
});
|
|
@@ -38,6 +38,7 @@ const renderBenefits = (benefits: BenefitItem[]) => {
|
|
|
38
38
|
|
|
39
39
|
const renderStep = (benefit: BenefitItem, i: number) => {
|
|
40
40
|
const description = benefit?.description || undefined;
|
|
41
|
+
|
|
41
42
|
return (
|
|
42
43
|
<div key={String(i)} className="flex items-center basis-1/2 max-w-[500px] mb-[46px]">
|
|
43
44
|
{benefit?.icon ? (
|
|
@@ -61,6 +62,7 @@ const renderDescription = (description?: DescriptionType) => {
|
|
|
61
62
|
if (!benefitType) {
|
|
62
63
|
return null;
|
|
63
64
|
}
|
|
65
|
+
|
|
64
66
|
return description ? (
|
|
65
67
|
<div className="font-light text-base text-secondary-text mt-2">
|
|
66
68
|
{benefitType === 'list'
|
|
@@ -74,6 +76,7 @@ const renderTextBenefit = (description?: TextBenefitDef) => (description ? descr
|
|
|
74
76
|
|
|
75
77
|
const renderListBenefit = (description?: ListBenefitDef) => {
|
|
76
78
|
const listStyleType = description?.bullets ? 'list-disc pl-6' : '';
|
|
79
|
+
|
|
77
80
|
return description?.items && description.items.length > 0 ? (
|
|
78
81
|
<ul className={listStyleType}>
|
|
79
82
|
{description.items.map((_, i) => (
|
package/src/components/Blocks.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Accordion } from './Accordion/Accordion';
|
|
2
2
|
import { BenefitsBlock } from './BenefitsBlock/BenefitsBlock';
|
|
3
3
|
import { Bonus } from './Bonus/Bonus';
|
|
4
|
-
import {
|
|
4
|
+
import { BonusBenefitsBlock } from './BonusBenefitsBlock/BonusBenefitsBlock';
|
|
5
5
|
import { Calculator } from './Calculator/Calculator';
|
|
6
|
+
import { Catalog } from './Catalog/Catalog';
|
|
7
|
+
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
6
8
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
7
9
|
import { Footer } from './Footer/Footer';
|
|
8
10
|
import { Gallery } from './Gallery/Gallery';
|
|
9
11
|
import { GracePeriod } from './GracePeriod/GracePeriod';
|
|
12
|
+
import { GroupBlock } from './GroupBlock/GroupBlock';
|
|
10
13
|
import { Header } from './Header/Header';
|
|
11
14
|
import { Headline } from './Headline/Headline';
|
|
12
15
|
import { Insurance } from './Insurance/Insurance';
|
|
@@ -28,8 +31,6 @@ import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
|
28
31
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
29
32
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
30
33
|
import { Tile } from './Tile/Tile';
|
|
31
|
-
import { GroupBlock } from './GroupBlock/GroupBlock';
|
|
32
|
-
import { BonusBenefitsBlock } from './BonusBenefitsBlock/BonusBenefitsBlock';
|
|
33
34
|
|
|
34
35
|
export const Blocks = {
|
|
35
36
|
Accordion,
|
|
@@ -37,6 +38,7 @@ export const Blocks = {
|
|
|
37
38
|
Bonus,
|
|
38
39
|
ComparisonTable,
|
|
39
40
|
Calculator,
|
|
41
|
+
Catalog,
|
|
40
42
|
ExchangeRateTile,
|
|
41
43
|
Footer,
|
|
42
44
|
Gallery,
|
|
@@ -27,6 +27,7 @@ export const getMonthlyPayment = (params: GetMonthlyPaymentParams) => {
|
|
|
27
27
|
|
|
28
28
|
if (paymentType === 'annuity') {
|
|
29
29
|
const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
|
|
30
|
+
|
|
30
31
|
return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
|
|
31
32
|
} else {
|
|
32
33
|
return finalSum / months + finalSum * (Number(rate) / 12);
|
|
@@ -16,6 +16,7 @@ export function renderMonthsInput(props: RenderMonthsInputProps) {
|
|
|
16
16
|
const { title, minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
|
|
17
17
|
const monthText = (month) => {
|
|
18
18
|
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
19
|
+
|
|
19
20
|
return `${month} ${text}`;
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Каталог",
|
|
3
|
+
"description": "Описание",
|
|
4
|
+
"cards": [
|
|
5
|
+
{
|
|
6
|
+
"title": "Заголовок карточки 1",
|
|
7
|
+
"description": "Описание карточки",
|
|
8
|
+
"image": {
|
|
9
|
+
"format": "webp",
|
|
10
|
+
"size": {
|
|
11
|
+
"width": 230,
|
|
12
|
+
"height": 230
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"button": {
|
|
16
|
+
"href": "",
|
|
17
|
+
"text": "Подробнее",
|
|
18
|
+
"target": "_blank",
|
|
19
|
+
"version": "primary"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"title": "Заголовок карточки 2",
|
|
24
|
+
"description": "Описание карточки",
|
|
25
|
+
"image": {
|
|
26
|
+
"format": "webp",
|
|
27
|
+
"size": {
|
|
28
|
+
"width": 230,
|
|
29
|
+
"height": 230
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"button": {
|
|
33
|
+
"href": "",
|
|
34
|
+
"text": "Подробнее",
|
|
35
|
+
"target": "_blank",
|
|
36
|
+
"version": "primary"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"title": "Заголовок карточки 3",
|
|
41
|
+
"description": "Описание карточки",
|
|
42
|
+
"image": {
|
|
43
|
+
"format": "webp",
|
|
44
|
+
"size": {
|
|
45
|
+
"width": 230,
|
|
46
|
+
"height": 230
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"button": {
|
|
50
|
+
"href": "",
|
|
51
|
+
"text": "Подробнее",
|
|
52
|
+
"target": "_blank",
|
|
53
|
+
"version": "primary"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import { context } from '../../react/setup-fixture';
|
|
3
|
+
import type { ButtonCommonProps } from '../../ui-kit/Button/Button';
|
|
4
|
+
import { Catalog, CatalogProps } from './Catalog';
|
|
5
|
+
import type { CatalogProductColor } from './CatalogContent';
|
|
6
|
+
|
|
7
|
+
const payRing: Picture = {
|
|
8
|
+
src: 'pay-ring.png',
|
|
9
|
+
format: 'webp',
|
|
10
|
+
size: {
|
|
11
|
+
width: 230,
|
|
12
|
+
height: 230,
|
|
13
|
+
},
|
|
14
|
+
title: 'pay-ring',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const colors: CatalogProductColor[] = ['black', 'white'];
|
|
18
|
+
|
|
19
|
+
const buttonPrimary: ButtonCommonProps = {
|
|
20
|
+
href: '/credit-cards',
|
|
21
|
+
text: 'Подробнее',
|
|
22
|
+
target: '_blank',
|
|
23
|
+
version: 'primary',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const catalogCard = {
|
|
27
|
+
title: 'SATURN S-VI',
|
|
28
|
+
description: 'Керамическое кольцо с глянцевой поверхностью и огранкой по внешним контурам',
|
|
29
|
+
image: payRing,
|
|
30
|
+
price: 5600,
|
|
31
|
+
colors: colors,
|
|
32
|
+
button: buttonPrimary,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const defaultProps: CatalogProps = {
|
|
36
|
+
context,
|
|
37
|
+
title: 'Каталог',
|
|
38
|
+
description: 'Описание',
|
|
39
|
+
cards: new Array(5).fill(catalogCard).flat(),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
default: (
|
|
44
|
+
<div className="container grid grid-cols-12">
|
|
45
|
+
<Catalog {...defaultProps} className="col-span-12" />
|
|
46
|
+
</div>
|
|
47
|
+
),
|
|
48
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
4
|
+
import { Description } from '../../ui-kit/Description/Description';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
+
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
7
|
+
import { CatalogCard } from './CatalogCard';
|
|
8
|
+
import type { CatalogCardType, CatalogContent } from './CatalogContent';
|
|
9
|
+
|
|
10
|
+
export interface CatalogProps extends CatalogContent, UniBlockProps {}
|
|
11
|
+
|
|
12
|
+
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
13
|
+
const CARD_FULL_VIEW_COUNT = 3;
|
|
14
|
+
const CARD_SHIFT = 430;
|
|
15
|
+
|
|
16
|
+
export const Catalog = JSX<CatalogProps>(
|
|
17
|
+
({ context, cards = [], className = '', title, description }) => {
|
|
18
|
+
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<section
|
|
22
|
+
className={`bg-white relative font-sans p-9 overflow-hidden text-center ${className}`}
|
|
23
|
+
>
|
|
24
|
+
{title ? <Heading headingType="h2" className="mb-6" title={title} /> : null}
|
|
25
|
+
{description ? <Description className="mb-6" description={description} /> : null}
|
|
26
|
+
<div
|
|
27
|
+
className="flex duration-1000 gap-3.5"
|
|
28
|
+
style={{ transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }}
|
|
29
|
+
role="list"
|
|
30
|
+
>
|
|
31
|
+
{cards?.length ? cards.map(renderCatalogCard(context)) : null}
|
|
32
|
+
</div>
|
|
33
|
+
{renderNavButtons({
|
|
34
|
+
cardsCount: cards.length,
|
|
35
|
+
activeCardIndex,
|
|
36
|
+
setActiveCardIndex,
|
|
37
|
+
})}
|
|
38
|
+
<div className={`${BLUR_BLOCK_CLASSES} left-0 ${'bg-opacity-from-white'}`} />
|
|
39
|
+
<div className={`${BLUR_BLOCK_CLASSES} right-0 ${'bg-opacity-to-white'}`} />
|
|
40
|
+
</section>
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const renderCatalogCard = (context: ContentPageContext) => (card: CatalogCardType, i: number) => {
|
|
46
|
+
return <CatalogCard key={String(i)} context={context} {...card} />;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
interface RenderNavButtonsProps {
|
|
50
|
+
cardsCount: number;
|
|
51
|
+
activeCardIndex: number;
|
|
52
|
+
setActiveCardIndex: (number) => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const renderNavButtons = ({
|
|
56
|
+
cardsCount,
|
|
57
|
+
activeCardIndex,
|
|
58
|
+
setActiveCardIndex,
|
|
59
|
+
}: RenderNavButtonsProps) => {
|
|
60
|
+
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
61
|
+
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
62
|
+
|
|
63
|
+
const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
|
|
64
|
+
const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
|
|
65
|
+
const showPrevButton = isUseSlider && activeCardIndex > 0;
|
|
66
|
+
|
|
67
|
+
return renderArrows({
|
|
68
|
+
handler: [handlePrevClick, handleNextClick],
|
|
69
|
+
isShown: [showPrevButton, showNextButton],
|
|
70
|
+
btnClass: ['left-8', 'right-8'],
|
|
71
|
+
className: 'top-1/2 z-10 mt-6',
|
|
72
|
+
});
|
|
73
|
+
};
|