@gravity-ui/page-constructor 4.27.0-alpha.0 → 4.27.2-alpha.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 +3 -0
  2. package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
  3. package/build/cjs/blocks/Header/Header.css +15 -0
  4. package/build/cjs/blocks/Header/Header.js +6 -2
  5. package/build/cjs/blocks/Header/schema.d.ts +8 -0
  6. package/build/cjs/blocks/Header/schema.js +4 -0
  7. package/build/cjs/blocks/HeaderSlider/schema.d.ts +4 -0
  8. package/build/cjs/blocks/Icons/Icons.css +10 -0
  9. package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
  10. package/build/cjs/blocks/Slider/Arrow/Arrow.css +7 -0
  11. package/build/cjs/blocks/Slider/Slider.js +12 -6
  12. package/build/cjs/components/Button/Button.css +6 -0
  13. package/build/cjs/components/ButtonTabs/ButtonTabs.css +3 -0
  14. package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
  15. package/build/cjs/components/CardBase/CardBase.d.ts +1 -2
  16. package/build/cjs/components/CardBase/CardBase.js +7 -3
  17. package/build/cjs/components/Control/Control.css +8 -0
  18. package/build/cjs/components/FileLink/FileLink.css +8 -0
  19. package/build/cjs/components/FullscreenImage/FullscreenImage.css +20 -1
  20. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -6
  21. package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +4 -0
  22. package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +2 -2
  23. package/build/cjs/components/Link/Link.css +8 -0
  24. package/build/cjs/components/Media/Image/Image.js +1 -1
  25. package/build/cjs/components/Media/Video/Video.js +1 -1
  26. package/build/cjs/components/OverflowScroller/OverflowScroller.css +19 -0
  27. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -1
  28. package/build/cjs/components/OverflowScroller/i18n/en.json +4 -0
  29. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +2 -0
  30. package/build/cjs/components/OverflowScroller/i18n/index.js +8 -0
  31. package/build/cjs/components/OverflowScroller/i18n/ru.json +4 -0
  32. package/build/cjs/components/ReactPlayer/CustomBarControls.css +6 -4
  33. package/build/cjs/components/ReactPlayer/ReactPlayer.css +7 -0
  34. package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +2 -1
  35. package/build/cjs/components/ReactPlayer/ReactPlayer.js +16 -8
  36. package/build/cjs/components/Table/Table.css +1 -1
  37. package/build/cjs/components/Title/TitleItem.css +8 -0
  38. package/build/cjs/components/VideoBlock/VideoBlock.css +7 -0
  39. package/build/cjs/containers/PageConstructor/PageConstructor.css +12 -1
  40. package/build/cjs/models/components.d.ts +1 -2
  41. package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
  42. package/build/cjs/sub-blocks/BannerCard/BannerCard.css +3 -0
  43. package/build/cjs/sub-blocks/Content/Content.css +3 -0
  44. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +42 -4
  45. package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
  46. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
  47. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  48. package/build/esm/blocks/ContentLayout/ContentLayout.css +3 -0
  49. package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
  50. package/build/esm/blocks/Header/Header.css +15 -0
  51. package/build/esm/blocks/Header/Header.js +6 -2
  52. package/build/esm/blocks/Header/schema.d.ts +8 -0
  53. package/build/esm/blocks/Header/schema.js +4 -0
  54. package/build/esm/blocks/HeaderSlider/schema.d.ts +4 -0
  55. package/build/esm/blocks/Icons/Icons.css +10 -0
  56. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
  57. package/build/esm/blocks/Slider/Arrow/Arrow.css +7 -0
  58. package/build/esm/blocks/Slider/Slider.js +12 -6
  59. package/build/esm/components/Button/Button.css +6 -0
  60. package/build/esm/components/ButtonTabs/ButtonTabs.css +3 -0
  61. package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
  62. package/build/esm/components/CardBase/CardBase.d.ts +1 -2
  63. package/build/esm/components/CardBase/CardBase.js +6 -2
  64. package/build/esm/components/Control/Control.css +8 -0
  65. package/build/esm/components/FileLink/FileLink.css +8 -0
  66. package/build/esm/components/FullscreenImage/FullscreenImage.css +20 -1
  67. package/build/esm/components/FullscreenImage/FullscreenImage.js +3 -6
  68. package/build/esm/components/FullscreenMedia/FullscreenMedia.css +4 -0
  69. package/build/esm/components/FullscreenMedia/FullscreenMedia.js +3 -3
  70. package/build/esm/components/Link/Link.css +8 -0
  71. package/build/esm/components/Media/Image/Image.js +2 -2
  72. package/build/esm/components/Media/Video/Video.js +1 -1
  73. package/build/esm/components/OverflowScroller/OverflowScroller.css +19 -0
  74. package/build/esm/components/OverflowScroller/OverflowScroller.js +2 -1
  75. package/build/esm/components/OverflowScroller/i18n/en.json +4 -0
  76. package/build/esm/components/OverflowScroller/i18n/index.d.ts +2 -0
  77. package/build/esm/components/OverflowScroller/i18n/index.js +5 -0
  78. package/build/esm/components/OverflowScroller/i18n/ru.json +4 -0
  79. package/build/esm/components/ReactPlayer/CustomBarControls.css +6 -4
  80. package/build/esm/components/ReactPlayer/ReactPlayer.css +7 -0
  81. package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +2 -1
  82. package/build/esm/components/ReactPlayer/ReactPlayer.js +16 -8
  83. package/build/esm/components/Table/Table.css +1 -1
  84. package/build/esm/components/Title/TitleItem.css +8 -0
  85. package/build/esm/components/VideoBlock/VideoBlock.css +7 -0
  86. package/build/esm/containers/PageConstructor/PageConstructor.css +12 -1
  87. package/build/esm/models/components.d.ts +1 -2
  88. package/build/esm/models/constructor-items/blocks.d.ts +1 -0
  89. package/build/esm/sub-blocks/BannerCard/BannerCard.css +3 -0
  90. package/build/esm/sub-blocks/Content/Content.css +3 -0
  91. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +42 -4
  92. package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
  93. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
  94. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  95. package/package.json +3 -3
  96. package/server/models/components.d.ts +1 -2
  97. package/server/models/constructor-items/blocks.d.ts +1 -0
  98. package/styles/mixins.scss +20 -0
  99. package/styles/root.scss +6 -0
  100. package/styles/styles.css +8 -1
  101. package/styles/yfm.scss +3 -1
  102. package/widget/index.js +1 -1
