@neo4j-ndl/react 2.13.8 → 2.14.1
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 +18 -0
- package/lib/cjs/callout/Callout.js +86 -0
- package/lib/cjs/callout/Callout.js.map +1 -0
- package/lib/cjs/callout/index.js +38 -0
- package/lib/cjs/callout/index.js.map +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/callout/Callout.js +80 -0
- package/lib/esm/callout/Callout.js.map +1 -0
- package/lib/esm/callout/index.js +22 -0
- package/lib/esm/callout/index.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/callout/Callout.d.ts +48 -0
- package/lib/types/callout/index.d.ts +21 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`f0fa91005a9252fcec465d52966d2e89729ff2fd`](https://github.com/neo4j/needle/commit/f0fa91005a9252fcec465d52966d2e89729ff2fd)]:
|
|
8
|
+
- @neo4j-ndl/base@2.10.1
|
|
9
|
+
|
|
10
|
+
## 2.14.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [#922](https://github.com/neo4j/needle/pull/922) [`505543dbbaf89b59bbcd294527b52cad339882d9`](https://github.com/neo4j/needle/commit/505543dbbaf89b59bbcd294527b52cad339882d9) Thanks [@daugerdas](https://github.com/daugerdas)! - add callout component
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`505543dbbaf89b59bbcd294527b52cad339882d9`](https://github.com/neo4j/needle/commit/505543dbbaf89b59bbcd294527b52cad339882d9)]:
|
|
19
|
+
- @neo4j-ndl/base@2.10.0
|
|
20
|
+
|
|
3
21
|
## 2.13.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Callout = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) "Neo4j"
|
|
22
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
23
|
+
*
|
|
24
|
+
* This file is part of Neo4j.
|
|
25
|
+
*
|
|
26
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
27
|
+
* it under the terms of the GNU General Public License as published by
|
|
28
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
29
|
+
* (at your option) any later version.
|
|
30
|
+
*
|
|
31
|
+
* This program is distributed in the hope that it will be useful,
|
|
32
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
33
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
34
|
+
* GNU General Public License for more details.
|
|
35
|
+
*
|
|
36
|
+
* You should have received a copy of the GNU General Public License
|
|
37
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38
|
+
*/
|
|
39
|
+
const react_1 = __importDefault(require("react"));
|
|
40
|
+
const defaultImports_1 = require("../_common/defaultImports");
|
|
41
|
+
const icons_1 = require("../icons");
|
|
42
|
+
const typography_1 = require("../typography");
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* Helpers
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
const getStatusIcon = (iconType) => {
|
|
51
|
+
let iconComponent;
|
|
52
|
+
switch (iconType) {
|
|
53
|
+
case 'important':
|
|
54
|
+
iconComponent = ((0, jsx_runtime_1.jsx)(icons_1.ExclamationTriangleIconOutline, { className: "ndl-callout-important-icon" }));
|
|
55
|
+
break;
|
|
56
|
+
case 'example':
|
|
57
|
+
iconComponent = ((0, jsx_runtime_1.jsx)(icons_1.BeakerIconOutline, { className: "ndl-callout-example-icon" }));
|
|
58
|
+
break;
|
|
59
|
+
case 'tip':
|
|
60
|
+
iconComponent = (0, jsx_runtime_1.jsx)(icons_1.LightBulbIconOutline, { className: "ndl-callout-tip-icon" });
|
|
61
|
+
break;
|
|
62
|
+
case 'note':
|
|
63
|
+
default:
|
|
64
|
+
iconComponent = ((0, jsx_runtime_1.jsx)(icons_1.InformationCircleIconOutline, { className: "ndl-callout-note-icon" }));
|
|
65
|
+
}
|
|
66
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "ndl-callout-icon", children: iconComponent });
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
*
|
|
71
|
+
* Callout Component
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
exports.Callout = react_1.default.forwardRef(function Callout(_a, ref) {
|
|
76
|
+
var { as, type = 'note', header = null, children, description = null, className } = _a, restProps = __rest(_a, ["as", "type", "header", "children", "description", "className"]);
|
|
77
|
+
const Component = as || 'div';
|
|
78
|
+
const classes = (0, defaultImports_1.classNames)('ndl-callout', className, {
|
|
79
|
+
'ndl-callout-note': type === 'note',
|
|
80
|
+
'ndl-callout-important': type === 'important',
|
|
81
|
+
'ndl-callout-example': type === 'example',
|
|
82
|
+
'ndl-callout-tip': type === 'tip',
|
|
83
|
+
});
|
|
84
|
+
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ ref: ref }, restProps, { className: classes, children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-callout-rectangle" }), (0, jsx_runtime_1.jsxs)("div", { className: "ndl-callout-wrapper", children: [getStatusIcon(type), (0, jsx_runtime_1.jsxs)("div", { className: "ndl-callout-content", children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "h6", className: "ndl-callout-title", children: type.toUpperCase() }), header && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "subheading-medium", className: "ndl-callout-header", children: header })), (description || children) && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "body-medium", className: "ndl-callout-description", children: children || description }))] })] })] })));
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=Callout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../src/callout/Callout.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,kDAA0B;AAE1B,8DAAuD;AAEvD,oCAKkB;AAClB,8CAA2C;AAwB3C;;;;;;GAMG;AAEH,MAAM,aAAa,GAAG,CAAC,QAAqB,EAAE,EAAE;IAC9C,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,WAAW;YACd,aAAa,GAAG,CACd,uBAAC,sCAA8B,IAAC,SAAS,EAAC,4BAA4B,GAAG,CAC1E,CAAC;YACF,MAAM;QACR,KAAK,SAAS;YACZ,aAA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AAC,WAAW,EAAE,GACR,EACZ,MAAM,IAAI,CACT,uBAAC,uBAAU,IACT,OAAO,EAAC,mBAAmB,EAC3B,SAAS,EAAC,oBAAoB,YAE7B,MAAM,GACI,CACd,EACA,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAC5B,uBAAC,uBAAU,IACT,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,yBAAyB,YAElC,QAAQ,IAAI,WAAW,GACb,CACd,IACG,IACF,KACI,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
34
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
__exportStar(require("./Callout"), exports);
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/callout/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,4CAA0B"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -80,4 +80,5 @@ __exportStar(require("./inline-edit"), exports);
|
|
|
80
80
|
__exportStar(require("./dropdown-button"), exports);
|
|
81
81
|
__exportStar(require("./divider"), exports);
|
|
82
82
|
__exportStar(require("./tree-view"), exports);
|
|
83
|
+
__exportStar(require("./callout"), exports);
|
|
83
84
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,wCAAsB;AACtB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,0CAAwB;AACxB,oDAAkC;AAClC,yCAAuB;AACvB,sDAAoC;AACpC,4CAA0B;AAC1B,iDAA+B;AAC/B,0CAAwB;AACxB,6CAA2B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}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React from 'react';
|
|
34
|
+
import { classNames } from '../_common/defaultImports';
|
|
35
|
+
import { InformationCircleIconOutline, ExclamationTriangleIconOutline, BeakerIconOutline, LightBulbIconOutline, } from '../icons';
|
|
36
|
+
import { Typography } from '../typography';
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* Helpers
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
const getStatusIcon = (iconType) => {
|
|
45
|
+
let iconComponent;
|
|
46
|
+
switch (iconType) {
|
|
47
|
+
case 'important':
|
|
48
|
+
iconComponent = (_jsx(ExclamationTriangleIconOutline, { className: "ndl-callout-important-icon" }));
|
|
49
|
+
break;
|
|
50
|
+
case 'example':
|
|
51
|
+
iconComponent = (_jsx(BeakerIconOutline, { className: "ndl-callout-example-icon" }));
|
|
52
|
+
break;
|
|
53
|
+
case 'tip':
|
|
54
|
+
iconComponent = _jsx(LightBulbIconOutline, { className: "ndl-callout-tip-icon" });
|
|
55
|
+
break;
|
|
56
|
+
case 'note':
|
|
57
|
+
default:
|
|
58
|
+
iconComponent = (_jsx(InformationCircleIconOutline, { className: "ndl-callout-note-icon" }));
|
|
59
|
+
}
|
|
60
|
+
return _jsx("div", { className: "ndl-callout-icon", children: iconComponent });
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
* Callout Component
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
export const Callout = React.forwardRef(function Callout(_a, ref) {
|
|
70
|
+
var { as, type = 'note', header = null, children, description = null, className } = _a, restProps = __rest(_a, ["as", "type", "header", "children", "description", "className"]);
|
|
71
|
+
const Component = as || 'div';
|
|
72
|
+
const classes = classNames('ndl-callout', className, {
|
|
73
|
+
'ndl-callout-note': type === 'note',
|
|
74
|
+
'ndl-callout-important': type === 'important',
|
|
75
|
+
'ndl-callout-example': type === 'example',
|
|
76
|
+
'ndl-callout-tip': type === 'tip',
|
|
77
|
+
});
|
|
78
|
+
return (_jsxs(Component, Object.assign({ ref: ref }, restProps, { className: classes, children: [_jsx("div", { className: "ndl-callout-rectangle" }), _jsxs("div", { className: "ndl-callout-wrapper", children: [getStatusIcon(type), _jsxs("div", { className: "ndl-callout-content", children: [_jsx(Typography, { variant: "h6", className: "ndl-callout-title", children: type.toUpperCase() }), header && (_jsx(Typography, { variant: "subheading-medium", className: "ndl-callout-header", children: header })), (description || children) && (_jsx(Typography, { variant: "body-medium", className: "ndl-callout-description", children: children || description }))] })] })] })));
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=Callout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../src/callout/Callout.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAwB3C;;;;;;GAMG;AAEH,MAAM,aAAa,GAAG,CAAC,QAAqB,EAAE,EAAE;IAC9C,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,WAAW;YACd,aAAa,GAAG,CACd,KAAC,8BAA8B,IAAC,SAAS,EAAC,4BAA4B,GAAG,CAC1E,CAAC;YACF,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,CACd,KAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,GAAG,CAC3D,CAAC;YACF,MAAM;QACR,KAAK,KAAK;YACR,aAAa,GAAG,KAAC,oBAAoB,IAAC,SAAS,EAAC,sBAAsB,GAAG,CAAC;YAC1E,MAAM;QACR,KAAK,MAAM,CAAC;QACZ;YACE,aAAa,GAAG,CACd,KAAC,4BAA4B,IAAC,SAAS,EAAC,uBAAuB,GAAG,CACnE,CAAC;KACL;IAED,OAAO,cAAK,SAAS,EAAC,kBAAkB,YAAE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22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Callout';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/callout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,WAAW,CAAC"}
|
package/lib/esm/index.js
CHANGED
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC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AC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { type ElementBase } from '../helpers';
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* Types
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export interface CalloutProps extends ElementBase<HTMLDivElement> {
|
|
31
|
+
/** Type of the callout */
|
|
32
|
+
type?: CalloutType;
|
|
33
|
+
/** Header of the callout */
|
|
34
|
+
header?: string | React.ReactNode;
|
|
35
|
+
/** Alternative for `description` */
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
/** Description of the callout. Will be ignored if `children` is passed */
|
|
38
|
+
description?: string | React.ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export type CalloutType = 'note' | 'important' | 'example' | 'tip';
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* Callout Component
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export declare const Callout: React.ForwardRefExoticComponent<CalloutProps & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Callout';
|
package/lib/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
"pretest": "yarn run lint",
|
|
45
45
|
"test": "yarn test:unit && yarn test:playwright",
|
|
46
46
|
"test:unit": "vitest --run --typecheck",
|
|
47
|
-
"test:playwright": "playwright test -c playwright-component-testing.config.ts",
|
|
47
|
+
"test:playwright": "npx --no playwright test -c playwright-component-testing.config.ts",
|
|
48
48
|
"build": "yarn build:esm && yarn build:cjs && yarn build:types",
|
|
49
|
+
"postinstall": "npx --no playwright install",
|
|
49
50
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
50
51
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
51
52
|
"watch:esm": "tsc -p tsconfig.esm.json --watch",
|
|
@@ -55,7 +56,8 @@
|
|
|
55
56
|
"lint": "eslint --ext .jsx,.tsx,.js,.ts src",
|
|
56
57
|
"generate:all": "yarn generate:custom-icons && yarn generate:hero-icons",
|
|
57
58
|
"generate:custom-icons": "svgr --template svgr-template.js --index-template svgr-index-template.js --icon --typescript --no-svgo --replace-attr-values '#535B66=currentColor' --jsx-runtime 'automatic' --out-dir ./src/icons/generated/custom -- ../base/src/icons",
|
|
58
|
-
"generate:hero-icons": "ts-node ./scripts/generatedHeroIcons.ts"
|
|
59
|
+
"generate:hero-icons": "ts-node ./scripts/generatedHeroIcons.ts",
|
|
60
|
+
"nuke:local": "npx --yes rimraf@5.0.5 .tsbuildinfo node_modules playwright-report test-results playwright/.cache"
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@axe-core/playwright": "4.9.0",
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
"@floating-ui/react": "0.25.1",
|
|
91
93
|
"@heroicons/react": "2.0.13",
|
|
92
94
|
"@neo4j-cypher/react-codemirror": "^1.0.1",
|
|
93
|
-
"@neo4j-ndl/base": "^2.
|
|
95
|
+
"@neo4j-ndl/base": "^2.10.1",
|
|
94
96
|
"@table-nav/core": "0.0.7",
|
|
95
97
|
"@table-nav/react": "0.0.7",
|
|
96
98
|
"@tanstack/react-table": "^8.9.3",
|