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

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 (122) hide show
  1. package/bin/migration-scripts/0.9.8.js +29 -0
  2. package/bin/migration-scripts/0.9.9.js +110 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +11 -34
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  7. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  8. package/dist/components/Blocks.js +0 -2
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  11. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  12. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  13. package/dist/components/StepsBlock/StepsBlock.js +5 -3
  14. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  15. package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  16. package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  17. package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  18. package/lib/common.css +1 -1
  19. package/lib/components/Blocks.js +0 -2
  20. package/lib/components/Blocks.js.map +1 -1
  21. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  22. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
  23. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  24. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  25. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  26. package/lib/components/StepsBlock/StepsBlock.js +5 -3
  27. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  28. package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  29. package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  30. package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  31. package/mobile/bundle/bundle.umd.js +3 -3
  32. package/mobile/bundle/bundle.umd.min.js +1 -1
  33. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  34. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  35. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  36. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  37. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  38. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  39. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  40. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  41. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  42. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  43. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  44. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  45. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  46. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  47. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
  48. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  49. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  50. package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
  51. package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  52. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  53. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  54. package/package.json +1 -1
  55. package/src/components/Blocks.ts +0 -2
  56. package/src/components/Carousel/Carousel.fixture.tsx +25 -2
  57. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
  58. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
  59. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  60. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  61. package/src/components/StepsBlock/StepsBlock.example.json +7 -5
  62. package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
  63. package/src/components/StepsBlock/StepsBlock.tsx +13 -4
  64. package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  65. package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  66. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  67. package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  68. package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  69. package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  70. package/dist/components/Recommendation/Recommendation.d.ts +0 -5
  71. package/dist/components/Recommendation/Recommendation.js +0 -26
  72. package/dist/components/Recommendation/Recommendation.js.map +0 -1
  73. package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  74. package/dist/components/Recommendation/RecommendationCard.js +0 -17
  75. package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  76. package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  77. package/dist/components/Recommendation/RecommendationContent.js +0 -2
  78. package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  79. package/lib/components/Recommendation/Recommendation.d.ts +0 -5
  80. package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
  81. package/lib/components/Recommendation/Recommendation.js +0 -24
  82. package/lib/components/Recommendation/Recommendation.js.map +0 -1
  83. package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  84. package/lib/components/Recommendation/RecommendationCard.js +0 -15
  85. package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  86. package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  87. package/lib/components/Recommendation/RecommendationContent.js +0 -2
  88. package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  89. package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  90. package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  91. package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  92. package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
  93. package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
  94. package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
  95. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  96. package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
  97. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  98. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  99. package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
  100. package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  101. package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
  102. package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
  103. package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
  104. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  105. package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
  106. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  107. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  108. package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
  109. package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  110. package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
  111. package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
  112. package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
  113. package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
  114. package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
  115. package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
  116. package/src/components/Catalog/Catalog.ui.json +0 -1
  117. package/src/components/Recommendation/Recommendation.example.json +0 -61
  118. package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
  119. package/src/components/Recommendation/Recommendation.tsx +0 -66
  120. package/src/components/Recommendation/Recommendation.ui.json +0 -19
  121. package/src/components/Recommendation/RecommendationCard.tsx +0 -49
  122. package/src/components/Recommendation/RecommendationContent.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,YAAY,GAChB,0GAA0G,CAAC;AAE7G,MAAM,uBAAuB,GAAG,CAAC,KAAe,EAAE,EAAE,CAClD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,oBAAoB,CAAC;AAItE,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C,IAAI,IAC7E,EACL,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,IACzB,IACM,GACD,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,IAAyB,EAAE,KAAe,EAAE,EAAE,CAAC,CACtE,eAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC,aAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,EAClE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IACpC,CACP,CAAC"}
