@megafon/ui-core 4.11.2 → 4.11.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 +8 -0
- package/dist/es/components/Notification/Notification.d.ts +3 -2
- package/dist/es/components/Notification/Notification.js +6 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +7 -2
- package/dist/lib/components/Notification/Notification.d.ts +3 -2
- package/dist/lib/components/Notification/Notification.js +6 -3
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +7 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.11.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.11.2...@megafon/ui-core@4.11.3) (2023-01-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @megafon/ui-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.11.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.11.1...@megafon/ui-core@4.11.2) (2023-01-23)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Notification.less';
|
|
3
|
-
|
|
3
|
+
declare const NotificationTypes: {
|
|
4
4
|
readonly SUCCESS: "success";
|
|
5
5
|
readonly WARNING: "warning";
|
|
6
6
|
readonly ERROR: "error";
|
|
7
7
|
readonly INFO: "info";
|
|
8
8
|
};
|
|
9
9
|
declare type NotificationType = typeof NotificationTypes[keyof typeof NotificationTypes];
|
|
10
|
-
|
|
10
|
+
declare const ShadowTypes: {
|
|
11
11
|
readonly ZERO: "zero";
|
|
12
12
|
/** @deprecated TODO: нужно удалить значение при выпуске мажорной версии */
|
|
13
13
|
readonly LOW: "low";
|
|
@@ -80,5 +80,6 @@ export interface INotificationProps {
|
|
|
80
80
|
/** Обработчик клика по кнопке расхлопа */
|
|
81
81
|
onCollapseButtonClick?: (value: boolean) => void;
|
|
82
82
|
}
|
|
83
|
+
export declare const testIdPrefix = "Notification";
|
|
83
84
|
declare const Notification: React.FC<INotificationProps>;
|
|
84
85
|
export default Notification;
|
|
@@ -74,13 +74,13 @@ var CancelIcon = function CancelIcon(props) {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var TIMEOUT_DELAY = 400;
|
|
77
|
-
|
|
77
|
+
var NotificationTypes = {
|
|
78
78
|
SUCCESS: 'success',
|
|
79
79
|
WARNING: 'warning',
|
|
80
80
|
ERROR: 'error',
|
|
81
81
|
INFO: 'info'
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
var ShadowTypes = {
|
|
84
84
|
ZERO: 'zero',
|
|
85
85
|
|
|
86
86
|
/** @deprecated TODO: нужно удалить значение при выпуске мажорной версии */
|
|
@@ -92,6 +92,7 @@ export var ShadowTypes = {
|
|
|
92
92
|
PRESSED: 'pressed',
|
|
93
93
|
DEFAULT: 'default'
|
|
94
94
|
};
|
|
95
|
+
export var testIdPrefix = 'Notification';
|
|
95
96
|
var cn = cnCreate('mfui-notification');
|
|
96
97
|
|
|
97
98
|
var Notification = function Notification(_ref) {
|
|
@@ -286,10 +287,12 @@ var Notification = function Notification(_ref) {
|
|
|
286
287
|
colored: isColored
|
|
287
288
|
}, [className, rootClass])
|
|
288
289
|
}, /*#__PURE__*/React.createElement("div", {
|
|
290
|
+
"data-testid": "".concat(testIdPrefix, "-container"),
|
|
289
291
|
className: cn('container', [containerClass])
|
|
290
292
|
}, /*#__PURE__*/React.createElement("div", {
|
|
291
293
|
className: cn('icon-container')
|
|
292
294
|
}, renderIcon()), /*#__PURE__*/React.createElement("div", {
|
|
295
|
+
"data-testid": "".concat(testIdPrefix, "-content"),
|
|
293
296
|
className: cn('content', [contentClass])
|
|
294
297
|
}, /*#__PURE__*/React.createElement("div", {
|
|
295
298
|
className: cn('text-container')
|
|
@@ -308,6 +311,7 @@ var Notification = function Notification(_ref) {
|
|
|
308
311
|
ref: fullTextRef,
|
|
309
312
|
className: cn('full-text', textClasses.full)
|
|
310
313
|
}, children))), hasBottom && /*#__PURE__*/React.createElement("div", {
|
|
314
|
+
"data-testid": "".concat(testIdPrefix, "-bottom"),
|
|
311
315
|
className: cn('bottom', {
|
|
312
316
|
'has-button': !!buttonText
|
|
313
317
|
})
|
|
@@ -31,10 +31,15 @@ var PaginationButtons = function PaginationButtons(_ref) {
|
|
|
31
31
|
|
|
32
32
|
if (isHiddenButton) {
|
|
33
33
|
return /*#__PURE__*/React.createElement(PaginationButton, {
|
|
34
|
-
className: cn('button'),
|
|
35
34
|
disabled: true,
|
|
36
35
|
key: index,
|
|
37
|
-
theme: theme
|
|
36
|
+
theme: theme,
|
|
37
|
+
className: cn('button'),
|
|
38
|
+
dataAttrs: {
|
|
39
|
+
root: {
|
|
40
|
+
'data-testid': 'hiddenButton'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
38
43
|
}, /*#__PURE__*/React.createElement(NothingIcon, null));
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Notification.less';
|
|
3
|
-
|
|
3
|
+
declare const NotificationTypes: {
|
|
4
4
|
readonly SUCCESS: "success";
|
|
5
5
|
readonly WARNING: "warning";
|
|
6
6
|
readonly ERROR: "error";
|
|
7
7
|
readonly INFO: "info";
|
|
8
8
|
};
|
|
9
9
|
declare type NotificationType = typeof NotificationTypes[keyof typeof NotificationTypes];
|
|
10
|
-
|
|
10
|
+
declare const ShadowTypes: {
|
|
11
11
|
readonly ZERO: "zero";
|
|
12
12
|
/** @deprecated TODO: нужно удалить значение при выпуске мажорной версии */
|
|
13
13
|
readonly LOW: "low";
|
|
@@ -80,5 +80,6 @@ export interface INotificationProps {
|
|
|
80
80
|
/** Обработчик клика по кнопке расхлопа */
|
|
81
81
|
onCollapseButtonClick?: (value: boolean) => void;
|
|
82
82
|
}
|
|
83
|
+
export declare const testIdPrefix = "Notification";
|
|
83
84
|
declare const Notification: React.FC<INotificationProps>;
|
|
84
85
|
export default Notification;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.
|
|
8
|
+
exports["default"] = exports.testIdPrefix = void 0;
|
|
9
9
|
|
|
10
10
|
require("core-js/modules/es.object.values");
|
|
11
11
|
|
|
@@ -104,7 +104,6 @@ var NotificationTypes = {
|
|
|
104
104
|
ERROR: 'error',
|
|
105
105
|
INFO: 'info'
|
|
106
106
|
};
|
|
107
|
-
exports.NotificationTypes = NotificationTypes;
|
|
108
107
|
var ShadowTypes = {
|
|
109
108
|
ZERO: 'zero',
|
|
110
109
|
|
|
@@ -117,7 +116,8 @@ var ShadowTypes = {
|
|
|
117
116
|
PRESSED: 'pressed',
|
|
118
117
|
DEFAULT: 'default'
|
|
119
118
|
};
|
|
120
|
-
|
|
119
|
+
var testIdPrefix = 'Notification';
|
|
120
|
+
exports.testIdPrefix = testIdPrefix;
|
|
121
121
|
var cn = (0, _uiHelpers.cnCreate)('mfui-notification');
|
|
122
122
|
|
|
123
123
|
var Notification = function Notification(_ref) {
|
|
@@ -312,10 +312,12 @@ var Notification = function Notification(_ref) {
|
|
|
312
312
|
colored: isColored
|
|
313
313
|
}, [className, rootClass])
|
|
314
314
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
|
+
"data-testid": "".concat(testIdPrefix, "-container"),
|
|
315
316
|
className: cn('container', [containerClass])
|
|
316
317
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
317
318
|
className: cn('icon-container')
|
|
318
319
|
}, renderIcon()), /*#__PURE__*/_react["default"].createElement("div", {
|
|
320
|
+
"data-testid": "".concat(testIdPrefix, "-content"),
|
|
319
321
|
className: cn('content', [contentClass])
|
|
320
322
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
321
323
|
className: cn('text-container')
|
|
@@ -334,6 +336,7 @@ var Notification = function Notification(_ref) {
|
|
|
334
336
|
ref: fullTextRef,
|
|
335
337
|
className: cn('full-text', textClasses.full)
|
|
336
338
|
}, children))), hasBottom && /*#__PURE__*/_react["default"].createElement("div", {
|
|
339
|
+
"data-testid": "".concat(testIdPrefix, "-bottom"),
|
|
337
340
|
className: cn('bottom', {
|
|
338
341
|
'has-button': !!buttonText
|
|
339
342
|
})
|
|
@@ -44,10 +44,15 @@ var PaginationButtons = function PaginationButtons(_ref) {
|
|
|
44
44
|
|
|
45
45
|
if (isHiddenButton) {
|
|
46
46
|
return /*#__PURE__*/_react["default"].createElement(_PaginationButton["default"], {
|
|
47
|
-
className: cn('button'),
|
|
48
47
|
disabled: true,
|
|
49
48
|
key: index,
|
|
50
|
-
theme: theme
|
|
49
|
+
theme: theme,
|
|
50
|
+
className: cn('button'),
|
|
51
|
+
dataAttrs: {
|
|
52
|
+
root: {
|
|
53
|
+
'data-testid': 'hiddenButton'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
51
56
|
}, /*#__PURE__*/_react["default"].createElement(NothingIcon, null));
|
|
52
57
|
}
|
|
53
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.3",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"react-popper": "^2.2.3",
|
|
101
101
|
"swiper": "^6.5.6"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "9def04b4abf47ad1bc0cfd3bb0430851b56b60ee"
|
|
104
104
|
}
|