@redneckz/wildless-cms-uni-blocks 0.14.70 → 0.14.72

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 (157) hide show
  1. package/bin/migration-scripts/0.14.62.js +3 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +18 -22
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  6. package/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  7. package/bundle/ui-kit/List/ListContent.d.ts +2 -0
  8. package/bundle/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  9. package/dist/components/ApplicationForm/Footnote.js +1 -1
  10. package/dist/components/ApplicationForm/Footnote.js.map +1 -1
  11. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  12. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  13. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  14. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  15. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  16. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  17. package/dist/components/ComparisonTable/TableColumn.js +1 -1
  18. package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  19. package/dist/components/InvestmentInfo/InvestmentInfo.js +1 -3
  20. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  21. package/dist/components/StepsBlock/StepsBlock.js +2 -2
  22. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  23. package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  24. package/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  25. package/dist/components/StickyBottomMenu/RenderItem.js +3 -3
  26. package/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
  27. package/dist/ui-kit/Img/ImgAsPicture.js +5 -5
  28. package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  29. package/dist/ui-kit/List/List.js +2 -2
  30. package/dist/ui-kit/List/List.js.map +1 -1
  31. package/dist/ui-kit/List/ListContent.d.ts +2 -0
  32. package/dist/ui-kit/List/ListItem.js +1 -1
  33. package/dist/ui-kit/List/ListItem.js.map +1 -1
  34. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
  35. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  36. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  37. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +1 -1
  38. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
  39. package/lib/common.css +1 -1
  40. package/lib/components/ApplicationForm/Footnote.js +1 -1
  41. package/lib/components/ApplicationForm/Footnote.js.map +1 -1
  42. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  43. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  44. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  45. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  46. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  47. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  48. package/lib/components/ComparisonTable/TableColumn.js +1 -1
  49. package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  50. package/lib/components/InvestmentInfo/InvestmentInfo.js +1 -3
  51. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  52. package/lib/components/StepsBlock/StepsBlock.js +2 -2
  53. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  54. package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  55. package/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  56. package/lib/components/StickyBottomMenu/RenderItem.js +3 -3
  57. package/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
  58. package/lib/ui-kit/Img/ImgAsPicture.js +5 -5
  59. package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  60. package/lib/ui-kit/List/List.js +2 -2
  61. package/lib/ui-kit/List/List.js.map +1 -1
  62. package/lib/ui-kit/List/ListContent.d.ts +2 -0
  63. package/lib/ui-kit/List/ListItem.js +1 -1
  64. package/lib/ui-kit/List/ListItem.js.map +1 -1
  65. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
  66. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  67. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  68. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +1 -1
  69. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
  70. package/mobile/bundle/bundle.umd.js +18 -20
  71. package/mobile/bundle/bundle.umd.min.js +1 -1
  72. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  73. package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  74. package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -0
  75. package/mobile/bundle/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  76. package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
  77. package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
  78. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  79. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  80. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  81. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  82. package/mobile/dist/components/ComparisonTable/TableColumn.js +1 -1
  83. package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  84. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +1 -3
  85. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  86. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  87. package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  88. package/mobile/dist/components/StickyBottomMenu/RenderItem.js +3 -3
  89. package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
  90. package/mobile/dist/ui-kit/Img/ImgAsPicture.js +5 -5
  91. package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  92. package/mobile/dist/ui-kit/List/List.js +2 -2
  93. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  94. package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -0
  95. package/mobile/dist/ui-kit/List/ListItem.js +1 -1
  96. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  97. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
  98. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  99. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  100. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +1 -1
  101. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
  102. package/mobile/lib/common.css +1 -1
  103. package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
  104. package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
  105. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  106. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  107. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  108. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  109. package/mobile/lib/components/ComparisonTable/TableColumn.js +1 -1
  110. package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  111. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +1 -3
  112. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  113. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  114. package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -1
  115. package/mobile/lib/components/StickyBottomMenu/RenderItem.js +3 -3
  116. package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
  117. package/mobile/lib/ui-kit/Img/ImgAsPicture.js +5 -5
  118. package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  119. package/mobile/lib/ui-kit/List/List.js +2 -2
  120. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  121. package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -0
  122. package/mobile/lib/ui-kit/List/ListItem.js +1 -1
  123. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  124. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
  125. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  126. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +2 -2
  127. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +1 -1
  128. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
  129. package/mobile/src/components/ApplicationForm/Footnote.tsx +1 -1
  130. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  131. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  132. package/mobile/src/components/ComparisonTable/TableColumn.tsx +1 -1
  133. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +3 -7
  134. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  135. package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +4 -4
  136. package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +8 -8
  137. package/mobile/src/ui-kit/List/List.tsx +6 -2
  138. package/mobile/src/ui-kit/List/ListContent.ts +2 -0
  139. package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
  140. package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +5 -3
  141. package/mobile/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +3 -3
  142. package/package.json +1 -1
  143. package/src/components/ApplicationForm/Footnote.tsx +1 -1
  144. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  145. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  146. package/src/components/ComparisonTable/HeaderCell.tsx +1 -1
  147. package/src/components/ComparisonTable/TableColumn.tsx +1 -1
  148. package/src/components/InvestmentInfo/InvestmentInfo.tsx +3 -7
  149. package/src/components/StepsBlock/StepsBlock.tsx +1 -2
  150. package/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  151. package/src/components/StickyBottomMenu/RenderItem.tsx +4 -4
  152. package/src/ui-kit/Img/ImgAsPicture.tsx +8 -8
  153. package/src/ui-kit/List/List.tsx +6 -2
  154. package/src/ui-kit/List/ListContent.ts +2 -0
  155. package/src/ui-kit/List/ListItem.tsx +1 -1
  156. package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +5 -3
  157. package/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +3 -3
