@gravity-ui/page-constructor 2.0.3 → 2.1.1
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 +14 -0
- package/README.md +7 -0
- package/build/cjs/components/BlockHeader/BlockHeader.css +2 -2
- package/build/cjs/components/Title/Title.css +20 -5
- package/build/cjs/components/Title/Title.d.ts +1 -1
- package/build/cjs/components/Title/Title.js +4 -2
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/schema.js +2 -0
- package/build/cjs/utils/blocks.d.ts +1 -1
- package/build/cjs/utils/blocks.js +2 -0
- package/build/esm/components/BlockHeader/BlockHeader.css +2 -2
- package/build/esm/components/Title/Title.css +20 -5
- package/build/esm/components/Title/Title.d.ts +1 -1
- package/build/esm/components/Title/Title.js +4 -2
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/sub-blocks/Quote/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/schema.js +2 -0
- package/build/esm/utils/blocks.d.ts +1 -1
- package/build/esm/utils/blocks.js +2 -0
- package/package.json +1 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/utils/blocks.d.ts +1 -1
- package/server/utils/blocks.js +2 -0
- package/styles/mixins.scss +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.1](https://github.com/gravity-ui/page-constructor/compare/v2.1.0...v2.1.1) (2023-03-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* quotes validator schema ([#247](https://github.com/gravity-ui/page-constructor/issues/247)) ([87b8587](https://github.com/gravity-ui/page-constructor/commit/87b8587bcd5fe2bb96b5d70aae9eb6ca9e189f33))
|
|
9
|
+
|
|
10
|
+
## [2.1.0](https://github.com/gravity-ui/page-constructor/compare/v2.0.3...v2.1.0) (2023-03-27)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **Title:** add size xs ([#207](https://github.com/gravity-ui/page-constructor/issues/207)) ([1fd8cf7](https://github.com/gravity-ui/page-constructor/commit/1fd8cf7aeaf4a6a993a3ffcce576a41d61c3b66b))
|
|
16
|
+
|
|
3
17
|
## [2.0.3](https://github.com/gravity-ui/page-constructor/compare/v2.0.2...v2.0.3) (2023-03-27)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -306,6 +306,13 @@ In usual cases we use two types of commits:
|
|
|
306
306
|
1. fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
|
|
307
307
|
2. feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
|
|
308
308
|
3. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
|
|
309
|
+
4. To set release package version manually you need to add `Release-As: <version>` to your commit message e.g.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
git commit -m 'chore: bump release
|
|
313
|
+
|
|
314
|
+
Release-As: 1.2.3'
|
|
315
|
+
```
|
|
309
316
|
|
|
310
317
|
You can see all information [here](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
311
318
|
|
|
@@ -7,10 +7,10 @@ unpredictable css rules order in build */
|
|
|
7
7
|
font-size: var(--yc-text-body-3-font-size);
|
|
8
8
|
line-height: var(--yc-text-body-3-line-height);
|
|
9
9
|
}
|
|
10
|
-
.pc-block-header__description_titleSize_s {
|
|
10
|
+
.pc-block-header__description_titleSize_s, .pc-block-header__description_titleSize_xs {
|
|
11
11
|
margin-top: 8px;
|
|
12
12
|
}
|
|
13
|
-
.pc-block-header__description_titleSize_s .yfm {
|
|
13
|
+
.pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
|
|
14
14
|
font-size: var(--yc-text-body-2-font-size);
|
|
15
15
|
line-height: var(--yc-text-body-2-line-height);
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
|
|
1
|
+
.pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -10,6 +10,12 @@ unpredictable css rules order in build */
|
|
|
10
10
|
.pc-title-block_justify_end {
|
|
11
11
|
text-align: right;
|
|
12
12
|
}
|
|
13
|
+
.pc-title-block_size_xs {
|
|
14
|
+
font-size: var(--yc-text-body-3-font-size);
|
|
15
|
+
line-height: var(--yc-text-body-3-line-height);
|
|
16
|
+
color: var(--pc-text-header-color);
|
|
17
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
+
}
|
|
13
19
|
.pc-title-block_size_s {
|
|
14
20
|
font-size: var(--yc-text-header-1-font-size);
|
|
15
21
|
line-height: var(--yc-text-header-1-line-height);
|
|
@@ -44,10 +50,13 @@ unpredictable css rules order in build */
|
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
.pc-title-block__arrow {
|
|
47
|
-
margin:
|
|
53
|
+
margin-top: 10px;
|
|
54
|
+
}
|
|
55
|
+
.pc-title-block__arrow_size_xs {
|
|
56
|
+
margin-top: 7px;
|
|
48
57
|
}
|
|
49
58
|
.pc-title-block__arrow_size_s {
|
|
50
|
-
margin:
|
|
59
|
+
margin-top: 5px;
|
|
51
60
|
}
|
|
52
61
|
.pc-title-block__link {
|
|
53
62
|
color: inherit;
|
|
@@ -62,7 +71,10 @@ unpredictable css rules order in build */
|
|
|
62
71
|
cursor: pointer;
|
|
63
72
|
}
|
|
64
73
|
.pc-title-block__link:hover .pc-title-block__arrow {
|
|
65
|
-
margin-left:
|
|
74
|
+
margin-left: 10px;
|
|
75
|
+
}
|
|
76
|
+
.pc-title-block__link:hover .pc-title-block__arrow_size_xs {
|
|
77
|
+
margin-left: 6px;
|
|
66
78
|
}
|
|
67
79
|
.pc-title-block__link:hover .pc-title-block__arrow_size_s {
|
|
68
80
|
margin-left: 8px;
|
|
@@ -90,7 +102,10 @@ unpredictable css rules order in build */
|
|
|
90
102
|
margin-top: 0;
|
|
91
103
|
}
|
|
92
104
|
@media (max-width: 577px) {
|
|
93
|
-
.pc-title-block_size_l {
|
|
105
|
+
.pc-title-block_size_l:not(.pc-title-block_reset-margin) {
|
|
94
106
|
margin-top: 48px;
|
|
95
107
|
}
|
|
108
|
+
.pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
|
|
109
|
+
margin-top: 9px;
|
|
110
|
+
}
|
|
96
111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextSize, TitleProps } from '../../models';
|
|
2
|
-
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
|
|
2
|
+
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 13 | 20 | 24 | 22 | 26 | 38;
|
|
3
3
|
export interface TitleFullProps extends TitleProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
onClick?: () => void;
|
|
@@ -11,12 +11,14 @@ const mobileContext_1 = require("../../context/mobileContext");
|
|
|
11
11
|
const b = (0, utils_1.block)('title-block');
|
|
12
12
|
function getArrowSize(size, isMobile) {
|
|
13
13
|
switch (size) {
|
|
14
|
+
case 'xs':
|
|
15
|
+
return 13;
|
|
14
16
|
case 's':
|
|
15
17
|
return 16;
|
|
16
18
|
case 'm':
|
|
17
|
-
return isMobile ?
|
|
19
|
+
return isMobile ? 22 : 24;
|
|
18
20
|
case 'l':
|
|
19
|
-
return isMobile ?
|
|
21
|
+
return isMobile ? 26 : 38;
|
|
20
22
|
default:
|
|
21
23
|
return 20;
|
|
22
24
|
}
|
|
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
|
|
|
38
38
|
Custom = "custom"
|
|
39
39
|
}
|
|
40
40
|
export type TextTheme = 'light' | 'dark';
|
|
41
|
-
export type TextSize = 's' | 'm' | 'l';
|
|
41
|
+
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
42
42
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
43
43
|
export type HeaderWidth = 's' | 'm' | 'l';
|
|
44
44
|
export type HeaderImageSize = 's' | 'm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
|
|
3
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
|
|
3
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
5
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
6
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
|
@@ -7,10 +7,10 @@ unpredictable css rules order in build */
|
|
|
7
7
|
font-size: var(--yc-text-body-3-font-size);
|
|
8
8
|
line-height: var(--yc-text-body-3-line-height);
|
|
9
9
|
}
|
|
10
|
-
.pc-block-header__description_titleSize_s {
|
|
10
|
+
.pc-block-header__description_titleSize_s, .pc-block-header__description_titleSize_xs {
|
|
11
11
|
margin-top: 8px;
|
|
12
12
|
}
|
|
13
|
-
.pc-block-header__description_titleSize_s .yfm {
|
|
13
|
+
.pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
|
|
14
14
|
font-size: var(--yc-text-body-2-font-size);
|
|
15
15
|
line-height: var(--yc-text-body-2-line-height);
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
|
|
1
|
+
.pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -10,6 +10,12 @@ unpredictable css rules order in build */
|
|
|
10
10
|
.pc-title-block_justify_end {
|
|
11
11
|
text-align: right;
|
|
12
12
|
}
|
|
13
|
+
.pc-title-block_size_xs {
|
|
14
|
+
font-size: var(--yc-text-body-3-font-size);
|
|
15
|
+
line-height: var(--yc-text-body-3-line-height);
|
|
16
|
+
color: var(--pc-text-header-color);
|
|
17
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
18
|
+
}
|
|
13
19
|
.pc-title-block_size_s {
|
|
14
20
|
font-size: var(--yc-text-header-1-font-size);
|
|
15
21
|
line-height: var(--yc-text-header-1-line-height);
|
|
@@ -44,10 +50,13 @@ unpredictable css rules order in build */
|
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
.pc-title-block__arrow {
|
|
47
|
-
margin:
|
|
53
|
+
margin-top: 10px;
|
|
54
|
+
}
|
|
55
|
+
.pc-title-block__arrow_size_xs {
|
|
56
|
+
margin-top: 7px;
|
|
48
57
|
}
|
|
49
58
|
.pc-title-block__arrow_size_s {
|
|
50
|
-
margin:
|
|
59
|
+
margin-top: 5px;
|
|
51
60
|
}
|
|
52
61
|
.pc-title-block__link {
|
|
53
62
|
color: inherit;
|
|
@@ -62,7 +71,10 @@ unpredictable css rules order in build */
|
|
|
62
71
|
cursor: pointer;
|
|
63
72
|
}
|
|
64
73
|
.pc-title-block__link:hover .pc-title-block__arrow {
|
|
65
|
-
margin-left:
|
|
74
|
+
margin-left: 10px;
|
|
75
|
+
}
|
|
76
|
+
.pc-title-block__link:hover .pc-title-block__arrow_size_xs {
|
|
77
|
+
margin-left: 6px;
|
|
66
78
|
}
|
|
67
79
|
.pc-title-block__link:hover .pc-title-block__arrow_size_s {
|
|
68
80
|
margin-left: 8px;
|
|
@@ -90,7 +102,10 @@ unpredictable css rules order in build */
|
|
|
90
102
|
margin-top: 0;
|
|
91
103
|
}
|
|
92
104
|
@media (max-width: 577px) {
|
|
93
|
-
.pc-title-block_size_l {
|
|
105
|
+
.pc-title-block_size_l:not(.pc-title-block_reset-margin) {
|
|
94
106
|
margin-top: 48px;
|
|
95
107
|
}
|
|
108
|
+
.pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
|
|
109
|
+
margin-top: 9px;
|
|
110
|
+
}
|
|
96
111
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextSize, TitleProps } from '../../models';
|
|
2
2
|
import './Title.css';
|
|
3
|
-
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
|
|
3
|
+
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 13 | 20 | 24 | 22 | 26 | 38;
|
|
4
4
|
export interface TitleFullProps extends TitleProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: () => void;
|
|
@@ -8,12 +8,14 @@ import './Title.css';
|
|
|
8
8
|
const b = block('title-block');
|
|
9
9
|
export function getArrowSize(size, isMobile) {
|
|
10
10
|
switch (size) {
|
|
11
|
+
case 'xs':
|
|
12
|
+
return 13;
|
|
11
13
|
case 's':
|
|
12
14
|
return 16;
|
|
13
15
|
case 'm':
|
|
14
|
-
return isMobile ?
|
|
16
|
+
return isMobile ? 22 : 24;
|
|
15
17
|
case 'l':
|
|
16
|
-
return isMobile ?
|
|
18
|
+
return isMobile ? 26 : 38;
|
|
17
19
|
default:
|
|
18
20
|
return 20;
|
|
19
21
|
}
|
|
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
|
|
|
38
38
|
Custom = "custom"
|
|
39
39
|
}
|
|
40
40
|
export type TextTheme = 'light' | 'dark';
|
|
41
|
-
export type TextSize = 's' | 'm' | 'l';
|
|
41
|
+
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
42
42
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
43
43
|
export type HeaderWidth = 's' | 'm' | 'l';
|
|
44
44
|
export type HeaderImageSize = 's' | 'm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
|
|
3
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
|
|
3
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
5
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
6
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
|
|
|
38
38
|
Custom = "custom"
|
|
39
39
|
}
|
|
40
40
|
export type TextTheme = 'light' | 'dark';
|
|
41
|
-
export type TextSize = 's' | 'm' | 'l';
|
|
41
|
+
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
42
42
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
43
43
|
export type HeaderWidth = 's' | 'm' | 'l';
|
|
44
44
|
export type HeaderImageSize = 's' | 'm';
|
package/server/utils/blocks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
|
|
3
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
|
|
3
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
5
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
6
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
package/server/utils/blocks.js
CHANGED
package/styles/mixins.scss
CHANGED
|
@@ -141,15 +141,17 @@
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
@mixin label($size: m) {
|
|
144
|
-
@
|
|
144
|
+
@if $size == m {
|
|
145
|
+
@include text-size(body-1);
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
$label-height: 20px;
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
display: inline-block;
|
|
150
|
+
padding: 0 8px;
|
|
151
|
+
border-radius: 2px;
|
|
152
|
+
height: $label-height;
|
|
153
|
+
line-height: $label-height;
|
|
154
|
+
}
|
|
153
155
|
|
|
154
156
|
@if $size == s {
|
|
155
157
|
@include text-size(caption-2);
|