@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.
Files changed (158) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +19 -21
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/AccordionContent.d.ts +4 -1
  5. package/dist/components/Calculator/renderRate.js +1 -1
  6. package/dist/components/Calculator/renderRate.js.map +1 -1
  7. package/dist/components/Catalog/Catalog.js +2 -2
  8. package/dist/components/Catalog/Catalog.js.map +1 -1
  9. package/dist/components/Catalog/CatalogContent.d.ts +1 -0
  10. package/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  11. package/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  12. package/dist/components/PictureText/PictureTextContent.d.ts +1 -0
  13. package/dist/components/ProductTile/ProductTile.js +7 -8
  14. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  15. package/dist/components/StepsBlock/StepsBlock.js +3 -2
  16. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  17. package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -1
  18. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  19. package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  20. package/dist/model/Picture.d.ts +6 -0
  21. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  22. package/dist/ui-kit/Button/ButtonInner.js +2 -2
  23. package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  24. package/dist/ui-kit/Foldable/Foldable.js +1 -1
  25. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  26. package/dist/ui-kit/Img/Img.js +2 -6
  27. package/dist/ui-kit/Img/Img.js.map +1 -1
  28. package/dist/utils/checkIsIconRenderable.d.ts +2 -0
  29. package/dist/utils/checkIsIconRenderable.js +5 -0
  30. package/dist/utils/checkIsIconRenderable.js.map +1 -0
  31. package/lib/common.css +1 -1
  32. package/lib/components/Accordion/AccordionContent.d.ts +4 -1
  33. package/lib/components/Calculator/renderRate.js +1 -1
  34. package/lib/components/Calculator/renderRate.js.map +1 -1
  35. package/lib/components/Catalog/Catalog.js +2 -2
  36. package/lib/components/Catalog/Catalog.js.map +1 -1
  37. package/lib/components/Catalog/CatalogContent.d.ts +1 -0
  38. package/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  39. package/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  40. package/lib/components/PictureText/PictureTextContent.d.ts +1 -0
  41. package/lib/components/ProductTile/ProductTile.js +7 -8
  42. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  43. package/lib/components/StepsBlock/StepsBlock.js +3 -2
  44. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  45. package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -1
  46. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  47. package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  48. package/lib/model/Picture.d.ts +6 -0
  49. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  50. package/lib/ui-kit/Button/ButtonInner.js +2 -2
  51. package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  52. package/lib/ui-kit/Foldable/Foldable.js +1 -1
  53. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  54. package/lib/ui-kit/Img/Img.js +2 -6
  55. package/lib/ui-kit/Img/Img.js.map +1 -1
  56. package/lib/utils/checkIsIconRenderable.d.ts +2 -0
  57. package/lib/utils/checkIsIconRenderable.js +2 -0
  58. package/lib/utils/checkIsIconRenderable.js.map +1 -0
  59. package/mobile/bundle/bundle.umd.js +5 -3
  60. package/mobile/bundle/bundle.umd.min.js +1 -1
  61. package/mobile/dist/components/Accordion/AccordionContent.d.ts +4 -1
  62. package/mobile/dist/components/Calculator/renderRate.js +1 -1
  63. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  64. package/mobile/dist/components/Catalog/Catalog.js +2 -2
  65. package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
  66. package/mobile/dist/components/Catalog/CatalogContent.d.ts +1 -0
  67. package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  68. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  69. package/mobile/dist/components/PictureText/PictureTextContent.d.ts +1 -0
  70. package/mobile/dist/components/ProductTile/ProductTile.js +7 -8
  71. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  72. package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -1
  73. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  74. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  75. package/mobile/dist/model/Picture.d.ts +6 -0
  76. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  77. package/mobile/dist/ui-kit/Button/ButtonInner.js +2 -2
  78. package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  79. package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
  80. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  81. package/mobile/dist/utils/checkIsIconRenderable.d.ts +2 -0
  82. package/mobile/dist/utils/checkIsIconRenderable.js +5 -0
  83. package/mobile/dist/utils/checkIsIconRenderable.js.map +1 -0
  84. package/mobile/lib/components/Accordion/AccordionContent.d.ts +4 -1
  85. package/mobile/lib/components/Calculator/renderRate.js +1 -1
  86. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  87. package/mobile/lib/components/Catalog/Catalog.js +2 -2
  88. package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
  89. package/mobile/lib/components/Catalog/CatalogContent.d.ts +1 -0
  90. package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  91. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  92. package/mobile/lib/components/PictureText/PictureTextContent.d.ts +1 -0
  93. package/mobile/lib/components/ProductTile/ProductTile.js +7 -8
  94. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  95. package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -1
  96. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  97. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  98. package/mobile/lib/model/Picture.d.ts +6 -0
  99. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  100. package/mobile/lib/ui-kit/Button/ButtonInner.js +2 -2
  101. package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  102. package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
  103. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  104. package/mobile/lib/utils/checkIsIconRenderable.d.ts +2 -0
  105. package/mobile/lib/utils/checkIsIconRenderable.js +2 -0
  106. package/mobile/lib/utils/checkIsIconRenderable.js.map +1 -0
  107. package/mobile/src/components/Accordion/Accordion.example.json +13 -6
  108. package/mobile/src/components/Accordion/AccordionContent.ts +4 -1
  109. package/mobile/src/components/Calculator/renderRate.tsx +1 -3
  110. package/mobile/src/components/Catalog/Catalog.tsx +2 -1
  111. package/mobile/src/components/Catalog/CatalogContent.ts +1 -0
  112. package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
  113. package/mobile/src/components/GroupBlock/GroupBlock.example.json +72 -3
  114. package/mobile/src/components/GroupBlock/GroupBlockContent.ts +2 -2
  115. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +10 -1
  116. package/mobile/src/components/OtherProducts/OtherProducts.example.json +12 -6
  117. package/mobile/src/components/PictureText/PictureTextContent.ts +1 -0
  118. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -10
  119. package/mobile/src/components/ProductTile/ProductTile.example.json +1 -2
  120. package/mobile/src/components/ProductTile/ProductTile.tsx +28 -30
  121. package/mobile/src/components/PromoTile/PromoTile.example.json +1 -2
  122. package/mobile/src/components/StepsBlock/StepsBlock.example.json +18 -3
  123. package/mobile/src/components/StepsBlock/StepsBlock.tsx +6 -1
  124. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +11 -0
  125. package/mobile/src/components/Tile/Tile.example.json +2 -9
  126. package/mobile/src/model/Picture.ts +7 -0
  127. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
  128. package/mobile/src/ui-kit/Button/ButtonInner.tsx +2 -2
  129. package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
  130. package/mobile/src/utils/checkIsIconRenderable.tsx +3 -0
  131. package/package.json +2 -2
  132. package/src/components/Accordion/Accordion.example.json +13 -6
  133. package/src/components/Accordion/AccordionContent.ts +4 -1
  134. package/src/components/Calculator/renderRate.tsx +1 -3
  135. package/src/components/Catalog/Catalog.tsx +2 -1
  136. package/src/components/Catalog/CatalogContent.ts +1 -0
  137. package/src/components/ContentPage/ContentPage.page.json +1 -1
  138. package/src/components/GroupBlock/GroupBlock.example.json +72 -3
  139. package/src/components/GroupBlock/GroupBlockContent.ts +2 -2
  140. package/src/components/LinkDocs/LinkDocsContent.ts +10 -1
  141. package/src/components/OtherProducts/OtherProducts.example.json +12 -6
  142. package/src/components/PictureText/PictureTextContent.ts +1 -0
  143. package/src/components/ProductBlock/ProductBlock.example.json +3 -10
  144. package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -2
  145. package/src/components/ProductTile/ProductTile.example.json +1 -2
  146. package/src/components/ProductTile/ProductTile.tsx +28 -30
  147. package/src/components/PromoTile/PromoTile.example.json +1 -2
  148. package/src/components/StepsBlock/StepsBlock.example.json +18 -3
  149. package/src/components/StepsBlock/StepsBlock.mobile.tsx +6 -1
  150. package/src/components/StepsBlock/StepsBlock.tsx +19 -13
  151. package/src/components/StepsBlock/StepsBlockContent.ts +11 -0
  152. package/src/components/Tile/Tile.example.json +2 -9
  153. package/src/model/Picture.ts +7 -0
  154. package/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
  155. package/src/ui-kit/Button/ButtonInner.tsx +2 -2
  156. package/src/ui-kit/Foldable/Foldable.tsx +1 -1
  157. package/src/ui-kit/Img/Img.tsx +9 -16
  158. 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.75",
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.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
- /** @title Выравнивание заголовка */
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}
@@ -22,5 +22,6 @@ export interface CatalogCardType extends HeadingContent, DescriptionContent, Ima
22
22
  */
