@redneckz/wildless-cms-uni-blocks 0.5.15 → 0.6.15
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.5.14.js +27 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +44 -40
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Blocks.d.ts +1 -0
- package/bundle/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/bundle/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/bundle/components/Gallery/GalleryContent.d.ts +3 -1
- package/bundle/components/Headline/constants.d.ts +0 -2
- package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/bundle/model/AlignText.d.ts +2 -0
- package/bundle/model/HeadlineType.d.ts +2 -2
- package/dist/components/Accordion/Accordion.js +2 -6
- package/dist/components/Accordion/Accordion.js.map +1 -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/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/dist/components/ContactsBlock/ContactsBlock.js +19 -0
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/dist/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/dist/components/ContentPage/renderContentPageHead.js +30 -0
- package/dist/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/dist/components/Gallery/Gallery.mobile.js +2 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +6 -11
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContainer.js +2 -2
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +3 -1
- package/dist/components/Gallery/GalleryInner.js +4 -3
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Headline/Headline.js +2 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +2 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/constants.d.ts +0 -2
- package/dist/components/Headline/constants.js +2 -6
- package/dist/components/Headline/constants.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +5 -3
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/model/AlignText.d.ts +2 -0
- package/dist/model/AlignText.js +8 -0
- package/dist/model/AlignText.js.map +1 -0
- package/dist/model/HeadlineType.d.ts +2 -2
- package/dist/ui-kit/List/ListItem.js +4 -4
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -6
- package/lib/components/Accordion/Accordion.js.map +1 -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/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/lib/components/ContactsBlock/ContactsBlock.fixture.d.ts +5 -0
- package/lib/components/ContactsBlock/ContactsBlock.js +17 -0
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/lib/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/lib/components/ContentPage/renderContentPageHead.js +27 -0
- package/lib/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/lib/components/Gallery/Gallery.mobile.js +2 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +6 -11
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContainer.js +2 -2
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +3 -1
- package/lib/components/Gallery/GalleryInner.js +4 -3
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +3 -2
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/constants.d.ts +0 -2
- package/lib/components/Headline/constants.js +1 -5
- package/lib/components/Headline/constants.js.map +1 -1
- package/lib/components/MiniGallery/MiniGallery.fixture.d.ts +2 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +5 -3
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/model/AlignText.d.ts +2 -0
- package/lib/model/AlignText.js +6 -0
- package/lib/model/AlignText.js.map +1 -0
- package/lib/model/HeadlineType.d.ts +2 -2
- package/lib/ui-kit/List/ListItem.js +4 -4
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/bundle/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/bundle/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/bundle/components/Headline/constants.d.ts +0 -2
- package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/bundle/model/AlignText.d.ts +2 -0
- package/mobile/bundle/model/HeadlineType.d.ts +2 -2
- package/mobile/dist/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +19 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.js +30 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/mobile/dist/components/Gallery/Gallery.js +2 -1
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +6 -11
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +4 -3
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +2 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/constants.d.ts +0 -2
- package/mobile/dist/components/Headline/constants.js +2 -6
- package/mobile/dist/components/Headline/constants.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/model/AlignText.d.ts +2 -0
- package/mobile/dist/model/AlignText.js +8 -0
- package/mobile/dist/model/AlignText.js.map +1 -0
- package/mobile/dist/model/HeadlineType.d.ts +2 -2
- package/mobile/dist/ui-kit/List/ListItem.js +4 -4
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +17 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.js +27 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/mobile/lib/components/Gallery/Gallery.js +2 -1
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +6 -11
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +4 -3
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/constants.d.ts +0 -2
- package/mobile/lib/components/Headline/constants.js +1 -5
- package/mobile/lib/components/Headline/constants.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/model/AlignText.d.ts +2 -0
- package/mobile/lib/model/AlignText.js +6 -0
- package/mobile/lib/model/AlignText.js.map +1 -0
- package/mobile/lib/model/HeadlineType.d.ts +2 -2
- package/mobile/lib/ui-kit/List/ListItem.js +4 -4
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +51 -0
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +70 -0
- package/mobile/src/components/ContactsBlock/ContactsBlock.ui.json +8 -0
- package/mobile/src/components/ContactsBlock/ContactsBlockContent.ts +39 -0
- package/mobile/src/components/ContentPage/renderContentPageHead.tsx +34 -0
- package/mobile/src/components/Gallery/Gallery.example.json +2 -2
- package/mobile/src/components/Gallery/Gallery.tsx +9 -5
- package/mobile/src/components/Gallery/Gallery.ui.json +11 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +17 -26
- package/mobile/src/components/Gallery/GalleryContainer.tsx +1 -2
- package/mobile/src/components/Gallery/GalleryContent.ts +3 -1
- package/mobile/src/components/Gallery/GalleryInner.tsx +11 -4
- package/mobile/src/components/Headline/Headline.tsx +4 -3
- package/mobile/src/components/Headline/constants.ts +1 -7
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +6 -0
- package/mobile/src/components/Tile/Tile.tsx +1 -1
- package/mobile/src/model/AlignText.ts +7 -0
- package/mobile/src/model/HeadlineType.ts +2 -2
- package/mobile/src/ui-kit/List/ListItem.tsx +10 -7
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +2 -8
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContactsBlock/ContactsBlock.example.json +51 -0
- package/src/components/ContactsBlock/ContactsBlock.fixture.tsx +57 -0
- package/src/components/ContactsBlock/ContactsBlock.tsx +70 -0
- package/src/components/ContactsBlock/ContactsBlock.ui.json +8 -0
- package/src/components/ContactsBlock/ContactsBlockContent.ts +39 -0
- package/src/components/ContentPage/renderContentPageHead.tsx +34 -0
- package/src/components/Gallery/Gallery.example.json +2 -2
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -3
- package/src/components/Gallery/Gallery.fixture.tsx +20 -24
- package/src/components/Gallery/Gallery.mobile.tsx +9 -5
- package/src/components/Gallery/Gallery.ui.json +11 -1
- package/src/components/Gallery/GalleryCardInner.tsx +17 -26
- package/src/components/Gallery/GalleryContainer.tsx +1 -2
- package/src/components/Gallery/GalleryContent.ts +3 -1
- package/src/components/Gallery/GalleryInner.tsx +11 -4
- package/src/components/Headline/Headline.mobile.tsx +4 -3
- package/src/components/Headline/Headline.tsx +4 -3
- package/src/components/Headline/constants.ts +1 -7
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +72 -44
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -0
- package/src/components/MobileAppTile/MobileAppTile.tsx +8 -1
- package/src/components/MobileAppTile/MobileAppTileContent.ts +6 -0
- package/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/src/components/Tile/Tile.tsx +1 -1
- package/src/model/AlignText.ts +7 -0
- package/src/model/HeadlineType.ts +2 -2
- package/src/ui-kit/List/ListItem.tsx +10 -7
- package/bundle/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/dist/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/dist/components/ContentPage/ContentPageHead.js +0 -20
- package/dist/components/ContentPage/ContentPageHead.js.map +0 -1
- package/lib/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/lib/components/ContentPage/ContentPageHead.js +0 -18
- package/lib/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/bundle/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/dist/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/dist/components/ContentPage/ContentPageHead.js +0 -20
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/lib/components/ContentPage/ContentPageHead.js +0 -18
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +0 -43
- package/src/components/ContentPage/ContentPageHead.tsx +0 -43
|
@@ -6,9 +6,9 @@ export type HeadlineVersion = 'XXL' | 'XL' | 'L' | 'M' | 'S';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @title Размер заголовка
|
|
9
|
-
* @enumNames ["Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
9
|
+
* @enumNames ["Заголовок", "Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
10
10
|
*/
|
|
11
|
-
export type HeadlineSmallVersion = 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
11
|
+
export type HeadlineSmallVersion = 'H6' | 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
12
12
|
|
|
13
13
|
export type TitleProps = {
|
|
14
14
|
/** @title Заголовок */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { ListItemSize, ListItemVersion } from './ListProps';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* @title Параметры элемента списка
|
|
5
6
|
*/
|
|
@@ -18,19 +19,21 @@ const LIST_DOT_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
const DOT_SIZE_MAP = {
|
|
21
|
-
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4
|
|
22
|
-
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3
|
|
23
|
-
S: 'w-1 h-1 min-w-1 min-h-1 mr-2
|
|
22
|
+
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
23
|
+
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
24
|
+
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const ListItem = JSX<ListItemProps>(
|
|
27
28
|
({ className = '', isDotted = true, children, version = 'primary', size = 'M' }) => {
|
|
28
29
|
return (
|
|
29
|
-
<div className={`font-sans flex items-
|
|
30
|
+
<div className={`font-sans flex items-baseline ${className}`} role="listitem">
|
|
30
31
|
{isDotted ? (
|
|
31
|
-
<div
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
<div>
|
|
33
|
+
<div
|
|
34
|
+
className={`rounded-full align-middle inline-block ${LIST_DOT_STYLE_MAP[version]} ${DOT_SIZE_MAP[size]}`}
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
34
37
|
) : null}
|
|
35
38
|
<span>{children}</span>
|
|
36
39
|
</div>
|
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import
|
|
2
|
+
import { AlignText } from '../../model/AlignText';
|
|
3
3
|
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
6
|
import type { AccordionContent } from './AccordionContent';
|
|
7
7
|
import { AccordionItemsList } from './AccordionItemsList';
|
|
8
8
|
|
|
9
|
-
const ALIGN_TITLE: Record<AlignType, string> = {
|
|
10
|
-
left: 'text-left',
|
|
11
|
-
center: 'text-center',
|
|
12
|
-
right: 'text-right',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
9
|
export interface AccordionProps extends AccordionContent, UniBlockProps {}
|
|
16
10
|
|
|
17
11
|
export const Accordion: JSXBlock<AccordionProps> = JSX<AccordionProps>(
|
|
@@ -33,7 +27,7 @@ export const Accordion: JSXBlock<AccordionProps> = JSX<AccordionProps>(
|
|
|
33
27
|
<Heading
|
|
34
28
|
headingType="h3"
|
|
35
29
|
as="h2"
|
|
36
|
-
className={`mb-2.5 ${
|
|
30
|
+
className={`mb-2.5 ${AlignText[accordionAlignTitle]}`}
|
|
37
31
|
title={title}
|
|
38
32
|
/>
|
|
39
33
|
) : null}
|
package/src/components/Blocks.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Calculator } from './Calculator/Calculator';
|
|
|
7
7
|
import { CardTransfer } from './CardTransfer/CardTransfer';
|
|
8
8
|
import { Catalog } from './Catalog/Catalog';
|
|
9
9
|
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
10
|
+
import { ContactsBlock } from './ContactsBlock/ContactsBlock';
|
|
10
11
|
import { ErrorBlock } from './ErrorBlock/ErrorBlock';
|
|
11
12
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
12
13
|
import { Footer } from './Footer/Footer';
|
|
@@ -46,6 +47,7 @@ export const Blocks = {
|
|
|
46
47
|
ComparisonTable,
|
|
47
48
|
Calculator,
|
|
48
49
|
Catalog,
|
|
50
|
+
ContactsBlock,
|
|
49
51
|
ExchangeRateTile,
|
|
50
52
|
Footer,
|
|
51
53
|
Gallery,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contactsBlockVersion": "secondary",
|
|
3
|
+
"info": [
|
|
4
|
+
{
|
|
5
|
+
"title": "Заголовок 1",
|
|
6
|
+
"description": "Описание 1",
|
|
7
|
+
"button": {
|
|
8
|
+
"href": "#",
|
|
9
|
+
"text": "Кнопка 1",
|
|
10
|
+
"target": "_blank",
|
|
11
|
+
"version": "secondary"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"title": "Заголовок 2",
|
|
16
|
+
"description": "Описание 2",
|
|
17
|
+
"button": {
|
|
18
|
+
"href": "#",
|
|
19
|
+
"text": "Кнопка 2",
|
|
20
|
+
"target": "_blank",
|
|
21
|
+
"version": "secondary"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"contacts": [
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
"title": "Заголовок 3",
|
|
29
|
+
"description": "Описание 3",
|
|
30
|
+
"additionalDescription": "Доп описание 3"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Заголовок 4",
|
|
34
|
+
"description": "Описание 4",
|
|
35
|
+
"additionalDescription": "Доп описание 4"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
{
|
|
40
|
+
"title": "Заголовок 5",
|
|
41
|
+
"description": "Описание 5",
|
|
42
|
+
"additionalDescription": "Доп описание 5"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Заголовок 6",
|
|
46
|
+
"description": "Описание 6",
|
|
47
|
+
"additionalDescription": "Доп описание 6"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { context } from '../../react/setup-fixture';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import { ContactsBlock } from './ContactsBlock';
|
|
4
|
+
|
|
5
|
+
const button: ButtonProps = {
|
|
6
|
+
href: '#',
|
|
7
|
+
text: 'Перейти',
|
|
8
|
+
target: '_blank',
|
|
9
|
+
version: 'secondary',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
default: (
|
|
14
|
+
<ContactsBlock
|
|
15
|
+
className="col-span-12"
|
|
16
|
+
info={[
|
|
17
|
+
{
|
|
18
|
+
title: 'Телеграм-канал РСХБ Инвестиции',
|
|
19
|
+
description:
|
|
20
|
+
'Всегда вовремя: главные новости, инвестиционные идеи, анонсы размещения облигаций',
|
|
21
|
+
button,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Подписка на аналитику',
|
|
25
|
+
description: 'E-mail рассылка: главное за неделю',
|
|
26
|
+
button,
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
contacts={[
|
|
30
|
+
[
|
|
31
|
+
{
|
|
32
|
+
title: '8 (800) 100-40-40',
|
|
33
|
+
description: 'Для консультаций',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '8 (800) 100-40-60',
|
|
37
|
+
description: 'Для подачи торговых поручений',
|
|
38
|
+
additionalDescription: 'Потребуется назвать уникальный код клиента и кодовое слово',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
{
|
|
43
|
+
title: 'invest@rshb.ru',
|
|
44
|
+
description: 'По брокерскому обслуживанию',
|
|
45
|
+
additionalDescription: 'Восстановление логина и номера соглашения',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: 'broker@rshb.ru',
|
|
49
|
+
description: 'По брокерскому обслуживанию',
|
|
50
|
+
additionalDescription: 'Получение расчета финансового результата и справки 2-НДФЛ',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
]}
|
|
54
|
+
context={context}
|
|
55
|
+
/>
|
|
56
|
+
),
|
|
57
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
5
|
+
import { Description } from '../../ui-kit/Description/Description';
|
|
6
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
|
+
import type { ContactItemProps, ContactsBlockContent, InfoItemProps } from './ContactsBlockContent';
|
|
8
|
+
|
|
9
|
+
export interface ContactsBlockProps extends ContactsBlockContent, UniBlockProps {}
|
|
10
|
+
|
|
11
|
+
interface RenderContactsColumnProps {
|
|
12
|
+
contactsColumn?: ContactItemProps[];
|
|
13
|
+
index?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const contactsBlockStyleMap = {
|
|
17
|
+
primary: 'bg-white',
|
|
18
|
+
secondary: 'bg-primary-main text-white',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const ContactsBlock = JSX<ContactsBlockProps>(
|
|
22
|
+
({ className = '', contacts, context, info, contactsBlockVersion = 'secondary', ...rest }) => {
|
|
23
|
+
return (
|
|
24
|
+
<BlockWrapper
|
|
25
|
+
context={context}
|
|
26
|
+
className={`${contactsBlockStyleMap[contactsBlockVersion]} flex p-12 ${className}`}
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{info ? renderInfo(info) : null}
|
|
30
|
+
{contacts ? renderContacts(contacts) : null}
|
|
31
|
+
</BlockWrapper>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const renderInfo = (info: InfoItemProps[]) => (
|
|
37
|
+
<div className="flex grow basis-0 pr-11">
|
|
38
|
+
{info.map(({ title, description, button }, index) => (
|
|
39
|
+
<div className="grow basis-0 pr-11 last:pr-0" key={String(index)}>
|
|
40
|
+
<Heading as="h5" headingType="h5" title={title} className="pb-2.5" />
|
|
41
|
+
<Description className="text-l-light pb-6" description={description} />
|
|
42
|
+
{button ? <Button {...button} /> : null}
|
|
43
|
+
</div>
|
|
44
|
+
))}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const renderContacts = (contacts: ContactItemProps[][]) => (
|
|
49
|
+
<div className="flex grow basis-0">
|
|
50
|
+
{contacts.map((contactsColumn, index) => renderContactsColumn({ contactsColumn, index }))}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const renderContactsColumn = ({ contactsColumn, index }: RenderContactsColumnProps) =>
|
|
55
|
+
contactsColumn ? (
|
|
56
|
+
<div className="flex flex-col grow basis-0 pr-11" key={String(index)}>
|
|
57
|
+
{contactsColumn.map(({ title, description, additionalDescription }, key) => (
|
|
58
|
+
<div className="pr-11 last:pr-0 last:mt-5" key={String(key)}>
|
|
59
|
+
<Heading as="h5" headingType="h5" title={title} />
|
|
60
|
+
<Description className="text-l-light mt-2.5" description={description} />
|
|
61
|
+
{additionalDescription ? (
|
|
62
|
+
<Description
|
|
63
|
+
className="text-m-light mt-1.5 opacity-80"
|
|
64
|
+
description={additionalDescription}
|
|
65
|
+
/>
|
|
66
|
+
) : null}
|
|
67
|
+
</div>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
) : null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title Контакты
|
|
6
|
+
*/
|
|
7
|
+
export interface ContactsBlockContent {
|
|
8
|
+
/**
|
|
9
|
+
* @title Данные
|
|
10
|
+
* @maxItems 2
|
|
11
|
+
* */
|
|
12
|
+
info?: InfoItemProps[];
|
|
13
|
+
/**
|
|
14
|
+
* @title Контакты
|
|
15
|
+
* @maxItems 2
|
|
16
|
+
* */
|
|
17
|
+
contacts?: ContactItemProps[][];
|
|
18
|
+
contactsBlockVersion?: 'secondary';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title Элемент плитки
|
|
23
|
+
*/
|
|
24
|
+
export interface ContactItemProps {
|
|
25
|
+
/** @title Дополнительное описание */
|
|
26
|
+
additionalDescription?: string;
|
|
27
|
+
/** @title Описание */
|
|
28
|
+
description?: string;
|
|
29
|
+
/** @title Заголовок */
|
|
30
|
+
title?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @title Элемент плитки
|
|
35
|
+
*/
|
|
36
|
+
export interface InfoItemProps extends HeadlineCommonProps {
|
|
37
|
+
/** @title Кнопка */
|
|
38
|
+
button?: ButtonProps;
|
|
39
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
+
|
|
3
|
+
export function renderContentPageHead(data: ContentPageMeta) {
|
|
4
|
+
const { title, main, og, twitter, jsonLd } = data;
|
|
5
|
+
const { description, keywords, canonical, robots } = main || {};
|
|
6
|
+
|
|
7
|
+
return [
|
|
8
|
+
<title>{title}</title>,
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />,
|
|
10
|
+
description ? <meta name="description" content={description} /> : null,
|
|
11
|
+
keywords ? <meta name="keywords" content={keywords.join(',')} /> : null,
|
|
12
|
+
robots ? <meta name="robots" content={robots.join(',')} /> : null,
|
|
13
|
+
renderOpenGraph(og),
|
|
14
|
+
renderTwitter(twitter),
|
|
15
|
+
canonical ? <link rel="canonical" href={canonical} /> : null,
|
|
16
|
+
jsonLd ? <script type="application/ld+json">{jsonLd}</script> : null,
|
|
17
|
+
].filter(Boolean);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function renderOpenGraph(og: Record<string, string> | undefined) {
|
|
21
|
+
return og
|
|
22
|
+
? Object.entries(og).map(([key, value]) => (
|
|
23
|
+
<meta key={key} property={`og:${key}`} content={value} />
|
|
24
|
+
))
|
|
25
|
+
: null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function renderTwitter(twitter: Record<string, string> | undefined) {
|
|
29
|
+
return twitter
|
|
30
|
+
? Object.entries(twitter).map(([key, value]) => (
|
|
31
|
+
<meta key={key} name={`twitter:${key}`} content={value} />
|
|
32
|
+
))
|
|
33
|
+
: null;
|
|
34
|
+
}
|
|
@@ -32,19 +32,19 @@ const defaultItems = [
|
|
|
32
32
|
|
|
33
33
|
const cards: GalleryCardProps[] = [
|
|
34
34
|
{
|
|
35
|
-
image,
|
|
35
|
+
icon: image,
|
|
36
36
|
title: 'Вклады в любой валюте',
|
|
37
37
|
description: 'О Вклады до 1,4 млн застрахованы в государственной системе страхования вкладов',
|
|
38
38
|
button: link,
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
image,
|
|
41
|
+
icon: image,
|
|
42
42
|
title: 'Вклады в любой валюте',
|
|
43
43
|
description: 'О Вклады до 1,4 млн застрахованы в государственной системе страхования вкладов',
|
|
44
44
|
version: 'secondary',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
image,
|
|
47
|
+
icon: image,
|
|
48
48
|
title: 'Вклады в любой валюте',
|
|
49
49
|
isDotted,
|
|
50
50
|
items: defaultItems,
|
|
@@ -46,7 +46,7 @@ export const defaultProps: GalleryProps = {
|
|
|
46
46
|
title: 'Более 5000 товаров',
|
|
47
47
|
description:
|
|
48
48
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
49
|
-
image,
|
|
49
|
+
icon: image,
|
|
50
50
|
button: buttonPrimary,
|
|
51
51
|
isDotted,
|
|
52
52
|
items: defaultItems,
|
|
@@ -55,7 +55,7 @@ export const defaultProps: GalleryProps = {
|
|
|
55
55
|
{
|
|
56
56
|
title: 'Более 1000 развлечений',
|
|
57
57
|
description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
|
|
58
|
-
image,
|
|
58
|
+
icon: image,
|
|
59
59
|
button: buttonPrimaryIcon,
|
|
60
60
|
isDotted,
|
|
61
61
|
items: defaultItems,
|
|
@@ -63,7 +63,7 @@ export const defaultProps: GalleryProps = {
|
|
|
63
63
|
{
|
|
64
64
|
title: 'Фермерские продукты',
|
|
65
65
|
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
66
|
-
image,
|
|
66
|
+
icon: image,
|
|
67
67
|
button: buttonPrimary,
|
|
68
68
|
isDotted,
|
|
69
69
|
items: defaultItems,
|
|
@@ -72,7 +72,7 @@ export const defaultProps: GalleryProps = {
|
|
|
72
72
|
title: '«Моя выгода»',
|
|
73
73
|
description:
|
|
74
74
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
75
|
-
image,
|
|
75
|
+
icon: image,
|
|
76
76
|
button: buttonPrimary,
|
|
77
77
|
isDotted,
|
|
78
78
|
items: defaultItems,
|
|
@@ -89,26 +89,26 @@ const textAndButtonProps: GalleryProps = {
|
|
|
89
89
|
title: 'Более 5000 товаров',
|
|
90
90
|
description:
|
|
91
91
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
92
|
-
image,
|
|
92
|
+
icon: image,
|
|
93
93
|
button: buttonPrimary,
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
title: 'Более 1000 развлечений',
|
|
97
97
|
description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
|
|
98
|
-
image,
|
|
98
|
+
icon: image,
|
|
99
99
|
button: buttonPrimary,
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
title: 'Фермерские продукты',
|
|
103
103
|
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
104
|
-
image,
|
|
104
|
+
icon: image,
|
|
105
105
|
button: buttonPrimary,
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
title: '«Моя выгода»',
|
|
109
109
|
description:
|
|
110
110
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
111
|
-
image,
|
|
111
|
+
icon: image,
|
|
112
112
|
button: buttonPrimary,
|
|
113
113
|
},
|
|
114
114
|
],
|
|
@@ -121,28 +121,28 @@ const listAndButtonProps: GalleryProps = {
|
|
|
121
121
|
cards: [
|
|
122
122
|
{
|
|
123
123
|
title: 'Более 5000 товаров',
|
|
124
|
-
image,
|
|
124
|
+
icon: image,
|
|
125
125
|
button: buttonPrimary,
|
|
126
126
|
isDotted,
|
|
127
127
|
items: defaultItems,
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
title: 'Более 1000 развлечений',
|
|
131
|
-
image,
|
|
131
|
+
icon: image,
|
|
132
132
|
button: buttonPrimary,
|
|
133
133
|
isDotted,
|
|
134
134
|
items: defaultItems,
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
title: 'Фермерские продукты',
|
|
138
|
-
image,
|
|
138
|
+
icon: image,
|
|
139
139
|
button: buttonPrimary,
|
|
140
140
|
isDotted,
|
|
141
141
|
items: defaultItems,
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
title: '«Моя выгода»',
|
|
145
|
-
image,
|
|
145
|
+
icon: image,
|
|
146
146
|
button: buttonPrimary,
|
|
147
147
|
isDotted,
|
|
148
148
|
items: defaultItems,
|
|
@@ -159,49 +159,45 @@ const textAndNoButtonProps: GalleryProps = {
|
|
|
159
159
|
title: 'Более 5000 товаров',
|
|
160
160
|
description:
|
|
161
161
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
162
|
-
image,
|
|
162
|
+
icon: image,
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
title: 'Более 1000 развлечений',
|
|
166
166
|
description: 'Порядок и условия предоставления в соответствии с 106 ФЗ',
|
|
167
|
-
image,
|
|
167
|
+
icon: image,
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
title: 'Фермерские продукты',
|
|
171
171
|
description: 'Высокий процент даже при небольшой сумме денежных средств',
|
|
172
|
-
image,
|
|
172
|
+
icon: image,
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
title: '«Моя выгода»',
|
|
176
176
|
description:
|
|
177
177
|
'Время копить: ставка растет в зависимости от срока нахождения средств на Счете!',
|
|
178
|
-
image,
|
|
178
|
+
icon: image,
|
|
179
179
|
},
|
|
180
180
|
],
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
const onlyTitleProps: GalleryProps = {
|
|
184
184
|
title: 'Вы можете оплатить бонусными баллами',
|
|
185
|
-
description: 'Удобный каталог с большим ассортиментом товаров и сервисов',
|
|
186
185
|
context,
|
|
187
186
|
cards: [
|
|
188
187
|
{
|
|
189
188
|
title: 'Более 5000 товаров',
|
|
190
|
-
|
|
189
|
+
icon: { icon: 'PercentageRoundIcon' },
|
|
191
190
|
},
|
|
192
191
|
{
|
|
193
192
|
title: 'Более 1000 развлечений',
|
|
194
|
-
|
|
193
|
+
icon: { icon: 'InterestIcon' },
|
|
195
194
|
},
|
|
196
195
|
{
|
|
197
196
|
title: 'Фермерские продукты',
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
title: '«Моя выгода»',
|
|
202
|
-
image,
|
|
197
|
+
icon: { icon: 'WalletIcon' },
|
|
203
198
|
},
|
|
204
199
|
],
|
|
200
|
+
button: buttonPrimary,
|
|
205
201
|
};
|
|
206
202
|
|
|
207
203
|
export default {
|
|
@@ -11,6 +11,7 @@ import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl
|
|
|
11
11
|
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
12
12
|
import type { GalleryCardProps, GalleryItemProps } from './GalleryContent';
|
|
13
13
|
import type { GalleryProps } from './GalleryProps';
|
|
14
|
+
import { Picture } from '../../model/Picture';
|
|
14
15
|
|
|
15
16
|
export const Gallery = JSX<GalleryProps>(
|
|
16
17
|
({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
|
|
@@ -54,11 +55,7 @@ function renderCard(card: GalleryCardProps, key: number) {
|
|
|
54
55
|
key={key}
|
|
55
56
|
>
|
|
56
57
|
<div>
|
|
57
|
-
{card.
|
|
58
|
-
<div className="flex justify-center">
|
|
59
|
-
<Img className="mb-3.5" image={card.image} />
|
|
60
|
-
</div>
|
|
61
|
-
) : null}
|
|
58
|
+
{renderImage(card.icon)}
|
|
62
59
|
{card.title ? <h3 className={`text-m-title-xs font-medium m-0`}>{card.title}</h3> : null}
|
|
63
60
|
{card.description ? renderDescription(card) : null}
|
|
64
61
|
{card.items?.length ? renderItems(card.items, card.isDotted, card.version) : null}
|
|
@@ -68,6 +65,13 @@ function renderCard(card: GalleryCardProps, key: number) {
|
|
|
68
65
|
);
|
|
69
66
|
}
|
|
70
67
|
|
|
68
|
+
const renderImage = (image?: Picture) =>
|
|
69
|
+
image?.src || image?.icon ? (
|
|
70
|
+
<div className="flex justify-center">
|
|
71
|
+
<Img className="mb-3.5" image={image} />
|
|
72
|
+
</div>
|
|
73
|
+
) : null;
|
|
74
|
+
|
|
71
75
|
function renderButton(button?: ButtonWithIconProps) {
|
|
72
76
|
return <Button className="mt-3" {...button} />;
|
|
73
77
|
}
|