@redneckz/wildless-cms-uni-blocks 0.3.60 → 0.3.62
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.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +21 -17
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +1 -1
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +1 -1
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +9 -0
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +1 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +1 -1
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +1 -1
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.d.ts +5 -0
- package/dist/ui-kit/Logo/Logo.js +7 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.js +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar.mobile.js +1 -1
- package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +1 -1
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +1 -1
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +9 -0
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +1 -1
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +1 -1
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +1 -1
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.d.ts +5 -0
- package/lib/ui-kit/Logo/Logo.js +7 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.js +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Header/HeaderContent.d.ts +9 -0
- package/mobile/dist/components/Headline/Headline.js +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.js +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Header/HeaderContent.d.ts +9 -0
- package/mobile/lib/components/Headline/Headline.js +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.js +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +4 -4
- package/mobile/src/components/ComparisonTable/TableCell.tsx +4 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +4 -4
- package/mobile/src/components/Header/Header.example.json +5 -1
- package/mobile/src/components/Header/HeaderContent.ts +9 -0
- package/mobile/src/components/Headline/Headline.tsx +4 -4
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +2 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
- package/mobile/src/components/Recommendation/Recommendation.tsx +4 -4
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +9 -9
- package/mobile/src/components/Tile/Tile.tsx +4 -4
- package/mobile/src/ui-kit/Logo/Logo.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/package.json +1 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +4 -4
- package/src/components/ComparisonTable/TableCell.mobile.tsx +4 -4
- package/src/components/ComparisonTable/TableCell.tsx +4 -4
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +4 -4
- package/src/components/Header/Header.example.json +5 -1
- package/src/components/Header/Header.tsx +2 -1
- package/src/components/Header/HeaderContent.ts +9 -0
- package/src/components/Headline/Headline.mobile.tsx +4 -4
- package/src/components/Headline/Headline.tsx +4 -4
- package/src/components/MobileAppTile/MobileAppTile.tsx +2 -2
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +2 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +9 -11
- package/src/components/ProductTile/ProductTile.tsx +2 -2
- package/src/components/Recommendation/Recommendation.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +9 -9
- package/src/components/TextBlock/TextBlock.tsx +4 -4
- package/src/components/Tile/Tile.tsx +4 -4
- package/src/ui-kit/Logo/Logo.mobile.tsx +1 -1
- package/src/ui-kit/Logo/Logo.tsx +31 -12
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
- package/src/ui-kit/SearchBar.mobile.tsx +1 -1
|
@@ -19,18 +19,18 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
19
19
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
20
20
|
return (
|
|
21
21
|
<section className={`p-[50px] ${STYLE_MAPS.background} ${className}`} id={anchor}>
|
|
22
|
-
{title
|
|
22
|
+
{title ? (
|
|
23
23
|
<Heading
|
|
24
24
|
headingType="h2"
|
|
25
25
|
className={`text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}
|
|
26
26
|
title={title}
|
|
27
27
|
/>
|
|
28
|
-
)}
|
|
29
|
-
{description
|
|
28
|
+
) : null}
|
|
29
|
+
{description ? (
|
|
30
30
|
<p className={`font-normal text-base mt-4 ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}>
|
|
31
31
|
{description}
|
|
32
32
|
</p>
|
|
33
|
-
)}
|
|
33
|
+
) : null}
|
|
34
34
|
</section>
|
|
35
35
|
);
|
|
36
36
|
},
|
|
@@ -28,13 +28,13 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
28
28
|
<BaseTile
|
|
29
29
|
context={context}
|
|
30
30
|
title={
|
|
31
|
-
title
|
|
31
|
+
title ? (
|
|
32
32
|
<Heading
|
|
33
33
|
headingType="h3"
|
|
34
34
|
title={title}
|
|
35
35
|
className={`whitespace-pre-wrap max-w-[600px] mb-[30px]`}
|
|
36
36
|
/>
|
|
37
|
-
)
|
|
37
|
+
) : null
|
|
38
38
|
}
|
|
39
39
|
buttons={
|
|
40
40
|
buttons?.length ? (
|
|
@@ -35,13 +35,13 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
35
35
|
<BaseTile
|
|
36
36
|
context={context}
|
|
37
37
|
title={
|
|
38
|
-
title
|
|
38
|
+
title ? (
|
|
39
39
|
<Heading
|
|
40
40
|
headingType={headingType}
|
|
41
41
|
title={title}
|
|
42
42
|
className="whitespace-pre-wrap max-w-[600px]"
|
|
43
43
|
/>
|
|
44
|
-
)
|
|
44
|
+
) : null
|
|
45
45
|
}
|
|
46
46
|
buttons={
|
|
47
47
|
buttons?.length ? (
|
|
@@ -36,12 +36,12 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
36
36
|
title={getTitle(title, headingType)}
|
|
37
37
|
buttons={getButtons(context, buttons)}
|
|
38
38
|
>
|
|
39
|
-
{description
|
|
39
|
+
{description ? (
|
|
40
40
|
<Description
|
|
41
41
|
className={`mt-4 max-w-[600px] text-md font-light ${textColor}`}
|
|
42
42
|
description={description}
|
|
43
43
|
/>
|
|
44
|
-
)}
|
|
44
|
+
) : null}
|
|
45
45
|
{benefits?.filter((items) => items.label)?.length ? (
|
|
46
46
|
<div className="flex gap-6 mt-6">
|
|
47
47
|
{benefits.map((benefit, i) =>
|
|
@@ -67,15 +67,13 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
const getTitle = (title, headingType) => {
|
|
70
|
-
return (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
78
|
-
);
|
|
70
|
+
return title ? (
|
|
71
|
+
<Heading
|
|
72
|
+
headingType={headingType}
|
|
73
|
+
title={title}
|
|
74
|
+
className="whitespace-pre-wrap max-w-[600px]"
|
|
75
|
+
/>
|
|
76
|
+
) : null;
|
|
79
77
|
};
|
|
80
78
|
|
|
81
79
|
const getButtons = (context, buttons) => {
|
|
@@ -42,14 +42,14 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
42
42
|
<BaseTile
|
|
43
43
|
context={context}
|
|
44
44
|
title={
|
|
45
|
-
title
|
|
45
|
+
title ? (
|
|
46
46
|
<Heading
|
|
47
47
|
headingType={headingType}
|
|
48
48
|
as="h3"
|
|
49
49
|
title={title}
|
|
50
50
|
className={`whitespace-pre-wrap max-w-[600px]`}
|
|
51
51
|
/>
|
|
52
|
-
)
|
|
52
|
+
) : null
|
|
53
53
|
}
|
|
54
54
|
buttons={
|
|
55
55
|
buttons?.length ? (
|
|
@@ -87,20 +87,20 @@ const renderNavButtons = ({
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<div>
|
|
90
|
-
{showPrevButton
|
|
90
|
+
{showPrevButton ? (
|
|
91
91
|
<ArrowButton
|
|
92
92
|
className="absolute top-1/2 left-8 z-10 mt-6"
|
|
93
93
|
onClick={handlePrevClick}
|
|
94
94
|
ariaLabel="Пролистать влево"
|
|
95
95
|
/>
|
|
96
|
-
)}
|
|
97
|
-
{showNextButton
|
|
96
|
+
) : null}
|
|
97
|
+
{showNextButton ? (
|
|
98
98
|
<ArrowButton
|
|
99
99
|
className="absolute top-1/2 right-8 z-10 mt-6 rotate-180"
|
|
100
100
|
onClick={handleNextClick}
|
|
101
101
|
ariaLabel="Пролистать вправо"
|
|
102
102
|
/>
|
|
103
|
-
)}
|
|
103
|
+
) : null}
|
|
104
104
|
</div>
|
|
105
105
|
);
|
|
106
106
|
};
|
|
@@ -53,14 +53,14 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
53
53
|
className={`box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
54
54
|
${style.background} ${style.title} ${className || ''}`}
|
|
55
55
|
>
|
|
56
|
-
{title
|
|
56
|
+
{title ? (
|
|
57
57
|
<Heading headingType="h3" className={`text-center ${style.title}`} title={title} />
|
|
58
|
-
)}
|
|
59
|
-
{description
|
|
58
|
+
) : null}
|
|
59
|
+
{description ? (
|
|
60
60
|
<p className={`text-m-md text-center ${style.description} ${title && 'mt-2'}`}>
|
|
61
61
|
{description}
|
|
62
62
|
</p>
|
|
63
|
-
)}
|
|
63
|
+
) : null}
|
|
64
64
|
{steps?.length ? (
|
|
65
65
|
<div className={`box-border py-0.5 mb-0.5 mt-5`}>
|
|
66
66
|
<div className="flex flex-col justify-between gap-x-[101px]">
|
|
@@ -94,17 +94,17 @@ const renderStepTitle = (params: RenderStepTitleParams) => {
|
|
|
94
94
|
<div key={String(i)} className="flex flex-row text-center relative">
|
|
95
95
|
<div className="overflow-hidden">
|
|
96
96
|
{renderIconArea(params)}
|
|
97
|
-
{
|
|
97
|
+
{isLastStep ? null : (
|
|
98
98
|
<div className={`min-h-8 h-full w-[2px] ${style.iconConnector} ${margin}`} />
|
|
99
99
|
)}
|
|
100
100
|
</div>
|
|
101
101
|
<div
|
|
102
102
|
className={`flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`}
|
|
103
103
|
>
|
|
104
|
-
{step.label
|
|
104
|
+
{step.label ? (
|
|
105
105
|
<div className="font-medium text-m-title-xs m-0 text-left">{step.label}</div>
|
|
106
|
-
)}
|
|
107
|
-
{step.description
|
|
106
|
+
) : null}
|
|
107
|
+
{step.description ? (
|
|
108
108
|
<div
|
|
109
109
|
className={`font-normal text-sm ${style.description} text-left ${
|
|
110
110
|
step.label ? 'mt-1' : ''
|
|
@@ -112,7 +112,7 @@ const renderStepTitle = (params: RenderStepTitleParams) => {
|
|
|
112
112
|
>
|
|
113
113
|
{step.description}
|
|
114
114
|
</div>
|
|
115
|
-
)}
|
|
115
|
+
) : null}
|
|
116
116
|
</div>
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
@@ -49,12 +49,12 @@ export const TextBlock = JSX<TextBlockProps>(
|
|
|
49
49
|
{iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null}
|
|
50
50
|
{iconVersion === 'big' ? renderImage(image) : null}
|
|
51
51
|
<div className="py-0.5">
|
|
52
|
-
{title
|
|
52
|
+
{title ? (
|
|
53
53
|
<div className={`font-medium text-base mb-1 ${textBlockStyleMap.title}`}>{title}</div>
|
|
54
|
-
)}
|
|
55
|
-
{description
|
|
54
|
+
) : null}
|
|
55
|
+
{description ? (
|
|
56
56
|
<div className={`text-sm ${textBlockStyleMap.description}`}>{description}</div>
|
|
57
|
-
)}
|
|
57
|
+
) : null}
|
|
58
58
|
</div>
|
|
59
59
|
</section>
|
|
60
60
|
);
|
|
@@ -47,7 +47,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
47
47
|
<BaseTile
|
|
48
48
|
context={context}
|
|
49
49
|
title={
|
|
50
|
-
title
|
|
50
|
+
title ? (
|
|
51
51
|
<Heading
|
|
52
52
|
headingType={headingType}
|
|
53
53
|
as="h3"
|
|
@@ -55,7 +55,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
55
55
|
className={`whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
56
56
|
${version === 'primary' ? 'text-primary-text' : ''}`}
|
|
57
57
|
/>
|
|
58
|
-
)
|
|
58
|
+
) : null
|
|
59
59
|
}
|
|
60
60
|
buttons={
|
|
61
61
|
buttons?.length ? (
|
|
@@ -68,12 +68,12 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
68
68
|
}
|
|
69
69
|
image={image?.src && <Img className="mt-auto ml-7" image={image} />}
|
|
70
70
|
>
|
|
71
|
-
{description
|
|
71
|
+
{description ? (
|
|
72
72
|
<Description
|
|
73
73
|
className="max-w-[600px] text-title-new-sm font-light"
|
|
74
74
|
description={description}
|
|
75
75
|
/>
|
|
76
|
-
)}
|
|
76
|
+
) : null}
|
|
77
77
|
{children}
|
|
78
78
|
{renderList(items, version)}
|
|
79
79
|
</BaseTile>
|
|
@@ -40,7 +40,7 @@ export const Logo = JSX<Partial<LogoProps>>(
|
|
|
40
40
|
viewBox="0 0 40 45"
|
|
41
41
|
paths={LOGO_PATHS.map((d) => ({ d }))}
|
|
42
42
|
/>
|
|
43
|
-
{
|
|
43
|
+
{hideTitle ? null : (
|
|
44
44
|
<span className={`${TEXT_COLOR[bgColor]} text-sm font-medium ml-2.5`}>
|
|
45
45
|
{children || 'Россельхозбанк'}
|
|
46
46
|
</span>
|
package/src/ui-kit/Logo/Logo.tsx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { BgColorVersion } from '../../model/BgColorVersion';
|
|
3
3
|
import { SVG } from '../SVG';
|
|
4
|
+
import { Img } from '../Img/Img';
|
|
5
|
+
import type { Picture } from '../../model/Picture';
|
|
4
6
|
|
|
5
7
|
export interface LogoProps {
|
|
6
8
|
className: string;
|
|
@@ -8,6 +10,10 @@ export interface LogoProps {
|
|
|
8
10
|
targetBlank: boolean;
|
|
9
11
|
bgColor?: string;
|
|
10
12
|
hideTitle?: boolean;
|
|
13
|
+
logo?: {
|
|
14
|
+
image?: Picture;
|
|
15
|
+
title?: string;
|
|
16
|
+
};
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
const LOGO_PATHS = [
|
|
@@ -27,25 +33,38 @@ const TEXT_COLOR: Record<BgColorVersion, string> = {
|
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export const Logo = JSX<Partial<LogoProps>>(
|
|
30
|
-
({
|
|
36
|
+
({
|
|
37
|
+
className = '',
|
|
38
|
+
href,
|
|
39
|
+
logo,
|
|
40
|
+
children = logo?.title,
|
|
41
|
+
targetBlank,
|
|
42
|
+
bgColor = 'bg-white',
|
|
43
|
+
hideTitle,
|
|
44
|
+
}) => {
|
|
31
45
|
return (
|
|
32
46
|
<a
|
|
33
|
-
className={`inline-flex items-center font-sans no-underline ${className
|
|
47
|
+
className={`inline-flex items-center font-sans no-underline ${className}`}
|
|
34
48
|
href={href || 'https://rshb.ru/'}
|
|
35
49
|
target={targetBlank ? '_blank' : '_self'}
|
|
36
|
-
aria-label=
|
|
50
|
+
aria-label={logo?.title || 'Россельхозбанк'}
|
|
37
51
|
>
|
|
38
|
-
|
|
39
|
-
className={
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</span>
|
|
52
|
+
{logo?.image?.src ? (
|
|
53
|
+
<Img image={logo.image} className={SVG_COLOR[bgColor]} width="40" height="45" asSVG />
|
|
54
|
+
) : (
|
|
55
|
+
<SVG
|
|
56
|
+
className={`${SVG_COLOR[bgColor]} w-10`}
|
|
57
|
+
viewBox="0 0 40 45"
|
|
58
|
+
paths={LOGO_PATHS.map((d) => ({ d }))}
|
|
59
|
+
/>
|
|
47
60
|
)}
|
|
61
|
+
{hideTitle ? null : renderTitle(children, bgColor, logo?.title)}
|
|
48
62
|
</a>
|
|
49
63
|
);
|
|
50
64
|
},
|
|
51
65
|
);
|
|
66
|
+
|
|
67
|
+
const renderTitle = (children, bgColor, title) => {
|
|
68
|
+
const text = children || title || 'Россельхозбанк';
|
|
69
|
+
return <span className={`${TEXT_COLOR[bgColor]} font-medium ml-2.5`}>{text}</span>;
|
|
70
|
+
};
|
|
@@ -10,7 +10,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
10
10
|
<div className="w-[20px] h-[20px]">
|
|
11
11
|
<Img image="LoupeIcon" width="24" height="24" />
|
|
12
12
|
</div>
|
|
13
|
-
{
|
|
13
|
+
{term ? null : (
|
|
14
14
|
<label
|
|
15
15
|
htmlFor="search-bar-input"
|
|
16
16
|
className="font-sans font-normal text-sm text-secondary-text"
|
|
@@ -11,7 +11,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
11
11
|
<div className="w-[24px] h-[24px]">
|
|
12
12
|
<Img image="LoupeIcon" width="24" height="24" />
|
|
13
13
|
</div>
|
|
14
|
-
{
|
|
14
|
+
{term ? null : (
|
|
15
15
|
<label
|
|
16
16
|
htmlFor="search-bar-input"
|
|
17
17
|
className="font-sans font-light text-base text-secondary-text"
|
|
@@ -11,7 +11,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
11
11
|
<div className="w-[20px] h-[20px]">
|
|
12
12
|
<Img image="LoupeIcon" width="24" height="24" />
|
|
13
13
|
</div>
|
|
14
|
-
{
|
|
14
|
+
{term ? null : (
|
|
15
15
|
<label
|
|
16
16
|
htmlFor="search-bar-input"
|
|
17
17
|
className="font-sans font-normal text-sm text-secondary-text"
|