@megafon/ui-shared 4.20.2 → 4.20.4
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 +19 -0
- package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +0 -2
- package/dist/es/components/TextWithIcon/TextWithIconItem.js +2 -7
- package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +0 -2
- package/dist/lib/components/TextWithIcon/TextWithIconItem.js +2 -7
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,25 @@
|
|
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
|
+
## [4.20.4](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.20.3...@megafon/ui-shared@4.20.4) (2023-07-10)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **textwithicon:** remove deprecated prop centeringOnMobile ([0ed8416](https://github.com/MegafonWebLab/megafon-ui/commit/0ed8416443a3c7dfa11acca70538b69b791905e2))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [4.20.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.20.2...@megafon/ui-shared@4.20.3) (2023-06-22)
|
18
|
+
|
19
|
+
**Note:** Version bump only for package @megafon/ui-shared
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
6
25
|
## [4.20.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.20.1...@megafon/ui-shared@4.20.2) (2023-06-07)
|
7
26
|
|
8
27
|
**Note:** Version bump only for package @megafon/ui-shared
|
@@ -14,9 +14,7 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
|
|
14
14
|
text = _ref.text,
|
15
15
|
icon = _ref.icon,
|
16
16
|
rootRef = _ref.rootRef,
|
17
|
-
dataAttrs = _ref.dataAttrs
|
18
|
-
_ref$centeringOnMobil = _ref.centeringOnMobile,
|
19
|
-
centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil;
|
17
|
+
dataAttrs = _ref.dataAttrs;
|
20
18
|
var renderText = React.useMemo(function () {
|
21
19
|
if (Array.isArray(text)) {
|
22
20
|
return text.map(function (item) {
|
@@ -27,9 +25,7 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
|
|
27
25
|
return convert(text, textConvertConfig);
|
28
26
|
}, [text]);
|
29
27
|
return /*#__PURE__*/React.createElement("div", _extends({
|
30
|
-
className: cn(
|
31
|
-
'centering-on-mobile': centeringOnMobile
|
32
|
-
}, [className]),
|
28
|
+
className: cn([className]),
|
33
29
|
ref: rootRef
|
34
30
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
|
35
31
|
className: cn('svg-icon', [classes.icon])
|
@@ -47,7 +43,6 @@ TextWithIconItem.propTypes = {
|
|
47
43
|
dataAttrs: PropTypes.shape({
|
48
44
|
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
49
45
|
}),
|
50
|
-
centeringOnMobile: PropTypes.bool,
|
51
46
|
className: PropTypes.string
|
52
47
|
};
|
53
48
|
export default TextWithIconItem;
|
@@ -34,9 +34,7 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
|
|
34
34
|
text = _ref.text,
|
35
35
|
icon = _ref.icon,
|
36
36
|
rootRef = _ref.rootRef,
|
37
|
-
dataAttrs = _ref.dataAttrs
|
38
|
-
_ref$centeringOnMobil = _ref.centeringOnMobile,
|
39
|
-
centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil;
|
37
|
+
dataAttrs = _ref.dataAttrs;
|
40
38
|
var renderText = React.useMemo(function () {
|
41
39
|
if (Array.isArray(text)) {
|
42
40
|
return text.map(function (item) {
|
@@ -47,9 +45,7 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
|
|
47
45
|
return (0, _uiHelpers.convert)(text, _uiHelpers.textConvertConfig);
|
48
46
|
}, [text]);
|
49
47
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
50
|
-
className: cn(
|
51
|
-
'centering-on-mobile': centeringOnMobile
|
52
|
-
}, [className]),
|
48
|
+
className: cn([className]),
|
53
49
|
ref: rootRef
|
54
50
|
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
|
55
51
|
className: cn('svg-icon', [classes.icon])
|
@@ -67,7 +63,6 @@ TextWithIconItem.propTypes = {
|
|
67
63
|
dataAttrs: PropTypes.shape({
|
68
64
|
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
69
65
|
}),
|
70
|
-
centeringOnMobile: PropTypes.bool,
|
71
66
|
className: PropTypes.string
|
72
67
|
};
|
73
68
|
var _default = TextWithIconItem;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "4.20.
|
3
|
+
"version": "4.20.4",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"@babel/preset-env": "^7.8.6",
|
53
53
|
"@babel/preset-react": "^7.8.3",
|
54
54
|
"@babel/preset-typescript": "^7.8.3",
|
55
|
-
"@megafon/ui-icons": "^2.
|
55
|
+
"@megafon/ui-icons": "^2.12.0",
|
56
56
|
"@svgr/core": "^2.4.1",
|
57
57
|
"@testing-library/jest-dom": "5.16.2",
|
58
58
|
"@testing-library/react": "12.1.2",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
},
|
87
87
|
"dependencies": {
|
88
88
|
"@babel/runtime": "^7.8.4",
|
89
|
-
"@megafon/ui-core": "^
|
89
|
+
"@megafon/ui-core": "^5.0.1",
|
90
90
|
"@megafon/ui-helpers": "^2.5.0",
|
91
91
|
"core-js": "^3.6.4",
|
92
92
|
"htmr": "^0.9.2",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"prop-types": "^15.7.2",
|
95
95
|
"swiper": "^6.5.6"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "363663b39f257510b1ae1ee3c776d15d7f075a1f"
|
98
98
|
}
|