@gravity-ui/page-constructor 4.23.0-alpha.0 → 4.23.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.
Files changed (102) hide show
  1. package/build/cjs/blocks/ContentLayout/ContentLayout.css +0 -3
  2. package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
  3. package/build/cjs/blocks/Header/schema.d.ts +105 -5
  4. package/build/cjs/blocks/HeaderSlider/schema.d.ts +42 -2
  5. package/build/cjs/blocks/Icons/Icons.css +0 -10
  6. package/build/cjs/blocks/Media/schema.d.ts +42 -2
  7. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
  8. package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
  9. package/build/cjs/blocks/Slider/Arrow/Arrow.css +0 -7
  10. package/build/cjs/blocks/Slider/Slider.js +6 -12
  11. package/build/cjs/blocks/Table/schema.d.ts +3 -0
  12. package/build/cjs/blocks/Table/schema.js +2 -0
  13. package/build/cjs/blocks/Tabs/schema.d.ts +21 -1
  14. package/build/cjs/components/Button/Button.css +0 -6
  15. package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -3
  16. package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
  17. package/build/cjs/components/CardBase/CardBase.d.ts +2 -1
  18. package/build/cjs/components/CardBase/CardBase.js +3 -7
  19. package/build/cjs/components/Control/Control.css +0 -8
  20. package/build/cjs/components/FileLink/FileLink.css +0 -8
  21. package/build/cjs/components/FullscreenImage/FullscreenImage.css +0 -16
  22. package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
  23. package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +1 -1
  24. package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +3 -10
  25. package/build/cjs/components/Link/Link.css +0 -8
  26. package/build/cjs/components/Media/Image/Image.js +1 -1
  27. package/build/cjs/components/OverflowScroller/OverflowScroller.css +0 -19
  28. package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -2
  29. package/build/cjs/components/ReactPlayer/CustomBarControls.css +4 -6
  30. package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -7
  31. package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
  32. package/build/cjs/components/Title/TitleItem.css +0 -8
  33. package/build/cjs/components/VideoBlock/VideoBlock.css +0 -7
  34. package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -9
  35. package/build/cjs/schema/constants.d.ts +21 -1
  36. package/build/cjs/schema/validators/common.d.ts +84 -5
  37. package/build/cjs/schema/validators/common.js +32 -2
  38. package/build/cjs/sub-blocks/BannerCard/BannerCard.css +0 -3
  39. package/build/cjs/sub-blocks/Content/Content.css +0 -3
  40. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -7
  41. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +21 -1
  42. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +21 -1
  43. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
  44. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  45. package/build/esm/blocks/ContentLayout/ContentLayout.css +0 -3
  46. package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
  47. package/build/esm/blocks/Header/schema.d.ts +105 -5
  48. package/build/esm/blocks/HeaderSlider/schema.d.ts +42 -2
  49. package/build/esm/blocks/Icons/Icons.css +0 -10
  50. package/build/esm/blocks/Media/schema.d.ts +42 -2
  51. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
  52. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
  53. package/build/esm/blocks/Slider/Arrow/Arrow.css +0 -7
  54. package/build/esm/blocks/Slider/Slider.js +6 -12
  55. package/build/esm/blocks/Table/schema.d.ts +3 -0
  56. package/build/esm/blocks/Table/schema.js +2 -0
  57. package/build/esm/blocks/Tabs/schema.d.ts +21 -1
  58. package/build/esm/components/Button/Button.css +0 -6
  59. package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -3
  60. package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
  61. package/build/esm/components/CardBase/CardBase.d.ts +2 -1
  62. package/build/esm/components/CardBase/CardBase.js +2 -6
  63. package/build/esm/components/Control/Control.css +0 -8
  64. package/build/esm/components/FileLink/FileLink.css +0 -8
  65. package/build/esm/components/FullscreenImage/FullscreenImage.css +0 -16
  66. package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
  67. package/build/esm/components/FullscreenMedia/FullscreenMedia.css +1 -1
  68. package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -12
  69. package/build/esm/components/Link/Link.css +0 -8
  70. package/build/esm/components/Media/Image/Image.js +2 -2
  71. package/build/esm/components/OverflowScroller/OverflowScroller.css +0 -19
  72. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -2
  73. package/build/esm/components/ReactPlayer/CustomBarControls.css +4 -6
  74. package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -7
  75. package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
  76. package/build/esm/components/Title/TitleItem.css +0 -8
  77. package/build/esm/components/VideoBlock/VideoBlock.css +0 -7
  78. package/build/esm/containers/PageConstructor/PageConstructor.css +0 -9
  79. package/build/esm/schema/constants.d.ts +21 -1
  80. package/build/esm/schema/validators/common.d.ts +84 -5
  81. package/build/esm/schema/validators/common.js +32 -2
  82. package/build/esm/sub-blocks/BannerCard/BannerCard.css +0 -3
  83. package/build/esm/sub-blocks/Content/Content.css +0 -3
  84. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -7
  85. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +21 -1
  86. package/build/esm/sub-blocks/MediaCard/schema.d.ts +21 -1
  87. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
  88. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  89. package/package.json +3 -3
  90. package/styles/mixins.scss +57 -20
  91. package/styles/root.scss +0 -2
  92. package/styles/styles.css +0 -7
  93. package/styles/yfm.scss +0 -2
  94. package/widget/index.js +1 -1
  95. package/build/cjs/components/OverflowScroller/i18n/en.json +0 -4
  96. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +0 -2
  97. package/build/cjs/components/OverflowScroller/i18n/index.js +0 -8
  98. package/build/cjs/components/OverflowScroller/i18n/ru.json +0 -4
  99. package/build/esm/components/OverflowScroller/i18n/en.json +0 -4
  100. package/build/esm/components/OverflowScroller/i18n/index.d.ts +0 -2
  101. package/build/esm/components/OverflowScroller/i18n/index.js +0 -5
  102. package/build/esm/components/OverflowScroller/i18n/ru.json +0 -4
