@megafon/ui-core 2.1.2 → 2.1.3
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 +11 -0
- package/dist/es/components/ContentArea/ContentArea.css +2 -0
- package/dist/es/components/ContentArea/ContentArea.d.ts +3 -1
- package/dist/es/components/ContentArea/ContentArea.js +13 -5
- package/dist/lib/components/ContentArea/ContentArea.css +2 -0
- package/dist/lib/components/ContentArea/ContentArea.d.ts +3 -1
- package/dist/lib/components/ContentArea/ContentArea.js +13 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.1.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.2...@megafon/ui-core@2.1.3) (2021-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **contentarea:** fix backgroundColor and innerBackgroundColor props values ([d6004a4](https://github.com/MegafonWebLab/megafon-ui/commit/d6004a493b623cced4c453d69b0fd16d3cfbef43))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.1.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.1...@megafon/ui-core@2.1.2) (2021-12-14)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -5,6 +5,7 @@ h4,
|
|
|
5
5
|
h5 {
|
|
6
6
|
margin: 0;
|
|
7
7
|
}
|
|
8
|
+
.mfui-content-area_color_base,
|
|
8
9
|
.mfui-content-area_color_white {
|
|
9
10
|
background-color: #FFFFFF;
|
|
10
11
|
}
|
|
@@ -81,6 +82,7 @@ h5 {
|
|
|
81
82
|
padding-right: 0;
|
|
82
83
|
padding-left: 0;
|
|
83
84
|
}
|
|
85
|
+
.mfui-content-area__inner_color_base,
|
|
84
86
|
.mfui-content-area__inner_color_white {
|
|
85
87
|
background-color: #FFFFFF;
|
|
86
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import './ContentArea.less';
|
|
3
3
|
declare const BACKGROUND_COLORS: {
|
|
4
|
-
readonly
|
|
4
|
+
readonly BASE: "base";
|
|
5
5
|
readonly TRANSPARENT: "transparent";
|
|
6
6
|
readonly GREEN: "green";
|
|
7
7
|
readonly PURPLE: "purple";
|
|
@@ -11,6 +11,8 @@ declare const BACKGROUND_COLORS: {
|
|
|
11
11
|
readonly CONTENT: "content";
|
|
12
12
|
readonly FULL_BLACK: "fullBlack";
|
|
13
13
|
/** @deprecated */
|
|
14
|
+
readonly WHITE: "white";
|
|
15
|
+
/** @deprecated */
|
|
14
16
|
readonly FRESH_ASPHALT: "freshAsphalt";
|
|
15
17
|
};
|
|
16
18
|
export declare type BackgroundColorType = typeof BACKGROUND_COLORS[keyof typeof BACKGROUND_COLORS];
|
|
@@ -7,7 +7,7 @@ import { cnCreate } from '@megafon/ui-helpers';
|
|
|
7
7
|
import * as PropTypes from 'prop-types';
|
|
8
8
|
import "./ContentArea.css";
|
|
9
9
|
var BACKGROUND_COLORS = {
|
|
10
|
-
|
|
10
|
+
BASE: 'base',
|
|
11
11
|
TRANSPARENT: 'transparent',
|
|
12
12
|
GREEN: 'green',
|
|
13
13
|
PURPLE: 'purple',
|
|
@@ -17,6 +17,9 @@ var BACKGROUND_COLORS = {
|
|
|
17
17
|
CONTENT: 'content',
|
|
18
18
|
FULL_BLACK: 'fullBlack',
|
|
19
19
|
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
WHITE: 'white',
|
|
22
|
+
|
|
20
23
|
/** @deprecated */
|
|
21
24
|
FRESH_ASPHALT: 'freshAsphalt'
|
|
22
25
|
};
|
|
@@ -48,15 +51,20 @@ var ContentArea = function ContentArea(_ref) {
|
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
var colorsCustomPropTypes = function colorsCustomPropTypes(props, propName, componentName) {
|
|
51
|
-
var
|
|
54
|
+
var deprecatedBlackValue = BACKGROUND_COLORS.FRESH_ASPHALT;
|
|
55
|
+
var deprecatedWhiteValue = BACKGROUND_COLORS.WHITE;
|
|
52
56
|
var propValue = props[propName];
|
|
53
57
|
|
|
54
58
|
if (propValue && !Object.values(BACKGROUND_COLORS).includes(propValue)) {
|
|
55
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "'
|
|
59
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n expected one of [").concat(Object.values(BACKGROUND_COLORS), "]"));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (propValue && propValue === deprecatedBlackValue) {
|
|
63
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedBlackValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.CONTENT, "'"));
|
|
56
64
|
}
|
|
57
65
|
|
|
58
|
-
if (propValue && propValue ===
|
|
59
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(
|
|
66
|
+
if (propValue && propValue === deprecatedWhiteValue) {
|
|
67
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedWhiteValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.BASE, "'"));
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
return null;
|
|
@@ -5,6 +5,7 @@ h4,
|
|
|
5
5
|
h5 {
|
|
6
6
|
margin: 0;
|
|
7
7
|
}
|
|
8
|
+
.mfui-content-area_color_base,
|
|
8
9
|
.mfui-content-area_color_white {
|
|
9
10
|
background-color: #FFFFFF;
|
|
10
11
|
}
|
|
@@ -81,6 +82,7 @@ h5 {
|
|
|
81
82
|
padding-right: 0;
|
|
82
83
|
padding-left: 0;
|
|
83
84
|
}
|
|
85
|
+
.mfui-content-area__inner_color_base,
|
|
84
86
|
.mfui-content-area__inner_color_white {
|
|
85
87
|
background-color: #FFFFFF;
|
|
86
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import './ContentArea.less';
|
|
3
3
|
declare const BACKGROUND_COLORS: {
|
|
4
|
-
readonly
|
|
4
|
+
readonly BASE: "base";
|
|
5
5
|
readonly TRANSPARENT: "transparent";
|
|
6
6
|
readonly GREEN: "green";
|
|
7
7
|
readonly PURPLE: "purple";
|
|
@@ -11,6 +11,8 @@ declare const BACKGROUND_COLORS: {
|
|
|
11
11
|
readonly CONTENT: "content";
|
|
12
12
|
readonly FULL_BLACK: "fullBlack";
|
|
13
13
|
/** @deprecated */
|
|
14
|
+
readonly WHITE: "white";
|
|
15
|
+
/** @deprecated */
|
|
14
16
|
readonly FRESH_ASPHALT: "freshAsphalt";
|
|
15
17
|
};
|
|
16
18
|
export declare type BackgroundColorType = typeof BACKGROUND_COLORS[keyof typeof BACKGROUND_COLORS];
|
|
@@ -26,7 +26,7 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
28
|
var BACKGROUND_COLORS = {
|
|
29
|
-
|
|
29
|
+
BASE: 'base',
|
|
30
30
|
TRANSPARENT: 'transparent',
|
|
31
31
|
GREEN: 'green',
|
|
32
32
|
PURPLE: 'purple',
|
|
@@ -36,6 +36,9 @@ var BACKGROUND_COLORS = {
|
|
|
36
36
|
CONTENT: 'content',
|
|
37
37
|
FULL_BLACK: 'fullBlack',
|
|
38
38
|
|
|
39
|
+
/** @deprecated */
|
|
40
|
+
WHITE: 'white',
|
|
41
|
+
|
|
39
42
|
/** @deprecated */
|
|
40
43
|
FRESH_ASPHALT: 'freshAsphalt'
|
|
41
44
|
};
|
|
@@ -67,15 +70,20 @@ var ContentArea = function ContentArea(_ref) {
|
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
var colorsCustomPropTypes = function colorsCustomPropTypes(props, propName, componentName) {
|
|
70
|
-
var
|
|
73
|
+
var deprecatedBlackValue = BACKGROUND_COLORS.FRESH_ASPHALT;
|
|
74
|
+
var deprecatedWhiteValue = BACKGROUND_COLORS.WHITE;
|
|
71
75
|
var propValue = props[propName];
|
|
72
76
|
|
|
73
77
|
if (propValue && !Object.values(BACKGROUND_COLORS).includes(propValue)) {
|
|
74
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "'
|
|
78
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n expected one of [").concat(Object.values(BACKGROUND_COLORS), "]"));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (propValue && propValue === deprecatedBlackValue) {
|
|
82
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedBlackValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.CONTENT, "'"));
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
if (propValue && propValue ===
|
|
78
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(
|
|
85
|
+
if (propValue && propValue === deprecatedWhiteValue) {
|
|
86
|
+
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedWhiteValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.BASE, "'"));
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"react-popper": "^2.2.3",
|
|
97
97
|
"swiper": "^6.5.6"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "884922566102445160ff8cbc20f6d54142b621e5"
|
|
100
100
|
}
|