@gravity-ui/blog-constructor 8.2.0 → 8.4.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/build/cjs/blocks/CompactMedia/CompactMedia.css +27 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.d.ts +2 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.js +22 -0
- package/build/cjs/blocks/CompactMedia/CompactMedia.js.map +1 -0
- package/build/cjs/blocks/CompactMedia/schema.d.ts +135 -0
- package/build/cjs/blocks/CompactMedia/schema.js +18 -0
- package/build/cjs/blocks/CompactMedia/schema.js.map +1 -0
- package/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
- package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
- package/build/cjs/blocks/SideCardList/schema.js +37 -0
- package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
- package/build/cjs/blocks/Take/Take.css +70 -0
- package/build/cjs/blocks/Take/Take.d.ts +2 -0
- package/build/cjs/blocks/Take/Take.js +28 -0
- package/build/cjs/blocks/Take/Take.js.map +1 -0
- package/build/cjs/blocks/Take/schema.d.ts +96 -0
- package/build/cjs/blocks/Take/schema.js +26 -0
- package/build/cjs/blocks/Take/schema.js.map +1 -0
- package/build/cjs/components/Wrapper/Wrapper.css +42 -0
- package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/cjs/components/Wrapper/Wrapper.js +2 -2
- package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
- package/build/cjs/constructor/blocksMap.d.ts +3 -0
- package/build/cjs/constructor/blocksMap.js +6 -0
- package/build/cjs/constructor/blocksMap.js.map +1 -1
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +3 -0
- package/build/cjs/models/blocks.d.ts +27 -2
- package/build/cjs/models/blocks.js.map +1 -1
- package/build/cjs/models/common.d.ts +4 -1
- package/build/cjs/models/common.js +3 -0
- package/build/cjs/models/common.js.map +1 -1
- package/build/cjs/models/paddings.d.ts +1 -1
- package/build/cjs/models/paddings.js.map +1 -1
- package/build/cjs/schema/blocks.d.ts +2 -0
- package/build/cjs/schema/blocks.js +2 -0
- package/build/cjs/schema/blocks.js.map +1 -1
- package/build/cjs/schema/index.d.ts +231 -0
- package/build/cjs/schema/index.js +3 -1
- package/build/cjs/schema/index.js.map +1 -1
- package/build/esm/blocks/CompactMedia/CompactMedia.css +27 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.d.ts +3 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.js +19 -0
- package/build/esm/blocks/CompactMedia/CompactMedia.js.map +1 -0
- package/build/esm/blocks/CompactMedia/schema.d.ts +135 -0
- package/build/esm/blocks/CompactMedia/schema.js +15 -0
- package/build/esm/blocks/CompactMedia/schema.js.map +1 -0
- package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
- package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
- package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
- package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
- package/build/esm/blocks/SideCardList/schema.js +34 -0
- package/build/esm/blocks/SideCardList/schema.js.map +1 -0
- package/build/esm/blocks/Take/Take.css +70 -0
- package/build/esm/blocks/Take/Take.d.ts +3 -0
- package/build/esm/blocks/Take/Take.js +24 -0
- package/build/esm/blocks/Take/Take.js.map +1 -0
- package/build/esm/blocks/Take/schema.d.ts +96 -0
- package/build/esm/blocks/Take/schema.js +23 -0
- package/build/esm/blocks/Take/schema.js.map +1 -0
- package/build/esm/components/Wrapper/Wrapper.css +42 -0
- package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/esm/components/Wrapper/Wrapper.js +2 -2
- package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
- package/build/esm/constructor/blocksMap.d.ts +3 -0
- package/build/esm/constructor/blocksMap.js +6 -0
- package/build/esm/constructor/blocksMap.js.map +1 -1
- package/build/esm/hooks/useExtendedComponentMap.d.ts +3 -0
- package/build/esm/models/blocks.d.ts +27 -2
- package/build/esm/models/blocks.js.map +1 -1
- package/build/esm/models/common.d.ts +4 -1
- package/build/esm/models/common.js +3 -0
- package/build/esm/models/common.js.map +1 -1
- package/build/esm/models/paddings.d.ts +1 -1
- package/build/esm/models/paddings.js.map +1 -1
- package/build/esm/schema/blocks.d.ts +2 -0
- package/build/esm/schema/blocks.js +2 -0
- package/build/esm/schema/blocks.js.map +1 -1
- package/build/esm/schema/index.d.ts +231 -0
- package/build/esm/schema/index.js +3 -1
- package/build/esm/schema/index.js.map +1 -1
- package/package.json +1 -1
- package/server/models/blocks.d.ts +27 -2
- package/server/models/common.d.ts +4 -1
- package/server/models/common.js +3 -0
- package/server/models/paddings.d.ts +1 -1
- package/styles/mixins.scss +60 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-compact-media__container {
|
4
|
+
max-width: 296px;
|
5
|
+
}
|
6
|
+
.bc-compact-media__media {
|
7
|
+
max-width: 232px;
|
8
|
+
padding: 8px 0;
|
9
|
+
}
|
10
|
+
.bc-compact-media__image {
|
11
|
+
object-fit: contain;
|
12
|
+
object-position: left;
|
13
|
+
max-height: 88px;
|
14
|
+
max-width: 232px;
|
15
|
+
width: auto;
|
16
|
+
}
|
17
|
+
@media (max-width: 1081px) {
|
18
|
+
.bc-compact-media__container {
|
19
|
+
max-width: none;
|
20
|
+
width: 50%;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
@media (max-width: 577px) {
|
24
|
+
.bc-compact-media__container {
|
25
|
+
width: 100%;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CompactMedia = void 0;
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
6
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
7
|
+
const paddings_1 = require("../../models/paddings.js");
|
8
|
+
const cn_1 = require("../../utils/cn.js");
|
9
|
+
const b = (0, cn_1.block)('compact-media');
|
10
|
+
const CompactMedia = ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }) => {
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { paddings: {
|
12
|
+
[paddings_1.PaddingsDirections.top]: paddingTop,
|
13
|
+
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
14
|
+
[paddings_1.PaddingsDirections.left]: paddingLeft,
|
15
|
+
[paddings_1.PaddingsDirections.right]: paddingRight,
|
16
|
+
}, className: b('container'), children: [(0, jsx_runtime_1.jsx)(page_constructor_1.Media, { className: b('media'), imageClassName: b('image'), image: image }), description && ((0, jsx_runtime_1.jsx)("div", { className: b('text-content'), children: (0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: description, modifiers: {
|
17
|
+
blog: true,
|
18
|
+
resetPaddings: true,
|
19
|
+
} }) }))] }));
|
20
|
+
};
|
21
|
+
exports.CompactMedia = CompactMedia;
|
22
|
+
//# sourceMappingURL=CompactMedia.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CompactMedia.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/CompactMedia.tsx"],"names":[],"mappings":";;;;AAAA,mEAA0E;AAE1E,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,eAAe,CAAC,CAAC;AAC1B,MAAM,YAAY,GAAG,CAAC,EACzB,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,GACW,EAAE,EAAE;IACpB,OAAO,CACH,wBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,6BAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,6BAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAEzB,uBAAC,wBAAO,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,EAC3E,WAAW,IAAI,CACZ,gCAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC7B,uBAAC,6BAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wBACP,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,IAAI;qBACtB,GACH,GACA,CACT,IACK,CACb,CAAC;AACN,CAAC,CAAC;AAhCW,QAAA,YAAY,gBAgCvB","sourcesContent":["import {Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {CompactMediaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './CompactMedia.scss';\n\nconst b = block('compact-media');\nexport const CompactMedia = ({\n paddingBottom,\n paddingTop,\n description,\n paddingRight,\n paddingLeft,\n image,\n}: CompactMediaProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n className={b('container')}\n >\n <PCMedia className={b('media')} imageClassName={b('image')} image={image} />\n {description && (\n <div className={b('text-content')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </Wrapper>\n );\n};\n"]}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
export declare const CompactMedia: {
|
2
|
+
"blog-compact-media-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
image: {
|
7
|
+
oneOf: ({
|
8
|
+
optionName: string;
|
9
|
+
oneOf: ({
|
10
|
+
type: string;
|
11
|
+
properties: {
|
12
|
+
when: {
|
13
|
+
type: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
} | {
|
17
|
+
type: string;
|
18
|
+
pattern: string;
|
19
|
+
optionName: string;
|
20
|
+
items?: undefined;
|
21
|
+
} | {
|
22
|
+
type: string;
|
23
|
+
items: {
|
24
|
+
type: string;
|
25
|
+
properties: {
|
26
|
+
when: {
|
27
|
+
type: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
optionName: string;
|
32
|
+
pattern?: undefined;
|
33
|
+
})[];
|
34
|
+
type?: undefined;
|
35
|
+
items?: undefined;
|
36
|
+
} | {
|
37
|
+
type: string;
|
38
|
+
items: {
|
39
|
+
oneOf: ({
|
40
|
+
type: string;
|
41
|
+
properties: {
|
42
|
+
when: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
} | {
|
47
|
+
type: string;
|
48
|
+
pattern: string;
|
49
|
+
optionName: string;
|
50
|
+
items?: undefined;
|
51
|
+
} | {
|
52
|
+
type: string;
|
53
|
+
items: {
|
54
|
+
type: string;
|
55
|
+
properties: {
|
56
|
+
when: {
|
57
|
+
type: string;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
};
|
61
|
+
optionName: string;
|
62
|
+
pattern?: undefined;
|
63
|
+
})[];
|
64
|
+
};
|
65
|
+
optionName: string;
|
66
|
+
})[];
|
67
|
+
};
|
68
|
+
description: {
|
69
|
+
type: string;
|
70
|
+
contentType: string;
|
71
|
+
};
|
72
|
+
paddingTop: {
|
73
|
+
type: string;
|
74
|
+
enum: string[];
|
75
|
+
};
|
76
|
+
paddingBottom: {
|
77
|
+
type: string;
|
78
|
+
enum: string[];
|
79
|
+
};
|
80
|
+
fullWidth: {
|
81
|
+
type: string;
|
82
|
+
};
|
83
|
+
column: {
|
84
|
+
type: string;
|
85
|
+
enum: string[];
|
86
|
+
};
|
87
|
+
qa: {
|
88
|
+
type: string;
|
89
|
+
};
|
90
|
+
anchor: {
|
91
|
+
type: string;
|
92
|
+
additionalProperties: boolean;
|
93
|
+
required: string[];
|
94
|
+
properties: {
|
95
|
+
text: {
|
96
|
+
type: string;
|
97
|
+
contentType: string;
|
98
|
+
};
|
99
|
+
url: {
|
100
|
+
type: string;
|
101
|
+
};
|
102
|
+
urlTitle: {
|
103
|
+
type: string;
|
104
|
+
};
|
105
|
+
};
|
106
|
+
};
|
107
|
+
visible: {
|
108
|
+
type: string;
|
109
|
+
enum: string[];
|
110
|
+
};
|
111
|
+
resetPaddings: {
|
112
|
+
type: string;
|
113
|
+
};
|
114
|
+
context: {
|
115
|
+
type: string;
|
116
|
+
};
|
117
|
+
indent: {
|
118
|
+
type: string;
|
119
|
+
additionalProperties: boolean;
|
120
|
+
properties: {
|
121
|
+
top: {
|
122
|
+
enum: string[];
|
123
|
+
};
|
124
|
+
bottom: {
|
125
|
+
enum: string[];
|
126
|
+
};
|
127
|
+
};
|
128
|
+
};
|
129
|
+
type: {};
|
130
|
+
when: {
|
131
|
+
type: string;
|
132
|
+
};
|
133
|
+
};
|
134
|
+
};
|
135
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CompactMedia = void 0;
|
4
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
|
+
const { common: { BlockBaseProps, MediaProps }, } = page_constructor_1.validators;
|
8
|
+
exports.CompactMedia = {
|
9
|
+
[common_1.BlockType.CompactMedia]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { image: MediaProps['image'], description: {
|
13
|
+
type: 'string',
|
14
|
+
contentType: 'text',
|
15
|
+
} }),
|
16
|
+
},
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,UAAU,EAAC,GACvC,GAAG,6BAAU,CAAC;AAEF,QAAA,YAAY,GAAG;IACxB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAC1B,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps, MediaProps},\n} = validators;\n\nexport const CompactMedia = {\n [BlockType.CompactMedia]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n image: MediaProps['image'],\n description: {\n type: 'string',\n contentType: 'text',\n },\n },\n },\n};\n"]}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-side-card-list__container {
|
4
|
+
display: flex;
|
5
|
+
flex-direction: column;
|
6
|
+
gap: 24px;
|
7
|
+
max-width: 296px;
|
8
|
+
}
|
9
|
+
.bc-side-card-list__title {
|
10
|
+
font-size: var(--g-text-header-2-font-size);
|
11
|
+
line-height: var(--g-text-header-2-line-height);
|
12
|
+
font-weight: 500;
|
13
|
+
}
|
14
|
+
.bc-side-card-list__items {
|
15
|
+
display: flex;
|
16
|
+
flex-direction: column;
|
17
|
+
gap: 16px;
|
18
|
+
}
|
19
|
+
.bc-side-card-list__item.bc-side-card-list__item {
|
20
|
+
min-height: auto;
|
21
|
+
}
|
22
|
+
|
23
|
+
.bc-side-card-list__item-image {
|
24
|
+
object-fit: contain;
|
25
|
+
object-position: left;
|
26
|
+
max-height: 104px;
|
27
|
+
max-width: 232px;
|
28
|
+
width: auto;
|
29
|
+
}
|
30
|
+
.bc-side-card-list__item-media {
|
31
|
+
max-width: 232px;
|
32
|
+
padding: 0 0 16px;
|
33
|
+
}
|
34
|
+
.bc-side-card-list__item-description {
|
35
|
+
padding-bottom: 12px;
|
36
|
+
}
|
37
|
+
@media (max-width: 1081px) {
|
38
|
+
.bc-side-card-list__container {
|
39
|
+
max-width: none;
|
40
|
+
width: 50%;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@media (max-width: 577px) {
|
44
|
+
.bc-side-card-list__container {
|
45
|
+
width: 100%;
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SideCardList = void 0;
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
6
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
7
|
+
const paddings_1 = require("../../models/paddings.js");
|
8
|
+
const cn_1 = require("../../utils/cn.js");
|
9
|
+
const b = (0, cn_1.block)('side-card-list');
|
10
|
+
const SideCardList = ({ title, items, paddingTop, paddingBottom }) => {
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { paddings: {
|
12
|
+
[paddings_1.PaddingsDirections.top]: paddingTop,
|
13
|
+
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
14
|
+
}, className: b('container'), children: [title && (0, jsx_runtime_1.jsx)("div", { className: b('title'), children: title }), (0, jsx_runtime_1.jsx)("div", { className: b('items'), children: items.map(({ url, description, image }, index) => ((0, jsx_runtime_1.jsx)(page_constructor_1.CardBase, { url: url, className: b('item'), children: (0, jsx_runtime_1.jsxs)(page_constructor_1.CardBase.Content, { children: [(0, jsx_runtime_1.jsx)(page_constructor_1.Media, { className: b('item-media'), imageClassName: b('item-image'), image: image }), description && ((0, jsx_runtime_1.jsx)("div", { className: b('item-description'), children: (0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: description, modifiers: {
|
15
|
+
blog: true,
|
16
|
+
resetPaddings: true,
|
17
|
+
} }) }))] }) }, index))) })] }));
|
18
|
+
};
|
19
|
+
exports.SideCardList = SideCardList;
|
20
|
+
exports.default = exports.SideCardList;
|
21
|
+
//# sourceMappingURL=SideCardList.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SideCardList.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/SideCardList.tsx"],"names":[],"mappings":";;;;AAAA,mEAAoF;AAEpF,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,gBAAgB,CAAC,CAAC;AAE3B,MAAM,YAAY,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAoB,EAAE,EAAE;IACzF,OAAO,CACH,wBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAExB,KAAK,IAAI,gCAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YAAG,KAAK,GAAO,EACnD,gCAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YACrB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7C,uBAAC,2BAAQ,IAAa,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAChD,wBAAC,2BAAQ,CAAC,OAAO,eACb,uBAAC,wBAAO,IACJ,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,YAAY,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,gCAAK,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,YACjC,uBAAC,6BAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wCACP,IAAI,EAAE,IAAI;wCACV,aAAa,EAAE,IAAI;qCACtB,GACH,GACA,CACT,IACc,IAlBR,KAAK,CAmBT,CACd,CAAC,GACA,IACA,CACb,CAAC;AACN,CAAC,CAAC;AApCW,QAAA,YAAY,gBAoCvB;AAEF,kBAAe,oBAAY,CAAC","sourcesContent":["import {CardBase, Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {SideCardListProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './SideCardList.scss';\n\nconst b = block('side-card-list');\n\nexport const SideCardList = ({title, items, paddingTop, paddingBottom}: SideCardListProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n className={b('container')}\n >\n {title && <div className={b('title')}>{title}</div>}\n <div className={b('items')}>\n {items.map(({url, description, image}, index) => (\n <CardBase key={index} url={url} className={b('item')}>\n <CardBase.Content>\n <PCMedia\n className={b('item-media')}\n imageClassName={b('item-image')}\n image={image}\n />\n {description && (\n <div className={b('item-description')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </CardBase.Content>\n </CardBase>\n ))}\n </div>\n </Wrapper>\n );\n};\n\nexport default SideCardList;\n"]}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
export declare const SideCardList: {
|
2
|
+
"blog-side-card-list-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
required: string[];
|
6
|
+
properties: {
|
7
|
+
className: {
|
8
|
+
type: string;
|
9
|
+
};
|
10
|
+
title: {
|
11
|
+
type: string;
|
12
|
+
};
|
13
|
+
items: {
|
14
|
+
type: string;
|
15
|
+
items: {
|
16
|
+
type: string;
|
17
|
+
required: string[];
|
18
|
+
properties: {
|
19
|
+
image: {
|
20
|
+
type: string;
|
21
|
+
};
|
22
|
+
description: {
|
23
|
+
type: string;
|
24
|
+
};
|
25
|
+
url: {
|
26
|
+
type: string;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
paddingTop: {
|
32
|
+
type: string;
|
33
|
+
enum: string[];
|
34
|
+
};
|
35
|
+
paddingBottom: {
|
36
|
+
type: string;
|
37
|
+
enum: string[];
|
38
|
+
};
|
39
|
+
fullWidth: {
|
40
|
+
type: string;
|
41
|
+
};
|
42
|
+
column: {
|
43
|
+
type: string;
|
44
|
+
enum: string[];
|
45
|
+
};
|
46
|
+
qa: {
|
47
|
+
type: string;
|
48
|
+
};
|
49
|
+
anchor: {
|
50
|
+
type: string;
|
51
|
+
additionalProperties: boolean;
|
52
|
+
required: string[];
|
53
|
+
properties: {
|
54
|
+
text: {
|
55
|
+
type: string;
|
56
|
+
contentType: string;
|
57
|
+
};
|
58
|
+
url: {
|
59
|
+
type: string;
|
60
|
+
};
|
61
|
+
urlTitle: {
|
62
|
+
type: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
};
|
66
|
+
visible: {
|
67
|
+
type: string;
|
68
|
+
enum: string[];
|
69
|
+
};
|
70
|
+
resetPaddings: {
|
71
|
+
type: string;
|
72
|
+
};
|
73
|
+
context: {
|
74
|
+
type: string;
|
75
|
+
};
|
76
|
+
indent: {
|
77
|
+
type: string;
|
78
|
+
additionalProperties: boolean;
|
79
|
+
properties: {
|
80
|
+
top: {
|
81
|
+
enum: string[];
|
82
|
+
};
|
83
|
+
bottom: {
|
84
|
+
enum: string[];
|
85
|
+
};
|
86
|
+
};
|
87
|
+
};
|
88
|
+
type: {};
|
89
|
+
when: {
|
90
|
+
type: string;
|
91
|
+
};
|
92
|
+
};
|
93
|
+
};
|
94
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SideCardList = void 0;
|
4
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
|
+
const { common: { BlockBaseProps }, } = page_constructor_1.validators;
|
8
|
+
exports.SideCardList = {
|
9
|
+
[common_1.BlockType.SideCardList]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
required: ['items'],
|
13
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { className: {
|
14
|
+
type: 'string',
|
15
|
+
}, title: {
|
16
|
+
type: 'string',
|
17
|
+
}, items: {
|
18
|
+
type: 'array',
|
19
|
+
items: {
|
20
|
+
type: 'object',
|
21
|
+
required: ['image', 'description', 'url'],
|
22
|
+
properties: {
|
23
|
+
image: {
|
24
|
+
type: 'string',
|
25
|
+
},
|
26
|
+
description: {
|
27
|
+
type: 'string',
|
28
|
+
},
|
29
|
+
url: {
|
30
|
+
type: 'string',
|
31
|
+
},
|
32
|
+
},
|
33
|
+
},
|
34
|
+
} }),
|
35
|
+
},
|
36
|
+
};
|
37
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,YAAY,GAAG;IACxB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC;oBACzC,UAAU,EAAE;wBACR,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,WAAW,EAAE;4BACT,IAAI,EAAE,QAAQ;yBACjB;wBACD,GAAG,EAAE;4BACD,IAAI,EAAE,QAAQ;yBACjB;qBACJ;iBACJ;aACJ,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nexport const SideCardList = {\n [BlockType.SideCardList]: {\n type: 'object',\n additionalProperties: false,\n required: ['items'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n className: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n items: {\n type: 'array',\n items: {\n type: 'object',\n required: ['image', 'description', 'url'],\n properties: {\n image: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n};\n"]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-take__container {
|
4
|
+
--take-color: #d6e0e9;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
align-items: flex-start;
|
8
|
+
align-self: stretch;
|
9
|
+
gap: 40px;
|
10
|
+
border-radius: 24px 0 0 24px;
|
11
|
+
border-left: 4px solid var(--take-color);
|
12
|
+
background: linear-gradient(90deg, color-mix(in sRGB, var(--take-color) 20%, transparent) 0%, rgba(255, 255, 255, 0.2) 100%);
|
13
|
+
font-family: "YS Text";
|
14
|
+
}
|
15
|
+
.bc-take__container_noBackground {
|
16
|
+
background: none;
|
17
|
+
}
|
18
|
+
.bc-take__text {
|
19
|
+
font-size: 24px;
|
20
|
+
line-height: 32px;
|
21
|
+
font-weight: var(--g-text-body-font-weight);
|
22
|
+
font-family: inherit;
|
23
|
+
}
|
24
|
+
.bc-take__author {
|
25
|
+
align-items: flex-start;
|
26
|
+
max-width: 402px;
|
27
|
+
}
|
28
|
+
.bc-take__author .pc-author__name {
|
29
|
+
font-weight: var(--g-text-accent-font-weight);
|
30
|
+
font-size: var(--g-text-header-1-font-size);
|
31
|
+
line-height: var(--g-text-header-1-line-height);
|
32
|
+
}
|
33
|
+
.bc-take__author .pc-author__description {
|
34
|
+
font-size: var(--g-text-body-3-font-size);
|
35
|
+
line-height: var(--g-text-body-3-line-height);
|
36
|
+
}
|
37
|
+
.bc-take__avatar {
|
38
|
+
width: 88px;
|
39
|
+
height: 88px;
|
40
|
+
}
|
41
|
+
.bc-take__avatar img {
|
42
|
+
width: 88px;
|
43
|
+
height: 88px;
|
44
|
+
}
|
45
|
+
@media (max-width: 577px) {
|
46
|
+
.bc-take__text {
|
47
|
+
font-size: 20px;
|
48
|
+
line-height: 28px;
|
49
|
+
}
|
50
|
+
.bc-take__author {
|
51
|
+
max-width: none;
|
52
|
+
}
|
53
|
+
.bc-take__author .pc-author__name {
|
54
|
+
font-weight: var(--g-text-accent-font-weight);
|
55
|
+
font-size: var(--g-text-subheader-3-font-size);
|
56
|
+
line-height: var(--g-text-subheader-3-line-height);
|
57
|
+
}
|
58
|
+
.bc-take__author .pc-author__description {
|
59
|
+
font-size: var(--g-text-body-2-font-size);
|
60
|
+
line-height: var(--g-text-body-2-line-height);
|
61
|
+
}
|
62
|
+
.bc-take__avatar {
|
63
|
+
width: 80px;
|
64
|
+
height: 80px;
|
65
|
+
}
|
66
|
+
.bc-take__avatar img {
|
67
|
+
width: 80px;
|
68
|
+
height: 80px;
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Take = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
7
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
8
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
9
|
+
const MobileContext_1 = require("../../contexts/MobileContext.js");
|
10
|
+
const paddings_1 = require("../../models/paddings.js");
|
11
|
+
const cn_1 = require("../../utils/cn.js");
|
12
|
+
const b = (0, cn_1.block)('take');
|
13
|
+
const Take = (props) => {
|
14
|
+
const { paddingTop, paddingBottom, paddingLeft, paddingRight, text, author, color, noBackground, } = props;
|
15
|
+
const isMobile = React.useContext(MobileContext_1.MobileContext);
|
16
|
+
const containerStyle = color ? { '--take-color': color } : undefined;
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { className: b('container', { noBackground }), paddings: {
|
18
|
+
[paddings_1.PaddingsDirections.top]: paddingTop,
|
19
|
+
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
20
|
+
[paddings_1.PaddingsDirections.left]: paddingLeft,
|
21
|
+
[paddings_1.PaddingsDirections.right]: paddingRight,
|
22
|
+
}, style: containerStyle, children: [(0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: text, contentClassName: b('text'), tagName: "div", modifiers: {
|
23
|
+
blog: true,
|
24
|
+
resetPaddings: true,
|
25
|
+
} }), (0, jsx_runtime_1.jsx)(page_constructor_1.Author, { type: isMobile ? page_constructor_1.AuthorType.Column : page_constructor_1.AuthorType.Line, author: author, className: b('author'), authorContainerClassName: b('avatar') })] }));
|
26
|
+
};
|
27
|
+
exports.Take = Take;
|
28
|
+
//# sourceMappingURL=Take.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Take.js","sourceRoot":"../../../../src","sources":["blocks/Take/Take.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAAwF;AAExF,iEAAyD;AACzD,mEAA2D;AAE3D,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,MAAM,CAAC,CAAC;AAEjB,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,MAAM,EACF,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,GACf,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,6BAAa,CAAC,CAAC;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAE,EAAC,cAAc,EAAE,KAAK,EAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5F,OAAO,CACH,wBAAC,iBAAO,IACJ,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,EAAC,YAAY,EAAC,CAAC,EACzC,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,6BAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,6BAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,KAAK,EAAE,cAAc,aAErB,uBAAC,6BAAU,IACP,OAAO,EAAE,IAAI,EACb,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAC,KAAK,EACb,SAAS,EAAE;oBACP,IAAI,EAAE,IAAI;oBACV,aAAa,EAAE,IAAI;iBACtB,GACH,EACF,uBAAC,yBAAQ,IACL,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,6BAAU,CAAC,MAAM,CAAC,CAAC,CAAC,6BAAU,CAAC,IAAI,EACpD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EACtB,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,GACvC,IACI,CACb,CAAC;AACN,CAAC,CAAC;AA5CW,QAAA,IAAI,QA4Cf","sourcesContent":["import * as React from 'react';\n\nimport {AuthorType, Author as PCAuthor, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {MobileContext} from '../../contexts/MobileContext';\nimport {TakeProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Take.scss';\n\nconst b = block('take');\n\nexport const Take = (props: TakeProps) => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n text,\n author,\n color,\n noBackground,\n } = props;\n\n const isMobile = React.useContext(MobileContext);\n\n const containerStyle = color ? ({'--take-color': color} as React.CSSProperties) : undefined;\n\n return (\n <Wrapper\n className={b('container', {noBackground})}\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n style={containerStyle}\n >\n <YFMWrapper\n content={text}\n contentClassName={b('text')}\n tagName=\"div\"\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n <PCAuthor\n type={isMobile ? AuthorType.Column : AuthorType.Line}\n author={author}\n className={b('author')}\n authorContainerClassName={b('avatar')}\n />\n </Wrapper>\n );\n};\n"]}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
export declare const Take: {
|
2
|
+
"blog-take-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
required: string[];
|
6
|
+
properties: {
|
7
|
+
text: {
|
8
|
+
type: string;
|
9
|
+
contentType: string;
|
10
|
+
};
|
11
|
+
author: {
|
12
|
+
type: string;
|
13
|
+
additionalProperties: boolean;
|
14
|
+
required: string[];
|
15
|
+
properties: {
|
16
|
+
firstName: {
|
17
|
+
type: string;
|
18
|
+
contentType: string;
|
19
|
+
};
|
20
|
+
secondName: {
|
21
|
+
type: string;
|
22
|
+
contentType: string;
|
23
|
+
};
|
24
|
+
description: {
|
25
|
+
type: string;
|
26
|
+
contentType: string;
|
27
|
+
};
|
28
|
+
avatar: {
|
29
|
+
type: string;
|
30
|
+
};
|
31
|
+
};
|
32
|
+
};
|
33
|
+
paddingTop: {
|
34
|
+
type: string;
|
35
|
+
enum: string[];
|
36
|
+
};
|
37
|
+
paddingBottom: {
|
38
|
+
type: string;
|
39
|
+
enum: string[];
|
40
|
+
};
|
41
|
+
fullWidth: {
|
42
|
+
type: string;
|
43
|
+
};
|
44
|
+
column: {
|
45
|
+
type: string;
|
46
|
+
enum: string[];
|
47
|
+
};
|
48
|
+
qa: {
|
49
|
+
type: string;
|
50
|
+
};
|
51
|
+
anchor: {
|
52
|
+
type: string;
|
53
|
+
additionalProperties: boolean;
|
54
|
+
required: string[];
|
55
|
+
properties: {
|
56
|
+
text: {
|
57
|
+
type: string;
|
58
|
+
contentType: string;
|
59
|
+
};
|
60
|
+
url: {
|
61
|
+
type: string;
|
62
|
+
};
|
63
|
+
urlTitle: {
|
64
|
+
type: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
};
|
68
|
+
visible: {
|
69
|
+
type: string;
|
70
|
+
enum: string[];
|
71
|
+
};
|
72
|
+
resetPaddings: {
|
73
|
+
type: string;
|
74
|
+
};
|
75
|
+
context: {
|
76
|
+
type: string;
|
77
|
+
};
|
78
|
+
indent: {
|
79
|
+
type: string;
|
80
|
+
additionalProperties: boolean;
|
81
|
+
properties: {
|
82
|
+
top: {
|
83
|
+
enum: string[];
|
84
|
+
};
|
85
|
+
bottom: {
|
86
|
+
enum: string[];
|
87
|
+
};
|
88
|
+
};
|
89
|
+
};
|
90
|
+
type: {};
|
91
|
+
when: {
|
92
|
+
type: string;
|
93
|
+
};
|
94
|
+
};
|
95
|
+
};
|
96
|
+
};
|