@@ -10,7 +10,6 @@ unpredictable css rules order in build */
10
10
  cursor: pointer;
11
11
  display: flex;
12
12
  align-items: center;
13
- border-radius: var(--g-focus-border-radius);
14
13
  }
15
14
  .utilityfocus .pc-link-block__link:focus {
16
15
  outline: 2px solid #ffdb4d;
@@ -19,13 +18,6 @@ unpredictable css rules order in build */
19
18
  --pc-text-header-color: var(--g-color-text-link-hover);
20
19
  color: var(--g-color-text-link-hover);
21
20
  }
22
- .pc-link-block__link:focus {
23
- outline: 2px solid var(--g-color-line-focus);
24
- outline-offset: 0;
25
- }
26
- .pc-link-block__link:focus:not(:focus-visible) {
27
- outline: 0;
28
- }
29
21
  .pc-link-block__link_theme_dark {
30
22
  color: var(--g-color-text-light-primary);
31
23
  }
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useEffect, useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import debounce from 'lodash/debounce';
3
3
  import { animated, config, useSpring } from 'react-spring';
4
4
  import SliderBlock from '../../../blocks/Slider/Slider';
@@ -50,7 +50,7 @@ const Image = (props) => {
50
50
  };
51
51
  const imageSlider = (imageArray) => {
52
52
  const fullscreenItem = fullscreen === undefined || fullscreen;
53
- return (React.createElement(SliderBlock, { slidesToShow: 1, type: SliderType.MediaCard }, imageArray.map((item, index) => (React.createElement(Fragment, { key: index }, fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))))));
53
+ return (React.createElement(SliderBlock, { slidesToShow: 1, type: SliderType.MediaCard }, imageArray.map((item) => fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))));
54
54
  };