23
23
  export type CatalogContent = HeadingContent &
24
24
  DescriptionContent & {
25
+ /** @title Список карточек */
25
26
  cards?: CatalogCardType[];
26
27
  };
@@ -2355,4 +2355,4 @@
2355
2355
  }
2356
2356
  }
2357
2357
  ]
2358
- }
2358
+ }
@@ -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
  }
@@ -4,10 +4,10 @@ import type { GroupBlockDef } from './BlocksTypeProps';
4
4
  * @title Таб
5
5
  */
6
6
  export interface GroupBlockTab {
7
- /** @title Название */
8
- title?: string;
9
7
  /** @title Tег */
10
8
  tag?: string;
9
+ /** @title Название */
10
+ title?: string;
11
11
  }
12
12
 
13
13
  /**
@@ -28,7 +28,16 @@ export interface LinkDocsContent {
28
28
  title?: string;
29
29
  /** @title Описание */
30
30
  description?: string;
31
- /** @title Название иконки */
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
  }
@@ -6,6 +6,7 @@ import type { Picture } from '../../model/Picture';
6
6
  export type TitleWithImageContent = HeadingContent & ImageContent;
7
7
 
8
8
  export interface PictureTextBenefit {
9
+ /** @title Иконка */
9
10
  icon?: Picture;
10
11
  /** @title Название */
11
12
  label?: string;
@@ -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 { ProductBlockContent, ProductBlockBenefit } from './ProductBlockContent';
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: 'EmptyWalletIcon', iconVersion: 'white' },
21
+ icon: { icon: 'CalendarTickIcon', iconVersion: 'white' },
22
22
  },
