@redneckz/wildless-cms-uni-blocks 0.2.93 → 0.2.97
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 +134 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/dist/components/Accordion/AccordionBlocks.js +2 -2
- package/dist/components/Accordion/AccordionBlocks.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.js +3 -6
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +9 -4
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/dist/components/ContentPage/ContentPage.d.ts +9 -1
- package/dist/components/ContentPage/ContentPage.js +20 -17
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/toMobilePage.js +13 -2
- package/dist/components/ContentPage/toMobilePage.js.map +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +3 -3
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Sitemap.js +1 -1
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/dist/components/Gallery/GalleryCardInner.js +19 -0
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -0
- package/dist/components/Gallery/GalleryContainer.d.ts +13 -0
- package/dist/components/Gallery/GalleryContainer.js +16 -0
- package/dist/components/Gallery/GalleryContainer.js.map +1 -0
- package/dist/components/Gallery/GalleryContent.d.ts +8 -2
- package/dist/components/Gallery/GalleryInner.d.ts +1 -1
- package/dist/components/Gallery/GalleryInner.js +8 -36
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Gallery/constants.d.ts +6 -0
- package/dist/components/Gallery/constants.js +19 -0
- package/dist/components/Gallery/constants.js.map +1 -0
- package/dist/components/Header/Header.js +3 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +3 -3
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -4
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +16 -4
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/dist/components/Tile/TileContent.d.ts +1 -1
- package/dist/model/ButtonVersion.d.ts +1 -0
- package/dist/model/LinkProps.d.ts +2 -1
- package/dist/types.d.ts +8 -0
- package/dist/ui-kit/BlockItem/BlockItem.js +4 -4
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +2 -2
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +1 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +49 -41
- package/dist/ui-kit/Icon/IconProps.js +45 -41
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Img.js +9 -3
- package/dist/ui-kit/Img.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +2 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/lib/components/Accordion/AccordionBlocks.js +1 -2
- package/lib/components/Accordion/AccordionBlocks.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +9 -4
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/lib/components/ContentPage/ContentPage.d.ts +9 -1
- package/lib/components/ContentPage/ContentPage.js +20 -17
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/toMobilePage.js +13 -2
- package/lib/components/ContentPage/toMobilePage.js.map +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +3 -3
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Sitemap.js +1 -1
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/lib/components/Gallery/GalleryCardInner.js +17 -0
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -0
- package/lib/components/Gallery/GalleryContainer.d.ts +13 -0
- package/lib/components/Gallery/GalleryContainer.js +14 -0
- package/lib/components/Gallery/GalleryContainer.js.map +1 -0
- package/lib/components/Gallery/GalleryContent.d.ts +8 -2
- package/lib/components/Gallery/GalleryInner.d.ts +1 -1
- package/lib/components/Gallery/GalleryInner.js +6 -34
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Gallery/constants.d.ts +6 -0
- package/lib/components/Gallery/constants.js +17 -0
- package/lib/components/Gallery/constants.js.map +1 -0
- package/lib/components/Header/Header.js +3 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +3 -3
- package/lib/components/LinkDocs/LinkDocs.js +3 -3
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -4
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +16 -4
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/lib/components/Tile/TileContent.d.ts +1 -1
- package/lib/model/ButtonVersion.d.ts +1 -0
- package/lib/model/LinkProps.d.ts +2 -1
- package/lib/types.d.ts +8 -0
- package/lib/ui-kit/BlockItem/BlockItem.js +4 -4
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +2 -2
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +1 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +49 -41
- package/lib/ui-kit/Icon/IconProps.js +45 -41
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Img.js +9 -3
- package/lib/ui-kit/Img.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +2 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/package.json +6 -4
- package/src/components/Accordion/Accordion.example.json +4 -4
- package/src/components/Accordion/Accordion.fixture.tsx +5 -1
- package/src/components/Accordion/AccordionBlocks.tsx +1 -3
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/BaseTile/BaseTile.tsx +14 -5
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +31 -28
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +43 -53
- package/src/components/ComparisonTable/ComparisonTableContent.ts +2 -3
- package/src/components/ContentPage/ContentPage.page.json +31 -49
- package/src/components/ContentPage/ContentPage.tsx +71 -36
- package/src/components/ContentPage/toMobilePage.ts +19 -2
- package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +9 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +11 -8
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +265 -258
- package/src/components/Footer/Footer.tsx +3 -3
- package/src/components/Footer/Sitemap.tsx +1 -1
- package/src/components/Gallery/Gallery.fixture.tsx +52 -48
- package/src/components/Gallery/Gallery.mobile.tsx +1 -3
- package/src/components/Gallery/GalleryCardInner.tsx +53 -0
- package/src/components/Gallery/GalleryContainer.tsx +58 -0
- package/src/components/Gallery/GalleryContent.ts +8 -2
- package/src/components/Gallery/GalleryInner.tsx +15 -94
- package/src/components/Gallery/constants.ts +22 -0
- package/src/components/Header/Header.tsx +14 -12
- package/src/components/Headline/Headline.fixture.tsx +25 -3
- package/src/components/LikeControl/LikeControl.fixture.tsx +5 -1
- package/src/components/LinkDocs/LinkDocs.example.json +26 -0
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +23 -6
- package/src/components/LinkDocs/LinkDocs.tsx +3 -3
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -3
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +12 -22
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -1
- package/src/components/PictureText/PictureText.example.json +1 -1
- package/src/components/PictureText/PictureText.fixture.tsx +5 -1
- package/src/components/Placeholder/Placeholder.fixture.tsx +5 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +141 -77
- package/src/components/ProductBlock/ProductBlock.tsx +20 -7
- package/src/components/ProductBlock/ProductBlockContent.ts +14 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +39 -7
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +96 -93
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +4 -4
- package/src/components/ProductTile/ProductTileContent.ts +2 -2
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +21 -18
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +5 -16
- package/src/components/TariffsTable/TariffsTableContent.ts +5 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +62 -45
- package/src/components/TextBlock/TextBlockContent.ts +1 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +11 -8
- package/src/components/Tile/TileContent.ts +1 -1
- package/src/icons/AppleIcon.svg +1 -1
- package/src/icons/CalendarWhiteIcon.svg +17 -0
- package/src/icons/EmptyWalletWhiteIcon.svg +16 -0
- package/src/icons/GridIcon.svg +2 -2
- package/src/icons/PercentageSquareWhiteIcon.svg +16 -0
- package/src/icons/PlayMarketIcon.svg +1 -1
- package/src/model/ButtonVersion.ts +1 -0
- package/src/model/LinkProps.ts +2 -1
- package/src/setup-fixture.ts +1 -2
- package/src/types.ts +11 -1
- package/src/ui-kit/BlockItem/BlockItem.tsx +4 -4
- package/src/ui-kit/Button/ButtonProps.ts +6 -1
- package/src/ui-kit/Checkbox/Checkbox.tsx +7 -3
- package/src/ui-kit/Icon/Icon.tsx +1 -1
- package/src/ui-kit/Icon/IconProps.ts +8 -0
- package/src/ui-kit/Img.tsx +23 -10
- package/src/ui-kit/InputRange/InputRange.tsx +7 -6
- package/src/ui-kit/SearchBar.tsx +3 -4
|
@@ -13,7 +13,7 @@ const titleAlignStyleMap: Record<AlignType, string> = {
|
|
|
13
13
|
|
|
14
14
|
const titleMarginsStyleMap: Record<LinkColumnsMode, string> = {
|
|
15
15
|
double: 'mb-8',
|
|
16
|
-
single: '',
|
|
16
|
+
single: 'mb-[26px]',
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const linkColumnsModeStyleMap: Record<LinkColumnsMode, string> = {
|
|
@@ -24,7 +24,7 @@ const linkColumnsModeStyleMap: Record<LinkColumnsMode, string> = {
|
|
|
24
24
|
export interface LinkDocsProps extends LinkDocsContent, UniBlockProps {}
|
|
25
25
|
|
|
26
26
|
export const LinkDocs = JSX<LinkDocsProps>(
|
|
27
|
-
({ className, title, align, documents, icon, columnsMode = '
|
|
27
|
+
({ className, title, align, documents, icon, columnsMode = 'double' }) => {
|
|
28
28
|
const containerClasses = linkColumnsModeStyleMap[columnsMode];
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -49,7 +49,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
49
49
|
role="listitem"
|
|
50
50
|
{...linkProps}
|
|
51
51
|
>
|
|
52
|
-
{icon && <Icon className="mr-
|
|
52
|
+
{icon && <Icon className="mr-2.5 h-fit" name={icon} width="24px" height="24px" />}
|
|
53
53
|
<span className="self-center">
|
|
54
54
|
{text}
|
|
55
55
|
<span className="text-secondary-text group-hover:text-primary-main">
|
|
@@ -16,11 +16,11 @@ export interface LinkDocsItem extends LinkProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* @title Список документов
|
|
18
18
|
*/
|
|
19
|
-
export interface LinkDocsContent extends Pick<BaseTileCommonProps, '
|
|
19
|
+
export interface LinkDocsContent extends Pick<BaseTileCommonProps, 'title' | 'align'> {
|
|
20
|
+
/** @title Отображение списка */
|
|
21
|
+
columnsMode?: LinkColumnsMode;
|
|
20
22
|
/** @title Название иконки */
|
|
21
23
|
icon?: IconName;
|
|
22
24
|
/** @title Список */
|
|
23
25
|
documents?: LinkDocsItem[];
|
|
24
|
-
/** @title Отображение списка */
|
|
25
|
-
columnsMode?: LinkColumnsMode;
|
|
26
26
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
1
2
|
import { context } from '../../setup-fixture';
|
|
2
|
-
|
|
3
3
|
import { MiniGallery, MiniGalleryProps } from './MiniGallery';
|
|
4
|
-
import { Picture } from '../../model/Picture';
|
|
5
4
|
|
|
6
5
|
const image: Picture = {
|
|
7
6
|
src: 'domovoj-kupon.png',
|
|
@@ -10,6 +9,7 @@ const image: Picture = {
|
|
|
10
9
|
width: 120,
|
|
11
10
|
height: 70,
|
|
12
11
|
},
|
|
12
|
+
title: 'domovoj-kupon',
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const defaultProps: MiniGalleryProps = {
|
|
@@ -39,16 +39,6 @@ const defaultProps: MiniGalleryProps = {
|
|
|
39
39
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
40
40
|
image,
|
|
41
41
|
},
|
|
42
|
-
{
|
|
43
|
-
title: 'Фермерские продукты',
|
|
44
|
-
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
45
|
-
image,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: 'Фермерские продукты',
|
|
49
|
-
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
50
|
-
image,
|
|
51
|
-
},
|
|
52
42
|
],
|
|
53
43
|
};
|
|
54
44
|
|
|
@@ -73,18 +63,18 @@ const onlyTitleProps: MiniGalleryProps = {
|
|
|
73
63
|
title: '«Моя выгода»',
|
|
74
64
|
image,
|
|
75
65
|
},
|
|
76
|
-
{
|
|
77
|
-
title: 'Фермерские продукты',
|
|
78
|
-
image,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
title: 'Фермерские продукты',
|
|
82
|
-
image,
|
|
83
|
-
},
|
|
84
66
|
],
|
|
85
67
|
};
|
|
86
68
|
|
|
87
69
|
export default {
|
|
88
|
-
default:
|
|
89
|
-
|
|
70
|
+
default: (
|
|
71
|
+
<div className="container grid grid-cols-12">
|
|
72
|
+
<MiniGallery className="col-span-12" {...defaultProps} />
|
|
73
|
+
</div>
|
|
74
|
+
),
|
|
75
|
+
'only title': (
|
|
76
|
+
<div className="container grid grid-cols-12">
|
|
77
|
+
<MiniGallery className="col-span-12" {...onlyTitleProps} />
|
|
78
|
+
</div>
|
|
79
|
+
),
|
|
90
80
|
};
|
|
@@ -4,7 +4,7 @@ import { MobileAppTile } from './MobileAppTile';
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
default: (
|
|
7
|
-
<div className="grid grid-cols-12">
|
|
7
|
+
<div className="container grid grid-cols-12">
|
|
8
8
|
<MobileAppTile
|
|
9
9
|
context={context}
|
|
10
10
|
className="col-span-4"
|
|
@@ -18,6 +18,7 @@ export default {
|
|
|
18
18
|
text: 'App Store',
|
|
19
19
|
icon: 'AppleIcon',
|
|
20
20
|
href: '#',
|
|
21
|
+
asSVG: true,
|
|
21
22
|
version: 'secondary',
|
|
22
23
|
},
|
|
23
24
|
{
|
|
@@ -25,6 +26,7 @@ export default {
|
|
|
25
26
|
text: 'Google Play',
|
|
26
27
|
icon: 'PlayMarketIcon',
|
|
27
28
|
href: '#',
|
|
29
|
+
asSVG: true,
|
|
28
30
|
version: 'secondary',
|
|
29
31
|
},
|
|
30
32
|
]}
|
|
@@ -32,5 +32,9 @@ export const PICTURE_TEXT: PictureTextContent = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export default {
|
|
35
|
-
default:
|
|
35
|
+
default: (
|
|
36
|
+
<div className="container grid grid-cols-12">
|
|
37
|
+
<PictureText className="col-span-12" context={context} {...PICTURE_TEXT} />
|
|
38
|
+
</div>
|
|
39
|
+
),
|
|
36
40
|
};
|
|
@@ -2,4 +2,8 @@ import { context } from '../../setup-fixture';
|
|
|
2
2
|
|
|
3
3
|
import { Placeholder } from './Placeholder';
|
|
4
4
|
|
|
5
|
-
export default
|
|
5
|
+
export default (
|
|
6
|
+
<div className="container grid grid-cols-12">
|
|
7
|
+
<Placeholder className="col-span-12" context={context} title="Неизвестный блок" />
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { context } from '../../setup-fixture';
|
|
2
2
|
|
|
3
|
-
import { ProductBlock } from './ProductBlock';
|
|
4
3
|
import type { Picture } from '../../model/Picture';
|
|
4
|
+
import { ProductBlock } from './ProductBlock';
|
|
5
5
|
|
|
6
6
|
const image: Picture = {
|
|
7
7
|
src: 'money-1.png',
|
|
8
8
|
format: 'webp',
|
|
9
|
+
alt: 'Потребительский кредит наличными',
|
|
9
10
|
size: {
|
|
10
11
|
width: 280,
|
|
11
12
|
height: 280,
|
|
@@ -14,83 +15,146 @@ const image: Picture = {
|
|
|
14
15
|
|
|
15
16
|
export default {
|
|
16
17
|
default: (
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
18
|
+
<div className="container grid grid-cols-12">
|
|
19
|
+
<ProductBlock
|
|
20
|
+
className="col-span-12"
|
|
21
|
+
context={context}
|
|
22
|
+
title={'Потребительский кредит наличными'}
|
|
23
|
+
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
24
|
+
breadcrumbs={[
|
|
25
|
+
{
|
|
26
|
+
text: 'Главная',
|
|
27
|
+
href: '/',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
text: 'Кредитные карты',
|
|
31
|
+
href: '/credit',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
text: 'Кредитная карта Своя Union Pay',
|
|
35
|
+
},
|
|
36
|
+
]}
|
|
37
|
+
benefits={[
|
|
38
|
+
{
|
|
39
|
+
label: 'До 5 млн ₽',
|
|
40
|
+
description: 'Кредитный лимит',
|
|
41
|
+
icon: 'EmptyWalletIcon',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: 'От 16,9%',
|
|
45
|
+
description: 'Ставка по кредиту',
|
|
46
|
+
icon: 'PercentageSquareIcon',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'До 5 лет',
|
|
50
|
+
description: 'Срок кредитования',
|
|
51
|
+
icon: 'CalendarIcon',
|
|
52
|
+
},
|
|
53
|
+
]}
|
|
54
|
+
buttons={[
|
|
55
|
+
{
|
|
56
|
+
href: 'https://rshb.ru',
|
|
57
|
+
text: 'Оформить карту',
|
|
58
|
+
target: '_blank',
|
|
59
|
+
version: 'primary',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
href: 'https://rshb.ru',
|
|
63
|
+
text: 'Подробнее',
|
|
64
|
+
target: '_blank',
|
|
65
|
+
version: 'secondary',
|
|
66
|
+
},
|
|
67
|
+
]}
|
|
68
|
+
image={image}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
),
|
|
72
|
+
secondary: (
|
|
73
|
+
<div className="container grid grid-cols-12">
|
|
74
|
+
<ProductBlock
|
|
75
|
+
context={context}
|
|
76
|
+
className="col-span-12"
|
|
77
|
+
title={'Потребительский кредит наличными'}
|
|
78
|
+
version={'secondary'}
|
|
79
|
+
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
80
|
+
breadcrumbs={[
|
|
81
|
+
{
|
|
82
|
+
text: 'Главная',
|
|
83
|
+
href: '/',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
text: 'Кредитные карты',
|
|
87
|
+
href: '/credit',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
text: 'Кредитная карта Своя Union Pay',
|
|
91
|
+
href: '#',
|
|
92
|
+
},
|
|
93
|
+
]}
|
|
94
|
+
benefits={[
|
|
95
|
+
{
|
|
96
|
+
label: 'До 5 млн ₽',
|
|
97
|
+
description: 'Кредитный лимит',
|
|
98
|
+
icon: 'EmptyWalletWhiteIcon',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'От 16,9%',
|
|
102
|
+
description: 'Ставка по кредиту',
|
|
103
|
+
icon: 'PercentageSquareWhiteIcon',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: 'До 5 лет',
|
|
107
|
+
description: 'Срок кредитования',
|
|
108
|
+
icon: 'CalendarWhiteIcon',
|
|
109
|
+
},
|
|
110
|
+
]}
|
|
111
|
+
buttons={[
|
|
112
|
+
{
|
|
113
|
+
href: 'https://rshb.ru',
|
|
114
|
+
text: 'Оформить карту',
|
|
115
|
+
target: '_blank',
|
|
116
|
+
version: 'secondary',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
href: 'https://rshb.ru',
|
|
120
|
+
text: 'Подробнее',
|
|
121
|
+
target: '_blank',
|
|
122
|
+
version: 'primary',
|
|
123
|
+
},
|
|
124
|
+
]}
|
|
125
|
+
image={image}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
67
128
|
),
|
|
68
129
|
'with items': (
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
130
|
+
<div className="container grid grid-cols-12">
|
|
131
|
+
<ProductBlock
|
|
132
|
+
className="col-span-12"
|
|
133
|
+
context={context}
|
|
134
|
+
title={'Оплата проходит \nв 180 странах мира'}
|
|
135
|
+
breadcrumbs={[]}
|
|
136
|
+
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
137
|
+
items={[
|
|
138
|
+
'Совершайте любые личные покупки',
|
|
139
|
+
'Используйте корпоративную карту как обычную дебетовую, если вы ИП',
|
|
140
|
+
'Расходы для бизнеса на УСН 15% позволят снизить налоговую базу',
|
|
141
|
+
]}
|
|
142
|
+
buttons={[
|
|
143
|
+
{
|
|
144
|
+
href: 'https://rshb.ru',
|
|
145
|
+
text: 'Оформить карту',
|
|
146
|
+
target: '_blank',
|
|
147
|
+
version: 'primary',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
href: 'https://rshb.ru',
|
|
151
|
+
text: 'Подробнее',
|
|
152
|
+
target: '_blank',
|
|
153
|
+
version: 'secondary',
|
|
154
|
+
},
|
|
155
|
+
]}
|
|
156
|
+
image={image}
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
95
159
|
),
|
|
96
160
|
};
|
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { useLink } from '../../hooks/useLink';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { UniBlockProps } from '../../types';
|
|
5
5
|
import { Breadcrumb } from '../../ui-kit/Breadcrumb';
|
|
6
|
-
import { useLink } from '../../hooks/useLink';
|
|
7
6
|
import { joinList } from '../../utils/joinList';
|
|
7
|
+
import type { ProductBlockContent } from './ProductBlockContent';
|
|
8
|
+
import { ProductBlockInner } from './ProductBlockInner';
|
|
8
9
|
|
|
9
10
|
export interface ProductBlockProps extends ProductBlockContent, UniBlockProps {}
|
|
10
11
|
|
|
12
|
+
const productBlockStyleMap: Record<BlockVersion, string> = {
|
|
13
|
+
primary: 'bg-white text-primary-text',
|
|
14
|
+
secondary: 'bg-primary-main text-white',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const breadcrumbsStyleMap: Record<BlockVersion, string> = {
|
|
18
|
+
primary: 'text-secondary-text',
|
|
19
|
+
secondary: 'text-white/80',
|
|
20
|
+
};
|
|
21
|
+
|
|
11
22
|
export const ProductBlock = JSX<ProductBlockProps>((props) => {
|
|
12
|
-
const { context, className, breadcrumbs } = props;
|
|
23
|
+
const { context, className, breadcrumbs, version = 'primary' } = props;
|
|
13
24
|
const router = context.useRouter();
|
|
14
25
|
const { handlerDecorator } = context;
|
|
15
26
|
return (
|
|
16
27
|
<section
|
|
17
|
-
className={`font-sans
|
|
28
|
+
className={`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${
|
|
29
|
+
className || ''
|
|
30
|
+
} ${productBlockStyleMap[version]}`}
|
|
18
31
|
>
|
|
19
32
|
{breadcrumbs?.length ? (
|
|
20
33
|
<div className="text-xs mb-6">
|
|
21
|
-
{joinList(<span className=
|
|
34
|
+
{joinList(<span className={`mx-2 ${breadcrumbsStyleMap[version]}`}>/</span>)(
|
|
22
35
|
breadcrumbs.map((breadcrumb, i) => (
|
|
23
36
|
<Breadcrumb
|
|
24
37
|
key={String(i)}
|
|
25
38
|
{...useLink(
|
|
26
39
|
{ router, handlerDecorator },
|
|
27
|
-
{ className:
|
|
40
|
+
{ className: breadcrumbsStyleMap[version], ...breadcrumb },
|
|
28
41
|
)}
|
|
29
42
|
/>
|
|
30
43
|
)),
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
+
import type { TitleSize } from '../../ui-kit/Title/TitleProps';
|
|
2
3
|
import type { BaseTileCommonProps } from '../BaseTile/BaseTileProps';
|
|
3
4
|
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
4
5
|
|
|
5
|
-
export interface ProductBlockInnerCommonProps
|
|
6
|
-
|
|
6
|
+
export interface ProductBlockInnerCommonProps
|
|
7
|
+
extends Omit<BaseTileCommonProps, 'align' | 'titleSize'> {
|
|
8
|
+
/**
|
|
9
|
+
* @title Размер заголовка
|
|
10
|
+
* @default M
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
titleSize?: TitleSize;
|
|
14
|
+
/**
|
|
15
|
+
* @title Преимущества
|
|
16
|
+
* @minItems 2
|
|
17
|
+
* @maxItems 3
|
|
18
|
+
*/
|
|
7
19
|
benefits?: Benefit[];
|
|
8
20
|
}
|
|
9
21
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
3
4
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
5
|
import { Img } from '../../ui-kit/Img';
|
|
@@ -8,8 +9,32 @@ import type { ProductBlockInnerCommonProps } from './ProductBlockContent';
|
|
|
8
9
|
|
|
9
10
|
export interface ProductBlockInnerProps extends ProductBlockInnerCommonProps, UniBlockProps {}
|
|
10
11
|
|
|
12
|
+
const benefitIconBgStyleMap: Record<BlockVersion, string> = {
|
|
13
|
+
primary: 'bg-main',
|
|
14
|
+
secondary: 'bg-white/30',
|
|
15
|
+
};
|
|
16
|
+
const benefitTitleStyleMap: Record<BlockVersion, string> = {
|
|
17
|
+
primary: 'text-primary-text',
|
|
18
|
+
secondary: 'text-white',
|
|
19
|
+
};
|
|
20
|
+
const benefitDescStyleMap: Record<BlockVersion, string> = {
|
|
21
|
+
primary: 'text-secondary-text',
|
|
22
|
+
secondary: 'text-white',
|
|
23
|
+
};
|
|
24
|
+
|
|
11
25
|
export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
12
|
-
({
|
|
26
|
+
({
|
|
27
|
+
className,
|
|
28
|
+
context,
|
|
29
|
+
title,
|
|
30
|
+
titleSize,
|
|
31
|
+
description,
|
|
32
|
+
benefits,
|
|
33
|
+
buttons,
|
|
34
|
+
image,
|
|
35
|
+
items,
|
|
36
|
+
version = 'primary',
|
|
37
|
+
}) => {
|
|
13
38
|
return (
|
|
14
39
|
<div className={`flex grow justify-between items-stretch ${className || ''}`}>
|
|
15
40
|
<div className={'flex flex-col'}>
|
|
@@ -20,9 +45,12 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
20
45
|
description={description}
|
|
21
46
|
items={items}
|
|
22
47
|
buttons={buttons}
|
|
48
|
+
version={version}
|
|
23
49
|
>
|
|
24
50
|
{benefits?.length ? (
|
|
25
|
-
<div className="flex gap-6 mt-6 mb-3.5">
|
|
51
|
+
<div className="flex gap-6 mt-6 mb-3.5">
|
|
52
|
+
{benefits.map((_, i) => renderBenefit(_, i, version))}
|
|
53
|
+
</div>
|
|
26
54
|
) : null}
|
|
27
55
|
</BaseTile>
|
|
28
56
|
</div>
|
|
@@ -32,21 +60,25 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
32
60
|
},
|
|
33
61
|
);
|
|
34
62
|
|
|
35
|
-
function renderBenefit(benefit: Benefit, i: number) {
|
|
63
|
+
function renderBenefit(benefit: Benefit, i: number, version: string) {
|
|
36
64
|
return (
|
|
37
65
|
<div key={String(i)} className="flex gap-4 items-center">
|
|
38
66
|
{benefit.icon && (
|
|
39
67
|
<Icon
|
|
40
|
-
className=
|
|
68
|
+
className={`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${benefitIconBgStyleMap[version]}`}
|
|
41
69
|
name={benefit.icon}
|
|
42
70
|
width="24"
|
|
43
71
|
height="24"
|
|
44
72
|
/>
|
|
45
73
|
)}
|
|
46
|
-
<div className="flex gap-1 flex-col h-full">
|
|
47
|
-
<h4 className=
|
|
74
|
+
<div className="flex gap-1 flex-col h-full max-w-[149px]">
|
|
75
|
+
<h4 className={`font-medium text-xl m-0 ${benefitTitleStyleMap[version]}`}>
|
|
76
|
+
{benefit.label}
|
|
77
|
+
</h4>
|
|
48
78
|
{benefit.description && (
|
|
49
|
-
<div className=
|
|
79
|
+
<div className={`font-normal text-sm ${benefitDescStyleMap[version]}`}>
|
|
80
|
+
{benefit.description}
|
|
81
|
+
</div>
|
|
50
82
|
)}
|
|
51
83
|
</div>
|
|
52
84
|
</div>
|