55
55
  if (Array.isArray(image)) {
56
56
  return imageSlider(image);
@@ -1,5 +1,3 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
1
  .pc-overflow-scroller {
4
2
  display: flex;
5
3
  align-items: center;
@@ -21,15 +19,6 @@ unpredictable css rules order in build */
21
19
  transition: left 0.6s;
22
20
  }
23
21
  .pc-overflow-scroller__arrow {
24
- display: inline-block;
25
- margin: 0;
26
- padding: 0;
27
- font: inherit;
28
- border: none;
29
- outline: none;
30
- color: inherit;
31
- background: none;
32
- cursor: pointer;
33
22
  position: absolute;
34
23
  z-index: 10;
35
24
  top: 0;
@@ -40,14 +29,6 @@ unpredictable css rules order in build */
40
29
  height: calc(100% - 1px);
41
30
  cursor: pointer;
42
31
  color: var(--g-color-text-secondary);
43
- border-radius: var(--g-focus-border-radius);
44
- }
45
- .pc-overflow-scroller__arrow:focus {
46
- outline: 2px solid var(--g-color-line-focus);
47
- outline-offset: 0;
48
- }
49
- .pc-overflow-scroller__arrow:focus:not(:focus-visible) {
50
- outline: 0;
51
32
  }
52
33
  .pc-overflow-scroller__arrow_type_left {
53
34
  left: 0;
@@ -2,7 +2,6 @@ import React, { createRef } from 'react';
2
2
  import debounce from 'lodash/debounce';
3
3
  import { ToggleArrow } from '..';
4
4
  import { block } from '../../utils';
5
- import i18n from './i18n';
6
5
  import './OverflowScroller.css';
7
6
  const b = block('overflow-scroller');
8
7
  const TRANSITION_TIME = 300;
@@ -83,7 +82,7 @@ export default class OverflowScroller extends React.Component {
83
82
  }) },
84
83
  React.createElement("div", { className: b(null, className), ref: this.containerRef },
85
84
  React.createElement("div", { className: b('wrapper'), style: wrapperStyle, ref: this.wrapperRef }, children)),
86
- arrows.map((direction) => (React.createElement("button", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction), "aria-label": i18n(direction) },
85
+ arrows.map((direction) => (React.createElement("div", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction) },
87
86
  React.createElement(ToggleArrow, { size: arrowSize, type: 'horizontal', iconType: "navigation" }))))));
88
87
  }
89
88
  }
@@ -55,11 +55,10 @@ unpredictable css rules order in build */
55
55
  background: #eff2f8;
56
56
  }
57
57
  .pc-CustomBarControls__button_type_with-mute-button:focus {
58
- outline: 2px solid var(--g-color-line-focus);
59
- outline-offset: 0;
58
+ outline: 2px solid var(--g-color-line-misc);
60
59
  }
61
60
  .pc-CustomBarControls__button_type_with-mute-button:focus:not(:focus-visible) {
62
- outline: 0;
61
+ outline: none;
63
62
  }
64
63
  .pc-CustomBarControls__button_type_with-play-pause-button {
65
64
  width: 42px;
@@ -68,11 +67,10 @@ unpredictable css rules order in build */
68
67
  background: var(--g-color-base-background);
69
68
  }
70
69
  .pc-CustomBarControls__button_type_with-play-pause-button:focus {
71
- outline: 2px solid var(--g-color-line-focus);
72
- outline-offset: 0;
70
+ outline: 2px solid var(--g-color-line-misc);
73
71
  }
74
72
  .pc-CustomBarControls__button_type_with-play-pause-button:focus:not(:focus-visible) {
75
- outline: 0;
73
+ outline: none;
76
74
  }
77
75
  .pc-CustomBarControls__play-icon_type_with-play-pause-button {
78
76
  height: 16px;
@@ -27,13 +27,6 @@ unpredictable css rules order in build */
27
27
  height: 64px;
28
28
  border-radius: 166px;
29
29
  }
