@gravity-ui/page-constructor 1.0.2 → 1.0.4
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/CHANGELOG.md +21 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +0 -3
- package/build/cjs/blocks/Header/Header.css +9 -1
- package/build/cjs/blocks/Header/Header.js +1 -1
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.d.ts +2 -1
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +2 -2
- package/build/cjs/containers/PageConstructor/PageConstructor.css +11 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +1 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.js +1 -0
- package/build/cjs/grid/utils.js +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +7 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +0 -3
- package/build/esm/blocks/Header/Header.css +9 -1
- package/build/esm/blocks/Header/Header.js +1 -1
- package/build/esm/components/BackgroundMedia/BackgroundMedia.d.ts +2 -1
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +2 -2
- package/build/esm/containers/PageConstructor/PageConstructor.css +11 -0
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +1 -0
- package/build/esm/containers/PageConstructor/PageConstructor.js +1 -0
- package/build/esm/grid/utils.js +1 -1
- package/build/esm/sub-blocks/Content/Content.css +7 -1
- package/package.json +1 -1
- package/styles/styles.css +11 -0
- package/styles/yfm.scss +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.4](https://github.com/gravity-ui/page-constructor/compare/v1.0.3...v1.0.4) (2022-10-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* repalce block stories content pt.1 ([fc1a3a5](https://github.com/gravity-ui/page-constructor/commit/fc1a3a537b4c962e472aee73663f2950ce7dc346))
|
|
9
|
+
* replace blocks content ([ab63138](https://github.com/gravity-ui/page-constructor/commit/ab63138aaebfb71366062285436edc21f86f5346))
|
|
10
|
+
* replace sub blocks and components story data ([fa7593d](https://github.com/gravity-ui/page-constructor/commit/fa7593d9082761d1726739204f36cf6024725755))
|
|
11
|
+
|
|
12
|
+
## [1.0.3](https://github.com/gravity-ui/page-constructor/compare/v1.0.2...v1.0.3) (2022-10-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add yfm js import ([d9a77df](https://github.com/gravity-ui/page-constructor/commit/d9a77df743d68db9353bf6edbada38fbd81ce59f))
|
|
18
|
+
* content centered styles priority ([3d2bad2](https://github.com/gravity-ui/page-constructor/commit/3d2bad24947d86fbd4cf3735beff49c0dfe74382))
|
|
19
|
+
* content layout centered styles ([d0dcc59](https://github.com/gravity-ui/page-constructor/commit/d0dcc5988d3b08e483fe288295c904f16f903a94))
|
|
20
|
+
* displaying video with fillWidthMedia param in HeaderBlock ([560b867](https://github.com/gravity-ui/page-constructor/commit/560b86776074a6249546d7c51324a201de9c04c4))
|
|
21
|
+
* header block dark theme html ([d0cb1ce](https://github.com/gravity-ui/page-constructor/commit/d0cb1cebecafcd8385be32b33182b30b6bdb198c))
|
|
22
|
+
* semantic colors for yfm ([40cd81f](https://github.com/gravity-ui/page-constructor/commit/40cd81ff9f0bf9407a84e181e10e23702aa67eb2))
|
|
23
|
+
|
|
3
24
|
## [1.0.2](https://github.com/gravity-ui/page-constructor/compare/v1.0.1...v1.0.2) (2022-10-04)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -26,9 +26,6 @@ unpredictable css rules order in build */
|
|
|
26
26
|
margin-left: auto;
|
|
27
27
|
margin-right: auto;
|
|
28
28
|
}
|
|
29
|
-
.pc-content-layout-block__files_centered .pc-content-layout-block__file {
|
|
30
|
-
justify-content: center;
|
|
31
|
-
}
|
|
32
29
|
.pc-content-layout-block__files a {
|
|
33
30
|
text-decoration: none;
|
|
34
31
|
}
|
|
@@ -22,7 +22,7 @@ unpredictable css rules order in build */
|
|
|
22
22
|
}
|
|
23
23
|
.pc-header-block__content_theme_dark .pc-header-block__title,
|
|
24
24
|
.pc-header-block__content_theme_dark .pc-header-block__description .yfm,
|
|
25
|
-
.pc-header-block__content_theme_dark .pc-header-block__description .yfm
|
|
25
|
+
.pc-header-block__content_theme_dark .pc-header-block__description .yfm * {
|
|
26
26
|
color: var(--yc-color-text-light-primary);
|
|
27
27
|
}
|
|
28
28
|
.pc-header-block__content_vertical-offset {
|
|
@@ -141,6 +141,14 @@ unpredictable css rules order in build */
|
|
|
141
141
|
.pc-header-block__background.pc-header-block__background_full-width-media > div, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media > div {
|
|
142
142
|
max-width: none;
|
|
143
143
|
}
|
|
144
|
+
.pc-header-block__background.pc-header-block__background_full-width-media .pc-header-block__background-media, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media .pc-header-block__background-media {
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
.pc-header-block__background.pc-header-block__background_full-width-media video, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media video {
|
|
148
|
+
height: 100%;
|
|
149
|
+
width: 100%;
|
|
150
|
+
object-fit: cover;
|
|
151
|
+
}
|
|
144
152
|
.pc-header-block__background_full-width-media {
|
|
145
153
|
--pc-border-radius: 0;
|
|
146
154
|
}
|
|
@@ -14,7 +14,7 @@ const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
|
14
14
|
const b = (0, utils_1.block)('header-block');
|
|
15
15
|
const Background = ({ background }) => {
|
|
16
16
|
const { url, color, disableCompress, fullWidth, fullWidthMedia } = background;
|
|
17
|
-
return (0, guards_1.headerHasMediaBackground)(background) ? (react_1.default.createElement(components_1.BackgroundMedia, Object.assign({}, background, { className: b('background', { media: true, 'full-width-media': fullWidthMedia }) }))) : (react_1.default.createElement(components_1.BackgroundImage, { src: url, className: b('background', { 'full-width-media': fullWidthMedia }), imageClassName: b('background-img'), style: { backgroundColor: fullWidth ? 'none' : color }, disableCompress: disableCompress }));
|
|
17
|
+
return (0, guards_1.headerHasMediaBackground)(background) ? (react_1.default.createElement(components_1.BackgroundMedia, Object.assign({}, background, { mediaClassName: b('background-media'), className: b('background', { media: true, 'full-width-media': fullWidthMedia }) }))) : (react_1.default.createElement(components_1.BackgroundImage, { src: url, className: b('background', { 'full-width-media': fullWidthMedia }), imageClassName: b('background-img'), style: { backgroundColor: fullWidth ? 'none' : color }, disableCompress: disableCompress }));
|
|
18
18
|
};
|
|
19
19
|
const FullWidthBackground = ({ background }) => (react_1.default.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
|
|
20
20
|
const HeaderBlock = (props) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MediaProps, Animatable } from '../../models';
|
|
2
2
|
export interface FullProps extends MediaProps, Animatable {
|
|
3
3
|
className?: string;
|
|
4
|
+
mediaClassName?: string;
|
|
4
5
|
}
|
|
5
|
-
declare const BackgroundMedia: ({ className, color, animated, parallax, video, ...props }: FullProps) => JSX.Element;
|
|
6
|
+
declare const BackgroundMedia: ({ className, color, animated, parallax, video, mediaClassName, ...props }: FullProps) => JSX.Element;
|
|
6
7
|
export default BackgroundMedia;
|
|
@@ -8,10 +8,10 @@ const AnimateBlock_1 = (0, tslib_1.__importDefault)(require("../AnimateBlock/Ani
|
|
|
8
8
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
9
9
|
const b = (0, utils_1.block)('BackgroundMedia');
|
|
10
10
|
const BackgroundMedia = (_a) => {
|
|
11
|
-
var { className, color, animated, parallax = true, video } = _a, props = (0, tslib_1.__rest)(_a, ["className", "color", "animated", "parallax", "video"]);
|
|
11
|
+
var { className, color, animated, parallax = true, video, mediaClassName } = _a, props = (0, tslib_1.__rest)(_a, ["className", "color", "animated", "parallax", "video", "mediaClassName"]);
|
|
12
12
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
13
13
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(null, className), style: { backgroundColor: color }, animate: animated },
|
|
14
|
-
react_1.default.createElement(Media_1.default, Object.assign({ className: b('media'), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
|
|
14
|
+
react_1.default.createElement(Media_1.default, Object.assign({ className: b('media', mediaClassName), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
|
|
15
15
|
parallax, video: isMobile ? undefined : video }, props)))));
|
|
16
16
|
};
|
|
17
17
|
exports.default = BackgroundMedia;
|
|
@@ -28,11 +28,13 @@ unpredictable css rules order in build */
|
|
|
28
28
|
unpredictable css rules order in build */
|
|
29
29
|
.yfm_constructor {
|
|
30
30
|
font-family: var(--yc-font-family-sans);
|
|
31
|
+
color: var(--yc-color-text-primary);
|
|
31
32
|
}
|
|
32
33
|
.yfm_constructor code,
|
|
33
34
|
.yfm_constructor kbd,
|
|
34
35
|
.yfm_constructor pre {
|
|
35
36
|
font-family: var(--yc-font-family-monospace);
|
|
37
|
+
color: var(--yc-color-text-primary);
|
|
36
38
|
}
|
|
37
39
|
.yfm_constructor.yfm_constructor h1,
|
|
38
40
|
.yfm_constructor.yfm_constructor h2,
|
|
@@ -97,6 +99,15 @@ unpredictable css rules order in build */
|
|
|
97
99
|
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
98
100
|
color: var(--yc-color-text-link-hover);
|
|
99
101
|
}
|
|
102
|
+
.yfm_constructor table {
|
|
103
|
+
color: var(--yc-color-text-primary);
|
|
104
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
105
|
+
background: var(--yc-color-base-background);
|
|
106
|
+
}
|
|
107
|
+
.yfm_constructor thead,
|
|
108
|
+
.yfm_constructor table tr:nth-child(2n) {
|
|
109
|
+
background-color: var(--yc-color-base-generic);
|
|
110
|
+
}
|
|
100
111
|
|
|
101
112
|
.yfm_constructor_table table {
|
|
102
113
|
border: 0;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems } from '../../models';
|
|
3
3
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
4
|
+
import '@doc-tools/transform/dist/js/yfm';
|
|
4
5
|
export declare type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
5
6
|
export interface PageConstructorProps {
|
|
6
7
|
content?: PageContent;
|
|
@@ -15,6 +15,7 @@ const ConstructorRow_1 = require("./components/ConstructorRow");
|
|
|
15
15
|
const ConstructorFootnotes_1 = require("./components/ConstructorFootnotes");
|
|
16
16
|
const ConstructorItem_1 = require("./components/ConstructorItem");
|
|
17
17
|
const ConstructorBlocks_1 = require("./components/ConstructorBlocks");
|
|
18
|
+
require("@doc-tools/transform/dist/js/yfm");
|
|
18
19
|
const b = (0, utils_1.block)('page-constructor');
|
|
19
20
|
const Constructor = (props) => {
|
|
20
21
|
const { context, headerBlockTypes } = (0, react_1.useMemo)(() => {
|
package/build/cjs/grid/utils.js
CHANGED
|
@@ -48,7 +48,6 @@ function getColClass(params) {
|
|
|
48
48
|
const { className = '', sizes, offsets, orders, hidden, visible, alignSelf, justifyContent, reset, } = params;
|
|
49
49
|
return [
|
|
50
50
|
types_1.GridColumnClassPrefix.Col,
|
|
51
|
-
className,
|
|
52
51
|
alignSelf,
|
|
53
52
|
justifyContent && getJustifyClass(justifyContent),
|
|
54
53
|
sizes && getSizeClass(sizes),
|
|
@@ -57,6 +56,7 @@ function getColClass(params) {
|
|
|
57
56
|
hidden && getVisibilityClasses(hidden, types_1.GridColumnVisibilityClass.None),
|
|
58
57
|
visible && getVisibilityClasses(visible, types_1.GridColumnVisibilityClass.Block),
|
|
59
58
|
reset && getResetClass(),
|
|
59
|
+
className,
|
|
60
60
|
]
|
|
61
61
|
.filter(Boolean)
|
|
62
62
|
.join(' ');
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
/* use this for style redefinitions to awoid problems with
|
|
8
8
|
unpredictable css rules order in build */
|
|
9
|
+
.pc-content__notice .yfm ol,
|
|
10
|
+
.pc-content__notice .yfm ul, .pc-content__text .yfm ol,
|
|
11
|
+
.pc-content__text .yfm ul {
|
|
12
|
+
padding-left: 1.4em;
|
|
13
|
+
}
|
|
9
14
|
.pc-content__notice.pc-content__notice .yfm,
|
|
10
15
|
.pc-content__notice.pc-content__notice .yfm > * {
|
|
11
16
|
color: var(--yc-color-text-secondary);
|
|
@@ -30,10 +35,11 @@ unpredictable css rules order in build */
|
|
|
30
35
|
display: inline-block;
|
|
31
36
|
margin-right: 32px;
|
|
32
37
|
}
|
|
33
|
-
.pc-content_centered {
|
|
38
|
+
.pc-content_centered.pc-content_centered {
|
|
34
39
|
margin: 0 auto;
|
|
35
40
|
text-align: center;
|
|
36
41
|
}
|
|
42
|
+
|
|
37
43
|
.pc-content_centered .pc-content__link a {
|
|
38
44
|
justify-content: center;
|
|
39
45
|
}
|
|
@@ -26,9 +26,6 @@ unpredictable css rules order in build */
|
|
|
26
26
|
margin-left: auto;
|
|
27
27
|
margin-right: auto;
|
|
28
28
|
}
|
|
29
|
-
.pc-content-layout-block__files_centered .pc-content-layout-block__file {
|
|
30
|
-
justify-content: center;
|
|
31
|
-
}
|
|
32
29
|
.pc-content-layout-block__files a {
|
|
33
30
|
text-decoration: none;
|
|
34
31
|
}
|
|
@@ -22,7 +22,7 @@ unpredictable css rules order in build */
|
|
|
22
22
|
}
|
|
23
23
|
.pc-header-block__content_theme_dark .pc-header-block__title,
|
|
24
24
|
.pc-header-block__content_theme_dark .pc-header-block__description .yfm,
|
|
25
|
-
.pc-header-block__content_theme_dark .pc-header-block__description .yfm
|
|
25
|
+
.pc-header-block__content_theme_dark .pc-header-block__description .yfm * {
|
|
26
26
|
color: var(--yc-color-text-light-primary);
|
|
27
27
|
}
|
|
28
28
|
.pc-header-block__content_vertical-offset {
|
|
@@ -141,6 +141,14 @@ unpredictable css rules order in build */
|
|
|
141
141
|
.pc-header-block__background.pc-header-block__background_full-width-media > div, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media > div {
|
|
142
142
|
max-width: none;
|
|
143
143
|
}
|
|
144
|
+
.pc-header-block__background.pc-header-block__background_full-width-media .pc-header-block__background-media, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media .pc-header-block__background-media {
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
.pc-header-block__background.pc-header-block__background_full-width-media video, .pc-header-block__background.pc-header-block__background_media.pc-header-block__background_full-width-media video {
|
|
148
|
+
height: 100%;
|
|
149
|
+
width: 100%;
|
|
150
|
+
object-fit: cover;
|
|
151
|
+
}
|
|
144
152
|
.pc-header-block__background_full-width-media {
|
|
145
153
|
--pc-border-radius: 0;
|
|
146
154
|
}
|
|
@@ -11,7 +11,7 @@ import './Header.css';
|
|
|
11
11
|
const b = block('header-block');
|
|
12
12
|
const Background = ({ background }) => {
|
|
13
13
|
const { url, color, disableCompress, fullWidth, fullWidthMedia } = background;
|
|
14
|
-
return headerHasMediaBackground(background) ? (React.createElement(BackgroundMedia, Object.assign({}, background, { className: b('background', { media: true, 'full-width-media': fullWidthMedia }) }))) : (React.createElement(BackgroundImage, { src: url, className: b('background', { 'full-width-media': fullWidthMedia }), imageClassName: b('background-img'), style: { backgroundColor: fullWidth ? 'none' : color }, disableCompress: disableCompress }));
|
|
14
|
+
return headerHasMediaBackground(background) ? (React.createElement(BackgroundMedia, Object.assign({}, background, { mediaClassName: b('background-media'), className: b('background', { media: true, 'full-width-media': fullWidthMedia }) }))) : (React.createElement(BackgroundImage, { src: url, className: b('background', { 'full-width-media': fullWidthMedia }), imageClassName: b('background-img'), style: { backgroundColor: fullWidth ? 'none' : color }, disableCompress: disableCompress }));
|
|
15
15
|
};
|
|
16
16
|
const FullWidthBackground = ({ background }) => (React.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
|
|
17
17
|
export const HeaderBlock = (props) => {
|
|
@@ -2,6 +2,7 @@ import { MediaProps, Animatable } from '../../models';
|
|
|
2
2
|
import './BackgroundMedia.css';
|
|
3
3
|
export interface FullProps extends MediaProps, Animatable {
|
|
4
4
|
className?: string;
|
|
5
|
+
mediaClassName?: string;
|
|
5
6
|
}
|
|
6
|
-
declare const BackgroundMedia: ({ className, color, animated, parallax, video, ...props }: FullProps) => JSX.Element;
|
|
7
|
+
declare const BackgroundMedia: ({ className, color, animated, parallax, video, mediaClassName, ...props }: FullProps) => JSX.Element;
|
|
7
8
|
export default BackgroundMedia;
|
|
@@ -7,10 +7,10 @@ import { MobileContext } from '../../context/mobileContext';
|
|
|
7
7
|
import './BackgroundMedia.css';
|
|
8
8
|
const b = block('BackgroundMedia');
|
|
9
9
|
const BackgroundMedia = (_a) => {
|
|
10
|
-
var { className, color, animated, parallax = true, video } = _a, props = __rest(_a, ["className", "color", "animated", "parallax", "video"]);
|
|
10
|
+
var { className, color, animated, parallax = true, video, mediaClassName } = _a, props = __rest(_a, ["className", "color", "animated", "parallax", "video", "mediaClassName"]);
|
|
11
11
|
const isMobile = useContext(MobileContext);
|
|
12
12
|
return (React.createElement(AnimateBlock, { className: b(null, className), style: { backgroundColor: color }, animate: animated },
|
|
13
|
-
React.createElement(Media, Object.assign({ className: b('media'), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
|
|
13
|
+
React.createElement(Media, Object.assign({ className: b('media', mediaClassName), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
|
|
14
14
|
parallax, video: isMobile ? undefined : video }, props)))));
|
|
15
15
|
};
|
|
16
16
|
export default BackgroundMedia;
|
|
@@ -28,11 +28,13 @@ unpredictable css rules order in build */
|
|
|
28
28
|
unpredictable css rules order in build */
|
|
29
29
|
.yfm_constructor {
|
|
30
30
|
font-family: var(--yc-font-family-sans);
|
|
31
|
+
color: var(--yc-color-text-primary);
|
|
31
32
|
}
|
|
32
33
|
.yfm_constructor code,
|
|
33
34
|
.yfm_constructor kbd,
|
|
34
35
|
.yfm_constructor pre {
|
|
35
36
|
font-family: var(--yc-font-family-monospace);
|
|
37
|
+
color: var(--yc-color-text-primary);
|
|
36
38
|
}
|
|
37
39
|
.yfm_constructor.yfm_constructor h1,
|
|
38
40
|
.yfm_constructor.yfm_constructor h2,
|
|
@@ -97,6 +99,15 @@ unpredictable css rules order in build */
|
|
|
97
99
|
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
98
100
|
color: var(--yc-color-text-link-hover);
|
|
99
101
|
}
|
|
102
|
+
.yfm_constructor table {
|
|
103
|
+
color: var(--yc-color-text-primary);
|
|
104
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
105
|
+
background: var(--yc-color-base-background);
|
|
106
|
+
}
|
|
107
|
+
.yfm_constructor thead,
|
|
108
|
+
.yfm_constructor table tr:nth-child(2n) {
|
|
109
|
+
background-color: var(--yc-color-base-generic);
|
|
110
|
+
}
|
|
100
111
|
|
|
101
112
|
.yfm_constructor_table table {
|
|
102
113
|
border: 0;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems } from '../../models';
|
|
3
3
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
4
|
+
import '@doc-tools/transform/dist/js/yfm';
|
|
4
5
|
import './PageConstructor.css';
|
|
5
6
|
export declare type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
6
7
|
export interface PageConstructorProps {
|
|
@@ -12,6 +12,7 @@ import { ConstructorRow } from './components/ConstructorRow';
|
|
|
12
12
|
import { ConstructorFootnotes } from './components/ConstructorFootnotes';
|
|
13
13
|
import { ConstructorHeader } from './components/ConstructorItem';
|
|
14
14
|
import { ConstructorBlocks } from './components/ConstructorBlocks';
|
|
15
|
+
import '@doc-tools/transform/dist/js/yfm';
|
|
15
16
|
import './PageConstructor.css';
|
|
16
17
|
const b = cnBlock('page-constructor');
|
|
17
18
|
export const Constructor = (props) => {
|
package/build/esm/grid/utils.js
CHANGED
|
@@ -38,7 +38,6 @@ export function getColClass(params) {
|
|
|
38
38
|
const { className = '', sizes, offsets, orders, hidden, visible, alignSelf, justifyContent, reset, } = params;
|
|
39
39
|
return [
|
|
40
40
|
GridColumnClassPrefix.Col,
|
|
41
|
-
className,
|
|
42
41
|
alignSelf,
|
|
43
42
|
justifyContent && getJustifyClass(justifyContent),
|
|
44
43
|
sizes && getSizeClass(sizes),
|
|
@@ -47,6 +46,7 @@ export function getColClass(params) {
|
|
|
47
46
|
hidden && getVisibilityClasses(hidden, GridColumnVisibilityClass.None),
|
|
48
47
|
visible && getVisibilityClasses(visible, GridColumnVisibilityClass.Block),
|
|
49
48
|
reset && getResetClass(),
|
|
49
|
+
className,
|
|
50
50
|
]
|
|
51
51
|
.filter(Boolean)
|
|
52
52
|
.join(' ');
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
/* use this for style redefinitions to awoid problems with
|
|
8
8
|
unpredictable css rules order in build */
|
|
9
|
+
.pc-content__notice .yfm ol,
|
|
10
|
+
.pc-content__notice .yfm ul, .pc-content__text .yfm ol,
|
|
11
|
+
.pc-content__text .yfm ul {
|
|
12
|
+
padding-left: 1.4em;
|
|
13
|
+
}
|
|
9
14
|
.pc-content__notice.pc-content__notice .yfm,
|
|
10
15
|
.pc-content__notice.pc-content__notice .yfm > * {
|
|
11
16
|
color: var(--yc-color-text-secondary);
|
|
@@ -30,10 +35,11 @@ unpredictable css rules order in build */
|
|
|
30
35
|
display: inline-block;
|
|
31
36
|
margin-right: 32px;
|
|
32
37
|
}
|
|
33
|
-
.pc-content_centered {
|
|
38
|
+
.pc-content_centered.pc-content_centered {
|
|
34
39
|
margin: 0 auto;
|
|
35
40
|
text-align: center;
|
|
36
41
|
}
|
|
42
|
+
|
|
37
43
|
.pc-content_centered .pc-content__link a {
|
|
38
44
|
justify-content: center;
|
|
39
45
|
}
|
package/package.json
CHANGED
package/styles/styles.css
CHANGED
|
@@ -203,11 +203,13 @@ unpredictable css rules order in build */
|
|
|
203
203
|
unpredictable css rules order in build */
|
|
204
204
|
.yfm_constructor {
|
|
205
205
|
font-family: var(--yc-font-family-sans);
|
|
206
|
+
color: var(--yc-color-text-primary);
|
|
206
207
|
}
|
|
207
208
|
.yfm_constructor code,
|
|
208
209
|
.yfm_constructor kbd,
|
|
209
210
|
.yfm_constructor pre {
|
|
210
211
|
font-family: var(--yc-font-family-monospace);
|
|
212
|
+
color: var(--yc-color-text-primary);
|
|
211
213
|
}
|
|
212
214
|
.yfm_constructor.yfm_constructor h1,
|
|
213
215
|
.yfm_constructor.yfm_constructor h2,
|
|
@@ -272,6 +274,15 @@ unpredictable css rules order in build */
|
|
|
272
274
|
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
273
275
|
color: var(--yc-color-text-link-hover);
|
|
274
276
|
}
|
|
277
|
+
.yfm_constructor table {
|
|
278
|
+
color: var(--yc-color-text-primary);
|
|
279
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
280
|
+
background: var(--yc-color-base-background);
|
|
281
|
+
}
|
|
282
|
+
.yfm_constructor thead,
|
|
283
|
+
.yfm_constructor table tr:nth-child(2n) {
|
|
284
|
+
background-color: var(--yc-color-base-generic);
|
|
285
|
+
}
|
|
275
286
|
|
|
276
287
|
.yfm_constructor_table table {
|
|
277
288
|
border: 0;
|
package/styles/yfm.scss
CHANGED
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
.yfm_constructor {
|
|
6
6
|
$block: &;
|
|
7
7
|
font-family: var(--yc-font-family-sans);
|
|
8
|
+
color: var(--yc-color-text-primary);
|
|
8
9
|
|
|
9
10
|
code,
|
|
10
11
|
kbd,
|
|
11
12
|
pre {
|
|
12
13
|
font-family: var(--yc-font-family-monospace);
|
|
14
|
+
color: var(--yc-color-text-primary);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
@include add-specificity(&) {
|
|
@@ -80,6 +82,17 @@
|
|
|
80
82
|
a {
|
|
81
83
|
@include link();
|
|
82
84
|
}
|
|
85
|
+
|
|
86
|
+
table {
|
|
87
|
+
color: var(--yc-color-text-primary);
|
|
88
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
89
|
+
background: var(--yc-color-base-background);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
thead,
|
|
93
|
+
table tr:nth-child(2n) {
|
|
94
|
+
background-color: var(--yc-color-base-generic);
|
|
95
|
+
}
|
|
83
96
|
}
|
|
84
97
|
|
|
85
98
|
.yfm_constructor_table {
|