@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
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import './ImageBanner.
|
1
|
+
import * as React from 'react';
|
2
|
+
import './ImageBanner.scss';
|
3
3
|
export declare const BackgroundColor: {
|
4
4
|
readonly TRANSPARENT: "transparent";
|
5
5
|
readonly GREEN: "green";
|
@@ -8,23 +8,23 @@ export declare const BackgroundColor: {
|
|
8
8
|
readonly GRADIENT: "gradient";
|
9
9
|
readonly LIGHT: "light";
|
10
10
|
};
|
11
|
-
export
|
11
|
+
export type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
|
12
12
|
export declare const Radius: {
|
13
13
|
readonly CORNERS: "corners";
|
14
14
|
readonly ROUNDED: "rounded";
|
15
15
|
};
|
16
|
-
export
|
16
|
+
export type RadiusType = (typeof Radius)[keyof typeof Radius];
|
17
17
|
export declare const NavTheme: {
|
18
18
|
readonly LIGHT: "light";
|
19
19
|
readonly DARK: "dark";
|
20
20
|
};
|
21
|
-
export
|
21
|
+
export type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
|
22
22
|
export declare const ImageVerticalAlign: {
|
23
23
|
readonly TOP: "top";
|
24
24
|
readonly CENTER: "center";
|
25
25
|
readonly BOTTOM: "bottom";
|
26
26
|
};
|
27
|
-
export
|
27
|
+
export type ImageVerticalAlignType = (typeof ImageVerticalAlign)[keyof typeof ImageVerticalAlign];
|
28
28
|
export interface IImageBannerProps {
|
29
29
|
/** Дополнительные data атрибуты к внутренним элементам */
|
30
30
|
dataAttrs?: {
|
@@ -47,7 +47,7 @@ export interface IImageBannerProps {
|
|
47
47
|
children?: string;
|
48
48
|
};
|
49
49
|
/** Ссылка на корневой элемент */
|
50
|
-
rootRef?: Ref<HTMLDivElement>;
|
50
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
51
51
|
/** Заголовок */
|
52
52
|
title?: string | React.ReactNode | React.ReactNode[];
|
53
53
|
/** Текст-описание */
|
@@ -82,6 +82,7 @@ export interface IImageBannerProps {
|
|
82
82
|
badges?: JSX.Element[] | JSX.Element;
|
83
83
|
/** Элемент блока с рекламой */
|
84
84
|
adBlock?: JSX.Element | null;
|
85
|
+
children?: React.ReactNode;
|
85
86
|
}
|
86
87
|
declare const ImageBanner: React.FC<IImageBannerProps>;
|
87
88
|
export default ImageBanner;
|
@@ -1,39 +1,22 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(
|
4
|
-
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
|
-
exports["default"] = exports.
|
9
|
-
|
7
|
+
exports["default"] = exports.Radius = exports.NavTheme = exports.ImageVerticalAlign = exports.BackgroundColor = void 0;
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
-
|
12
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
-
|
14
10
|
require("core-js/modules/es.symbol.js");
|
15
|
-
|
16
11
|
require("core-js/modules/es.symbol.description.js");
|
17
|
-
|
18
12
|
require("core-js/modules/es.array.concat.js");
|
19
|
-
|
20
|
-
require("core-js/modules/es.object.values.js");
|
21
|
-
|
22
|
-
var _react = _interopRequireDefault(require("react"));
|
23
|
-
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
24
14
|
var _uiCore = require("@megafon/ui-core");
|
25
|
-
|
26
15
|
var _uiHelpers = require("@megafon/ui-helpers");
|
27
|
-
|
28
|
-
var
|
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
|
-
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
34
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
35
|
-
|
36
|
-
var BackgroundColor = {
|
19
|
+
var BackgroundColor = exports.BackgroundColor = {
|
37
20
|
TRANSPARENT: 'transparent',
|
38
21
|
GREEN: 'green',
|
39
22
|
PURPLE: 'purple',
|
@@ -41,41 +24,34 @@ var BackgroundColor = {
|
|
41
24
|
GRADIENT: 'gradient',
|
42
25
|
LIGHT: 'light'
|
43
26
|
};
|
44
|
-
exports.
|
45
|
-
var Radius = {
|
27
|
+
var Radius = exports.Radius = {
|
46
28
|
CORNERS: 'corners',
|
47
29
|
ROUNDED: 'rounded'
|
48
30
|
};
|
49
|
-
exports.
|
50
|
-
var NavTheme = {
|
31
|
+
var NavTheme = exports.NavTheme = {
|
51
32
|
LIGHT: 'light',
|
52
33
|
DARK: 'dark'
|
53
34
|
};
|
54
|
-
exports.
|
55
|
-
var ImageVerticalAlign = {
|
35
|
+
var ImageVerticalAlign = exports.ImageVerticalAlign = {
|
56
36
|
TOP: 'top',
|
57
37
|
CENTER: 'center',
|
58
38
|
BOTTOM: 'bottom'
|
59
39
|
};
|
60
|
-
exports.ImageVerticalAlign = ImageVerticalAlign;
|
61
|
-
|
62
40
|
var getTheme = function getTheme(backgrounColor) {
|
63
41
|
switch (backgrounColor) {
|
64
42
|
case BackgroundColor.GREEN:
|
65
43
|
case BackgroundColor.PURPLE:
|
66
44
|
return NavTheme.LIGHT;
|
67
|
-
|
68
45
|
default:
|
69
46
|
return NavTheme.DARK;
|
70
47
|
}
|
71
48
|
};
|
72
|
-
|
73
49
|
var cn = (0, _uiHelpers.cnCreate)('mfui-image-banner');
|
74
50
|
var typographyConfig = {
|
75
51
|
b: {
|
76
52
|
component: function component(_ref) {
|
77
53
|
var children = _ref.children;
|
78
|
-
return /*#__PURE__*/
|
54
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
79
55
|
className: cn('value'),
|
80
56
|
as: "h3",
|
81
57
|
color: "inherit"
|
@@ -83,108 +59,97 @@ var typographyConfig = {
|
|
83
59
|
}
|
84
60
|
}
|
85
61
|
};
|
86
|
-
|
87
62
|
var ImageBanner = function ImageBanner(_ref2) {
|
88
63
|
var dataAttrs = _ref2.dataAttrs,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
_react["default"].useEffect(function () {
|
64
|
+
className = _ref2.className,
|
65
|
+
_ref2$classes = _ref2.classes,
|
66
|
+
classes = _ref2$classes === void 0 ? {} : _ref2$classes,
|
67
|
+
rootRef = _ref2.rootRef,
|
68
|
+
_ref2$imageMobile = _ref2.imageMobile,
|
69
|
+
imageMobile = _ref2$imageMobile === void 0 ? '' : _ref2$imageMobile,
|
70
|
+
_ref2$imageMobile2x = _ref2.imageMobile2x,
|
71
|
+
imageMobile2x = _ref2$imageMobile2x === void 0 ? '' : _ref2$imageMobile2x,
|
72
|
+
_ref2$imageDesktop = _ref2.imageDesktop,
|
73
|
+
imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
|
74
|
+
_ref2$imageDesktop2x = _ref2.imageDesktop2x,
|
75
|
+
imageDesktop2x = _ref2$imageDesktop2x === void 0 ? '' : _ref2$imageDesktop2x,
|
76
|
+
_ref2$imageAlt = _ref2.imageAlt,
|
77
|
+
imageAlt = _ref2$imageAlt === void 0 ? '' : _ref2$imageAlt,
|
78
|
+
_ref2$imageVerticalAl = _ref2.imageVerticalAlign,
|
79
|
+
imageVerticalAlign = _ref2$imageVerticalAl === void 0 ? ImageVerticalAlign.CENTER : _ref2$imageVerticalAl,
|
80
|
+
title = _ref2.title,
|
81
|
+
description = _ref2.description,
|
82
|
+
cost = _ref2.cost,
|
83
|
+
_ref2$headerLevelMobi = _ref2.headerLevelMobile,
|
84
|
+
headerLevelMobile = _ref2$headerLevelMobi === void 0 ? 'h1' : _ref2$headerLevelMobi,
|
85
|
+
_ref2$headerLevel = _ref2.headerLevel,
|
86
|
+
headerLevel = _ref2$headerLevel === void 0 ? 'h1' : _ref2$headerLevel,
|
87
|
+
_ref2$backgroundColor = _ref2.backgroundColor,
|
88
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
|
89
|
+
_ref2$radius = _ref2.radius,
|
90
|
+
radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
|
91
|
+
autoHeight = _ref2.autoHeight,
|
92
|
+
isImageFullWidth = _ref2.isImageFullWidth,
|
93
|
+
badges = _ref2.badges,
|
94
|
+
adBlock = _ref2.adBlock,
|
95
|
+
_ref2$children = _ref2.children,
|
96
|
+
children = _ref2$children === void 0 ? [] : _ref2$children;
|
97
|
+
var _React$useState = React.useState(false),
|
98
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
99
|
+
isMobile = _React$useState2[0],
|
100
|
+
setIsMobile = _React$useState2[1];
|
101
|
+
React.useEffect(function () {
|
129
102
|
var mediaQuery = window.matchMedia("(max-width: ".concat(_uiHelpers.breakpoints.MOBILE_MIDDLE_END, "px)"));
|
130
|
-
|
131
103
|
var handleMediaChange = function handleMediaChange(_ref3) {
|
132
104
|
var matches = _ref3.matches;
|
133
105
|
setIsMobile(matches);
|
134
106
|
};
|
135
|
-
|
136
107
|
setIsMobile(mediaQuery.matches);
|
137
108
|
mediaQuery.addEventListener('change', handleMediaChange);
|
138
109
|
return function () {
|
139
110
|
mediaQuery.removeEventListener('change', handleMediaChange);
|
140
111
|
};
|
141
112
|
}, []);
|
142
|
-
|
143
113
|
var navTheme = getTheme(backgroundColor);
|
144
114
|
var hasImage = !!(imageMobile || imageMobile2x || imageDesktop || imageDesktop2x);
|
145
|
-
|
146
|
-
var renderBadges = !!badges && /*#__PURE__*/_react["default"].createElement("div", {
|
115
|
+
var renderBadges = !!badges && /*#__PURE__*/React.createElement("div", {
|
147
116
|
className: cn('badges', [classes.badges])
|
148
117
|
}, badges);
|
149
|
-
|
150
|
-
var renderAdBlock = !!adBlock && /*#__PURE__*/_react["default"].createElement("div", {
|
118
|
+
var renderAdBlock = !!adBlock && /*#__PURE__*/React.createElement("div", {
|
151
119
|
className: cn('ad-block', [classes.adBlock])
|
152
120
|
}, adBlock);
|
153
|
-
|
154
|
-
var renderContent = /*#__PURE__*/_react["default"].createElement("div", {
|
121
|
+
var renderContent = /*#__PURE__*/React.createElement("div", {
|
155
122
|
className: cn('content')
|
156
|
-
}, /*#__PURE__*/
|
123
|
+
}, /*#__PURE__*/React.createElement("div", {
|
157
124
|
className: cn('badges-container', [classes.badgesContainer])
|
158
|
-
}, renderBadges, renderAdBlock), !!title && /*#__PURE__*/
|
125
|
+
}, renderBadges, renderAdBlock), !!title && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
159
126
|
className: cn('title', [classes.title]),
|
160
127
|
color: "inherit",
|
161
128
|
as: isMobile ? headerLevelMobile : headerLevel
|
162
|
-
}, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/
|
129
|
+
}, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/React.createElement(_uiCore.Header, {
|
163
130
|
className: cn('description', [classes.description]),
|
164
131
|
as: "h5",
|
165
132
|
color: "inherit"
|
166
|
-
}, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/
|
133
|
+
}, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/React.createElement("div", {
|
167
134
|
className: cn('cost', [classes.cost])
|
168
|
-
}, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!
|
135
|
+
}, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!React.Children.count(children) && /*#__PURE__*/React.createElement("div", {
|
169
136
|
className: cn('children', [classes.children])
|
170
137
|
}, children));
|
171
|
-
|
172
|
-
var renderImage = /*#__PURE__*/_react["default"].createElement("picture", {
|
138
|
+
var renderImage = /*#__PURE__*/React.createElement("picture", {
|
173
139
|
className: cn('picture', {
|
174
140
|
'v-align': imageVerticalAlign
|
175
141
|
})
|
176
|
-
}, /*#__PURE__*/
|
142
|
+
}, /*#__PURE__*/React.createElement("source", {
|
177
143
|
className: classes.imageSource,
|
178
144
|
media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
|
179
145
|
srcSet: "".concat(imageDesktop, ", ").concat(imageDesktop2x, " 2x")
|
180
|
-
}), /*#__PURE__*/
|
146
|
+
}), /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
|
181
147
|
className: cn('image', [classes.image]),
|
182
148
|
src: imageMobile || imageMobile2x,
|
183
149
|
srcSet: imageMobile2x ? "".concat(imageMobile2x, " 2x") : undefined,
|
184
150
|
alt: imageAlt
|
185
151
|
})));
|
186
|
-
|
187
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
152
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
188
153
|
className: cn({
|
189
154
|
'background-color': backgroundColor,
|
190
155
|
'text-color': navTheme,
|
@@ -196,46 +161,4 @@ var ImageBanner = function ImageBanner(_ref2) {
|
|
196
161
|
ref: rootRef
|
197
162
|
}), renderContent, hasImage && renderImage);
|
198
163
|
};
|
199
|
-
|
200
|
-
ImageBanner.propTypes = {
|
201
|
-
dataAttrs: PropTypes.shape({
|
202
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
203
|
-
image: PropTypes.objectOf(PropTypes.string.isRequired)
|
204
|
-
}),
|
205
|
-
className: PropTypes.string,
|
206
|
-
classes: PropTypes.shape({
|
207
|
-
root: PropTypes.string,
|
208
|
-
image: PropTypes.string,
|
209
|
-
imageSource: PropTypes.string,
|
210
|
-
title: PropTypes.string,
|
211
|
-
description: PropTypes.string,
|
212
|
-
cost: PropTypes.string,
|
213
|
-
badgesContainer: PropTypes.string,
|
214
|
-
badges: PropTypes.string,
|
215
|
-
badge: PropTypes.string,
|
216
|
-
adBlock: PropTypes.string,
|
217
|
-
children: PropTypes.string
|
218
|
-
}),
|
219
|
-
rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
|
220
|
-
current: PropTypes.elementType
|
221
|
-
}), PropTypes.any])]),
|
222
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
223
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
224
|
-
cost: PropTypes.string,
|
225
|
-
headerLevelMobile: PropTypes.oneOf(['h1', 'h2']),
|
226
|
-
headerLevel: PropTypes.oneOf(['h1', 'h2']),
|
227
|
-
backgroundColor: PropTypes.oneOf(Object.values(BackgroundColor)),
|
228
|
-
radius: PropTypes.oneOf(Object.values(Radius)),
|
229
|
-
imageMobile: PropTypes.string,
|
230
|
-
imageMobile2x: PropTypes.string,
|
231
|
-
imageDesktop: PropTypes.string,
|
232
|
-
imageDesktop2x: PropTypes.string,
|
233
|
-
imageAlt: PropTypes.string,
|
234
|
-
imageVerticalAlign: PropTypes.oneOf(Object.values(ImageVerticalAlign)),
|
235
|
-
autoHeight: PropTypes.bool,
|
236
|
-
isImageFullWidth: PropTypes.bool,
|
237
|
-
badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
|
238
|
-
adBlock: PropTypes.element
|
239
|
-
};
|
240
|
-
var _default = ImageBanner;
|
241
|
-
exports["default"] = _default;
|
164
|
+
var _default = exports["default"] = ImageBanner;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
2
|
import SwiperCore from 'swiper';
|
3
|
-
import './Instructions.
|
3
|
+
import './Instructions.scss';
|
4
4
|
export declare const pictureAlignTypes: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly RIGHT: "right";
|
@@ -34,13 +34,13 @@ export declare const elementOrderTypes: {
|
|
34
34
|
readonly DEFAULT: "default";
|
35
35
|
readonly REVERSED: "reversed";
|
36
36
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
export
|
37
|
+
type PictureAlignTypesType = (typeof pictureAlignTypes)[keyof typeof pictureAlignTypes];
|
38
|
+
type PictureVerticalAlignTypesType = (typeof pictureVerticalAlignTypes)[keyof typeof pictureVerticalAlignTypes];
|
39
|
+
type PictureMaskTypesType = (typeof pictureMaskTypes)[keyof typeof pictureMaskTypes];
|
40
|
+
type PictureBackgroundColorsType = (typeof pictureBackgroundColorTypes)[keyof typeof pictureBackgroundColorTypes];
|
41
|
+
type ArrowThemeType = (typeof arrowTheme)[keyof typeof arrowTheme];
|
42
|
+
type ElementOrderType = (typeof elementOrderTypes)[keyof typeof elementOrderTypes];
|
43
|
+
export type InstructionItemType = {
|
44
44
|
title: string | React.ReactNode | React.ReactNode[];
|
45
45
|
mediaUrl: string;
|
46
46
|
isVideo: boolean;
|
@@ -62,7 +62,7 @@ export interface IInstructionsProps {
|
|
62
62
|
arrowNext?: Record<string, string>;
|
63
63
|
};
|
64
64
|
/** Ссылка на корневой элемент */
|
65
|
-
rootRef?: Ref<HTMLDivElement>;
|
65
|
+
rootRef?: React.Ref<HTMLDivElement>;
|
66
66
|
/** Дополнительные классы для внутренних элементов */
|
67
67
|
classes?: {
|
68
68
|
instructionItem?: string;
|
@@ -99,5 +99,5 @@ export interface IInstructionsProps {
|
|
99
99
|
/** Ref на swiper */
|
100
100
|
getSwiper?: (instance: SwiperCore) => void;
|
101
101
|
}
|
102
|
-
declare const Instructions: React.FC<IInstructionsProps
|
102
|
+
declare const Instructions: React.FC<React.PropsWithChildren<IInstructionsProps>>;
|
103
103
|
export default Instructions;
|