@gravity-ui/page-constructor 4.5.1 → 4.5.3
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/Icons/Icons.js +2 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +1 -1
- package/build/cjs/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/cjs/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/cjs/editor/components/Layout/Layout.css +2 -1
- package/build/cjs/editor/containers/Form/Form.css +14 -35
- package/build/cjs/editor/styles/root.css +2 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/build/esm/blocks/Icons/Icons.js +2 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
- package/build/esm/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/esm/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/esm/editor/components/Layout/Layout.css +2 -1
- package/build/esm/editor/containers/Form/Form.css +14 -35
- package/build/esm/editor/styles/root.css +2 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/esm/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/package.json +2 -2
- package/widget/index.js +1 -1
|
@@ -15,7 +15,8 @@ const Icons = ({ title, size = 's', items }) => {
|
|
|
15
15
|
title && react_1.default.createElement(components_1.Title, { className: b('header'), title: title, colSizes: { all: 12 } }),
|
|
16
16
|
items.map((item) => {
|
|
17
17
|
const itemContent = getItemContent(item);
|
|
18
|
-
|
|
18
|
+
const { url, text } = item;
|
|
19
|
+
return url ? (react_1.default.createElement("a", Object.assign({ className: b('item'), key: url, href: url, "aria-label": text, title: text }, (0, utils_1.getLinkProps)(url, hostname)), itemContent)) : (react_1.default.createElement("div", { className: b('item'), key: url }, itemContent));
|
|
19
20
|
})));
|
|
20
21
|
};
|
|
21
22
|
exports.default = Icons;
|
|
@@ -95,7 +95,7 @@ const VideoBlock = (props) => {
|
|
|
95
95
|
}
|
|
96
96
|
return (react_1.default.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (react_1.default.createElement("div", { className: b('preview'), onClick: onPreviewClick },
|
|
97
97
|
react_1.default.createElement(Image_1.default, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper') }),
|
|
98
|
-
playButton || (react_1.default.createElement("button", { className: b('button') },
|
|
98
|
+
playButton || (react_1.default.createElement("button", { title: "Play", className: b('button') },
|
|
99
99
|
react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.PlayVideo, size: 24 })))))));
|
|
100
100
|
};
|
|
101
101
|
exports.default = VideoBlock;
|
|
@@ -23,7 +23,7 @@ unpredictable css rules order in build */
|
|
|
23
23
|
transition: transform 0.2s;
|
|
24
24
|
width: 76px;
|
|
25
25
|
height: 40px;
|
|
26
|
-
color: var(--
|
|
26
|
+
color: var(--pc-editor-control-icon-color);
|
|
27
27
|
background-color: var(--pc-editor-base-color);
|
|
28
28
|
border-radius: 8px;
|
|
29
29
|
}
|
|
@@ -4,7 +4,8 @@ body {
|
|
|
4
4
|
--pc-editor-header-height: 48px;
|
|
5
5
|
--pc-editor-divider-width: 12px;
|
|
6
6
|
--pc-editor-base-color: var(--g-color-base-brand);
|
|
7
|
-
--pc-editor-control-color: var(--g-color-
|
|
7
|
+
--pc-editor-control-color: var(--g-color-base-brand);
|
|
8
|
+
--pc-editor-control-icon-color: var(--g-color-text-dark-primary);
|
|
8
9
|
--pc-editor-left-column-width: calc(400px + var(--pc-editor-divider-width));
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -1,46 +1,26 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-editor-form {
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--complex-property-font-size: var(--g-text-body-2-font-size);
|
|
9
|
-
--complex-property-line-height: var(--g-text-body-2-line-height);
|
|
10
|
-
--property-font-size: var(--g-text-body-1-font-size);
|
|
11
|
-
--property-line-height: var(--g-text-body-1-line-height);
|
|
4
|
+
--block-name-font-size: var(--g-text-display-1-font-size);
|
|
5
|
+
--block-name-line-height: var(--g-text-display-1-line-height);
|
|
6
|
+
--property-name-font-size: var(--g-text-body-1-font-size);
|
|
7
|
+
--property-name-line-height: var(--g-text-body-1-line-height);
|
|
12
8
|
--input-min-width: 150px;
|
|
13
9
|
--property-title-width: 96px;
|
|
14
10
|
--button-height: 48px;
|
|
15
|
-
--icon-size:
|
|
16
|
-
--icon-margin:
|
|
11
|
+
--icon-size: 28px;
|
|
12
|
+
--icon-margin: 8px;
|
|
17
13
|
--property-font-weight: 500;
|
|
18
|
-
--header-text-size: var(--
|
|
19
|
-
--header-line-height: var(--
|
|
20
|
-
--text-size: var(--top-level-font-size);
|
|
21
|
-
--line-height: var(--top-level-line-height);
|
|
14
|
+
--header-text-size: var(--block-name-font-size);
|
|
15
|
+
--header-line-height: var(--block-name-line-height);
|
|
22
16
|
}
|
|
23
17
|
.pc-editor-form .df-use-search .df-use-search {
|
|
24
|
-
--button-height: 32px;
|
|
25
|
-
--icon-size: 20px;
|
|
26
|
-
--icon-margin: 30px;
|
|
27
|
-
--header-text-size: var(--block-level-complex-propery-font-size);
|
|
28
|
-
--header-line-height: var(--block-level-complex-property-line-height);
|
|
29
|
-
--text-size: var(--property-font-size);
|
|
30
|
-
--line-height: var(--property-line-height);
|
|
31
|
-
--property-font-weight: 400;
|
|
32
|
-
}
|
|
33
|
-
.pc-editor-form .df-use-search .df-use-search .df-use-search {
|
|
34
18
|
--button-height: 28px;
|
|
35
19
|
--icon-size: 16px;
|
|
36
|
-
--icon-margin:
|
|
20
|
+
--icon-margin: 0px;
|
|
21
|
+
--header-text-size: var(--property-name-font-size);
|
|
22
|
+
--header-line-height: var(--property-name-line-height);
|
|
37
23
|
--property-font-weight: 400;
|
|
38
|
-
--header-text-size: var(--complex-property-font-size);
|
|
39
|
-
--header-line-height: var(--complex-property-line-height);
|
|
40
|
-
--text-size: var(--property-font-size);
|
|
41
|
-
--line-height: var(--property-line-height);
|
|
42
|
-
--oneof-text-size: var(--complex-propery-font-size);
|
|
43
|
-
--oneof-line-height: var(--complex-property-line-height);
|
|
44
24
|
}
|
|
45
25
|
.pc-editor-form .df-row {
|
|
46
26
|
width: inherit;
|
|
@@ -49,8 +29,6 @@ unpredictable css rules order in build */
|
|
|
49
29
|
width: var(--property-title-width);
|
|
50
30
|
}
|
|
51
31
|
.pc-editor-form .df-row__title {
|
|
52
|
-
font-size: var(--text-size);
|
|
53
|
-
line-height: var(--line-height);
|
|
54
32
|
font-weight: var(--property-font-weight);
|
|
55
33
|
white-space: nowrap;
|
|
56
34
|
}
|
|
@@ -58,12 +36,13 @@ unpredictable css rules order in build */
|
|
|
58
36
|
min-width: var(--input-min-width);
|
|
59
37
|
min-height: var(--input-min-width);
|
|
60
38
|
}
|
|
61
|
-
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button
|
|
39
|
+
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button,
|
|
40
|
+
.pc-editor-form .df-simple-vertical-accordeon__title {
|
|
62
41
|
font-size: var(--header-text-size);
|
|
63
42
|
line-height: var(--header-line-height);
|
|
64
43
|
}
|
|
65
44
|
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button {
|
|
66
|
-
--
|
|
45
|
+
--yc-button-height: var(--button-height);
|
|
67
46
|
display: flex;
|
|
68
47
|
justify-content: center;
|
|
69
48
|
align-items: center;
|
|
@@ -2,6 +2,7 @@ body {
|
|
|
2
2
|
--pc-editor-header-height: 48px;
|
|
3
3
|
--pc-editor-divider-width: 12px;
|
|
4
4
|
--pc-editor-base-color: var(--g-color-base-brand);
|
|
5
|
-
--pc-editor-control-color: var(--g-color-
|
|
5
|
+
--pc-editor-control-color: var(--g-color-base-brand);
|
|
6
|
+
--pc-editor-control-icon-color: var(--g-color-text-dark-primary);
|
|
6
7
|
--pc-editor-left-column-width: calc(400px + var(--pc-editor-divider-width));
|
|
7
8
|
}
|
package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js
CHANGED
|
@@ -24,7 +24,7 @@ const NavigationLink = (props) => {
|
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
return (react_1.default.createElement(components_1.RouterLink, { href: url, passHref: true },
|
|
27
|
-
react_1.default.createElement("a", Object.assign({}, rest, { className: classes }), content)));
|
|
27
|
+
react_1.default.createElement("a", Object.assign({ title: text }, rest, { className: classes }), content)));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
exports.NavigationLink = NavigationLink;
|
|
@@ -8,7 +8,8 @@ const utils_2 = require("../../../utils");
|
|
|
8
8
|
const b = (0, utils_2.block)('social-icon');
|
|
9
9
|
const SocialIcon = ({ icon, url, className }) => {
|
|
10
10
|
const iconData = (0, utils_1.getMediaImage)(icon);
|
|
11
|
-
|
|
11
|
+
const { alt } = iconData;
|
|
12
|
+
return (react_1.default.createElement("a", { href: url, "aria-label": alt, title: alt, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
|
|
12
13
|
react_1.default.createElement(components_1.Image, Object.assign({ className: b('icon') }, iconData))));
|
|
13
14
|
};
|
|
14
15
|
exports.default = SocialIcon;
|
|
@@ -13,7 +13,8 @@ const Icons = ({ title, size = 's', items }) => {
|
|
|
13
13
|
title && React.createElement(Title, { className: b('header'), title: title, colSizes: { all: 12 } }),
|
|
14
14
|
items.map((item) => {
|
|
15
15
|
const itemContent = getItemContent(item);
|
|
16
|
-
|
|
16
|
+
const { url, text } = item;
|
|
17
|
+
return url ? (React.createElement("a", Object.assign({ className: b('item'), key: url, href: url, "aria-label": text, title: text }, getLinkProps(url, hostname)), itemContent)) : (React.createElement("div", { className: b('item'), key: url }, itemContent));
|
|
17
18
|
})));
|
|
18
19
|
};
|
|
19
20
|
export default Icons;
|
|
@@ -91,7 +91,7 @@ const VideoBlock = (props) => {
|
|
|
91
91
|
}
|
|
92
92
|
return (React.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (React.createElement("div", { className: b('preview'), onClick: onPreviewClick },
|
|
93
93
|
React.createElement(Image, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper') }),
|
|
94
|
-
playButton || (React.createElement("button", { className: b('button') },
|
|
94
|
+
playButton || (React.createElement("button", { title: "Play", className: b('button') },
|
|
95
95
|
React.createElement(Icon, { className: b('icon'), data: PlayVideo, size: 24 })))))));
|
|
96
96
|
};
|
|
97
97
|
export default VideoBlock;
|
|
@@ -23,7 +23,7 @@ unpredictable css rules order in build */
|
|
|
23
23
|
transition: transform 0.2s;
|
|
24
24
|
width: 76px;
|
|
25
25
|
height: 40px;
|
|
26
|
-
color: var(--
|
|
26
|
+
color: var(--pc-editor-control-icon-color);
|
|
27
27
|
background-color: var(--pc-editor-base-color);
|
|
28
28
|
border-radius: 8px;
|
|
29
29
|
}
|
|
@@ -4,7 +4,8 @@ body {
|
|
|
4
4
|
--pc-editor-header-height: 48px;
|
|
5
5
|
--pc-editor-divider-width: 12px;
|
|
6
6
|
--pc-editor-base-color: var(--g-color-base-brand);
|
|
7
|
-
--pc-editor-control-color: var(--g-color-
|
|
7
|
+
--pc-editor-control-color: var(--g-color-base-brand);
|
|
8
|
+
--pc-editor-control-icon-color: var(--g-color-text-dark-primary);
|
|
8
9
|
--pc-editor-left-column-width: calc(400px + var(--pc-editor-divider-width));
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -1,46 +1,26 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-editor-form {
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--complex-property-font-size: var(--g-text-body-2-font-size);
|
|
9
|
-
--complex-property-line-height: var(--g-text-body-2-line-height);
|
|
10
|
-
--property-font-size: var(--g-text-body-1-font-size);
|
|
11
|
-
--property-line-height: var(--g-text-body-1-line-height);
|
|
4
|
+
--block-name-font-size: var(--g-text-display-1-font-size);
|
|
5
|
+
--block-name-line-height: var(--g-text-display-1-line-height);
|
|
6
|
+
--property-name-font-size: var(--g-text-body-1-font-size);
|
|
7
|
+
--property-name-line-height: var(--g-text-body-1-line-height);
|
|
12
8
|
--input-min-width: 150px;
|
|
13
9
|
--property-title-width: 96px;
|
|
14
10
|
--button-height: 48px;
|
|
15
|
-
--icon-size:
|
|
16
|
-
--icon-margin:
|
|
11
|
+
--icon-size: 28px;
|
|
12
|
+
--icon-margin: 8px;
|
|
17
13
|
--property-font-weight: 500;
|
|
18
|
-
--header-text-size: var(--
|
|
19
|
-
--header-line-height: var(--
|
|
20
|
-
--text-size: var(--top-level-font-size);
|
|
21
|
-
--line-height: var(--top-level-line-height);
|
|
14
|
+
--header-text-size: var(--block-name-font-size);
|
|
15
|
+
--header-line-height: var(--block-name-line-height);
|
|
22
16
|
}
|
|
23
17
|
.pc-editor-form .df-use-search .df-use-search {
|
|
24
|
-
--button-height: 32px;
|
|
25
|
-
--icon-size: 20px;
|
|
26
|
-
--icon-margin: 30px;
|
|
27
|
-
--header-text-size: var(--block-level-complex-propery-font-size);
|
|
28
|
-
--header-line-height: var(--block-level-complex-property-line-height);
|
|
29
|
-
--text-size: var(--property-font-size);
|
|
30
|
-
--line-height: var(--property-line-height);
|
|
31
|
-
--property-font-weight: 400;
|
|
32
|
-
}
|
|
33
|
-
.pc-editor-form .df-use-search .df-use-search .df-use-search {
|
|
34
18
|
--button-height: 28px;
|
|
35
19
|
--icon-size: 16px;
|
|
36
|
-
--icon-margin:
|
|
20
|
+
--icon-margin: 0px;
|
|
21
|
+
--header-text-size: var(--property-name-font-size);
|
|
22
|
+
--header-line-height: var(--property-name-line-height);
|
|
37
23
|
--property-font-weight: 400;
|
|
38
|
-
--header-text-size: var(--complex-property-font-size);
|
|
39
|
-
--header-line-height: var(--complex-property-line-height);
|
|
40
|
-
--text-size: var(--property-font-size);
|
|
41
|
-
--line-height: var(--property-line-height);
|
|
42
|
-
--oneof-text-size: var(--complex-propery-font-size);
|
|
43
|
-
--oneof-line-height: var(--complex-property-line-height);
|
|
44
24
|
}
|
|
45
25
|
.pc-editor-form .df-row {
|
|
46
26
|
width: inherit;
|
|
@@ -49,8 +29,6 @@ unpredictable css rules order in build */
|
|
|
49
29
|
width: var(--property-title-width);
|
|
50
30
|
}
|
|
51
31
|
.pc-editor-form .df-row__title {
|
|
52
|
-
font-size: var(--text-size);
|
|
53
|
-
line-height: var(--line-height);
|
|
54
32
|
font-weight: var(--property-font-weight);
|
|
55
33
|
white-space: nowrap;
|
|
56
34
|
}
|
|
@@ -58,12 +36,13 @@ unpredictable css rules order in build */
|
|
|
58
36
|
min-width: var(--input-min-width);
|
|
59
37
|
min-height: var(--input-min-width);
|
|
60
38
|
}
|
|
61
|
-
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button
|
|
39
|
+
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button,
|
|
40
|
+
.pc-editor-form .df-simple-vertical-accordeon__title {
|
|
62
41
|
font-size: var(--header-text-size);
|
|
63
42
|
line-height: var(--header-line-height);
|
|
64
43
|
}
|
|
65
44
|
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button {
|
|
66
|
-
--
|
|
45
|
+
--yc-button-height: var(--button-height);
|
|
67
46
|
display: flex;
|
|
68
47
|
justify-content: center;
|
|
69
48
|
align-items: center;
|
|
@@ -2,6 +2,7 @@ body {
|
|
|
2
2
|
--pc-editor-header-height: 48px;
|
|
3
3
|
--pc-editor-divider-width: 12px;
|
|
4
4
|
--pc-editor-base-color: var(--g-color-base-brand);
|
|
5
|
-
--pc-editor-control-color: var(--g-color-
|
|
5
|
+
--pc-editor-control-color: var(--g-color-base-brand);
|
|
6
|
+
--pc-editor-control-icon-color: var(--g-color-text-dark-primary);
|
|
6
7
|
--pc-editor-left-column-width: calc(400px + var(--pc-editor-divider-width));
|
|
7
8
|
}
|
package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js
CHANGED
|
@@ -22,6 +22,6 @@ export const NavigationLink = (props) => {
|
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
return (React.createElement(RouterLink, { href: url, passHref: true },
|
|
25
|
-
React.createElement("a", Object.assign({}, rest, { className: classes }), content)));
|
|
25
|
+
React.createElement("a", Object.assign({ title: text }, rest, { className: classes }), content)));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -6,7 +6,8 @@ import './SocialIcon.css';
|
|
|
6
6
|
const b = block('social-icon');
|
|
7
7
|
const SocialIcon = ({ icon, url, className }) => {
|
|
8
8
|
const iconData = getMediaImage(icon);
|
|
9
|
-
|
|
9
|
+
const { alt } = iconData;
|
|
10
|
+
return (React.createElement("a", { href: url, "aria-label": alt, title: alt, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
|
|
10
11
|
React.createElement(Image, Object.assign({ className: b('icon') }, iconData))));
|
|
11
12
|
};
|
|
12
13
|
export default SocialIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@gravity-ui/components": "^2.0.0",
|
|
84
|
-
"@gravity-ui/dynamic-forms": "^2.
|
|
84
|
+
"@gravity-ui/dynamic-forms": "^2.3.0",
|
|
85
85
|
"@gravity-ui/i18n": "^1.0.0",
|
|
86
86
|
"ajv": "^8.12.0",
|
|
87
87
|
"bem-cn-lite": "^4.0.0",
|