@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.
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +0 -3
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/cjs/blocks/Header/schema.d.ts +105 -5
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +42 -2
- package/build/cjs/blocks/Icons/Icons.css +0 -10
- package/build/cjs/blocks/Media/schema.d.ts +42 -2
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +0 -7
- package/build/cjs/blocks/Slider/Slider.js +6 -12
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Table/schema.js +2 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +21 -1
- package/build/cjs/components/Button/Button.css +0 -6
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -1
- package/build/cjs/components/CardBase/CardBase.js +3 -7
- package/build/cjs/components/Control/Control.css +0 -8
- package/build/cjs/components/FileLink/FileLink.css +0 -8
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +0 -16
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +1 -1
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +3 -10
- package/build/cjs/components/Link/Link.css +0 -8
- package/build/cjs/components/Media/Image/Image.js +1 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +0 -19
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -2
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +4 -6
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/Title/TitleItem.css +0 -8
- package/build/cjs/components/VideoBlock/VideoBlock.css +0 -7
- package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -9
- package/build/cjs/schema/constants.d.ts +21 -1
- package/build/cjs/schema/validators/common.d.ts +84 -5
- package/build/cjs/schema/validators/common.js +32 -2
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +0 -3
- package/build/cjs/sub-blocks/Content/Content.css +0 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -7
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +21 -1
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +21 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +0 -3
- package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/esm/blocks/Header/schema.d.ts +105 -5
- package/build/esm/blocks/HeaderSlider/schema.d.ts +42 -2
- package/build/esm/blocks/Icons/Icons.css +0 -10
- package/build/esm/blocks/Media/schema.d.ts +42 -2
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
- package/build/esm/blocks/Slider/Arrow/Arrow.css +0 -7
- package/build/esm/blocks/Slider/Slider.js +6 -12
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Table/schema.js +2 -0
- package/build/esm/blocks/Tabs/schema.d.ts +21 -1
- package/build/esm/components/Button/Button.css +0 -6
- package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/esm/components/CardBase/CardBase.d.ts +2 -1
- package/build/esm/components/CardBase/CardBase.js +2 -6
- package/build/esm/components/Control/Control.css +0 -8
- package/build/esm/components/FileLink/FileLink.css +0 -8
- package/build/esm/components/FullscreenImage/FullscreenImage.css +0 -16
- package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +1 -1
- package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -12
- package/build/esm/components/Link/Link.css +0 -8
- package/build/esm/components/Media/Image/Image.js +2 -2
- package/build/esm/components/OverflowScroller/OverflowScroller.css +0 -19
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -2
- package/build/esm/components/ReactPlayer/CustomBarControls.css +4 -6
- package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/Title/TitleItem.css +0 -8
- package/build/esm/components/VideoBlock/VideoBlock.css +0 -7
- package/build/esm/containers/PageConstructor/PageConstructor.css +0 -9
- package/build/esm/schema/constants.d.ts +21 -1
- package/build/esm/schema/validators/common.d.ts +84 -5
- package/build/esm/schema/validators/common.js +32 -2
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +0 -3
- package/build/esm/sub-blocks/Content/Content.css +0 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -7
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +21 -1
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +21 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/package.json +3 -3
- package/styles/mixins.scss +57 -20
- package/styles/root.scss +0 -2
- package/styles/styles.css +0 -7
- package/styles/yfm.scss +0 -2
- package/widget/index.js +1 -1
- package/build/cjs/components/OverflowScroller/i18n/en.json +0 -4
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +0 -2
- package/build/cjs/components/OverflowScroller/i18n/index.js +0 -8
- package/build/cjs/components/OverflowScroller/i18n/ru.json +0 -4
- package/build/esm/components/OverflowScroller/i18n/en.json +0 -4
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +0 -2
- package/build/esm/components/OverflowScroller/i18n/index.js +0 -5
- package/build/esm/components/OverflowScroller/i18n/ru.json +0 -4
|
@@ -13,29 +13,22 @@ const getMediaClass = (type) => b('modal-media', { type });
|
|
|
13
13
|
const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
|
|
14
14
|
const [isOpened, setIsOpened] = (0, react_1.useState)(false);
|
|
15
15
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
16
|
-
const [isFullscreenButtonFocused, setIsFullscreenButtonFocused] = (0, react_1.useState)(false);
|
|
17
16
|
const openModal = (e) => {
|
|
18
17
|
e.stopPropagation();
|
|
19
18
|
setIsOpened(true);
|
|
20
19
|
};
|
|
21
20
|
const closeModal = () => setIsOpened(false);
|
|
22
|
-
const onShowFullScreenButton = (0, react_1.useCallback)(() => {
|
|
23
|
-
setIsFullscreenButtonFocused(true);
|
|
24
|
-
}, []);
|
|
25
|
-
const onHideFullScreenButton = (0, react_1.useCallback)(() => {
|
|
26
|
-
setIsFullscreenButtonFocused(false);
|
|
27
|
-
}, []);
|
|
28
21
|
if (isMobile) {
|
|
29
22
|
return children();
|
|
30
23
|
}
|
|
31
24
|
return (react_1.default.createElement("div", { className: b() },
|
|
32
|
-
react_1.default.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal
|
|
25
|
+
react_1.default.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal },
|
|
33
26
|
children({ className: b('inline-media') }),
|
|
34
|
-
showFullscreenIcon && (react_1.default.createElement(
|
|
27
|
+
showFullscreenIcon && (react_1.default.createElement("div", { className: b('icon-wrapper'), onClickCapture: openModal },
|
|
35
28
|
react_1.default.createElement(uikit_1.Icon, { data: icons_1.Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
|
|
36
29
|
isOpened && (react_1.default.createElement(uikit_1.Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
|
|
37
30
|
react_1.default.createElement("div", { className: b('modal-content') },
|
|
38
|
-
react_1.default.createElement(
|
|
31
|
+
react_1.default.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal },
|
|
39
32
|
react_1.default.createElement(uikit_1.Icon, { data: icons_1.PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
|
|
40
33
|
children({
|
|
41
34
|
imageClassName: getMediaClass('image'),
|
|
@@ -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
|
}
|
|
@@ -53,7 +53,7 @@ const Image = (props) => {
|
|
|
53
53
|
};
|
|
54
54
|
const imageSlider = (imageArray) => {
|
|
55
55
|
const fullscreenItem = fullscreen === undefined || fullscreen;
|
|
56
|
-
return (react_1.default.createElement(Slider_1.default, { slidesToShow: 1, type: models_1.SliderType.MediaCard }, imageArray.map((item
|
|
56
|
+
return (react_1.default.createElement(Slider_1.default, { slidesToShow: 1, type: models_1.SliderType.MediaCard }, imageArray.map((item) => fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))));
|
|
57
57
|
};
|
|
58
58
|
if (Array.isArray(image)) {
|
|
59
59
|
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;
|
|
@@ -5,7 +5,6 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
6
6
|
const __1 = require("..");
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
|
-
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
9
8
|
const b = (0, utils_1.block)('overflow-scroller');
|
|
10
9
|
const TRANSITION_TIME = 300;
|
|
11
10
|
const PADDING_SIZE = 24;
|
|
@@ -85,7 +84,7 @@ class OverflowScroller extends react_1.default.Component {
|
|
|
85
84
|
}) },
|
|
86
85
|
react_1.default.createElement("div", { className: b(null, className), ref: this.containerRef },
|
|
87
86
|
react_1.default.createElement("div", { className: b('wrapper'), style: wrapperStyle, ref: this.wrapperRef }, children)),
|
|
88
|
-
arrows.map((direction) => (react_1.default.createElement("
|
|
87
|
+
arrows.map((direction) => (react_1.default.createElement("div", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction) },
|
|
89
88
|
react_1.default.createElement(__1.ToggleArrow, { size: arrowSize, type: 'horizontal', iconType: "navigation" }))))));
|
|
90
89
|
}
|
|
91
90
|
}
|
|
@@ -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-
|
|
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:
|
|
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-
|
|
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:
|
|
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);
|
|
@@ -219,7 +219,7 @@ 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
|
|
222
|
+
: onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
|
|
223
223
|
controls === models_1.MediaVideoControlsType.Custom && (react_1.default.createElement(CustomBarControls_1.default, { className: customBarControlsClassName, mute: {
|
|
224
224
|
isMuted: muted,
|
|
225
225
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BlockHeaderProps = exports.CardBase = exports.MapProps = exports.YMapMarker = exports.YMapMarkerLabel = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayButtonProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
3
|
+
exports.BlockHeaderProps = exports.CardBase = exports.MapProps = exports.YMapMarker = exports.YMapMarkerLabel = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.CustomControlsOptionsProps = exports.PlayButtonProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.customControlsButtonPositioning = exports.customControlsType = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
4
4
|
const schema_1 = require("../../components/Image/schema");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const event_1 = require("./event");
|
|
@@ -14,11 +14,20 @@ exports.contentTextWidth = ['s', 'm', 'l'];
|
|
|
14
14
|
exports.videoTypes = ['default', 'player'];
|
|
15
15
|
exports.playIconTypes = ['default', 'text'];
|
|
16
16
|
exports.playIconThemes = ['blue', 'grey'];
|
|
17
|
-
exports.videoControlsTypes = [
|
|
17
|
+
exports.videoControlsTypes = [models_1.MediaVideoControlsType.Default, models_1.MediaVideoControlsType.Custom];
|
|
18
18
|
exports.fileLinkTypes = ['vertical', 'horizontal'];
|
|
19
19
|
exports.dividerEnum = { enum: [0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] };
|
|
20
20
|
exports.sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
|
|
21
21
|
exports.contentThemes = ['default', 'dark', 'light'];
|
|
22
|
+
exports.customControlsType = [
|
|
23
|
+
models_1.CustomControlsType.WithMuteButton,
|
|
24
|
+
models_1.CustomControlsType.WithPlayPauseButton,
|
|
25
|
+
];
|
|
26
|
+
exports.customControlsButtonPositioning = [
|
|
27
|
+
models_1.CustomControlsButtonPositioning.Center,
|
|
28
|
+
models_1.CustomControlsButtonPositioning.Left,
|
|
29
|
+
models_1.CustomControlsButtonPositioning.Right,
|
|
30
|
+
];
|
|
22
31
|
exports.BaseProps = {
|
|
23
32
|
type: {},
|
|
24
33
|
when: {
|
|
@@ -88,6 +97,23 @@ exports.PlayButtonProps = {
|
|
|
88
97
|
},
|
|
89
98
|
},
|
|
90
99
|
};
|
|
100
|
+
exports.CustomControlsOptionsProps = {
|
|
101
|
+
type: 'object',
|
|
102
|
+
additionalProperties: false,
|
|
103
|
+
properties: {
|
|
104
|
+
type: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
enum: exports.customControlsType,
|
|
107
|
+
},
|
|
108
|
+
muteButtonShown: {
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
},
|
|
111
|
+
positioning: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
enum: exports.customControlsButtonPositioning,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
91
117
|
exports.VideoProps = {
|
|
92
118
|
type: 'object',
|
|
93
119
|
additionalProperties: false,
|
|
@@ -126,6 +152,10 @@ exports.VideoProps = {
|
|
|
126
152
|
type: 'string',
|
|
127
153
|
enum: exports.videoControlsTypes,
|
|
128
154
|
},
|
|
155
|
+
customControlsOptions: exports.CustomControlsOptionsProps,
|
|
156
|
+
ariaLabel: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
},
|
|
129
159
|
},
|
|
130
160
|
};
|
|
131
161
|
exports.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:
|
|
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:
|
|
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
|
-
|
|
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);
|
|
@@ -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("div", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen },
|
|
32
32
|
foldableTitle,
|
|
33
33
|
react_1.default.createElement(components_1.ToggleArrow, { open: isOpened, size: 14, type: 'vertical', className: b('arrow') })));
|
|
34
34
|
};
|
|
@@ -49,9 +49,6 @@ 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(--g-color-text-light-primary);
|
|
54
|
-
}
|
|
55
52
|
@media (max-width: 577px) {
|
|
56
53
|
.pc-content-layout-block_background {
|
|
57
54
|
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,
|
|
33
|
+
return (React.createElement("div", { className: b({ size, 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') },
|