30
- .pc-ReactPlayer__button:focus {
31
- outline: 2px solid var(--g-color-line-focus);
32
- outline-offset: 0;
33
- }
34
- .pc-ReactPlayer__button:focus:not(:focus-visible) {
35
- outline: 0;
36
- }
37
30
  .pc-ReactPlayer__button_theme_blue {
38
31
  color: var(--g-color-base-background);
39
32
  background-color: var(--g-color-base-brand);
@@ -216,7 +216,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
216
216
  }, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (React.createElement(Fragment, null,
217
217
  React.createElement(ReactPlayer, { className: b('player'), url: videoSrc, muted: muted, controls: controls === MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: autoPlay && customControlsType !== CustomControlsType.WithMuteButton
218
218
  ? undefined
219
- : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, previewTabIndex: -1 }),
219
+ : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
220
220
  controls === MediaVideoControlsType.Custom && (React.createElement(CustomBarControls, { className: customBarControlsClassName, mute: {
221
221
  isMuted: muted,
222
222
  changeMute: (event) => {
@@ -62,19 +62,11 @@ unpredictable css rules order in build */
62
62
  color: inherit;
63
63
  text-decoration: none;
64
64
  padding-right: 8px;
65
- border-radius: var(--g-focus-border-radius);
66
65
  }
67
66
  .pc-title-item__link:hover, .pc-title-item__link:active {
68
67
  --pc-text-header-color: inherit;
69
68
  color: inherit;
70
69
  }
71
- .pc-title-item__link:focus {
72
- outline: 2px solid var(--g-color-line-focus);
73
- outline-offset: 0;
74
- }
75
- .pc-title-item__link:focus:not(:focus-visible) {
76
- outline: 0;
77
- }
78
70
  .pc-title-item__link:hover {
79
71
  cursor: pointer;
80
72
  }
@@ -43,13 +43,6 @@ unpredictable css rules order in build */
43
43
  background-color: var(--g-color-base-brand);
44
44
  border-radius: 50%;
45
45
  }
46
- .pc-VideoBlock__button:focus {
47
- outline: 2px solid var(--g-color-line-focus);
48
- outline-offset: 0;
49
- }
50
- .pc-VideoBlock__button:focus:not(:focus-visible) {
51
- outline: 0;
52
- }
53
46
  .pc-VideoBlock__icon {
54
47
  margin-left: 6px;
55
48
  }
@@ -41,14 +41,12 @@ unpredictable css rules order in build */
41
41
  --pc-color-base-gold: #ffdb4d;
42
42
  --pc-color-base-asphalt: #313538;
43
43
  --pc-color-base-copper: #ffe6c4;
44
- --g-color-line-focus: var(--g-color-text-brand);
45
44
  }
46
45
  .g-root_theme_dark {
47
46
  --pc-color-base-silver: #bcc0c4;
48
47
  --pc-color-base-gold: #ffde5d;
49
48
  --pc-color-base-asphalt: #474d52;
50
49
  --pc-color-base-copper: #7f7262;
51
- --g-color-line-focus: var(--g-color-text-light-primary);
52
50
  }
53
51
  .g-root.g-root_theme_dark {
54
52
  --pc-color-sfx-shadow: var(--g-color-sfx-shadow);
@@ -126,7 +124,6 @@ unpredictable css rules order in build */
126
124
  color: var(--g-color-text-link);
127
125
  text-decoration: none;
128
126
  cursor: pointer;
129
- border-radius: var(--g-focus-border-radius);
130
127
  }
131
128
  .utilityfocus .yfm_constructor a:focus {
132
129
  outline: 2px solid #ffdb4d;
@@ -135,12 +132,6 @@ unpredictable css rules order in build */
135
132
  --pc-text-header-color: var(--g-color-text-link-hover);
136
133
  color: var(--g-color-text-link-hover);
137
134
  }
138
- .yfm_constructor a:focus {
139
- box-shadow: 0 0 0 2px var(--g-color-line-focus);
140
- }
141
- .yfm_constructor a:focus:not(:focus-visible) {
142
- box-shadow: none;
143
- }
144
135
  .yfm_constructor table {
145
136
  color: var(--g-color-text-primary);
146
137
  border: 1px solid var(--g-color-line-generic);
@@ -994,7 +994,27 @@ export declare const cardSchemas: {
994
994
  };
995
995
  controls: {
996
996
  type: string;
997
- enum: string[];
997
+ enum: import("../models").MediaVideoControlsType[];
998
+ };
999
+ customControlsOptions: {
1000
+ type: string;
1001
+ additionalProperties: boolean;
1002
+ properties: {
1003
+ type: {
1004
+ type: string;
1005
+ enum: import("../models").CustomControlsType[];
1006
+ };
1007
+ muteButtonShown: {
1008
+ type: string;
1009
+ };
1010
+ positioning: {
1011
+ type: string;
1012
+ enum: import("../models").CustomControlsButtonPositioning[];
1013
+ };
1014
+ };
1015
+ };
1016
+ ariaLabel: {
1017
+ type: string;
998
1018
  };
999
1019
  };
1000
1020
  };
@@ -1,4 +1,4 @@
1
- import { Theme } from '../../models';
1
+ import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme } from '../../models';
2
2
  export declare const mediaDirection: string[];
3
3
  export declare const textSize: string[];
4
4
  export declare const containerSizesArray: string[];
@@ -8,7 +8,7 @@ export declare const contentTextWidth: string[];
8
8
  export declare const videoTypes: string[];
9
9
  export declare const playIconTypes: string[];
10
10
  export declare const playIconThemes: string[];
11
- export declare const videoControlsTypes: string[];
11
+ export declare const videoControlsTypes: MediaVideoControlsType[];
12
12
  export declare const fileLinkTypes: string[];
13
13
  export declare const dividerEnum: {
14
14
  enum: (string | number)[];
@@ -19,6 +19,8 @@ export declare const sizeNumber: {
19
19
  minimum: number;
20
20
  };
21
21
  export declare const contentThemes: string[];
22
+ export declare const customControlsType: CustomControlsType[];
23
+ export declare const customControlsButtonPositioning: CustomControlsButtonPositioning[];
22
24
  export declare const BaseProps: {
23
25
  type: {};
24
26
  when: {
@@ -91,6 +93,23 @@ export declare const PlayButtonProps: {
91
93
  };
92
94
  };
93
95
  };
96
+ export declare const CustomControlsOptionsProps: {
97
+ type: string;
98
+ additionalProperties: boolean;
99
+ properties: {
100
+ type: {
101
+ type: string;
102
+ enum: CustomControlsType[];
103
+ };
104
+ muteButtonShown: {
105
+ type: string;
106
+ };
107
+ positioning: {
108
+ type: string;
109
+ enum: CustomControlsButtonPositioning[];
110
+ };
111
+ };
112
+ };
94
113
  export declare const VideoProps: {
95
114
  type: string;
96
115
  additionalProperties: boolean;
@@ -154,7 +173,27 @@ export declare const VideoProps: {
154
173
  };
155
174
  controls: {
156
175
  type: string;
157
- enum: string[];
176
+ enum: MediaVideoControlsType[];
177
+ };
178
+ customControlsOptions: {
179
+ type: string;
180
+ additionalProperties: boolean;
181
+ properties: {
182
+ type: {
183
+ type: string;
184
+ enum: CustomControlsType[];
185
+ };
186
+ muteButtonShown: {
187
+ type: string;
188
+ };
189
+ positioning: {
190
+ type: string;
191
+ enum: CustomControlsButtonPositioning[];
192
+ };
193
+ };
194
+ };
195
+ ariaLabel: {
196
+ type: string;
158
197
  };
159
198
  };
160
199
  };
@@ -283,7 +322,27 @@ export declare const BackgroundProps: {
283
322
  };
284
323
  controls: {
285
324
  type: string;
286
- enum: string[];
325
+ enum: MediaVideoControlsType[];
326
+ };
327
+ customControlsOptions: {
328
+ type: string;
329
+ additionalProperties: boolean;
330
+ properties: {
331
+ type: {
332
+ type: string;
333
+ enum: CustomControlsType[];
334
+ };
335
+ muteButtonShown: {
336
+ type: string;
337
+ };
338
+ positioning: {
339
+ type: string;
340
+ enum: CustomControlsButtonPositioning[];
341
+ };
342
+ };
343
+ };
344
+ ariaLabel: {
345
+ type: string;
287
346
  };
288
347
  };
289
348
  };
