{"name":"rc-menu","version":"9.7.2","description":"menu ui component for react","keywords":["react","react-component","menu","ui","react-menu"],"homepage":"http://github.com/react-component/menu","bugs":{"url":"http://github.com/react-component/menu/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/menu.git"},"license":"MIT","maintainers":[{"name":"benjycui","email":"benjytrys@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"yiminghe","email":"yiminghe@gmail.com"},{"name":"warmhug","email":"hualei5280@gmail.com"},{"name":"valleykid","email":"valleykiddy@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"picodoth","email":"picodoth@gmail.com"},{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"main":"./lib/index","module":"./es/index","scripts":{"compile":"father build && lessc assets/index.less assets/index.css","coverage":"rc-test --coverage","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","lint":"eslint src/ --ext .tsx,.ts,.jsx,.js","now-build":"npm run build","prepublishOnly":"npm run compile && np --yolo --no-publish","postpublish":"tnpm sync rc-menu","start":"dumi dev","test":"rc-test"},"dependencies":{"@babel/runtime":"^7.10.1","classnames":"2.x","rc-motion":"^2.4.3","rc-overflow":"^1.2.8","rc-trigger":"^5.1.2","rc-util":"^5.12.0","shallowequal":"^1.1.0"},"devDependencies":{"@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.0.0","@types/jest":"^26.0.23","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/warning":"^3.0.0","cross-env":"^7.0.0","dumi":"^1.1.0","eslint":"^7.0.0","father":"^4.0.0","gh-pages":"^3.1.0","less":"^3.10.3","np":"^6.0.0","rc-test":"^7.0.14","react":"^18.0.0","react-dom":"^18.0.0","regenerator-runtime":"^0.13.7","typescript":"^4.0.5","@rc-component/father-plugin":"^1.0.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"types":"./lib/index.d.ts","gitHead":"2a2d95672b5ee94e13644719b77f71e595e9614d","_id":"rc-menu@9.7.2","_nodeVersion":"16.17.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-zyri6Qwr955SOdjzDn7/ylz7Zj8r89wGyoRw0lV9G8K6a3VBfSrP2XMYEc0JgeC62OTghUcRWad7KFqNXysxaA==","shasum":"0b400e2d81377c8001795559139cb29871143be1","tarball":"http://registry-npm.ywwl.com/rc-menu/download/rc-menu-9.7.2.tgz","fileCount":110,"unpackedSize":248089,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFg3pq31Z4kQzPuaOmx8OvXoQi0zi9hFasILjOh2uaXmAiAsoYOA3SKjHkpk3L/RhCvkIQvUKB2KMuQzbixABNJOhw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbfIgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDThAAnS/V8MddcWYKZR59I1aTC1ZevUplDT/RePs0ysPf0p/X9JWZ\r\n6nswj492lpslYurth/0ohd116rnjYZgPyyNC0BK/LWgEsuH0bAn61n0/mIaY\r\nr6uqfppPG9fia38zL1/ddZ6BYdmY28vfjBxFN4hVdu5sJ66JfMykFv5PReeI\r\n/GccLx9pHyB65DghpP7fVSHdO9Ur8dRwsWUfraIHhvuFHD3T8J+fXV3+AKEs\r\nXicc6bnb41F3kURnt1VaNw/0DdDWEMMaWUNLbPVT+UEmupuu+cMITA3cC+Bl\r\n7p4YoEeQczuiEmAvJ6HIXCyVvWO2ZXZHtE2XxQR7L3dVr9iPiWMyd3gE+Bx4\r\npIj45P8g90HADD44YdifdOqbyKSaBsqRo6AhfxsQTf/ftRO/rllgq7WGxzq6\r\nig2J0ZdpcC3KyRZBx8BRZrEBS2kSXYtsPGxm0eT6Ylho1ORz5cEbVuYz+Y0c\r\nXQXFo59FlyDO2WNhfbZNmQacce948MAaPoGC+hlFhnbmTHqG6Cgq4+cJYJxD\r\nsqAhviJ75MQVKkgjlfz/GeaevRlKuTuorHNc84E0Us5gYGDmjjUkWkomUPI0\r\nRu9YoQcRodjtfAFEmOeVz3oNMHJ6i35fROjUwHJjDiEKoXoltuKOK4jAP29o\r\nRAcHXdbQZAAIJINBEXXjGJ+AGE4M7jJp7EY=\r\n=+Qx+\r\n-----END PGP SIGNATURE-----\r\n","size":35143,"noattachment":false,"key":"/rc-menu/-/rc-menu-9.7.2.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-menu_9.7.2_1668149792542_0.28501348801143567"},"_hasShrinkwrap":false,"readme":"# rc-menu\n\n---\n\nReact Menu Component. port from https://github.com/kissyteam/menu\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-menu.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-menu\n[github-actions-image]: https://github.com/react-component/menu/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/menu/actions\n[circleci-image]: https://img.shields.io/circleci/react-component/menu/master?style=flat-square\n[circleci-url]: https://circleci.com/gh/react-component/menu\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/footer/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/footer/branch/master\n[coveralls-image]: https://img.shields.io/coveralls/react-component/menu.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/menu?branch=master\n[david-url]: https://david-dm.org/react-component/menu\n[david-image]: https://david-dm.org/react-component/menu/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/menu?type=dev\n[david-dev-image]: https://david-dm.org/react-component/menu/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-menu.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-menu\n[bundlephobia-url]: https://bundlephobia.com/result?p=rc-menu\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-menu\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Install\n\n[![rc-menu](https://nodei.co/npm/rc-menu.png)](https://npmjs.org/package/rc-menu)\n\n## Usage\n\n```js\nimport Menu, { SubMenu, MenuItem } from 'rc-menu';\n\nReactDOM.render(\n  <Menu>\n    <MenuItem>1</MenuItem>\n    <SubMenu title=\"2\">\n      <MenuItem>2-1</MenuItem>\n    </SubMenu>\n  </Menu>,\n  container,\n);\n```\n\n## Compatibility\n\n| [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png\" alt=\"Electron\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Electron |\n| --- | --- | --- | --- | --- |\n| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |\n\n## API\n\n### Menu props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>ref</td>\n          <td>React.HTMLLIElement</td>\n          <td></td>\n          <td>get dom node</td>\n        </tr>\n        <tr>\n          <td>className</td>\n          <td>String</td>\n          <td></td>\n          <td>additional css class of root dom node</td>\n        </tr>\n        <tr>\n          <td>mode</td>\n          <td>String</td>\n          <th>vertical</th>\n          <td>one of [\"horizontal\",\"inline\",\"vertical-left\",\"vertical-right\"]</td>\n        </tr>\n        <tr>\n            <td>activeKey</td>\n            <td>String</td>\n            <th></th>\n            <td>initial and current active menu item's key.</td>\n        </tr>\n        <tr>\n            <td>defaultActiveFirst</td>\n            <td>Boolean</td>\n            <th>false</th>\n            <td>whether active first menu item when show if activeKey is not set or invalid</td>\n        </tr>\n        <tr>\n            <td>multiple</td>\n            <td>Boolean</td>\n            <th>false</th>\n            <td>whether allow multiple select</td>\n        </tr>\n        <tr>\n            <td>selectable</td>\n            <td>Boolean</td>\n            <th>true</th>\n            <td>allow selecting menu items</td>\n        </tr>\n        <tr>\n            <td>selectedKeys</td>\n            <td>String[]</td>\n            <th>[]</th>\n            <td>selected keys of items</td>\n        </tr>\n        <tr>\n            <td>defaultSelectedKeys</td>\n            <td>String[]</td>\n            <th>[]</th>\n            <td>initial selected keys of items</td>\n        </tr>\n        <tr>\n            <td>openKeys</td>\n            <td>String[]</td>\n            <th>[]</th>\n            <td>open keys of SubMenuItem</td>\n        </tr>\n        <tr>\n            <td>defaultOpenKeys</td>\n            <td>String[]</td>\n            <th>[]</th>\n            <td>initial open keys of SubMenuItem</td>\n        </tr>\n        <tr>\n            <td>onSelect</td>\n            <td>function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]})</td>\n            <th></th>\n            <td>called when select a menu item</td>\n        </tr>\n        <tr>\n            <td>onClick</td>\n            <td>function({key:String, item:ReactComponent, domEvent:Event, keyPath: String[]})</td>\n            <th></th>\n            <td>called when click a menu item</td>\n        </tr>\n        <tr>\n            <td>onOpenChange</td>\n            <td>(openKeys:String[]) => void</td>\n            <th></th>\n            <td>called when open/close sub menu</td>\n        </tr>\n        <tr>\n            <td>onDeselect</td>\n            <td>function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]})</td>\n            <th></th>\n            <td>called when deselect a menu item. only called when allow multiple</td>\n        </tr>\n        <tr>\n            <td>triggerSubMenuAction</td>\n            <td>Enum { hover, click }</td>\n            <th>hover</th>\n            <td>which action can trigger submenu open/close</td>\n        </tr>\n        <tr>\n            <td>openAnimation</td>\n            <td>{enter:function,leave:function}|String</td>\n            <th></th>\n            <td>animate when sub menu open or close. see rc-motion for object type.</td>\n        </tr>\n        <tr>\n            <td>openTransition</td>\n            <td>String</td>\n            <th></th>\n            <td>css transitionName when sub menu open or close</td>\n        </tr>\n        <tr>\n            <td>subMenuOpenDelay</td>\n            <td>Number</td>\n            <th>0</th>\n            <td>delay time to show popup sub menu. unit: s</td>\n        </tr>\n        <tr>\n            <td>subMenuCloseDelay</td>\n            <td>Number</td>\n            <th>0.1</th>\n            <td>delay time to hide popup sub menu. unit: s</td>\n        </tr>\n        <tr>\n            <td>forceSubMenuRender</td>\n            <td>Boolean</td>\n            <th>false</th>\n            <td>whether to render submenu even if it is not visible</td>\n        </tr>\n        <tr>\n            <td>getPopupContainer</td>\n            <td>Function(menuDOMNode): HTMLElement</td>\n            <th>() => document.body</th>\n            <td>Where to render the DOM node of popup menu when the mode is horizontal or vertical</td>\n        </tr>\n        <tr>\n            <td>builtinPlacements</td>\n            <td>Object of alignConfigs for <a href=\"https://github.com/yiminghe/dom-align\">dom-align</a></td>\n            <th>see <a href=\"./src/placements.ts\">placements.ts</a></th>\n            <td>Describes how the popup menus should be positioned</td>\n        </tr>\n        <tr>\n            <td>itemIcon</td>\n            <td>ReactNode | (props: MenuItemProps) => ReactNode</td>\n            <th></th>\n            <td>Specify the menu item icon.</td>\n        </tr>\n        <tr>\n            <td>expandIcon</td>\n            <td>ReactNode | (props: SubMenuProps & { isSubMenu: boolean }) => ReactNode</td>\n            <th></th>\n            <td>Specify the menu item icon.</td>\n        </tr>\n        <tr>\n            <td>direction</td>\n            <td>String</td>\n            <th></th>\n            <td>Layout direction of menu component, it supports RTL direction too.</td>\n        </tr>\n        <tr>\n            <td>inlineIndent</td>\n            <td>Number</td>\n            <th>24</th>\n            <td>Padding level multiplier. Right or left padding depends on param \"direction\".</td>\n        </tr>\n    </tbody>\n</table>\n\n### Menu.Item props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>className</td>\n          <td>String</td>\n          <td></td>\n          <td>additional css class of root dom node</td>\n        </tr>\n        <tr>\n            <td>disabled</td>\n            <td>Boolean</td>\n            <th>false</th>\n            <td>no effect for click or keydown for this item</td>\n        </tr>\n        <tr>\n            <td>key</td>\n            <td>Object</td>\n            <th></th>\n            <td>corresponding to activeKey</td>\n        </tr>\n        <tr>\n            <td>onMouseEnter</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>onMouseLeave</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>itemIcon</td>\n            <td>ReactNode | (props: MenuItemProps) => ReactNode</td>\n            <th></th>\n            <td>Specify the menu item icon.</td>\n        </tr>\n    </tbody>\n</table>\n\n### Menu.SubMenu props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>ref</td>\n          <td>React.HTMLLIElement</td>\n          <td></td>\n          <td>get dom node</td>\n        </tr>\n        <tr>\n          <td>popupClassName</td>\n          <td>String</td>\n          <td></td>\n          <td>additional css class of root dom node</td>\n        </tr>\n        <tr>\n          <td>popupStyle</td>\n          <td>CSSProperties</td>\n          <td></td>\n          <td>additional css style of root dom node</td>\n        </tr>\n        <tr>\n          <td>title</td>\n          <td>String/ReactElement</td>\n          <td></td>\n          <td>sub menu's content</td>\n        </tr>\n        <tr>\n          <td>overflowedIndicator</td>\n          <td>String/ReactElement</td>\n          <td>···</td>\n          <td>overflow indicator when menu overlows in horizontal mode</td>\n        </tr>\n        <tr>\n            <td>key</td>\n            <td>Object</td>\n            <th></th>\n            <td>corresponding to activeKey</td>\n        </tr>\n        <tr>\n            <td>disabled</td>\n            <td>Boolean</td>\n            <th>false</th>\n            <td>no effect for click or keydown for this item</td>\n        </tr>\n        <tr>\n            <td>onMouseEnter</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>onMouseLeave</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>onTitleMouseEnter</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>onTitleMouseLeave</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>onTitleClick</td>\n            <td>Function({eventKey, domEvent})</td>\n            <th></th>\n            <td></td>\n        </tr>\n        <tr>\n            <td>popupOffset</td>\n            <td>Array</td>\n            <th></th>\n            <td>The offset of the popup submenu, in an x, y coordinate array. e.g.: `[0,15]`</td>\n        </tr>\n        <tr>\n            <td>expandIcon</td>\n            <td>ReactNode | (props: SubMenuProps) => ReactNode</td>\n            <th></th>\n            <td>Specify the menu item icon.</td>\n        </tr>\n        <tr>\n            <td>itemIcon</td>\n            <td>ReactNode | (props: SubMenuProps & { isSubMenu: boolean }) => ReactNode</td>\n            <th></th>\n            <td>Specify the menu item icon.</td>\n        </tr>\n    </tbody>\n</table>\n\n### Menu.Divider props\n\nnone\n\n### Menu.ItemGroup props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>ref</td>\n          <td>React.HTMLLIElement</td>\n          <td></td>\n          <td>get dom node</td>\n        </tr>\n        <tr>\n            <td>title</td>\n            <td>String|React.Element</td>\n            <th></th>\n            <td>title of item group</td>\n        </tr>\n        <tr>\n            <td>children</td>\n            <td>React.Element[]</td>\n            <th></th>\n            <td>MenuItems belonged to this group</td>\n        </tr>\n    </tbody>\n</table>\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8001/examples/index.md\n\nonline example: http://react-component.github.io/menu/examples/\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrc-menu is released under the MIT license.\n","publish_time":1668149792756,"_cnpm_publish_time":1668149792756,"dist-tags":{"beta":"7.4.0-beta.1","latest":"9.16.1"}}