@redneckz/wildless-cms-uni-blocks 0.9.5 → 0.9.6

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/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  2. package/bundle/BlockRenderer/renderBlock.d.ts +5 -1
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +89 -52
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
  7. package/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  8. package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  9. package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  10. package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  11. package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  12. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  13. package/bundle/ui-kit/BlockWrapper.d.ts +0 -1
  14. package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  15. package/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  16. package/dist/BlockRenderer/renderBlock.d.ts +5 -1
  17. package/dist/BlockRenderer/renderBlock.js +2 -2
  18. package/dist/BlockRenderer/renderBlock.js.map +1 -1
  19. package/dist/components/Calculator/CalculatorContent.d.ts +15 -1
  20. package/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  21. package/dist/components/Calculator/CreditCalculatorForm.js +19 -4
  22. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  23. package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  24. package/dist/components/Calculator/constants.js +1 -0
  25. package/dist/components/Calculator/constants.js.map +1 -1
  26. package/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  27. package/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
  28. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  29. package/dist/components/Carousel/Carousel.js +11 -13
  30. package/dist/components/Carousel/Carousel.js.map +1 -1
  31. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  32. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  33. package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  34. package/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
  35. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  36. package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  37. package/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
  38. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  39. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  40. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  41. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  42. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  43. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  44. package/dist/components/VerticalLayout/VerticalLayout.js +6 -2
  45. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  46. package/dist/ui-kit/BlockWrapper.d.ts +0 -1
  47. package/dist/ui-kit/BlockWrapper.js +2 -2
  48. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  49. package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  50. package/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
  51. package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  52. package/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  53. package/lib/BlockRenderer/renderBlock.d.ts +5 -1
  54. package/lib/BlockRenderer/renderBlock.js +2 -2
  55. package/lib/BlockRenderer/renderBlock.js.map +1 -1
  56. package/lib/common.css +1 -1
  57. package/lib/components/Calculator/CalculatorContent.d.ts +15 -1
  58. package/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  59. package/lib/components/Calculator/CreditCalculatorForm.js +19 -4
  60. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  61. package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  62. package/lib/components/Calculator/constants.js +1 -0
  63. package/lib/components/Calculator/constants.js.map +1 -1
  64. package/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  65. package/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
  66. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  67. package/lib/components/Carousel/Carousel.js +11 -13
  68. package/lib/components/Carousel/Carousel.js.map +1 -1
  69. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  70. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  71. package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  72. package/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
  73. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  74. package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  75. package/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
  76. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  77. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  78. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  79. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  80. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  81. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  82. package/lib/components/VerticalLayout/VerticalLayout.js +6 -2
  83. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  84. package/lib/ui-kit/BlockWrapper.d.ts +0 -1
  85. package/lib/ui-kit/BlockWrapper.js +2 -2
  86. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  87. package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  88. package/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
  89. package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  90. package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  91. package/mobile/bundle/BlockRenderer/renderBlock.d.ts +5 -1
  92. package/mobile/bundle/bundle.umd.js +10 -7
  93. package/mobile/bundle/bundle.umd.min.js +1 -1
  94. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
  95. package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  96. package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  97. package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  98. package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  99. package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  100. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  101. package/mobile/bundle/ui-kit/BlockWrapper.d.ts +0 -1
  102. package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  103. package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  104. package/mobile/dist/BlockRenderer/renderBlock.d.ts +5 -1
  105. package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
  106. package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
  107. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +15 -1
  108. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  109. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +19 -4
  110. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  111. package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  112. package/mobile/dist/components/Calculator/constants.js +1 -0
  113. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  114. package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  115. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
  116. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  117. package/mobile/dist/components/Carousel/Carousel.js +11 -13
  118. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  119. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  120. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  121. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  122. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
  123. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  124. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  125. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
  126. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  127. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  128. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  129. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  130. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  131. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  132. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +6 -2
  133. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  134. package/mobile/dist/ui-kit/BlockWrapper.d.ts +0 -1
  135. package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
  136. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  137. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  138. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
  139. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  140. package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  141. package/mobile/lib/BlockRenderer/renderBlock.d.ts +5 -1
  142. package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
  143. package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
  144. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +15 -1
  145. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  146. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +19 -4
  147. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  148. package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  149. package/mobile/lib/components/Calculator/constants.js +1 -0
  150. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  151. package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  152. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
  153. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  154. package/mobile/lib/components/Carousel/Carousel.js +11 -13
  155. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  156. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  157. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  158. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  159. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
  160. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  161. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  162. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
  163. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  164. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  165. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  166. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  167. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  168. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  169. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +6 -2
  170. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  171. package/mobile/lib/ui-kit/BlockWrapper.d.ts +0 -1
  172. package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
  173. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  174. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  175. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
  176. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  177. package/mobile/src/BlockRenderer/BlockRendererOptions.ts +0 -2
  178. package/mobile/src/BlockRenderer/renderBlock.tsx +7 -3
  179. package/mobile/src/components/Calculator/Calculator.example.json +6 -0
  180. package/mobile/src/components/Calculator/CalculatorContent.ts +16 -1
  181. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
  182. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
  183. package/mobile/src/components/Calculator/constants.ts +1 -0
  184. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
  185. package/mobile/src/components/Carousel/Carousel.tsx +9 -11
  186. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
  187. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
  188. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
  189. package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
  190. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
  191. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
  192. package/mobile/src/ui-kit/BlockWrapper.tsx +3 -6
  193. package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
  194. package/package.json +1 -1
  195. package/src/BlockRenderer/BlockRendererOptions.ts +0 -2
  196. package/src/BlockRenderer/renderBlock.tsx +7 -3
  197. package/src/components/Calculator/Calculator.example.json +6 -0
  198. package/src/components/Calculator/Calculator.fixture.tsx +6 -0
  199. package/src/components/Calculator/CalculatorContent.ts +16 -1
  200. package/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
  201. package/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
  202. package/src/components/Calculator/constants.ts +1 -0
  203. package/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
  204. package/src/components/Carousel/Carousel.tsx +9 -11
  205. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
  206. package/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
  207. package/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
  208. package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
  209. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
  210. package/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
  211. package/src/ui-kit/BlockWrapper.tsx +3 -6
  212. package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