@@ -1125,7 +1184,27 @@ export declare const MediaProps: {
1125
1184
  };
1126
1185
  controls: {
1127
1186
  type: string;
1128
- enum: string[];
1187
+ enum: MediaVideoControlsType[];
1188
+ };
1189
+ customControlsOptions: {
1190
+ type: string;
1191
+ additionalProperties: boolean;
1192
+ properties: {
1193
+ type: {
1194
+ type: string;
1195
+ enum: CustomControlsType[];
1196
+ };
1197
+ muteButtonShown: {
1198
+ type: string;
1199
+ };
1200
+ positioning: {
1201
+ type: string;
1202
+ enum: CustomControlsButtonPositioning[];
1203
+ };
1204
+ };
1205
+ };
1206
+ ariaLabel: {
1207
+ type: string;
1129
1208
  };
1130
1209
  };
1131
1210
  };
@@ -1,5 +1,5 @@
1
1
  import { ImageProps, imageUrlPattern } from '../../components/Image/schema';
2
- import { Theme } from '../../models';
2
+ import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme, } from '../../models';
3
3
  import { AnalyticsEventSchema } from './event';
4
4
  import { pixelEvents } from './pixel';
5
5
  export const mediaDirection = ['media-content', 'content-media'];
@@ -11,11 +11,20 @@ export const contentTextWidth = ['s', 'm', 'l'];
11
11
  export const videoTypes = ['default', 'player'];
