@megafon/ui-shared 5.17.0 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +3 -12
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +6 -20
- package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/es/components/BenefitsPictures/helpers.js +0 -14
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/es/components/BenefitsPictures/types.js +1 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
- package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
- package/dist/es/components/Card/Card.d.ts +4 -4
- package/dist/es/components/Card/Card.js +25 -115
- package/dist/es/components/Card/types.d.ts +10 -10
- package/dist/es/components/Card/types.js +1 -0
- package/dist/es/components/CardsBox/CardsBox.js +3 -14
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +0 -4
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
- package/dist/es/components/Container/Container.d.ts +7 -5
- package/dist/es/components/Container/Container.js +10 -25
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +8 -7
- package/dist/es/components/ImageBanner/ImageBanner.js +37 -88
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +41 -94
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +12 -37
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +17 -48
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +37 -81
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +8 -28
- package/dist/es/components/Property/types.d.ts +7 -5
- package/dist/es/components/Property/types.js +1 -0
- package/dist/es/components/Steps/Steps.d.ts +2 -1
- package/dist/es/components/Steps/Steps.js +4 -19
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +2 -9
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +13 -44
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +31 -51
- package/dist/es/components/Table/TableCell.js +0 -6
- package/dist/es/components/Table/TableRow.js +1 -10
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +4 -13
- package/dist/es/components/TextBox/TextBox.d.ts +2 -1
- package/dist/es/components/TextBox/TextBox.js +8 -23
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +6 -21
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +35 -75
- package/dist/es/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +10 -66
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +32 -56
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +12 -43
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +9 -17
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +4 -23
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +5 -16
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +7 -25
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +26 -86
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +13 -53
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +10 -37
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/lib/components/BenefitsIcons/types.js +5 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +24 -71
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/lib/components/BenefitsPictures/helpers.js +9 -40
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/lib/components/BenefitsPictures/types.js +5 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +18 -60
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +22 -55
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +40 -89
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +29 -72
- package/dist/lib/components/Card/Card.d.ts +4 -4
- package/dist/lib/components/Card/Card.js +67 -164
- package/dist/lib/components/Card/types.d.ts +10 -10
- package/dist/lib/components/Card/types.js +5 -1
- package/dist/lib/components/CardsBox/CardsBox.js +7 -31
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +1 -8
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +15 -39
- package/dist/lib/components/Container/Container.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +18 -40
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +17 -60
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +8 -33
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +8 -7
- package/dist/lib/components/ImageBanner/ImageBanner.js +61 -138
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +103 -186
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +15 -52
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +21 -65
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +60 -120
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +15 -46
- package/dist/lib/components/Property/types.d.ts +7 -5
- package/dist/lib/components/Property/types.js +5 -1
- package/dist/lib/components/Steps/Steps.d.ts +2 -1
- package/dist/lib/components/Steps/Steps.js +8 -35
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +11 -23
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +17 -63
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +35 -68
- package/dist/lib/components/Table/TableCell.js +4 -16
- package/dist/lib/components/Table/TableRow.js +5 -19
- package/dist/lib/components/TabsBox/TabBox.js +1 -4
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +8 -26
- package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
- package/dist/lib/components/TextBox/TextBox.js +12 -36
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +10 -37
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +83 -176
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +58 -114
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
- package/dist/lib/helpers/getColumnConfig.js +2 -5
- package/dist/lib/index.js +10 -57
- package/package.json +87 -92
- package/CHANGELOG.md +0 -4002
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +0 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +0 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +0 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +0 -34
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
- package/dist/es/components/Card/Card.css +0 -354
- package/dist/es/components/Container/Container.css +0 -3245
- package/dist/es/components/DownloadLinks/DownloadLink.css +0 -37
- package/dist/es/components/DownloadLinks/DownloadLinks.css +0 -36
- package/dist/es/components/ImageBanner/ImageBanner.css +0 -252
- package/dist/es/components/Instructions/Instructions.css +0 -790
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/es/components/PageTitle/PageTitle.css +0 -80
- package/dist/es/components/Partners/Partners.css +0 -53
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +0 -80
- package/dist/es/components/Property/Property.css +0 -156
- package/dist/es/components/Property/PropertyDescription.css +0 -17
- package/dist/es/components/Steps/Steps.css +0 -41
- package/dist/es/components/Steps/StepsItem.css +0 -42
- package/dist/es/components/StoreBanner/StoreBanner.css +0 -346
- package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.css +0 -327
- package/dist/es/components/Table/Table.css +0 -157
- package/dist/es/components/TextBox/TextBox.css +0 -25
- package/dist/es/components/TextBox/TextBoxPicture.css +0 -27
- package/dist/es/components/TextWithIcon/TextWithIcon.css +0 -10
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +0 -29
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
- package/dist/es/components/VideoBanner/VideoBanner.css +0 -225
- package/dist/es/components/VideoBlock/VideoBlock.css +0 -106
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +0 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +0 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +0 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +0 -34
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
- package/dist/lib/components/Card/Card.css +0 -354
- package/dist/lib/components/Container/Container.css +0 -3245
- package/dist/lib/components/DownloadLinks/DownloadLink.css +0 -37
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +0 -36
- package/dist/lib/components/ImageBanner/ImageBanner.css +0 -252
- package/dist/lib/components/Instructions/Instructions.css +0 -790
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- package/dist/lib/components/PageTitle/PageTitle.css +0 -80
- package/dist/lib/components/Partners/Partners.css +0 -53
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +0 -80
- package/dist/lib/components/Property/Property.css +0 -156
- package/dist/lib/components/Property/PropertyDescription.css +0 -17
- package/dist/lib/components/Steps/Steps.css +0 -41
- package/dist/lib/components/Steps/StepsItem.css +0 -42
- package/dist/lib/components/StoreBanner/StoreBanner.css +0 -346
- package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.css +0 -327
- package/dist/lib/components/Table/Table.css +0 -157
- package/dist/lib/components/TextBox/TextBox.css +0 -25
- package/dist/lib/components/TextBox/TextBoxPicture.css +0 -27
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +0 -10
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +0 -29
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
- package/dist/lib/components/VideoBanner/VideoBanner.css +0 -225
- package/dist/lib/components/VideoBlock/VideoBlock.css +0 -106
@@ -2,25 +2,23 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import * as React from 'react';
|
3
3
|
import { Header, Grid, GridColumn } from '@megafon/ui-core';
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
5
|
-
import PropTypes from 'prop-types';
|
6
|
-
import "./PageTitle.css";
|
7
5
|
import Breadcrumbs from "../Breadcrumbs/Breadcrumbs";
|
6
|
+
import "./PageTitle.css";
|
8
7
|
var testIdPrefix = 'PageTitle';
|
9
8
|
var cn = cnCreate('mfui-page-title');
|
10
|
-
|
11
9
|
var PageTitle = function PageTitle(_ref) {
|
12
10
|
var dataAttrs = _ref.dataAttrs,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
11
|
+
title = _ref.title,
|
12
|
+
breadcrumbs = _ref.breadcrumbs,
|
13
|
+
badge = _ref.badge,
|
14
|
+
_ref$isFullWidth = _ref.isFullWidth,
|
15
|
+
isFullWidth = _ref$isFullWidth === void 0 ? true : _ref$isFullWidth,
|
16
|
+
_ref$hasBreadcrumbsMi = _ref.hasBreadcrumbsMicrodata,
|
17
|
+
hasBreadcrumbsMicrodata = _ref$hasBreadcrumbsMi === void 0 ? false : _ref$hasBreadcrumbsMi,
|
18
|
+
className = _ref.className,
|
19
|
+
_ref$classes = _ref.classes,
|
20
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
21
|
+
rootRef = _ref.rootRef;
|
24
22
|
var isBreadcrumbs = !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length);
|
25
23
|
var renderPageTitle = React.useCallback(function () {
|
26
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null, badge && /*#__PURE__*/React.createElement("div", {
|
@@ -61,27 +59,4 @@ var PageTitle = function PageTitle(_ref) {
|
|
61
59
|
className: cn('breadcrumbs', [classes.breadcrumbs])
|
62
60
|
}), isFullWidth ? renderPageTitle() : renderPageTitleWithGrid());
|
63
61
|
};
|
64
|
-
|
65
|
-
PageTitle.propTypes = {
|
66
|
-
dataAttrs: PropTypes.shape({
|
67
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
68
|
-
breadcrumbs: PropTypes.objectOf(PropTypes.string.isRequired),
|
69
|
-
breadcrumbsLink: PropTypes.objectOf(PropTypes.string.isRequired)
|
70
|
-
}),
|
71
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired,
|
72
|
-
breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
|
73
|
-
title: PropTypes.string.isRequired,
|
74
|
-
href: PropTypes.string
|
75
|
-
}).isRequired),
|
76
|
-
badge: PropTypes.string,
|
77
|
-
isFullWidth: PropTypes.bool,
|
78
|
-
hasBreadcrumbsMicrodata: PropTypes.bool,
|
79
|
-
className: PropTypes.string,
|
80
|
-
classes: PropTypes.shape({
|
81
|
-
breadcrumbs: PropTypes.string
|
82
|
-
}),
|
83
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
84
|
-
current: PropTypes.elementType
|
85
|
-
}), PropTypes.any])])
|
86
|
-
};
|
87
62
|
export default PageTitle;
|
@@ -1,52 +1,45 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
|
4
|
-
var _slidesSettings;
|
5
|
-
|
6
3
|
import "core-js/modules/es.array.map.js";
|
7
4
|
import "core-js/modules/es.array.slice.js";
|
8
5
|
import * as React from 'react';
|
9
6
|
import { Grid, GridColumn, Tile, Carousel } from '@megafon/ui-core';
|
10
7
|
import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
11
|
-
import * as PropTypes from 'prop-types';
|
12
8
|
import "./Partners.css";
|
13
9
|
var MAX_GRID_ITEMS_LENGTH = 8;
|
14
|
-
var slidesSettings = (
|
10
|
+
var slidesSettings = _defineProperty(_defineProperty(_defineProperty({}, breakpoints.MOBILE_SMALL_START, {
|
15
11
|
slidesPerView: 2,
|
16
12
|
spaceBetween: 16
|
17
|
-
}),
|
13
|
+
}), breakpoints.MOBILE_MIDDLE_START, {
|
18
14
|
slidesPerView: 3,
|
19
15
|
spaceBetween: 20
|
20
|
-
}),
|
16
|
+
}), breakpoints.DESKTOP_SMALL_START, {
|
21
17
|
slidesPerView: 4,
|
22
18
|
spaceBetween: 20
|
23
|
-
})
|
19
|
+
});
|
24
20
|
var testIdPrefix = 'Partners';
|
25
21
|
var cn = cnCreate('mfui-partners');
|
26
|
-
|
27
22
|
var Partners = function Partners(_ref) {
|
28
23
|
var rootRef = _ref.rootRef,
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
24
|
+
_ref$classes = _ref.classes,
|
25
|
+
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
26
|
+
root = _ref$classes2.root,
|
27
|
+
itemClass = _ref$classes2.itemClass,
|
28
|
+
dataAttrs = _ref.dataAttrs,
|
29
|
+
className = _ref.className,
|
30
|
+
items = _ref.items,
|
31
|
+
onChange = _ref.onChange,
|
32
|
+
onNextClick = _ref.onNextClick,
|
33
|
+
onPrevClick = _ref.onPrevClick;
|
39
34
|
var renderItem = React.useCallback(function (item) {
|
40
35
|
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
41
|
-
|
42
36
|
if (!item) {
|
43
37
|
return null;
|
44
38
|
}
|
45
|
-
|
46
39
|
var src = item.src,
|
47
|
-
|
48
|
-
|
49
|
-
|
40
|
+
href = item.href,
|
41
|
+
alt = item.alt,
|
42
|
+
rel = item.rel;
|
50
43
|
return /*#__PURE__*/React.createElement(Tile, {
|
51
44
|
href: href,
|
52
45
|
rel: rel,
|
@@ -108,28 +101,4 @@ var Partners = function Partners(_ref) {
|
|
108
101
|
className: cn([root, className])
|
109
102
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), items.length > MAX_GRID_ITEMS_LENGTH ? renderCarousel() : renderGrid());
|
110
103
|
};
|
111
|
-
|
112
|
-
Partners.propTypes = {
|
113
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
114
|
-
current: PropTypes.elementType
|
115
|
-
}), PropTypes.any])]),
|
116
|
-
classes: PropTypes.shape({
|
117
|
-
root: PropTypes.string,
|
118
|
-
itemClass: PropTypes.string
|
119
|
-
}),
|
120
|
-
dataAttrs: PropTypes.shape({
|
121
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
122
|
-
item: PropTypes.objectOf(PropTypes.string.isRequired)
|
123
|
-
}),
|
124
|
-
className: PropTypes.string,
|
125
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
126
|
-
href: PropTypes.string,
|
127
|
-
rel: PropTypes.string,
|
128
|
-
src: PropTypes.string.isRequired,
|
129
|
-
alt: PropTypes.string.isRequired
|
130
|
-
}).isRequired).isRequired,
|
131
|
-
onChange: PropTypes.func,
|
132
|
-
onNextClick: PropTypes.func,
|
133
|
-
onPrevClick: PropTypes.func
|
134
|
-
};
|
135
104
|
export default Partners;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './PictureWithDescription.
|
2
|
+
import './PictureWithDescription.scss';
|
3
3
|
export declare const pictureAlignTypes: {
|
4
4
|
readonly LEFT: "left";
|
5
5
|
readonly RIGHT: "right";
|
6
6
|
};
|
7
|
-
|
7
|
+
type PictureAlignTypesType = (typeof pictureAlignTypes)[keyof typeof pictureAlignTypes];
|
8
8
|
export interface IPictureWithDescriptionProps {
|
9
9
|
/** Ссылка на корневой элемент */
|
10
10
|
rootRef?: React.Ref<HTMLDivElement>;
|
@@ -25,6 +25,8 @@ export interface IPictureWithDescriptionProps {
|
|
25
25
|
pictureAlt?: string;
|
26
26
|
/** Выравнивание текста по верхнему краю */
|
27
27
|
isTextTopAlign?: boolean;
|
28
|
+
/** Дочерний элемент компонента */
|
29
|
+
children?: React.ReactNode;
|
28
30
|
}
|
29
31
|
declare const PictureWithDescription: React.FC<IPictureWithDescriptionProps>;
|
30
32
|
export default PictureWithDescription;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Header } from '@megafon/ui-core';
|
3
3
|
import { cnCreate } from '@megafon/ui-helpers';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import "./PictureWithDescription.css";
|
6
5
|
export var pictureAlignTypes = {
|
7
6
|
LEFT: 'left',
|
@@ -9,19 +8,18 @@ export var pictureAlignTypes = {
|
|
9
8
|
};
|
10
9
|
var testIdPrefix = 'PictureWithDescription';
|
11
10
|
var cn = cnCreate('mfui-picture-with-description');
|
12
|
-
|
13
11
|
var PictureWithDescription = function PictureWithDescription(_ref) {
|
14
12
|
var rootRef = _ref.rootRef,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
13
|
+
className = _ref.className,
|
14
|
+
_ref$classes = _ref.classes,
|
15
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
16
|
+
title = _ref.title,
|
17
|
+
pictureUrl = _ref.pictureUrl,
|
18
|
+
_ref$pictureAlign = _ref.pictureAlign,
|
19
|
+
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
20
|
+
pictureAlt = _ref.pictureAlt,
|
21
|
+
isTextTopAlign = _ref.isTextTopAlign,
|
22
|
+
children = _ref.children;
|
25
23
|
return /*#__PURE__*/React.createElement("div", {
|
26
24
|
className: cn([className, classes.root]),
|
27
25
|
ref: rootRef
|
@@ -47,20 +45,4 @@ var PictureWithDescription = function PictureWithDescription(_ref) {
|
|
47
45
|
className: cn('content')
|
48
46
|
}, children)));
|
49
47
|
};
|
50
|
-
|
51
|
-
PictureWithDescription.propTypes = {
|
52
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
53
|
-
current: PropTypes.elementType
|
54
|
-
}), PropTypes.any])]),
|
55
|
-
className: PropTypes.string,
|
56
|
-
classes: PropTypes.shape({
|
57
|
-
root: PropTypes.string,
|
58
|
-
title: PropTypes.string
|
59
|
-
}),
|
60
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
61
|
-
pictureUrl: PropTypes.string.isRequired,
|
62
|
-
pictureAlign: PropTypes.oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
63
|
-
pictureAlt: PropTypes.string,
|
64
|
-
isTextTopAlign: PropTypes.bool
|
65
|
-
};
|
66
48
|
export default PictureWithDescription;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
2
|
import { PromoBadge } from '@megafon/ui-core';
|
3
|
-
import './Property.
|
3
|
+
import './Property.scss';
|
4
4
|
import { Item } from './types';
|
5
5
|
export interface IProperty {
|
6
6
|
/** Ссылка на корневой элемент */
|
7
|
-
rootRef?: Ref<HTMLDivElement>;
|
7
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
8
8
|
/** Массив с данными для строки */
|
9
9
|
items: Item[];
|
10
10
|
/** Дополнительный класс для основного контейнера */
|
@@ -12,7 +12,7 @@ export interface IProperty {
|
|
12
12
|
/** Текст для бейджа */
|
13
13
|
badge?: string;
|
14
14
|
/** Тип бейджа */
|
15
|
-
badgeType?: ComponentProps<typeof PromoBadge>['type'];
|
15
|
+
badgeType?: React.ComponentProps<typeof PromoBadge>['type'];
|
16
16
|
/** Текст тултипа */
|
17
17
|
tooltip?: string;
|
18
18
|
/** Отключить верхнюю границу */
|
@@ -1,15 +1,13 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import "core-js/modules/es.array.map.js";
|
3
2
|
import "core-js/modules/es.symbol.js";
|
4
3
|
import "core-js/modules/es.symbol.description.js";
|
5
|
-
import
|
4
|
+
import "core-js/modules/es.array.map.js";
|
5
|
+
import * as React from 'react';
|
6
6
|
import { Grid, GridColumn, PromoBadge, Caption, Tooltip } from '@megafon/ui-core';
|
7
7
|
import { cnCreate, filterDataAttrs, convert } from '@megafon/ui-helpers';
|
8
|
-
import PropTypes from 'prop-types';
|
9
8
|
import "./Property.css";
|
10
9
|
import { getColumnConfig } from "../../helpers/getColumnConfig";
|
11
10
|
import PropertyDescription from "./PropertyDescription";
|
12
|
-
|
13
11
|
var InfoIcon = function InfoIcon(props) {
|
14
12
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
15
13
|
viewBox: "0 0 20 20"
|
@@ -17,37 +15,34 @@ var InfoIcon = function InfoIcon(props) {
|
|
17
15
|
d: "M10 2c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8zm0 5c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zm1 8V9H9v6h2z"
|
18
16
|
}));
|
19
17
|
};
|
20
|
-
|
21
18
|
export var testIdPrefix = 'Property';
|
22
19
|
var cn = cnCreate('mfui-property');
|
23
|
-
|
24
20
|
var Property = function Property(_ref) {
|
25
21
|
var rootRef = _ref.rootRef,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
var tooltipRef = useRef(null);
|
48
|
-
|
49
|
-
|
50
|
-
return title && title.map(function (titleItem, i) {
|
22
|
+
items = _ref.items,
|
23
|
+
className = _ref.className,
|
24
|
+
_ref$badge = _ref.badge,
|
25
|
+
badge = _ref$badge === void 0 ? '' : _ref$badge,
|
26
|
+
_ref$badgeType = _ref.badgeType,
|
27
|
+
badgeType = _ref$badgeType === void 0 ? 'popular' : _ref$badgeType,
|
28
|
+
tooltip = _ref.tooltip,
|
29
|
+
icon = _ref.icon,
|
30
|
+
_ref$disableBorderTop = _ref.disableBorderTop,
|
31
|
+
disableBorderTop = _ref$disableBorderTop === void 0 ? false : _ref$disableBorderTop,
|
32
|
+
_ref$borderBottom = _ref.borderBottom,
|
33
|
+
borderBottom = _ref$borderBottom === void 0 ? false : _ref$borderBottom,
|
34
|
+
_ref$borderColor = _ref.borderColor,
|
35
|
+
borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
|
36
|
+
_ref$mergedValue = _ref.mergedValue,
|
37
|
+
mergedValue = _ref$mergedValue === void 0 ? '' : _ref$mergedValue,
|
38
|
+
_ref$fullWidth = _ref.fullWidth,
|
39
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
40
|
+
_ref$classes = _ref.classes,
|
41
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
42
|
+
dataAttrs = _ref.dataAttrs;
|
43
|
+
var tooltipRef = React.useRef(null);
|
44
|
+
var renderTitle = function renderTitle(titles, titleSize, isFirstItem) {
|
45
|
+
return titles === null || titles === void 0 ? void 0 : titles.map(function (titleItem, i) {
|
51
46
|
var isFirstTitle = i === 0;
|
52
47
|
return /*#__PURE__*/React.createElement("div", {
|
53
48
|
key: i,
|
@@ -66,11 +61,10 @@ var Property = function Property(_ref) {
|
|
66
61
|
}, tooltip)));
|
67
62
|
});
|
68
63
|
};
|
69
|
-
|
70
64
|
var renderDescription = function renderDescription(description) {
|
71
|
-
return description
|
65
|
+
return description === null || description === void 0 ? void 0 : description.map(function (_ref2, j) {
|
72
66
|
var value = _ref2.value,
|
73
|
-
|
67
|
+
isCollapsible = _ref2.isCollapsible;
|
74
68
|
return /*#__PURE__*/React.createElement("div", {
|
75
69
|
className: cn('desc', {
|
76
70
|
collapsible: isCollapsible
|
@@ -89,7 +83,6 @@ var Property = function Property(_ref) {
|
|
89
83
|
}));
|
90
84
|
});
|
91
85
|
};
|
92
|
-
|
93
86
|
var renderValue = function renderValue(valueFrameColor, value, valueUnit) {
|
94
87
|
return /*#__PURE__*/React.createElement("div", {
|
95
88
|
className: cn('value-wrapper', {
|
@@ -103,7 +96,6 @@ var Property = function Property(_ref) {
|
|
103
96
|
hasMargin: false
|
104
97
|
}, convert(valueUnit, {})));
|
105
98
|
};
|
106
|
-
|
107
99
|
return /*#__PURE__*/React.createElement("div", _extends({
|
108
100
|
className: cn({
|
109
101
|
'border-top': !disableBorderTop,
|
@@ -121,17 +113,17 @@ var Property = function Property(_ref) {
|
|
121
113
|
className: cn('wrapper')
|
122
114
|
}, items.map(function (_ref3, i) {
|
123
115
|
var title = _ref3.title,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
116
|
+
value = _ref3.value,
|
117
|
+
description = _ref3.description,
|
118
|
+
_ref3$valueUnit = _ref3.valueUnit,
|
119
|
+
valueUnit = _ref3$valueUnit === void 0 ? '' : _ref3$valueUnit,
|
120
|
+
_ref3$titleSize = _ref3.titleSize,
|
121
|
+
titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
|
122
|
+
_ref3$valueFrameColor = _ref3.valueFrameColor,
|
123
|
+
valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
|
132
124
|
var isFirstItem = i === 0;
|
133
125
|
var isRenderBadge = isFirstItem && !!badge;
|
134
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
126
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
135
127
|
key: i
|
136
128
|
}, /*#__PURE__*/React.createElement("div", {
|
137
129
|
className: cn('main', {
|
@@ -146,40 +138,4 @@ var Property = function Property(_ref) {
|
|
146
138
|
}, badge), title ? renderTitle(title, titleSize, isFirstItem) : renderDescription(description)), mergedValue && isFirstItem && renderValue(valueFrameColor, mergedValue, valueUnit), !mergedValue && value && renderValue(valueFrameColor, value, valueUnit)), title && renderDescription(description));
|
147
139
|
})))));
|
148
140
|
};
|
149
|
-
|
150
|
-
Property.propTypes = {
|
151
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
152
|
-
current: PropTypes.elementType
|
153
|
-
}), PropTypes.any])]),
|
154
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
155
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
|
156
|
-
description: PropTypes.arrayOf(PropTypes.shape({
|
157
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]).isRequired,
|
158
|
-
isCollapsible: PropTypes.bool
|
159
|
-
})),
|
160
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
161
|
-
titleSize: PropTypes.oneOf(['default', 'big']),
|
162
|
-
valueUnit: PropTypes.string,
|
163
|
-
valueFrameColor: PropTypes.oneOf(['none', 'default', 'gray'])
|
164
|
-
}).isRequired).isRequired,
|
165
|
-
className: PropTypes.string,
|
166
|
-
badge: PropTypes.string,
|
167
|
-
badgeType: PropTypes.oneOf(['hit', 'new', 'vip', 'popular', 'user-choice', 'interests']),
|
168
|
-
tooltip: PropTypes.string,
|
169
|
-
disableBorderTop: PropTypes.bool,
|
170
|
-
borderBottom: PropTypes.bool,
|
171
|
-
borderColor: PropTypes.oneOf(['default', 'darker']),
|
172
|
-
mergedValue: PropTypes.string,
|
173
|
-
icon: PropTypes.node,
|
174
|
-
fullWidth: PropTypes.bool,
|
175
|
-
dataAttrs: PropTypes.shape({
|
176
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
177
|
-
moreLink: PropTypes.objectOf(PropTypes.string.isRequired)
|
178
|
-
}),
|
179
|
-
classes: PropTypes.shape({
|
180
|
-
title: PropTypes.string,
|
181
|
-
openedDescription: PropTypes.string,
|
182
|
-
toggleDescription: PropTypes.string
|
183
|
-
})
|
184
|
-
};
|
185
141
|
export default Property;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './PropertyDescription.
|
3
|
-
import {
|
2
|
+
import './PropertyDescription.scss';
|
3
|
+
import { DescriptionType } from './types';
|
4
4
|
export declare const testIdPrefix = "PropertyDescription";
|
5
|
-
declare const PropertyDescription: React.FC<
|
5
|
+
declare const PropertyDescription: React.FC<DescriptionType>;
|
6
6
|
export default PropertyDescription;
|
@@ -1,34 +1,27 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
-
|
4
3
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
5
|
-
|
6
4
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
7
5
|
import * as React from 'react';
|
8
6
|
import { Collapse } from '@megafon/ui-core';
|
9
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
10
|
-
import PropTypes from 'prop-types';
|
11
8
|
import "./PropertyDescription.css";
|
12
9
|
export var testIdPrefix = 'PropertyDescription';
|
13
10
|
var cn = cnCreate('mfui-property-description');
|
14
|
-
|
15
11
|
var PropertyDescription = function PropertyDescription(_ref) {
|
16
12
|
var value = _ref.value,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
_ref$isCollapsible = _ref.isCollapsible,
|
14
|
+
isCollapsible = _ref$isCollapsible === void 0 ? false : _ref$isCollapsible,
|
15
|
+
_ref$classes = _ref.classes,
|
16
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
17
|
+
dataAttrs = _ref.dataAttrs;
|
23
18
|
var _React$useState = React.useState(false),
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
20
|
+
isOpened = _React$useState2[0],
|
21
|
+
setIsOpened = _React$useState2[1];
|
28
22
|
var handleClickDesc = React.useCallback(function () {
|
29
23
|
return setIsOpened(!isOpened);
|
30
24
|
}, [isOpened]);
|
31
|
-
|
32
25
|
if (isCollapsible) {
|
33
26
|
return /*#__PURE__*/React.createElement("div", {
|
34
27
|
className: cn([isOpened ? classes.open : undefined]),
|
@@ -43,21 +36,8 @@ var PropertyDescription = function PropertyDescription(_ref) {
|
|
43
36
|
className: cn('collapse', classes.toggle)
|
44
37
|
}), isOpened ? 'Скрыть' : 'Подробнее'));
|
45
38
|
}
|
46
|
-
|
47
39
|
return /*#__PURE__*/React.createElement("div", {
|
48
40
|
className: cn()
|
49
41
|
}, value);
|
50
42
|
};
|
51
|
-
|
52
|
-
PropertyDescription.propTypes = {
|
53
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]).isRequired,
|
54
|
-
isCollapsible: PropTypes.bool,
|
55
|
-
classes: PropTypes.shape({
|
56
|
-
open: PropTypes.string,
|
57
|
-
toggle: PropTypes.string
|
58
|
-
}),
|
59
|
-
dataAttrs: PropTypes.shape({
|
60
|
-
moreLink: PropTypes.objectOf(PropTypes.string.isRequired)
|
61
|
-
})
|
62
|
-
};
|
63
43
|
export default PropertyDescription;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
export
|
2
|
+
export type DescriptionType = {
|
3
3
|
value: string | React.ReactNode[];
|
4
4
|
isCollapsible?: boolean;
|
5
5
|
classes?: {
|
@@ -10,10 +10,12 @@ export declare type Desc = {
|
|
10
10
|
moreLink?: Record<string, string>;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
export
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
export type TitleSizeType = 'default' | 'big';
|
14
|
+
export type ValueFrameColor = 'none' | 'default' | 'gray';
|
15
|
+
export type Item = {
|
16
|
+
title?: React.ReactNode[];
|
17
|
+
titleSize?: TitleSizeType;
|
18
|
+
description?: DescriptionType[];
|
17
19
|
value?: string | React.ReactNode;
|
18
20
|
valueUnit?: string;
|
19
21
|
valueFrameColor?: 'none' | 'default' | 'gray';
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './Steps.
|
2
|
+
import './Steps.scss';
|
3
3
|
export interface ISteps {
|
4
4
|
/** Дополнительный класс корневого элемента */
|
5
5
|
className?: string;
|
@@ -13,6 +13,7 @@ export interface ISteps {
|
|
13
13
|
rootRef?: React.Ref<HTMLDivElement>;
|
14
14
|
/** Заголовок */
|
15
15
|
title?: string;
|
16
|
+
children: React.ReactNode;
|
16
17
|
}
|
17
18
|
declare const Steps: React.FC<ISteps>;
|
18
19
|
export default Steps;
|
@@ -2,16 +2,14 @@ import "core-js/modules/es.array.map.js";
|
|
2
2
|
import * as React from 'react';
|
3
3
|
import { Header } from '@megafon/ui-core';
|
4
4
|
import { cnCreate, convert, titleConvertConfig } from '@megafon/ui-helpers';
|
5
|
-
import PropTypes from 'prop-types';
|
6
5
|
import "./Steps.css";
|
7
6
|
var cn = cnCreate('mfui-steps');
|
8
|
-
|
9
7
|
var Steps = function Steps(_ref) {
|
10
8
|
var className = _ref.className,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
classes = _ref.classes,
|
10
|
+
title = _ref.title,
|
11
|
+
rootRef = _ref.rootRef,
|
12
|
+
children = _ref.children;
|
15
13
|
return /*#__PURE__*/React.createElement("div", {
|
16
14
|
className: cn([className]),
|
17
15
|
ref: rootRef
|
@@ -27,17 +25,4 @@ var Steps = function Steps(_ref) {
|
|
27
25
|
}, child);
|
28
26
|
})));
|
29
27
|
};
|
30
|
-
|
31
|
-
Steps.propTypes = {
|
32
|
-
className: PropTypes.string,
|
33
|
-
classes: PropTypes.shape({
|
34
|
-
title: PropTypes.string,
|
35
|
-
list: PropTypes.string,
|
36
|
-
item: PropTypes.string
|
37
|
-
}),
|
38
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
39
|
-
current: PropTypes.elementType
|
40
|
-
}), PropTypes.any])]),
|
41
|
-
title: PropTypes.string
|
42
|
-
};
|
43
28
|
export default Steps;
|
@@ -1,13 +1,11 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import * as React from 'react';
|
2
2
|
import { Paragraph } from '@megafon/ui-core';
|
3
3
|
import { cnCreate, convert, textConvertConfig } from '@megafon/ui-helpers';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import "./StepsItem.css";
|
6
5
|
var cn = cnCreate('mfui-steps-item');
|
7
|
-
|
8
6
|
var StepsItem = function StepsItem(_ref) {
|
9
7
|
var index = _ref.index,
|
10
|
-
|
8
|
+
text = _ref.text;
|
11
9
|
return /*#__PURE__*/React.createElement("div", {
|
12
10
|
className: cn()
|
13
11
|
}, /*#__PURE__*/React.createElement("span", {
|
@@ -20,9 +18,4 @@ var StepsItem = function StepsItem(_ref) {
|
|
20
18
|
className: cn('nodes')
|
21
19
|
}, text)));
|
22
20
|
};
|
23
|
-
|
24
|
-
StepsItem.propTypes = {
|
25
|
-
index: PropTypes.number.isRequired,
|
26
|
-
text: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]).isRequired
|
27
|
-
};
|
28
21
|
export default StepsItem;
|