@@ -1,17 +1,17 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { BlockVersion } from '../../model/BlockVersion';
3
+ import type { UniBlockProps } from '../../model/JSXBlock';
4
+ import type { Picture } from '../../model/Picture';
2
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
- import { HEADLINE_SMALL_VERSION } from '../Headline/headlineVersionStyles';
6
+ import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
4
7
  import { Img } from '../../ui-kit/Img/Img';
8
+ import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
5
9
  import { List } from '../../ui-kit/List/List';
6
10
  import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
7
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
8
- import { style } from '../../utils/style';
9
11
  import { Text } from '../../ui-kit/Text/Text';
10
- import { useLink } from '../../hooks/useLink';
11
- import type { BlockVersion } from '../../model/BlockVersion';
12
+ import { style } from '../../utils/style';
13
+ import { HEADLINE_SMALL_VERSION } from '../Headline/headlineVersionStyles';
12
14
  import type { CarouselProductCardContent, ListProps } from './CarouselProductCardContent';
13
- import type { Picture } from '../../model/Picture';
14
- import type { UniBlockProps } from '../../model/JSXBlock';
15
15
 
16
16
  export interface CarouselProductCardProps extends CarouselProductCardContent, UniBlockProps {}
17
17
 
@@ -32,31 +32,25 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
32
32
  version = 'primary',
33
33
  ...rest
34
34
  }) => {
35
- const link = useLink();
36
- const adjustedProps = link({ href, target });
37
- const tagName = href ? 'a' : 'section';
38
-
39
35
  return (
40
36
  <BlockWrapper
41
37
  className={style(
42
- 'flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6',
38
+ 'justify-between min-w-[260px]',
43
39
  'box-border border-solid border border-gray',
44
40
  align,
45
41
  className,
46
42
  )}
47
- extraProps={adjustedProps}
48
- tag={tagName}
49
43
  version={version}
50
44
  {...rest}
51
45
  >
52
- <div className="flex flex-col h-full">
46
+ <LinkWrapper className="p-6" href={href} target={target}>
53
47
  {renderImage(icon)}
54
48
  {renderCardTitle(headlineSmallVersion, title)}
55
49
  {renderDescription(description, title)}
56
50
  {renderItems(items, isDotted, version)}
57
51
  {renderAdditionalDescription(additionalDescription)}
58
- </div>
59
- {renderButtonsSection([button], { buttonClassName: 'mt-6 w-full' })}
52
+ </LinkWrapper>
53
+ {renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })}
60
54
  </BlockWrapper>
61
55
  );
62
56
  },
@@ -72,7 +66,11 @@ const renderImage = (image?: Picture) => (
72
66
  );
73
67
 
74
68
  const renderCardTitle = (headlineSmallVersion: string, title?: string) =>
75
- title ? <Text size={HEADLINE_SMALL_VERSION[headlineSmallVersion]}>{title}</Text> : null;
69
+ title ? (
70
+ <div>
71
+ <Text size={HEADLINE_SMALL_VERSION[headlineSmallVersion]}>{title}</Text>
72
+ </div>
73
+ ) : null;
76
74
 