@@ -4,6 +4,7 @@ unpredictable css rules order in build */
4
4
  display: flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
+ border-radius: var(--g-focus-border-radius);
7
8
  transition: color 0.2s;
8
9
  display: inline-block;
9
10
  margin: 0;
@@ -25,6 +26,13 @@ unpredictable css rules order in build */
25
26
  .utilityfocus .pc-control:focus {
26
27
  outline: 2px solid #ffdb4d;
27
28
  }
29
+ .pc-control:focus {
30
+ outline: 2px solid var(--g-color-line-focus);
31
+ outline-offset: 0;
32
+ }
33
+ .pc-control:focus:not(:focus-visible) {
34
+ outline: 0;
35
+ }
28
36
  .pc-control_size_xs {
29
37
  width: 24px;
30
38
  height: 24px;
@@ -19,6 +19,14 @@ unpredictable css rules order in build */
19
19
  }
20
20
  .pc-file-link__link > a {
21
21
  color: var(--g-color-text-primary);
22
+ border-radius: var(--g-focus-border-radius);
23
+ }
24
+ .pc-file-link__link > a:focus {
25
+ outline: 2px solid var(--g-color-line-focus);
26
+ outline-offset: 0;
27
+ }
28
+ .pc-file-link__link > a:focus:not(:focus-visible) {
29
+ outline: 0;
22
30
  }
