@megafon/ui-shared 5.16.0 → 6.0.0-beta.1
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/style/AudioPlayer.css +1 -58
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/es/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +1 -34
- 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/style/BenefitsIcons.css +1 -38
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- 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.css +1 -16
- 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.css +1 -354
- package/dist/es/components/Card/Card.d.ts +5 -9
- package/dist/es/components/Card/Card.js +26 -136
- package/dist/es/components/Card/types.d.ts +9 -15
- 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.css +1 -3230
- 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.css +1 -37
- 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.css +1 -36
- 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.css +1 -248
- package/dist/es/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/es/components/ImageBanner/ImageBanner.js +51 -109
- package/dist/es/components/Instructions/Instructions.css +1 -790
- 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.css +1 -0
- 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.css +1 -80
- 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.css +1 -53
- 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.css +1 -80
- 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.css +1 -156
- 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.css +1 -17
- 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.css +1 -41
- 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.css +1 -42
- 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.css +1 -346
- 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.css +1 -327
- 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.css +1 -157
- 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.css +1 -25
- 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.css +1 -27
- 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.css +1 -10
- 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.css +1 -29
- 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.css +1 -31
- 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.css +1 -225
- 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.css +1 -106
- 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/style/AudioPlayer.css +1 -58
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +1 -35
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +1 -68
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +1 -34
- 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/style/BenefitsIcons.css +1 -38
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +1 -90
- 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.css +1 -16
- 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.css +1 -354
- package/dist/lib/components/Card/Card.d.ts +5 -9
- package/dist/lib/components/Card/Card.js +63 -180
- package/dist/lib/components/Card/types.d.ts +9 -15
- 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.css +1 -3230
- package/dist/lib/components/Container/Container.d.ts +7 -5
- package/dist/lib/components/Container/Container.js +17 -39
- package/dist/lib/components/DownloadLinks/DownloadLink.css +1 -37
- 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.css +1 -36
- 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.css +1 -248
- package/dist/lib/components/ImageBanner/ImageBanner.d.ts +21 -17
- package/dist/lib/components/ImageBanner/ImageBanner.js +71 -155
- package/dist/lib/components/Instructions/Instructions.css +1 -790
- 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.css +1 -0
- 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.css +1 -80
- 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.css +1 -53
- 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.css +1 -80
- 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.css +1 -156
- 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.css +1 -17
- 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.css +1 -41
- 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.css +1 -42
- 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.css +1 -346
- 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.css +1 -327
- 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.css +1 -157
- 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.css +1 -25
- 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.css +1 -27
- 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.css +1 -10
- 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.css +1 -29
- 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.css +1 -31
- 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.css +1 -225
- 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.css +1 -106
- 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 +89 -92
- package/CHANGELOG.md +0 -3984
- package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
- 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/lib/components/NotificationBox/style/NotificationBox.css +0 -28
- 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
@@ -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;
|
@@ -1,43 +1,33 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
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); }
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
6
|
-
exports
|
7
|
-
|
7
|
+
exports.pictureVerticalAlignTypes = exports.pictureMaskTypes = exports.pictureBackgroundColorTypes = exports.pictureAlignTypes = exports.elementOrderTypes = exports["default"] = exports.arrowTheme = void 0;
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
-
|
10
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
|
12
10
|
require("core-js/modules/es.array.map.js");
|
13
|
-
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
15
|
-
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
16
12
|
var _uiCore = require("@megafon/ui-core");
|
17
|
-
|
18
13
|
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
-
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
21
|
-
|
22
14
|
var _react2 = require("swiper/react");
|
23
|
-
|
15
|
+
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); }
|
16
|
+
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; }
|
24
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
25
|
-
|
26
18
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
27
|
-
|
28
19
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
29
|
-
|
20
|
+
|
21
|
+
var pictureAlignTypes = exports.pictureAlignTypes = {
|
30
22
|
LEFT: 'left',
|
31
23
|
RIGHT: 'right'
|
32
24
|
};
|
33
|
-
exports.
|
34
|
-
var pictureVerticalAlignTypes = {
|
25
|
+
var pictureVerticalAlignTypes = exports.pictureVerticalAlignTypes = {
|
35
26
|
CENTER: 'center',
|
36
27
|
TOP: 'top',
|
37
28
|
UNSET: 'unset'
|
38
29
|
};
|
39
|
-
exports.
|
40
|
-
var pictureMaskTypes = {
|
30
|
+
var pictureMaskTypes = exports.pictureMaskTypes = {
|
41
31
|
ANDROID: 'android',
|
42
32
|
ANDROID_CROPPED: 'android-cropped',
|
43
33
|
NEW_IPHONE: 'new-iphone',
|
@@ -50,114 +40,96 @@ var pictureMaskTypes = {
|
|
50
40
|
IPHONE_CROPPED: 'iphone-cropped',
|
51
41
|
NONE: 'none'
|
52
42
|
};
|
53
|
-
exports.
|
54
|
-
var pictureBackgroundColorTypes = {
|
43
|
+
var pictureBackgroundColorTypes = exports.pictureBackgroundColorTypes = {
|
55
44
|
SPB_SKY_0: 'spbSky0'
|
56
45
|
};
|
57
|
-
exports.
|
58
|
-
var arrowTheme = {
|
46
|
+
var arrowTheme = exports.arrowTheme = {
|
59
47
|
PURPLE: 'purple',
|
60
48
|
DARK: 'dark'
|
61
49
|
};
|
62
|
-
exports.
|
63
|
-
var elementOrderTypes = {
|
50
|
+
var elementOrderTypes = exports.elementOrderTypes = {
|
64
51
|
DEFAULT: 'default',
|
65
52
|
REVERSED: 'reversed'
|
66
53
|
};
|
67
|
-
exports.elementOrderTypes = elementOrderTypes;
|
68
54
|
var testIdPrefix = 'Instructions';
|
69
55
|
var cn = (0, _uiHelpers.cnCreate)('mfui-instructions');
|
70
56
|
var swiperSlideCn = cn('slide');
|
71
|
-
|
72
57
|
var Instructions = function Instructions(_ref) {
|
73
58
|
var dataAttrs = _ref.dataAttrs,
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
-
slideIndex = _React$useState4[0],
|
114
|
-
setSlideIndex = _React$useState4[1];
|
115
|
-
|
59
|
+
rootRef = _ref.rootRef,
|
60
|
+
_ref$classes = _ref.classes,
|
61
|
+
_ref$classes2 = _ref$classes === void 0 ? {} : _ref$classes,
|
62
|
+
instructionItem = _ref$classes2.instructionItem,
|
63
|
+
desktopInstructionItem = _ref$classes2.desktopInstructionItem,
|
64
|
+
mobileInstructionItem = _ref$classes2.mobileInstructionItem,
|
65
|
+
activeInstructionItem = _ref$classes2.activeInstructionItem,
|
66
|
+
desktopItemTitle = _ref$classes2.desktopItemTitle,
|
67
|
+
mobileItemTitle = _ref$classes2.mobileItemTitle,
|
68
|
+
instructionItemImg = _ref$classes2.instructionItemImg,
|
69
|
+
additionalText = _ref$classes2.additionalText,
|
70
|
+
arrowPrev = _ref$classes2.arrowPrev,
|
71
|
+
arrowNext = _ref$classes2.arrowNext,
|
72
|
+
_ref$title = _ref.title,
|
73
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
74
|
+
instructionItems = _ref.instructionItems,
|
75
|
+
_ref$pictureAlign = _ref.pictureAlign,
|
76
|
+
pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
|
77
|
+
_ref$pictureVerticalA = _ref.pictureVerticalAlign,
|
78
|
+
pictureVerticalAlign = _ref$pictureVerticalA === void 0 ? 'center' : _ref$pictureVerticalA,
|
79
|
+
_ref$pictureMask = _ref.pictureMask,
|
80
|
+
pictureMask = _ref$pictureMask === void 0 ? 'none' : _ref$pictureMask,
|
81
|
+
pictureBackgroundColor = _ref.pictureBackgroundColor,
|
82
|
+
getSwiper = _ref.getSwiper,
|
83
|
+
text = _ref.additionalText,
|
84
|
+
showArrows = _ref.showArrows,
|
85
|
+
_ref$arrowsTheme = _ref.arrowsTheme,
|
86
|
+
arrowsTheme = _ref$arrowsTheme === void 0 ? arrowTheme.DARK : _ref$arrowsTheme,
|
87
|
+
_ref$elementOrder = _ref.elementOrder,
|
88
|
+
elementOrder = _ref$elementOrder === void 0 ? 'default' : _ref$elementOrder,
|
89
|
+
children = _ref.children;
|
90
|
+
var _React$useState = React.useState(),
|
91
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
92
|
+
swiperInstance = _React$useState2[0],
|
93
|
+
setSwiperInstance = _React$useState2[1];
|
94
|
+
var _React$useState3 = React.useState(0),
|
95
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
96
|
+
slideIndex = _React$useState4[0],
|
97
|
+
setSlideIndex = _React$useState4[1];
|
116
98
|
var isMobileReversed = elementOrder === 'reversed';
|
117
|
-
|
118
|
-
var getSwiperInstance = _react["default"].useCallback(function (swiper) {
|
99
|
+
var getSwiperInstance = React.useCallback(function (swiper) {
|
119
100
|
setSwiperInstance(swiper);
|
120
101
|
getSwiper && getSwiper(swiper);
|
121
102
|
}, [getSwiper]);
|
122
|
-
|
123
|
-
var getActiveCustomClass = _react["default"].useCallback(function (articleIndex, activeIndex) {
|
103
|
+
var getActiveCustomClass = React.useCallback(function (articleIndex, activeIndex) {
|
124
104
|
if (articleIndex !== activeIndex) {
|
125
105
|
return undefined;
|
126
106
|
}
|
127
|
-
|
128
107
|
return activeInstructionItem;
|
129
108
|
}, [activeInstructionItem]);
|
130
|
-
|
131
|
-
var handleArticleClick = _react["default"].useCallback(function (ind) {
|
109
|
+
var handleArticleClick = React.useCallback(function (ind) {
|
132
110
|
return function () {
|
133
111
|
setSlideIndex(ind);
|
134
112
|
swiperInstance && swiperInstance.slideTo(ind);
|
135
113
|
};
|
136
114
|
}, [swiperInstance]);
|
137
|
-
|
138
|
-
var handleSlideChange = _react["default"].useCallback(function (_ref2) {
|
115
|
+
var handleSlideChange = React.useCallback(function (_ref2) {
|
139
116
|
var activeIndex = _ref2.activeIndex;
|
140
117
|
setSlideIndex(activeIndex);
|
141
118
|
}, []);
|
142
|
-
|
143
|
-
var handlePrevClick = _react["default"].useCallback(function () {
|
119
|
+
var handlePrevClick = React.useCallback(function () {
|
144
120
|
if (!swiperInstance) {
|
145
121
|
return;
|
146
122
|
}
|
147
|
-
|
148
123
|
swiperInstance.slidePrev();
|
149
124
|
}, [swiperInstance]);
|
150
|
-
|
151
|
-
var handleNextClick = _react["default"].useCallback(function () {
|
125
|
+
var handleNextClick = React.useCallback(function () {
|
152
126
|
if (!swiperInstance) {
|
153
127
|
return;
|
154
128
|
}
|
155
|
-
|
156
129
|
swiperInstance.slideNext();
|
157
130
|
}, [swiperInstance]);
|
158
|
-
|
159
|
-
|
160
|
-
return /*#__PURE__*/_react["default"].createElement("video", (0, _extends2["default"])({
|
131
|
+
var renderVideo = React.useCallback(function (mediaUrl, index) {
|
132
|
+
return /*#__PURE__*/React.createElement("video", (0, _extends2["default"])({
|
161
133
|
loop: true,
|
162
134
|
muted: true,
|
163
135
|
autoPlay: true,
|
@@ -165,20 +137,19 @@ var Instructions = function Instructions(_ref) {
|
|
165
137
|
className: cn('swiper-img', {
|
166
138
|
video: true
|
167
139
|
})
|
168
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/
|
140
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, index + 1)), /*#__PURE__*/React.createElement("source", {
|
169
141
|
src: mediaUrl,
|
170
142
|
type: "video/mp4"
|
171
143
|
}));
|
172
144
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image]);
|
173
|
-
|
174
|
-
|
175
|
-
return /*#__PURE__*/_react["default"].createElement("ul", {
|
145
|
+
var renderMobileDots = React.useCallback(function () {
|
146
|
+
return /*#__PURE__*/React.createElement("ul", {
|
176
147
|
className: cn('articles-dots', {
|
177
148
|
reversed: isMobileReversed
|
178
149
|
}),
|
179
150
|
"data-testid": "".concat(testIdPrefix, "-articles-dots-mobile")
|
180
151
|
}, instructionItems.map(function (_item, i) {
|
181
|
-
return /*#__PURE__*/
|
152
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
182
153
|
key: i,
|
183
154
|
className: cn('articles-dot', {
|
184
155
|
active: slideIndex === i
|
@@ -187,9 +158,8 @@ var Instructions = function Instructions(_ref) {
|
|
187
158
|
}));
|
188
159
|
}));
|
189
160
|
}, [instructionItems, dataAttrs, slideIndex, instructionItem, mobileInstructionItem, getActiveCustomClass, handleArticleClick, isMobileReversed]);
|
190
|
-
|
191
|
-
|
192
|
-
return /*#__PURE__*/_react["default"].createElement(_react2.Swiper, {
|
161
|
+
var renderSlider = React.useCallback(function () {
|
162
|
+
return /*#__PURE__*/React.createElement(_react2.Swiper, {
|
193
163
|
noSwiping: false,
|
194
164
|
onSwiper: getSwiperInstance,
|
195
165
|
noSwipingClass: swiperSlideCn,
|
@@ -197,12 +167,12 @@ var Instructions = function Instructions(_ref) {
|
|
197
167
|
className: cn('swiper')
|
198
168
|
}, instructionItems.map(function (_ref3, i) {
|
199
169
|
var mediaUrl = _ref3.mediaUrl,
|
200
|
-
|
201
|
-
|
202
|
-
return /*#__PURE__*/
|
170
|
+
isVideo = _ref3.isVideo,
|
171
|
+
imageAlt = _ref3.imageAlt;
|
172
|
+
return /*#__PURE__*/React.createElement(_react2.SwiperSlide, {
|
203
173
|
className: swiperSlideCn,
|
204
174
|
key: i + mediaUrl
|
205
|
-
}, isVideo ? renderVideo(mediaUrl, i) : /*#__PURE__*/
|
175
|
+
}, isVideo ? renderVideo(mediaUrl, i) : /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({
|
206
176
|
alt: imageAlt,
|
207
177
|
src: mediaUrl
|
208
178
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, i + 1), {
|
@@ -210,57 +180,51 @@ var Instructions = function Instructions(_ref) {
|
|
210
180
|
})));
|
211
181
|
}));
|
212
182
|
}, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image, handleSlideChange]);
|
213
|
-
|
214
|
-
|
215
|
-
return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
|
183
|
+
var renderTitle = React.useCallback(function (resolution) {
|
184
|
+
return /*#__PURE__*/React.createElement(_uiCore.Header, {
|
216
185
|
className: cn('title', {
|
217
186
|
resolution: resolution
|
218
187
|
}),
|
219
188
|
as: "h2"
|
220
189
|
}, (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig));
|
221
190
|
}, [title]);
|
222
|
-
|
223
|
-
|
224
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, instructionItems.map(function (_ref4, i) {
|
191
|
+
var renderQrCode = React.useCallback(function () {
|
192
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, instructionItems.map(function (_ref4, i) {
|
225
193
|
var qrCode = _ref4.qrCode,
|
226
|
-
|
227
|
-
return slideIndex === i && !!qrCode && /*#__PURE__*/
|
194
|
+
qrCodeText = _ref4.qrCodeText;
|
195
|
+
return slideIndex === i && !!qrCode && /*#__PURE__*/React.createElement(_uiCore.Tile, {
|
228
196
|
className: cn('qr-code'),
|
229
197
|
radius: "rounded",
|
230
198
|
shadowLevel: "default",
|
231
199
|
key: qrCode
|
232
|
-
}, !!qrCodeText && /*#__PURE__*/
|
200
|
+
}, !!qrCodeText && /*#__PURE__*/React.createElement("div", {
|
233
201
|
className: cn('qr-code-text')
|
234
|
-
}, qrCodeText), /*#__PURE__*/
|
202
|
+
}, qrCodeText), /*#__PURE__*/React.createElement("img", {
|
235
203
|
src: qrCode,
|
236
204
|
className: cn('qr-code-image'),
|
237
205
|
alt: "QR-\u043A\u043E\u0434"
|
238
206
|
}));
|
239
207
|
}));
|
240
208
|
}, [instructionItems, slideIndex]);
|
241
|
-
|
242
|
-
|
243
|
-
return /*#__PURE__*/_react["default"].createElement(_uiCore.Paragraph, {
|
209
|
+
var renderText = React.useCallback(function () {
|
210
|
+
return /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
|
244
211
|
className: cn('text', [additionalText]),
|
245
212
|
hasMargin: false
|
246
213
|
}, (0, _uiHelpers.convert)(text, _uiHelpers.textConvertConfig));
|
247
214
|
}, [text, additionalText]);
|
248
|
-
|
249
|
-
var renderPicture = _react["default"].useCallback(function () {
|
215
|
+
var renderPicture = React.useCallback(function () {
|
250
216
|
if (pictureMask === pictureMaskTypes.NONE) {
|
251
217
|
return renderSlider();
|
252
218
|
}
|
253
|
-
|
254
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
219
|
+
return /*#__PURE__*/React.createElement("div", {
|
255
220
|
className: cn('img-wrapper'),
|
256
221
|
"data-testid": "".concat(testIdPrefix, "-img-wrapper")
|
257
|
-
}, /*#__PURE__*/
|
222
|
+
}, /*#__PURE__*/React.createElement("div", {
|
258
223
|
className: cn('device-screen')
|
259
224
|
}), renderSlider());
|
260
225
|
}, [pictureMask, renderSlider]);
|
261
|
-
|
262
|
-
|
263
|
-
return /*#__PURE__*/_react["default"].createElement("ul", {
|
226
|
+
var renderDesktopArticles = React.useCallback(function () {
|
227
|
+
return /*#__PURE__*/React.createElement("ul", {
|
264
228
|
className: cn('articles-list', {
|
265
229
|
'text-after': !!text,
|
266
230
|
desktop: true
|
@@ -268,40 +232,38 @@ var Instructions = function Instructions(_ref) {
|
|
268
232
|
"data-testid": "".concat(testIdPrefix, "-articles-list-desktop")
|
269
233
|
}, instructionItems.map(function (_ref5, i) {
|
270
234
|
var itemTitle = _ref5.title;
|
271
|
-
return (
|
272
|
-
/*#__PURE__*/
|
235
|
+
return /*#__PURE__*/(
|
273
236
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
274
|
-
|
237
|
+
React.createElement("li", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
|
275
238
|
className: cn('articles-item', {
|
276
239
|
active: slideIndex === i
|
277
240
|
}, [getActiveCustomClass(i, slideIndex), instructionItem, desktopInstructionItem]),
|
278
241
|
"data-index": i,
|
279
242
|
onClick: handleArticleClick(i),
|
280
243
|
key: i
|
281
|
-
}), /*#__PURE__*/
|
244
|
+
}), /*#__PURE__*/React.createElement("div", {
|
282
245
|
className: cn('articles-item-dot')
|
283
|
-
}, /*#__PURE__*/
|
246
|
+
}, /*#__PURE__*/React.createElement("span", {
|
284
247
|
className: cn('articles-item-dot-number')
|
285
|
-
}, i + 1)), /*#__PURE__*/
|
248
|
+
}, i + 1)), /*#__PURE__*/React.createElement("div", {
|
286
249
|
className: cn('articles-item-title', [desktopItemTitle])
|
287
250
|
}, itemTitle))
|
288
251
|
);
|
289
252
|
}));
|
290
253
|
}, [desktopInstructionItem, desktopItemTitle, getActiveCustomClass, handleArticleClick, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, instructionItem, instructionItems, slideIndex, text]);
|
291
|
-
|
292
|
-
|
293
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
254
|
+
var renderMobileArticles = React.useCallback(function () {
|
255
|
+
return /*#__PURE__*/React.createElement("div", {
|
294
256
|
className: cn('articles-list', {
|
295
257
|
mobile: true
|
296
258
|
}),
|
297
259
|
"data-testid": "".concat(testIdPrefix, "-articles-list-mobile")
|
298
|
-
}, /*#__PURE__*/
|
260
|
+
}, /*#__PURE__*/React.createElement("div", {
|
299
261
|
className: cn('articles-title-block', {
|
300
262
|
reversed: isMobileReversed
|
301
263
|
})
|
302
264
|
}, instructionItems.map(function (_ref6, i) {
|
303
265
|
var itemTitle = _ref6.title;
|
304
|
-
return slideIndex === i && /*#__PURE__*/
|
266
|
+
return slideIndex === i && /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
305
267
|
key: i,
|
306
268
|
"data-index": i
|
307
269
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, i + 1), {
|
@@ -309,9 +271,8 @@ var Instructions = function Instructions(_ref) {
|
|
309
271
|
}), itemTitle);
|
310
272
|
})));
|
311
273
|
}, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.mobileItemText, instructionItems, mobileItemTitle, slideIndex, isMobileReversed]);
|
312
|
-
|
313
|
-
|
314
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_uiCore.NavArrow, {
|
274
|
+
var renderArrows = React.useCallback(function () {
|
275
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_uiCore.NavArrow, {
|
315
276
|
dataAttrs: {
|
316
277
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowPrev
|
317
278
|
},
|
@@ -321,7 +282,7 @@ var Instructions = function Instructions(_ref) {
|
|
321
282
|
theme: arrowsTheme,
|
322
283
|
disabled: slideIndex === 0,
|
323
284
|
onClick: handlePrevClick
|
324
|
-
}), /*#__PURE__*/
|
285
|
+
}), /*#__PURE__*/React.createElement(_uiCore.NavArrow, {
|
325
286
|
dataAttrs: {
|
326
287
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowNext
|
327
288
|
},
|
@@ -334,74 +295,30 @@ var Instructions = function Instructions(_ref) {
|
|
334
295
|
onClick: handleNextClick
|
335
296
|
}));
|
336
297
|
}, [handlePrevClick, handleNextClick, arrowsTheme, arrowPrev, arrowNext, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowPrev, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowNext, slideIndex, instructionItems.length]);
|
337
|
-
|
338
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
298
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
339
299
|
className: cn({
|
340
300
|
mask: pictureMask,
|
341
301
|
reversed: isMobileReversed
|
342
302
|
}),
|
343
303
|
ref: rootRef
|
344
|
-
}), /*#__PURE__*/
|
304
|
+
}), /*#__PURE__*/React.createElement(_uiCore.Grid, {
|
345
305
|
hAlign: "center"
|
346
|
-
}, /*#__PURE__*/
|
306
|
+
}, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
|
347
307
|
all: "12"
|
348
|
-
}, !!title && renderTitle('mobile'), /*#__PURE__*/
|
308
|
+
}, !!title && renderTitle('mobile'), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
349
309
|
className: cn('wrapper', {
|
350
310
|
'vertical-align': pictureVerticalAlign
|
351
311
|
})
|
352
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.wrapper)), /*#__PURE__*/
|
312
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.wrapper)), /*#__PURE__*/React.createElement("div", {
|
353
313
|
className: cn('picture', {
|
354
314
|
align: pictureAlign,
|
355
315
|
background: pictureBackgroundColor
|
356
316
|
}),
|
357
317
|
"data-testid": "".concat(testIdPrefix, "-picture")
|
358
|
-
}, isMobileReversed && renderMobileArticles(), renderPicture(), !!showArrows && renderArrows(), renderQrCode()), renderMobileDots(), /*#__PURE__*/
|
318
|
+
}, isMobileReversed && renderMobileArticles(), renderPicture(), !!showArrows && renderArrows(), renderQrCode()), renderMobileDots(), /*#__PURE__*/React.createElement("div", {
|
359
319
|
className: cn('articles', {
|
360
320
|
align: pictureAlign
|
361
321
|
})
|
362
322
|
}, !!title && renderTitle('desktop'), !isMobileReversed && renderMobileArticles(), renderDesktopArticles(), text && renderText(), children)))));
|
363
323
|
};
|
364
|
-
|
365
|
-
Instructions.propTypes = {
|
366
|
-
dataAttrs: _propTypes["default"].shape({
|
367
|
-
root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
368
|
-
item: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
369
|
-
image: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
370
|
-
mobileItemText: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
371
|
-
wrapper: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
372
|
-
arrowPrev: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
|
373
|
-
arrowNext: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
|
374
|
-
}),
|
375
|
-
rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
376
|
-
current: _propTypes["default"].elementType
|
377
|
-
}), _propTypes["default"].any])]),
|
378
|
-
classes: _propTypes["default"].shape({
|
379
|
-
instructionItem: _propTypes["default"].string,
|
380
|
-
desktopInstructionItem: _propTypes["default"].string,
|
381
|
-
mobileInstructionItem: _propTypes["default"].string,
|
382
|
-
activeInstructionItem: _propTypes["default"].string,
|
383
|
-
desktopItemTitle: _propTypes["default"].string,
|
384
|
-
mobileItemTitle: _propTypes["default"].string,
|
385
|
-
instructionItemImg: _propTypes["default"].string,
|
386
|
-
arrowPrev: _propTypes["default"].string,
|
387
|
-
arrowNext: _propTypes["default"].string
|
388
|
-
}),
|
389
|
-
title: _propTypes["default"].string,
|
390
|
-
additionalText: _propTypes["default"].string,
|
391
|
-
instructionItems: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
392
|
-
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node, _propTypes["default"].arrayOf(_propTypes["default"].node)]).isRequired,
|
393
|
-
mediaUrl: _propTypes["default"].string.isRequired,
|
394
|
-
isVideo: _propTypes["default"].bool.isRequired,
|
395
|
-
imageAlt: _propTypes["default"].string
|
396
|
-
}).isRequired).isRequired,
|
397
|
-
pictureAlign: _propTypes["default"].oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
|
398
|
-
pictureVerticalAlign: _propTypes["default"].oneOf([pictureVerticalAlignTypes.CENTER, pictureVerticalAlignTypes.TOP, pictureVerticalAlignTypes.UNSET]),
|
399
|
-
pictureMask: _propTypes["default"].oneOf([pictureMaskTypes.ANDROID, pictureMaskTypes.ANDROID_CROPPED, pictureMaskTypes.NEW_IPHONE, pictureMaskTypes.WHITE_IPHONE, pictureMaskTypes.BLACK_IPHONE, pictureMaskTypes.LAPTOP, pictureMaskTypes.LAPTOP_NEW, pictureMaskTypes.IPHONE_12, pictureMaskTypes.IPHONE_15, pictureMaskTypes.IPHONE_CROPPED, pictureMaskTypes.NONE]),
|
400
|
-
pictureBackgroundColor: _propTypes["default"].oneOf([pictureBackgroundColorTypes.SPB_SKY_0]),
|
401
|
-
showArrows: _propTypes["default"].bool,
|
402
|
-
arrowsTheme: _propTypes["default"].oneOf([arrowTheme.DARK, arrowTheme.PURPLE]),
|
403
|
-
elementOrder: _propTypes["default"].oneOf([elementOrderTypes.DEFAULT, elementOrderTypes.REVERSED]),
|
404
|
-
getSwiper: _propTypes["default"].func
|
405
|
-
};
|
406
|
-
var _default = Instructions;
|
407
|
-
exports["default"] = _default;
|
324
|
+
var _default = exports["default"] = Instructions;
|
@@ -0,0 +1 @@
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-notification-box{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-notification-box:not(:first-child){margin-top:24px}.mfui-notification-box__notification{max-width:740px}.mfui-notification-box_align_left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mfui-notification-box_align_center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { Notification } from '@megafon/ui-core';
|
3
|
-
import './
|
3
|
+
import './NotificationBox.scss';
|
4
4
|
export declare const Align: {
|
5
5
|
readonly LEFT: "left";
|
6
6
|
readonly CENTER: "center";
|
7
7
|
};
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
type AlignType = (typeof Align)[keyof typeof Align];
|
9
|
+
type NotificationProps = React.ComponentProps<typeof Notification>;
|
10
|
+
type NotificationBoxProps = Omit<NotificationProps, 'isColored'> & {
|
11
11
|
/** Горизонтальное выравнивание */
|
12
12
|
align?: AlignType;
|
13
13
|
};
|