Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-menu-list

Package Overview
Dependencies
Maintainers
6
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-menu-list - npm Package Compare versions

Comparing version 7.0.4 to 7.1.0-beta.0

10

CHANGELOG.md

@@ -0,1 +1,7 @@

## 7.1.0 (2022-09-14)
- MenuList: "keydown" events are now listened for on the MenuList's own div, fixing issues where an ancestor React element could handle the "keydown" event before MenuList does.
- MenuButton: Enter and space "keydown" events on the button element that toggle it now have `stopPropagation()` called so that no other components attempt to handle the event redundantly.
- MenuButton: The third argument of the `renderButton` prop callback is now `onKeyDown`, meant to be used as a keydown event handler instead of a keypress event handler. It will still work as a keypress event handler as previously recommended, so this isn't a breaking change.
## 7.0.4 (2022-08-11)

@@ -49,6 +55,6 @@

<MenuButton
renderButton={(domRef, opened, onKeyPress, onMouseDown) =>
renderButton={(domRef, opened, onKeyDown, onMouseDown) =>
<MyButtonComponent
domRef={domRef}
onKeyPress={onKeyPress}
onKeyDown={onKeyDown}
onMouseDown={onMouseDown}

@@ -55,0 +61,0 @@ />

30

index.d.ts

@@ -9,3 +9,3 @@ import * as React from 'react';

export type Rect = {
export interface Rect {
top: number;

@@ -15,3 +15,3 @@ bottom: number;

right: number;
};
}

@@ -32,3 +32,3 @@ export interface MenuEvent {

export type MenuListProps = {
export interface MenuListProps {
onItemChosen?: (event: ChosenEvent) => void;

@@ -38,3 +38,3 @@ onLeftPushed?: (event: MenuEvent) => void;

children?: ReactNode;
};
}
export class MenuList extends React.Component<MenuListProps> {

@@ -47,3 +47,3 @@ moveCursor(direction: Direction, prevCursorLocation?: Rect): void;

export type MenuItemProps = {
export interface MenuItemProps {
onItemChosen?: (event: ChosenEvent) => void;

@@ -75,3 +75,3 @@ onLeftPushed?: (event: MenuEvent) => void;

'aria-expanded'?: boolean;
};
}
export class MenuItem extends React.Component<MenuItemProps> {

@@ -96,3 +96,3 @@ hasHighlight(): boolean;

export type MenuListInspectorProps = {
export interface MenuListInspectorProps {
onItemChosen?: (event: ChosenEvent) => void;

@@ -102,3 +102,3 @@ onLeftPushed?: (event: MenuEvent) => void;

children: ReactNode;
};
}
export class MenuListInspector extends React.Component<MenuListInspectorProps> {

@@ -115,10 +115,10 @@ moveCursor(direction: Direction, prevCursorLocation?: Rect): boolean;

type RenderProp = (
export type MenuButtonRenderProp = (
domRef: React.Ref<any>,
opened: boolean,
onKeyPress: (e: React.KeyboardEvent) => void,
onKeyDown: (e: React.KeyboardEvent) => void,
onMouseDown: (e: React.MouseEvent) => void
) => ReactNode;
export type MenuButtonProps = {
export interface MenuButtonProps {
className?: string;

@@ -132,3 +132,3 @@ style?: Object;

renderButton?: RenderProp;
renderButton?: MenuButtonRenderProp;

@@ -143,3 +143,3 @@ positionOptions?: FloatAnchorOptions;

onWillClose?: () => void;
};
}
export class MenuButton extends React.Component<MenuButtonProps> {

@@ -154,3 +154,3 @@ open(): Promise<void>;

export type SubMenuItemProps = {
export interface SubMenuItemProps {
menu: ReactNode;

@@ -185,3 +185,3 @@ positionOptions?: FloatAnchorOptions;

children?: ReactNode;
};
}
export class SubMenuItem extends React.Component<SubMenuItemProps> {

@@ -188,0 +188,0 @@ open(): Promise<void>;

@@ -90,8 +90,15 @@ "use strict";

});
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_onKeyPress", function (e) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_onKeyDown", function (e) {
if (e.isComposing) {
return;
}
if (e.key === 'Enter' || e.key === ' ') {
e.stopPropagation();
e.preventDefault();
_this.toggle();
}
});
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_defaultRenderButton", function (domRef, opened, onKeyPress, onMouseDown) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_defaultRenderButton", function (domRef, opened, onKeyDown, onMouseDown) {
var _this$props = _this.props,

@@ -120,3 +127,3 @@ openedStyle = _this$props.openedStyle,

"aria-expanded": opened,
onKeyPress: onKeyPress,
onKeyDown: onKeyDown,
onMouseDown: onMouseDown,

@@ -169,4 +176,10 @@ disabled: _this.props.disabled,

});
});
}); // Possible alternative future design: instead of registering focus/blur/mouse/keydown
// handlers globally, we could have a hidden input or menuitem inside of the
// menu that's kept focused, and just receive blur and keydown events that bubble up
// from it.
// This would be more similar to React Select.
// Similar design note is in MenuList.
return new Promise(function (resolve) {

@@ -243,3 +256,3 @@ _this2.setState({

return _this3._setRef(el, anchorRef);
}, opened, _this3._onKeyPress, _this3._onMouseDown);
}, opened, _this3._onKeyDown, _this3._onMouseDown);
},

