@neo4j-ndl/react 1.0.4 → 1.0.6
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 +14 -0
- package/lib/LICENSES.txt +206 -0
- package/lib/NOTICE.txt +11 -9
- package/lib/cjs/_common/coditionalWrap.js +9 -0
- package/lib/cjs/_common/coditionalWrap.js.map +1 -0
- package/lib/cjs/context-menu/ContextMenu.js +1 -1
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Circle.js.map +1 -1
- package/lib/cjs/icons/generated/custom/CollapseExpand.js.map +1 -1
- package/lib/cjs/icons/generated/custom/CollapseExpandLeft.js.map +1 -1
- package/lib/cjs/icons/generated/custom/CollapseExpandRight.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Configure.js.map +1 -1
- package/lib/cjs/icons/generated/custom/DatabaseAddCircle.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Dbms.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Drag.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Expand.js.map +1 -1
- package/lib/cjs/icons/generated/custom/ExternalLink.js.map +1 -1
- package/lib/cjs/icons/generated/custom/FitToScreen.js.map +1 -1
- package/lib/cjs/icons/generated/custom/FolderBookmark.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Heirarchy2.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Hierarchy1.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Hierarchy2.js.map +1 -1
- package/lib/cjs/icons/generated/custom/NomLevel.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Pin.js.map +1 -1
- package/lib/cjs/icons/generated/custom/PlanView.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Presentation.js.map +1 -1
- package/lib/cjs/icons/generated/custom/QueryBrowser.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Rhombus.js.map +1 -1
- package/lib/cjs/icons/generated/custom/ScienceMolecule.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Shrink.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Square.js +6 -0
- package/lib/cjs/icons/generated/custom/Square.js.map +1 -0
- package/lib/cjs/icons/generated/custom/Status.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Text.js.map +1 -1
- package/lib/cjs/icons/generated/custom/Triangle.js.map +1 -1
- package/lib/cjs/icons/generated/custom/VisualizeBloom.js.map +1 -1
- package/lib/cjs/icons/generated/custom/index.js +5 -1
- package/lib/cjs/icons/generated/custom/index.js.map +1 -1
- package/lib/cjs/label/Label.js +37 -29
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/modal/Modal.js +2 -2
- package/lib/cjs/modal/Modal.js.map +1 -1
- package/lib/cjs/popover/Popover.js +11 -2
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/status-indicator/StatusIndicator.js +4 -4
- package/lib/esm/_common/coditionalWrap.js +5 -0
- package/lib/esm/_common/coditionalWrap.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +1 -1
- package/lib/esm/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/icons/generated/custom/Circle.js.map +1 -1
- package/lib/esm/icons/generated/custom/CollapseExpand.js.map +1 -1
- package/lib/esm/icons/generated/custom/CollapseExpandLeft.js.map +1 -1
- package/lib/esm/icons/generated/custom/CollapseExpandRight.js.map +1 -1
- package/lib/esm/icons/generated/custom/Configure.js.map +1 -1
- package/lib/esm/icons/generated/custom/DatabaseAddCircle.js.map +1 -1
- package/lib/esm/icons/generated/custom/Dbms.js.map +1 -1
- package/lib/esm/icons/generated/custom/Drag.js.map +1 -1
- package/lib/esm/icons/generated/custom/Expand.js.map +1 -1
- package/lib/esm/icons/generated/custom/ExternalLink.js.map +1 -1
- package/lib/esm/icons/generated/custom/FitToScreen.js.map +1 -1
- package/lib/esm/icons/generated/custom/FolderBookmark.js.map +1 -1
- package/lib/esm/icons/generated/custom/Heirarchy2.js.map +1 -1
- package/lib/esm/icons/generated/custom/Hierarchy1.js.map +1 -1
- package/lib/esm/icons/generated/custom/Hierarchy2.js.map +1 -1
- package/lib/esm/icons/generated/custom/NomLevel.js.map +1 -1
- package/lib/esm/icons/generated/custom/Pin.js.map +1 -1
- package/lib/esm/icons/generated/custom/PlanView.js.map +1 -1
- package/lib/esm/icons/generated/custom/Presentation.js.map +1 -1
- package/lib/esm/icons/generated/custom/QueryBrowser.js.map +1 -1
- package/lib/esm/icons/generated/custom/Rhombus.js.map +1 -1
- package/lib/esm/icons/generated/custom/ScienceMolecule.js.map +1 -1
- package/lib/esm/icons/generated/custom/Shrink.js.map +1 -1
- package/lib/esm/icons/generated/custom/Square.js +4 -0
- package/lib/esm/icons/generated/custom/Square.js.map +1 -0
- package/lib/esm/icons/generated/custom/Status.js.map +1 -1
- package/lib/esm/icons/generated/custom/Text.js.map +1 -1
- package/lib/esm/icons/generated/custom/Triangle.js.map +1 -1
- package/lib/esm/icons/generated/custom/VisualizeBloom.js.map +1 -1
- package/lib/esm/icons/generated/custom/index.js +3 -0
- package/lib/esm/icons/generated/custom/index.js.map +1 -1
- package/lib/esm/label/Label.js +38 -30
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/modal/Modal.js +2 -2
- package/lib/esm/modal/Modal.js.map +1 -1
- package/lib/esm/popover/Popover.js +11 -2
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/status-indicator/StatusIndicator.js +4 -4
- package/lib/types/{trap-focus/index.d.ts → _common/coditionalWrap.d.ts} +8 -1
- package/lib/types/context-menu/ContextMenu.d.ts +2 -2
- package/lib/{esm/trap-focus/index.js → types/icons/generated/custom/Square.d.ts} +3 -2
- package/lib/types/icons/generated/custom/index.d.ts +1 -0
- package/lib/types/popover/Popover.d.ts +3 -1
- package/package.json +5 -3
- package/lib/cjs/trap-focus/TrapFocus.js +0 -310
- package/lib/cjs/trap-focus/TrapFocus.js.map +0 -1
- package/lib/cjs/trap-focus/index.js +0 -38
- package/lib/cjs/trap-focus/index.js.map +0 -1
- package/lib/esm/trap-focus/TrapFocus.js +0 -283
- package/lib/esm/trap-focus/TrapFocus.js.map +0 -1
- package/lib/esm/trap-focus/index.js.map +0 -1
- package/lib/types/trap-focus/TrapFocus.d.ts +0 -34
package/lib/esm/label/Label.js
CHANGED
|
@@ -32,7 +32,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
*/
|
|
33
33
|
import React from 'react';
|
|
34
34
|
import classnames from 'classnames';
|
|
35
|
-
import { CircleIcon, RhombusIcon, TriangleIcon } from '../icons';
|
|
35
|
+
import { CircleIcon, RhombusIcon, TriangleIcon, SquareIcon } from '../icons';
|
|
36
|
+
import { tokens } from '@neo4j-ndl/base';
|
|
36
37
|
/**
|
|
37
38
|
*
|
|
38
39
|
*
|
|
@@ -55,40 +56,47 @@ export const Label = React.forwardRef(function Label(_a, ref) {
|
|
|
55
56
|
if (!withIcon && fill === 'clean') {
|
|
56
57
|
console.error('Label without icon is not allowed');
|
|
57
58
|
}
|
|
59
|
+
// All colors map to the light-theme palette except the info
|
|
60
|
+
const mappedColor = color === 'info' ? 'primary' : color;
|
|
58
61
|
if (withIcon) {
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
const isFilled = fill === 'filled';
|
|
63
|
+
if (mappedColor === 'default') {
|
|
64
|
+
const fillColor = isFilled ? 'currentColor' : tokens.colors.neutral['60']; // TODO: There currently is no token for bg theme color neutral 60, needs to be added.
|
|
65
|
+
icon = _jsx(SquareIcon, { color: fillColor });
|
|
61
66
|
}
|
|
62
|
-
else if (
|
|
63
|
-
|
|
64
|
-
icon = _jsx(
|
|
67
|
+
else if (mappedColor === 'primary') {
|
|
68
|
+
const fillColor = isFilled ? 'currentColor' : tokens.colors.primary['40']; // TODO: There currently is no token for bg theme color primary 40, needs to be added.
|
|
69
|
+
icon = _jsx(CircleIcon, { color: fillColor });
|
|
65
70
|
}
|
|
66
|
-
else {
|
|
67
|
-
|
|
71
|
+
else if (mappedColor === 'success') {
|
|
72
|
+
const fillColor = isFilled ? 'currentColor' : tokens.colors.success['40']; // TODO: There currently is no token for bg theme color success 40, needs to be added.
|
|
73
|
+
icon = _jsx(CircleIcon, { color: fillColor });
|
|
68
74
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
case 'warning': {
|
|
77
|
-
base = classnames({
|
|
78
|
-
[`n-bg-light-${mappedColor}-bg-strong n-text-neutral-10`]: fill === 'filled',
|
|
79
|
-
[`ndl-outlined n-text-${mappedColor}-60 n-border-light-${mappedColor}-border-strong`]: fill === 'outlined',
|
|
80
|
-
[`ndl-semi-filled n-bg-${mappedColor}-10 n-text-${mappedColor}-60 n-border-light-${mappedColor}-border-weak`]: fill === 'semi-filled',
|
|
81
|
-
[`n-text-${mappedColor}-60`]: fill === 'clean',
|
|
82
|
-
});
|
|
83
|
-
break;
|
|
75
|
+
else if (mappedColor === 'danger') {
|
|
76
|
+
const fillColor = isFilled ? 'currentColor' : tokens.colors.danger['40']; // TODO: There currently is no token for bg theme color danger 40, needs to be added.
|
|
77
|
+
icon = _jsx(RhombusIcon, { color: fillColor });
|
|
78
|
+
}
|
|
79
|
+
else if (mappedColor === 'warning') {
|
|
80
|
+
const fillColor = isFilled ? 'currentColor' : tokens.colors.warning['50']; // TODO: There currently is no token for bg theme color warning 50, needs to be added.
|
|
81
|
+
icon = _jsx(TriangleIcon, { color: fillColor });
|
|
84
82
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
}
|
|
84
|
+
if (mappedColor === 'default') {
|
|
85
|
+
base = classnames({
|
|
86
|
+
[`n-bg-light-neutral-bg-strongest n-text-light-neutral-text-inverse`]: fill === 'filled',
|
|
87
|
+
// TODO: There currently is no token for border theme color neutral 60, needs to be added.
|
|
88
|
+
[` n-text-light-neutral-text-weak n-border-neutral-60`]: fill === 'outlined',
|
|
89
|
+
[`n-bg-light-neutral-bg-default n-text-light-neutral-text-weak n-border-light-neutral-border-strong`]: fill === 'semi-filled',
|
|
90
|
+
[`n-text-light-neutral-text-weaker`]: fill === 'clean',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
base = classnames({
|
|
95
|
+
[`n-bg-light-${mappedColor}-bg-strong n-text-light-neutral-text-inverse`]: fill === 'filled',
|
|
96
|
+
[`n-text-light-${mappedColor}-text n-border-light-${mappedColor}-border-strong`]: fill === 'outlined',
|
|
97
|
+
[`n-bg-light-${mappedColor}-bg-weak n-text-light-${mappedColor}-text n-border-light-${mappedColor}-border-weak`]: fill === 'semi-filled',
|
|
98
|
+
[`n-text-light-neutral-text-default`]: fill === 'clean',
|
|
99
|
+
});
|
|
92
100
|
}
|
|
93
101
|
const classes = classnames('ndl-label', base, className, {
|
|
94
102
|
'ndl-filled': fill === 'filled',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7E,OAAO,EAAE,MAAM,EAAE,MA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AAC,EAC9E,IAAI,KAAK,UAAU;YACrB,CAAC,cAAc,WAAW,yBAAyB,WAAW,wBAAwB,WAAW,cAAc,CAAC,EAC9G,IAAI,KAAK,aAAa;YACxB,CAAC,mCAAmC,CAAC,EAAE,IAAI,KAAK,OAAO;SACxD,CAAC,CAAC;KACJ;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;QACvD,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,cAAc,EAAE,IAAI,KAAK,UAAU;QACnC,iBAAiB,EAAE,IAAI,KAAK,aAAa;KAC1C,CAAC,CAAC;IAEH,OAAO,CACL,6BACE,IAAI,EAAC,QAAQ,gBACF,OAAO,EAClB,SAAS,EAAE,OAAO,IACd,IAAI,IACR,GAAG,EAAE,GAAG,gBAER,6BAAK,SAAS,EAAC,mBAAmB,iBAC/B,IAAI,EACL;oBACE,gEAAgE;oBAChE,KAAK,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EACxD,SAAS,EAAC,gBAAgB,gBAEzB,QAAQ,IACJ,KACH,IACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/lib/esm/modal/Modal.js
CHANGED
|
@@ -33,8 +33,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
33
33
|
import React, { useEffect } from 'react';
|
|
34
34
|
import classnames from 'classnames';
|
|
35
35
|
import { Portal } from '../portal';
|
|
36
|
-
import { TrapFocus } from '../trap-focus';
|
|
37
36
|
import { useDocumentScrollToggle } from '../_common/utils';
|
|
37
|
+
import { FocusScope } from '@react-aria/focus';
|
|
38
38
|
export var ModalCloseReason;
|
|
39
39
|
(function (ModalCloseReason) {
|
|
40
40
|
ModalCloseReason["BACKDROP_CLICK"] = "backdropClick";
|
|
@@ -77,6 +77,6 @@ export const Modal = (_a) => {
|
|
|
77
77
|
const rootClasses = classnames('ndl-modal-root', {
|
|
78
78
|
'ndl-modal-container': container,
|
|
79
79
|
});
|
|
80
|
-
return (_jsx(Portal, Object.assign({ container: container }, { children: _jsx("div", Object.assign({ className: rootClasses, onKeyDown: handleKeyDown, onClick: handleBackdropClick, "data-testid": "modal-backdrop",
|
|
80
|
+
return (_jsx(Portal, Object.assign({ container: container }, { children: _jsx("div", Object.assign({ className: rootClasses, onKeyDown: handleKeyDown, onClick: handleBackdropClick, "data-testid": "modal-backdrop", role: "presentation", tabIndex: -1 }, { children: _jsx("div", Object.assign({ className: "ndl-modal-wrapper", onMouseDown: handleMouseDown, "data-testid": "modal-wrapper", tabIndex: -1 }, { children: _jsx(FocusScope, Object.assign({ contain: open, restoreFocus: true, autoFocus: true }, { children: _jsx("div", Object.assign({ className: classes }, rest, { children: children })) })) })) })) })));
|
|
81
81
|
};
|
|
82
82
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,M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C;QAEtB,OAAO,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IAE5B,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,SAAS,EAAE;QACjD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,UAAU,CAAC,gBAAgB,EAAE;QAC/C,qBAAqB,EAAE,SAAS;KACjC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,MAAM,kBAAC,SAAS,EAAE,SAAS,gBAC1B,4BACE,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,mBAAmB,iBAChB,gBAAgB,EAC5B,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAE,CAAC,CAAC,gBAGZ,4BACE,SAAS,EAAC,mBAAmB,EAC7B,WAAW,EAAE,eAAe,iBAChB,eAAe,EAC3B,QAAQ,EAAE,CAAC,CAAC,gBAGZ,KAAC,UAAU,kBAAC,OAAO,EAAE,IAAI,EAAE,YAAY,QAAC,SAAS,sBAC/C,4BAAK,SAAS,EAAE,OAAO,IAAM,IAAI,cAC9B,QAAQ,IACL,IACK,IACT,IACF,IACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -35,6 +35,8 @@ import classnames from 'classnames';
|
|
|
35
35
|
import { debounce } from '../helpers';
|
|
36
36
|
import { Portal } from '../portal';
|
|
37
37
|
import { useDocumentScrollToggle, useOnClickOutside } from '../_common/utils';
|
|
38
|
+
import { FocusScope } from '@react-aria/focus';
|
|
39
|
+
import { ConditionalWrap } from '../_common/coditionalWrap';
|
|
38
40
|
const getOffsetTop = (rect, vertical) => {
|
|
39
41
|
let offset = 0;
|
|
40
42
|
if (vertical === 'bottom') {
|
|
@@ -53,7 +55,7 @@ const getOffsetLeft = (rect, horizontal) => {
|
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
export const Popover = forwardRef(function Popover(_a, ref) {
|
|
56
|
-
var { as = 'div', children, open, anchorEl, onClose, anchorOrigin = { vertical: 'bottom', horizontal: 'left' }, transformOrigin = { vertical: 'top', horizontal: 'left' }, transformOriginOffsetFromAnchorOrigin = { vertical: 0, horizontal: 0 }, className, anchorPortal, disableBackdrop = false, nested = false } = _a, rest = __rest(_a, ["as", "children", "open", "anchorEl", "onClose", "anchorOrigin", "transformOrigin", "transformOriginOffsetFromAnchorOrigin", "className", "anchorPortal", "disableBackdrop", "nested"]);
|
|
58
|
+
var { as = 'div', children, open, anchorEl, onClose, anchorOrigin = { vertical: 'bottom', horizontal: 'left' }, transformOrigin = { vertical: 'top', horizontal: 'left' }, transformOriginOffsetFromAnchorOrigin = { vertical: 0, horizontal: 0 }, className, anchorPortal, disableBackdrop = false, nested = false, captureFocus = true } = _a, rest = __rest(_a, ["as", "children", "open", "anchorEl", "onClose", "anchorOrigin", "transformOrigin", "transformOriginOffsetFromAnchorOrigin", "className", "anchorPortal", "disableBackdrop", "nested", "captureFocus"]);
|
|
57
59
|
const Component = as;
|
|
58
60
|
const popoverRef = useRef(null);
|
|
59
61
|
const backdropRef = useRef(null);
|
|
@@ -206,8 +208,15 @@ export const Popover = forwardRef(function Popover(_a, ref) {
|
|
|
206
208
|
return null;
|
|
207
209
|
}
|
|
208
210
|
const classes = classnames('ndl-popover', base, className);
|
|
211
|
+
const handleKeyDown = (event) => {
|
|
212
|
+
if (event.key === 'Escape') {
|
|
213
|
+
onClose && onClose(event);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
209
216
|
return (_jsxs(Portal, Object.assign({ container: anchorPortal ? anchorEl || undefined : undefined }, { children: [_jsx("div", { className: classnames('ndl-popover-backdrop', {
|
|
210
217
|
'ndl-allow-click-event-captured': disableBackdrop,
|
|
211
|
-
}), ref: backdropRef, role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }), _jsx(
|
|
218
|
+
}), ref: backdropRef, role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }), _jsx(ConditionalWrap, Object.assign({ condition: captureFocus, wrapper: (children) => (
|
|
219
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
220
|
+
_jsx(FocusScope, Object.assign({ contain: open, restoreFocus: true, autoFocus: true }, { children: children }))) }, { children: _jsx(Component, Object.assign({}, rest, { className: classes, ref: popoverRef, "data-testid": "popover-content", onKeyDown: handleKeyDown }, { children: children })) }))] })));
|
|
212
221
|
});
|
|
213
222
|
//# sourceMappingURL=Popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,QAAQ,GACT,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ACF,GAAG,EAAE,WAAW,EAChB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,mBAAmB,iBAClB,kBAAkB,GAC9B,EAEF,KAAC,eAAe,kBACd,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;gBACrB,iDAAiD;gBACjD,KAAC,UAAU,kBAAC,OAAO,EAAE,IAAI,EAAE,YAAY,QAAC,SAAS,sBAC9C,QAAQ,IACE,CACd,gBAED,KAAC,SAAS,oBACJ,IAAI,IACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,UAAU,iBACH,iBAAiB,EAC7B,SAAS,EAAE,aAAa,gBAEvB,QAAQ,IACC,IACI,KACX,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -37,13 +37,13 @@ const StatusIndicator = React.forwardRef(function StatusIndicator(_a, ref) {
|
|
|
37
37
|
const className = classNames('ndl-status-indicator', props.className);
|
|
38
38
|
switch (type) {
|
|
39
39
|
case 'success':
|
|
40
|
-
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("circle", { cx: "4", cy: "4", r: "4", fill: "#
|
|
40
|
+
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("circle", { cx: "4", cy: "4", r: "4", fill: "#00BA88" }) })) })));
|
|
41
41
|
case 'info':
|
|
42
|
-
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("circle", { cx: "4", cy: "4", r: "4", fill: "#
|
|
42
|
+
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("circle", { cx: "4", cy: "4", r: "4", fill: "#018BFF" }) })) })));
|
|
43
43
|
case 'warning':
|
|
44
|
-
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M4.57641 0.35903C4.52349 0.251301 4.44144 0.160559 4.33957 0.0970988C4.23769 0.0336384 4.12007 0 4.00005 0C3.88002 0 3.7624 0.0336384 3.66053 0.0970988C3.55865 0.160559 3.4766 0.251301 3.42368 0.35903L0.0554707 7.22061C0.0149262 7.30309 -0.00393024 7.39454 0.000681349 7.48633C0.00529294 7.57812 0.0332205 7.66722 0.0818275 7.74522C0.130434 7.82322 0.198117 7.88754 0.278487 7.93212C0.358856 7.9767 0.44926 8.00006 0.541165 8H7.45893C7.55083 8.00006 7.64124 7.9767 7.7216 7.93212C7.80197 7.88754 7.86966 7.82322 7.91826 7.74522C7.96687 7.66722 7.9948 7.57812 7.99941 7.48633C8.00402 7.39454 7.98517 7.30309 7.94462 7.22061L4.57641 0.35903Z", fill: "#
|
|
44
|
+
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M4.57641 0.35903C4.52349 0.251301 4.44144 0.160559 4.33957 0.0970988C4.23769 0.0336384 4.12007 0 4.00005 0C3.88002 0 3.7624 0.0336384 3.66053 0.0970988C3.55865 0.160559 3.4766 0.251301 3.42368 0.35903L0.0554707 7.22061C0.0149262 7.30309 -0.00393024 7.39454 0.000681349 7.48633C0.00529294 7.57812 0.0332205 7.66722 0.0818275 7.74522C0.130434 7.82322 0.198117 7.88754 0.278487 7.93212C0.358856 7.9767 0.44926 8.00006 0.541165 8H7.45893C7.55083 8.00006 7.64124 7.9767 7.7216 7.93212C7.80197 7.88754 7.86966 7.82322 7.91826 7.74522C7.96687 7.66722 7.9948 7.57812 7.99941 7.48633C8.00402 7.39454 7.98517 7.30309 7.94462 7.22061L4.57641 0.35903Z", fill: "#D9B54A" }) })) })));
|
|
45
45
|
case 'danger':
|
|
46
|
-
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M0.188426 4.45553C0.067771 4.33472 0 4.17097 0 4.00024C0 3.8295 0.067771 3.66575 0.188426 3.54494L3.54489 0.188838C3.6046 0.128979 3.67554 0.0814871 3.75363 0.0490833C3.83173 0.0166795 3.91545 0 4 0C4.08455 0 4.16827 0.0166795 4.24637 0.0490833C4.32446 0.0814871 4.3954 0.128979 4.45511 0.188838L7.81157 3.54494C7.93223 3.66575 8 3.8295 8 4.00024C8 4.17097 7.93223 4.33472 7.81157 4.45553L4.45511 7.81163C4.33437 7.93226 4.17068 8.00003 4 8.00003C3.82932 8.00003 3.66563 7.93226 3.54489 7.81163L0.188426 4.45553Z", fill: "#
|
|
46
|
+
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M0.188426 4.45553C0.067771 4.33472 0 4.17097 0 4.00024C0 3.8295 0.067771 3.66575 0.188426 3.54494L3.54489 0.188838C3.6046 0.128979 3.67554 0.0814871 3.75363 0.0490833C3.83173 0.0166795 3.91545 0 4 0C4.08455 0 4.16827 0.0166795 4.24637 0.0490833C4.32446 0.0814871 4.3954 0.128979 4.45511 0.188838L7.81157 3.54494C7.93223 3.66575 8 3.8295 8 4.00024C8 4.17097 7.93223 4.33472 7.81157 4.45553L4.45511 7.81163C4.33437 7.93226 4.17068 8.00003 4 8.00003C3.82932 8.00003 3.66563 7.93226 3.54489 7.81163L0.188426 4.45553Z", fill: "#ED1252" }) })) })));
|
|
47
47
|
default:
|
|
48
48
|
return (_jsx("span", Object.assign({}, props, { className: className, ref: ref }, { children: _jsx("svg", Object.assign({ width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("rect", { width: "8", height: "8", rx: "1", fill: "#B2B7BD" }) })) })));
|
|
49
49
|
}
|
|
@@ -18,4 +18,11 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
/// <reference types="react" />
|
|
22
|
+
declare type ConditionalWrapProps = {
|
|
23
|
+
condition: boolean;
|
|
24
|
+
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
export declare const ConditionalWrap: ({ condition, wrapper, children, }: ConditionalWrapProps) => JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -39,7 +39,7 @@ export interface ContextMenuProps extends PopoverProps {
|
|
|
39
39
|
/** Whether the menu is nested. Internal prop provided when nesting menu elements */
|
|
40
40
|
nested?: boolean;
|
|
41
41
|
}
|
|
42
|
-
declare const Menu: React.ForwardRefExoticComponent<Pick<ContextMenuProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested" | "minWidth" | "level"> & React.RefAttributes<unknown>>;
|
|
42
|
+
declare const Menu: React.ForwardRefExoticComponent<Pick<ContextMenuProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested" | "captureFocus" | "minWidth" | "level"> & React.RefAttributes<unknown>>;
|
|
43
43
|
interface MenuItemsProps extends ElementBase {
|
|
44
44
|
children: React.ReactNode | string;
|
|
45
45
|
/** Additional classes */
|
|
@@ -74,7 +74,7 @@ interface MenuHeaderProps extends Omit<ElementBase, 'title'> {
|
|
|
74
74
|
className?: string;
|
|
75
75
|
}
|
|
76
76
|
export declare const MenuHeader: React.ForwardRefExoticComponent<Pick<MenuHeaderProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "description"> & React.RefAttributes<unknown>>;
|
|
77
|
-
declare const MenuNamespace: React.ForwardRefExoticComponent<Pick<ContextMenuProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested" | "minWidth" | "level"> & React.RefAttributes<unknown>> & {
|
|
77
|
+
declare const MenuNamespace: React.ForwardRefExoticComponent<Pick<ContextMenuProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested" | "captureFocus" | "minWidth" | "level"> & React.RefAttributes<unknown>> & {
|
|
78
78
|
Divider: () => JSX.Element;
|
|
79
79
|
};
|
|
80
80
|
export { MenuNamespace as Menu };
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
import { SVGProps } from 'react';
|
|
22
|
+
declare const SvgSquare: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
23
|
+
export default SvgSquare;
|
|
@@ -41,6 +41,7 @@ export { default as QueryBrowserIcon } from './QueryBrowser';
|
|
|
41
41
|
export { default as RhombusIcon } from './Rhombus';
|
|
42
42
|
export { default as ScienceMoleculeIcon } from './ScienceMolecule';
|
|
43
43
|
export { default as ShrinkIcon } from './Shrink';
|
|
44
|
+
export { default as SquareIcon } from './Square';
|
|
44
45
|
export { default as StatusIcon } from './Status';
|
|
45
46
|
export { default as TextIcon } from './Text';
|
|
46
47
|
export { default as TriangleIcon } from './Triangle';
|
|
@@ -76,6 +76,8 @@ export interface PopoverProps extends ElementBase {
|
|
|
76
76
|
disableBackdrop?: boolean;
|
|
77
77
|
/** Use anchorEl for portal's container */
|
|
78
78
|
anchorPortal?: boolean;
|
|
79
|
+
/** If the popover should constrain the focus inside the popover while open */
|
|
80
|
+
captureFocus?: boolean;
|
|
79
81
|
}
|
|
80
|
-
export declare const Popover: React.ForwardRefExoticComponent<Pick<PopoverProps, "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested"> & React.RefAttributes<unknown>>;
|
|
82
|
+
export declare const Popover: React.ForwardRefExoticComponent<Pick<PopoverProps, "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "transformOriginOffsetFromAnchorOrigin" | "anchorPortal" | "disableBackdrop" | "nested" | "captureFocus"> & React.RefAttributes<unknown>>;
|
|
81
83
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"build:types": "tsc -p tsconfig.types.json",
|
|
50
50
|
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
|
|
51
51
|
"lint": "eslint --ext .jsx,.tsx,.js,.ts src",
|
|
52
|
-
"generate:
|
|
52
|
+
"generate:all": "yarn generate:custom-icons && yarn generate:hero-icons",
|
|
53
|
+
"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",
|
|
53
54
|
"generate:hero-icons": "ts-node ./scripts/generatedHeroIcons.ts"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
@@ -90,7 +91,8 @@
|
|
|
90
91
|
"dependencies": {
|
|
91
92
|
"@floating-ui/react-dom-interactions": "^0.12.0",
|
|
92
93
|
"@heroicons/react": "2.0.13",
|
|
93
|
-
"@neo4j-ndl/base": "^1.0.
|
|
94
|
+
"@neo4j-ndl/base": "^1.0.2",
|
|
95
|
+
"@react-aria/focus": "^3.10.1",
|
|
94
96
|
"@tanstack/react-table": "^8.5.22",
|
|
95
97
|
"classnames": "^2.3.1",
|
|
96
98
|
"detect-browser": "^5.3.0",
|