@megafon/ui-core 3.7.0 → 3.8.0
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/Calendar/components/Month/Month.js +4 -4
- package/dist/es/components/Notification/Notification.d.ts +6 -0
- package/dist/es/components/Notification/Notification.js +13 -3
- package/dist/lib/components/Calendar/components/Month/Month.js +4 -4
- package/dist/lib/components/Notification/Notification.d.ts +6 -0
- package/dist/lib/components/Notification/Notification.js +13 -3
- package/package.json +3 -3
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
|
+
# [3.8.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.7.0...@megafon/ui-core@3.8.0) (2022-05-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **notification:** add props classes to notification component ([608a424](https://github.com/MegafonWebLab/megafon-ui/commit/608a4246eb99af354fb7cf8ab98c2ed513d87b66))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.7.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.6.0...@megafon/ui-core@3.7.0) (2022-05-05)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -10,9 +10,9 @@ var ArrowLeft = function ArrowLeft(props) {
|
|
|
10
10
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
11
11
|
viewBox: "0 0 20 20"
|
|
12
12
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "M12 6v8l-5-4z",
|
|
13
14
|
fillRule: "evenodd",
|
|
14
|
-
clipRule: "evenodd"
|
|
15
|
-
d: "M12 6v8l-5-4z"
|
|
15
|
+
clipRule: "evenodd"
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -20,9 +20,9 @@ var ArrowRight = function ArrowRight(props) {
|
|
|
20
20
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
21
|
viewBox: "0 0 20 20"
|
|
22
22
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
d: "M8 14V6l5 4z",
|
|
23
24
|
fillRule: "evenodd",
|
|
24
|
-
clipRule: "evenodd"
|
|
25
|
-
d: "M8 14V6l5 4z"
|
|
25
|
+
clipRule: "evenodd"
|
|
26
26
|
}));
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -17,6 +17,12 @@ declare type ShadowType = typeof ShadowTypes[keyof typeof ShadowTypes];
|
|
|
17
17
|
export interface INotificationProps {
|
|
18
18
|
/** Дополнительный класс корневого элемента */
|
|
19
19
|
className?: string;
|
|
20
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
|
21
|
+
classes?: {
|
|
22
|
+
root?: string;
|
|
23
|
+
container?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
};
|
|
20
26
|
/** Тип отображения */
|
|
21
27
|
type?: NotificationType;
|
|
22
28
|
/** Уровень тени */
|
|
@@ -77,6 +77,11 @@ var cn = cnCreate('mfui-notification');
|
|
|
77
77
|
|
|
78
78
|
var Notification = function Notification(_ref) {
|
|
79
79
|
var className = _ref.className,
|
|
80
|
+
_ref$classes = _ref.classes;
|
|
81
|
+
_ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
82
|
+
var rootClass = _ref$classes.root,
|
|
83
|
+
containerClass = _ref$classes.container,
|
|
84
|
+
contentClass = _ref$classes.content,
|
|
80
85
|
children = _ref.children,
|
|
81
86
|
_ref$type = _ref.type,
|
|
82
87
|
type = _ref$type === void 0 ? 'info' : _ref$type,
|
|
@@ -143,13 +148,13 @@ var Notification = function Notification(_ref) {
|
|
|
143
148
|
className: cn({
|
|
144
149
|
type: type,
|
|
145
150
|
colored: isColored
|
|
146
|
-
}, className)
|
|
151
|
+
}, [className, rootClass])
|
|
147
152
|
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
-
className: cn('container')
|
|
153
|
+
className: cn('container', [containerClass])
|
|
149
154
|
}, /*#__PURE__*/React.createElement("div", {
|
|
150
155
|
className: cn('icon-container')
|
|
151
156
|
}, renderIcon()), /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
className: cn('content')
|
|
157
|
+
className: cn('content', [contentClass])
|
|
153
158
|
}, title && /*#__PURE__*/React.createElement(Header, {
|
|
154
159
|
dataAttrs: {
|
|
155
160
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title
|
|
@@ -174,6 +179,11 @@ var Notification = function Notification(_ref) {
|
|
|
174
179
|
Notification.propTypes = {
|
|
175
180
|
type: PropTypes.oneOf(Object.values(NotificationTypes)),
|
|
176
181
|
className: PropTypes.string,
|
|
182
|
+
classes: PropTypes.shape({
|
|
183
|
+
root: PropTypes.string,
|
|
184
|
+
container: PropTypes.string,
|
|
185
|
+
content: PropTypes.string
|
|
186
|
+
}),
|
|
177
187
|
shadowLevel: PropTypes.oneOf(Object.values(ShadowTypes)),
|
|
178
188
|
isColored: PropTypes.bool,
|
|
179
189
|
hasCloseButton: PropTypes.bool,
|
|
@@ -23,9 +23,9 @@ var ArrowLeft = function ArrowLeft(props) {
|
|
|
23
23
|
return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
|
|
24
24
|
viewBox: "0 0 20 20"
|
|
25
25
|
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
|
26
|
+
d: "M12 6v8l-5-4z",
|
|
26
27
|
fillRule: "evenodd",
|
|
27
|
-
clipRule: "evenodd"
|
|
28
|
-
d: "M12 6v8l-5-4z"
|
|
28
|
+
clipRule: "evenodd"
|
|
29
29
|
}));
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -33,9 +33,9 @@ var ArrowRight = function ArrowRight(props) {
|
|
|
33
33
|
return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
|
|
34
34
|
viewBox: "0 0 20 20"
|
|
35
35
|
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
|
36
|
+
d: "M8 14V6l5 4z",
|
|
36
37
|
fillRule: "evenodd",
|
|
37
|
-
clipRule: "evenodd"
|
|
38
|
-
d: "M8 14V6l5 4z"
|
|
38
|
+
clipRule: "evenodd"
|
|
39
39
|
}));
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -17,6 +17,12 @@ declare type ShadowType = typeof ShadowTypes[keyof typeof ShadowTypes];
|
|
|
17
17
|
export interface INotificationProps {
|
|
18
18
|
/** Дополнительный класс корневого элемента */
|
|
19
19
|
className?: string;
|
|
20
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
|
21
|
+
classes?: {
|
|
22
|
+
root?: string;
|
|
23
|
+
container?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
};
|
|
20
26
|
/** Тип отображения */
|
|
21
27
|
type?: NotificationType;
|
|
22
28
|
/** Уровень тени */
|
|
@@ -101,6 +101,11 @@ var cn = (0, _uiHelpers.cnCreate)('mfui-notification');
|
|
|
101
101
|
|
|
102
102
|
var Notification = function Notification(_ref) {
|
|
103
103
|
var className = _ref.className,
|
|
104
|
+
_ref$classes = _ref.classes;
|
|
105
|
+
_ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
106
|
+
var rootClass = _ref$classes.root,
|
|
107
|
+
containerClass = _ref$classes.container,
|
|
108
|
+
contentClass = _ref$classes.content,
|
|
104
109
|
children = _ref.children,
|
|
105
110
|
_ref$type = _ref.type,
|
|
106
111
|
type = _ref$type === void 0 ? 'info' : _ref$type,
|
|
@@ -167,13 +172,13 @@ var Notification = function Notification(_ref) {
|
|
|
167
172
|
className: cn({
|
|
168
173
|
type: type,
|
|
169
174
|
colored: isColored
|
|
170
|
-
}, className)
|
|
175
|
+
}, [className, rootClass])
|
|
171
176
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
|
-
className: cn('container')
|
|
177
|
+
className: cn('container', [containerClass])
|
|
173
178
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
179
|
className: cn('icon-container')
|
|
175
180
|
}, renderIcon()), /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
-
className: cn('content')
|
|
181
|
+
className: cn('content', [contentClass])
|
|
177
182
|
}, title && /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
178
183
|
dataAttrs: {
|
|
179
184
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title
|
|
@@ -198,6 +203,11 @@ var Notification = function Notification(_ref) {
|
|
|
198
203
|
Notification.propTypes = {
|
|
199
204
|
type: PropTypes.oneOf(Object.values(NotificationTypes)),
|
|
200
205
|
className: PropTypes.string,
|
|
206
|
+
classes: PropTypes.shape({
|
|
207
|
+
root: PropTypes.string,
|
|
208
|
+
container: PropTypes.string,
|
|
209
|
+
content: PropTypes.string
|
|
210
|
+
}),
|
|
201
211
|
shadowLevel: PropTypes.oneOf(Object.values(ShadowTypes)),
|
|
202
212
|
isColored: PropTypes.bool,
|
|
203
213
|
hasCloseButton: PropTypes.bool,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@babel/preset-env": "^7.8.6",
|
|
55
55
|
"@babel/preset-react": "^7.8.3",
|
|
56
56
|
"@babel/preset-typescript": "^7.8.3",
|
|
57
|
-
"@megafon/ui-icons": "^1.2.
|
|
57
|
+
"@megafon/ui-icons": "^1.2.2",
|
|
58
58
|
"@svgr/core": "^2.4.1",
|
|
59
59
|
"@testing-library/react-hooks": "^7.0.1",
|
|
60
60
|
"@types/enzyme": "^3.10.5",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"react-popper": "^2.2.3",
|
|
98
98
|
"swiper": "^6.5.6"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "929d0fbafbdc4d2aa98f283f7c71dff21347542f"
|
|
101
101
|
}
|