@redneckz/wildless-cms-uni-blocks 0.3.92 → 0.3.94
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 +22 -11
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +21 -8
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -4
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +22 -9
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +4 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +1 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -4
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +4 -4
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +1 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/src/components/ExchangeRateTile/renderButton.tsx +10 -0
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +15 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +4 -4
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +5 -3
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -3
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +1 -1
- package/package.json +1 -1
- package/src/components/ExchangeRateTile/renderButton.tsx +10 -0
- package/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.example.json +15 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.tsx +73 -38
- package/src/components/StepsBlock/StepsBlockContent.ts +5 -3
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -3
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderInput.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAahE,MAAM,UAAU,WAAW,CAAC,KAAiB;IAC3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE7E,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,KAAK,IACJ,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"renderInput.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAahE,MAAM,UAAU,WAAW,CAAC,KAAiB;IAC3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE7E,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,KAAK,IACJ,SAAS,EAAC,qFAAqF,EAC/F,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GAClB,EACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,KAAC,MAAM,IACL,SAAS,EAAC,iDAAiD,EAC3D,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAa,CAAC,YAE1C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,KAAC,YAAY,IAAiB,KAAK,EAAE,CAAC,CAAC,IAAI,YACxC,CAAC,CAAC,IAAI,IADU,MAAM,CAAC,CAAC,CAAC,CAEb,CAChB,CAAC,GACK,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
4
4
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
5
5
|
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable.js';
|
|
6
|
-
import {
|
|
6
|
+
import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps.js';
|
|
7
7
|
const STEPS_SIZE_MAP = {
|
|
8
8
|
normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
|
|
9
9
|
small: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]',
|
|
@@ -13,18 +13,18 @@ const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
|
|
|
13
13
|
small: 'min-h-[50px]',
|
|
14
14
|
};
|
|
15
15
|
export const StepsBlock = JSX(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
|
|
16
|
-
const styleMap =
|
|
16
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
17
17
|
return (_jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
18
18
|
${styleMap.background} ${styleMap.title} ${className || ''}`, children: [title ? (_jsx(Heading, { headingType: "h3", className: `text-center ${styleMap.title}`, title: title })) : null, description ? (_jsx("p", { className: `text-m text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (_jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: _jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
|
|
19
19
|
});
|
|
20
20
|
const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
|
|
21
21
|
const isLastStep = steps.length - 1 === i;
|
|
22
22
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
23
|
-
const styleMap =
|
|
23
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
24
24
|
return (_jsx("div", { children: _jsxs("div", { className: "flex flex-row text-center relative", children: [_jsxs("div", { className: "overflow-hidden", children: [renderIconArea(size, version), isLastStep ? null : (_jsx("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), _jsxs("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? (_jsx("div", { className: "font-medium text-m-title-xs m-0 text-left mb-1", children: step.label })) : null, step.description ? (_jsx("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
|
|
25
25
|
};
|
|
26
26
|
const renderIconArea = (size, version) => (step, i) => {
|
|
27
|
-
const styleMap =
|
|
27
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
28
28
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
29
29
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
30
30
|
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
/**
|
|
6
6
|
* @title Шаг
|
|
7
7
|
*/
|
|
@@ -22,7 +22,8 @@ export interface Step {
|
|
|
22
22
|
* }
|
|
23
23
|
*/
|
|
24
24
|
icon?: Picture;
|
|
25
|
-
|
|
25
|
+
/** @title Кнопка */
|
|
26
|
+
button?: ButtonWithIconProps;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* @title Блок шаги
|
|
@@ -43,7 +44,8 @@ export interface StepsBlockContent {
|
|
|
43
44
|
* @maxItems 4
|
|
44
45
|
*/
|
|
45
46
|
steps?: Step[];
|
|
46
|
-
|
|
47
|
+
/** @title Кнопка */
|
|
48
|
+
button?: ButtonWithIconProps;
|
|
47
49
|
/**
|
|
48
50
|
* @title Размер шагов (моб.)
|
|
49
51
|
* @default normal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const STEPS_BLOCK_STYLE_MAPS = {
|
|
1
|
+
export const STEPS_BLOCK_STYLE_MAPS = {
|
|
2
2
|
primary: {
|
|
3
3
|
background: 'bg-white',
|
|
4
4
|
title: 'text-primary-text',
|
|
@@ -16,5 +16,4 @@ const STEPS_BLOCK_STYLE_MAPS = {
|
|
|
16
16
|
iconConnector: 'bg-white',
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
export const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
20
19
|
//# sourceMappingURL=StepsBlockStyleMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAWA,MAAM,sBAAsB,GAAoC;
|
|
1
|
+
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,sBAAsB,GAAoC;IACrE,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;QAClC,QAAQ,EAAE,qBAAqB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,aAAa,EAAE,oBAAoB;KACpC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,eAAe;QAC5B,QAAQ,EAAE,YAAY;QACtB,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
|
|
4
|
+
export function renderButton(button: ButtonProps) {
|
|
5
|
+
return (
|
|
6
|
+
<Button className="py-4 mr-1" version={button?.version} href={button?.href} target="_blank">
|
|
7
|
+
{button?.text}
|
|
8
|
+
</Button>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -19,7 +19,7 @@ export function renderInput(props: InputProps) {
|
|
|
19
19
|
return (
|
|
20
20
|
<div className="relative flex items-center">
|
|
21
21
|
<Input
|
|
22
|
-
className="h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12"
|
|
22
|
+
className="shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12"
|
|
23
23
|
placeholder={placeholder}
|
|
24
24
|
type="text"
|
|
25
25
|
value={value}
|
|
@@ -27,7 +27,7 @@ export function renderInput(props: InputProps) {
|
|
|
27
27
|
/>
|
|
28
28
|
{rates.length ? (
|
|
29
29
|
<Select
|
|
30
|
-
className="h-9 -translate-x-
|
|
30
|
+
className="shrink-0 w-20 h-9 -translate-x-8 bg-transparent"
|
|
31
31
|
value={selected}
|
|
32
32
|
onChange={(_) => setSelected(_ as Currency)}
|
|
33
33
|
>
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"height": 48
|
|
15
15
|
},
|
|
16
16
|
"format": "webp"
|
|
17
|
+
},
|
|
18
|
+
"button": {
|
|
19
|
+
"text": "Кнопка",
|
|
20
|
+
"target": "_blank",
|
|
21
|
+
"version": "primary"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
{
|
|
@@ -25,6 +30,11 @@
|
|
|
25
30
|
"height": 48
|
|
26
31
|
},
|
|
27
32
|
"format": "webp"
|
|
33
|
+
},
|
|
34
|
+
"button": {
|
|
35
|
+
"text": "Кнопка",
|
|
36
|
+
"target": "_blank",
|
|
37
|
+
"version": "primary"
|
|
28
38
|
}
|
|
29
39
|
},
|
|
30
40
|
{
|
|
@@ -36,6 +46,11 @@
|
|
|
36
46
|
"height": 48
|
|
37
47
|
},
|
|
38
48
|
"format": "webp"
|
|
49
|
+
},
|
|
50
|
+
"button": {
|
|
51
|
+
"text": "Кнопка",
|
|
52
|
+
"target": "_blank",
|
|
53
|
+
"version": "primary"
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
56
|
],
|
|
@@ -6,7 +6,7 @@ import { Heading } from '../../ui-kit/Heading/Heading';
|
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
7
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
8
8
|
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
9
|
-
import {
|
|
9
|
+
import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps';
|
|
10
10
|
|
|
11
11
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
30
30
|
size = 'normal',
|
|
31
31
|
version = 'primary',
|
|
32
32
|
}) => {
|
|
33
|
-
const styleMap =
|
|
33
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<section
|
|
@@ -62,7 +62,7 @@ const renderStepTitle =
|
|
|
62
62
|
(step: Step, i: number, steps: Step[]) => {
|
|
63
63
|
const isLastStep = steps.length - 1 === i;
|
|
64
64
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
65
|
-
const styleMap =
|
|
65
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<div key={String(i)}>
|
|
@@ -93,7 +93,7 @@ const renderStepTitle =
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step, i: number) => {
|
|
96
|
-
const styleMap =
|
|
96
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
97
97
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
98
98
|
|
|
99
99
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @title Шаг
|
|
@@ -23,7 +23,8 @@ export interface Step {
|
|
|
23
23
|
* }
|
|
24
24
|
*/
|
|
25
25
|
icon?: Picture;
|
|
26
|
-
|
|
26
|
+
/** @title Кнопка */
|
|
27
|
+
button?: ButtonWithIconProps;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -45,7 +46,8 @@ export interface StepsBlockContent {
|
|
|
45
46
|
* @maxItems 4
|
|
46
47
|
*/
|
|
47
48
|
steps?: Step[];
|
|
48
|
-
|
|
49
|
+
/** @title Кнопка */
|
|
50
|
+
button?: ButtonWithIconProps;
|
|
49
51
|
/**
|
|
50
52
|
* @title Размер шагов (моб.)
|
|
51
53
|
* @default normal
|
|
@@ -9,7 +9,7 @@ export type StyleType = {
|
|
|
9
9
|
iconConnector: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
12
|
+
export const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
13
13
|
primary: {
|
|
14
14
|
background: 'bg-white',
|
|
15
15
|
title: 'text-primary-text',
|
|
@@ -27,5 +27,3 @@ const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
|
27
27
|
iconConnector: 'bg-white',
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
export const getStyleMap = (version: BlockVersion): StyleType => STEPS_BLOCK_STYLE_MAPS[version];
|
|
@@ -693,7 +693,7 @@ exports[`Blocks Placeholder should render block "Placeholder" without content 1`
|
|
|
693
693
|
|
|
694
694
|
exports[`Blocks ProductBlock should render block "ProductBlock" without content 1`] = `
|
|
695
695
|
<section
|
|
696
|
-
class="font-sans overflow-hidden p-[50px] box-border min-h-[528px] bg-white text-primary-text "
|
|
696
|
+
class="font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[528px] bg-white text-primary-text "
|
|
697
697
|
>
|
|
698
698
|
<div
|
|
699
699
|
class="flex grow justify-between items-stretch h-full "
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
|
|
4
|
+
export function renderButton(button: ButtonProps) {
|
|
5
|
+
return (
|
|
6
|
+
<Button className="py-4 mr-1" version={button?.version} href={button?.href} target="_blank">
|
|
7
|
+
{button?.text}
|
|
8
|
+
</Button>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -19,7 +19,7 @@ export function renderInput(props: InputProps) {
|
|
|
19
19
|
return (
|
|
20
20
|
<div className="relative flex items-center">
|
|
21
21
|
<Input
|
|
22
|
-
className="h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12"
|
|
22
|
+
className="shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12"
|
|
23
23
|
placeholder={placeholder}
|
|
24
24
|
type="text"
|
|
25
25
|
value={value}
|
|
@@ -27,7 +27,7 @@ export function renderInput(props: InputProps) {
|
|
|
27
27
|
/>
|
|
28
28
|
{rates.length ? (
|
|
29
29
|
<Select
|
|
30
|
-
className="h-9 -translate-x-
|
|
30
|
+
className="shrink-0 w-20 h-9 -translate-x-8 bg-transparent"
|
|
31
31
|
value={selected}
|
|
32
32
|
onChange={(_) => setSelected(_ as Currency)}
|
|
33
33
|
>
|
|
@@ -36,7 +36,7 @@ export const ProductBlock = JSX<ProductBlockProps>((props) => {
|
|
|
36
36
|
return (
|
|
37
37
|
<BlockWrapper
|
|
38
38
|
context={context}
|
|
39
|
-
className={`font-sans overflow-hidden p-[50px] box-border min-h-[528px] ${productBlockStyleMap[version]} ${className}`}
|
|
39
|
+
className={`font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[528px] ${productBlockStyleMap[version]} ${className}`}
|
|
40
40
|
{...otherProps}
|
|
41
41
|
>
|
|
42
42
|
{backwardButton?.text
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"height": 48
|
|
15
15
|
},
|
|
16
16
|
"format": "webp"
|
|
17
|
+
},
|
|
18
|
+
"button": {
|
|
19
|
+
"text": "Кнопка",
|
|
20
|
+
"target": "_blank",
|
|
21
|
+
"version": "primary"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
{
|
|
@@ -25,6 +30,11 @@
|
|
|
25
30
|
"height": 48
|
|
26
31
|
},
|
|
27
32
|
"format": "webp"
|
|
33
|
+
},
|
|
34
|
+
"button": {
|
|
35
|
+
"text": "Кнопка",
|
|
36
|
+
"target": "_blank",
|
|
37
|
+
"version": "primary"
|
|
28
38
|
}
|
|
29
39
|
},
|
|
30
40
|
{
|
|
@@ -36,6 +46,11 @@
|
|
|
36
46
|
"height": 48
|
|
37
47
|
},
|
|
38
48
|
"format": "webp"
|
|
49
|
+
},
|
|
50
|
+
"button": {
|
|
51
|
+
"text": "Кнопка",
|
|
52
|
+
"target": "_blank",
|
|
53
|
+
"version": "primary"
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
56
|
],
|
|
@@ -28,6 +28,7 @@ export default {
|
|
|
28
28
|
context={context}
|
|
29
29
|
title="Рассчитайте условия на онлайн-калькуляторе и оставьте заявку на потребительский кредит"
|
|
30
30
|
steps={steps.slice(0, 3)}
|
|
31
|
+
version="secondary"
|
|
31
32
|
/>
|
|
32
33
|
</div>
|
|
33
34
|
),
|
|
@@ -43,19 +44,19 @@ export default {
|
|
|
43
44
|
label: 'В мобильном приложении или интернет-банке',
|
|
44
45
|
description: 'Для всех клиентов Россельхозбанка',
|
|
45
46
|
icon: { icon: 'SignDocsIcon' },
|
|
46
|
-
button: { text: 'Войти в интернет-банк'
|
|
47
|
+
button: { text: 'Войти в интернет-банк' },
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
label: 'Через Госуслуги',
|
|
50
51
|
description: 'При наличии данных в Единой биометрической системе',
|
|
51
52
|
icon: { icon: 'ClockIcon' },
|
|
52
|
-
button: { text: 'Оформить'
|
|
53
|
+
button: { text: 'Оформить' },
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
label: 'В офисах Россельхозбанка',
|
|
56
57
|
description: 'Откройте вклад',
|
|
57
58
|
icon: { icon: 'ComfortableCompIcon' },
|
|
58
|
-
button: { text: 'Офисы на карте'
|
|
59
|
+
button: { text: 'Офисы на карте' },
|
|
59
60
|
},
|
|
60
61
|
]}
|
|
61
62
|
/>
|
|
@@ -6,7 +6,7 @@ import { Heading } from '../../ui-kit/Heading/Heading';
|
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
7
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
8
8
|
import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
9
|
-
import {
|
|
9
|
+
import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps';
|
|
10
10
|
|
|
11
11
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
30
30
|
size = 'normal',
|
|
31
31
|
version = 'primary',
|
|
32
32
|
}) => {
|
|
33
|
-
const styleMap =
|
|
33
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<section
|
|
@@ -62,7 +62,7 @@ const renderStepTitle =
|
|
|
62
62
|
(step: Step, i: number, steps: Step[]) => {
|
|
63
63
|
const isLastStep = steps.length - 1 === i;
|
|
64
64
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
65
|
-
const styleMap =
|
|
65
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<div key={String(i)}>
|
|
@@ -93,7 +93,7 @@ const renderStepTitle =
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step, i: number) => {
|
|
96
|
-
const styleMap =
|
|
96
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
97
97
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
98
98
|
|
|
99
99
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLink } from '../../hooks/useLink';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import type { HandlerDecorator, Router } from '../ContentPage/ContentPageContext';
|
|
5
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
6
|
import { Button } from '../../ui-kit/Button/Button';
|
|
4
7
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
8
|
import { Img } from '../../ui-kit/Img/Img';
|
|
@@ -7,26 +10,32 @@ import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
|
|
|
7
10
|
import { joinList } from '../../utils/joinList';
|
|
8
11
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
9
12
|
import type { StyleType } from './StepsBlockStyleMaps';
|
|
10
|
-
import {
|
|
13
|
+
import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps';
|
|
11
14
|
|
|
12
15
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
13
16
|
|
|
14
17
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
15
18
|
|
|
19
|
+
const getLineOpacity = (showLines: boolean) => (showLines ? '' : 'opacity-0');
|
|
20
|
+
|
|
16
21
|
export const StepsBlock = JSX<StepsBlockProps>(
|
|
17
22
|
({
|
|
18
23
|
className = '',
|
|
19
|
-
title,
|
|
20
24
|
showLines = true,
|
|
21
25
|
steps = [],
|
|
22
26
|
button,
|
|
23
27
|
version = 'primary',
|
|
28
|
+
context,
|
|
24
29
|
...rest
|
|
25
30
|
}) => {
|
|
26
|
-
const
|
|
31
|
+
const router = context.useRouter();
|
|
32
|
+
const { handlerDecorator } = context;
|
|
33
|
+
|
|
34
|
+
const { title } = rest;
|
|
35
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
27
36
|
const shortGaps = steps.length > 3;
|
|
28
|
-
const
|
|
29
|
-
const
|
|
37
|
+
const lineOpacity = getLineOpacity(showLines);
|
|
38
|
+
const titleMargin = title ? 'mt-9' : '';
|
|
30
39
|
|
|
31
40
|
return (
|
|
32
41
|
<BlockWrapper
|
|
@@ -38,30 +47,38 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
38
47
|
styleMap.title,
|
|
39
48
|
className,
|
|
40
49
|
].join(' ')}
|
|
50
|
+
context={context}
|
|
41
51
|
{...rest}
|
|
42
52
|
>
|
|
43
53
|
{title ? (
|
|
44
|
-
<Heading
|
|
45
|
-
headingType="h3"
|
|
46
|
-
as="h2"
|
|
47
|
-
className="max-w-[47rem] text-center mb-9"
|
|
48
|
-
title={title}
|
|
49
|
-
/>
|
|
54
|
+
<Heading headingType="h2" className="max-w-[752px] text-center" title={title} />
|
|
50
55
|
) : null}
|
|
51
56
|
{steps?.length ? (
|
|
52
|
-
<div className=
|
|
57
|
+
<div className={`box-border ${titleMargin}`}>
|
|
53
58
|
<div className="flex items-center px-[88px]">
|
|
54
59
|
{joinList(<div className={`h-0.5 w-full bg-secondary-light ${lineOpacity}`} />)(
|
|
55
60
|
steps.map(renderStepIcon(styleMap)),
|
|
56
61
|
)}
|
|
57
62
|
</div>
|
|
58
|
-
<div className={`flex justify-between
|
|
59
|
-
{steps.map(
|
|
63
|
+
<div className={`flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`}>
|
|
64
|
+
{steps.map(
|
|
65
|
+
renderStepTitle({
|
|
66
|
+
styleMap,
|
|
67
|
+
isMainButton: Boolean(button?.text),
|
|
68
|
+
version,
|
|
69
|
+
router,
|
|
70
|
+
handlerDecorator,
|
|
71
|
+
}),
|
|
72
|
+
)}
|
|
60
73
|
</div>
|
|
61
74
|
</div>
|
|
62
75
|
) : null}
|
|
63
76
|
{button?.text ? (
|
|
64
|
-
<Button
|
|
77
|
+
<Button
|
|
78
|
+
className="mt-8 w-full max-w-[240px]"
|
|
79
|
+
version="primary"
|
|
80
|
+
{...useLink({ router, handlerDecorator }, button)}
|
|
81
|
+
/>
|
|
65
82
|
) : null}
|
|
66
83
|
</BlockWrapper>
|
|
67
84
|
);
|
|
@@ -74,7 +91,8 @@ const renderStepIcon =
|
|
|
74
91
|
return (
|
|
75
92
|
<div key={String(i)} className="flex flex-col items-center text-center">
|
|
76
93
|
<div
|
|
77
|
-
className={`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10
|
|
94
|
+
className={`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10
|
|
95
|
+
${styleMap.iconBackground} ${styleMap.title}`}
|
|
78
96
|
>
|
|
79
97
|
{checkIsIconRenderable(icon) ? (
|
|
80
98
|
<Img image={icon} width="48" height="48" asSVG />
|
|
@@ -86,29 +104,46 @@ const renderStepIcon =
|
|
|
86
104
|
);
|
|
87
105
|
};
|
|
88
106
|
|
|
89
|
-
const renderStepTitle =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
const renderStepTitle =
|
|
108
|
+
({
|
|
109
|
+
styleMap,
|
|
110
|
+
isMainButton,
|
|
111
|
+
version,
|
|
112
|
+
router,
|
|
113
|
+
handlerDecorator,
|
|
114
|
+
}: {
|
|
115
|
+
styleMap: StyleType;
|
|
116
|
+
isMainButton: boolean;
|
|
117
|
+
version: BlockVersion;
|
|
118
|
+
router: Router;
|
|
119
|
+
handlerDecorator?: HandlerDecorator;
|
|
120
|
+
}) =>
|
|
121
|
+
(step: Step, i: number) => {
|
|
122
|
+
const additionalMarginClass = step?.label ? 'mt-2' : 'mt-4';
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<div
|
|
126
|
+
key={String(i)}
|
|
127
|
+
className="flex flex-col items-center justify-between text-center relative w-[276px]
|
|
128
|
+
whitespace-pre-line overflow-hidden"
|
|
129
|
+
>
|
|
130
|
+
{step?.label ? (
|
|
131
|
+
<div className="font-normal text-xl-light m-0 mt-4">{step.label}</div>
|
|
132
|
+
) : null}
|
|
133
|
+
{step?.description ? (
|
|
134
|
+
<div className={`font-light text-base ${styleMap.description} ${additionalMarginClass}`}>
|
|
99
135
|
{step.description}
|
|
100
136
|
</div>
|
|
101
137
|
) : null}
|
|
138
|
+
{step.button?.text && !isMainButton ? (
|
|
139
|
+
<Button
|
|
140
|
+
className="box-border mt-8 py-3 h-12 w-full max-w-[240px]"
|
|
141
|
+
{...useLink({ router, handlerDecorator }, step.button)}
|
|
142
|
+
version={version}
|
|
143
|
+
>
|
|
144
|
+
{step.button.text}
|
|
145
|
+
</Button>
|
|
146
|
+
) : null}
|
|
102
147
|
</div>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
className="mt-8 py-4 w-full max-w-[240px]"
|
|
106
|
-
version="primary"
|
|
107
|
-
href={step?.button?.href}
|
|
108
|
-
>
|
|
109
|
-
{step.button.text}
|
|
110
|
-
</Button>
|
|
111
|
-
) : null}
|
|
112
|
-
</div>
|
|
113
|
-
);
|
|
114
|
-
};
|
|
148
|
+
);
|
|
149
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @title Шаг
|
|
@@ -23,7 +23,8 @@ export interface Step {
|
|
|
23
23
|
* }
|
|
24
24
|
*/
|
|
25
25
|
icon?: Picture;
|
|
26
|
-
|
|
26
|
+
/** @title Кнопка */
|
|
27
|
+
button?: ButtonWithIconProps;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -45,7 +46,8 @@ export interface StepsBlockContent {
|
|
|
45
46
|
* @maxItems 4
|
|
46
47
|
*/
|
|
47
48
|
steps?: Step[];
|
|
48
|
-
|
|
49
|
+
/** @title Кнопка */
|
|
50
|
+
button?: ButtonWithIconProps;
|
|
49
51
|
/**
|
|
50
52
|
* @title Размер шагов (моб.)
|
|
51
53
|
* @default normal
|
|
@@ -9,7 +9,7 @@ export type StyleType = {
|
|
|
9
9
|
iconConnector: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
12
|
+
export const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
13
13
|
primary: {
|
|
14
14
|
background: 'bg-white',
|
|
15
15
|
title: 'text-primary-text',
|
|
@@ -27,5 +27,3 @@ const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
|
27
27
|
iconConnector: 'bg-white',
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
export const getStyleMap = (version: BlockVersion): StyleType => STEPS_BLOCK_STYLE_MAPS[version];
|
|
@@ -693,7 +693,7 @@ exports[`Blocks Placeholder should render block "Placeholder" without content 1`
|
|
|
693
693
|
|
|
694
694
|
exports[`Blocks ProductBlock should render block "ProductBlock" without content 1`] = `
|
|
695
695
|
<section
|
|
696
|
-
class="font-sans overflow-hidden p-[50px] box-border min-h-[528px] bg-white text-primary-text "
|
|
696
|
+
class="font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[528px] bg-white text-primary-text "
|
|
697
697
|
>
|
|
698
698
|
<div
|
|
699
699
|
class="flex grow justify-between items-stretch h-full "
|