@redneckz/wildless-cms-uni-blocks 0.5.15 → 0.6.16
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/bin/migration-scripts/0.6.16.js +90 -0
- package/bin/utils.js +2 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +57 -44
- 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/Foldable/DefaultFoldButton.js +13 -4
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- 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/Foldable/DefaultFoldButton.js +13 -4
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- 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/Foldable/DefaultFoldButton.js +13 -4
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- 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/Foldable/DefaultFoldButton.js +13 -4
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- 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 +38 -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/Foldable/DefaultFoldButton.tsx +32 -23
- 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 +38 -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/Foldable/DefaultFoldButton.tsx +32 -23
- 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
|
@@ -7,13 +7,14 @@ import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
|
7
7
|
import { galleryLengthForScrollMap } from './constants';
|
|
8
8
|
import { GalleryContainer } from './GalleryContainer';
|
|
9
9
|
import type { GalleryContent } from './GalleryContent';
|
|
10
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
10
11
|
|
|
11
12
|
export interface GalleryInnerProps extends GalleryContent, UniBlockProps {
|
|
12
13
|
version?: GalleryVersion;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const GalleryInner = JSX<GalleryInnerProps>(
|
|
16
|
-
({ context, cards = [], className = '', version = 'normal', ...rest }) => {
|
|
17
|
+
({ context, cards = [], className = '', version = 'normal', button, ...rest }) => {
|
|
17
18
|
const [activeCardIndex, setActiveCardIndex] = useState(0);
|
|
18
19
|
|
|
19
20
|
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
@@ -30,7 +31,7 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
30
31
|
return (
|
|
31
32
|
<BlockWrapper
|
|
32
33
|
context={context}
|
|
33
|
-
className={`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`}
|
|
34
|
+
className={`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${className}`}
|
|
34
35
|
{...rest}
|
|
35
36
|
>
|
|
36
37
|
<GalleryContainer
|
|
@@ -46,8 +47,14 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
46
47
|
btnClass: ['left-8', 'right-8'],
|
|
47
48
|
className: 'top-1/2',
|
|
48
49
|
})}
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
{isGalleryScrollAvailable ? (
|
|
51
|
+
<div>
|
|
52
|
+
<div className="absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" />
|
|
53
|
+
<div className="absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" />
|
|
54
|
+
</div>
|
|
55
|
+
) : null}
|
|
56
|
+
|
|
57
|
+
{button ? <Button className="mt-8 mx-auto" {...button} /> : null}
|
|
51
58
|
</BlockWrapper>
|
|
52
59
|
);
|
|
53
60
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { AlignText } from '../../model/AlignText';
|
|
2
3
|
|
|
3
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
|
-
import {
|
|
7
|
+
import { HEADLINE_BLOCK_STYLE_MAPS } from './constants';
|
|
7
8
|
import type { HeadlineContent } from './HeadlineContent';
|
|
8
9
|
|
|
9
10
|
export interface HeadlineProps extends UniBlockProps, HeadlineContent {}
|
|
@@ -24,12 +25,12 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
24
25
|
{title ? (
|
|
25
26
|
<Heading
|
|
26
27
|
headingType="h2"
|
|
27
|
-
className={`${STYLE_MAPS.text} ${
|
|
28
|
+
className={`${STYLE_MAPS.text} ${AlignText[align]}`}
|
|
28
29
|
title={title}
|
|
29
30
|
/>
|
|
30
31
|
) : null}
|
|
31
32
|
{description ? (
|
|
32
|
-
<p className={`text-m ${STYLE_MAPS.description} ${
|
|
33
|
+
<p className={`text-m ${STYLE_MAPS.description} ${AlignText[align]}`}>{description}</p>
|
|
33
34
|
) : null}
|
|
34
35
|
{image?.src && (
|
|
35
36
|
<div className="mt-2.5 mx-auto flex justify-center">
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import type { AlignType } from '../../model/AlignType';
|
|
2
1
|
import type { BlockVersionWithTransparent } from '../../model/BlockVersion';
|
|
3
2
|
import type { HeadlineSmallVersion, HeadlineVersion } from '../../model/HeadlineType';
|
|
4
3
|
import type { HeadingTagType, HeadingType } from '../../ui-kit/Heading/HeadingProps';
|
|
5
4
|
|
|
6
|
-
export const ALIGN_TEXT: Record<AlignType, string> = {
|
|
7
|
-
left: 'text-left',
|
|
8
|
-
center: 'text-center',
|
|
9
|
-
right: 'text-right',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
5
|
type StyleType = {
|
|
13
6
|
background: string;
|
|
14
7
|
text: string;
|
|
@@ -74,6 +67,7 @@ export const HEADLINE_VERSION: Record<HeadlineVersion, VersionStyleType> = {
|
|
|
74
67
|
};
|
|
75
68
|
|
|
76
69
|
export const HEADLINE_SMALL_VERSION: Record<HeadlineSmallVersion, string> = {
|
|
70
|
+
H6: 'text-h6',
|
|
77
71
|
XL_L: 'text-xl-light',
|
|
78
72
|
XL_R: 'text-xl',
|
|
79
73
|
L_L: 'text-l-light',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AlignType } from '../../model/AlignType';
|
|
1
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { Picture } from '../../model/Picture';
|
|
@@ -12,6 +13,11 @@ export type MobileAppTileContent = HeadlineCommonProps &
|
|
|
12
13
|
HeadingCommonProps &
|
|
13
14
|
ButtonContent &
|
|
14
15
|
ListContent & {
|
|
16
|
+
/**
|
|
17
|
+
* @title Выравнивание заголовка
|
|
18
|
+
* @default left
|
|
19
|
+
*/
|
|
20
|
+
alignTitle?: AlignType;
|
|
15
21
|
// TODO: description для мобильной версии
|
|
16
22
|
/** @title QR-код */
|
|
17
23
|
qr?: Picture;
|
|
@@ -59,7 +59,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
59
59
|
buttons?.length ? (
|
|
60
60
|
<ButtonSection
|
|
61
61
|
context={context}
|
|
62
|
-
buttons={buttons.map((button) => ({ ...button, className: 'w-[158px]' }))}
|
|
62
|
+
buttons={buttons.map((button) => ({ ...button, className: 'min-w-[158px]' }))}
|
|
63
63
|
className="flex mt-8 gap-3"
|
|
64
64
|
/>
|
|
65
65
|
) : null
|
|
@@ -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 Заголовок */
|
|
@@ -13,29 +13,38 @@ interface DefaultFoldButtonProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
|
|
16
|
-
({ className, label, icon, dataTheme = '', onClick }) =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
17
|
+
const STATE_STYLE =
|
|
18
|
+
'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
19
|
+
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<button
|
|
23
|
+
className={[
|
|
24
|
+
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
25
|
+
STATE_STYLE,
|
|
26
|
+
DIMENSIONS_STYLE,
|
|
27
|
+
className,
|
|
28
|
+
].join(' ')}
|
|
29
|
+
data-theme={dataTheme}
|
|
30
|
+
onClick={onClick}
|
|
31
|
+
>
|
|
32
|
+
<span className="text-h4 pr-3">{label}</span>
|
|
33
|
+
{icon ? (
|
|
34
|
+
<Img
|
|
35
|
+
image={{
|
|
36
|
+
icon,
|
|
37
|
+
iconVersion: 'white',
|
|
38
|
+
}}
|
|
39
|
+
className="flex-shrink-0 my-auto"
|
|
40
|
+
width="20"
|
|
41
|
+
height="20"
|
|
42
|
+
asSVG
|
|
43
|
+
/>
|
|
44
|
+
) : null}
|
|
45
|
+
</button>
|
|
46
|
+
);
|
|
47
|
+
},
|
|
39
48
|
);
|
|
40
49
|
|
|
41
50
|
export const renderDefaultFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
@@ -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,38 @@
|
|
|
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 key="title">{title}</title>,
|
|
9
|
+
<meta key="viewport" name="viewport" content="width=device-width, initial-scale=1" />,
|
|
10
|
+
description ? <meta key="description" name="description" content={description} /> : null,
|
|
11
|
+
keywords ? <meta key="keywords" name="keywords" content={keywords.join(',')} /> : null,
|
|
12
|
+
robots ? <meta key="robots" name="robots" content={robots.join(',')} /> : null,
|
|
13
|
+
renderOpenGraph(og),
|
|
14
|
+
renderTwitter(twitter),
|
|
15
|
+
canonical ? <link key="canonical" rel="canonical" href={canonical} /> : null,
|
|
16
|
+
jsonLd ? (
|
|
17
|
+
<script key="jsonLd" type="application/ld+json">
|
|
18
|
+
{jsonLd}
|
|
19
|
+
</script>
|
|
20
|
+
) : null,
|
|
21
|
+
].filter(Boolean);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function renderOpenGraph(og: Record<string, string> | undefined) {
|
|
25
|
+
return og
|
|
26
|
+
? Object.entries(og).map(([key, value]) => (
|
|
27
|
+
<meta key={key} property={`og:${key}`} content={value} />
|
|
28
|
+
))
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function renderTwitter(twitter: Record<string, string> | undefined) {
|
|
33
|
+
return twitter
|
|
34
|
+
? Object.entries(twitter).map(([key, value]) => (
|
|
35
|
+
<meta key={key} name={`twitter:${key}`} content={value} />
|
|
36
|
+
))
|
|
37
|
+
: null;
|
|
38
|
+
}
|
|
@@ -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,
|