@redneckz/wildless-cms-uni-blocks 0.9.8 → 0.9.10

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 (212) hide show
  1. package/bin/migration-scripts/0.9.8.js +29 -0
  2. package/bin/migration-scripts/0.9.9.js +109 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +26 -47
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  7. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  8. package/bundle/components/Footer/SocialMedia.d.ts +1 -1
  9. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  10. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  11. package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  12. package/dist/components/Blocks.js +0 -2
  13. package/dist/components/Blocks.js.map +1 -1
  14. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  15. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  16. package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  17. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  18. package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  19. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  20. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  21. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  22. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  23. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  24. package/dist/components/Footer/MediaButton.js +6 -7
  25. package/dist/components/Footer/MediaButton.js.map +1 -1
  26. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  27. package/dist/components/Footer/SocialMedia.js +2 -2
  28. package/dist/components/Footer/SocialMedia.js.map +1 -1
  29. package/dist/components/StepsBlock/StepsBlock.js +5 -3
  30. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  31. package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  32. package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  33. package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  34. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  35. package/lib/common.css +1 -1
  36. package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  37. package/lib/components/Blocks.js +0 -2
  38. package/lib/components/Blocks.js.map +1 -1
  39. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  40. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
  41. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  42. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  43. package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  44. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  45. package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
  46. package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  47. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  48. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  49. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
  50. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  51. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  52. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  53. package/lib/components/Footer/MediaButton.js +6 -7
  54. package/lib/components/Footer/MediaButton.js.map +1 -1
  55. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  56. package/lib/components/Footer/SocialMedia.js +2 -2
  57. package/lib/components/Footer/SocialMedia.js.map +1 -1
  58. package/lib/components/StepsBlock/StepsBlock.js +5 -3
  59. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  60. package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  61. package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  62. package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  63. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  64. package/mobile/bundle/bundle.umd.js +9 -10
  65. package/mobile/bundle/bundle.umd.min.js +1 -1
  66. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  67. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  68. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  69. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  70. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  71. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  72. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  73. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  74. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  75. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  76. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  77. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  78. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  79. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  80. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  81. package/mobile/dist/components/Footer/MediaButton.js +6 -7
  82. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  83. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  84. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  85. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  86. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  87. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  88. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  89. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  90. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  91. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  92. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  93. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  94. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  95. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  96. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  97. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  98. package/mobile/lib/components/Footer/MediaButton.js +6 -7
  99. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  100. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  101. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  102. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  103. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  104. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  105. package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  106. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  107. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  108. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  109. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  110. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  111. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
  112. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  113. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  114. package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  115. package/mobile/src/components/Footer/MediaButton.tsx +7 -10
  116. package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  117. package/mobile/src/components/PictureText/PictureText.example.json +3 -1
  118. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
  119. package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
  120. package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
  121. package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  122. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  123. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  124. package/mobile/src/components/Tile/Tile.example.json +3 -1
  125. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  126. package/package.json +1 -1
  127. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  128. package/src/components/Blocks.ts +0 -2
  129. package/src/components/Carousel/Carousel.fixture.tsx +43 -7
  130. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
  131. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  132. package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  133. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  134. package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  135. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
  136. package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  137. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  138. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
  139. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
  140. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  141. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  142. package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  143. package/src/components/Footer/MediaButton.tsx +7 -10
  144. package/src/components/Footer/SocialMedia.tsx +3 -11
  145. package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  146. package/src/components/PictureText/PictureText.example.json +3 -1
  147. package/src/components/ProductBlock/ProductBlock.example.json +3 -1
  148. package/src/components/ProductTile/ProductTile.example.json +3 -1
  149. package/src/components/StepsBlock/StepsBlock.example.json +7 -5
  150. package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
  151. package/src/components/StepsBlock/StepsBlock.tsx +13 -4
  152. package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  153. package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  154. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  155. package/src/components/Tile/Tile.example.json +3 -1
  156. package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  157. package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  158. package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  159. package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  160. package/dist/components/Recommendation/Recommendation.d.ts +0 -5
  161. package/dist/components/Recommendation/Recommendation.js +0 -26
  162. package/dist/components/Recommendation/Recommendation.js.map +0 -1
  163. package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  164. package/dist/components/Recommendation/RecommendationCard.js +0 -17
  165. package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  166. package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  167. package/dist/components/Recommendation/RecommendationContent.js +0 -2
  168. package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  169. package/lib/components/Recommendation/Recommendation.d.ts +0 -5
  170. package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
  171. package/lib/components/Recommendation/Recommendation.js +0 -24
  172. package/lib/components/Recommendation/Recommendation.js.map +0 -1
  173. package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  174. package/lib/components/Recommendation/RecommendationCard.js +0 -15
  175. package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  176. package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  177. package/lib/components/Recommendation/RecommendationContent.js +0 -2
  178. package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  179. package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  180. package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  181. package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  182. package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
  183. package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
  184. package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
  185. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  186. package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
  187. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  188. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  189. package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
  190. package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  191. package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
  192. package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
  193. package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
  194. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  195. package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
  196. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  197. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  198. package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
  199. package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  200. package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
  201. package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
  202. package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
  203. package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
  204. package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
  205. package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
  206. package/src/components/Catalog/Catalog.ui.json +0 -1
  207. package/src/components/Recommendation/Recommendation.example.json +0 -61
  208. package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
  209. package/src/components/Recommendation/Recommendation.tsx +0 -66
  210. package/src/components/Recommendation/Recommendation.ui.json +0 -19
  211. package/src/components/Recommendation/RecommendationCard.tsx +0 -49
  212. package/src/components/Recommendation/RecommendationContent.ts +0 -27
