@redneckz/wildless-cms-uni-blocks 0.3.75 → 0.3.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +19 -21
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +4 -1
- package/dist/components/Calculator/renderRate.js +1 -1
- package/dist/components/Calculator/renderRate.js.map +1 -1
- package/dist/components/Catalog/Catalog.js +2 -2
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/Catalog/CatalogContent.d.ts +1 -0
- package/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +1 -0
- package/dist/components/ProductTile/ProductTile.js +7 -8
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
- package/dist/model/Picture.d.ts +6 -0
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
- package/dist/ui-kit/Button/ButtonInner.js +2 -2
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Img/Img.js +2 -6
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/dist/utils/checkIsIconRenderable.d.ts +2 -0
- package/dist/utils/checkIsIconRenderable.js +5 -0
- package/dist/utils/checkIsIconRenderable.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +4 -1
- package/lib/components/Calculator/renderRate.js +1 -1
- package/lib/components/Calculator/renderRate.js.map +1 -1
- package/lib/components/Catalog/Catalog.js +2 -2
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/Catalog/CatalogContent.d.ts +1 -0
- package/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +1 -0
- package/lib/components/ProductTile/ProductTile.js +7 -8
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +3 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
- package/lib/model/Picture.d.ts +6 -0
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
- package/lib/ui-kit/Button/ButtonInner.js +2 -2
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Img/Img.js +2 -6
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/lib/utils/checkIsIconRenderable.d.ts +2 -0
- package/lib/utils/checkIsIconRenderable.js +2 -0
- package/lib/utils/checkIsIconRenderable.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +5 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +4 -1
- package/mobile/dist/components/Calculator/renderRate.js +1 -1
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +2 -2
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/Catalog/CatalogContent.d.ts +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +1 -0
- package/mobile/dist/components/ProductTile/ProductTile.js +7 -8
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
- package/mobile/dist/model/Picture.d.ts +6 -0
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
- package/mobile/dist/ui-kit/Button/ButtonInner.js +2 -2
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/utils/checkIsIconRenderable.d.ts +2 -0
- package/mobile/dist/utils/checkIsIconRenderable.js +5 -0
- package/mobile/dist/utils/checkIsIconRenderable.js.map +1 -0
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +4 -1
- package/mobile/lib/components/Calculator/renderRate.js +1 -1
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +2 -2
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/Catalog/CatalogContent.d.ts +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +1 -0
- package/mobile/lib/components/ProductTile/ProductTile.js +7 -8
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
- package/mobile/lib/model/Picture.d.ts +6 -0
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
- package/mobile/lib/ui-kit/Button/ButtonInner.js +2 -2
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/utils/checkIsIconRenderable.d.ts +2 -0
- package/mobile/lib/utils/checkIsIconRenderable.js +2 -0
- package/mobile/lib/utils/checkIsIconRenderable.js.map +1 -0
- package/mobile/src/components/Accordion/Accordion.example.json +13 -6
- package/mobile/src/components/Accordion/AccordionContent.ts +4 -1
- package/mobile/src/components/Calculator/renderRate.tsx +1 -3
- package/mobile/src/components/Catalog/Catalog.tsx +2 -1
- package/mobile/src/components/Catalog/CatalogContent.ts +1 -0
- package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +72 -3
- package/mobile/src/components/GroupBlock/GroupBlockContent.ts +2 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +10 -1
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +12 -6
- package/mobile/src/components/PictureText/PictureTextContent.ts +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -10
- package/mobile/src/components/ProductTile/ProductTile.example.json +1 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +28 -30
- package/mobile/src/components/PromoTile/PromoTile.example.json +1 -2
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +18 -3
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +6 -1
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +11 -0
- package/mobile/src/components/Tile/Tile.example.json +2 -9
- package/mobile/src/model/Picture.ts +7 -0
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/mobile/src/utils/checkIsIconRenderable.tsx +3 -0
- package/package.json +2 -2
- package/src/components/Accordion/Accordion.example.json +13 -6
- package/src/components/Accordion/AccordionContent.ts +4 -1
- package/src/components/Calculator/renderRate.tsx +1 -3
- package/src/components/Catalog/Catalog.tsx +2 -1
- package/src/components/Catalog/CatalogContent.ts +1 -0
- package/src/components/ContentPage/ContentPage.page.json +1 -1
- package/src/components/GroupBlock/GroupBlock.example.json +72 -3
- package/src/components/GroupBlock/GroupBlockContent.ts +2 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +10 -1
- package/src/components/OtherProducts/OtherProducts.example.json +12 -6
- package/src/components/PictureText/PictureTextContent.ts +1 -0
- package/src/components/ProductBlock/ProductBlock.example.json +3 -10
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -2
- package/src/components/ProductTile/ProductTile.example.json +1 -2
- package/src/components/ProductTile/ProductTile.tsx +28 -30
- package/src/components/PromoTile/PromoTile.example.json +1 -2
- package/src/components/StepsBlock/StepsBlock.example.json +18 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +6 -1
- package/src/components/StepsBlock/StepsBlock.tsx +19 -13
- package/src/components/StepsBlock/StepsBlockContent.ts +11 -0
- package/src/components/Tile/Tile.example.json +2 -9
- package/src/model/Picture.ts +7 -0
- package/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
- package/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/src/ui-kit/Img/Img.tsx +9 -16
- package/src/utils/checkIsIconRenderable.tsx +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.77",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"size-limit": "^7.0.8",
|
|
150
150
|
"style-loader": "^3.3.1",
|
|
151
151
|
"svgo": "^2.8.0",
|
|
152
|
-
"tailwindcss": "^3.1.
|
|
152
|
+
"tailwindcss": "^3.1.8",
|
|
153
153
|
"ts-jest": "^28.0.6",
|
|
154
154
|
"ts-json-schema-generator": "^1.0.0",
|
|
155
155
|
"ts-loader": "^9.3.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Аккордеон",
|
|
3
|
+
"accordionAlignTitle": "center",
|
|
3
4
|
"accordionItems": [
|
|
4
5
|
{
|
|
5
6
|
"label": "Аккордеон 1",
|
|
@@ -10,12 +11,14 @@
|
|
|
10
11
|
{
|
|
11
12
|
"blockListType": "TextBlock",
|
|
12
13
|
"title": "Текстовый блок",
|
|
13
|
-
"description": "Описание текстового блока"
|
|
14
|
+
"description": "Описание текстового блока",
|
|
15
|
+
"style": ["col-span-12"]
|
|
14
16
|
},
|
|
15
17
|
{
|
|
16
18
|
"blockListType": "TextBlock",
|
|
17
19
|
"title": "Текстовый блок №2",
|
|
18
|
-
"description": "Описание текстового блока №2"
|
|
20
|
+
"description": "Описание текстового блока №2",
|
|
21
|
+
"style": ["col-span-12"]
|
|
19
22
|
}
|
|
20
23
|
]
|
|
21
24
|
},
|
|
@@ -28,12 +31,14 @@
|
|
|
28
31
|
{
|
|
29
32
|
"blockListType": "TextBlock",
|
|
30
33
|
"title": "Текстовый блок",
|
|
31
|
-
"description": "Описание текстового блока"
|
|
34
|
+
"description": "Описание текстового блока",
|
|
35
|
+
"style": ["col-span-6"]
|
|
32
36
|
},
|
|
33
37
|
{
|
|
34
38
|
"blockListType": "TextBlock",
|
|
35
39
|
"title": "Текстовый блок №2",
|
|
36
|
-
"description": "Описание текстового блока №2"
|
|
40
|
+
"description": "Описание текстового блока №2",
|
|
41
|
+
"style": ["col-span-6"]
|
|
37
42
|
}
|
|
38
43
|
]
|
|
39
44
|
},
|
|
@@ -46,12 +51,14 @@
|
|
|
46
51
|
{
|
|
47
52
|
"blockListType": "TextBlock",
|
|
48
53
|
"title": "Текстовый блок",
|
|
49
|
-
"description": "Описание текстового блока"
|
|
54
|
+
"description": "Описание текстового блока",
|
|
55
|
+
"style": ["col-span-12"]
|
|
50
56
|
},
|
|
51
57
|
{
|
|
52
58
|
"blockListType": "TextBlock",
|
|
53
59
|
"title": "Текстовый блок №2",
|
|
54
|
-
"description": "Описание текстового блока №2"
|
|
60
|
+
"description": "Описание текстового блока №2",
|
|
61
|
+
"style": ["col-span-12"]
|
|
55
62
|
}
|
|
56
63
|
]
|
|
57
64
|
}
|
|
@@ -31,7 +31,10 @@ export interface AccordionItemCommonProps {
|
|
|
31
31
|
export interface AccordionContent {
|
|
32
32
|
/** @title Заголовок */
|
|
33
33
|
title?: string;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* @title Выравнивание заголовка
|
|
36
|
+
* @default center
|
|
37
|
+
*/
|
|
35
38
|
accordionAlignTitle?: AlignType;
|
|
36
39
|
version?: BlockVersion;
|
|
37
40
|
/** @title Список */
|
|
@@ -12,9 +12,7 @@ export function renderRate({ rate, title, sup, className = '' }: rateType) {
|
|
|
12
12
|
<div>
|
|
13
13
|
<div className="text-sm font-light ml-3">{title}</div>
|
|
14
14
|
<div className="flex justify-start">
|
|
15
|
-
<span
|
|
16
|
-
className={`calc-rate-text font-mohave text-[200px] leading-[250px] pr-4 mt-[-16px] ${className}`}
|
|
17
|
-
>
|
|
15
|
+
<span className={`calc-rate-text font-mohave text-title-huge pr-4 mt-[-16px] ${className}`}>
|
|
18
16
|
{rateFormat}
|
|
19
17
|
</span>
|
|
20
18
|
{sup ? <span className="calc-rate-text text-[65px] leading-[75px]">{sup}</span> : ''}
|
|
@@ -14,12 +14,13 @@ const CARD_FULL_VIEW_COUNT = 3;
|
|
|
14
14
|
const CARD_SHIFT = 430;
|
|
15
15
|
|
|
16
16
|
export const Catalog = JSX<CatalogProps>(
|
|
17
|
-
({ context, cards = [], className = '', title, description }) => {
|
|
17
|
+
({ context, cards = [], className = '', title, description, anchor = null }) => {
|
|
18
18
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<section
|
|
22
22
|
className={`bg-white relative font-sans p-9 overflow-hidden text-center ${className}`}
|
|
23
|
+
id={anchor}
|
|
23
24
|
>
|
|
24
25
|
{title ? <Heading headingType="h2" className="mb-6" title={title} /> : null}
|
|
25
26
|
{description ? <Description className="mb-6" description={description} /> : null}
|
|
@@ -10,19 +10,88 @@
|
|
|
10
10
|
"blockType": "ProductBlock",
|
|
11
11
|
"title": "Продуктовый блок",
|
|
12
12
|
"description": "Описание текстового блока",
|
|
13
|
-
"tags": ["tag2"]
|
|
13
|
+
"tags": ["tag2"],
|
|
14
|
+
"backwardButton": {
|
|
15
|
+
"text": "Кнопка возврата",
|
|
16
|
+
"icon": { "icon": "ArrowLeftIcon" }
|
|
17
|
+
},
|
|
18
|
+
"image": {
|
|
19
|
+
"format": "webp",
|
|
20
|
+
"size": {
|
|
21
|
+
"width": 234,
|
|
22
|
+
"height": 234
|
|
23
|
+
}
|
|
24
|
+
}
|
|
14
25
|
},
|
|
15
26
|
{
|
|
16
27
|
"blockType": "ProductTile",
|
|
17
28
|
"title": "Продуктовая плитка",
|
|
18
29
|
"description": "Описание текстового блока",
|
|
19
|
-
"tags": ["tag1"]
|
|
30
|
+
"tags": ["tag1"],
|
|
31
|
+
"image": {
|
|
32
|
+
"format": "webp",
|
|
33
|
+
"size": {
|
|
34
|
+
"width": 300
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"version": "primary",
|
|
38
|
+
"benefits": [
|
|
39
|
+
{
|
|
40
|
+
"label": "Преимущество 1",
|
|
41
|
+
"description": "Описание"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Преимущество 2",
|
|
45
|
+
"description": "Описание"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Преимущество 3",
|
|
49
|
+
"description": "Описание"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"buttons": [
|
|
53
|
+
{
|
|
54
|
+
"text": "Кнопка",
|
|
55
|
+
"version": "primary"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
20
58
|
},
|
|
21
59
|
{
|
|
22
60
|
"blockType": "ProductBlock",
|
|
23
61
|
"title": "Продуктовый блок",
|
|
24
62
|
"description": "Описание текстового блока",
|
|
25
|
-
"tags": ["tag2"]
|
|
63
|
+
"tags": ["tag2"],
|
|
64
|
+
"headingType": "h2",
|
|
65
|
+
"backwardButton": {
|
|
66
|
+
"text": "Кнопка возврата",
|
|
67
|
+
"icon": { "icon": "ArrowLeftIcon" }
|
|
68
|
+
},
|
|
69
|
+
"image": {
|
|
70
|
+
"format": "webp",
|
|
71
|
+
"size": {
|
|
72
|
+
"width": 234,
|
|
73
|
+
"height": 234
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"],
|
|
77
|
+
"isDotted": true,
|
|
78
|
+
"buttons": [
|
|
79
|
+
{
|
|
80
|
+
"text": "Кнопка",
|
|
81
|
+
"version": "secondary"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"version": "primary",
|
|
85
|
+
"benefits": [
|
|
86
|
+
{
|
|
87
|
+
"label": "Преимущество №1",
|
|
88
|
+
"icon": {"icon": "ClockIcon"}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"label": "Преимущество №2",
|
|
92
|
+
"icon": {"icon": "SignDocsIcon"}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
26
95
|
}
|
|
27
96
|
]
|
|
28
97
|
}
|
|
@@ -28,7 +28,16 @@ export interface LinkDocsContent {
|
|
|
28
28
|
title?: string;
|
|
29
29
|
/** @title Описание */
|
|
30
30
|
description?: string;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @title Иконка
|
|
33
|
+
* @default {
|
|
34
|
+
* "size": {
|
|
35
|
+
* "width": 24,
|
|
36
|
+
* "height": 24
|
|
37
|
+
* },
|
|
38
|
+
* "format": "webp"
|
|
39
|
+
* }
|
|
40
|
+
*/
|
|
32
41
|
icon?: Picture;
|
|
33
42
|
/** @title Список */
|
|
34
43
|
documents?: LinkDocsItem[];
|
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
{
|
|
8
8
|
"blockListType": "TextBlock",
|
|
9
9
|
"title": "Текстовый блок",
|
|
10
|
-
"description": "Описание текстового блока"
|
|
10
|
+
"description": "Описание текстового блока",
|
|
11
|
+
"style": ["col-span-12"]
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
"blockListType": "TextBlock",
|
|
14
15
|
"title": "Текстовый блок №2",
|
|
15
|
-
"description": "Описание текстового блока №2"
|
|
16
|
+
"description": "Описание текстового блока №2",
|
|
17
|
+
"style": ["col-span-12"]
|
|
16
18
|
}
|
|
17
19
|
]
|
|
18
20
|
},
|
|
@@ -22,12 +24,14 @@
|
|
|
22
24
|
{
|
|
23
25
|
"blockListType": "TextBlock",
|
|
24
26
|
"title": "Текстовый блок",
|
|
25
|
-
"description": "Описание текстового блока"
|
|
27
|
+
"description": "Описание текстового блока",
|
|
28
|
+
"style": ["col-span-12"]
|
|
26
29
|
},
|
|
27
30
|
{
|
|
28
31
|
"blockListType": "TextBlock",
|
|
29
32
|
"title": "Текстовый блок №2",
|
|
30
|
-
"description": "Описание текстового блока №2"
|
|
33
|
+
"description": "Описание текстового блока №2",
|
|
34
|
+
"style": ["col-span-12"]
|
|
31
35
|
}
|
|
32
36
|
]
|
|
33
37
|
},
|
|
@@ -37,12 +41,14 @@
|
|
|
37
41
|
{
|
|
38
42
|
"blockListType": "TextBlock",
|
|
39
43
|
"title": "Текстовый блок",
|
|
40
|
-
"description": "Описание текстового блока"
|
|
44
|
+
"description": "Описание текстового блока",
|
|
45
|
+
"style": ["col-span-12"]
|
|
41
46
|
},
|
|
42
47
|
{
|
|
43
48
|
"blockListType": "TextBlock",
|
|
44
49
|
"title": "Текстовый блок №2",
|
|
45
|
-
"description": "Описание текстового блока №2"
|
|
50
|
+
"description": "Описание текстового блока №2",
|
|
51
|
+
"style": ["col-span-12"]
|
|
46
52
|
}
|
|
47
53
|
]
|
|
48
54
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"description": "Описание",
|
|
4
4
|
"headingType": "h2",
|
|
5
5
|
"backwardButton": {
|
|
6
|
-
"href": "https://rshb.ru",
|
|
7
6
|
"text": "Кнопка возврата",
|
|
8
7
|
"icon": { "icon": "ArrowLeftIcon" }
|
|
9
8
|
},
|
|
@@ -12,24 +11,18 @@
|
|
|
12
11
|
"size": {
|
|
13
12
|
"width": 234,
|
|
14
13
|
"height": 234
|
|
15
|
-
}
|
|
16
|
-
"alt": "",
|
|
17
|
-
"title": ""
|
|
14
|
+
}
|
|
18
15
|
},
|
|
19
16
|
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"],
|
|
20
17
|
"isDotted": true,
|
|
21
18
|
"buttons": [
|
|
22
19
|
{
|
|
23
20
|
"text": "Кнопка",
|
|
24
|
-
"version": "secondary"
|
|
25
|
-
"target": "",
|
|
26
|
-
"icon": {
|
|
27
|
-
"alt": "",
|
|
28
|
-
"title": ""
|
|
29
|
-
}
|
|
21
|
+
"version": "secondary"
|
|
30
22
|
}
|
|
31
23
|
],
|
|
32
24
|
"version": "primary",
|
|
25
|
+
"benefitsVersion": "normal",
|
|
33
26
|
"benefits": [
|
|
34
27
|
{
|
|
35
28
|
"label": "Преимущество №1",
|
|
@@ -2,7 +2,7 @@ import type { Picture } from '../../model/Picture';
|
|
|
2
2
|
import { context } from '../../react/setup-fixture';
|
|
3
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
4
|
import { ProductBlock } from './ProductBlock';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ProductBlockBenefit, ProductBlockContent } from './ProductBlockContent';
|
|
6
6
|
|
|
7
7
|
const image: Picture = {
|
|
8
8
|
src: 'money-1.png',
|
|
@@ -18,7 +18,7 @@ const benefits: ProductBlockBenefit[] = [
|
|
|
18
18
|
{
|
|
19
19
|
label: 'До 5 млн ₽',
|
|
20
20
|
description: 'Кредитный лимит',
|
|
21
|
-
icon: { icon: '
|
|
21
|
+
icon: { icon: 'CalendarTickIcon', iconVersion: 'white' },
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
label: 'От 16,9%',
|
|
@@ -5,7 +5,6 @@ import { ButtonSection } from '../../ui-kit/Button/ButtonSection';
|
|
|
5
5
|
import { Description } from '../../ui-kit/Description/Description';
|
|
6
6
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
-
import { BaseTile } from '../BaseTile/BaseTile';
|
|
9
8
|
import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
|
|
10
9
|
import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
|
|
11
10
|
import type { ProductTileContent, TextBenefit } from './ProductTileContent';
|
|
@@ -33,39 +32,36 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
33
32
|
}) => {
|
|
34
33
|
return (
|
|
35
34
|
<section
|
|
36
|
-
className={`bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${className} ${
|
|
35
|
+
className={`bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${
|
|
37
36
|
productTileStyleMap[version]
|
|
38
37
|
} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
|
|
39
38
|
id={anchor}
|
|
40
39
|
>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/>
|
|
51
|
-
) : null
|
|
52
|
-
}
|
|
53
|
-
buttons={
|
|
54
|
-
buttons?.length ? (
|
|
55
|
-
<ButtonSection context={context} buttons={buttons} className="flex mt-9 gap-3" />
|
|
56
|
-
) : null
|
|
57
|
-
}
|
|
58
|
-
image={image?.src && <Img className="mt-auto ml-7" image={image} />}
|
|
59
|
-
>
|
|
40
|
+
<div className="z-[1]">
|
|
41
|
+
{title ? (
|
|
42
|
+
<Heading
|
|
43
|
+
headingType={headingType}
|
|
44
|
+
as="h3"
|
|
45
|
+
title={title}
|
|
46
|
+
className={`whitespace-pre-wrap text-h4`}
|
|
47
|
+
/>
|
|
48
|
+
) : null}
|
|
60
49
|
{description ? (
|
|
61
|
-
<Description className="mt-
|
|
50
|
+
<Description className="mt-2 text-md font-light" description={description} />
|
|
62
51
|
) : null}
|
|
63
52
|
{renderBenefits(benefits || [], version)}
|
|
64
|
-
|
|
65
53
|
{additionalDescription
|
|
66
54
|
? renderAdditionalDescription(additionalDescription, version)
|
|
67
55
|
: null}
|
|
68
|
-
</
|
|
56
|
+
</div>
|
|
57
|
+
{buttons?.length ? (
|
|
58
|
+
<ButtonSection
|
|
59
|
+
context={context}
|
|
60
|
+
buttons={buttons}
|
|
61
|
+
className="flex self-end mt-5 gap-4 z-[1]"
|
|
62
|
+
/>
|
|
63
|
+
) : null}
|
|
64
|
+
{image?.src ? <Img className="absolute right-0 bottom-0" image={image} /> : null}
|
|
69
65
|
</section>
|
|
70
66
|
);
|
|
71
67
|
},
|
|
@@ -73,10 +69,12 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
73
69
|
|
|
74
70
|
function renderBenefits(benefits: TextBenefit[], version: BlockVersion) {
|
|
75
71
|
return (
|
|
76
|
-
<div className="flex mt-
|
|
77
|
-
{benefits.length ?
|
|
72
|
+
<div className="flex mt-4">
|
|
73
|
+
{benefits.length ? (
|
|
74
|
+
<div className="mr-6 gap-2.5 text-title-2xs">{benefits.map(renderBenefitLabel)}</div>
|
|
75
|
+
) : null}
|
|
78
76
|
{benefits.length ? (
|
|
79
|
-
<div className="pt-1">
|
|
77
|
+
<div className="pt-1 text-m">
|
|
80
78
|
{benefits.map((_, i) => renderBenefitDescription(_, i, version))}
|
|
81
79
|
</div>
|
|
82
80
|
) : null}
|
|
@@ -86,7 +84,7 @@ function renderBenefits(benefits: TextBenefit[], version: BlockVersion) {
|
|
|
86
84
|
|
|
87
85
|
function renderBenefitLabel(benefit: TextBenefit, i: number) {
|
|
88
86
|
return (
|
|
89
|
-
<div key={String(i)} className={
|
|
87
|
+
<div key={String(i)} className={`${i ? 'mt-2.5' : ''}`}>
|
|
90
88
|
{benefit.label}
|
|
91
89
|
</div>
|
|
92
90
|
);
|
|
@@ -99,7 +97,7 @@ function renderBenefitDescription(benefit: TextBenefit, i: number, version = 'pr
|
|
|
99
97
|
};
|
|
100
98
|
|
|
101
99
|
return (
|
|
102
|
-
<div key={String(i)} className={
|
|
100
|
+
<div key={String(i)} className={`${i ? 'mt-4' : ''} ${labelStyleMap[version]}`}>
|
|
103
101
|
{benefit.description}
|
|
104
102
|
</div>
|
|
105
103
|
);
|
|
@@ -111,5 +109,5 @@ function renderAdditionalDescription(additionalDescription: string, version = 'p
|
|
|
111
109
|
secondary: 'text-white',
|
|
112
110
|
};
|
|
113
111
|
|
|
114
|
-
return <div className={`text-
|
|
112
|
+
return <div className={`text-m mt-2.5 ${descStyleMap[version]}`}>{additionalDescription}</div>;
|
|
115
113
|
}
|
|
@@ -8,19 +8,34 @@
|
|
|
8
8
|
"label": "Шаг №1",
|
|
9
9
|
"description": "Описание шага №1",
|
|
10
10
|
"icon": {
|
|
11
|
-
"icon": "NewDocIcon"
|
|
11
|
+
"icon": "NewDocIcon",
|
|
12
|
+
"size": {
|
|
13
|
+
"width": 48,
|
|
14
|
+
"height": 48
|
|
15
|
+
},
|
|
16
|
+
"format": "webp"
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
{
|
|
15
20
|
"label": "Шаг №2",
|
|
16
21
|
"icon": {
|
|
17
|
-
"icon": "PassSendIcon"
|
|
22
|
+
"icon": "PassSendIcon",
|
|
23
|
+
"size": {
|
|
24
|
+
"width": 48,
|
|
25
|
+
"height": 48
|
|
26
|
+
},
|
|
27
|
+
"format": "webp"
|
|
18
28
|
}
|
|
19
29
|
},
|
|
20
30
|
{
|
|
21
31
|
"description": "Шаг №3 без заголовка",
|
|
22
32
|
"icon": {
|
|
23
|
-
"icon": "ActualBalanceIcon"
|
|
33
|
+
"icon": "ActualBalanceIcon",
|
|
34
|
+
"size": {
|
|
35
|
+
"width": 48,
|
|
36
|
+
"height": 48
|
|
37
|
+
},
|
|
38
|
+
"format": "webp"
|
|
24
39
|
}
|
|
25
40
|
}
|
|
26
41
|
]
|
|
@@ -5,6 +5,7 @@ import type { UniBlockProps } from '../../types';
|
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
7
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
8
|
+
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
8
9
|
import { getStyleMap } from './StepsBlockStyleMaps';
|
|
9
10
|
|
|
10
11
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
@@ -109,7 +110,11 @@ const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step
|
|
|
109
110
|
className={`${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`}
|
|
110
111
|
>
|
|
111
112
|
<span className={`font-medium flex self-center ${styleMap.title} ${iconTextSize}`}>
|
|
112
|
-
{(step
|
|
113
|
+
{checkIsIconRenderable(step?.icon) ? (
|
|
114
|
+
<Img image={step.icon} width={iconSize} height={iconSize} asSVG />
|
|
115
|
+
) : (
|
|
116
|
+
<span>{i + 1}</span>
|
|
117
|
+
)}
|
|
113
118
|
</span>
|
|
114
119
|
</div>
|
|
115
120
|
);
|
|
@@ -5,7 +5,9 @@ import { Heading } from '../../ui-kit/Heading/Heading';
|
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
6
|
import { joinList } from '../../utils/joinList';
|
|
7
7
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
8
|
-
import {
|
|
8
|
+
import type { StyleType } from './StepsBlockStyleMaps';
|
|
9
|
+
import { getStyleMap } from './StepsBlockStyleMaps';
|
|
10
|
+
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
9
11
|
|
|
10
12
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
11
13
|
|
|
@@ -63,19 +65,23 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
63
65
|
},
|
|
64
66
|
);
|
|
65
67
|
|
|
66
|
-
const renderStepIcon =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
const renderStepIcon =
|
|
69
|
+
(styleMap: StyleType) =>
|
|
70
|
+
({ icon }: Step, i: number) => {
|
|
71
|
+
return (
|
|
72
|
+
<div key={String(i)} className="flex flex-col items-center text-center relative">
|
|
73
|
+
<div
|
|
74
|
+
className={`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`}
|
|
75
|
+
>
|
|
76
|
+
{checkIsIconRenderable(icon) ? (
|
|
77
|
+
<Img image={icon} width="48" height="48" asSVG />
|
|
78
|
+
) : (
|
|
79
|
+
<span className={`font-normal text-title-sm ${styleMap.title}`}>{i + 1}</span>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
75
82
|
</div>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
83
|
+
);
|
|
84
|
+
};
|
|
79
85
|
|
|
80
86
|
const renderStepTitle = (styleMap: StyleType, isMainButton: boolean) => (step: Step, i: number) => {
|
|
81
87
|
return (
|
|
@@ -11,6 +11,17 @@ export interface Step {
|
|
|
11
11
|
label?: string;
|
|
12
12
|
/** @title Описание */
|
|
13
13
|
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @title Иконка
|
|
16
|
+
* @default
|
|
17
|
+
* {
|
|
18
|
+
* "size": {
|
|
19
|
+
* "width": 48,
|
|
20
|
+
* "height": 48
|
|
21
|
+
* },
|
|
22
|
+
* "format": "webp"
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
14
25
|
icon?: Picture;
|
|
15
26
|
button?: ButtonProps;
|
|
16
27
|
}
|
|
@@ -7,21 +7,14 @@
|
|
|
7
7
|
"format": "webp",
|
|
8
8
|
"size": {
|
|
9
9
|
"width": 445
|
|
10
|
-
}
|
|
11
|
-
"alt": "",
|
|
12
|
-
"title": ""
|
|
10
|
+
}
|
|
13
11
|
},
|
|
14
12
|
"isDotted": true,
|
|
15
13
|
"items": ["Пункт 1", "Пункт 2", "Пункт 3"],
|
|
16
14
|
"buttons": [
|
|
17
15
|
{
|
|
18
16
|
"text": "Кнопка",
|
|
19
|
-
"version": "primary"
|
|
20
|
-
"target": "",
|
|
21
|
-
"icon": {
|
|
22
|
-
"alt": "",
|
|
23
|
-
"title": ""
|
|
24
|
-
}
|
|
17
|
+
"version": "primary"
|
|
25
18
|
}
|
|
26
19
|
],
|
|
27
20
|
"version": "primary"
|