@neo4j-ndl/react 0.9.3 → 0.9.5
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 +17 -0
- package/lib/cjs/alert/Alert.js +31 -11
- package/lib/cjs/alert/Alert.js.map +1 -1
- package/lib/esm/alert/Alert.js +8 -11
- package/lib/esm/alert/Alert.js.map +1 -1
- package/lib/types/alert/Alert.d.ts +2 -2
- package/lib/types/loading-spinner/LoadingSpinner.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.9.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2842a1c: Medium size Loading Spinner
|
|
8
|
+
- Updated dependencies [2842a1c]
|
|
9
|
+
- @neo4j-ndl/base@0.9.2
|
|
10
|
+
|
|
11
|
+
## 0.9.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- a820898: remote title as description from alert and optimise the warning log
|
|
16
|
+
- 5288c89: Allow alert title to be undefined
|
|
17
|
+
- Updated dependencies [5288c89]
|
|
18
|
+
- @neo4j-ndl/base@0.9.1
|
|
19
|
+
|
|
3
20
|
## 0.9.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/lib/cjs/alert/Alert.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
26
|
var t = {};
|
|
4
27
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -37,8 +60,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
37
60
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38
61
|
*/
|
|
39
62
|
const classnames_1 = __importDefault(require("classnames"));
|
|
40
|
-
const react_1 =
|
|
63
|
+
const react_1 = __importStar(require("react"));
|
|
41
64
|
const icons_1 = require("../icons");
|
|
65
|
+
const utils_1 = require("../_common/utils");
|
|
42
66
|
/**
|
|
43
67
|
*
|
|
44
68
|
*
|
|
@@ -46,8 +70,6 @@ const icons_1 = require("../icons");
|
|
|
46
70
|
*
|
|
47
71
|
*
|
|
48
72
|
*/
|
|
49
|
-
const TITLE_PROPS_ERROR = 'Alert Component: expected `title` prop';
|
|
50
|
-
const NAME_PROPS_ERROR = 'Alert Component: expected `name` prop when title is not a string';
|
|
51
73
|
const getStatusIcon = (iconType) => {
|
|
52
74
|
let iconComponent;
|
|
53
75
|
switch (iconType) {
|
|
@@ -72,12 +94,11 @@ const AlertAction = (_a) => {
|
|
|
72
94
|
exports.AlertAction = AlertAction;
|
|
73
95
|
const Alert = react_1.default.forwardRef(function Alert(_a, ref) {
|
|
74
96
|
var { type = 'info', icon = false, title, name, actions = [], floating = false, description = null, onClose, className = '', children = null, closeable = false } = _a, rest = __rest(_a, ["type", "icon", "title", "name", "actions", "floating", "description", "onClose", "className", "children", "closeable"]);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
97
|
+
(0, react_1.useEffect)(() => {
|
|
98
|
+
if (typeof title !== 'string' && !name && closeable) {
|
|
99
|
+
(0, utils_1.needleWarningMessage)('Alert Component expected `name` prop when title is not a string: https://dequeuniversity.com/rules/axe/4.2/aria-dialog-name?application=axeAPI');
|
|
100
|
+
}
|
|
101
|
+
}, [title, name, closeable]);
|
|
81
102
|
if (typeof title === 'string' && !name) {
|
|
82
103
|
name = title;
|
|
83
104
|
}
|
|
@@ -90,13 +111,12 @@ const Alert = react_1.default.forwardRef(function Alert(_a, ref) {
|
|
|
90
111
|
['floating']: floating,
|
|
91
112
|
[className]: className && className !== '',
|
|
92
113
|
});
|
|
93
|
-
const TitleTag = description || children ? 'h6' : 'div';
|
|
94
114
|
const handleClose = (e) => {
|
|
95
115
|
if (onClose && typeof onClose === 'function') {
|
|
96
116
|
onClose(e);
|
|
97
117
|
}
|
|
98
118
|
};
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }, { children: [icon && getStatusIcon(type), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "alert-content" }, { children: [(0, jsx_runtime_1.jsx)(
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }, { children: [icon && getStatusIcon(type), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "alert-content" }, { children: [title && (0, jsx_runtime_1.jsx)("h6", Object.assign({ className: "alert-title" }, { children: title })), (description || children) && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "alert-description" }, { children: children || description }))), actions && actions.length > 0 && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "alert-actions" }, { children: actions.map((action, index) => ((0, jsx_runtime_1.jsx)(exports.AlertAction, Object.assign({}, action), index))) })))] })), closeable && ((0, jsx_runtime_1.jsx)("div", Object.assign({ tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose, "aria-label": "close-alert" }, { children: (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "XIcon" }) })))] })));
|
|
100
120
|
});
|
|
101
121
|
exports.default = Alert;
|
|
102
122
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,+CAAyC;AACzC,oCAAoC;AACpC,4CAAwD;AA4ExD;;;;;;GAMG;AAEH,MAAM,aAAa,GAAG,CAAC,QAAmB,EAAE,EAAE;IAC5C,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,aAAa,GAAG,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;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G,EACL,SAAS,IAAI,CACZ,8CACE,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,uBAAuB,EACjC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,gBACT,aAAa,gBAExB,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,OAAO,GAAG,IACzB,CACP,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,KAAK,CAAC"}
|
package/lib/esm/alert/Alert.js
CHANGED
|
@@ -31,8 +31,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
31
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
32
|
*/
|
|
33
33
|
import classnames from 'classnames';
|
|
34
|
-
import React from 'react';
|
|
34
|
+
import React, { useEffect } from 'react';
|
|
35
35
|
import { HeroIcon } from '../icons';
|
|
36
|
+
import { needleWarningMessage } from '../_common/utils';
|
|
36
37
|
/**
|
|
37
38
|
*
|
|
38
39
|
*
|
|
@@ -40,8 +41,6 @@ import { HeroIcon } from '../icons';
|
|
|
40
41
|
*
|
|
41
42
|
*
|
|
42
43
|
*/
|
|
43
|
-
const TITLE_PROPS_ERROR = 'Alert Component: expected `title` prop';
|
|
44
|
-
const NAME_PROPS_ERROR = 'Alert Component: expected `name` prop when title is not a string';
|
|
45
44
|
const getStatusIcon = (iconType) => {
|
|
46
45
|
let iconComponent;
|
|
47
46
|
switch (iconType) {
|
|
@@ -65,12 +64,11 @@ export const AlertAction = (_a) => {
|
|
|
65
64
|
};
|
|
66
65
|
const Alert = React.forwardRef(function Alert(_a, ref) {
|
|
67
66
|
var { type = 'info', icon = false, title, name, actions = [], floating = false, description = null, onClose, className = '', children = null, closeable = false } = _a, rest = __rest(_a, ["type", "icon", "title", "name", "actions", "floating", "description", "onClose", "className", "children", "closeable"]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (typeof title !== 'string' && !name && closeable) {
|
|
69
|
+
needleWarningMessage('Alert Component expected `name` prop when title is not a string: https://dequeuniversity.com/rules/axe/4.2/aria-dialog-name?application=axeAPI');
|
|
70
|
+
}
|
|
71
|
+
}, [title, name, closeable]);
|
|
74
72
|
if (typeof title === 'string' && !name) {
|
|
75
73
|
name = title;
|
|
76
74
|
}
|
|
@@ -83,13 +81,12 @@ const Alert = React.forwardRef(function Alert(_a, ref) {
|
|
|
83
81
|
['floating']: floating,
|
|
84
82
|
[className]: className && className !== '',
|
|
85
83
|
});
|
|
86
|
-
const TitleTag = description || children ? 'h6' : 'div';
|
|
87
84
|
const handleClose = (e) => {
|
|
88
85
|
if (onClose && typeof onClose === 'function') {
|
|
89
86
|
onClose(e);
|
|
90
87
|
}
|
|
91
88
|
};
|
|
92
|
-
return (_jsxs("div", Object.assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }, { children: [icon && getStatusIcon(type), _jsxs("div", Object.assign({ className: "alert-content" }, { children: [_jsx(
|
|
89
|
+
return (_jsxs("div", Object.assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }, { children: [icon && getStatusIcon(type), _jsxs("div", Object.assign({ className: "alert-content" }, { children: [title && _jsx("h6", Object.assign({ className: "alert-title" }, { children: title })), (description || children) && (_jsx("div", Object.assign({ className: "alert-description" }, { children: children || description }))), actions && actions.length > 0 && (_jsx("div", Object.assign({ className: "alert-actions" }, { children: actions.map((action, index) => (_jsx(AlertAction, Object.assign({}, action), index))) })))] })), closeable && (_jsx("div", Object.assign({ tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose, "aria-label": "close-alert" }, { children: _jsx(HeroIcon, { iconName: "XIcon" }) })))] })));
|
|
93
90
|
});
|
|
94
91
|
export default Alert;
|
|
95
92
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AA4ExD;;;;;;GAMG;AAEH,MAAM,aAAa,GAAG,CAAC,QAAmB,EAAE,EAAE;IAC5C,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,aAAa,GAAG,KAAC,QAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,KAAC,QAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;QACR,KAAK,QAAQ;YACX,aAAa,GAAG,CACd,KAAC,QAAQ,IAAC,QAAQ,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,GAAG,CAC3D,CAAC;YACF,MAAM;QACR;YACE,aAAa,GAAG,CACd,KAAC,QAAQ,IAAC,QAAQ,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,GAAG,CAC3D,CAAC;KACL;IAED,OAAO,4BAAK,SAAS,EAAC,8BAA8B,gBAAE,aAAa,IAAO,CAAC;AAC7E,C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
|
40
40
|
/** Type of the alert */
|
|
41
41
|
type?: AlertType;
|
|
42
42
|
/** Title of the alert */
|
|
43
|
-
title
|
|
43
|
+
title?: string | React.ReactNode;
|
|
44
44
|
/**
|
|
45
45
|
* The alert name or label. Used for accessibility only.
|
|
46
|
-
* Required if title is not a string
|
|
46
|
+
* Required if title is not a string or if title is not set.
|
|
47
47
|
*/
|
|
48
48
|
name?: string;
|
|
49
49
|
/** Description of the alert. Will be ignored if `children` is passed */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "React implementation of Neo4j Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"button",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@heroicons/react": "^1.0.5",
|
|
72
|
-
"@neo4j-ndl/base": "^0.9.
|
|
72
|
+
"@neo4j-ndl/base": "^0.9.2",
|
|
73
73
|
"classnames": "^2.3.1",
|
|
74
74
|
"detect-browser": "^5.3.0",
|
|
75
75
|
"react-dropzone": "^14.0.0",
|