@gravity-ui/page-constructor 4.24.0-alpha.0 → 4.24.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 (98) 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 +9 -0
  4. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  5. package/build/cjs/blocks/Icons/Icons.css +0 -10
  6. package/build/cjs/blocks/Media/schema.d.ts +6 -0
  7. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  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/Tabs/schema.d.ts +3 -0
  12. package/build/cjs/components/Button/Button.css +0 -6
  13. package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -3
  14. package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
  15. package/build/cjs/components/CardBase/CardBase.d.ts +2 -1
  16. package/build/cjs/components/CardBase/CardBase.js +3 -7
  17. package/build/cjs/components/Control/Control.css +0 -8
  18. package/build/cjs/components/FileLink/FileLink.css +0 -8
  19. package/build/cjs/components/FullscreenImage/FullscreenImage.css +0 -16
  20. package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
  21. package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +1 -1
  22. package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +3 -10
  23. package/build/cjs/components/Link/Link.css +0 -8
  24. package/build/cjs/components/Media/Image/Image.js +1 -1
  25. package/build/cjs/components/OverflowScroller/OverflowScroller.css +0 -19
  26. package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -2
  27. package/build/cjs/components/ReactPlayer/CustomBarControls.css +4 -6
  28. package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -7
  29. package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
  30. package/build/cjs/components/Title/TitleItem.css +0 -8
  31. package/build/cjs/components/VideoBlock/VideoBlock.css +0 -7
  32. package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -9
  33. package/build/cjs/schema/constants.d.ts +3 -0
  34. package/build/cjs/schema/validators/common.d.ts +3 -0
  35. package/build/cjs/schema/validators/common.js +3 -0
  36. package/build/cjs/sub-blocks/BannerCard/BannerCard.css +0 -3
  37. package/build/cjs/sub-blocks/Content/Content.css +0 -3
  38. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -7
  39. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
  40. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -0
  41. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
  42. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  43. package/build/esm/blocks/ContentLayout/ContentLayout.css +0 -3
  44. package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
  45. package/build/esm/blocks/Header/schema.d.ts +9 -0
  46. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  47. package/build/esm/blocks/Icons/Icons.css +0 -10
  48. package/build/esm/blocks/Media/schema.d.ts +6 -0
  49. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  50. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
  51. package/build/esm/blocks/Slider/Arrow/Arrow.css +0 -7
  52. package/build/esm/blocks/Slider/Slider.js +6 -12
  53. package/build/esm/blocks/Tabs/schema.d.ts +3 -0
  54. package/build/esm/components/Button/Button.css +0 -6
  55. package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -3
  56. package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
  57. package/build/esm/components/CardBase/CardBase.d.ts +2 -1
  58. package/build/esm/components/CardBase/CardBase.js +2 -6
  59. package/build/esm/components/Control/Control.css +0 -8
  60. package/build/esm/components/FileLink/FileLink.css +0 -8
  61. package/build/esm/components/FullscreenImage/FullscreenImage.css +0 -16
  62. package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
  63. package/build/esm/components/FullscreenMedia/FullscreenMedia.css +1 -1
  64. package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -12
  65. package/build/esm/components/Link/Link.css +0 -8
  66. package/build/esm/components/Media/Image/Image.js +2 -2
  67. package/build/esm/components/OverflowScroller/OverflowScroller.css +0 -19
  68. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -2
  69. package/build/esm/components/ReactPlayer/CustomBarControls.css +4 -6
  70. package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -7
  71. package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
  72. package/build/esm/components/Title/TitleItem.css +0 -8
  73. package/build/esm/components/VideoBlock/VideoBlock.css +0 -7
  74. package/build/esm/containers/PageConstructor/PageConstructor.css +0 -9
  75. package/build/esm/schema/constants.d.ts +3 -0
  76. package/build/esm/schema/validators/common.d.ts +3 -0
  77. package/build/esm/schema/validators/common.js +3 -0
  78. package/build/esm/sub-blocks/BannerCard/BannerCard.css +0 -3
  79. package/build/esm/sub-blocks/Content/Content.css +0 -3
  80. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -7
  81. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
  82. package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -0
  83. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
  84. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  85. package/package.json +1 -1
  86. package/styles/mixins.scss +0 -20
  87. package/styles/root.scss +0 -2
  88. package/styles/styles.css +0 -7
  89. package/styles/yfm.scss +0 -2
  90. package/widget/index.js +1 -1
  91. package/build/cjs/components/OverflowScroller/i18n/en.json +0 -4
  92. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +0 -2
  93. package/build/cjs/components/OverflowScroller/i18n/index.js +0 -8
  94. package/build/cjs/components/OverflowScroller/i18n/ru.json +0 -4
  95. package/build/esm/components/OverflowScroller/i18n/en.json +0 -4
  96. package/build/esm/components/OverflowScroller/i18n/index.d.ts +0 -2
  97. package/build/esm/components/OverflowScroller/i18n/index.js +0 -5
  98. package/build/esm/components/OverflowScroller/i18n/ru.json +0 -4
