@megafon/ui-shared 6.0.0-beta.4 → 6.0.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 +4031 -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/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 +790 -1
- package/dist/es/components/Instructions/Instructions.d.ts +11 -11
- package/dist/es/components/Instructions/Instructions.js +94 -41
- 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/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/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 +790 -1
- package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
- package/dist/lib/components/Instructions/Instructions.js +186 -103
- 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/index.js +57 -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 +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,85 +1,106 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
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
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
|
-
exports
|
8
|
+
exports["default"] = exports.testIdPrefix = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
12
|
+
require("core-js/modules/es.array.map.js");
|
13
|
+
|
9
14
|
require("core-js/modules/es.symbol.js");
|
15
|
+
|
10
16
|
require("core-js/modules/es.symbol.description.js");
|
11
|
-
|
12
|
-
var
|
17
|
+
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
19
|
+
|
13
20
|
var _uiCore = require("@megafon/ui-core");
|
21
|
+
|
14
22
|
var _uiHelpers = require("@megafon/ui-helpers");
|
23
|
+
|
24
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
25
|
+
|
15
26
|
var _getColumnConfig = require("../../helpers/getColumnConfig");
|
27
|
+
|
16
28
|
var _PropertyDescription = _interopRequireDefault(require("./PropertyDescription"));
|
17
|
-
|
18
|
-
function
|
29
|
+
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
+
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
33
|
+
|
19
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
35
|
+
|
20
36
|
var InfoIcon = function InfoIcon(props) {
|
21
|
-
return /*#__PURE__*/
|
37
|
+
return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
|
22
38
|
viewBox: "0 0 20 20"
|
23
|
-
}, props), /*#__PURE__*/
|
39
|
+
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
24
40
|
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"
|
25
41
|
}));
|
26
42
|
};
|
27
|
-
|
43
|
+
|
44
|
+
var testIdPrefix = 'Property';
|
45
|
+
exports.testIdPrefix = testIdPrefix;
|
28
46
|
var cn = (0, _uiHelpers.cnCreate)('mfui-property');
|
47
|
+
|
29
48
|
var Property = function Property(_ref) {
|
30
49
|
var rootRef = _ref.rootRef,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
var tooltipRef =
|
53
|
-
|
54
|
-
|
50
|
+
items = _ref.items,
|
51
|
+
className = _ref.className,
|
52
|
+
_ref$badge = _ref.badge,
|
53
|
+
badge = _ref$badge === void 0 ? '' : _ref$badge,
|
54
|
+
_ref$badgeType = _ref.badgeType,
|
55
|
+
badgeType = _ref$badgeType === void 0 ? 'popular' : _ref$badgeType,
|
56
|
+
tooltip = _ref.tooltip,
|
57
|
+
icon = _ref.icon,
|
58
|
+
_ref$disableBorderTop = _ref.disableBorderTop,
|
59
|
+
disableBorderTop = _ref$disableBorderTop === void 0 ? false : _ref$disableBorderTop,
|
60
|
+
_ref$borderBottom = _ref.borderBottom,
|
61
|
+
borderBottom = _ref$borderBottom === void 0 ? false : _ref$borderBottom,
|
62
|
+
_ref$borderColor = _ref.borderColor,
|
63
|
+
borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
|
64
|
+
_ref$mergedValue = _ref.mergedValue,
|
65
|
+
mergedValue = _ref$mergedValue === void 0 ? '' : _ref$mergedValue,
|
66
|
+
_ref$fullWidth = _ref.fullWidth,
|
67
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
68
|
+
_ref$classes = _ref.classes,
|
69
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
70
|
+
dataAttrs = _ref.dataAttrs;
|
71
|
+
var tooltipRef = (0, _react.useRef)(null);
|
72
|
+
|
73
|
+
var renderTitle = function renderTitle(title, titleSize, isFirstItem) {
|
74
|
+
return title && title.map(function (titleItem, i) {
|
55
75
|
var isFirstTitle = i === 0;
|
56
|
-
return /*#__PURE__*/
|
76
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
57
77
|
key: i,
|
58
78
|
className: cn('title-item', {
|
59
79
|
size: titleSize
|
60
80
|
}, [classes.title]),
|
61
81
|
"data-testid": "".concat(testIdPrefix, "-title-item")
|
62
|
-
}, icon && isFirstTitle && /*#__PURE__*/
|
82
|
+
}, icon && isFirstTitle && /*#__PURE__*/_react["default"].createElement("div", {
|
63
83
|
className: cn('icon')
|
64
|
-
}, icon), titleItem, tooltip && isFirstItem && isFirstTitle && /*#__PURE__*/
|
84
|
+
}, icon), titleItem, tooltip && isFirstItem && isFirstTitle && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
65
85
|
className: cn('tooltip'),
|
66
86
|
ref: tooltipRef
|
67
|
-
}, /*#__PURE__*/
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(InfoIcon, null)), /*#__PURE__*/_react["default"].createElement(_uiCore.Tooltip, {
|
68
88
|
className: cn('tooltip-inner'),
|
69
89
|
triggerElement: tooltipRef
|
70
90
|
}, tooltip)));
|
71
91
|
});
|
72
92
|
};
|
93
|
+
|
73
94
|
var renderDescription = function renderDescription(description) {
|
74
|
-
return description
|
95
|
+
return description && description.map(function (_ref2, j) {
|
75
96
|
var value = _ref2.value,
|
76
|
-
|
77
|
-
return /*#__PURE__*/
|
97
|
+
isCollapsible = _ref2.isCollapsible;
|
98
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
78
99
|
className: cn('desc', {
|
79
100
|
collapsible: isCollapsible
|
80
101
|
}),
|
81
102
|
key: j
|
82
|
-
}, /*#__PURE__*/
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_PropertyDescription["default"], {
|
83
104
|
value: value,
|
84
105
|
isCollapsible: isCollapsible,
|
85
106
|
dataAttrs: {
|
@@ -92,59 +113,98 @@ var Property = function Property(_ref) {
|
|
92
113
|
}));
|
93
114
|
});
|
94
115
|
};
|
116
|
+
|
95
117
|
var renderValue = function renderValue(valueFrameColor, value, valueUnit) {
|
96
|
-
return /*#__PURE__*/
|
118
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
97
119
|
className: cn('value-wrapper', {
|
98
120
|
frame: valueFrameColor
|
99
121
|
}),
|
100
122
|
"data-testid": "".concat(testIdPrefix, "-value")
|
101
|
-
}, /*#__PURE__*/
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
102
124
|
className: cn('value')
|
103
|
-
}, typeof value === 'string' ? (0, _uiHelpers.convert)(value, {}) : value), valueUnit && /*#__PURE__*/
|
125
|
+
}, typeof value === 'string' ? (0, _uiHelpers.convert)(value, {}) : value), valueUnit && /*#__PURE__*/_react["default"].createElement(_uiCore.Caption, {
|
104
126
|
className: cn('value-unit'),
|
105
127
|
hasMargin: false
|
106
128
|
}, (0, _uiHelpers.convert)(valueUnit, {})));
|
107
129
|
};
|
108
|
-
|
130
|
+
|
131
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
109
132
|
className: cn({
|
110
133
|
'border-top': !disableBorderTop,
|
111
134
|
'border-bottom': borderBottom,
|
112
135
|
'border-color': borderColor
|
113
136
|
}, [className]),
|
114
137
|
ref: rootRef
|
115
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/
|
138
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, null, /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, (0, _extends2["default"])({}, (0, _getColumnConfig.getColumnConfig)(fullWidth), {
|
116
139
|
dataAttrs: {
|
117
140
|
root: {
|
118
141
|
'data-testid': "".concat(testIdPrefix, "-gridColumn")
|
119
142
|
}
|
120
143
|
}
|
121
|
-
}), /*#__PURE__*/
|
144
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
122
145
|
className: cn('wrapper')
|
123
146
|
}, items.map(function (_ref3, i) {
|
124
147
|
var title = _ref3.title,
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
148
|
+
value = _ref3.value,
|
149
|
+
description = _ref3.description,
|
150
|
+
_ref3$valueUnit = _ref3.valueUnit,
|
151
|
+
valueUnit = _ref3$valueUnit === void 0 ? '' : _ref3$valueUnit,
|
152
|
+
_ref3$titleSize = _ref3.titleSize,
|
153
|
+
titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
|
154
|
+
_ref3$valueFrameColor = _ref3.valueFrameColor,
|
155
|
+
valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
|
133
156
|
var isFirstItem = i === 0;
|
134
157
|
var isRenderBadge = isFirstItem && !!badge;
|
135
|
-
return /*#__PURE__*/
|
158
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
|
136
159
|
key: i
|
137
|
-
}, /*#__PURE__*/
|
160
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
138
161
|
className: cn('main', {
|
139
162
|
'with-badge': isRenderBadge,
|
140
163
|
'with-out-title': !title
|
141
164
|
})
|
142
|
-
}, /*#__PURE__*/
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
143
166
|
className: cn('title')
|
144
|
-
}, isRenderBadge && /*#__PURE__*/
|
167
|
+
}, isRenderBadge && /*#__PURE__*/_react["default"].createElement(_uiCore.PromoBadge, {
|
145
168
|
className: cn('badge'),
|
146
169
|
type: badgeType
|
147
170
|
}, badge), title ? renderTitle(title, titleSize, isFirstItem) : renderDescription(description)), mergedValue && isFirstItem && renderValue(valueFrameColor, mergedValue, valueUnit), !mergedValue && value && renderValue(valueFrameColor, value, valueUnit)), title && renderDescription(description));
|
148
171
|
})))));
|
149
172
|
};
|
150
|
-
|
173
|
+
|
174
|
+
Property.propTypes = {
|
175
|
+
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
176
|
+
current: _propTypes["default"].elementType
|
177
|
+
}), _propTypes["default"].any])]),
|
178
|
+
items: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
179
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].node)]),
|
180
|
+
description: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
181
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
182
|
+
isCollapsible: _propTypes["default"].bool
|
183
|
+
})),
|
184
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
|
185
|
+
titleSize: _propTypes["default"].oneOf(['default', 'big']),
|
186
|
+
valueUnit: _propTypes["default"].string,
|
187
|
+
valueFrameColor: _propTypes["default"].oneOf(['none', 'default', 'gray'])
|
188
|
+
}).isRequired).isRequired,
|
189
|
+
className: _propTypes["default"].string,
|
190
|
+
badge: _propTypes["default"].string,
|
191
|
+
badgeType: _propTypes["default"].oneOf(['hit', 'new', 'vip', 'popular', 'user-choice', 'interests']),
|
192
|
+
tooltip: _propTypes["default"].string,
|
193
|
+
disableBorderTop: _propTypes["default"].bool,
|
194
|
+
borderBottom: _propTypes["default"].bool,
|
195
|
+
borderColor: _propTypes["default"].oneOf(['default', 'darker']),
|
196
|
+
mergedValue: _propTypes["default"].string,
|
197
|
+
icon: _propTypes["default"].node,
|
198
|
+
fullWidth: _propTypes["default"].bool,
|
199
|
+
dataAttrs: _propTypes["default"].shape({
|
200
|
+
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
201
|
+
moreLink: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
202
|
+
}),
|
203
|
+
classes: _propTypes["default"].shape({
|
204
|
+
title: _propTypes["default"].string,
|
205
|
+
openedDescription: _propTypes["default"].string,
|
206
|
+
toggleDescription: _propTypes["default"].string
|
207
|
+
})
|
208
|
+
};
|
209
|
+
var _default = Property;
|
210
|
+
exports["default"] = _default;
|
@@ -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;
|
@@ -1,37 +1,54 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
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
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
|
-
exports
|
8
|
+
exports["default"] = exports.testIdPrefix = void 0;
|
9
|
+
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
9
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
+
|
10
14
|
var React = _interopRequireWildcard(require("react"));
|
15
|
+
|
11
16
|
var _uiCore = require("@megafon/ui-core");
|
17
|
+
|
12
18
|
var _uiHelpers = require("@megafon/ui-helpers");
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
21
|
+
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
|
+
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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
|
+
|
15
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
27
|
+
|
16
28
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
17
|
-
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
18
29
|
|
19
|
-
|
30
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
31
|
+
var testIdPrefix = 'PropertyDescription';
|
32
|
+
exports.testIdPrefix = testIdPrefix;
|
20
33
|
var cn = (0, _uiHelpers.cnCreate)('mfui-property-description');
|
34
|
+
|
21
35
|
var PropertyDescription = function PropertyDescription(_ref) {
|
22
36
|
var value = _ref.value,
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
37
|
+
_ref$isCollapsible = _ref.isCollapsible,
|
38
|
+
isCollapsible = _ref$isCollapsible === void 0 ? false : _ref$isCollapsible,
|
39
|
+
_ref$classes = _ref.classes,
|
40
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
41
|
+
dataAttrs = _ref.dataAttrs;
|
42
|
+
|
28
43
|
var _React$useState = React.useState(false),
|
29
|
-
|
30
|
-
|
31
|
-
|
44
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
45
|
+
isOpened = _React$useState2[0],
|
46
|
+
setIsOpened = _React$useState2[1];
|
47
|
+
|
32
48
|
var handleClickDesc = React.useCallback(function () {
|
33
49
|
return setIsOpened(!isOpened);
|
34
50
|
}, [isOpened]);
|
51
|
+
|
35
52
|
if (isCollapsible) {
|
36
53
|
return /*#__PURE__*/React.createElement("div", {
|
37
54
|
className: cn([isOpened ? classes.open : undefined]),
|
@@ -46,8 +63,22 @@ var PropertyDescription = function PropertyDescription(_ref) {
|
|
46
63
|
className: cn('collapse', classes.toggle)
|
47
64
|
}), isOpened ? 'Скрыть' : 'Подробнее'));
|
48
65
|
}
|
66
|
+
|
49
67
|
return /*#__PURE__*/React.createElement("div", {
|
50
68
|
className: cn()
|
51
69
|
}, value);
|
52
70
|
};
|
53
|
-
|
71
|
+
|
72
|
+
PropertyDescription.propTypes = {
|
73
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
74
|
+
isCollapsible: _propTypes["default"].bool,
|
75
|
+
classes: _propTypes["default"].shape({
|
76
|
+
open: _propTypes["default"].string,
|
77
|
+
toggle: _propTypes["default"].string
|
78
|
+
}),
|
79
|
+
dataAttrs: _propTypes["default"].shape({
|
80
|
+
moreLink: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
81
|
+
})
|
82
|
+
};
|
83
|
+
var _default = PropertyDescription;
|
84
|
+
exports["default"] = _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
export type
|
2
|
+
export declare type Desc = {
|
3
3
|
value: string | React.ReactNode[];
|
4
4
|
isCollapsible?: boolean;
|
5
5
|
classes?: {
|
@@ -10,12 +10,10 @@ export type DescriptionType = {
|
|
10
10
|
moreLink?: Record<string, string>;
|
11
11
|
};
|
12
12
|
};
|
13
|
-
export type
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
titleSize?: TitleSizeType;
|
18
|
-
description?: DescriptionType[];
|
13
|
+
export declare type Item = {
|
14
|
+
title?: string[] | React.ReactNode[];
|
15
|
+
titleSize?: 'default' | 'big';
|
16
|
+
description?: Desc[];
|
19
17
|
value?: string | React.ReactNode;
|
20
18
|
valueUnit?: string;
|
21
19
|
valueFrameColor?: 'none' | 'default' | 'gray';
|
@@ -1 +1,41 @@
|
|
1
|
-
h1,
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-steps {
|
9
|
+
width: 66%;
|
10
|
+
margin-right: auto;
|
11
|
+
margin-left: auto;
|
12
|
+
}
|
13
|
+
@media screen and (min-width: 1280px) {
|
14
|
+
.mfui-steps {
|
15
|
+
width: 49%;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
@media screen and (max-width: 767px) {
|
19
|
+
.mfui-steps {
|
20
|
+
width: 100%;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
.mfui-steps__title {
|
24
|
+
margin-bottom: 40px;
|
25
|
+
}
|
26
|
+
.mfui-steps__list {
|
27
|
+
margin: 0;
|
28
|
+
padding: 0;
|
29
|
+
list-style: none;
|
30
|
+
}
|
31
|
+
.mfui-steps__item {
|
32
|
+
margin-bottom: 48px;
|
33
|
+
}
|
34
|
+
@media screen and (max-width: 767px) {
|
35
|
+
.mfui-steps__item {
|
36
|
+
margin-bottom: 24px;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
.mfui-steps__item:last-child {
|
40
|
+
margin-bottom: 0;
|
41
|
+
}
|