@hazelcast/ui 1.3.2-next.88 → 1.3.2-next.89
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/lib/Notification.d.ts
CHANGED
package/lib/Notification.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { AlertTriangle, CheckCircle, AlertCircle, Info, ChevronRight } from 'react-feather';
|
|
3
|
+
import { AlertTriangle, CheckCircle, AlertCircle, Info, ChevronRight, X } from 'react-feather';
|
|
4
4
|
import { Icon } from './Icon';
|
|
5
|
+
import { IconButton } from './IconButton';
|
|
5
6
|
import { Link } from './Link';
|
|
6
7
|
import styles from './Notification.module.scss';
|
|
7
8
|
export const NotificationIcon = {
|
|
@@ -22,7 +23,7 @@ export const NotificationIcon = {
|
|
|
22
23
|
ariaLabel: 'Info error circle icon',
|
|
23
24
|
},
|
|
24
25
|
};
|
|
25
|
-
export const Notification = ({ type, children, className, link, linkHref }) => {
|
|
26
|
+
export const Notification = ({ type, children, className, link, linkHref, onClose }) => {
|
|
26
27
|
const { icon, ariaLabel } = NotificationIcon[type];
|
|
27
28
|
return (React.createElement("div", { "data-test": "notification", className: cn(styles.notification, {
|
|
28
29
|
[styles.success]: type === 'success',
|
|
@@ -32,6 +33,7 @@ export const Notification = ({ type, children, className, link, linkHref }) => {
|
|
|
32
33
|
}, className) },
|
|
33
34
|
React.createElement(Icon, { "data-test": "notification-icon", ariaLabel: ariaLabel, icon: icon, className: styles.icon }),
|
|
34
35
|
React.createElement("div", { "data-test": "notification-content", className: styles.content }, children),
|
|
35
|
-
link && linkHref && (React.createElement(Link, { "data-test": "notification-link", component: "a", size: "small", className: styles.link, href: linkHref, icon: ChevronRight, ariaLabel: "Icon chevron right", bold: true }, link))
|
|
36
|
+
link && linkHref && (React.createElement(Link, { "data-test": "notification-link", component: "a", size: "small", className: styles.link, href: linkHref, icon: ChevronRight, ariaLabel: "Icon chevron right", bold: true }, link)),
|
|
37
|
+
onClose && (React.createElement(IconButton, { "data-test": "notification-close", className: styles.closeButton, icon: X, onClick: onClose, ariaLabel: "Notification close button" }))));
|
|
36
38
|
};
|
|
37
39
|
//# sourceMappingURL=Notification.js.map
|
package/lib/Notification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../src/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAoB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../src/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAoB,CAAC,EAAE,MAAM,eAAe,CAAA;AAEhH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,MAAM,MAAM,4BAA4B,CAAA;AAS/C,MAAM,CAAC,MAAM,gBAAgB,GAA8D;IACzF,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,mBAAmB;KAC/B;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,kBAAkB;KAC9B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,uBAAuB;KACnC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EA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CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazelcast/ui",
|
|
3
|
-
"version": "1.3.2-next.
|
|
3
|
+
"version": "1.3.2-next.89+3c8fb16",
|
|
4
4
|
"description": "Hazelcast design system components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"homepage": "https://github.com/hazelcast/frontend-shared#readme",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"react": "^17 || ^18",
|
|
117
117
|
"react-dom": "^17 || ^18"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "3c8fb169502752185009ee55c0435718b7c0c013"
|
|
120
120
|
}
|