@megafon/ui-shared 3.0.0-beta.9 → 3.1.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/CHANGELOG.md +48 -67
- package/README.md +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +5 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +6 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +1 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +2 -2
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +7 -2
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +48 -18
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +1 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +5 -1
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +2 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +9 -1
- package/dist/es/components/Card/Card.d.ts +4 -2
- package/dist/es/components/Card/Card.js +16 -6
- package/dist/es/components/Container/Container.css +163 -0
- package/dist/es/components/DownloadLinks/DownloadLink.css +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +5 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +14 -6
- package/dist/es/components/Instructions/Instructions.d.ts +7 -0
- package/dist/es/components/Instructions/Instructions.js +55 -45
- package/dist/es/components/PageTitle/PageTitle.d.ts +6 -0
- package/dist/es/components/PageTitle/PageTitle.js +15 -4
- package/dist/es/components/Partners/Partners.d.ts +5 -4
- package/dist/es/components/Partners/Partners.js +15 -7
- package/dist/es/components/Property/Property.d.ts +3 -2
- package/dist/es/components/Property/Property.js +9 -3
- package/dist/es/components/Property/PropertyDescription.js +11 -5
- package/dist/es/components/Property/types.d.ts +3 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +21 -22
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +4 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +19 -4
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +1 -1
- package/dist/es/components/StoreButton/StoreButton.js +26 -7
- package/dist/es/components/Table/Table.css +1 -1
- package/dist/es/components/TextBox/TextBox.css +9 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.css +15 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +19 -0
- package/dist/es/components/TextWithIcon/TextWithIcon.js +40 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +49 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +18 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +35 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -2
- package/dist/es/components/VideoBanner/VideoBanner.js +21 -5
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -3
- package/dist/es/components/VideoBlock/VideoBlock.js +12 -6
- package/dist/es/index.d.ts +2 -0
- package/dist/es/index.js +2 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +5 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +6 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +1 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +2 -2
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +7 -2
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +49 -17
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +1 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +5 -1
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +2 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +9 -1
- package/dist/lib/components/Card/Card.d.ts +4 -2
- package/dist/lib/components/Card/Card.js +16 -6
- package/dist/lib/components/Container/Container.css +163 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +5 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +13 -5
- package/dist/lib/components/Instructions/Instructions.d.ts +7 -0
- package/dist/lib/components/Instructions/Instructions.js +55 -44
- package/dist/lib/components/PageTitle/PageTitle.d.ts +6 -0
- package/dist/lib/components/PageTitle/PageTitle.js +17 -5
- package/dist/lib/components/Partners/Partners.d.ts +5 -4
- package/dist/lib/components/Partners/Partners.js +15 -7
- package/dist/lib/components/Property/Property.d.ts +3 -2
- package/dist/lib/components/Property/Property.js +9 -3
- package/dist/lib/components/Property/PropertyDescription.js +11 -4
- package/dist/lib/components/Property/types.d.ts +3 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +21 -22
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +4 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +19 -4
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +1 -1
- package/dist/lib/components/StoreButton/StoreButton.js +30 -9
- package/dist/lib/components/Table/Table.css +1 -1
- package/dist/lib/components/TextBox/TextBox.css +9 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +15 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +19 -0
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +60 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +49 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +18 -0
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +54 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -2
- package/dist/lib/components/VideoBanner/VideoBanner.js +21 -5
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -3
- package/dist/lib/components/VideoBlock/VideoBlock.js +12 -6
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +16 -0
- package/package.json +5 -5
@@ -81,13 +81,16 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
81
81
|
className: cn('header')
|
82
82
|
}, title), /*#__PURE__*/React.createElement("div", {
|
83
83
|
className: cn('description', [classes.description])
|
84
|
-
}, description), /*#__PURE__*/React.createElement(Button, {
|
84
|
+
}, description), buttonTitle && /*#__PURE__*/React.createElement(Button, {
|
85
|
+
dataAttrs: {
|
86
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
87
|
+
},
|
85
88
|
className: cn('button', [classes.button]),
|
86
89
|
href: href,
|
87
90
|
onClick: onButtonClick,
|
88
91
|
download: buttonDownload
|
89
92
|
}, buttonTitle));
|
90
|
-
}, [classes.button, classes.description]);
|
93
|
+
}, [classes.button, classes.description, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button]);
|
91
94
|
var renderGridColumns = React.useCallback(function () {
|
92
95
|
var columns = [];
|
93
96
|
var columnWidth = content ? '7' : '10';
|
@@ -100,7 +103,7 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
100
103
|
orderTablet: "2",
|
101
104
|
orderMobile: "2",
|
102
105
|
key: "column-content"
|
103
|
-
}, renderContent
|
106
|
+
}, renderContent(content)));
|
104
107
|
}
|
105
108
|
|
106
109
|
columns.push( /*#__PURE__*/React.createElement(GridColumn, {
|
@@ -115,7 +118,7 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
115
118
|
}, renderVideo())));
|
116
119
|
return columns;
|
117
120
|
}, [renderContent, renderVideo, content]);
|
118
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs), {
|
121
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
119
122
|
className: cn([className, classes.root]),
|
120
123
|
ref: rootRef
|
121
124
|
}), /*#__PURE__*/React.createElement(Grid, {
|
@@ -125,7 +128,10 @@ var VideoBlock = function VideoBlock(_ref) {
|
|
125
128
|
};
|
126
129
|
|
127
130
|
VideoBlock.propTypes = {
|
128
|
-
dataAttrs: PropTypes.
|
131
|
+
dataAttrs: PropTypes.shape({
|
132
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
133
|
+
button: PropTypes.objectOf(PropTypes.string.isRequired)
|
134
|
+
}),
|
129
135
|
className: PropTypes.string,
|
130
136
|
classes: PropTypes.shape({
|
131
137
|
root: PropTypes.string,
|
@@ -139,7 +145,7 @@ VideoBlock.propTypes = {
|
|
139
145
|
title: PropTypes.string.isRequired,
|
140
146
|
description: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
141
147
|
href: PropTypes.string,
|
142
|
-
buttonTitle: PropTypes.string
|
148
|
+
buttonTitle: PropTypes.string,
|
143
149
|
buttonDownload: PropTypes.bool,
|
144
150
|
onButtonClick: PropTypes.func
|
145
151
|
}),
|
package/dist/es/index.d.ts
CHANGED
@@ -29,6 +29,8 @@ export { default as TableRow } from './components/Table/TableRow';
|
|
29
29
|
export { default as TabsBox } from './components/TabsBox/TabsBox';
|
30
30
|
export { default as TextBox } from './components/TextBox/TextBox';
|
31
31
|
export { default as TextBoxPicture } from './components/TextBox/TextBoxPicture';
|
32
|
+
export { default as TextWithIcon } from './components/TextWithIcon/TextWithIcon';
|
33
|
+
export { default as TextWithIconItem } from './components/TextWithIcon/TextWithIconItem';
|
32
34
|
export { default as TitleDescriptionBox } from './components/TitleDescriptionBox/TitleDescriptionBox';
|
33
35
|
export { default as VideoBanner } from './components/VideoBanner/VideoBanner';
|
34
36
|
export { default as VideoBlock } from './components/VideoBlock/VideoBlock';
|
package/dist/es/index.js
CHANGED
@@ -29,6 +29,8 @@ export { default as TableRow } from "./components/Table/TableRow";
|
|
29
29
|
export { default as TabsBox } from "./components/TabsBox/TabsBox";
|
30
30
|
export { default as TextBox } from "./components/TextBox/TextBox";
|
31
31
|
export { default as TextBoxPicture } from "./components/TextBox/TextBoxPicture";
|
32
|
+
export { default as TextWithIcon } from "./components/TextWithIcon/TextWithIcon";
|
33
|
+
export { default as TextWithIconItem } from "./components/TextWithIcon/TextWithIconItem";
|
32
34
|
export { default as TitleDescriptionBox } from "./components/TitleDescriptionBox/TitleDescriptionBox";
|
33
35
|
export { default as VideoBanner } from "./components/VideoBanner/VideoBanner";
|
34
36
|
export { default as VideoBlock } from "./components/VideoBlock/VideoBlock";
|
@@ -4,6 +4,11 @@ export interface IAccordionBox {
|
|
4
4
|
/** Дополнительные data атрибуты к внутренним элементам */
|
5
5
|
dataAttrs?: {
|
6
6
|
root?: Record<string, string>;
|
7
|
+
header?: Record<string, string>;
|
8
|
+
collapse?: Record<string, string>;
|
9
|
+
titleWrap?: Record<string, string>;
|
10
|
+
arrowUp?: Record<string, string>;
|
11
|
+
arrowDown?: Record<string, string>;
|
7
12
|
};
|
8
13
|
/** Ссылка на корневой элемент */
|
9
14
|
rootRef?: React.Ref<HTMLDivElement>;
|
@@ -59,7 +59,12 @@ var AccordionBox = function AccordionBox(_a) {
|
|
59
59
|
|
60
60
|
AccordionBox.propTypes = {
|
61
61
|
dataAttrs: PropTypes.shape({
|
62
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
62
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
63
|
+
header: PropTypes.objectOf(PropTypes.string.isRequired),
|
64
|
+
collapse: PropTypes.objectOf(PropTypes.string.isRequired),
|
65
|
+
titleWrap: PropTypes.objectOf(PropTypes.string.isRequired),
|
66
|
+
arrowUp: PropTypes.objectOf(PropTypes.string.isRequired),
|
67
|
+
arrowDown: PropTypes.objectOf(PropTypes.string.isRequired)
|
63
68
|
}),
|
64
69
|
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
65
70
|
current: PropTypes.elementType
|
@@ -153,7 +153,7 @@ var cn = (0, _uiHelpers.cnCreate)('mfui-benefits-icons');
|
|
153
153
|
var BenefitsIcons = function BenefitsIcons(_ref) {
|
154
154
|
var rootRef = _ref.rootRef,
|
155
155
|
_ref$iconPosition = _ref.iconPosition,
|
156
|
-
iconPosition = _ref$iconPosition === void 0 ?
|
156
|
+
iconPosition = _ref$iconPosition === void 0 ? 'left-top' : _ref$iconPosition,
|
157
157
|
_ref$inOneColumn = _ref.inOneColumn,
|
158
158
|
inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
|
159
159
|
items = _ref.items,
|
@@ -30,12 +30,12 @@ h5 {
|
|
30
30
|
.mfui-breadcrumbs__item {
|
31
31
|
position: relative;
|
32
32
|
margin-right: 10px;
|
33
|
-
padding-left:
|
33
|
+
padding-left: 26px;
|
34
34
|
}
|
35
35
|
.mfui-breadcrumbs__item:before {
|
36
36
|
content: '→';
|
37
37
|
position: absolute;
|
38
|
-
top: -
|
38
|
+
top: -1px;
|
39
39
|
left: 0;
|
40
40
|
}
|
41
41
|
.mfui-breadcrumbs__item:first-child {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './Breadcrumbs.less';
|
3
|
-
declare type
|
4
|
-
component?: React.ReactElement;
|
3
|
+
declare type ItemObjectType = {
|
5
4
|
title?: string;
|
6
5
|
href?: string;
|
6
|
+
component?: React.ReactElement;
|
7
7
|
};
|
8
|
+
declare type ItemType = JSX.Element | ItemObjectType;
|
8
9
|
export declare const TextColor: {
|
9
10
|
readonly DEFAULT: "default";
|
10
11
|
readonly BLACK: "black";
|
@@ -12,6 +13,10 @@ export declare const TextColor: {
|
|
12
13
|
};
|
13
14
|
declare type TextColorType = typeof TextColor[keyof typeof TextColor];
|
14
15
|
export declare type Props = {
|
16
|
+
dataAttrs?: {
|
17
|
+
root?: Record<string, string>;
|
18
|
+
link?: Record<string, string>;
|
19
|
+
};
|
15
20
|
className?: string;
|
16
21
|
classes?: {
|
17
22
|
item?: string;
|
@@ -9,6 +9,10 @@ require("core-js/modules/es.array.map");
|
|
9
9
|
|
10
10
|
require("core-js/modules/es.object.values");
|
11
11
|
|
12
|
+
require("core-js/modules/es.string.link");
|
13
|
+
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
15
|
+
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
13
17
|
|
14
18
|
var _uiCore = require("@megafon/ui-core");
|
@@ -25,6 +29,15 @@ var TextColor = {
|
|
25
29
|
WHITE: 'white'
|
26
30
|
};
|
27
31
|
exports.TextColor = TextColor;
|
32
|
+
|
33
|
+
function isObjectElement(item) {
|
34
|
+
return !_react["default"].isValidElement(item);
|
35
|
+
}
|
36
|
+
|
37
|
+
function isJSXElement(item) {
|
38
|
+
return _react["default"].isValidElement(item);
|
39
|
+
}
|
40
|
+
|
28
41
|
var cn = (0, _uiHelpers.cnCreate)('mfui-breadcrumbs');
|
29
42
|
|
30
43
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
@@ -33,34 +46,53 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
33
46
|
color = _ref$color === void 0 ? 'black' : _ref$color,
|
34
47
|
className = _ref.className,
|
35
48
|
_ref$classes = _ref.classes,
|
36
|
-
classes = _ref$classes === void 0 ? {} : _ref$classes
|
37
|
-
|
49
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
50
|
+
dataAttrs = _ref.dataAttrs;
|
51
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
38
52
|
className: cn({
|
39
53
|
color: color
|
40
54
|
}, className)
|
41
|
-
}, items.map(function (
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
}), items.map(function (item, i) {
|
56
|
+
if (isJSXElement(item)) {
|
57
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
58
|
+
className: cn('item', classes.item),
|
59
|
+
key: i
|
60
|
+
}, item);
|
61
|
+
}
|
62
|
+
|
63
|
+
if (isObjectElement(item)) {
|
64
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
65
|
+
className: cn('item', classes.item),
|
66
|
+
key: item.component ? i : item.title
|
67
|
+
}, item.component || /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
|
68
|
+
href: item.href,
|
69
|
+
color: color,
|
70
|
+
dataAttrs: {
|
71
|
+
root: (dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link) ? (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link, i + 1)) : undefined
|
72
|
+
}
|
73
|
+
}, item.title));
|
74
|
+
}
|
75
|
+
|
76
|
+
return null;
|
52
77
|
}));
|
53
78
|
};
|
54
79
|
|
55
80
|
Breadcrumbs.propTypes = {
|
81
|
+
dataAttrs: _propTypes["default"].shape({
|
82
|
+
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
83
|
+
link: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
84
|
+
}),
|
56
85
|
className: _propTypes["default"].string,
|
57
86
|
classes: _propTypes["default"].shape({
|
58
87
|
item: _propTypes["default"].string
|
59
88
|
}),
|
60
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
61
|
-
title: _propTypes["default"].string
|
62
|
-
href: _propTypes["default"].string
|
63
|
-
|
89
|
+
items: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].element.isRequired), _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
90
|
+
title: _propTypes["default"].string,
|
91
|
+
href: _propTypes["default"].string,
|
92
|
+
|
93
|
+
/* @deprecated */
|
94
|
+
component: _propTypes["default"].element
|
95
|
+
}).isRequired)]).isRequired,
|
64
96
|
color: _propTypes["default"].oneOf(Object.values(TextColor))
|
65
97
|
};
|
66
98
|
var _default = Breadcrumbs;
|
@@ -19,6 +19,7 @@ export interface IButtonBannerProps {
|
|
19
19
|
/** Дополнительные data атрибуты к внутренним элементам */
|
20
20
|
dataAttrs?: {
|
21
21
|
root?: Record<string, string>;
|
22
|
+
button?: Record<string, string>;
|
22
23
|
};
|
23
24
|
/** Дополнительный css класс для корневого элемента */
|
24
25
|
className?: string;
|
@@ -71,6 +71,9 @@ var ButtonBanner = function ButtonBanner(_ref) {
|
|
71
71
|
onButtonClick = _ref.onButtonClick;
|
72
72
|
|
73
73
|
var buttonElem = /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
74
|
+
dataAttrs: {
|
75
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
76
|
+
},
|
74
77
|
className: cn('button', [classes.button]),
|
75
78
|
href: buttonUrl,
|
76
79
|
target: buttonTarget,
|
@@ -111,7 +114,8 @@ var ButtonBanner = function ButtonBanner(_ref) {
|
|
111
114
|
|
112
115
|
ButtonBanner.propTypes = {
|
113
116
|
dataAttrs: PropTypes.shape({
|
114
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
117
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
118
|
+
button: PropTypes.objectOf(PropTypes.string.isRequired)
|
115
119
|
}),
|
116
120
|
className: PropTypes.string,
|
117
121
|
classes: PropTypes.shape({
|
@@ -4,6 +4,8 @@ export interface IButtonLinkBoxProps {
|
|
4
4
|
/** Дополнительные data атрибуты к внутренним элементам */
|
5
5
|
dataAttrs?: {
|
6
6
|
root?: Record<string, string>;
|
7
|
+
link?: Record<string, string>;
|
8
|
+
button?: Record<string, string>;
|
7
9
|
};
|
8
10
|
/** Дополнительный класс корневого элемента */
|
9
11
|
className?: string;
|
@@ -54,6 +54,9 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
54
54
|
}), buttonTitle && /*#__PURE__*/_react["default"].createElement("div", {
|
55
55
|
className: cn('row')
|
56
56
|
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
57
|
+
dataAttrs: {
|
58
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
59
|
+
},
|
57
60
|
className: classes.button,
|
58
61
|
href: buttonUrl,
|
59
62
|
theme: buttonColor,
|
@@ -63,6 +66,9 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
63
66
|
}, buttonTitle)), linkTitle && /*#__PURE__*/_react["default"].createElement("div", {
|
64
67
|
className: cn('row')
|
65
68
|
}, /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
|
69
|
+
dataAttrs: {
|
70
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
71
|
+
},
|
66
72
|
className: classes.link,
|
67
73
|
href: linkUrl,
|
68
74
|
download: linkDownload,
|
@@ -74,7 +80,9 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
|
|
74
80
|
|
75
81
|
ButtonLinkBox.propTypes = {
|
76
82
|
dataAttrs: PropTypes.shape({
|
77
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
83
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
84
|
+
link: PropTypes.objectOf(PropTypes.string.isRequired),
|
85
|
+
button: PropTypes.objectOf(PropTypes.string.isRequired)
|
78
86
|
}),
|
79
87
|
className: PropTypes.string,
|
80
88
|
classes: PropTypes.shape({
|
@@ -23,9 +23,11 @@ export declare const ObjectFit: {
|
|
23
23
|
};
|
24
24
|
declare type ObjectFitType = typeof ObjectFit[keyof typeof ObjectFit];
|
25
25
|
export interface ICard {
|
26
|
-
/**
|
26
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
27
27
|
dataAttrs?: {
|
28
|
-
|
28
|
+
root?: Record<string, string>;
|
29
|
+
link?: Record<string, string>;
|
30
|
+
button?: Record<string, string>;
|
29
31
|
};
|
30
32
|
/** Дополнительный класс корневого элемента */
|
31
33
|
className?: string;
|
@@ -103,12 +103,15 @@ var Card = function Card(_ref) {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
return /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
|
106
|
-
className: cn('link', [classes.link]),
|
107
106
|
href: linkHref,
|
107
|
+
download: download,
|
108
108
|
target: linkTarget,
|
109
|
-
|
109
|
+
dataAttrs: {
|
110
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
111
|
+
},
|
112
|
+
className: cn('link', [classes.link])
|
110
113
|
}, linkTitle);
|
111
|
-
}, [link, isCardLink, classes]);
|
114
|
+
}, [link, isCardLink, classes, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
|
112
115
|
|
113
116
|
var renderBtn = _react["default"].useCallback(function () {
|
114
117
|
if (!button || isCardLink) {
|
@@ -120,12 +123,15 @@ var Card = function Card(_ref) {
|
|
120
123
|
btnTarget = button.target,
|
121
124
|
buttonDownload = button.download;
|
122
125
|
return /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
|
126
|
+
dataAttrs: {
|
127
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
128
|
+
},
|
123
129
|
className: cn('button', [classes.button]),
|
124
130
|
href: btnHref,
|
125
131
|
target: btnTarget,
|
126
132
|
download: buttonDownload
|
127
133
|
}, btnTitle);
|
128
|
-
}, [button, isCardLink, classes]);
|
134
|
+
}, [button, isCardLink, classes, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button]);
|
129
135
|
|
130
136
|
var renderBtnsWrapper = _react["default"].useCallback(function () {
|
131
137
|
var btnElem = renderBtn();
|
@@ -142,7 +148,7 @@ var Card = function Card(_ref) {
|
|
142
148
|
}, btnElem, linkElem);
|
143
149
|
}, [renderBtn, renderLink, isAlignAvailable, isLeftHAlign]);
|
144
150
|
|
145
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs), {
|
151
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
146
152
|
className: cn('', {
|
147
153
|
href: !!href,
|
148
154
|
'full-height': isFullHeight,
|
@@ -162,7 +168,11 @@ var Card = function Card(_ref) {
|
|
162
168
|
};
|
163
169
|
|
164
170
|
Card.propTypes = {
|
165
|
-
dataAttrs: _propTypes["default"].
|
171
|
+
dataAttrs: _propTypes["default"].shape({
|
172
|
+
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
173
|
+
link: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
174
|
+
button: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
175
|
+
}),
|
166
176
|
className: _propTypes["default"].string,
|
167
177
|
classes: _propTypes["default"].shape({
|
168
178
|
root: _propTypes["default"].string,
|
@@ -344,6 +344,9 @@ h5 {
|
|
344
344
|
.mfui-container .mfui-title-description-box + .mfui-download-links {
|
345
345
|
margin-top: 32px;
|
346
346
|
}
|
347
|
+
.mfui-container .mfui-title-description-box + .mfui-text-with-icon {
|
348
|
+
margin-top: 24px;
|
349
|
+
}
|
347
350
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
348
351
|
.mfui-container .mfui-title-description-box + .mfui-benefits-icons {
|
349
352
|
margin-top: 48px;
|
@@ -2230,6 +2233,9 @@ h5 {
|
|
2230
2233
|
.mfui-container .mfui-text-box + .mfui-download-links {
|
2231
2234
|
margin-top: 32px;
|
2232
2235
|
}
|
2236
|
+
.mfui-container .mfui-text-box + .mfui-text-with-icon {
|
2237
|
+
margin-top: 32px;
|
2238
|
+
}
|
2233
2239
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
2234
2240
|
.mfui-container .mfui-text-box + .mfui-benefits-icons {
|
2235
2241
|
margin-top: 48px;
|
@@ -2869,6 +2875,163 @@ h5 {
|
|
2869
2875
|
.mfui-container .mfui-page-title + .mfui-button-link-box {
|
2870
2876
|
margin-top: 0 !important;
|
2871
2877
|
}
|
2878
|
+
.mfui-container .mfui-text-with-icon + .mfui-benefits-pictures {
|
2879
|
+
margin-top: 40px;
|
2880
|
+
}
|
2881
|
+
.mfui-container .mfui-text-with-icon + .mfui-cards-box {
|
2882
|
+
margin-top: 40px;
|
2883
|
+
}
|
2884
|
+
.mfui-container .mfui-text-with-icon + .mfui-carousel-box {
|
2885
|
+
margin-top: 40px;
|
2886
|
+
}
|
2887
|
+
.mfui-container .mfui-text-with-icon + .mfui-video-block {
|
2888
|
+
margin-top: 40px;
|
2889
|
+
}
|
2890
|
+
.mfui-container .mfui-text-with-icon + .mfui-tabs-box {
|
2891
|
+
margin-top: 40px;
|
2892
|
+
}
|
2893
|
+
.mfui-container .mfui-text-with-icon + .mfui-partners {
|
2894
|
+
margin-top: 40px;
|
2895
|
+
}
|
2896
|
+
.mfui-container .mfui-text-with-icon + .mfui-instructions {
|
2897
|
+
margin-top: 40px;
|
2898
|
+
}
|
2899
|
+
.mfui-container .mfui-text-with-icon + .mfui-property {
|
2900
|
+
margin-top: 40px;
|
2901
|
+
}
|
2902
|
+
.mfui-container .mfui-text-with-icon + .mfui-table {
|
2903
|
+
margin-top: 40px;
|
2904
|
+
}
|
2905
|
+
.mfui-container .mfui-text-with-icon + .mfui-accordion-box {
|
2906
|
+
margin-top: 40px;
|
2907
|
+
}
|
2908
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-link-box {
|
2909
|
+
margin-top: 40px;
|
2910
|
+
}
|
2911
|
+
.mfui-container .mfui-text-with-icon + .mfui-download-links {
|
2912
|
+
margin-top: 40px;
|
2913
|
+
}
|
2914
|
+
.mfui-container .mfui-text-with-icon + .mfui-text-box {
|
2915
|
+
margin-top: 32px;
|
2916
|
+
}
|
2917
|
+
.mfui-container .mfui-text-with-icon + .mfui-picture-with-description {
|
2918
|
+
margin-top: 40px;
|
2919
|
+
}
|
2920
|
+
.mfui-container .mfui-text-with-icon + .mfui-store-banner {
|
2921
|
+
margin-top: 40px;
|
2922
|
+
}
|
2923
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-banner {
|
2924
|
+
margin-top: 40px;
|
2925
|
+
}
|
2926
|
+
.mfui-container .mfui-text-with-icon + .mfui-steps {
|
2927
|
+
margin-top: 40px;
|
2928
|
+
}
|
2929
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
2930
|
+
.mfui-container .mfui-text-with-icon + .mfui-benefits-pictures {
|
2931
|
+
margin-top: 48px;
|
2932
|
+
}
|
2933
|
+
.mfui-container .mfui-text-with-icon + .mfui-cards-box {
|
2934
|
+
margin-top: 48px;
|
2935
|
+
}
|
2936
|
+
.mfui-container .mfui-text-with-icon + .mfui-carousel-box {
|
2937
|
+
margin-top: 48px;
|
2938
|
+
}
|
2939
|
+
.mfui-container .mfui-text-with-icon + .mfui-video-block {
|
2940
|
+
margin-top: 48px;
|
2941
|
+
}
|
2942
|
+
.mfui-container .mfui-text-with-icon + .mfui-tabs-box {
|
2943
|
+
margin-top: 48px;
|
2944
|
+
}
|
2945
|
+
.mfui-container .mfui-text-with-icon + .mfui-partners {
|
2946
|
+
margin-top: 48px;
|
2947
|
+
}
|
2948
|
+
.mfui-container .mfui-text-with-icon + .mfui-instructions {
|
2949
|
+
margin-top: 48px;
|
2950
|
+
}
|
2951
|
+
.mfui-container .mfui-text-with-icon + .mfui-property {
|
2952
|
+
margin-top: 48px;
|
2953
|
+
}
|
2954
|
+
.mfui-container .mfui-text-with-icon + .mfui-table {
|
2955
|
+
margin-top: 48px;
|
2956
|
+
}
|
2957
|
+
.mfui-container .mfui-text-with-icon + .mfui-accordion-box {
|
2958
|
+
margin-top: 48px;
|
2959
|
+
}
|
2960
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-link-box {
|
2961
|
+
margin-top: 48px;
|
2962
|
+
}
|
2963
|
+
.mfui-container .mfui-text-with-icon + .mfui-download-links {
|
2964
|
+
margin-top: 48px;
|
2965
|
+
}
|
2966
|
+
.mfui-container .mfui-text-with-icon + .mfui-text-box {
|
2967
|
+
margin-top: 32px;
|
2968
|
+
}
|
2969
|
+
.mfui-container .mfui-text-with-icon + .mfui-picture-with-description {
|
2970
|
+
margin-top: 48px;
|
2971
|
+
}
|
2972
|
+
.mfui-container .mfui-text-with-icon + .mfui-store-banner {
|
2973
|
+
margin-top: 48px;
|
2974
|
+
}
|
2975
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-banner {
|
2976
|
+
margin-top: 48px;
|
2977
|
+
}
|
2978
|
+
.mfui-container .mfui-text-with-icon + .mfui-steps {
|
2979
|
+
margin-top: 48px;
|
2980
|
+
}
|
2981
|
+
}
|
2982
|
+
@media screen and (min-width: 1024px) {
|
2983
|
+
.mfui-container .mfui-text-with-icon + .mfui-benefits-pictures {
|
2984
|
+
margin-top: 56px;
|
2985
|
+
}
|
2986
|
+
.mfui-container .mfui-text-with-icon + .mfui-cards-box {
|
2987
|
+
margin-top: 56px;
|
2988
|
+
}
|
2989
|
+
.mfui-container .mfui-text-with-icon + .mfui-carousel-box {
|
2990
|
+
margin-top: 56px;
|
2991
|
+
}
|
2992
|
+
.mfui-container .mfui-text-with-icon + .mfui-video-block {
|
2993
|
+
margin-top: 56px;
|
2994
|
+
}
|
2995
|
+
.mfui-container .mfui-text-with-icon + .mfui-tabs-box {
|
2996
|
+
margin-top: 56px;
|
2997
|
+
}
|
2998
|
+
.mfui-container .mfui-text-with-icon + .mfui-partners {
|
2999
|
+
margin-top: 56px;
|
3000
|
+
}
|
3001
|
+
.mfui-container .mfui-text-with-icon + .mfui-instructions {
|
3002
|
+
margin-top: 56px;
|
3003
|
+
}
|
3004
|
+
.mfui-container .mfui-text-with-icon + .mfui-property {
|
3005
|
+
margin-top: 56px;
|
3006
|
+
}
|
3007
|
+
.mfui-container .mfui-text-with-icon + .mfui-table {
|
3008
|
+
margin-top: 56px;
|
3009
|
+
}
|
3010
|
+
.mfui-container .mfui-text-with-icon + .mfui-accordion-box {
|
3011
|
+
margin-top: 56px;
|
3012
|
+
}
|
3013
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-link-box {
|
3014
|
+
margin-top: 48px;
|
3015
|
+
}
|
3016
|
+
.mfui-container .mfui-text-with-icon + .mfui-download-links {
|
3017
|
+
margin-top: 48px;
|
3018
|
+
}
|
3019
|
+
.mfui-container .mfui-text-with-icon + .mfui-text-box {
|
3020
|
+
margin-top: 32px;
|
3021
|
+
}
|
3022
|
+
.mfui-container .mfui-text-with-icon + .mfui-picture-with-description {
|
3023
|
+
margin-top: 56px;
|
3024
|
+
}
|
3025
|
+
.mfui-container .mfui-text-with-icon + .mfui-store-banner {
|
3026
|
+
margin-top: 56px;
|
3027
|
+
}
|
3028
|
+
.mfui-container .mfui-text-with-icon + .mfui-button-banner {
|
3029
|
+
margin-top: 56px;
|
3030
|
+
}
|
3031
|
+
.mfui-container .mfui-text-with-icon + .mfui-steps {
|
3032
|
+
margin-top: 56px;
|
3033
|
+
}
|
3034
|
+
}
|
2872
3035
|
.mfui-container_disable-padding-top {
|
2873
3036
|
padding-top: 0 !important;
|
2874
3037
|
}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import './DownloadLink.less';
|
3
3
|
export interface IDownloadLink {
|
4
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
5
|
+
dataAttrs?: {
|
6
|
+
root?: Record<string, string>;
|
7
|
+
link?: Record<string, string>;
|
8
|
+
};
|
4
9
|
/** Ссылка на корневой элемент */
|
5
10
|
rootRef?: React.Ref<HTMLDivElement>;
|
6
11
|
/** Адресы ссылки */
|
@@ -46,25 +46,33 @@ var DownloadLink = function DownloadLink(_ref) {
|
|
46
46
|
className = _ref.className,
|
47
47
|
_ref$classes = _ref.classes,
|
48
48
|
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
49
|
-
rootRef = _ref.rootRef
|
50
|
-
|
49
|
+
rootRef = _ref.rootRef,
|
50
|
+
dataAttrs = _ref.dataAttrs;
|
51
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
51
52
|
className: cn([className, classes.root]),
|
52
53
|
ref: rootRef
|
53
|
-
}, /*#__PURE__*/React.createElement("div", {
|
54
|
+
}), /*#__PURE__*/React.createElement("div", {
|
54
55
|
className: cn('icon')
|
55
56
|
}, /*#__PURE__*/React.createElement(DownloadIcon, {
|
56
57
|
className: cn('icon-svg')
|
57
58
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
58
|
-
|
59
|
+
download: true,
|
59
60
|
href: href,
|
60
61
|
onClick: onClick,
|
61
|
-
|
62
|
+
dataAttrs: {
|
63
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
64
|
+
},
|
65
|
+
className: cn('link', [classes.link])
|
62
66
|
}, text), /*#__PURE__*/React.createElement("p", {
|
63
67
|
className: cn('info')
|
64
68
|
}, "".concat(extension).concat(extension && fileSize ? ',' : '', " ").concat(fileSize))));
|
65
69
|
};
|
66
70
|
|
67
71
|
DownloadLink.propTypes = {
|
72
|
+
dataAttrs: PropTypes.shape({
|
73
|
+
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
74
|
+
link: PropTypes.objectOf(PropTypes.string.isRequired)
|
75
|
+
}),
|
68
76
|
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
69
77
|
current: PropTypes.elementType
|
70
78
|
}), PropTypes.any])]),
|
@@ -22,6 +22,13 @@ export declare type InstructionItemType = {
|
|
22
22
|
isVideo: boolean;
|
23
23
|
};
|
24
24
|
export interface IInstructionsProps {
|
25
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
26
|
+
dataAttrs?: {
|
27
|
+
root?: Record<string, string>;
|
28
|
+
item?: Record<string, string>;
|
29
|
+
image?: Record<string, string>;
|
30
|
+
mobileItemText?: Record<string, string>;
|
31
|
+
};
|
25
32
|
/** Ссылка на корневой элемент */
|
26
33
|
rootRef?: Ref<HTMLDivElement>;
|
27
34
|
/** Дополнительные классы для внутренних элементов */
|