@redneckz/wildless-cms-uni-blocks 0.3.22 → 0.3.25
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 +62 -70
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +6 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +7 -0
- package/dist/components/Accordion/AccordionItem.js +14 -5
- package/dist/components/Accordion/AccordionItem.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 +2 -2
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +2 -2
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/dist/components/Accordion/useActiveHandler.d.ts +7 -0
- package/dist/components/Accordion/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/dist/components/Accordion/useActiveHandler.js.map +1 -0
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +17 -5
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +4 -4
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -1
- package/dist/components/OtherProducts/OtherProductsItem.js +4 -4
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/dist/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/content-page-repository/transformPicture.js +2 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/model/Picture.d.ts +2 -2
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
- package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +2 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/dist/ui-kit/Img/Img.js +3 -1
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/dist/ui-kit/List/List.d.ts +1 -1
- package/dist/ui-kit/List/List.js +7 -2
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/dist/ui-kit/List/ListItem.js +4 -9
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +6 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +7 -0
- package/lib/components/Accordion/AccordionItem.js +14 -5
- package/lib/components/Accordion/AccordionItem.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 +2 -2
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +2 -2
- package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/lib/components/Accordion/useActiveHandler.d.ts +7 -0
- package/{mobile/lib/components/Accordion/utils → lib/components/Accordion}/useActiveHandler.js +2 -2
- package/lib/components/Accordion/useActiveHandler.js.map +1 -0
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +17 -5
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +4 -4
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -1
- package/lib/components/OtherProducts/OtherProductsItem.js +4 -4
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/lib/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/content-page-repository/transformPicture.js +2 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/model/Picture.d.ts +2 -2
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
- package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +2 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/lib/ui-kit/Img/Img.js +3 -1
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/lib/ui-kit/List/List.d.ts +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +10 -0
- package/lib/ui-kit/List/List.js +7 -2
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/lib/ui-kit/List/ListItem.js +4 -9
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +72 -74
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +7 -0
- 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 +2 -2
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/dist/components/Accordion/useActiveHandler.d.ts +7 -0
- package/mobile/dist/components/Accordion/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +17 -5
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +4 -4
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +4 -4
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/mobile/dist/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js +2 -1
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/model/Picture.d.ts +2 -2
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +2 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/dist/ui-kit/List/List.d.ts +1 -1
- package/mobile/dist/ui-kit/List/List.js +7 -2
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +4 -9
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +7 -0
- 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 +2 -2
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/lib/components/Accordion/useActiveHandler.d.ts +7 -0
- package/{lib/components/Accordion/utils → mobile/lib/components/Accordion}/useActiveHandler.js +2 -2
- package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +17 -5
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +4 -4
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +4 -4
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/mobile/lib/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
- package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js +2 -1
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/model/Picture.d.ts +2 -2
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +2 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/lib/ui-kit/List/List.d.ts +1 -1
- package/mobile/lib/ui-kit/List/List.js +7 -2
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +4 -9
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/src/components/Accordion/AccordionContent.ts +8 -1
- package/mobile/src/components/Accordion/AccordionItem.tsx +1 -1
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +11 -9
- package/mobile/src/components/Accordion/{utils/useActiveHandler.ts → useActiveHandler.ts} +4 -3
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +51 -30
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/mobile/src/components/ContentPage/ContentPage.tsx +0 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/mobile/src/components/Gallery/Gallery.tsx +5 -4
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/mobile/src/components/Gallery/GalleryContent.ts +3 -2
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +3 -1
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +29 -27
- package/{src/components/OtherProducts/utils → mobile/src/components/OtherProducts}/useActiveHandler.ts +4 -3
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +17 -12
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +25 -5
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +2 -1
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +3 -1
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/mobile/src/components/TextBlock/TextBlock.example.json +2 -1
- package/mobile/src/components/TextBlock/TextBlock.tsx +2 -2
- package/mobile/src/components/Tile/Tile.tsx +3 -1
- package/mobile/src/content-page-repository/transformPicture.ts +2 -1
- package/mobile/src/model/Picture.ts +2 -2
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +27 -29
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +12 -4
- package/mobile/src/ui-kit/Icon/Icon.tsx +7 -1
- package/mobile/src/ui-kit/Icon/IconProps.ts +2 -2
- package/mobile/src/ui-kit/List/List.tsx +9 -3
- package/mobile/src/ui-kit/List/ListItem.tsx +5 -12
- package/mobile/src/ui-kit/List/ListProps.ts +2 -0
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +27 -14
- package/src/components/Accordion/AccordionContent.ts +8 -1
- package/src/components/Accordion/AccordionItem.mobile.tsx +1 -1
- package/src/components/Accordion/AccordionItem.tsx +48 -26
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +11 -9
- package/src/components/Accordion/AccordionItemInner.tsx +10 -8
- package/src/components/Accordion/{utils/useActiveHandler.ts → useActiveHandler.ts} +4 -3
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +51 -30
- package/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/src/components/ContentPage/ContentPage.tsx +0 -1
- package/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -2
- package/src/components/Gallery/Gallery.mobile.tsx +5 -4
- package/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/src/components/Gallery/GalleryContent.ts +3 -2
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +3 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/src/components/OtherProducts/OtherProductsContent.ts +4 -1
- package/src/components/OtherProducts/OtherProductsItem.tsx +29 -27
- package/{mobile/src/components/OtherProducts/utils → src/components/OtherProducts}/useActiveHandler.ts +4 -3
- package/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +49 -13
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +17 -12
- package/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +25 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +8 -1
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +2 -1
- package/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +3 -1
- package/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/src/components/TextBlock/TextBlock.example.json +2 -1
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +8 -0
- package/src/components/TextBlock/TextBlock.mobile.tsx +2 -2
- package/src/components/Tile/Tile.tsx +3 -1
- package/src/content-page-repository/transformPicture.ts +2 -1
- package/src/model/Picture.ts +2 -2
- package/src/ui-kit/BlocksList/BlocksListProps.ts +27 -29
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +12 -4
- package/src/ui-kit/Icon/Icon.tsx +7 -1
- package/src/ui-kit/Icon/IconProps.ts +2 -2
- package/src/ui-kit/Img/Img.tsx +5 -2
- package/src/ui-kit/List/List.fixture.tsx +37 -0
- package/src/ui-kit/List/List.tsx +9 -3
- package/src/ui-kit/List/ListItem.tsx +5 -12
- package/src/ui-kit/List/ListProps.ts +2 -0
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
- package/dist/components/Accordion/utils/useActiveHandler.d.ts +0 -9
- package/dist/components/Accordion/utils/useActiveHandler.js.map +0 -1
- package/dist/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
- package/dist/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
- package/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/lib/components/Accordion/utils/useActiveHandler.d.ts +0 -9
- package/lib/components/Accordion/utils/useActiveHandler.js.map +0 -1
- package/lib/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
- package/lib/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +0 -8
- package/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/dist/components/Accordion/utils/useActiveHandler.d.ts +0 -9
- package/mobile/dist/components/Accordion/utils/useActiveHandler.js.map +0 -1
- package/mobile/dist/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
- package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/lib/components/Accordion/utils/useActiveHandler.d.ts +0 -9
- package/mobile/lib/components/Accordion/utils/useActiveHandler.js.map +0 -1
- package/mobile/lib/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
- package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/mobile/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
- package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +0 -12
- package/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useActiveHandler } from './
|
|
2
|
+
import { useActiveHandler } from './useActiveHandler';
|
|
3
3
|
import type { UniBlockProps } from '../../types';
|
|
4
4
|
import type { blockItemCommonProps } from './OtherProductsContent';
|
|
5
5
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
@@ -7,30 +7,32 @@ import { OtherProductsItemInner } from './OtherProductsItemInner';
|
|
|
7
7
|
|
|
8
8
|
export interface BlockItemProps extends blockItemCommonProps, UniBlockProps {}
|
|
9
9
|
|
|
10
|
-
export const OtherProductsItem = JSX<BlockItemProps>(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export const OtherProductsItem = JSX<BlockItemProps>(
|
|
11
|
+
({ label, isExpanded, blocks, columns, context }) => {
|
|
12
|
+
const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
|
|
13
|
+
context,
|
|
14
|
+
blocks,
|
|
15
|
+
initialState: isExpanded,
|
|
16
|
+
});
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
return (
|
|
19
|
+
<div className="border-0 border-b border-solid border-main-divider">
|
|
20
|
+
{hasContent ? (
|
|
21
|
+
<OtherProductsItemInner
|
|
22
|
+
isExpanded={isActive}
|
|
23
|
+
columns={columns}
|
|
24
|
+
blocks={blocks}
|
|
25
|
+
context={context}
|
|
26
|
+
/>
|
|
27
|
+
) : null}
|
|
28
|
+
<button
|
|
29
|
+
className="border-none bg-primary-main px-0 py-[26px] w-full font-sans text-white text-base flex justify-center cursor-pointer"
|
|
30
|
+
onClick={handleToggle}
|
|
31
|
+
>
|
|
32
|
+
<span className="pr-3">{isActive ? 'Скрыть' : label}</span>
|
|
33
|
+
{hasContent ? <Icon name={icon} width="20" height="20" asSVG /> : null}
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IconName } from '
|
|
1
|
+
import type { IconName } from '../../icons/IconName';
|
|
2
|
+
import { ActiveHandler } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
3
|
|
|
3
|
-
export const useActiveHandler = ({ context, blocks }) => {
|
|
4
|
-
const [isActive, setIsActive] = context.useState(
|
|
4
|
+
export const useActiveHandler = ({ context, blocks, initialState = false }: ActiveHandler) => {
|
|
5
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
5
6
|
const hasContent = blocks?.length;
|
|
6
7
|
const icon: IconName = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
7
8
|
|
|
@@ -4,6 +4,11 @@ import { ProductBlock } from './ProductBlock';
|
|
|
4
4
|
import { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
6
6
|
|
|
7
|
+
const title = 'Кредит до 5 000 000 Р\nбез залога и поручителей';
|
|
8
|
+
const description =
|
|
9
|
+
'Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт.';
|
|
10
|
+
const label = 'Самое лучшее предложение';
|
|
11
|
+
|
|
7
12
|
const image: Picture = {
|
|
8
13
|
src: 'money-1.png',
|
|
9
14
|
format: 'webp',
|
|
@@ -20,7 +25,7 @@ const image: Picture = {
|
|
|
20
25
|
],
|
|
21
26
|
};
|
|
22
27
|
|
|
23
|
-
const benefits = [
|
|
28
|
+
const benefits: Benefit[] = [
|
|
24
29
|
{
|
|
25
30
|
label: 'До 5 млн ₽',
|
|
26
31
|
description: 'Кредитный лимит',
|
|
@@ -38,7 +43,7 @@ const benefits = [
|
|
|
38
43
|
},
|
|
39
44
|
];
|
|
40
45
|
|
|
41
|
-
const buttons = [
|
|
46
|
+
const buttons: ButtonWithIconProps[] = [
|
|
42
47
|
{
|
|
43
48
|
href: 'https://rshb.ru',
|
|
44
49
|
text: 'Оформить карту',
|
|
@@ -51,7 +56,7 @@ const buttons = [
|
|
|
51
56
|
target: '_blank',
|
|
52
57
|
version: 'secondary',
|
|
53
58
|
},
|
|
54
|
-
]
|
|
59
|
+
];
|
|
55
60
|
|
|
56
61
|
const items = [
|
|
57
62
|
'Совершайте любые личные покупки',
|
|
@@ -59,30 +64,61 @@ const items = [
|
|
|
59
64
|
'Расходы для бизнеса на УСН 15% позволят снизить налоговую базу',
|
|
60
65
|
];
|
|
61
66
|
|
|
67
|
+
const props = { title, description, image, buttons };
|
|
68
|
+
|
|
62
69
|
export default {
|
|
63
70
|
default: (
|
|
71
|
+
<div className="container grid grid-cols-12">
|
|
72
|
+
<ProductBlock className="col-span-12" context={context} {...props} benefits={benefits} />
|
|
73
|
+
</div>
|
|
74
|
+
),
|
|
75
|
+
items: (
|
|
76
|
+
<div className="container grid grid-cols-12">
|
|
77
|
+
<ProductBlock className="col-span-12" context={context} {...props} items={items} />
|
|
78
|
+
</div>
|
|
79
|
+
),
|
|
80
|
+
'primary with label': (
|
|
64
81
|
<div className="container grid grid-cols-12">
|
|
65
82
|
<ProductBlock
|
|
66
83
|
className="col-span-12"
|
|
67
84
|
context={context}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
buttons={buttons as ButtonWithIconProps[]}
|
|
72
|
-
image={image}
|
|
85
|
+
{...props}
|
|
86
|
+
benefits={benefits}
|
|
87
|
+
label={label}
|
|
73
88
|
/>
|
|
74
89
|
</div>
|
|
75
90
|
),
|
|
76
|
-
|
|
91
|
+
secondary: (
|
|
77
92
|
<div className="container grid grid-cols-12">
|
|
78
93
|
<ProductBlock
|
|
79
94
|
className="col-span-12"
|
|
80
95
|
context={context}
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
{...props}
|
|
97
|
+
benefits={benefits}
|
|
98
|
+
version="secondary"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
),
|
|
102
|
+
'secondary with items': (
|
|
103
|
+
<div className="container grid grid-cols-12">
|
|
104
|
+
<ProductBlock
|
|
105
|
+
className="col-span-12"
|
|
106
|
+
context={context}
|
|
107
|
+
{...props}
|
|
83
108
|
items={items}
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
version="secondary"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
),
|
|
113
|
+
'secondary with label': (
|
|
114
|
+
<div className="container grid grid-cols-12">
|
|
115
|
+
<ProductBlock
|
|
116
|
+
className="col-span-12"
|
|
117
|
+
context={context}
|
|
118
|
+
{...props}
|
|
119
|
+
benefits={benefits}
|
|
120
|
+
label={label}
|
|
121
|
+
version="secondary"
|
|
86
122
|
/>
|
|
87
123
|
</div>
|
|
88
124
|
),
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { ProductBlockInner } from './ProductBlockInner';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
3
4
|
import type { ProductBlockContent } from './ProductBlockContent';
|
|
4
|
-
import {
|
|
5
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
6
|
+
|
|
7
|
+
const productBlockStyleMap: Record<BlockVersion, string> = {
|
|
8
|
+
primary: 'bg-white text-primary-text',
|
|
9
|
+
secondary: 'bg-primary-main text-white',
|
|
10
|
+
};
|
|
5
11
|
|
|
6
12
|
export interface ProductBlockProps extends ProductBlockContent, UniBlockProps {}
|
|
7
13
|
|
|
8
|
-
export const ProductBlock = JSX<ProductBlockProps>(
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
);
|
|
14
|
+
export const ProductBlock = JSX<ProductBlockProps>((props /* Get rid of image and benefits */) => {
|
|
15
|
+
const { className = '', version = 'primary' } = props;
|
|
16
|
+
return (
|
|
17
|
+
<section
|
|
18
|
+
className={`font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`}
|
|
19
|
+
>
|
|
20
|
+
<ProductBlockInner {...props} />
|
|
21
|
+
</section>
|
|
22
|
+
);
|
|
23
|
+
});
|
|
@@ -20,6 +20,10 @@ export type ProductBlockInnerContent = HeadingContent &
|
|
|
20
20
|
*/
|
|
21
21
|
benefits?: Benefit[];
|
|
22
22
|
version?: BlockVersion;
|
|
23
|
+
/** @title Буллиты */
|
|
24
|
+
isDotted?: boolean;
|
|
25
|
+
/** @title Лейбл (моб.) */
|
|
26
|
+
label?: string;
|
|
23
27
|
/**
|
|
24
28
|
* @title Стиль для текстовой части
|
|
25
29
|
* @hidden
|
|
@@ -7,6 +7,7 @@ import { Img } from '../../ui-kit/Img/Img';
|
|
|
7
7
|
import { List } from '../../ui-kit/List/List';
|
|
8
8
|
import { BaseTile } from '../BaseTile/BaseTile';
|
|
9
9
|
import type { ProductBlockInnerContent } from './ProductBlockContent';
|
|
10
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
10
11
|
import { renderBenefit } from './renderBenefit';
|
|
11
12
|
|
|
12
13
|
export type ProductBlockInnerProps = ProductBlockInnerContent & UniBlockProps;
|
|
@@ -23,10 +24,13 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
23
24
|
image,
|
|
24
25
|
items,
|
|
25
26
|
version = 'primary',
|
|
27
|
+
isDotted = true,
|
|
28
|
+
label,
|
|
26
29
|
}) => {
|
|
27
30
|
return (
|
|
28
|
-
<div className={`w-full
|
|
31
|
+
<div className={`w-full ${className}`}>
|
|
29
32
|
<div>
|
|
33
|
+
{label ? renderLabel(label, version) : null}
|
|
30
34
|
<BaseTile
|
|
31
35
|
context={context}
|
|
32
36
|
title={
|
|
@@ -54,7 +58,14 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
54
58
|
{benefits?.filter((items) => items.label)?.length ? (
|
|
55
59
|
<div className="mt-3">{benefits.map((_, i) => renderBenefit(_, i, version))}</div>
|
|
56
60
|
) : null}
|
|
57
|
-
{items?.length ?
|
|
61
|
+
{items?.length ? (
|
|
62
|
+
<List
|
|
63
|
+
className="mt-3 text-m-md"
|
|
64
|
+
items={items}
|
|
65
|
+
version={version}
|
|
66
|
+
isDotted={isDotted}
|
|
67
|
+
/>
|
|
68
|
+
) : null}
|
|
58
69
|
</BaseTile>
|
|
59
70
|
</div>
|
|
60
71
|
{renderImage(image)}
|
|
@@ -65,8 +76,17 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
65
76
|
|
|
66
77
|
function renderImage(image) {
|
|
67
78
|
return image?.src ? (
|
|
68
|
-
<
|
|
69
|
-
<Img image={{ className: 'block', ...image }} />
|
|
70
|
-
</div>
|
|
79
|
+
<Img imageClassName="mt-5 mx-auto block" image={{ className: 'block', ...image }} />
|
|
71
80
|
) : null;
|
|
72
81
|
}
|
|
82
|
+
|
|
83
|
+
const labelStyleMap: Record<BlockVersion, string> = {
|
|
84
|
+
primary: 'text-primary-main border-secondary-hover',
|
|
85
|
+
secondary: 'text-white/80',
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const renderLabel = (label: string, version: BlockVersion) => (
|
|
89
|
+
<div className={`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 w-fit ${labelStyleMap[version]}`}>
|
|
90
|
+
{label}
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
@@ -23,6 +23,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
23
23
|
image,
|
|
24
24
|
items,
|
|
25
25
|
version = 'primary',
|
|
26
|
+
isDotted = true,
|
|
26
27
|
textBlockClassName = '',
|
|
27
28
|
}) => {
|
|
28
29
|
const textColor = version === 'secondary' ? 'text-white' : '';
|
|
@@ -43,7 +44,13 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
43
44
|
</div>
|
|
44
45
|
) : null}
|
|
45
46
|
{items?.length ? (
|
|
46
|
-
<List
|
|
47
|
+
<List
|
|
48
|
+
className="mt-5"
|
|
49
|
+
items={items}
|
|
50
|
+
itemClassName="mb-[10px]"
|
|
51
|
+
version={version}
|
|
52
|
+
isDotted={isDotted}
|
|
53
|
+
/>
|
|
47
54
|
) : null}
|
|
48
55
|
</BaseTile>
|
|
49
56
|
</div>
|
|
@@ -11,7 +11,7 @@ const benefitDescStyleMap: Record<BlockVersion, string> = {
|
|
|
11
11
|
secondary: 'text-white',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
export function renderBenefit(benefit: Benefit, i: number, version:
|
|
14
|
+
export function renderBenefit(benefit: Benefit, i: number, version: BlockVersion) {
|
|
15
15
|
return (
|
|
16
16
|
<div key={String(i)} className="flex gap-3 items-center mb-2.5 last:mb-0">
|
|
17
17
|
{benefit.icon && (
|
|
@@ -21,6 +21,7 @@ export function renderBenefit(benefit: Benefit, i: number, version: string) {
|
|
|
21
21
|
width="24"
|
|
22
22
|
height="24"
|
|
23
23
|
asSVG
|
|
24
|
+
color={version}
|
|
24
25
|
/>
|
|
25
26
|
)}
|
|
26
27
|
<div className={`font-medium text-m-title-xs m-0 ${benefitTitleStyleMap[version]}`}>
|
|
@@ -18,7 +18,9 @@ export const TariffsTable = JSX<TariffsTableProps>(
|
|
|
18
18
|
const tiles = getTiles(rowHeaders, colData);
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<section
|
|
21
|
+
<section
|
|
22
|
+
className={`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${className}`}
|
|
23
|
+
>
|
|
22
24
|
{title ? (
|
|
23
25
|
<Heading
|
|
24
26
|
headingType="h2"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem';
|
|
3
2
|
import { Button } from '../../ui-kit/Button/Button';
|
|
4
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
5
4
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
|
-
import
|
|
5
|
+
import { List } from '../../ui-kit/List/List';
|
|
6
|
+
import type { TariffsTableCellData, TariffsTableList } from './TariffsTableContent';
|
|
7
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
7
8
|
|
|
8
9
|
export interface TariffsTableCellProps {
|
|
9
10
|
cell: TariffsTableCellData[];
|
|
@@ -32,31 +33,31 @@ const renderCellInner = (
|
|
|
32
33
|
)}
|
|
33
34
|
{label ? <div className="text-xl font-medium m-0">{label}</div> : null}
|
|
34
35
|
{description ? <div className="text-sm text-secondary-text">{description}</div> : null}
|
|
35
|
-
{list?.items?.length ? (
|
|
36
|
-
<div className="flex flex-col justify-between items-start">
|
|
37
|
-
<div role="list">
|
|
38
|
-
{list.items.map((text, idx) => (
|
|
39
|
-
<BlockItem
|
|
40
|
-
className="text-sm"
|
|
41
|
-
key={String(idx)}
|
|
42
|
-
text={text}
|
|
43
|
-
version="gray"
|
|
44
|
-
isDotted={list.isDotted ?? true}
|
|
45
|
-
/>
|
|
46
|
-
))}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
) : null}
|
|
36
|
+
{list?.items?.length ? renderList(list) : null}
|
|
50
37
|
{image && <Img image={image} />}
|
|
51
|
-
{buttons?.length
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
{buttons?.length ? renderButtons(buttons) : null}
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const renderList = (list: TariffsTableList) => (
|
|
43
|
+
<List
|
|
44
|
+
className="flex flex-col justify-between items-start text-sm"
|
|
45
|
+
version="gray"
|
|
46
|
+
items={list.items}
|
|
47
|
+
isDotted={list.isDotted ?? true}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const renderButtons = (buttons: ButtonWithIconProps[]) => (
|
|
52
|
+
<div>
|
|
53
|
+
{buttons.map(({ icon, rounded, ...buttonProps }, idx) => (
|
|
54
|
+
<Button
|
|
55
|
+
className={`${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`}
|
|
56
|
+
key={String(idx)}
|
|
57
|
+
rounded={rounded}
|
|
58
|
+
appendLeft={icon && <Icon name={icon} width="24px" height="24px" asSVG />}
|
|
59
|
+
{...buttonProps}
|
|
60
|
+
/>
|
|
61
|
+
))}
|
|
61
62
|
</div>
|
|
62
63
|
);
|
|
@@ -56,7 +56,7 @@ export type TariffsTableContent = HeadingContent &
|
|
|
56
56
|
columns?: TariffsTableColumn[];
|
|
57
57
|
/** @title Параметры */
|
|
58
58
|
rowHeaders?: TariffsTableRowHeader[];
|
|
59
|
-
/** @title
|
|
59
|
+
/** @title Отображать элементы в моб. версии (прокрутка shift+mouseScroll) */
|
|
60
60
|
orientation?: ListOrientation;
|
|
61
61
|
};
|
|
62
62
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { TableTileHeader } from './TableTileHeader';
|
|
3
|
-
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem';
|
|
4
3
|
import { Img } from '../../ui-kit/Img/Img';
|
|
5
4
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
5
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
7
|
-
import
|
|
6
|
+
import { List } from '../../ui-kit/List/List';
|
|
7
|
+
import type {
|
|
8
|
+
TariffsTableCellData,
|
|
9
|
+
TariffsTableList,
|
|
10
|
+
TariffsTableTileCellProps,
|
|
11
|
+
} from './TariffsTableContent';
|
|
12
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
8
13
|
|
|
9
14
|
export const TariffsTableTileCell = JSX<TariffsTableTileCellProps>(({ header, data }) => {
|
|
10
15
|
return (
|
|
@@ -27,35 +32,32 @@ const renderCellInner = (
|
|
|
27
32
|
{description ? (
|
|
28
33
|
<div className="text-m-sm text-secondary-text mt-[3px]">{description}</div>
|
|
29
34
|
) : null}
|
|
30
|
-
{list?.items?.length ? (
|
|
31
|
-
<div className="flex flex-col justify-between items-start">
|
|
32
|
-
<div role="list">
|
|
33
|
-
{list.items.map((text, idx) => (
|
|
34
|
-
<BlockItem
|
|
35
|
-
className="text-m-sm"
|
|
36
|
-
key={String(idx)}
|
|
37
|
-
text={text}
|
|
38
|
-
version="gray"
|
|
39
|
-
isDotted={list.isDotted ?? true}
|
|
40
|
-
/>
|
|
41
|
-
))}
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
) : null}
|
|
35
|
+
{list?.items?.length ? renderList(list) : null}
|
|
45
36
|
{image && <Img image={{ ...image, className: 'm-0' }} />}
|
|
46
|
-
{buttons?.length ? (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
37
|
+
{buttons?.length ? renderButtons(buttons) : null}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const renderList = (list: TariffsTableList) => (
|
|
42
|
+
<List
|
|
43
|
+
className="flex flex-col justify-between items-start text-m-sm"
|
|
44
|
+
version="gray"
|
|
45
|
+
items={list.items}
|
|
46
|
+
isDotted={list.isDotted ?? true}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const renderButtons = (buttons: ButtonWithIconProps[]) => (
|
|
51
|
+
<div>
|
|
52
|
+
{buttons.map(({ icon, rounded, ...buttonProps }, idx) => (
|
|
53
|
+
<Button
|
|
54
|
+
className={`mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`}
|
|
55
|
+
key={String(idx)}
|
|
56
|
+
rounded={rounded}
|
|
57
|
+
appendLeft={icon && <Icon name={icon} width="24px" height="24px" asSVG />}
|
|
58
|
+
{...buttonProps}
|
|
59
|
+
aria-label={icon}
|
|
60
|
+
/>
|
|
61
|
+
))}
|
|
60
62
|
</div>
|
|
61
63
|
);
|
|
@@ -75,6 +75,14 @@ export default {
|
|
|
75
75
|
iconVersion="small"
|
|
76
76
|
items={items}
|
|
77
77
|
/>
|
|
78
|
+
<TextBlock
|
|
79
|
+
context={mobileContext}
|
|
80
|
+
title="Все карты Россельхозбанка работают"
|
|
81
|
+
description="Если не планируете поездку за границу, продолжайте пользоваться картой Своя. Для поездок за границу"
|
|
82
|
+
blockVersion="secondary-light"
|
|
83
|
+
iconVersion="small"
|
|
84
|
+
items={items}
|
|
85
|
+
/>
|
|
78
86
|
</div>
|
|
79
87
|
</div>
|
|
80
88
|
<div>
|
|
@@ -55,10 +55,10 @@ export const TextBlock = JSX<TextBlockProps>(
|
|
|
55
55
|
) : null}
|
|
56
56
|
{items?.length ? (
|
|
57
57
|
<List
|
|
58
|
-
className="mt-1"
|
|
58
|
+
className="mt-1 text-m-md"
|
|
59
59
|
items={items}
|
|
60
60
|
isDotted={isDotted}
|
|
61
|
-
version={blockVersion
|
|
61
|
+
version={blockVersion === 'secondary' ? 'secondary' : 'gray'}
|
|
62
62
|
/>
|
|
63
63
|
) : null}
|
|
64
64
|
</div>
|
|
@@ -70,5 +70,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
function renderList(items, version) {
|
|
73
|
-
return items?.length ?
|
|
73
|
+
return items?.length ? (
|
|
74
|
+
<List items={items} itemClassName="mt-2.5 first:mt-0" version={version} />
|
|
75
|
+
) : null;
|
|
74
76
|
}
|
|
@@ -13,8 +13,9 @@ export async function transformPicture(
|
|
|
13
13
|
options: TransformationOptions,
|
|
14
14
|
): Promise<Picture> {
|
|
15
15
|
const sources = picture.sources || [];
|
|
16
|
+
const src = picture?.src || '';
|
|
16
17
|
const [transformedPicture, ...transformedSources] = await Promise.all(
|
|
17
|
-
[picture].concat(sources).map((_) => transformImg(pagePath,
|
|
18
|
+
[picture].concat(sources).map((_) => transformImg(pagePath, src, { ...options, ..._ })),
|
|
18
19
|
);
|
|
19
20
|
return {
|
|
20
21
|
...picture,
|
package/src/model/Picture.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface Img {
|
|
2
2
|
/** @title Картинка */
|
|
3
|
-
src
|
|
3
|
+
src?: string;
|
|
4
4
|
/** @title Альтернативный текст (alt) */
|
|
5
5
|
alt?: string;
|
|
6
6
|
/** @title Текст подсказки (title) */
|
|
@@ -9,7 +9,7 @@ export interface Img {
|
|
|
9
9
|
|
|
10
10
|
export interface ImgSource {
|
|
11
11
|
/** @title Картинка */
|
|
12
|
-
src
|
|
12
|
+
src?: string;
|
|
13
13
|
/** @title Формат */
|
|
14
14
|
format?: 'jpeg' | 'jpg' | 'png' | 'gif' | 'webp' | 'heif' | 'avif';
|
|
15
15
|
/** @hidden */
|