@gravity-ui/page-constructor 5.28.4 → 5.28.6
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/components/ReactPlayer/ReactPlayer.css +3 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +2 -1
- package/build/cjs/sub-blocks/Content/Content.css +14 -4
- package/build/esm/components/ReactPlayer/ReactPlayer.css +3 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +2 -1
- package/build/esm/sub-blocks/Content/Content.css +14 -4
- package/package.json +1 -1
- package/widget/index.js +1 -1
|
@@ -70,6 +70,9 @@ unpredictable css rules order in build */
|
|
|
70
70
|
.pc-ReactPlayer_contain video {
|
|
71
71
|
object-fit: contain;
|
|
72
72
|
}
|
|
73
|
+
.pc-ReactPlayer_auto-ratio video {
|
|
74
|
+
object-fit: cover;
|
|
75
|
+
}
|
|
73
76
|
@media only screen and (max-width: 577px) {
|
|
74
77
|
.pc-ReactPlayer__button_text {
|
|
75
78
|
font-size: 20px;
|
|
@@ -24,7 +24,7 @@ const FPS = 60;
|
|
|
24
24
|
// eslint-disable-next-line react/display-name
|
|
25
25
|
exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
26
26
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
27
|
-
const { src, previewImgUrl, loop = false, controls = models_1.MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, autoRatio, contain, } = props;
|
|
27
|
+
const { src, previewImgUrl, loop = false, controls = models_1.MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, autoRatio, contain = true, } = props;
|
|
28
28
|
const { type = models_1.PlayButtonType.Default, theme = models_1.PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
|
|
29
29
|
const { type: customControlsType = models_1.CustomControlsType.WithMuteButton, muteButtonShown, positioning = models_1.CustomControlsButtonPositioning.Center, } = customControlsOptions;
|
|
30
30
|
const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
|
|
@@ -235,6 +235,7 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
235
235
|
wrapper: !currentHeight,
|
|
236
236
|
controls,
|
|
237
237
|
contain,
|
|
238
|
+
'auto-ratio': autoRatio,
|
|
238
239
|
}, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (react_1.default.createElement(react_1.Fragment, null,
|
|
239
240
|
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: onReady, onPlay: onPlay, onPause: autoPlay && customControlsType !== models_1.CustomControlsType.WithMuteButton
|
|
240
241
|
? undefined
|
|
@@ -87,6 +87,9 @@ unpredictable css rules order in build */
|
|
|
87
87
|
.pc-content_theme_dark .pc-content__title *,
|
|
88
88
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
89
89
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
90
|
+
.pc-content_theme_dark .pc-content__list *,
|
|
91
|
+
.pc-content_theme_dark .pc-content__list .yfm,
|
|
92
|
+
.pc-content_theme_dark .pc-content__list .yfm *,
|
|
90
93
|
.pc-content_theme_dark .pc-content__links a {
|
|
91
94
|
color: var(--g-color-text-light-primary);
|
|
92
95
|
}
|
|
@@ -101,11 +104,13 @@ unpredictable css rules order in build */
|
|
|
101
104
|
.pc-content_theme_dark .pc-content__notice .yfm a:hover {
|
|
102
105
|
color: var(--g-color-text-light-primary);
|
|
103
106
|
}
|
|
104
|
-
.pc-content_theme_dark .pc-content__text .yfm a
|
|
107
|
+
.pc-content_theme_dark .pc-content__text .yfm a,
|
|
108
|
+
.pc-content_theme_dark .pc-content__list .yfm a {
|
|
105
109
|
color: var(--g-color-text-light-primary);
|
|
106
110
|
text-decoration: underline;
|
|
107
111
|
}
|
|
108
|
-
.pc-content_theme_dark .pc-content__text .yfm a:hover
|
|
112
|
+
.pc-content_theme_dark .pc-content__text .yfm a:hover,
|
|
113
|
+
.pc-content_theme_dark .pc-content__list .yfm a:hover {
|
|
109
114
|
color: var(--g-color-text-light-secondary);
|
|
110
115
|
}
|
|
111
116
|
.pc-content_theme_dark .pc-content__title a {
|
|
@@ -119,6 +124,9 @@ unpredictable css rules order in build */
|
|
|
119
124
|
.pc-content_theme_light .pc-content__title *,
|
|
120
125
|
.pc-content_theme_light .pc-content__text .yfm,
|
|
121
126
|
.pc-content_theme_light .pc-content__text .yfm *,
|
|
127
|
+
.pc-content_theme_light .pc-content__list *,
|
|
128
|
+
.pc-content_theme_light .pc-content__list .yfm,
|
|
129
|
+
.pc-content_theme_light .pc-content__list .yfm *,
|
|
122
130
|
.pc-content_theme_light .pc-content__links a {
|
|
123
131
|
color: var(--g-color-text-dark-primary);
|
|
124
132
|
}
|
|
@@ -133,11 +141,13 @@ unpredictable css rules order in build */
|
|
|
133
141
|
.pc-content_theme_light .pc-content__notice .yfm a:hover {
|
|
134
142
|
color: var(--g-color-text-dark-primary);
|
|
135
143
|
}
|
|
136
|
-
.pc-content_theme_light .pc-content__text .yfm a
|
|
144
|
+
.pc-content_theme_light .pc-content__text .yfm a,
|
|
145
|
+
.pc-content_theme_light .pc-content__list .yfm a {
|
|
137
146
|
color: var(--g-color-text-dark-primary);
|
|
138
147
|
text-decoration: underline;
|
|
139
148
|
}
|
|
140
|
-
.pc-content_theme_light .pc-content__text .yfm a:hover
|
|
149
|
+
.pc-content_theme_light .pc-content__text .yfm a:hover,
|
|
150
|
+
.pc-content_theme_light .pc-content__list .yfm a:hover {
|
|
141
151
|
color: var(--g-color-text-dark-secondary);
|
|
142
152
|
}
|
|
143
153
|
.pc-content_theme_light .pc-content__title a {
|
|
@@ -70,6 +70,9 @@ unpredictable css rules order in build */
|
|
|
70
70
|
.pc-ReactPlayer_contain video {
|
|
71
71
|
object-fit: contain;
|
|
72
72
|
}
|
|
73
|
+
.pc-ReactPlayer_auto-ratio video {
|
|
74
|
+
object-fit: cover;
|
|
75
|
+
}
|
|
73
76
|
@media only screen and (max-width: 577px) {
|
|
74
77
|
.pc-ReactPlayer__button_text {
|
|
75
78
|
font-size: 20px;
|
|
@@ -21,7 +21,7 @@ const FPS = 60;
|
|
|
21
21
|
// eslint-disable-next-line react/display-name
|
|
22
22
|
export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
23
23
|
const isMobile = useContext(MobileContext);
|
|
24
|
-
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, autoRatio, contain, } = props;
|
|
24
|
+
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, autoRatio, contain = true, } = props;
|
|
25
25
|
const { type = PlayButtonType.Default, theme = PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
|
|
26
26
|
const { type: customControlsType = CustomControlsType.WithMuteButton, muteButtonShown, positioning = CustomControlsButtonPositioning.Center, } = customControlsOptions;
|
|
27
27
|
const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
|
|
@@ -232,6 +232,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
232
232
|
wrapper: !currentHeight,
|
|
233
233
|
controls,
|
|
234
234
|
contain,
|
|
235
|
+
'auto-ratio': autoRatio,
|
|
235
236
|
}, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (React.createElement(Fragment, null,
|
|
236
237
|
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: onReady, onPlay: onPlay, onPause: autoPlay && customControlsType !== CustomControlsType.WithMuteButton
|
|
237
238
|
? undefined
|
|
@@ -87,6 +87,9 @@ unpredictable css rules order in build */
|
|
|
87
87
|
.pc-content_theme_dark .pc-content__title *,
|
|
88
88
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
89
89
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
90
|
+
.pc-content_theme_dark .pc-content__list *,
|
|
91
|
+
.pc-content_theme_dark .pc-content__list .yfm,
|
|
92
|
+
.pc-content_theme_dark .pc-content__list .yfm *,
|
|
90
93
|
.pc-content_theme_dark .pc-content__links a {
|
|
91
94
|
color: var(--g-color-text-light-primary);
|
|
92
95
|
}
|
|
@@ -101,11 +104,13 @@ unpredictable css rules order in build */
|
|
|
101
104
|
.pc-content_theme_dark .pc-content__notice .yfm a:hover {
|
|
102
105
|
color: var(--g-color-text-light-primary);
|
|
103
106
|
}
|
|
104
|
-
.pc-content_theme_dark .pc-content__text .yfm a
|
|
107
|
+
.pc-content_theme_dark .pc-content__text .yfm a,
|
|
108
|
+
.pc-content_theme_dark .pc-content__list .yfm a {
|
|
105
109
|
color: var(--g-color-text-light-primary);
|
|
106
110
|
text-decoration: underline;
|
|
107
111
|
}
|
|
108
|
-
.pc-content_theme_dark .pc-content__text .yfm a:hover
|
|
112
|
+
.pc-content_theme_dark .pc-content__text .yfm a:hover,
|
|
113
|
+
.pc-content_theme_dark .pc-content__list .yfm a:hover {
|
|
109
114
|
color: var(--g-color-text-light-secondary);
|
|
110
115
|
}
|
|
111
116
|
.pc-content_theme_dark .pc-content__title a {
|
|
@@ -119,6 +124,9 @@ unpredictable css rules order in build */
|
|
|
119
124
|
.pc-content_theme_light .pc-content__title *,
|
|
120
125
|
.pc-content_theme_light .pc-content__text .yfm,
|
|
121
126
|
.pc-content_theme_light .pc-content__text .yfm *,
|
|
127
|
+
.pc-content_theme_light .pc-content__list *,
|
|
128
|
+
.pc-content_theme_light .pc-content__list .yfm,
|
|
129
|
+
.pc-content_theme_light .pc-content__list .yfm *,
|
|
122
130
|
.pc-content_theme_light .pc-content__links a {
|
|
123
131
|
color: var(--g-color-text-dark-primary);
|
|
124
132
|
}
|
|
@@ -133,11 +141,13 @@ unpredictable css rules order in build */
|
|
|
133
141
|
.pc-content_theme_light .pc-content__notice .yfm a:hover {
|
|
134
142
|
color: var(--g-color-text-dark-primary);
|
|
135
143
|
}
|
|
136
|
-
.pc-content_theme_light .pc-content__text .yfm a
|
|
144
|
+
.pc-content_theme_light .pc-content__text .yfm a,
|
|
145
|
+
.pc-content_theme_light .pc-content__list .yfm a {
|
|
137
146
|
color: var(--g-color-text-dark-primary);
|
|
138
147
|
text-decoration: underline;
|
|
139
148
|
}
|
|
140
|
-
.pc-content_theme_light .pc-content__text .yfm a:hover
|
|
149
|
+
.pc-content_theme_light .pc-content__text .yfm a:hover,
|
|
150
|
+
.pc-content_theme_light .pc-content__list .yfm a:hover {
|
|
141
151
|
color: var(--g-color-text-dark-secondary);
|
|
142
152
|
}
|
|
143
153
|
.pc-content_theme_light .pc-content__title a {
|