@redneckz/wildless-cms-uni-blocks 0.3.68 → 0.3.70
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 +108 -41
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/ArrowDownIcon.svg +1 -1
- package/cosmos-static/icons/ArrowUpIcon.svg +1 -1
- package/cosmos-static/icons/DoneIcon.svg +1 -0
- package/cosmos-static/icons/GridIcon.svg +1 -1
- package/dist/components/BlockContent.d.ts +3 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +5 -4
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +2 -3
- package/dist/components/Header/HeaderSecondaryMenu.js +4 -4
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +1 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Insurance/Insurance.js +4 -6
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +2 -5
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +51 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/dist/components/ProductBlock/renderBackwardButton.js +3 -1
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/icons/IconName.d.ts +5 -15
- package/dist/icons/IconName.js +3 -13
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/IconVersion.d.ts +3 -2
- package/dist/model/Insurance.d.ts +6 -0
- package/dist/model/Insurance.js +2 -0
- package/dist/model/Insurance.js.map +1 -0
- package/dist/model/Picture.d.ts +0 -1
- package/dist/ui-kit/Button/ArrowButton.js +1 -1
- package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +7 -3
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +1 -0
- package/dist/ui-kit/Img/Img.js +1 -1
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +3 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +5 -4
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +2 -3
- package/lib/components/Header/HeaderSecondaryMenu.js +4 -4
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +1 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Insurance/Insurance.js +4 -6
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +2 -5
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts +4 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +49 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/lib/components/ProductBlock/renderBackwardButton.js +3 -1
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/icons/IconName.d.ts +5 -15
- package/lib/icons/IconName.js +3 -13
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/IconVersion.d.ts +3 -2
- package/lib/model/Insurance.d.ts +6 -0
- package/lib/model/Insurance.js +2 -0
- package/lib/model/Insurance.js.map +1 -0
- package/lib/model/Picture.d.ts +0 -1
- package/lib/ui-kit/Button/ArrowButton.js +1 -1
- package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.fixture.d.ts +2 -0
- package/lib/ui-kit/Icon/Icon.js +7 -3
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +1 -0
- package/lib/ui-kit/Img/Img.js +1 -1
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +16 -21
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BlockContent.d.ts +3 -1
- package/mobile/dist/components/Footer/MediaButton.js +5 -4
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +2 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +4 -4
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +1 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js +4 -6
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +2 -5
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +51 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +3 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +5 -15
- package/mobile/dist/icons/IconName.js +3 -13
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/IconVersion.d.ts +3 -2
- package/mobile/dist/model/Insurance.d.ts +6 -0
- package/mobile/dist/model/Insurance.js +2 -0
- package/mobile/dist/model/Insurance.js.map +1 -0
- package/mobile/dist/model/Picture.d.ts +0 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +7 -3
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/IconProps.d.ts +1 -0
- package/mobile/lib/components/BlockContent.d.ts +3 -1
- package/mobile/lib/components/Footer/MediaButton.js +5 -4
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +2 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +4 -4
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +1 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js +4 -6
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +2 -5
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +49 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +3 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +5 -15
- package/mobile/lib/icons/IconName.js +3 -13
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/IconVersion.d.ts +3 -2
- package/mobile/lib/model/Insurance.d.ts +6 -0
- package/mobile/lib/model/Insurance.js +2 -0
- package/mobile/lib/model/Insurance.js.map +1 -0
- package/mobile/lib/model/Picture.d.ts +0 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.js +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +7 -3
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/IconProps.d.ts +1 -0
- package/mobile/src/components/BlockContent.ts +5 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +50 -1
- package/mobile/src/components/Footer/MediaButton.tsx +17 -5
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +2 -3
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +14 -6
- package/mobile/src/components/Header/HeaderTop.tsx +1 -1
- package/mobile/src/components/Insurance/Insurance.example.json +21 -0
- package/mobile/src/components/Insurance/Insurance.tsx +10 -9
- package/mobile/src/components/Insurance/InsuranceContent.ts +9 -11
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +157 -0
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +4 -1
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/icons/ArrowDownIcon.svg +2 -2
- package/mobile/src/icons/ArrowUpIcon.svg +2 -2
- package/mobile/src/icons/DoneIcon.svg +4 -0
- package/mobile/src/icons/GridIcon.svg +2 -3
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/model/IconVersion.ts +3 -2
- package/mobile/src/model/Insurance.ts +6 -0
- package/mobile/src/model/Picture.ts +0 -1
- package/mobile/src/ui-kit/Button/ArrowButton.tsx +1 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/mobile/src/ui-kit/Icon/Icon.tsx +14 -3
- package/mobile/src/ui-kit/Icon/IconProps.ts +1 -0
- package/package.json +2 -2
- package/src/components/BlockContent.ts +5 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +50 -1
- package/src/components/Footer/MediaButton.tsx +17 -5
- package/src/components/GracePeriod/GracePeriodContent.ts +2 -3
- package/src/components/Header/HeaderSecondaryMenu.tsx +14 -6
- package/src/components/Header/HeaderTop.tsx +1 -1
- package/src/components/Insurance/Insurance.example.json +21 -0
- package/src/components/Insurance/Insurance.fixture.tsx +5 -4
- package/src/components/Insurance/Insurance.tsx +10 -9
- package/src/components/Insurance/InsuranceContent.ts +9 -11
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +52 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +157 -0
- package/src/components/ProductBlock/renderBackwardButton.tsx +4 -1
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +3 -3
- package/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/src/icons/ArrowDownIcon.svg +2 -2
- package/src/icons/ArrowUpIcon.svg +2 -2
- package/src/icons/DoneIcon.svg +4 -0
- package/src/icons/GridIcon.svg +2 -3
- package/src/icons/IconName.ts +240 -5
- package/src/model/IconVersion.ts +3 -2
- package/src/model/Insurance.ts +6 -0
- package/src/model/Picture.ts +0 -1
- package/src/ui-kit/Button/ArrowButton.tsx +1 -1
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/src/ui-kit/Icon/Icon.fixture.tsx +24 -0
- package/src/ui-kit/Icon/Icon.tsx +14 -3
- package/src/ui-kit/Icon/IconProps.ts +1 -0
- package/src/ui-kit/Img/Img.tsx +2 -1
- package/cosmos-static/icons/ArrowsRewindRight.svg +0 -1
- package/cosmos-static/icons/BurgerIconWhite.svg +0 -1
- package/cosmos-static/icons/CalendarWhiteIcon.svg +0 -1
- package/cosmos-static/icons/EmptyWalletWhiteIcon.svg +0 -1
- package/cosmos-static/icons/GridIconWhite.svg +0 -1
- package/cosmos-static/icons/PercentageSquareWhiteIcon.svg +0 -1
- package/mobile/src/components/Insurance/Insuranse.example.json +0 -36
- package/mobile/src/icons/ArrowsRewindRight.svg +0 -16
- package/mobile/src/icons/BurgerIconWhite.svg +0 -6
- package/mobile/src/icons/CalendarWhiteIcon.svg +0 -17
- package/mobile/src/icons/EmptyWalletWhiteIcon.svg +0 -16
- package/mobile/src/icons/GridIconWhite.svg +0 -4
- package/mobile/src/icons/PercentageSquareWhiteIcon.svg +0 -16
- package/src/components/Insurance/Insuranse.example.json +0 -36
- package/src/icons/ArrowsRewindRight.svg +0 -16
- package/src/icons/BurgerIconWhite.svg +0 -6
- package/src/icons/CalendarWhiteIcon.svg +0 -17
- package/src/icons/EmptyWalletWhiteIcon.svg +0 -16
- package/src/icons/GridIconWhite.svg +0 -4
- package/src/icons/PercentageSquareWhiteIcon.svg +0 -16
|
@@ -52,7 +52,7 @@ interface MediaButtonProps {
|
|
|
52
52
|
version?: BlockVersion;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export const MediaButton = JSX<MediaButtonProps>(({ href, version }) => {
|
|
55
|
+
export const MediaButton = JSX<MediaButtonProps>(({ href, version = 'primary' }) => {
|
|
56
56
|
const { icon, width, height, label } =
|
|
57
57
|
ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
58
58
|
|
|
@@ -60,18 +60,30 @@ export const MediaButton = JSX<MediaButtonProps>(({ href, version }) => {
|
|
|
60
60
|
|
|
61
61
|
const classes =
|
|
62
62
|
version === 'secondary'
|
|
63
|
-
? '
|
|
64
|
-
: '
|
|
63
|
+
? 'bg-secondary-light hover:bg-secondary-hover'
|
|
64
|
+
: 'border-main-divider border-solid border-[1px] hover:bg-primary-main';
|
|
65
|
+
|
|
66
|
+
const isPrimary = version === 'primary';
|
|
65
67
|
|
|
66
68
|
return (
|
|
67
69
|
<a
|
|
68
|
-
className={`
|
|
70
|
+
className={`flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${
|
|
71
|
+
isPrimary ? 'hover:text-black' : ''
|
|
72
|
+
}`}
|
|
69
73
|
href={href}
|
|
70
74
|
aria-label={label}
|
|
71
75
|
target="_blank"
|
|
72
76
|
rel="noopener noreferrer"
|
|
73
77
|
>
|
|
74
|
-
{icon ?
|
|
78
|
+
{icon ? (
|
|
79
|
+
<Img
|
|
80
|
+
image={{ ...icon, iconVersion: 'normal' }}
|
|
81
|
+
imageClassName={isPrimary ? 'group-hover:text-white' : ''}
|
|
82
|
+
width={width}
|
|
83
|
+
height={height}
|
|
84
|
+
asSVG
|
|
85
|
+
/>
|
|
86
|
+
) : null}
|
|
75
87
|
</a>
|
|
76
88
|
);
|
|
77
89
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
3
|
|
|
3
4
|
interface Month {
|
|
4
5
|
/** @title Название месяца */
|
|
@@ -29,9 +30,7 @@ interface CalendarItem {
|
|
|
29
30
|
/**
|
|
30
31
|
* @title Льготный период
|
|
31
32
|
*/
|
|
32
|
-
export interface GracePeriodContent {
|
|
33
|
-
/** @title Заголовок */
|
|
34
|
-
title?: string;
|
|
33
|
+
export interface GracePeriodContent extends HeadingContent {
|
|
35
34
|
/** @title Описание */
|
|
36
35
|
description?: string;
|
|
37
36
|
/** @title Календарь */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IconVersion } from '../../model/IconVersion';
|
|
3
3
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
4
4
|
import type { UniBlockProps } from '../../types';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
@@ -21,9 +21,9 @@ const LINKS_COLORS_MAP: Record<BgColorVersion, string> = {
|
|
|
21
21
|
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
22
22
|
transparent: 'text-white',
|
|
23
23
|
};
|
|
24
|
-
const
|
|
25
|
-
'bg-white': '
|
|
26
|
-
transparent: '
|
|
24
|
+
const LINKS_ICON_VERSION_MAP: Record<BgColorVersion, IconVersion> = {
|
|
25
|
+
'bg-white': 'black',
|
|
26
|
+
transparent: 'white',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
@@ -52,13 +52,21 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
52
52
|
className={`mr-5 ${COLORS_MAP[bgColor]}`}
|
|
53
53
|
ariaLabel="Поиск по сайту"
|
|
54
54
|
>
|
|
55
|
-
<Img
|
|
55
|
+
<Img
|
|
56
|
+
image={{ icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }}
|
|
57
|
+
className="h-full"
|
|
58
|
+
asSVG
|
|
59
|
+
/>
|
|
56
60
|
</HeaderSecondaryMenuButton>
|
|
57
61
|
<HeaderSecondaryMenuButton
|
|
58
62
|
className={`${LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`}
|
|
59
63
|
ariaLabel="Дополнительные ссылки"
|
|
60
64
|
>
|
|
61
|
-
<Img
|
|
65
|
+
<Img
|
|
66
|
+
image={{ icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }}
|
|
67
|
+
className="h-full bg-secondary-light rounded-full"
|
|
68
|
+
asSVG
|
|
69
|
+
/>
|
|
62
70
|
</HeaderSecondaryMenuButton>
|
|
63
71
|
</div>
|
|
64
72
|
);
|
|
@@ -16,7 +16,7 @@ export const HeaderTop = JSX<HeaderTopProps>(({ onClick, bgColor }) => (
|
|
|
16
16
|
aria-label="Открыть меню"
|
|
17
17
|
>
|
|
18
18
|
<Img
|
|
19
|
-
image={bgColor === 'bg-white' ? '
|
|
19
|
+
image={{ icon: 'BurgerIcon', iconVersion: bgColor === 'bg-white' ? 'black' : 'white' }}
|
|
20
20
|
className="text-primary-text"
|
|
21
21
|
width="24"
|
|
22
22
|
height="24"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Заголовок",
|
|
3
|
+
"description": "Описание",
|
|
4
|
+
"insurance": 500000,
|
|
5
|
+
"benefits": [
|
|
6
|
+
{
|
|
7
|
+
"label": "Заголовок 1",
|
|
8
|
+
"description": "Описание 1",
|
|
9
|
+
"icon": {
|
|
10
|
+
"icon": "ShieldTickIcon"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"label": "Заголовок 2",
|
|
15
|
+
"description": "Описание 2",
|
|
16
|
+
"icon": {
|
|
17
|
+
"icon": "ShieldTickIcon"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../setup-fixture';
|
|
3
3
|
import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
4
|
-
import {
|
|
4
|
+
import { Insurance } from './Insurance';
|
|
5
5
|
|
|
6
6
|
const benefits: Benefit[] = [
|
|
7
7
|
{
|
|
8
8
|
label: 'Телесное повреждение',
|
|
9
|
+
description: 'Описание',
|
|
9
10
|
icon: { icon: 'ShieldTickIcon' },
|
|
10
11
|
},
|
|
11
12
|
{
|
|
@@ -48,7 +49,7 @@ export default {
|
|
|
48
49
|
description="Покрываемые риски программы «Защита вас и ваших близких»"
|
|
49
50
|
benefits={benefits}
|
|
50
51
|
image={image}
|
|
51
|
-
|
|
52
|
+
sum={500000}
|
|
52
53
|
/>
|
|
53
54
|
<Insurance
|
|
54
55
|
context={context}
|
|
@@ -57,7 +58,7 @@ export default {
|
|
|
57
58
|
description="Покрываемые риски программы «Защита вас и ваших близких»"
|
|
58
59
|
benefits={benefits}
|
|
59
60
|
image={image}
|
|
60
|
-
|
|
61
|
+
sum={500000}
|
|
61
62
|
monthLimit={25000}
|
|
62
63
|
/>
|
|
63
64
|
</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
4
|
-
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
5
3
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
4
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
5
|
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
6
|
+
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
7
|
+
import type { InsuranceContent } from './InsuranceContent';
|
|
8
8
|
|
|
9
9
|
export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
|
|
10
10
|
|
|
11
11
|
export const Insurance = JSX<InsuranceProps>(
|
|
12
|
-
({ className = '', title, description, image, benefits,
|
|
12
|
+
({ className = '', title, description, image, benefits, sum, monthLimit }) => {
|
|
13
13
|
return (
|
|
14
14
|
<section className={`px-[100px] py-[50px] bg-white text-primary-text ${className}`}>
|
|
15
15
|
{title ? <Heading headingType="h3" title={title} className="text-center" /> : null}
|
|
@@ -23,11 +23,9 @@ export const Insurance = JSX<InsuranceProps>(
|
|
|
23
23
|
) : null}
|
|
24
24
|
|
|
25
25
|
<div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
|
|
26
|
-
{
|
|
27
|
-
? renderValueBlock('Страховая сумма:', insuranceSum, Boolean(monthLimit))
|
|
28
|
-
: null}
|
|
26
|
+
{sum ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
|
|
29
27
|
{monthLimit
|
|
30
|
-
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(
|
|
28
|
+
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
31
29
|
: null}
|
|
32
30
|
</div>
|
|
33
31
|
</div>
|
|
@@ -50,8 +48,11 @@ function renderBenefit(benefit: Benefit, i: number) {
|
|
|
50
48
|
asSVG
|
|
51
49
|
/>
|
|
52
50
|
) : null}
|
|
53
|
-
<div
|
|
54
|
-
<div className="text-title-2xs">{benefit.label}</div>
|
|
51
|
+
<div>
|
|
52
|
+
{benefit?.label ? <div className="text-title-2xs">{benefit.label}</div> : null}
|
|
53
|
+
{benefit?.description ? (
|
|
54
|
+
<div className="mt-2 font-light text-secondary-text">{benefit.description}</div>
|
|
55
|
+
) : null}
|
|
55
56
|
</div>
|
|
56
57
|
</div>
|
|
57
58
|
);
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import type { BenefitsBlockContent } from '../BenefitsBlock/BenefitsBlockContent';
|
|
3
|
+
import type { InsuranceProps } from '../../model/Insurance';
|
|
3
4
|
|
|
4
|
-
export type InsuranceContent = BenefitsBlockContent &
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
insuranceSum?: number;
|
|
13
|
-
image?: Picture;
|
|
14
|
-
};
|
|
5
|
+
export type InsuranceContent = BenefitsBlockContent &
|
|
6
|
+
InsuranceProps & {
|
|
7
|
+
/** @title Заголовок */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** @title Описание */
|
|
10
|
+
description?: string;
|
|
11
|
+
image?: Picture;
|
|
12
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Заголовок",
|
|
3
|
+
"button": {
|
|
4
|
+
"href": "https://rshb.ru",
|
|
5
|
+
"text": "Текст кнопки"
|
|
6
|
+
},
|
|
7
|
+
"insuranceTabs": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Описание",
|
|
10
|
+
"card": [
|
|
11
|
+
{
|
|
12
|
+
"sum": 200000,
|
|
13
|
+
"fee": 2100,
|
|
14
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"sum": 200000,
|
|
18
|
+
"fee": 2100,
|
|
19
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "Описание",
|
|
25
|
+
"card": [
|
|
26
|
+
{
|
|
27
|
+
"sum": 200000,
|
|
28
|
+
"fee": 2100,
|
|
29
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"sum": 200000,
|
|
33
|
+
"fee": 2100,
|
|
34
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"sum": 200000,
|
|
38
|
+
"fee": 2100,
|
|
39
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
import { InsuranceAmountBlock } from './InsuranceAmountBlock';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
default: (
|
|
6
|
+
<div className="container grid grid-cols-12">
|
|
7
|
+
<InsuranceAmountBlock
|
|
8
|
+
className="col-span-12"
|
|
9
|
+
context={context}
|
|
10
|
+
title="Выбор страховой суммы"
|
|
11
|
+
button={{ href: 'https://rshb.ru', text: 'Выбрать программу' }}
|
|
12
|
+
insuranceTabs={[
|
|
13
|
+
{
|
|
14
|
+
title: 'Индивидуальный',
|
|
15
|
+
cards: [
|
|
16
|
+
{
|
|
17
|
+
sum: 200000,
|
|
18
|
+
fee: 2100,
|
|
19
|
+
icon: { icon: 'ActualBalanceIcon' },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
sum: 200000,
|
|
23
|
+
fee: 2100,
|
|
24
|
+
icon: { icon: 'ActualBalanceIcon' },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
sum: 200000,
|
|
28
|
+
fee: 2100,
|
|
29
|
+
icon: { icon: 'ActualBalanceIcon' },
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: 'Семейный',
|
|
35
|
+
cards: [
|
|
36
|
+
{
|
|
37
|
+
sum: 400000,
|
|
38
|
+
fee: 3600,
|
|
39
|
+
icon: { icon: 'ActualBalanceIcon' },
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
sum: 600000,
|
|
43
|
+
fee: 3600,
|
|
44
|
+
icon: { icon: 'MoneyInsuranceIcon' },
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
]}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
),
|
|
52
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { InsuranceAmountBlockContent } from './InsuranceAmountBlockContent';
|
|
4
|
+
import { InsuranceAmountBlockInner } from './InsuranceAmountBlockInner';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
7
|
+
|
|
8
|
+
export interface InsuranceAmountBlockProps extends InsuranceAmountBlockContent, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
export const InsuranceAmountBlock = JSX<InsuranceAmountBlockProps>(
|
|
11
|
+
({ className = '', context, title, insuranceTabs = [], button, anchor = null }) => {
|
|
12
|
+
const insuranceGalleries = insuranceTabs.map((_) => _.cards);
|
|
13
|
+
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<section
|
|
17
|
+
id={anchor}
|
|
18
|
+
className={`box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`}
|
|
19
|
+
>
|
|
20
|
+
{title ? <Heading className="text-center" title={title} headingType="h3" /> : null}
|
|
21
|
+
<div className="p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]">
|
|
22
|
+
{insuranceTabs.map((item, i) =>
|
|
23
|
+
renderNavButton({
|
|
24
|
+
title: item?.title,
|
|
25
|
+
i,
|
|
26
|
+
activeSlideIndex,
|
|
27
|
+
onClick: () => setActiveSlideIndex(i),
|
|
28
|
+
}),
|
|
29
|
+
)}
|
|
30
|
+
</div>
|
|
31
|
+
<div
|
|
32
|
+
className="flex"
|
|
33
|
+
style={{ transform: `translateX(-${activeSlideIndex}00%)` }}
|
|
34
|
+
role="list"
|
|
35
|
+
>
|
|
36
|
+
{renderInsuranceGalleries({
|
|
37
|
+
context,
|
|
38
|
+
className,
|
|
39
|
+
insuranceGalleries,
|
|
40
|
+
})}
|
|
41
|
+
</div>
|
|
42
|
+
{button?.text ? (
|
|
43
|
+
<div className="flex justify-center">
|
|
44
|
+
<Button
|
|
45
|
+
className="box-border p-4 h-14 w-full max-w-[240px]"
|
|
46
|
+
version={button?.version || 'primary'}
|
|
47
|
+
href={button.href}
|
|
48
|
+
>
|
|
49
|
+
{button.text}
|
|
50
|
+
</Button>
|
|
51
|
+
</div>
|
|
52
|
+
) : null}
|
|
53
|
+
</section>
|
|
54
|
+
);
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const renderInsuranceGalleries = ({ insuranceGalleries, context, className }: any) => {
|
|
59
|
+
return insuranceGalleries?.length
|
|
60
|
+
? insuranceGalleries.map((cards) => (
|
|
61
|
+
<InsuranceAmountBlockInner context={context} className={className} cards={cards} />
|
|
62
|
+
))
|
|
63
|
+
: null;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function renderNavButton({ title, i, activeSlideIndex, onClick }) {
|
|
67
|
+
const isActiveBtn = i === activeSlideIndex;
|
|
68
|
+
|
|
69
|
+
const btnClassName = isActiveBtn
|
|
70
|
+
? 'bg-primary-main text-white rounded-md'
|
|
71
|
+
: `text-secondary-text`;
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<button
|
|
75
|
+
type="button"
|
|
76
|
+
key={String(i)}
|
|
77
|
+
onClick={onClick}
|
|
78
|
+
aria-label={title}
|
|
79
|
+
className={`box-border px-4 py-3 text-m-md ${btnClassName}`}
|
|
80
|
+
>
|
|
81
|
+
{title}
|
|
82
|
+
</button>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import type { InsuranceProps } from '../../model/Insurance';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title Кнопка выбора программы
|
|
7
|
+
*/
|
|
8
|
+
export type cardItem = InsuranceProps & {
|
|
9
|
+
icon?: Picture;
|
|
10
|
+
/** @title Страховой взнос */
|
|
11
|
+
fee?: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @title Вкладка
|
|
16
|
+
*/
|
|
17
|
+
export interface InsuranceAmountBlockTabs {
|
|
18
|
+
/** @title Заголовок вкладки */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** @title Содержимое вкладки */
|
|
21
|
+
cards?: cardItem[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @title Страховые суммы
|
|
26
|
+
*/
|
|
27
|
+
export interface InsuranceAmountBlockContent {
|
|
28
|
+
/** @title Заголовок */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** @title Список вкладок */
|
|
31
|
+
insuranceTabs?: InsuranceAmountBlockTabs[];
|
|
32
|
+
button?: ButtonProps;
|
|
33
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps, FuncReturnVoid } from '../../types';
|
|
3
|
+
import type { InsuranceAmountBlockTabs, cardItem } from './InsuranceAmountBlockContent';
|
|
4
|
+
import { ArrowButton } from '../../ui-kit/Button/ArrowButton';
|
|
5
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
6
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
7
|
+
|
|
8
|
+
export interface InsuranceAmountBlockInnerProps extends InsuranceAmountBlockTabs, UniBlockProps {}
|
|
9
|
+
|
|
10
|
+
type InsuranceGalleryProps = {
|
|
11
|
+
tabsShift: number;
|
|
12
|
+
cards: cardItem[];
|
|
13
|
+
activeSlideIndex: number;
|
|
14
|
+
isLastShift: boolean;
|
|
15
|
+
setActiveSlideIndex: FuncReturnVoid<number>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type InsuranceSlideProps = {
|
|
19
|
+
slide: cardItem;
|
|
20
|
+
i: number;
|
|
21
|
+
activeSlideIndex: number;
|
|
22
|
+
onClick: FuncReturnVoid<MouseEvent>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const arrowBtnStyle =
|
|
26
|
+
'absolute w-12 h-12 min-h-12 max-h-12 top-1 z-10 mt-[25px] bg-white rounded-full text-primary-text';
|
|
27
|
+
|
|
28
|
+
export const InsuranceAmountBlockInner = JSX<InsuranceAmountBlockInnerProps>(
|
|
29
|
+
({ className = '', context, cards = [], anchor = null }) => {
|
|
30
|
+
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
31
|
+
const [tabsShift, setTabsShift] = context.useState(0);
|
|
32
|
+
|
|
33
|
+
const handleNextClick = () => setTabsShift(tabsShift + 1);
|
|
34
|
+
const handlePrevClick = () => setTabsShift(tabsShift - 1);
|
|
35
|
+
|
|
36
|
+
const galleryLength = cards?.length;
|
|
37
|
+
|
|
38
|
+
const isGalleryScrollAvailable = cards?.length > 2;
|
|
39
|
+
const showNextButton = isGalleryScrollAvailable && galleryLength > tabsShift + 2;
|
|
40
|
+
const isLastShift = galleryLength === tabsShift + 2;
|
|
41
|
+
const showPrevButton = tabsShift > 0;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<section id={anchor} className={`min-w-full ${className}`}>
|
|
45
|
+
<div className="relative mt-7 overflow-hidden">
|
|
46
|
+
{galleryLength > 1
|
|
47
|
+
? renderGallery({
|
|
48
|
+
tabsShift,
|
|
49
|
+
cards,
|
|
50
|
+
activeSlideIndex,
|
|
51
|
+
isLastShift,
|
|
52
|
+
setActiveSlideIndex,
|
|
53
|
+
})
|
|
54
|
+
: null}
|
|
55
|
+
{showPrevButton ? (
|
|
56
|
+
<div>
|
|
57
|
+
<ArrowButton
|
|
58
|
+
className={`${arrowBtnStyle} left-0 top-9`}
|
|
59
|
+
onClick={handlePrevClick}
|
|
60
|
+
ariaLabel="Пролистать влево"
|
|
61
|
+
data-block-control="scroll-left"
|
|
62
|
+
/>
|
|
63
|
+
<div className="absolute top-0 left-0 h-[168px] w-[84px] bg-opacity-from-white" />
|
|
64
|
+
</div>
|
|
65
|
+
) : null}
|
|
66
|
+
{showNextButton ? (
|
|
67
|
+
<div>
|
|
68
|
+
<ArrowButton
|
|
69
|
+
className={`${arrowBtnStyle} right-0 top-9 rotate-180`}
|
|
70
|
+
onClick={handleNextClick}
|
|
71
|
+
ariaLabel="Пролистать вправо"
|
|
72
|
+
data-block-control="scroll-right"
|
|
73
|
+
/>
|
|
74
|
+
<div className="absolute top-0 right-0 h-[168px] w-[100px] bg-opacity-to-white" />
|
|
75
|
+
</div>
|
|
76
|
+
) : null}
|
|
77
|
+
</div>
|
|
78
|
+
</section>
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
function renderGallery({
|
|
84
|
+
tabsShift,
|
|
85
|
+
cards,
|
|
86
|
+
activeSlideIndex,
|
|
87
|
+
isLastShift,
|
|
88
|
+
setActiveSlideIndex,
|
|
89
|
+
}: InsuranceGalleryProps) {
|
|
90
|
+
const tabsShiftWidth = isLastShift ? tabsShift * 460 - 240 : tabsShift * 460;
|
|
91
|
+
return (
|
|
92
|
+
<div style={{ transform: `translateX(-${tabsShiftWidth}px)` }} className="duration-1000">
|
|
93
|
+
<div className="w-full flex flex-nowrap gap-3.5 pb-[38px] px-[50px]">
|
|
94
|
+
{cards.map((slide, i) =>
|
|
95
|
+
renderSlide({
|
|
96
|
+
slide,
|
|
97
|
+
i,
|
|
98
|
+
activeSlideIndex,
|
|
99
|
+
onClick: () => setActiveSlideIndex(i),
|
|
100
|
+
}),
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function renderSlide({ slide, i, activeSlideIndex, onClick }: InsuranceSlideProps) {
|
|
108
|
+
const isActiveBtn = i === activeSlideIndex;
|
|
109
|
+
|
|
110
|
+
const btnClassName = isActiveBtn
|
|
111
|
+
? 'shadow-dark-blue/42 border-primary-main'
|
|
112
|
+
: `ease-in duration-300 border-main-stroke`;
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<button
|
|
116
|
+
type="button"
|
|
117
|
+
key={String(i)}
|
|
118
|
+
onClick={onClick}
|
|
119
|
+
className={`p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`}
|
|
120
|
+
>
|
|
121
|
+
{slide?.icon ? (
|
|
122
|
+
<Img
|
|
123
|
+
className={`h-[108px] w-[108px] p-3 rounded-full bg-secondary-light mr-[30px]`}
|
|
124
|
+
image={slide.icon}
|
|
125
|
+
width="24"
|
|
126
|
+
height="24"
|
|
127
|
+
/>
|
|
128
|
+
) : null}
|
|
129
|
+
|
|
130
|
+
<div className="flex gap-3.5">
|
|
131
|
+
{slide?.sum ? renderValueBlock('страховая сумма', slide.sum) : null}
|
|
132
|
+
{slide?.fee ? renderValueBlock('страховой взнос', slide.fee) : null}
|
|
133
|
+
</div>
|
|
134
|
+
{renderDoneIcon(isActiveBtn)}
|
|
135
|
+
</button>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function renderValueBlock(title, sum) {
|
|
140
|
+
return (
|
|
141
|
+
<div className="flex flex-col text-left">
|
|
142
|
+
<span className="whitespace-pre text-title-2xs">{addSpacesBetweenNumbers(sum)} ₽</span>
|
|
143
|
+
<span className="whitespace-pre text-secondary-text font-light text-base mt-1">{title}</span>
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function renderDoneIcon(isActive) {
|
|
149
|
+
return isActive ? (
|
|
150
|
+
<Img
|
|
151
|
+
className={`h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4`}
|
|
152
|
+
image="DoneIcon"
|
|
153
|
+
width="24"
|
|
154
|
+
height="24"
|
|
155
|
+
/>
|
|
156
|
+
) : null;
|
|
157
|
+
}
|
|
@@ -8,6 +8,9 @@ export function renderBackwardButton(
|
|
|
8
8
|
version: BlockVersion,
|
|
9
9
|
className: string,
|
|
10
10
|
) {
|
|
11
|
+
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
12
|
+
const backwardIcon = button?.icon || { icon: 'ArrowLeftIcon' };
|
|
13
|
+
|
|
11
14
|
return (
|
|
12
15
|
<div className={`flex items-center ${className}`}>
|
|
13
16
|
<Button
|
|
@@ -17,7 +20,7 @@ export function renderBackwardButton(
|
|
|
17
20
|
ariaLabel={button?.text}
|
|
18
21
|
href={button?.href}
|
|
19
22
|
>
|
|
20
|
-
<Img className="w-4 h-4" image={
|
|
23
|
+
<Img className="w-4 h-4" image={{ ...backwardIcon, iconVersion }} asSVG />
|
|
21
24
|
</Button>
|
|
22
25
|
{button?.text ? <span className="text-m-md font-light">{button.text}</span> : null}
|
|
23
26
|
</div>
|
|
@@ -17,7 +17,7 @@ export const RecommendationCard = JSX<RecommendationCardProps>(
|
|
|
17
17
|
({ context, className = '', title, description, items, image, version, socialMedia }) => {
|
|
18
18
|
return (
|
|
19
19
|
<section
|
|
20
|
-
className={`border border-solid box-border p-[30px] w-[524px] ${className}`}
|
|
20
|
+
className={`border border-solid box-border p-[30px] min-w-[524px] ${className}`}
|
|
21
21
|
role="listitem"
|
|
22
22
|
>
|
|
23
23
|
<BaseTile
|
|
@@ -43,19 +43,19 @@ export default {
|
|
|
43
43
|
label: 'В мобильном приложении или интернет-банке',
|
|
44
44
|
description: 'Для всех клиентов Россельхозбанка',
|
|
45
45
|
icon: { icon: 'SignDocsIcon' },
|
|
46
|
-
button: { text: 'Войти в интернет-банк' },
|
|
46
|
+
button: { text: 'Войти в интернет-банк', href: 'https://www.rshb.ru/' },
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
label: 'Через Госуслуги',
|
|
50
50
|
description: 'При наличии данных в Единой биометрической системе',
|
|
51
51
|
icon: { icon: 'ClockIcon' },
|
|
52
|
-
button: { text: 'Оформить' },
|
|
52
|
+
button: { text: 'Оформить', href: 'https://www.rshb.ru/' },
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
label: 'В офисах Россельхозбанка',
|
|
56
56
|
description: 'Откройте вклад',
|
|
57
57
|
icon: { icon: 'ComfortableCompIcon' },
|
|
58
|
-
button: { text: 'Офисы на карте' },
|
|
58
|
+
button: { text: 'Офисы на карте', href: 'https://www.rshb.ru/' },
|
|
59
59
|
},
|
|
60
60
|
]}
|
|
61
61
|
/>
|