@redneckz/wildless-cms-uni-blocks 0.14.44 → 0.14.46
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.14.44.js +103 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +27 -36
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +8 -4
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +2 -1
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocItem.js +2 -2
- package/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/dist/ui-kit/Button/LikeButton.js +5 -9
- package/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.js +2 -2
- package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/dist/ui-kit/SVG.js +4 -1
- package/dist/ui-kit/SVG.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +8 -4
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +2 -1
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocItem.js +2 -2
- package/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +1 -0
- package/lib/ui-kit/Button/LikeButton.js +5 -9
- package/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.js +2 -2
- package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/lib/ui-kit/SVG.js +4 -1
- package/lib/ui-kit/SVG.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +25 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +8 -4
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +2 -1
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocItem.js +2 -2
- package/mobile/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/dist/ui-kit/Button/LikeButton.js +5 -9
- package/mobile/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +2 -2
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/dist/ui-kit/SVG.js +4 -1
- package/mobile/dist/ui-kit/SVG.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +8 -4
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +2 -1
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocItem.js +2 -2
- package/mobile/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/lib/ui-kit/Button/LikeButton.js +5 -9
- package/mobile/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +2 -2
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/lib/ui-kit/SVG.js +4 -1
- package/mobile/lib/ui-kit/SVG.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +10 -7
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
- package/mobile/src/components/Header/DropdownMenu.tsx +5 -2
- package/mobile/src/components/LinkDocs/LinkDocItem.tsx +4 -5
- package/mobile/src/ui-kit/Button/LikeButton.tsx +18 -17
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
- package/mobile/src/ui-kit/SVG.tsx +16 -3
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/CardTransfer/CardTransfer.tsx +10 -7
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
- package/src/components/Header/DropdownMenu.tsx +5 -2
- package/src/components/LinkDocs/LinkDocItem.tsx +4 -5
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +62 -0
- package/src/ui-kit/Button/LikeButton.tsx +18 -17
- package/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
- package/src/ui-kit/SVG.tsx +16 -3
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/dist/components/BusinessBlock/BusinessBlock.js +0 -9
- package/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/dist/components/BusinessBlock/BusinessCard.js +0 -17
- package/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/lib/components/BusinessBlock/BusinessBlock.fixture.d.ts +0 -6
- package/lib/components/BusinessBlock/BusinessBlock.js +0 -7
- package/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/lib/components/BusinessBlock/BusinessCard.js +0 -15
- package/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js +0 -9
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/mobile/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessCard.js +0 -17
- package/mobile/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js +0 -7
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/lib/components/BusinessBlock/BusinessCard.js +0 -15
- package/mobile/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
- package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
- package/mobile/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
- package/mobile/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
- package/mobile/src/components/BusinessBlock/BusinessCard.tsx +0 -42
- package/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
- package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +0 -75
- package/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
- package/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
- package/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
- package/src/components/BusinessBlock/BusinessCard.tsx +0 -42
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"content": {
|
|
3
|
-
"cards": {
|
|
4
|
-
"items": {
|
|
5
|
-
"image": {
|
|
6
|
-
"ui:field": "picture"
|
|
7
|
-
},
|
|
8
|
-
"button": {
|
|
9
|
-
"href": {
|
|
10
|
-
"ui:field": "attachmentHref"
|
|
11
|
-
},
|
|
12
|
-
"icon": {
|
|
13
|
-
"ui:field": "icon"
|
|
14
|
-
},
|
|
15
|
-
"iconRight": {
|
|
16
|
-
"ui:field": "icon"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"cardItems": {
|
|
20
|
-
"items": {
|
|
21
|
-
"icon": {
|
|
22
|
-
"ui:field": "icon"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import { type IconProps } from '../../model/Picture';
|
|
4
|
-
import { type ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
|
|
7
|
-
export type BusinessCardItemProps = IconProps & {
|
|
8
|
-
/** @title Текст */
|
|
9
|
-
text?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type BusinessCardProps = TitleProps &
|
|
13
|
-
ImageContent & {
|
|
14
|
-
/** @title Список */
|
|
15
|
-
cardItems?: BusinessCardItemProps[];
|
|
16
|
-
button?: ButtonContent;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @title Бизнес блок
|
|
21
|
-
*/
|
|
22
|
-
export type BusinessBlockContent = UniBlockContent &
|
|
23
|
-
TitleProps & {
|
|
24
|
-
/**
|
|
25
|
-
* @title Карточки
|
|
26
|
-
* @minItems 2
|
|
27
|
-
* @maxItems 2
|
|
28
|
-
*/
|
|
29
|
-
cards?: BusinessCardProps[];
|
|
30
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
3
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
6
|
-
import { type BusinessCardItemProps, type BusinessCardProps } from './BusinessBlockContent';
|
|
7
|
-
|
|
8
|
-
export const BusinessCard = JSX<BusinessCardProps>((props) => {
|
|
9
|
-
const { title, image, cardItems, button } = props;
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="border-gray border p-4xl w-1/2 space-y-lg">
|
|
13
|
-
{image ? (
|
|
14
|
-
<div className="flex justify-center">
|
|
15
|
-
{image?.src ? <Img image={image} /> : null}
|
|
16
|
-
{image?.icon ? <Img image={image} /> : null}
|
|
17
|
-
</div>
|
|
18
|
-
) : null}
|
|
19
|
-
{title ? <Heading headingType="h4" title={title} /> : null}
|
|
20
|
-
{cardItems?.length ? (
|
|
21
|
-
<ul className="space-y-s">{cardItems.map((_, i) => renderItem(_, String(i)))}</ul>
|
|
22
|
-
) : null}
|
|
23
|
-
{renderButtonsSection([button])}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const renderItem = (item: BusinessCardItemProps, key: string) => {
|
|
29
|
-
const { icon, text } = item;
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<li key={key} className="flex items-center gap-s">
|
|
33
|
-
{icon?.icon ? (
|
|
34
|
-
<Img image={icon} className="w-12 h-12 min-w-12 p-s rounded-icon bg-main-divider" />
|
|
35
|
-
) : null}
|
|
36
|
-
{icon?.src ? <Img image={icon} /> : null}
|
|
37
|
-
<Text size="text-xl" font="font-light">
|
|
38
|
-
{text}
|
|
39
|
-
</Text>
|
|
40
|
-
</li>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Заголовок блока",
|
|
3
|
-
"cards": [
|
|
4
|
-
{
|
|
5
|
-
"image": {
|
|
6
|
-
"format": "webp",
|
|
7
|
-
"size": {
|
|
8
|
-
"width": 319,
|
|
9
|
-
"height": 230
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"title": "Заголовок карточки",
|
|
13
|
-
"cardItems": [
|
|
14
|
-
{
|
|
15
|
-
"icon": {
|
|
16
|
-
"icon": "RoundRubleIcon",
|
|
17
|
-
"format": "webp",
|
|
18
|
-
"size": { "width": 24, "height": 24 },
|
|
19
|
-
"iconVersion": "color"
|
|
20
|
-
},
|
|
21
|
-
"text": "Пункт 1"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"icon": {
|
|
25
|
-
"icon": "EmptyWalletIcon",
|
|
26
|
-
"format": "webp",
|
|
27
|
-
"size": { "width": 24, "height": 24 },
|
|
28
|
-
"iconVersion": "color"
|
|
29
|
-
},
|
|
30
|
-
"text": "Пункт 2"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"icon": {
|
|
34
|
-
"icon": "PercentageRoundIcon",
|
|
35
|
-
"format": "webp",
|
|
36
|
-
"size": { "width": 24, "height": 24 },
|
|
37
|
-
"iconVersion": "color"
|
|
38
|
-
},
|
|
39
|
-
"text": "Пункт 3"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"button": {
|
|
43
|
-
"href": "#",
|
|
44
|
-
"text": "Кнопка",
|
|
45
|
-
"version": "primary",
|
|
46
|
-
"icon": { "format": "webp", "size": { "width": 24, "height": 24 } },
|
|
47
|
-
"iconRight": { "format": "webp", "size": { "width": 24, "height": 24 } }
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"image": {
|
|
52
|
-
"format": "webp",
|
|
53
|
-
"size": {
|
|
54
|
-
"width": 304,
|
|
55
|
-
"height": 237
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"title": "Заголовок карточки",
|
|
59
|
-
"cardItems": [
|
|
60
|
-
{
|
|
61
|
-
"icon": {
|
|
62
|
-
"icon": "RoundRubleIcon",
|
|
63
|
-
"format": "webp",
|
|
64
|
-
"size": { "width": 24, "height": 24 },
|
|
65
|
-
"iconVersion": "color"
|
|
66
|
-
},
|
|
67
|
-
"text": "Пункт 1"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"icon": {
|
|
71
|
-
"icon": "EmptyWalletIcon",
|
|
72
|
-
"format": "webp",
|
|
73
|
-
"size": { "width": 24, "height": 24 },
|
|
74
|
-
"iconVersion": "color"
|
|
75
|
-
},
|
|
76
|
-
"text": "Пункт 2"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"icon": {
|
|
80
|
-
"icon": "PercentageRoundIcon",
|
|
81
|
-
"format": "webp",
|
|
82
|
-
"size": { "width": 24, "height": 24 },
|
|
83
|
-
"iconVersion": "color"
|
|
84
|
-
},
|
|
85
|
-
"text": "Пункт 3"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"button": {
|
|
89
|
-
"href": "#",
|
|
90
|
-
"text": "Кнопка",
|
|
91
|
-
"version": "primary",
|
|
92
|
-
"icon": { "format": "webp", "size": { "width": 24, "height": 24 } },
|
|
93
|
-
"iconRight": { "format": "webp", "size": { "width": 24, "height": 24 } }
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import '../../setup-fixture';
|
|
2
|
-
|
|
3
|
-
import { type ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
4
|
-
import { BusinessBlock } from './BusinessBlock';
|
|
5
|
-
import {
|
|
6
|
-
type BusinessBlockContent,
|
|
7
|
-
type BusinessCardItemProps,
|
|
8
|
-
type BusinessCardProps,
|
|
9
|
-
} from './BusinessBlockContent';
|
|
10
|
-
|
|
11
|
-
const button: ButtonContent = {
|
|
12
|
-
href: '#',
|
|
13
|
-
text: 'Подробнее',
|
|
14
|
-
target: '_blank',
|
|
15
|
-
version: 'secondary',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const items: BusinessCardItemProps[] = [
|
|
19
|
-
{
|
|
20
|
-
icon: { icon: 'RoundRubleIcon' },
|
|
21
|
-
text: 'Пункт 1',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
icon: { icon: 'EmptyWalletIcon' },
|
|
25
|
-
text: 'Пункт 2',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
icon: { icon: 'PercentageRoundIcon' },
|
|
29
|
-
text: 'Пункт 3',
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const cards: BusinessCardProps[] = [
|
|
34
|
-
{
|
|
35
|
-
image: {
|
|
36
|
-
src: 'business-block-1.png',
|
|
37
|
-
format: 'png',
|
|
38
|
-
size: {
|
|
39
|
-
width: 319,
|
|
40
|
-
height: 230,
|
|
41
|
-
},
|
|
42
|
-
title: 'business-block-1',
|
|
43
|
-
},
|
|
44
|
-
title: 'Заголовок карточки',
|
|
45
|
-
cardItems: items,
|
|
46
|
-
button,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
image: {
|
|
50
|
-
src: 'business-block-2.png',
|
|
51
|
-
format: 'png',
|
|
52
|
-
size: {
|
|
53
|
-
width: 304,
|
|
54
|
-
height: 237,
|
|
55
|
-
},
|
|
56
|
-
title: 'business-block-2',
|
|
57
|
-
},
|
|
58
|
-
title: 'Заголовок карточки',
|
|
59
|
-
cardItems: items,
|
|
60
|
-
button,
|
|
61
|
-
},
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const PROPS: BusinessBlockContent = {
|
|
65
|
-
title: 'Заголовок блока',
|
|
66
|
-
cards,
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default {
|
|
70
|
-
default: (
|
|
71
|
-
<div className="container grid grid-cols-12">
|
|
72
|
-
<BusinessBlock className="col-span-12" {...PROPS} />
|
|
73
|
-
</div>
|
|
74
|
-
),
|
|
75
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { type UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
|
-
import { type BusinessBlockContent } from './BusinessBlockContent';
|
|
6
|
-
import { BusinessCard } from './BusinessCard';
|
|
7
|
-
|
|
8
|
-
export interface BusinessBlockProps extends BusinessBlockContent, UniBlockProps {}
|
|
9
|
-
|
|
10
|
-
export const BusinessBlock = JSX<BusinessBlockProps>(({ className, title, cards, ...rest }) => (
|
|
11
|
-
<BlockWrapper className={className} defaultPadding="p-6xl space-y-3xl" {...rest}>
|
|
12
|
-
<Heading headingType="h3" title={title} className="text-center" />
|
|
13
|
-
<div className="flex gap-lg">
|
|
14
|
-
{cards?.length ? cards.map((_, i) => <BusinessCard key={String(i)} {..._} />) : null}
|
|
15
|
-
</div>
|
|
16
|
-
</BlockWrapper>
|
|
17
|
-
));
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"content": {
|
|
3
|
-
"cards": {
|
|
4
|
-
"items": {
|
|
5
|
-
"image": {
|
|
6
|
-
"ui:field": "picture"
|
|
7
|
-
},
|
|
8
|
-
"button": {
|
|
9
|
-
"href": {
|
|
10
|
-
"ui:field": "attachmentHref"
|
|
11
|
-
},
|
|
12
|
-
"icon": {
|
|
13
|
-
"ui:field": "icon"
|
|
14
|
-
},
|
|
15
|
-
"iconRight": {
|
|
16
|
-
"ui:field": "icon"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"cardItems": {
|
|
20
|
-
"items": {
|
|
21
|
-
"icon": {
|
|
22
|
-
"ui:field": "icon"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import { type IconProps } from '../../model/Picture';
|
|
4
|
-
import { type ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
|
|
7
|
-
export type BusinessCardItemProps = IconProps & {
|
|
8
|
-
/** @title Текст */
|
|
9
|
-
text?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type BusinessCardProps = TitleProps &
|
|
13
|
-
ImageContent & {
|
|
14
|
-
/** @title Список */
|
|
15
|
-
cardItems?: BusinessCardItemProps[];
|
|
16
|
-
button?: ButtonContent;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @title Бизнес блок
|
|
21
|
-
*/
|
|
22
|
-
export type BusinessBlockContent = UniBlockContent &
|
|
23
|
-
TitleProps & {
|
|
24
|
-
/**
|
|
25
|
-
* @title Карточки
|
|
26
|
-
* @minItems 2
|
|
27
|
-
* @maxItems 2
|
|
28
|
-
*/
|
|
29
|
-
cards?: BusinessCardProps[];
|
|
30
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
3
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
6
|
-
import { type BusinessCardItemProps, type BusinessCardProps } from './BusinessBlockContent';
|
|
7
|
-
|
|
8
|
-
export const BusinessCard = JSX<BusinessCardProps>((props) => {
|
|
9
|
-
const { title, image, cardItems, button } = props;
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="border-gray border p-4xl w-1/2 space-y-lg">
|
|
13
|
-
{image ? (
|
|
14
|
-
<div className="flex justify-center">
|
|
15
|
-
{image?.src ? <Img image={image} /> : null}
|
|
16
|
-
{image?.icon ? <Img image={image} /> : null}
|
|
17
|
-
</div>
|
|
18
|
-
) : null}
|
|
19
|
-
{title ? <Heading headingType="h4" title={title} /> : null}
|
|
20
|
-
{cardItems?.length ? (
|
|
21
|
-
<ul className="space-y-s">{cardItems.map((_, i) => renderItem(_, String(i)))}</ul>
|
|
22
|
-
) : null}
|
|
23
|
-
{renderButtonsSection([button])}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const renderItem = (item: BusinessCardItemProps, key: string) => {
|
|
29
|
-
const { icon, text } = item;
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<li key={key} className="flex items-center gap-s">
|
|
33
|
-
{icon?.icon ? (
|
|
34
|
-
<Img image={icon} className="w-12 h-12 min-w-12 p-s rounded-icon bg-main-divider" />
|
|
35
|
-
) : null}
|
|
36
|
-
{icon?.src ? <Img image={icon} /> : null}
|
|
37
|
-
<Text size="text-xl" font="font-light">
|
|
38
|
-
{text}
|
|
39
|
-
</Text>
|
|
40
|
-
</li>
|
|
41
|
-
);
|
|
42
|
-
};
|