@@ -280,2 +293,2 @@ "float": !opened ? null : /*#__PURE__*/React.createElement(_MenuListInspector["default"], {

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51QnV0dG9uLmpzIl0sIm5hbWVzIjpbIk1lbnVCdXR0b24iLCJvcGVuZWQiLCJSZWFjdCIsImNyZWF0ZVJlZiIsImUiLCJidXR0b24iLCJ0b2dnbGUiLCJrZXkiLCJkb21SZWYiLCJvbktleVByZXNzIiwib25Nb3VzZURvd24iLCJwcm9wcyIsIm9wZW5lZFN0eWxlIiwib3BlbmVkQ2xhc3NOYW1lIiwic3R5bGUiLCJjbGFzc05hbWUiLCJkaXNhYmxlZCIsInRpdGxlIiwiY2hpbGRyZW4iLCJzdGF0ZSIsIlByb21pc2UiLCJyZXNvbHZlIiwib25XaWxsT3BlbiIsIktlZmlyIiwibWVyZ2UiLCJ3aW5kb3ciLCJmaWx0ZXIiLCJ0YXJnZXQiLCJlbCIsIl9hbmNob3JSZWYiLCJGbG9hdEFuY2hvciIsInBhcmVudE5vZGVzIiwibm9kZSIsImZyb21FdmVudHMiLCJ3aGljaCIsIm1hcCIsInByZXZlbnREZWZhdWx0Iiwic3RvcFByb3BhZ2F0aW9uIiwidGFrZVVudGlsQnkiL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5cbiAgICByZXR1cm4gKFxuICAgICAgPEZsb2F0QW5jaG9yXG4gICAgICAgIHBhcmVudEVsZW1lbnQ9e3RoaXMucHJvcHMubWVudVBhcmVudEVsZW1lbnR9XG4gICAgICAgIHJlZj17dGhpcy5fZmxvYXRBbmNob3JSZWZ9XG4gICAgICAgIG9wdGlvbnM9e3Bvc2l0aW9uT3B0aW9uc31cbiAgICAgICAgekluZGV4PXttZW51WkluZGV4fVxuICAgICAgICBhbmNob3I9e2FuY2hvclJlZiA9PlxuICAgICAgICAgIHJlbmRlckJ1dHRvbihcbiAgICAgICAgICAgIGVsID0+IHRoaXMuX3NldFJlZihlbCwgYW5jaG9yUmVmKSxcbiAgICAgICAgICAgIG9wZW5lZCxcbiAgICAgICAgICAgIHRoaXMuX29uS2V5UHJlc3MsXG4gICAgICAgICAgICB0aGlzLl9vbk1vdXNlRG93blxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgICBmbG9hdD17XG4gICAgICAgICAgIW9wZW5lZCA/IG51bGwgOiAoXG4gICAgICAgICAgICA8TWVudUxpc3RJbnNwZWN0b3Igb25JdGVtQ2hvc2VuPXsoKSA9PiB0aGlzLl9pdGVtQ2hvc2VuKCl9PlxuICAgICAgICAgICAgICB7bWVudX1cbiAgICAgICAgICAgIDwvTWVudUxpc3RJbnNwZWN0b3I+XG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAvPlxuICAgICk7XG4gIH1cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51QnV0dG9uLmpzIl0sIm5hbWVzIjpbIk1lbnVCdXR0b24iLCJvcGVuZWQiLCJSZWFjdCIsImNyZWF0ZVJlZiIsImUiLCJidXR0b24iLCJ0b2dnbGUiLCJpc0NvbXBvc2luZyIsImtleSIsInN0b3BQcm9wYWdhdGlvbiIsInByZXZlbnREZWZhdWx0IiwiZG9tUmVmIiwib25LZ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fSA9IHRoaXMuc3RhdGU7XG5cbiAgICBjb25zdCByZW5kZXJCdXR0b24gPSB0aGlzLnByb3BzLnJlbmRlckJ1dHRvbiB8fCB0aGlzLl9kZWZhdWx0UmVuZGVyQnV0dG9uO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIDxGbG9hdEFuY2hvclxuICAgICAgICBwYXJlbnRFbGVtZW50PXt0aGlzLnByb3BzLm1lbnVQYXJlbnRFbGVtZW50fVxuICAgICAgICByZWY9e3RoaXMuX2Zsb2F0QW5jaG9yUmVmfVxuICAgICAgICBvcHRpb25zPXtwb3NpdGlvbk9wdGlvbnN9XG4gICAgICAgIHpJbmRleD17bWVudVpJbmRleH1cbiAgICAgICAgYW5jaG9yPXthbmNob3JSZWYgPT5cbiAgICAgICAgICByZW5kZXJCdXR0b24oXG4gICAgICAgICAgICBlbCA9PiB0aGlzLl9zZXRSZWYoZWwsIGFuY2hvclJlZiksXG4gICAgICAgICAgICBvcGVuZWQsXG4gICAgICAgICAgICB0aGlzLl9vbktleURvd24sXG4gICAgICAgICAgICB0aGlzLl9vbk1vdXNlRG93blxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgICBmbG9hdD17XG4gICAgICAgICAgIW9wZW5lZCA/IG51bGwgOiAoXG4gICAgICAgICAgICA8TWVudUxpc3RJbnNwZWN0b3Igb25JdGVtQ2hvc2VuPXsoKSA9PiB0aGlzLl9pdGVtQ2hvc2VuKCl9PlxuICAgICAgICAgICAgICB7bWVudX1cbiAgICAgICAgICAgIDwvTWVudUxpc3RJbnNwZWN0b3I+XG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAvPlxuICAgICk7XG4gIH1cbn1cbiJdfQ==

@@ -32,4 +32,2 @@ "use strict";

var _kefir = _interopRequireDefault(require("kefir"));
var _kefirStopper = _interopRequireDefault(require("kefir-stopper"));

@@ -251,15 +249,25 @@

/*:: if (!el) throw new Error(); */
// The only things that should receive keydown/keypress events before us
// are our children. This allows a MenuItem to contain a text input
// which selectively stops propagation on key events for example.
// We want to receive keydown events before any elements that aren't
// our children. (Our children specifically should be able to get keydown events
// before us and choose to stop propagation on them if desired. This allows a
// MenuItem to contain a text input that handles arrow keys itself for example.
// We receive keydown events that originate from our children through the
// onKeyDown handler attached to our own div. This block of code here
// is only for receiving keydown events that don't originate inside of our
// div.)
_kefir["default"].merge([_kefir["default"].fromEvents(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) {
return el.contains(e.target);
}), (0, _fromEventsCapture["default"])(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) {
(0, _fromEventsCapture["default"])(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) {
return !el.contains(e.target);
})]).takeUntilBy(this._stopper).onValue(function (event) {
}).takeUntilBy(this._stopper).onValue(function (event) {
ReactDOM.unstable_batchedUpdates(function () {
_this2._key(event);
});
});
}); // Possible alternative future design: instead of registering keydown handlers
// globally, we could have a hidden input inside of the menu that's kept
// focused, and just receive keydown events that bubble up from there.
// This would be similar to React Select and StreakSheet.
// This would prevent us from needing to add an event handler on window with
// special target-filtering logic, and it would fix certain cases with the
// target-filtering logic where React portals are used inside the children.
// Similar design note is in MenuButton.

