@redneckz/wildless-cms-uni-blocks 0.10.0 → 0.10.1
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/bin/migration-scripts/0.9.10.js +30 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +35 -25
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/FooterContent.d.ts +1 -1
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/bundle/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/bundle/components/ProductTile/renderImage.d.ts +1 -1
- package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/bundle/components/Tile/TileContent.d.ts +2 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +1 -1
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -3
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +4 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/dist/components/ProductTile/renderImage.d.ts +1 -1
- package/dist/components/ProductTile/renderImage.js +3 -2
- package/dist/components/ProductTile/renderImage.js.map +1 -1
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +22 -0
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
- package/dist/components/Tile/Tile.js +5 -4
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/Tile/TileContent.d.ts +2 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +0 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -3
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +4 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/lib/components/ProductTile/renderImage.d.ts +1 -1
- package/lib/components/ProductTile/renderImage.js +3 -2
- package/lib/components/ProductTile/renderImage.js.map +1 -1
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.d.ts +6 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +20 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
- package/lib/components/Tile/Tile.fixture.d.ts +1 -0
- package/lib/components/Tile/Tile.js +5 -4
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/Tile/TileContent.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +2 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/FooterContent.d.ts +1 -1
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/mobile/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/mobile/bundle/components/ProductTile/renderImage.d.ts +1 -1
- package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/mobile/bundle/components/Tile/TileContent.d.ts +2 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/Footer/FooterContent.d.ts +1 -1
- package/mobile/dist/components/Headline/Headline.js +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +4 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/mobile/dist/components/ProductTile/renderImage.d.ts +1 -1
- package/mobile/dist/components/ProductTile/renderImage.js +3 -2
- package/mobile/dist/components/ProductTile/renderImage.js.map +1 -1
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +22 -0
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
- package/mobile/dist/components/Tile/Tile.js +5 -4
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +2 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/Footer/FooterContent.d.ts +1 -1
- package/mobile/lib/components/Headline/Headline.js +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -2
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +4 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/mobile/lib/components/ProductTile/renderImage.d.ts +1 -1
- package/mobile/lib/components/ProductTile/renderImage.js +3 -2
- package/mobile/lib/components/ProductTile/renderImage.js.map +1 -1
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.d.ts +5 -0
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +20 -0
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -0
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +18 -0
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js +2 -0
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.js.map +1 -0
- package/mobile/lib/components/Tile/Tile.js +5 -4
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +2 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +4 -2
- package/mobile/src/components/Footer/FooterContent.ts +1 -1
- package/mobile/src/components/Headline/Headline.tsx +1 -5
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +0 -2
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +1 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +11 -6
- package/mobile/src/components/ProductTile/ProductTileContent.ts +1 -1
- package/mobile/src/components/ProductTile/renderImage.tsx +3 -2
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +10 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +82 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +20 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +22 -0
- package/mobile/src/components/Tile/Tile.example.json +2 -1
- package/mobile/src/components/Tile/Tile.tsx +26 -17
- package/mobile/src/components/Tile/TileContent.ts +2 -0
- package/package.json +2 -2
- package/src/components/Blocks.ts +2 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +4 -2
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Headline/Headline.tsx +1 -5
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +14 -22
- package/src/components/ProductBlock/ProductBlock.tsx +5 -6
- package/src/components/ProductBlock/ProductBlockContent.ts +0 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +21 -25
- package/src/components/ProductBlock/renderBackwardButton.tsx +1 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +6 -2
- package/src/components/ProductTile/ProductTile.tsx +11 -6
- package/src/components/ProductTile/ProductTileContent.ts +1 -1
- package/src/components/ProductTile/renderImage.tsx +3 -2
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +10 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +37 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +82 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +20 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +22 -0
- package/src/components/Tile/Tile.example.json +2 -1
- package/src/components/Tile/Tile.fixture.tsx +5 -0
- package/src/components/Tile/Tile.tsx +26 -17
- package/src/components/Tile/TileContent.ts +2 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
2
|
+
import type { IconProps } from '../../model/Picture';
|
|
3
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
4
|
+
import type { TitleProps } from '../../model/HeadlineType';
|
|
5
|
+
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @title Блок с информацией о представительстве
|
|
9
|
+
*/
|
|
10
|
+
export type RepresentativeOfficeInfoContent = UniBlockContent &
|
|
11
|
+
TitleProps &
|
|
12
|
+
RichTextProps &
|
|
13
|
+
IconProps & {
|
|
14
|
+
/** @title Адрес */
|
|
15
|
+
address?: string;
|
|
16
|
+
/** @title Телефон (факс) */
|
|
17
|
+
telephone?: string;
|
|
18
|
+
/** @title E-mail */
|
|
19
|
+
email?: string;
|
|
20
|
+
/** @title Кнопка */
|
|
21
|
+
button?: ButtonWithIconProps;
|
|
22
|
+
};
|
|
@@ -11,6 +11,7 @@ import { BaseTile } from '../BaseTile/BaseTile';
|
|
|
11
11
|
import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
|
|
12
12
|
import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
|
|
13
13
|
import type { TileContent } from './TileContent';
|
|
14
|
+
import { style } from '../../utils/style';
|
|
14
15
|
|
|
15
16
|
export interface TileProps extends TileContent, UniBlockProps {}
|
|
16
17
|
|
|
@@ -27,14 +28,21 @@ export const Tile = JSX<TileProps>(
|
|
|
27
28
|
className = '',
|
|
28
29
|
tags,
|
|
29
30
|
children,
|
|
31
|
+
directionRight = true,
|
|
30
32
|
...rest
|
|
31
33
|
}) => (
|
|
32
34
|
<BlockWrapper
|
|
33
|
-
className={
|
|
35
|
+
className={style(
|
|
36
|
+
'flex grow justify-between items-stretch h-full p-9 pr-3 box-border',
|
|
37
|
+
getTileRightPadding(className),
|
|
38
|
+
getTileMinHeight(className),
|
|
34
39
|
className,
|
|
35
|
-
)}
|
|
40
|
+
)}
|
|
36
41
|
{...rest}
|
|
37
42
|
>
|
|
43
|
+
{image?.src ? (
|
|
44
|
+
<Img className={style('mt-auto ml-7', directionRight ? 'order-2' : '')} image={image} />
|
|
45
|
+
) : null}
|
|
38
46
|
<BaseTile
|
|
39
47
|
title={
|
|
40
48
|
title ? (
|
|
@@ -50,22 +58,23 @@ export const Tile = JSX<TileProps>(
|
|
|
50
58
|
className: 'mt-8',
|
|
51
59
|
buttonClassName: 'min-w-[158px]',
|
|
52
60
|
})}
|
|
53
|
-
image={image?.src ? <Img className="mt-auto ml-7" image={image} /> : null}
|
|
54
61
|
>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
<div>
|
|
63
|
+
{__html ? (
|
|
64
|
+
<div className="max-w-[600px] mt-2.5">
|
|
65
|
+
<RichText __html={__html} />
|
|
66
|
+
</div>
|
|
67
|
+
) : null}
|
|
68
|
+
{children}
|
|
69
|
+
<List
|
|
70
|
+
className="mt-2.5"
|
|
71
|
+
itemClassName="mb-1.5"
|
|
72
|
+
items={items}
|
|
73
|
+
isDotted={isDotted}
|
|
74
|
+
listItemSize={listItemSize}
|
|
75
|
+
/>
|
|
76
|
+
{tags?.length ? <Tags tags={tags} className="mt-5" /> : null}
|
|
77
|
+
</div>
|
|
69
78
|
</BaseTile>
|
|
70
79
|
</BlockWrapper>
|
|
71
80
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"path": "lib/common.css"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
"limit": "
|
|
192
|
+
"limit": "55 kB",
|
|
193
193
|
"path": "bundle/bundle.umd.min.js"
|
|
194
194
|
}
|
|
195
195
|
],
|
package/src/components/Blocks.ts
CHANGED
|
@@ -55,6 +55,7 @@ import { TextBlock } from './TextBlock/TextBlock';
|
|
|
55
55
|
import { Tile } from './Tile/Tile';
|
|
56
56
|
import { VerticalLayout } from './VerticalLayout/VerticalLayout';
|
|
57
57
|
import { Video } from './Video/Video';
|
|
58
|
+
import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo/RepresentativeOfficeInfo';
|
|
58
59
|
|
|
59
60
|
export const Blocks: BlocksRegistry = {
|
|
60
61
|
ApplicationForm,
|
|
@@ -113,4 +114,5 @@ export const Blocks: BlocksRegistry = {
|
|
|
113
114
|
VerticalLayout,
|
|
114
115
|
Video,
|
|
115
116
|
ExchangeRateOffice,
|
|
117
|
+
RepresentativeOfficeInfo,
|
|
116
118
|
};
|
|
@@ -34,9 +34,11 @@ export const CarouselCatalogCard = JSX<CarouselCatalogCardProps>(
|
|
|
34
34
|
</div>
|
|
35
35
|
) : null}
|
|
36
36
|
{colors?.length ? (
|
|
37
|
-
<div className="flex mb-4 text-
|
|
37
|
+
<div className="flex mb-4 text-secondary-text">
|
|
38
38
|
<div className="mr-1.5">
|
|
39
|
-
<Text
|
|
39
|
+
<Text size="text-s" align="text-left" font="font-light">
|
|
40
|
+
Доступные цвета:
|
|
41
|
+
</Text>
|
|
40
42
|
</div>
|
|
41
43
|
{colors.map(renderColorOption)}
|
|
42
44
|
</div>
|
|
@@ -42,11 +42,7 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
42
42
|
/>
|
|
43
43
|
) : null}
|
|
44
44
|
{description ? (
|
|
45
|
-
<Paragraph
|
|
46
|
-
color="group-data-secondary:text-white/80"
|
|
47
|
-
size={versionStyle.descriptionSize as TextSize}
|
|
48
|
-
align={align}
|
|
49
|
-
>
|
|
45
|
+
<Paragraph size={versionStyle.descriptionSize as TextSize} align={align}>
|
|
50
46
|
{description}
|
|
51
47
|
</Paragraph>
|
|
52
48
|
) : null}
|
|
@@ -76,12 +76,24 @@ export const PRODUCT_BLOCK: ProductBlockContent = {
|
|
|
76
76
|
buttons: buttons,
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
+
const PRODUCT_BLOCK_WITH_BACK_BUTTON: ProductBlockContent = {
|
|
80
|
+
backwardButton,
|
|
81
|
+
headlineVersion: 'L',
|
|
82
|
+
title: 'Потребительский кредит наличными',
|
|
83
|
+
description:
|
|
84
|
+
'Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт.',
|
|
85
|
+
benefitsCountOfRow: 2,
|
|
86
|
+
benefits,
|
|
87
|
+
benefitsVersion: 'normal',
|
|
88
|
+
buttons,
|
|
89
|
+
image,
|
|
90
|
+
};
|
|
91
|
+
|
|
79
92
|
export default {
|
|
80
93
|
'primary with back button': (
|
|
81
94
|
<div className="container grid grid-cols-12">
|
|
82
95
|
<ProductBlock
|
|
83
96
|
className="col-span-12"
|
|
84
|
-
backwardButton={backwardButton}
|
|
85
97
|
headlineVersion="L"
|
|
86
98
|
title="Потребительский кредит наличными"
|
|
87
99
|
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
@@ -97,15 +109,7 @@ export default {
|
|
|
97
109
|
<div className="container grid grid-cols-12">
|
|
98
110
|
<ProductBlock
|
|
99
111
|
className="col-span-12"
|
|
100
|
-
|
|
101
|
-
headlineVersion="L"
|
|
102
|
-
title="Потребительский кредит наличными"
|
|
103
|
-
description="Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт."
|
|
104
|
-
benefitsCountOfRow={2}
|
|
105
|
-
benefits={benefits}
|
|
106
|
-
benefitsVersion="normal"
|
|
107
|
-
buttons={buttons}
|
|
108
|
-
image={image}
|
|
112
|
+
{...PRODUCT_BLOCK_WITH_BACK_BUTTON}
|
|
109
113
|
directionRight={false}
|
|
110
114
|
/>
|
|
111
115
|
</div>
|
|
@@ -201,16 +205,4 @@ export default {
|
|
|
201
205
|
/>
|
|
202
206
|
</div>
|
|
203
207
|
),
|
|
204
|
-
'secondary with footnote': (
|
|
205
|
-
<div className="container grid grid-cols-12">
|
|
206
|
-
<ProductBlock
|
|
207
|
-
className="col-span-12"
|
|
208
|
-
footnote="*в соответствии с Указанием Банка России от 28.12.2015 № 3921-У"
|
|
209
|
-
headlineVersion="L"
|
|
210
|
-
image={image}
|
|
211
|
-
title="Оплата проходит в 180 странах мира"
|
|
212
|
-
version="secondary"
|
|
213
|
-
/>
|
|
214
|
-
</div>
|
|
215
|
-
),
|
|
216
208
|
};
|
|
@@ -6,6 +6,7 @@ import { joinList } from '../../utils/joinList';
|
|
|
6
6
|
import type { ProductBlockContent } from './ProductBlockContent';
|
|
7
7
|
import { ProductBlockInner } from './ProductBlockInner';
|
|
8
8
|
import { renderBackwardButton } from './renderBackwardButton';
|
|
9
|
+
import { style } from '../../utils/style';
|
|
9
10
|
|
|
10
11
|
export interface ProductBlockProps extends ProductBlockContent, UniBlockProps {}
|
|
11
12
|
|
|
@@ -17,23 +18,21 @@ export const ProductBlock = JSX<ProductBlockProps>((props) => {
|
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<BlockWrapper
|
|
20
|
-
className={
|
|
21
|
+
className={style('overflow-hidden p-12 flex flex-col box-border min-h-[454px]', className)}
|
|
21
22
|
version={version}
|
|
22
23
|
{...rest}
|
|
23
24
|
>
|
|
24
|
-
{backwardButton?.text
|
|
25
|
-
? renderBackwardButton(backwardButton, buttonVersion, 'mb-10 -mt-2.5')
|
|
26
|
-
: null}
|
|
25
|
+
{backwardButton?.text ? renderBackwardButton(backwardButton, buttonVersion) : null}
|
|
27
26
|
{breadcrumbs?.length ? (
|
|
28
27
|
<div className="text-xs-light mb-6">
|
|
29
|
-
{joinList(<span className={
|
|
28
|
+
{joinList(<span className={style('mx-2', breadcrumbStyle)}>/</span>)(
|
|
30
29
|
breadcrumbs.map((breadcrumb, i) => (
|
|
31
30
|
<Breadcrumb key={String(i)} className={breadcrumbStyle} {...breadcrumb} />
|
|
32
31
|
)),
|
|
33
32
|
)}
|
|
34
33
|
</div>
|
|
35
34
|
) : null}
|
|
36
|
-
<ProductBlockInner version={version} {...rest} />
|
|
35
|
+
<ProductBlockInner className="mt-10" version={version} {...rest} />
|
|
37
36
|
</BlockWrapper>
|
|
38
37
|
);
|
|
39
38
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { BulletsProps } from '../../model/Bullets';
|
|
2
|
-
import type { Footnote } from '../../model/Footnote';
|
|
3
2
|
import type { HeadlineProps } from '../../model/HeadlineType';
|
|
4
3
|
import type { IconVersion } from '../../model/IconVersion';
|
|
5
4
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
@@ -14,7 +13,6 @@ export type ProductBlockInnerContent = HeadlineProps &
|
|
|
14
13
|
RichTextProps &
|
|
15
14
|
ListContent &
|
|
16
15
|
ButtonContent &
|
|
17
|
-
Footnote &
|
|
18
16
|
ImageContent &
|
|
19
17
|
BulletsProps & {
|
|
20
18
|
/**
|
|
@@ -22,7 +22,6 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
22
22
|
benefits,
|
|
23
23
|
benefitsVersion,
|
|
24
24
|
buttons,
|
|
25
|
-
footnote,
|
|
26
25
|
image,
|
|
27
26
|
__html,
|
|
28
27
|
items,
|
|
@@ -37,7 +36,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
37
36
|
return (
|
|
38
37
|
<div className={style('flex grow justify-between items-stretch h-full', className)}>
|
|
39
38
|
{image?.src ? (
|
|
40
|
-
<Img className={
|
|
39
|
+
<Img className={style('mt-[-50px]', directionRight ? 'order-2' : '')} image={image} />
|
|
41
40
|
) : null}
|
|
42
41
|
<div className={style('flex flex-col', textBlockClassName)}>
|
|
43
42
|
<Headline
|
|
@@ -47,29 +46,26 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
47
46
|
headlineVersion={headlineVersion}
|
|
48
47
|
align="text-left"
|
|
49
48
|
/>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</BaseTile>
|
|
71
|
-
{footnote ? <p className="text-m-light pt-12">{footnote}</p> : null}
|
|
72
|
-
</div>
|
|
49
|
+
<BaseTile buttons={renderButtonsSection(buttons)}>
|
|
50
|
+
{benefitsCount ? (
|
|
51
|
+
<div className={benefitsContainerStyles}>
|
|
52
|
+
{benefits?.map(renderBenefit(version, benefitsVersion))}
|
|
53
|
+
</div>
|
|
54
|
+
) : null}
|
|
55
|
+
{__html ? (
|
|
56
|
+
<div className="mt-5">
|
|
57
|
+
<RichText __html={__html} />
|
|
58
|
+
</div>
|
|
59
|
+
) : null}
|
|
60
|
+
{items?.length ? (
|
|
61
|
+
<List
|
|
62
|
+
className="mt-5 text-h6"
|
|
63
|
+
items={items}
|
|
64
|
+
itemClassName="mb-[7px]"
|
|
65
|
+
isDotted={isDotted}
|
|
66
|
+
/>
|
|
67
|
+
) : null}
|
|
68
|
+
</BaseTile>
|
|
73
69
|
</div>
|
|
74
70
|
</div>
|
|
75
71
|
);
|
|
@@ -7,7 +7,7 @@ import { style } from '../../utils/style';
|
|
|
7
7
|
export function renderBackwardButton(
|
|
8
8
|
button: BackwardButtonProps,
|
|
9
9
|
version: ButtonVersion,
|
|
10
|
-
className
|
|
10
|
+
className?: string,
|
|
11
11
|
) {
|
|
12
12
|
const { text, href, target } = button;
|
|
13
13
|
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
@@ -135,7 +135,11 @@ export default {
|
|
|
135
135
|
<ProductTile className="col-span-6" {...PRODUCT_TILE} />
|
|
136
136
|
</div>
|
|
137
137
|
),
|
|
138
|
-
secondary:
|
|
138
|
+
secondary: (
|
|
139
|
+
<div className="container grid grid-cols-12">
|
|
140
|
+
<ProductTile className="col-span-6" {...PRODUCT_TILE} version="secondary" />
|
|
141
|
+
</div>
|
|
142
|
+
),
|
|
139
143
|
pension: (
|
|
140
144
|
<div className="container grid grid-cols-12">
|
|
141
145
|
<ProductTile
|
|
@@ -216,7 +220,7 @@ export default {
|
|
|
216
220
|
benefits={benefits}
|
|
217
221
|
buttons={buttons2}
|
|
218
222
|
image={building}
|
|
219
|
-
|
|
223
|
+
directionRight={false}
|
|
220
224
|
/>
|
|
221
225
|
</div>
|
|
222
226
|
),
|
|
@@ -23,18 +23,18 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
23
23
|
benefits = [],
|
|
24
24
|
buttons,
|
|
25
25
|
image,
|
|
26
|
-
|
|
26
|
+
directionRight = true,
|
|
27
27
|
...rest
|
|
28
28
|
}) => (
|
|
29
29
|
<BlockWrapper
|
|
30
30
|
className={style(
|
|
31
|
-
'overflow-hidden p-9 box-border relative min-h-[364px]',
|
|
31
|
+
'overflow-hidden p-9 box-border relative min-h-[364px] flex flex-col justify-between',
|
|
32
32
|
getTileRightPadding(className),
|
|
33
33
|
className,
|
|
34
34
|
)}
|
|
35
35
|
{...rest}
|
|
36
36
|
>
|
|
37
|
-
<div className={style('flex flex-col',
|
|
37
|
+
<div className={style('flex flex-col', directionRight ? '' : 'items-end')}>
|
|
38
38
|
<Headline
|
|
39
39
|
className={style('!p-0 !bg-transparent z-10', title || description ? 'mb-3.5' : '')}
|
|
40
40
|
title={title}
|
|
@@ -45,9 +45,11 @@ export const ProductTile = JSX<ProductTileProps>(
|
|
|
45
45
|
/>
|
|
46
46
|
{renderBenefits(benefits, image)}
|
|
47
47
|
{renderAdditionalDescription(additionalDescription, image)}
|
|
48
|
-
{renderButtonsSection(buttons, { className: 'mt-5 z-10 text-l' })}
|
|
49
48
|
</div>
|
|
50
|
-
{
|
|
49
|
+
{renderButtonsSection(buttons, {
|
|
50
|
+
className: style('mt-5 text-l', directionRight ? '' : 'justify-end'),
|
|
51
|
+
})}
|
|
52
|
+
{renderImage(image, directionRight)}
|
|
51
53
|
</BlockWrapper>
|
|
52
54
|
),
|
|
53
55
|
);
|
|
@@ -62,7 +64,10 @@ function renderBenefits(benefits: Benefit[], image?: Picture) {
|
|
|
62
64
|
|
|
63
65
|
return (
|
|
64
66
|
<div
|
|
65
|
-
className={
|
|
67
|
+
className={style(
|
|
68
|
+
'z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline',
|
|
69
|
+
benefitsWidth,
|
|
70
|
+
)}
|
|
66
71
|
>
|
|
67
72
|
{benefits.length ? benefits.map(renderBenefit) : null}
|
|
68
73
|
</div>
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { Img } from '../../ui-kit/Img/Img';
|
|
3
|
+
import { style } from '../../utils/style';
|
|
3
4
|
|
|
4
|
-
export function renderImage(image?: Picture,
|
|
5
|
+
export function renderImage(image?: Picture, directionRight?: boolean) {
|
|
5
6
|
if (!image?.src) {
|
|
6
7
|
return null;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
return (
|
|
10
11
|
<Img
|
|
11
|
-
className={
|
|
12
|
+
className={style('absolute', directionRight ? 'right-0' : 'left-0', 'bottom-0')}
|
|
12
13
|
image={image}
|
|
13
14
|
/>
|
|
14
15
|
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Заголовок",
|
|
3
|
+
"__html": "<p>Описание</p>",
|
|
4
|
+
"button": {
|
|
5
|
+
"text": "Информация о регионе",
|
|
6
|
+
"version": "link",
|
|
7
|
+
"icon": { "format": "webp", "size": { "width": 16, "height": 16 } },
|
|
8
|
+
"iconRight": { "format": "webp", "size": { "width": 16, "height": 16 } }
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import { RepresentativeOfficeInfo } from './RepresentativeOfficeInfo';
|
|
4
|
+
|
|
5
|
+
const button: ButtonWithIconProps = {
|
|
6
|
+
text: 'Информация о регионе',
|
|
7
|
+
target: '_blank',
|
|
8
|
+
version: 'secondary',
|
|
9
|
+
icon: { icon: 'ArrowTopRightIcon', iconVersion: 'color' },
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const description = `
|
|
13
|
+
<p><strong>Представительство АО «Россельхозбанк» в Республике Беларусь (г. Минск) зарегистрировано в октябре 2008 года</strong></p>
|
|
14
|
+
<br>
|
|
15
|
+
<p>Основными задачи Представительства</p>
|
|
16
|
+
<ul>
|
|
17
|
+
<li>установление и развитие деловых связей с белорусскими финансовыми институтами и компаниями АПК для реализации совместных проектов</li>
|
|
18
|
+
<li>организация взаимодействия с государственными органами власти и международными организациями, находящимися в Республике Бкларусь</li>
|
|
19
|
+
</ul>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
default: (
|
|
24
|
+
<div className="container grid grid-cols-12">
|
|
25
|
+
<RepresentativeOfficeInfo
|
|
26
|
+
className="col-span-6"
|
|
27
|
+
title="Представительство в Республике Беларусь"
|
|
28
|
+
__html={description}
|
|
29
|
+
address="Республика Беларусь, 220004, г. Минск, ул. Немига, д. 40"
|
|
30
|
+
telephone="(+375-17)-226-4578"
|
|
31
|
+
email="prshbrb@mail.ru"
|
|
32
|
+
button={button}
|
|
33
|
+
version="primary"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
),
|
|
37
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { RepresentativeOfficeInfoContent } from './RepresentativeOfficeInfoContent';
|
|
3
|
+
import type { Picture } from '../../model/Picture';
|
|
4
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
|
+
import type { IconName } from '../../icons/IconName';
|
|
6
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
8
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
9
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
10
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
11
|
+
import { RichText } from '../../ui-kit/RichText/RichText';
|
|
12
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
13
|
+
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
14
|
+
import { style } from '../../utils/style';
|
|
15
|
+
|
|
16
|
+
export interface RepresentativeOfficeInfoProps
|
|
17
|
+
extends RepresentativeOfficeInfoContent,
|
|
18
|
+
UniBlockProps {}
|
|
19
|
+
|
|
20
|
+
export const RepresentativeOfficeInfo = JSX<RepresentativeOfficeInfoProps>(
|
|
21
|
+
({
|
|
22
|
+
address,
|
|
23
|
+
email,
|
|
24
|
+
telephone,
|
|
25
|
+
button,
|
|
26
|
+
className = '',
|
|
27
|
+
__html,
|
|
28
|
+
icon,
|
|
29
|
+
title,
|
|
30
|
+
version = 'primary',
|
|
31
|
+
...rest
|
|
32
|
+
}) => (
|
|
33
|
+
<BlockWrapper
|
|
34
|
+
className={style('box-border text-left p-9', className)}
|
|
35
|
+
version={version}
|
|
36
|
+
{...rest}
|
|
37
|
+
>
|
|
38
|
+
<div className="w-full flex justify-between">
|
|
39
|
+
{title ? <Heading headingType="h4" as="h3" className="mb-6" title={title} /> : null}
|
|
40
|
+
{renderIconBlock(icon)}
|
|
41
|
+
</div>
|
|
42
|
+
<div className="w-full">
|
|
43
|
+
{__html ? renderDescriptionBlock(__html) : null}
|
|
44
|
+
{renderBlock('Адрес', address, 'GeolocationIcon')}
|
|
45
|
+
{renderBlock('Телефон', telephone, 'PhoneIcon')}
|
|
46
|
+
{renderBlock('E-mail', email, 'MailIcon')}
|
|
47
|
+
{button?.text
|
|
48
|
+
? renderButtonsSection([button], {
|
|
49
|
+
className: 'mb-6',
|
|
50
|
+
})
|
|
51
|
+
: null}
|
|
52
|
+
</div>
|
|
53
|
+
</BlockWrapper>
|
|
54
|
+
),
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const renderIconBlock = (icon?: Picture) => (
|
|
58
|
+
<div className="self-end">
|
|
59
|
+
{icon?.src ? <Img image={icon} /> : null}
|
|
60
|
+
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const renderDescriptionBlock = (__html?: string) => (
|
|
65
|
+
<div className="border-b border-main-divider pb-5 my-5">
|
|
66
|
+
<RichText __html={__html} />
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const renderBlock = (blockName: string, data?: string, iconName?: IconName | undefined) => (
|
|
71
|
+
<div className="flex mb-4">
|
|
72
|
+
<Icon className="pr-4" iconVersion="black" name={iconName} width="24" height="24" asSVG />
|
|
73
|
+
<div className="flex flex-col first:pb-1">
|
|
74
|
+
<Text size="text-m-light">{blockName}</Text>
|
|
75
|
+
{data ? (
|
|
76
|
+
<Text size="text-h6" color="text-green">
|
|
77
|
+
{data}
|
|
78
|
+
</Text>
|
|
79
|
+
) : null}
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|