@redneckz/wildless-cms-uni-blocks 0.3.76 → 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 (101) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +6 -8
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/AccordionContent.d.ts +4 -1
  5. package/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  6. package/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  7. package/dist/components/PictureText/PictureTextContent.d.ts +1 -0
  8. package/dist/components/StepsBlock/StepsBlock.js +3 -2
  9. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  10. package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -1
  11. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  12. package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  13. package/dist/model/Picture.d.ts +6 -0
  14. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  15. package/dist/ui-kit/Img/Img.js +2 -6
  16. package/dist/ui-kit/Img/Img.js.map +1 -1
  17. package/dist/utils/checkIsIconRenderable.d.ts +2 -0
  18. package/dist/utils/checkIsIconRenderable.js +5 -0
  19. package/dist/utils/checkIsIconRenderable.js.map +1 -0
  20. package/lib/components/Accordion/AccordionContent.d.ts +4 -1
  21. package/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  22. package/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  23. package/lib/components/PictureText/PictureTextContent.d.ts +1 -0
  24. package/lib/components/StepsBlock/StepsBlock.js +3 -2
  25. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  26. package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -1
  27. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  28. package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  29. package/lib/model/Picture.d.ts +6 -0
  30. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  31. package/lib/ui-kit/Img/Img.js +2 -6
  32. package/lib/ui-kit/Img/Img.js.map +1 -1
  33. package/lib/utils/checkIsIconRenderable.d.ts +2 -0
  34. package/lib/utils/checkIsIconRenderable.js +2 -0
  35. package/lib/utils/checkIsIconRenderable.js.map +1 -0
  36. package/mobile/bundle/bundle.umd.js +3 -1
  37. package/mobile/bundle/bundle.umd.min.js +1 -1
  38. package/mobile/dist/components/Accordion/AccordionContent.d.ts +4 -1
  39. package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  40. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  41. package/mobile/dist/components/PictureText/PictureTextContent.d.ts +1 -0
  42. package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -1
  43. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  44. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  45. package/mobile/dist/model/Picture.d.ts +6 -0
  46. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  47. package/mobile/dist/utils/checkIsIconRenderable.d.ts +2 -0
  48. package/mobile/dist/utils/checkIsIconRenderable.js +5 -0
  49. package/mobile/dist/utils/checkIsIconRenderable.js.map +1 -0
  50. package/mobile/lib/components/Accordion/AccordionContent.d.ts +4 -1
  51. package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +2 -2
  52. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +10 -1
  53. package/mobile/lib/components/PictureText/PictureTextContent.d.ts +1 -0
  54. package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -1
  55. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  56. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -0
  57. package/mobile/lib/model/Picture.d.ts +6 -0
  58. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +10 -10
  59. package/mobile/lib/utils/checkIsIconRenderable.d.ts +2 -0
  60. package/mobile/lib/utils/checkIsIconRenderable.js +2 -0
  61. package/mobile/lib/utils/checkIsIconRenderable.js.map +1 -0
  62. package/mobile/src/components/Accordion/Accordion.example.json +13 -6
  63. package/mobile/src/components/Accordion/AccordionContent.ts +4 -1
  64. package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
  65. package/mobile/src/components/GroupBlock/GroupBlock.example.json +72 -3
  66. package/mobile/src/components/GroupBlock/GroupBlockContent.ts +2 -2
  67. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +10 -1
  68. package/mobile/src/components/OtherProducts/OtherProducts.example.json +12 -6
  69. package/mobile/src/components/PictureText/PictureTextContent.ts +1 -0
  70. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -10
  71. package/mobile/src/components/ProductTile/ProductTile.example.json +1 -2
  72. package/mobile/src/components/PromoTile/PromoTile.example.json +1 -2
  73. package/mobile/src/components/StepsBlock/StepsBlock.example.json +18 -3
  74. package/mobile/src/components/StepsBlock/StepsBlock.tsx +6 -1
  75. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +11 -0
  76. package/mobile/src/components/Tile/Tile.example.json +2 -9
  77. package/mobile/src/model/Picture.ts +7 -0
  78. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
  79. package/mobile/src/utils/checkIsIconRenderable.tsx +3 -0
  80. package/package.json +1 -1
  81. package/src/components/Accordion/Accordion.example.json +13 -6
  82. package/src/components/Accordion/AccordionContent.ts +4 -1
  83. package/src/components/ContentPage/ContentPage.page.json +1 -1
  84. package/src/components/GroupBlock/GroupBlock.example.json +72 -3
  85. package/src/components/GroupBlock/GroupBlockContent.ts +2 -2
  86. package/src/components/LinkDocs/LinkDocsContent.ts +10 -1
  87. package/src/components/OtherProducts/OtherProducts.example.json +12 -6
  88. package/src/components/PictureText/PictureTextContent.ts +1 -0
  89. package/src/components/ProductBlock/ProductBlock.example.json +3 -10
  90. package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -2
  91. package/src/components/ProductTile/ProductTile.example.json +1 -2
  92. package/src/components/PromoTile/PromoTile.example.json +1 -2
  93. package/src/components/StepsBlock/StepsBlock.example.json +18 -3
  94. package/src/components/StepsBlock/StepsBlock.mobile.tsx +6 -1
  95. package/src/components/StepsBlock/StepsBlock.tsx +19 -13
  96. package/src/components/StepsBlock/StepsBlockContent.ts +11 -0
  97. package/src/components/Tile/Tile.example.json +2 -9
  98. package/src/model/Picture.ts +7 -0
  99. package/src/ui-kit/BlocksList/BlocksListProps.ts +42 -20
  100. package/src/ui-kit/Img/Img.tsx +9 -16
  101. package/src/utils/checkIsIconRenderable.tsx +3 -0
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { Heading } from '../../ui-kit/Heading/Heading.js';
4
4
  import { Img } from '../../ui-kit/Img/Img.js';