@@ -40,45 +40,43 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
40
40
  isImageSecondary = false,
41
41
  } = {},
42
42
  ...rest
43
- }) => {
44
- return (
45
- <BlockWrapper
46
- className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
47
- defaultPadding="p-0"
48
- {...rest}
49
- >
50
- <LinkWrapper href={href} target={target} className="h-full">
51
- <BaseTile
52
- className="h-full"
53
- defaultPadding="p-2xl"
54
- padding={padding}
55
- insetTitle={
56
- <Headline
57
- title={title}
58
- description={description}
59
- headlineVersion="XS"
60
- isEmbedded={true}
61
- align={align}
62
- />
63
- }
64
- {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
65
- buttons={
66
- socialMedia.length ? (
67
- <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
68
- ) : null
69
- }
70
- isImageAlwaysOnRight={isImageAlwaysOnRight}
71
- isImageSecondary={isImageSecondary}
72
- imageAlign="center"
73
- >
74
- <BenefitsList benefits={benefits} />
75
- <List items={items} isDotted={isDotted} listItemSize="S" />
76
- {renderAdditionalDescription(additionalDescription, align)}
77
- </BaseTile>
78
- </LinkWrapper>
79
- </BlockWrapper>
80
- );
81
- },
43
+ }) => (
44
+ <BlockWrapper
45
+ className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
46
+ defaultPadding="p-0"
47
+ {...rest}
48
+ >
49
+ <LinkWrapper href={href} target={target} className="h-full">
50
+ <BaseTile
51
+ className="h-full"
52
+ defaultPadding="p-2xl"
53
+ padding={padding}
54
+ insetTitle={
55
+ <Headline
56
+ title={title}
57
+ description={description}
58
+ headlineVersion="XS"
59
+ isEmbedded={true}
60
+ align={align}
61
+ />
62
+ }
63
+ {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
64
+ buttons={
65
+ socialMedia.length ? (
66
+ <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
67
+ ) : null
68
+ }
69
+ isImageAlwaysOnRight={isImageAlwaysOnRight}
70
+ isImageSecondary={isImageSecondary}
71
+ imageAlign="center"
72
+ >
73
+ <BenefitsList benefits={benefits} />
74
+ <List items={items} isDotted={isDotted} listItemSize="S" />
75
+ {renderAdditionalDescription(additionalDescription, align)}
76
+ </BaseTile>
77
+ </LinkWrapper>
78
+ </BlockWrapper>
79
+ ),
82
80
  );
83
81
 
