@megafon/ui-shared 2.0.0-beta.97 → 2.0.1
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/CHANGELOG.md +1634 -0
- package/README.md +0 -5
- package/dist/es/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +16 -1
- package/dist/es/components/AccordionBox/AccordionBox.js +29 -13
- package/dist/es/components/BannerBox/BannerBox.js +3 -2
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +13 -2
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +82 -17
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +2 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +15 -14
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +3 -3
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +19 -12
- package/dist/es/components/BenefitsIcons/types.d.ts +7 -2
- package/dist/es/components/BenefitsIcons/types.js +4 -0
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +10 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +28 -12
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +4 -4
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +49 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +107 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +22 -2
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +37 -8
- package/dist/es/components/Card/Card.css +71 -44
- package/dist/es/components/Card/Card.d.ts +33 -3
- package/dist/es/components/Card/Card.js +103 -42
- package/dist/es/components/CardsBox/CardsBox.d.ts +10 -2
- package/dist/es/components/CardsBox/CardsBox.js +26 -13
- package/dist/es/components/CarouselBox/CarouselBox.js +3 -2
- package/dist/es/components/Container/Container.css +1815 -547
- package/dist/es/components/Container/Container.d.ts +11 -1
- package/dist/es/components/Container/Container.js +28 -6
- package/dist/es/components/DownloadLinks/DownloadLink.css +5 -5
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +7 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +28 -6
- package/dist/es/components/DownloadLinks/DownloadLinks.css +9 -6
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +2 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.js +18 -3
- package/dist/es/components/Instructions/Instructions.css +189 -130
- package/dist/es/components/Instructions/Instructions.d.ts +21 -2
- package/dist/es/components/Instructions/Instructions.js +115 -74
- package/dist/es/components/Instructions/img/iphone12.png +0 -0
- package/dist/es/components/PageTitle/PageTitle.css +80 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/es/components/PageTitle/PageTitle.js +65 -0
- package/dist/es/components/Partners/Partners.css +22 -31
- package/dist/es/components/Partners/Partners.d.ts +13 -1
- package/dist/es/components/Partners/Partners.js +40 -18
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +25 -10
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +13 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +31 -7
- package/dist/es/components/Property/Property.css +79 -71
- package/dist/es/components/Property/Property.d.ts +21 -2
- package/dist/es/components/Property/Property.js +80 -34
- package/dist/es/components/Property/PropertyDescription.css +3 -3
- package/dist/es/components/Property/PropertyDescription.js +19 -21
- package/dist/es/components/Property/types.d.ts +7 -2
- package/dist/es/components/Steps/Steps.css +41 -0
- package/dist/es/components/Steps/Steps.d.ts +10 -0
- package/dist/es/components/Steps/Steps.js +35 -0
- package/dist/es/components/Steps/StepsItem.css +37 -0
- package/dist/es/components/Steps/StepsItem.d.ts +10 -0
- package/dist/es/components/Steps/StepsItem.js +26 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +145 -0
- package/dist/es/components/StoreBanner/doc/img/new-iphone-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/StoreButton.css +15 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/es/components/StoreButton/StoreButton.js +37 -0
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/Table/Table.css +67 -67
- package/dist/es/components/Table/Table.js +4 -4
- package/dist/es/components/Table/TableRow.js +1 -0
- package/dist/es/components/TabsBox/TabsBox.d.ts +4 -1
- package/dist/es/components/TabsBox/TabsBox.js +24 -3
- package/dist/es/components/TextBox/TextBox.css +7 -1
- package/dist/es/components/TextBox/TextBox.d.ts +8 -0
- package/dist/es/components/TextBox/TextBox.js +37 -5
- package/dist/es/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +32 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +15 -4
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +8 -2
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +34 -14
- package/dist/es/components/VideoBanner/VideoBanner.css +155 -76
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +64 -13
- package/dist/es/components/VideoBanner/VideoBanner.js +202 -70
- package/dist/es/components/VideoBlock/VideoBlock.css +32 -28
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +20 -6
- package/dist/es/components/VideoBlock/VideoBlock.js +63 -44
- package/dist/es/constants/throttleTime.d.ts +4 -0
- package/dist/es/constants/throttleTime.js +3 -0
- package/dist/es/index.d.ts +8 -0
- package/dist/es/index.js +8 -0
- package/dist/lib/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +16 -1
- package/dist/lib/components/AccordionBox/AccordionBox.js +31 -19
- package/dist/lib/components/BannerBox/BannerBox.js +3 -5
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +13 -2
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +84 -20
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +2 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +15 -16
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +3 -3
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +19 -12
- package/dist/lib/components/BenefitsIcons/types.d.ts +7 -2
- package/dist/lib/components/BenefitsIcons/types.js +7 -2
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +10 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +32 -15
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +4 -4
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +65 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +133 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +22 -2
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +45 -11
- package/dist/lib/components/Card/Card.css +71 -44
- package/dist/lib/components/Card/Card.d.ts +33 -3
- package/dist/lib/components/Card/Card.js +118 -59
- package/dist/lib/components/CardsBox/CardsBox.d.ts +10 -2
- package/dist/lib/components/CardsBox/CardsBox.js +30 -16
- package/dist/lib/components/CarouselBox/CarouselBox.js +3 -5
- package/dist/lib/components/Container/Container.css +1815 -547
- package/dist/lib/components/Container/Container.d.ts +11 -1
- package/dist/lib/components/Container/Container.js +32 -11
- package/dist/lib/components/DownloadLinks/DownloadLink.css +5 -5
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +7 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +32 -11
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +9 -6
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +2 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +20 -6
- package/dist/lib/components/Instructions/Instructions.css +189 -130
- package/dist/lib/components/Instructions/Instructions.d.ts +21 -2
- package/dist/lib/components/Instructions/Instructions.js +148 -104
- package/dist/lib/components/Instructions/img/iphone12.png +0 -0
- package/dist/lib/components/PageTitle/PageTitle.css +80 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/lib/components/PageTitle/PageTitle.js +85 -0
- package/dist/lib/components/Partners/Partners.css +22 -31
- package/dist/lib/components/Partners/Partners.d.ts +13 -1
- package/dist/lib/components/Partners/Partners.js +43 -23
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +25 -10
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +13 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +33 -8
- package/dist/lib/components/Property/Property.css +79 -71
- package/dist/lib/components/Property/Property.d.ts +21 -2
- package/dist/lib/components/Property/Property.js +93 -53
- package/dist/lib/components/Property/PropertyDescription.css +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +21 -25
- package/dist/lib/components/Property/types.d.ts +7 -2
- package/dist/lib/components/Steps/Steps.css +41 -0
- package/dist/lib/components/Steps/Steps.d.ts +10 -0
- package/dist/lib/components/Steps/Steps.js +55 -0
- package/dist/lib/components/Steps/StepsItem.css +37 -0
- package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
- package/dist/lib/components/Steps/StepsItem.js +39 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +169 -0
- package/dist/lib/components/StoreBanner/doc/img/new-iphone-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/StoreButton.css +15 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/lib/components/StoreButton/StoreButton.js +58 -0
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/Table/Table.css +67 -67
- package/dist/lib/components/Table/Table.js +6 -8
- package/dist/lib/components/Table/TableRow.js +1 -0
- package/dist/lib/components/TabsBox/TabsBox.d.ts +4 -1
- package/dist/lib/components/TabsBox/TabsBox.js +25 -2
- package/dist/lib/components/TextBox/TextBox.css +7 -1
- package/dist/lib/components/TextBox/TextBox.d.ts +8 -0
- package/dist/lib/components/TextBox/TextBox.js +39 -6
- package/dist/lib/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +49 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +15 -4
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +8 -2
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +39 -19
- package/dist/lib/components/VideoBanner/VideoBanner.css +155 -76
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +64 -13
- package/dist/lib/components/VideoBanner/VideoBanner.js +225 -89
- package/dist/lib/components/VideoBlock/VideoBlock.css +32 -28
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +20 -6
- package/dist/lib/components/VideoBlock/VideoBlock.js +76 -68
- package/dist/lib/constants/throttleTime.d.ts +4 -0
- package/dist/lib/constants/throttleTime.js +10 -0
- package/dist/lib/index.d.ts +8 -0
- package/dist/lib/index.js +64 -0
- package/package.json +19 -75
@@ -1,17 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
|
-
require("core-js/modules/es.symbol");
|
6
|
-
|
7
|
-
require("core-js/modules/es.symbol.description");
|
8
|
-
|
9
|
-
require("core-js/modules/es.array.concat");
|
10
|
-
|
11
|
-
require("core-js/modules/es.array.map");
|
12
|
-
|
13
|
-
require("core-js/modules/es.object.values");
|
14
|
-
|
15
3
|
Object.defineProperty(exports, "__esModule", {
|
16
4
|
value: true
|
17
5
|
});
|
@@ -23,65 +11,73 @@ require("core-js/modules/es.symbol.description");
|
|
23
11
|
|
24
12
|
require("core-js/modules/es.array.concat");
|
25
13
|
|
26
|
-
require("core-js/modules/es.array.map");
|
27
|
-
|
28
14
|
require("core-js/modules/es.object.values");
|
29
15
|
|
30
|
-
var
|
16
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
31
17
|
|
32
|
-
var
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
33
19
|
|
34
20
|
var _uiCore = require("@megafon/ui-core");
|
35
21
|
|
36
|
-
|
22
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
37
23
|
|
38
|
-
|
24
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
39
25
|
|
40
|
-
function
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
41
27
|
|
42
28
|
var VideoTypes = {
|
43
29
|
YOUTUBE: 'youtube',
|
44
30
|
VIDEO: 'video'
|
45
31
|
};
|
46
32
|
exports.VideoTypes = VideoTypes;
|
47
|
-
var cn = (0,
|
33
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-video-block');
|
48
34
|
|
49
35
|
var VideoBlock = function VideoBlock(_ref) {
|
50
|
-
var
|
36
|
+
var dataAttrs = _ref.dataAttrs,
|
37
|
+
className = _ref.className,
|
38
|
+
_ref$classes = _ref.classes,
|
39
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
40
|
+
rootRef = _ref.rootRef,
|
41
|
+
content = _ref.content,
|
51
42
|
_ref$videoType = _ref.videoType,
|
52
43
|
videoType = _ref$videoType === void 0 ? 'video' : _ref$videoType,
|
53
44
|
videoSrc = _ref.videoSrc,
|
54
45
|
_ref$isMuted = _ref.isMuted,
|
55
46
|
isMuted = _ref$isMuted === void 0 ? true : _ref$isMuted,
|
56
47
|
_ref$isAutoplay = _ref.isAutoplay,
|
57
|
-
isAutoplay = _ref$isAutoplay === void 0 ? false : _ref$isAutoplay
|
58
|
-
|
59
|
-
var renderVideo =
|
48
|
+
isAutoplay = _ref$isAutoplay === void 0 ? false : _ref$isAutoplay;
|
49
|
+
|
50
|
+
var renderVideo = _react["default"].useCallback(function () {
|
60
51
|
switch (videoType) {
|
61
52
|
case VideoTypes.YOUTUBE:
|
62
53
|
{
|
63
54
|
var src = "https://www.youtube.com/embed/".concat(videoSrc, "?&autoplay=").concat(isAutoplay ? 1 : 0, "&mute=").concat(isMuted ? 1 : 0, "&loop=1&rel=0&controls=0&showinfo=0e&iv_load_policy=3&playlist=").concat(videoSrc);
|
64
|
-
return /*#__PURE__*/
|
55
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
65
56
|
src: src,
|
66
57
|
width: "100%",
|
67
58
|
height: "100%",
|
68
59
|
frameBorder: "0",
|
69
|
-
allow: "autoplay"
|
60
|
+
allow: "autoplay",
|
61
|
+
title: "iframe"
|
70
62
|
});
|
71
63
|
}
|
72
64
|
|
73
65
|
case VideoTypes.VIDEO:
|
74
66
|
{
|
75
|
-
return
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
67
|
+
return (
|
68
|
+
/*#__PURE__*/
|
69
|
+
// eslint-disable-next-line jsx-a11y/media-has-caption
|
70
|
+
_react["default"].createElement("video", {
|
71
|
+
className: cn('video'),
|
72
|
+
autoPlay: isAutoplay,
|
73
|
+
muted: isMuted,
|
74
|
+
controls: !isAutoplay,
|
75
|
+
loop: true
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
77
|
+
src: videoSrc,
|
78
|
+
type: "video/mp4"
|
79
|
+
}))
|
80
|
+
);
|
85
81
|
}
|
86
82
|
|
87
83
|
default:
|
@@ -89,78 +85,90 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
89
85
|
return null;
|
90
86
|
}
|
91
87
|
}
|
92
|
-
}, [videoType, videoSrc]);
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
88
|
+
}, [isAutoplay, isMuted, videoType, videoSrc]);
|
89
|
+
|
90
|
+
var renderContent = _react["default"].useCallback(function (_ref2) {
|
91
|
+
var title = _ref2.title,
|
92
|
+
description = _ref2.description,
|
93
|
+
href = _ref2.href,
|
94
|
+
buttonDownload = _ref2.buttonDownload,
|
95
|
+
buttonTitle = _ref2.buttonTitle,
|
96
|
+
onButtonClick = _ref2.onButtonClick;
|
97
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
100
98
|
className: cn('content')
|
101
|
-
}, /*#__PURE__*/
|
102
|
-
as: "
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
100
|
+
as: "h2",
|
103
101
|
className: cn('header')
|
104
|
-
}, title), /*#__PURE__*/
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
hasMargin: false
|
109
|
-
}, paragraph);
|
110
|
-
})), /*#__PURE__*/React.createElement(_uiCore.Button, {
|
111
|
-
className: cn('button'),
|
102
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
103
|
+
className: cn('description', [classes.description])
|
104
|
+
}, description), /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
105
|
+
className: cn('button', [classes.button]),
|
112
106
|
href: href,
|
113
|
-
onClick: onButtonClick
|
107
|
+
onClick: onButtonClick,
|
108
|
+
download: buttonDownload
|
114
109
|
}, buttonTitle));
|
115
|
-
}, [
|
116
|
-
|
110
|
+
}, [classes.button, classes.description]);
|
111
|
+
|
112
|
+
var renderGridColumns = _react["default"].useCallback(function () {
|
117
113
|
var columns = [];
|
118
114
|
var columnWidth = content ? '7' : '10';
|
119
115
|
|
120
116
|
if (content) {
|
121
|
-
columns.push( /*#__PURE__*/
|
117
|
+
columns.push( /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, {
|
122
118
|
all: "5",
|
123
119
|
tablet: "12",
|
124
120
|
mobile: "12",
|
125
121
|
orderTablet: "2",
|
126
122
|
orderMobile: "2",
|
127
|
-
key:
|
123
|
+
key: "column-content"
|
128
124
|
}, renderContent && renderContent(content)));
|
129
125
|
}
|
130
126
|
|
131
|
-
columns.push( /*#__PURE__*/
|
127
|
+
columns.push( /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, {
|
132
128
|
all: columnWidth,
|
133
129
|
tablet: "12",
|
134
130
|
mobile: "12",
|
135
|
-
key:
|
136
|
-
}, /*#__PURE__*/
|
131
|
+
key: "column-video"
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
137
133
|
className: cn('video-wrapper', {
|
138
134
|
'with-content': !!content
|
139
135
|
})
|
140
136
|
}, renderVideo())));
|
141
137
|
return columns;
|
142
138
|
}, [renderContent, renderVideo, content]);
|
143
|
-
|
144
|
-
|
145
|
-
|
139
|
+
|
140
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs), {
|
141
|
+
className: cn([className, classes.root]),
|
142
|
+
ref: rootRef
|
143
|
+
}), /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, {
|
146
144
|
hAlign: "center",
|
147
145
|
className: cn('grid')
|
148
146
|
}, renderGridColumns()));
|
149
147
|
};
|
150
148
|
|
151
149
|
VideoBlock.propTypes = {
|
150
|
+
dataAttrs: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
151
|
+
className: _propTypes["default"].string,
|
152
|
+
classes: _propTypes["default"].shape({
|
153
|
+
root: _propTypes["default"].string,
|
154
|
+
button: _propTypes["default"].string,
|
155
|
+
description: _propTypes["default"].string
|
156
|
+
}),
|
157
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
158
|
+
current: _propTypes["default"].elementType
|
159
|
+
}), _propTypes["default"].any])]),
|
152
160
|
content: _propTypes["default"].shape({
|
153
161
|
title: _propTypes["default"].string.isRequired,
|
154
|
-
description: _propTypes["default"].
|
162
|
+
description: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired,
|
155
163
|
href: _propTypes["default"].string,
|
156
164
|
buttonTitle: _propTypes["default"].string.isRequired,
|
165
|
+
buttonDownload: _propTypes["default"].bool,
|
157
166
|
onButtonClick: _propTypes["default"].func
|
158
167
|
}),
|
159
168
|
videoType: _propTypes["default"].oneOf(Object.values(VideoTypes)),
|
160
169
|
videoSrc: _propTypes["default"].string.isRequired,
|
161
170
|
isMuted: _propTypes["default"].bool,
|
162
|
-
isAutoplay: _propTypes["default"].bool
|
163
|
-
className: _propTypes["default"].string
|
171
|
+
isAutoplay: _propTypes["default"].bool
|
164
172
|
};
|
165
173
|
var _default = VideoBlock;
|
166
174
|
exports["default"] = _default;
|
package/dist/lib/index.d.ts
CHANGED
@@ -3,6 +3,8 @@ export { default as BannerBox } from './components/BannerBox/BannerBox';
|
|
3
3
|
export { default as BenefitsIcons } from './components/BenefitsIcons/BenefitsIcons';
|
4
4
|
export { default as BenefitsIconsTile } from './components/BenefitsIcons/BenefitsIconsTile';
|
5
5
|
export { default as BenefitsPictures } from './components/BenefitsPictures/BenefitsPictures';
|
6
|
+
export { default as Breadcrumbs } from './components/Breadcrumbs/Breadcrumbs';
|
7
|
+
export { default as ButtonBanner } from './components/ButtonBanner/ButtonBanner';
|
6
8
|
export { default as ButtonLinkBox } from './components/ButtonLinkBox/ButtonLinkBox';
|
7
9
|
export { default as Card } from './components/Card/Card';
|
8
10
|
export { default as CardsBox } from './components/CardsBox/CardsBox';
|
@@ -11,16 +13,22 @@ export { default as Container } from './components/Container/Container';
|
|
11
13
|
export { default as DownloadLink } from './components/DownloadLinks/DownloadLink';
|
12
14
|
export { default as DownloadLinks } from './components/DownloadLinks/DownloadLinks';
|
13
15
|
export { default as Instructions } from './components/Instructions/Instructions';
|
16
|
+
export { default as PageTitle } from './components/PageTitle/PageTitle';
|
14
17
|
export { default as Partners } from './components/Partners/Partners';
|
15
18
|
export { default as PictureWithDescription } from './components/PictureWithDescription/PictureWithDescription';
|
16
19
|
export { default as Property } from './components/Property/Property';
|
17
20
|
export { default as PropertyDescription } from './components/Property/PropertyDescription';
|
21
|
+
export { default as Steps } from './components/Steps/Steps';
|
22
|
+
export { default as StepsItem } from './components/Steps/StepsItem';
|
23
|
+
export { default as StoreBanner } from './components/StoreBanner/StoreBanner';
|
24
|
+
export { default as StoreButton } from './components/StoreButton/StoreButton';
|
18
25
|
export { default as TabBox } from './components/TabsBox/TabBox';
|
19
26
|
export { default as Table } from './components/Table/Table';
|
20
27
|
export { default as TableCell } from './components/Table/TableCell';
|
21
28
|
export { default as TableRow } from './components/Table/TableRow';
|
22
29
|
export { default as TabsBox } from './components/TabsBox/TabsBox';
|
23
30
|
export { default as TextBox } from './components/TextBox/TextBox';
|
31
|
+
export { default as TextBoxPicture } from './components/TextBox/TextBoxPicture';
|
24
32
|
export { default as TitleDescriptionBox } from './components/TitleDescriptionBox/TitleDescriptionBox';
|
25
33
|
export { default as VideoBanner } from './components/VideoBanner/VideoBanner';
|
26
34
|
export { default as VideoBlock } from './components/VideoBlock/VideoBlock';
|
package/dist/lib/index.js
CHANGED
@@ -33,6 +33,18 @@ Object.defineProperty(exports, "BenefitsPictures", {
|
|
33
33
|
return _BenefitsPictures["default"];
|
34
34
|
}
|
35
35
|
});
|
36
|
+
Object.defineProperty(exports, "Breadcrumbs", {
|
37
|
+
enumerable: true,
|
38
|
+
get: function get() {
|
39
|
+
return _Breadcrumbs["default"];
|
40
|
+
}
|
41
|
+
});
|
42
|
+
Object.defineProperty(exports, "ButtonBanner", {
|
43
|
+
enumerable: true,
|
44
|
+
get: function get() {
|
45
|
+
return _ButtonBanner["default"];
|
46
|
+
}
|
47
|
+
});
|
36
48
|
Object.defineProperty(exports, "ButtonLinkBox", {
|
37
49
|
enumerable: true,
|
38
50
|
get: function get() {
|
@@ -81,6 +93,12 @@ Object.defineProperty(exports, "Instructions", {
|
|
81
93
|
return _Instructions["default"];
|
82
94
|
}
|
83
95
|
});
|
96
|
+
Object.defineProperty(exports, "PageTitle", {
|
97
|
+
enumerable: true,
|
98
|
+
get: function get() {
|
99
|
+
return _PageTitle["default"];
|
100
|
+
}
|
101
|
+
});
|
84
102
|
Object.defineProperty(exports, "Partners", {
|
85
103
|
enumerable: true,
|
86
104
|
get: function get() {
|
@@ -105,6 +123,30 @@ Object.defineProperty(exports, "PropertyDescription", {
|
|
105
123
|
return _PropertyDescription["default"];
|
106
124
|
}
|
107
125
|
});
|
126
|
+
Object.defineProperty(exports, "Steps", {
|
127
|
+
enumerable: true,
|
128
|
+
get: function get() {
|
129
|
+
return _Steps["default"];
|
130
|
+
}
|
131
|
+
});
|
132
|
+
Object.defineProperty(exports, "StepsItem", {
|
133
|
+
enumerable: true,
|
134
|
+
get: function get() {
|
135
|
+
return _StepsItem["default"];
|
136
|
+
}
|
137
|
+
});
|
138
|
+
Object.defineProperty(exports, "StoreBanner", {
|
139
|
+
enumerable: true,
|
140
|
+
get: function get() {
|
141
|
+
return _StoreBanner["default"];
|
142
|
+
}
|
143
|
+
});
|
144
|
+
Object.defineProperty(exports, "StoreButton", {
|
145
|
+
enumerable: true,
|
146
|
+
get: function get() {
|
147
|
+
return _StoreButton["default"];
|
148
|
+
}
|
149
|
+
});
|
108
150
|
Object.defineProperty(exports, "TabBox", {
|
109
151
|
enumerable: true,
|
110
152
|
get: function get() {
|
@@ -141,6 +183,12 @@ Object.defineProperty(exports, "TextBox", {
|
|
141
183
|
return _TextBox["default"];
|
142
184
|
}
|
143
185
|
});
|
186
|
+
Object.defineProperty(exports, "TextBoxPicture", {
|
187
|
+
enumerable: true,
|
188
|
+
get: function get() {
|
189
|
+
return _TextBoxPicture["default"];
|
190
|
+
}
|
191
|
+
});
|
144
192
|
Object.defineProperty(exports, "TitleDescriptionBox", {
|
145
193
|
enumerable: true,
|
146
194
|
get: function get() {
|
@@ -170,6 +218,10 @@ var _BenefitsIconsTile = _interopRequireDefault(require("./components/BenefitsIc
|
|
170
218
|
|
171
219
|
var _BenefitsPictures = _interopRequireDefault(require("./components/BenefitsPictures/BenefitsPictures"));
|
172
220
|
|
221
|
+
var _Breadcrumbs = _interopRequireDefault(require("./components/Breadcrumbs/Breadcrumbs"));
|
222
|
+
|
223
|
+
var _ButtonBanner = _interopRequireDefault(require("./components/ButtonBanner/ButtonBanner"));
|
224
|
+
|
173
225
|
var _ButtonLinkBox = _interopRequireDefault(require("./components/ButtonLinkBox/ButtonLinkBox"));
|
174
226
|
|
175
227
|
var _Card = _interopRequireDefault(require("./components/Card/Card"));
|
@@ -186,6 +238,8 @@ var _DownloadLinks = _interopRequireDefault(require("./components/DownloadLinks/
|
|
186
238
|
|
187
239
|
var _Instructions = _interopRequireDefault(require("./components/Instructions/Instructions"));
|
188
240
|
|
241
|
+
var _PageTitle = _interopRequireDefault(require("./components/PageTitle/PageTitle"));
|
242
|
+
|
189
243
|
var _Partners = _interopRequireDefault(require("./components/Partners/Partners"));
|
190
244
|
|
191
245
|
var _PictureWithDescription = _interopRequireDefault(require("./components/PictureWithDescription/PictureWithDescription"));
|
@@ -194,6 +248,14 @@ var _Property = _interopRequireDefault(require("./components/Property/Property")
|
|
194
248
|
|
195
249
|
var _PropertyDescription = _interopRequireDefault(require("./components/Property/PropertyDescription"));
|
196
250
|
|
251
|
+
var _Steps = _interopRequireDefault(require("./components/Steps/Steps"));
|
252
|
+
|
253
|
+
var _StepsItem = _interopRequireDefault(require("./components/Steps/StepsItem"));
|
254
|
+
|
255
|
+
var _StoreBanner = _interopRequireDefault(require("./components/StoreBanner/StoreBanner"));
|
256
|
+
|
257
|
+
var _StoreButton = _interopRequireDefault(require("./components/StoreButton/StoreButton"));
|
258
|
+
|
197
259
|
var _TabBox = _interopRequireDefault(require("./components/TabsBox/TabBox"));
|
198
260
|
|
199
261
|
var _Table = _interopRequireDefault(require("./components/Table/Table"));
|
@@ -206,6 +268,8 @@ var _TabsBox = _interopRequireDefault(require("./components/TabsBox/TabsBox"));
|
|
206
268
|
|
207
269
|
var _TextBox = _interopRequireDefault(require("./components/TextBox/TextBox"));
|
208
270
|
|
271
|
+
var _TextBoxPicture = _interopRequireDefault(require("./components/TextBox/TextBoxPicture"));
|
272
|
+
|
209
273
|
var _TitleDescriptionBox = _interopRequireDefault(require("./components/TitleDescriptionBox/TitleDescriptionBox"));
|
210
274
|
|
211
275
|
var _VideoBanner = _interopRequireDefault(require("./components/VideoBanner/VideoBanner"));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.1",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -22,9 +22,11 @@
|
|
22
22
|
"coverage": "yarn coverage:unit",
|
23
23
|
"coverage:unit": "jest --ci --collectCoverage --coverageDirectory=coverage",
|
24
24
|
"typecheck": "tsc --noEmit -p .",
|
25
|
+
"prettier:check": "prettier --list-different \"src/**/*.{js,jsx,ts,tsx}\"",
|
26
|
+
"prettier:fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
25
27
|
"lint": "yarn lint:ts && yarn lint:less",
|
28
|
+
"lint:ts": "eslint --ext .js,.jsx,.ts,.tsx src --max-warnings=0",
|
26
29
|
"lint:less": "stylelint --syntax less src/**/*.less src/**/**/*.less",
|
27
|
-
"lint:ts": "tslint -c tslint.json '{src,scripts}/**/*.ts?(x)'",
|
28
30
|
"test": "yarn test:unit",
|
29
31
|
"test:unit": "jest",
|
30
32
|
"test:update": "jest --updateSnapshot"
|
@@ -32,78 +34,30 @@
|
|
32
34
|
"publishConfig": {
|
33
35
|
"access": "public"
|
34
36
|
},
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"babelConfig": {
|
39
|
-
"presets": [
|
40
|
-
"@babel/preset-env",
|
41
|
-
"@babel/react"
|
42
|
-
]
|
43
|
-
}
|
44
|
-
}
|
45
|
-
},
|
46
|
-
"moduleNameMapper": {
|
47
|
-
"\\.(css|less)$": "<rootDir>/scripts/styleMock.ts",
|
48
|
-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/scripts/fileMock.ts"
|
49
|
-
},
|
50
|
-
"moduleDirectories": [
|
51
|
-
"node_modules",
|
52
|
-
"src"
|
53
|
-
],
|
54
|
-
"collectCoverageFrom": [
|
55
|
-
"src/**/*.{ts,tsx}",
|
56
|
-
"!src/utils/modernizr.ts"
|
57
|
-
],
|
58
|
-
"coverageDirectory": "coverage",
|
59
|
-
"testURL": "http://localhost/",
|
60
|
-
"roots": [
|
61
|
-
"<rootDir>/src"
|
62
|
-
],
|
63
|
-
"transform": {
|
64
|
-
"\\.tsx?$": "ts-jest"
|
65
|
-
},
|
66
|
-
"testPathIgnorePatterns": [
|
67
|
-
"/node_modules/",
|
68
|
-
"/lib/",
|
69
|
-
"/src/utils/modernizr.ts"
|
70
|
-
],
|
71
|
-
"moduleFileExtensions": [
|
72
|
-
"ts",
|
73
|
-
"tsx",
|
74
|
-
"js",
|
75
|
-
"jsx",
|
76
|
-
"json",
|
77
|
-
"node"
|
78
|
-
],
|
79
|
-
"snapshotSerializers": [
|
80
|
-
"enzyme-to-json/serializer"
|
81
|
-
],
|
82
|
-
"setupFilesAfterEnv": [
|
83
|
-
"<rootDir>/scripts/setupEnzyme.ts"
|
37
|
+
"lint-staged": {
|
38
|
+
"src/**/**/*.(js|jsx|ts|tsx)": [
|
39
|
+
"eslint --max-warnings=0 --config ../../.eslintrc.json"
|
84
40
|
]
|
85
41
|
},
|
86
42
|
"peerDependencies": {
|
87
|
-
"react": ">=16.
|
88
|
-
"react-dom": ">=16.
|
43
|
+
"react": ">=16.13.0",
|
44
|
+
"react-dom": ">=16.13.0"
|
89
45
|
},
|
90
46
|
"devDependencies": {
|
91
47
|
"@babel/core": "^7.8.6",
|
92
|
-
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
93
|
-
"@babel/plugin-transform-block-scoping": "^7.8.3",
|
94
48
|
"@babel/plugin-transform-object-assign": "^7.8.3",
|
95
|
-
"@babel/plugin-transform-
|
49
|
+
"@babel/plugin-transform-runtime": "^7.8.3",
|
96
50
|
"@babel/preset-env": "^7.8.6",
|
97
51
|
"@babel/preset-react": "^7.8.3",
|
98
|
-
"@
|
52
|
+
"@babel/preset-typescript": "^7.8.3",
|
53
|
+
"@megafon/ui-icons": "^0.1.0",
|
54
|
+
"@svgr/core": "^2.4.1",
|
99
55
|
"@types/enzyme": "^3.10.5",
|
100
56
|
"@types/enzyme-adapter-react-16": "^1.0.6",
|
101
57
|
"@types/jest": "^25.1.3",
|
102
|
-
"@types/jsdom": "^11.12.0",
|
103
58
|
"@types/prop-types": "^15.7.3",
|
104
59
|
"@types/react": "^16.9.23",
|
105
60
|
"@types/react-dom": "^16.9.5",
|
106
|
-
"@types/webpack-env": "^1.15.1",
|
107
61
|
"babel-plugin-module-resolver": "^3.2.0",
|
108
62
|
"del": "^3.0.0",
|
109
63
|
"enzyme": "^3.11.0",
|
@@ -114,35 +68,25 @@
|
|
114
68
|
"gulp-babel": "^8.0.0-beta.2",
|
115
69
|
"gulp-imagemin": "^7.1.0",
|
116
70
|
"gulp-less": "^4.0.1",
|
117
|
-
"gulp-svgmin": "^2.2.0",
|
118
71
|
"gulp-typescript": "^5.0.1",
|
119
|
-
"husky": "^1.3.1",
|
120
72
|
"jest": "^25.1.0",
|
121
|
-
"jsdom": "^11.12.0",
|
122
73
|
"less-plugin-autoprefix": "^2.0.0",
|
123
74
|
"merge2": "^1.3.0",
|
124
75
|
"react": "^16.13.0",
|
125
76
|
"react-dom": "^16.13.0",
|
126
77
|
"stylelint": "^9.10.1",
|
127
78
|
"through2": "^2.0.5",
|
128
|
-
"
|
129
|
-
"tslint": "^5.20.1",
|
130
|
-
"tslint-react": "^3.6.0",
|
131
|
-
"typescript": "^3.8.3",
|
132
|
-
"webpack-filter-warnings-plugin": "^1.2.1"
|
79
|
+
"typescript": "^3.8.3"
|
133
80
|
},
|
134
81
|
"dependencies": {
|
135
|
-
"@babel/plugin-transform-runtime": "^7.8.3",
|
136
82
|
"@babel/runtime": "^7.8.4",
|
137
|
-
"@megafon/ui-core": "^2.
|
138
|
-
"
|
83
|
+
"@megafon/ui-core": "^2.1.0",
|
84
|
+
"@megafon/ui-helpers": "^1.0.0",
|
139
85
|
"core-js": "^3.6.4",
|
140
|
-
"
|
141
|
-
"htmr": "^0.8.8",
|
86
|
+
"htmr": "^0.9.2",
|
142
87
|
"lodash.throttle": "^4.1.1",
|
143
88
|
"prop-types": "^15.7.2",
|
144
|
-
"
|
145
|
-
"react-slick": "^0.23.2"
|
89
|
+
"swiper": "^6.5.6"
|
146
90
|
},
|
147
|
-
"gitHead": "
|
91
|
+
"gitHead": "42bd6840a217196ba9e80c6c77f92f5951881c12"
|
148
92
|
}
|