@megafon/ui-shared 2.0.0-beta.238 → 2.0.0-beta.241
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 +41 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +4 -4
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +2 -2
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +5 -5
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/es/components/ButtonBanner/ButtonBanner.js +2 -2
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +1 -1
- package/dist/es/components/Card/Card.js +2 -1
- package/dist/es/components/CardsBox/CardsBox.js +3 -3
- package/dist/es/components/Container/Container.css +22 -0
- package/dist/es/components/Container/Container.js +2 -2
- package/dist/es/components/DownloadLinks/DownloadLink.js +1 -1
- package/dist/es/components/DownloadLinks/DownloadLinks.js +1 -1
- package/dist/es/components/Instructions/Instructions.d.ts +1 -1
- package/dist/es/components/Instructions/Instructions.js +57 -54
- package/dist/es/components/PageTitle/PageTitle.js +2 -2
- package/dist/es/components/Partners/Partners.js +4 -4
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +2 -2
- package/dist/es/components/Property/Property.js +4 -4
- package/dist/es/components/Property/PropertyDescription.js +1 -1
- package/dist/es/components/Steps/Steps.js +1 -1
- package/dist/es/components/Steps/StepsItem.js +1 -1
- package/dist/es/components/StoreBanner/StoreBanner.css +19 -2
- package/dist/es/components/StoreBanner/StoreBanner.js +1 -1
- package/dist/es/components/StoreButton/StoreButton.js +1 -1
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/Table/Table.js +3 -3
- package/dist/es/components/Table/TableRow.js +1 -0
- package/dist/es/components/TextBox/TextBox.js +2 -2
- package/dist/es/components/TextBox/TextBoxPicture.js +3 -2
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +1 -1
- package/dist/es/components/VideoBanner/VideoBanner.js +19 -15
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +2 -2
- package/dist/es/components/VideoBlock/VideoBlock.js +20 -16
- package/dist/lib/components/AccordionBox/AccordionBox.js +2 -2
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +6 -7
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +2 -2
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +6 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +2 -2
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +2 -2
- package/dist/lib/components/Card/Card.js +2 -1
- package/dist/lib/components/CardsBox/CardsBox.js +5 -5
- package/dist/lib/components/Container/Container.css +22 -0
- package/dist/lib/components/Container/Container.js +2 -2
- package/dist/lib/components/DownloadLinks/DownloadLink.js +2 -2
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +2 -2
- package/dist/lib/components/Instructions/Instructions.d.ts +1 -1
- package/dist/lib/components/Instructions/Instructions.js +61 -59
- package/dist/lib/components/PageTitle/PageTitle.js +3 -3
- package/dist/lib/components/Partners/Partners.js +5 -5
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +2 -2
- package/dist/lib/components/Property/Property.js +5 -5
- package/dist/lib/components/Property/PropertyDescription.js +2 -2
- package/dist/lib/components/Steps/Steps.js +2 -2
- package/dist/lib/components/Steps/StepsItem.js +2 -2
- package/dist/lib/components/StoreBanner/StoreBanner.css +19 -2
- package/dist/lib/components/StoreBanner/StoreBanner.js +2 -2
- package/dist/lib/components/StoreButton/StoreButton.js +2 -2
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/Table/Table.js +4 -4
- package/dist/lib/components/Table/TableRow.js +1 -0
- package/dist/lib/components/TextBox/TextBox.js +2 -2
- package/dist/lib/components/TextBox/TextBoxPicture.js +4 -3
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +2 -2
- package/dist/lib/components/VideoBanner/VideoBanner.js +21 -17
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +2 -2
- package/dist/lib/components/VideoBlock/VideoBlock.js +20 -16
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,47 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.0.0-beta.241](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@2.0.0-beta.240...@megafon/ui-shared@2.0.0-beta.241) (2021-11-29)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **ui-shared:** enable more eslint rules and fix problems ([063b874](https://github.com/MegafonWebLab/megafon-ui/commit/063b8747e2dfd3f883f07a04e177cbceef4cca2e))
|
12
|
+
* **ui-shared:** enable more eslint rules and fix problems ([4bde8f9](https://github.com/MegafonWebLab/megafon-ui/commit/4bde8f93be7a13efe912f22d659371a3e380e6f3))
|
13
|
+
* **ui-shared:** enable some eslint rules and fix problems ([73ea828](https://github.com/MegafonWebLab/megafon-ui/commit/73ea828ea060d5cfecb18fdd5d1498efa1e93fbd))
|
14
|
+
* **ui-shared:** fix children type ([0f04517](https://github.com/MegafonWebLab/megafon-ui/commit/0f04517deaa60ff05fd05eeb478d66e0a116b999))
|
15
|
+
* **ui-shared:** fixes after rebase ([c326ee8](https://github.com/MegafonWebLab/megafon-ui/commit/c326ee8c3ca2f47c6b3202d78c91e08b0e42914e))
|
16
|
+
* **ui-shared:** remove alt content; rename interface ([316e04a](https://github.com/MegafonWebLab/megafon-ui/commit/316e04a1a594ce61c7d198113f1fb6612cc7d913))
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
# [2.0.0-beta.240](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@2.0.0-beta.239...@megafon/ui-shared@2.0.0-beta.240) (2021-11-23)
|
23
|
+
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
* **instructions:** fix activeInstructionItem class ([4f4c611](https://github.com/MegafonWebLab/megafon-ui/commit/4f4c611d5fdb227f00c164cc2bcfae6f6eb91c5e))
|
28
|
+
|
29
|
+
|
30
|
+
### Features
|
31
|
+
|
32
|
+
* **container:** add new indents to child components ([02a4d5b](https://github.com/MegafonWebLab/megafon-ui/commit/02a4d5b819d7c0c653ab819df04c1f069a94c3b1))
|
33
|
+
* **storebanner:** fixed style and changed buttons image ([87b77a8](https://github.com/MegafonWebLab/megafon-ui/commit/87b77a8e5da178f8273287bd1be85ac7ccd8f0bd))
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
# [2.0.0-beta.239](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@2.0.0-beta.238...@megafon/ui-shared@2.0.0-beta.239) (2021-11-15)
|
40
|
+
|
41
|
+
**Note:** Version bump only for package @megafon/ui-shared
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
6
47
|
# [2.0.0-beta.238](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@2.0.0-beta.237...@megafon/ui-shared@2.0.0-beta.238) (2021-11-15)
|
7
48
|
|
8
49
|
|
@@ -15,9 +15,9 @@ var __rest = this && this.__rest || function (s, e) {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
import * as React from 'react';
|
18
|
-
import * as PropTypes from 'prop-types';
|
19
18
|
import { Grid, GridColumn, Accordion } from '@megafon/ui-core';
|
20
19
|
import { cnCreate } from '@megafon/ui-helpers';
|
20
|
+
import * as PropTypes from 'prop-types';
|
21
21
|
import "./AccordionBox.css";
|
22
22
|
var cn = cnCreate('mfui-beta-accordion-box');
|
23
23
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './style/BenefitsIcons.less';
|
3
2
|
import { IconPosition, IBenefit } from './types';
|
3
|
+
import './style/BenefitsIcons.less';
|
4
4
|
export interface IBenefitsIcons {
|
5
5
|
/** Ссылка на корневой элемент */
|
6
6
|
rootRef?: React.Ref<HTMLDivElement>;
|
@@ -3,14 +3,14 @@ import "core-js/modules/es.object.values";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
5
5
|
import * as React from 'react';
|
6
|
-
import PropTypes from 'prop-types';
|
7
|
-
import "./style/BenefitsIcons.css";
|
8
6
|
import { Grid, GridColumn } from '@megafon/ui-core';
|
9
7
|
import { cnCreate, breakpoints } from '@megafon/ui-helpers';
|
8
|
+
import throttle from 'lodash.throttle';
|
9
|
+
import PropTypes from 'prop-types';
|
10
|
+
import throttleTime from "../../constants/throttleTime";
|
10
11
|
import BenefitsIconsTile from "./BenefitsIconsTile";
|
11
12
|
import { IconPositionEnum, ItemsAlignEnum } from "./types";
|
12
|
-
import
|
13
|
-
import throttleTime from "../../constants/throttleTime"; // left-aligned column with left side icon,
|
13
|
+
import "./style/BenefitsIcons.css"; // left-aligned column with left side icon,
|
14
14
|
|
15
15
|
var getLeftSideConfig = function getLeftSideConfig(count, index) {
|
16
16
|
var everySecondWithoutOffset = index % 2 ? '1' : undefined;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './style/BenefitsIconsTile.less';
|
3
2
|
import { IBenefit, IconPosition } from './types';
|
3
|
+
import './style/BenefitsIconsTile.less';
|
4
4
|
export interface IBenefitsIconsTile extends IBenefit {
|
5
5
|
iconPosition?: IconPosition;
|
6
6
|
className?: string;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import "core-js/modules/es.object.values";
|
2
2
|
import * as React from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
|
-
import "./style/BenefitsIconsTile.css";
|
5
3
|
import { Header } from '@megafon/ui-core';
|
6
4
|
import { cnCreate } from '@megafon/ui-helpers';
|
5
|
+
import PropTypes from 'prop-types';
|
7
6
|
import { IconPositionEnum } from "./types";
|
7
|
+
import "./style/BenefitsIconsTile.css";
|
8
8
|
var cn = cnCreate('mfui-beta-benefits-icons-tile');
|
9
9
|
|
10
10
|
var BenefitsIconsTile = function BenefitsIconsTile(_ref) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import './BenfitsPictures.less';
|
3
2
|
import { IBenefit, GridGutterSize } from './types';
|
3
|
+
import './BenfitsPictures.less';
|
4
4
|
export interface IBenefitsPicturesProps {
|
5
5
|
/** Ссылка на корневой элемент */
|
6
6
|
rootRef?: React.Ref<HTMLDivElement>;
|
@@ -3,13 +3,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
4
4
|
import * as React from 'react';
|
5
5
|
import { useCallback } from 'react';
|
6
|
-
import PropTypes from 'prop-types';
|
7
|
-
import throttle from 'lodash.throttle';
|
8
|
-
import "./BenfitsPictures.css";
|
9
6
|
import { Grid, GridColumn, Header, Paragraph } from '@megafon/ui-core';
|
10
7
|
import { breakpoints, cnCreate } from '@megafon/ui-helpers';
|
11
8
|
import convert from 'htmr';
|
9
|
+
import throttle from 'lodash.throttle';
|
10
|
+
import PropTypes from 'prop-types';
|
12
11
|
import throttleTime from "../../constants/throttleTime";
|
12
|
+
import "./BenfitsPictures.css";
|
13
13
|
var ONLY_LEFT_ALIGN_ITEMS_COUNT = 3;
|
14
14
|
var columnSize = {
|
15
15
|
wide: '4',
|
@@ -139,7 +139,7 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
139
139
|
} else {
|
140
140
|
setCurrentGutter('large');
|
141
141
|
}
|
142
|
-
}, []);
|
142
|
+
}, [isLargeGutter]);
|
143
143
|
React.useEffect(function () {
|
144
144
|
var throttledResizeHandler = throttle(resizeHandler, throttleTime.resize);
|
145
145
|
resizeHandler();
|
@@ -147,7 +147,7 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
|
|
147
147
|
return function () {
|
148
148
|
return window.removeEventListener('resize', throttledResizeHandler);
|
149
149
|
};
|
150
|
-
}, []);
|
150
|
+
}, [resizeHandler]);
|
151
151
|
return /*#__PURE__*/React.createElement("div", {
|
152
152
|
className: cn([className, classes.root]),
|
153
153
|
ref: rootRef
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "core-js/modules/es.array.map";
|
2
2
|
import "core-js/modules/es.object.values";
|
3
3
|
import React from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import { TextLink } from '@megafon/ui-core';
|
6
5
|
import { cnCreate } from '@megafon/ui-helpers';
|
6
|
+
import PropTypes from 'prop-types';
|
7
7
|
import "./Breadcrumbs.css";
|
8
8
|
export var TextColor = {
|
9
9
|
BLACK: 'black',
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import "core-js/modules/es.object.values";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
3
|
import React from 'react';
|
4
|
-
import * as PropTypes from 'prop-types';
|
5
|
-
import "./ButtonBanner.css";
|
6
4
|
import { Button, Grid, GridColumn, Header } from '@megafon/ui-core';
|
7
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
6
|
+
import * as PropTypes from 'prop-types';
|
7
|
+
import "./ButtonBanner.css";
|
8
8
|
export var ButtonColor = {
|
9
9
|
GREEN: 'green',
|
10
10
|
PURPLE: 'purple'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "core-js/modules/es.string.link";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
3
|
import React from 'react';
|
4
|
-
import * as PropTypes from 'prop-types';
|
5
4
|
import { Button, TextLink } from '@megafon/ui-core';
|
6
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
6
|
+
import * as PropTypes from 'prop-types';
|
7
7
|
import "./ButtonLinkBox.css";
|
8
8
|
var cn = cnCreate('mfui-beta-button-link-box');
|
9
9
|
|
@@ -6,10 +6,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
6
|
var _SlidesSettings;
|
7
7
|
|
8
8
|
import * as React from 'react';
|
9
|
-
import * as PropTypes from 'prop-types';
|
10
|
-
import throttle from 'lodash.throttle';
|
11
9
|
import { Grid, GridColumn, Carousel } from '@megafon/ui-core';
|
12
10
|
import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
11
|
+
import throttle from 'lodash.throttle';
|
12
|
+
import * as PropTypes from 'prop-types';
|
13
13
|
import throttleTime from "../../constants/throttleTime";
|
14
14
|
var MAX_CARDS_COUNT_IN_GRID_ON_MOBILE = 2;
|
15
15
|
var SlidesSettings = (_SlidesSettings = {}, _defineProperty(_SlidesSettings, breakpoints.MOBILE_SMALL_START, {
|
@@ -50,7 +50,7 @@ var CardsBox = function CardsBox(_ref) {
|
|
50
50
|
slidesSettings: SlidesSettings,
|
51
51
|
onChange: onChange
|
52
52
|
}, children);
|
53
|
-
}, [children]);
|
53
|
+
}, [children, onChange]);
|
54
54
|
React.useEffect(function () {
|
55
55
|
var resizeHandler = function resizeHandler() {
|
56
56
|
return window.innerWidth <= breakpoints.MOBILE_BIG_END ? setIsMobile(true) : setIsMobile(false);
|
@@ -2104,19 +2104,41 @@ h5 {
|
|
2104
2104
|
margin-top: 40px;
|
2105
2105
|
}
|
2106
2106
|
}
|
2107
|
+
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-download-links {
|
2108
|
+
margin-top: 56px;
|
2109
|
+
}
|
2107
2110
|
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-text-box {
|
2108
2111
|
margin-top: 56px;
|
2109
2112
|
}
|
2110
2113
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
2114
|
+
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-download-links {
|
2115
|
+
margin-top: 48px;
|
2116
|
+
}
|
2111
2117
|
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-text-box {
|
2112
2118
|
margin-top: 48px;
|
2113
2119
|
}
|
2114
2120
|
}
|
2115
2121
|
@media screen and (max-width: 767px) {
|
2122
|
+
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-download-links {
|
2123
|
+
margin-top: 40px;
|
2124
|
+
}
|
2116
2125
|
.mfui-beta-container .mfui-beta-button-link-box + .mfui-beta-text-box {
|
2117
2126
|
margin-top: 40px;
|
2118
2127
|
}
|
2119
2128
|
}
|
2129
|
+
.mfui-beta-container .mfui-beta-download-links + .mfui-beta-text-box {
|
2130
|
+
margin-top: 56px;
|
2131
|
+
}
|
2132
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
2133
|
+
.mfui-beta-container .mfui-beta-download-links + .mfui-beta-text-box {
|
2134
|
+
margin-top: 48px;
|
2135
|
+
}
|
2136
|
+
}
|
2137
|
+
@media screen and (max-width: 767px) {
|
2138
|
+
.mfui-beta-container .mfui-beta-download-links + .mfui-beta-text-box {
|
2139
|
+
margin-top: 40px;
|
2140
|
+
}
|
2141
|
+
}
|
2120
2142
|
.mfui-beta-container .mfui-beta-text-box + .mfui-beta-benefits-icons {
|
2121
2143
|
margin-top: 56px;
|
2122
2144
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "core-js/modules/es.object.values";
|
2
2
|
import React from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
|
-
import "./Container.css";
|
5
3
|
import { ContentArea } from '@megafon/ui-core';
|
6
4
|
import { cnCreate } from '@megafon/ui-helpers';
|
5
|
+
import PropTypes from 'prop-types';
|
6
|
+
import "./Container.css";
|
7
7
|
export var BackgroundColors = {
|
8
8
|
DEFAULT: 'default',
|
9
9
|
LIGHT_GRAY: 'light-gray',
|
@@ -2,9 +2,9 @@ import "core-js/modules/es.array.concat";
|
|
2
2
|
import "core-js/modules/es.string.link";
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
4
4
|
import * as React from 'react';
|
5
|
-
import * as PropTypes from 'prop-types';
|
6
5
|
import { TextLink } from '@megafon/ui-core';
|
7
6
|
import { cnCreate } from '@megafon/ui-helpers';
|
7
|
+
import * as PropTypes from 'prop-types';
|
8
8
|
import "./DownloadLink.css";
|
9
9
|
|
10
10
|
var DownloadIcon = function DownloadIcon(props) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "core-js/modules/es.array.map";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
3
|
import * as React from 'react';
|
4
|
-
import * as PropTypes from 'prop-types';
|
5
4
|
import { Grid, GridColumn } from '@megafon/ui-core';
|
6
5
|
import { cnCreate } from '@megafon/ui-helpers';
|
6
|
+
import * as PropTypes from 'prop-types';
|
7
7
|
import "./DownloadLinks.css";
|
8
8
|
|
9
9
|
var getColumnConfig = function getColumnConfig(itemsCount) {
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
2
1
|
import "core-js/modules/es.array.map";
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
3
|
import React from 'react';
|
5
|
-
import PropTypes from 'prop-types';
|
6
|
-
import "./Instructions.css";
|
7
|
-
import convert from 'htmr';
|
8
|
-
import { Swiper, SwiperSlide } from 'swiper/react';
|
9
4
|
import { Grid, GridColumn, Header, Paragraph } from '@megafon/ui-core';
|
10
5
|
import { cnCreate } from '@megafon/ui-helpers';
|
6
|
+
import convert from 'htmr';
|
7
|
+
import PropTypes from 'prop-types';
|
8
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
9
|
+
import "./Instructions.css";
|
11
10
|
export var pictureAlignTypes = {
|
12
11
|
LEFT: 'left',
|
13
12
|
RIGHT: 'right'
|
@@ -58,45 +57,20 @@ var Instructions = function Instructions(_ref) {
|
|
58
57
|
var getSwiperInstance = React.useCallback(function (swiper) {
|
59
58
|
setSwiperInstance(swiper);
|
60
59
|
getSwiper && getSwiper(swiper);
|
61
|
-
}, []);
|
62
|
-
var
|
63
|
-
if (
|
64
|
-
return;
|
60
|
+
}, [getSwiper]);
|
61
|
+
var getActiveCustomClass = React.useCallback(function (articleIndex, activeIndex) {
|
62
|
+
if (articleIndex !== activeIndex) {
|
63
|
+
return undefined;
|
65
64
|
}
|
66
65
|
|
67
|
-
return
|
68
|
-
}, [
|
66
|
+
return activeInstructionItem;
|
67
|
+
}, [activeInstructionItem]);
|
69
68
|
var handleArticleClick = React.useCallback(function (ind) {
|
70
69
|
return function () {
|
71
70
|
setSlideIndex(ind);
|
72
71
|
swiperInstance && swiperInstance.slideTo(ind);
|
73
72
|
};
|
74
73
|
}, [swiperInstance]);
|
75
|
-
var renderTitle = React.useCallback(function (resolution) {
|
76
|
-
return /*#__PURE__*/React.createElement(Header, {
|
77
|
-
className: cn('title', {
|
78
|
-
resolution: resolution
|
79
|
-
}),
|
80
|
-
as: "h2"
|
81
|
-
}, title);
|
82
|
-
}, []);
|
83
|
-
var renderText = React.useCallback(function () {
|
84
|
-
return /*#__PURE__*/React.createElement(Paragraph, {
|
85
|
-
className: cn('text', [additionalText]),
|
86
|
-
hasMargin: false
|
87
|
-
}, convert(text));
|
88
|
-
}, [text, additionalText]);
|
89
|
-
var renderPicture = React.useCallback(function () {
|
90
|
-
if (pictureMask === pictureMaskTypes.NONE) {
|
91
|
-
return renderSlider();
|
92
|
-
}
|
93
|
-
|
94
|
-
return /*#__PURE__*/React.createElement("div", {
|
95
|
-
className: cn('img-wrapper')
|
96
|
-
}, /*#__PURE__*/React.createElement("div", {
|
97
|
-
className: cn('device-screen')
|
98
|
-
}), renderSlider());
|
99
|
-
}, [pictureMask]);
|
100
74
|
var renderVideo = React.useCallback(function (mediaUrl) {
|
101
75
|
return /*#__PURE__*/React.createElement("video", {
|
102
76
|
className: cn('swiper-img'),
|
@@ -126,7 +100,32 @@ var Instructions = function Instructions(_ref) {
|
|
126
100
|
alt: ""
|
127
101
|
}));
|
128
102
|
}));
|
129
|
-
}, [instructionItems]);
|
103
|
+
}, [getSwiperInstance, instructionItemImg, instructionItems, renderVideo]);
|
104
|
+
var renderTitle = React.useCallback(function (resolution) {
|
105
|
+
return /*#__PURE__*/React.createElement(Header, {
|
106
|
+
className: cn('title', {
|
107
|
+
resolution: resolution
|
108
|
+
}),
|
109
|
+
as: "h2"
|
110
|
+
}, title);
|
111
|
+
}, [title]);
|
112
|
+
var renderText = React.useCallback(function () {
|
113
|
+
return /*#__PURE__*/React.createElement(Paragraph, {
|
114
|
+
className: cn('text', [additionalText]),
|
115
|
+
hasMargin: false
|
116
|
+
}, convert(text));
|
117
|
+
}, [text, additionalText]);
|
118
|
+
var renderPicture = React.useCallback(function () {
|
119
|
+
if (pictureMask === pictureMaskTypes.NONE) {
|
120
|
+
return renderSlider();
|
121
|
+
}
|
122
|
+
|
123
|
+
return /*#__PURE__*/React.createElement("div", {
|
124
|
+
className: cn('img-wrapper')
|
125
|
+
}, /*#__PURE__*/React.createElement("div", {
|
126
|
+
className: cn('device-screen')
|
127
|
+
}), renderSlider());
|
128
|
+
}, [pictureMask, renderSlider]);
|
130
129
|
var renderDesktopArticles = React.useCallback(function () {
|
131
130
|
return /*#__PURE__*/React.createElement("ul", {
|
132
131
|
className: cn('articles-list', {
|
@@ -135,22 +134,26 @@ var Instructions = function Instructions(_ref) {
|
|
135
134
|
})
|
136
135
|
}, instructionItems.map(function (_ref3, ind) {
|
137
136
|
var itemTitle = _ref3.title;
|
138
|
-
return
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
137
|
+
return (
|
138
|
+
/*#__PURE__*/
|
139
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
140
|
+
React.createElement("li", {
|
141
|
+
className: cn('articles-item', {
|
142
|
+
active: slideIndex === ind
|
143
|
+
}, [getActiveCustomClass(ind, slideIndex), instructionItem, desktopInstructionItem]),
|
144
|
+
"data-index": ind,
|
145
|
+
onClick: handleArticleClick(ind),
|
146
|
+
key: ind
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
148
|
+
className: cn('articles-item-dot')
|
149
|
+
}, /*#__PURE__*/React.createElement("span", {
|
150
|
+
className: cn('articles-item-dot-number')
|
151
|
+
}, ind + 1)), /*#__PURE__*/React.createElement("div", {
|
152
|
+
className: cn('articles-item-title', [desktopItemTitle])
|
153
|
+
}, itemTitle))
|
154
|
+
);
|
152
155
|
}));
|
153
|
-
}, [
|
156
|
+
}, [desktopInstructionItem, desktopItemTitle, getActiveCustomClass, handleArticleClick, instructionItem, instructionItems, slideIndex, text]);
|
154
157
|
var renderMobileArticles = React.useCallback(function () {
|
155
158
|
return /*#__PURE__*/React.createElement("div", {
|
156
159
|
className: cn('articles-list', {
|
@@ -174,13 +177,13 @@ var Instructions = function Instructions(_ref) {
|
|
174
177
|
key: ind,
|
175
178
|
className: cn('articles-dot', {
|
176
179
|
active: slideIndex === ind
|
177
|
-
}, [
|
180
|
+
}, [getActiveCustomClass(ind, slideIndex), instructionItem, mobileInstructionItem]),
|
178
181
|
onClick: handleArticleClick(ind)
|
179
182
|
}, /*#__PURE__*/React.createElement("span", {
|
180
183
|
className: cn('articles-dot-number')
|
181
184
|
}, ind + 1));
|
182
185
|
})));
|
183
|
-
}, [instructionItems,
|
186
|
+
}, [getActiveCustomClass, handleArticleClick, instructionItem, instructionItems, mobileInstructionItem, mobileItemTitle, slideIndex, text]);
|
184
187
|
return /*#__PURE__*/React.createElement("div", {
|
185
188
|
className: cn({
|
186
189
|
mask: pictureMask
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { Header, Grid, GridColumn } from '@megafon/ui-core';
|
4
3
|
import { cnCreate } from '@megafon/ui-helpers';
|
4
|
+
import PropTypes from 'prop-types';
|
5
5
|
import "./PageTitle.css";
|
6
6
|
import Breadcrumbs from "../Breadcrumbs/Breadcrumbs";
|
7
7
|
var cn = cnCreate('mfui-beta-page-title');
|
@@ -28,7 +28,7 @@ var PageTitle = function PageTitle(_ref) {
|
|
28
28
|
}),
|
29
29
|
as: "h1"
|
30
30
|
}, title));
|
31
|
-
}, [
|
31
|
+
}, [badge, title, isBreadcrumbs]);
|
32
32
|
var renderPageTitleWithGrid = React.useCallback(function () {
|
33
33
|
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(GridColumn, {
|
34
34
|
wide: "8",
|
@@ -6,9 +6,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
6
|
var _slidesSettings;
|
7
7
|
|
8
8
|
import * as React from 'react';
|
9
|
-
import * as PropTypes from 'prop-types';
|
10
9
|
import { Grid, GridColumn, Tile, Carousel } from '@megafon/ui-core';
|
11
10
|
import { breakpoints, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
11
|
+
import * as PropTypes from 'prop-types';
|
12
12
|
import "./Partners.css";
|
13
13
|
var MAX_GRID_ITEMS_LENGTH = 8;
|
14
14
|
var slidesSettings = (_slidesSettings = {}, _defineProperty(_slidesSettings, breakpoints.MOBILE_SMALL_START, {
|
@@ -57,7 +57,7 @@ var Partners = function Partners(_ref) {
|
|
57
57
|
alt: alt,
|
58
58
|
className: cn('tile-img')
|
59
59
|
}))));
|
60
|
-
}, []);
|
60
|
+
}, [itemClass]);
|
61
61
|
var renderGrid = React.useCallback(function () {
|
62
62
|
return /*#__PURE__*/React.createElement(Grid, {
|
63
63
|
guttersLeft: "medium",
|
@@ -69,7 +69,7 @@ var Partners = function Partners(_ref) {
|
|
69
69
|
mobile: "6"
|
70
70
|
}, renderItem(item));
|
71
71
|
}));
|
72
|
-
}, [items]);
|
72
|
+
}, [items, renderItem]);
|
73
73
|
var renderCarousel = React.useCallback(function () {
|
74
74
|
var halfItemsLength = Math.ceil(items.length / 2);
|
75
75
|
var topRow = items.slice(0, halfItemsLength);
|
@@ -85,7 +85,7 @@ var Partners = function Partners(_ref) {
|
|
85
85
|
className: cn('slide')
|
86
86
|
}, renderItem(item), renderItem(bottomRow[i]));
|
87
87
|
}));
|
88
|
-
}, [items]);
|
88
|
+
}, [items, onChange, onNextClick, onPrevClick, renderItem]);
|
89
89
|
return /*#__PURE__*/React.createElement("div", _extends({
|
90
90
|
ref: rootRef,
|
91
91
|
className: cn([root, className])
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
+
import { Header } from '@megafon/ui-core';
|
3
|
+
import { cnCreate } from '@megafon/ui-helpers';
|
2
4
|
import PropTypes from 'prop-types';
|
3
5
|
import "./PictureWithDescription.css";
|
4
|
-
import { cnCreate } from '@megafon/ui-helpers';
|
5
|
-
import { Header } from '@megafon/ui-core';
|
6
6
|
export var pictureAlignTypes = {
|
7
7
|
LEFT: 'left',
|
8
8
|
RIGHT: 'right'
|
@@ -3,9 +3,9 @@ import "core-js/modules/es.symbol.description";
|
|
3
3
|
import "core-js/modules/es.array.map";
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
5
5
|
import React from 'react';
|
6
|
-
import PropTypes from 'prop-types';
|
7
6
|
import { Header, Grid, GridColumn } from '@megafon/ui-core';
|
8
7
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
8
|
+
import PropTypes from 'prop-types';
|
9
9
|
import "./Property.css";
|
10
10
|
import PropertyDescription from "./PropertyDescription";
|
11
11
|
var cn = cnCreate('mfui-beta-property');
|
@@ -29,14 +29,14 @@ var Property = function Property(_ref) {
|
|
29
29
|
var renderTitle = React.useCallback(function (title) {
|
30
30
|
return title && title.map(function (titleItem, i) {
|
31
31
|
return /*#__PURE__*/React.createElement(Header, {
|
32
|
-
as:
|
32
|
+
as: "h5",
|
33
33
|
key: i,
|
34
34
|
className: classes.title
|
35
35
|
}, icon && i === 0 && /*#__PURE__*/React.createElement("div", {
|
36
36
|
className: cn('icon')
|
37
37
|
}, icon), titleItem);
|
38
38
|
});
|
39
|
-
}, []);
|
39
|
+
}, [classes.title, icon]);
|
40
40
|
var renderDescription = React.useCallback(function (description) {
|
41
41
|
return description && description.map(function (_ref2, j) {
|
42
42
|
var value = _ref2.value,
|
@@ -53,7 +53,7 @@ var Property = function Property(_ref) {
|
|
53
53
|
}
|
54
54
|
}));
|
55
55
|
});
|
56
|
-
}, []);
|
56
|
+
}, [classes.openedDescription, classes.toggleDescription]);
|
57
57
|
var getColumnConfig = React.useCallback(function () {
|
58
58
|
return fullWidth ? {
|
59
59
|
all: '12'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
2
|
import * as React from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import { Collapse } from '@megafon/ui-core';
|
5
4
|
import { cnCreate } from '@megafon/ui-helpers';
|
5
|
+
import PropTypes from 'prop-types';
|
6
6
|
import "./PropertyDescription.css";
|
7
7
|
var cn = cnCreate('mfui-beta-property-description');
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.map";
|
2
2
|
import * as React from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import { Header } from '@megafon/ui-core';
|
5
4
|
import { cnCreate } from '@megafon/ui-helpers';
|
5
|
+
import PropTypes from 'prop-types';
|
6
6
|
import "./Steps.css";
|
7
7
|
var cn = cnCreate('mfui-beta-steps');
|
8
8
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { Paragraph } from '@megafon/ui-core';
|
4
3
|
import { cnCreate } from '@megafon/ui-helpers';
|
4
|
+
import PropTypes from 'prop-types';
|
5
5
|
import "./StepsItem.css";
|
6
6
|
var cn = cnCreate('mfui-beta-steps-item');
|
7
7
|
|
@@ -220,6 +220,9 @@ h5 {
|
|
220
220
|
-webkit-transform: translateX(-50%);
|
221
221
|
transform: translateX(-50%);
|
222
222
|
}
|
223
|
+
.mfui-beta-store-banner__button {
|
224
|
+
margin: 0 auto;
|
225
|
+
}
|
223
226
|
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__qr-code {
|
224
227
|
-o-object-fit: contain;
|
225
228
|
object-fit: contain;
|
@@ -262,8 +265,22 @@ h5 {
|
|
262
265
|
margin-right: 0;
|
263
266
|
}
|
264
267
|
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__store-link {
|
265
|
-
width:
|
266
|
-
height:
|
268
|
+
width: 136px;
|
269
|
+
height: 40px;
|
270
|
+
}
|
271
|
+
@media screen and (max-width: 1023px) {
|
272
|
+
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__store-link {
|
273
|
+
width: 119px;
|
274
|
+
height: 35px;
|
275
|
+
}
|
276
|
+
}
|
277
|
+
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__store-link:not(:last-child) {
|
278
|
+
margin-bottom: 8px;
|
279
|
+
}
|
280
|
+
@media screen and (max-width: 767px) {
|
281
|
+
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__store-link:not(:last-child) {
|
282
|
+
margin-bottom: 16px;
|
283
|
+
}
|
267
284
|
}
|
268
285
|
@media screen and (max-width: 1023px) {
|
269
286
|
.mfui-beta-store-banner__links_three .mfui-beta-store-banner__store-link:not(:first-child) {
|