5
+ import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable.js';
5
6
  import { getStyleMap } from './StepsBlockStyleMaps.js';
6
7
  const STEPS_SIZE_MAP = {
7
8
  normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
@@ -27,6 +28,6 @@ const renderIconArea = (size, version) => (step, i) => {
27
28
  const iconAreaSize = STEPS_SIZE_MAP[size];
28
29
  const iconSize = size === 'normal' ? '38' : '27';
29
30
  const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
30
- return (_jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium flex self-center ${styleMap.title} ${iconTextSize}`, children: (step.icon?.icon && _jsx(Img, { image: step.icon, width: iconSize, height: iconSize })) || i + 1 }) }));
31
+ return (_jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium flex self-center ${styleMap.title} ${iconTextSize}`, children: checkIsIconRenderable(step?.icon) ? (_jsx(Img, { image: step.icon, width: iconSize, height: iconSize, asSVG: true })) : (_jsx("span", { children: i + 1 })) }) }));
31
32
  };
32
33
  //# sourceMappingURL=StepsBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,MAAM,cAAc,GAAgC;IAClD,MAAM,EAAE,6CAA6C;IACrD,KAAK,EAAE,6CAA6C;CACrD,CAAC;AAEF,MAAM,iCAAiC,GAAgC;IACrE,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,cAAc;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EACC,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,GAAG,IAAI,EAChB,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAEtC,OAAO,CACL,mBACE,SAAS,EAAE;UACT,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,IAAI,SAAS,IAAI,EAAE,EAAE,aAE3D,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,OAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAE,eAAe,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CACvF,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,C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CAAC,CAAC,CAAC,EACxB,EAAE,YAED,IAAI,CAAC,WAAW,GACb,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,IA5BE,MAAM,CAAC,CAAC,CAAC,CA6Bb,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,OAAqB,EAAE,EAAE,CAAC,CAAC,IAAU,EAAE,CAAS,EAAE,EAAE;IAC7F,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAE1C,MAAM,QAAQ,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAE5E,OAAO,CACL,cACE,SAAS,EAAE,GAAG,YAAY,IAAI,QAAQ,CAAC,cAAc,4DAA4D,YAEjH,eAAM,SAAS,EAAE,gCAAgC,QAAQ,CAAC,KAAK,IAAI,YAAY,EAAE,YAC9E,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACnC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,SAAG,CACnE,CAAC,CAAC,CAAC,CACF,yBAAO,CAAC,GAAG,CAAC,GAAQ,CACrB,GACI,GACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -10,6 +10,17 @@ export interface Step {
10
10
  label?: string;
11
11
  /** @title Описание */
12
12
  description?: string;
13
+ /**
14
+ * @title Иконка
15
+ * @default
16
+ * {
17
+ * "size": {
18
+ * "width": 48,
19
+ * "height": 48
20
+ * },
21
+ * "format": "webp"
22
+ * }
23
+ */
13
24
  icon?: Picture;
14
25
  button?: ButtonProps;
15
26
  }
@@ -8,6 +8,11 @@ export interface Img {
8
8
  /** @title Текст подсказки (title) */
9
9
  title?: string;
10
10
  }
