@synerise/ds-alert 0.8.22 → 0.8.23
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/dist/IconAlert/IconAlert.d.ts +2 -2
- package/dist/IconAlert/IconAlert.js +5 -5
- package/dist/IconAlert/IconAlert.styles.js +1 -7
- package/dist/InlineAlert/InlineAlert.d.ts +2 -2
- package/dist/InlineAlert/InlineAlert.js +4 -4
- package/dist/InlineAlert/InlineAlert.styles.js +1 -1
- package/package.json +5 -5
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
|
+
## [0.8.23](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.8.22...@synerise/ds-alert@0.8.23) (2024-08-19)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **alert:** inlineAlert and IconAlert text color updated ([7c330cb](https://github.com/Synerise/synerise-design/commit/7c330cba6f5a8516d94c21417e3584ad65630cf7))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [0.8.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.8.21...@synerise/ds-alert@0.8.22) (2024-08-06)
|
7
18
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-alert
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React from 'react';
|
2
2
|
import { IconAlertProps } from './IconAlert.types';
|
3
|
-
declare const IconAlert: React.
|
3
|
+
declare const IconAlert: ({ type, iconAlert, message, withLink, withEmphasis, hoverButton, disabled, customIcon, ...rest }: IconAlertProps) => React.JSX.Element;
|
4
4
|
export default IconAlert;
|
@@ -4,14 +4,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
4
4
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
6
|
|
7
|
-
import
|
8
|
-
import
|
7
|
+
import React, { useMemo } from 'react';
|
8
|
+
import Icon, { Check3M, WarningFillM, InfoFillM } from '@synerise/ds-icon';
|
9
9
|
import * as S from './IconAlert.styles';
|
10
10
|
var ICONS = {
|
11
|
-
success: /*#__PURE__*/React.createElement(
|
11
|
+
success: /*#__PURE__*/React.createElement(Check3M, null),
|
12
12
|
alert: /*#__PURE__*/React.createElement(WarningFillM, null),
|
13
13
|
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
14
|
-
info: /*#__PURE__*/React.createElement(
|
14
|
+
info: /*#__PURE__*/React.createElement(InfoFillM, null)
|
15
15
|
};
|
16
16
|
|
17
17
|
var IconAlert = function IconAlert(_ref) {
|
@@ -26,7 +26,7 @@ var IconAlert = function IconAlert(_ref) {
|
|
26
26
|
customIcon = _ref.customIcon,
|
27
27
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
28
28
|
|
29
|
-
var icon =
|
29
|
+
var icon = useMemo(function () {
|
30
30
|
return ICONS[type];
|
31
31
|
}, [type]);
|
32
32
|
return /*#__PURE__*/React.createElement(S.IconAlertWrapper, _extends({}, rest, {
|
@@ -5,12 +5,6 @@ var COLORS = {
|
|
5
5
|
alert: 'red-600',
|
6
6
|
info: 'grey-600'
|
7
7
|
};
|
8
|
-
var COLORS_TEXT = {
|
9
|
-
success: 'green-700',
|
10
|
-
warning: 'yellow-700',
|
11
|
-
alert: 'red-700',
|
12
|
-
info: 'grey-700'
|
13
|
-
};
|
14
8
|
var COLORS_HOVER = {
|
15
9
|
success: 'green-700',
|
16
10
|
warning: 'yellow-700',
|
@@ -41,7 +35,7 @@ export var IconAlertWrapper = styled.span.withConfig({
|
|
41
35
|
}, function (props) {
|
42
36
|
return !!props.disabled && css(["pointer-events:none;opacity:0.4;"]);
|
43
37
|
}, Message, function (props) {
|
44
|
-
return props.theme.palette[
|
38
|
+
return props.theme.palette['grey-600'];
|
45
39
|
});
|
46
40
|
export var EmphasisWrapper = styled.span.withConfig({
|
47
41
|
displayName: "IconAlertstyles__EmphasisWrapper",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React from 'react';
|
2
2
|
import { InlineAlertProps } from './InlineAlert.types';
|
3
|
-
declare const InlineAlert: React.
|
3
|
+
declare const InlineAlert: ({ type, message }: InlineAlertProps) => React.JSX.Element;
|
4
4
|
export default InlineAlert;
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import
|
2
|
-
import Icon, { Check3M, WarningFillM,
|
1
|
+
import React, { useMemo } from 'react';
|
2
|
+
import Icon, { Check3M, WarningFillM, InfoFillM } from '@synerise/ds-icon';
|
3
3
|
import * as S from './InlineAlert.styles';
|
4
4
|
var ICONS = {
|
5
5
|
success: /*#__PURE__*/React.createElement(Check3M, null),
|
6
6
|
alert: /*#__PURE__*/React.createElement(WarningFillM, null),
|
7
7
|
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
8
|
-
info: /*#__PURE__*/React.createElement(
|
8
|
+
info: /*#__PURE__*/React.createElement(InfoFillM, null)
|
9
9
|
};
|
10
10
|
|
11
11
|
var InlineAlert = function InlineAlert(_ref) {
|
12
12
|
var _ref$type = _ref.type,
|
13
13
|
type = _ref$type === void 0 ? 'warning' : _ref$type,
|
14
14
|
message = _ref.message;
|
15
|
-
var icon =
|
15
|
+
var icon = useMemo(function () {
|
16
16
|
return ICONS[type];
|
17
17
|
}, [type]);
|
18
18
|
return /*#__PURE__*/React.createElement(S.InlineAlertWrapper, {
|
@@ -17,5 +17,5 @@ export var InlineAlertWrapper = styled.span.withConfig({
|
|
17
17
|
}, function (props) {
|
18
18
|
return props.theme.palette[COLORS[props.type]];
|
19
19
|
}, Message, function (props) {
|
20
|
-
return props.theme.palette[
|
20
|
+
return props.theme.palette['grey-600'];
|
21
21
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@synerise/ds-alert",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.23",
|
4
4
|
"description": "Alert UI Component for the Synerise Design System",
|
5
5
|
"license": "ISC",
|
6
6
|
"repository": "Synerise/synerise-design",
|
@@ -33,9 +33,9 @@
|
|
33
33
|
],
|
34
34
|
"types": "dist/index.d.ts",
|
35
35
|
"dependencies": {
|
36
|
-
"@synerise/ds-button": "^0.21.
|
37
|
-
"@synerise/ds-icon": "^0.
|
38
|
-
"@synerise/ds-unordered-list": "^0.2.
|
36
|
+
"@synerise/ds-button": "^0.21.5",
|
37
|
+
"@synerise/ds-icon": "^0.65.0",
|
38
|
+
"@synerise/ds-unordered-list": "^0.2.94",
|
39
39
|
"animate.css": "^4.1.1",
|
40
40
|
"react-animate-height": "^2.0.23",
|
41
41
|
"react-dom": "16.13.0",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"react": ">=16.9.0 <= 17.0.2",
|
48
48
|
"styled-components": "5.0.1"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "2e6de17b64023536c24be8fcb67b1e53e8bffa3d"
|
51
51
|
}
|