@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,109 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { HeadlineContent } from '../Headline/HeadlineContent';
|
|
3
|
-
import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
|
|
4
|
-
import type { MiniGalleryContent } from '../MiniGallery/MiniGalleryContent';
|
|
5
|
-
import type { PictureTextContent } from '../PictureText/PictureTextContent';
|
|
6
|
-
import type { ProductBlockContent } from '../ProductBlock/ProductBlockContent';
|
|
7
|
-
import type { ProductTileContent } from '../ProductTile/ProductTileContent';
|
|
8
|
-
import type { TextBlockContent } from '../TextBlock/TextBlockContent';
|
|
9
|
-
import type { TileContent } from '../Tile/TileContent';
|
|
10
|
-
import type { LinkListContent } from '../LinkList/LinkListContent';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @title Тип блока
|
|
14
|
-
*/
|
|
15
|
-
export type AccordionBlockType =
|
|
16
|
-
| 'Headline'
|
|
17
|
-
| 'LinkDocs'
|
|
18
|
-
| 'TextBlock'
|
|
19
|
-
| 'PictureText'
|
|
20
|
-
| 'Tile'
|
|
21
|
-
| 'ProductTile'
|
|
22
|
-
| 'ProductBlock'
|
|
23
|
-
| 'Gallery'
|
|
24
|
-
| 'MiniGallery'
|
|
25
|
-
| 'LinkList';
|
|
26
|
-
|
|
27
|
-
interface AccordionBlockDef {
|
|
28
|
-
accordionBlockType: AccordionBlockType;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @title Заголовок
|
|
33
|
-
*/
|
|
34
|
-
export type HeadlineAccordionBlockDef = HeadlineContent & AccordionBlockDef;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @title Список документов
|
|
38
|
-
*/
|
|
39
|
-
export type LinkDocsAccordionBlockDef = LinkDocsContent & AccordionBlockDef;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @title Текстовый блок
|
|
43
|
-
*/
|
|
44
|
-
export type TextBlockAccordionBlockDef = TextBlockContent & AccordionBlockDef;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @title Картинка с текстом
|
|
48
|
-
*/
|
|
49
|
-
export type PictureTextAccordionBlockDef = PictureTextContent & AccordionBlockDef;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @title Продуктовый блок
|
|
53
|
-
*/
|
|
54
|
-
export type ProductBlockAccordionBlockDef = ProductBlockContent & AccordionBlockDef;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @title Плитка
|
|
58
|
-
*/
|
|
59
|
-
export type TileAccordionBlockDef = TileContent & AccordionBlockDef;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @title Продуктовая плитка
|
|
63
|
-
*/
|
|
64
|
-
export type ProductTileAccordionBlockDef = ProductTileContent & AccordionBlockDef;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @title Галлерея
|
|
68
|
-
*/
|
|
69
|
-
export type GalleryAccordionBlockDef = GalleryContent & AccordionBlockDef;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @title Мини-галлерея
|
|
73
|
-
*/
|
|
74
|
-
export type MiniGalleryAccordionBlockDef = MiniGalleryContent & AccordionBlockDef;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @title Список ссылок
|
|
78
|
-
*/
|
|
79
|
-
export type LinkListAccordionBlockDef = LinkListContent & AccordionBlockDef;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @title Выберите блок
|
|
83
|
-
*/
|
|
84
|
-
export type EmptyOption = null;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @title Содержимое аккордеона
|
|
88
|
-
*/
|
|
89
|
-
export type AccordionBlockProps =
|
|
90
|
-
| EmptyOption
|
|
91
|
-
| HeadlineAccordionBlockDef
|
|
92
|
-
| LinkDocsAccordionBlockDef
|
|
93
|
-
| TextBlockAccordionBlockDef
|
|
94
|
-
| PictureTextAccordionBlockDef
|
|
95
|
-
| ProductBlockAccordionBlockDef
|
|
96
|
-
| TileAccordionBlockDef
|
|
97
|
-
| ProductTileAccordionBlockDef
|
|
98
|
-
| GalleryAccordionBlockDef
|
|
99
|
-
| MiniGalleryAccordionBlockDef
|
|
100
|
-
| LinkListAccordionBlockDef;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @title Количество колонок
|
|
104
|
-
* @enumNames ["1 колонка", "2 колонки"]
|
|
105
|
-
*/
|
|
106
|
-
export type ColumnsCount = 1 | 2;
|
|
1
|
+
import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
|
|
107
2
|
|
|
108
3
|
/**
|
|
109
4
|
* @title Элемент списка
|
|
@@ -115,13 +10,12 @@ export interface AccordionItemCommonProps {
|
|
|
115
10
|
*/
|
|
116
11
|
label?: string;
|
|
117
12
|
/** @title Блоки */
|
|
118
|
-
blocks?:
|
|
13
|
+
blocks?: BlockDef[];
|
|
119
14
|
/**
|
|
120
15
|
* @title Отображать/скрывать обводку элемента
|
|
121
16
|
* @default false
|
|
122
17
|
*/
|
|
123
18
|
bordered?: boolean; // TODO: только для мобильной версии
|
|
124
|
-
|
|
125
19
|
columns?: ColumnsCount;
|
|
126
20
|
}
|
|
127
21
|
|
|
@@ -3,12 +3,12 @@ import type { UniBlockProps } from '../../types';
|
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import type { AccordionItemCommonProps } from './AccordionContent';
|
|
5
5
|
import { AccordionItemInner } from './AccordionItemInner';
|
|
6
|
-
import {
|
|
6
|
+
import { useActiveHandler } from './utils/useActiveHandler';
|
|
7
7
|
|
|
8
8
|
export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
|
|
9
9
|
|
|
10
10
|
export const AccordionItem = JSX<AccordionItemProps>(({ label, blocks, bordered, context }) => {
|
|
11
|
-
const { hasContent, icon, handleToggle } =
|
|
11
|
+
const { hasContent, icon, handleToggle } = useActiveHandler({
|
|
12
12
|
context,
|
|
13
13
|
blocks,
|
|
14
14
|
});
|
|
@@ -1,28 +1,13 @@
|
|
|
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, context }) => {
|
|
6
|
+
const className = 'mb-5 last:mb-0 first:mt-2';
|
|
7
|
+
const columns = 1;
|
|
9
8
|
return (
|
|
10
9
|
<div className="transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
|
|
11
|
-
{
|
|
10
|
+
{renderBlocksList({ context, className, columns, blocks })}
|
|
12
11
|
</div>
|
|
13
12
|
);
|
|
14
13
|
});
|
|
15
|
-
|
|
16
|
-
const renderBlock = (context: ContentPageContext) => (block: AccordionBlockProps, i: number) => {
|
|
17
|
-
const type = block?.accordionBlockType;
|
|
18
|
-
if (!type || !(type in AccordionBlocks)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const AccordionBlock: JSXBlock = AccordionBlocks[type];
|
|
23
|
-
return (
|
|
24
|
-
<div className="mb-5 last:mb-0 first:mt-2" key={`block_${i}`}>
|
|
25
|
-
<AccordionBlock context={context} {...block} className="!p-0" />
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
@@ -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>
|
|
@@ -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,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
|
/**
|
|
@@ -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,98 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
|
+
import type { ProductBlockInnerContent } from '../ProductBlock/ProductBlockContent';
|
|
5
|
+
import { ProductBlockInner } from '../ProductBlock/ProductBlockInner';
|
|
6
|
+
import type { ProductGalleryGreenContent } from './ProductGalleryGreenContent';
|
|
7
|
+
|
|
8
|
+
export interface ProductGalleryProps extends ProductGalleryGreenContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const ProductGalleryGreen = JSX<ProductGalleryProps>(
|
|
11
|
+
({ className = '', context, slides = [] }) => {
|
|
12
|
+
const galleryNav = slides.map((s) => s.nav);
|
|
13
|
+
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
14
|
+
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<section
|
|
18
|
+
className={`box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${className}`}
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
className="flex duration-1000 pb-14"
|
|
22
|
+
style={{ transform: `translateX(-${activeSlideIndex}00%)` }}
|
|
23
|
+
role="list"
|
|
24
|
+
>
|
|
25
|
+
{galleryBlocks.map((_, i) => renderProductBlock(_, i, context))}
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div className="flex items-center absolute bottom-6 left-0 right-0 px-9 box-border">
|
|
29
|
+
{galleryNav.map((slide, i) =>
|
|
30
|
+
renderNavButton({
|
|
31
|
+
slide,
|
|
32
|
+
i,
|
|
33
|
+
activeSlideIndex,
|
|
34
|
+
onClick: () => setActiveSlideIndex(i),
|
|
35
|
+
}),
|
|
36
|
+
)}
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
function renderProductBlock(block: ProductBlockInnerContent, i: number, context) {
|
|
44
|
+
return (
|
|
45
|
+
<section
|
|
46
|
+
key={String(i)}
|
|
47
|
+
className="box-border relative flex grow-0 shrink-0 basis-full px-9"
|
|
48
|
+
role="listitem"
|
|
49
|
+
>
|
|
50
|
+
<div className="flex grow">
|
|
51
|
+
{block.backgroundText ? (
|
|
52
|
+
<div className="absolute text-[454px] font-bold text-white tracking-[-10px] leading-[299px] opacity-[.1] right-12 top-20 z-0">
|
|
53
|
+
{block.backgroundText}
|
|
54
|
+
</div>
|
|
55
|
+
) : null}
|
|
56
|
+
<ProductBlockInner
|
|
57
|
+
className="pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem] z-[1]"
|
|
58
|
+
context={context}
|
|
59
|
+
textBlockClassName="mb-[154px]"
|
|
60
|
+
version="secondary"
|
|
61
|
+
{...block}
|
|
62
|
+
/>
|
|
63
|
+
<Icon
|
|
64
|
+
className="absolute right-[460px] top-[200px] z-0 mb-4"
|
|
65
|
+
name="ArrowsRewindRight"
|
|
66
|
+
width="230"
|
|
67
|
+
height="187"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</section>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
|
|
75
|
+
const isActiveBtn = i === activeSlideIndex;
|
|
76
|
+
const btnClassName = isActiveBtn
|
|
77
|
+
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0'
|
|
78
|
+
: 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300';
|
|
79
|
+
const btnTitleClassName = isActiveBtn ? 'text-primary-text' : 'text-white';
|
|
80
|
+
const btnDescClassName = isActiveBtn ? 'text-secondary-text' : 'text-white';
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<button
|
|
84
|
+
type="button"
|
|
85
|
+
key={String(i)}
|
|
86
|
+
onClick={onClick}
|
|
87
|
+
aria-label={slide?.title}
|
|
88
|
+
className={`box-border font-sans group relative overflow-hidden border-white/50 border-[1px] cursor-pointer text-left mb-6a mx-1 grow basis-0 backdrop-blur-sm
|
|
89
|
+
${btnClassName}
|
|
90
|
+
`}
|
|
91
|
+
>
|
|
92
|
+
<div className="border-0 px-6">
|
|
93
|
+
<div className={`text-sm font-medium pb-[3px] ${btnTitleClassName}`}>{slide?.title}</div>
|
|
94
|
+
<div className={`text-xs text-secondary-text ${btnDescClassName}`}>{slide.description}</div>
|
|
95
|
+
</div>
|
|
96
|
+
</button>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ProductBlockInnerContent } from '../ProductBlock/ProductBlockContent';
|
|
2
|
+
|
|
3
|
+
/** @title Кнопка под слайдом */
|
|
4
|
+
interface ProductGalleryNav {
|
|
5
|
+
/** @title Заголовок */
|
|
6
|
+
title: string;
|
|
7
|
+
/** @title Описание */
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @title Слайд
|
|
13
|
+
*/
|
|
14
|
+
export interface ProductSlide {
|
|
15
|
+
/** @title Превью содержимого слайда на навигации */
|
|
16
|
+
nav?: ProductGalleryNav;
|
|
17
|
+
/** @title Содержимое слайда */
|
|
18
|
+
productBlock: ProductBlockInnerContent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title Продуктовая галерея
|
|
23
|
+
*/
|
|
24
|
+
export interface ProductGalleryGreenContent {
|
|
25
|
+
/**
|
|
26
|
+
* @title Задержка
|
|
27
|
+
* @hidden //! temporary not used
|
|
28
|
+
*/
|
|
29
|
+
duration?: number;
|
|
30
|
+
/** @title Слайды */
|
|
31
|
+
slides?: ProductSlide[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M13.8416 10.709L11.6582 12.8923C11.0166 13.534 9.96657 13.534 9.3249 12.8923L3.8999 7.45898" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M17.1001 7.45898L16.2334 8.32565" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M13.3416 9.29163L11.1582 7.10829C10.5166 6.46662 9.46657 6.46662 8.8249 7.10829L3.3999 12.5416" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M16.6001 12.5416L15.7334 11.675" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg viewBox="0 0 230 187" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g filter="url(#filter0_d_7050_138706)">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M92.24 52.16L14 104.32V0L92.24 52.16ZM216.119 52.16L137.879 104.32V0L216.119 52.16Z" fill="white"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<filter id="filter0_d_7050_138706" x="0.959999" y="0" width="228.199" height="186.907" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
7
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
8
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
9
|
+
<feOffset dy="69.5467"/>
|
|
10
|
+
<feGaussianBlur stdDeviation="6.52"/>
|
|
11
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0.0196078 0 0 0 0 0.0117647 0 0 0 0 0.0156863 0 0 0 0.1 0"/>
|
|
12
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_7050_138706"/>
|
|
13
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_7050_138706" result="shape"/>
|
|
14
|
+
</filter>
|
|
15
|
+
</defs>
|
|
16
|
+
</svg>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
// Generated. Do not touch
|
|
3
|
+
/* eslint-disable max-lines */
|
|
3
4
|
|
|
4
5
|
export enum IconMap {
|
|
5
|
-
ActualBalanceIcon = "ActualBalanceIcon", AppleIcon = "AppleIcon", AtmIcon = "AtmIcon", BankIcon = "BankIcon", BurgerIcon = "BurgerIcon", BurgerIconWhite = "BurgerIconWhite", Calendar2Icon = "Calendar2Icon", CalendarCircleIcon = "CalendarCircleIcon", CalendarIcon = "CalendarIcon", CalendarTickIcon = "CalendarTickIcon", CalendarWhiteIcon = "CalendarWhiteIcon", CardIcon = "CardIcon", CardPosIcon = "CardPosIcon", CardTickIcon = "CardTickIcon", CardWithGemIcon = "CardWithGemIcon", ChartSquareIcon = "ChartSquareIcon", ClockIcon = "ClockIcon", CloseIcon = "CloseIcon", ComfortableCompIcon = "ComfortableCompIcon", CreditCardsIcon = "CreditCardsIcon", DiscountShapeIcon = "DiscountShapeIcon", DocIcon = "DocIcon", DocIconMonoColor = "DocIconMonoColor", DocumentTextIcon = "DocumentTextIcon", DollarIcon = "DollarIcon", EarthIcon = "EarthIcon", EmptyWalletChangeIcon = "EmptyWalletChangeIcon", EmptyWalletIcon = "EmptyWalletIcon", EmptyWalletWhiteIcon = "EmptyWalletWhiteIcon", EuroIcon = "EuroIcon", GeolocationIcon = "GeolocationIcon", GlassIcon = "GlassIcon", GlobalIcon = "GlobalIcon", GpsIcon = "GpsIcon", GridIcon = "GridIcon", GridIconWhite = "GridIconWhite", InterestGrowthIcon = "InterestGrowthIcon", InterestIcon = "InterestIcon", JCBIcon = "JCBIcon", LoupeIcon = "LoupeIcon", MasterCardIcon = "MasterCardIcon", MinusIcon = "MinusIcon", MirIcon = "MirIcon", MoneyIcon = "MoneyIcon", MoneyInsuranceIcon = "MoneyInsuranceIcon", MonitorMobileIcon = "MonitorMobileIcon", NewDocIcon = "NewDocIcon", OfficeIcon = "OfficeIcon", OkIcon = "OkIcon", PassSendIcon = "PassSendIcon", PercentageRoundIcon = "PercentageRoundIcon", PercentageSquareIcon = "PercentageSquareIcon", PercentageSquareWhiteIcon = "PercentageSquareWhiteIcon", PersonalCardIcon = "PersonalCardIcon", PlayMarketIcon = "PlayMarketIcon", PlusIcon = "PlusIcon", Profile2UserIcon = "Profile2UserIcon", ProfileIcon = "ProfileIcon", RoundRubleIcon = "RoundRubleIcon", SafeIcon = "SafeIcon", ShieldTickIcon = "ShieldTickIcon", SignDocsIcon = "SignDocsIcon", SmallClockIcon = "SmallClockIcon", TelegramIcon = "TelegramIcon", UnionPayIcon = "UnionPayIcon", UserTickIcon = "UserTickIcon", VisaIcon = "VisaIcon", VKIcon = "VKIcon", WalletAdd2Icon = "WalletAdd2Icon", WalletAddIcon = "WalletAddIcon", WalletIcon = "WalletIcon", WalletWithMoneyIcon = "WalletWithMoneyIcon"
|
|
6
|
+
ActualBalanceIcon = "ActualBalanceIcon", AppleIcon = "AppleIcon", ArrowDownIcon = "ArrowDownIcon", ArrowsRewindRight = "ArrowsRewindRight", ArrowUpIcon = "ArrowUpIcon", AtmIcon = "AtmIcon", BankIcon = "BankIcon", BurgerIcon = "BurgerIcon", BurgerIconWhite = "BurgerIconWhite", Calendar2Icon = "Calendar2Icon", CalendarCircleIcon = "CalendarCircleIcon", CalendarIcon = "CalendarIcon", CalendarTickIcon = "CalendarTickIcon", CalendarWhiteIcon = "CalendarWhiteIcon", CardIcon = "CardIcon", CardPosIcon = "CardPosIcon", CardTickIcon = "CardTickIcon", CardWithGemIcon = "CardWithGemIcon", ChartSquareIcon = "ChartSquareIcon", ClockIcon = "ClockIcon", CloseIcon = "CloseIcon", ComfortableCompIcon = "ComfortableCompIcon", CreditCardsIcon = "CreditCardsIcon", DiscountShapeIcon = "DiscountShapeIcon", DocIcon = "DocIcon", DocIconMonoColor = "DocIconMonoColor", DocumentTextIcon = "DocumentTextIcon", DollarIcon = "DollarIcon", EarthIcon = "EarthIcon", EmptyWalletChangeIcon = "EmptyWalletChangeIcon", EmptyWalletIcon = "EmptyWalletIcon", EmptyWalletWhiteIcon = "EmptyWalletWhiteIcon", EuroIcon = "EuroIcon", GeolocationIcon = "GeolocationIcon", GlassIcon = "GlassIcon", GlobalIcon = "GlobalIcon", GpsIcon = "GpsIcon", GridIcon = "GridIcon", GridIconWhite = "GridIconWhite", InterestGrowthIcon = "InterestGrowthIcon", InterestIcon = "InterestIcon", JCBIcon = "JCBIcon", LoupeIcon = "LoupeIcon", MasterCardIcon = "MasterCardIcon", MinusIcon = "MinusIcon", MirIcon = "MirIcon", MoneyIcon = "MoneyIcon", MoneyInsuranceIcon = "MoneyInsuranceIcon", MonitorMobileIcon = "MonitorMobileIcon", NewDocIcon = "NewDocIcon", OfficeIcon = "OfficeIcon", OkIcon = "OkIcon", PassSendIcon = "PassSendIcon", PercentageRoundIcon = "PercentageRoundIcon", PercentageSquareIcon = "PercentageSquareIcon", PercentageSquareWhiteIcon = "PercentageSquareWhiteIcon", PersonalCardIcon = "PersonalCardIcon", PlayMarketIcon = "PlayMarketIcon", PlusIcon = "PlusIcon", Profile2UserIcon = "Profile2UserIcon", ProfileIcon = "ProfileIcon", RoundRubleIcon = "RoundRubleIcon", SafeIcon = "SafeIcon", ShieldTickIcon = "ShieldTickIcon", SignDocsIcon = "SignDocsIcon", SmallClockIcon = "SmallClockIcon", TelegramIcon = "TelegramIcon", UnionPayIcon = "UnionPayIcon", UserTickIcon = "UserTickIcon", VisaIcon = "VisaIcon", VKIcon = "VKIcon", WalletAdd2Icon = "WalletAdd2Icon", WalletAddIcon = "WalletAddIcon", WalletIcon = "WalletIcon", WalletWithMoneyIcon = "WalletWithMoneyIcon"
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -10,7 +11,7 @@ export enum IconMap {
|
|
|
10
11
|
* @title Иконка
|
|
11
12
|
* @enumNames [
|
|
12
13
|
* "",
|
|
13
|
-
* "Деньги", "Лого «Apple»", "Банкомат", "Банк", "Бургер", "Бургер (белый)", "Календарь 2", "Скруглённый календарь", "Календарь", "Календарь с галочкой", "Календарь белый", "Кред. карта", "Кред. карта под наклоном", "Кред. карта с галочкой", "Карта с драгоценностями", "Деньги внутри кошелька", "Часы", "Крестик", "Кресло", "Кредитные карты", "Скидка", "Документ", "Документ (одноцветный)", "Документ с текстом", "Доллар", "Земля", "Пустой кошелёк с возвратом", "Пустой кошелёк", "Пустой кошелёк (белый)", "Евро", "Геолокация", "Зеркало", "Глобус", "Gps", "Сетка", "Сетка (белая)", "Диаграмма роста", "Скидка", "JCB", "Лупа", "MasterCard", "Минус", "МИР", "Деньги", "Денежное страхование", "Монитор и мобильный", "Новый документ", "Офис", "Лого «Одноклассники»", "Бизнес", "Проценты (круг.)", "Проценты", "Проценты белые", "Персональная карта", "Лого «PlayMarket»", "Плюс", "Профиль, 2 персоны", "Профиль", "Рубль (круг.)", "Сейф", "Безопасность", "Подписанные документы", "Маленькие часы", "Лого «Telegram»", "UnionPay", "Пользователь", "Visa", "Лого «VK»", "Пополнение карты", "Кошелёк с плюсом", "Кошелёк", "Кошелёк с деньгами"
|
|
14
|
+
* "Деньги", "Лого «Apple»", "ArrowDownIcon", "ArrowsRewindRight", "ArrowUpIcon", "Банкомат", "Банк", "Бургер", "Бургер (белый)", "Календарь 2", "Скруглённый календарь", "Календарь", "Календарь с галочкой", "Календарь белый", "Кред. карта", "Кред. карта под наклоном", "Кред. карта с галочкой", "Карта с драгоценностями", "Деньги внутри кошелька", "Часы", "Крестик", "Кресло", "Кредитные карты", "Скидка", "Документ", "Документ (одноцветный)", "Документ с текстом", "Доллар", "Земля", "Пустой кошелёк с возвратом", "Пустой кошелёк", "Пустой кошелёк (белый)", "Евро", "Геолокация", "Зеркало", "Глобус", "Gps", "Сетка", "Сетка (белая)", "Диаграмма роста", "Скидка", "JCB", "Лупа", "MasterCard", "Минус", "МИР", "Деньги", "Денежное страхование", "Монитор и мобильный", "Новый документ", "Офис", "Лого «Одноклассники»", "Бизнес", "Проценты (круг.)", "Проценты", "Проценты белые", "Персональная карта", "Лого «PlayMarket»", "Плюс", "Профиль, 2 персоны", "Профиль", "Рубль (круг.)", "Сейф", "Безопасность", "Подписанные документы", "Маленькие часы", "Лого «Telegram»", "UnionPay", "Пользователь", "Visa", "Лого «VK»", "Пополнение карты", "Кошелёк с плюсом", "Кошелёк", "Кошелёк с деньгами"
|
|
14
15
|
* ]
|
|
15
16
|
*/
|
|
16
|
-
export type IconName = "" | "ActualBalanceIcon" | "AppleIcon" | "AtmIcon" | "BankIcon" | "BurgerIcon" | "BurgerIconWhite" | "Calendar2Icon" | "CalendarCircleIcon" | "CalendarIcon" | "CalendarTickIcon" | "CalendarWhiteIcon" | "CardIcon" | "CardPosIcon" | "CardTickIcon" | "CardWithGemIcon" | "ChartSquareIcon" | "ClockIcon" | "CloseIcon" | "ComfortableCompIcon" | "CreditCardsIcon" | "DiscountShapeIcon" | "DocIcon" | "DocIconMonoColor" | "DocumentTextIcon" | "DollarIcon" | "EarthIcon" | "EmptyWalletChangeIcon" | "EmptyWalletIcon" | "EmptyWalletWhiteIcon" | "EuroIcon" | "GeolocationIcon" | "GlassIcon" | "GlobalIcon" | "GpsIcon" | "GridIcon" | "GridIconWhite" | "InterestGrowthIcon" | "InterestIcon" | "JCBIcon" | "LoupeIcon" | "MasterCardIcon" | "MinusIcon" | "MirIcon" | "MoneyIcon" | "MoneyInsuranceIcon" | "MonitorMobileIcon" | "NewDocIcon" | "OfficeIcon" | "OkIcon" | "PassSendIcon" | "PercentageRoundIcon" | "PercentageSquareIcon" | "PercentageSquareWhiteIcon" | "PersonalCardIcon" | "PlayMarketIcon" | "PlusIcon" | "Profile2UserIcon" | "ProfileIcon" | "RoundRubleIcon" | "SafeIcon" | "ShieldTickIcon" | "SignDocsIcon" | "SmallClockIcon" | "TelegramIcon" | "UnionPayIcon" | "UserTickIcon" | "VisaIcon" | "VKIcon" | "WalletAdd2Icon" | "WalletAddIcon" | "WalletIcon" | "WalletWithMoneyIcon";
|
|
17
|
+
export type IconName = "" | "ActualBalanceIcon" | "AppleIcon" | "ArrowDownIcon" | "ArrowsRewindRight" | "ArrowUpIcon" | "AtmIcon" | "BankIcon" | "BurgerIcon" | "BurgerIconWhite" | "Calendar2Icon" | "CalendarCircleIcon" | "CalendarIcon" | "CalendarTickIcon" | "CalendarWhiteIcon" | "CardIcon" | "CardPosIcon" | "CardTickIcon" | "CardWithGemIcon" | "ChartSquareIcon" | "ClockIcon" | "CloseIcon" | "ComfortableCompIcon" | "CreditCardsIcon" | "DiscountShapeIcon" | "DocIcon" | "DocIconMonoColor" | "DocumentTextIcon" | "DollarIcon" | "EarthIcon" | "EmptyWalletChangeIcon" | "EmptyWalletIcon" | "EmptyWalletWhiteIcon" | "EuroIcon" | "GeolocationIcon" | "GlassIcon" | "GlobalIcon" | "GpsIcon" | "GridIcon" | "GridIconWhite" | "InterestGrowthIcon" | "InterestIcon" | "JCBIcon" | "LoupeIcon" | "MasterCardIcon" | "MinusIcon" | "MirIcon" | "MoneyIcon" | "MoneyInsuranceIcon" | "MonitorMobileIcon" | "NewDocIcon" | "OfficeIcon" | "OkIcon" | "PassSendIcon" | "PercentageRoundIcon" | "PercentageSquareIcon" | "PercentageSquareWhiteIcon" | "PersonalCardIcon" | "PlayMarketIcon" | "PlusIcon" | "Profile2UserIcon" | "ProfileIcon" | "RoundRubleIcon" | "SafeIcon" | "ShieldTickIcon" | "SignDocsIcon" | "SmallClockIcon" | "TelegramIcon" | "UnionPayIcon" | "UserTickIcon" | "VisaIcon" | "VKIcon" | "WalletAdd2Icon" | "WalletAddIcon" | "WalletIcon" | "WalletWithMoneyIcon";
|