@gravity-ui/page-constructor 8.2.2 → 8.3.0
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/README.md +1 -1
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/cjs/blocks/FoldableList/schema.d.ts +0 -11
- package/build/cjs/blocks/Form/Form.css +10 -1
- package/build/cjs/blocks/Form/Form.js +4 -2
- package/build/cjs/blocks/Form/Form.js.map +1 -1
- package/build/cjs/blocks/Form/schema.d.ts +0 -11
- package/build/cjs/blocks/Info/schema.d.ts +0 -22
- package/build/cjs/blocks/Map/schema.d.ts +0 -11
- package/build/cjs/blocks/Media/schema.d.ts +0 -22
- package/build/cjs/blocks/Questions/schema.d.ts +0 -11
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -11
- package/build/cjs/components/Buttons/Buttons.css +2 -2
- package/build/cjs/components/Buttons/Buttons.js +2 -0
- package/build/cjs/components/Buttons/Buttons.js.map +1 -1
- package/build/cjs/components/ContentList/ContentList.css +8 -8
- package/build/cjs/components/ContentList/ContentList.js +2 -0
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/components/IconWrapper/IconWrapper.css +6 -0
- package/build/cjs/components/Links/Links.css +1 -1
- package/build/cjs/components/Links/Links.js +2 -0
- package/build/cjs/components/Links/Links.js.map +1 -1
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +9 -19
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +5 -30
- package/build/cjs/schema/validators/common.js +1 -1
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +29 -17
- package/build/cjs/sub-blocks/Content/Content.js +7 -13
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +0 -100
- package/build/cjs/sub-blocks/Content/schema.js +1 -14
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/esm/blocks/FoldableList/schema.d.ts +0 -11
- package/build/esm/blocks/Form/Form.css +10 -1
- package/build/esm/blocks/Form/Form.js +4 -2
- package/build/esm/blocks/Form/Form.js.map +1 -1
- package/build/esm/blocks/Form/schema.d.ts +0 -11
- package/build/esm/blocks/Info/schema.d.ts +0 -22
- package/build/esm/blocks/Map/schema.d.ts +0 -11
- package/build/esm/blocks/Media/schema.d.ts +0 -22
- package/build/esm/blocks/Questions/schema.d.ts +0 -11
- package/build/esm/blocks/Tabs/schema.d.ts +0 -11
- package/build/esm/components/Buttons/Buttons.css +2 -2
- package/build/esm/components/Buttons/Buttons.js +2 -0
- package/build/esm/components/Buttons/Buttons.js.map +1 -1
- package/build/esm/components/ContentList/ContentList.css +8 -8
- package/build/esm/components/ContentList/ContentList.js +2 -0
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/components/IconWrapper/IconWrapper.css +6 -0
- package/build/esm/components/Links/Links.css +1 -1
- package/build/esm/components/Links/Links.js +2 -0
- package/build/esm/components/Links/Links.js.map +1 -1
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +9 -19
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +5 -30
- package/build/esm/schema/validators/common.js +1 -1
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/Content.css +29 -17
- package/build/esm/sub-blocks/Content/Content.js +7 -12
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +0 -100
- package/build/esm/sub-blocks/Content/schema.js +0 -13
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +9 -19
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +6 -6
- package/widget/index.js +1 -1
- package/build/cjs/components/ContentLabels/ContentLabels.css +0 -53
- package/build/cjs/components/ContentLabels/ContentLabels.d.ts +0 -3
- package/build/cjs/components/ContentLabels/ContentLabels.js +0 -16
- package/build/cjs/components/ContentLabels/ContentLabels.js.map +0 -1
- package/build/esm/components/ContentLabels/ContentLabels.css +0 -53
- package/build/esm/components/ContentLabels/ContentLabels.d.ts +0 -4
- package/build/esm/components/ContentLabels/ContentLabels.js +0 -14
- package/build/esm/components/ContentLabels/ContentLabels.js.map +0 -1
|
@@ -295,20 +295,13 @@ export declare const BackgroundCard: {
|
|
|
295
295
|
contentType: string;
|
|
296
296
|
inputType: string;
|
|
297
297
|
};
|
|
298
|
-
|
|
298
|
+
size: {
|
|
299
299
|
type: string;
|
|
300
300
|
enum: string[];
|
|
301
301
|
};
|
|
302
|
-
|
|
302
|
+
theme: {
|
|
303
303
|
type: string;
|
|
304
|
-
|
|
305
|
-
type: string;
|
|
306
|
-
properties: {
|
|
307
|
-
when: {
|
|
308
|
-
type: string;
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
};
|
|
304
|
+
enum: string[];
|
|
312
305
|
};
|
|
313
306
|
additionalInfo: {
|
|
314
307
|
type: string;
|
|
@@ -7,7 +7,7 @@ const schema_1 = require("../../components/Image/schema.js");
|
|
|
7
7
|
const common_1 = require("../../schema/validators/common.js");
|
|
8
8
|
const event_1 = require("../../schema/validators/event.js");
|
|
9
9
|
const schema_2 = require("../Content/schema.js");
|
|
10
|
-
const BackgroundCardContentProps = (0, omit_1.default)(schema_2.ContentBase, ['
|
|
10
|
+
const BackgroundCardContentProps = (0, omit_1.default)(schema_2.ContentBase, ['controlPosition']);
|
|
11
11
|
exports.BackgroundCard = {
|
|
12
12
|
'background-card': {
|
|
13
13
|
additionalProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAA+D;AAC/D,8DAMwC;AACxC,4DAAmE;AACnE,iDAA8C;AAE9C,MAAM,0BAA0B,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAA+D;AAC/D,8DAMwC;AACxC,4DAAmE;AACnE,iDAA8C;AAE9C,MAAM,0BAA0B,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE7D,QAAA,cAAc,GAAG;IAC1B,iBAAiB,EAAE;QACf,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE;YACR,GAAG,kBAAS;YACZ,GAAG,iBAAQ;YACX,GAAG,wBAAe;YAClB,GAAG,0BAA0B;YAC7B,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;YACvC,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;aAC9B;YACD,eAAe,EAAE;gBACb,KAAK,EAAE;oBACH;wBACI,GAAG,4BAAoB;wBACvB,UAAU,EAAE,QAAQ;qBACvB;oBACD;wBACI,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,4BAAoB;wBAC3B,UAAU,EAAE,MAAM;qBACrB;iBACJ;aACJ;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;YACD,QAAQ,EAAE,6BAAoB;SACjC;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageObjectProps} from '../../components/Image/schema';\nimport {\n BaseProps,\n CardBase,\n CardLayoutProps,\n containerSizesObject,\n withTheme,\n} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../Content/schema';\n\nconst BackgroundCardContentProps = omit(ContentBase, ['controlPosition']);\n\nexport const BackgroundCard = {\n 'background-card': {\n additionalProperties: false,\n required: ['title', 'text'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BackgroundCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n background: withTheme(ImageObjectProps),\n backgroundColor: {\n type: 'string',\n },\n paddingBottom: {\n type: 'string',\n enum: ['s', 'm', 'l', 'xl'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n colSizes: containerSizesObject,\n },\n },\n};\n"]}
|
|
@@ -190,16 +190,9 @@ export declare const BasicCard: {
|
|
|
190
190
|
contentType: string;
|
|
191
191
|
inputType: string;
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
size: {
|
|
194
194
|
type: string;
|
|
195
|
-
|
|
196
|
-
type: string;
|
|
197
|
-
properties: {
|
|
198
|
-
when: {
|
|
199
|
-
type: string;
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
};
|
|
195
|
+
enum: string[];
|
|
203
196
|
};
|
|
204
197
|
additionalInfo: {
|
|
205
198
|
type: string;
|
|
@@ -6,7 +6,7 @@ const omit_1 = tslib_1.__importDefault(require("lodash/omit.js"));
|
|
|
6
6
|
const schema_1 = require("../../components/Image/schema.js");
|
|
7
7
|
const common_1 = require("../../schema/validators/common.js");
|
|
8
8
|
const schema_2 = require("../Content/schema.js");
|
|
9
|
-
const BasicCardContentProps = (0, omit_1.default)(schema_2.ContentBase, ['
|
|
9
|
+
const BasicCardContentProps = (0, omit_1.default)(schema_2.ContentBase, ['theme', 'controlPosition']);
|
|
10
10
|
exports.BasicCard = {
|
|
11
11
|
'basic-card': {
|
|
12
12
|
additionalProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAAyD;AACzD,8DAKwC;AACxC,iDAA8C;AAE9C,MAAM,qBAAqB,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAAyD;AACzD,8DAKwC;AACxC,iDAA8C;AAE9C,MAAM,qBAAqB,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAEjE,QAAA,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE;YACR,GAAG,kBAAS;YACZ,GAAG,iBAAQ;YACX,GAAG,wBAAe;YAClB,GAAG,qBAAqB;YACxB,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,IAAI,EAAE,mBAAU;YAChB,WAAW,EAAE,yBAAgB;YAC7B,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;aAC/C;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;aACxB;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;YACD;;eAEG;YACH,oBAAoB,EAAE;gBAClB,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {\n BaseProps,\n CardBase,\n CardLayoutProps,\n GravityIconProps,\n} from '../../schema/validators/common';\nimport {ContentBase} from '../Content/schema';\n\nconst BasicCardContentProps = omit(ContentBase, ['theme', 'controlPosition']);\n\nexport const BasicCard = {\n 'basic-card': {\n additionalProperties: false,\n required: [],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BasicCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n icon: ImageProps,\n gravityIcon: GravityIconProps,\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n iconPosition: {\n type: 'string',\n enum: ['top', 'left'],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n /**\n * @deprecated This property will be removed in future versions\n */\n hoverBackgroundColor: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-content_size_xl .pc-content__text .yfm,
|
|
2
|
+
.pc-content_size_xl .pc-content__notice .yfm, .pc-content_size_l .pc-content__text .yfm,
|
|
2
3
|
.pc-content_size_l .pc-content__notice .yfm, .pc-content_size_m .pc-content__text .yfm,
|
|
3
4
|
.pc-content_size_m .pc-content__notice .yfm {
|
|
4
5
|
margin: 0;
|
|
@@ -36,10 +37,6 @@ unpredictable css rules order in build */
|
|
|
36
37
|
text-align: center;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
.pc-content_centered .pc-content__labels {
|
|
40
|
-
justify-content: center;
|
|
41
|
-
margin-inline: auto;
|
|
42
|
-
}
|
|
43
40
|
.pc-content_centered .pc-content__list {
|
|
44
41
|
margin-inline: auto;
|
|
45
42
|
}
|
|
@@ -64,15 +61,11 @@ unpredictable css rules order in build */
|
|
|
64
61
|
.pc-content_size_s .pc-content__text_without-title {
|
|
65
62
|
margin-top: 0;
|
|
66
63
|
}
|
|
67
|
-
.pc-content_size_s .pc-content__labels,
|
|
68
64
|
.pc-content_size_s .pc-content__list,
|
|
69
65
|
.pc-content_size_s .pc-content__links,
|
|
70
66
|
.pc-content_size_s .pc-content__notice {
|
|
71
67
|
margin-top: 16px;
|
|
72
68
|
}
|
|
73
|
-
.pc-content_size_s .pc-content__labels + .pc-content__list, .pc-content_size_s .pc-content__labels + .pc-content__link, .pc-content_size_s .pc-content__labels + .pc-content__notice {
|
|
74
|
-
margin-top: 20px;
|
|
75
|
-
}
|
|
76
69
|
.pc-content_size_s .pc-content__buttons {
|
|
77
70
|
margin-top: 20px;
|
|
78
71
|
}
|
|
@@ -99,15 +92,11 @@ unpredictable css rules order in build */
|
|
|
99
92
|
font-size: var(--g-text-body-2-font-size);
|
|
100
93
|
line-height: var(--g-text-body-2-line-height);
|
|
101
94
|
}
|
|
102
|
-
.pc-content_size_m .pc-content__labels,
|
|
103
95
|
.pc-content_size_m .pc-content__list,
|
|
104
96
|
.pc-content_size_m .pc-content__links,
|
|
105
97
|
.pc-content_size_m .pc-content__notice {
|
|
106
98
|
margin-top: 20px;
|
|
107
99
|
}
|
|
108
|
-
.pc-content_size_m .pc-content__labels + .pc-content__list, .pc-content_size_m .pc-content__labels + .pc-content__link, .pc-content_size_m .pc-content__labels + .pc-content__notice {
|
|
109
|
-
margin-top: 24px;
|
|
110
|
-
}
|
|
111
100
|
.pc-content_size_m .pc-content__buttons {
|
|
112
101
|
margin-top: 24px;
|
|
113
102
|
}
|
|
@@ -130,18 +119,41 @@ unpredictable css rules order in build */
|
|
|
130
119
|
font-size: var(--g-text-body-2-font-size);
|
|
131
120
|
line-height: var(--g-text-body-2-line-height);
|
|
132
121
|
}
|
|
133
|
-
.pc-content_size_l .pc-content__labels,
|
|
134
122
|
.pc-content_size_l .pc-content__list,
|
|
135
123
|
.pc-content_size_l .pc-content__links,
|
|
136
124
|
.pc-content_size_l .pc-content__notice {
|
|
137
125
|
margin-top: 20px;
|
|
138
126
|
}
|
|
139
|
-
.pc-content_size_l .pc-content__labels + .pc-content__list, .pc-content_size_l .pc-content__labels + .pc-content__link, .pc-content_size_l .pc-content__labels + .pc-content__notice {
|
|
140
|
-
margin-top: 24px;
|
|
141
|
-
}
|
|
142
127
|
.pc-content_size_l .pc-content__buttons {
|
|
143
128
|
margin-top: 24px;
|
|
144
129
|
}
|
|
130
|
+
.pc-content_size_xl .pc-content__text {
|
|
131
|
+
margin-top: 16px;
|
|
132
|
+
}
|
|
133
|
+
.pc-content_size_xl .pc-content__text_without-title {
|
|
134
|
+
margin-top: 0;
|
|
135
|
+
}
|
|
136
|
+
.pc-content_size_xl .pc-content__text .yfm,
|
|
137
|
+
.pc-content_size_xl .pc-content__notice .yfm {
|
|
138
|
+
font-size: var(--g-text-body-3-font-size);
|
|
139
|
+
line-height: var(--g-text-body-3-line-height);
|
|
140
|
+
}
|
|
141
|
+
.pc-content_size_xl .pc-content__text .yfm {
|
|
142
|
+
font-size: var(--g-text-body-3-font-size);
|
|
143
|
+
line-height: var(--g-text-body-3-line-height);
|
|
144
|
+
}
|
|
145
|
+
.pc-content_size_xl .pc-content__notice .yfm {
|
|
146
|
+
font-size: var(--g-text-body-2-font-size);
|
|
147
|
+
line-height: var(--g-text-body-2-line-height);
|
|
148
|
+
}
|
|
149
|
+
.pc-content_size_xl .pc-content__list,
|
|
150
|
+
.pc-content_size_xl .pc-content__links,
|
|
151
|
+
.pc-content_size_xl .pc-content__notice {
|
|
152
|
+
margin-top: 20px;
|
|
153
|
+
}
|
|
154
|
+
.pc-content_size_xl .pc-content__buttons {
|
|
155
|
+
margin-top: 32px;
|
|
156
|
+
}
|
|
145
157
|
.pc-content_theme_dark.pc-content_theme_dark {
|
|
146
158
|
--g-color-line-focus: var(--pc-color-line-focus-dark);
|
|
147
159
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
4
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
5
|
const components_1 = require("../../components/index.js");
|
|
7
|
-
const ContentLabels_1 = tslib_1.__importDefault(require("../../components/ContentLabels/ContentLabels.js"));
|
|
8
6
|
const grid_1 = require("../../grid/index.js");
|
|
9
7
|
const utils_1 = require("../../utils/index.js");
|
|
10
8
|
const blocks_1 = require("../../utils/blocks.js");
|
|
@@ -16,31 +14,27 @@ function getTextSize(size) {
|
|
|
16
14
|
case 'm':
|
|
17
15
|
return 'sm';
|
|
18
16
|
case 'l':
|
|
17
|
+
return 'm';
|
|
18
|
+
case 'xl':
|
|
19
|
+
return 'l';
|
|
19
20
|
default:
|
|
20
21
|
return 'm';
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
const Content = (props) => {
|
|
24
|
-
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list,
|
|
25
|
-
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, [
|
|
26
|
-
'links',
|
|
27
|
-
'link',
|
|
28
|
-
'buttons',
|
|
29
|
-
'button',
|
|
30
|
-
'list',
|
|
31
|
-
'labels',
|
|
32
|
-
]);
|
|
25
|
+
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, controlPosition, } = props;
|
|
26
|
+
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['links', 'link', 'buttons', 'button', 'list']);
|
|
33
27
|
const titleProps = !title || typeof title === 'string'
|
|
34
28
|
? { text: title, textSize: getTextSize(size) }
|
|
35
29
|
: title;
|
|
36
30
|
const hasTitle = Boolean(title);
|
|
37
31
|
const defaultTitleId = (0, uikit_1.useUniqId)();
|
|
38
32
|
const titleId = titleIdFromProps || defaultTitleId;
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(grid_1.Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && ((0, jsx_runtime_1.jsx)(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && ((0, jsx_runtime_1.jsx)("div", { className: b('text', { ['without-title']: !hasTitle }), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })),
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(grid_1.Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && ((0, jsx_runtime_1.jsx)(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && ((0, jsx_runtime_1.jsx)("div", { className: b('text', { ['without-title']: !hasTitle }), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), list?.length ? ((0, jsx_runtime_1.jsx)("div", { className: b('list'), children: (0, jsx_runtime_1.jsx)(components_1.ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && ((0, jsx_runtime_1.jsx)("div", { className: b('notice'), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: additionalInfo, modifiers: {
|
|
40
34
|
constructor: true,
|
|
41
35
|
'constructor-notice': true,
|
|
42
36
|
[`constructor-size-${size}`]: true,
|
|
43
|
-
} }) })), links && ((0, jsx_runtime_1.jsx)(components_1.Links, { className: b('links'
|
|
37
|
+
} }) })), links && ((0, jsx_runtime_1.jsx)(components_1.Links, { className: b('links'), size: size, links: links, titleId: titleId, qa: qaAttributes.links, linkQa: qaAttributes.link })), buttons && ((0, jsx_runtime_1.jsx)(components_1.Buttons, { className: b('buttons'), size: size, buttons: buttons, titleId: titleId, qa: qaAttributes.buttons, buttonQa: qaAttributes.button }))] }));
|
|
44
38
|
};
|
|
45
39
|
exports.default = Content;
|
|
46
40
|
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,0DAAgF;AAChF,8CAA+B;AAS/B,gDAAkC;AAClC,kDAAmD;AAInD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,IAAI;YACL,OAAO,GAAG,CAAC;QACf;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAID,MAAM,OA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E,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n return 'm';\n case 'xl':\n return 'l';\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n qa={qaAttributes.list}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links')}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons')}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
|
|
@@ -82,84 +82,6 @@ export declare const ContentItem: {
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
export declare const ContentLabel: {
|
|
86
|
-
additionalProperties: boolean;
|
|
87
|
-
required: string[];
|
|
88
|
-
properties: {
|
|
89
|
-
text: {
|
|
90
|
-
type: string;
|
|
91
|
-
contentType: string;
|
|
92
|
-
};
|
|
93
|
-
icon: {
|
|
94
|
-
oneOf: (({
|
|
95
|
-
oneOf: ({
|
|
96
|
-
type: string;
|
|
97
|
-
properties: {
|
|
98
|
-
when: {
|
|
99
|
-
type: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
} | {
|
|
103
|
-
type: string;
|
|
104
|
-
pattern: string;
|
|
105
|
-
optionName: string;
|
|
106
|
-
items?: undefined;
|
|
107
|
-
} | {
|
|
108
|
-
type: string;
|
|
109
|
-
items: {
|
|
110
|
-
type: string;
|
|
111
|
-
properties: {
|
|
112
|
-
when: {
|
|
113
|
-
type: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
optionName: string;
|
|
118
|
-
pattern?: undefined;
|
|
119
|
-
})[];
|
|
120
|
-
} & {
|
|
121
|
-
optionName: string;
|
|
122
|
-
}) | {
|
|
123
|
-
type: string;
|
|
124
|
-
additionalProperties: boolean;
|
|
125
|
-
required: import("../../index.js").Theme[];
|
|
126
|
-
properties: {};
|
|
127
|
-
optionName: string;
|
|
128
|
-
})[];
|
|
129
|
-
};
|
|
130
|
-
gravityIcon: {
|
|
131
|
-
oneOf: (({
|
|
132
|
-
oneOf: ({
|
|
133
|
-
type: string;
|
|
134
|
-
additionalProperties?: undefined;
|
|
135
|
-
required?: undefined;
|
|
136
|
-
properties?: undefined;
|
|
137
|
-
} | {
|
|
138
|
-
type: string;
|
|
139
|
-
additionalProperties: boolean;
|
|
140
|
-
required: string[];
|
|
141
|
-
properties: {
|
|
142
|
-
name: {
|
|
143
|
-
type: string;
|
|
144
|
-
};
|
|
145
|
-
color: {
|
|
146
|
-
type: string;
|
|
147
|
-
enum: string[];
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
})[];
|
|
151
|
-
} & {
|
|
152
|
-
optionName: string;
|
|
153
|
-
}) | {
|
|
154
|
-
type: string;
|
|
155
|
-
additionalProperties: boolean;
|
|
156
|
-
required: import("../../index.js").Theme[];
|
|
157
|
-
properties: {};
|
|
158
|
-
optionName: string;
|
|
159
|
-
})[];
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
85
|
export declare const ContentBase: {
|
|
164
86
|
title: {
|
|
165
87
|
oneOf: ({
|
|
@@ -321,17 +243,6 @@ export declare const ContentBase: {
|
|
|
321
243
|
};
|
|
322
244
|
};
|
|
323
245
|
};
|
|
324
|
-
labels: {
|
|
325
|
-
type: string;
|
|
326
|
-
items: {
|
|
327
|
-
type: string;
|
|
328
|
-
properties: {
|
|
329
|
-
when: {
|
|
330
|
-
type: string;
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
246
|
controlPosition: {
|
|
336
247
|
type: string;
|
|
337
248
|
enum: string[];
|
|
@@ -505,17 +416,6 @@ export declare const ContentBlock: {
|
|
|
505
416
|
};
|
|
506
417
|
};
|
|
507
418
|
};
|
|
508
|
-
labels: {
|
|
509
|
-
type: string;
|
|
510
|
-
items: {
|
|
511
|
-
type: string;
|
|
512
|
-
properties: {
|
|
513
|
-
when: {
|
|
514
|
-
type: string;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
419
|
controlPosition: {
|
|
520
420
|
type: string;
|
|
521
421
|
enum: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContentBlock = exports.ContentBase = exports.
|
|
3
|
+
exports.ContentBlock = exports.ContentBase = exports.ContentItem = void 0;
|
|
4
4
|
const schema_1 = require("../../components/Image/schema.js");
|
|
5
5
|
const common_1 = require("../../schema/validators/common.js");
|
|
6
6
|
const utils_1 = require("../../schema/validators/utils.js");
|
|
@@ -27,18 +27,6 @@ exports.ContentItem = {
|
|
|
27
27
|
gravityIcon: (0, common_1.withTheme)(common_1.GravityIconProps),
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
|
-
exports.ContentLabel = {
|
|
31
|
-
additionalProperties: false,
|
|
32
|
-
required: ['text'],
|
|
33
|
-
properties: {
|
|
34
|
-
text: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
contentType: 'text',
|
|
37
|
-
},
|
|
38
|
-
icon: (0, common_1.withTheme)(schema_1.ImageProps),
|
|
39
|
-
gravityIcon: (0, common_1.withTheme)(common_1.GravityIconProps),
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
30
|
exports.ContentBase = {
|
|
43
31
|
title: {
|
|
44
32
|
oneOf: [
|
|
@@ -73,7 +61,6 @@ exports.ContentBase = {
|
|
|
73
61
|
enum: common_1.contentThemes,
|
|
74
62
|
},
|
|
75
63
|
list: (0, utils_1.filteredArray)(exports.ContentItem),
|
|
76
|
-
labels: (0, utils_1.filteredArray)(exports.ContentLabel),
|
|
77
64
|
controlPosition: {
|
|
78
65
|
type: 'string',
|
|
79
66
|
enum: ['default', 'bottom'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AACzD,8DAUwC;AACxC,4DAA4D;AAE/C,QAAA,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACH;YACI,QAAQ,EAAE,CAAC,MAAM,CAAC;SACrB;QACD;YACI,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC5B;KACJ;IACD,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,IAAA,kBAAS,EAAC,mBAAU,CAAC;QAC3B,WAAW,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AACzD,8DAUwC;AACxC,4DAA4D;AAE/C,QAAA,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACH;YACI,QAAQ,EAAE,CAAC,MAAM,CAAC;SACrB;QACD;YACI,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC5B;KACJ;IACD,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,IAAA,kBAAS,EAAC,mBAAU,CAAC;QAC3B,WAAW,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,WAAW,GAAG;IACvB,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;gBACnB,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,mBAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;KACrB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,qBAAY;KACrB;IACD,KAAK,EAAE,IAAA,qBAAa,EAAC,kBAAS,CAAC;IAC/B,OAAO,EAAE,IAAA,qBAAa,EAAC,oBAAW,CAAC;IACnC,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,sBAAa;KACtB;IACD,IAAI,EAAE,IAAA,qBAAa,EAAC,mBAAW,CAAC;IAChC,eAAe,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC9B;CACJ,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE;QACL,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACR,GAAG,mBAAW;YACd,QAAQ,EAAE,4BAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,mBAAU,EAAC,CAAC,EAAE,EAAE,CAAC;YACvF,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n ButtonBlock,\n GravityIconProps,\n LinkProps,\n TitleProps,\n containerSizesArray,\n contentSizes,\n contentThemes,\n sizeNumber,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\n\nexport const ContentItem = {\n additionalProperties: false,\n oneOf: [\n {\n required: ['icon'],\n },\n {\n required: ['gravityIcon'],\n },\n ],\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentBase = {\n title: {\n oneOf: [\n {\n type: 'string',\n contentType: 'text',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n additionalInfo: {\n type: 'string',\n contentType: 'yfm',\n },\n size: {\n type: 'string',\n enum: contentSizes,\n },\n links: filteredArray(LinkProps),\n buttons: filteredArray(ButtonBlock),\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n list: filteredArray(ContentItem),\n controlPosition: {\n type: 'string',\n enum: ['default', 'bottom'],\n },\n};\n\nexport const ContentBlock = {\n content: {\n additionalProperties: false,\n properties: {\n ...ContentBase,\n colSizes: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n centered: {\n type: 'boolean',\n },\n },\n },\n};\n"]}
|
|
@@ -207,17 +207,6 @@ export declare const ImageCard: {
|
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
209
|
} | undefined;
|
|
210
|
-
labels?: {
|
|
211
|
-
type: string;
|
|
212
|
-
items: {
|
|
213
|
-
type: string;
|
|
214
|
-
properties: {
|
|
215
|
-
when: {
|
|
216
|
-
type: string;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
} | undefined;
|
|
221
210
|
controlPosition: {
|
|
222
211
|
type: string;
|
|
223
212
|
enum: string[];
|
|
@@ -472,17 +472,6 @@ export declare const LayoutItem: {
|
|
|
472
472
|
};
|
|
473
473
|
};
|
|
474
474
|
};
|
|
475
|
-
labels: {
|
|
476
|
-
type: string;
|
|
477
|
-
items: {
|
|
478
|
-
type: string;
|
|
479
|
-
properties: {
|
|
480
|
-
when: {
|
|
481
|
-
type: string;
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
475
|
controlPosition: {
|
|
487
476
|
type: string;
|
|
488
477
|
enum: string[];
|
|
@@ -15,7 +15,7 @@ exports.LayoutItem = {
|
|
|
15
15
|
...common_1.BaseProps,
|
|
16
16
|
...common_1.CardLayoutProps,
|
|
17
17
|
media: common_1.MediaProps,
|
|
18
|
-
content: (0, omit_1.default)(schema_2.ContentBase, ['colSize', '
|
|
18
|
+
content: (0, omit_1.default)(schema_2.ContentBase, ['colSize', 'centered']),
|
|
19
19
|
contentMargin: {
|
|
20
20
|
type: 'string',
|
|
21
21
|
enum: ['m', 'l'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,yFAAwD;AACxD,8DAAsF;AACtF,4DAAmE;AACnE,iDAA4D;AAE/C,QAAA,UAAU,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE;QACR,GAAG,kBAAS;QACZ,GAAG,wBAAe;QAClB,KAAK,EAAE,mBAAU;QACjB,OAAO,EAAE,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,yFAAwD;AACxD,8DAAsF;AACtF,4DAAmE;AACnE,iDAA4D;AAE/C,QAAA,UAAU,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE;QACR,GAAG,kBAAS;QACZ,GAAG,wBAAe;QAClB,KAAK,EAAE,mBAAU;QACjB,OAAO,EAAE,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACnD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YAChB,OAAO,EAAE,GAAG;SACf;QACD,QAAQ,EAAE,gBAAQ;QAClB,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;SAClB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,eAAe,EAAE;YACb,KAAK,EAAE;gBACH;oBACI,GAAG,4BAAoB;oBACvB,UAAU,EAAE,QAAQ;iBACvB;gBACD;oBACI,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,4BAAoB;oBAC3B,UAAU,EAAE,MAAM;iBACrB;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport metaInfo from '../../components/MetaInfo/schema';\nimport {BaseProps, CardLayoutProps, MediaProps} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../../sub-blocks/Content/schema';\n\nexport const LayoutItem = {\n type: 'object',\n additionalProperties: false,\n required: ['content', 'media'],\n properties: {\n ...BaseProps,\n ...CardLayoutProps,\n media: MediaProps,\n content: omit(ContentBase, ['colSize', 'centered']),\n contentMargin: {\n type: 'string',\n enum: ['m', 'l'],\n default: 'm',\n },\n metaInfo: metaInfo,\n border: {\n type: 'boolean',\n },\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_s {
|
|
1
|
+
.pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_xl, .pc-content-layout-block__files_size_s {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ unpredictable css rules order in build */
|
|
|
18
18
|
font-size: var(--g-text-body-2-font-size);
|
|
19
19
|
line-height: var(--g-text-body-2-line-height);
|
|
20
20
|
}
|
|
21
|
-
.pc-content-layout-block__files_size_l {
|
|
21
|
+
.pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_xl {
|
|
22
22
|
font-size: var(--g-text-body-3-font-size);
|
|
23
23
|
line-height: var(--g-text-body-3-line-height);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,kCAAyB;AAC3D,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,cAAc,EAAC,kDAAyC;AAChE,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAE/B,OAAO,EAAC,OAAO,EAAC,kCAAyB;AACzC,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;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EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,eAAC,QAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,KAAC,eAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
|
|
1
|
+
{"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,kCAAyB;AAC3D,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,cAAc,EAAC,kDAAyC;AAChE,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAE/B,OAAO,EAAC,OAAO,EAAC,kCAAyB;AACzC,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CA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O,IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,KACnB,WAAW,EACf,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,eAAC,QAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,KAAC,eAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n case 'l':\n case 'xl':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
|
|
@@ -303,17 +303,6 @@ export declare const ContentLayoutBlock: {
|
|
|
303
303
|
};
|
|
304
304
|
};
|
|
305
305
|
};
|
|
306
|
-
labels: {
|
|
307
|
-
type: string;
|
|
308
|
-
items: {
|
|
309
|
-
type: string;
|
|
310
|
-
properties: {
|
|
311
|
-
when: {
|
|
312
|
-
type: string;
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
306
|
controlPosition: {
|
|
318
307
|
type: string;
|
|
319
308
|
enum: string[];
|
|
@@ -129,17 +129,6 @@ export declare const FoldableListBlock: {
|
|
|
129
129
|
contentType: string;
|
|
130
130
|
inputType: string;
|
|
131
131
|
};
|
|
132
|
-
labels: {
|
|
133
|
-
type: string;
|
|
134
|
-
items: {
|
|
135
|
-
type: string;
|
|
136
|
-
properties: {
|
|
137
|
-
when: {
|
|
138
|
-
type: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
132
|
additionalInfo: {
|
|
144
133
|
type: string;
|
|
145
134
|
contentType: string;
|