@redneckz/wildless-cms-uni-blocks 0.3.18 → 0.3.21
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/README.md +43 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +93 -19
- 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/cosmos-static/icons/ArrowsRewindRight.svg +1 -0
- package/dist/components/Accordion/AccordionContent.d.ts +2 -72
- package/dist/components/Accordion/AccordionItem.js +2 -2
- 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 +3 -11
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +4 -10
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/{lib/components/Accordion/utils/isActiveHandler.d.ts → dist/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
- package/{mobile/dist/components/Accordion/utils/isActiveHandler.js → dist/components/Accordion/utils/useActiveHandler.js} +4 -4
- package/dist/components/Accordion/utils/useActiveHandler.js.map +1 -0
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.d.ts +2 -0
- package/dist/components/Blocks.js +4 -0
- package/dist/components/Blocks.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 +36 -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/utils/useActiveHandler.d.ts +9 -0
- package/dist/components/OtherProducts/utils/useActiveHandler.js +21 -0
- package/dist/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +7 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +9 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +5 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +32 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +30 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js +2 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +1 -0
- package/dist/icons/IconName.d.ts +5 -2
- package/dist/icons/IconName.js +4 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +71 -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 +11 -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 +2 -2
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +0 -1
- package/lib/components/Accordion/AccordionContent.d.ts +2 -72
- package/lib/components/Accordion/AccordionItem.js +2 -2
- 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 +3 -11
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +4 -10
- package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/{mobile/dist/components/Accordion/utils/isActiveHandler.d.ts → lib/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
- package/{mobile/lib/components/Accordion/utils/isActiveHandler.js → lib/components/Accordion/utils/useActiveHandler.js} +2 -2
- package/lib/components/Accordion/utils/useActiveHandler.js.map +1 -0
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BaseTile/getTileHeadingType.d.ts +1 -1
- package/lib/components/Blocks.d.ts +2 -0
- package/lib/components/Blocks.js +4 -0
- package/lib/components/Blocks.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 +36 -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/utils/useActiveHandler.d.ts +9 -0
- package/lib/components/OtherProducts/utils/useActiveHandler.js +18 -0
- package/lib/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +7 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +9 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +5 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.fixture.d.ts +4 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +30 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +30 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js +2 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +1 -0
- package/lib/icons/IconName.d.ts +5 -2
- package/lib/icons/IconName.js +4 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +71 -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 +11 -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 +2 -2
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +17 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +2 -72
- 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 +4 -10
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/{lib/components/Accordion/utils/isActiveHandler.d.ts → dist/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
- package/{dist/components/Accordion/utils/isActiveHandler.js → mobile/dist/components/Accordion/utils/useActiveHandler.js} +4 -4
- package/mobile/dist/components/Accordion/utils/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.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 +36 -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/utils/useActiveHandler.d.ts +9 -0
- package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js +21 -0
- package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +7 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +1 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +5 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +32 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +30 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js +2 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +5 -2
- package/mobile/dist/icons/IconName.js +4 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +71 -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 +11 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +2 -72
- 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 +4 -10
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/{dist/components/Accordion/utils/isActiveHandler.d.ts → mobile/lib/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
- package/{lib/components/Accordion/utils/isActiveHandler.js → mobile/lib/components/Accordion/utils/useActiveHandler.js} +2 -2
- package/mobile/lib/components/Accordion/utils/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.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 +36 -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/utils/useActiveHandler.d.ts +9 -0
- package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js +18 -0
- package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +7 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +1 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +5 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +30 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +30 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js +2 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +5 -2
- package/mobile/lib/icons/IconName.js +4 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +71 -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 +11 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
- package/mobile/src/common.css +0 -30
- package/mobile/src/components/Accordion/Accordion.example.json +6 -6
- package/mobile/src/components/Accordion/AccordionContent.ts +2 -108
- package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +4 -19
- package/mobile/src/components/Accordion/utils/{isActiveHandler.ts → useActiveHandler.ts} +1 -1
- package/mobile/src/components/BaseTile/BaseTile.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 +38 -0
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +36 -0
- package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
- package/mobile/src/components/OtherProducts/utils/useActiveHandler.ts +23 -0
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +7 -1
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +1 -1
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +22 -0
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +98 -0
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +32 -0
- package/mobile/src/components/Tile/Tile.example.json +1 -3
- package/mobile/src/icons/ArrowDownIcon.svg +4 -0
- package/mobile/src/icons/ArrowUpIcon.svg +4 -0
- package/mobile/src/icons/ArrowsRewindRight.svg +16 -0
- package/mobile/src/icons/IconName.ts +4 -3
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +106 -0
- package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +30 -0
- package/package.json +1 -1
- package/src/common.css +0 -30
- 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/AccordionContent.ts +2 -108
- package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
- package/src/components/Accordion/AccordionItem.tsx +2 -2
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +4 -19
- package/src/components/Accordion/AccordionItemInner.tsx +4 -25
- package/src/components/Accordion/utils/{isActiveHandler.ts → useActiveHandler.ts} +1 -1
- package/src/components/BaseTile/BaseTile.tsx +1 -1
- package/src/components/Blocks.ts +4 -0
- 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 +38 -0
- package/src/components/OtherProducts/OtherProductsItem.tsx +36 -0
- package/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
- package/src/components/OtherProducts/utils/useActiveHandler.ts +23 -0
- package/src/components/ProductBlock/ProductBlockContent.ts +7 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +23 -15
- package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +2 -2
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +4 -4
- package/src/components/ProductGallery/ProductGalleryContent.ts +1 -1
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +22 -0
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.fixture.tsx +114 -0
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +98 -0
- package/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +32 -0
- package/src/components/Tile/Tile.example.json +1 -3
- package/src/icons/ArrowDownIcon.svg +4 -0
- package/src/icons/ArrowUpIcon.svg +4 -0
- package/src/icons/ArrowsRewindRight.svg +16 -0
- package/src/icons/IconName.ts +154 -4
- package/src/ui-kit/BlocksList/BlocksListProps.ts +106 -0
- package/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +30 -0
- package/src/ui-kit/Heading/Heading.tsx +2 -2
- 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.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.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.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.js.map +0 -1
- package/mobile/src/components/Accordion/AccordionBlocks.tsx +0 -23
- package/src/components/Accordion/AccordionBlocks.tsx +0 -23
|
@@ -1,33 +1,12 @@
|
|
|
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
5
|
export const AccordionItemInner = JSX<AccordionItemProps>(({ blocks, columns = 1, context }) => {
|
|
6
|
+
const className = 'mb-5 last:mb-0 pb-5';
|
|
9
7
|
return (
|
|
10
|
-
<div
|
|
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}
|
|
8
|
+
<div className="transition-all duration-300 max-h-0 overflow-hidden">
|
|
9
|
+
{renderBlocksList({ context, className, columns, blocks })}
|
|
16
10
|
</div>
|
|
17
11
|
);
|
|
18
12
|
});
|
|
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];
|
|
28
|
-
return (
|
|
29
|
-
<div className={`mb-5 last:mb-0 pb-5 ${columnsCountClass}`} key={`block_${i}`}>
|
|
30
|
-
<AccordionBlock context={context} {...block} className="!p-0" />
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IconName } from '../../../icons/IconName';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const useActiveHandler = ({ context, blocks }) => {
|
|
4
4
|
const [isActive, setIsActive] = context.useState(false);
|
|
5
5
|
const hasContent = blocks?.length;
|
|
6
6
|
const icon: IconName = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
@@ -12,7 +12,7 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
12
12
|
<div className="flex grow w-full justify-between">
|
|
13
13
|
<div className="flex flex-col justify-between w-full">
|
|
14
14
|
<div>{children}</div>
|
|
15
|
-
{buttons
|
|
15
|
+
{buttons ? <div>{buttons}</div> : null}
|
|
16
16
|
</div>
|
|
17
17
|
{image}
|
|
18
18
|
</div>
|
package/src/components/Blocks.ts
CHANGED
|
@@ -15,8 +15,10 @@ import { PictureText } from './PictureText/PictureText';
|
|
|
15
15
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
16
16
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
17
17
|
import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
18
|
+
import { ProductGalleryGreen } from './ProductGalleryGreen/ProductGalleryGreen';
|
|
18
19
|
import { ProductTile } from './ProductTile/ProductTile';
|
|
19
20
|
import { PromoTile } from './PromoTile/PromoTile';
|
|
21
|
+
import { OtherProducts } from './OtherProducts/OtherProducts';
|
|
20
22
|
import { Recommendation } from './Recommendation/Recommendation';
|
|
21
23
|
import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
22
24
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
@@ -39,8 +41,10 @@ export const Blocks = {
|
|
|
39
41
|
PictureText,
|
|
40
42
|
ProductBlock,
|
|
41
43
|
ProductGallery,
|
|
44
|
+
ProductGalleryGreen,
|
|
42
45
|
ProductTile,
|
|
43
46
|
PromoTile,
|
|
47
|
+
OtherProducts,
|
|
44
48
|
Recommendation,
|
|
45
49
|
StepsBlock,
|
|
46
50
|
TariffsTable,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Другие продукты",
|
|
3
|
+
"blockItems": [
|
|
4
|
+
{
|
|
5
|
+
"label": "Другие продукты 1",
|
|
6
|
+
"blocks": [
|
|
7
|
+
{
|
|
8
|
+
"blockListType": "TextBlock",
|
|
9
|
+
"title": "Текстовый блок",
|
|
10
|
+
"description": "Описание текстового блока"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"blockListType": "TextBlock",
|
|
14
|
+
"title": "Текстовый блок №2",
|
|
15
|
+
"description": "Описание текстового блока №2"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"label": "Другие продукты 2",
|
|
21
|
+
"blocks": [
|
|
22
|
+
{
|
|
23
|
+
"blockListType": "TextBlock",
|
|
24
|
+
"title": "Текстовый блок",
|
|
25
|
+
"description": "Описание текстового блока"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"blockListType": "TextBlock",
|
|
29
|
+
"title": "Текстовый блок №2",
|
|
30
|
+
"description": "Описание текстового блока №2"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"label": "Другие продукты 3",
|
|
36
|
+
"blocks": [
|
|
37
|
+
{
|
|
38
|
+
"blockListType": "TextBlock",
|
|
39
|
+
"title": "Текстовый блок",
|
|
40
|
+
"description": "Описание текстового блока"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"blockListType": "TextBlock",
|
|
44
|
+
"title": "Текстовый блок №2",
|
|
45
|
+
"description": "Описание текстового блока №2"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
import { PRODUCT_BLOCK } from '../ProductBlock/ProductBlock.fixture';
|
|
3
|
+
import { PRODUCT_TILE, PRODUCT_PENSION_TILE } from '../ProductTile/ProductTile.fixture';
|
|
4
|
+
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
5
|
+
import { TILE, TILE_PREMIUM } from '../Tile/Tile.fixture';
|
|
6
|
+
import type { OtherProductsProps } from './OtherProducts';
|
|
7
|
+
import { OtherProducts } from './OtherProducts';
|
|
8
|
+
import type {
|
|
9
|
+
ProductBlockBlockListDef,
|
|
10
|
+
ProductTileBlockListDef,
|
|
11
|
+
TextBlockBlockListDef,
|
|
12
|
+
TileBlockListDef,
|
|
13
|
+
} from '../../ui-kit/BlocksList/BlocksListProps';
|
|
14
|
+
|
|
15
|
+
const TEXT_BLOCK_OTHER_BLOCK: TextBlockBlockListDef = {
|
|
16
|
+
blockListType: 'TextBlock',
|
|
17
|
+
...TEXT_BLOCK,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const PRODUCT_BLOCK_OTHER_BLOCK: ProductBlockBlockListDef = {
|
|
21
|
+
blockListType: 'ProductBlock',
|
|
22
|
+
...PRODUCT_BLOCK,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const TILES_OTHER_BLOCK: TileBlockListDef = {
|
|
26
|
+
blockListType: 'Tile',
|
|
27
|
+
...TILE,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const TILES_PREMIUM_OTHER_BLOCK: TileBlockListDef = {
|
|
31
|
+
blockListType: 'Tile',
|
|
32
|
+
...TILE_PREMIUM,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const PRODUCT_TILES_OTHER_BLOCK: ProductTileBlockListDef = {
|
|
36
|
+
blockListType: 'ProductTile',
|
|
37
|
+
...PRODUCT_TILE,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const PRODUCT_PENSION_TILES__OTHER_BLOCK: ProductTileBlockListDef = {
|
|
41
|
+
blockListType: 'ProductTile',
|
|
42
|
+
...PRODUCT_PENSION_TILE,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const propsBlock: OtherProductsProps = {
|
|
46
|
+
context,
|
|
47
|
+
blockItems: [
|
|
48
|
+
{
|
|
49
|
+
label: 'Другие кредитные карты Россельхозбанка 1',
|
|
50
|
+
blocks: [
|
|
51
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
52
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
53
|
+
TILES_OTHER_BLOCK,
|
|
54
|
+
TILES_OTHER_BLOCK,
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Другие кредитные карты Россельхозбанка 2',
|
|
59
|
+
blocks: [
|
|
60
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
61
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
62
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
63
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Другие кредитные карты Россельхозбанка 3',
|
|
68
|
+
blocks: [PRODUCT_BLOCK_OTHER_BLOCK, PRODUCT_BLOCK_OTHER_BLOCK],
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
label: 'Другие кредитные карты Россельхозбанка 4',
|
|
73
|
+
blocks: [
|
|
74
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
75
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
76
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
77
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const propsTwoColumns: OtherProductsProps = {
|
|
84
|
+
context,
|
|
85
|
+
blockItems: [
|
|
86
|
+
{
|
|
87
|
+
label: 'Другие кредитные карты Россельхозбанка 1',
|
|
88
|
+
blocks: [
|
|
89
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
90
|
+
TILES_PREMIUM_OTHER_BLOCK,
|
|
91
|
+
TILES_OTHER_BLOCK,
|
|
92
|
+
TILES_OTHER_BLOCK,
|
|
93
|
+
],
|
|
94
|
+
columns: 2,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Другие кредитные карты Россельхозбанка 2',
|
|
98
|
+
blocks: [
|
|
99
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
100
|
+
PRODUCT_TILES_OTHER_BLOCK,
|
|
101
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
102
|
+
PRODUCT_PENSION_TILES__OTHER_BLOCK,
|
|
103
|
+
],
|
|
104
|
+
columns: 2,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Другие кредитные карты Россельхозбанка 3',
|
|
108
|
+
blocks: [PRODUCT_BLOCK_OTHER_BLOCK, PRODUCT_BLOCK_OTHER_BLOCK],
|
|
109
|
+
columns: 2,
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
{
|
|
113
|
+
label: 'Другие кредитные карты Россельхозбанка 4',
|
|
114
|
+
blocks: [
|
|
115
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
116
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
117
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
118
|
+
TEXT_BLOCK_OTHER_BLOCK,
|
|
119
|
+
],
|
|
120
|
+
columns: 2,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default {
|
|
126
|
+
default: (
|
|
127
|
+
<div className="container grid grid-cols-12">
|
|
128
|
+
<OtherProducts className="col-span-12" {...propsBlock} />
|
|
129
|
+
</div>
|
|
130
|
+
),
|
|
131
|
+
|
|
132
|
+
'two columns': (
|
|
133
|
+
<div className="container grid grid-cols-12">
|
|
134
|
+
<OtherProducts className="col-span-12" {...propsTwoColumns} />
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
137
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { OtherProductsContent } from './OtherProductsContent';
|
|
4
|
+
import { OtherProductsItem } from './OtherProductsItem';
|
|
5
|
+
|
|
6
|
+
export interface OtherProductsProps extends OtherProductsContent, UniBlockProps {}
|
|
7
|
+
|
|
8
|
+
export const OtherProducts = JSX<OtherProductsProps>(({ blockItems, context, className }) => {
|
|
9
|
+
return (
|
|
10
|
+
<section className={`font-sans bg-white text-primary-text ${className || ''}`}>
|
|
11
|
+
{blockItems?.length ? (
|
|
12
|
+
<div className="list-none m-0 p-0">
|
|
13
|
+
{blockItems.map((item, i) => (
|
|
14
|
+
<OtherProductsItem key={`BlockItem${i}`} {...item} context={context} />
|
|
15
|
+
))}
|
|
16
|
+
</div>
|
|
17
|
+
) : null}
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title Элемент списка
|
|
5
|
+
*/
|
|
6
|
+
export interface blockItemCommonProps {
|
|
7
|
+
/**
|
|
8
|
+
* @title Название
|
|
9
|
+
* @default Список
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/** @title Блоки */
|
|
13
|
+
blocks?: BlockDef[];
|
|
14
|
+
/**
|
|
15
|
+
* @title Отображать/скрывать обводку элемента
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
bordered?: boolean; // TODO: только для мобильной версии
|
|
19
|
+
columns?: ColumnsCount;
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @title Другие продукты
|
|
25
|
+
*/
|
|
26
|
+
export interface OtherProductsContent {
|
|
27
|
+
/** @title Заголовок */
|
|
28
|
+
title?: string;
|
|
29
|
+
/** @title Список */
|
|
30
|
+
blockItems?: blockItemCommonProps[];
|
|
31
|
+
/** @title Подзаголовок */
|
|
32
|
+
description?: string; // TODO: только для мобильной версии
|
|
33
|
+
/**
|
|
34
|
+
* @title Отображать/скрывать обводку у элемента списка
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
bordered?: boolean; // TODO: только для мобильной версии
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useActiveHandler } from './utils/useActiveHandler';
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import type { blockItemCommonProps } from './OtherProductsContent';
|
|
5
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
6
|
+
import { OtherProductsItemInner } from './OtherProductsItemInner';
|
|
7
|
+
|
|
8
|
+
export interface BlockItemProps extends blockItemCommonProps, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const OtherProductsItem = JSX<BlockItemProps>(({ label, blocks, columns, context }) => {
|
|
11
|
+
const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
|
|
12
|
+
context,
|
|
13
|
+
blocks,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className="border-0 border-b border-solid border-main-divider">
|
|
18
|
+
{hasContent ? (
|
|
19
|
+
<OtherProductsItemInner
|
|
20
|
+
columns={columns}
|
|
21
|
+
blocks={blocks}
|
|
22
|
+
context={context}
|
|
23
|
+
isActive={isActive}
|
|
24
|
+
/>
|
|
25
|
+
) : null}
|
|
26
|
+
<button
|
|
27
|
+
className={`border-none bg-primary-main px-0 py-[25px] text-center w-full font-sans text-white text-base
|
|
28
|
+
${hasContent ? 'group cursor-pointer' : ''}`}
|
|
29
|
+
onClick={handleToggle}
|
|
30
|
+
>
|
|
31
|
+
<span className="pr-3">{isActive ? 'Скрыть' : label}</span>
|
|
32
|
+
{hasContent ? <Icon name={icon} width="20" height="20" asSVG /> : null}
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockItemProps } from './OtherProductsItem';
|
|
3
|
+
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
4
|
+
|
|
5
|
+
export const OtherProductsItemInner = JSX<BlockItemProps>(({ blocks, columns = 1, context }) => {
|
|
6
|
+
const className = 'box-border p-5';
|
|
7
|
+
return (
|
|
8
|
+
<div className="transition-all duration-300 max-h-0 overflow-hidden">
|
|
9
|
+
<div className={`box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`}>
|
|
10
|
+
{renderBlocksList({ context, className, columns, blocks })}
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IconName } from '../../../icons/IconName';
|
|
2
|
+
|
|
3
|
+
export const useActiveHandler = ({ context, blocks }) => {
|
|
4
|
+
const [isActive, setIsActive] = context.useState(false);
|
|
5
|
+
const hasContent = blocks?.length;
|
|
6
|
+
const icon: IconName = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
|
|
7
|
+
|
|
8
|
+
const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
|
|
9
|
+
|
|
10
|
+
const handleToggle = (e: MouseEvent) => {
|
|
11
|
+
if (!hasContent) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
setIsActive(!isActive);
|
|
16
|
+
const contentBlock = getContentBlock(e);
|
|
17
|
+
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
18
|
+
? null
|
|
19
|
+
: `${contentBlock.scrollHeight}px`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return { isActive, hasContent, icon, handleToggle };
|
|
23
|
+
};
|
|
@@ -20,7 +20,13 @@ export type ProductBlockInnerContent = HeadingContent &
|
|
|
20
20
|
*/
|
|
21
21
|
benefits?: Benefit[];
|
|
22
22
|
version?: BlockVersion;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @title Стиль для текстовой части
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
textBlockClassName?: string;
|
|
28
|
+
/** @title Фоновый текст под иллюстрацией */
|
|
29
|
+
backgroundText?: string;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
/**
|
|
@@ -23,26 +23,16 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
23
23
|
image,
|
|
24
24
|
items,
|
|
25
25
|
version = 'primary',
|
|
26
|
+
textBlockClassName = '',
|
|
26
27
|
}) => {
|
|
28
|
+
const textColor = version === 'secondary' ? 'text-white' : '';
|
|
27
29
|
return (
|
|
28
30
|
<div className={`flex grow justify-between items-stretch ${className}`}>
|
|
29
|
-
<div className={
|
|
31
|
+
<div className={`flex flex-col ${textBlockClassName}`}>
|
|
30
32
|
<BaseTile
|
|
31
33
|
context={context}
|
|
32
|
-
title={
|
|
33
|
-
|
|
34
|
-
<Heading
|
|
35
|
-
headingType={headingType}
|
|
36
|
-
title={title}
|
|
37
|
-
className="whitespace-pre-wrap max-w-[600px]"
|
|
38
|
-
/>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
buttons={
|
|
42
|
-
buttons?.length ? (
|
|
43
|
-
<ButtonSection context={context} buttons={buttons} className="flex mt-9 gap-3" />
|
|
44
|
-
) : null
|
|
45
|
-
}
|
|
34
|
+
title={getTitle(title, headingType, textColor)}
|
|
35
|
+
buttons={getButtons(context, buttons)}
|
|
46
36
|
>
|
|
47
37
|
{description && (
|
|
48
38
|
<Description className="mt-4 max-w-[600px]" description={description} />
|
|
@@ -62,3 +52,21 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
62
52
|
);
|
|
63
53
|
},
|
|
64
54
|
);
|
|
55
|
+
|
|
56
|
+
const getTitle = (title, headingType, textColor) => {
|
|
57
|
+
return (
|
|
58
|
+
title && (
|
|
59
|
+
<Heading
|
|
60
|
+
headingType={headingType}
|
|
61
|
+
title={title}
|
|
62
|
+
className={`whitespace-pre-wrap max-w-[600px] ${textColor}`}
|
|
63
|
+
/>
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const getButtons = (context, buttons) => {
|
|
69
|
+
return buttons?.length ? (
|
|
70
|
+
<ButtonSection context={context} buttons={buttons} className="flex mt-9 gap-3" />
|
|
71
|
+
) : null;
|
|
72
|
+
};
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
{
|
|
94
94
|
nav: {
|
|
95
95
|
title: 'Выгодно покупать',
|
|
96
|
-
|
|
96
|
+
description: 'Дополнительные бонусные баллы за покупки',
|
|
97
97
|
},
|
|
98
98
|
productBlock: {
|
|
99
99
|
title: 'Дополнительные бонусные баллы за покупки!',
|
|
@@ -187,7 +187,7 @@ export default {
|
|
|
187
187
|
{
|
|
188
188
|
nav: {
|
|
189
189
|
title: 'Выгодно покупать',
|
|
190
|
-
|
|
190
|
+
description: 'Дополнительные бонусные баллы за покупки',
|
|
191
191
|
},
|
|
192
192
|
productBlock: {
|
|
193
193
|
title: 'Дополнительные бонусные баллы за покупки!',
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
{
|
|
42
42
|
nav: {
|
|
43
43
|
title: 'Деньги на любые цели',
|
|
44
|
-
|
|
44
|
+
description: 'Ставка от 12,5% годовых на срок до 5 лет',
|
|
45
45
|
},
|
|
46
46
|
productBlock: {
|
|
47
47
|
title: 'Ставка от 12,5% годовых на срок до 5 лет!',
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
{
|
|
66
66
|
nav: {
|
|
67
67
|
title: 'Для людей в возрасте',
|
|
68
|
-
|
|
68
|
+
description: 'Ставка от 12,5% годовых на срок до 3 лет',
|
|
69
69
|
},
|
|
70
70
|
productBlock: {
|
|
71
71
|
title: 'Ставка от 12,5% годовых на срок до 3 лет!',
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
{
|
|
90
90
|
nav: {
|
|
91
91
|
title: 'Выгодно покупать',
|
|
92
|
-
|
|
92
|
+
description: 'Дополнительные бонусные баллы за покупки',
|
|
93
93
|
},
|
|
94
94
|
productBlock: {
|
|
95
95
|
title: 'Дополнительные бонусные баллы за покупки!',
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
{
|
|
114
114
|
nav: {
|
|
115
115
|
title: 'Карты Unionpay',
|
|
116
|
-
|
|
116
|
+
description: 'Кэшбэк до 20% у партнеров',
|
|
117
117
|
},
|
|
118
118
|
productBlock: {
|
|
119
119
|
title: 'Карты Unionpay',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slides": [
|
|
3
|
+
{
|
|
4
|
+
"nav": {
|
|
5
|
+
"title": "Заголовок",
|
|
6
|
+
"description": "Описание"
|
|
7
|
+
},
|
|
8
|
+
"productBlock": {
|
|
9
|
+
"title": "Продуктовая галерея",
|
|
10
|
+
"image": {
|
|
11
|
+
"format": "webp",
|
|
12
|
+
"size": {
|
|
13
|
+
"width": 280
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"version": "primary",
|
|
17
|
+
"description": "Описание",
|
|
18
|
+
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import type { Picture } from '../../model/Picture';
|
|
4
|
+
import { ProductGalleryGreen } from './ProductGalleryGreen';
|
|
5
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
+
|
|
7
|
+
const percentImage: Picture = {
|
|
8
|
+
src: '3-6-percent.png',
|
|
9
|
+
format: 'webp',
|
|
10
|
+
size: {
|
|
11
|
+
width: 338,
|
|
12
|
+
height: 420,
|
|
13
|
+
},
|
|
14
|
+
alt: 'Ставка от 3,6% годовых',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const worker: Picture = {
|
|
18
|
+
src: 'money-2.png',
|
|
19
|
+
format: 'webp',
|
|
20
|
+
size: {
|
|
21
|
+
width: 280,
|
|
22
|
+
height: 280,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const creditCard: Picture = {
|
|
27
|
+
src: 'credit-card-1.png',
|
|
28
|
+
format: 'webp',
|
|
29
|
+
size: {
|
|
30
|
+
width: 280,
|
|
31
|
+
height: 280,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const items = [
|
|
36
|
+
'Потребительский кредит по специальной процентной ставке',
|
|
37
|
+
'Получите деньги без залога и поручительства',
|
|
38
|
+
'Кредитный лимит до 5 млн рублей',
|
|
39
|
+
];
|
|
40
|
+
const buttons: ButtonWithIconProps[] = [
|
|
41
|
+
{
|
|
42
|
+
href: 'https://rshb.ru',
|
|
43
|
+
text: 'Подробнее',
|
|
44
|
+
target: '_blank',
|
|
45
|
+
version: 'secondary',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
default: (
|
|
51
|
+
<div className="container grid grid-cols-12">
|
|
52
|
+
<ProductGalleryGreen
|
|
53
|
+
className="col-span-12"
|
|
54
|
+
context={context}
|
|
55
|
+
slides={[
|
|
56
|
+
{
|
|
57
|
+
nav: {
|
|
58
|
+
title: 'Кредит по одному документу',
|
|
59
|
+
description: 'Ставка от 5,5% годовых',
|
|
60
|
+
},
|
|
61
|
+
productBlock: {
|
|
62
|
+
title: 'Кредит по одному документу',
|
|
63
|
+
// description: 'Кредит наличными без залога и поручительства, только по паспорту',
|
|
64
|
+
headingType: 'h2',
|
|
65
|
+
items,
|
|
66
|
+
buttons,
|
|
67
|
+
image: percentImage,
|
|
68
|
+
backgroundText: '3,6',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
nav: {
|
|
73
|
+
title: 'Для людей в возрасте',
|
|
74
|
+
description: 'Ставка до 7% годовых',
|
|
75
|
+
},
|
|
76
|
+
productBlock: {
|
|
77
|
+
title: 'Ставка от 12,5% годовых на срок до 3 лет!',
|
|
78
|
+
headingType: 'h2',
|
|
79
|
+
items,
|
|
80
|
+
buttons,
|
|
81
|
+
image: worker,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
nav: {
|
|
86
|
+
title: 'Выгодно покупать',
|
|
87
|
+
description: 'Ставка от 5% годовых',
|
|
88
|
+
},
|
|
89
|
+
productBlock: {
|
|
90
|
+
title: 'Дополнительные бонусные баллы за покупки!',
|
|
91
|
+
headingType: 'h2',
|
|
92
|
+
items,
|
|
93
|
+
buttons,
|
|
94
|
+
image: creditCard,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
nav: {
|
|
99
|
+
title: 'Карты Unionpay',
|
|
100
|
+
description: '120 дней льготный период',
|
|
101
|
+
},
|
|
102
|
+
productBlock: {
|
|
103
|
+
title: 'Карты Unionpay',
|
|
104
|
+
headingType: 'h2',
|
|
105
|
+
items,
|
|
106
|
+
buttons,
|
|
107
|
+
image: creditCard,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
]}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
),
|
|
114
|
+
};
|