@megafon/ui-shared 2.0.0-beta.224 → 2.0.0-beta.228
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 +47 -0
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +2 -2
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -1
- package/dist/es/components/ButtonBanner/ButtonBanner.css +6 -6
- package/dist/es/components/Card/Card.css +16 -12
- package/dist/es/components/Card/Card.d.ts +2 -2
- package/dist/es/components/Card/Card.js +4 -5
- package/dist/es/components/Container/Container.css +16 -16
- package/dist/es/components/Instructions/Instructions.css +26 -26
- package/dist/es/components/PageTitle/PageTitle.css +1 -1
- package/dist/es/components/Partners/Partners.css +2 -2
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +2 -2
- package/dist/es/components/Property/Property.css +12 -12
- package/dist/es/components/Property/PropertyDescription.css +1 -1
- package/dist/es/components/Steps/Steps.css +2 -2
- package/dist/es/components/Steps/StepsItem.css +3 -3
- package/dist/es/components/StoreBanner/StoreBanner.css +9 -9
- package/dist/es/components/StoreButton/StoreButton.css +2 -2
- package/dist/es/components/Table/Table.css +48 -48
- package/dist/es/components/TextBox/TextBoxPicture.css +23 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +31 -0
- package/dist/es/components/VideoBanner/VideoBanner.css +8 -8
- package/dist/es/components/VideoBlock/VideoBlock.css +3 -3
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +1 -0
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +2 -2
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -1
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +6 -6
- package/dist/lib/components/Card/Card.css +16 -12
- package/dist/lib/components/Card/Card.d.ts +2 -2
- package/dist/lib/components/Card/Card.js +3 -4
- package/dist/lib/components/Container/Container.css +16 -16
- package/dist/lib/components/Instructions/Instructions.css +26 -26
- package/dist/lib/components/PageTitle/PageTitle.css +1 -1
- package/dist/lib/components/Partners/Partners.css +2 -2
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +2 -2
- package/dist/lib/components/Property/Property.css +12 -12
- package/dist/lib/components/Property/PropertyDescription.css +1 -1
- package/dist/lib/components/Steps/Steps.css +2 -2
- package/dist/lib/components/Steps/StepsItem.css +3 -3
- package/dist/lib/components/StoreBanner/StoreBanner.css +9 -9
- package/dist/lib/components/StoreButton/StoreButton.css +2 -2
- package/dist/lib/components/Table/Table.css +48 -48
- package/dist/lib/components/TextBox/TextBoxPicture.css +23 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +48 -0
- package/dist/lib/components/VideoBanner/VideoBanner.css +8 -8
- package/dist/lib/components/VideoBlock/VideoBlock.css +3 -3
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +8 -0
- package/package.json +9 -12
@@ -0,0 +1,23 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-beta-text-box-picture_margin_default {
|
9
|
+
margin: 16px 0;
|
10
|
+
}
|
11
|
+
.mfui-beta-text-box-picture_margin_big-top {
|
12
|
+
margin: 24px 0 16px;
|
13
|
+
}
|
14
|
+
.mfui-beta-text-box-picture_margin_big-bottom {
|
15
|
+
margin: 16px 0 24px;
|
16
|
+
}
|
17
|
+
.mfui-beta-text-box-picture_margin_big-vertical {
|
18
|
+
margin: 24px 0;
|
19
|
+
}
|
20
|
+
.mfui-beta-text-box-picture__img {
|
21
|
+
width: 100%;
|
22
|
+
height: 100%;
|
23
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import './TextBoxPicture.less';
|
3
|
+
export declare const pictureMarginTypes: {
|
4
|
+
readonly DEFAULT: "default";
|
5
|
+
readonly BIG_TOP: "big-top";
|
6
|
+
readonly BIG_BOTTOM: "big-bottom";
|
7
|
+
readonly BIG_VERTICAL: "big-vertical";
|
8
|
+
};
|
9
|
+
declare type PictureMarginTypesType = typeof pictureMarginTypes[keyof typeof pictureMarginTypes];
|
10
|
+
export interface ITextBoxPictureProps {
|
11
|
+
/** URL картинки */
|
12
|
+
url: string;
|
13
|
+
/** Значение вертикальных отступов */
|
14
|
+
margin?: PictureMarginTypesType;
|
15
|
+
}
|
16
|
+
declare const TextBoxPicture: React.FC<ITextBoxPictureProps>;
|
17
|
+
export default TextBoxPicture;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = exports.pictureMarginTypes = void 0;
|
9
|
+
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
13
|
+
|
14
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
15
|
+
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
17
|
+
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
19
|
+
|
20
|
+
var pictureMarginTypes = {
|
21
|
+
DEFAULT: 'default',
|
22
|
+
BIG_TOP: 'big-top',
|
23
|
+
BIG_BOTTOM: 'big-bottom',
|
24
|
+
BIG_VERTICAL: 'big-vertical'
|
25
|
+
};
|
26
|
+
exports.pictureMarginTypes = pictureMarginTypes;
|
27
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-beta-text-box-picture');
|
28
|
+
|
29
|
+
var TextBoxPicture = function TextBoxPicture(_ref) {
|
30
|
+
var url = _ref.url,
|
31
|
+
_ref$margin = _ref.margin,
|
32
|
+
margin = _ref$margin === void 0 ? pictureMarginTypes.DEFAULT : _ref$margin;
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
34
|
+
className: cn({
|
35
|
+
margin: margin
|
36
|
+
})
|
37
|
+
}, /*#__PURE__*/React.createElement("img", {
|
38
|
+
className: cn('img'),
|
39
|
+
src: url
|
40
|
+
}));
|
41
|
+
};
|
42
|
+
|
43
|
+
TextBoxPicture.propTypes = {
|
44
|
+
url: PropTypes.string.isRequired,
|
45
|
+
margin: PropTypes.oneOf([pictureMarginTypes.DEFAULT, pictureMarginTypes.BIG_TOP, pictureMarginTypes.BIG_BOTTOM, pictureMarginTypes.BIG_VERTICAL])
|
46
|
+
};
|
47
|
+
var _default = TextBoxPicture;
|
48
|
+
exports["default"] = _default;
|
@@ -11,26 +11,26 @@ h5 {
|
|
11
11
|
}
|
12
12
|
@media screen and (min-width: 1280px) {
|
13
13
|
.mfui-beta-video-banner {
|
14
|
-
margin-left: -80px;
|
15
14
|
margin-right: -80px;
|
15
|
+
margin-left: -80px;
|
16
16
|
}
|
17
17
|
}
|
18
18
|
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
19
19
|
.mfui-beta-video-banner {
|
20
|
-
margin-left: -64px;
|
21
20
|
margin-right: -64px;
|
21
|
+
margin-left: -64px;
|
22
22
|
}
|
23
23
|
}
|
24
24
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
25
25
|
.mfui-beta-video-banner {
|
26
|
-
margin-left: -48px;
|
27
26
|
margin-right: -48px;
|
27
|
+
margin-left: -48px;
|
28
28
|
}
|
29
29
|
}
|
30
30
|
@media screen and (max-width: 767px) {
|
31
31
|
.mfui-beta-video-banner {
|
32
|
-
margin-left: -16px;
|
33
32
|
margin-right: -16px;
|
33
|
+
margin-left: -16px;
|
34
34
|
}
|
35
35
|
}
|
36
36
|
.mfui-beta-video-banner__wrapper {
|
@@ -76,17 +76,17 @@ h5 {
|
|
76
76
|
.mfui-beta-video-banner__background-image,
|
77
77
|
.mfui-beta-video-banner__video {
|
78
78
|
position: absolute;
|
79
|
-
left: 50%;
|
80
79
|
top: 50%;
|
80
|
+
left: 50%;
|
81
81
|
-webkit-transform: translate(-50%, -50%);
|
82
82
|
transform: translate(-50%, -50%);
|
83
83
|
}
|
84
84
|
.mfui-beta-video-banner__background-image {
|
85
85
|
width: 100%;
|
86
86
|
height: 100%;
|
87
|
+
background-repeat: no-repeat;
|
87
88
|
background-position: center;
|
88
89
|
background-size: cover;
|
89
|
-
background-repeat: no-repeat;
|
90
90
|
}
|
91
91
|
.mfui-beta-video-banner__content {
|
92
92
|
position: relative;
|
@@ -160,14 +160,14 @@ h5 {
|
|
160
160
|
display: -webkit-box;
|
161
161
|
display: -ms-flexbox;
|
162
162
|
display: flex;
|
163
|
+
-ms-flex-wrap: wrap;
|
164
|
+
flex-wrap: wrap;
|
163
165
|
-webkit-box-align: center;
|
164
166
|
-ms-flex-align: center;
|
165
167
|
align-items: center;
|
166
168
|
-webkit-box-pack: start;
|
167
169
|
-ms-flex-pack: start;
|
168
170
|
justify-content: flex-start;
|
169
|
-
-ms-flex-wrap: wrap;
|
170
|
-
flex-wrap: wrap;
|
171
171
|
margin: -24px -10px 0;
|
172
172
|
}
|
173
173
|
@media screen and (max-width: 767px) {
|
@@ -21,10 +21,10 @@ h5 {
|
|
21
21
|
-webkit-box-direction: normal;
|
22
22
|
-ms-flex-direction: column;
|
23
23
|
flex-direction: column;
|
24
|
-
height: 100%;
|
25
24
|
-webkit-box-pack: center;
|
26
25
|
-ms-flex-pack: center;
|
27
26
|
justify-content: center;
|
27
|
+
height: 100%;
|
28
28
|
}
|
29
29
|
@media screen and (max-width: 767px) {
|
30
30
|
.mfui-beta-video-block__content {
|
@@ -38,8 +38,8 @@ h5 {
|
|
38
38
|
}
|
39
39
|
@media screen and (min-width: 768px) {
|
40
40
|
.mfui-beta-video-block__content {
|
41
|
-
padding-right: 20px;
|
42
41
|
margin-right: 20px;
|
42
|
+
padding-right: 20px;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
.mfui-beta-video-block__header {
|
@@ -54,8 +54,8 @@ h5 {
|
|
54
54
|
margin-top: 24px;
|
55
55
|
}
|
56
56
|
.mfui-beta-video-block__button {
|
57
|
-
margin-top: 32px;
|
58
57
|
width: 171px;
|
58
|
+
margin-top: 32px;
|
59
59
|
}
|
60
60
|
@media screen and (max-width: 767px) {
|
61
61
|
.mfui-beta-video-block__button {
|
package/dist/lib/index.d.ts
CHANGED
@@ -28,6 +28,7 @@ export { default as TableCell } from './components/Table/TableCell';
|
|
28
28
|
export { default as TableRow } from './components/Table/TableRow';
|
29
29
|
export { default as TabsBox } from './components/TabsBox/TabsBox';
|
30
30
|
export { default as TextBox } from './components/TextBox/TextBox';
|
31
|
+
export { default as TextBoxPicture } from './components/TextBox/TextBoxPicture';
|
31
32
|
export { default as TitleDescriptionBox } from './components/TitleDescriptionBox/TitleDescriptionBox';
|
32
33
|
export { default as VideoBanner } from './components/VideoBanner/VideoBanner';
|
33
34
|
export { default as VideoBlock } from './components/VideoBlock/VideoBlock';
|
package/dist/lib/index.js
CHANGED
@@ -183,6 +183,12 @@ Object.defineProperty(exports, "TextBox", {
|
|
183
183
|
return _TextBox["default"];
|
184
184
|
}
|
185
185
|
});
|
186
|
+
Object.defineProperty(exports, "TextBoxPicture", {
|
187
|
+
enumerable: true,
|
188
|
+
get: function get() {
|
189
|
+
return _TextBoxPicture["default"];
|
190
|
+
}
|
191
|
+
});
|
186
192
|
Object.defineProperty(exports, "TitleDescriptionBox", {
|
187
193
|
enumerable: true,
|
188
194
|
get: function get() {
|
@@ -262,6 +268,8 @@ var _TabsBox = _interopRequireDefault(require("./components/TabsBox/TabsBox"));
|
|
262
268
|
|
263
269
|
var _TextBox = _interopRequireDefault(require("./components/TextBox/TextBox"));
|
264
270
|
|
271
|
+
var _TextBoxPicture = _interopRequireDefault(require("./components/TextBox/TextBoxPicture"));
|
272
|
+
|
265
273
|
var _TitleDescriptionBox = _interopRequireDefault(require("./components/TitleDescriptionBox/TitleDescriptionBox"));
|
266
274
|
|
267
275
|
var _VideoBanner = _interopRequireDefault(require("./components/VideoBanner/VideoBanner"));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.228",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -23,8 +23,8 @@
|
|
23
23
|
"coverage:unit": "jest --ci --collectCoverage --coverageDirectory=coverage",
|
24
24
|
"typecheck": "tsc --noEmit -p .",
|
25
25
|
"lint": "yarn lint:ts && yarn lint:less",
|
26
|
-
"lint:less": "stylelint --syntax less src/**/*.less src/**/**/*.less",
|
27
26
|
"lint:ts": "tslint -c tslint.json '{src,scripts}/**/*.ts?(x)'",
|
27
|
+
"lint:less": "stylelint --syntax less src/**/*.less src/**/**/*.less",
|
28
28
|
"test": "yarn test:unit",
|
29
29
|
"test:unit": "jest",
|
30
30
|
"test:update": "jest --updateSnapshot"
|
@@ -33,8 +33,8 @@
|
|
33
33
|
"access": "public"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
|
-
"react": ">=16.
|
37
|
-
"react-dom": ">=16.
|
36
|
+
"react": ">=16.13.0",
|
37
|
+
"react-dom": ">=16.13.0"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@babel/core": "^7.8.6",
|
@@ -43,13 +43,14 @@
|
|
43
43
|
"@babel/preset-env": "^7.8.6",
|
44
44
|
"@babel/preset-react": "^7.8.3",
|
45
45
|
"@babel/preset-typescript": "^7.8.3",
|
46
|
+
"@megafon/ui-icons": "^0.0.2-beta.3",
|
47
|
+
"@svgr/core": "^2.4.1",
|
46
48
|
"@types/enzyme": "^3.10.5",
|
47
49
|
"@types/enzyme-adapter-react-16": "^1.0.6",
|
48
50
|
"@types/jest": "^25.1.3",
|
49
51
|
"@types/prop-types": "^15.7.3",
|
50
52
|
"@types/react": "^16.9.23",
|
51
53
|
"@types/react-dom": "^16.9.5",
|
52
|
-
"@types/webpack-env": "^1.15.1",
|
53
54
|
"babel-plugin-module-resolver": "^3.2.0",
|
54
55
|
"del": "^3.0.0",
|
55
56
|
"enzyme": "^3.11.0",
|
@@ -70,21 +71,17 @@
|
|
70
71
|
"through2": "^2.0.5",
|
71
72
|
"tslint": "^5.20.1",
|
72
73
|
"tslint-react": "^3.6.0",
|
73
|
-
"typescript": "^3.8.3"
|
74
|
-
"webpack-filter-warnings-plugin": "^1.2.1"
|
74
|
+
"typescript": "^3.8.3"
|
75
75
|
},
|
76
76
|
"dependencies": {
|
77
77
|
"@babel/runtime": "^7.8.4",
|
78
|
-
"@megafon/ui-core": "^2.0.0-beta.
|
78
|
+
"@megafon/ui-core": "^2.0.0-beta.159",
|
79
79
|
"@megafon/ui-helpers": "^1.0.0-beta.0",
|
80
|
-
"@megafon/ui-icons": "^0.0.2-beta.1",
|
81
80
|
"core-js": "^3.6.4",
|
82
|
-
"deep-equal": "^1.1.1",
|
83
81
|
"htmr": "^0.9.2",
|
84
82
|
"lodash.throttle": "^4.1.1",
|
85
83
|
"prop-types": "^15.7.2",
|
86
|
-
"react-input-mask": "^2.0.4",
|
87
84
|
"swiper": "^6.5.6"
|
88
85
|
},
|
89
|
-
"gitHead": "
|
86
|
+
"gitHead": "8a04b2f928c7239725d4296bd60b14aabeb2cc4a"
|
90
87
|
}
|