@@ -2,22 +2,18 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../model/JSXBlock';
3
3
  import type { Picture } from '../../model/Picture';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
- import { Heading } from '../../ui-kit/Heading/Heading';
6
5
  import { Img } from '../../ui-kit/Img/Img';
7
6
  import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
8
7
  import { List } from '../../ui-kit/List/List';
9
- import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
10
8
  import { getIconWithVersion } from '../../utils/getIconWithVersion';
11
9
  import { style } from '../../utils/style';
12
10
  import { SocialMedia } from '../Footer/SocialMedia';
11
+ import { Headline } from '../Headline/Headline';
13
12
  import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
14
13
 
15
14
  const BORDER_STYLE =
16
15
  'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
17
16
 
18
- const setAdditionalIconStyles = (items: string[]) =>
19
- items.length ? 'w-1/2 flex-1 justify-center' : 'w-full justify-end';
20
-
21
17
  export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {}
22
18
 
23
19
  export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
@@ -30,13 +26,14 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
30
26
  socialMedia = [],
31
27
  target,
32
28
  title,
29
+ align = 'text-left',
33
30
  version = 'primary',
34
31
  ...rest
35
32
  }) => {
36
33
  return (
37
34
  <BlockWrapper
38
35
  className={style(
39
- 'relative p-12 min-w-[524px] h-full box-border group-data-gray:bg-main-divider/50',
36
+ 'relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50',
40
37
  BORDER_STYLE,
41
38
  className,
42
39
  )}
@@ -44,42 +41,29 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
44
41
  {...rest}
45
42
  >
46
43
  <LinkWrapper href={href} target={target}>
47
- {title ? (
48
- <Heading headingType="h3" as="h3" className="text-center mb-8" title={title} />
49
- ) : null}
50
- <div className="mb-5">
51
- {description ? (
52
- <Paragraph
53
- size="text-xl"
54
- font="font-light"
55
- color="group-data-gray:text-secondary-text"
56
- >
57
- {description}
58
- </Paragraph>
44
+ <Headline
45
+ className="mb-4"
46
+ title={title}
47
+ description={description}
48
+ headlineVersion="S"
49
+ isPadding={false}
50
+ align={align}
51
+ />
52
+ <div className="w-1/2 h-full flex flex-col flex-1 justify-end">
53
+ {items.length ? (
54
+ <List className="flex flex-col gap-2" itemClassName="text-l-light" items={items} />
59
55
  ) : null}
56
+ {socialMedia.length ? <SocialMedia className="pt-10" media={socialMedia} /> : null}
60
57
  </div>
61
- <div className="flex">
62
- <div
63
- className={style(
64
- 'flex flex-col w-1/2',
65
- items?.length ? 'justify-between' : 'justify-end',
66
- )}
67
- >
68
- {items.length ? (
69
- <List className="text-xl-light flex flex-col gap-2 mt-14" items={items} />
70
- ) : null}
71
- {socialMedia.length ? <SocialMedia className="pb-0" media={socialMedia} /> : null}
72
- </div>
73
- {renderIconBlock(icon, items)}
74
- </div>
58
+ {renderIconBlock(icon)}
75
59
  </LinkWrapper>
76
60
  </BlockWrapper>
77
61
  );
78
62
  },
79
63
  );
80
64
 
81
- const renderIconBlock = (icon: Picture | undefined, items: string[]) => (
82
- <div className={style('flex', setAdditionalIconStyles(items))}>
65
+ const renderIconBlock = (icon: Picture | undefined) => (
66
+ <div className="absolute bottom-0 right-0">
83
67
  {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
84
68
  {icon?.src ? <Img image={icon} /> : null}
85
69
  </div>
@@ -5,6 +5,7 @@ import type { LinkCommonProps } from '../../model/LinkProps';
5
5
  import type { IconProps } from '../../model/Picture';
6
6
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
7
7
  import type { ListContent } from '../../ui-kit/List/ListContent';
8
+ import type { TextAlign } from '../../ui-kit/Text/TextProps';
8
9
 
9
10
  export type RecommendationSocialMedia = LinkCommonProps &
10
11
  IconProps &
@@ -23,4 +24,5 @@ export type CarouselRecommendationCardContent = UniBlockContent &
23
24
  LinkCommonProps & {
24
25
  /** @title Соц сети */
25
26
  socialMedia?: RecommendationSocialMedia[];
27
+ align?: TextAlign;
26
28
  };
@@ -13,7 +13,9 @@
13
13
  "sources": [
14
14
  {
15
15
  "media": 1279,
16
- "width": 276,
16
+ "size": {
17
+ "width": 276
18
+ },
17
19
  "format": "webp",
18
20
  "alignment": "center"
19
21
  }
@@ -62,17 +62,15 @@ const buttonStylesWithText = (text: string, buttonSize: string) =>
62
62
  : `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
63
63
 
64
64
  export const MediaButton = JSX<MediaButtonProps>(
65
- ({ iconVersion = 'color', buttonSize = 'default', rounded = false, icon, ...rest }) => {
66
- const { href, version, text, appendLeft, appendRight, aboveText } = rest;
65
+ ({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
66
+ const { href, version, text = '' } = rest;
67
67
 
68
68
  const { iconMapped, label } =
69
69
  ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
70
70
 
71
- const iconCustom = icon ?? iconMapped;
71
+ const iconCustom = getFilteredIcon(icon) ?? iconMapped;
72
72
 
73
- const iconWithVersion = iconCustom
74
- ? { ...getIconWithVersion(iconCustom), iconVersion }
75
- : undefined;
73
+ const iconWithVersion = iconCustom ? getIconWithVersion(iconCustom) : undefined;
76
74
 
77
75
  return (
78
76
  <Button
@@ -83,11 +81,8 @@ export const MediaButton = JSX<MediaButtonProps>(
83
81
  'hover:bg-primary-main hover:text-black',
84
82
  'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover',
85
83
  'group-data-gray:border-green',
86
- buttonStylesWithText(text as string, buttonSize),
84
+ buttonStylesWithText(text, buttonSize),
87
85
  )}
88
- aboveText={aboveText}
89
- appendLeft={appendLeft}
90
- appendRight={appendRight}
91
86
  aria-label={label}
92
87
  rel="noopener noreferrer"
93
88
  target="_blank"
@@ -108,3 +103,5 @@ export const MediaButton = JSX<MediaButtonProps>(
108
103
  );
109
104
  },
110
105
  );
106
+
107
+ const getFilteredIcon = (icon: Picture | undefined) => (icon?.src || icon?.icon ? icon : undefined);
@@ -10,7 +10,9 @@
10
10
  "sources": [
11
11
  {
12
12
  "media": 1279,
13
- "width": 360,
13
+ "size": {
14
+ "width": 360
15
+ },
14
16
  "format": "webp",
15
17
  "alignment": "center"
16
18
  }
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 240,
14
+ "size": {
15
+ "width": 240
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "center"
17
19
  }
@@ -16,7 +16,9 @@
16
16
  "sources": [
17
17
  {
18
18
  "media": 1279,
19
- "width": 164,
19
+ "size": {
20
+ "width": 164
21
+ },
20
22
  "format": "webp",
21
23
  "alignment": "northeast"
22
24
  }
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 145,
14
+ "size": {
15
+ "width": 145
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "southeast"
17
19
  }
@@ -63,11 +63,13 @@
63
63
  }
64
64
  }
65
65
  ],
66
- "button": {
67
- "text": "Кнопка",
68
- "target": "_blank",
69
- "version": "primary"
70
- },
66
+ "buttons": [
67
+ {
68
+ "text": "Кнопка",
69
+ "target": "_blank",
70
+ "version": "primary"
71
+ }
72
+ ],
71
73
  "isDotted": true
72
74
  }
73
75
  }
@@ -1,5 +1,15 @@
1
1
  {
2
2
  "content": {
3
+ "buttons": {
4
+ "items": {
5
+ "icon": {
6
+ "ui:field": "icon"
7
+ },
8
+ "iconRight": {
9
+ "ui:field": "icon"
10
+ }
11
+ }
12
+ },
3
13
  "steps": {
4
14
  "items": {
5
15
  "icon": {
@@ -1,6 +1,7 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { BulletsProps } from '../../model/Bullets';
3
3
  import type { ButtonCommonIconProps } from '../../model/Button';
4
+ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
5
  import type { DefaultListItemType } from '../../model/DefaultListItemType';
5
6
  import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../model/HeadlineType';
6
7
  import type { UniBlockContent } from '../../model/JSXBlock';
@@ -33,8 +34,7 @@ export type Step = DefaultStep | RichTextStep;
33
34
  * @title Блок шаги
34
35
  */
35
36
  export type StepsBlockContent = UniBlockContent &
36
- HeadlineCommonProps &
37
- ButtonCommonIconProps & {
37
+ HeadlineCommonProps & {
38
38
  /** @title Линии */
39
39
  showLines?: boolean;
40
40
  /**
@@ -43,7 +43,15 @@ export type StepsBlockContent = UniBlockContent &
43
43
  * @maxItems 5
44
44
  */
45
45
  steps?: Step[];
46
+ /**
47
+ * @title Тема шагов
48
+ */
46
49
  stepVersion?: BlockVersion;
47
50
  /** @title Размер шагов */
48
51
  size?: SizeVersion; // TODO: mobile content
52
+ /**
53
+ * @title Кнопки
54
+ * @maxItems 2
55
+ */
56
+ buttons?: ButtonWithIconProps[];
49
57
  };
@@ -7,8 +7,9 @@ export type StyleType = {
7
7
  };
8
8
 
9
9
  export const STEPS_BLOCK_STYLE: StyleType = {
10
- description: 'text-white/80 text-l-light group-data-primary:text-secondary-text',
11
- iconText: 'text-white group-data-primary:text-secondary-text',
10
+ description:
11
+ 'text-white/80 text-l-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
12
+ iconText: 'text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
12
13
  iconBackground: 'bg-white/30 group-data-primary:bg-main-divider',
13
14
  iconConnector: 'bg-white group-data-primary:bg-secondary-light',
14
15
  dot: 'bg-white/80 group-data-primary:bg-secondary-text',
@@ -11,7 +11,9 @@
11
11
  "sources": [
12
12
  {
13
13
  "media": 1279,
14
- "width": 276,
14
+ "size": {
15
+ "width": 276
16
+ },
15
17
  "format": "webp",
16
18
  "alignment": "southeast"
17
19
  }
@@ -1,5 +1,4 @@
1
1
  import type { AlignTypeWithStretch } from '../../model/AlignType';
2
- import type { ColorPalette } from '../../model/ContentPageDef';
3
2
  import type { UniBlockContent } from '../../model/JSXBlock';
4
3
  import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
5
4
 
@@ -7,7 +6,6 @@ import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
7
6
  * @title Вертикальный компоновщик
8
7
  */
9
8
  export type VerticalLayoutContent = UniBlockContent & {
10
- colorPalette?: ColorPalette;
11
9
  align?: AlignTypeWithStretch;
12
10
  gap?: GapVersion;
13
11
  /** @title Внутренний отступ компоновщика */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -87,7 +87,7 @@ export const ApplicationFormCredit = JSX<ApplicationFormsProps>((props) => {
87
87
  {renderCreditParameters({ amount, term, handleChange })}
88
88
  <Heading headingType="h6" title="Данные организации" className="text-center mb-4" />
89
89
  {renderDataOrganization({ fullName, inn, name, phone, mail, annualRevenue, handleChange })}
90
- <Heading headingType="h6" title="Офис банка" className="text-center mb-4" />
90
+ <Heading headingType="h6" title="Офис Банка" className="text-center mb-4" />
91
91
  {renderBankOffices({
92
92
  regions,
93
93
  region: selectedRegion,
@@ -42,7 +42,6 @@ import { ProductBlock } from './ProductBlock/ProductBlock';
42
42
  import { ProductGallery } from './ProductGallery/ProductGallery';
43
43
  import { ProductTile } from './ProductTile/ProductTile';
44
44
  import { PromoTile } from './PromoTile/PromoTile';
45
- import { Recommendation } from './Recommendation/Recommendation';
46
45
  import { RichTextBlock } from './RichTextBlock/RichTextBlock';
47
46
  import { RollupItem } from './RollupItem/RollupItem';
48
47
  import { SafeDepositRental } from './SafeDepositRental/SafeDepositRental';
@@ -99,7 +98,6 @@ export const Blocks: BlocksRegistry = {
99
98
  ProductGallery,
100
99
  ProductTile,
101
100
  PromoTile,
102
- Recommendation,
103
101
  RichTextBlock,
104
102
  RollupItem,
105
103
  SafeDepositRental,
@@ -6,9 +6,15 @@ import { CARD, CARD_MINI, CARD_NEW } from '../CarouselCard/CarouselCard.fixture'
6
6
  import { CATALOG_CARD } from '../CarouselCatalogCard/CarouselCatalogCard.fixture';
7
7
  import { CAROUSEL_EVENT_CARD } from '../CarouselEventCard/CarouselEventCard.fixture';
8
8
  import { INVESTMENT_CARD_WITH_SINGLE_COLUMN } from '../CarouselInvestmentCard/CarouselInvestmentCard.fixture';
9
- import { PRODUCT_CARD } from '../CarouselProductCard/CarouselProductCard.fixture';
9
+ import {
10
+ PRODUCT_CARD,
11
+ PRODUCT_CARD_SMALL,
12
+ } from '../CarouselProductCard/CarouselProductCard.fixture';
10
13
  import { BUSINESS_CARD } from '../CarouselProgramsCard/CarouselProgramsCard.fixture';
11
- import { CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST } from '../CarouselRecommendationCard/CarouselRecommendationCard.fixture';
14
+ import {
15
+ CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
16
+ CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST,
17
+ } from '../CarouselRecommendationCard/CarouselRecommendationCard.fixture';
12
18
  import { TARIFFS_CARD, TARIFFS_CARD_HIT } from '../CarouselTariffsCard/CarouselTariffsCard.fixture';
13
19
  import { Carousel } from './Carousel';
14
20
 
@@ -115,10 +121,20 @@ export default {
115
121
  isBlur={true}
116
122
  block={{
117
123
  type: 'Carousel',
118
- blocks: new Array(6).fill({
119
- type: 'CarouselProductCard',
120
- content: PRODUCT_CARD,
121
- }),
124
+ blocks: [
125
+ {
126
+ type: 'CarouselProductCard',
127
+ content: PRODUCT_CARD,
128
+ },
129
+ {
130
+ type: 'CarouselProductCard',
131
+ content: PRODUCT_CARD_SMALL,
132
+ },
133
+ {
134
+ type: 'CarouselProductCard',
135
+ content: PRODUCT_CARD_SMALL,
136
+ },
137
+ ],
122
138
  }}
123
139
  options={options}
124
140
  />
@@ -165,7 +181,7 @@ export default {
165
181
  className="col-span-12"
166
182
  isBlur={false}
167
183
  isCyclic={false}
168
- visibleItemCount={2}
184
+ visibleItemCount={0}
169
185
  block={{
170
186
  type: 'Carousel',
171
187
  blocks: new Array(6).fill({
@@ -178,6 +194,26 @@ export default {
178
194
  />
179
195
  </div>
180
196
  ),
197
+ recommendationsSecondary: (
198
+ <div className="container grid grid-cols-12">
199
+ <Carousel
200
+ className="col-span-12"
201
+ isBlur={false}
202
+ isCyclic={false}
203
+ visibleItemCount={0}
204
+ block={{
205
+ type: 'Carousel',
206
+ blocks: new Array(6).fill({
207
+ type: 'CarouselRecommendationCard',
208
+ content: CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
209
+ style: ['col-span-2'],
210
+ }),
211
+ }}
212
+ options={options}
213
+ />
214
+ </div>
215
+ ),
216
+
181
217
  events: (
182
218
  <div className="container grid grid-cols-12">
183
219
  <Carousel
@@ -1,19 +1,12 @@
1
1
  import { CarouselBankHistoryCard } from './CarouselBankHistoryCard';
2
+ import type { CarouselBankHistoryCardContent } from './CarouselBankHistoryCardContent';
2
3
 
3
- export const BANK_HISTORY_CARD = {
4
+ export const BANK_HISTORY_CARD: CarouselBankHistoryCardContent = {
4
5
  title: '1796г.',
5
6
  description:
6
7
  "Россельхозбанк стал одним из ключевых участников Приоритетного национального проекта 'Развитие АПК' целью которого развитие агропромышленного сектора российской экономики",
7
8
  };
8
9
 
9
- export const ACTIVE_BANK_HISTORY_CARD = {
10
- title: '1796г.',
11
- description:
12
- "Россельхозбанк стал одним из ключевых участников Приоритетного национального проекта 'Развитие АПК' целью которого развитие агропромышленного сектора российской экономики",
13
- isActive: true,
14
- };
15
-
16
10
  export default {
17
11
  default: <CarouselBankHistoryCard {...BANK_HISTORY_CARD} />,
18
- active: <CarouselBankHistoryCard {...ACTIVE_BANK_HISTORY_CARD} />,
19
12
  };
@@ -20,12 +20,12 @@ export const CarouselBankHistoryCard = JSX<CarouselBankHistoryCardProps>(
20
20
  {isActive ? (
21
21
  <div className="relative flex items-center w-full">
22
22
  <Headline
23
- headlineVersion="S"
23
+ headlineVersion="M"
24
24
  title={title}
25
25
  description={description}
26
26
  align="text-left"
27
27
  className={style(
28
- 'absolute z-10 h-[385px] w-[440px] text-white shadow-dark-blue',
28
+ 'absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue',
29
29
  getActiveBlockPosition(orderNumber, blocksLength),
30
30
  getBackgroundColor(orderNumber),
31
31
  )}
@@ -57,7 +57,6 @@ const getBackgroundColor = (orderNumber: number) => {
57
57
  return 'bg-green-light';
58
58
  case 2:
59
59
  return 'bg-yellow-light';
60
-
61
60
  default:
62
61
  return 'bg-primary-main';
63
62
  }
@@ -70,7 +69,6 @@ const getTextColor = (orderNumber: number) => {
70
69
  return 'gradient-color-text-on-yellow';
71
70
  case 2:
72
71
  return 'gradient-color-text-on-yellow';
73
-
74
72
  default:
75
73
  return 'gradient-color-text-on-green';
76
74
  }
@@ -19,11 +19,11 @@ export const CarouselEventCard = JSX<CarouselEventCardProps>(
19
19
  {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
20
20
  {icon?.src ? <Img image={icon} /> : null}
21
21
  {title ? (
22
- <Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
22
+ <Heading headingType="h6" as="h4" className="text-left pt-3 mb-2" title={title} />
23
23
  ) : null}
24
24
  {description ? (
25
25
  <div className="mb-4">
26
- <Text font="font-light" size="text-s" color="text-secondary-text">
26
+ <Text font="font-light" size="text-m" color="text-secondary-text">
27
27
  {description}
28
28
  </Text>
29
29
  </div>
@@ -7,7 +7,9 @@
7
7
  "sources": [
8
8
  {
9
9
  "media": 1279,
10
- "width": 174,
10
+ "size": {
11
+ "width": 174
12
+ },
11
13
  "format": "webp",
12
14
  "alignment": "southeast"
13
15
  }
@@ -9,7 +9,9 @@
9
9
  "sources": [
10
10
  {
11
11
  "media": 1279,
12
- "width": 84,
12
+ "size": {
13
+ "width": 84
14
+ },
13
15
  "format": "webp",
14
16
  "alignment": "center"
15
17
  }
@@ -46,6 +46,13 @@ export const PRODUCT_CARD: CarouselProductCardContent = {
46
46
  additionalDescription: 'Дополнительное описание',
47
47
  };
48
48
 
49
+ export const PRODUCT_CARD_SMALL: CarouselProductCardContent = {
50
+ title: 'Более 5000 товаров Более 5000 товаров Более 5000 товаров',
51
+ icon: image,
52
+ button: buttonPrimary,
53
+ isDotted,
54
+ };
55
+
49
56
  const CAROUSEL_PRODUCT_CARD = <CarouselProductCard {...PRODUCT_CARD} />;
50
57
  const CAROUSEL_PRODUCT_CARD_SECONDARY = (
51
58
  <CarouselProductCard
@@ -53,10 +60,13 @@ const CAROUSEL_PRODUCT_CARD_SECONDARY = (
53
60
  version="secondary"
54
61
  isDotted={true}
55
62
  button={buttonPrimaryIcon}
63
+ isFullWidth={false}
56
64
  />
57
65
  );
66
+ const CAROUSEL_PRODUCT_CARD_SMALL = <CarouselProductCard {...PRODUCT_CARD_SMALL} />;
58
67
 
59
68
  export default {
60
69
  default: <div className="container grid grid-cols-12">{CAROUSEL_PRODUCT_CARD}</div>,
61
70
  secondary: <div className="container grid grid-cols-12">{CAROUSEL_PRODUCT_CARD_SECONDARY}</div>,
71
+ small: <div className="container grid grid-cols-12">{CAROUSEL_PRODUCT_CARD_SMALL}</div>,
62
72
  };
@@ -26,6 +26,7 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
26
26
  href,
27
27
  icon,
28
28
  isDotted = true,
29
+ isFullWidth = true,
29
30
  items = [],
30
31
  target,
31
32
  title,
@@ -50,7 +51,10 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
50
51
  {renderItems(items, isDotted, version)}
51
52
  {renderAdditionalDescription(additionalDescription)}
52
53
  </LinkWrapper>
53
- {renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })}
54
+ {renderButtonsSection([button], {
55
+ className: style('p-6 pt-0', isFullWidth ? '' : 'justify-center'),
56
+ isVertical: isFullWidth ? true : false,
57
+ })}
54
58
  </BlockWrapper>
55
59
  );
56
60
  },
@@ -27,4 +27,8 @@ export type CarouselProductCardContent = UniBlockContent &
27
27
  /** @title Список */
28
28
  items?: ListProps[];
29
29
  align?: TextAlign;
30
+ /**
31
+ * @title По всей ширине
32
+ */
33
+ isFullWidth?: boolean;
30
34
  };
@@ -9,8 +9,10 @@
9
9
  "sources": [
10
10
  {
11
11
  "media": 1279,
12
- "width": 174,
13
- "height": 174,
12
+ "size": {
13
+ "width": 174,
14
+ "height": 174
15
+ },
14
16
  "format": "webp",
15
17
  "alignment": "southeast"
16
18
  }
@@ -18,6 +20,7 @@
18
20
  },
19
21
  "title": "Заголовок 1",
20
22
  "description": "Описание 1",
23
+ "align": "text-left",
21
24
  "socialMedia": [
22
25
  {
23
26
  "href": "https://t.me",