@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
|
@@ -4,77 +4,60 @@ import { HEADLINE } from '../Headline/Headline.fixture';
|
|
|
4
4
|
import { linkDocsContentExample } from '../LinkDocs/linkDocsContentExample';
|
|
5
5
|
import { defaultProps as MINI_GALLERY } from '../MiniGallery/MiniGallery.fixture';
|
|
6
6
|
import { PICTURE_TEXT } from '../PictureText/PictureText.fixture';
|
|
7
|
-
import {
|
|
8
|
-
import { PRODUCT_TILE, PRODUCT_PENSION_TILE } from '../ProductTile/ProductTile.fixture';
|
|
7
|
+
import { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
|
|
9
8
|
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
10
|
-
import { TILE
|
|
9
|
+
import { TILE } from '../Tile/Tile.fixture';
|
|
11
10
|
import type { AccordionProps } from './Accordion';
|
|
12
11
|
import { Accordion } from './Accordion';
|
|
13
12
|
import type {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
accordionBlockType: 'TextBlock',
|
|
13
|
+
GalleryBlockListDef,
|
|
14
|
+
HeadlineBlockListDef,
|
|
15
|
+
LinkDocsBlockListDef,
|
|
16
|
+
MiniGalleryBlockListDef,
|
|
17
|
+
PictureTextBlockListDef,
|
|
18
|
+
ProductTileBlockListDef,
|
|
19
|
+
TextBlockBlockListDef,
|
|
20
|
+
TileBlockListDef,
|
|
21
|
+
} from '../../ui-kit/BlocksList/BlocksListProps';
|
|
22
|
+
|
|
23
|
+
const TEXT_BLOCK_ACCORDION_BLOCK: TextBlockBlockListDef = {
|
|
24
|
+
blockListType: 'TextBlock',
|
|
27
25
|
...TEXT_BLOCK,
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
const HEADLINE_ACCORDION_BLOCK:
|
|
31
|
-
|
|
28
|
+
const HEADLINE_ACCORDION_BLOCK: HeadlineBlockListDef = {
|
|
29
|
+
blockListType: 'Headline',
|
|
32
30
|
...HEADLINE,
|
|
33
31
|
};
|
|
34
32
|
|
|
35
|
-
const PICTURE_TEXT_ACCORDION_BLOCK:
|
|
36
|
-
|
|
33
|
+
const PICTURE_TEXT_ACCORDION_BLOCK: PictureTextBlockListDef = {
|
|
34
|
+
blockListType: 'PictureText',
|
|
37
35
|
...PICTURE_TEXT,
|
|
38
36
|
};
|
|
39
37
|
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
...PRODUCT_BLOCK,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const LINK_DOCS_ACCORDION_BLOCK: LinkDocsAccordionBlockDef = {
|
|
46
|
-
accordionBlockType: 'LinkDocs',
|
|
38
|
+
const LINK_DOCS_ACCORDION_BLOCK: LinkDocsBlockListDef = {
|
|
39
|
+
blockListType: 'LinkDocs',
|
|
47
40
|
...linkDocsContentExample,
|
|
48
41
|
title: '',
|
|
49
42
|
};
|
|
50
43
|
|
|
51
|
-
const TILES_ACCORDION_BLOCK:
|
|
52
|
-
|
|
44
|
+
const TILES_ACCORDION_BLOCK: TileBlockListDef = {
|
|
45
|
+
blockListType: 'Tile',
|
|
53
46
|
...TILE,
|
|
54
47
|
};
|
|
55
48
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
...TILE_PREMIUM,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const PRODUCT_TILES_ACCORDION_BLOCK: ProductTileAccordionBlockDef = {
|
|
62
|
-
accordionBlockType: 'ProductTile',
|
|
49
|
+
const PRODUCT_TILES_ACCORDION_BLOCK: ProductTileBlockListDef = {
|
|
50
|
+
blockListType: 'ProductTile',
|
|
63
51
|
...PRODUCT_TILE,
|
|
64
52
|
};
|
|
65
53
|
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
...PRODUCT_PENSION_TILE,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const GALLERY_ACCORDION_BLOCK: GalleryAccordionBlockDef = {
|
|
72
|
-
accordionBlockType: 'Gallery',
|
|
54
|
+
const GALLERY_ACCORDION_BLOCK: GalleryBlockListDef = {
|
|
55
|
+
blockListType: 'Gallery',
|
|
73
56
|
...GALLERY,
|
|
74
57
|
};
|
|
75
58
|
|
|
76
|
-
const MINI_GALLERY_ACCORDION_BLOCK:
|
|
77
|
-
|
|
59
|
+
const MINI_GALLERY_ACCORDION_BLOCK: MiniGalleryBlockListDef = {
|
|
60
|
+
blockListType: 'MiniGallery',
|
|
78
61
|
...MINI_GALLERY,
|
|
79
62
|
};
|
|
80
63
|
|
|
@@ -116,58 +99,10 @@ const propsBlock: AccordionProps = {
|
|
|
116
99
|
],
|
|
117
100
|
};
|
|
118
101
|
|
|
119
|
-
const propsTwoColumns: AccordionProps = {
|
|
120
|
-
context,
|
|
121
|
-
accordionItems: [
|
|
122
|
-
{
|
|
123
|
-
label: 'Другие продукты Россельхозбанка 1',
|
|
124
|
-
blocks: [
|
|
125
|
-
TILES_PREMIUM_ACCORDION_BLOCK,
|
|
126
|
-
TILES_PREMIUM_ACCORDION_BLOCK,
|
|
127
|
-
TILES_ACCORDION_BLOCK,
|
|
128
|
-
TILES_ACCORDION_BLOCK,
|
|
129
|
-
],
|
|
130
|
-
columns: 2,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
label: 'Другие продукты Россельхозбанка 2',
|
|
134
|
-
blocks: [
|
|
135
|
-
PRODUCT_TILES_ACCORDION_BLOCK,
|
|
136
|
-
PRODUCT_TILES_ACCORDION_BLOCK,
|
|
137
|
-
PRODUCT_PENSION_TILES__ACCORDION_BLOCK,
|
|
138
|
-
PRODUCT_PENSION_TILES__ACCORDION_BLOCK,
|
|
139
|
-
],
|
|
140
|
-
columns: 2,
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
label: 'Другие продукты Россельхозбанка 3',
|
|
144
|
-
blocks: [PRODUCT_BLOCK_ACCORDION_BLOCK, PRODUCT_BLOCK_ACCORDION_BLOCK],
|
|
145
|
-
columns: 2,
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
{
|
|
149
|
-
label: 'Другие продукты Россельхозбанка 4',
|
|
150
|
-
blocks: [
|
|
151
|
-
TEXT_BLOCK_ACCORDION_BLOCK,
|
|
152
|
-
TEXT_BLOCK_ACCORDION_BLOCK,
|
|
153
|
-
TEXT_BLOCK_ACCORDION_BLOCK,
|
|
154
|
-
TEXT_BLOCK_ACCORDION_BLOCK,
|
|
155
|
-
],
|
|
156
|
-
columns: 2,
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
};
|
|
160
|
-
|
|
161
102
|
export default {
|
|
162
103
|
default: (
|
|
163
104
|
<div className="container grid grid-cols-12">
|
|
164
105
|
<Accordion className="col-span-12" {...propsBlock} />
|
|
165
106
|
</div>
|
|
166
107
|
),
|
|
167
|
-
|
|
168
|
-
'two columns': (
|
|
169
|
-
<div className="container grid grid-cols-12">
|
|
170
|
-
<Accordion className="col-span-12" {...propsTwoColumns} />
|
|
171
|
-
</div>
|
|
172
|
-
),
|
|
173
108
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
3
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
5
|
import type { AccordionContent } from './AccordionContent';
|
|
@@ -6,17 +7,29 @@ import { AccordionItem } from './AccordionItem';
|
|
|
6
7
|
|
|
7
8
|
export interface AccordionProps extends AccordionContent, UniBlockProps {}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
const accordionStyleMap: Record<BlockVersion, string> = {
|
|
11
|
+
primary: 'bg-white text-primary-text',
|
|
12
|
+
secondary: 'bg-primary-main text-white',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Accordion = JSX<AccordionProps>(
|
|
16
|
+
({ title, accordionItems, context, className = '', version = 'primary' }) => {
|
|
17
|
+
return (
|
|
18
|
+
<section className={`p-[50px] font-sans ${className} ${accordionStyleMap[version]}`}>
|
|
19
|
+
{title ? <Heading headingType="h4" className="mb-2.5" title={title} /> : null}
|
|
20
|
+
{accordionItems?.length ? (
|
|
21
|
+
<ul className="list-none m-0 p-0">
|
|
22
|
+
{accordionItems.map((item, i) => (
|
|
23
|
+
<AccordionItem
|
|
24
|
+
key={`AccordionItem${i}`}
|
|
25
|
+
{...item}
|
|
26
|
+
version={version}
|
|
27
|
+
context={context}
|
|
28
|
+
/>
|
|
29
|
+
))}
|
|
30
|
+
</ul>
|
|
31
|
+
) : null}
|
|
32
|
+
</section>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
@@ -1,110 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
|
|
4
|
-
import type { MiniGalleryContent } from '../MiniGallery/MiniGalleryContent';
|
|
5
|
-
import type { PictureTextContent } from '../PictureText/PictureTextContent';
|
|
6
|
-
import type { ProductBlockContent } from '../ProductBlock/ProductBlockContent';
|
|
7
|
-
import type { ProductTileContent } from '../ProductTile/ProductTileContent';
|
|
8
|
-
import type { TextBlockContent } from '../TextBlock/TextBlockContent';
|
|
9
|
-
import type { TileContent } from '../Tile/TileContent';
|
|
10
|
-
import type { LinkListContent } from '../LinkList/LinkListContent';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @title Тип блока
|
|
14
|
-
*/
|
|
15
|
-
export type AccordionBlockType =
|
|
16
|
-
| 'Headline'
|
|
17
|
-
| 'LinkDocs'
|
|
18
|
-
| 'TextBlock'
|
|
19
|
-
| 'PictureText'
|
|
20
|
-
| 'Tile'
|
|
21
|
-
| 'ProductTile'
|
|
22
|
-
| 'ProductBlock'
|
|
23
|
-
| 'Gallery'
|
|
24
|
-
| 'MiniGallery'
|
|
25
|
-
| 'LinkList';
|
|
26
|
-
|
|
27
|
-
interface AccordionBlockDef {
|
|
28
|
-
accordionBlockType: AccordionBlockType;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @title Заголовок
|
|
33
|
-
*/
|
|
34
|
-
export type HeadlineAccordionBlockDef = HeadlineContent & AccordionBlockDef;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @title Список документов
|
|
38
|
-
*/
|
|
39
|
-
export type LinkDocsAccordionBlockDef = LinkDocsContent & AccordionBlockDef;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @title Текстовый блок
|
|
43
|
-
*/
|
|
44
|
-
export type TextBlockAccordionBlockDef = TextBlockContent & AccordionBlockDef;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @title Картинка с текстом
|
|
48
|
-
*/
|
|
49
|
-
export type PictureTextAccordionBlockDef = PictureTextContent & AccordionBlockDef;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @title Продуктовый блок
|
|
53
|
-
*/
|
|
54
|
-
export type ProductBlockAccordionBlockDef = ProductBlockContent & AccordionBlockDef;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @title Плитка
|
|
58
|
-
*/
|
|
59
|
-
export type TileAccordionBlockDef = TileContent & AccordionBlockDef;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @title Продуктовая плитка
|
|
63
|
-
*/
|
|
64
|
-
export type ProductTileAccordionBlockDef = ProductTileContent & AccordionBlockDef;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @title Галлерея
|
|
68
|
-
*/
|
|
69
|
-
export type GalleryAccordionBlockDef = GalleryContent & AccordionBlockDef;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @title Мини-галлерея
|
|
73
|
-
*/
|
|
74
|
-
export type MiniGalleryAccordionBlockDef = MiniGalleryContent & AccordionBlockDef;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @title Список ссылок
|
|
78
|
-
*/
|
|
79
|
-
export type LinkListAccordionBlockDef = LinkListContent & AccordionBlockDef;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @title Выберите блок
|
|
83
|
-
*/
|
|
84
|
-
export type EmptyOption = null;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @title Содержимое аккордеона
|
|
88
|
-
*/
|
|
89
|
-
export type AccordionBlockProps =
|
|
90
|
-
| EmptyOption
|
|
91
|
-
| HeadlineAccordionBlockDef
|
|
92
|
-
| LinkDocsAccordionBlockDef
|
|
93
|
-
| TextBlockAccordionBlockDef
|
|
94
|
-
| PictureTextAccordionBlockDef
|
|
95
|
-
| ProductBlockAccordionBlockDef
|
|
96
|
-
| TileAccordionBlockDef
|
|
97
|
-
| ProductTileAccordionBlockDef
|
|
98
|
-
| GalleryAccordionBlockDef
|
|
99
|
-
| MiniGalleryAccordionBlockDef
|
|
100
|
-
| LinkListAccordionBlockDef;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @title Количество колонок
|
|
104
|
-
* @enumNames ["1 колонка", "2 колонки"]
|
|
105
|
-
*/
|
|
106
|
-
export type ColumnsCount = 1 | 2;
|
|
107
|
-
|
|
1
|
+
import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
108
3
|
/**
|
|
109
4
|
* @title Элемент списка
|
|
110
5
|
*/
|
|
@@ -114,13 +9,18 @@ export interface AccordionItemCommonProps {
|
|
|
114
9
|
* @default Список
|
|
115
10
|
*/
|
|
116
11
|
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @title Отображать в раскрытом виде
|
|
14
|
+
*/
|
|
15
|
+
isExpanded?: boolean;
|
|
117
16
|
/** @title Блоки */
|
|
118
|
-
blocks?:
|
|
17
|
+
blocks?: BlockDef[];
|
|
119
18
|
/**
|
|
120
19
|
* @title Отображать/скрывать обводку элемента
|
|
121
20
|
* @default false
|
|
122
21
|
*/
|
|
123
22
|
bordered?: boolean; // TODO: только для мобильной версии
|
|
23
|
+
version?: BlockVersion;
|
|
124
24
|
|
|
125
25
|
columns?: ColumnsCount;
|
|
126
26
|
}
|
|
@@ -131,9 +31,10 @@ export interface AccordionItemCommonProps {
|
|
|
131
31
|
export interface AccordionContent {
|
|
132
32
|
/** @title Заголовок */
|
|
133
33
|
title?: string;
|
|
34
|
+
version?: BlockVersion;
|
|
134
35
|
/** @title Список */
|
|
135
36
|
accordionItems?: AccordionItemCommonProps[];
|
|
136
|
-
/** @title
|
|
37
|
+
/** @title Описание */
|
|
137
38
|
description?: string; // TODO: только для мобильной версии
|
|
138
39
|
/**
|
|
139
40
|
* @title Отображать/скрывать обводку у элемента списка
|
|
@@ -3,12 +3,12 @@ import type { UniBlockProps } from '../../types';
|
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import type { AccordionItemCommonProps } from './AccordionContent';
|
|
5
5
|
import { AccordionItemInner } from './AccordionItemInner';
|
|
6
|
-
import {
|
|
6
|
+
import { useActiveHandler } from './useActiveHandler';
|
|
7
7
|
|
|
8
8
|
export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
|
|
9
9
|
|
|
10
10
|
export const AccordionItem = JSX<AccordionItemProps>(({ label, blocks, bordered, context }) => {
|
|
11
|
-
const { hasContent, icon, handleToggle } =
|
|
11
|
+
const { hasContent, icon, handleToggle } = useActiveHandler({
|
|
12
12
|
context,
|
|
13
13
|
blocks,
|
|
14
14
|
});
|
|
@@ -1,37 +1,59 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
3
4
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
5
|
import type { AccordionItemCommonProps } from './AccordionContent';
|
|
5
6
|
import { AccordionItemInner } from './AccordionItemInner';
|
|
6
|
-
import {
|
|
7
|
+
import { useActiveHandler } from './useActiveHandler';
|
|
7
8
|
|
|
8
9
|
export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
11
|
+
const buttonStyleMap: Record<BlockVersion, string> = {
|
|
12
|
+
primary: 'text-primary-text',
|
|
13
|
+
secondary: 'text-white',
|
|
14
|
+
};
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const buttonHoverStyleMap: Record<BlockVersion, string> = {
|
|
17
|
+
primary: 'group-hover:text-primary-main',
|
|
18
|
+
secondary: 'group-hover:text-white',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const AccordionItem = JSX<AccordionItemProps>(
|
|
22
|
+
({ label, isExpanded, blocks, columns, context, version = 'primary' }) => {
|
|
23
|
+
const { isActive, hasContent, icon, handleToggle } = useActiveHandler({
|
|
24
|
+
context,
|
|
25
|
+
blocks,
|
|
26
|
+
initialState: isExpanded,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<li className="border-0 border-b border-solid border-main-divider last:border-b-0">
|
|
31
|
+
<button
|
|
32
|
+
className={`border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans ${
|
|
33
|
+
buttonStyleMap[version]
|
|
34
|
+
}
|
|
20
35
|
${hasContent ? 'group cursor-pointer' : ''}`}
|
|
21
|
-
|
|
22
|
-
>
|
|
23
|
-
<span
|
|
24
|
-
className={`text-xl pr-2.5 font-medium ${
|
|
25
|
-
hasContent ? 'group-hover:text-primary-main' : ''
|
|
26
|
-
}`}
|
|
36
|
+
onClick={handleToggle}
|
|
27
37
|
>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
<span
|
|
39
|
+
className={`text-xl pr-2.5 font-medium ${
|
|
40
|
+
hasContent ? buttonHoverStyleMap[version] : ''
|
|
41
|
+
}`}
|
|
42
|
+
>
|
|
43
|
+
{label}
|
|
44
|
+
</span>
|
|
45
|
+
{hasContent ? <Icon name={icon} width="24" height="24" asSVG /> : null}
|
|
46
|
+
</button>
|
|
47
|
+
{hasContent ? (
|
|
48
|
+
<AccordionItemInner
|
|
49
|
+
isExpanded={isActive}
|
|
50
|
+
columns={columns}
|
|
51
|
+
blocks={blocks}
|
|
52
|
+
version={version}
|
|
53
|
+
context={context}
|
|
54
|
+
/>
|
|
55
|
+
) : null}
|
|
56
|
+
</li>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
);
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { JSXBlock } from '../ContentPage/ContentPage';
|
|
3
|
-
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
4
|
-
import { AccordionBlocks } from './AccordionBlocks';
|
|
5
|
-
import type { AccordionBlockProps } from './AccordionContent';
|
|
6
2
|
import type { AccordionItemProps } from './AccordionItem';
|
|
3
|
+
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
7
4
|
|
|
8
|
-
export const AccordionItemInner = JSX<AccordionItemProps>(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const AccordionBlock: JSXBlock = AccordionBlocks[type];
|
|
23
|
-
return (
|
|
24
|
-
<div className="mb-5 last:mb-0 first:mt-2" key={`block_${i}`}>
|
|
25
|
-
<AccordionBlock context={context} {...block} className="!p-0" />
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
5
|
+
export const AccordionItemInner = JSX<AccordionItemProps>(
|
|
6
|
+
({ blocks, context, version = 'primary' }) => {
|
|
7
|
+
const className = 'mb-5 last:mb-0 first:mt-2';
|
|
8
|
+
const columns = 1;
|
|
9
|
+
return (
|
|
10
|
+
<div className="transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
|
|
11
|
+
{renderBlocksList({ context, className, columns, blocks, version })}
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
},
|
|
15
|
+
);
|
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { JSXBlock } from '../ContentPage/ContentPage';
|
|
3
|
-
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
4
|
-
import { AccordionBlocks } from './AccordionBlocks';
|
|
5
|
-
import type { AccordionBlockProps } from './AccordionContent';
|
|
6
2
|
import type { AccordionItemProps } from './AccordionItem';
|
|
3
|
+
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
7
4
|
|
|
8
|
-
export const AccordionItemInner = JSX<AccordionItemProps>(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className={
|
|
12
|
-
'transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 flex flex-wrap'
|
|
13
|
-
}
|
|
14
|
-
>
|
|
15
|
-
{blocks?.length ? blocks.map(renderBlock(context, columns)) : null}
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const renderBlock =
|
|
21
|
-
(context: ContentPageContext, columns: number) => (block: AccordionBlockProps, i: number) => {
|
|
22
|
-
const type = block?.accordionBlockType;
|
|
23
|
-
if (!type || !(type in AccordionBlocks)) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const columnsCountClass = columns === 2 ? 'w-1/2' : '';
|
|
27
|
-
const AccordionBlock: JSXBlock = AccordionBlocks[type];
|
|
5
|
+
export const AccordionItemInner = JSX<AccordionItemProps>(
|
|
6
|
+
({ blocks, columns = 1, context, version = 'primary' }) => {
|
|
7
|
+
const className = 'mb-5 last:mb-0 pb-5';
|
|
28
8
|
return (
|
|
29
|
-
<div className=
|
|
30
|
-
|
|
9
|
+
<div className="transition-all duration-300 max-h-0 overflow-hidden">
|
|
10
|
+
{renderBlocksList({ context, className, columns, blocks, version })}
|
|
31
11
|
</div>
|
|
32
12
|
);
|
|
33
|
-
}
|
|
13
|
+
},
|
|
14
|
+
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IconName } from '
|
|
1
|
+
import type { IconName } from '../../icons/IconName';
|
|
2
|
+
import { ActiveHandler } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
-
const [isActive, setIsActive] = context.useState(
|
|
4
|
+
export const useActiveHandler = ({ context, blocks, initialState = false }: ActiveHandler) => {
|
|
5
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
5
6
|
const hasContent = blocks?.length;
|
|
6
7
|
const icon: IconName = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
7
8
|
|
package/src/components/Blocks.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
|
18
18
|
import { ProductGalleryGreen } from './ProductGalleryGreen/ProductGalleryGreen';
|
|
19
19
|
import { ProductTile } from './ProductTile/ProductTile';
|
|
20
20
|
import { PromoTile } from './PromoTile/PromoTile';
|
|
21
|
+
import { OtherProducts } from './OtherProducts/OtherProducts';
|
|
21
22
|
import { Recommendation } from './Recommendation/Recommendation';
|
|
22
23
|
import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
23
24
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
@@ -43,6 +44,7 @@ export const Blocks = {
|
|
|
43
44
|
ProductGalleryGreen,
|
|
44
45
|
ProductTile,
|
|
45
46
|
PromoTile,
|
|
47
|
+
OtherProducts,
|
|
46
48
|
Recommendation,
|
|
47
49
|
StepsBlock,
|
|
48
50
|
TariffsTable,
|
|
@@ -49,6 +49,24 @@ export interface RowHeader {
|
|
|
49
49
|
/** @title Заголовок */
|
|
50
50
|
title?: string;
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @title Ячейка
|
|
55
|
+
*/
|
|
56
|
+
export interface TableColumnData {
|
|
57
|
+
rowHeader?: string;
|
|
58
|
+
cell: CellData[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @title Параметр
|
|
63
|
+
*/
|
|
64
|
+
export interface TableColumnHeader {
|
|
65
|
+
/** @title Заголовок */
|
|
66
|
+
title?: string;
|
|
67
|
+
icon?: IconName;
|
|
68
|
+
}
|
|
69
|
+
|
|
52
70
|
/**
|
|
53
71
|
* @title Сравнительная таблица
|
|
54
72
|
*/
|
|
@@ -5,10 +5,11 @@ import { Button } from '../../ui-kit/Button/Button';
|
|
|
5
5
|
import { GRADIENT } from './constants';
|
|
6
6
|
import { HeaderCell } from './HeaderCell';
|
|
7
7
|
import { TableCell } from './TableCell';
|
|
8
|
+
import type { TableColumnData, TableColumnHeader } from './ComparisonTableContent';
|
|
8
9
|
|
|
9
10
|
export interface TableColumnProps extends UniBlockProps {
|
|
10
|
-
header:
|
|
11
|
-
columnData:
|
|
11
|
+
header: TableColumnHeader;
|
|
12
|
+
columnData: TableColumnData[];
|
|
12
13
|
visibleRowLength: number;
|
|
13
14
|
isFillGradient: boolean;
|
|
14
15
|
showRow: boolean;
|
|
@@ -1394,7 +1394,7 @@
|
|
|
1394
1394
|
"title": "Своя кредитная карта",
|
|
1395
1395
|
"description": "Карта работает в 180 странах мира. Бесплатное снятие наличных в любых банкоматах.",
|
|
1396
1396
|
"align": "center",
|
|
1397
|
-
"
|
|
1397
|
+
"bgColorHeadline": "transparent"
|
|
1398
1398
|
}
|
|
1399
1399
|
},
|
|
1400
1400
|
{
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"image": {
|
|
7
7
|
"format": "webp",
|
|
8
8
|
"size": {
|
|
9
|
-
"width":
|
|
10
|
-
"height":
|
|
9
|
+
"width": 150,
|
|
10
|
+
"height": 150
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"title": "Заголовок 1",
|
|
@@ -55,24 +55,6 @@
|
|
|
55
55
|
{"text":"Элемент списка 2", "title": "Элемент заголовка 2"},
|
|
56
56
|
{"text":"Элемент списка 3", "title": "Элемент заголовка 3"}
|
|
57
57
|
]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"image": {
|
|
61
|
-
"format": "webp",
|
|
62
|
-
"size": {
|
|
63
|
-
"width": 140,
|
|
64
|
-
"height": 140
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"title": "Заголовок 4",
|
|
68
|
-
"description": "Описание 4",
|
|
69
|
-
"href": "/credit-cards",
|
|
70
|
-
"version": "primary",
|
|
71
|
-
"items": [
|
|
72
|
-
{"text":"Элемент списка 1", "title": "Элемент заголовка 1"},
|
|
73
|
-
{"text":"Элемент списка 2", "title": "Элемент заголовка 2"},
|
|
74
|
-
{"text":"Элемент списка 3", "title": "Элемент заголовка 3"}
|
|
75
|
-
]
|
|
76
58
|
}
|
|
77
59
|
]
|
|
78
60
|
}
|