@doyourjob/gravity-ui-page-constructor 5.31.297 → 5.31.299
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/build/cjs/blocks/ContentLayout/ContentLayout.css +4 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +19 -5
- package/build/cjs/blocks/ContentLayout/schema.js +6 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/schema/constants.d.ts +12 -0
- package/build/cjs/sub-blocks/ContentLayoutCard/schema.d.ts +12 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.css +4 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +19 -5
- package/build/esm/blocks/ContentLayout/schema.js +6 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/schema/constants.d.ts +12 -0
- package/build/esm/sub-blocks/ContentLayoutCard/schema.d.ts +12 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -59,6 +59,10 @@ unpredictable css rules order in build */
|
|
|
59
59
|
flex-wrap: wrap;
|
|
60
60
|
gap: 8px;
|
|
61
61
|
}
|
|
62
|
+
.pc-content-layout-block__tags_top {
|
|
63
|
+
margin-bottom: 32px;
|
|
64
|
+
margin-top: 0;
|
|
65
|
+
}
|
|
62
66
|
.pc-content-layout-block__tag {
|
|
63
67
|
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
64
68
|
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
@@ -32,12 +32,13 @@ function getTextWidth(size) {
|
|
|
32
32
|
}
|
|
33
33
|
const ContentLayoutBlock = (props) => {
|
|
34
34
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
35
|
-
const { animated, textContent, fileContent, tags, size = 'l', background, unicorn, unicornSdkUrl, centered, theme = 'default', textWidth = 'm', } = props;
|
|
35
|
+
const { animated, textContent, fileContent, tags, topTags, size = 'l', background, unicorn, unicornSdkUrl, centered, theme = 'default', textWidth = 'm', } = props;
|
|
36
36
|
const colSizes = (0, react_1.useMemo)(() => getTextWidth(textWidth), [textWidth]);
|
|
37
37
|
const globalTheme = (0, theme_1.useTheme)();
|
|
38
38
|
const themedBackground = (0, utils_1.getThemedValue)(background, globalTheme);
|
|
39
39
|
return (react_1.default.createElement(components_1.AnimateBlock, { className: b({ size, theme }), animate: animated },
|
|
40
40
|
react_1.default.createElement("div", { className: b('root', { background: Boolean(background) || Boolean(unicorn) }) },
|
|
41
|
+
topTags && (react_1.default.createElement("div", { className: b('tags', { top: true }) }, topTags.map((item, index) => (react_1.default.createElement("div", { key: index, className: b('tag') }, item))))),
|
|
41
42
|
react_1.default.createElement(sub_blocks_1.Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
|
|
42
43
|
fileContent && (react_1.default.createElement(grid_1.Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes }, fileContent.map((file) => (react_1.default.createElement(components_1.FileLink, Object.assign({ className: b('file') }, file, { key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme })))))),
|
|
43
44
|
tags && (react_1.default.createElement("div", { className: b('tags') }, tags.map((item, index) => (react_1.default.createElement("div", { key: index, className: b('tag') }, item))))),
|
|
@@ -9,7 +9,9 @@ export declare const ContentLayoutBlock: {
|
|
|
9
9
|
background: {
|
|
10
10
|
anyOf: ({
|
|
11
11
|
optionName: string;
|
|
12
|
-
type: string;
|
|
12
|
+
type: string; /**
|
|
13
|
+
* @deprecated Use params on top level instead
|
|
14
|
+
*/
|
|
13
15
|
additionalProperties: boolean;
|
|
14
16
|
properties: {
|
|
15
17
|
src: {
|
|
@@ -102,6 +104,12 @@ export declare const ContentLayoutBlock: {
|
|
|
102
104
|
type: string;
|
|
103
105
|
};
|
|
104
106
|
};
|
|
107
|
+
topTags: {
|
|
108
|
+
type: string;
|
|
109
|
+
items: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
105
113
|
theme: {
|
|
106
114
|
type: string;
|
|
107
115
|
enum: string[];
|
|
@@ -289,9 +297,7 @@ export declare const ContentLayoutBlock: {
|
|
|
289
297
|
contentType: string;
|
|
290
298
|
};
|
|
291
299
|
size: {
|
|
292
|
-
type: string;
|
|
293
|
-
* @deprecated Use params on top level instead
|
|
294
|
-
*/
|
|
300
|
+
type: string;
|
|
295
301
|
enum: string[];
|
|
296
302
|
};
|
|
297
303
|
links: {
|
|
@@ -373,7 +379,9 @@ export declare const ContentLayoutBlock: {
|
|
|
373
379
|
background: {
|
|
374
380
|
anyOf: ({
|
|
375
381
|
optionName: string;
|
|
376
|
-
type: string;
|
|
382
|
+
type: string; /**
|
|
383
|
+
* @deprecated Use params on top level instead
|
|
384
|
+
*/
|
|
377
385
|
additionalProperties: boolean;
|
|
378
386
|
properties: {
|
|
379
387
|
src: {
|
|
@@ -466,6 +474,12 @@ export declare const ContentLayoutBlock: {
|
|
|
466
474
|
type: string;
|
|
467
475
|
};
|
|
468
476
|
};
|
|
477
|
+
topTags: {
|
|
478
|
+
type: string;
|
|
479
|
+
items: {
|
|
480
|
+
type: string;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
469
483
|
theme: {
|
|
470
484
|
type: string;
|
|
471
485
|
enum: string[];
|
|
@@ -720,6 +720,7 @@ export interface ContentLayoutBlockProps extends ContentLayoutBlockParams, Anima
|
|
|
720
720
|
textContent: ContentBlockProps;
|
|
721
721
|
fileContent?: FileLinkProps[];
|
|
722
722
|
tags?: string[];
|
|
723
|
+
topTags?: string[];
|
|
723
724
|
}
|
|
724
725
|
export type SVGIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
725
726
|
export interface ContentItemProps {
|
|
@@ -1377,6 +1377,12 @@ export declare const cardSchemas: {
|
|
|
1377
1377
|
type: string;
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
|
+
topTags: {
|
|
1381
|
+
type: string;
|
|
1382
|
+
items: {
|
|
1383
|
+
type: string;
|
|
1384
|
+
};
|
|
1385
|
+
};
|
|
1380
1386
|
theme: {
|
|
1381
1387
|
type: string;
|
|
1382
1388
|
enum: string[];
|
|
@@ -1736,6 +1742,12 @@ export declare const cardSchemas: {
|
|
|
1736
1742
|
type: string;
|
|
1737
1743
|
};
|
|
1738
1744
|
};
|
|
1745
|
+
topTags: {
|
|
1746
|
+
type: string;
|
|
1747
|
+
items: {
|
|
1748
|
+
type: string;
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1739
1751
|
theme: {
|
|
1740
1752
|
type: string;
|
|
1741
1753
|
enum: string[];
|
|
@@ -102,6 +102,12 @@ export declare const ContentLayoutCard: {
|
|
|
102
102
|
type: string;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
+
topTags: {
|
|
106
|
+
type: string;
|
|
107
|
+
items: {
|
|
108
|
+
type: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
105
111
|
theme: {
|
|
106
112
|
type: string;
|
|
107
113
|
enum: string[];
|
|
@@ -461,6 +467,12 @@ export declare const ContentLayoutCard: {
|
|
|
461
467
|
type: string;
|
|
462
468
|
};
|
|
463
469
|
};
|
|
470
|
+
topTags: {
|
|
471
|
+
type: string;
|
|
472
|
+
items: {
|
|
473
|
+
type: string;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
464
476
|
theme: {
|
|
465
477
|
type: string;
|
|
466
478
|
enum: string[];
|
|
@@ -59,6 +59,10 @@ unpredictable css rules order in build */
|
|
|
59
59
|
flex-wrap: wrap;
|
|
60
60
|
gap: 8px;
|
|
61
61
|
}
|
|
62
|
+
.pc-content-layout-block__tags_top {
|
|
63
|
+
margin-bottom: 32px;
|
|
64
|
+
margin-top: 0;
|
|
65
|
+
}
|
|
62
66
|
.pc-content-layout-block__tag {
|
|
63
67
|
font-size: var(--g-text-body-1-font-size, var(--pc-text-body-1-font-size));
|
|
64
68
|
line-height: var(--g-text-body-1-line-height, var(--pc-text-body-1-line-height));
|
|
@@ -29,12 +29,13 @@ function getTextWidth(size) {
|
|
|
29
29
|
}
|
|
30
30
|
export const ContentLayoutBlock = (props) => {
|
|
31
31
|
const isMobile = useContext(MobileContext);
|
|
32
|
-
const { animated, textContent, fileContent, tags, size = 'l', background, unicorn, unicornSdkUrl, centered, theme = 'default', textWidth = 'm', } = props;
|
|
32
|
+
const { animated, textContent, fileContent, tags, topTags, size = 'l', background, unicorn, unicornSdkUrl, centered, theme = 'default', textWidth = 'm', } = props;
|
|
33
33
|
const colSizes = useMemo(() => getTextWidth(textWidth), [textWidth]);
|
|
34
34
|
const globalTheme = useTheme();
|
|
35
35
|
const themedBackground = getThemedValue(background, globalTheme);
|
|
36
36
|
return (React.createElement(AnimateBlock, { className: b({ size, theme }), animate: animated },
|
|
37
37
|
React.createElement("div", { className: b('root', { background: Boolean(background) || Boolean(unicorn) }) },
|
|
38
|
+
topTags && (React.createElement("div", { className: b('tags', { top: true }) }, topTags.map((item, index) => (React.createElement("div", { key: index, className: b('tag') }, item))))),
|
|
38
39
|
React.createElement(Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
|
|
39
40
|
fileContent && (React.createElement(Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes }, fileContent.map((file) => (React.createElement(FileLink, Object.assign({ className: b('file') }, file, { key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme })))))),
|
|
40
41
|
tags && (React.createElement("div", { className: b('tags') }, tags.map((item, index) => (React.createElement("div", { key: index, className: b('tag') }, item))))),
|
|
@@ -9,7 +9,9 @@ export declare const ContentLayoutBlock: {
|
|
|
9
9
|
background: {
|
|
10
10
|
anyOf: ({
|
|
11
11
|
optionName: string;
|
|
12
|
-
type: string;
|
|
12
|
+
type: string; /**
|
|
13
|
+
* @deprecated Use params on top level instead
|
|
14
|
+
*/
|
|
13
15
|
additionalProperties: boolean;
|
|
14
16
|
properties: {
|
|
15
17
|
src: {
|
|
@@ -102,6 +104,12 @@ export declare const ContentLayoutBlock: {
|
|
|
102
104
|
type: string;
|
|
103
105
|
};
|
|
104
106
|
};
|
|
107
|
+
topTags: {
|
|
108
|
+
type: string;
|
|
109
|
+
items: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
105
113
|
theme: {
|
|
106
114
|
type: string;
|
|
107
115
|
enum: string[];
|
|
@@ -289,9 +297,7 @@ export declare const ContentLayoutBlock: {
|
|
|
289
297
|
contentType: string;
|
|
290
298
|
};
|
|
291
299
|
size: {
|
|
292
|
-
type: string;
|
|
293
|
-
* @deprecated Use params on top level instead
|
|
294
|
-
*/
|
|
300
|
+
type: string;
|
|
295
301
|
enum: string[];
|
|
296
302
|
};
|
|
297
303
|
links: {
|
|
@@ -373,7 +379,9 @@ export declare const ContentLayoutBlock: {
|
|
|
373
379
|
background: {
|
|
374
380
|
anyOf: ({
|
|
375
381
|
optionName: string;
|
|
376
|
-
type: string;
|
|
382
|
+
type: string; /**
|
|
383
|
+
* @deprecated Use params on top level instead
|
|
384
|
+
*/
|
|
377
385
|
additionalProperties: boolean;
|
|
378
386
|
properties: {
|
|
379
387
|
src: {
|
|
@@ -466,6 +474,12 @@ export declare const ContentLayoutBlock: {
|
|
|
466
474
|
type: string;
|
|
467
475
|
};
|
|
468
476
|
};
|
|
477
|
+
topTags: {
|
|
478
|
+
type: string;
|
|
479
|
+
items: {
|
|
480
|
+
type: string;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
469
483
|
theme: {
|
|
470
484
|
type: string;
|
|
471
485
|
enum: string[];
|
|
@@ -720,6 +720,7 @@ export interface ContentLayoutBlockProps extends ContentLayoutBlockParams, Anima
|
|
|
720
720
|
textContent: ContentBlockProps;
|
|
721
721
|
fileContent?: FileLinkProps[];
|
|
722
722
|
tags?: string[];
|
|
723
|
+
topTags?: string[];
|
|
723
724
|
}
|
|
724
725
|
export type SVGIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
725
726
|
export interface ContentItemProps {
|
|
@@ -1377,6 +1377,12 @@ export declare const cardSchemas: {
|
|
|
1377
1377
|
type: string;
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
|
+
topTags: {
|
|
1381
|
+
type: string;
|
|
1382
|
+
items: {
|
|
1383
|
+
type: string;
|
|
1384
|
+
};
|
|
1385
|
+
};
|
|
1380
1386
|
theme: {
|
|
1381
1387
|
type: string;
|
|
1382
1388
|
enum: string[];
|
|
@@ -1736,6 +1742,12 @@ export declare const cardSchemas: {
|
|
|
1736
1742
|
type: string;
|
|
1737
1743
|
};
|
|
1738
1744
|
};
|
|
1745
|
+
topTags: {
|
|
1746
|
+
type: string;
|
|
1747
|
+
items: {
|
|
1748
|
+
type: string;
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1739
1751
|
theme: {
|
|
1740
1752
|
type: string;
|
|
1741
1753
|
enum: string[];
|
|
@@ -102,6 +102,12 @@ export declare const ContentLayoutCard: {
|
|
|
102
102
|
type: string;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
+
topTags: {
|
|
106
|
+
type: string;
|
|
107
|
+
items: {
|
|
108
|
+
type: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
105
111
|
theme: {
|
|
106
112
|
type: string;
|
|
107
113
|
enum: string[];
|
|
@@ -461,6 +467,12 @@ export declare const ContentLayoutCard: {
|
|
|
461
467
|
type: string;
|
|
462
468
|
};
|
|
463
469
|
};
|
|
470
|
+
topTags: {
|
|
471
|
+
type: string;
|
|
472
|
+
items: {
|
|
473
|
+
type: string;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
464
476
|
theme: {
|
|
465
477
|
type: string;
|
|
466
478
|
enum: string[];
|