@redneckz/wildless-cms-uni-blocks 0.3.20 → 0.3.23
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 +233 -21
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/ArrowDownIcon.svg +1 -0
- package/cosmos-static/icons/ArrowUpIcon.svg +1 -0
- package/dist/components/Accordion/Accordion.js +6 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +10 -73
- package/dist/components/Accordion/AccordionItem.js +14 -5
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +2 -2
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.js +4 -12
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +5 -11
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/dist/components/Accordion/useActiveHandler.d.ts +7 -0
- package/{mobile/dist/components/Accordion/utils/isActiveHandler.js → dist/components/Accordion/useActiveHandler.js} +5 -5
- package/dist/components/Accordion/useActiveHandler.js.map +1 -0
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
- package/dist/components/ComparisonTable/HeaderCell.d.ts +1 -0
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +1 -1
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- 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 +1 -1
- package/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
- package/dist/components/OtherProducts/OtherProducts.js +9 -0
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +39 -0
- package/dist/components/OtherProducts/OtherProductsContent.js +2 -0
- package/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
- package/dist/components/OtherProducts/OtherProductsItem.js +16 -0
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
- package/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
- package/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
- package/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/dist/components/OtherProducts/useActiveHandler.js +21 -0
- package/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/dist/content-page-repository/transformPicture.js +2 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/icons/IconName.d.ts +81 -2
- package/dist/icons/IconName.js +82 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/BlockVersion.d.ts +1 -1
- package/dist/model/Picture.d.ts +2 -2
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
- package/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
- package/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- package/dist/ui-kit/Heading/Heading.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/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.fixture.d.ts +0 -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 +10 -73
- package/lib/components/Accordion/AccordionItem.js +14 -5
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +2 -2
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.js +4 -12
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +5 -11
- 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/isActiveHandler.js → lib/components/Accordion/useActiveHandler.js} +3 -3
- package/lib/components/Accordion/useActiveHandler.js.map +1 -0
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
- package/lib/components/ComparisonTable/HeaderCell.d.ts +1 -0
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- 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 +1 -1
- package/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +5 -0
- package/lib/components/OtherProducts/OtherProducts.js +7 -0
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +39 -0
- package/lib/components/OtherProducts/OtherProductsContent.js +2 -0
- package/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
- package/lib/components/OtherProducts/OtherProductsItem.js +14 -0
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
- package/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
- package/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
- package/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/lib/components/OtherProducts/useActiveHandler.js +18 -0
- package/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/lib/content-page-repository/transformPicture.js +2 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/icons/IconName.d.ts +81 -2
- package/lib/icons/IconName.js +81 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/BlockVersion.d.ts +1 -1
- package/lib/model/Picture.d.ts +2 -2
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
- package/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
- package/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- package/lib/ui-kit/Heading/Heading.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/SearchBar/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +183 -19
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +10 -73
- package/mobile/dist/components/Accordion/AccordionItem.js +2 -2
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.js +5 -11
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/dist/components/Accordion/useActiveHandler.d.ts +7 -0
- package/{dist/components/Accordion/utils/isActiveHandler.js → mobile/dist/components/Accordion/useActiveHandler.js} +5 -5
- package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
- package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +1 -1
- 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 +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
- package/mobile/dist/components/OtherProducts/OtherProducts.js +9 -0
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +39 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js +2 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +16 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
- package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/mobile/dist/components/OtherProducts/useActiveHandler.js +21 -0
- package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +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/icons/IconName.d.ts +81 -2
- package/mobile/dist/icons/IconName.js +82 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/BlockVersion.d.ts +1 -1
- package/mobile/dist/model/Picture.d.ts +2 -2
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- 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/SearchBar/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +10 -73
- package/mobile/lib/components/Accordion/AccordionItem.js +2 -2
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.js +5 -11
- 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/isActiveHandler.js → mobile/lib/components/Accordion/useActiveHandler.js} +3 -3
- package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
- package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +1 -1
- 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 +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
- package/mobile/lib/components/OtherProducts/OtherProducts.js +7 -0
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +39 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js +2 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +14 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
- package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
- package/mobile/lib/components/OtherProducts/useActiveHandler.js +18 -0
- package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +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/icons/IconName.d.ts +81 -2
- package/mobile/lib/icons/IconName.js +81 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/BlockVersion.d.ts +1 -1
- package/mobile/lib/model/Picture.d.ts +2 -2
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- 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/SearchBar/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/src/components/Accordion/Accordion.example.json +6 -6
- package/mobile/src/components/Accordion/AccordionContent.ts +10 -109
- package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +12 -25
- package/mobile/src/components/Accordion/{utils/isActiveHandler.ts → useActiveHandler.ts} +4 -3
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +18 -0
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +3 -2
- package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
- package/mobile/src/components/Gallery/Gallery.example.json +2 -20
- package/mobile/src/components/Gallery/GalleryContent.ts +1 -1
- package/mobile/src/components/Headline/Headline.example.json +8 -1
- package/mobile/src/components/LinkDocs/LinkDocs.example.json +2 -2
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +3 -1
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
- package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +50 -0
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +20 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +41 -0
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +38 -0
- package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
- package/mobile/src/components/OtherProducts/useActiveHandler.ts +24 -0
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +2 -1
- package/mobile/src/components/ProductGallery/ProductGallery.example.json +2 -1
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +1 -0
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +3 -1
- package/mobile/src/components/TextBlock/TextBlock.example.json +2 -2
- package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/mobile/src/content-page-repository/transformPicture.ts +2 -1
- package/mobile/src/icons/ArrowDownIcon.svg +4 -0
- package/mobile/src/icons/ArrowUpIcon.svg +4 -0
- package/mobile/src/icons/IconName.ts +8 -3
- package/mobile/src/model/BlockVersion.ts +1 -1
- package/mobile/src/model/Picture.ts +2 -2
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +104 -0
- package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +38 -0
- package/mobile/src/ui-kit/Icon/Icon.tsx +2 -1
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.example.json +6 -6
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +13 -13
- package/src/components/Accordion/Accordion.fixture.tsx +28 -93
- package/src/components/Accordion/Accordion.tsx +27 -14
- package/src/components/Accordion/AccordionContent.ts +10 -109
- package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
- package/src/components/Accordion/AccordionItem.tsx +48 -26
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +12 -25
- package/src/components/Accordion/AccordionItemInner.tsx +8 -27
- package/src/components/Accordion/{utils/isActiveHandler.ts → useActiveHandler.ts} +4 -3
- package/src/components/Blocks.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTableContent.ts +18 -0
- package/src/components/ComparisonTable/HeaderCell.tsx +1 -0
- package/src/components/ComparisonTable/TableColumn.tsx +3 -2
- package/src/components/ContentPage/ContentPage.page.json +1 -1
- package/src/components/Gallery/Gallery.example.json +2 -20
- package/src/components/Gallery/GalleryContent.ts +1 -1
- package/src/components/Headline/Headline.example.json +8 -1
- package/src/components/Headline/Headline.tsx +4 -2
- package/src/components/LinkDocs/LinkDocs.example.json +2 -2
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +3 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
- package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +1 -1
- package/src/components/OtherProducts/OtherProducts.example.json +50 -0
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +137 -0
- package/src/components/OtherProducts/OtherProducts.tsx +20 -0
- package/src/components/OtherProducts/OtherProductsContent.ts +41 -0
- package/src/components/OtherProducts/OtherProductsItem.tsx +38 -0
- package/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
- package/src/components/OtherProducts/useActiveHandler.ts +24 -0
- package/src/components/ProductBlock/ProductBlock.example.json +2 -1
- package/src/components/ProductGallery/ProductGallery.example.json +2 -1
- package/src/components/StepsBlock/StepsBlock.example.json +1 -0
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +3 -1
- package/src/components/TextBlock/TextBlock.example.json +2 -2
- package/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/src/content-page-repository/transformPicture.ts +2 -1
- package/src/icons/ArrowDownIcon.svg +4 -0
- package/src/icons/ArrowUpIcon.svg +4 -0
- package/src/icons/IconName.ts +82 -148
- package/src/model/BlockVersion.ts +1 -1
- package/src/model/Picture.ts +2 -2
- package/src/ui-kit/BlocksList/BlocksListProps.ts +104 -0
- package/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +38 -0
- package/src/ui-kit/Heading/Heading.tsx +1 -3
- package/src/ui-kit/Icon/Icon.tsx +2 -1
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
- package/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
- package/dist/components/Accordion/AccordionBlocks.js +0 -25
- package/dist/components/Accordion/AccordionBlocks.js.map +0 -1
- package/dist/components/Accordion/utils/isActiveHandler.d.ts +0 -9
- package/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
- package/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
- package/lib/components/Accordion/AccordionBlocks.js +0 -23
- package/lib/components/Accordion/AccordionBlocks.js.map +0 -1
- package/lib/components/Accordion/utils/isActiveHandler.d.ts +0 -9
- package/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
- package/mobile/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
- package/mobile/dist/components/Accordion/AccordionBlocks.js +0 -25
- package/mobile/dist/components/Accordion/AccordionBlocks.js.map +0 -1
- package/mobile/dist/components/Accordion/utils/isActiveHandler.d.ts +0 -9
- package/mobile/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
- package/mobile/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
- package/mobile/lib/components/Accordion/AccordionBlocks.js +0 -23
- package/mobile/lib/components/Accordion/AccordionBlocks.js.map +0 -1
- package/mobile/lib/components/Accordion/utils/isActiveHandler.d.ts +0 -9
- package/mobile/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
- package/mobile/src/components/Accordion/AccordionBlocks.tsx +0 -23
- package/src/components/Accordion/AccordionBlocks.tsx +0 -23
|
@@ -15,12 +15,14 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
15
15
|
{title && (
|
|
16
16
|
<Heading
|
|
17
17
|
headingType="h2"
|
|
18
|
-
className={`text-primary-text ${ALIGN_TEXT[align]}`}
|
|
18
|
+
className={`text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}
|
|
19
19
|
title={title}
|
|
20
20
|
/>
|
|
21
21
|
)}
|
|
22
22
|
{description && (
|
|
23
|
-
<p className={`font-normal text-base mt-4 ${ALIGN_TEXT[align]}`}>
|
|
23
|
+
<p className={`font-normal text-base mt-4 ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}>
|
|
24
|
+
{description}
|
|
25
|
+
</p>
|
|
24
26
|
)}
|
|
25
27
|
</section>
|
|
26
28
|
);
|
|
@@ -19,7 +19,9 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
19
19
|
hasBorder = true,
|
|
20
20
|
}) => {
|
|
21
21
|
return (
|
|
22
|
-
<section
|
|
22
|
+
<section
|
|
23
|
+
className={`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`}
|
|
24
|
+
>
|
|
23
25
|
{title ? (
|
|
24
26
|
<Heading
|
|
25
27
|
headingType="h2"
|
|
@@ -34,7 +34,7 @@ export interface LinkDocsItem extends LinkProps {
|
|
|
34
34
|
export interface LinkDocsContent {
|
|
35
35
|
/** @title Заголовок */
|
|
36
36
|
title?: string;
|
|
37
|
-
/** @title
|
|
37
|
+
/** @title Описание */
|
|
38
38
|
subtitle?: string;
|
|
39
39
|
/** @title Название иконки */
|
|
40
40
|
icon?: IconName;
|
|
@@ -16,7 +16,7 @@ export const LinkDocsHorizontalList = JSX<LinkDocsHorizontalListProps>(
|
|
|
16
16
|
? documents.map((doc, i) => (
|
|
17
17
|
<LinkDocsListItem
|
|
18
18
|
key={String(i)}
|
|
19
|
-
className={hasBorder ? 'rounded-md border-main-stroke border p-4' : ''}
|
|
19
|
+
className={hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : ''}
|
|
20
20
|
doc={doc}
|
|
21
21
|
icon={icon}
|
|
22
22
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { IconName } from '../../
|
|
2
|
+
import type { IconName } from '../../icons/IconName';
|
|
3
3
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
4
4
|
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
5
5
|
|
|
@@ -20,7 +20,9 @@ export const LinkDocsVerticalList = JSX<LinkDocsVerticalListProps>(
|
|
|
20
20
|
? documents.map((doc, i) => (
|
|
21
21
|
<div key={String(i)} role="listitem">
|
|
22
22
|
<LinkDocsListItem
|
|
23
|
-
className={
|
|
23
|
+
className={
|
|
24
|
+
hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : ''
|
|
25
|
+
}
|
|
24
26
|
doc={doc}
|
|
25
27
|
icon={icon}
|
|
26
28
|
/>
|
|
@@ -19,7 +19,7 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
19
19
|
<div className="flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]">
|
|
20
20
|
<Logo className="w-[33px]" bgColor="transparent" hideTitle />
|
|
21
21
|
</div>
|
|
22
|
-
<a href={href} target="_blank" className="flex flex-col justify-center pl-3">
|
|
22
|
+
<a href={href} target="_blank" className="flex flex-col justify-center pl-3 font-sans">
|
|
23
23
|
<div className="text-m-button font-medium mb-[3px]">{title}</div>
|
|
24
24
|
<div className="text-m-button text-secondary-text">{description}</div>
|
|
25
25
|
</a>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Другие продукты",
|
|
3
|
+
"blockItems": [
|
|
4
|
+
{
|
|
5
|
+
"label": "Другие продукты 1",
|
|
6
|
+
"blocks": [
|
|
7
|
+
{
|
|
8
|
+
"blockListType": "TextBlock",
|
|
9
|
+
"title": "Текстовый блок",
|
|
10
|
+
"description": "Описание текстового блока"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"blockListType": "TextBlock",
|
|
14
|
+
"title": "Текстовый блок №2",
|
|
15
|
+
"description": "Описание текстового блока №2"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"label": "Другие продукты 2",
|
|
21
|
+
"blocks": [
|
|
22
|
+
{
|
|
23
|
+
"blockListType": "TextBlock",
|
|
24
|
+
"title": "Текстовый блок",
|
|
25
|
+
"description": "Описание текстового блока"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"blockListType": "TextBlock",
|
|
29
|
+
"title": "Текстовый блок №2",
|
|
30
|
+
"description": "Описание текстового блока №2"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"label": "Другие продукты 3",
|
|
36
|
+
"blocks": [
|
|
37
|
+
{
|
|
38
|
+
"blockListType": "TextBlock",
|
|
39
|
+
"title": "Текстовый блок",
|
|
40
|
+
"description": "Описание текстового блока"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"blockListType": "TextBlock",
|
|
44
|
+
"title": "Текстовый блок №2",
|
|
45
|
+
"description": "Описание текстового блока №2"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
import { PRODUCT_BLOCK } from '../ProductBlock/ProductBlock.fixture';
|
|
3
|
+
import { PRODUCT_TILE, PRODUCT_PENSION_TILE } from '../ProductTile/ProductTile.fixture';
|
|
4
|
+
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
5
|
+
import { TILE, TILE_PREMIUM } from '../Tile/Tile.fixture';
|
|
6
|
+
import type { OtherProductsProps } from './OtherProducts';
|
|
7
|
+
import { OtherProducts } from './OtherProducts';
|
|
8
|
+
import type {
|
|
9
|
+
ProductBlockBlockListDef,
|
|
10
|
+
ProductTileBlockListDef,
|
|
11
|
+
TextBlockBlockListDef,
|
|
12
|
+
TileBlockListDef,
|
|
13
|
+
} from '../../ui-kit/BlocksList/BlocksListProps';
|
|
14
|
+
|
|
15
|
+
const TEXT_BLOCK_OTHER_BLOCK: TextBlockBlockListDef = {
|
|
16
|
+
blockListType: 'TextBlock',
|
|
17
|
+
...TEXT_BLOCK,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const PRODUCT_BLOCK_OTHER_BLOCK: ProductBlockBlockListDef = {
|
|
21
|
+
blockListType: 'ProductBlock',
|
|
22
|
+
...PRODUCT_BLOCK,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const TILES_OTHER_BLOCK: TileBlockListDef = {
|
|
26
|
+
blockListType: 'Tile',
|
|
27
|
+
...TILE,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const TILES_PREMIUM_OTHER_BLOCK: TileBlockListDef = {
|
|
31
|
+
blockListType: 'Tile',
|
|
32
|
+
...TILE_PREMIUM,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const PRODUCT_TILES_OTHER_BLOCK: ProductTileBlockListDef = {
|
|
36
|
+
blockListType: 'ProductTile',
|
|
37
|
+
...PRODUCT_TILE,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const PRODUCT_PENSION_TILES__OTHER_BLOCK: ProductTileBlockListDef = {
|
|
41
|
+
blockListType: 'ProductTile',
|
|
42
|
+
...PRODUCT_PENSION_TILE,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const propsBlock: OtherProductsProps = {
|
|
46
|
+
context,
|
|
47
|
+
blockItems: [
|
|
48
|
+
{
|
|
49
|
+
label: 'Другие кредитные карты Россельхозбанка 1',
|
|
50
|
+
blocks: [
|
|
51
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
52
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
53
|
+
TILES_OTHER_BLOCK,
|
|
54
|
+
TILES_OTHER_BLOCK,
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Другие кредитные карты Россельхозбанка 2',
|
|
59
|
+
blocks: [
|
|
60
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
61
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
62
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
63
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Другие кредитные карты Россельхозбанка 3',
|
|
68
|
+
blocks: [PRODUCT_BLOCK_OTHER_BLOCK, PRODUCT_BLOCK_OTHER_BLOCK],
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
label: 'Другие кредитные карты Россельхозбанка 4',
|
|
73
|
+
blocks: [
|
|
74
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
75
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
76
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
77
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const propsTwoColumns: OtherProductsProps = {
|
|
84
|
+
context,
|
|
85
|
+
blockItems: [
|
|
86
|
+
{
|
|
87
|
+
label: 'Другие кредитные карты Россельхозбанка 1',
|
|
88
|
+
blocks: [
|
|
89
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
90
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
91
|
+
TILES_OTHER_BLOCK,
|
|
92
|
+
TILES_OTHER_BLOCK,
|
|
93
|
+
],
|
|
94
|
+
columns: 2,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Другие кредитные карты Россельхозбанка 2',
|
|
98
|
+
blocks: [
|
|
99
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
100
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
101
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
102
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
103
|
+
],
|
|
104
|
+
columns: 2,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Другие кредитные карты Россельхозбанка 3',
|
|
108
|
+
blocks: [PRODUCT_BLOCK_OTHER_BLOCK, PRODUCT_BLOCK_OTHER_BLOCK],
|
|
109
|
+
columns: 2,
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
{
|
|
113
|
+
label: 'Другие кредитные карты Россельхозбанка 4',
|
|
114
|
+
blocks: [
|
|
115
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
116
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
117
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
118
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
119
|
+
],
|
|
120
|
+
columns: 2,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default {
|
|
126
|
+
default: (
|
|
127
|
+
<div className="container grid grid-cols-12">
|
|
128
|
+
<OtherProducts className="col-span-12" {...propsBlock} />
|
|
129
|
+
</div>
|
|
130
|
+
),
|
|
131
|
+
|
|
132
|
+
'two columns': (
|
|
133
|
+
<div className="container grid grid-cols-12">
|
|
134
|
+
<OtherProducts className="col-span-12" {...propsTwoColumns} />
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
137
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { OtherProductsContent } from './OtherProductsContent';
|
|
4
|
+
import { OtherProductsItem } from './OtherProductsItem';
|
|
5
|
+
|
|
6
|
+
export interface OtherProductsProps extends OtherProductsContent, UniBlockProps {}
|
|
7
|
+
|
|
8
|
+
export const OtherProducts = JSX<OtherProductsProps>(({ blockItems, context, className }) => {
|
|
9
|
+
return (
|
|
10
|
+
<section className={`font-sans bg-white text-primary-text ${className || ''}`}>
|
|
11
|
+
{blockItems?.length ? (
|
|
12
|
+
<div className="list-none m-0 p-0">
|
|
13
|
+
{blockItems.map((item, i) => (
|
|
14
|
+
<OtherProductsItem key={`BlockItem${i}`} {...item} context={context} />
|
|
15
|
+
))}
|
|
16
|
+
</div>
|
|
17
|
+
) : null}
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title Элемент списка
|
|
5
|
+
*/
|
|
6
|
+
export interface blockItemCommonProps {
|
|
7
|
+
/**
|
|
8
|
+
* @title Название
|
|
9
|
+
* @default Список
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @title Отображать в раскрытом виде
|
|
14
|
+
*/
|
|
15
|
+
isExpanded?: boolean;
|
|
16
|
+
/** @title Блоки */
|
|
17
|
+
blocks?: BlockDef[];
|
|
18
|
+
/**
|
|
19
|
+
* @title Отображать/скрывать обводку элемента
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
bordered?: boolean; // TODO: только для мобильной версии
|
|
23
|
+
columns?: ColumnsCount;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @title Другие продукты
|
|
28
|
+
*/
|
|
29
|
+
export interface OtherProductsContent {
|
|
30
|
+
/** @title Заголовок */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** @title Список */
|
|
33
|
+
blockItems?: blockItemCommonProps[];
|
|
34
|
+
/** @title Подзаголовок */
|
|
35
|
+
description?: string; // TODO: только для мобильной версии
|
|
36
|
+
/**
|
|
37
|
+
* @title Отображать/скрывать обводку у элемента списка
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
bordered?: boolean; // TODO: только для мобильной версии
|
|
41
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useActiveHandler } from './useActiveHandler';
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import type { blockItemCommonProps } from './OtherProductsContent';
|
|
5
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
6
|
+
import { OtherProductsItemInner } from './OtherProductsItemInner';
|
|
7
|
+
|
|
8
|
+
export interface BlockItemProps extends blockItemCommonProps, UniBlockProps {}
|
|
9
|
+
|
|
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
|
+
});
|
|
17
|
+
|
|
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-[25px] 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
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockItemProps } from './OtherProductsItem';
|
|
3
|
+
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
4
|
+
|
|
5
|
+
export const OtherProductsItemInner = JSX<BlockItemProps>(({ blocks, columns = 1, context }) => {
|
|
6
|
+
const className = 'box-border p-5';
|
|
7
|
+
return (
|
|
8
|
+
<div className="transition-all duration-300 max-h-0 overflow-hidden">
|
|
9
|
+
<div className={`box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`}>
|
|
10
|
+
{renderBlocksList({ context, className, columns, blocks })}
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IconName } from '../../icons/IconName';
|
|
2
|
+
import { ActiveHandler } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
3
|
+
|
|
4
|
+
export const useActiveHandler = ({ context, blocks, initialState = false }: ActiveHandler) => {
|
|
5
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
6
|
+
const hasContent = blocks?.length;
|
|
7
|
+
const icon: IconName = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
8
|
+
|
|
9
|
+
const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
|
|
10
|
+
|
|
11
|
+
const handleToggle = (e: MouseEvent) => {
|
|
12
|
+
if (!hasContent) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
setIsActive(!isActive);
|
|
17
|
+
const contentBlock = getContentBlock(e);
|
|
18
|
+
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
19
|
+
? null
|
|
20
|
+
: `${contentBlock.scrollHeight}px`;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return { isActive, hasContent, icon, handleToggle };
|
|
24
|
+
};
|
|
@@ -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"
|
|
@@ -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,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M13.8416 10.709L11.6582 12.8923C11.0166 13.534 9.96657 13.534 9.3249 12.8923L3.8999 7.45898" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M17.1001 7.45898L16.2334 8.32565" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M13.3416 9.29163L11.1582 7.10829C10.5166 6.46662 9.46657 6.46662 8.8249 7.10829L3.3999 12.5416" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M16.6001 12.5416L15.7334 11.675" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|