@gravity-ui/page-constructor 1.25.0-alpha.0 → 1.25.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.25.1](https://github.com/gravity-ui/page-constructor/compare/v1.25.0...v1.25.1) (2023-03-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * cannot read stopPropagation of undefined in navigation utils ([#221](https://github.com/gravity-ui/page-constructor/issues/221)) ([e20904a](https://github.com/gravity-ui/page-constructor/commit/e20904abfcc14339be777747a4c26187dba8cd58))
9
+
3
10
  ## [1.25.0](https://github.com/gravity-ui/page-constructor/compare/v1.24.0...v1.25.0) (2023-03-14)
4
11
 
5
12
 
@@ -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, .pc-block-header__description_titleSize_xs {
10
+ .pc-block-header__description_titleSize_s {
11
11
  margin-top: 8px;
12
12
  }
13
- .pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
13
+ .pc-block-header__description_titleSize_s .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, .pc-title-block_size_xs {
1
+ .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -10,12 +10,6 @@ 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
- }
19
13
  .pc-title-block_size_s {
20
14
  font-size: var(--yc-text-header-1-font-size);
21
15
  line-height: var(--yc-text-header-1-line-height);
@@ -50,13 +44,10 @@ unpredictable css rules order in build */
50
44
  }
51
45
  }
52
46
  .pc-title-block__arrow {
53
- margin-top: 10px;
54
- }
55
- .pc-title-block__arrow_size_xs {
56
- margin-top: 7px;
47
+ margin: 8px 0 0 4px;
57
48
  }
58
49
  .pc-title-block__arrow_size_s {
59
- margin-top: 5px;
50
+ margin: 4px 0 0 4px;
60
51
  }
61
52
  .pc-title-block__link {
62
53
  color: inherit;
@@ -71,10 +62,7 @@ unpredictable css rules order in build */
71
62
  cursor: pointer;
72
63
  }
73
64
  .pc-title-block__link:hover .pc-title-block__arrow {
74
- margin-left: 10px;
75
- }
76
- .pc-title-block__link:hover .pc-title-block__arrow_size_xs {
77
- margin-left: 6px;
65
+ margin-left: 12px;
78
66
  }
79
67
  .pc-title-block__link:hover .pc-title-block__arrow_size_s {
80
68
  margin-left: 8px;
@@ -102,10 +90,7 @@ unpredictable css rules order in build */
102
90
  margin-top: 0;
103
91
  }
104
92
  @media (max-width: 577px) {
105
- .pc-title-block_size_l:not(.pc-title-block_reset-margin) {
93
+ .pc-title-block_size_l {
106
94
  margin-top: 48px;
107
95
  }
108
- .pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
109
- margin-top: 9px;
110
- }
111
96
  }
@@ -1,5 +1,5 @@
1
1
  import { TextSize, TitleProps } from '../../models';
2
- export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 13 | 20 | 24 | 22 | 26 | 38;
2
+ export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
3
3
  export interface TitleFullProps extends TitleProps {
4
4
  className?: string;
5
5
  onClick?: () => void;
@@ -11,14 +11,12 @@ 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;
16
14
  case 's':
17
15
  return 16;
18
16
  case 'm':
19
- return isMobile ? 22 : 24;
17
+ return isMobile ? 20 : 24;
20
18
  case 'l':
21
- return isMobile ? 26 : 38;
19
+ return isMobile ? 20 : 24;
22
20
  default:
23
21
  return 20;
24
22
  }
@@ -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 = 'xs' | 's' | 'm' | 'l';
41
+ export type TextSize = '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';
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getItemClickHandler = void 0;
4
4
  const getItemClickHandler = ({ column, index, onActiveItemChange, activeItemId }) => (e) => {
5
5
  const id = `${column}-${index}`;
6
- e.stopPropagation();
6
+ if (e) {
7
+ e.stopPropagation();
8
+ }
7
9
  onActiveItemChange(id === activeItemId ? undefined : `${column}-${index}`);
8
10
  };
9
11
  exports.getItemClickHandler = getItemClickHandler;
@@ -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" | "h5";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
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) => {
@@ -8,8 +8,6 @@ function getHeaderTag(size) {
8
8
  return 'h1';
9
9
  case 's':
10
10
  return 'h4';
11
- case 'xs':
12
- return 'h5';
13
11
  case 'm':
14
12
  default:
15
13
  return 'h2';
@@ -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, .pc-block-header__description_titleSize_xs {
10
+ .pc-block-header__description_titleSize_s {
11
11
  margin-top: 8px;
12
12
  }
13
- .pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
13
+ .pc-block-header__description_titleSize_s .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, .pc-title-block_size_xs {
1
+ .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -10,12 +10,6 @@ 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
- }
19
13
  .pc-title-block_size_s {
20
14
  font-size: var(--yc-text-header-1-font-size);
21
15
  line-height: var(--yc-text-header-1-line-height);
@@ -50,13 +44,10 @@ unpredictable css rules order in build */
50
44
  }
51
45
  }
52
46
  .pc-title-block__arrow {
53
- margin-top: 10px;
54
- }
55
- .pc-title-block__arrow_size_xs {
56
- margin-top: 7px;
47
+ margin: 8px 0 0 4px;
57
48
  }
58
49
  .pc-title-block__arrow_size_s {
59
- margin-top: 5px;
50
+ margin: 4px 0 0 4px;
60
51
  }
61
52
  .pc-title-block__link {
62
53
  color: inherit;
@@ -71,10 +62,7 @@ unpredictable css rules order in build */
71
62
  cursor: pointer;
72
63
  }
73
64
  .pc-title-block__link:hover .pc-title-block__arrow {
74
- margin-left: 10px;
75
- }
76
- .pc-title-block__link:hover .pc-title-block__arrow_size_xs {
77
- margin-left: 6px;
65
+ margin-left: 12px;
78
66
  }
79
67
  .pc-title-block__link:hover .pc-title-block__arrow_size_s {
80
68
  margin-left: 8px;
@@ -102,10 +90,7 @@ unpredictable css rules order in build */
102
90
  margin-top: 0;
103
91
  }
104
92
  @media (max-width: 577px) {
105
- .pc-title-block_size_l:not(.pc-title-block_reset-margin) {
93
+ .pc-title-block_size_l {
106
94
  margin-top: 48px;
107
95
  }
108
- .pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
109
- margin-top: 9px;
110
- }
111
96
  }
@@ -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 | 13 | 20 | 24 | 22 | 26 | 38;
3
+ export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
4
4
  export interface TitleFullProps extends TitleProps {
5
5
  className?: string;
6
6
  onClick?: () => void;
@@ -8,14 +8,12 @@ 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;
13
11
  case 's':
14
12
  return 16;
15
13
  case 'm':
16
- return isMobile ? 22 : 24;
14
+ return isMobile ? 20 : 24;
17
15
  case 'l':
18
- return isMobile ? 26 : 38;
16
+ return isMobile ? 20 : 24;
19
17
  default:
20
18
  return 20;
21
19
  }
@@ -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 = 'xs' | 's' | 'm' | 'l';
41
+ export type TextSize = '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,5 +1,7 @@
1
1
  export const getItemClickHandler = ({ column, index, onActiveItemChange, activeItemId }) => (e) => {
2
2
  const id = `${column}-${index}`;
3
- e.stopPropagation();
3
+ if (e) {
4
+ e.stopPropagation();
5
+ }
4
6
  onActiveItemChange(id === activeItemId ? undefined : `${column}-${index}`);
5
7
  };
@@ -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" | "h5";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
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) => {
@@ -5,8 +5,6 @@ export function getHeaderTag(size) {
5
5
  return 'h1';
6
6
  case 's':
7
7
  return 'h4';
8
- case 'xs':
9
- return 'h5';
10
8
  case 'm':
11
9
  default:
12
10
  return 'h2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.25.0-alpha.0",
3
+ "version": "1.25.1",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -136,8 +136,5 @@
136
136
  "*.{json,yaml,yml,md}": [
137
137
  "prettier --write"
138
138
  ]
139
- },
140
- "publishConfig": {
141
- "tag": "alpha"
142
139
  }
143
140
  }
@@ -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 = 'xs' | 's' | 'm' | 'l';
41
+ export type TextSize = '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" | "h5";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
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) => {
@@ -8,8 +8,6 @@ function getHeaderTag(size) {
8
8
  return 'h1';
9
9
  case 's':
10
10
  return 'h4';
11
- case 'xs':
12
- return 'h5';
13
11
  case 'm':
14
12
  default:
15
13
  return 'h2';
@@ -141,17 +141,15 @@
141
141
  }
142
142
 
143
143
  @mixin label($size: m) {
144
- @if $size == m {
145
- @include text-size(body-1);
144
+ @include text-size(body-1);
146
145
 
147
- $label-height: 20px;
146
+ $label-height: 20px;
148
147
 
149
- display: inline-block;
150
- padding: 0 8px;
151
- border-radius: 2px;
152
- height: $label-height;
153
- line-height: $label-height;
154
- }
148
+ display: inline-block;
149
+ padding: 0 8px;
150
+ border-radius: 2px;
151
+ height: $label-height;
152
+ line-height: $label-height;
155
153
 
156
154
  @if $size == s {
157
155
  @include text-size(caption-2);