77
75
  const renderDescription = (description?: string, title?: string) =>
78
76
  description ? (
@@ -4,34 +4,29 @@ import type { UniBlockProps } from '../../model/JSXBlock';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
5
  import { Heading } from '../../ui-kit/Heading/Heading';
6
6
  import { Img } from '../../ui-kit/Img/Img';
7
+ import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
7
8
  import { getIconWithVersion } from '../../utils/getIconWithVersion';
8
- import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
9
- import { useLink } from '../../hooks/useLink';
10
9
  import { style } from '../../utils/style';
10
+ import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
11
11
 
12
12
  export interface CarouselTariffsCardProps extends CarouselProgramsCardContent, UniBlockProps {}
13
13
 
14
14
  export const CarouselProgramsCard = JSX<CarouselTariffsCardProps>(
15
15
  ({ className = '', title, icon, list = [], href, target, ...rest }) => {
16
- const link = useLink();
17
- const adjustedProps = link({ href, target });
18
- const tagName = href ? 'a' : 'section';
19
-
20
16
  return (
21
- <BlockWrapper
22
- tag={tagName}
23
- className={style('border border-gray flex min-w-[536px]', className)}
24
- extraProps={adjustedProps}
25
- {...rest}
26
- >
27
- <div className="w-[200px] min-w-[200px] self-center">
28
- {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
29
- {icon?.src ? <Img image={icon} /> : null}
30
- </div>
31
- <div className="p-8 pl-3 w-full">
32
- {title ? <Heading className=" mb-3.5" headingType="h5" title={title} /> : null}
33
- {list.length ? <div className="flex flex-col gap-3">{list?.map(renderList)}</div> : null}
34
- </div>
17
+ <BlockWrapper className={style('border border-gray min-w-[536px]', className)} {...rest}>
18
+ <LinkWrapper className="flex" href={href} target={target}>
19
+ <div className="w-[200px] min-w-[200px] self-center">
20
+ {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
21
+ {icon?.src ? <Img image={icon} /> : null}
22
+ </div>
23
+ <div className="p-8 pl-3 w-full">
24
+ {title ? <Heading className=" mb-3.5" headingType="h5" title={title} /> : null}
25
+ {list.length ? (
26
+ <div className="flex flex-col gap-3">{list?.map(renderList)}</div>
27
+ ) : null}
28
+ </div>
29
+ </LinkWrapper>
35
30
  </BlockWrapper>
36
31
  );
37
32
  },
@@ -1,16 +1,16 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ import type { Picture } from '../../model/Picture';
2
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
- import { getIconWithVersion } from '../../utils/getIconWithVersion';
4
5
  import { Heading } from '../../ui-kit/Heading/Heading';
5
6
  import { Img } from '../../ui-kit/Img/Img';
7
+ import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
6
8
  import { List } from '../../ui-kit/List/List';
7
9
  import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
8
- import { SocialMedia } from '../Footer/SocialMedia';
10
+ import { getIconWithVersion } from '../../utils/getIconWithVersion';
9
11
  import { style } from '../../utils/style';
10
- import { useLink } from '../../hooks/useLink';
12
+ import { SocialMedia } from '../Footer/SocialMedia';
11
13
  import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
12
- import type { UniBlockProps } from '../../model/JSXBlock';
13
- import type { Picture } from '../../model/Picture';
14
14
 
15
15
  const BORDER_STYLE =
16
16
  'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
@@ -33,10 +33,6 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
33
33
  version = 'primary',
34
34
  ...rest
35
35
  }) => {
36
- const link = useLink();
37
- const adjustedProps = link({ href, target });
38
- const tagName = href ? 'a' : 'section';
39
-
40
36
  return (
41
37
  <BlockWrapper
42
38
  className={style(
@@ -44,30 +40,34 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
44
40
  BORDER_STYLE,
45
41
  className,
46
42
  )}
47
- extraProps={adjustedProps}
48
- tag={tagName}
49
43
  version={version}
50
44
  {...rest}
51
45
  >
52
- <div className="self-center">
53
- {title ? <Heading headingType="h3" as="h3" className="mb-8" title={title} /> : null}
54
- </div>
55
- <div className="mb-5">
56
- {description ? (
57
- <Paragraph size="text-xl" font="font-light" color="group-data-gray:text-secondary-text">
58
- {description}
59
- </Paragraph>
60
- ) : null}
61
- </div>
62
- <div className="flex align-center w-full">
63
- <div className="w-1/2 h-full flex flex-col flex-1 justify-end">
64
- {items.length ? (
65
- <List className="text-xl-light flex flex-col gap-2 pb-16 mb-3" items={items} />
46
+ <LinkWrapper className="flex flex-col" href={href} target={target}>
47
+ <div className="self-center">
48
+ {title ? <Heading headingType="h3" as="h3" className="mb-8" title={title} /> : null}
49
+ </div>
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>
66
59
  ) : null}
67
- {socialMedia.length ? <SocialMedia className="pb-0" media={socialMedia} /> : null}
68
60
  </div>
69
- {renderIconBlock(icon, items)}
70
- </div>
61
+ <div className="flex align-center w-full">
62
+ <div className="w-1/2 h-full flex flex-col flex-1 justify-end">
63
+ {items.length ? (
64
+ <List className="text-xl-light flex flex-col gap-2 pb-16 mb-3" items={items} />
65
+ ) : null}
66
+ {socialMedia.length ? <SocialMedia className="pb-0" media={socialMedia} /> : null}
67
+ </div>
68
+ {renderIconBlock(icon, items)}
69
+ </div>
70
+ </LinkWrapper>
71
71
  </BlockWrapper>
72
72
  );
73
73
  },
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { renderBlock } from '../../BlockRenderer/renderBlock';
2
3
  import { renderChildren } from '../../BlockRenderer/renderChildren';
3
4
  import type { AlignTypeWithStretch } from '../../model/AlignType';
4
5
  import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
@@ -25,7 +26,6 @@ export const VerticalLayout: JSXBlock<VerticalLayoutProps> = JSX<VerticalLayoutP
25
26
  isInnerPadding = true,
26
27
  version = 'transparent',
27
28
  isTheme = false,
28
- options,
29
29
  ...rest
30
30
  }) => {
31
31
  const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
@@ -43,7 +43,11 @@ export const VerticalLayout: JSXBlock<VerticalLayoutProps> = JSX<VerticalLayoutP
43
43
  isTheme={isTheme}
44
44
  {...rest}
45
45
  >
46
- {renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } })}
46
+ {renderChildren({
47
+ ...rest,
48
+ renderProps: (block, options) =>
49
+ renderBlock(block, options, { className: innerPaddingStyle }),
50
+ })}
47
51
  </BlockWrapper>