12
12
  export const playIconTypes = ['default', 'text'];
13
13
  export const playIconThemes = ['blue', 'grey'];
14
- export const videoControlsTypes = ['default', 'custom'];
14
+ export const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];
15
15
  export const fileLinkTypes = ['vertical', 'horizontal'];
16
16
  export const dividerEnum = { enum: [0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] };
17
17
  export const sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
18
18
  export const contentThemes = ['default', 'dark', 'light'];
19
+ export const customControlsType = [
20
+ CustomControlsType.WithMuteButton,
21
+ CustomControlsType.WithPlayPauseButton,
22
+ ];
23
+ export const customControlsButtonPositioning = [
24
+ CustomControlsButtonPositioning.Center,
25
+ CustomControlsButtonPositioning.Left,
26
+ CustomControlsButtonPositioning.Right,
27
+ ];
19
28
  export const BaseProps = {
20
29
  type: {},
21
30
  when: {
@@ -85,6 +94,23 @@ export const PlayButtonProps = {
85
94
  },
86
95
  },
87
96
  };
97
+ export const CustomControlsOptionsProps = {
98
+ type: 'object',
99
+ additionalProperties: false,
100
+ properties: {
101
+ type: {
102
+ type: 'string',
103
+ enum: customControlsType,
104
+ },
105
+ muteButtonShown: {
106
+ type: 'boolean',
107
+ },
108
+ positioning: {
109
+ type: 'string',
110
+ enum: customControlsButtonPositioning,
111
+ },
112
+ },
113
+ };
88
114
  export const VideoProps = {
89
115
  type: 'object',
90
116
  additionalProperties: false,
@@ -123,6 +149,10 @@ export const VideoProps = {
123
149
  type: 'string',
124
150
  enum: videoControlsTypes,
125
151
  },
152
+ customControlsOptions: CustomControlsOptionsProps,
153
+ ariaLabel: {
154
+ type: 'string',
155
+ },
126
156
  },
127
157
  };
128
158
  export const ThemeProps = {
@@ -4,9 +4,6 @@
4
4
 
5
5
  /* use this for style redefinitions to awoid problems with
6
6
  unpredictable css rules order in build */
7
- .pc-banner-card_theme_dark {
8
- --g-color-line-focus: var(--g-color-text-light-primary);
9
- }
10
7
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__title,
11
8
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__subtitle {
12
9
  color: var(--g-color-text-light-primary);
@@ -91,9 +91,6 @@ unpredictable css rules order in build */
91
91
  .pc-content_size_l .pc-content__button {
92
92
  margin-top: 12px;
93
93
  }
94
- .pc-content_theme_dark {
95
- --g-color-line-focus: var(--g-color-text-light-primary);
96
- }
97
94
  .pc-content_theme_dark .pc-content__title *,
98
95
  .pc-content_theme_dark .pc-content__text .yfm,
99
96
  .pc-content_theme_dark .pc-content__text .yfm *,
@@ -301,13 +301,6 @@ unpredictable css rules order in build */
301
301
  white-space: nowrap;
302
302
  appearance: none;
303
303
  }
304
- .pc-hubspot-form .hs-button.primary:focus {
305
- outline: 2px solid var(--g-color-line-focus);
306
- outline-offset: 1px;
307
- }
308
- .pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
309
- outline: 0;
310
- }
311
304
  .pc-hubspot-form .hs-button.primary:hover {
312
305
  background-color: var(--g-color-base-brand-hover);
313
306
  }
@@ -106,7 +106,27 @@ export declare const LayoutItem: {
106
106
  };
