@megafon/ui-shared 6.0.0-beta.5 → 6.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 +4043 -0
- package/dist/es/components/AccordionBox/AccordionBox.css +15 -1
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/es/components/AccordionBox/AccordionBox.js +49 -6
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/es/components/AudioPlayer/AudioPlayer.js +27 -11
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioProgress.js +22 -10
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioRange.js +10 -8
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/es/components/AudioPlayer/AudioVolume.js +12 -3
- package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +10 -4
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +58 -1
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +35 -1
- package/dist/es/components/AudioPlayer/style/AudioRange.css +68 -1
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +34 -1
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +9 -1
- package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/es/components/BannerBox/BannerBox.js +12 -3
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +64 -23
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +36 -9
- package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/es/components/BenefitsIcons/helpers.js +20 -6
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
- 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 +49 -19
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +43 -1
- package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/es/components/BenefitsPictures/helpers.js +14 -0
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/es/components/BenefitsPictures/types.js +0 -1
- package/dist/es/components/BlogBox/BlogBox.css +92 -0
- package/dist/es/components/BlogBox/BlogBox.d.ts +28 -0
- package/dist/es/components/BlogBox/BlogBox.js +101 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.css +197 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.d.ts +9 -0
- package/dist/es/components/BlogBox/components/BlogBoxTile.js +67 -0
- package/dist/es/components/BlogBox/types.d.ts +37 -0
- package/dist/es/components/BlogBox/types.js +0 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +43 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +39 -10
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +36 -11
- package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -1
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/es/components/ButtonBanner/ButtonBanner.js +53 -22
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +51 -20
- package/dist/es/components/Card/Card.css +354 -1
- package/dist/es/components/Card/Card.d.ts +4 -4
- package/dist/es/components/Card/Card.js +115 -25
- package/dist/es/components/Card/types.d.ts +10 -10
- package/dist/es/components/Card/types.js +0 -1
- package/dist/es/components/CardsBox/CardsBox.js +14 -3
- package/dist/es/components/CardsBox/helpers.d.ts +2 -2
- package/dist/es/components/CardsBox/helpers.js +4 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/es/components/CarouselBox/CarouselBox.js +24 -11
- package/dist/es/components/Container/Container.css +3287 -1
- package/dist/es/components/Container/Container.d.ts +5 -7
- package/dist/es/components/Container/Container.js +25 -10
- package/dist/es/components/DownloadLinks/DownloadLink.css +37 -1
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/es/components/DownloadLinks/DownloadLink.js +44 -13
- package/dist/es/components/DownloadLinks/DownloadLinks.css +36 -1
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/es/components/DownloadLinks/DownloadLinks.js +13 -2
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +2 -5
- package/dist/es/components/FaqWrapper/FaqWrapper.js +3 -1
- package/dist/es/components/ImageBanner/ImageBanner.css +252 -1
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +7 -8
- package/dist/es/components/ImageBanner/ImageBanner.js +88 -37
- package/dist/es/components/Instructions/Instructions.css +827 -1
- package/dist/es/components/Instructions/Instructions.d.ts +13 -11
- package/dist/es/components/Instructions/Instructions.js +101 -44
- package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/es/components/NotificationBox/NotificationBox.js +19 -5
- package/dist/es/components/NotificationBox/style/NotificationBox.css +28 -0
- package/dist/es/components/PageTitle/PageTitle.css +80 -1
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/es/components/PageTitle/PageTitle.js +37 -12
- package/dist/es/components/Partners/Partners.css +53 -1
- package/dist/es/components/Partners/Partners.d.ts +2 -2
- package/dist/es/components/Partners/Partners.js +48 -17
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +80 -1
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +28 -10
- package/dist/es/components/Property/Property.css +156 -1
- package/dist/es/components/Property/Property.d.ts +4 -4
- package/dist/es/components/Property/Property.js +81 -37
- package/dist/es/components/Property/PropertyDescription.css +17 -1
- package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/es/components/Property/PropertyDescription.js +28 -8
- package/dist/es/components/Property/types.d.ts +5 -7
- package/dist/es/components/Property/types.js +0 -1
- package/dist/es/components/Steps/Steps.css +41 -1
- package/dist/es/components/Steps/Steps.d.ts +1 -2
- package/dist/es/components/Steps/Steps.js +19 -4
- package/dist/es/components/Steps/StepsItem.css +42 -1
- package/dist/es/components/Steps/StepsItem.d.ts +2 -2
- package/dist/es/components/Steps/StepsItem.js +9 -2
- package/dist/es/components/StoreBanner/StoreBanner.css +346 -1
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/es/components/StoreBanner/StoreBanner.js +97 -41
- 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 +327 -1
- package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/es/components/StoreButton/StoreButton.js +44 -13
- package/dist/es/components/Table/Table.css +157 -1
- package/dist/es/components/Table/Table.d.ts +1 -1
- package/dist/es/components/Table/Table.js +51 -31
- package/dist/es/components/Table/TableCell.js +6 -0
- package/dist/es/components/Table/TableRow.js +10 -1
- package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/es/components/TabsBox/TabsBox.js +13 -4
- package/dist/es/components/TextBox/TextBox.css +25 -1
- package/dist/es/components/TextBox/TextBox.d.ts +1 -2
- package/dist/es/components/TextBox/TextBox.js +23 -8
- package/dist/es/components/TextBox/TextBoxPicture.css +27 -1
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +14 -5
- package/dist/es/components/TextWithIcon/TextWithIcon.css +10 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIcon.js +24 -6
- package/dist/es/components/TextWithIcon/TextWithIconItem.css +29 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +21 -6
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +23 -6
- package/dist/es/components/VideoBanner/VideoBanner.css +225 -1
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/es/components/VideoBanner/VideoBanner.js +110 -47
- package/dist/es/components/VideoBlock/VideoBlock.css +106 -1
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/es/components/VideoBlock/VideoBlock.js +75 -35
- package/dist/es/helpers/getColumnConfig.d.ts +1 -5
- package/dist/es/helpers/setRelAttribute.d.ts +1 -0
- package/dist/es/helpers/setRelAttribute.js +11 -0
- package/dist/es/hooks/useResolutions.d.ts +7 -0
- package/dist/es/hooks/useResolutions.js +60 -0
- package/dist/es/index.d.ts +2 -0
- package/dist/es/index.js +2 -0
- package/dist/lib/components/AccordionBox/AccordionBox.css +15 -1
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
- package/dist/lib/components/AccordionBox/AccordionBox.js +66 -10
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +56 -32
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioProgress.js +43 -12
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioRange.js +17 -9
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
- package/dist/lib/components/AudioPlayer/AudioVolume.js +23 -4
- package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +16 -5
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +58 -1
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +35 -1
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +68 -1
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +34 -1
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +13 -2
- package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
- package/dist/lib/components/BannerBox/BannerBox.js +25 -7
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +86 -26
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +53 -13
- package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
- package/dist/lib/components/BenefitsIcons/helpers.js +37 -10
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
- package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
- package/dist/lib/components/BenefitsIcons/types.js +8 -5
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +71 -24
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +43 -1
- package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
- package/dist/lib/components/BenefitsPictures/helpers.js +40 -9
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
- package/dist/lib/components/BenefitsPictures/types.js +1 -5
- package/dist/lib/components/BlogBox/BlogBox.css +92 -0
- package/dist/lib/components/BlogBox/BlogBox.d.ts +28 -0
- package/dist/lib/components/BlogBox/BlogBox.js +120 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.css +197 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.d.ts +9 -0
- package/dist/lib/components/BlogBox/components/BlogBoxTile.js +80 -0
- package/dist/lib/components/BlogBox/types.d.ts +37 -0
- package/dist/lib/components/BlogBox/types.js +1 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +43 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +60 -18
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +55 -22
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -1
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +89 -40
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +72 -29
- package/dist/lib/components/Card/Card.css +354 -1
- package/dist/lib/components/Card/Card.d.ts +4 -4
- package/dist/lib/components/Card/Card.js +164 -67
- package/dist/lib/components/Card/types.d.ts +10 -10
- package/dist/lib/components/Card/types.js +1 -5
- package/dist/lib/components/CardsBox/CardsBox.js +31 -7
- package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
- package/dist/lib/components/CardsBox/helpers.js +8 -1
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
- package/dist/lib/components/CarouselBox/CarouselBox.js +39 -15
- package/dist/lib/components/Container/Container.css +3287 -1
- package/dist/lib/components/Container/Container.d.ts +5 -7
- package/dist/lib/components/Container/Container.js +40 -18
- package/dist/lib/components/DownloadLinks/DownloadLink.css +37 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
- package/dist/lib/components/DownloadLinks/DownloadLink.js +60 -17
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +36 -1
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +33 -8
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +2 -5
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +9 -6
- package/dist/lib/components/ImageBanner/ImageBanner.css +252 -1
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +7 -8
- package/dist/lib/components/ImageBanner/ImageBanner.js +138 -61
- package/dist/lib/components/Instructions/Instructions.css +827 -1
- package/dist/lib/components/Instructions/Instructions.d.ts +13 -11
- package/dist/lib/components/Instructions/Instructions.js +193 -106
- package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
- package/dist/lib/components/NotificationBox/NotificationBox.js +37 -9
- package/dist/lib/components/NotificationBox/style/NotificationBox.css +28 -0
- package/dist/lib/components/PageTitle/PageTitle.css +80 -1
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
- package/dist/lib/components/PageTitle/PageTitle.js +52 -15
- package/dist/lib/components/Partners/Partners.css +53 -1
- package/dist/lib/components/Partners/Partners.d.ts +2 -2
- package/dist/lib/components/Partners/Partners.js +65 -21
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +80 -1
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +46 -16
- package/dist/lib/components/Property/Property.css +156 -1
- package/dist/lib/components/Property/Property.d.ts +4 -4
- package/dist/lib/components/Property/Property.js +120 -60
- package/dist/lib/components/Property/PropertyDescription.css +17 -1
- package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
- package/dist/lib/components/Property/PropertyDescription.js +46 -15
- package/dist/lib/components/Property/types.d.ts +5 -7
- package/dist/lib/components/Property/types.js +1 -5
- package/dist/lib/components/Steps/Steps.css +41 -1
- package/dist/lib/components/Steps/Steps.d.ts +1 -2
- package/dist/lib/components/Steps/Steps.js +35 -8
- package/dist/lib/components/Steps/StepsItem.css +42 -1
- package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
- package/dist/lib/components/Steps/StepsItem.js +23 -11
- package/dist/lib/components/StoreBanner/StoreBanner.css +346 -1
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
- package/dist/lib/components/StoreBanner/StoreBanner.js +118 -47
- 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 +327 -1
- package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
- package/dist/lib/components/StoreButton/StoreButton.js +63 -17
- package/dist/lib/components/Table/Table.css +157 -1
- package/dist/lib/components/Table/Table.d.ts +1 -1
- package/dist/lib/components/Table/Table.js +68 -35
- package/dist/lib/components/Table/TableCell.js +16 -4
- package/dist/lib/components/Table/TableRow.js +19 -5
- package/dist/lib/components/TabsBox/TabBox.js +4 -1
- package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
- package/dist/lib/components/TabsBox/TabsBox.js +26 -8
- package/dist/lib/components/TextBox/TextBox.css +25 -1
- package/dist/lib/components/TextBox/TextBox.d.ts +1 -2
- package/dist/lib/components/TextBox/TextBox.js +36 -12
- package/dist/lib/components/TextBox/TextBoxPicture.css +27 -1
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +29 -11
- package/dist/lib/components/TextWithIcon/TextWithIcon.css +10 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIcon.js +39 -10
- package/dist/lib/components/TextWithIcon/TextWithIconItem.css +29 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +37 -10
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +40 -10
- package/dist/lib/components/VideoBanner/VideoBanner.css +225 -1
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
- package/dist/lib/components/VideoBanner/VideoBanner.js +176 -83
- package/dist/lib/components/VideoBlock/VideoBlock.css +106 -1
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
- package/dist/lib/components/VideoBlock/VideoBlock.js +114 -58
- package/dist/lib/constants/throttleTime.js +3 -2
- package/dist/lib/helpers/getColumnConfig.d.ts +1 -5
- package/dist/lib/helpers/getColumnConfig.js +5 -2
- package/dist/lib/helpers/setRelAttribute.d.ts +1 -0
- package/dist/lib/helpers/setRelAttribute.js +20 -0
- package/dist/lib/hooks/useResolutions.d.ts +7 -0
- package/dist/lib/hooks/useResolutions.js +75 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +73 -10
- package/package.json +92 -87
- package/dist/es/components/NotificationBox/NotificationBox.css +0 -1
- package/dist/lib/components/NotificationBox/NotificationBox.css +0 -1
@@ -1,45 +1,52 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
+
|
4
|
+
var _slidesSettings;
|
5
|
+
|
3
6
|
import "core-js/modules/es.array.map.js";
|
4
7
|
import "core-js/modules/es.array.slice.js";
|
5
8
|
import * as React from 'react';
|
6
9
|
import { Grid, GridColumn, Tile, Carousel } from '@megafon/ui-core';
|
7
10
|
import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
11
|
+
import * as PropTypes from 'prop-types';
|
8
12
|
import "./Partners.css";
|
9
13
|
var MAX_GRID_ITEMS_LENGTH = 8;
|
10
|
-
var slidesSettings =
|
14
|
+
var slidesSettings = (_slidesSettings = {}, _defineProperty(_slidesSettings, breakpoints.MOBILE_SMALL_START, {
|
11
15
|
slidesPerView: 2,
|
12
16
|
spaceBetween: 16
|
13
|
-
}), breakpoints.MOBILE_MIDDLE_START, {
|
17
|
+
}), _defineProperty(_slidesSettings, breakpoints.MOBILE_MIDDLE_START, {
|
14
18
|
slidesPerView: 3,
|
15
19
|
spaceBetween: 20
|
16
|
-
}), breakpoints.DESKTOP_SMALL_START, {
|
20
|
+
}), _defineProperty(_slidesSettings, breakpoints.DESKTOP_SMALL_START, {
|
17
21
|
slidesPerView: 4,
|
18
22
|
spaceBetween: 20
|
19
|
-
});
|
23
|
+
}), _slidesSettings);
|
20
24
|
var testIdPrefix = 'Partners';
|
21
25
|
var cn = cnCreate('mfui-partners');
|
26
|
+
|
22
27
|
var Partners = function Partners(_ref) {
|
23
28
|
var rootRef = _ref.rootRef,
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
_ref$classes = _ref.classes;
|
30
|
+
_ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
|
31
|
+
var root = _ref$classes.root,
|
32
|
+
itemClass = _ref$classes.itemClass,
|
33
|
+
dataAttrs = _ref.dataAttrs,
|
34
|
+
className = _ref.className,
|
35
|
+
items = _ref.items,
|
36
|
+
onChange = _ref.onChange,
|
37
|
+
onNextClick = _ref.onNextClick,
|
38
|
+
onPrevClick = _ref.onPrevClick;
|
34
39
|
var renderItem = React.useCallback(function (item) {
|
35
40
|
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
41
|
+
|
36
42
|
if (!item) {
|
37
43
|
return null;
|
38
44
|
}
|
45
|
+
|
39
46
|
var src = item.src,
|
40
|
-
|
41
|
-
|
42
|
-
|
47
|
+
href = item.href,
|
48
|
+
alt = item.alt,
|
49
|
+
rel = item.rel;
|
43
50
|
return /*#__PURE__*/React.createElement(Tile, {
|
44
51
|
href: href,
|
45
52
|
rel: rel,
|
@@ -101,4 +108,28 @@ var Partners = function Partners(_ref) {
|
|
101
108
|
className: cn([root, className])
|
102
109
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), items.length > MAX_GRID_ITEMS_LENGTH ? renderCarousel() : renderGrid());
|
103
110
|
};
|
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
|
+
};
|
104
135
|
export default Partners;
|
@@ -1 +1,80 @@
|
|
1
|
-
h1,
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
@media screen and (min-width: 1024px) {
|
9
|
+
.mfui-picture-with-description {
|
10
|
+
display: -webkit-box;
|
11
|
+
display: -ms-flexbox;
|
12
|
+
display: flex;
|
13
|
+
-webkit-box-align: center;
|
14
|
+
-ms-flex-align: center;
|
15
|
+
align-items: center;
|
16
|
+
-webkit-box-pack: center;
|
17
|
+
-ms-flex-pack: center;
|
18
|
+
justify-content: center;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
.mfui-picture-with-description__title {
|
22
|
+
margin-bottom: 24px;
|
23
|
+
}
|
24
|
+
.mfui-picture-with-description__picture {
|
25
|
+
-ms-flex-item-align: start;
|
26
|
+
align-self: flex-start;
|
27
|
+
overflow: hidden;
|
28
|
+
text-align: center;
|
29
|
+
}
|
30
|
+
@media screen and (max-width: 1023px) {
|
31
|
+
.mfui-picture-with-description__picture {
|
32
|
+
margin: 0 auto 32px;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
@media screen and (min-width: 1024px) {
|
36
|
+
.mfui-picture-with-description__picture {
|
37
|
+
-webkit-box-ordinal-group: 3;
|
38
|
+
-ms-flex-order: 2;
|
39
|
+
order: 2;
|
40
|
+
width: 50%;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@media screen and (min-width: 1024px) {
|
44
|
+
.mfui-picture-with-description__picture_align_left {
|
45
|
+
-webkit-box-ordinal-group: 1;
|
46
|
+
-ms-flex-order: 0;
|
47
|
+
order: 0;
|
48
|
+
margin-right: 20px;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
.mfui-picture-with-description__img {
|
52
|
+
width: 100%;
|
53
|
+
max-width: 550px;
|
54
|
+
height: 100%;
|
55
|
+
}
|
56
|
+
.mfui-picture-with-description__content > :first-child {
|
57
|
+
margin-top: 0 !important;
|
58
|
+
}
|
59
|
+
.mfui-picture-with-description__content > :last-child {
|
60
|
+
margin-bottom: 0 !important;
|
61
|
+
}
|
62
|
+
@media screen and (min-width: 1024px) {
|
63
|
+
.mfui-picture-with-description__articles {
|
64
|
+
-webkit-box-ordinal-group: 2;
|
65
|
+
-ms-flex-order: 1;
|
66
|
+
order: 1;
|
67
|
+
width: 50%;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
@media screen and (min-width: 1024px) {
|
71
|
+
.mfui-picture-with-description__articles_text-top-align {
|
72
|
+
-ms-flex-item-align: start;
|
73
|
+
align-self: flex-start;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
@media screen and (min-width: 1024px) {
|
77
|
+
.mfui-picture-with-description__articles_align_right {
|
78
|
+
margin-right: 20px;
|
79
|
+
}
|
80
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './PictureWithDescription.
|
2
|
+
import './PictureWithDescription.less';
|
3
3
|
export declare const pictureAlignTypes: {
|
4
4
|
readonly LEFT: "left";
|
5
5
|
readonly RIGHT: "right";
|
6
6
|
};
|
7
|
-
type PictureAlignTypesType =
|
7
|
+
declare type PictureAlignTypesType = typeof pictureAlignTypes[keyof typeof pictureAlignTypes];
|
8
8
|
export interface IPictureWithDescriptionProps {
|
9
9
|
/** Ссылка на корневой элемент */
|
10
10
|
rootRef?: React.Ref<HTMLDivElement>;
|
@@ -25,8 +25,6 @@ export interface IPictureWithDescriptionProps {
|
|
25
25
|
pictureAlt?: string;
|
26
26
|
/** Выравнивание текста по верхнему краю */
|
27
27
|
isTextTopAlign?: boolean;
|
28
|
-
/** Дочерний элемент компонента */
|
29
|
-
children?: React.ReactNode;
|
30
28
|
}
|
31
29
|
declare const PictureWithDescription: React.FC<IPictureWithDescriptionProps>;
|
32
30
|
export default PictureWithDescription;
|
@@ -1,6 +1,7 @@
|
|
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';
|
4
5
|
import "./PictureWithDescription.css";
|
5
6
|
export var pictureAlignTypes = {
|
6
7
|
LEFT: 'left',
|
@@ -8,18 +9,19 @@ export var pictureAlignTypes = {
|
|
8
9
|
};
|
9
10
|
var testIdPrefix = 'PictureWithDescription';
|
10
11
|
var cn = cnCreate('mfui-picture-with-description');
|
12
|
+
|
11
13
|
var PictureWithDescription = function PictureWithDescription(_ref) {
|
12
14
|
var rootRef = _ref.rootRef,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
className = _ref.className,
|
16
|
+
_ref$classes = _ref.classes,
|
17
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
18
|
+
title = _ref.title,
|
19
|
+
pictureUrl = _ref.pictureUrl,
|
20
|
+
_ref$pictureAlign = _ref.pictureAlign,
|
21
|
+
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
22
|
+
pictureAlt = _ref.pictureAlt,
|
23
|
+
isTextTopAlign = _ref.isTextTopAlign,
|
24
|
+
children = _ref.children;
|
23
25
|
return /*#__PURE__*/React.createElement("div", {
|
24
26
|
className: cn([className, classes.root]),
|
25
27
|
ref: rootRef
|
@@ -45,4 +47,20 @@ var PictureWithDescription = function PictureWithDescription(_ref) {
|
|
45
47
|
className: cn('content')
|
46
48
|
}, children)));
|
47
49
|
};
|
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
|
+
};
|
48
66
|
export default PictureWithDescription;
|
@@ -1 +1,156 @@
|
|
1
|
-
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-property__wrapper {
|
9
|
+
display: -webkit-box;
|
10
|
+
display: -ms-flexbox;
|
11
|
+
display: flex;
|
12
|
+
-webkit-box-orient: vertical;
|
13
|
+
-webkit-box-direction: normal;
|
14
|
+
-ms-flex-direction: column;
|
15
|
+
flex-direction: column;
|
16
|
+
padding: 24px 0;
|
17
|
+
}
|
18
|
+
.mfui-property_border-top.mfui-property_border-color_default .mfui-property__wrapper {
|
19
|
+
border-top: 1px solid var(--spbSky1);
|
20
|
+
}
|
21
|
+
.mfui-property_border-bottom.mfui-property_border-color_default .mfui-property__wrapper {
|
22
|
+
border-bottom: 1px solid var(--spbSky1);
|
23
|
+
}
|
24
|
+
.mfui-property_border-top.mfui-property_border-color_darker .mfui-property__wrapper {
|
25
|
+
border-top: 1px solid var(--spbSky2);
|
26
|
+
}
|
27
|
+
.mfui-property_border-bottom.mfui-property_border-color_darker .mfui-property__wrapper {
|
28
|
+
border-bottom: 1px solid var(--spbSky2);
|
29
|
+
}
|
30
|
+
.mfui-property__main {
|
31
|
+
display: -webkit-box;
|
32
|
+
display: -ms-flexbox;
|
33
|
+
display: flex;
|
34
|
+
gap: 20px;
|
35
|
+
-webkit-box-align: baseline;
|
36
|
+
-ms-flex-align: baseline;
|
37
|
+
align-items: baseline;
|
38
|
+
-webkit-box-pack: justify;
|
39
|
+
-ms-flex-pack: justify;
|
40
|
+
justify-content: space-between;
|
41
|
+
}
|
42
|
+
.mfui-property__main:not(:first-child) {
|
43
|
+
margin-top: 24px;
|
44
|
+
}
|
45
|
+
.mfui-property__main_with-out-title {
|
46
|
+
margin-top: 16px !important;
|
47
|
+
}
|
48
|
+
.mfui-property__main_with-badge {
|
49
|
+
-webkit-box-align: center;
|
50
|
+
-ms-flex-align: center;
|
51
|
+
align-items: center;
|
52
|
+
}
|
53
|
+
.mfui-property__title-item_size_default {
|
54
|
+
font-size: 15px;
|
55
|
+
line-height: 24px;
|
56
|
+
font-weight: 500;
|
57
|
+
}
|
58
|
+
.mfui-property__title-item_size_big {
|
59
|
+
font-weight: 500;
|
60
|
+
font-size: 18px;
|
61
|
+
line-height: 24px;
|
62
|
+
letter-spacing: 0.5px;
|
63
|
+
}
|
64
|
+
@media screen and (min-width: 1280px) {
|
65
|
+
.mfui-property__title-item_size_big {
|
66
|
+
font-size: 20px;
|
67
|
+
line-height: 28px;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
@media screen and (max-width: 767px) {
|
71
|
+
.mfui-property__title-item {
|
72
|
+
font-size: 15px;
|
73
|
+
line-height: 24px;
|
74
|
+
font-weight: 500;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
.mfui-property__icon {
|
78
|
+
display: inline-block;
|
79
|
+
width: 24px;
|
80
|
+
height: 24px;
|
81
|
+
margin-right: 8px;
|
82
|
+
margin-left: 1px;
|
83
|
+
overflow: hidden;
|
84
|
+
vertical-align: bottom;
|
85
|
+
}
|
86
|
+
.mfui-property__badge {
|
87
|
+
margin-bottom: 8px;
|
88
|
+
}
|
89
|
+
@media screen and (min-width: 768px) {
|
90
|
+
.mfui-property__title .mfui-property__desc {
|
91
|
+
width: 100%;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
.mfui-property__tooltip {
|
95
|
+
display: inline-block;
|
96
|
+
width: 20px;
|
97
|
+
height: 20px;
|
98
|
+
margin-left: 8px;
|
99
|
+
vertical-align: text-bottom;
|
100
|
+
cursor: pointer;
|
101
|
+
fill: var(--spbSky2);
|
102
|
+
}
|
103
|
+
.mfui-property__tooltip-inner {
|
104
|
+
max-width: 350px;
|
105
|
+
}
|
106
|
+
.mfui-property__desc {
|
107
|
+
margin-top: 12px;
|
108
|
+
}
|
109
|
+
@media screen and (min-width: 768px) {
|
110
|
+
.mfui-property__desc {
|
111
|
+
width: 70%;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
.mfui-property__desc_collapsible {
|
115
|
+
margin-top: 12px;
|
116
|
+
}
|
117
|
+
.mfui-property__value-wrapper {
|
118
|
+
display: -webkit-box;
|
119
|
+
display: -ms-flexbox;
|
120
|
+
display: flex;
|
121
|
+
-webkit-box-align: baseline;
|
122
|
+
-ms-flex-align: baseline;
|
123
|
+
align-items: baseline;
|
124
|
+
padding: 4px 8px;
|
125
|
+
border-radius: 8px;
|
126
|
+
white-space: pre-line;
|
127
|
+
text-align: right;
|
128
|
+
}
|
129
|
+
.mfui-property__value-wrapper_frame_default {
|
130
|
+
background: var(--base);
|
131
|
+
}
|
132
|
+
.mfui-property__value-wrapper_frame_gray {
|
133
|
+
background: var(--spbSky0);
|
134
|
+
}
|
135
|
+
.mfui-property__value {
|
136
|
+
font-weight: 500;
|
137
|
+
font-size: 18px;
|
138
|
+
line-height: 24px;
|
139
|
+
letter-spacing: 0.5px;
|
140
|
+
}
|
141
|
+
@media screen and (min-width: 1280px) {
|
142
|
+
.mfui-property__value {
|
143
|
+
font-size: 20px;
|
144
|
+
line-height: 28px;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
@media screen and (max-width: 767px) {
|
148
|
+
.mfui-property__value {
|
149
|
+
font-size: 15px;
|
150
|
+
line-height: 24px;
|
151
|
+
font-weight: 500;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
.mfui-property__value-unit:before {
|
155
|
+
content: '\00a0';
|
156
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import React, { Ref, ComponentProps } from 'react';
|
2
2
|
import { PromoBadge } from '@megafon/ui-core';
|
3
|
-
import './Property.
|
3
|
+
import './Property.less';
|
4
4
|
import { Item } from './types';
|
5
5
|
export interface IProperty {
|
6
6
|
/** Ссылка на корневой элемент */
|
7
|
-
rootRef?:
|
7
|
+
rootRef?: 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?:
|
15
|
+
badgeType?: ComponentProps<typeof PromoBadge>['type'];
|
16
16
|
/** Текст тултипа */
|
17
17
|
tooltip?: string;
|
18
18
|
/** Отключить верхнюю границу */
|
@@ -1,13 +1,15 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import "core-js/modules/es.array.map.js";
|
2
3
|
import "core-js/modules/es.symbol.js";
|
3
4
|
import "core-js/modules/es.symbol.description.js";
|
4
|
-
import
|
5
|
-
import * as React from 'react';
|
5
|
+
import React, { Fragment, useRef } 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';
|
8
9
|
import "./Property.css";
|
9
10
|
import { getColumnConfig } from "../../helpers/getColumnConfig";
|
10
11
|
import PropertyDescription from "./PropertyDescription";
|
12
|
+
|
11
13
|
var InfoIcon = function InfoIcon(props) {
|
12
14
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
13
15
|
viewBox: "0 0 20 20"
|
@@ -15,34 +17,37 @@ var InfoIcon = function InfoIcon(props) {
|
|
15
17
|
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"
|
16
18
|
}));
|
17
19
|
};
|
20
|
+
|
18
21
|
export var testIdPrefix = 'Property';
|
19
22
|
var cn = cnCreate('mfui-property');
|
23
|
+
|
20
24
|
var Property = function Property(_ref) {
|
21
25
|
var rootRef = _ref.rootRef,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
var tooltipRef =
|
44
|
-
|
45
|
-
|
26
|
+
items = _ref.items,
|
27
|
+
className = _ref.className,
|
28
|
+
_ref$badge = _ref.badge,
|
29
|
+
badge = _ref$badge === void 0 ? '' : _ref$badge,
|
30
|
+
_ref$badgeType = _ref.badgeType,
|
31
|
+
badgeType = _ref$badgeType === void 0 ? 'popular' : _ref$badgeType,
|
32
|
+
tooltip = _ref.tooltip,
|
33
|
+
icon = _ref.icon,
|
34
|
+
_ref$disableBorderTop = _ref.disableBorderTop,
|
35
|
+
disableBorderTop = _ref$disableBorderTop === void 0 ? false : _ref$disableBorderTop,
|
36
|
+
_ref$borderBottom = _ref.borderBottom,
|
37
|
+
borderBottom = _ref$borderBottom === void 0 ? false : _ref$borderBottom,
|
38
|
+
_ref$borderColor = _ref.borderColor,
|
39
|
+
borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
|
40
|
+
_ref$mergedValue = _ref.mergedValue,
|
41
|
+
mergedValue = _ref$mergedValue === void 0 ? '' : _ref$mergedValue,
|
42
|
+
_ref$fullWidth = _ref.fullWidth,
|
43
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
44
|
+
_ref$classes = _ref.classes,
|
45
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
46
|
+
dataAttrs = _ref.dataAttrs;
|
47
|
+
var tooltipRef = useRef(null);
|
48
|
+
|
49
|
+
var renderTitle = function renderTitle(title, titleSize, isFirstItem) {
|
50
|
+
return title && title.map(function (titleItem, i) {
|
46
51
|
var isFirstTitle = i === 0;
|
47
52
|
return /*#__PURE__*/React.createElement("div", {
|
48
53
|
key: i,
|
@@ -61,10 +66,11 @@ var Property = function Property(_ref) {
|
|
61
66
|
}, tooltip)));
|
62
67
|
});
|
63
68
|
};
|
69
|
+
|
64
70
|
var renderDescription = function renderDescription(description) {
|
65
|
-
return description
|
71
|
+
return description && description.map(function (_ref2, j) {
|
66
72
|
var value = _ref2.value,
|
67
|
-
|
73
|
+
isCollapsible = _ref2.isCollapsible;
|
68
74
|
return /*#__PURE__*/React.createElement("div", {
|
69
75
|
className: cn('desc', {
|
70
76
|
collapsible: isCollapsible
|
@@ -83,6 +89,7 @@ var Property = function Property(_ref) {
|
|
83
89
|
}));
|
84
90
|
});
|
85
91
|
};
|
92
|
+
|
86
93
|
var renderValue = function renderValue(valueFrameColor, value, valueUnit) {
|
87
94
|
return /*#__PURE__*/React.createElement("div", {
|
88
95
|
className: cn('value-wrapper', {
|
@@ -96,6 +103,7 @@ var Property = function Property(_ref) {
|
|
96
103
|
hasMargin: false
|
97
104
|
}, convert(valueUnit, {})));
|
98
105
|
};
|
106
|
+
|
99
107
|
return /*#__PURE__*/React.createElement("div", _extends({
|
100
108
|
className: cn({
|
101
109
|
'border-top': !disableBorderTop,
|
@@ -113,17 +121,17 @@ var Property = function Property(_ref) {
|
|
113
121
|
className: cn('wrapper')
|
114
122
|
}, items.map(function (_ref3, i) {
|
115
123
|
var title = _ref3.title,
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
+
value = _ref3.value,
|
125
|
+
description = _ref3.description,
|
126
|
+
_ref3$valueUnit = _ref3.valueUnit,
|
127
|
+
valueUnit = _ref3$valueUnit === void 0 ? '' : _ref3$valueUnit,
|
128
|
+
_ref3$titleSize = _ref3.titleSize,
|
129
|
+
titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
|
130
|
+
_ref3$valueFrameColor = _ref3.valueFrameColor,
|
131
|
+
valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
|
124
132
|
var isFirstItem = i === 0;
|
125
133
|
var isRenderBadge = isFirstItem && !!badge;
|
126
|
-
return /*#__PURE__*/React.createElement(
|
134
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
127
135
|
key: i
|
128
136
|
}, /*#__PURE__*/React.createElement("div", {
|
129
137
|
className: cn('main', {
|
@@ -138,4 +146,40 @@ var Property = function Property(_ref) {
|
|
138
146
|
}, badge), title ? renderTitle(title, titleSize, isFirstItem) : renderDescription(description)), mergedValue && isFirstItem && renderValue(valueFrameColor, mergedValue, valueUnit), !mergedValue && value && renderValue(valueFrameColor, value, valueUnit)), title && renderDescription(description));
|
139
147
|
})))));
|
140
148
|
};
|
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
|
+
};
|
141
185
|
export default Property;
|
@@ -1 +1,17 @@
|
|
1
|
-
h1,
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-property-description__collapse {
|
9
|
+
color: var(--systemBlue);
|
10
|
+
font-size: 12px;
|
11
|
+
-webkit-text-decoration: underline dashed var(--systemBlue);
|
12
|
+
text-decoration: underline dashed var(--systemBlue);
|
13
|
+
cursor: pointer;
|
14
|
+
}
|
15
|
+
.mfui-property-description__content-inner {
|
16
|
+
margin-bottom: 8px;
|
17
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './PropertyDescription.
|
3
|
-
import {
|
2
|
+
import './PropertyDescription.less';
|
3
|
+
import { Desc } from './types';
|
4
4
|
export declare const testIdPrefix = "PropertyDescription";
|
5
|
-
declare const PropertyDescription: React.FC<
|
5
|
+
declare const PropertyDescription: React.FC<Desc>;
|
6
6
|
export default PropertyDescription;
|