@megafon/ui-shared 6.6.0 → 6.8.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/dist/es/components/Breadcrumbs/Breadcrumbs.css +3 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +18 -3
- package/dist/es/components/ImageBanner/ImageBanner.css +3 -0
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +2 -0
- package/dist/es/components/ImageBanner/ImageBanner.js +6 -2
- package/dist/es/components/Instructions/img/android-new.png +0 -0
- package/dist/es/components/Instructions/img/android.png +0 -0
- package/dist/es/components/Instructions/img/blackIphone.png +0 -0
- package/dist/es/components/Instructions/img/iphone-new.png +0 -0
- package/dist/es/components/Instructions/img/iphone15.png +0 -0
- package/dist/es/components/Instructions/img/laptop-new.png +0 -0
- package/dist/es/components/Instructions/img/laptop.png +0 -0
- package/dist/es/components/Instructions/img/newIphone.png +0 -0
- package/dist/es/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/es/components/PageTitle/PageTitle.css +0 -8
- package/dist/es/components/PageTitle/PageTitle.js +2 -0
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/es/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/es/components/VideoBanner/VideoBanner.css +0 -5
- package/dist/es/components/VideoBanner/VideoBanner.js +1 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +3 -1
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +3 -1
- package/dist/es/components/VideoBlock/VideoBlock.js +87 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +3 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +19 -3
- package/dist/lib/components/ImageBanner/ImageBanner.css +3 -0
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +2 -0
- package/dist/lib/components/ImageBanner/ImageBanner.js +6 -2
- package/dist/lib/components/Instructions/img/android-new.png +0 -0
- package/dist/lib/components/Instructions/img/android.png +0 -0
- package/dist/lib/components/Instructions/img/blackIphone.png +0 -0
- package/dist/lib/components/Instructions/img/iphone-new.png +0 -0
- package/dist/lib/components/Instructions/img/iphone15.png +0 -0
- package/dist/lib/components/Instructions/img/laptop-new.png +0 -0
- package/dist/lib/components/Instructions/img/laptop.png +0 -0
- package/dist/lib/components/Instructions/img/newIphone.png +0 -0
- package/dist/lib/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/lib/components/PageTitle/PageTitle.css +0 -8
- package/dist/lib/components/PageTitle/PageTitle.js +2 -0
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/StoreButton/img/app-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/galaxy-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play-large.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/mi-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/ru-store-large.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore-large.png +0 -0
- package/dist/lib/components/StoreButton/img/v-appstore.png +0 -0
- package/dist/lib/components/VideoBanner/VideoBanner.css +0 -5
- package/dist/lib/components/VideoBanner/VideoBanner.js +1 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +3 -1
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +3 -1
- package/dist/lib/components/VideoBlock/VideoBlock.js +91 -0
- package/package.json +92 -92
- package/CHANGELOG.md +0 -4136
@@ -16,6 +16,10 @@ export declare type Props = {
|
|
16
16
|
color?: TextColorType;
|
17
17
|
/** Включить микроразметку */
|
18
18
|
hasMicrodata?: boolean;
|
19
|
+
/** Отключить на разрешении < 768 px */
|
20
|
+
disabledOnMobile?: boolean;
|
21
|
+
/** Отступ сверху */
|
22
|
+
hasMarginTop?: boolean;
|
19
23
|
/** Дополнительные классы для корневого и внутренних элементов */
|
20
24
|
classes?: {
|
21
25
|
item?: string;
|
@@ -5,6 +5,7 @@ import "core-js/modules/es.object.values.js";
|
|
5
5
|
import React from 'react';
|
6
6
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
7
7
|
import PropTypes from 'prop-types';
|
8
|
+
import useResolutions from "../../hooks/useResolutions";
|
8
9
|
import BreadcrumbsItem, { TextColor } from "./components/BreadcrumbsItem";
|
9
10
|
import "./Breadcrumbs.css";
|
10
11
|
|
@@ -23,10 +24,23 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
23
24
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
24
25
|
dataAttrs = _ref.dataAttrs,
|
25
26
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
26
|
-
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata
|
27
|
+
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
28
|
+
_ref$disabledOnMobile = _ref.disabledOnMobile,
|
29
|
+
disabledOnMobile = _ref$disabledOnMobile === void 0 ? false : _ref$disabledOnMobile,
|
30
|
+
_ref$hasMarginTop = _ref.hasMarginTop,
|
31
|
+
hasMarginTop = _ref$hasMarginTop === void 0 ? false : _ref$hasMarginTop;
|
32
|
+
|
33
|
+
var _useResolutions = useResolutions(),
|
34
|
+
isMobile = _useResolutions.isMobile;
|
35
|
+
|
36
|
+
if (isMobile && disabledOnMobile) {
|
37
|
+
return null;
|
38
|
+
}
|
39
|
+
|
27
40
|
return /*#__PURE__*/React.createElement("div", _extends({
|
28
41
|
className: cn({
|
29
|
-
color: color
|
42
|
+
color: color,
|
43
|
+
'margin-top': hasMarginTop
|
30
44
|
}, className)
|
31
45
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), hasMicrodata && {
|
32
46
|
itemScope: true,
|
@@ -79,6 +93,7 @@ Breadcrumbs.propTypes = {
|
|
79
93
|
href: PropTypes.string
|
80
94
|
}).isRequired)]).isRequired,
|
81
95
|
color: PropTypes.oneOf(Object.values(TextColor)),
|
82
|
-
hasMicrodata: PropTypes.bool
|
96
|
+
hasMicrodata: PropTypes.bool,
|
97
|
+
disabledOnMobile: PropTypes.bool
|
83
98
|
};
|
84
99
|
export default Breadcrumbs;
|
@@ -84,6 +84,8 @@ export interface IImageBannerProps {
|
|
84
84
|
badges?: JSX.Element[] | JSX.Element;
|
85
85
|
/** Элемент блока с рекламой */
|
86
86
|
adBlock?: JSX.Element | null;
|
87
|
+
/** Отступ сверху */
|
88
|
+
hasMarginTop?: boolean;
|
87
89
|
}
|
88
90
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
89
91
|
export default ImageBanner;
|
@@ -91,6 +91,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
91
91
|
isImageFullWidth = _ref2.isImageFullWidth,
|
92
92
|
badges = _ref2.badges,
|
93
93
|
adBlock = _ref2.adBlock,
|
94
|
+
_ref2$hasMarginTop = _ref2.hasMarginTop,
|
95
|
+
hasMarginTop = _ref2$hasMarginTop === void 0 ? false : _ref2$hasMarginTop,
|
94
96
|
_ref2$children = _ref2.children,
|
95
97
|
children = _ref2$children === void 0 ? [] : _ref2$children;
|
96
98
|
|
@@ -160,7 +162,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
160
162
|
'has-image': hasImage,
|
161
163
|
'auto-height': autoHeight,
|
162
164
|
'full-width': isImageFullWidth,
|
163
|
-
radius: radius
|
165
|
+
radius: radius,
|
166
|
+
'margin-top': hasMarginTop
|
164
167
|
}, [className, classes.root]),
|
165
168
|
ref: rootRef
|
166
169
|
}), renderContent, hasImage && renderImage);
|
@@ -205,6 +208,7 @@ ImageBanner.propTypes = {
|
|
205
208
|
autoHeight: PropTypes.bool,
|
206
209
|
isImageFullWidth: PropTypes.bool,
|
207
210
|
badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
|
208
|
-
adBlock: PropTypes.element
|
211
|
+
adBlock: PropTypes.element,
|
212
|
+
hasMarginTop: PropTypes.bool
|
209
213
|
};
|
210
214
|
export default ImageBanner;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -9,14 +9,6 @@ h5 {
|
|
9
9
|
display: inline-block;
|
10
10
|
width: 100%;
|
11
11
|
}
|
12
|
-
.mfui-v6-page-title__breadcrumbs {
|
13
|
-
margin-top: 32px;
|
14
|
-
}
|
15
|
-
@media screen and (max-width: 767px) {
|
16
|
-
.mfui-v6-page-title__breadcrumbs {
|
17
|
-
display: none;
|
18
|
-
}
|
19
|
-
}
|
20
12
|
.mfui-v6-page-title__title {
|
21
13
|
margin-top: 110px;
|
22
14
|
}
|
@@ -52,6 +52,8 @@ var PageTitle = function PageTitle(_ref) {
|
|
52
52
|
className: cn([className]),
|
53
53
|
ref: rootRef
|
54
54
|
}), (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(Breadcrumbs, {
|
55
|
+
disabledOnMobile: true,
|
56
|
+
hasMarginTop: true,
|
55
57
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
56
58
|
items: breadcrumbs,
|
57
59
|
dataAttrs: {
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -223,6 +223,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
223
223
|
}), /*#__PURE__*/React.createElement(ContentArea, null, /*#__PURE__*/React.createElement("div", {
|
224
224
|
className: cn('wrapper')
|
225
225
|
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(Breadcrumbs, {
|
226
|
+
disabledOnMobile: true,
|
226
227
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
227
228
|
dataAttrs: {
|
228
229
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -82,7 +82,9 @@ h5 {
|
|
82
82
|
-webkit-filter: brightness(108.5%);
|
83
83
|
filter: brightness(108.5%);
|
84
84
|
}
|
85
|
-
.mfui-v6-video-block__youtube
|
85
|
+
.mfui-v6-video-block__youtube,
|
86
|
+
.mfui-v6-video-block__rutube,
|
87
|
+
.mfui-v6-video-block__vk {
|
86
88
|
position: relative;
|
87
89
|
padding-bottom: 56.25%;
|
88
90
|
}
|
@@ -18,6 +18,8 @@ export interface IContent {
|
|
18
18
|
}
|
19
19
|
export declare const VideoTypes: {
|
20
20
|
readonly YOUTUBE: "youtube";
|
21
|
+
readonly RUTUBE: "rutube";
|
22
|
+
readonly VK: "vk";
|
21
23
|
readonly VIDEO: "video";
|
22
24
|
};
|
23
25
|
declare type VideoType = typeof VideoTypes[keyof typeof VideoTypes];
|
@@ -41,7 +43,7 @@ export interface IVideoBlockProps {
|
|
41
43
|
content?: IContent;
|
42
44
|
/** Тип видео */
|
43
45
|
videoType?: VideoType;
|
44
|
-
/** Источник видео. Если видео с youtube, то необходимо указать id */
|
46
|
+
/** Источник видео. Если видео с youtube или rutube, то необходимо указать id. Для видео из VK необходимо указать полный id вместе с _ (например: 22822305_456241864) */
|
45
47
|
videoSrc: string;
|
46
48
|
/** Наличие звука в видео */
|
47
49
|
isMuted?: boolean;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
3
|
import "core-js/modules/es.array.concat.js";
|
4
|
+
import "core-js/modules/es.regexp.exec.js";
|
5
|
+
import "core-js/modules/es.string.split.js";
|
3
6
|
import "core-js/modules/es.symbol.js";
|
4
7
|
import "core-js/modules/es.symbol.description.js";
|
5
8
|
import "core-js/modules/es.object.values.js";
|
@@ -10,6 +13,8 @@ import PropTypes from 'prop-types';
|
|
10
13
|
import "./VideoBlock.css";
|
11
14
|
export var VideoTypes = {
|
12
15
|
YOUTUBE: 'youtube',
|
16
|
+
RUTUBE: 'rutube',
|
17
|
+
VK: 'vk',
|
13
18
|
VIDEO: 'video'
|
14
19
|
};
|
15
20
|
export var testIdPrefix = 'VideoBlock';
|
@@ -36,6 +41,40 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
36
41
|
playsinline = _ref$playsinline === void 0 ? false : _ref$playsinline,
|
37
42
|
_ref$fixWhiteVideoBac = _ref.fixWhiteVideoBackground,
|
38
43
|
fixWhiteVideoBackground = _ref$fixWhiteVideoBac === void 0 ? false : _ref$fixWhiteVideoBac;
|
44
|
+
var rutubeRef = React.useRef(null);
|
45
|
+
|
46
|
+
var autoPlayRutube = function autoPlayRutube() {
|
47
|
+
var current = rutubeRef.current;
|
48
|
+
|
49
|
+
if (current == null) {
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
|
53
|
+
window.IntersectionObserver && new window.IntersectionObserver(function (entries, obs) {
|
54
|
+
var _a;
|
55
|
+
|
56
|
+
var _entries = _slicedToArray(entries, 1),
|
57
|
+
entry = _entries[0];
|
58
|
+
|
59
|
+
if (entry && entry.isIntersecting) {
|
60
|
+
(_a = current.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify({
|
61
|
+
type: 'player:play',
|
62
|
+
data: {}
|
63
|
+
}), '*');
|
64
|
+
obs.disconnect();
|
65
|
+
}
|
66
|
+
}, {
|
67
|
+
threshold: 0.5
|
68
|
+
}).observe(current);
|
69
|
+
};
|
70
|
+
|
71
|
+
React.useEffect(function () {
|
72
|
+
if (!isAutoplay || videoType !== VideoTypes.RUTUBE) {
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
|
76
|
+
autoPlayRutube();
|
77
|
+
}, [isAutoplay, videoType]);
|
39
78
|
var renderVideo = React.useCallback(function () {
|
40
79
|
switch (videoType) {
|
41
80
|
case VideoTypes.YOUTUBE:
|
@@ -66,6 +105,54 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
66
105
|
}));
|
67
106
|
}
|
68
107
|
|
108
|
+
case VideoTypes.RUTUBE:
|
109
|
+
{
|
110
|
+
var _src = "https://rutube.ru/play/embed/".concat(videoSrc, "?");
|
111
|
+
|
112
|
+
return /*#__PURE__*/React.createElement("div", {
|
113
|
+
className: cn('rutube')
|
114
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
115
|
+
className: cn('iframe'),
|
116
|
+
ref: rutubeRef,
|
117
|
+
src: _src,
|
118
|
+
width: "100%",
|
119
|
+
height: "100%",
|
120
|
+
frameBorder: "0",
|
121
|
+
allow: "autoplay",
|
122
|
+
title: "iframe",
|
123
|
+
allowFullScreen: true,
|
124
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
125
|
+
}));
|
126
|
+
}
|
127
|
+
|
128
|
+
case VideoTypes.VK:
|
129
|
+
{
|
130
|
+
var _videoSrc$split = videoSrc.split('_'),
|
131
|
+
_videoSrc$split2 = _slicedToArray(_videoSrc$split, 2),
|
132
|
+
oid = _videoSrc$split2[0],
|
133
|
+
id = _videoSrc$split2[1];
|
134
|
+
|
135
|
+
var _url = "https://vk.com/video_ext.php?oid=-".concat(oid, "}&id=").concat(id, "&");
|
136
|
+
|
137
|
+
var _autoplay = "&autoplay=".concat(isAutoplay ? 1 : 0);
|
138
|
+
|
139
|
+
var _src2 = "".concat(_url).concat(_autoplay);
|
140
|
+
|
141
|
+
return /*#__PURE__*/React.createElement("div", {
|
142
|
+
className: cn('vk')
|
143
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
144
|
+
className: cn('iframe'),
|
145
|
+
src: _src2,
|
146
|
+
width: "100%",
|
147
|
+
height: "100%",
|
148
|
+
frameBorder: "0",
|
149
|
+
allow: "autoplay",
|
150
|
+
title: "iframe",
|
151
|
+
allowFullScreen: true,
|
152
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
153
|
+
}));
|
154
|
+
}
|
155
|
+
|
69
156
|
case VideoTypes.VIDEO:
|
70
157
|
{
|
71
158
|
return (
|
@@ -16,6 +16,10 @@ export declare type Props = {
|
|
16
16
|
color?: TextColorType;
|
17
17
|
/** Включить микроразметку */
|
18
18
|
hasMicrodata?: boolean;
|
19
|
+
/** Отключить на разрешении < 768 px */
|
20
|
+
disabledOnMobile?: boolean;
|
21
|
+
/** Отступ сверху */
|
22
|
+
hasMarginTop?: boolean;
|
19
23
|
/** Дополнительные классы для корневого и внутренних элементов */
|
20
24
|
classes?: {
|
21
25
|
item?: string;
|
@@ -21,6 +21,8 @@ var _uiHelpers = require("@megafon/ui-helpers");
|
|
21
21
|
|
22
22
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
23
23
|
|
24
|
+
var _useResolutions2 = _interopRequireDefault(require("../../hooks/useResolutions"));
|
25
|
+
|
24
26
|
var _BreadcrumbsItem = _interopRequireWildcard(require("./components/BreadcrumbsItem"));
|
25
27
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -44,10 +46,23 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
44
46
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
45
47
|
dataAttrs = _ref.dataAttrs,
|
46
48
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
47
|
-
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata
|
49
|
+
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
50
|
+
_ref$disabledOnMobile = _ref.disabledOnMobile,
|
51
|
+
disabledOnMobile = _ref$disabledOnMobile === void 0 ? false : _ref$disabledOnMobile,
|
52
|
+
_ref$hasMarginTop = _ref.hasMarginTop,
|
53
|
+
hasMarginTop = _ref$hasMarginTop === void 0 ? false : _ref$hasMarginTop;
|
54
|
+
|
55
|
+
var _useResolutions = (0, _useResolutions2["default"])(),
|
56
|
+
isMobile = _useResolutions.isMobile;
|
57
|
+
|
58
|
+
if (isMobile && disabledOnMobile) {
|
59
|
+
return null;
|
60
|
+
}
|
61
|
+
|
48
62
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
49
63
|
className: cn({
|
50
|
-
color: color
|
64
|
+
color: color,
|
65
|
+
'margin-top': hasMarginTop
|
51
66
|
}, className)
|
52
67
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), hasMicrodata && {
|
53
68
|
itemScope: true,
|
@@ -100,7 +115,8 @@ Breadcrumbs.propTypes = {
|
|
100
115
|
href: _propTypes["default"].string
|
101
116
|
}).isRequired)]).isRequired,
|
102
117
|
color: _propTypes["default"].oneOf(Object.values(_BreadcrumbsItem.TextColor)),
|
103
|
-
hasMicrodata: _propTypes["default"].bool
|
118
|
+
hasMicrodata: _propTypes["default"].bool,
|
119
|
+
disabledOnMobile: _propTypes["default"].bool
|
104
120
|
};
|
105
121
|
var _default = Breadcrumbs;
|
106
122
|
exports["default"] = _default;
|
@@ -84,6 +84,8 @@ export interface IImageBannerProps {
|
|
84
84
|
badges?: JSX.Element[] | JSX.Element;
|
85
85
|
/** Элемент блока с рекламой */
|
86
86
|
adBlock?: JSX.Element | null;
|
87
|
+
/** Отступ сверху */
|
88
|
+
hasMarginTop?: boolean;
|
87
89
|
}
|
88
90
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
89
91
|
export default ImageBanner;
|
@@ -119,6 +119,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
119
119
|
isImageFullWidth = _ref2.isImageFullWidth,
|
120
120
|
badges = _ref2.badges,
|
121
121
|
adBlock = _ref2.adBlock,
|
122
|
+
_ref2$hasMarginTop = _ref2.hasMarginTop,
|
123
|
+
hasMarginTop = _ref2$hasMarginTop === void 0 ? false : _ref2$hasMarginTop,
|
122
124
|
_ref2$children = _ref2.children,
|
123
125
|
children = _ref2$children === void 0 ? [] : _ref2$children;
|
124
126
|
|
@@ -194,7 +196,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
194
196
|
'has-image': hasImage,
|
195
197
|
'auto-height': autoHeight,
|
196
198
|
'full-width': isImageFullWidth,
|
197
|
-
radius: radius
|
199
|
+
radius: radius,
|
200
|
+
'margin-top': hasMarginTop
|
198
201
|
}, [className, classes.root]),
|
199
202
|
ref: rootRef
|
200
203
|
}), renderContent, hasImage && renderImage);
|
@@ -239,7 +242,8 @@ ImageBanner.propTypes = {
|
|
239
242
|
autoHeight: PropTypes.bool,
|
240
243
|
isImageFullWidth: PropTypes.bool,
|
241
244
|
badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
|
242
|
-
adBlock: PropTypes.element
|
245
|
+
adBlock: PropTypes.element,
|
246
|
+
hasMarginTop: PropTypes.bool
|
243
247
|
};
|
244
248
|
var _default = ImageBanner;
|
245
249
|
exports["default"] = _default;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -9,14 +9,6 @@ h5 {
|
|
9
9
|
display: inline-block;
|
10
10
|
width: 100%;
|
11
11
|
}
|
12
|
-
.mfui-v6-page-title__breadcrumbs {
|
13
|
-
margin-top: 32px;
|
14
|
-
}
|
15
|
-
@media screen and (max-width: 767px) {
|
16
|
-
.mfui-v6-page-title__breadcrumbs {
|
17
|
-
display: none;
|
18
|
-
}
|
19
|
-
}
|
20
12
|
.mfui-v6-page-title__title {
|
21
13
|
margin-top: 110px;
|
22
14
|
}
|
@@ -72,6 +72,8 @@ var PageTitle = function PageTitle(_ref) {
|
|
72
72
|
className: cn([className]),
|
73
73
|
ref: rootRef
|
74
74
|
}), (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
75
|
+
disabledOnMobile: true,
|
76
|
+
hasMarginTop: true,
|
75
77
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
76
78
|
items: breadcrumbs,
|
77
79
|
dataAttrs: {
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -260,6 +260,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
260
260
|
}), /*#__PURE__*/_react["default"].createElement(_uiCore.ContentArea, null, /*#__PURE__*/_react["default"].createElement("div", {
|
261
261
|
className: cn('wrapper')
|
262
262
|
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/_react["default"].createElement(_Breadcrumbs["default"], {
|
263
|
+
disabledOnMobile: true,
|
263
264
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
264
265
|
dataAttrs: {
|
265
266
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -82,7 +82,9 @@ h5 {
|
|
82
82
|
-webkit-filter: brightness(108.5%);
|
83
83
|
filter: brightness(108.5%);
|
84
84
|
}
|
85
|
-
.mfui-v6-video-block__youtube
|
85
|
+
.mfui-v6-video-block__youtube,
|
86
|
+
.mfui-v6-video-block__rutube,
|
87
|
+
.mfui-v6-video-block__vk {
|
86
88
|
position: relative;
|
87
89
|
padding-bottom: 56.25%;
|
88
90
|
}
|
@@ -18,6 +18,8 @@ export interface IContent {
|
|
18
18
|
}
|
19
19
|
export declare const VideoTypes: {
|
20
20
|
readonly YOUTUBE: "youtube";
|
21
|
+
readonly RUTUBE: "rutube";
|
22
|
+
readonly VK: "vk";
|
21
23
|
readonly VIDEO: "video";
|
22
24
|
};
|
23
25
|
declare type VideoType = typeof VideoTypes[keyof typeof VideoTypes];
|
@@ -41,7 +43,7 @@ export interface IVideoBlockProps {
|
|
41
43
|
content?: IContent;
|
42
44
|
/** Тип видео */
|
43
45
|
videoType?: VideoType;
|
44
|
-
/** Источник видео. Если видео с youtube, то необходимо указать id */
|
46
|
+
/** Источник видео. Если видео с youtube или rutube, то необходимо указать id. Для видео из VK необходимо указать полный id вместе с _ (например: 22822305_456241864) */
|
45
47
|
videoSrc: string;
|
46
48
|
/** Наличие звука в видео */
|
47
49
|
isMuted?: boolean;
|