23
31
  .pc-file-link__link > a:hover {
24
32
  color: var(--g-color-text-secondary);
@@ -6,6 +6,9 @@ unpredictable css rules order in build */
6
6
  .pc-fullscreen-image__image-wrapper {
7
7
  position: relative;
8
8
  }
9
+ .pc-fullscreen-image__image-wrapper:hover .pc-fullscreen-image__icon-wrapper {
10
+ opacity: 1;
11
+ }
9
12
  .pc-fullscreen-image__modal-content {
10
13
  position: relative;
11
14
  }
@@ -19,6 +22,15 @@ unpredictable css rules order in build */
19
22
  border-radius: var(--pc-border-radius);
20
23
  }
21
24
  .pc-fullscreen-image__icon-wrapper {
25
+ display: inline-block;
26
+ margin: 0;
27
+ padding: 0;
28
+ font: inherit;
29
+ border: none;
30
+ outline: none;
31
+ color: inherit;
32
+ background: none;
33
+ cursor: pointer;
22
34
  display: flex;
23
35
  align-items: center;
24
36
  justify-content: center;
@@ -33,7 +45,14 @@ unpredictable css rules order in build */
33
45
  opacity: 0;
34
46
  transition: 0.3s;
35
47
  }
36
- .pc-fullscreen-image__icon-wrapper_visible {
48
+ .pc-fullscreen-image__icon-wrapper:focus {
49
+ outline: 2px solid var(--g-color-line-focus);
50
+ outline-offset: 0;
51
+ }
52
+ .pc-fullscreen-image__icon-wrapper:focus:not(:focus-visible) {
53
+ outline: 0;
54
+ }
55
+ .pc-fullscreen-image__icon-wrapper:focus {
37
56
  opacity: 1;
38
57
  }
39
58
  .pc-fullscreen-image__icon {
@@ -11,19 +11,16 @@ const CLOSE_ICON_SIZE = 30;
11
11
  const FullscreenImage = (props) => {
12
12
  const { imageClassName, modalImageClass, imageStyle, alt = i18n('img-alt') } = props;
13
13
  const [isOpened, setIsOpened] = useState(false);
14
- const [isMouseEnter, setIsMouseEnter] = useState(false);
15
14
  const openModal = () => setIsOpened(true);
16
15
  const closeModal = () => setIsOpened(false);
17
- const showFullscreenIcon = () => setIsMouseEnter(true);
18
- const hideFullscreenIcon = () => setIsMouseEnter(false);
19
16
  return (React.createElement("div", { className: b() },
20
- React.createElement("div", { className: b('image-wrapper'), onMouseEnter: showFullscreenIcon, onMouseLeave: hideFullscreenIcon },
17
+ React.createElement("div", { className: b('image-wrapper') },
21
18
  React.createElement(Image, Object.assign({}, props, { alt: alt, className: b('image', imageClassName), onClick: openModal, style: imageStyle })),
22
- React.createElement("div", { className: b('icon-wrapper', { visible: isMouseEnter }), onClick: openModal },
19
+ React.createElement("button", { className: b('icon-wrapper'), onClick: openModal },
23
20
  React.createElement(Icon, { data: Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') }))),
24
21
  isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
25
22
  React.createElement("div", { className: b('modal-content') },
26
- React.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal, "aria-label": i18n('close') },
23
+ React.createElement("button", { className: b('icon-wrapper', { visible: true }), onClick: closeModal, "aria-label": i18n('close') },
27
24
  React.createElement(Icon, { data: PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
28
25
  React.createElement(Image, Object.assign({}, props, { className: b('modal-image', modalImageClass) })))))));
29
26
  };
@@ -50,6 +50,10 @@ unpredictable css rules order in build */
50
50
  transition: opacity 0.3s;
51
51
  pointer-events: none;
52
52
  }
53
+ .pc-full-screen-media__modal-content .pc-full-screen-media__icon-wrapper_visible, .pc-full-screen-media__modal-content .pc-full-screen-media__icon-wrapper:focus, .pc-full-screen-media__media-wrapper .pc-full-screen-media__icon-wrapper_visible, .pc-full-screen-media__media-wrapper .pc-full-screen-media__icon-wrapper:focus {
54
+ opacity: 1;
55
+ pointer-events: inherit;
56
+ }
53
57
  .pc-full-screen-media__modal-content:hover .pc-full-screen-media__icon-wrapper, .pc-full-screen-media__media-wrapper:hover .pc-full-screen-media__icon-wrapper {
54
58
  opacity: 1;
55
59
  pointer-events: inherit;
@@ -1,5 +1,5 @@
1
1
  import React, { useContext, useState } from 'react';
2
- import { Icon, Modal } from '@gravity-ui/uikit';
2
+ import { Button, Icon, Modal } from '@gravity-ui/uikit';
3
3
  import { MobileContext } from '../../context/mobileContext';
4
4
  import { Fullscreen, PreviewClose } from '../../icons';
5
5
  import { block } from '../../utils';
@@ -22,11 +22,11 @@ const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
22
22
  return (React.createElement("div", { className: b() },
23
23
  React.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal },
24
24
  children({ className: b('inline-media') }),
25
- showFullscreenIcon && (React.createElement("div", { className: b('icon-wrapper'), onClickCapture: openModal },
25
+ showFullscreenIcon && (React.createElement(Button, { className: b('icon-wrapper'), extraProps: { onClickCapture: openModal }, size: 'l' },
26
26
  React.createElement(Icon, { data: Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
27
27
  isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
28
28
  React.createElement("div", { className: b('modal-content') },
29
- React.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal },
29
+ React.createElement(Button, { className: b('icon-wrapper', { visible: true }), onClick: closeModal, size: 'l' },
30
30
  React.createElement(Icon, { data: PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
31
31
  children({
32
32
  imageClassName: getMediaClass('image'),
@@ -10,6 +10,7 @@ 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);
13
14
  }
14
15
  .utilityfocus .pc-link-block__link:focus {
15
16
  outline: 2px solid #ffdb4d;
@@ -18,6 +19,13 @@ unpredictable css rules order in build */
18
19
  --pc-text-header-color: var(--g-color-text-link-hover);
19
20
  color: var(--g-color-text-link-hover);
20
21
  }
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
+ }
21
29
  .pc-link-block__link_theme_dark {
22
30
  color: var(--g-color-text-light-primary);
23
31
  }
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { Fragment, 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) => fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))));
53
+ return (React.createElement(SliderBlock, { slidesToShow: 1, type: SliderType.MediaCard }, imageArray.map((item, index) => (React.createElement(Fragment, { key: index }, fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))))));
54
54
  };
55
55
  if (Array.isArray(image)) {
56
56
  return imageSlider(image);
@@ -30,7 +30,7 @@ const Video = (props) => {
30
30
  }, [playVideo, video, setHasVideoFallback]);
31
31
  const reactPlayerBlock = useMemo(() => {
32
32
  const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, } = video;
33
- return (React.createElement(ReactPlayerBlock, { className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, metrika: metrika, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
33
+ return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, metrika: metrika, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
34
34
  }, [
35
35
  video,
36
36
  height,
@@ -1,3 +1,5 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
1
3
  .pc-overflow-scroller {
2
4
  display: flex;
3
5
  align-items: center;
@@ -19,6 +21,15 @@
19
21
  transition: left 0.6s;
20
22
  }
21
23
  .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;
22
33
  position: absolute;
23
34
  z-index: 10;
24
35
  top: 0;
@@ -29,6 +40,14 @@
29
40
  height: calc(100% - 1px);
30
41
  cursor: pointer;
31
42
  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;
32
51
  }
33
52
  .pc-overflow-scroller__arrow_type_left {
34
53
  left: 0;
@@ -2,6 +2,7 @@ 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';
5
6
  import './OverflowScroller.css';
6
7
  const b = block('overflow-scroller');
7
8
  const TRANSITION_TIME = 300;
@@ -82,7 +83,7 @@ export default class OverflowScroller extends React.Component {
82
83
  }) },
83
84
  React.createElement("div", { className: b(null, className), ref: this.containerRef },
84
85
  React.createElement("div", { className: b('wrapper'), style: wrapperStyle, ref: this.wrapperRef }, children)),
85
- arrows.map((direction) => (React.createElement("div", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction) },
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) },
86
87
  React.createElement(ToggleArrow, { size: arrowSize, type: 'horizontal', iconType: "navigation" }))))));
87
88
  }
88
89
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "left": "Previous",
3
+ "right": "Next"
4
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (key: string, params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { registerKeyset } from '../../../utils/registerKeyset';
2
+ import en from './en.json';
3
+ import ru from './ru.json';
4
+ const COMPONENT = 'OverflowScroller';
5
+ export default registerKeyset({ en, ru }, COMPONENT);
@@ -0,0 +1,4 @@
1
+ {
2
+ "left": "Предыдущий",
3
+ "right": "Следующий"
4
+ }
@@ -56,10 +56,11 @@ unpredictable css rules order in build */
56
56
  background: #eff2f8;
57
57
  }
58
58
  .pc-CustomBarControls__button_type_with-mute-button:focus {
59
- outline: 2px solid var(--g-color-line-misc);
59
+ outline: 2px solid var(--g-color-line-focus);
60
+ outline-offset: 0;
60
61
  }
61
62
  .pc-CustomBarControls__button_type_with-mute-button:focus:not(:focus-visible) {
62
- outline: none;
63
+ outline: 0;
63
64
  }
64
65
  .pc-CustomBarControls__button_type_with-play-pause-button {
65
66
  width: 42px;
@@ -68,10 +69,11 @@ unpredictable css rules order in build */
68
69
  background: var(--g-color-base-background);
69
70
  }
70
71
  .pc-CustomBarControls__button_type_with-play-pause-button:focus {
71
- outline: 2px solid var(--g-color-line-misc);
72
+ outline: 2px solid var(--g-color-line-focus);
73
+ outline-offset: 0;
72
74
  }
73
75
  .pc-CustomBarControls__button_type_with-play-pause-button:focus:not(:focus-visible) {
74
- outline: none;
76
+ outline: 0;
75
77
  }
76
78
  .pc-CustomBarControls__play-icon_type_with-play-pause-button {
77
79
  height: 16px;
@@ -27,6 +27,13 @@ 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
+ }
30
37
  .pc-ReactPlayer__button_theme_blue {
31
38
  color: var(--g-color-base-background);
32
39
  background-color: var(--g-color-base-brand);
@@ -12,5 +12,6 @@ export interface ReactPlayerBlockProps extends Omit<MediaVideoProps, 'loop' | 's
12
12
  ratio?: number;
13
13
  children?: React.ReactNode;
14
14
  }
15
- export declare const ReactPlayerBlock: React.ForwardRefExoticComponent<ReactPlayerBlockProps & React.RefAttributes<ReactPlayerBlockHandler>>;
15
+ type ReactPlayerBlockRefType = ReactPlayerBlockHandler | undefined;
16
+ export declare const ReactPlayerBlock: React.ForwardRefExoticComponent<ReactPlayerBlockProps & React.RefAttributes<ReactPlayerBlockRefType>>;
16
17
  export default ReactPlayerBlock;
@@ -45,9 +45,18 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
45
45
  return [];
46
46
  }, [analyticsEvents]);
47
47
  const handleAnalytics = useAnalytics(DefaultEventNames.ReactPlayerControls);
48
- useImperativeHandle(originRef, () => ({
49
- pause: () => setIsPlaying(false),
50
- }));
48
+ useImperativeHandle(originRef, () => {
49
+ if (!playerRef) {
50
+ return;
51
+ }
52
+ const { play, pause, addEventListener } = playerRef.getInternalPlayer();
53
+ // eslint-disable-next-line consistent-return
54
+ return {
55
+ play,
56
+ pause,
57
+ addEventListener,
58
+ };
59
+ }, [playerRef]);
51
60
  useEffect(() => {
52
61
  if (ref.current && !(playingVideoRef === null || playingVideoRef === void 0 ? void 0 : playingVideoRef.contains(ref.current))) {
53
62
  setMuted(true);
@@ -210,19 +219,18 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
210
219
  }, [changeMute, customControlsType, muted, onPlayClick]);
211
220
  const onFocusIn = useCallback(() => setHovered(true), []);
212
221
  const onFocusOut = useCallback(() => setHovered(false), []);
213
- const isPipEnabled = !isMobile || !props.autoplay;
214
222
  return (React.createElement("div", { className: b({
215
223
  wrapper: !currentHeight,
216
224
  controls,
217
225
  }, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (React.createElement(Fragment, null,
218
226
  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
219
227
  ? undefined
220
- : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, config: {
228
+ : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, previewTabIndex: -1, config: {
221
229
  file: {
222
230
  attributes: {
223
- pip: isPipEnabled ? undefined : 'false',
224
- playsinline: isPipEnabled ? undefined : '',
225
- disablepictureinpicture: isPipEnabled ? undefined : '',
231
+ pip: isMobile ? 'false' : undefined,
232
+ playsinline: isMobile ? '' : undefined,
233
+ disablepictureinpicture: isMobile ? '' : undefined,
226
234
  },
227
235
  },
228
236
  } }),
@@ -13,7 +13,7 @@ unpredictable css rules order in build */
13
13
  display: flex;
14
14
  }
15
15
  .pc-table__row:first-child {
16
- font-weight: 500;
16
+ font-weight: var(--g-text-accent-font-weight);
17
17
  }
18
18
  .pc-table__row:first-child .pc-table__cell {
19
19
  border-bottom-color: var(--g-color-line-generic-active);
@@ -62,11 +62,19 @@ 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);
65
66
  }
66
67
  .pc-title-item__link:hover, .pc-title-item__link:active {
67
68
  --pc-text-header-color: inherit;
68
69
  color: inherit;
69
70
  }
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
+ }
70
78
  .pc-title-item__link:hover {
71
79
  cursor: pointer;
72
80
  }
@@ -43,6 +43,13 @@ 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
+ }
46
53
  .pc-VideoBlock__icon {
47
54
  margin-left: 6px;
48
55
  }
@@ -35,18 +35,22 @@ unpredictable css rules order in build */
35
35
  --pc-selected-tab-item-background-color-hover: var(
36
36
  --pc-monochrome-button-background-color-hover
37
37
  );
38
+ --pc-color-line-focus-light: var(--g-color-text-brand);
39
+ --pc-color-line-focus-dark: var(--g-color-text-light-primary);
38
40
  }
39
41
  .g-root_theme_light {
40
42
  --pc-color-base-silver: #eff2f8;
41
43
  --pc-color-base-gold: #ffdb4d;
42
44
  --pc-color-base-asphalt: #313538;
43
45
  --pc-color-base-copper: #ffe6c4;
46
+ --g-color-line-focus: var(--pc-color-line-focus-light);
44
47
  }
45
48
  .g-root_theme_dark {
46
49
  --pc-color-base-silver: #bcc0c4;
47
50
  --pc-color-base-gold: #ffde5d;
48
51
  --pc-color-base-asphalt: #474d52;
49
52
  --pc-color-base-copper: #7f7262;
53
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
50
54
  }
51
55
  .g-root.g-root_theme_dark {
52
56
  --pc-color-sfx-shadow: var(--g-color-sfx-shadow);
@@ -95,7 +99,7 @@ unpredictable css rules order in build */
95
99
  margin: 0 0 12px;
96
100
  }
97
101
  .yfm_constructor.yfm_constructor p strong {
98
- font-weight: 500;
102
+ font-weight: var(--g-text-accent-font-weight);
99
103
  }
100
104
  .yfm_constructor.yfm_constructor_size_s ul,
101
105
  .yfm_constructor.yfm_constructor_size_s ol,
@@ -124,6 +128,7 @@ unpredictable css rules order in build */
124
128
  color: var(--g-color-text-link);
125
129
  text-decoration: none;
126
130
  cursor: pointer;
131
+ border-radius: var(--g-focus-border-radius);
127
132
  }
128
133
  .utilityfocus .yfm_constructor a:focus {
129
134
  outline: 2px solid #ffdb4d;
@@ -132,6 +137,12 @@ unpredictable css rules order in build */
132
137
  --pc-text-header-color: var(--g-color-text-link-hover);
133
138
  color: var(--g-color-text-link-hover);
134
139
  }
140
+ .yfm_constructor a:focus {
141
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
142
+ }
143
+ .yfm_constructor a:focus:not(:focus-visible) {
144
+ box-shadow: none;
145
+ }
135
146
  .yfm_constructor table {
136
147
  color: var(--g-color-text-primary);
137
148
  border: 1px solid var(--g-color-line-generic);
@@ -1,4 +1,3 @@
1
1
  export type ArrowDirection = 'left' | 'right';
2
- export interface ReactPlayerBlockHandler {
3
- pause: () => void;
2
+ export interface ReactPlayerBlockHandler extends Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> {
4
3
  }
@@ -103,6 +103,7 @@ export interface HeaderBlockProps {
103
103
  offset?: HeaderOffset;
104
104
  image?: ThemedImage;
105
105
  video?: ThemedMediaVideoProps;
106
+ mediaView?: 'fit' | 'full';
106
107
  background?: ThemedHeaderBlockBackground;
107
108
  theme?: 'light' | 'dark';
108
109
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
@@ -4,6 +4,9 @@
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(--pc-color-line-focus-dark);
9
+ }
7
10
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__title,
8
11
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__subtitle {
9
12
  color: var(--g-color-text-light-primary);
@@ -91,6 +91,9 @@ 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(--pc-color-line-focus-dark);
96
+ }
94
97
  .pc-content_theme_dark .pc-content__title *,
95
98
  .pc-content_theme_dark .pc-content__text .yfm,
96
99
  .pc-content_theme_dark .pc-content__text .yfm *,
@@ -1,5 +1,8 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
+ .pc-hubspot-form {
4
+ --g-color-line-focus: var(--pc-color-line-focus-light);
5
+ }
3
6
  .pc-hubspot-form .submitted-message {
4
7
  padding-left: 10px;
5
8
  }
@@ -10,6 +13,7 @@ unpredictable css rules order in build */
10
13
  .pc-hubspot-form .hs-form-field > label {
11
14
  color: var(--g-color-text-primary);
12
15
  font-size: var(--g-text-body-2-font-size);
16
+ line-height: var(--g-text-body-2-line-height);
13
17
  display: flex;
14
18
  width: 200px;
15
19
  max-width: 100%;
@@ -77,7 +81,7 @@ unpredictable css rules order in build */
77
81
  .pc-hubspot-form .hs-form-field .input input[type=tel]:focus,
78
82
  .pc-hubspot-form .hs-form-field .input input[type=email]:focus,
79
83
  .pc-hubspot-form .hs-form-field .input textarea:focus {
80
- border: 2px solid var(--g-color-base-brand);
84
+ border: 2px solid var(--g-color-line-focus);
81
85
  outline: none;
82
86
  }
83
87
  .pc-hubspot-form .hs-form-field .input textarea {
@@ -97,7 +101,7 @@ unpredictable css rules order in build */
97
101
  padding-right: 30px;
98
102
  }
99
103
  .pc-hubspot-form .hs-form-field .input select:focus {
100
- border: 1px solid var(--g-color-line-generic-active);
104
+ border: 1px solid var(--g-color-line-focus);
101
105
  }
102
106
  .pc-hubspot-form .hs-form-field .input .hs-fieldtype-intl-phone.hs-input .hs-input {
103
107
  float: none;
@@ -139,7 +143,7 @@ unpredictable css rules order in build */
139
143
  .pc-hubspot-form .hs-form-field .hs-form-radio-display span:not(.hs-form-required) {
140
144
  color: var(--g-color-text-primary);
141
145
  font-size: var(--g-text-body-2-font-size);
142
- line-height: 16px;
146
+ line-height: var(--g-text-body-2-line-height);
143
147
  padding-left: 7px;
144
148
  margin: 0;
145
149
  flex-grow: 1;
@@ -187,6 +191,10 @@ unpredictable css rules order in build */
187
191
  .pc-hubspot-form .hs-form-field .hs-form-checkbox-display input:checked ~ span:before {
188
192
  background-color: #ffeba0;
189
193
  }
194
+ .pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display input[type=checkbox]:focus ~ span::before,
195
+ .pc-hubspot-form .hs-form-field .hs-form-checkbox-display input[type=checkbox]:focus ~ span::before {
196
+ outline: 2px solid var(--g-color-line-focus);
197
+ }
190
198
  .pc-hubspot-form .hs-form-field .hs-form-radio-display span:before {
191
199
  content: "";
192
200
  position: absolute;
@@ -229,7 +237,17 @@ unpredictable css rules order in build */
229
237
  font-size: var(--g-text-body-2-font-size);
230
238
  line-height: var(--g-text-body-2-line-height);
231
239
  font-weight: var(--g-text-body-font-weight);
232
- margin: 0 0 20px;
240
+ margin: 20px 0;
241
+ }
242
+ .pc-hubspot-form .hs-richtext a:focus {
243
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
244
+ }
245
+ .pc-hubspot-form .hs-richtext a:focus:not(:focus-visible) {
246
+ box-shadow: none;
247
+ }
248
+ .pc-hubspot-form .hs-richtext a:focus {
249
+ outline: 0;
250
+ border-radius: var(--g-focus-border-radius);
233
251
  }
234
252
  .pc-hubspot-form .hs_error_rollup {
235
253
  padding-left: 10px;
@@ -238,6 +256,9 @@ unpredictable css rules order in build */
238
256
  font-weight: var(--g-text-body-font-weight);
239
257
  color: var(--g-color-text-danger);
240
258
  }
259
+ .pc-hubspot-form .legal-consent-container {
260
+ padding-top: 8px;
261
+ }
241
262
  .pc-hubspot-form .inputs-list {
242
263
  list-style: none;
243
264
  padding: 0;
@@ -301,9 +322,23 @@ unpredictable css rules order in build */
301
322
  white-space: nowrap;
302
323
  appearance: none;
303
324
  }
325
+ .pc-hubspot-form .hs-button.primary:focus {
326
+ outline: 2px solid var(--g-color-line-focus);
327
+ outline-offset: 1px;
328
+ }
329
+ .pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
330
+ outline: 0;
331
+ }
304
332
  .pc-hubspot-form .hs-button.primary:hover {
305
333
  background-color: var(--g-color-base-brand-hover);
306
334
  }
335
+ .pc-hubspot-form .hs-button.primary:focus {
336
+ outline: 2px solid var(--g-color-line-focus);
337
+ outline-offset: 1px;
338
+ }
339
+ .pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
340
+ outline: 0;
341
+ }
307
342
  .pc-hubspot-form .grecaptcha-badge {
308
343
  box-shadow: none !important;
309
344
  border: 1px solid var(--g-color-line-generic);
@@ -355,6 +390,9 @@ unpredictable css rules order in build */
355
390
  .pc-hubspot-form_mobile .hs-button.primary {
356
391
  width: 80%;
357
392
  }
393
+ .pc-hubspot-form_theme_dark {
394
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
395
+ }
358
396
  .pc-hubspot-form_theme_dark .hs-form-field .input select {
359
397
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMSIgaGVpZ2h0PSI2IiB2aWV3Qm94PSIwIDAgMTEgNiIgZmlsbD0ibm9uZSI+CiAgICA8cGF0aCBkPSJNMTAuMDggMEw1LjUgNC4zNi45MSAwIDAgLjg2bDUuNSA1LjI1TDExIC44NnoiIGZpbGw9IiNmZmZmZmYiLz4KPC9zdmc+Cg==");
360
398
  }
@@ -16,7 +16,7 @@ unpredictable css rules order in build */
16
16
  line-height: var(--g-text-body-1-line-height);
17
17
  }
18
18
  .pc-price-description__main-title {
19
- font-weight: 500;
19
+ font-weight: var(--g-text-accent-font-weight);
20
20
  }
21
21
  .pc-price-description__main-title_color_cornflower {
22
22
  color: var(--g-color-base-brand);