48
52
  );
49
53
  },
@@ -1,15 +1,14 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { defaultEventBus } from '../EventBus/defaultEventBus';
4
- import { useBlockIntersectionObserver } from '../services/BlockRouter/useBlockIntersectionObserver';
5
- import { style } from '../utils/style';
6
4
  import type { BlockVersion } from '../model/BlockVersion';
7
5
  import type { UniBlockProps } from '../model/JSXBlock';
6
+ import { useBlockIntersectionObserver } from '../services/BlockRouter/useBlockIntersectionObserver';
7
+ import { style } from '../utils/style';
8
8
 
9
9
  interface BlockWrapperProps extends UniBlockProps {
10
10
  tag?: keyof HTMLElementTagNameMap;
11
11
  role?: string;
12
- extraProps?: Record<string, any>;
13
12
  }
14
13
 
15
14
  export const blockStyles: Record<BlockVersion, string> = {
@@ -24,11 +23,10 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
24
23
  ({
25
24
  className = '',
26
25
  version = 'primary',
26
+ isTheme = true,
27
27
  block,
28
28
  tag = 'section',
29
29
  role,
30
- isTheme = true,
31
- extraProps = {},
32
30
  children,
33
31
  }) => {
34
32
  const Tag: any = tag;
@@ -57,7 +55,6 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
57
55
  {...(version && isTheme ? { 'data-ver': version } : {})}
58
56
  {...(block?.anchor ? { id: block.anchor, ref } : {})}
59
57
  role={role}
60
- {...extraProps}
61
58
  >
62
59
  {children}
63
60
  </Tag>
@@ -0,0 +1,21 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useLink } from '../../hooks/useLink';
3
+ import type { Target } from '../../model/LinkProps';
4
+
5
+ interface LinkWrapperProps {
6
+ className?: string;
7
+ href?: string;
8
+ target?: Target;
9
+ }
10
+
11
+ export const LinkWrapper = JSX<LinkWrapperProps>(({ className = '', href, target, children }) => {
12
+ const link = useLink();
13
+ const linkProps = link({ href, target });
14
+ const Tag = href ? 'a' : 'div';
15
+
16
+ return (
17
+ <Tag className={className} {...(href ? linkProps : {})}>
18
+ {children}
19
+ </Tag>
20
+ );
21
+ });