@neo4j-ndl/react 0.1.0 → 0.1.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/lib/alert/Alert.d.ts +9 -4
- package/lib/alert/Alert.js +13 -6
- package/lib/alert/Alert.js.map +1 -1
- package/lib/button/Button.d.ts +2 -2
- package/lib/button/Button.js +21 -19
- package/lib/button/Button.js.map +1 -1
- package/lib/checkbox/Checkbox.js +3 -0
- package/lib/checkbox/Checkbox.js.map +1 -1
- package/lib/context-menu/ContextMenu.d.ts +3 -3
- package/lib/context-menu/ContextMenu.js +24 -22
- package/lib/context-menu/ContextMenu.js.map +1 -1
- package/lib/helpers/testing.d.ts +28 -0
- package/lib/helpers/testing.js +81 -0
- package/lib/helpers/testing.js.map +1 -0
- package/lib/helpers/types.d.ts +1 -1
- package/lib/icons/Custom.d.ts +2 -2
- package/lib/icons/Custom.js +3 -4
- package/lib/icons/Custom.js.map +1 -1
- package/lib/icons/Hero.d.ts +2 -2
- package/lib/icons/Hero.js +3 -4
- package/lib/icons/Hero.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/input/Input.js +2 -2
- package/lib/input/Input.js.map +1 -1
- package/lib/label/Label.d.ts +1 -1
- package/lib/label/Label.js +28 -6
- package/lib/label/Label.js.map +1 -1
- package/lib/loading-spinner/LoadingSpinner.d.ts +2 -2
- package/lib/loading-spinner/LoadingSpinner.js +27 -8
- package/lib/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/popover/Popover.js +4 -3
- package/lib/popover/Popover.js.map +1 -1
- package/lib/progress-bar/ProgressBar.d.ts +2 -1
- package/lib/progress-bar/ProgressBar.js +29 -5
- package/lib/progress-bar/ProgressBar.js.map +1 -1
- package/lib/radio/Radio.d.ts +2 -2
- package/lib/radio/Radio.js +3 -3
- package/lib/radio/Radio.js.map +1 -1
- package/lib/switch/Switch.js +1 -2
- package/lib/switch/Switch.js.map +1 -1
- package/lib/tabs/Tabs.d.ts +3 -3
- package/lib/tabs/Tabs.js +26 -17
- package/lib/tabs/Tabs.js.map +1 -1
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/Tag.js +29 -9
- package/lib/tag/Tag.js.map +1 -1
- package/lib/tooltip/Tooltip.d.ts +1 -1
- package/lib/tooltip/Tooltip.js +5 -3
- package/lib/tooltip/Tooltip.js.map +1 -1
- package/lib/view-selector/ViewSelector.d.ts +3 -10
- package/lib/view-selector/ViewSelector.js +31 -14
- package/lib/view-selector/ViewSelector.js.map +1 -1
- package/package.json +5 -3
package/lib/alert/Alert.d.ts
CHANGED
|
@@ -36,11 +36,16 @@ export interface AlertActionProps extends React.HTMLProps<HTMLAnchorElement> {
|
|
|
36
36
|
/** Sets how to open the link. Only applicable when `href` is passed */
|
|
37
37
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
export interface AlertCommonProps extends Omit<React.HTMLProps<HTMLElement>, 'title'> {
|
|
40
40
|
/** Type of the alert */
|
|
41
41
|
type?: AlertType;
|
|
42
42
|
/** Title of the alert */
|
|
43
|
-
title: string;
|
|
43
|
+
title: string | React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* The alert name or label. Used for accessibility only.
|
|
46
|
+
* Required if title is not a string
|
|
47
|
+
*/
|
|
48
|
+
name?: string;
|
|
44
49
|
/** Description of the alert. Will be ignored if `children` is passed */
|
|
45
50
|
description?: string | React.ReactNode;
|
|
46
51
|
/** Alternative for `description` */
|
|
@@ -63,8 +68,8 @@ declare type NonCloseableAlertProps = {
|
|
|
63
68
|
onClose?: never;
|
|
64
69
|
};
|
|
65
70
|
declare type AlertCloseProps = CloseableAlertProps | NonCloseableAlertProps;
|
|
66
|
-
export declare type AlertProps =
|
|
71
|
+
export declare type AlertProps = AlertCommonProps & AlertCloseProps;
|
|
67
72
|
export declare type AlertType = 'info' | 'success' | 'warning' | 'danger';
|
|
68
73
|
export declare const AlertAction: ({ label, ...props }: AlertActionProps) => JSX.Element;
|
|
69
|
-
declare const Alert: ({ type, icon, title, actions, floating, description, onClose, className, children, closeable, }: AlertProps) => JSX.Element;
|
|
74
|
+
declare const Alert: React.ForwardRefExoticComponent<(Pick<AlertCommonProps & CloseableAlertProps, "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" | "nonce" | "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" | "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" | "icon" | "actions" | "floating" | "description" | keyof CloseableAlertProps> | Pick<AlertCommonProps & NonCloseableAlertProps, "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" | "nonce" | "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" | "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" | "icon" | "actions" | "floating" | "description" | keyof NonCloseableAlertProps>) & React.RefAttributes<HTMLDivElement>>;
|
|
70
75
|
export default Alert;
|
package/lib/alert/Alert.js
CHANGED
|
@@ -57,6 +57,7 @@ var icons_1 = require("../icons");
|
|
|
57
57
|
*
|
|
58
58
|
*/
|
|
59
59
|
var TITLE_PROPS_ERROR = 'Alert Component: expected `title` prop';
|
|
60
|
+
var NAME_PROPS_ERROR = 'Alert Component: expected `name` prop when title is not a string';
|
|
60
61
|
var getStatusIcon = function (iconType) {
|
|
61
62
|
var iconComponent;
|
|
62
63
|
switch (iconType) {
|
|
@@ -79,12 +80,18 @@ var AlertAction = function (_a) {
|
|
|
79
80
|
return react_1["default"].createElement("a", __assign({}, props), label);
|
|
80
81
|
};
|
|
81
82
|
exports.AlertAction = AlertAction;
|
|
82
|
-
var Alert = function (_a) {
|
|
83
|
+
var Alert = react_1["default"].forwardRef(function Alert(_a, ref) {
|
|
83
84
|
var _b;
|
|
84
|
-
var _c = _a.type, type = _c === void 0 ? 'info' : _c, _d = _a.icon, icon = _d === void 0 ? false : _d, title = _a.title, _e = _a.actions, actions = _e === void 0 ? [] : _e, _f = _a.floating, floating = _f === void 0 ? false : _f, _g = _a.description, description = _g === void 0 ? null : _g, onClose = _a.onClose, _h = _a.className, className = _h === void 0 ? '' : _h, _j = _a.children, children = _j === void 0 ? null : _j, _k = _a.closeable, closeable = _k === void 0 ? false : _k;
|
|
85
|
+
var _c = _a.type, type = _c === void 0 ? 'info' : _c, _d = _a.icon, icon = _d === void 0 ? false : _d, title = _a.title, name = _a.name, _e = _a.actions, actions = _e === void 0 ? [] : _e, _f = _a.floating, floating = _f === void 0 ? false : _f, _g = _a.description, description = _g === void 0 ? null : _g, onClose = _a.onClose, _h = _a.className, className = _h === void 0 ? '' : _h, _j = _a.children, children = _j === void 0 ? null : _j, _k = _a.closeable, closeable = _k === void 0 ? false : _k, rest = __rest(_a, ["type", "icon", "title", "name", "actions", "floating", "description", "onClose", "className", "children", "closeable"]);
|
|
85
86
|
if (!title) {
|
|
86
87
|
console.error(TITLE_PROPS_ERROR);
|
|
87
88
|
}
|
|
89
|
+
if (typeof title !== 'string' && !name) {
|
|
90
|
+
console.error(NAME_PROPS_ERROR);
|
|
91
|
+
}
|
|
92
|
+
if (typeof title === 'string' && !name) {
|
|
93
|
+
name = title;
|
|
94
|
+
}
|
|
88
95
|
var classes = (0, classnames_1["default"])("ndl-alert", (_b = {},
|
|
89
96
|
_b['with-description'] = description,
|
|
90
97
|
_b['info'] = type === 'info',
|
|
@@ -94,21 +101,21 @@ var Alert = function (_a) {
|
|
|
94
101
|
_b['floating'] = floating,
|
|
95
102
|
_b[className] = className && className !== '',
|
|
96
103
|
_b));
|
|
97
|
-
var TitleTag = description ? 'h5' : 'div';
|
|
104
|
+
var TitleTag = description || children ? 'h5' : 'div';
|
|
98
105
|
var handleClose = function (e) {
|
|
99
106
|
if (onClose && typeof onClose === 'function') {
|
|
100
107
|
onClose(e);
|
|
101
108
|
}
|
|
102
109
|
};
|
|
103
|
-
return (react_1["default"].createElement("div", { className: classes, role: closeable ? 'alertdialog' : 'alert' },
|
|
110
|
+
return (react_1["default"].createElement("div", __assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }),
|
|
104
111
|
icon && getStatusIcon(type),
|
|
105
112
|
react_1["default"].createElement("div", { className: "alert-content" },
|
|
106
113
|
react_1["default"].createElement(TitleTag, { className: "alert-title" },
|
|
107
114
|
react_1["default"].createElement("div", null, title),
|
|
108
|
-
closeable && (react_1["default"].createElement("div", { tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose },
|
|
115
|
+
closeable && (react_1["default"].createElement("div", { tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose, "aria-label": "close-alert" },
|
|
109
116
|
react_1["default"].createElement(icons_1.HeroIcon, { iconName: "XIcon" })))),
|
|
110
117
|
(description || children) && (react_1["default"].createElement("div", { className: "alert-description" }, children || description)),
|
|
111
118
|
actions && actions.length > 0 && (react_1["default"].createElement("div", { className: "alert-actions" }, actions.map(function (action, index) { return (react_1["default"].createElement(exports.AlertAction, __assign({ key: index }, action))); }))))));
|
|
112
|
-
};
|
|
119
|
+
});
|
|
113
120
|
exports["default"] = Alert;
|
|
114
121
|
//# sourceMappingURL=Alert.js.map
|
package/lib/alert/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAoC;AACpC,gDAA0B;AAC1B,kCAAoC;
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAoC;AACpC,gDAA0B;AAC1B,kCAAoC;AA4EpC;;;;;;GAMG;AAEH,IAAM,iBAAiB,GAAG,wCAAwC,CAAC;AACnE,IAAM,gBAAgB,GACpB,kEAAkE,CAAC;AAErE,IAAM,aAAa,GAAG,UAAC,QAAmB;IACxC,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,aAAa,GAAG,iCAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,iCAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;YACrE,MAAM;QACR,KAAK,QAAQ;YACX,aAAa,GAAG,CACd,iCAAC,gBAAQ,IAAC,QAAQ,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IAAI,QAAQ,CAAC,IAAI,CAC5B,0CAAK,SAAS,EAAC,mBAAmB,IAAE,QAAQ,IAAI,WAAW,CAAO,CACnE;YACA,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,0CAAK,SAAS,EAAC,eAAe,IAC3B,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAC9B,iCAAC,mBAAW,aAAC,GAAG,EAAE,KAAK,IAAM,MAAM,EAAI,CACxC,EAF+B,CAE/B,CAAC,CACE,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAe,KAAK,CAAC"}
|
package/lib/button/Button.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface ButtonProps extends ElementBase<HTMLButtonElement> {
|
|
|
39
39
|
/** If the button is in disabled state */
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
/** the base color of the button */
|
|
42
|
-
color?: Neo4jColors
|
|
42
|
+
color?: Exclude<Neo4jColors, 'blueberry' | 'mint'>;
|
|
43
43
|
type?: ButtonTypes;
|
|
44
44
|
/** Fill type of button */
|
|
45
45
|
fill?: 'filled' | 'outlined' | 'text';
|
|
@@ -48,5 +48,5 @@ export interface ButtonProps extends ElementBase<HTMLButtonElement> {
|
|
|
48
48
|
/** Rectanle (for icon usage mainly) */
|
|
49
49
|
rectangle?: boolean;
|
|
50
50
|
}
|
|
51
|
-
export declare const Button:
|
|
51
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
|
|
52
52
|
export {};
|
package/lib/button/Button.js
CHANGED
|
@@ -58,53 +58,55 @@ var removeSpaces = function (input) {
|
|
|
58
58
|
return input.replace(/\s+/g, ' ').trim();
|
|
59
59
|
};
|
|
60
60
|
exports.removeSpaces = removeSpaces;
|
|
61
|
-
|
|
61
|
+
exports.Button = react_1["default"].forwardRef(function Button(_a, ref) {
|
|
62
62
|
var _b;
|
|
63
|
-
var children = _a.children, as = _a.as, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.color, color = _e === void 0 ? 'primary' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.fill, fill = _g === void 0 ? 'filled' : _g, _h = _a.rectangle, rectangle = _h === void 0 ? false : _h, _j = _a.buttonSize, buttonSize = _j === void 0 ? 'regular' : _j, onClick = _a.onClick, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "onClick"]);
|
|
63
|
+
var children = _a.children, as = _a.as, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.color, color = _e === void 0 ? 'primary' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.fill, fill = _g === void 0 ? 'filled' : _g, _h = _a.rectangle, rectangle = _h === void 0 ? false : _h, _j = _a.buttonSize, buttonSize = _j === void 0 ? 'regular' : _j, className = _a.className, onClick = _a.onClick, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick"]);
|
|
64
64
|
var Component = as || 'button';
|
|
65
65
|
if (!as && props.href) {
|
|
66
66
|
Component = 'a';
|
|
67
67
|
}
|
|
68
|
-
var BASE_SHADE = color === 'neutral' ? 80 : 40;
|
|
69
|
-
var BASE_SHADES = {
|
|
70
|
-
LIGHT: BASE_SHADE - 10,
|
|
71
|
-
NEUTRAL: BASE_SHADE,
|
|
72
|
-
DARK: BASE_SHADE + 10
|
|
73
|
-
};
|
|
74
68
|
var interactable = !disabled && !loading;
|
|
75
|
-
var classes = (0, classnames_1["default"])("ndl-btn
|
|
69
|
+
var classes = (0, classnames_1["default"])("ndl-btn ".concat(fill, " ").concat(buttonSize), (_b = {
|
|
76
70
|
disabled: disabled,
|
|
77
71
|
loading: loading,
|
|
78
72
|
rectangle: rectangle
|
|
79
73
|
},
|
|
80
74
|
/** Now check button is outlined or filled */
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Notice:
|
|
77
|
+
* "Hover" here does not exist for "warning" and "success"
|
|
78
|
+
* and is custom for Neutral
|
|
79
|
+
*/
|
|
80
|
+
_b["\n ".concat(color === 'neutral'
|
|
81
|
+
? "n-bg-light-".concat(color, "-bg-strongest")
|
|
82
|
+
: "n-bg-light-".concat(color, "-bg-strong"), "\n ").concat(interactable && "hover:n-bg-light-".concat(color, "-hover-strong"), "\n ")] = fill === 'filled',
|
|
83
|
+
_b["\n n-text-light-".concat(color, "-text\n ").concat(interactable && "hover:n-bg-light-".concat(color, "-hover-weak"), "\n n-border-light-").concat(color, "-bg-strong\n ")] = fill === 'outlined' && color !== 'neutral',
|
|
83
84
|
/**
|
|
84
85
|
* Neutral needs overriding as it doesn't follow
|
|
85
86
|
* the same principles with colored variations
|
|
86
87
|
*/
|
|
87
88
|
_b["\n n-text-".concat(color, "-80\n n-bg-").concat(color, "-10\n ").concat(interactable && "hover:n-bg-".concat(color, "-20"), "\n n-border-").concat(color, "-60\n ")] = fill === 'outlined' && color === 'neutral',
|
|
88
89
|
_b["\t\n n-text-".concat(color, "-50\n ").concat(interactable && "hover:n-bg-".concat(color, "-10"), "\n ")] = fill === 'text' && color !== 'neutral',
|
|
89
|
-
_b["\t\n
|
|
90
|
+
_b["\t\n n-text-light-neutral-text-weak\n ".concat(interactable && "hover:n-bg-light-neutral-bg-default", "\n ")] = fill === 'text' && color == 'neutral',
|
|
90
91
|
_b));
|
|
91
|
-
var className = props.className;
|
|
92
92
|
var sanitisedClasses = (0, exports.removeSpaces)((0, exports.removeNewlines)(classes));
|
|
93
93
|
var handleClick = function (e) {
|
|
94
|
-
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
if (!interactable) {
|
|
96
|
+
e.preventDefault();
|
|
95
97
|
return;
|
|
98
|
+
}
|
|
96
99
|
if (onClick) {
|
|
97
100
|
onClick(e);
|
|
98
101
|
}
|
|
99
|
-
else {
|
|
102
|
+
else if (!props.href) {
|
|
100
103
|
console.error('onClick was not provided');
|
|
101
104
|
}
|
|
102
105
|
};
|
|
103
106
|
return (react_1["default"].createElement(Component
|
|
104
107
|
/** First props and then className to avoid overriding in classNames */
|
|
105
|
-
, __assign({}, props, (Component === 'button' ? { type: type } : {}), { onClick: handleClick, disabled: !interactable, className: [sanitisedClasses, className].join(' ') }),
|
|
106
|
-
loading ? (react_1["default"].createElement(loading_spinner_1.LoadingSpinner, { className: "n-
|
|
108
|
+
, __assign({}, props, (Component === 'button' ? { type: type } : {}), { onClick: handleClick, disabled: !interactable, className: [sanitisedClasses, className].join(' '), ref: ref }),
|
|
109
|
+
loading ? (react_1["default"].createElement(loading_spinner_1.LoadingSpinner, { className: "n-my-auto n-mr-1", size: "small" })) : null,
|
|
107
110
|
children));
|
|
108
|
-
};
|
|
109
|
-
exports.Button = Button;
|
|
111
|
+
});
|
|
110
112
|
//# sourceMappingURL=Button.js.map
|
package/lib/button/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/button/Button.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAAoC;AAEpC,sDAAoD;AAG7C,IAAM,cAAc,GAAG,UAAC,KAAa;IAC1C,OAAA,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;AAAnC,CAAmC,CAAC;AADzB,QAAA,cAAc,kBACW;AAEtC,qCAAqC;AAC9B,IAAM,YAAY,GAAG,UAAC,KAAa;IACxC,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE;AAAjC,CAAiC,CAAC;AADvB,QAAA,YAAY,gBACW;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/button/Button.tsx"],"names":[],"mappings":";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AO,CACL,iCAAC,SAAS;IACR,uEAAuE;mBACnE,KAAK,EAEL,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAC5C,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,CAAC,YAAY,EACvB,SAAS,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAClD,GAAG,EAAE,GAAG;QAEP,OAAO,CAAC,CAAC,CAAC,CACT,iCAAC,gCAAc,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO,GAAG,CAC7D,CAAC,CAAC,CAAC,IAAI;QACP,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/checkbox/Checkbox.js
CHANGED
|
@@ -52,6 +52,9 @@ var input_1 = require("../input");
|
|
|
52
52
|
*
|
|
53
53
|
*/
|
|
54
54
|
var Checkbox = react_1["default"].forwardRef(function (props, ref) {
|
|
55
|
+
if (!props['aria-label'] && !props.label) {
|
|
56
|
+
console.warn('To be accesible the input component requires either `aria-label` or `label` prop: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI');
|
|
57
|
+
}
|
|
55
58
|
return react_1["default"].createElement(input_1.Input, __assign({}, props, { ref: ref, type: "checkbox", role: "checkbox" }));
|
|
56
59
|
});
|
|
57
60
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,kCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,QAAQ,GAAG,kBAAK,CAAC,UAAU,CAC/B,UAAC,KAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,kCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,QAAQ,GAAG,kBAAK,CAAC,UAAU,CAC/B,UAAC,KAAiB,EAAE,GAAyC;IAC3D,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;QACxC,OAAO,CAAC,IAAI,CACV,sJAAsJ,CACvJ,CAAC;KACH;IAED,OAAO,iCAAC,aAAK,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,IAAG,CAAC;AACxE,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,qBAAe,QAAQ,CAAC"}
|
|
@@ -38,7 +38,7 @@ interface MenuItemsProps extends ElementBase {
|
|
|
38
38
|
/** Additional classes */
|
|
39
39
|
className?: string;
|
|
40
40
|
}
|
|
41
|
-
export declare const MenuItems:
|
|
41
|
+
export declare const MenuItems: React.ForwardRefExoticComponent<Pick<MenuItemsProps, "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" | "nonce" | "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" | "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"> & React.RefAttributes<unknown>>;
|
|
42
42
|
interface MenuItemProps extends Omit<ElementBase, 'title' | 'onClick'> {
|
|
43
43
|
/** Item title text */
|
|
44
44
|
title: string | React.ReactNode;
|
|
@@ -52,7 +52,7 @@ interface MenuItemProps extends Omit<ElementBase, 'title' | 'onClick'> {
|
|
|
52
52
|
disabled?: boolean;
|
|
53
53
|
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>) => void;
|
|
54
54
|
}
|
|
55
|
-
export declare const MenuItem:
|
|
55
|
+
export declare const MenuItem: React.ForwardRefExoticComponent<Pick<MenuItemProps, "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" | "nonce" | "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" | "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" | "icon" | "description"> & React.RefAttributes<unknown>>;
|
|
56
56
|
interface MenuHeaderProps extends Omit<ElementBase, 'title'> {
|
|
57
57
|
/** Header title text */
|
|
58
58
|
title: string | React.ReactNode;
|
|
@@ -61,5 +61,5 @@ interface MenuHeaderProps extends Omit<ElementBase, 'title'> {
|
|
|
61
61
|
/** Additional classes */
|
|
62
62
|
className?: string;
|
|
63
63
|
}
|
|
64
|
-
export declare const MenuHeader:
|
|
64
|
+
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" | "nonce" | "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" | "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>>;
|
|
65
65
|
export {};
|
|
@@ -78,7 +78,7 @@ var useMenuContext = function () {
|
|
|
78
78
|
return context;
|
|
79
79
|
};
|
|
80
80
|
exports.Menu = (0, react_1.forwardRef)(function Menu(_a, ref) {
|
|
81
|
-
var _b = _a.menuSize, menuSize = _b === void 0 ? 'small' : _b,
|
|
81
|
+
var _b = _a.menuSize, menuSize = _b === void 0 ? 'small' : _b, className = _a.className, _c = _a.minWidth, minWidth = _c === void 0 ? 250 : _c, open = _a.open, onClose = _a.onClose, children = _a.children, rest = __rest(_a, ["menuSize", "className", "minWidth", "open", "onClose", "children"]);
|
|
82
82
|
var menuRef = (0, react_1.useRef)();
|
|
83
83
|
var focusFirstMenuItem = (0, react_1.useCallback)(function () {
|
|
84
84
|
var menu = menuRef.current;
|
|
@@ -111,8 +111,9 @@ exports.Menu = (0, react_1.forwardRef)(function Menu(_a, ref) {
|
|
|
111
111
|
focusFirstMenuItem();
|
|
112
112
|
}
|
|
113
113
|
}, [open, focusFirstMenuItem]);
|
|
114
|
+
var classes = (0, classnames_1["default"])('ndl-menu', menuSize, className);
|
|
114
115
|
return (react_1["default"].createElement(MenuContext.Provider, { value: { onClose: onClose } },
|
|
115
|
-
react_1["default"].createElement(popover_1.Popover, __assign({ tabIndex: -1 }, rest, { open: open, style: __assign({ minWidth: minWidth }, (rest.style || {})), className:
|
|
116
|
+
react_1["default"].createElement(popover_1.Popover, __assign({ tabIndex: -1 }, rest, { open: open, style: __assign({ minWidth: minWidth }, (rest.style || {})), className: classes, ref: menuRef, onClose: onClose }), children)));
|
|
116
117
|
});
|
|
117
118
|
var getMenuItem = function (menuItems, iterator) {
|
|
118
119
|
var activeElement = document.activeElement;
|
|
@@ -154,8 +155,8 @@ var prevElement = function (menuItems, currentEl) {
|
|
|
154
155
|
}
|
|
155
156
|
return null;
|
|
156
157
|
};
|
|
157
|
-
|
|
158
|
-
var _b = _a.as, as = _b === void 0 ? 'ul' : _b, children = _a.children,
|
|
158
|
+
exports.MenuItems = (0, react_1.forwardRef)(function MenuItems(_a, ref) {
|
|
159
|
+
var _b = _a.as, as = _b === void 0 ? 'ul' : _b, children = _a.children, className = _a.className, rest = __rest(_a, ["as", "children", "className"]);
|
|
159
160
|
var menuItemsRef = (0, react_1.useRef)();
|
|
160
161
|
var onClose = useMenuContext().onClose;
|
|
161
162
|
var handleKeyDown = function (event) {
|
|
@@ -165,30 +166,32 @@ var MenuItems = function (_a) {
|
|
|
165
166
|
}
|
|
166
167
|
if (event.key == 'ArrowDown') {
|
|
167
168
|
event.preventDefault();
|
|
169
|
+
event.stopPropagation();
|
|
168
170
|
var newFocusedElement = getMenuItem(menuItems, nextElement);
|
|
169
171
|
newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
|
|
170
172
|
}
|
|
171
173
|
else if (event.key == 'ArrowUp') {
|
|
172
174
|
event.preventDefault();
|
|
175
|
+
event.stopPropagation();
|
|
173
176
|
var newFocusedElement = getMenuItem(menuItems, prevElement);
|
|
174
177
|
newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
|
|
175
178
|
}
|
|
176
179
|
else if (event.key == 'Tab' || event.key == 'Escape') {
|
|
180
|
+
event.preventDefault();
|
|
177
181
|
onClose && onClose(event);
|
|
178
182
|
}
|
|
179
183
|
};
|
|
184
|
+
(0, react_1.useImperativeHandle)(ref, function () { return menuItemsRef.current; });
|
|
180
185
|
var Component = as;
|
|
181
|
-
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
var _b;
|
|
186
|
-
var _c = _a.as, as = _c === void 0 ? 'li' : _c, icon = _a.icon, title = _a.title, description = _a.description, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["as", "icon", "title", "description", "className", "disabled", "onClick", "onKeyDown"]);
|
|
186
|
+
var classes = (0, classnames_1["default"])('menu-items', className);
|
|
187
|
+
return (react_1["default"].createElement(Component, __assign({ tabIndex: -1, onKeyDown: handleKeyDown, role: "menu" }, rest, { className: classes, ref: menuItemsRef }), children));
|
|
188
|
+
});
|
|
189
|
+
exports.MenuItem = (0, react_1.forwardRef)(function MenuItem(_a, ref) {
|
|
190
|
+
var _b = _a.as, as = _b === void 0 ? 'li' : _b, icon = _a.icon, title = _a.title, description = _a.description, className = _a.className, _c = _a.disabled, disabled = _c === void 0 ? false : _c, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["as", "icon", "title", "description", "className", "disabled", "onClick", "onKeyDown"]);
|
|
187
191
|
var Component = as;
|
|
188
|
-
var classes = (0, classnames_1["default"])("menu-item n-flex n-flex-col",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
_b));
|
|
192
|
+
var classes = (0, classnames_1["default"])("menu-item n-flex n-flex-col", className, {
|
|
193
|
+
disabled: disabled
|
|
194
|
+
});
|
|
192
195
|
var handleClick = function (e) {
|
|
193
196
|
if (disabled)
|
|
194
197
|
return;
|
|
@@ -205,24 +208,23 @@ var MenuItem = function (_a) {
|
|
|
205
208
|
onClick(e);
|
|
206
209
|
}
|
|
207
210
|
};
|
|
208
|
-
return (react_1["default"].createElement(Component, __assign({ tabIndex: -1, role: "menuitem" }, rest, { className: classes, onClick: handleClick, onKeyDown: handleKeyDown }),
|
|
211
|
+
return (react_1["default"].createElement(Component, __assign({ tabIndex: -1, role: "menuitem" }, rest, { className: classes, onClick: handleClick, onKeyDown: handleKeyDown, ref: ref }),
|
|
209
212
|
react_1["default"].createElement("div", { className: "n-flex n-items-center" },
|
|
210
213
|
icon && react_1["default"].createElement("div", { className: "menu-item-icon" }, icon),
|
|
211
214
|
react_1["default"].createElement("div", { className: "menu-item-title" }, title)),
|
|
212
215
|
description && (react_1["default"].createElement("div", { className: "menu-item-description" }, description))));
|
|
213
|
-
};
|
|
214
|
-
exports.
|
|
215
|
-
var
|
|
216
|
-
var _b = _a.as, as = _b === void 0 ? 'div' : _b, title = _a.title, description = _a.description, _c = _a.className, className = _c === void 0 ? '' : _c, rest = __rest(_a, ["as", "title", "description", "className"]);
|
|
216
|
+
});
|
|
217
|
+
exports.MenuHeader = (0, react_1.forwardRef)(function MenuHeader(_a, ref) {
|
|
218
|
+
var _b = _a.as, as = _b === void 0 ? 'div' : _b, title = _a.title, description = _a.description, className = _a.className, rest = __rest(_a, ["as", "title", "description", "className"]);
|
|
217
219
|
var Component = as;
|
|
218
220
|
var onClose = useMenuContext().onClose;
|
|
219
221
|
var handleClose = function (e) { return onClose && onClose(e); };
|
|
220
|
-
|
|
222
|
+
var classes = (0, classnames_1["default"])('menu-header n-flex n-flex-col', className);
|
|
223
|
+
return (react_1["default"].createElement(Component, __assign({}, rest, { className: classes, ref: ref }),
|
|
221
224
|
react_1["default"].createElement("div", { className: "n-flex n-justify-between n-items-center" },
|
|
222
225
|
react_1["default"].createElement("div", { className: "menu-header-title" }, title),
|
|
223
226
|
react_1["default"].createElement("div", { tabIndex: 0, role: "button", onKeyDown: handleClose, onClick: handleClose, className: "menu-header-icon" },
|
|
224
227
|
react_1["default"].createElement(icons_1.HeroIcon, { iconName: "XIcon" }))),
|
|
225
228
|
description && (react_1["default"].createElement("div", { className: "menu-header-description" }, description))));
|
|
226
|
-
};
|
|
227
|
-
exports.MenuHeader = MenuHeader;
|
|
229
|
+
});
|
|
228
230
|
//# sourceMappingURL=ContextMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAOe;AACf,kCAAoC;AACpC,sCAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../src/context-menu/ContextMenu.tsx"],"names":[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I,CACd,0CAAK,SAAS,EAAC,yBAAyB,IAAE,WAAW,CAAO,CAC7D,CACS,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
/**
|
|
22
|
+
* A11y testing with Axe
|
|
23
|
+
* Jest helper to the container for HTML
|
|
24
|
+
* inaccessibilities
|
|
25
|
+
*
|
|
26
|
+
* More: https://github.com/nickcolley/jest-axe
|
|
27
|
+
*/
|
|
28
|
+
export declare const a11yValidation: (container: HTMLElement) => Promise<void>;
|