84
82
  const renderAdditionalDescription = (additionalDescription?: string, align?: TextAlign) =>
@@ -48,7 +48,7 @@ export const TableColumn = JSX<TableColumnProps>(
48
48
  {showRow && header?.link ? (
49
49
  <LinkButton
50
50
  href={header.link.href}
51
- target={header.link.target}
51
+ target={header.link?.target}
52
52
  version={buttonVersion}
53
53
  className="text-s font-medium mt-m py-s"
54
54
  >
@@ -121,13 +121,9 @@ const renderInvestmentCell = (cell: InvestmentCell, i: number) => {
121
121
  ) : null;
122
122
  };
123
123
 
124
- const renderInvestmentColumnTitle = (
125
- column: InvestmentColumn | InvestmentZeroColumn,
126
- i: number,
127
- ) => {
128
- return (
124
+ const renderInvestmentColumnTitle = (column: InvestmentColumn | InvestmentZeroColumn, i: number) =>
125
+ column?.title ? (
129
126
  <div key={`title_${i}`} className={`flex-1 max-w-[180px] text-center px-xs last:pr-3xl`}>
130
127
  {column.title}
131
128
  </div>
132
- );
133
- };
129
+ ) : null;
@@ -1,11 +1,7 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type BulletsProps } from '../../model/Bullets';
3
3
  import { type DefaultListItemType } from '../../model/DefaultListItemType';
4
- import {
5
- type DescriptionProps,
6
- type HeadlineCommonProps,
7
- type LabelProps,
8
- } from '../../model/HeadlineType';
4
+ import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
9
5
  import { type UniBlockContent } from '../../model/JSXBlock';
10
6
  import { type IconProps } from '../../model/Picture';
11
7
  import { type RichTextItem } from '../../model/RichTextItem';
@@ -42,7 +38,8 @@ export type Step = DefaultStep | RichTextStep;
42
38
  * @title Блок шаги
43
39
  */
44
40
  export type StepsBlockContent = UniBlockContent &
45
- HeadlineCommonProps &
41
+ TitleProps &
42
+ DescriptionProps &
46
43
  ButtonsSectionContent & {
47
44
  /** @title Линии */
48
45
  showLines?: boolean;
@@ -7,13 +7,13 @@ import { type MenuItemProps } from './StickyBottomMenuProps';
7
7
 
8
8
  interface RenderItemProps {
9
9
  isActive?: boolean;
10
- item: MenuItemProps;
10
+ item?: MenuItemProps;
11
11
  onClick?: () => void;
12
12
  }
13
13
 
14
14
  export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
15
15
  const isAnotherPortal = projectSettings?.BASE_PATH
16
- ? !item.href?.startsWith(projectSettings?.BASE_PATH)
16
+ ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
17
17
  : true;
18
18
 
19
19
  const link = useLink({ isRemote: isAnotherPortal });
@@ -22,7 +22,7 @@ export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) =>
22
22
  target,
23
23
  onClick: handleClick,
24
24
  } = link({
25
- href: item.href,
25
+ href: item?.href || '',
26
26
  target: '_self',
27
27
  });
28
28
  const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
@@ -45,7 +45,7 @@ export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) =>
45
45
  iconVersion: iconVersion,
46
46
  }}
47
47
  />
48
- {item.title}
48
+ {item?.title || ''}
49
49
  </a>
50
50
  );
51
51
  });
@@ -25,8 +25,8 @@ export const ImgAsPicture = JSX<ImageProps>(
25
25
  srcSet={adjustSrc(router, pathPrefix)(src)}
26
26
  type={formatToMimeType(format)}
27
27
  media={media ? `(max-width: ${media}px)` : ''}
28
- width={image.size?.width}
29
- height={image.size?.height}
28
+ width={image?.size?.width}
29
+ height={image?.size?.height}
30
30
  />
31
31
  ))
32
32
  : null}
@@ -42,14 +42,14 @@ const renderImg = (image: Picture, imageClassName = '') => (
42
42
  <img
43
43
  src={image.src}
44
44
  className={style('object-contain', imageClassName)}
45
- alt={image.alt || image.title}
46
- title={image.title || ''}
45
+ alt={image?.alt || image?.title || ''}
46
+ title={image?.title || ''}
47
47
  style={{
48
- width: image.size?.width ? `${image.size?.width}px` : '100%',
49
- height: image.size?.height ? `${image.size?.height}px` : 'auto',
48
+ width: image?.size?.width ? `${image.size?.width}px` : '100%',
49
+ height: image?.size?.height ? `${image.size?.height}px` : 'auto',
50
50
  }}
51
- width={image.size?.width}
52
- height={image.size?.height}
51
+ width={image?.size?.width}
52
+ height={image?.size?.height}
53
53
  />
54
54
  );
55
55
 
@@ -29,7 +29,7 @@ export const LIST_VERSION_STYLE: Record<
29
29
  };
30
30
 
31
31
  export const List = JSX<ListProps>(
32
- ({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
32
+ ({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
33
33
  const versionStyle = LIST_VERSION_STYLE[listItemSize];
34
34
 
35
35
  return items?.length ? (
@@ -42,7 +42,11 @@ export const List = JSX<ListProps>(
42
42
  role="list"
43
43
  >
44
44
  {items.map((item, i) => (
45
- <ListItem key={String(i)} isDotted={isDotted} dotClassName={versionStyle.dotStyle}>
45
+ <ListItem
46
+ key={String(i)}
47
+ isDotted={isDotted}
48
+ dotClassName={style(dotClassName || 'bg-primary-text', versionStyle.dotStyle)}
49
+ >
46
50
  {item}
47
51
  </ListItem>
48
52
  ))}
@@ -20,4 +20,6 @@ export type ListProps = ListContent &
20
20
  BulletsProps & {
21
21
  /** @hidden */
22
22
  className?: string;
23
+ /** @hidden */
24
+ dotClassName?: string;
23
25
  };
@@ -17,7 +17,7 @@ export const ListItem = JSX<ListItemProps>(({ className, isDotted, dotClassName,
17
17
  <div className="shrink-0">
18
18
  <div
19
19
  className={style(
20
- 'align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white',
20
+ 'align-middle inline-block rounded-full group-data-secondary:bg-white',
21
21
  dotClassName,
22
22
  )}
23
23
  />
@@ -29,9 +29,11 @@ export const SlideCheckbox = JSX<SlideCheckboxProps>(
29
29
  )}
30
30
  />
31
31
  </div>
32
- <Text size="text-l" font="font-light" color="text-primary-text">
33
- {text}
34
- </Text>
32
+ {text ? (
33
+ <Text size="text-l" font="font-light" color="text-primary-text">
34
+ {text}
35
+ </Text>
36
+ ) : null}
35
37
  </div>
36
38
  ),
37
39
  );
@@ -9,12 +9,12 @@ type SlideCheckboxGroupItem = {
9
9
 
10
10
  interface SlideCheckboxGroupProps extends ControlProps<string> {
11
11
  multiple: false;
12
- items: SlideCheckboxGroupItem[];
12
+ items?: SlideCheckboxGroupItem[];
13
13
  }
14
14
 
15
15
  interface MultipleSlideCheckboxGroupProps extends ControlProps<string[]> {
16
16
  multiple: true;
17
- items: SlideCheckboxGroupItem[];
17
+ items?: SlideCheckboxGroupItem[];
18
18
  }
19
19
 
20
20
  export const SlideCheckboxGroup = JSX<SlideCheckboxGroupProps | MultipleSlideCheckboxGroupProps>(
@@ -38,7 +38,7 @@ export const SlideCheckboxGroup = JSX<SlideCheckboxGroupProps | MultipleSlideChe
38
38
  return items.map((item) => (
39
39
  <SlideCheckbox
40
40
  key={item.value}
41
- text={item.title}
41
+ text={item?.title}
42
42
  value={[value].flatMap((_) => _).includes(item.value)}
43
43
  onChange={() => handleChange(item.value)}
44
44
  type={multiple ? 'checkbox' : 'radio'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.70",
3
+ "version": "0.14.72",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -16,7 +16,7 @@ export const Footnote = JSX<FootnoteProps>(({ text, link }) => (
16
16
  <LinkButton
17
17
  href={link.href}
18
18
  ariaLabel="условия передачи данных"
19
- target={link.target}
19
+ target={link.target || ''}
20
20
  className="text-primary-main"
21
21
  >
22
22
  <Text>{link.text}</Text>
@@ -56,7 +56,7 @@ const renderBenefit = (
56
56
  >
57
57
  {description}
58
58
  </Text>
59
- <List className="text-secondary-text" listItemSize="S" items={items} isDotted={isDotted} />
59
+ <List dotClassName="bg-secondary-text" listItemSize="S" items={items} isDotted={isDotted} />
60
60
  </div>
61
61
  ) : null}
62
62
  </div>
@@ -40,45 +40,43 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
40
40
  isImageSecondary = false,
41
41
  } = {},
42
42
  ...rest
43
- }) => {
44
- return (
45
- <BlockWrapper
46
- className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
47
- defaultPadding="p-0"
48
- {...rest}
49
- >
50
- <LinkWrapper href={href} target={target} className="h-full">
51
- <BaseTile
52
- className="h-full"
53
- defaultPadding="p-2xl"
54
- padding={padding}
55
- insetTitle={
56
- <Headline
57
- title={title}
58
- description={description}
59
- headlineVersion="XS"
60
- isEmbedded={true}
61
- align={align}
62
- />
63
- }
64
- {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
65
- buttons={
66
- socialMedia.length ? (
67
- <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
68
- ) : null
69
- }
70
- isImageAlwaysOnRight={isImageAlwaysOnRight}
71
- isImageSecondary={isImageSecondary}
72
- imageAlign="center"
73
- >
74
- <BenefitsList benefits={benefits} />
75
- <List items={items} isDotted={isDotted} listItemSize="S" />
76
- {renderAdditionalDescription(additionalDescription, align)}
77
- </BaseTile>
78
- </LinkWrapper>
79
- </BlockWrapper>
80
- );
81
- },
43
+ }) => (
44
+ <BlockWrapper
45
+ className={style('relative min-h-28 group-data-gray:bg-main-divider/50', className)}
46
+ defaultPadding="p-0"
47
+ {...rest}
48
+ >
49
+ <LinkWrapper href={href} target={target} className="h-full">
50
+ <BaseTile
51
+ className="h-full"
52
+ defaultPadding="p-2xl"
53
+ padding={padding}
54
+ insetTitle={
55
+ <Headline
56
+ title={title}
57
+ description={description}
58
+ headlineVersion="XS"
59
+ isEmbedded={true}
60
+ align={align}
61
+ />
62
+ }
63
+ {...leftOrRightImage(isIcon(icon) ? <Img image={icon} /> : null, directionRight)}
64
+ buttons={
65
+ socialMedia.length ? (
66
+ <SocialMedia media={socialMedia} showButtonText={true} version={rest?.version} />
67
+ ) : null
68
+ }
69
+ isImageAlwaysOnRight={isImageAlwaysOnRight}
70
+ isImageSecondary={isImageSecondary}
71
+ imageAlign="center"
72
+ >
73
+ <BenefitsList benefits={benefits} />
74
+ <List items={items} isDotted={isDotted} listItemSize="S" />
75
+ {renderAdditionalDescription(additionalDescription, align)}
76
+ </BaseTile>
77
+ </LinkWrapper>
78
+ </BlockWrapper>
79
+ ),
82
80
  );
83
81
 
84
82
  const renderAdditionalDescription = (additionalDescription?: string, align?: TextAlign) =>
@@ -35,7 +35,7 @@ export const HeaderCell = JSX<HeaderCellProps>(({ icon, image, title, link }) =>
35
35
  <div className="mt-auto w-full">
36
36
  <LinkButton
37
37
  href={link.href}
38
- target={link.target}
38
+ target={link.target || ''}
39
39
  className="w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active"
40
40
  >
41
41
  <div className="text-xs font-light font-medium py-s">{link.text}</div>
@@ -48,7 +48,7 @@ export const TableColumn = JSX<TableColumnProps>(
48
48
  {showRow && header?.link ? (
49
49
  <LinkButton
50
50
  href={header.link.href}
51
- target={header.link.target}
51
+ target={header.link?.target}
52
52
  version={buttonVersion}
53
53
  className="text-s font-medium mt-m py-s"
54
54
  >
@@ -121,13 +121,9 @@ const renderInvestmentCell = (cell: InvestmentCell, i: number) => {
121
121
  ) : null;
122
122
  };
123
123
 
124
- const renderInvestmentColumnTitle = (
125
- column: InvestmentColumn | InvestmentZeroColumn,
126
- i: number,
127
- ) => {
128
- return (
124
+ const renderInvestmentColumnTitle = (column: InvestmentColumn | InvestmentZeroColumn, i: number) =>
125
+ column?.title ? (
129
126
  <div key={`title_${i}`} className={`flex-1 max-w-[180px] text-center px-xs last:pr-3xl`}>
130
127
  {column.title}
131
128
  </div>
132
- );
133
- };
129
+ ) : null;
@@ -21,7 +21,6 @@ const getPaddingX = (steps: number) => (steps < 5 ? 'px-24' : 'px-16');
21
21
 
22
22
  export const StepsBlock = JSX<StepsBlockProps>(
23
23
  ({
24
- align = AlignStyles,
25
24
  buttons,
26
25
  className = '',
27
26
  description,
@@ -58,7 +57,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
58
57
  description={description}
59
58
  isEmbedded={true}
60
59
  className="w-full"
61
- align={align}
60
+ align={AlignStyles}
62
61
  />
63
62
  {steps?.length ? (
64
63
  <div className="box-border space-y-lg">
@@ -1,11 +1,7 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type BulletsProps } from '../../model/Bullets';
3
3
  import { type DefaultListItemType } from '../../model/DefaultListItemType';
4
- import {
5
- type DescriptionProps,
6
- type HeadlineCommonProps,
7
- type LabelProps,
8
- } from '../../model/HeadlineType';
4
+ import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
9
5
  import { type UniBlockContent } from '../../model/JSXBlock';
10
6
  import { type IconProps } from '../../model/Picture';
11
7
  import { type RichTextItem } from '../../model/RichTextItem';
@@ -42,7 +38,8 @@ export type Step = DefaultStep | RichTextStep;
42
38
  * @title Блок шаги
43
39
  */
44
40
  export type StepsBlockContent = UniBlockContent &
45
- HeadlineCommonProps &
41
+ TitleProps &
42
+ DescriptionProps &
46
43
  ButtonsSectionContent & {
47
44
  /** @title Линии */
48
45
  showLines?: boolean;
@@ -7,13 +7,13 @@ import { type MenuItemProps } from './StickyBottomMenuProps';
7
7
 
8
8
  interface RenderItemProps {
9
9
  isActive?: boolean;
10
- item: MenuItemProps;
10
+ item?: MenuItemProps;
11
11
  onClick?: () => void;
12
12
  }
13
13
 
14
14
  export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
15
15
  const isAnotherPortal = projectSettings?.BASE_PATH
16
- ? !item.href?.startsWith(projectSettings?.BASE_PATH)
16
+ ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
17
17
  : true;
18
18
 
19
19
  const link = useLink({ isRemote: isAnotherPortal });
@@ -22,7 +22,7 @@ export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) =>
22
22
  target,
23
23
  onClick: handleClick,
24
24
  } = link({
25
- href: item.href,
25
+ href: item?.href || '',
26
26
  target: '_self',
27
27
  });
28
28
  const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
@@ -45,7 +45,7 @@ export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) =>
45
45
  iconVersion: iconVersion,
46
46
  }}
47
47
  />
48
- {item.title}
48
+ {item?.title || ''}
49
49
  </a>
50
50
  );
51
51
  });
@@ -25,8 +25,8 @@ export const ImgAsPicture = JSX<ImageProps>(
25
25
  srcSet={adjustSrc(router, pathPrefix)(src)}
26
26
  type={formatToMimeType(format)}
27
27
  media={media ? `(max-width: ${media}px)` : ''}
28
- width={image.size?.width}
29
- height={image.size?.height}
28
+ width={image?.size?.width}
29
+ height={image?.size?.height}
30
30
  />
31
31
  ))
32
32
  : null}
@@ -42,14 +42,14 @@ const renderImg = (image: Picture, imageClassName = '') => (
42
42
  <img
43
43
  src={image.src}
44
44
  className={style('object-contain', imageClassName)}
45
- alt={image.alt || image.title}
46
- title={image.title || ''}
45
+ alt={image?.alt || image?.title || ''}
46
+ title={image?.title || ''}
47
47
  style={{
48
- width: image.size?.width ? `${image.size?.width}px` : '100%',
49
- height: image.size?.height ? `${image.size?.height}px` : 'auto',
48
+ width: image?.size?.width ? `${image.size?.width}px` : '100%',
49
+ height: image?.size?.height ? `${image.size?.height}px` : 'auto',
50
50
  }}
51
- width={image.size?.width}
52
- height={image.size?.height}
51
+ width={image?.size?.width}
52
+ height={image?.size?.height}
53
53
  />
54
54
  );
55
55
 
@@ -29,7 +29,7 @@ export const LIST_VERSION_STYLE: Record<
29
29
  };
30
30
 
31
31
  export const List = JSX<ListProps>(
32
- ({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
32
+ ({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
33
33
  const versionStyle = LIST_VERSION_STYLE[listItemSize];
34
34
 
35
35
  return items?.length ? (
@@ -42,7 +42,11 @@ export const List = JSX<ListProps>(
42
42
  role="list"
43
43
  >
44
44
  {items.map((item, i) => (
45
- <ListItem key={String(i)} isDotted={isDotted} dotClassName={versionStyle.dotStyle}>
45
+ <ListItem
46
+ key={String(i)}
47
+ isDotted={isDotted}
48
+ dotClassName={style(dotClassName || 'bg-primary-text', versionStyle.dotStyle)}
49
+ >
46
50
  {item}
47
51
  </ListItem>
48
52
  ))}
@@ -20,4 +20,6 @@ export type ListProps = ListContent &
20
20
  BulletsProps & {
21
21
  /** @hidden */
22
22
  className?: string;
23
+ /** @hidden */
24
+ dotClassName?: string;
23
25
  };
@@ -17,7 +17,7 @@ export const ListItem = JSX<ListItemProps>(({ className, isDotted, dotClassName,
17
17
  <div className="shrink-0">
18
18
  <div
19
19
  className={style(
20
- 'align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white',
20
+ 'align-middle inline-block rounded-full group-data-secondary:bg-white',
21
21
  dotClassName,
22
22
  )}
23
23
  />
@@ -29,9 +29,11 @@ export const SlideCheckbox = JSX<SlideCheckboxProps>(
29
29
  )}
30
30
  />
31
31
  </div>
32
- <Text size="text-l" font="font-light" color="text-primary-text">
33
- {text}
34
- </Text>
32
+ {text ? (
33
+ <Text size="text-l" font="font-light" color="text-primary-text">
34
+ {text}
35
+ </Text>
36
+ ) : null}
35
37
  </div>
36
38
  ),
37
39
  );
@@ -9,12 +9,12 @@ type SlideCheckboxGroupItem = {
9
9
 
10
10
  interface SlideCheckboxGroupProps extends ControlProps<string> {
11
11
  multiple: false;
12
- items: SlideCheckboxGroupItem[];
12
+ items?: SlideCheckboxGroupItem[];
13
13
  }
14
14
 
15
15
  interface MultipleSlideCheckboxGroupProps extends ControlProps<string[]> {
16
16
  multiple: true;
17
- items: SlideCheckboxGroupItem[];
17
+ items?: SlideCheckboxGroupItem[];
18
18
  }
19
19
 
20
20
  export const SlideCheckboxGroup = JSX<SlideCheckboxGroupProps | MultipleSlideCheckboxGroupProps>(
@@ -38,7 +38,7 @@ export const SlideCheckboxGroup = JSX<SlideCheckboxGroupProps | MultipleSlideChe
38
38
  return items.map((item) => (
39
39
  <SlideCheckbox
40
40
  key={item.value}
41
- text={item.title}
41
+ text={item?.title}
42
42
  value={[value].flatMap((_) => _).includes(item.value)}
43
43
  onChange={() => handleChange(item.value)}
44
44
  type={multiple ? 'checkbox' : 'radio'}