@@ -464,5 +472,10 @@ var parentCtx = this._parentCtx();

value: function render() {
var _this3 = this;
return /*#__PURE__*/React.createElement("div", {
role: "menu",
ref: this._elRef
ref: this._elRef,
onKeyDown: function onKeyDown(e) {
_this3._key(e);
}
}, /*#__PURE__*/React.createElement(MenuListContext.Provider, {

@@ -484,2 +497,2 @@ value: this._menuListContext

(0, _defineProperty2["default"])(MenuList, "contextType", _MenuListInspector.MenuListInspectorContext);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51TGlzdC5qcyJdLCJuYW1lcyI6WyJNZW51TGlzdENvbnRleHQiLCJSZWFjdCIsImNyZWF0ZUNvbnRleHQiLCJNZW51TGlzdCIsImNyZWF0ZVJlZiIsInJlZ2lz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odGVkSW5kZXhcbiAgICAgIDogdGhpcy5fbmF0dXJhbEhpZ2hsaWdodGVkSW5kZXg7XG4gIH1cblxuICBzdGF0aWMgY29udGV4dFR5cGUgPSBNZW51TGlzdEluc3BlY3RvckNvbnRleHQ7XG5cbiAgX21lbnVMaXN0Q29udGV4dDogTWVudUxpc3RDb250ZXh0VmFsdWUgPSB7XG4gICAgcmVnaXN0ZXJJdGVtOiAocHJvcHMsIGNvbnRyb2wsIGVsKSA9PiB7XG4gICAgICBjb25zdCBpdGVtID0ge3Byb3BzLCBjb250cm9sLCBlbH07XG5cbiAgICAgIGNvbnN0IHJlZ2lzdGVyID0gKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IC0xO1xuICAgICAgICBpZiAoaXRlbS5wcm9wcy5pbmRleCA9PSBudWxsKSB7XG4gICAgICAgICAgaSA9IGZpbmRJbmRleChcbiAgICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcyxcbiAgICAgICAgICAgIF9pdGVtID0+XG4gICAgICAgICAgICAgIChpdGVtLmVsLmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uKF9pdGVtLmVsKSAmXG4gICAgICAgICAgICAgICAgTm9kZS5ET0NVTUVOVF9QT1NJVElPTl9QUkVDRURJTkcpID09PVxuICAgICAgICAgICAgICAwXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpID0gZmluZEluZGV4KFxuICAgICAgICAgICAgdGhpcy5fbGlzdEl0ZW1zLFxuICAgICAgICAgICAgX2l0ZW0gPT5cbiAgICAgICAgICAgICAgX2l0ZW0ucHJvcHMuaW5kZXggIT0gbnVsbCAmJiBpdGVtLnByb3BzLmluZGV4IDwgX2l0ZW0ucHJvcHMuaW5kZXhcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpIDwgMCkge1xuICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcy5wdXNoKGl0ZW0pO1xuICAgICAgICB9IGVsc2Uge1xuIC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+IHtcbiAgICAgICAgICBpZiAoaXRlbS5wcm9wcy5pbmRleCAhPT0gbmV3UHJvcHMuaW5kZXgpIHtcbiAgICAgICAgICAgIGNvbnN0IG9sZEluZGV4ID0gdGhpcy5fbGlzdEl0ZW1zLmluZGV4T2YoaXRlbSk7XG4gICAgICAgICAgICBjb25zdCBpc05hdHVyYWxIaWdobGlnaHRJbmRleCA9XG4gICAgICAgICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHRlZEluZGV4ID09PSBvbGRJbmRleDtcbiAgICAgICAgICAgIGNvbnN0IGlzTG9ja2VkSGlnaGxpZ2h0SW5kZXggPVxuICAgICAgICAgICAgICB0aGlzLl9sb2NrZWRIaWdobGlnaHRlZEluZGV4ID09PSBvbGRJbmRleDtcbiAgICAgICAgICAgIGNvbnN0IGlzS2V5Ym9hcmRUYWtlbkJ5SW5kZXggPVxuICAgICAgICAgICAgICB0aGlzLl9rZXlib2FyZFRha2VuQnlJbmRleCA9PT0gb2xkSW5kZXg7XG5cbiAgICAgICAgICAgIG1lbnVMaXN0SGFuZGxlLnVucmVnaXN0ZXIoKTtcbiAgICAgICAgICAgIHByb3BzID0gbmV3UHJvcHM7XG4gICAgICAgICAgICBpdGVtLnByb3BzID0gbmV3UHJvcHM7XG4gICAgICAgICAgICByZWdpc3RlcigpO1xuXG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIGlzTmF0dXJhbEhpZ2hsaWdodEluZGV4IHx8XG4gICAgICAgICAgICAgIGlzTG9ja2VkSGlnaGxpZ2h0SW5kZXggfHxcbiAgICAgICAgICAgICAgaXNLZXlib2FyZFRha2VuQnlJbmRleFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG5ld0luZGV4ID0gdGhpcy5fbGlzdEl0ZW1zLmluZGV4T2YoaXRlbSk7XG4gICAgICAgICAgICAgIGlmIChpc05hdHVyYWxIaWdobGlnaHRJbmRleClcbiAgICAgICAgICAgICAgICB0aGlzLl9uY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X25hdHVyYWxIaWdobGlnaHQoXG4gICAgICAgICAgICB0aGlzLl9saXN0SXRlbXMubGVuZ3RoIC0gMSxcbiAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICBkaXJlY3Rpb24sXG4gICAgICAgICAgICBwcmV2Q3Vyc29yTG9jYXRpb25cbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHQoXG4gICAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCAtIDEsXG4gICAgICAgICAgICB0cnVlLFxuICAgICAgICAgICAgZGlyZWN0aW9uLFxuICAgICAgICAgICAgcHJldkN1cnNvckxvY2F0aW9uXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2Rvd24nOlxuICAgICAgICBpZiAoXG4gICAgICAgICAgdGhpcy5fbmF0dXJhbEhpZ2hsaWdodGVkSW5kZXggPT0gbnVsbCB8fFxuICAgICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHRlZEluZGV4ID09IHRoaXMuX2xpc3RJdGVtcy5sZW5ndGggLSAxXG4gICAgICAgICkge1xuICAgICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHQoMCwgdHJ1ZSwgZGlyZWN0aW9uLCBwcmV2Q3Vyc29yTG9jYXRpb24pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHQoXG4gICAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCArIDEsXG4gICAgICAgICAgICB0cnVlLFxuICAgICAgICAgICAgZGlyZWN0aW9uLFxuICAgICAgICAgICAgcHJldkN1cnNvckxvY2F0aW9uXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICB9XG4gIH1cblxuICBoYXNIaWdobGlnaHQoKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHRoaXMuX2dldFZpc2libGVIaWdobGlnaHRlZEluZGV4KCkgIT0gbnVsbDtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdiByb2xlPVwibWVudVwiIHJlZj17dGhpcy5fZWxSZWZ9PlxuICAgICAgICA8TWVudUxpc3RDb250ZXh0LlByb3ZpZGVyIHZhbHVlPXt0aGlzLl9tZW51TGlzdENvbnRleHR9PlxuICAgICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgICA8L01lbnVMaXN0Q29udGV4dC5Qcm92aWRlcj5cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51TGlzdC5qcyJdLCJuYW1lcyI6WyJNZW51TGlzdENvbnRleHQiLCJSZWFjdCIsImNyZWF0ZUNvbnRleHQiLCJNZW51TGlzdCIsImNyZWF0ZVJlZiIsInJlZ2lzdGVySXRlbSIsInByb3BzIiwiY29udHJvbCIsImVsIiwiaXRlbSIsInJlZ2lzdGVyIiwiaSIsImluZGV4IiwiX2xpc3RJdGVtcyIsIl9pdGVtIiwiY29tcGFyZURvY3VtZW50UG9zaXRpb24iLCJOb2RlIiwiRE9DVU1FTlRfUE9TSVRJT05fUFJFQ0VESU5HIiwicHVzaCIsInNwbGljZSIsIl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCIsIl9sb2NrZWRIaWdobGlnaHRlZEluZGV4IiwiX2tleWJvYXJkVGFrZW5CeUluZGV4IiwibWVudUxpc3RIYW5kbGUiLCJoaWdobGlnaHQiLCJieUtleWJvYXJkIiwiaW5kZXhPZiIsIkVycm9yIiwiX25hdHVyYWxIaWdobGlnaHQiLCJ1bmhpZ2hsaWdodCIsIml0ZW1DaG9zZW4iLCJfZG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uKF9pdGVtLmVsKSAmXG4gICAgICAgICAgICAgICAgTm9kZS5ET0NVTUVOVF9QT1NJVElPTl9QUkVDRURJTkcpID09PVxuICAgICAgICAgICAgICAwXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpID0gZmluZEluZGV4KFxuICAgICAgICAgICAgdGhpcy5fbGlzdEl0ZW1zLFxuICAgICAgICAgICAgX2l0ZW0gPT5cbiAgICAgICAgICAgICAgX2l0ZW0ucHJvcHMuaW5kZXggIT0gbnVsbCAmJiBpdGVtLnByb3BzLmluZGV4IDwgX2l0ZW0ucHJvcHMuaW5kZXhcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpIDwgMCkge1xuICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcy5wdXNoKGl0ZW0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcy5zcGxpY2UoaSwgMCwgaXRlbSk7XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgdGhpcy5fbmF0dXJhbEhpZ2hsaWdodGVkSW5kZXggIT0gbnVsbCAmJlxuICAgICAgICAgICAgaSA8PSB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgdGhpcy5fbmF0dXJhbEhpZ2hsaWdodGVkSW5kZXgrKztcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgdGhpcy5fbG9ja2VkSGlnaGxpZ2h0ZWRJbmRleCAhPSBudWxsICYmXG4gICAgICAgICAgICBpIDw9IHRoaXMuX2xvY2tlZEhpZ2hsaWdodGVkSW5kZXhcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHRoaXMuX2xvY2tlZEhpZ2hsaWdodGVkSW5kZXgrKztcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgdGhpcy5fa2V5Ym9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ZXIoKTtcbiAgICAgICAgICAgIHByb3BzID0gbmV3UHJvcHM7XG4gICAgICAgICAgICBpdGVtLnByb3BzID0gbmV3UHJvcHM7XG4gICAgICAgICAgICByZWdpc3RlcigpO1xuXG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIGlzTmF0dXJhbEhpZ2hsaWdodEluZGV4IHx8XG4gICAgICAgICAgICAgIGlzTG9ja2VkSGlnaGxpZ2h0SW5kZXggfHxcbiAgICAgICAgICAgICAgaXNLZXlib2FyZFRha2VuQnlJbmRleFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG5ld0luZGV4ID0gdGhpcy5fbGlzdEl0ZW1zLmluZGV4T2YoaXRlbSk7XG4gICAgICAgICAgICAgIGlmIChpc05hdHVyYWxIaWdobGlnaHRJbmRleClcbiAgICAgICAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCA9IG5ld0luZGV4O1xuICAgICAgICAgICAgICBpZiAoaXNMb2NrZWRIaWdobGlnaHRJbmRleClcbiAgICAgICAgICAgICAgICB0aGlzLl9sb2NrZWRIaWdobGlnaHRlZEluZGV4ID0gbmV3SW5kZXg7XG4gICAgICAgICAgICAgIGlmIChpc0tleWJvYXJkVGFrZW5CeUluZGV4KSB0aGlzLl9rZXlib2FyZFRha2VuQnlJbmRleCA9IG5ld0luZGV4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwcm9wcyA9IG5ld1Byb3BzO1xuICAgICAgICAgICAgaXRlbS5wcm9wcyA9IG5ld1Byb3BzO1xuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdW5yZWdpc3RlcjogKCkgPT4ge1xuICAgICAgICAgIGNvbnN0IGkgPSB0aGlzLl9saXN0SXRlbXMuaW5kZXhPZihpdGVtKTtcbiAgICAgICAgICBpZiAoaSA8IDApIHRocm93IG5ldyBFcnJvcignQWxyZWFke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gICAgICAgIHRoaXMuX25hdHVyYWxIaWdobGlnaHRlZEluZGV4XG4gICAgICAgIF0uY29udHJvbC5ub3RpZnlIaWdobGlnaHRlZCh0cnVlLCBmYWxzZSk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgX2Rpc3BhdGNoRXZlbnQoY29udHJvbDogP01lbnVJdGVtQ29udHJvbCwgZXZlbnQ6IE1lbnVFdmVudCkge1xuICAgIGlmIChjb250cm9sKSB7XG4gICAgICBjb250cm9sLm5vdGlmeUV2ZW50KGV2ZW50KTtcbiAgICAgIGlmIChldmVudC5jYW5jZWxCdWJibGUpIHJldHVybjtcbiAgICB9XG4gICAgc3dpdGNoIChldmVudC50eXBlKSB7XG4gICAgICBjYXNlICdjaG9zZW4nOlxuICAgICAgICAvKjo6IGlmICghKGV2ZW50IGluc3RhbmNlb2YgQ2hvc2VuRXZlbnQpKSB0aHJvdyBuZXcgRXJyb3IoKTsgKi9cbiAgICAgICAgaWYgKHRoaXMucHJvcHMub25JdGVtQ2hvc2VuKSB0aGlzLnByb3BzLm9uSXRlbUNob3NlbihldmVudCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgLy8gY2FzZSAndXAnOlxuICAgICAgLy8gICBicmVhaztcbiAgICAgIC8vIGNhc2UgJ2Rvd24nOlxuICAgICAgLy8gICBicmVhaztcbiAgICAgIGNhc2UgJ2xlZnQnOlxuICAgICAgICBpZiAodGhpcy5wcm9wcy5vbkxlZnRQdXNoZWQpIHRoaXMucHJvcHMub25MZWZ0UHVzaGVkKGV2ZW50KTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdyaWdodCc6XG4gICAgICAgIGlmICh0aGlzLnByb3BzLm9uUmlnaHRQdXNoZWQpIHRoaXMucHJvcHMub25SaWdodFB1c2hlZChldmVudCk7XG4gICAgICAgIGJyZWFrO1xuICAgIH1cbiAgICBpZiAoZXZlbnQuY2FuY2VsQnViYmxlKSByZXR1cm47XG4gICAgY29uc3QgcGFyZW50Q3R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WRJbmRleCA9PSB0aGlzLl9saXN0SXRlbXMubGVuZ3RoIC0gMVxuICAgICAgICApIHtcbiAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0KDAsIHRydWUsIGRpcmVjdGlvbiwgcHJldkN1cnNvckxvY2F0aW9uKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0KFxuICAgICAgICAgICAgdGhpcy5fbmF0dXJhbEhpZ2hsaWdodGVkSW5kZXggKyAxLFxuICAgICAgICAgICAgdHJ1ZSxcbiAgICAgICAgICAgIGRpcmVjdGlvbixcbiAgICAgICAgICAgIHByZXZDdXJzb3JMb2NhdGlvblxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG5cbiAgaGFzSGlnaGxpZ2h0KCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiB0aGlzLl9nZXRWaXNpYmxlSGlnaGxpZ2h0ZWRJbmRleCgpICE9IG51bGw7XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXZcbiAgICAgICAgcm9sZT1cIm1lbnVcIlxuICAgICAgICByZWY9e3RoaXMuX2VsUmVmfVxuICAgICAgICBvbktleURvd249e2UgPT4ge1xuICAgICAgICAgIHRoaXMuX2tleShlKTtcbiAgICAgICAgfX1cbiAgICAgID5cbiAgICAgICAgPE1lbnVMaXN0Q29udGV4dC5Qcm92aWRlciB2YWx1ZT17dGhpcy5fbWVudUxpc3RDb250ZXh0fT5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgPC9NZW51TGlzdENvbnRleHQuUHJvdmlkZXI+XG4gICAgICA8L2Rpdj5cbiAgICApO1xuICB9XG59XG4iXX0=
{
"name": "react-menu-list",
"version": "7.0.4",
"version": "7.1.0-beta.0",
"description": "React component for menu lists and submenus",

@@ -66,3 +66,3 @@ "main": "js/index.js",

"rimraf": "^3.0.0",
"typescript": "^4.0.2",
"typescript": "^4.8.3",
"watchify": "^4.0.0"

@@ -69,0 +69,0 @@ },

@@ -208,7 +208,7 @@ # react-menu-list

- `renderButton`: Optional render prop that allows a different component to be used
instead of an html `<button>`. `renderButton` is a function with a signature of `(domRef: React.Ref<any>, opened: boolean, onKeyPress: (e: KeyboardEvent) => void, onMouseDown: (e: MouseEvent) => void) => React.Node`
instead of an html `<button>`. `renderButton` is a function with a signature of `(domRef: React.Ref<any>, opened: boolean, onKeyDown: (e: KeyboardEvent) => void, onMouseDown: (e: MouseEvent) => void) => React.Node`
- `domRef` must be passed as a ref to the button's DOM element in your custom implementation
- `opened` is whether the menu is being opened. Useful if you want the appearance of the button to change in this state
- `onKeyPress` must be called when your custom button registers key press events
- `onMouseDown` must be called when your custom button registers mouse down events
- `onKeyDown` must be used to handle keydown events on your button
- `onMouseDown` must be used to handle mousedown events on your custom button

@@ -215,0 +215,0 @@ A MenuButton has the following public methods:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc