@megafon/ui-shared 7.2.1 → 7.4.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 +1 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +13 -2
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -1
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +3 -0
- package/dist/es/components/ImageBanner/ImageBanner.css +1 -1
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +2 -0
- package/dist/es/components/ImageBanner/ImageBanner.js +3 -0
- package/dist/es/components/PageTitle/PageTitle.css +1 -1
- package/dist/es/components/PageTitle/PageTitle.js +2 -0
- package/dist/es/components/VideoBanner/VideoBanner.css +1 -1
- package/dist/es/components/VideoBanner/VideoBanner.js +1 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +1 -1
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +3 -1
- package/dist/es/components/VideoBlock/VideoBlock.js +73 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +13 -2
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -1
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +3 -0
- package/dist/lib/components/ImageBanner/ImageBanner.css +1 -1
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +2 -0
- package/dist/lib/components/ImageBanner/ImageBanner.js +3 -0
- package/dist/lib/components/PageTitle/PageTitle.css +1 -1
- package/dist/lib/components/PageTitle/PageTitle.js +2 -0
- package/dist/lib/components/VideoBanner/VideoBanner.css +1 -1
- package/dist/lib/components/VideoBanner/VideoBanner.js +1 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +1 -1
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +3 -1
- package/dist/lib/components/VideoBlock/VideoBlock.js +73 -0
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
@charset "UTF-8";h1,h2,h3,h4,h5{margin:0}.mfui-breadcrumbs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.mfui-breadcrumbs_color_default .mfui-breadcrumbs__item:before{color:var(--content)}.mfui-breadcrumbs_color_black .mfui-breadcrumbs__item:before{color:var(--stcBlack)}.mfui-breadcrumbs_color_white .mfui-breadcrumbs__item:before{color:var(--stcWhite)}.mfui-breadcrumbs__item{margin-right:10px;padding-left:26px;position:relative}.mfui-breadcrumbs__item:before{content:"→";left:0;position:absolute;top:-1px}.mfui-breadcrumbs__item:first-child{padding-left:0}.mfui-breadcrumbs__item:first-child:before{display:none}.mfui-breadcrumbs__item:last-child{pointer-events:none}
|
1
|
+
@charset "UTF-8";h1,h2,h3,h4,h5{margin:0}.mfui-breadcrumbs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.mfui-breadcrumbs_color_default .mfui-breadcrumbs__item:before{color:var(--content)}.mfui-breadcrumbs_color_black .mfui-breadcrumbs__item:before{color:var(--stcBlack)}.mfui-breadcrumbs_color_white .mfui-breadcrumbs__item:before{color:var(--stcWhite)}.mfui-breadcrumbs_margin-top{margin-top:24px}.mfui-breadcrumbs__item{margin-right:10px;padding-left:26px;position:relative}.mfui-breadcrumbs__item:before{content:"→";left:0;position:absolute;top:-1px}.mfui-breadcrumbs__item:first-child{padding-left:0}.mfui-breadcrumbs__item:first-child:before{display:none}.mfui-breadcrumbs__item:last-child{pointer-events:none}
|
@@ -16,6 +16,10 @@ export 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;
|
@@ -3,6 +3,7 @@ import "core-js/modules/es.array.map.js";
|
|
3
3
|
import "core-js/modules/es.string.link.js";
|
4
4
|
import * as React from 'react';
|
5
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
6
|
+
import useResolutions from "../../hooks/useResolutions";
|
6
7
|
import BreadcrumbsItem from "./components/BreadcrumbsItem";
|
7
8
|
import "./Breadcrumbs.css";
|
8
9
|
var isObjectElement = function isObjectElement(item) {
|
@@ -18,10 +19,20 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
18
19
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
19
20
|
dataAttrs = _ref.dataAttrs,
|
20
21
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
21
|
-
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata
|
22
|
+
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
23
|
+
_ref$disabledOnMobile = _ref.disabledOnMobile,
|
24
|
+
disabledOnMobile = _ref$disabledOnMobile === void 0 ? false : _ref$disabledOnMobile,
|
25
|
+
_ref$hasMarginTop = _ref.hasMarginTop,
|
26
|
+
hasMarginTop = _ref$hasMarginTop === void 0 ? false : _ref$hasMarginTop;
|
27
|
+
var _useResolutions = useResolutions(),
|
28
|
+
isMobile = _useResolutions.isMobile;
|
29
|
+
if (isMobile && disabledOnMobile) {
|
30
|
+
return null;
|
31
|
+
}
|
22
32
|
return /*#__PURE__*/React.createElement("div", _extends({
|
23
33
|
className: cn({
|
24
|
-
color: color
|
34
|
+
color: color,
|
35
|
+
'margin-top': hasMarginTop
|
25
36
|
}, className)
|
26
37
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), hasMicrodata && {
|
27
38
|
itemScope: true,
|
@@ -24,7 +24,9 @@ export interface IButtonLinkBoxProps {
|
|
24
24
|
/** Добавляет атрибут download для тега <a> компонента Button */
|
25
25
|
buttonDownload?: boolean;
|
26
26
|
/** Цвет кнопки */
|
27
|
-
buttonColor?: 'green' | 'purple';
|
27
|
+
buttonColor?: 'green' | 'purple' | 'green-soft' | 'purple-soft' | 'black';
|
28
|
+
/** Тип кнопки */
|
29
|
+
buttonType?: 'primary' | 'outline';
|
28
30
|
/** Target свойство кнопки */
|
29
31
|
buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
|
30
32
|
/** Rel - атрибут тега <a> для кнопки */
|
@@ -13,6 +13,8 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
13
13
|
buttonDownload = _ref.buttonDownload,
|
14
14
|
_ref$buttonColor = _ref.buttonColor,
|
15
15
|
buttonColor = _ref$buttonColor === void 0 ? 'green' : _ref$buttonColor,
|
16
|
+
_ref$buttonType = _ref.buttonType,
|
17
|
+
buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
|
16
18
|
buttonRel = _ref.buttonRel,
|
17
19
|
linkTitle = _ref.linkTitle,
|
18
20
|
linkUrl = _ref.linkUrl,
|
@@ -40,6 +42,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
40
42
|
className: classes.button,
|
41
43
|
href: buttonUrl,
|
42
44
|
theme: buttonColor,
|
45
|
+
type: buttonType,
|
43
46
|
onClick: onButtonClick,
|
44
47
|
target: buttonTarget,
|
45
48
|
download: buttonDownload,
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_margin-top{margin-top:24px}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
|
@@ -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
|
children?: React.ReactNode;
|
88
90
|
}
|
89
91
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
@@ -85,6 +85,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
85
85
|
isImageFullWidth = _ref2.isImageFullWidth,
|
86
86
|
badges = _ref2.badges,
|
87
87
|
adBlock = _ref2.adBlock,
|
88
|
+
_ref2$hasMarginTop = _ref2.hasMarginTop,
|
89
|
+
hasMarginTop = _ref2$hasMarginTop === void 0 ? false : _ref2$hasMarginTop,
|
88
90
|
_ref2$children = _ref2.children,
|
89
91
|
children = _ref2$children === void 0 ? [] : _ref2$children;
|
90
92
|
var _React$useState = React.useState(false),
|
@@ -150,6 +152,7 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
150
152
|
'has-image': hasImage,
|
151
153
|
'auto-height': autoHeight,
|
152
154
|
'full-width': isImageFullWidth,
|
155
|
+
'margin-top': hasMarginTop,
|
153
156
|
radius: radius
|
154
157
|
}, [className, classes.root]),
|
155
158
|
ref: rootRef
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-page-title{display:inline-block;width:100%}.mfui-page-
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-page-title{display:inline-block;width:100%}.mfui-page-title__title{margin-top:110px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__title{margin-top:100px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__title{margin-top:90px}}@media screen and (max-width:767px){.mfui-page-title__title{margin-top:45px}}.mfui-page-title__badge{background-color:var(--brandPurple);color:var(--stcWhite);display:inline-block;font-size:12px;font-weight:500;line-height:18px;margin-top:16px;padding:2px 14px}@media screen and (min-width:1280px){.mfui-page-title__badge_under-breadcrumbs{margin-top:32px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__badge_under-breadcrumbs{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__badge_under-breadcrumbs{margin-top:16px}}@media screen and (min-width:1280px){.mfui-page-title__title_under-breadcrumbs{margin-top:60px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__title_under-breadcrumbs{margin-top:50px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__title_under-breadcrumbs{margin-top:45px}}.mfui-page-title__badge+.mfui-page-title__title{margin-top:8px}
|
@@ -50,6 +50,8 @@ var PageTitle = function PageTitle(_ref) {
|
|
50
50
|
className: cn([className]),
|
51
51
|
ref: rootRef
|
52
52
|
}), (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(Breadcrumbs, {
|
53
|
+
disabledOnMobile: true,
|
54
|
+
hasMarginTop: true,
|
53
55
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
54
56
|
items: breadcrumbs,
|
55
57
|
dataAttrs: {
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-video-banner{overflow:hidden;position:relative}@media screen and (min-width:1280px){.mfui-video-banner{margin-left:-80px;margin-right:-80px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner{margin-left:-64px;margin-right:-64px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner{margin-left:-48px;margin-right:-48px}}@media screen and (max-width:767px){.mfui-video-banner{margin-left:-16px;margin-right:-16px}}.mfui-video-banner_bottom-shadow:after{background:-webkit-gradient(linear,left top,left bottom,color-stop(95.25%,hsla(0,0%,100%,0)),to(rgba(0,0,0,.024)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 95.25%,rgba(0,0,0,.024));bottom:0;content:"";height:100%;position:absolute;right:0;width:100%}.mfui-video-banner__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:400px}@media screen and (min-width:1440px){.mfui-video-banner__wrapper{height:562px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__wrapper{height:500px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:52px;padding-top:52px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:64px;padding-top:64px}}@media screen and (max-width:767px){.mfui-video-banner__wrapper{max-height:488px;padding-bottom:42px;padding-top:42px}}.mfui-video-banner__background-image,.mfui-video-banner__video{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mfui-video-banner__background-image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-video-banner__content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}@media screen and (min-width:1440px){.mfui-video-banner__content{max-height:422px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__content{max-height:360px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__content{max-height:336px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__content{max-height:312px}}@media screen and (max-width:767px){.mfui-video-banner__content{max-height:404px}}.mfui-video-banner__content_text-color_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color_white{color:var(--stcWhite)}@media screen and (max-width:767px){.mfui-video-banner__content_text-color-mobile_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color-mobile_white{color:var(--stcWhite)}}.mfui-video-banner__description{margin-bottom:32px;white-space:pre-wrap}.mfui-video-banner__title{margin-bottom:24px}@media screen and (max-width:767px){.mfui-video-banner__title{margin-bottom:20px}}.mfui-video-banner__text,.mfui-video-banner__title{white-space:pre-wrap}@media screen and (max-width:767px){.mfui-video-banner__text,.mfui-video-banner__title{text-align:center}}.mfui-video-banner__btns-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:-24px -10px 0}@media screen and (max-width:767px){.mfui-video-banner__btns-wrapper{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}@media screen and (max-width:479px){.mfui-video-banner__btns-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mfui-video-banner__button,.mfui-video-banner__link{margin:24px 10px 0}.mfui-video-banner__cost{font-size:12px;line-height:18px;margin-bottom:18px}.mfui-video-banner__value{display:inline;margin:0 3px}.mfui-video-banner__breadcrumbs,.mfui-video-banner__content{z-index:1}.mfui-video-banner__breadcrumbs{position:absolute;top:32px}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-banner{overflow:hidden;position:relative}@media screen and (min-width:1280px){.mfui-video-banner{margin-left:-80px;margin-right:-80px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner{margin-left:-64px;margin-right:-64px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner{margin-left:-48px;margin-right:-48px}}@media screen and (max-width:767px){.mfui-video-banner{margin-left:-16px;margin-right:-16px}}.mfui-video-banner_bottom-shadow:after{background:-webkit-gradient(linear,left top,left bottom,color-stop(95.25%,hsla(0,0%,100%,0)),to(rgba(0,0,0,.024)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 95.25%,rgba(0,0,0,.024));bottom:0;content:"";height:100%;position:absolute;right:0;width:100%}.mfui-video-banner__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:400px}@media screen and (min-width:1440px){.mfui-video-banner__wrapper{height:562px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__wrapper{height:500px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:52px;padding-top:52px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:64px;padding-top:64px}}@media screen and (max-width:767px){.mfui-video-banner__wrapper{max-height:488px;padding-bottom:42px;padding-top:42px}}.mfui-video-banner__background-image,.mfui-video-banner__video{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mfui-video-banner__background-image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-video-banner__content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}@media screen and (min-width:1440px){.mfui-video-banner__content{max-height:422px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__content{max-height:360px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__content{max-height:336px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__content{max-height:312px}}@media screen and (max-width:767px){.mfui-video-banner__content{max-height:404px}}.mfui-video-banner__content_text-color_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color_white{color:var(--stcWhite)}@media screen and (max-width:767px){.mfui-video-banner__content_text-color-mobile_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color-mobile_white{color:var(--stcWhite)}}.mfui-video-banner__description{margin-bottom:32px;white-space:pre-wrap}.mfui-video-banner__title{margin-bottom:24px}@media screen and (max-width:767px){.mfui-video-banner__title{margin-bottom:20px}}.mfui-video-banner__text,.mfui-video-banner__title{white-space:pre-wrap}@media screen and (max-width:767px){.mfui-video-banner__text,.mfui-video-banner__title{text-align:center}}.mfui-video-banner__btns-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:-24px -10px 0}@media screen and (max-width:767px){.mfui-video-banner__btns-wrapper{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}@media screen and (max-width:479px){.mfui-video-banner__btns-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mfui-video-banner__button,.mfui-video-banner__link{margin:24px 10px 0}.mfui-video-banner__cost{font-size:12px;line-height:18px;margin-bottom:18px}.mfui-video-banner__value{display:inline;margin:0 3px}.mfui-video-banner__breadcrumbs,.mfui-video-banner__content{z-index:1}.mfui-video-banner__breadcrumbs{position:absolute;top:32px}.mfui-video-banner__grid{width:100%}
|
@@ -213,6 +213,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
213
213
|
}), /*#__PURE__*/React.createElement(ContentArea, null, /*#__PURE__*/React.createElement("div", {
|
214
214
|
className: cn('wrapper')
|
215
215
|
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(Breadcrumbs, {
|
216
|
+
disabledOnMobile: true,
|
216
217
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
217
218
|
dataAttrs: {
|
218
219
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-video-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-video-block,.mfui-video-block__content{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-video-block__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:767px){.mfui-video-block__content{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-block__content{margin-top:32px}}@media screen and (min-width:1024px){.mfui-video-block__content{height:100%;margin-right:20px;padding-right:20px}.mfui-video-block__content_position-right{margin:0 0 0 20px;padding:0 0 0 20px}}.mfui-video-block__header{margin-bottom:24px}@media screen and (max-width:1023px){.mfui-video-block__header{margin-bottom:16px}}.mfui-video-block__description{font-size:15px;font-weight:400;line-height:24px}.mfui-video-block__button{-ms-flex-item-align:start;align-self:flex-start;margin-top:32px;max-width:100%}@media screen and (max-width:767px){.mfui-video-block__button{-ms-flex-item-align:center;align-self:center}}.mfui-video-block__video{-o-object-fit:contain;object-fit:contain;width:100%}.mfui-video-block__video_fix-background{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-video-block__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-video-block,.mfui-video-block__content{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-video-block__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:767px){.mfui-video-block__content{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-block__content{margin-top:32px}}@media screen and (min-width:1024px){.mfui-video-block__content{height:100%;margin-right:20px;padding-right:20px}.mfui-video-block__content_position-right{margin:0 0 0 20px;padding:0 0 0 20px}}.mfui-video-block__header{margin-bottom:24px}@media screen and (max-width:1023px){.mfui-video-block__header{margin-bottom:16px}}.mfui-video-block__description{font-size:15px;font-weight:400;line-height:24px}.mfui-video-block__button{-ms-flex-item-align:start;align-self:flex-start;margin-top:32px;max-width:100%}@media screen and (max-width:767px){.mfui-video-block__button{-ms-flex-item-align:center;align-self:center}}.mfui-video-block__video{-o-object-fit:contain;object-fit:contain;width:100%}.mfui-video-block__video_fix-background{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-video-block__rutube,.mfui-video-block__vk,.mfui-video-block__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
@@ -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
|
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,13 +1,18 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
3
|
import "core-js/modules/es.symbol.js";
|
3
4
|
import "core-js/modules/es.symbol.description.js";
|
4
5
|
import "core-js/modules/es.array.concat.js";
|
6
|
+
import "core-js/modules/es.date.to-json.js";
|
7
|
+
import "core-js/modules/es.json.stringify.js";
|
5
8
|
import * as React from 'react';
|
6
9
|
import { Header, Button, Grid, GridColumn } from '@megafon/ui-core';
|
7
10
|
import { cnCreate, filterDataAttrs, convert, titleConvertConfig, textConvertConfig } from '@megafon/ui-helpers';
|
8
11
|
import "./VideoBlock.css";
|
9
12
|
export var VideoTypes = {
|
10
13
|
YOUTUBE: 'youtube',
|
14
|
+
RUTUBE: 'rutube',
|
15
|
+
VK: 'vk',
|
11
16
|
VIDEO: 'video'
|
12
17
|
};
|
13
18
|
export var testIdPrefix = 'VideoBlock';
|
@@ -33,6 +38,33 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
33
38
|
playsinline = _ref$playsinline === void 0 ? false : _ref$playsinline,
|
34
39
|
_ref$fixWhiteVideoBac = _ref.fixWhiteVideoBackground,
|
35
40
|
fixWhiteVideoBackground = _ref$fixWhiteVideoBac === void 0 ? false : _ref$fixWhiteVideoBac;
|
41
|
+
var rutubeRef = React.useRef(null);
|
42
|
+
var autoPlayRutube = function autoPlayRutube() {
|
43
|
+
var current = rutubeRef.current;
|
44
|
+
if (current == null) {
|
45
|
+
return;
|
46
|
+
}
|
47
|
+
window.IntersectionObserver && new window.IntersectionObserver(function (entries, obs) {
|
48
|
+
var _a;
|
49
|
+
var _entries = _slicedToArray(entries, 1),
|
50
|
+
entry = _entries[0];
|
51
|
+
if (entry && entry.isIntersecting) {
|
52
|
+
(_a = current.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify({
|
53
|
+
type: 'player:play',
|
54
|
+
data: {}
|
55
|
+
}), '*');
|
56
|
+
obs.disconnect();
|
57
|
+
}
|
58
|
+
}, {
|
59
|
+
threshold: 0.5
|
60
|
+
}).observe(current);
|
61
|
+
};
|
62
|
+
React.useEffect(function () {
|
63
|
+
if (!isAutoplay || videoType !== VideoTypes.RUTUBE) {
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
autoPlayRutube();
|
67
|
+
}, [isAutoplay, videoType]);
|
36
68
|
var renderVideo = React.useCallback(function () {
|
37
69
|
switch (videoType) {
|
38
70
|
case VideoTypes.YOUTUBE:
|
@@ -62,6 +94,47 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
62
94
|
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
63
95
|
}));
|
64
96
|
}
|
97
|
+
case VideoTypes.RUTUBE:
|
98
|
+
{
|
99
|
+
var _src = "https://rutube.ru/play/embed/".concat(videoSrc, "?");
|
100
|
+
return /*#__PURE__*/React.createElement("div", {
|
101
|
+
className: cn('rutube')
|
102
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
103
|
+
className: cn('iframe'),
|
104
|
+
ref: rutubeRef,
|
105
|
+
src: _src,
|
106
|
+
width: "100%",
|
107
|
+
height: "100%",
|
108
|
+
frameBorder: "0",
|
109
|
+
allow: "autoplay",
|
110
|
+
title: "iframe",
|
111
|
+
allowFullScreen: true,
|
112
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
113
|
+
}));
|
114
|
+
}
|
115
|
+
case VideoTypes.VK:
|
116
|
+
{
|
117
|
+
var _videoSrc$split = videoSrc.split('_'),
|
118
|
+
_videoSrc$split2 = _slicedToArray(_videoSrc$split, 2),
|
119
|
+
oid = _videoSrc$split2[0],
|
120
|
+
id = _videoSrc$split2[1];
|
121
|
+
var _url = "https://vk.com/video_ext.php?oid=-".concat(oid, "}&id=").concat(id, "&");
|
122
|
+
var _autoplay = "&autoplay=".concat(isAutoplay ? 1 : 0);
|
123
|
+
var _src2 = "".concat(_url).concat(_autoplay);
|
124
|
+
return /*#__PURE__*/React.createElement("div", {
|
125
|
+
className: cn('vk')
|
126
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
127
|
+
className: cn('iframe'),
|
128
|
+
src: _src2,
|
129
|
+
width: "100%",
|
130
|
+
height: "100%",
|
131
|
+
frameBorder: "0",
|
132
|
+
allow: "autoplay",
|
133
|
+
title: "iframe",
|
134
|
+
allowFullScreen: true,
|
135
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
136
|
+
}));
|
137
|
+
}
|
65
138
|
case VideoTypes.VIDEO:
|
66
139
|
{
|
67
140
|
return (
|
@@ -1 +1 @@
|
|
1
|
-
@charset "UTF-8";h1,h2,h3,h4,h5{margin:0}.mfui-breadcrumbs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.mfui-breadcrumbs_color_default .mfui-breadcrumbs__item:before{color:var(--content)}.mfui-breadcrumbs_color_black .mfui-breadcrumbs__item:before{color:var(--stcBlack)}.mfui-breadcrumbs_color_white .mfui-breadcrumbs__item:before{color:var(--stcWhite)}.mfui-breadcrumbs__item{margin-right:10px;padding-left:26px;position:relative}.mfui-breadcrumbs__item:before{content:"→";left:0;position:absolute;top:-1px}.mfui-breadcrumbs__item:first-child{padding-left:0}.mfui-breadcrumbs__item:first-child:before{display:none}.mfui-breadcrumbs__item:last-child{pointer-events:none}
|
1
|
+
@charset "UTF-8";h1,h2,h3,h4,h5{margin:0}.mfui-breadcrumbs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.mfui-breadcrumbs_color_default .mfui-breadcrumbs__item:before{color:var(--content)}.mfui-breadcrumbs_color_black .mfui-breadcrumbs__item:before{color:var(--stcBlack)}.mfui-breadcrumbs_color_white .mfui-breadcrumbs__item:before{color:var(--stcWhite)}.mfui-breadcrumbs_margin-top{margin-top:24px}.mfui-breadcrumbs__item{margin-right:10px;padding-left:26px;position:relative}.mfui-breadcrumbs__item:before{content:"→";left:0;position:absolute;top:-1px}.mfui-breadcrumbs__item:first-child{padding-left:0}.mfui-breadcrumbs__item:first-child:before{display:none}.mfui-breadcrumbs__item:last-child{pointer-events:none}
|
@@ -16,6 +16,10 @@ export 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;
|
@@ -10,6 +10,7 @@ require("core-js/modules/es.array.map.js");
|
|
10
10
|
require("core-js/modules/es.string.link.js");
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
12
12
|
var _uiHelpers = require("@megafon/ui-helpers");
|
13
|
+
var _useResolutions2 = _interopRequireDefault(require("../../hooks/useResolutions"));
|
13
14
|
var _BreadcrumbsItem = _interopRequireDefault(require("./components/BreadcrumbsItem"));
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
15
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -27,10 +28,20 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
27
28
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
28
29
|
dataAttrs = _ref.dataAttrs,
|
29
30
|
_ref$hasMicrodata = _ref.hasMicrodata,
|
30
|
-
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata
|
31
|
+
hasMicrodata = _ref$hasMicrodata === void 0 ? false : _ref$hasMicrodata,
|
32
|
+
_ref$disabledOnMobile = _ref.disabledOnMobile,
|
33
|
+
disabledOnMobile = _ref$disabledOnMobile === void 0 ? false : _ref$disabledOnMobile,
|
34
|
+
_ref$hasMarginTop = _ref.hasMarginTop,
|
35
|
+
hasMarginTop = _ref$hasMarginTop === void 0 ? false : _ref$hasMarginTop;
|
36
|
+
var _useResolutions = (0, _useResolutions2["default"])(),
|
37
|
+
isMobile = _useResolutions.isMobile;
|
38
|
+
if (isMobile && disabledOnMobile) {
|
39
|
+
return null;
|
40
|
+
}
|
31
41
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
32
42
|
className: cn({
|
33
|
-
color: color
|
43
|
+
color: color,
|
44
|
+
'margin-top': hasMarginTop
|
34
45
|
}, className)
|
35
46
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), hasMicrodata && {
|
36
47
|
itemScope: true,
|
@@ -24,7 +24,9 @@ export interface IButtonLinkBoxProps {
|
|
24
24
|
/** Добавляет атрибут download для тега <a> компонента Button */
|
25
25
|
buttonDownload?: boolean;
|
26
26
|
/** Цвет кнопки */
|
27
|
-
buttonColor?: 'green' | 'purple';
|
27
|
+
buttonColor?: 'green' | 'purple' | 'green-soft' | 'purple-soft' | 'black';
|
28
|
+
/** Тип кнопки */
|
29
|
+
buttonType?: 'primary' | 'outline';
|
28
30
|
/** Target свойство кнопки */
|
29
31
|
buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
|
30
32
|
/** Rel - атрибут тега <a> для кнопки */
|
@@ -22,6 +22,8 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
22
22
|
buttonDownload = _ref.buttonDownload,
|
23
23
|
_ref$buttonColor = _ref.buttonColor,
|
24
24
|
buttonColor = _ref$buttonColor === void 0 ? 'green' : _ref$buttonColor,
|
25
|
+
_ref$buttonType = _ref.buttonType,
|
26
|
+
buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
|
25
27
|
buttonRel = _ref.buttonRel,
|
26
28
|
linkTitle = _ref.linkTitle,
|
27
29
|
linkUrl = _ref.linkUrl,
|
@@ -49,6 +51,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
49
51
|
className: classes.button,
|
50
52
|
href: buttonUrl,
|
51
53
|
theme: buttonColor,
|
54
|
+
type: buttonType,
|
52
55
|
onClick: onButtonClick,
|
53
56
|
target: buttonTarget,
|
54
57
|
download: buttonDownload,
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_margin-top{margin-top:24px}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
|
@@ -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
|
children?: React.ReactNode;
|
88
90
|
}
|
89
91
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
@@ -94,6 +94,8 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
94
94
|
isImageFullWidth = _ref2.isImageFullWidth,
|
95
95
|
badges = _ref2.badges,
|
96
96
|
adBlock = _ref2.adBlock,
|
97
|
+
_ref2$hasMarginTop = _ref2.hasMarginTop,
|
98
|
+
hasMarginTop = _ref2$hasMarginTop === void 0 ? false : _ref2$hasMarginTop,
|
97
99
|
_ref2$children = _ref2.children,
|
98
100
|
children = _ref2$children === void 0 ? [] : _ref2$children;
|
99
101
|
var _React$useState = React.useState(false),
|
@@ -159,6 +161,7 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
159
161
|
'has-image': hasImage,
|
160
162
|
'auto-height': autoHeight,
|
161
163
|
'full-width': isImageFullWidth,
|
164
|
+
'margin-top': hasMarginTop,
|
162
165
|
radius: radius
|
163
166
|
}, [className, classes.root]),
|
164
167
|
ref: rootRef
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-page-title{display:inline-block;width:100%}.mfui-page-
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-page-title{display:inline-block;width:100%}.mfui-page-title__title{margin-top:110px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__title{margin-top:100px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__title{margin-top:90px}}@media screen and (max-width:767px){.mfui-page-title__title{margin-top:45px}}.mfui-page-title__badge{background-color:var(--brandPurple);color:var(--stcWhite);display:inline-block;font-size:12px;font-weight:500;line-height:18px;margin-top:16px;padding:2px 14px}@media screen and (min-width:1280px){.mfui-page-title__badge_under-breadcrumbs{margin-top:32px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__badge_under-breadcrumbs{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__badge_under-breadcrumbs{margin-top:16px}}@media screen and (min-width:1280px){.mfui-page-title__title_under-breadcrumbs{margin-top:60px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-page-title__title_under-breadcrumbs{margin-top:50px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-page-title__title_under-breadcrumbs{margin-top:45px}}.mfui-page-title__badge+.mfui-page-title__title{margin-top:8px}
|
@@ -59,6 +59,8 @@ var PageTitle = function PageTitle(_ref) {
|
|
59
59
|
className: cn([className]),
|
60
60
|
ref: rootRef
|
61
61
|
}), (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
62
|
+
disabledOnMobile: true,
|
63
|
+
hasMarginTop: true,
|
62
64
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
63
65
|
items: breadcrumbs,
|
64
66
|
dataAttrs: {
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-video-banner{overflow:hidden;position:relative}@media screen and (min-width:1280px){.mfui-video-banner{margin-left:-80px;margin-right:-80px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner{margin-left:-64px;margin-right:-64px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner{margin-left:-48px;margin-right:-48px}}@media screen and (max-width:767px){.mfui-video-banner{margin-left:-16px;margin-right:-16px}}.mfui-video-banner_bottom-shadow:after{background:-webkit-gradient(linear,left top,left bottom,color-stop(95.25%,hsla(0,0%,100%,0)),to(rgba(0,0,0,.024)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 95.25%,rgba(0,0,0,.024));bottom:0;content:"";height:100%;position:absolute;right:0;width:100%}.mfui-video-banner__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:400px}@media screen and (min-width:1440px){.mfui-video-banner__wrapper{height:562px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__wrapper{height:500px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:52px;padding-top:52px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:64px;padding-top:64px}}@media screen and (max-width:767px){.mfui-video-banner__wrapper{max-height:488px;padding-bottom:42px;padding-top:42px}}.mfui-video-banner__background-image,.mfui-video-banner__video{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mfui-video-banner__background-image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-video-banner__content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}@media screen and (min-width:1440px){.mfui-video-banner__content{max-height:422px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__content{max-height:360px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__content{max-height:336px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__content{max-height:312px}}@media screen and (max-width:767px){.mfui-video-banner__content{max-height:404px}}.mfui-video-banner__content_text-color_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color_white{color:var(--stcWhite)}@media screen and (max-width:767px){.mfui-video-banner__content_text-color-mobile_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color-mobile_white{color:var(--stcWhite)}}.mfui-video-banner__description{margin-bottom:32px;white-space:pre-wrap}.mfui-video-banner__title{margin-bottom:24px}@media screen and (max-width:767px){.mfui-video-banner__title{margin-bottom:20px}}.mfui-video-banner__text,.mfui-video-banner__title{white-space:pre-wrap}@media screen and (max-width:767px){.mfui-video-banner__text,.mfui-video-banner__title{text-align:center}}.mfui-video-banner__btns-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:-24px -10px 0}@media screen and (max-width:767px){.mfui-video-banner__btns-wrapper{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}@media screen and (max-width:479px){.mfui-video-banner__btns-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mfui-video-banner__button,.mfui-video-banner__link{margin:24px 10px 0}.mfui-video-banner__cost{font-size:12px;line-height:18px;margin-bottom:18px}.mfui-video-banner__value{display:inline;margin:0 3px}.mfui-video-banner__breadcrumbs,.mfui-video-banner__content{z-index:1}.mfui-video-banner__breadcrumbs{position:absolute;top:32px}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-banner{overflow:hidden;position:relative}@media screen and (min-width:1280px){.mfui-video-banner{margin-left:-80px;margin-right:-80px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner{margin-left:-64px;margin-right:-64px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner{margin-left:-48px;margin-right:-48px}}@media screen and (max-width:767px){.mfui-video-banner{margin-left:-16px;margin-right:-16px}}.mfui-video-banner_bottom-shadow:after{background:-webkit-gradient(linear,left top,left bottom,color-stop(95.25%,hsla(0,0%,100%,0)),to(rgba(0,0,0,.024)));background:linear-gradient(180deg,hsla(0,0%,100%,0) 95.25%,rgba(0,0,0,.024));bottom:0;content:"";height:100%;position:absolute;right:0;width:100%}.mfui-video-banner__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:400px}@media screen and (min-width:1440px){.mfui-video-banner__wrapper{height:562px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__wrapper{height:500px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:52px;padding-top:52px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__wrapper{max-height:440px;padding-bottom:64px;padding-top:64px}}@media screen and (max-width:767px){.mfui-video-banner__wrapper{max-height:488px;padding-bottom:42px;padding-top:42px}}.mfui-video-banner__background-image,.mfui-video-banner__video{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.mfui-video-banner__background-image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.mfui-video-banner__content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}@media screen and (min-width:1440px){.mfui-video-banner__content{max-height:422px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-video-banner__content{max-height:360px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-video-banner__content{max-height:336px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-banner__content{max-height:312px}}@media screen and (max-width:767px){.mfui-video-banner__content{max-height:404px}}.mfui-video-banner__content_text-color_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color_white{color:var(--stcWhite)}@media screen and (max-width:767px){.mfui-video-banner__content_text-color-mobile_black{color:var(--stcBlack)}.mfui-video-banner__content_text-color-mobile_white{color:var(--stcWhite)}}.mfui-video-banner__description{margin-bottom:32px;white-space:pre-wrap}.mfui-video-banner__title{margin-bottom:24px}@media screen and (max-width:767px){.mfui-video-banner__title{margin-bottom:20px}}.mfui-video-banner__text,.mfui-video-banner__title{white-space:pre-wrap}@media screen and (max-width:767px){.mfui-video-banner__text,.mfui-video-banner__title{text-align:center}}.mfui-video-banner__btns-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:-24px -10px 0}@media screen and (max-width:767px){.mfui-video-banner__btns-wrapper{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}@media screen and (max-width:479px){.mfui-video-banner__btns-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mfui-video-banner__button,.mfui-video-banner__link{margin:24px 10px 0}.mfui-video-banner__cost{font-size:12px;line-height:18px;margin-bottom:18px}.mfui-video-banner__value{display:inline;margin:0 3px}.mfui-video-banner__breadcrumbs,.mfui-video-banner__content{z-index:1}.mfui-video-banner__breadcrumbs{position:absolute;top:32px}.mfui-video-banner__grid{width:100%}
|
@@ -221,6 +221,7 @@ var VideoBanner = function VideoBanner(_ref2) {
|
|
221
221
|
}), /*#__PURE__*/React.createElement(_uiCore.ContentArea, null, /*#__PURE__*/React.createElement("div", {
|
222
222
|
className: cn('wrapper')
|
223
223
|
}, !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
224
|
+
disabledOnMobile: true,
|
224
225
|
hasMicrodata: hasBreadcrumbsMicrodata,
|
225
226
|
dataAttrs: {
|
226
227
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbs,
|
@@ -1 +1 @@
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-video-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-video-block,.mfui-video-block__content{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-video-block__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:767px){.mfui-video-block__content{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-block__content{margin-top:32px}}@media screen and (min-width:1024px){.mfui-video-block__content{height:100%;margin-right:20px;padding-right:20px}.mfui-video-block__content_position-right{margin:0 0 0 20px;padding:0 0 0 20px}}.mfui-video-block__header{margin-bottom:24px}@media screen and (max-width:1023px){.mfui-video-block__header{margin-bottom:16px}}.mfui-video-block__description{font-size:15px;font-weight:400;line-height:24px}.mfui-video-block__button{-ms-flex-item-align:start;align-self:flex-start;margin-top:32px;max-width:100%}@media screen and (max-width:767px){.mfui-video-block__button{-ms-flex-item-align:center;align-self:center}}.mfui-video-block__video{-o-object-fit:contain;object-fit:contain;width:100%}.mfui-video-block__video_fix-background{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-video-block__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-video-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-video-block,.mfui-video-block__content{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-video-block__content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:767px){.mfui-video-block__content{margin-top:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-video-block__content{margin-top:32px}}@media screen and (min-width:1024px){.mfui-video-block__content{height:100%;margin-right:20px;padding-right:20px}.mfui-video-block__content_position-right{margin:0 0 0 20px;padding:0 0 0 20px}}.mfui-video-block__header{margin-bottom:24px}@media screen and (max-width:1023px){.mfui-video-block__header{margin-bottom:16px}}.mfui-video-block__description{font-size:15px;font-weight:400;line-height:24px}.mfui-video-block__button{-ms-flex-item-align:start;align-self:flex-start;margin-top:32px;max-width:100%}@media screen and (max-width:767px){.mfui-video-block__button{-ms-flex-item-align:center;align-self:center}}.mfui-video-block__video{-o-object-fit:contain;object-fit:contain;width:100%}.mfui-video-block__video_fix-background{-webkit-filter:brightness(108.5%);filter:brightness(108.5%)}.mfui-video-block__rutube,.mfui-video-block__vk,.mfui-video-block__youtube{padding-bottom:56.25%;position:relative}.mfui-video-block__iframe{left:0;position:absolute;top:0}.mfui-video-block__grid{width:100%}
|
@@ -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
|
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;
|
@@ -6,9 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.testIdPrefix = exports["default"] = exports.VideoTypes = void 0;
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
10
|
require("core-js/modules/es.symbol.js");
|
10
11
|
require("core-js/modules/es.symbol.description.js");
|
11
12
|
require("core-js/modules/es.array.concat.js");
|
13
|
+
require("core-js/modules/es.date.to-json.js");
|
14
|
+
require("core-js/modules/es.json.stringify.js");
|
12
15
|
var React = _interopRequireWildcard(require("react"));
|
13
16
|
var _uiCore = require("@megafon/ui-core");
|
14
17
|
var _uiHelpers = require("@megafon/ui-helpers");
|
@@ -17,6 +20,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
17
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
18
21
|
var VideoTypes = exports.VideoTypes = {
|
19
22
|
YOUTUBE: 'youtube',
|
23
|
+
RUTUBE: 'rutube',
|
24
|
+
VK: 'vk',
|
20
25
|
VIDEO: 'video'
|
21
26
|
};
|
22
27
|
var testIdPrefix = exports.testIdPrefix = 'VideoBlock';
|
@@ -42,6 +47,33 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
42
47
|
playsinline = _ref$playsinline === void 0 ? false : _ref$playsinline,
|
43
48
|
_ref$fixWhiteVideoBac = _ref.fixWhiteVideoBackground,
|
44
49
|
fixWhiteVideoBackground = _ref$fixWhiteVideoBac === void 0 ? false : _ref$fixWhiteVideoBac;
|
50
|
+
var rutubeRef = React.useRef(null);
|
51
|
+
var autoPlayRutube = function autoPlayRutube() {
|
52
|
+
var current = rutubeRef.current;
|
53
|
+
if (current == null) {
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
window.IntersectionObserver && new window.IntersectionObserver(function (entries, obs) {
|
57
|
+
var _a;
|
58
|
+
var _entries = (0, _slicedToArray2["default"])(entries, 1),
|
59
|
+
entry = _entries[0];
|
60
|
+
if (entry && entry.isIntersecting) {
|
61
|
+
(_a = current.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify({
|
62
|
+
type: 'player:play',
|
63
|
+
data: {}
|
64
|
+
}), '*');
|
65
|
+
obs.disconnect();
|
66
|
+
}
|
67
|
+
}, {
|
68
|
+
threshold: 0.5
|
69
|
+
}).observe(current);
|
70
|
+
};
|
71
|
+
React.useEffect(function () {
|
72
|
+
if (!isAutoplay || videoType !== VideoTypes.RUTUBE) {
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
autoPlayRutube();
|
76
|
+
}, [isAutoplay, videoType]);
|
45
77
|
var renderVideo = React.useCallback(function () {
|
46
78
|
switch (videoType) {
|
47
79
|
case VideoTypes.YOUTUBE:
|
@@ -71,6 +103,47 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
71
103
|
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
72
104
|
}));
|
73
105
|
}
|
106
|
+
case VideoTypes.RUTUBE:
|
107
|
+
{
|
108
|
+
var _src = "https://rutube.ru/play/embed/".concat(videoSrc, "?");
|
109
|
+
return /*#__PURE__*/React.createElement("div", {
|
110
|
+
className: cn('rutube')
|
111
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
112
|
+
className: cn('iframe'),
|
113
|
+
ref: rutubeRef,
|
114
|
+
src: _src,
|
115
|
+
width: "100%",
|
116
|
+
height: "100%",
|
117
|
+
frameBorder: "0",
|
118
|
+
allow: "autoplay",
|
119
|
+
title: "iframe",
|
120
|
+
allowFullScreen: true,
|
121
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
122
|
+
}));
|
123
|
+
}
|
124
|
+
case VideoTypes.VK:
|
125
|
+
{
|
126
|
+
var _videoSrc$split = videoSrc.split('_'),
|
127
|
+
_videoSrc$split2 = (0, _slicedToArray2["default"])(_videoSrc$split, 2),
|
128
|
+
oid = _videoSrc$split2[0],
|
129
|
+
id = _videoSrc$split2[1];
|
130
|
+
var _url = "https://vk.com/video_ext.php?oid=-".concat(oid, "}&id=").concat(id, "&");
|
131
|
+
var _autoplay = "&autoplay=".concat(isAutoplay ? 1 : 0);
|
132
|
+
var _src2 = "".concat(_url).concat(_autoplay);
|
133
|
+
return /*#__PURE__*/React.createElement("div", {
|
134
|
+
className: cn('vk')
|
135
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
136
|
+
className: cn('iframe'),
|
137
|
+
src: _src2,
|
138
|
+
width: "100%",
|
139
|
+
height: "100%",
|
140
|
+
frameBorder: "0",
|
141
|
+
allow: "autoplay",
|
142
|
+
title: "iframe",
|
143
|
+
allowFullScreen: true,
|
144
|
+
"data-testid": "".concat(testIdPrefix, "-iframe-video")
|
145
|
+
}));
|
146
|
+
}
|
74
147
|
case VideoTypes.VIDEO:
|
75
148
|
{
|
76
149
|
return /*#__PURE__*/(
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.4.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -77,13 +77,13 @@
|
|
77
77
|
},
|
78
78
|
"dependencies": {
|
79
79
|
"@babel/runtime": "^7.8.4",
|
80
|
-
"@megafon/ui-core": "^7.
|
80
|
+
"@megafon/ui-core": "^7.2.1",
|
81
81
|
"@megafon/ui-helpers": "^3.1.1",
|
82
|
-
"@megafon/ui-icons": "^3.0
|
82
|
+
"@megafon/ui-icons": "^3.2.0",
|
83
83
|
"core-js": "^3.6.4",
|
84
84
|
"htmr": "^1.0.2",
|
85
85
|
"lodash.throttle": "^4.1.1",
|
86
86
|
"swiper": "^11.1.1"
|
87
87
|
},
|
88
|
-
"gitHead": "
|
88
|
+
"gitHead": "30ed829a286373798a4328c575e1b23f8b726b41"
|
89
89
|
}
|