11
+ /**
12
+ * @title Брейкпоинт
13
+ * @enumNames ["1919px и меньше", "1439px и меньше", "1279px и меньше"]
14
+ */
15
+ export declare type MediaQuery = '(max-width: 1919px)' | '(max-width: 1439px)' | '(max-width: 1279px)';
11
16
  export interface ImgSource {
12
17
  /** @title Иконка */
13
18
  icon?: IconName;
@@ -18,6 +23,7 @@ export interface ImgSource {
18
23
  format?: 'jpeg' | 'jpg' | 'png' | 'gif' | 'webp' | 'heif' | 'avif';
19
24
  /** @hidden */
20
25
  options?: Record<string, any>;
26
+ media?: MediaQuery;
21
27
  /** @title Размер изображения */
22
28
  size?: {
23
29
  /** @title Ширина */
@@ -24,72 +24,72 @@ export interface BlocksCommonProps {
24
24
  }
25
25
  /**
26
26
  * @title Заголовок
27
- * @default {"blockListType": "Headline"}
28
27
  */
29
28
  export declare type HeadlineBlockListDef = HeadlineContent & BlocksCommonProps & {
29
+ /** @default Headline */
30
30
  blockListType: 'Headline';
31
31
  };
32
32
  /**
33
33
  * @title Список документов
34
- * @default {"blockListType": "LinkDocs"}
35
34
  */
36
35
  export declare type LinkDocsBlockListDef = LinkDocsContent & BlocksCommonProps & {
36
+ /** @default LinkDocs */
37
37
  blockListType: 'LinkDocs';
38
38
  };
39
39
  /**
40
40
  * @title Текстовый блок
41
- * @default {"blockListType": "TextBlock"}
42
41
  */
43
42
  export declare type TextBlockBlockListDef = TextBlockContent & BlocksCommonProps & {
43
+ /** @default TextBlock */
44
44
  blockListType: 'TextBlock';
45
45
  };
46
46
  /**
47
47
  * @title Картинка с текстом
48
- * @default {"blockListType": "PictureText"}
49
48
  */
50
49
  export declare type PictureTextBlockListDef = PictureTextContent & BlocksCommonProps & {
50
+ /** @default PictureText */
51
51
  blockListType: 'PictureText';
52
52
  };
53
53
  /**
54
54
  * @title Продуктовый блок
55
- * @default {"blockListType": "ProductBlock"}
56
55
  */
57
56
  export declare type ProductBlockBlockListDef = ProductBlockContent & BlocksCommonProps & {
57
+ /** @default ProductBlock */
58
58
  blockListType: 'ProductBlock';
59
59
  };
60
60
  /**
61
61
  * @title Плитка
62
- * @default {"blockListType": "Tile"}
63
62
  */
64
63
  export declare type TileBlockListDef = TileContent & BlocksCommonProps & {
64
+ /** @default Tile */
65
65
  blockListType: 'Tile';
66
66
  };
67
67
  /**
68
68
  * @title Продуктовая плитка
69
- * @default {"blockListType": "ProductTile"}
70
69
  */
71
70
  export declare type ProductTileBlockListDef = ProductTileContent & BlocksCommonProps & {
71
+ /** @default ProductTile */
72
72
  blockListType: 'ProductTile';
73
73
  };
74
74
  /**
75
75
  * @title Галерея
76
- * @default {"blockListType": "Gallery"}
77
76
  */
78
77
  export declare type GalleryBlockListDef = GalleryContent & BlocksCommonProps & {
78
+ /** @default Gallery */
79
79
  blockListType: 'Gallery';
80
80
  };
81
81
  /**
82
82
  * @title Мини-галлерея
83
- * @default {"blockListType": "MiniGallery"}
84
83
  */
85
84
  export declare type MiniGalleryBlockListDef = MiniGalleryContent & BlocksCommonProps & {
85
+ /** @default MiniGallery */
86
86
  blockListType: 'MiniGallery';
87
87
  };
88
88
  /**
89
89
  * @title Список ссылок
90
- * @default {"blockListType": "LinkList"}
91
90
  */
92
91
  export declare type LinkListBlockListDef = LinkListContent & BlocksCommonProps & {
92
+ /** @default LinkList */
93
93
  blockListType: 'LinkList';
94
94
  };
95
95
  /**
@@ -0,0 +1,2 @@
1
+ import type { Picture } from '../model/Picture';
2
+ export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -0,0 +1,2 @@
1
+ export const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
2
+ //# sourceMappingURL=checkIsIconRenderable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkIsIconRenderable.js","sourceRoot":"","sources":["../../src/utils/checkIsIconRenderable.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC"}
@@ -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 Список */
@@ -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",
@@ -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
  }
@@ -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
  );
@@ -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"
@@ -10,6 +10,12 @@ export interface Img {
10
10
  title?: string;
11
11
  }
12
12
 
13
+ /**
14
+ * @title Брейкпоинт
15
+ * @enumNames ["1919px и меньше", "1439px и меньше", "1279px и меньше"]
16
+ */
17
+ export type MediaQuery = '(max-width: 1919px)' | '(max-width: 1439px)' | '(max-width: 1279px)';
18
+
13
19
  export interface ImgSource {
14
20
  /** @title Иконка */
15
21
  icon?: IconName;
@@ -20,6 +26,7 @@ export interface ImgSource {
20
26
  format?: 'jpeg' | 'jpg' | 'png' | 'gif' | 'webp' | 'heif' | 'avif';
21
27
  /** @hidden */
22
28
  options?: Record<string, any>;
29
+ media?: MediaQuery;
23
30
  /** @title Размер изображения */
24
31
  size?: {
25
32
  /** @title Ширина */