1
+ {"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,MAAM,YAAY,GAChB,0GAA0G,CAAC;AAI7G,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C,CAAC,EACC,SAAS,GAAG,EAAE,EACd,WAAW,EACX,I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,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IACpC,CACP,CAAC"}
@@ -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
  export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonWithIconProps & {
9
10
  version: ButtonVersion;
10
11
  rounded?: boolean;
@@ -15,4 +16,5 @@ export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & Bu
15
16
  export declare type CarouselRecommendationCardContent = UniBlockContent & HeadlineCommonProps & ListContent & IconProps & LinkCommonProps & {
16
17
  /** @title Соц сети */
17
18
  socialMedia?: RecommendationSocialMedia[];
19
+ align?: TextAlign;
18
20
  };
@@ -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';
@@ -27,7 +28,7 @@ export declare type Step = DefaultStep | RichTextStep;
27
28
  /**
28
29
  * @title Блок шаги
29
30
  */
30
- export declare type StepsBlockContent = UniBlockContent & HeadlineCommonProps & ButtonCommonIconProps & {
31
+ export declare type StepsBlockContent = UniBlockContent & HeadlineCommonProps & {
31
32
  /** @title Линии */
32
33
  showLines?: boolean;
33
34
  /**
@@ -36,8 +37,16 @@ export declare type StepsBlockContent = UniBlockContent & HeadlineCommonProps &
36
37
  * @maxItems 5
37
38
  */
38
39
  steps?: Step[];
40
+ /**
41
+ * @title Тема шагов
42
+ */
39
43
  stepVersion?: BlockVersion;
40
44
  /** @title Размер шагов */
41
45
  size?: SizeVersion;
46
+ /**
47
+ * @title Кнопки
48
+ * @maxItems 2
49
+ */
50
+ buttons?: ButtonWithIconProps[];
42
51
  };
43
52
  export {};
@@ -1,6 +1,6 @@
1
1
  export const STEPS_BLOCK_STYLE = {
2
- description: 'text-white/80 text-l-light group-data-primary:text-secondary-text',
3
- iconText: 'text-white group-data-primary:text-secondary-text',
2
+ description: 'text-white/80 text-l-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
3
+ iconText: 'text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
4
4
  iconBackground: 'bg-white/30 group-data-primary:bg-main-divider',
5
5
  iconConnector: 'bg-white group-data-primary:bg-secondary-light',
6
6
  dot: 'bg-white/80 group-data-primary:bg-secondary-text',
@@ -1 +1 @@
1
- {"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,WAAW,EAAE,mEAAmE;IAChF,QAAQ,EAAE,mDAAmD;IAC7D,cAAc,EAAE,gDAAgD;IAChE,aAAa,EAAE,gDAAgD;IAC/D,GAAG,EAAE,kDAAkD;CACxD,CAAC"}
1
+ {"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,WAAW,EACT,uGAAuG;IACzG,QAAQ,EAAE,uFAAuF;IACjG,cAAc,EAAE,gDAAgD;IAChE,aAAa,EAAE,gDAAgD;IAC/D,GAAG,EAAE,kDAAkD;CACxD,CAAC"}
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "title": "Заголовок 1",
20
20
  "description": "Описание 1",
21
+ "align": "text-left",
21
22
  "socialMedia": [
22
23
  {
23
24
  "href": "https://t.me",
@@ -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
  };
@@ -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',
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.9",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -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,
@@ -8,7 +8,10 @@ import { CAROUSEL_EVENT_CARD } from '../CarouselEventCard/CarouselEventCard.fixt
8
8
  import { INVESTMENT_CARD_WITH_SINGLE_COLUMN } from '../CarouselInvestmentCard/CarouselInvestmentCard.fixture';
9
9
  import { PRODUCT_CARD } from '../CarouselProductCard/CarouselProductCard.fixture';
10
10
  import { BUSINESS_CARD } from '../CarouselProgramsCard/CarouselProgramsCard.fixture';
11
- import { CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST } from '../CarouselRecommendationCard/CarouselRecommendationCard.fixture';
11
+ import {
12
+ CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
13
+ CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST,
14
+ } from '../CarouselRecommendationCard/CarouselRecommendationCard.fixture';
12
15
  import { TARIFFS_CARD, TARIFFS_CARD_HIT } from '../CarouselTariffsCard/CarouselTariffsCard.fixture';
13
16
  import { Carousel } from './Carousel';
14
17
 
@@ -165,7 +168,7 @@ export default {
165
168
  className="col-span-12"
166
169
  isBlur={false}
167
170
  isCyclic={false}
168
- visibleItemCount={2}
171
+ visibleItemCount={0}
169
172
  block={{
170
173
  type: 'Carousel',
171
174
  blocks: new Array(6).fill({
@@ -178,6 +181,26 @@ export default {
178
181
  />
179
182
  </div>
180
183
  ),
184
+ recommendationsSecondary: (
185
+ <div className="container grid grid-cols-12">
186
+ <Carousel
187
+ className="col-span-12"
188
+ isBlur={false}
189
+ isCyclic={false}
190
+ visibleItemCount={0}
191
+ block={{
192
+ type: 'Carousel',
193
+ blocks: new Array(6).fill({
194
+ type: 'CarouselRecommendationCard',
195
+ content: CAROUSEL_RECOMMENDATION_CARD_SECONDARY,
196
+ style: ['col-span-2'],
197
+ }),
198
+ }}
199
+ options={options}
200
+ />
201
+ </div>
202
+ ),
203
+
181
204
  events: (
182
205
  <div className="container grid grid-cols-12">
183
206
  <Carousel
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "title": "Заголовок 1",
20
20
  "description": "Описание 1",
21
+ "align": "text-left",
21
22
  "socialMedia": [
22
23
  {
23
24
  "href": "https://t.me",
@@ -1,11 +1,11 @@
1
1
  import type { Picture } from '../../model/Picture';
2
2
  import '../../setup-fixture';
3
+ import { Icon } from '../../ui-kit/Icon/Icon';
3
4
  import { CarouselRecommendationCard } from './CarouselRecommendationCard';
4
5
  import type {
5
6
  CarouselRecommendationCardContent,
6
7
  RecommendationSocialMedia,
7
8
  } from './CarouselRecommendationCardContent';
8
- import { Icon } from '../../ui-kit/Icon/Icon';
9
9
 
10
10
  const icon: Picture = {
11
11
  src: 'product-basket.png',
@@ -92,6 +92,23 @@ export const CAROUSEL_RECOMMENDATION_CARD_WITHOUT_LIST: CarouselRecommendationCa
92
92
  socialMedia: socialMediaWithoutText,
93
93
  };
94
94
 
95
+ export const CAROUSEL_RECOMMENDATION_CARD_SECONDARY: CarouselRecommendationCardContent = {
96
+ title: 'Россельхозбанк',
97
+ description: 'Описание',
98
+ align: 'text-left',
99
+ icon: {
100
+ src: 'cow-card.png',
101
+ format: 'webp',
102
+ size: {
103
+ width: 290,
104
+ height: 290,
105
+ },
106
+ },
107
+ items: ['Свежие новости', 'Акции и предложенияа', 'Ставки и катировки'],
108
+ version: 'secondary',
109
+ socialMedia: socialMediaWithoutText,
110
+ };
111
+
95
112
  export default {
96
113
  default: (
97
114
  <div className="container grid grid-cols-12 mb-1">
@@ -107,6 +124,16 @@ export default {
107
124
  />
108
125
  </div>
109
126
  ),
127
+ secondaryCenter: (
128
+ <div className="container grid grid-cols-12 mb-1">
129
+ <CarouselRecommendationCard
130
+ className="col-span-12"
131
+ version="secondary"
132
+ align="text-center"
133
+ {...CAROUSEL_RECOMMENDATION_CARD_SECONDARY}
134
+ />
135
+ </div>
136
+ ),
110
137
  gray: (
111
138
  <div className="container grid grid-cols-12 mb-1">
112
139
  <CarouselRecommendationCard
@@ -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
  };
@@ -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
  }
@@ -83,11 +83,14 @@ const STEPS_WITH_BUTTON_PROPS: StepsBlockProps = {
83
83
  ...COMMON_PROPS,
84
84
  steps: STEPS.map((step) => ({
85
85
  ...step,
86
- button: { text: 'Оформить' },
87
86
  })),
88
87
  title: TITLE,
89
88
  stepVersion: 'primary',
90
89
  size: 'small',
90
+ buttons: [
91
+ { text: 'Оформить', version: 'primary' },
92
+ { text: 'Оформить', version: 'primary' },
93
+ ],
91
94
  };
92
95
 
93
96
  export default {
@@ -108,13 +111,16 @@ export default {
108
111
  showLines={false}
109
112
  steps={STEPS_WITH_ICONS}
110
113
  version="secondary"
111
- button={{
112
- text: 'Отправить заявку',
113
- href: 'https://www.rshb.ru/',
114
- target: '_blank',
115
- icon: { icon: 'ComfortableCompIcon' },
116
- iconRight: { icon: 'ComfortableCompIcon' },
117
- }}
114
+ buttons={[
115
+ {
116
+ text: 'Отправить заявку',
117
+ href: 'https://www.rshb.ru/',
118
+ target: '_blank',
119
+ icon: { icon: 'ComfortableCompIcon' },
120
+ iconRight: { icon: 'ComfortableCompIcon' },
121
+ version: 'secondary',
122
+ },
123
+ ]}
118
124
  />
119
125
  </div>
120
126
  ),
@@ -25,7 +25,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
25
25
  className = '',
26
26
  showLines = true,
27
27
  steps = [],
28
- button,
28
+ buttons,
29
29
  size = 'normal',
30
30
  version = 'primary',
31
31
  stepVersion = 'gray',
@@ -39,6 +39,8 @@ export const StepsBlock = JSX<StepsBlockProps>(
39
39
  const lineOpacity = getLineOpacity(showLines);
40
40
  const paddingX = getPaddingX(steps.length);
41
41
 
42
+ const isMainButton = Boolean(buttons?.every((b) => b?.text));
43
+
42
44
  return (
43
45
  <BlockWrapper
44
46
  className={style(
@@ -66,11 +68,11 @@ export const StepsBlock = JSX<StepsBlockProps>(
66
68
  shortGaps ? 'gap-x-3' : 'gap-x-[101px]',
67
69
  )}
68
70
  >
69
- {steps.map(renderStep({ styleMap, isMainButton: Boolean(button?.text), version }))}
71
+ {steps.map(renderStep({ styleMap, isMainButton, version }))}
70
72
  </div>
71
73
  </div>
72
74
  ) : null}
73
- {button?.text ? renderButtonsSection([button], { className: 'mt-8 min-w-60' }) : null}
75
+ {renderButtonsSection(buttons, { className: 'mt-8' })}
74
76
  </BlockWrapper>
75
77
  );
76
78
  },
@@ -80,6 +82,8 @@ const renderStepIcon =
80
82
  (styleMap: StyleType, size: string, stepVersion: BlockVersion) =>
81
83
  ({ icon }: Step, i: number) => {
82
84
  const styleStepIconSize = size === 'normal' ? 'h-[100px] w-[100px]' : 'h-[63px] w-[63px]';
85
+ const stepVersionIconTextStyles =
86
+ stepVersion === 'secondary' ? 'group-data-primary:text-white' : 'text-secondary-text';
83
87
 
84
88
  return (
85
89
  <BlockWrapper
@@ -90,7 +94,12 @@ const renderStepIcon =
90
94
  {checkCanRenderIcon(icon) ? (
91
95
  <Img image={getIconWithVersion(icon || {}, stepVersion)} width="48" height="48" asSVG />
92
96
  ) : (
93
- <span className={`text-h4 group-data-transparent:${styleMap.iconText} text-primary-text`}>
97
+ <span
98
+ className={style(
99
+ 'text-h4',
100
+ stepVersion === 'transparent' ? styleMap.iconText : stepVersionIconTextStyles,
101
+ )}
102
+ >
94
103
  {i + 1}
95
104
  </span>
96
105
  )}