@megafon/ui-core 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/es/components/Paragraph/Paragraph.css +2 -1
- package/dist/es/components/Paragraph/Paragraph.d.ts +2 -0
- package/dist/es/components/Paragraph/Paragraph.js +12 -4
- package/dist/lib/components/Paragraph/Paragraph.css +2 -1
- package/dist/lib/components/Paragraph/Paragraph.d.ts +2 -0
- package/dist/lib/components/Paragraph/Paragraph.js +12 -4
- 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.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.1...@megafon/ui-core@2.1.2) (2021-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **paragraph:** rollback deprecated color props clearWhite ([ee4e5a9](https://github.com/MegafonWebLab/megafon-ui/commit/ee4e5a9ce158a4df68e437d316e37ed6e87df664))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.1.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.0...@megafon/ui-core@2.1.1) (2021-12-13)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -17,6 +17,9 @@ var COLORS = {
|
|
|
17
17
|
FULL_BLACK: 'fullBlack',
|
|
18
18
|
INHERIT: 'inherit',
|
|
19
19
|
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
CLEAR_WHITE: 'clearWhite',
|
|
22
|
+
|
|
20
23
|
/** @deprecated */
|
|
21
24
|
FRESH_ASPHALT: 'freshAsphalt'
|
|
22
25
|
};
|
|
@@ -27,7 +30,7 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
27
30
|
size = _ref$size === void 0 ? 'regular' : _ref$size,
|
|
28
31
|
align = _ref.align,
|
|
29
32
|
_ref$color = _ref.color,
|
|
30
|
-
color = _ref$color === void 0 ? '
|
|
33
|
+
color = _ref$color === void 0 ? 'freshAsphalt' : _ref$color,
|
|
31
34
|
className = _ref.className,
|
|
32
35
|
_ref$hasMargin = _ref.hasMargin,
|
|
33
36
|
hasMargin = _ref$hasMargin === void 0 ? true : _ref$hasMargin,
|
|
@@ -47,15 +50,20 @@ Paragraph.propTypes = {
|
|
|
47
50
|
size: PropTypes.oneOf(['regular', 'small']),
|
|
48
51
|
hasMargin: PropTypes.bool,
|
|
49
52
|
color: function color(props, propName, componentName) {
|
|
50
|
-
var
|
|
53
|
+
var deprecatedBlackValue = COLORS.FRESH_ASPHALT;
|
|
54
|
+
var deprecatedWhiteValue = COLORS.CLEAR_WHITE;
|
|
51
55
|
var propValue = props[propName];
|
|
52
56
|
|
|
53
57
|
if (propValue && !Object.values(COLORS).includes(propValue)) {
|
|
54
58
|
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(COLORS), "]"));
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
if (propValue && props[propName] ===
|
|
58
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(
|
|
61
|
+
if (propValue && props[propName] === deprecatedBlackValue) {
|
|
62
|
+
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(COLORS.CONTENT, "'"));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (propValue && props[propName] === deprecatedWhiteValue) {
|
|
66
|
+
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(COLORS.BASE, "'"));
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
return null;
|
|
@@ -36,6 +36,9 @@ var COLORS = {
|
|
|
36
36
|
FULL_BLACK: 'fullBlack',
|
|
37
37
|
INHERIT: 'inherit',
|
|
38
38
|
|
|
39
|
+
/** @deprecated */
|
|
40
|
+
CLEAR_WHITE: 'clearWhite',
|
|
41
|
+
|
|
39
42
|
/** @deprecated */
|
|
40
43
|
FRESH_ASPHALT: 'freshAsphalt'
|
|
41
44
|
};
|
|
@@ -46,7 +49,7 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
46
49
|
size = _ref$size === void 0 ? 'regular' : _ref$size,
|
|
47
50
|
align = _ref.align,
|
|
48
51
|
_ref$color = _ref.color,
|
|
49
|
-
color = _ref$color === void 0 ? '
|
|
52
|
+
color = _ref$color === void 0 ? 'freshAsphalt' : _ref$color,
|
|
50
53
|
className = _ref.className,
|
|
51
54
|
_ref$hasMargin = _ref.hasMargin,
|
|
52
55
|
hasMargin = _ref$hasMargin === void 0 ? true : _ref$hasMargin,
|
|
@@ -66,15 +69,20 @@ Paragraph.propTypes = {
|
|
|
66
69
|
size: PropTypes.oneOf(['regular', 'small']),
|
|
67
70
|
hasMargin: PropTypes.bool,
|
|
68
71
|
color: function color(props, propName, componentName) {
|
|
69
|
-
var
|
|
72
|
+
var deprecatedBlackValue = COLORS.FRESH_ASPHALT;
|
|
73
|
+
var deprecatedWhiteValue = COLORS.CLEAR_WHITE;
|
|
70
74
|
var propValue = props[propName];
|
|
71
75
|
|
|
72
76
|
if (propValue && !Object.values(COLORS).includes(propValue)) {
|
|
73
77
|
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(COLORS), "]"));
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
if (propValue && props[propName] ===
|
|
77
|
-
return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(
|
|
80
|
+
if (propValue && props[propName] === deprecatedBlackValue) {
|
|
81
|
+
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(COLORS.CONTENT, "'"));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (propValue && props[propName] === deprecatedWhiteValue) {
|
|
85
|
+
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(COLORS.BASE, "'"));
|
|
78
86
|
}
|
|
79
87
|
|
|
80
88
|
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.2",
|
|
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": "fc16033b1b0f6975f9ffc1f436fcb6114d1e6fa1"
|
|
100
100
|
}
|