@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
|
@@ -4,6 +4,6 @@ import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
|
4
4
|
import { LinkDocsHorizontalList } from './LinkDocsHorizontalList.js';
|
|
5
5
|
import { LinkDocsVerticalList } from './LinkDocsVerticalList.js';
|
|
6
6
|
export const LinkDocs = JSX(({ className = '', context, title, subtitle, icon = 'DocIconMonoColor', documents, listMode = 'vertical', hasBorder = true, }) => {
|
|
7
|
-
return (_jsxs("section", { className: `font-sans text-primary-text py-6 px-4 bg-white ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? (_jsx("h3", { className: "mt-0 font-normal mb-5 text-center text-m-md", children: subtitle })) : null, listMode === 'vertical' ? (_jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (_jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
|
|
7
|
+
return (_jsxs("section", { className: `font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? (_jsx("h3", { className: "mt-0 font-normal mb-5 text-center text-m-md", children: subtitle })) : null, listMode === 'vertical' ? (_jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (_jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
|
|
8
8
|
});
|
|
9
9
|
//# sourceMappingURL=LinkDocs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocs.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,kBAAkB,EACzB,SAAS,EACT,QAAQ,GAAG,UAAU,EACrB,SAAS,GAAG,IAAI,GACjB,EAAE,EAAE;IACH,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ACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
2
|
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
3
3
|
import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
4
|
+
import type { ListOrientation } from '../../model/ListOrientation';
|
|
4
5
|
/**
|
|
5
6
|
* @title Отображение списка
|
|
6
7
|
* @enumNames [
|
|
@@ -9,14 +10,6 @@ import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
|
9
10
|
* ]
|
|
10
11
|
*/
|
|
11
12
|
export declare type LinkColumnsMode = 'single' | 'double';
|
|
12
|
-
/**
|
|
13
|
-
* @title Отображение списка (моб.)
|
|
14
|
-
* @enumNames [
|
|
15
|
-
* "Вертикально",
|
|
16
|
-
* "Горизонтально",
|
|
17
|
-
* ]
|
|
18
|
-
*/
|
|
19
|
-
export declare type LinkListMode = 'vertical' | 'horizontal';
|
|
20
13
|
/**
|
|
21
14
|
* @title Элемент списка
|
|
22
15
|
*/
|
|
@@ -37,7 +30,8 @@ export interface LinkDocsContent {
|
|
|
37
30
|
/** @title Список */
|
|
38
31
|
documents?: LinkDocsItem[];
|
|
39
32
|
columnsMode?: LinkColumnsMode;
|
|
40
|
-
|
|
33
|
+
/** @title Отображать элементы в моб. версии (прокрутка shift+mouseScroll) */
|
|
34
|
+
listMode?: ListOrientation;
|
|
41
35
|
/** @title Рамка элементов (моб.) */ hasBorder?: boolean;
|
|
42
36
|
align?: AlignType;
|
|
43
37
|
}
|
|
@@ -8,6 +8,10 @@ export interface blockItemCommonProps {
|
|
|
8
8
|
* @default Список
|
|
9
9
|
*/
|
|
10
10
|
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @title Отображать в раскрытом виде
|
|
13
|
+
*/
|
|
14
|
+
isExpanded?: boolean;
|
|
11
15
|
/** @title Блоки */
|
|
12
16
|
blocks?: BlockDef[];
|
|
13
17
|
/**
|
|
@@ -16,7 +20,6 @@ export interface blockItemCommonProps {
|
|
|
16
20
|
*/
|
|
17
21
|
bordered?: boolean;
|
|
18
22
|
columns?: ColumnsCount;
|
|
19
|
-
isActive?: boolean;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* @title Другие продукты
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useActiveHandler } from './
|
|
3
|
+
import { useActiveHandler } from './useActiveHandler.js';
|
|
4
4
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
5
5
|
import { OtherProductsItemInner } from './OtherProductsItemInner.js';
|
|
6
|
-
export const OtherProductsItem = JSX(({ label, blocks, columns, context }) => {
|
|
6
|
+
export const OtherProductsItem = JSX(({ label, isExpanded, blocks, columns, context }) => {
|
|
7
7
|
const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
|
|
8
8
|
context,
|
|
9
9
|
blocks,
|
|
10
|
+
initialState: isExpanded,
|
|
10
11
|
});
|
|
11
|
-
return (_jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (_jsx(OtherProductsItemInner, { columns: columns, blocks: blocks, context: context
|
|
12
|
-
${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [_jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? _jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
|
|
12
|
+
return (_jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (_jsx(OtherProductsItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, context: context })) : null, _jsxs("button", { className: "border-none bg-primary-main px-0 py-[26px] w-full font-sans text-white text-base flex justify-center cursor-pointer", onClick: handleToggle, children: [_jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? _jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=OtherProductsItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherProductsItem.js","sourceRoot":"","sources":["../../../src/components/OtherProducts/OtherProductsItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OtherProductsItem.js","sourceRoot":"","sources":["../../../src/components/OtherProducts/OtherProductsItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAClD,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACpE,OAAO;QACP,MAAM;QACN,YAAY,EAAE,UAAU;KACzB,CAAC,CAAC;IAEH,OAAO,CACL,eAAK,SAAS,EAAC,oDAAoD,aAChE,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,sBAAsB,IACrB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,EACR,kBACE,SAAS,EAAC,qHAAqH,EAC/H,OAAO,EAAE,YAAY,aAErB,eAAM,SAAS,EAAC,MAAM,YAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAQ,EAC1D,UAAU,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IAC/D,IACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActiveHandler } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
|
+
export declare const useActiveHandler: ({ context, blocks, initialState }: ActiveHandler) => {
|
|
3
|
+
isActive: boolean;
|
|
4
|
+
hasContent: number | undefined;
|
|
5
|
+
icon: "ArrowDownIcon" | "ArrowUpIcon";
|
|
6
|
+
handleToggle: (e: MouseEvent) => void;
|
|
7
|
+
};
|
package/mobile/lib/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const useActiveHandler = ({ context, blocks }) => {
|
|
2
|
-
const [isActive, setIsActive] = context.useState(
|
|
1
|
+
export const useActiveHandler = ({ context, blocks, initialState = false }) => {
|
|
2
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
3
3
|
const hasContent = blocks?.length;
|
|
4
4
|
const icon = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
5
5
|
const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActiveHandler.js","sourceRoot":"","sources":["../../../src/components/OtherProducts/useActiveHandler.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,EAAiB,EAAE,EAAE;IAC3F,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,MAAM,EAAE,MAAM,CAAC;IAClC,MAAM,IAAI,GAAa,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;IAElE,MAAM,eAAe,GAAG,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC;IAE7E,MAAM,YAAY,GAAG,CAAC,CAAa,EAAE,EAAE;QACrC,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QAED,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvB,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QACxC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS;YACzD,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,GAAG,YAAY,CAAC,YAAY,IAAI,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AACtD,CAAC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { ProductBlockInner } from './ProductBlockInner.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const productBlockStyleMap = {
|
|
5
|
+
primary: 'bg-white text-primary-text',
|
|
6
|
+
secondary: 'bg-primary-main text-white',
|
|
7
|
+
};
|
|
8
|
+
export const ProductBlock = JSX((props /* Get rid of image and benefits */) => {
|
|
9
|
+
const { className = '', version = 'primary' } = props;
|
|
10
|
+
return (_jsx("section", { className: `font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`, children: _jsx(ProductBlockInner, { ...props }) }));
|
|
9
11
|
});
|
|
10
12
|
//# sourceMappingURL=ProductBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAIF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAoB,CAAC,KAAK,CAAC,mCAAmC,EAAE,EAAE;IAC/F,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACtD,OAAO,CACL,kBACE,SAAS,EAAE,gCAAgC,oBAAoB,CAAC,OAAO,CAAC,IAAI,SAAS,EAAE,YAEvF,KAAC,iBAAiB,OAAK,KAAK,GAAI,GACxB,CACX,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -14,6 +14,10 @@ export declare type ProductBlockInnerContent = HeadingContent & HeadingTypeConte
|
|
|
14
14
|
*/
|
|
15
15
|
benefits?: Benefit[];
|
|
16
16
|
version?: BlockVersion;
|
|
17
|
+
/** @title Буллиты */
|
|
18
|
+
isDotted?: boolean;
|
|
19
|
+
/** @title Лейбл (моб.) */
|
|
20
|
+
label?: string;
|
|
17
21
|
/**
|
|
18
22
|
* @title Стиль для текстовой части
|
|
19
23
|
* @hidden
|
|
@@ -7,10 +7,15 @@ import { Img } from '../../ui-kit/Img/Img.js';
|
|
|
7
7
|
import { List } from '../../ui-kit/List/List.js';
|
|
8
8
|
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
9
9
|
import { renderBenefit } from './renderBenefit.js';
|
|
10
|
-
export const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
11
|
-
return (_jsxs("div", { className: `w-full
|
|
10
|
+
export const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', isDotted = true, label, }) => {
|
|
11
|
+
return (_jsxs("div", { className: `w-full ${className}`, children: [_jsxs("div", { children: [label ? renderLabel(label, version) : null, _jsxs(BaseTile, { context: context, title: title && (_jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? (_jsx(Description, { className: "mt-3 text-m-md", description: description })) : null, benefits?.filter((items) => items.label)?.length ? (_jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? (_jsx(List, { className: "mt-3 text-m-md", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage(image)] }));
|
|
12
12
|
});
|
|
13
13
|
function renderImage(image) {
|
|
14
|
-
return image?.src ? (_jsx(
|
|
14
|
+
return image?.src ? (_jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
|
|
15
15
|
}
|
|
16
|
+
const labelStyleMap = {
|
|
17
|
+
primary: 'text-primary-main border-secondary-hover',
|
|
18
|
+
secondary: 'text-white/80',
|
|
19
|
+
};
|
|
20
|
+
const renderLabel = (label, version) => (_jsx("div", { className: `m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 w-fit ${labelStyleMap[version]}`, children: label }));
|
|
16
21
|
//# sourceMappingURL=ProductBlockInner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,IAAI,EACf,KAAK,GACN,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,UAAU,SAAS,EAAE,aACnC,0BACG,KAAK,CAAC,CAAC,CAAC,WAAW,CA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,oBAAoB,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAI,CACrF,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,MAAM,aAAa,GAAiC;IAClD,OAAO,EAAE,0CAA0C;IACnD,SAAS,EAAE,eAAe;CAC3B,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,OAAqB,EAAE,EAAE,CAAC,CAC5D,cAAK,SAAS,EAAE,qDAAqD,aAAa,CAAC,OAAO,CAAC,EAAE,YAC1F,KAAK,GACF,CACP,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
1
2
|
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
2
|
-
export declare function renderBenefit(benefit: Benefit, i: number, version:
|
|
3
|
+
export declare function renderBenefit(benefit: Benefit, i: number, version: BlockVersion): any;
|
|
@@ -9,6 +9,6 @@ const benefitDescStyleMap = {
|
|
|
9
9
|
secondary: 'text-white',
|
|
10
10
|
};
|
|
11
11
|
export function renderBenefit(benefit, i, version) {
|
|
12
|
-
return (_jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon && (_jsx(Icon, { className: "w-6 h-6 rounded-full box-border", name: benefit.icon, width: "24", height: "24", asSVG: true })), _jsx("div", { className: `font-medium text-m-title-xs m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (_jsx("div", { className: `font-normal text-m-sm ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
12
|
+
return (_jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon && (_jsx(Icon, { className: "w-6 h-6 rounded-full box-border", name: benefit.icon, width: "24", height: "24", asSVG: true, color: version })), _jsx("div", { className: `font-medium text-m-title-xs m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (_jsx("div", { className: `font-normal text-m-sm ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=renderBenefit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,OAAgB,EAAE,CAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,OAAgB,EAAE,CAAS,EAAE,OAAqB;IAC9E,OAAO,CACL,eAAqB,SAAS,EAAC,0CAA0C,aACtE,OAAO,CAAC,IAAI,IAAI,CACf,KAAC,IAAI,IACH,SAAS,EAAC,iCAAiC,EAC3C,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,QACL,KAAK,EAAE,OAAO,GACd,CACH,EACD,cAAK,SAAS,EAAE,mCAAmC,oBAAoB,CAAC,OAAO,CAAC,EAAE,YAC/E,OAAO,CAAC,KAAK,GACV,EACL,OAAO,CAAC,WAAW,IAAI,CACtB,cAAK,SAAS,EAAE,yBAAyB,mBAAmB,CAAC,OAAO,CAAC,EAAE,YACpE,OAAO,CAAC,WAAW,GAChB,CACP,KAlBO,MAAM,CAAC,CAAC,CAAC,CAmBb,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { TariffsTableHorizontal } from './TariffsTableHorizontal.js';
|
|
|
6
6
|
export const TariffsTable = JSX(({ className, context, title, description, columns, rowHeaders, orientation = 'vertical' }) => {
|
|
7
7
|
const colData = getColData(columns);
|
|
8
8
|
const tiles = getTiles(rowHeaders, colData);
|
|
9
|
-
return (_jsxs("section", { className: `px-4 py-6 bg-white font-sans text-primary-text ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${description ? 'mb-2' : 'mb-5'}`, title: title })) : null, description ? _jsx("div", { className: "mb-5 text-center text-m-md", children: description }) : null, tiles?.length ? renderOrientationTable(orientation, tiles, context) : null] }));
|
|
9
|
+
return (_jsxs("section", { className: `px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${description ? 'mb-2' : 'mb-5'}`, title: title })) : null, description ? _jsx("div", { className: "mb-5 text-center text-m-md", children: description }) : null, tiles?.length ? renderOrientationTable(orientation, tiles, context) : null] }));
|
|
10
10
|
});
|
|
11
11
|
function renderOrientationTable(orientation, tiles, context) {
|
|
12
12
|
return orientation === 'vertical' ? (_jsx(TariffsTableVertical, { tiles: tiles })) : (_jsx(TariffsTableHorizontal, { context: context, tiles: tiles }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TariffsTable.js","sourceRoot":"","sources":["../../../src/components/TariffsTable/TariffsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO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AAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,4BAA4B,YAAE,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACpF,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IACnE,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,sBAAsB,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO;IACzD,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,CAClC,KAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,GAAI,CACvC,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAI,CAC3D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,OAAyC,EAAE,EAAE,CAC/D,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AAE3C,MAAM,QAAQ,GAAG,CACf,UAA+C,EAC/C,OAAiC,EACjC,EAAE,CACF,UAAU,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9B,MAAM;IACN,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;CAC3B,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem.js';
|
|
4
3
|
import { Button } from '../../ui-kit/Button/Button.js';
|
|
5
4
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
6
5
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
6
|
+
import { List } from '../../ui-kit/List/List.js';
|
|
7
7
|
export const TariffsTableCell = JSX(({ cell, isLastRow }) => {
|
|
8
8
|
const cellWrapperClasses = `first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
|
|
9
9
|
return (_jsx("div", { className: cellWrapperClasses, role: "cell", children: _jsx("div", { children: cell.map(renderCellInner) }) }));
|
|
10
10
|
});
|
|
11
|
-
const renderCellInner = ({ label, description, list, image, buttons }, i) => (_jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (_jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label ? _jsx("div", { className: "text-xl font-medium m-0", children: label }) : null, description ? _jsx("div", { className: "text-sm text-secondary-text", children: description }) : null, list?.items?.length ? (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const renderCellInner = ({ label, description, list, image, buttons }, i) => (_jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (_jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label ? _jsx("div", { className: "text-xl font-medium m-0", children: label }) : null, description ? _jsx("div", { className: "text-sm text-secondary-text", children: description }) : null, list?.items?.length ? renderList(list) : null, image && _jsx(Img, { image: image }), buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
12
|
+
const renderList = (list) => (_jsx(List, { className: "flex flex-col justify-between items-start text-sm", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
13
|
+
const renderButtons = (buttons) => (_jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (_jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, rounded: rounded, appendLeft: icon && _jsx(Icon, { name: icon, width: "24px", height: "24px", asSVG: true }), ...buttonProps }, String(idx)))) }));
|
|
14
14
|
//# sourceMappingURL=TariffsTableCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TariffsTableCell.js","sourceRoot":"","sources":["../../../src/components/TariffsTable/TariffsTableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TariffsTableCell.js","sourceRoot":"","sources":["../../../src/components/TariffsTable/TariffsTableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAS9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACjF,MAAM,kBAAkB,GAAG,+GACzB,SAAS,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAC1C,EAAE,CAAC;IAEH,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,YAC7C,wBAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,GAAO,GAClC,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CACtB,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAwB,EAClE,CAAS,EACT,EAAE,CAAC,CACH,eAAqB,SAAS,EAAC,sBAAsB,aAClD,CAAC,GAAG,CAAC,IAAI,CACR,cAAK,SAAS,EAAC,oEAAoE,GAAG,CACvF,EACA,KAAK,CAAC,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CACP,CAAC"}
|
|
@@ -47,7 +47,7 @@ export declare type TariffsTableContent = HeadingContent & DescriptionContent &
|
|
|
47
47
|
columns?: TariffsTableColumn[];
|
|
48
48
|
/** @title Параметры */
|
|
49
49
|
rowHeaders?: TariffsTableRowHeader[];
|
|
50
|
-
/** @title
|
|
50
|
+
/** @title Отображать элементы в моб. версии (прокрутка shift+mouseScroll) */
|
|
51
51
|
orientation?: ListOrientation;
|
|
52
52
|
};
|
|
53
53
|
/** @hidden */
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { TableTileHeader } from './TableTileHeader.js';
|
|
4
|
-
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem.js';
|
|
5
4
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
6
5
|
import { Button } from '../../ui-kit/Button/Button.js';
|
|
7
6
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
7
|
+
import { List } from '../../ui-kit/List/List.js';
|
|
8
8
|
export const TariffsTableTileCell = JSX(({ header, data }) => {
|
|
9
9
|
return (_jsxs("div", { className: "rounded-md border-main-stroke h-full box-border border p-4", children: [_jsx(TableTileHeader, { ...header }), data?.length ? data.map(renderCellInner) : null] }));
|
|
10
10
|
});
|
|
11
|
-
const renderCellInner = ({ label, description, list, image, buttons }, i) => (_jsxs("div", { children: [i > 0 && (_jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? _jsx("div", { className: "text-m-sm m-0", children: label }) : null, description ? (_jsx("div", { className: "text-m-sm text-secondary-text mt-[3px]", children: description })) : null, list?.items?.length ? (
|
|
11
|
+
const renderCellInner = ({ label, description, list, image, buttons }, i) => (_jsxs("div", { children: [i > 0 && (_jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? _jsx("div", { className: "text-m-sm m-0", children: label }) : null, description ? (_jsx("div", { className: "text-m-sm text-secondary-text mt-[3px]", children: description })) : null, list?.items?.length ? renderList(list) : null, image && _jsx(Img, { image: { ...image, className: 'm-0' } }), buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
12
|
+
const renderList = (list) => (_jsx(List, { className: "flex flex-col justify-between items-start text-m-sm", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
13
|
+
const renderButtons = (buttons) => (_jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (_jsx(Button, { className: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`, rounded: rounded, appendLeft: icon && _jsx(Icon, { name: icon, width: "24px", height: "24px", asSVG: true }), ...buttonProps, "aria-label": icon }, String(idx)))) }));
|
|
12
14
|
//# sourceMappingURL=TariffsTableTileCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TariffsTableTileCell.js","sourceRoot":"","sources":["../../../src/components/TariffsTable/TariffsTableTileCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TariffsTableTileCell.js","sourceRoot":"","sources":["../../../src/components/TariffsTable/TariffsTableTileCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAQ9C,MAAM,CAAC,MAAM,oBAAo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I,CAAC,QAAQ,IAAI,IAAI,GAC/B,CACH,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,CACxD,wBACG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvD,KAAC,MAAM,IACL,SAAS,EAAE,QAAQ,GAAG,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,EAElF,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,SAAG,KACrE,WAAW,gBACH,IAAI,IAJX,MAAM,CAAC,GAAG,CAAC,CAKhB,CACH,CAAC,GACE,CACP,CAAC"}
|
|
@@ -24,7 +24,7 @@ const textBlockStyleMaps = {
|
|
|
24
24
|
};
|
|
25
25
|
export const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className = '', items, isDotted = true, }) => {
|
|
26
26
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
27
|
-
return (_jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, _jsxs("div", { className: "py-0.5", children: [title ? (_jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (_jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (_jsx(List, { className: "mt-1", items: items, isDotted: isDotted, version: blockVersion
|
|
27
|
+
return (_jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, _jsxs("div", { className: "py-0.5", children: [title ? (_jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (_jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (_jsx(List, { className: "mt-1 text-m-md", items: items, isDotted: isDotted, version: blockVersion === 'secondary' ? 'secondary' : 'gray' })) : null] })] }));
|
|
28
28
|
});
|
|
29
29
|
function renderIcon(className) {
|
|
30
30
|
return (_jsx("div", { className: "mb-3", children: _jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/components/TextBlock/TextBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAK9C,MAAM,kBAAkB,GAAqD;IAC3E,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;KACnC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,YAAY;KAC1B;IACD,iBAAiB,EAAE;QACjB,UAAU,EAAE,oBAAoB;QAChC,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;KACnC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EACC,KAAK,EACL,WAAW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AAE,QAAQ,EAClB,OAAO,EAAE,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,GAC5D,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,UAAU,CAAC,SAAiB;IACnC,OAAO,CACL,cAAK,SAAS,EAAC,MAAM,YACnB,cAAK,SAAS,EAAE,4CAA4C,SAAS,EAAE,kBAAS,GAC5E,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAe;IAClC,OAAO,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5E,CAAC"}
|
|
@@ -19,6 +19,6 @@ export const Tile = JSX((props) => {
|
|
|
19
19
|
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && _jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && _jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), children, renderList(items, version)] }) }));
|
|
20
20
|
});
|
|
21
21
|
function renderList(items, version) {
|
|
22
|
-
return items?.length ? _jsx(List, { items: items, version: version }) : null;
|
|
22
|
+
return items?.length ? (_jsx(List, { items: items, itemClassName: "mt-2.5 first:mt-0", version: version })) : null;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=Tile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,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,GAAI,EACvF,QAAQ,EACR,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,IAClB,GACH,CACX,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,KAAK,EAAE,OAAO;IAChC,OAAO,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,mBAAmB,EAAC,OAAO,EAAE,OAAO,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -5,7 +5,8 @@ import util from 'util';
|
|
|
5
5
|
const mkdir = util.promisify(fs.mkdir);
|
|
6
6
|
export async function transformPicture(pagePath, picture, options) {
|
|
7
7
|
const sources = picture.sources || [];
|
|
8
|
-
const
|
|
8
|
+
const src = picture?.src || '';
|
|
9
|
+
const [transformedPicture, ...transformedSources] = await Promise.all([picture].concat(sources).map((_) => transformImg(pagePath, src, { ...options, ..._ })));
|
|
9
10
|
return {
|
|
10
11
|
...picture,
|
|
11
12
|
src: transformedPicture,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformPicture.js","sourceRoot":"","sources":["../../src/content-page-repository/transformPicture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,OAAgB,EAChB,OAA8B;IAE9B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,CAAC,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CACnE,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"transformPicture.js","sourceRoot":"","sources":["../../src/content-page-repository/transformPicture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,OAAgB,EAChB,OAA8B;IAE9B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IAC/B,MAAM,CAAC,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CACnE,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CACxF,CAAC;IACF,OAAO;QACL,GAAG,OAAO;QACV,GAAG,EAAE,kBAAkB;QACvB,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,GAAG,OAAO,CAAC,CAAC,CAAC;YACb,GAAG,EAAE,CAAC;SACP,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,YAAY,CACzB,QAAgB,EAChB,GAAW,EACX,qBA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C,IAAI,CAAC,GAAG,CAAC,CAAC;IACrE,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,IAC1E,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CACpC,EAAE,CAAC;AACL,CAAC"}
|
|
@@ -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) */
|
|
@@ -8,7 +8,7 @@ export interface Img {
|
|
|
8
8
|
}
|
|
9
9
|
export interface ImgSource {
|
|
10
10
|
/** @title Картинка */
|
|
11
|
-
src
|
|
11
|
+
src?: string;
|
|
12
12
|
/** @title Формат */
|
|
13
13
|
format?: 'jpeg' | 'jpg' | 'png' | 'gif' | 'webp' | 'heif' | 'avif';
|
|
14
14
|
/** @hidden */
|
|
@@ -8,58 +8,87 @@ import type { ProductTileContent } from '../../components/ProductTile/ProductTil
|
|
|
8
8
|
import type { TextBlockContent } from '../../components/TextBlock/TextBlockContent';
|
|
9
9
|
import type { TileContent } from '../../components/Tile/TileContent';
|
|
10
10
|
import type { LinkListContent } from '../../components/LinkList/LinkListContent';
|
|
11
|
+
import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
12
|
+
export interface ActiveHandler {
|
|
13
|
+
context: ContentPageContext;
|
|
14
|
+
blocks?: BlockDef[];
|
|
15
|
+
initialState?: boolean;
|
|
16
|
+
}
|
|
11
17
|
/**
|
|
12
18
|
* @title Количество колонок
|
|
13
19
|
* @enumNames ["1 колонка", "2 колонки"]
|
|
14
20
|
*/
|
|
15
21
|
export declare type ColumnsCount = 1 | 2;
|
|
16
|
-
/**
|
|
17
|
-
* @title Тип блока
|
|
18
|
-
*/
|
|
19
|
-
export declare type BlockDefType = 'Headline' | 'LinkDocs' | 'TextBlock' | 'PictureText' | 'Tile' | 'ProductTile' | 'ProductBlock' | 'Gallery' | 'MiniGallery' | 'LinkList';
|
|
20
|
-
interface BaseBlockDef {
|
|
21
|
-
blockListType: BlockDefType;
|
|
22
|
-
}
|
|
23
22
|
/**
|
|
24
23
|
* @title Заголовок
|
|
24
|
+
* @default {"blockListType": "Headline"}
|
|
25
25
|
*/
|
|
26
|
-
export declare type HeadlineBlockListDef = HeadlineContent &
|
|
26
|
+
export declare type HeadlineBlockListDef = HeadlineContent & {
|
|
27
|
+
blockListType: 'Headline';
|
|
28
|
+
};
|
|
27
29
|
/**
|
|
28
30
|
* @title Список документов
|
|
31
|
+
* @default {"blockListType": "LinkDocs"}
|
|
29
32
|
*/
|
|
30
|
-
export declare type LinkDocsBlockListDef = LinkDocsContent &
|
|
33
|
+
export declare type LinkDocsBlockListDef = LinkDocsContent & {
|
|
34
|
+
blockListType: 'LinkDocs';
|
|
35
|
+
};
|
|
31
36
|
/**
|
|
32
37
|
* @title Текстовый блок
|
|
38
|
+
* @default {"blockListType": "TextBlock"}
|
|
33
39
|
*/
|
|
34
|
-
export declare type TextBlockBlockListDef = TextBlockContent &
|
|
40
|
+
export declare type TextBlockBlockListDef = TextBlockContent & {
|
|
41
|
+
blockListType: 'TextBlock';
|
|
42
|
+
};
|
|
35
43
|
/**
|
|
36
44
|
* @title Картинка с текстом
|
|
45
|
+
* @default {"blockListType": "PictureText"}
|
|
37
46
|
*/
|
|
38
|
-
export declare type PictureTextBlockListDef = PictureTextContent &
|
|
47
|
+
export declare type PictureTextBlockListDef = PictureTextContent & {
|
|
48
|
+
blockListType: 'PictureText';
|
|
49
|
+
};
|
|
39
50
|
/**
|
|
40
51
|
* @title Продуктовый блок
|
|
52
|
+
* @default {"blockListType": "ProductBlock"}
|
|
41
53
|
*/
|
|
42
|
-
export declare type ProductBlockBlockListDef = ProductBlockContent &
|
|
54
|
+
export declare type ProductBlockBlockListDef = ProductBlockContent & {
|
|
55
|
+
blockListType: 'ProductBlock';
|
|
56
|
+
};
|
|
43
57
|
/**
|
|
44
58
|
* @title Плитка
|
|
59
|
+
* @default {"blockListType": "Tile"}
|
|
45
60
|
*/
|
|
46
|
-
export declare type TileBlockListDef = TileContent &
|
|
61
|
+
export declare type TileBlockListDef = TileContent & {
|
|
62
|
+
blockListType: 'Tile';
|
|
63
|
+
};
|
|
47
64
|
/**
|
|
48
65
|
* @title Продуктовая плитка
|
|
66
|
+
* @default {"blockListType": "ProductTile"}
|
|
49
67
|
*/
|
|
50
|
-
export declare type ProductTileBlockListDef = ProductTileContent &
|
|
68
|
+
export declare type ProductTileBlockListDef = ProductTileContent & {
|
|
69
|
+
blockListType: 'ProductTile';
|
|
70
|
+
};
|
|
51
71
|
/**
|
|
52
72
|
* @title Галлерея
|
|
73
|
+
* @default {"blockListType": "Gallery"}
|
|
53
74
|
*/
|
|
54
|
-
export declare type GalleryBlockListDef = GalleryContent &
|
|
75
|
+
export declare type GalleryBlockListDef = GalleryContent & {
|
|
76
|
+
blockListType: 'Gallery';
|
|
77
|
+
};
|
|
55
78
|
/**
|
|
56
79
|
* @title Мини-галлерея
|
|
80
|
+
* @default {"blockListType": "MiniGallery"}
|
|
57
81
|
*/
|
|
58
|
-
export declare type MiniGalleryBlockListDef = MiniGalleryContent &
|
|
82
|
+
export declare type MiniGalleryBlockListDef = MiniGalleryContent & {
|
|
83
|
+
blockListType: 'MiniGallery';
|
|
84
|
+
};
|
|
59
85
|
/**
|
|
60
86
|
* @title Список ссылок
|
|
87
|
+
* @default {"blockListType": "LinkList"}
|
|
61
88
|
*/
|
|
62
|
-
export declare type LinkListBlockListDef = LinkListContent &
|
|
89
|
+
export declare type LinkListBlockListDef = LinkListContent & {
|
|
90
|
+
blockListType: 'LinkList';
|
|
91
|
+
};
|
|
63
92
|
/**
|
|
64
93
|
* @title Выберите блок
|
|
65
94
|
*/
|
|
@@ -68,4 +97,3 @@ export declare type EmptyOption = null;
|
|
|
68
97
|
* @title Содержимое блока
|
|
69
98
|
*/
|
|
70
99
|
export declare type BlockDef = EmptyOption | HeadlineBlockListDef | LinkDocsBlockListDef | TextBlockBlockListDef | PictureTextBlockListDef | ProductBlockBlockListDef | TileBlockListDef | ProductTileBlockListDef | GalleryBlockListDef | MiniGalleryBlockListDef | LinkListBlockListDef;
|
|
71
|
-
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
2
2
|
import type { BlockDef, ColumnsCount } from './BlocksListProps';
|
|
3
|
+
import { BlockVersion } from '../../model/BlockVersion';
|
|
3
4
|
declare type EmbeddableBlocksProps = {
|
|
4
5
|
blocks?: BlockDef[];
|
|
5
6
|
context: ContentPageContext;
|
|
6
7
|
columns?: ColumnsCount;
|
|
7
8
|
className?: string;
|
|
9
|
+
version?: BlockVersion;
|
|
8
10
|
};
|
|
9
|
-
export declare const renderBlocksList: ({ blocks, context, className, columns }: EmbeddableBlocksProps) => any[] | null;
|
|
10
|
-
export declare const renderBlock: ({ context, columns, className }: EmbeddableBlocksProps) => (block: BlockDef, i: number) => any;
|
|
11
|
+
export declare const renderBlocksList: ({ blocks, context, className, columns, version, }: EmbeddableBlocksProps) => any[] | null;
|
|
12
|
+
export declare const renderBlock: ({ context, columns, className, version }: EmbeddableBlocksProps) => (block: BlockDef, i: number) => any;
|
|
11
13
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { EmbeddableBlocks } from './EmbeddableBlocks.js';
|
|
3
|
-
export const renderBlocksList = ({ blocks, context, className, columns }) => blocks?.length ? blocks.map(renderBlock({ context, className, columns })) : null;
|
|
4
|
-
export const renderBlock = ({ context, columns, className }) => (block, i) => {
|
|
3
|
+
export const renderBlocksList = ({ blocks, context, className, columns, version, }) => blocks?.length ? blocks.map(renderBlock({ context, className, columns, version })) : null;
|
|
4
|
+
export const renderBlock = ({ context, columns, className, version }) => (block, i) => {
|
|
5
5
|
const type = block?.blockListType;
|
|
6
6
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
9
|
const columnsCountClass = columns === 2 ? 'w-1/2' : '';
|
|
10
10
|
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
11
|
-
return (_jsx("div", { className: `${className} ${columnsCountClass}`, children: _jsx(EmbeddedBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
|
|
11
|
+
return (_jsx("div", { className: `${className} ${columnsCountClass}`, children: _jsx(EmbeddedBlock, { context: context, ...block, blockVersion: version, className: "!p-0" }) }, `block_${i}`));
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=renderBlocksList.js.map
|