@redneckz/wildless-cms-uni-blocks 0.3.71 → 0.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +29 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +21 -3
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
- package/dist/components/Bonus/BonusContent.d.ts +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js +1 -3
- package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/dist/components/Headline/Headline.js +2 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +1 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -1
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +16 -2
- package/dist/components/LinkDocs/LinkDocs.js +3 -12
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js +3 -3
- package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/dist/components/LinkDocs/linkDocsContentExample.js +1 -1
- package/dist/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +9 -2
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -3
- package/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +6 -1
- package/dist/react/IntersectionObserverTag.d.ts +2 -3
- package/dist/react/IntersectionObserverTag.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.fixture.d.ts +2 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +21 -3
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
- package/lib/components/Bonus/BonusContent.d.ts +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js +1 -3
- package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/lib/components/Headline/Headline.js +2 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +1 -1
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -1
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +16 -2
- package/lib/components/LinkDocs/LinkDocs.js +3 -12
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js +3 -3
- package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/lib/components/LinkDocs/linkDocsContentExample.js +1 -1
- package/lib/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +9 -2
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -3
- package/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +6 -1
- package/lib/react/IntersectionObserverTag.d.ts +2 -3
- package/lib/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +21 -3
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
- package/mobile/dist/components/Bonus/BonusContent.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js +1 -3
- package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/dist/components/Headline/Headline.js +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -1
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +16 -2
- package/mobile/dist/components/LinkDocs/LinkDocs.js +3 -3
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/mobile/dist/components/LinkDocs/linkDocsContentExample.js +1 -1
- package/mobile/dist/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +9 -2
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -3
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +6 -1
- package/mobile/dist/react/IntersectionObserverTag.d.ts +2 -3
- package/mobile/dist/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +21 -3
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +39 -12
- package/mobile/lib/components/Bonus/BonusContent.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js +1 -3
- package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
- package/mobile/lib/components/Headline/Headline.js +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -1
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +16 -2
- package/mobile/lib/components/LinkDocs/LinkDocs.js +3 -3
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
- package/mobile/lib/components/LinkDocs/linkDocsContentExample.js +1 -1
- package/mobile/lib/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +9 -2
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -3
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +6 -1
- package/mobile/lib/react/IntersectionObserverTag.d.ts +2 -3
- package/mobile/lib/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +9 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +48 -12
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +46 -16
- package/mobile/src/components/Bonus/BonusContent.ts +1 -1
- package/mobile/src/components/ComparisonTable/TableCell.tsx +8 -7
- package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +5 -1
- package/mobile/src/components/Headline/Headline.tsx +3 -5
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -1
- package/mobile/src/components/Insurance/Insurance.tsx +2 -3
- package/mobile/src/components/Insurance/InsuranceContent.ts +23 -9
- package/mobile/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +10 -12
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsVerticalList.tsx +3 -1
- package/mobile/src/components/LinkDocs/linkDocsContentExample.ts +1 -1
- package/mobile/src/components/PictureText/PictureText.tsx +6 -7
- package/mobile/src/components/PictureText/PictureTextContent.ts +10 -2
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +11 -3
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -2
- package/mobile/src/components/ProductTile/ProductTileContent.ts +7 -1
- package/mobile/src/react/IntersectionObserverTag.tsx +3 -3
- package/package.json +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.example.json +9 -1
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +72 -9
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +48 -12
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +46 -16
- package/src/components/Bonus/Bonus.fixture.tsx +3 -3
- package/src/components/Bonus/BonusContent.ts +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +0 -9
- package/src/components/ComparisonTable/TableCell.mobile.tsx +8 -7
- package/src/components/ContentPage/ContentPage.page.json +1 -1
- package/src/components/ContentPage/ContentPageContext.tsx +5 -1
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +0 -7
- package/src/components/Headline/Headline.mobile.tsx +3 -5
- package/src/components/Headline/Headline.tsx +8 -5
- package/src/components/Headline/HeadlineContent.ts +2 -1
- package/src/components/Insurance/Insurance.fixture.tsx +2 -2
- package/src/components/Insurance/Insurance.tsx +2 -3
- package/src/components/Insurance/InsuranceContent.ts +23 -9
- package/src/components/LinkDocs/LinkDocs.example.json +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +1 -6
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +10 -12
- package/src/components/LinkDocs/LinkDocs.tsx +13 -34
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsVerticalList.tsx +3 -1
- package/src/components/LinkDocs/linkDocsContentExample.ts +1 -1
- package/src/components/PictureText/PictureText.tsx +6 -7
- package/src/components/PictureText/PictureTextContent.ts +10 -2
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +3 -3
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -3
- package/src/components/ProductBlock/ProductBlockContent.ts +11 -3
- package/src/components/ProductBlock/renderBenefit.tsx +3 -3
- package/src/components/ProductTile/ProductTile.tsx +1 -2
- package/src/components/ProductTile/ProductTileContent.ts +7 -1
- package/src/react/IntersectionObserverTag.tsx +3 -3
|
@@ -15,21 +15,24 @@ export const Headline = JSX<HeadlineProps>(
|
|
|
15
15
|
title,
|
|
16
16
|
description,
|
|
17
17
|
anchor = null,
|
|
18
|
+
headingType = 'h2',
|
|
18
19
|
}) => {
|
|
19
20
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
21
|
+
|
|
20
22
|
return (
|
|
21
|
-
<section
|
|
23
|
+
<section
|
|
24
|
+
className={`p-[50px] flex flex-col gap-4 ${STYLE_MAPS.background} ${className}`}
|
|
25
|
+
id={anchor}
|
|
26
|
+
>
|
|
22
27
|
{title ? (
|
|
23
28
|
<Heading
|
|
24
|
-
headingType=
|
|
29
|
+
headingType={headingType}
|
|
25
30
|
className={`text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}
|
|
26
31
|
title={title}
|
|
27
32
|
/>
|
|
28
33
|
) : null}
|
|
29
34
|
{description ? (
|
|
30
|
-
<p className={`
|
|
31
|
-
{description}
|
|
32
|
-
</p>
|
|
35
|
+
<p className={`text-base ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`}>{description}</p>
|
|
33
36
|
) : null}
|
|
34
37
|
</section>
|
|
35
38
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersionWithTransparent } from '../../model/BlockVersion';
|
|
2
2
|
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
|
-
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
3
|
+
import type { HeadingContent, HeadingType } from '../../ui-kit/Heading/HeadingContent';
|
|
4
4
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
5
5
|
import type { AlignType } from '../../model/AlignType';
|
|
6
6
|
|
|
@@ -12,4 +12,5 @@ export type HeadlineContent = HeadingContent &
|
|
|
12
12
|
ImageContent & {
|
|
13
13
|
align?: AlignType;
|
|
14
14
|
bgColorHeadline?: BlockVersionWithTransparent;
|
|
15
|
+
headingType?: HeadingType;
|
|
15
16
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../react/setup-fixture';
|
|
3
|
-
import {
|
|
3
|
+
import type { InsuranceBenefit } from './InsuranceContent';
|
|
4
4
|
import { Insurance } from './Insurance';
|
|
5
5
|
|
|
6
|
-
const benefits:
|
|
6
|
+
const benefits: InsuranceBenefit[] = [
|
|
7
7
|
{
|
|
8
8
|
label: 'Телесное повреждение',
|
|
9
9
|
description: 'Описание',
|
|
@@ -3,8 +3,7 @@ import type { UniBlockProps } from '../../types';
|
|
|
3
3
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
4
|
import { Img } from '../../ui-kit/Img/Img';
|
|
5
5
|
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
6
|
-
import type {
|
|
7
|
-
import type { InsuranceContent } from './InsuranceContent';
|
|
6
|
+
import type { InsuranceBenefit, InsuranceContent } from './InsuranceContent';
|
|
8
7
|
|
|
9
8
|
export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
|
|
10
9
|
|
|
@@ -36,7 +35,7 @@ export const Insurance = JSX<InsuranceProps>(
|
|
|
36
35
|
},
|
|
37
36
|
);
|
|
38
37
|
|
|
39
|
-
function renderBenefit(benefit:
|
|
38
|
+
function renderBenefit(benefit: InsuranceBenefit, i: number) {
|
|
40
39
|
return (
|
|
41
40
|
<div key={String(i)} className="flex items-center gap-5">
|
|
42
41
|
{benefit?.icon ? (
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import type { BenefitsBlockContent } from '../BenefitsBlock/BenefitsBlockContent';
|
|
3
2
|
import type { InsuranceProps } from '../../model/Insurance';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @title Преимущество
|
|
6
|
+
*/
|
|
7
|
+
export interface InsuranceBenefit {
|
|
8
|
+
/** @title Название */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** @title Описание */
|
|
11
|
+
description?: string;
|
|
12
|
+
icon?: Picture;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InsuranceContent = InsuranceProps & {
|
|
16
|
+
/** @title Заголовок */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** @title Описание */
|
|
19
|
+
description?: string;
|
|
20
|
+
image?: Picture;
|
|
21
|
+
/**
|
|
22
|
+
* @title Список преимуществ
|
|
23
|
+
* @maxItems 6
|
|
24
|
+
*/
|
|
25
|
+
benefits?: InsuranceBenefit[];
|
|
26
|
+
};
|
|
@@ -5,12 +5,7 @@ import { linkDocsContentExample } from './linkDocsContentExample';
|
|
|
5
5
|
export default {
|
|
6
6
|
'vertical (default)': (
|
|
7
7
|
<div className="container grid grid-cols-12">
|
|
8
|
-
<LinkDocs
|
|
9
|
-
className="col-span-12"
|
|
10
|
-
context={mobileContext}
|
|
11
|
-
subtitle="Откройте мультивалютный вклад, чтобы распределить свои вложения"
|
|
12
|
-
{...linkDocsContentExample}
|
|
13
|
-
/>
|
|
8
|
+
<LinkDocs className="col-span-12" context={mobileContext} {...linkDocsContentExample} />
|
|
14
9
|
</div>
|
|
15
10
|
),
|
|
16
11
|
'vertical, no border': (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
3
|
import type { LinkDocsContent } from './LinkDocsContent';
|
|
5
4
|
import { LinkDocsHorizontalList } from './LinkDocsHorizontalList';
|
|
6
5
|
import { LinkDocsVerticalList } from './LinkDocsVerticalList';
|
|
6
|
+
import { Headline } from '../Headline/Headline';
|
|
7
7
|
|
|
8
8
|
export interface LinkDocsProps extends LinkDocsContent, UniBlockProps {}
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
12
12
|
className = '',
|
|
13
13
|
context,
|
|
14
14
|
title,
|
|
15
|
-
|
|
15
|
+
description,
|
|
16
16
|
icon = { icon: 'DocIconMonoColor' },
|
|
17
17
|
documents,
|
|
18
18
|
orientation = 'vertical',
|
|
@@ -22,16 +22,14 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
22
22
|
<section
|
|
23
23
|
className={`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`}
|
|
24
24
|
>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<h3 className="mt-0 font-normal mb-5 text-center text-m-md">{subtitle}</h3>
|
|
34
|
-
) : null}
|
|
25
|
+
<Headline
|
|
26
|
+
className={`!p-0 ${description ? 'gap-2' : 'gap-5'}`}
|
|
27
|
+
title={title}
|
|
28
|
+
description={description}
|
|
29
|
+
context={context}
|
|
30
|
+
align="center"
|
|
31
|
+
headingType="h3"
|
|
32
|
+
/>
|
|
35
33
|
{orientation === 'vertical' ? (
|
|
36
34
|
<LinkDocsVerticalList hasBorder={hasBorder} documents={documents} icon={icon} />
|
|
37
35
|
) : (
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import {
|
|
4
|
-
import type { AlignType } from '../../model/AlignType';
|
|
3
|
+
import { Headline } from '../Headline/Headline';
|
|
5
4
|
import type { LinkColumnsMode, LinkDocsContent } from './LinkDocsContent';
|
|
6
5
|
import { LinkDocsList } from './LinkDocsList';
|
|
7
6
|
|
|
8
|
-
const titleAlignStyleMap: Record<AlignType, string> = {
|
|
9
|
-
left: 'text-left',
|
|
10
|
-
center: 'text-center',
|
|
11
|
-
right: 'text-right',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const titleMarginsStyleMap: Record<LinkColumnsMode, string> = {
|
|
15
|
-
double: 'mb-8',
|
|
16
|
-
single: 'mb-[26px]',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
7
|
const linkColumnsModeStyleMap: Record<LinkColumnsMode, string> = {
|
|
20
8
|
double: 'flex gap-x-5 gap-y-[26px] flex-wrap',
|
|
21
9
|
single: 'flex gap-3.5 flex-col',
|
|
@@ -25,10 +13,11 @@ export interface LinkDocsProps extends LinkDocsContent, UniBlockProps {}
|
|
|
25
13
|
|
|
26
14
|
export const LinkDocs = JSX<LinkDocsProps>(
|
|
27
15
|
({
|
|
16
|
+
context,
|
|
28
17
|
className = '',
|
|
29
18
|
title,
|
|
30
|
-
|
|
31
|
-
align,
|
|
19
|
+
description,
|
|
20
|
+
align = 'center',
|
|
32
21
|
documents,
|
|
33
22
|
icon = { icon: 'DocIcon' },
|
|
34
23
|
columnsMode = 'double',
|
|
@@ -36,26 +25,16 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
36
25
|
}) => {
|
|
37
26
|
return (
|
|
38
27
|
<section className={`font-sans text-primary-text p-[50px] bg-white ${className}`} id={anchor}>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
) : null}
|
|
48
|
-
{subtitle ? (
|
|
49
|
-
<h3
|
|
50
|
-
className={`text-base mt-0 font-normal ${titleMarginsStyleMap[columnsMode]} ${
|
|
51
|
-
titleAlignStyleMap[align ?? 'center']
|
|
52
|
-
}`}
|
|
53
|
-
>
|
|
54
|
-
{subtitle}
|
|
55
|
-
</h3>
|
|
56
|
-
) : null}
|
|
28
|
+
<Headline
|
|
29
|
+
className="!p-0"
|
|
30
|
+
title={title}
|
|
31
|
+
description={description}
|
|
32
|
+
context={context}
|
|
33
|
+
align={align}
|
|
34
|
+
headingType="h3"
|
|
35
|
+
/>
|
|
57
36
|
<LinkDocsList
|
|
58
|
-
className={linkColumnsModeStyleMap[columnsMode]}
|
|
37
|
+
className={`mt-8 ${linkColumnsModeStyleMap[columnsMode]}`}
|
|
59
38
|
columnsMode={columnsMode}
|
|
60
39
|
documents={documents}
|
|
61
40
|
icon={icon}
|
|
@@ -11,7 +11,7 @@ export interface LinkDocsHorizontalListProps extends LinkDocsVerticalListProps {
|
|
|
11
11
|
export const LinkDocsHorizontalList = JSX<LinkDocsHorizontalListProps>(
|
|
12
12
|
({ context, hasBorder = true, documents, icon }) => {
|
|
13
13
|
return (
|
|
14
|
-
<SwipeListControl context={context} className="text-m-sm text-primary-main">
|
|
14
|
+
<SwipeListControl context={context} className="text-m-sm text-primary-main mt-5">
|
|
15
15
|
{documents?.length
|
|
16
16
|
? documents.map((doc, i) => (
|
|
17
17
|
<LinkDocsListItem
|
|
@@ -13,7 +13,9 @@ export const LinkDocsVerticalList = JSX<LinkDocsVerticalListProps>(
|
|
|
13
13
|
({ hasBorder = true, documents, icon }) => {
|
|
14
14
|
return (
|
|
15
15
|
<div
|
|
16
|
-
className={`text-m-sm text-primary-main flex flex-col
|
|
16
|
+
className={`text-m-sm text-primary-main flex flex-col mt-5 ${
|
|
17
|
+
hasBorder ? 'gap-3.5' : 'gap-2'
|
|
18
|
+
}`}
|
|
17
19
|
role="list"
|
|
18
20
|
>
|
|
19
21
|
{documents?.length
|
|
@@ -2,7 +2,7 @@ import type { LinkDocsContent } from './LinkDocsContent';
|
|
|
2
2
|
|
|
3
3
|
export const linkDocsContentExample: LinkDocsContent = {
|
|
4
4
|
title: 'Дополнительные документы',
|
|
5
|
-
|
|
5
|
+
description: 'Ответы на часто задаваемые вопросы',
|
|
6
6
|
documents: [
|
|
7
7
|
{ text: 'target self', href: '/abc1/cooldoc.doc', target: '_self' },
|
|
8
8
|
{ text: 'target blank', href: '/abc2/wtf.rtf', target: '_blank' },
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type { PictureTextContent } from './PictureTextContent';
|
|
3
|
+
import type { PictureTextContent, PictureTextBenefit } from './PictureTextContent';
|
|
4
4
|
|
|
5
5
|
import { BlockVersion } from '../../model/BlockVersion';
|
|
6
6
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
-
import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
9
8
|
|
|
10
9
|
export interface PictureTextProps extends PictureTextContent, UniBlockProps {}
|
|
11
10
|
|
|
@@ -43,7 +42,7 @@ export const PictureText = JSX<PictureTextProps>(
|
|
|
43
42
|
},
|
|
44
43
|
);
|
|
45
44
|
|
|
46
|
-
function renderBenefit(benefit:
|
|
45
|
+
function renderBenefit(benefit: PictureTextBenefit, i: number, version: string) {
|
|
47
46
|
return (
|
|
48
47
|
<div key={String(i)} className="flex flex-row mb-8">
|
|
49
48
|
{benefit.icon ? (
|
|
@@ -56,7 +55,7 @@ function renderBenefit(benefit: Benefit, i: number, version: string) {
|
|
|
56
55
|
/>
|
|
57
56
|
) : null}
|
|
58
57
|
<div className="flex gap-1 flex-col h-full ml-5 max-w-[490px]">
|
|
59
|
-
{benefit
|
|
58
|
+
{benefit?.label ? (
|
|
60
59
|
<div
|
|
61
60
|
className={`font-medium text-xl m-0 ${
|
|
62
61
|
version === 'primary' ? 'text-primary-text' : ''
|
|
@@ -64,14 +63,14 @@ function renderBenefit(benefit: Benefit, i: number, version: string) {
|
|
|
64
63
|
>
|
|
65
64
|
{benefit.label}
|
|
66
65
|
</div>
|
|
67
|
-
)}
|
|
68
|
-
{benefit
|
|
66
|
+
) : null}
|
|
67
|
+
{benefit?.description ? (
|
|
69
68
|
<div
|
|
70
69
|
className={`font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`}
|
|
71
70
|
>
|
|
72
71
|
{benefit.description}
|
|
73
72
|
</div>
|
|
74
|
-
)}
|
|
73
|
+
) : null}
|
|
75
74
|
</div>
|
|
76
75
|
</div>
|
|
77
76
|
);
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
3
3
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
4
|
-
import type {
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
5
|
|
|
6
6
|
export type TitleWithImageContent = HeadingContent & ImageContent;
|
|
7
7
|
|
|
8
|
+
export interface PictureTextBenefit {
|
|
9
|
+
icon?: Picture;
|
|
10
|
+
/** @title Название */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** @title Описание */
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
/**
|
|
9
17
|
* @title Картинка с текстом
|
|
10
18
|
*/
|
|
11
19
|
export interface PictureTextContent extends TitleWithImageContent {
|
|
12
20
|
version?: BlockVersion;
|
|
13
21
|
/** @title Список преимуществ */
|
|
14
|
-
benefits?:
|
|
22
|
+
benefits?: PictureTextBenefit[];
|
|
15
23
|
/**
|
|
16
24
|
* @title Картинка справа/текст слева
|
|
17
25
|
* @default false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../react/setup-fixture';
|
|
3
|
-
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
|
-
import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
5
3
|
import { ProductBlock } from './ProductBlock';
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
+
import type { ProductBlockBenefit } from './ProductBlockContent';
|
|
6
6
|
|
|
7
7
|
const title = 'Кредит до 5 000 000 Р\nбез залога и поручителей';
|
|
8
8
|
const description =
|
|
@@ -25,7 +25,7 @@ const image: Picture = {
|
|
|
25
25
|
],
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const benefits:
|
|
28
|
+
const benefits: ProductBlockBenefit[] = [
|
|
29
29
|
{
|
|
30
30
|
label: 'До 5 млн ₽',
|
|
31
31
|
description: 'Кредитный лимит',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../react/setup-fixture';
|
|
3
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
|
-
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
5
4
|
import { ProductBlock } from './ProductBlock';
|
|
6
|
-
import type { ProductBlockContent } from './ProductBlockContent';
|
|
5
|
+
import type { ProductBlockContent, ProductBlockBenefit } from './ProductBlockContent';
|
|
7
6
|
|
|
8
7
|
const image: Picture = {
|
|
9
8
|
src: 'money-1.png',
|
|
@@ -15,7 +14,7 @@ const image: Picture = {
|
|
|
15
14
|
},
|
|
16
15
|
};
|
|
17
16
|
|
|
18
|
-
const benefits:
|
|
17
|
+
const benefits: ProductBlockBenefit[] = [
|
|
19
18
|
{
|
|
20
19
|
label: 'До 5 млн ₽',
|
|
21
20
|
description: 'Кредитный лимит',
|
|
@@ -6,10 +6,18 @@ import type { DescriptionContent } from '../../ui-kit/Description/DescriptionCon
|
|
|
6
6
|
import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
|
|
7
7
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
8
8
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
9
|
-
import
|
|
9
|
+
import { Picture } from '../../model/Picture';
|
|
10
|
+
|
|
11
|
+
export interface ProductBlockBenefit {
|
|
12
|
+
icon?: Picture;
|
|
13
|
+
/** @title Название */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** @title Описание */
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
10
18
|
|
|
11
19
|
export type BenefitItemProps = {
|
|
12
|
-
benefit:
|
|
20
|
+
benefit: ProductBlockBenefit;
|
|
13
21
|
version?: BlockVersion;
|
|
14
22
|
benefitsVersion?: IconVersion;
|
|
15
23
|
};
|
|
@@ -25,7 +33,7 @@ export type ProductBlockInnerContent = HeadingContent &
|
|
|
25
33
|
* @minItems 2
|
|
26
34
|
* @maxItems 3
|
|
27
35
|
*/
|
|
28
|
-
benefits?:
|
|
36
|
+
benefits?: ProductBlockBenefit[];
|
|
29
37
|
benefitsVersion?: IconVersion;
|
|
30
38
|
version?: BlockVersion;
|
|
31
39
|
/**
|
|
@@ -27,13 +27,13 @@ export function renderBenefit(
|
|
|
27
27
|
asSVG
|
|
28
28
|
/>
|
|
29
29
|
) : null}
|
|
30
|
-
<div className="flex gap-0.5 flex-col h-full max-w-[149px]
|
|
30
|
+
<div className="flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]">
|
|
31
31
|
<div className={`text-xl m-0 ${benefitTitleStyleMap[version]}`}>{benefit.label}</div>
|
|
32
|
-
{benefit.description
|
|
32
|
+
{benefit.description ? (
|
|
33
33
|
<div className={`font-light text-m-md ${benefitDescStyleMap[version]}`}>
|
|
34
34
|
{benefit.description}
|
|
35
35
|
</div>
|
|
36
|
-
)}
|
|
36
|
+
) : null}
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
@@ -8,8 +8,7 @@ import { Img } from '../../ui-kit/Img/Img';
|
|
|
8
8
|
import { BaseTile } from '../BaseTile/BaseTile';
|
|
9
9
|
import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
|
|
10
10
|
import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
|
|
11
|
-
import type { TextBenefit } from '
|
|
12
|
-
import type { ProductTileContent } from './ProductTileContent';
|
|
11
|
+
import type { ProductTileContent, TextBenefit } from './ProductTileContent';
|
|
13
12
|
|
|
14
13
|
export interface ProductTileProps extends ProductTileContent, UniBlockProps {}
|
|
15
14
|
|
|
@@ -3,7 +3,13 @@ import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
|
3
3
|
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
export interface TextBenefit {
|
|
8
|
+
/** @title Название */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** @title Описание */
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
7
13
|
|
|
8
14
|
/**
|
|
9
15
|
* @title Продуктовая плитка
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useCallback, useRef } from 'react';
|
|
2
|
+
import { IntersectionObserverComponent } from '../components/ContentPage/ContentPageContext';
|
|
3
3
|
|
|
4
|
-
export const IntersectionObserverTag:
|
|
4
|
+
export const IntersectionObserverTag: IntersectionObserverComponent = (props) => {
|
|
5
5
|
const { Tag, observerCallback, observerOptions, children, ...rest } = props;
|
|
6
6
|
|
|
7
7
|
const intersectionObserver = useRef<IntersectionObserver>();
|