@@ -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);
@@ -1053,6 +1053,9 @@ export declare const cardSchemas: {
1053
1053
  fullscreen: {
1054
1054
  type: string;
1055
1055
  };
1056
+ ratio: {
1057
+ type: string;
1058
+ };
1056
1059
  border: {
1057
1060
  type: string;
1058
1061
  enum: string[];
@@ -1321,6 +1321,9 @@ export declare const MediaProps: {
1321
1321
  };
1322
1322
  })[];
1323
1323
  };
1324
+ ratio: {
1325
+ type: string;
1326
+ };
1324
1327
  };
1325
1328
  export declare const YMapMarkerLabel: {
1326
1329
  type: string;
@@ -517,6 +517,9 @@ export const MediaProps = {
517
517
  analyticsEvents: {
518
518
  anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
519
519
  },
520
+ ratio: {
521
+ type: 'number',
522
+ },
520
523
  };
521
524
  export const YMapMarkerLabel = {
522
525
  type: 'object',
@@ -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
  }
@@ -243,6 +243,9 @@ export declare const LayoutItem: {
243
243
  };
244
244
  })[];
245
245
  };
246
+ ratio: {
247
+ type: string;
248
+ };
246
249
  };
247
250
  content: Partial<{
248
251
  title: {
@@ -248,6 +248,9 @@ export declare const MediaCardBlock: {
248
248
  fullscreen: {
249
249
  type: string;
250
250
  };
251
+ ratio: {
252
+ type: string;
253
+ };
251
254
  border: {
252
255
  type: string;
253
256
  enum: string[];
@@ -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.24.0-alpha.0",
3
+ "version": "4.24.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,26 +8,6 @@
8
8
  line-height: var(--g-text-#{$name}-line-height);
9
9
  }
10
10
 
11
- @mixin focusable($offset: 0, $mode: 'outline') {
12
- @if $mode == 'outline' {
13
- &:focus {
14
- outline: 2px solid var(--g-color-line-focus);
15
- outline-offset: $offset;
16
- }
17
- &:focus:not(:focus-visible) {
18
- outline: 0;
19
- }
20
- }
21
- @if $mode == 'box-shadow' {
22
- &:focus {
23
- box-shadow: 0 0 0 2px var(--g-color-line-focus);
24
- }
25
- &:focus:not(:focus-visible) {
26
- box-shadow: none;
27
- }
28
- }
29
- }
30
-
31
11
  @mixin link() {
32
12
  @include islands-focus();
33
13
 
package/styles/root.scss CHANGED
@@ -37,12 +37,10 @@
37
37
 
38
38
  &_theme_light {
39
39
  @include pc-colors-light;
40
- --g-color-line-focus: var(--g-color-text-brand);
41
40
  }
42
41
 
43
42
  &_theme_dark {
44
43
  @include pc-colors-dark;
45
- --g-color-line-focus: var(--g-color-text-light-primary);
46
44
  }
47
45
 
48
46
  &.g-root_theme_dark {
package/styles/styles.css CHANGED
@@ -70,7 +70,6 @@ unpredictable css rules order in build */
70
70
  color: var(--g-color-text-link);
71
71
  text-decoration: none;
72
72
  cursor: pointer;
73
- border-radius: var(--g-focus-border-radius);
74
73
  }
75
74
  .utilityfocus .yfm_constructor a:focus {
76
75
  outline: 2px solid #ffdb4d;
@@ -79,12 +78,6 @@ unpredictable css rules order in build */
79
78
  --pc-text-header-color: var(--g-color-text-link-hover);
80
79
  color: var(--g-color-text-link-hover);
81
80
  }
82
- .yfm_constructor a:focus {
83
- box-shadow: 0 0 0 2px var(--g-color-line-focus);
84
- }
85
- .yfm_constructor a:focus:not(:focus-visible) {
86
- box-shadow: none;
87
- }
88
81
  .yfm_constructor table {
89
82
  color: var(--g-color-text-primary);
90
83
  border: 1px solid var(--g-color-line-generic);
package/styles/yfm.scss CHANGED
@@ -85,8 +85,6 @@
85
85
 
86
86
  a {
87
87
  @include link();
88
- @include focusable(0, 'box-shadow');
89
- border-radius: var(--g-focus-border-radius);
90
88
  }
91
89
 
92
90
  table {