@megafon/ui-shared 2.0.0-beta.98 → 2.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 +1637 -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 +1848 -533
- 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 +6 -6
- 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 +293 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +67 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +164 -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 +1848 -533
- 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 +6 -6
- 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 +293 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +67 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +191 -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 +20 -75
@@ -1,9 +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.array.map");
|
6
|
-
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
8
4
|
value: true
|
9
5
|
});
|
@@ -13,19 +9,17 @@ require("core-js/modules/es.array.map");
|
|
13
9
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
15
11
|
|
16
|
-
var
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
17
13
|
|
18
|
-
var
|
19
|
-
|
20
|
-
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
14
|
+
var _uiCore = require("@megafon/ui-core");
|
21
15
|
|
22
|
-
var
|
16
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
23
17
|
|
24
|
-
var
|
18
|
+
var _htmr = _interopRequireDefault(require("htmr"));
|
25
19
|
|
26
|
-
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
27
21
|
|
28
|
-
|
22
|
+
var _react2 = require("swiper/react");
|
29
23
|
|
30
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
31
25
|
|
@@ -40,179 +34,229 @@ var pictureMaskTypes = {
|
|
40
34
|
BLACK_IPHONE: 'black-iphone',
|
41
35
|
WHITE_IPHONE: 'white-iphone',
|
42
36
|
LAPTOP: 'laptop',
|
37
|
+
IPHONE_12: 'iphone-12',
|
43
38
|
NONE: 'none'
|
44
39
|
};
|
45
40
|
exports.pictureMaskTypes = pictureMaskTypes;
|
46
|
-
var cn = (0,
|
41
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-instructions');
|
47
42
|
var swiperSlideCn = cn('slide');
|
48
43
|
|
49
44
|
var Instructions = function Instructions(_ref) {
|
50
|
-
var
|
45
|
+
var rootRef = _ref.rootRef,
|
46
|
+
_ref$classes = _ref.classes;
|
47
|
+
_ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
|
48
|
+
var instructionItem = _ref$classes.instructionItem,
|
49
|
+
desktopInstructionItem = _ref$classes.desktopInstructionItem,
|
50
|
+
mobileInstructionItem = _ref$classes.mobileInstructionItem,
|
51
|
+
activeInstructionItem = _ref$classes.activeInstructionItem,
|
52
|
+
desktopItemTitle = _ref$classes.desktopItemTitle,
|
53
|
+
mobileItemTitle = _ref$classes.mobileItemTitle,
|
54
|
+
instructionItemImg = _ref$classes.instructionItemImg,
|
55
|
+
additionalText = _ref$classes.additionalText,
|
56
|
+
title = _ref.title,
|
51
57
|
instructionItems = _ref.instructionItems,
|
52
58
|
_ref$pictureAlign = _ref.pictureAlign,
|
53
59
|
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
54
60
|
_ref$pictureMask = _ref.pictureMask,
|
55
|
-
pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask
|
61
|
+
pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
|
62
|
+
getSwiper = _ref.getSwiper,
|
63
|
+
text = _ref.additionalText;
|
56
64
|
|
57
|
-
var _React$useState =
|
65
|
+
var _React$useState = _react["default"].useState(),
|
58
66
|
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
59
67
|
swiperInstance = _React$useState2[0],
|
60
68
|
setSwiperInstance = _React$useState2[1];
|
61
69
|
|
62
|
-
var _React$useState3 =
|
70
|
+
var _React$useState3 = _react["default"].useState(0),
|
63
71
|
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
64
72
|
slideIndex = _React$useState4[0],
|
65
73
|
setSlideIndex = _React$useState4[1];
|
66
74
|
|
67
|
-
var
|
68
|
-
_React$useState6 = (0, _slicedToArray2["default"])(_React$useState5, 2),
|
69
|
-
isMobile = _React$useState6[0],
|
70
|
-
setIsMobile = _React$useState6[1];
|
71
|
-
|
72
|
-
var getSwiperInstance = React.useCallback(function (swiper) {
|
75
|
+
var getSwiperInstance = _react["default"].useCallback(function (swiper) {
|
73
76
|
setSwiperInstance(swiper);
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
getSwiper && getSwiper(swiper);
|
78
|
+
}, [getSwiper]);
|
79
|
+
|
80
|
+
var getActiveCustomClass = _react["default"].useCallback(function (articleIndex, activeIndex) {
|
81
|
+
if (articleIndex !== activeIndex) {
|
82
|
+
return undefined;
|
83
|
+
}
|
84
|
+
|
85
|
+
return activeInstructionItem;
|
86
|
+
}, [activeInstructionItem]);
|
87
|
+
|
88
|
+
var handleArticleClick = _react["default"].useCallback(function (ind) {
|
80
89
|
return function () {
|
81
90
|
setSlideIndex(ind);
|
82
91
|
swiperInstance && swiperInstance.slideTo(ind);
|
83
92
|
};
|
84
93
|
}, [swiperInstance]);
|
85
|
-
var renderTitle = React.useCallback(function (resolution) {
|
86
|
-
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
87
|
-
className: cn('title', {
|
88
|
-
resolution: resolution
|
89
|
-
}),
|
90
|
-
as: "h2"
|
91
|
-
}, title);
|
92
|
-
}, []);
|
93
|
-
var renderPicture = React.useCallback(function () {
|
94
|
-
if (pictureMask === pictureMaskTypes.NONE) {
|
95
|
-
return renderSlider();
|
96
|
-
}
|
97
94
|
|
98
|
-
|
99
|
-
|
100
|
-
}, /*#__PURE__*/React.createElement("div", {
|
101
|
-
className: cn('device-screen')
|
102
|
-
}), renderSlider());
|
103
|
-
}, [pictureMask]);
|
104
|
-
var renderVideo = React.useCallback(function (mediaUrl) {
|
105
|
-
return /*#__PURE__*/React.createElement("video", {
|
95
|
+
var renderVideo = _react["default"].useCallback(function (mediaUrl) {
|
96
|
+
return /*#__PURE__*/_react["default"].createElement("video", {
|
106
97
|
className: cn('swiper-img'),
|
107
98
|
autoPlay: true,
|
108
99
|
muted: true,
|
109
|
-
loop: true
|
110
|
-
|
100
|
+
loop: true,
|
101
|
+
playsInline: true
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
111
103
|
src: mediaUrl,
|
112
104
|
type: "video/mp4"
|
113
105
|
}));
|
114
106
|
}, []);
|
115
|
-
|
116
|
-
|
107
|
+
|
108
|
+
var renderSlider = _react["default"].useCallback(function () {
|
109
|
+
return /*#__PURE__*/_react["default"].createElement(_react2.Swiper, {
|
117
110
|
className: cn('swiper'),
|
118
111
|
onSwiper: getSwiperInstance,
|
119
112
|
noSwipingClass: swiperSlideCn
|
120
113
|
}, instructionItems.map(function (_ref2, ind) {
|
121
114
|
var mediaUrl = _ref2.mediaUrl,
|
122
115
|
isVideo = _ref2.isVideo;
|
123
|
-
return /*#__PURE__*/
|
116
|
+
return /*#__PURE__*/_react["default"].createElement(_react2.SwiperSlide, {
|
124
117
|
className: swiperSlideCn,
|
125
118
|
key: ind + mediaUrl
|
126
|
-
}, isVideo ? renderVideo(mediaUrl) : /*#__PURE__*/
|
127
|
-
className: cn('swiper-img'),
|
119
|
+
}, isVideo ? renderVideo(mediaUrl) : /*#__PURE__*/_react["default"].createElement("img", {
|
120
|
+
className: cn('swiper-img', [instructionItemImg]),
|
128
121
|
src: mediaUrl,
|
129
122
|
alt: ""
|
130
123
|
}));
|
131
124
|
}));
|
132
|
-
}, [instructionItems]);
|
133
|
-
|
134
|
-
|
135
|
-
|
125
|
+
}, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo]);
|
126
|
+
|
127
|
+
var renderTitle = _react["default"].useCallback(function (resolution) {
|
128
|
+
return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
129
|
+
className: cn('title', {
|
130
|
+
resolution: resolution
|
131
|
+
}),
|
132
|
+
as: "h2"
|
133
|
+
}, title);
|
134
|
+
}, [title]);
|
135
|
+
|
136
|
+
var renderText = _react["default"].useCallback(function () {
|
137
|
+
return /*#__PURE__*/_react["default"].createElement(_uiCore.Paragraph, {
|
138
|
+
className: cn('text', [additionalText]),
|
139
|
+
hasMargin: false
|
140
|
+
}, (0, _htmr["default"])(text));
|
141
|
+
}, [text, additionalText]);
|
142
|
+
|
143
|
+
var renderPicture = _react["default"].useCallback(function () {
|
144
|
+
if (pictureMask === pictureMaskTypes.NONE) {
|
145
|
+
return renderSlider();
|
146
|
+
}
|
147
|
+
|
148
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
149
|
+
className: cn('img-wrapper')
|
150
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
151
|
+
className: cn('device-screen')
|
152
|
+
}), renderSlider());
|
153
|
+
}, [pictureMask, renderSlider]);
|
154
|
+
|
155
|
+
var renderDesktopArticles = _react["default"].useCallback(function () {
|
156
|
+
return /*#__PURE__*/_react["default"].createElement("ul", {
|
157
|
+
className: cn('articles-list', {
|
158
|
+
'text-after': !!text,
|
159
|
+
desktop: true
|
160
|
+
})
|
136
161
|
}, instructionItems.map(function (_ref3, ind) {
|
137
162
|
var itemTitle = _ref3.title;
|
138
|
-
return
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
163
|
+
return (
|
164
|
+
/*#__PURE__*/
|
165
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
166
|
+
_react["default"].createElement("li", {
|
167
|
+
className: cn('articles-item', {
|
168
|
+
active: slideIndex === ind
|
169
|
+
}, [getActiveCustomClass(ind, slideIndex), instructionItem, desktopInstructionItem]),
|
170
|
+
"data-index": ind,
|
171
|
+
onClick: handleArticleClick(ind),
|
172
|
+
key: ind
|
173
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
174
|
+
className: cn('articles-item-dot')
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
176
|
+
className: cn('articles-item-dot-number')
|
177
|
+
}, ind + 1)), /*#__PURE__*/_react["default"].createElement("div", {
|
178
|
+
className: cn('articles-item-title', [desktopItemTitle])
|
179
|
+
}, itemTitle))
|
180
|
+
);
|
152
181
|
}));
|
153
|
-
}, [instructionItems, slideIndex,
|
154
|
-
|
155
|
-
|
182
|
+
}, [desktopInstructionItem, desktopItemTitle, getActiveCustomClass, handleArticleClick, instructionItem, instructionItems, slideIndex, text]);
|
183
|
+
|
184
|
+
var renderMobileArticles = _react["default"].useCallback(function () {
|
185
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
186
|
+
className: cn('articles-list', {
|
187
|
+
mobile: true
|
188
|
+
})
|
189
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
156
190
|
className: cn('articles-title-block')
|
157
191
|
}, instructionItems.map(function (_ref4, ind) {
|
158
192
|
var itemTitle = _ref4.title;
|
159
|
-
return slideIndex === ind && /*#__PURE__*/
|
160
|
-
className: cn('articles-title'),
|
161
|
-
|
193
|
+
return slideIndex === ind && /*#__PURE__*/_react["default"].createElement("div", {
|
194
|
+
className: cn('articles-title', [mobileItemTitle]),
|
195
|
+
"data-index": ind,
|
162
196
|
key: ind
|
163
197
|
}, itemTitle);
|
164
|
-
})), /*#__PURE__*/
|
165
|
-
className: cn('articles-dots'
|
198
|
+
})), /*#__PURE__*/_react["default"].createElement("ul", {
|
199
|
+
className: cn('articles-dots', {
|
200
|
+
'text-after': !!text
|
201
|
+
})
|
166
202
|
}, instructionItems.map(function (_item, ind) {
|
167
|
-
return /*#__PURE__*/
|
203
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
168
204
|
key: ind,
|
169
205
|
className: cn('articles-dot', {
|
170
206
|
active: slideIndex === ind
|
171
|
-
}),
|
207
|
+
}, [getActiveCustomClass(ind, slideIndex), instructionItem, mobileInstructionItem]),
|
172
208
|
onClick: handleArticleClick(ind)
|
173
|
-
}, /*#__PURE__*/
|
209
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
174
210
|
className: cn('articles-dot-number')
|
175
211
|
}, ind + 1));
|
176
212
|
})));
|
177
|
-
}, [instructionItems, slideIndex,
|
178
|
-
|
179
|
-
|
180
|
-
handleResize();
|
181
|
-
window.addEventListener('resize', handleSetThrottled);
|
182
|
-
return function () {
|
183
|
-
window.removeEventListener('resize', handleSetThrottled);
|
184
|
-
};
|
185
|
-
}, [handleResize]);
|
186
|
-
return /*#__PURE__*/React.createElement("div", {
|
213
|
+
}, [getActiveCustomClass, handleArticleClick, instructionItem, instructionItems, mobileInstructionItem, mobileItemTitle, slideIndex, text]);
|
214
|
+
|
215
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
187
216
|
className: cn({
|
188
217
|
mask: pictureMask
|
189
|
-
})
|
190
|
-
|
218
|
+
}),
|
219
|
+
ref: rootRef
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, {
|
191
221
|
hAlign: "center"
|
192
|
-
}, /*#__PURE__*/
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, {
|
193
223
|
all: "12"
|
194
|
-
}, renderTitle('mobile'), /*#__PURE__*/
|
224
|
+
}, renderTitle('mobile'), /*#__PURE__*/_react["default"].createElement("div", {
|
195
225
|
className: cn('wrapper')
|
196
|
-
}, /*#__PURE__*/
|
226
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
197
227
|
className: cn('picture', {
|
198
228
|
align: pictureAlign
|
199
229
|
})
|
200
|
-
}, renderPicture()), /*#__PURE__*/
|
230
|
+
}, renderPicture()), /*#__PURE__*/_react["default"].createElement("div", {
|
201
231
|
className: cn('articles', {
|
202
232
|
align: pictureAlign
|
203
233
|
})
|
204
|
-
}, renderTitle('desktop'),
|
234
|
+
}, renderTitle('desktop'), renderMobileArticles(), renderDesktopArticles(), text && renderText())))));
|
205
235
|
};
|
206
236
|
|
207
237
|
Instructions.propTypes = {
|
238
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
239
|
+
current: _propTypes["default"].elementType
|
240
|
+
}), _propTypes["default"].any])]),
|
241
|
+
classes: _propTypes["default"].shape({
|
242
|
+
instructionItem: _propTypes["default"].string,
|
243
|
+
desktopInstructionItem: _propTypes["default"].string,
|
244
|
+
mobileInstructionItem: _propTypes["default"].string,
|
245
|
+
activeInstructionItem: _propTypes["default"].string,
|
246
|
+
desktopItemTitle: _propTypes["default"].string,
|
247
|
+
mobileItemTitle: _propTypes["default"].string,
|
248
|
+
instructionItemImg: _propTypes["default"].string
|
249
|
+
}),
|
208
250
|
title: _propTypes["default"].string.isRequired,
|
251
|
+
additionalText: _propTypes["default"].string,
|
209
252
|
instructionItems: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
210
|
-
title: _propTypes["default"].string.isRequired,
|
253
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
211
254
|
mediaUrl: _propTypes["default"].string.isRequired,
|
212
255
|
isVideo: _propTypes["default"].bool.isRequired
|
213
256
|
}).isRequired).isRequired,
|
214
257
|
pictureAlign: _propTypes["default"].oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
215
|
-
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.NONE])
|
258
|
+
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.IPHONE_12, pictureMaskTypes.NONE]),
|
259
|
+
getSwiper: _propTypes["default"].func
|
216
260
|
};
|
217
261
|
var _default = Instructions;
|
218
262
|
exports["default"] = _default;
|
Binary file
|
@@ -0,0 +1,80 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-page-title {
|
9
|
+
display: inline-block;
|
10
|
+
width: 100%;
|
11
|
+
}
|
12
|
+
.mfui-page-title__breadcrumbs {
|
13
|
+
margin-top: 32px;
|
14
|
+
}
|
15
|
+
@media screen and (max-width: 767px) {
|
16
|
+
.mfui-page-title__breadcrumbs {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
.mfui-page-title__title {
|
21
|
+
margin-top: 110px;
|
22
|
+
}
|
23
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
24
|
+
.mfui-page-title__title {
|
25
|
+
margin-top: 100px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
29
|
+
.mfui-page-title__title {
|
30
|
+
margin-top: 90px;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
@media screen and (max-width: 767px) {
|
34
|
+
.mfui-page-title__title {
|
35
|
+
margin-top: 45px;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
.mfui-page-title__badge {
|
39
|
+
font-size: 12px;
|
40
|
+
line-height: 16px;
|
41
|
+
display: inline-block;
|
42
|
+
margin-top: 16px;
|
43
|
+
padding: 2px 14px;
|
44
|
+
color: #FFFFFF;
|
45
|
+
font-weight: 500;
|
46
|
+
background-color: #731982;
|
47
|
+
}
|
48
|
+
@media screen and (min-width: 1280px) {
|
49
|
+
.mfui-page-title__badge_under-breadcrumbs {
|
50
|
+
margin-top: 32px;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
54
|
+
.mfui-page-title__badge_under-breadcrumbs {
|
55
|
+
margin-top: 24px;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
59
|
+
.mfui-page-title__badge_under-breadcrumbs {
|
60
|
+
margin-top: 16px;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
@media screen and (min-width: 1280px) {
|
64
|
+
.mfui-page-title__title_under-breadcrumbs {
|
65
|
+
margin-top: 60px;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
69
|
+
.mfui-page-title__title_under-breadcrumbs {
|
70
|
+
margin-top: 50px;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
74
|
+
.mfui-page-title__title_under-breadcrumbs {
|
75
|
+
margin-top: 45px;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
.mfui-page-title__badge + .mfui-page-title__title {
|
79
|
+
margin-top: 8px;
|
80
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import './PageTitle.less';
|
3
|
+
import { Props as BreadcrumbsType } from '../Breadcrumbs/Breadcrumbs';
|
4
|
+
declare type Props = {
|
5
|
+
/** Текст заголовка */
|
6
|
+
title: string | React.ReactNode | React.ReactNode[];
|
7
|
+
/** Хлебные крошки */
|
8
|
+
breadcrumbs?: BreadcrumbsType['items'];
|
9
|
+
/** Текст бейджа */
|
10
|
+
badge?: string;
|
11
|
+
/** Растягивание компонента на всю доступную ширину */
|
12
|
+
isFullWidth?: boolean;
|
13
|
+
/** Класс для корневого элемента */
|
14
|
+
className?: string;
|
15
|
+
/** Дополнительные классы для внутренних элементов */
|
16
|
+
classes?: {
|
17
|
+
breadcrumbs?: string;
|
18
|
+
};
|
19
|
+
/** Ссылка на корневой элемент */
|
20
|
+
rootRef?: React.RefObject<HTMLDivElement>;
|
21
|
+
};
|
22
|
+
declare const PageTitle: React.FC<Props>;
|
23
|
+
export default PageTitle;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _uiCore = require("@megafon/ui-core");
|
13
|
+
|
14
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
15
|
+
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
17
|
+
|
18
|
+
var _Breadcrumbs = _interopRequireDefault(require("../Breadcrumbs/Breadcrumbs"));
|
19
|
+
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
21
|
+
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
23
|
+
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
|
+
|
26
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-page-title');
|
27
|
+
|
28
|
+
var PageTitle = function PageTitle(_ref) {
|
29
|
+
var title = _ref.title,
|
30
|
+
breadcrumbs = _ref.breadcrumbs,
|
31
|
+
badge = _ref.badge,
|
32
|
+
_ref$isFullWidth = _ref.isFullWidth,
|
33
|
+
isFullWidth = _ref$isFullWidth === void 0 ? true : _ref$isFullWidth,
|
34
|
+
className = _ref.className,
|
35
|
+
_ref$classes = _ref.classes,
|
36
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
37
|
+
rootRef = _ref.rootRef;
|
38
|
+
var isBreadcrumbs = !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length);
|
39
|
+
var renderPageTitle = React.useCallback(function () {
|
40
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, badge && /*#__PURE__*/React.createElement("div", {
|
41
|
+
className: cn('badge', {
|
42
|
+
'under-breadcrumbs': isBreadcrumbs
|
43
|
+
})
|
44
|
+
}, badge), /*#__PURE__*/React.createElement(_uiCore.Header, {
|
45
|
+
className: cn('title', {
|
46
|
+
'under-breadcrumbs': isBreadcrumbs && !badge
|
47
|
+
}),
|
48
|
+
as: "h1"
|
49
|
+
}, title));
|
50
|
+
}, [badge, title, isBreadcrumbs]);
|
51
|
+
var renderPageTitleWithGrid = React.useCallback(function () {
|
52
|
+
return /*#__PURE__*/React.createElement(_uiCore.Grid, null, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
53
|
+
wide: "8",
|
54
|
+
desktop: "10",
|
55
|
+
tablet: "12",
|
56
|
+
mobile: "12"
|
57
|
+
}, renderPageTitle()));
|
58
|
+
}, [renderPageTitle]);
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
60
|
+
className: cn([className]),
|
61
|
+
ref: rootRef
|
62
|
+
}, (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && /*#__PURE__*/React.createElement(_Breadcrumbs["default"], {
|
63
|
+
items: breadcrumbs,
|
64
|
+
className: cn('breadcrumbs', [classes.breadcrumbs])
|
65
|
+
}), isFullWidth ? renderPageTitle() : renderPageTitleWithGrid());
|
66
|
+
};
|
67
|
+
|
68
|
+
PageTitle.propTypes = {
|
69
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
70
|
+
breadcrumbs: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
71
|
+
title: _propTypes["default"].string.isRequired,
|
72
|
+
href: _propTypes["default"].string
|
73
|
+
}).isRequired),
|
74
|
+
badge: _propTypes["default"].string,
|
75
|
+
isFullWidth: _propTypes["default"].bool,
|
76
|
+
className: _propTypes["default"].string,
|
77
|
+
classes: _propTypes["default"].shape({
|
78
|
+
breadcrumbs: _propTypes["default"].string
|
79
|
+
}),
|
80
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
81
|
+
current: _propTypes["default"].elementType
|
82
|
+
}), _propTypes["default"].any])])
|
83
|
+
};
|
84
|
+
var _default = PageTitle;
|
85
|
+
exports["default"] = _default;
|
@@ -5,58 +5,49 @@ h4,
|
|
5
5
|
h5 {
|
6
6
|
margin: 0;
|
7
7
|
}
|
8
|
-
.mfui-
|
8
|
+
.mfui-partners__tile:not(:last-child) {
|
9
9
|
margin-bottom: 20px;
|
10
10
|
}
|
11
11
|
@media screen and (max-width: 767px) {
|
12
|
-
.mfui-
|
12
|
+
.mfui-partners__tile:not(:last-child) {
|
13
13
|
margin-bottom: 16px;
|
14
14
|
}
|
15
15
|
}
|
16
|
-
|
17
|
-
.mfui-beta-partners__slide .mfui-beta-partners__tile {
|
18
|
-
width: 153px;
|
19
|
-
}
|
20
|
-
}
|
21
|
-
@media screen and (max-width: 767px) {
|
22
|
-
.mfui-beta-partners__slide .mfui-beta-partners__tile {
|
23
|
-
width: 120px;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
.mfui-beta-partners__tile-inner {
|
27
|
-
display: -webkit-box;
|
28
|
-
display: -ms-flexbox;
|
29
|
-
display: flex;
|
30
|
-
-webkit-box-align: center;
|
31
|
-
-ms-flex-align: center;
|
32
|
-
align-items: center;
|
33
|
-
-webkit-box-pack: center;
|
34
|
-
-ms-flex-pack: center;
|
35
|
-
justify-content: center;
|
16
|
+
.mfui-partners__tile-inner {
|
36
17
|
-webkit-box-sizing: border-box;
|
37
18
|
box-sizing: border-box;
|
38
|
-
|
19
|
+
height: 132px;
|
39
20
|
padding: 28px 48px;
|
40
21
|
}
|
41
22
|
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
42
|
-
.mfui-
|
43
|
-
|
23
|
+
.mfui-partners__tile-inner {
|
24
|
+
height: 104px;
|
44
25
|
padding: 22px 37px;
|
45
26
|
}
|
46
27
|
}
|
47
28
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
48
|
-
.mfui-
|
49
|
-
|
29
|
+
.mfui-partners__tile-inner {
|
30
|
+
height: 77px;
|
50
31
|
padding: 10px;
|
51
32
|
}
|
52
33
|
}
|
53
34
|
@media screen and (max-width: 767px) {
|
54
|
-
.mfui-
|
55
|
-
|
35
|
+
.mfui-partners__tile-inner {
|
36
|
+
height: 60px;
|
56
37
|
padding: 8px;
|
57
38
|
}
|
58
39
|
}
|
59
|
-
.mfui-
|
40
|
+
.mfui-partners__img-wrapper {
|
41
|
+
position: relative;
|
42
|
+
width: 100%;
|
43
|
+
height: 100%;
|
44
|
+
}
|
45
|
+
.mfui-partners__tile-img {
|
46
|
+
position: absolute;
|
47
|
+
top: 50%;
|
48
|
+
left: 50%;
|
60
49
|
max-width: 100%;
|
61
|
-
|
50
|
+
max-height: 100%;
|
51
|
+
-webkit-transform: translate(-50%, -50%);
|
52
|
+
transform: translate(-50%, -50%);
|
62
53
|
}
|
@@ -3,8 +3,20 @@ import './Partners.less';
|
|
3
3
|
export declare type ItemType = {
|
4
4
|
src: string;
|
5
5
|
href?: string;
|
6
|
+
alt: string;
|
6
7
|
};
|
7
8
|
export interface IPartnersProps {
|
9
|
+
/** Ссылка на корневой элемент */
|
10
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
11
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
12
|
+
classes?: {
|
13
|
+
root?: string;
|
14
|
+
itemClass?: string;
|
15
|
+
};
|
16
|
+
/** Дата атрибуты для корневого элемента */
|
17
|
+
dataAttrs?: {
|
18
|
+
[key: string]: string;
|
19
|
+
};
|
8
20
|
/** Дополнительный класс корневого элемента */
|
9
21
|
className?: string;
|
10
22
|
/** Список логотипов */
|
@@ -14,7 +26,7 @@ export interface IPartnersProps {
|
|
14
26
|
/** Обработчик клика по стрелке назад (должен быть обернут в useCallback) */
|
15
27
|
onPrevClick?: (index: number) => void;
|
16
28
|
/** Обработчик смены слайда (должен быть обернут в useCallback) */
|
17
|
-
onChange?: (
|
29
|
+
onChange?: (currentIndex: number, previousIndex: number, slidesPerView?: number | 'auto') => void;
|
18
30
|
}
|
19
31
|
declare const Partners: React.FC<IPartnersProps>;
|
20
32
|
export default Partners;
|