107
107
  controls: {
108
108
  type: string;
109
- enum: string[];
109
+ enum: import("../..").MediaVideoControlsType[];
110
+ };
111
+ customControlsOptions: {
112
+ type: string;
113
+ additionalProperties: boolean;
114
+ properties: {
115
+ type: {
116
+ type: string;
117
+ enum: import("../..").CustomControlsType[];
118
+ };
119
+ muteButtonShown: {
120
+ type: string;
121
+ };
122
+ positioning: {
123
+ type: string;
124
+ enum: import("../..").CustomControlsButtonPositioning[];
125
+ };
126
+ };
127
+ };
128
+ ariaLabel: {
129
+ type: string;
110
130
  };
111
131
  };
112
132
  };
@@ -189,7 +189,27 @@ export declare const MediaCardBlock: {
189
189
  };
190
190
  controls: {
191
191
  type: string;
192
- enum: string[];
192
+ enum: import("../..").MediaVideoControlsType[];
193
+ };
194
+ customControlsOptions: {
195
+ type: string;
196
+ additionalProperties: boolean;
197
+ properties: {
198
+ type: {
199
+ type: string;
200
+ enum: import("../..").CustomControlsType[];
201
+ };
202
+ muteButtonShown: {
203
+ type: string;
204
+ };
205
+ positioning: {
206
+ type: string;
207
+ enum: import("../..").CustomControlsButtonPositioning[];
208
+ };
209
+ };
210
+ };
211
+ ariaLabel: {
212
+ type: string;
193
213
  };
194
214
  };
195
215
  };
@@ -23,29 +23,11 @@ unpredictable css rules order in build */
23
23
  margin: auto 10px;
24
24
  }
25
25
  .pc-price-details__foldable_title {
26
- font-size: var(--g-text-body-2-font-size);
27
- line-height: var(--g-text-body-2-line-height);
28
- display: inline-block;
29
- margin: 0;
30
- padding: 0;
31
- font: inherit;
32
- border: none;
33
- outline: none;
34
- color: inherit;
35
- background: none;
36
- cursor: pointer;
37
26
  cursor: pointer;
38
27
  display: flex;
39
- align-items: center;
40
28
  font-weight: 400;
41
- border-radius: var(--g-focus-border-radius);
42
- }
43
- .pc-price-details__foldable_title:focus {
44
- outline: 2px solid var(--g-color-line-focus);
45
- outline-offset: 0;
46
- }
47
- .pc-price-details__foldable_title:focus:not(:focus-visible) {
48
- outline: 0;
29
+ font-size: var(--g-text-body-2-font-size);
30
+ line-height: var(--g-text-body-2-line-height);
49
31
  }
50
32
  .pc-price-details__foldable_title_color_cornflower {
51
33
  color: var(--g-color-text-link);
@@ -26,7 +26,7 @@ const PriceDetails = (props) => {
26
26
  return React.createElement("div", { className: b('foldable_block') }, getPriceDetails());
27
27
  };
28
28
  const getFoldableTitle = () => {
29
- return (React.createElement("button", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen, "aria-expanded": isOpened },
29
+ return (React.createElement("div", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen },
30
30
  foldableTitle,
31
31
  React.createElement(ToggleArrow, { open: isOpened, size: 14, type: 'vertical', className: b('arrow') })));
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.23.0-alpha.0",
3
+ "version": "4.23.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@doc-tools/transform": "^3.3.2",
107
- "@gravity-ui/uikit": "^5.12.2",
107
+ "@gravity-ui/uikit": "^5.4.1",
108
108
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
109
109
  },
110
110
  "devDependencies": {
@@ -120,7 +120,7 @@
120
120
  "@gravity-ui/prettier-config": "^1.0.1",
121
121
  "@gravity-ui/stylelint-config": "^1.0.0",
122
122
  "@gravity-ui/tsconfig": "^1.0.0",
123
- "@gravity-ui/uikit": "^5.12.2",
123
+ "@gravity-ui/uikit": "^5.9.1",
124
124
  "@storybook/addon-actions": "^7.1.0",
125
125
  "@storybook/addon-essentials": "^7.1.0",
126
126
  "@storybook/addon-knobs": "^7.0.2",