@redneckz/wildless-cms-uni-blocks 0.3.61 → 0.3.63
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 +100 -39
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/AirPlane.svg +1 -0
- package/cosmos-static/icons/CarIcon.svg +1 -0
- package/cosmos-static/icons/CinemaIcon.svg +1 -0
- package/cosmos-static/icons/DocsIcon.svg +1 -0
- package/cosmos-static/icons/PowerIcon.svg +1 -0
- package/cosmos-static/icons/PumpkinIcon.svg +1 -0
- package/cosmos-static/icons/SoundIcon.svg +1 -0
- package/cosmos-static/icons/WateringCan.svg +1 -0
- package/dist/components/Accordion/Accordion.js +7 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +3 -0
- package/dist/components/BaseTile/BaseTileProps.d.ts +1 -9
- package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -3
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BlockContent.d.ts +2 -1
- 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/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +14 -0
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
- package/dist/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
- package/dist/components/BonusBenefitsBlock/getElementsColsValue.js +17 -0
- package/dist/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +1 -1
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +1 -1
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +1 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +1 -1
- package/dist/components/Headline/constants.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -2
- package/dist/components/OtherProducts/OtherProductsItem.js +10 -7
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +1 -1
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +8 -3
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -5
- package/dist/components/TextBlock/TextBlock.js +1 -1
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/icons/IconName.d.ts +22 -6
- package/dist/icons/IconName.js +18 -2
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/AlignType.d.ts +9 -0
- package/dist/model/AlignType.js +2 -0
- package/dist/model/AlignType.js.map +1 -0
- package/dist/model/VNode.d.ts +1 -0
- package/dist/model/VNode.js +2 -0
- package/dist/model/VNode.js.map +1 -0
- package/dist/ui-kit/Foldable/Foldable.d.ts +20 -0
- package/dist/ui-kit/Foldable/Foldable.js +22 -0
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -0
- package/dist/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
- package/dist/ui-kit/Foldable/useActiveHandler.js +22 -0
- package/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -0
- package/dist/ui-kit/Logo/Logo.mobile.js +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.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/dist/ui-kit/SearchBar.mobile.js +1 -1
- package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +1 -0
- package/lib/components/Accordion/Accordion.js +7 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +3 -0
- package/lib/components/BaseTile/BaseTileProps.d.ts +1 -9
- package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -3
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BlockContent.d.ts +2 -1
- 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/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.d.ts +4 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +12 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
- package/lib/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
- package/lib/components/BonusBenefitsBlock/getElementsColsValue.js +14 -0
- package/lib/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +1 -1
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +1 -1
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +1 -1
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +1 -1
- package/lib/components/Headline/constants.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -2
- package/lib/components/OtherProducts/OtherProductsItem.js +11 -8
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +1 -1
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +8 -3
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -5
- package/lib/components/TextBlock/TextBlock.js +1 -1
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/icons/IconName.d.ts +22 -6
- package/lib/icons/IconName.js +18 -2
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/AlignType.d.ts +9 -0
- package/lib/model/AlignType.js +2 -0
- package/lib/model/AlignType.js.map +1 -0
- package/lib/model/VNode.d.ts +1 -0
- package/lib/model/VNode.js +2 -0
- package/lib/model/VNode.js.map +1 -0
- package/lib/ui-kit/Foldable/Foldable.d.ts +20 -0
- package/lib/ui-kit/Foldable/Foldable.js +20 -0
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -0
- package/lib/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
- package/lib/ui-kit/Foldable/useActiveHandler.js +19 -0
- package/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -0
- package/lib/ui-kit/Logo/Logo.mobile.js +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.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/lib/ui-kit/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +28 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +3 -0
- package/mobile/dist/components/BaseTile/BaseTileProps.d.ts +1 -9
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -3
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BlockContent.d.ts +2 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +14 -0
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
- package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
- package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.js +17 -0
- package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +1 -1
- package/mobile/dist/components/Headline/constants.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -2
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +10 -7
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -5
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +22 -6
- package/mobile/dist/icons/IconName.js +18 -2
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/AlignType.d.ts +9 -0
- package/mobile/dist/model/AlignType.js +2 -0
- package/mobile/dist/model/AlignType.js.map +1 -0
- package/mobile/dist/model/VNode.d.ts +1 -0
- package/mobile/dist/model/VNode.js +2 -0
- package/mobile/dist/model/VNode.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +20 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js +22 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.js +22 -0
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -0
- package/mobile/dist/ui-kit/Logo/Logo.js +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.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 +3 -0
- package/mobile/lib/components/BaseTile/BaseTileProps.d.ts +1 -9
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -3
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +2 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +12 -0
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
- package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
- package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.js +14 -0
- package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +1 -1
- package/mobile/lib/components/Headline/constants.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -2
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +11 -8
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -5
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +22 -6
- package/mobile/lib/icons/IconName.js +18 -2
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/AlignType.d.ts +9 -0
- package/mobile/lib/model/AlignType.js +2 -0
- package/mobile/lib/model/AlignType.js.map +1 -0
- package/mobile/lib/model/VNode.d.ts +1 -0
- package/mobile/lib/model/VNode.js +2 -0
- package/mobile/lib/model/VNode.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +20 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js +20 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.js +19 -0
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -0
- package/mobile/lib/ui-kit/Logo/Logo.js +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.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/AccordionContent.ts +3 -0
- package/mobile/src/components/BaseTile/BaseTileProps.ts +1 -10
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +6 -8
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +54 -0
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +49 -0
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +23 -0
- package/mobile/src/components/BonusBenefitsBlock/getElementsColsValue.ts +12 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +4 -4
- package/mobile/src/components/ComparisonTable/TableCell.tsx +4 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +4 -4
- package/mobile/src/components/Headline/Headline.tsx +4 -4
- package/mobile/src/components/Headline/HeadlineContent.ts +1 -1
- package/mobile/src/components/Headline/constants.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +33 -23
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +2 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
- package/mobile/src/components/Recommendation/Recommendation.tsx +4 -4
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +9 -9
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +7 -5
- package/mobile/src/components/Tile/Tile.tsx +4 -4
- package/mobile/src/icons/AirPlane.svg +98 -0
- package/mobile/src/icons/ArrowUpIcon.svg +1 -1
- package/mobile/src/icons/ArrowsRewindRight.svg +1 -1
- package/mobile/src/icons/CarIcon.svg +466 -0
- package/mobile/src/icons/CinemaIcon.svg +274 -0
- package/mobile/src/icons/DocsIcon.svg +238 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/PowerIcon.svg +135 -0
- package/mobile/src/icons/PumpkinIcon.svg +236 -0
- package/mobile/src/icons/SoundIcon.svg +113 -0
- package/mobile/src/icons/WateringCan.svg +497 -0
- package/mobile/src/model/AlignType.ts +9 -0
- package/mobile/src/model/VNode.ts +1 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +81 -0
- package/mobile/src/ui-kit/Foldable/useActiveHandler.ts +34 -0
- package/mobile/src/ui-kit/Logo/Logo.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.fixture.tsx +24 -2
- package/src/components/Accordion/Accordion.tsx +23 -2
- package/src/components/Accordion/AccordionContent.ts +3 -0
- package/src/components/BaseTile/BaseTileProps.ts +1 -10
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +6 -8
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +54 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +50 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +49 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +23 -0
- package/src/components/BonusBenefitsBlock/getElementsColsValue.ts +12 -0
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +4 -4
- package/src/components/ComparisonTable/TableCell.mobile.tsx +4 -4
- package/src/components/ComparisonTable/TableCell.tsx +4 -4
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +4 -4
- package/src/components/Headline/Headline.mobile.tsx +4 -4
- package/src/components/Headline/Headline.tsx +4 -4
- package/src/components/Headline/HeadlineContent.ts +1 -1
- package/src/components/Headline/constants.ts +1 -1
- package/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/MobileAppTile/MobileAppTile.tsx +2 -2
- package/src/components/OtherProducts/OtherProductsContent.ts +1 -1
- package/src/components/OtherProducts/OtherProductsItem.tsx +33 -23
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +2 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +9 -11
- package/src/components/ProductTile/ProductTile.tsx +2 -2
- package/src/components/Recommendation/Recommendation.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +9 -9
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +4 -1
- package/src/components/TariffsTable/TariffsTable.tsx +55 -18
- package/src/components/TariffsTable/TariffsTableContent.ts +7 -5
- package/src/components/TextBlock/TextBlock.tsx +4 -4
- package/src/components/Tile/Tile.tsx +4 -4
- package/src/icons/AirPlane.svg +98 -0
- package/src/icons/ArrowUpIcon.svg +1 -1
- package/src/icons/ArrowsRewindRight.svg +1 -1
- package/src/icons/CarIcon.svg +466 -0
- package/src/icons/CinemaIcon.svg +274 -0
- package/src/icons/DocsIcon.svg +238 -0
- package/src/icons/IconName.ts +28 -4
- package/src/icons/PowerIcon.svg +135 -0
- package/src/icons/PumpkinIcon.svg +236 -0
- package/src/icons/SoundIcon.svg +113 -0
- package/src/icons/WateringCan.svg +497 -0
- package/src/model/AlignType.ts +9 -0
- package/src/model/VNode.ts +1 -0
- package/src/ui-kit/Foldable/Foldable.tsx +81 -0
- package/src/ui-kit/Foldable/useActiveHandler.ts +34 -0
- package/src/ui-kit/Logo/Logo.mobile.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/src/ui-kit/SearchBar.mobile.tsx +1 -1
- package/dist/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
- package/dist/components/OtherProducts/OtherProductsItemInner.js +0 -10
- package/dist/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
- package/dist/components/OtherProducts/useActiveHandler.d.ts +0 -7
- package/dist/components/OtherProducts/useActiveHandler.js +0 -21
- package/dist/components/OtherProducts/useActiveHandler.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
- package/lib/components/OtherProducts/OtherProductsItemInner.js +0 -8
- package/lib/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
- package/lib/components/OtherProducts/useActiveHandler.d.ts +0 -7
- package/lib/components/OtherProducts/useActiveHandler.js +0 -18
- package/lib/components/OtherProducts/useActiveHandler.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js +0 -10
- package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
- package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +0 -7
- package/mobile/dist/components/OtherProducts/useActiveHandler.js +0 -21
- package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js +0 -8
- package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
- package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +0 -7
- package/mobile/lib/components/OtherProducts/useActiveHandler.js +0 -18
- package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +0 -1
- package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +0 -14
- package/mobile/src/components/OtherProducts/useActiveHandler.ts +0 -24
- package/src/components/OtherProducts/OtherProductsItemInner.tsx +0 -14
- package/src/components/OtherProducts/useActiveHandler.ts +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VNode = unknown;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
+
import type { VNode } from '../../model/VNode';
|
|
4
|
+
import { ColorPalette } from '../../types';
|
|
5
|
+
import { clamp } from '../../utils/clamp';
|
|
6
|
+
import { Icon } from '../Icon/Icon';
|
|
7
|
+
import { foldableBlockClassNames, useActiveHandler } from './useActiveHandler';
|
|
8
|
+
|
|
9
|
+
export type FoldableBlocks = VNode[];
|
|
10
|
+
export type Render = (_: VNode, isActive: boolean) => VNode;
|
|
11
|
+
export interface FoldableProps {
|
|
12
|
+
context: ContentPageContext;
|
|
13
|
+
foldButtonLabel?: string;
|
|
14
|
+
hiddenBlocksNum?: number;
|
|
15
|
+
blocks?: FoldableBlocks;
|
|
16
|
+
foldButtonClasses?: string;
|
|
17
|
+
foldButtonDataTheme?: ColorPalette;
|
|
18
|
+
isUnfolded?: boolean;
|
|
19
|
+
render?: Render;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RenderBlocksParams {
|
|
23
|
+
blocksToHide: number;
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Foldable = JSX<FoldableProps>(
|
|
28
|
+
({
|
|
29
|
+
blocks = [],
|
|
30
|
+
context,
|
|
31
|
+
hiddenBlocksNum = 0,
|
|
32
|
+
foldButtonClasses,
|
|
33
|
+
foldButtonLabel,
|
|
34
|
+
foldButtonDataTheme,
|
|
35
|
+
isUnfolded,
|
|
36
|
+
render = (_) => _,
|
|
37
|
+
}) => {
|
|
38
|
+
const blocksToHide = clamp(hiddenBlocksNum, 0, blocks.length);
|
|
39
|
+
|
|
40
|
+
const { icon, handleToggle, isActive } = useActiveHandler({
|
|
41
|
+
context,
|
|
42
|
+
initialState: isUnfolded,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return blocks ? (
|
|
46
|
+
<div>
|
|
47
|
+
{renderBlocks(blocks, render, { blocksToHide, isActive })}
|
|
48
|
+
{hiddenBlocksNum ? (
|
|
49
|
+
<button
|
|
50
|
+
className={
|
|
51
|
+
foldButtonClasses ||
|
|
52
|
+
'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer'
|
|
53
|
+
}
|
|
54
|
+
data-theme={foldButtonDataTheme}
|
|
55
|
+
onClick={handleToggle}
|
|
56
|
+
>
|
|
57
|
+
<span className="pr-3">{isActive ? 'Скрыть' : foldButtonLabel}</span>
|
|
58
|
+
<Icon name={icon} width="20" height="20" asSVG />
|
|
59
|
+
</button>
|
|
60
|
+
) : null}
|
|
61
|
+
</div>
|
|
62
|
+
) : null;
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const renderBlocks = (
|
|
67
|
+
blocks: FoldableBlocks,
|
|
68
|
+
render: Render,
|
|
69
|
+
{ blocksToHide, isActive }: RenderBlocksParams,
|
|
70
|
+
) => {
|
|
71
|
+
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
72
|
+
const hiddenBlocks = blocks.slice(-blocksToHide);
|
|
73
|
+
|
|
74
|
+
return render(
|
|
75
|
+
<div>
|
|
76
|
+
{visibleBlocks}
|
|
77
|
+
<div className={foldableBlockClassNames}>{hiddenBlocks}</div>
|
|
78
|
+
</div>,
|
|
79
|
+
isActive,
|
|
80
|
+
);
|
|
81
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
2
|
+
import type { IconName } from '../../icons/IconName';
|
|
3
|
+
|
|
4
|
+
export const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
5
|
+
|
|
6
|
+
export interface ActiveHandler {
|
|
7
|
+
context: ContentPageContext;
|
|
8
|
+
initialState?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const useActiveHandler = ({ context, initialState = false }: ActiveHandler) => {
|
|
12
|
+
const [isActive, setIsActive] = context.useState(initialState);
|
|
13
|
+
const icon: IconName = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
14
|
+
|
|
15
|
+
const handleToggle = (e: MouseEvent) => {
|
|
16
|
+
const currentTarget = e.currentTarget as HTMLElement;
|
|
17
|
+
|
|
18
|
+
if (!currentTarget) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setIsActive(!isActive);
|
|
23
|
+
const wrapperBlock = currentTarget.previousSibling as HTMLElement;
|
|
24
|
+
const contentBlock = wrapperBlock.getElementsByClassName(
|
|
25
|
+
foldableBlockClassNames,
|
|
26
|
+
)[0] as HTMLElement;
|
|
27
|
+
|
|
28
|
+
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
29
|
+
? ''
|
|
30
|
+
: `${contentBlock.scrollHeight}px`;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return { icon, handleToggle, isActive };
|
|
34
|
+
};
|
|
@@ -40,7 +40,7 @@ export const Logo = JSX<Partial<LogoProps>>(
|
|
|
40
40
|
viewBox="0 0 40 45"
|
|
41
41
|
paths={LOGO_PATHS.map((d) => ({ d }))}
|
|
42
42
|
/>
|
|
43
|
-
{
|
|
43
|
+
{hideTitle ? null : (
|
|
44
44
|
<span className={`${TEXT_COLOR[bgColor]} text-sm font-medium ml-2.5`}>
|
|
45
45
|
{children || 'Россельхозбанк'}
|
|
46
46
|
</span>
|
|
@@ -10,7 +10,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
10
10
|
<div className="w-[20px] h-[20px]">
|
|
11
11
|
<Img image="LoupeIcon" width="24" height="24" />
|
|
12
12
|
</div>
|
|
13
|
-
{
|
|
13
|
+
{term ? null : (
|
|
14
14
|
<label
|
|
15
15
|
htmlFor="search-bar-input"
|
|
16
16
|
className="font-sans font-normal text-sm text-secondary-text"
|
package/package.json
CHANGED
|
@@ -61,7 +61,7 @@ const MINI_GALLERY_ACCORDION_BLOCK: MiniGalleryBlockListDef = {
|
|
|
61
61
|
...MINI_GALLERY,
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
const
|
|
64
|
+
const propsDefaultBlock: AccordionProps = {
|
|
65
65
|
context,
|
|
66
66
|
title: 'Accordion title',
|
|
67
67
|
description: 'Accordion description',
|
|
@@ -101,10 +101,32 @@ const propsBlock: AccordionProps = {
|
|
|
101
101
|
],
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
+
const propsRightAlignTitleBlock: AccordionProps = {
|
|
105
|
+
context,
|
|
106
|
+
title: 'Accordion title',
|
|
107
|
+
accordionAlignTitle: 'right',
|
|
108
|
+
description: 'Accordion description',
|
|
109
|
+
accordionItems: [
|
|
110
|
+
{
|
|
111
|
+
label: 'Accordion label 1',
|
|
112
|
+
blocks: [TEXT_BLOCK_ACCORDION_BLOCK, TEXT_BLOCK_ACCORDION_BLOCK],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: 'Accordion label 2',
|
|
116
|
+
blocks: [PICTURE_TEXT_ACCORDION_BLOCK],
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
|
|
104
121
|
export default {
|
|
105
122
|
default: (
|
|
106
123
|
<div className="container grid grid-cols-12">
|
|
107
|
-
<Accordion className="col-span-12" {...
|
|
124
|
+
<Accordion className="col-span-12" {...propsDefaultBlock} />
|
|
125
|
+
</div>
|
|
126
|
+
),
|
|
127
|
+
'right-align-title': (
|
|
128
|
+
<div className="container grid grid-cols-12">
|
|
129
|
+
<Accordion className="col-span-12" {...propsRightAlignTitleBlock} />
|
|
108
130
|
</div>
|
|
109
131
|
),
|
|
110
132
|
};
|
|
@@ -3,14 +3,35 @@ import type { UniBlockProps } from '../../types';
|
|
|
3
3
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
4
|
import type { AccordionContent } from './AccordionContent';
|
|
5
5
|
import { AccordionItem } from './AccordionItem';
|
|
6
|
+
import { AlignType } from '../../model/AlignType';
|
|
7
|
+
|
|
8
|
+
const ALIGN_TITLE: Record<AlignType, string> = {
|
|
9
|
+
left: 'text-left',
|
|
10
|
+
center: 'text-center',
|
|
11
|
+
right: 'text-right',
|
|
12
|
+
};
|
|
6
13
|
|
|
7
14
|
export interface AccordionProps extends AccordionContent, UniBlockProps {}
|
|
8
15
|
|
|
9
16
|
export const Accordion = JSX<AccordionProps>(
|
|
10
|
-
({
|
|
17
|
+
({
|
|
18
|
+
title,
|
|
19
|
+
description,
|
|
20
|
+
accordionItems,
|
|
21
|
+
context,
|
|
22
|
+
className = '',
|
|
23
|
+
anchor = null,
|
|
24
|
+
accordionAlignTitle = 'center',
|
|
25
|
+
}) => {
|
|
11
26
|
return (
|
|
12
27
|
<section className={`p-[50px] font-sans bg-white text-primary-text ${className}`} id={anchor}>
|
|
13
|
-
{title ?
|
|
28
|
+
{title ? (
|
|
29
|
+
<Heading
|
|
30
|
+
headingType="h4"
|
|
31
|
+
className={`mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`}
|
|
32
|
+
title={title}
|
|
33
|
+
/>
|
|
34
|
+
) : null}
|
|
14
35
|
{description ? <div className="mb-2.5 text-base">{description}</div> : null}
|
|
15
36
|
{accordionItems?.length ? (
|
|
16
37
|
<ul className="list-none m-0 p-0">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BlockDef } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
|
+
import type { AlignType } from '../../model/AlignType';
|
|
4
5
|
/**
|
|
5
6
|
* @title Элемент списка
|
|
6
7
|
*/
|
|
@@ -30,6 +31,8 @@ export interface AccordionItemCommonProps {
|
|
|
30
31
|
export interface AccordionContent {
|
|
31
32
|
/** @title Заголовок */
|
|
32
33
|
title?: string;
|
|
34
|
+
/** @title Выравнивание заголовка */
|
|
35
|
+
accordionAlignTitle?: AlignType;
|
|
33
36
|
version?: BlockVersion;
|
|
34
37
|
/** @title Список */
|
|
35
38
|
accordionItems?: AccordionItemCommonProps[];
|
|
@@ -2,16 +2,7 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
4
|
import type { HeadingType } from '../../ui-kit/Heading/HeadingContent';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @title Выравнивание
|
|
8
|
-
* @enumNames [
|
|
9
|
-
* "По левому краю",
|
|
10
|
-
* "По центру",
|
|
11
|
-
* "По правому краю"
|
|
12
|
-
* ]
|
|
13
|
-
*/
|
|
14
|
-
export type AlignType = 'left' | 'center' | 'right';
|
|
5
|
+
import type { AlignType } from '../../model/AlignType';
|
|
15
6
|
|
|
16
7
|
/**
|
|
17
8
|
* @title Общий компонент плиток
|
|
@@ -7,12 +7,10 @@ import type { Benefit, BenefitsBlockContent } from './BenefitsBlockContent';
|
|
|
7
7
|
export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
|
|
8
8
|
|
|
9
9
|
export const BenefitsBlock = JSX<BenefitsBlockProps>(
|
|
10
|
-
({ className, title, benefits, anchor = null }) => {
|
|
10
|
+
({ className = '', title, benefits, anchor = null }) => {
|
|
11
11
|
return (
|
|
12
12
|
<section
|
|
13
|
-
className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${
|
|
14
|
-
className || ''
|
|
15
|
-
}`}
|
|
13
|
+
className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className}`}
|
|
16
14
|
id={anchor}
|
|
17
15
|
>
|
|
18
16
|
{title ? (
|
|
@@ -29,7 +27,7 @@ export const BenefitsBlock = JSX<BenefitsBlockProps>(
|
|
|
29
27
|
const renderStep = (benefit: Benefit, i: number) => {
|
|
30
28
|
return (
|
|
31
29
|
<div key={String(i)} className="flex items-center gap-5 max-w-[500px]">
|
|
32
|
-
{benefit
|
|
30
|
+
{benefit?.icon ? (
|
|
33
31
|
<Img
|
|
34
32
|
className="h-[70px] w-[70px] min-w-[70px] min-h-[70px]"
|
|
35
33
|
image={benefit.icon}
|
|
@@ -38,10 +36,10 @@ const renderStep = (benefit: Benefit, i: number) => {
|
|
|
38
36
|
/>
|
|
39
37
|
) : null}
|
|
40
38
|
<div>
|
|
41
|
-
<h3 className="font-medium text-xl m-0">{benefit.label}</h3>
|
|
42
|
-
{benefit
|
|
39
|
+
{benefit?.label ? <h3 className="font-medium text-xl m-0">{benefit.label}</h3> : null}
|
|
40
|
+
{benefit?.description ? (
|
|
43
41
|
<div className="font-normal text-sm mt-2">{benefit.description}</div>
|
|
44
|
-
)}
|
|
42
|
+
) : null}
|
|
45
43
|
</div>
|
|
46
44
|
</div>
|
|
47
45
|
);
|
|
@@ -22,6 +22,7 @@ import type { StepsBlockContent } from './StepsBlock/StepsBlockContent';
|
|
|
22
22
|
import type { TariffsTableContent } from './TariffsTable/TariffsTableContent';
|
|
23
23
|
import type { TextBlockContent } from './TextBlock/TextBlockContent';
|
|
24
24
|
import type { TileContent } from './Tile/TileContent';
|
|
25
|
+
import type { BonusBenefitsBlockContent } from './BonusBenefitsBlock/BonusBenefitsBlockContent';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* @hidden
|
|
@@ -50,4 +51,5 @@ export type BlockContent =
|
|
|
50
51
|
| TileContent
|
|
51
52
|
| NavigationContent
|
|
52
53
|
| LinkListContent
|
|
53
|
-
| GroupBlockContent
|
|
54
|
+
| GroupBlockContent
|
|
55
|
+
| BonusBenefitsBlockContent;
|
package/src/components/Blocks.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
|
29
29
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
30
30
|
import { Tile } from './Tile/Tile';
|
|
31
31
|
import { GroupBlock } from './GroupBlock/GroupBlock';
|
|
32
|
+
import { BonusBenefitsBlock } from './BonusBenefitsBlock/BonusBenefitsBlock';
|
|
32
33
|
|
|
33
34
|
export const Blocks = {
|
|
34
35
|
Accordion,
|
|
@@ -62,4 +63,5 @@ export const Blocks = {
|
|
|
62
63
|
Navigation,
|
|
63
64
|
Placeholder,
|
|
64
65
|
GroupBlock,
|
|
66
|
+
BonusBenefitsBlock,
|
|
65
67
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Вы можете оплатить бонусными баллами",
|
|
3
|
+
"subtitle": "Удобный каталог с большим ассортиментом товаров и сервисов",
|
|
4
|
+
"bonusBenefits": [
|
|
5
|
+
{
|
|
6
|
+
"label": "Более 5000 товаров",
|
|
7
|
+
"icon": {
|
|
8
|
+
"icon": "WateringCan"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"label": "750 авиакомпаний, 1,2 млн отелей, билеты РЖД",
|
|
13
|
+
"icon": {
|
|
14
|
+
"icon": "SignDocsIcon"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"label": "Аренда автомобилей",
|
|
19
|
+
"icon": {
|
|
20
|
+
"icon": "SignDocsIcon"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"label": "Болеее 1000 развлечений",
|
|
25
|
+
"icon": {
|
|
26
|
+
"icon": "SignDocsIcon"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"label": "Платежные гаджеты Pay Ring",
|
|
31
|
+
"icon": {
|
|
32
|
+
"icon": "SignDocsIcon"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"label": "Цифровые сервисы",
|
|
37
|
+
"icon": {
|
|
38
|
+
"icon": "SignDocsIcon"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"label": "Фермерские продукты",
|
|
43
|
+
"icon": {
|
|
44
|
+
"icon": "SignDocsIcon"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Страхование",
|
|
49
|
+
"icon": {
|
|
50
|
+
"icon": "SignDocsIcon"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import { BonusBenefitsBlock } from './BonusBenefitsBlock';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
default: (
|
|
7
|
+
<div className="container grid grid-cols-12">
|
|
8
|
+
<BonusBenefitsBlock
|
|
9
|
+
context={context}
|
|
10
|
+
className="col-span-12"
|
|
11
|
+
title="Преимущества кредита"
|
|
12
|
+
subtitle="Удобный каталог с большим ассортиментом товаров и сервисов"
|
|
13
|
+
bonusBenefits={[
|
|
14
|
+
{
|
|
15
|
+
label: 'Более 5000 товаров',
|
|
16
|
+
icon: { icon: 'WateringCan' },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '750 авиакомпаний, 1,2 млн отелей, билеты РЖД',
|
|
20
|
+
icon: { icon: 'AirPlane' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Аренда автомобилей',
|
|
24
|
+
icon: { icon: 'CarIcon' },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Болеее 1000 развлечений',
|
|
28
|
+
icon: { icon: 'CinemaIcon' },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'Платежные гаджеты Pay Ring',
|
|
32
|
+
icon: { icon: 'SoundIcon' },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Цифровые сервисы',
|
|
36
|
+
icon: { icon: 'DocsIcon' },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: 'Фермерские продукты',
|
|
40
|
+
icon: { icon: 'PumpkinIcon' },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Страхование',
|
|
44
|
+
icon: { icon: 'PowerIcon' },
|
|
45
|
+
},
|
|
46
|
+
]}
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
),
|
|
50
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
+
import type { BonusBenefit, BonusBenefitsBlockContent } from './BonusBenefitsBlockContent';
|
|
6
|
+
import { getElementsColsValue } from './getElementsColsValue';
|
|
7
|
+
|
|
8
|
+
export interface BenefitsBlockProps extends BonusBenefitsBlockContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const BonusBenefitsBlock = JSX<BenefitsBlockProps>(
|
|
11
|
+
({ className = '', title, subtitle, bonusBenefits, anchor = null }) => {
|
|
12
|
+
return (
|
|
13
|
+
<section
|
|
14
|
+
className={`font-sans text-primary-text bg-white p-50 flex flex-col ${className}`}
|
|
15
|
+
id={anchor}
|
|
16
|
+
>
|
|
17
|
+
{title ? (
|
|
18
|
+
<Heading headingType="h3" className="text-center mb-[10px]" title={title} />
|
|
19
|
+
) : null}
|
|
20
|
+
{subtitle ? <span className="text-md font-normal text-center">{subtitle}</span> : null}
|
|
21
|
+
{bonusBenefits?.length ? (
|
|
22
|
+
<div className={`grid gap-1 ${getElementsColsValue(className)}`}>
|
|
23
|
+
{bonusBenefits.map(renderBonusBenefit)}
|
|
24
|
+
</div>
|
|
25
|
+
) : null}
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const renderBonusBenefit = (bonusBenefit: BonusBenefit, i: number) => {
|
|
32
|
+
return (
|
|
33
|
+
<div key={String(i)} className="flex flex-col items-center max-w-[292px]">
|
|
34
|
+
{bonusBenefit?.icon ? (
|
|
35
|
+
<Img
|
|
36
|
+
className="h-[180px] w-[160px] min-w-[160px] min-h-[160px]"
|
|
37
|
+
image={bonusBenefit.icon}
|
|
38
|
+
width="160"
|
|
39
|
+
height="180"
|
|
40
|
+
/>
|
|
41
|
+
) : null}
|
|
42
|
+
<div>
|
|
43
|
+
{bonusBenefit?.label ? (
|
|
44
|
+
<span className="title-2xs text-center m-0">{bonusBenefit.label}</span>
|
|
45
|
+
) : null}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
|
|
3
|
+
export interface BonusBenefit {
|
|
4
|
+
/** @title Название */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** @title Бонус и преимущество */
|
|
7
|
+
icon?: Picture;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @title Блок бонусов и преимуществ
|
|
12
|
+
*/
|
|
13
|
+
export interface BonusBenefitsBlockContent {
|
|
14
|
+
/** @title Заголовок */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** @title Подзаголовок */
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @title Список бонусов
|
|
20
|
+
* @maxItems 8
|
|
21
|
+
*/
|
|
22
|
+
bonusBenefits?: BonusBenefit[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getColSpan } from '../../utils/getColSpan';
|
|
2
|
+
|
|
3
|
+
export function getElementsColsValue(className = '') {
|
|
4
|
+
const colSpan = getColSpan(className);
|
|
5
|
+
if (colSpan <= 6) {
|
|
6
|
+
return 'grid-cols-2';
|
|
7
|
+
} else if (colSpan <= 8) {
|
|
8
|
+
return 'grid-cols-3';
|
|
9
|
+
} else {
|
|
10
|
+
return 'grid-cols-4';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -39,9 +39,9 @@ export const ComparisonTable = JSX<ComparisonTableProps>(
|
|
|
39
39
|
className || ''
|
|
40
40
|
}`}
|
|
41
41
|
>
|
|
42
|
-
{title
|
|
42
|
+
{title ? (
|
|
43
43
|
<Heading headingType="h3" className="font-medium text-center m-0 mb-5" title={title} />
|
|
44
|
-
)}
|
|
44
|
+
) : null}
|
|
45
45
|
|
|
46
46
|
{renderColumns({
|
|
47
47
|
tableData,
|
|
@@ -29,20 +29,20 @@ export const HeaderCell = JSX<HeaderCellProps>(
|
|
|
29
29
|
<Img image={image} />
|
|
30
30
|
</div>
|
|
31
31
|
)}
|
|
32
|
-
{title
|
|
32
|
+
{title ? (
|
|
33
33
|
<Heading
|
|
34
34
|
headingType="h4"
|
|
35
35
|
className={`${isFillGradient ? 'text-white' : ''}`}
|
|
36
36
|
title={title}
|
|
37
37
|
/>
|
|
38
|
-
)}
|
|
39
|
-
{subtitle
|
|
38
|
+
) : null}
|
|
39
|
+
{subtitle ? (
|
|
40
40
|
<div
|
|
41
41
|
className={`text-m-sm mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`}
|
|
42
42
|
>
|
|
43
43
|
{subtitle}
|
|
44
44
|
</div>
|
|
45
|
-
)}
|
|
45
|
+
) : null}
|
|
46
46
|
</div>
|
|
47
47
|
),
|
|
48
48
|
);
|
|
@@ -31,16 +31,16 @@ const renderCellInner =
|
|
|
31
31
|
{rowHeader}
|
|
32
32
|
</div>
|
|
33
33
|
<div className="basis-1/2">
|
|
34
|
-
{label
|
|
34
|
+
{label ? (
|
|
35
35
|
<div className={`text-right ${isFillGradient ? 'text-white' : ''}`}>{label}</div>
|
|
36
|
-
)}
|
|
37
|
-
{description
|
|
36
|
+
) : null}
|
|
37
|
+
{description ? (
|
|
38
38
|
<div
|
|
39
39
|
className={`text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`}
|
|
40
40
|
>
|
|
41
41
|
{description}
|
|
42
42
|
</div>
|
|
43
|
-
)}
|
|
43
|
+
) : null}
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
);
|
|
@@ -30,15 +30,15 @@ export const TableCell = JSX<TableCellProps>(({ cell, isFirstRow, isLastRow, isF
|
|
|
30
30
|
|
|
31
31
|
const renderCellInner = ({ label, description }: CellData, i: number, isFillGradient: boolean) => (
|
|
32
32
|
<div key={String(i)} className="first:pt-7 pt-6 last:pb-7">
|
|
33
|
-
{label
|
|
33
|
+
{label ? (
|
|
34
34
|
<h4 className={`text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`}>{label}</h4>
|
|
35
|
-
)}
|
|
36
|
-
{description
|
|
35
|
+
) : null}
|
|
36
|
+
{description ? (
|
|
37
37
|
<div
|
|
38
38
|
className={`text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`}
|
|
39
39
|
>
|
|
40
40
|
{description}
|
|
41
41
|
</div>
|
|
42
|
-
)}
|
|
42
|
+
) : null}
|
|
43
43
|
</div>
|
|
44
44
|
);
|
|
@@ -85,7 +85,7 @@ export const ContentPage = JSX<ContentPageProps>(
|
|
|
85
85
|
</div>
|
|
86
86
|
) : null}
|
|
87
87
|
|
|
88
|
-
{likeControl
|
|
88
|
+
{likeControl ? (
|
|
89
89
|
<div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
|
|
90
90
|
<LikeControl
|
|
91
91
|
key="LikeControl"
|
|
@@ -93,7 +93,7 @@ export const ContentPage = JSX<ContentPageProps>(
|
|
|
93
93
|
context={context}
|
|
94
94
|
/>
|
|
95
95
|
</div>
|
|
96
|
-
)}
|
|
96
|
+
) : null}
|
|
97
97
|
</section>
|
|
98
98
|
);
|
|
99
99
|
},
|
|
@@ -37,22 +37,22 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
37
37
|
activeCardIndex={activeCardIndex}
|
|
38
38
|
{...rest}
|
|
39
39
|
/>
|
|
40
|
-
{showPrevButton
|
|
40
|
+
{showPrevButton ? (
|
|
41
41
|
<ArrowButton
|
|
42
42
|
className="absolute top-1/2 left-8 z-10 mt-[25px]"
|
|
43
43
|
onClick={handlePrevClick}
|
|
44
44
|
ariaLabel="Пролистать влево"
|
|
45
45
|
data-block-control="scroll-left"
|
|
46
46
|
/>
|
|
47
|
-
)}
|
|
48
|
-
{showNextButton
|
|
47
|
+
) : null}
|
|
48
|
+
{showNextButton ? (
|
|
49
49
|
<ArrowButton
|
|
50
50
|
className="absolute top-1/2 right-8 z-10 mt-[25px] rotate-180"
|
|
51
51
|
onClick={handleNextClick}
|
|
52
52
|
ariaLabel="Пролистать вправо"
|
|
53
53
|
data-block-control="scroll-right"
|
|
54
54
|
/>
|
|
55
|
-
)}
|
|
55
|
+
) : null}
|
|
56
56
|
<div className="absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" />
|
|
57
57
|
<div className="absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" />
|
|
58
58
|
</section>
|