23
23
  {
24
24
  label: 'От 16,9%',
@@ -26,8 +26,7 @@
26
26
  "buttons": [
27
27
  {
28
28
  "text": "Кнопка",
29
- "version": "primary",
30
- "target": ""
29
+ "version": "primary"
31
30
  }
32
31
  ]
33
32
  }
@@ -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
- <BaseTile
42
- context={context}
43
- title={
44
- title ? (
45
- <Heading
46
- headingType={headingType}
47
- as="h3"
48
- title={title}
49
- className={`whitespace-pre-wrap max-w-[600px]`}
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-4 max-w-[600px]" description={description} />
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
- </BaseTile>
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-5 mb-1">
77
- {benefits.length ? <div className="mr-8">{benefits.map(renderBenefitLabel)}</div> : null}
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={`text-xl font-medium ${i ? 'mt-2.5' : ''}`}>
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={`text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`}>
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-sm mt-2.5 ${descStyleMap[version]}`}>{additionalDescription}</div>;
112
+ return <div className={`text-m mt-2.5 ${descStyleMap[version]}`}>{additionalDescription}</div>;
115
113
  }
@@ -6,8 +6,7 @@
6
6
  {
7
7
  "text": "Все акции",
8
8
  "href": "/credits",
9
- "version": "secondary",
10
- "target": ""
9
+ "version": "secondary"
11
10
  }
12
11
  ],
13
12
  "version": "secondary"
@@ -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.icon?.icon && <Img image={step.icon} width={iconSize} height={iconSize} />) || i + 1}
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 { getStyleMap, StyleType } from './StepsBlockStyleMaps';
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 = (styleMap: StyleType) => (step: Step, i: number) => {
67
- return (
68
- <div key={String(i)} className="flex flex-col items-center text-center relative">
69
- <div
70
- className={`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`}
71
- >
72
- {(step.icon?.icon && <Img image={step.icon} width="48" height="48" />) || (
73
- <span className={`font-normal text-title-sm ${styleMap.title}`}>{i + 1}</span>
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
- </div>
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"