@redneckz/wildless-cms-uni-blocks 0.2.107 → 0.2.111
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 +52 -77
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +7 -4
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -1
- package/dist/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
- package/dist/components/{MobileBlocks.js → Blocks.mobile.js} +11 -9
- package/dist/components/Blocks.mobile.js.map +1 -0
- package/dist/components/CreditCalculator/CreditCalculator.js +1 -1
- package/dist/components/Gallery/Gallery.d.ts +1 -4
- package/dist/components/Gallery/Gallery.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +6 -6
- package/dist/components/Gallery/GalleryProps.d.ts +4 -0
- package/dist/components/Gallery/GalleryProps.js +2 -0
- package/dist/components/Gallery/GalleryProps.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
- package/dist/components/ProductTile/ProductTile.d.ts +1 -1
- package/dist/components/ProductTile/ProductTile.js +6 -6
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +4 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.d.ts +5 -0
- package/dist/components/StepsBlock/StepsBlock.mobile.js +20 -0
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/dist/components/TariffsTable/TariffsTableCell.js +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/model/SizeVersion.d.ts +8 -0
- package/dist/model/SizeVersion.js +2 -0
- package/dist/model/SizeVersion.js.map +1 -0
- package/dist/ui-kit/BlockItem/BlockItem.js +16 -8
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +1 -0
- package/dist/ui-kit/Button/Button.js +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/dist/ui-kit/Icon/IconProps.js +2 -2
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Img.d.ts +2 -2
- package/dist/ui-kit/Img.js.map +1 -1
- package/dist/ui-kit/Title/Title.d.ts +2 -1
- package/dist/ui-kit/Title/Title.js +10 -3
- package/dist/ui-kit/Title/Title.js.map +1 -1
- package/dist/ui-kit/Title/Title.mobile.d.ts +3 -0
- package/dist/ui-kit/Title/Title.mobile.js +18 -0
- package/dist/ui-kit/Title/Title.mobile.js.map +1 -0
- package/dist/ui-kit/Title/TitleProps.d.ts +1 -7
- package/dist/ui-kit/Title/TitleProps.js +0 -8
- package/dist/ui-kit/Title/TitleProps.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +7 -4
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -1
- package/lib/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
- package/lib/components/{MobileBlocks.js → Blocks.mobile.js} +7 -5
- package/lib/components/Blocks.mobile.js.map +1 -0
- package/lib/components/ContentPage/ContentPage.fixture.d.ts +0 -1
- package/lib/components/ContentPage/ContentPage.fixture.mobile.d.ts +4 -0
- package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
- package/lib/components/Gallery/Gallery.d.ts +1 -4
- package/lib/components/Gallery/Gallery.fixture.d.ts +0 -1
- package/lib/components/Gallery/Gallery.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +6 -6
- package/lib/components/Gallery/GalleryProps.d.ts +4 -0
- package/lib/components/Gallery/GalleryProps.js +2 -0
- package/lib/components/Gallery/GalleryProps.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
- package/lib/components/ProductTile/ProductTile.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.js +6 -6
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +4 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +3 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +8 -0
- package/lib/components/StepsBlock/StepsBlock.mobile.d.ts +5 -0
- package/lib/components/StepsBlock/StepsBlock.mobile.js +18 -0
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
- package/lib/components/TariffsTable/TariffsTableCell.js +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/model/SizeVersion.d.ts +8 -0
- package/lib/model/SizeVersion.js +2 -0
- package/lib/model/SizeVersion.js.map +1 -0
- package/lib/ui-kit/BlockItem/BlockItem.js +16 -8
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +1 -0
- package/lib/ui-kit/Button/Button.js +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/lib/ui-kit/Icon/IconProps.js +2 -2
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Img.d.ts +2 -2
- package/lib/ui-kit/Img.js.map +1 -1
- package/lib/ui-kit/Title/Title.d.ts +2 -1
- package/lib/ui-kit/Title/Title.js +8 -1
- package/lib/ui-kit/Title/Title.js.map +1 -1
- package/lib/ui-kit/Title/Title.mobile.d.ts +3 -0
- package/lib/ui-kit/Title/Title.mobile.js +16 -0
- package/lib/ui-kit/Title/Title.mobile.js.map +1 -0
- package/lib/ui-kit/Title/TitleProps.d.ts +1 -7
- package/lib/ui-kit/Title/TitleProps.js +1 -7
- package/lib/ui-kit/Title/TitleProps.js.map +1 -1
- package/package.json +32 -7
- package/src/components/BaseTile/BaseTile.tsx +17 -8
- package/src/components/{MobileBlocks.ts → Blocks.mobile.ts} +6 -4
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +19 -0
- package/src/components/ContentPage/ContentPage.fixture.tsx +1 -11
- package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
- package/src/components/Gallery/Gallery.example.json +0 -13
- package/src/components/Gallery/Gallery.fixture.tsx +2 -7
- package/src/components/Gallery/Gallery.mobile.tsx +2 -2
- package/src/components/Gallery/Gallery.tsx +1 -4
- package/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/src/components/Gallery/GalleryContent.ts +6 -6
- package/src/components/Gallery/GalleryProps.ts +4 -0
- package/src/components/MiniGallery/MiniGallery.example.json +0 -11
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +2 -2
- package/src/components/ProductTile/ProductTile.fixture.tsx +25 -25
- package/src/components/ProductTile/ProductTile.tsx +16 -15
- package/src/components/ProductTile/ProductTileContent.ts +4 -1
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +96 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +27 -23
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +72 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +4 -0
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +0 -1
- package/src/components/TariffsTable/TariffsTableCell.tsx +1 -1
- package/src/components/Tile/Tile.tsx +2 -2
- package/src/index.ts +0 -1
- package/src/model/SizeVersion.ts +8 -0
- package/src/ui-kit/BlockItem/BlockItem.tsx +23 -12
- package/src/ui-kit/BlockItem/BlockItemProps.ts +1 -0
- package/src/ui-kit/Button/Button.tsx +1 -1
- package/src/ui-kit/Icon/IconProps.ts +2 -2
- package/src/ui-kit/Img.tsx +2 -2
- package/src/ui-kit/Title/Title.mobile.tsx +22 -0
- package/src/ui-kit/Title/Title.tsx +10 -1
- package/src/ui-kit/Title/TitleProps.ts +1 -8
- package/dist/components/MobileBlocks.js.map +0 -1
- package/lib/components/MobileBlocks.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
export const SizeTableClass = {
|
|
4
|
+
XL: 'text-m-title',
|
|
5
|
+
L: 'text-m-title',
|
|
6
|
+
M: 'text-m-title-md',
|
|
7
|
+
S: 'text-m-title-xs',
|
|
8
|
+
'2XS': 'text-m-title-xs',
|
|
9
|
+
'3XS': 'text-m-title-xs',
|
|
10
|
+
};
|
|
11
|
+
export const Title = JSX(({ size = 'L', className, children, ...rest }) => {
|
|
12
|
+
const Tag = size === 'XL' || size === 'L' ? 'h1' : 'h2';
|
|
13
|
+
return (_jsx(Tag, { className: getClasses(SizeTableClass[size], className), ...rest, children: children }));
|
|
14
|
+
});
|
|
15
|
+
const getClasses = (...classes) => classes.filter(Boolean).join(' ');
|
|
16
|
+
//# sourceMappingURL=Title.mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.mobile.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/Title.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,EAAE,EAAE,cAAc;IAClB,CAAC,EAAE,cAAc;IACjB,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,iBAAiB;IACpB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpF,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,YAClE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,GAAG,OAA+B,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
'XL' = "text-title-lg",
|
|
3
|
-
'L' = "text-title",
|
|
4
|
-
'M' = "text-title-sm",
|
|
5
|
-
'S' = "text-title-xs"
|
|
6
|
-
}
|
|
7
|
-
export declare type TitleSize = keyof typeof SizeTableClass;
|
|
1
|
+
export declare type TitleSize = 'XL' | 'L' | 'M' | 'S' | '2XS' | '3XS';
|
|
8
2
|
export interface TitleProps extends Partial<HTMLHeadingElement> {
|
|
9
3
|
size?: TitleSize;
|
|
10
4
|
}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (SizeTableClass) {
|
|
3
|
-
SizeTableClass["XL"] = "text-title-lg";
|
|
4
|
-
SizeTableClass["L"] = "text-title";
|
|
5
|
-
SizeTableClass["M"] = "text-title-sm";
|
|
6
|
-
SizeTableClass["S"] = "text-title-xs";
|
|
7
|
-
})(SizeTableClass || (SizeTableClass = {}));
|
|
1
|
+
export {};
|
|
8
2
|
//# sourceMappingURL=TitleProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/TitleProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TitleProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/TitleProps.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.111",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
"require": "./dist/index.js",
|
|
15
15
|
"types": "./lib/index.d.ts"
|
|
16
16
|
},
|
|
17
|
+
"./mobile": {
|
|
18
|
+
"import": "./mobile/lib/index.js",
|
|
19
|
+
"require": "./mobile/dist/index.js",
|
|
20
|
+
"types": "./mobile/lib/index.d.ts"
|
|
21
|
+
},
|
|
17
22
|
"./lib/*.js": {
|
|
18
23
|
"import": "./lib/*.js",
|
|
19
24
|
"require": "./dist/*.js",
|
|
20
25
|
"types": "./lib/*.d.ts"
|
|
21
26
|
},
|
|
27
|
+
"./mobile/lib/*.js": {
|
|
28
|
+
"import": "./mobile/lib/*.js",
|
|
29
|
+
"require": "./mobile/dist/*.js",
|
|
30
|
+
"types": "./mobile/lib/*.d.ts"
|
|
31
|
+
},
|
|
22
32
|
"./lib/common.css": "./lib/common.css",
|
|
23
33
|
"./fonts/ubuntu/*": "./fonts/ubuntu/*",
|
|
24
34
|
"./lib/content-page-repository": {
|
|
@@ -44,9 +54,13 @@
|
|
|
44
54
|
},
|
|
45
55
|
"files": [
|
|
46
56
|
"lib",
|
|
57
|
+
"mobile/lib",
|
|
47
58
|
"dist",
|
|
59
|
+
"mobile/dist",
|
|
48
60
|
"bundle",
|
|
61
|
+
"mobile/bundle",
|
|
49
62
|
"fonts",
|
|
63
|
+
"mobile/src",
|
|
50
64
|
"src"
|
|
51
65
|
],
|
|
52
66
|
"repository": {
|
|
@@ -57,16 +71,22 @@
|
|
|
57
71
|
},
|
|
58
72
|
"scripts": {
|
|
59
73
|
"start": "npm run cosmos",
|
|
60
|
-
"
|
|
74
|
+
"start:mobile": "npm run cosmos:mobile",
|
|
75
|
+
"prebuild": "rimraf ./mobile/src",
|
|
76
|
+
"build": "npm run build:lib && npm run build:commonjs && npm run bundle && npm run build:style && npm run build:design && npm run build:mobile && npm run build:design:mobile",
|
|
77
|
+
"prebuild:mobile": "rimraf ./mobile/src && node ./scripts/prebuild-mobile.js ./src ./mobile",
|
|
78
|
+
"build:mobile": "npm run --prefix ./mobile build",
|
|
61
79
|
"postbuild": "npm run size",
|
|
62
80
|
"build:design": "npm run cosmos:export || exit 0",
|
|
63
81
|
"postbuild:design": "copyfiles --up 1 \"./docs/**/*\" ./build || exit 0",
|
|
82
|
+
"build:design:mobile": "npm run cosmos:export:mobile || exit 0",
|
|
83
|
+
"postbuild:design:mobile": "copyfiles --up 1 \"./docs/mobile/**/*\" ./build || exit 0",
|
|
64
84
|
"build:lib": "rimraf ./lib && tsc --build --verbose",
|
|
65
85
|
"postbuild:lib": "replace-in-file --configFile=replace-config.lib.cjs --verbose",
|
|
66
|
-
"build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir dist",
|
|
67
|
-
"bundle": "rimraf ./bundle && rollup
|
|
86
|
+
"build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir ./dist",
|
|
87
|
+
"bundle": "rimraf ./bundle && rollup --config rollup.config.js && npm run build:schema",
|
|
68
88
|
"build:schema": "ts-json-schema-generator --path './src/**/*Content.ts' --additional-properties --unstable --validation-keywords enumNames --validation-keywords required --minify --no-type-check -o ./bundle/blocks.schema.json",
|
|
69
|
-
"
|
|
89
|
+
"postbuild:schema": "node ./scripts/sort-json-schema.js ./bundle/blocks.schema.json",
|
|
70
90
|
"build:style": "postcss ./src/**/*.css --env production --dir ./lib",
|
|
71
91
|
"build:icons": "svgo -f ./src/icons -o ./cosmos-static/icons",
|
|
72
92
|
"size": "size-limit",
|
|
@@ -75,9 +95,13 @@
|
|
|
75
95
|
"test": "jest --coverage",
|
|
76
96
|
"precosmos": "npm run build:icons",
|
|
77
97
|
"cosmos": "cosmos",
|
|
98
|
+
"precosmos:mobile": "npm run build:icons",
|
|
99
|
+
"cosmos:mobile": "cosmos --config cosmos.config.mobile.json",
|
|
78
100
|
"precosmos:export": "npm run build:icons",
|
|
79
|
-
"cosmos:export": "cosmos-export",
|
|
80
|
-
"prepare": "husky install && npm run --prefix ./eslint-rules build || exit 0"
|
|
101
|
+
"cosmos:export": "rimraf ./build && cosmos-export",
|
|
102
|
+
"prepare": "husky install && npm run --prefix ./eslint-rules build || exit 0",
|
|
103
|
+
"precosmos:export:mobile": "npm run build:icons",
|
|
104
|
+
"cosmos:export:mobile": "rimraf ./build && cosmos-export --config cosmos.config.mobile.json"
|
|
81
105
|
},
|
|
82
106
|
"peerDependencies": {
|
|
83
107
|
"react": ">=16.8.0",
|
|
@@ -110,6 +134,7 @@
|
|
|
110
134
|
"husky": "^8.0.1",
|
|
111
135
|
"jest": "^28.1.3",
|
|
112
136
|
"lint-staged": "^13.0.1",
|
|
137
|
+
"npm-watch": "^0.11.0",
|
|
113
138
|
"postcss": "^8.4.14",
|
|
114
139
|
"postcss-cli": "^9.1.0",
|
|
115
140
|
"postcss-loader": "^7.0.0",
|
|
@@ -33,18 +33,18 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
33
33
|
<div className={`font-sans flex flex-col grow h-full items-start`}>
|
|
34
34
|
{title && (
|
|
35
35
|
<Title
|
|
36
|
-
size={titleSize
|
|
36
|
+
size={getTitleSize(titleSize, className)}
|
|
37
37
|
className={`${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`}
|
|
38
38
|
>
|
|
39
39
|
{title}
|
|
40
40
|
</Title>
|
|
41
41
|
)}
|
|
42
|
-
<div className=
|
|
43
|
-
<div className=
|
|
42
|
+
<div className="flex grow w-full justify-between">
|
|
43
|
+
<div className="flex flex-col justify-between items-start">
|
|
44
44
|
<div>
|
|
45
|
-
{description
|
|
45
|
+
{description && (
|
|
46
46
|
<div className={`font-normal text-base mt-4 max-w-[600px]`}>{description}</div>
|
|
47
|
-
)
|
|
47
|
+
)}
|
|
48
48
|
{children}
|
|
49
49
|
{items?.length ? renderItems(items, version) : null}
|
|
50
50
|
</div>
|
|
@@ -63,7 +63,11 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
63
63
|
},
|
|
64
64
|
);
|
|
65
65
|
|
|
66
|
-
function
|
|
66
|
+
function getTitleSize(titleSize, className = '') {
|
|
67
|
+
if (titleSize) {
|
|
68
|
+
return titleSize;
|
|
69
|
+
}
|
|
70
|
+
|
|
67
71
|
const colSpan = getColSpan(className);
|
|
68
72
|
if (colSpan <= 4) {
|
|
69
73
|
return 'S';
|
|
@@ -78,7 +82,12 @@ function renderItems(items: string[] = [], version?: BlockVersion) {
|
|
|
78
82
|
return (
|
|
79
83
|
<section className="max-w-[600px] mt-5" role="list">
|
|
80
84
|
{items.map((_, i) => (
|
|
81
|
-
<BlockItem
|
|
85
|
+
<BlockItem
|
|
86
|
+
key={String(i)}
|
|
87
|
+
className={i ? 'mt-2.5' : ''}
|
|
88
|
+
text={_}
|
|
89
|
+
white={version !== 'primary'}
|
|
90
|
+
/>
|
|
82
91
|
))}
|
|
83
92
|
</section>
|
|
84
93
|
);
|
|
@@ -90,7 +99,7 @@ function renderButton({ icon, asSVG, ...button }: BaseTileIconButton, i: number)
|
|
|
90
99
|
return icon ? (
|
|
91
100
|
<Button
|
|
92
101
|
key={String(i)}
|
|
93
|
-
appendLeft={<Icon name={icon} asSVG width="24" height="24" />}
|
|
102
|
+
appendLeft={<Icon name={icon} asSVG={asSVG} width="24" height="24" />}
|
|
94
103
|
{...button}
|
|
95
104
|
/>
|
|
96
105
|
) : (
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
2
|
-
import { Footer } from './Footer/Footer
|
|
3
|
-
import { Gallery } from './Gallery/Gallery
|
|
2
|
+
import { Footer } from './Footer/Footer';
|
|
3
|
+
import { Gallery } from './Gallery/Gallery';
|
|
4
4
|
import { Header } from './Header/Header';
|
|
5
5
|
import { Headline } from './Headline/Headline';
|
|
6
6
|
import { MobileAppTile } from './MobileAppTile/MobileAppTile';
|
|
7
7
|
import { Navigation } from './Navigation/Navigation';
|
|
8
8
|
import { PictureText } from './PictureText/PictureText';
|
|
9
9
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
10
|
-
import { ProductBlock } from './ProductBlock/ProductBlock
|
|
10
|
+
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
11
11
|
import { ProductTile } from './ProductTile/ProductTile';
|
|
12
|
+
import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
12
13
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
13
14
|
import { Tile } from './Tile/Tile';
|
|
14
15
|
|
|
15
|
-
export const
|
|
16
|
+
export const Blocks = {
|
|
16
17
|
ExchangeRateTile,
|
|
17
18
|
Footer,
|
|
18
19
|
Gallery,
|
|
@@ -26,4 +27,5 @@ export const MobileBlocks = {
|
|
|
26
27
|
TextBlock,
|
|
27
28
|
Tile,
|
|
28
29
|
Navigation,
|
|
30
|
+
StepsBlock,
|
|
29
31
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { mobileContext } from '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import type { ContentPageDef } from '../../types';
|
|
4
|
+
import { Blocks } from '../Blocks.mobile';
|
|
5
|
+
import { ContentPage } from './ContentPage';
|
|
6
|
+
import { toMobilePage } from './toMobilePage';
|
|
7
|
+
|
|
8
|
+
import data from './ContentPage.page.json';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
default: (
|
|
12
|
+
<ContentPage
|
|
13
|
+
className="bg-secondary-text"
|
|
14
|
+
context={mobileContext}
|
|
15
|
+
blocksRegistry={Blocks}
|
|
16
|
+
data={toMobilePage(data as ContentPageDef)}
|
|
17
|
+
/>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { context
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
2
|
|
|
3
3
|
import type { ContentPageDef } from '../../types';
|
|
4
4
|
import { Blocks } from '../Blocks';
|
|
5
|
-
import { MobileBlocks } from '../MobileBlocks';
|
|
6
5
|
import { BlockDecorator, ContentPage } from './ContentPage';
|
|
7
|
-
import { toMobilePage } from './toMobilePage';
|
|
8
6
|
|
|
9
7
|
import data from './ContentPage.page.json';
|
|
10
8
|
|
|
@@ -36,14 +34,6 @@ export default {
|
|
|
36
34
|
data={data as ContentPageDef}
|
|
37
35
|
/>
|
|
38
36
|
),
|
|
39
|
-
mobile: (
|
|
40
|
-
<ContentPage
|
|
41
|
-
className="bg-secondary-text"
|
|
42
|
-
context={mobileContext}
|
|
43
|
-
blocksRegistry={MobileBlocks}
|
|
44
|
-
data={toMobilePage(data as ContentPageDef)}
|
|
45
|
-
/>
|
|
46
|
-
),
|
|
47
37
|
editor: (
|
|
48
38
|
<div style={{ background: "url('grid.svg')", height: '100%' }}>
|
|
49
39
|
<ContentPage
|
|
@@ -126,7 +126,7 @@ export const CreditCalculator = JSX<CreditCalculatorProps>(
|
|
|
126
126
|
<div className="flex items-center">
|
|
127
127
|
<Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
|
|
128
128
|
<div
|
|
129
|
-
className="w-80 text-
|
|
129
|
+
className="w-80 text-2xs leading-4 text-secondary-text"
|
|
130
130
|
aria-label="Соглашение на обработку персональных данных"
|
|
131
131
|
>
|
|
132
132
|
Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
|
|
@@ -53,19 +53,6 @@
|
|
|
53
53
|
"description": "Описание 4",
|
|
54
54
|
"href": "/credit-cards",
|
|
55
55
|
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"image": {
|
|
59
|
-
"format": "webp",
|
|
60
|
-
"size": {
|
|
61
|
-
"width": 140,
|
|
62
|
-
"height": 140
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"title": "Заголовок 5",
|
|
66
|
-
"description": "Описание 5",
|
|
67
|
-
"href": "/credit-cards",
|
|
68
|
-
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"]
|
|
69
56
|
}
|
|
70
57
|
]
|
|
71
58
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../setup-fixture';
|
|
3
3
|
import type { ButtonCommonProps } from '../../ui-kit/Button/Button';
|
|
4
|
-
import { Gallery
|
|
5
|
-
import {
|
|
4
|
+
import { Gallery } from './Gallery';
|
|
5
|
+
import type { GalleryProps } from './GalleryProps';
|
|
6
6
|
|
|
7
7
|
const image: Picture = {
|
|
8
8
|
src: 'money-1.png',
|
|
@@ -211,9 +211,4 @@ export default {
|
|
|
211
211
|
<Gallery className="col-span-12" {...onlyTitleProps} />
|
|
212
212
|
</div>
|
|
213
213
|
),
|
|
214
|
-
mobile: (
|
|
215
|
-
<div className="container grid grid-cols-12">
|
|
216
|
-
<MobileGallery className="col-span-12" {...defaultProps} />
|
|
217
|
-
</div>
|
|
218
|
-
),
|
|
219
214
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { GalleryProps } from './Gallery';
|
|
3
|
-
import type { GalleryCard } from './GalleryContent';
|
|
4
2
|
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem';
|
|
5
3
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
4
|
import { Img } from '../../ui-kit/Img';
|
|
7
5
|
import { Title } from '../../ui-kit/Title/Title';
|
|
6
|
+
import type { GalleryCard } from './GalleryContent';
|
|
7
|
+
import type { GalleryProps } from './GalleryProps';
|
|
8
8
|
|
|
9
9
|
export const Gallery = JSX<GalleryProps>(({ title, description, cards = [], className }) => {
|
|
10
10
|
return (
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { GalleryContent } from './GalleryContent';
|
|
3
2
|
import { GalleryInner } from './GalleryInner';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export interface GalleryProps extends GalleryContent, UniBlockProps {}
|
|
3
|
+
import type { GalleryProps } from './GalleryProps';
|
|
7
4
|
|
|
8
5
|
export const Gallery = JSX<GalleryProps>((props) => <GalleryInner {...props} version="normal" />);
|
|
@@ -11,12 +11,9 @@ export interface GalleryCard {
|
|
|
11
11
|
/** @title Описание */
|
|
12
12
|
description?: string;
|
|
13
13
|
image?: Picture;
|
|
14
|
-
/** @title
|
|
14
|
+
/** @title Кнопка */
|
|
15
15
|
button?: BaseTileIconButton;
|
|
16
|
-
/**
|
|
17
|
-
* @title Список
|
|
18
|
-
* @minItems 4
|
|
19
|
-
*/
|
|
16
|
+
/** @title Список */
|
|
20
17
|
items?: string[];
|
|
21
18
|
version?: BlockVersion;
|
|
22
19
|
}
|
|
@@ -29,6 +26,9 @@ export interface GalleryContent {
|
|
|
29
26
|
title?: string;
|
|
30
27
|
/** @title Описание */
|
|
31
28
|
description?: string;
|
|
32
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @title Карточки
|
|
31
|
+
* @minItems 4
|
|
32
|
+
*/
|
|
33
33
|
cards?: GalleryCard[];
|
|
34
34
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ProductBlockContent } from './ProductBlockContent';
|
|
4
4
|
import { ProductBlockInner } from './ProductBlockInner';
|
|
5
5
|
|
|
6
|
-
export interface ProductBlockProps extends
|
|
6
|
+
export interface ProductBlockProps extends ProductBlockContent, UniBlockProps {}
|
|
7
7
|
|
|
8
8
|
export const ProductBlock = JSX<ProductBlockProps>(
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { context } from '../../setup-fixture';
|
|
2
2
|
|
|
3
|
-
import { ProductTile } from './ProductTile';
|
|
4
3
|
import type { Picture } from '../../model/Picture';
|
|
4
|
+
import { ProductTile } from './ProductTile';
|
|
5
5
|
|
|
6
6
|
const cardWithMoney: Picture = {
|
|
7
7
|
src: 'card-with-diamond.png',
|
|
@@ -31,16 +31,16 @@ export default {
|
|
|
31
31
|
description="Потребительский кредит на любые цели, без залога и поручительства"
|
|
32
32
|
benefits={[
|
|
33
33
|
{
|
|
34
|
-
label: '
|
|
35
|
-
description: '
|
|
34
|
+
label: 'до 5 млн Р',
|
|
35
|
+
description: 'Кредитный лимит',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
label: '
|
|
39
|
-
description: '
|
|
38
|
+
label: 'от 12,5%',
|
|
39
|
+
description: 'Процентная ставка',
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
label: '
|
|
43
|
-
description: '
|
|
42
|
+
label: 'до 5 лет',
|
|
43
|
+
description: 'Срок кредитования',
|
|
44
44
|
},
|
|
45
45
|
]}
|
|
46
46
|
buttons={[
|
|
@@ -63,16 +63,16 @@ export default {
|
|
|
63
63
|
description={'Потребительский кредит на любые цели, без залога и поручительства'}
|
|
64
64
|
benefits={[
|
|
65
65
|
{
|
|
66
|
-
label: '
|
|
67
|
-
description: '
|
|
66
|
+
label: 'до 3 млн Р',
|
|
67
|
+
description: 'Кредитный лимит',
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
label: '
|
|
71
|
-
description: '
|
|
70
|
+
label: 'от 12,5%',
|
|
71
|
+
description: 'Процентная ставка',
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
label: '
|
|
75
|
-
description: '
|
|
74
|
+
label: 'до 3 лет',
|
|
75
|
+
description: 'Срок кредитования',
|
|
76
76
|
},
|
|
77
77
|
]}
|
|
78
78
|
buttons={[
|
|
@@ -96,16 +96,16 @@ export default {
|
|
|
96
96
|
description={'Без переоформления залогой недвижимости на банк'}
|
|
97
97
|
benefits={[
|
|
98
98
|
{
|
|
99
|
-
label: '
|
|
100
|
-
description: '
|
|
99
|
+
label: 'до 10 млн Р',
|
|
100
|
+
description: 'Кредитный лимит',
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
label: '
|
|
104
|
-
description: '
|
|
103
|
+
label: 'от 21,5%',
|
|
104
|
+
description: 'Процентная ставка',
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
label: '
|
|
108
|
-
description: '
|
|
107
|
+
label: 'до 10 лет',
|
|
108
|
+
description: 'Срок кредитования',
|
|
109
109
|
},
|
|
110
110
|
]}
|
|
111
111
|
buttons={[
|
|
@@ -129,16 +129,16 @@ export default {
|
|
|
129
129
|
description={'Для людей в возрасте до 75 лет'}
|
|
130
130
|
benefits={[
|
|
131
131
|
{
|
|
132
|
-
label: '
|
|
133
|
-
description: '
|
|
132
|
+
label: 'до 3 млн Р',
|
|
133
|
+
description: 'Кредитный лимит',
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
label: '
|
|
137
|
-
description: '
|
|
136
|
+
label: 'от 16,8%',
|
|
137
|
+
description: 'Процентная ставка',
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
|
-
label: '
|
|
141
|
-
description: '
|
|
140
|
+
label: 'до 5 лет',
|
|
141
|
+
description: 'Срок кредитования',
|
|
142
142
|
},
|
|
143
143
|
]}
|
|
144
144
|
buttons={[
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
3
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
|
-
import type { ProductTileContent } from './ProductTileContent';
|
|
5
|
-
import { Tile } from '../Tile/Tile';
|
|
6
3
|
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
5
|
+
import { Tile } from '../Tile/Tile';
|
|
6
|
+
import type { ProductTileContent } from './ProductTileContent';
|
|
7
7
|
|
|
8
8
|
export interface ProductTileProps extends ProductTileContent, UniBlockProps {}
|
|
9
9
|
|
|
@@ -12,31 +12,32 @@ export const ProductTile = JSX<ProductTileProps>((props) => {
|
|
|
12
12
|
return (
|
|
13
13
|
<Tile {...props}>
|
|
14
14
|
<div className="flex mt-5 mb-1">
|
|
15
|
+
{benefits?.length ? <div className="mr-8">{benefits.map(renderBenefitLabel)}</div> : null}
|
|
15
16
|
{benefits?.length ? (
|
|
16
|
-
<div className="
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<div className="pt-1">{benefits.map((_, i) => renderBenefitLabel(_, i, version))}</div>
|
|
17
|
+
<div className="pt-1">
|
|
18
|
+
{benefits.map((_, i) => renderBenefitDescription(_, i, version))}
|
|
19
|
+
</div>
|
|
20
20
|
) : null}
|
|
21
21
|
</div>
|
|
22
22
|
</Tile>
|
|
23
23
|
);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
function renderBenefitLabel(benefit: Benefit, i: number
|
|
27
|
-
const labelStyleMap: Record<BlockVersion, string> = {
|
|
28
|
-
primary: 'text-secondary-text',
|
|
29
|
-
secondary: 'text-white',
|
|
30
|
-
};
|
|
26
|
+
function renderBenefitLabel(benefit: Benefit, i: number) {
|
|
31
27
|
return (
|
|
32
|
-
<div key={String(i)} className={`text-
|
|
28
|
+
<div key={String(i)} className={`text-xl font-medium ${i ? 'mt-2.5' : ''}`}>
|
|
33
29
|
{benefit.label}
|
|
34
30
|
</div>
|
|
35
31
|
);
|
|
36
32
|
}
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
function renderBenefitDescription(benefit: Benefit, i: number, version = 'primary') {
|
|
35
|
+
const labelStyleMap: Record<BlockVersion, string> = {
|
|
36
|
+
primary: 'text-secondary-text',
|
|
37
|
+
secondary: 'text-white',
|
|
38
|
+
};
|
|
38
39
|
return (
|
|
39
|
-
<div key={String(i)} className={`text-
|
|
40
|
+
<div key={String(i)} className={`text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`}>
|
|
40
41
|
{benefit.description}
|
|
41
42
|
</div>
|
|
42
43
|
);
|
|
@@ -5,6 +5,9 @@ import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
|
5
5
|
* @title Продуктовая плитка
|
|
6
6
|
*/
|
|
7
7
|
export interface ProductTileContent extends Omit<BaseTileCommonProps, 'align'> {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title Преимущества
|
|
10
|
+
* @maxItems 7
|
|
11
|
+
*/
|
|
9
12
|
benefits?: Omit<Benefit, 'icon'>[];
|
|
10
13
|
}
|