@gravity-ui/page-constructor 4.28.0-alpha.0 → 4.28.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.
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +3 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/cjs/blocks/Header/Header.css +12 -0
- package/build/cjs/blocks/Header/Header.js +6 -2
- package/build/cjs/blocks/Header/schema.d.ts +8 -0
- package/build/cjs/blocks/Header/schema.js +4 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +4 -0
- package/build/cjs/blocks/Icons/Icons.css +10 -0
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +7 -0
- package/build/cjs/blocks/Slider/Slider.js +12 -6
- package/build/cjs/components/Button/Button.css +6 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +3 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +1 -2
- package/build/cjs/components/CardBase/CardBase.js +7 -3
- package/build/cjs/components/Control/Control.css +8 -0
- package/build/cjs/components/FileLink/FileLink.css +8 -0
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +20 -1
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -6
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +4 -0
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +1 -1
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +4 -2
- package/build/cjs/components/Link/Link.css +8 -0
- package/build/cjs/components/Media/Image/Image.js +1 -1
- package/build/cjs/components/Media/Media.d.ts +1 -0
- package/build/cjs/components/Media/Media.js +3 -2
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +19 -0
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -1
- package/build/cjs/components/OverflowScroller/i18n/en.json +4 -0
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +2 -0
- package/build/cjs/components/OverflowScroller/i18n/index.js +8 -0
- package/build/cjs/components/OverflowScroller/i18n/ru.json +4 -0
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +6 -4
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +7 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +4 -4
- package/build/cjs/components/Table/Table.css +1 -1
- package/build/cjs/components/Title/TitleItem.css +8 -0
- package/build/cjs/components/VideoBlock/VideoBlock.css +7 -0
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +3 -3
- package/build/cjs/containers/PageConstructor/PageConstructor.css +12 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +3 -0
- package/build/cjs/sub-blocks/Content/Content.css +3 -0
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +42 -4
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +3 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/esm/blocks/Header/Header.css +12 -0
- package/build/esm/blocks/Header/Header.js +6 -2
- package/build/esm/blocks/Header/schema.d.ts +8 -0
- package/build/esm/blocks/Header/schema.js +4 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +4 -0
- package/build/esm/blocks/Icons/Icons.css +10 -0
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
- package/build/esm/blocks/Slider/Arrow/Arrow.css +7 -0
- package/build/esm/blocks/Slider/Slider.js +12 -6
- package/build/esm/components/Button/Button.css +6 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.css +3 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/esm/components/CardBase/CardBase.d.ts +1 -2
- package/build/esm/components/CardBase/CardBase.js +6 -2
- package/build/esm/components/Control/Control.css +8 -0
- package/build/esm/components/FileLink/FileLink.css +8 -0
- package/build/esm/components/FullscreenImage/FullscreenImage.css +20 -1
- package/build/esm/components/FullscreenImage/FullscreenImage.js +3 -6
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +4 -0
- package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +1 -1
- package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -3
- package/build/esm/components/Link/Link.css +8 -0
- package/build/esm/components/Media/Image/Image.js +2 -2
- package/build/esm/components/Media/Media.d.ts +1 -0
- package/build/esm/components/Media/Media.js +3 -2
- package/build/esm/components/OverflowScroller/OverflowScroller.css +19 -0
- package/build/esm/components/OverflowScroller/OverflowScroller.js +2 -1
- package/build/esm/components/OverflowScroller/i18n/en.json +4 -0
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +2 -0
- package/build/esm/components/OverflowScroller/i18n/index.js +5 -0
- package/build/esm/components/OverflowScroller/i18n/ru.json +4 -0
- package/build/esm/components/ReactPlayer/CustomBarControls.css +6 -4
- package/build/esm/components/ReactPlayer/ReactPlayer.css +7 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -4
- package/build/esm/components/Table/Table.css +1 -1
- package/build/esm/components/Title/TitleItem.css +8 -0
- package/build/esm/components/VideoBlock/VideoBlock.css +7 -0
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +3 -3
- package/build/esm/containers/PageConstructor/PageConstructor.css +12 -1
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +3 -0
- package/build/esm/sub-blocks/Content/Content.css +3 -0
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +42 -4
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/package.json +3 -3
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/styles/mixins.scss +20 -0
- package/styles/root.scss +6 -0
- package/styles/styles.css +8 -1
- package/styles/yfm.scss +3 -1
- package/widget/index.js +1 -1
|
@@ -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);
|
|
@@ -219,12 +219,12 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
219
219
|
}, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (react_1.default.createElement(react_1.Fragment, null,
|
|
220
220
|
react_1.default.createElement(react_player_1.default, { className: b('player'), url: videoSrc, muted: muted, controls: controls === models_1.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 !== models_1.CustomControlsType.WithMuteButton
|
|
221
221
|
? undefined
|
|
222
|
-
: onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, config: {
|
|
222
|
+
: onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, previewTabIndex: -1, config: {
|
|
223
223
|
file: {
|
|
224
224
|
attributes: {
|
|
225
|
-
pip:
|
|
226
|
-
playsinline:
|
|
227
|
-
disablepictureinpicture:
|
|
225
|
+
pip: isMobile ? 'false' : undefined,
|
|
226
|
+
playsinline: isMobile ? '' : undefined,
|
|
227
|
+
disablepictureinpicture: isMobile ? '' : undefined,
|
|
228
228
|
},
|
|
229
229
|
},
|
|
230
230
|
} }),
|
|
@@ -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:
|
|
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
|
}
|
|
@@ -15,6 +15,7 @@ export interface VideoBlockProps extends AnalyticsEventsBase {
|
|
|
15
15
|
playButton?: React.ReactNode;
|
|
16
16
|
height?: number;
|
|
17
17
|
fullscreen?: boolean;
|
|
18
|
+
autoplay?: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
|
|
20
21
|
export default VideoBlock;
|
|
@@ -41,7 +41,7 @@ function getHeight(width) {
|
|
|
41
41
|
}
|
|
42
42
|
exports.getHeight = getHeight;
|
|
43
43
|
const VideoBlock = (props) => {
|
|
44
|
-
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, } = props;
|
|
44
|
+
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, autoplay, } = props;
|
|
45
45
|
const handleAnalytics = (0, useAnalytics_1.useAnalytics)(common_1.DefaultEventNames.VideoPreview);
|
|
46
46
|
const src = getVideoSrc(stream, record);
|
|
47
47
|
const ref = (0, react_1.useRef)(null);
|
|
@@ -75,7 +75,7 @@ const VideoBlock = (props) => {
|
|
|
75
75
|
const iframe = document.createElement('iframe');
|
|
76
76
|
iframe.id = fullId;
|
|
77
77
|
if (!previewImg) {
|
|
78
|
-
iframe.src = `${src}?${(0, utils_1.getPageSearchParams)(attributes || {})}`;
|
|
78
|
+
iframe.src = `${src}?${(0, utils_1.getPageSearchParams)(Object.assign(Object.assign({}, (attributes || {})), (autoplay ? exports.AUTOPLAY_ATTRIBUTES : {})))}`;
|
|
79
79
|
}
|
|
80
80
|
iframe.width = '100%';
|
|
81
81
|
iframe.height = '100%';
|
|
@@ -87,7 +87,7 @@ const VideoBlock = (props) => {
|
|
|
87
87
|
ref.current.appendChild(iframe);
|
|
88
88
|
iframeRef.current = iframe;
|
|
89
89
|
}
|
|
90
|
-
}, [stream, record, norender, src, fullId, attributes, iframeRef, previewImg]);
|
|
90
|
+
}, [stream, record, norender, src, fullId, attributes, iframeRef, previewImg, autoplay]);
|
|
91
91
|
(0, react_1.useEffect)(() => {
|
|
92
92
|
setHidePreview(false);
|
|
93
93
|
}, [src, setHidePreview]);
|
|
@@ -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:
|
|
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);
|
|
@@ -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-
|
|
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-
|
|
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:
|
|
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:
|
|
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:
|
|
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);
|
|
@@ -23,11 +23,29 @@ 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;
|
|
26
37
|
cursor: pointer;
|
|
27
38
|
display: flex;
|
|
39
|
+
align-items: center;
|
|
28
40
|
font-weight: 400;
|
|
29
|
-
|
|
30
|
-
|
|
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;
|
|
31
49
|
}
|
|
32
50
|
.pc-price-details__foldable_title_color_cornflower {
|
|
33
51
|
color: var(--g-color-text-link);
|
|
@@ -28,7 +28,7 @@ const PriceDetails = (props) => {
|
|
|
28
28
|
return react_1.default.createElement("div", { className: b('foldable_block') }, getPriceDetails());
|
|
29
29
|
};
|
|
30
30
|
const getFoldableTitle = () => {
|
|
31
|
-
return (react_1.default.createElement("
|
|
31
|
+
return (react_1.default.createElement("button", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen, "aria-expanded": isOpened },
|
|
32
32
|
foldableTitle,
|
|
33
33
|
react_1.default.createElement(components_1.ToggleArrow, { open: isOpened, size: 14, type: 'vertical', className: b('arrow') })));
|
|
34
34
|
};
|
|
@@ -49,6 +49,9 @@ unpredictable css rules order in build */
|
|
|
49
49
|
.pc-content-layout-block_background {
|
|
50
50
|
padding: 64px;
|
|
51
51
|
}
|
|
52
|
+
.pc-content-layout-block_theme_dark {
|
|
53
|
+
--g-color-line-focus: var(--pc-color-line-focus-dark);
|
|
54
|
+
}
|
|
52
55
|
@media (max-width: 577px) {
|
|
53
56
|
.pc-content-layout-block_background {
|
|
54
57
|
padding: 32px;
|
|
@@ -30,7 +30,7 @@ export const ContentLayoutBlock = (props) => {
|
|
|
30
30
|
const isMobile = useContext(MobileContext);
|
|
31
31
|
const { textContent, fileContent, size = 'l', background, centered, theme = 'default', textWidth = 'm', } = props;
|
|
32
32
|
const colSizes = useMemo(() => getTextWidth(textWidth), [textWidth]);
|
|
33
|
-
return (React.createElement("div", { className: b({ size, background: Boolean(background) }) },
|
|
33
|
+
return (React.createElement("div", { className: b({ size, theme, background: Boolean(background) }) },
|
|
34
34
|
React.createElement(Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
|
|
35
35
|
fileContent && (React.createElement(Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes }, fileContent.map((file) => (React.createElement(FileLink, Object.assign({ className: b('file') }, file, { key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme })))))),
|
|
36
36
|
background && (React.createElement("div", { className: b('background') },
|
|
@@ -180,6 +180,18 @@ unpredictable css rules order in build */
|
|
|
180
180
|
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
181
181
|
color: var(--g-color-text-link-hover);
|
|
182
182
|
}
|
|
183
|
+
.pc-header-block_media-view_fit .pc-header-block__video > video,
|
|
184
|
+
.pc-header-block_media-view_fit .pc-header-block__image {
|
|
185
|
+
object-fit: contain;
|
|
186
|
+
height: auto;
|
|
187
|
+
width: auto;
|
|
188
|
+
max-height: 100%;
|
|
189
|
+
max-width: 100%;
|
|
190
|
+
position: relative;
|
|
191
|
+
top: 50%;
|
|
192
|
+
left: 50%;
|
|
193
|
+
transform: translate(-50%, -50%);
|
|
194
|
+
}
|
|
183
195
|
@media (max-width: 1440px) {
|
|
184
196
|
.pc-header-block__background, .pc-header-block__background.pc-header-block__background_media {
|
|
185
197
|
left: 0;
|
|
@@ -18,7 +18,7 @@ const Background = ({ background, isMobile }) => {
|
|
|
18
18
|
};
|
|
19
19
|
const FullWidthBackground = ({ background }) => (React.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
|
|
20
20
|
export const HeaderBlock = (props) => {
|
|
21
|
-
const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, children, } = props;
|
|
21
|
+
const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, children, mediaView = 'full', } = props;
|
|
22
22
|
const isMobile = useContext(MobileContext);
|
|
23
23
|
const theme = useTheme();
|
|
24
24
|
const hasRightSideImage = Boolean(image || video);
|
|
@@ -32,7 +32,11 @@ export const HeaderBlock = (props) => {
|
|
|
32
32
|
const imageThemed = image && getThemedValue(image, theme);
|
|
33
33
|
const videoThemed = video && getThemedValue(video, theme);
|
|
34
34
|
const fullWidth = (backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.fullWidth) || (backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.fullWidthMedia);
|
|
35
|
-
return (React.createElement("header", { className: b({
|
|
35
|
+
return (React.createElement("header", { className: b({
|
|
36
|
+
['has-media']: hasRightSideImage,
|
|
37
|
+
['full-width']: fullWidth,
|
|
38
|
+
['media-view']: mediaView,
|
|
39
|
+
}, className) },
|
|
36
40
|
backgroundThemed && fullWidth && React.createElement(FullWidthBackground, { background: backgroundThemed }),
|
|
37
41
|
backgroundThemed && React.createElement(Background, { background: backgroundThemed, isMobile: isMobile }),
|
|
38
42
|
React.createElement(Grid, { containerClass: b('container-fluid') },
|
|
@@ -407,6 +407,10 @@ export declare const HeaderProperties: {
|
|
|
407
407
|
optionName: string;
|
|
408
408
|
})[];
|
|
409
409
|
};
|
|
410
|
+
mediaView: {
|
|
411
|
+
type: string;
|
|
412
|
+
enum: string[];
|
|
413
|
+
};
|
|
410
414
|
backLink: {
|
|
411
415
|
type: string;
|
|
412
416
|
required: string[];
|
|
@@ -887,6 +891,10 @@ export declare const HeaderBlock: {
|
|
|
887
891
|
optionName: string;
|
|
888
892
|
})[];
|
|
889
893
|
};
|
|
894
|
+
mediaView: {
|
|
895
|
+
type: string;
|
|
896
|
+
enum: string[];
|
|
897
|
+
};
|
|
890
898
|
backLink: {
|
|
891
899
|
type: string;
|
|
892
900
|
required: string[];
|
|
@@ -30,6 +30,16 @@ unpredictable css rules order in build */
|
|
|
30
30
|
text-decoration: none;
|
|
31
31
|
margin: 0 8px 24px;
|
|
32
32
|
}
|
|
33
|
+
.pc-icons-block a.pc-icons-block__item {
|
|
34
|
+
border-radius: var(--g-focus-border-radius);
|
|
35
|
+
}
|
|
36
|
+
.pc-icons-block a.pc-icons-block__item:focus {
|
|
37
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
38
|
+
outline-offset: 0;
|
|
39
|
+
}
|
|
40
|
+
.pc-icons-block a.pc-icons-block__item:focus:not(:focus-visible) {
|
|
41
|
+
outline: 0;
|
|
42
|
+
}
|
|
33
43
|
.pc-icons-block__image {
|
|
34
44
|
max-width: 100%;
|
|
35
45
|
margin: 0 auto;
|
|
@@ -19,6 +19,14 @@ unpredictable css rules order in build */
|
|
|
19
19
|
position: relative;
|
|
20
20
|
padding-right: 24px;
|
|
21
21
|
cursor: pointer;
|
|
22
|
+
border-radius: var(--g-focus-border-radius);
|
|
23
|
+
}
|
|
24
|
+
.pc-QuestionsBlockItem__title:focus {
|
|
25
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
26
|
+
outline-offset: 0;
|
|
27
|
+
}
|
|
28
|
+
.pc-QuestionsBlockItem__title:focus:not(:focus-visible) {
|
|
29
|
+
outline: 0;
|
|
22
30
|
}
|
|
23
31
|
.pc-QuestionsBlockItem__title a {
|
|
24
32
|
outline: none;
|
|
@@ -37,12 +45,19 @@ unpredictable css rules order in build */
|
|
|
37
45
|
position: absolute;
|
|
38
46
|
right: 0;
|
|
39
47
|
top: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
margin: auto;
|
|
40
50
|
color: var(--g-color-text-primary);
|
|
41
51
|
}
|
|
42
52
|
.pc-QuestionsBlockItem__link {
|
|
43
53
|
font-size: var(--g-text-body-2-font-size);
|
|
44
54
|
line-height: var(--g-text-body-2-line-height);
|
|
45
55
|
}
|
|
56
|
+
.pc-QuestionsBlockItem__link.pc-QuestionsBlockItem__link a {
|
|
57
|
+
outline-offset: -2px;
|
|
58
|
+
border-radius: calc(var(--g-focus-border-radius) + 2px);
|
|
59
|
+
}
|
|
60
|
+
|
|
46
61
|
.pc-QuestionsBlockItem__text {
|
|
47
62
|
font-size: var(--g-text-body-2-font-size);
|
|
48
63
|
line-height: var(--g-text-body-2-line-height);
|
|
@@ -49,6 +49,13 @@ unpredictable css rules order in build */
|
|
|
49
49
|
box-shadow: 0 4px 24px var(--pc-color-sfx-shadow), 0 2px 8px var(--pc-color-sfx-shadow);
|
|
50
50
|
transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
51
51
|
}
|
|
52
|
+
.pc-slider-block-arrow__button:focus {
|
|
53
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
54
|
+
outline-offset: 0;
|
|
55
|
+
}
|
|
56
|
+
.pc-slider-block-arrow__button:focus:not(:focus-visible) {
|
|
57
|
+
outline: 0;
|
|
58
|
+
}
|
|
52
59
|
.pc-slider-block-arrow:hover .pc-slider-block-arrow__button {
|
|
53
60
|
color: var(--g-color-text-primary);
|
|
54
61
|
box-shadow: 0 2px 12px var(--pc-color-sfx-shadow), 0 4px 24px var(--pc-color-sfx-shadow);
|
|
@@ -133,12 +133,12 @@ export const SliderBlock = (props) => {
|
|
|
133
133
|
const renderAccessibleBar = (index) => {
|
|
134
134
|
return (
|
|
135
135
|
// To have this key differ from keys used in renderDot function, added `-accessible-bar` part
|
|
136
|
-
React.createElement(Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint >
|
|
136
|
+
React.createElement(Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint > 0 && (React.createElement("li", { className: b('accessible-bar'), "aria-current": true, "aria-label": `Slide ${currentIndex + 1} of ${barSlidesCount}`, style: {
|
|
137
137
|
left: barPosition,
|
|
138
138
|
width: barWidth,
|
|
139
139
|
} }))));
|
|
140
140
|
};
|
|
141
|
-
const
|
|
141
|
+
const getCurrentSlideNumber = (index) => {
|
|
142
142
|
const currentIndexDiff = index - currentIndex;
|
|
143
143
|
let currentSlideNumber;
|
|
144
144
|
if (0 <= currentIndexDiff && currentIndexDiff < slidesToShowCount) {
|
|
@@ -150,10 +150,16 @@ export const SliderBlock = (props) => {
|
|
|
150
150
|
else {
|
|
151
151
|
currentSlideNumber = index + 1;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
return currentSlideNumber;
|
|
154
|
+
};
|
|
155
|
+
const isVisibleSlide = (index) => {
|
|
156
|
+
const currentIndexDiff = index - currentIndex;
|
|
157
|
+
return (slidesCountByBreakpoint > 0 &&
|
|
158
|
+
0 <= currentIndexDiff &&
|
|
159
|
+
currentIndexDiff < slidesToShowCount);
|
|
160
|
+
};
|
|
161
|
+
const renderDot = (index) => {
|
|
162
|
+
return (React.createElement("li", { key: index, className: b('dot', { active: index === currentIndex }), onClick: () => handleDotClick(index), "aria-hidden": isVisibleSlide(index) ? true : undefined, "aria-label": `Slide ${getCurrentSlideNumber(index)} of ${barSlidesCount}` }));
|
|
157
163
|
};
|
|
158
164
|
const renderNavigation = () => {
|
|
159
165
|
if (childrenCount <= slidesCountByBreakpoint || !dots || childrenCount === 1) {
|
|
@@ -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-button-block {
|
|
4
|
+
--yc-button-outline-color: var(--g-color-line-focus);
|
|
5
|
+
}
|
|
3
6
|
.pc-button-block__content {
|
|
4
7
|
display: flex;
|
|
5
8
|
align-items: center;
|
|
@@ -40,6 +43,9 @@ unpredictable css rules order in build */
|
|
|
40
43
|
color: var(--pc-monochrome-button-color);
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
.pc-button-block_theme_normal-contrast:focus::before, .pc-button-block_theme_raised:focus::before {
|
|
47
|
+
outline-offset: 1px;
|
|
48
|
+
}
|
|
43
49
|
.pc-button-block_size_s {
|
|
44
50
|
--btn-image-margin: 10px;
|
|
45
51
|
}
|
|
@@ -18,7 +18,7 @@ const ButtonTabs = ({ className, items, activeTab, onSelectTab, tabSize = 'l', q
|
|
|
18
18
|
return (React.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) => {
|
|
19
19
|
const isActive = id === activeTabId;
|
|
20
20
|
return (React.createElement(Button, { text: title, className: b('item', { active: isActive }), key: title, size: tabSize, onClick: handleClick(id), extraProps: {
|
|
21
|
-
'aria-current': isActive,
|
|
21
|
+
'aria-current': isActive || undefined,
|
|
22
22
|
} }));
|
|
23
23
|
})));
|
|
24
24
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { HTMLAttributeAnchorTarget, ReactElement } from 'react';
|
|
2
|
-
import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
|
|
3
|
-
import { AnalyticsEventsBase } from '../../models/common';
|
|
2
|
+
import { AnalyticsEventsBase, ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
|
|
4
3
|
import './CardBase.css';
|
|
5
4
|
export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
|
|
6
5
|
className?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { Children, Fragment } from 'react';
|
|
2
|
+
import { Link } from '@gravity-ui/uikit';
|
|
2
3
|
import { useAnalytics } from '../../hooks';
|
|
3
4
|
import { useMetrika } from '../../hooks/useMetrika';
|
|
4
|
-
import { DefaultEventNames } from '../../models
|
|
5
|
+
import { DefaultEventNames, } from '../../models';
|
|
5
6
|
import { block, getQaAttrubutes } from '../../utils';
|
|
6
7
|
import BackgroundImage from '../BackgroundImage/BackgroundImage';
|
|
7
8
|
import RouterLink from '../RouterLink/RouterLink';
|
|
@@ -50,7 +51,10 @@ export const Layout = (props) => {
|
|
|
50
51
|
handleAnalytics(analyticsEvents);
|
|
51
52
|
};
|
|
52
53
|
return url ? (React.createElement(RouterLink, { href: url },
|
|
53
|
-
React.createElement(
|
|
54
|
+
React.createElement(Link, { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: fullClassName, onClick: onClick, title: urlTitle, extraProps: {
|
|
55
|
+
draggable: false,
|
|
56
|
+
onDragStart: (e) => e.preventDefault(),
|
|
57
|
+
}, qa: qa }, cardContent))) : (React.createElement("div", { className: fullClassName, "data-qa": qa }, cardContent));
|
|
54
58
|
};
|
|
55
59
|
Layout.Header = Header;
|
|
56
60
|
Layout.Content = Content;
|