{"name":"rc-menu","version":"7.4.0-beta.1","description":"menu ui component for react","keywords":["react","react-component","menu","ui","react-menu"],"main":"./lib/index","module":"./es/index","homepage":"http://github.com/react-component/menu","maintainers":[{"email":"afc163@gmail.com","name":"afc163"},{"email":"benjytrys@gmail.com","name":"benjycui"},{"email":"picodoth@gmail.com","name":"picodoth"},{"email":"valleykiddy@gmail.com","name":"valleykid"},{"email":"hualei5280@gmail.com","name":"warmhug"},{"email":"yesmeck@gmail.com","name":"yesmeck"},{"email":"yiminghe@gmail.com","name":"yiminghe"}],"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/menu.git"},"bugs":{"url":"http://github.com/react-component/menu/issues"},"license":"MIT","config":{"port":8010},"scripts":{"build":"rc-tools run build","compile":"rc-tools run compile --babel-runtime","gh-pages":"rc-tools run gh-pages","start":"rc-tools run server","start:preact":"DEMO_ENV=preact rmc-tools run server","pub":"rc-tools run pub --babel-runtime","lint":"rc-tools run lint","lint:fix":"rc-tools run lint --fix","test":"jest","prepublish":"rc-tools run guard","coverage":"jest --coverage && cat ./coverage/lcov.info | coveralls"},"jest":{"setupFiles":["./tests/setup.js"],"collectCoverageFrom":["src/**/*"],"snapshotSerializers":["enzyme-to-json/serializer"],"transform":{"\\.jsx?$":"./node_modules/rc-tools/scripts/jestPreprocessor.js"}},"devDependencies":{"coveralls":"^2.11.15","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.0.2","enzyme-to-json":"^3.0.1","jest":"^21.0.0","pre-commit":"1.x","rc-tools":"7.x","react":"^16.0.0","react-dom":"^16.0.0","react-test-renderer":"^16.0.0","rmc-tools":"^0.0.2"},"dependencies":{"babel-runtime":"6.x","classnames":"2.x","dom-scroll-into-view":"1.x","mini-store":"^1.1.0","mutationobserver-shim":"^0.3.2","prop-types":"^15.5.6","rc-animate":"2.x","rc-trigger":"^2.3.0","rc-util":"^4.1.0","resize-observer-polyfill":"^1.5.0"},"pre-commit":["lint"],"readme":"# rc-menu\n---\n\nreact menu component. port from https://github.com/kissyteam/menu\n\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-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[travis-image]: https://img.shields.io/travis/react-component/menu.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/menu\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[gemnasium-image]: http://img.shields.io/gemnasium/react-component/menu.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/menu\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\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\n\n## Screenshot\n\n![alt](https://tfsimg.alipay.com/images/T19vReXg0oXXXXXXXX.png)\n\n\n## Usage\n\n```jsx\nimport Menu, {SubMenu, MenuItem} from 'rc-menu';\nReactDOM.render(<Menu>\n  <MenuItem>1</MenuItem>\n  <SubMenu title=\"2\">\n  <MenuItem>2-1</MenuItem>\n  </SubMenu>\n</Menu>, container);\n```\n\n## install\n\n[![rc-menu](https://nodei.co/npm/rc-menu.png)](https://npmjs.org/package/rc-menu)\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>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          <td>vertical</td>\n          <td>one of [\"horizontal\",\"inline\",\"vertical-left\",\"vertical-right\"]</td>\n        </tr>\n        <tr>\n            <td>activeKey</td>\n            <td>Object</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-animate 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.jsx\">placements.jsx</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    </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\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>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>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>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\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\n## License\n\nrc-menu is released under the MIT license.\n","readmeFilename":"README.md","gitHead":"c21dcbf349c46296c1b72438173200a0c19858ef","_id":"rc-menu@7.4.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"picodoth","email":"picodoth@gmail.com"},"dist":{"integrity":"sha512-bqV3UhhtxhTFbJ1ViI3k9m37yiAQBLywdz9/tsuEygavNwyKZwBagKGHlfhX/OIbqgEHjRbBDgjOUNO3Dy0P7g==","shasum":"4b995aa47470c2735e62e69e9720fea6900989ef","tarball":"http://registry-npm.ywwl.com/rc-menu/download/rc-menu-7.4.0-beta.1.tgz","fileCount":25,"unpackedSize":153327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiSgaCRA9TVsSAnZWagAAcOQP/3XZJhQ0/gloNFp/KOEs\n22LftEXufGV/Ujk2TNDdYRginU3CxGYI61PqwklrRAvawBGCOwIGoN2Wjxtn\nq3bzjo0x1sD4UyIJoLNcidvYz0AT9oVg14HbUK4kteEhC5JM+/TA/mAyVZ0Z\nHaEOjTHL4yw3dFZUrQt9J5PJVVnCwdfmp7/qF2o0MR9WnkLOUR1Zu1y1QQGT\nUQtCOCE55S2H3lnBuSL6giSnV2tMhh1riDk2GKjaZYWb2qTMUe/j7K3iyZay\nG3QoOsjbGp5vr/UWvlkLd8WuaNo5yPVW3YyuNsNf0nGz8mfQRlQXgON3cQpB\ng8ndS6YIX8736uVLHVpNYBQVJ7X9FpXjHRl2ih6RlEC8VB7GsweiU5gQeyLk\nWv54f6XeQVXamaE9rzqKzLLPrva3ge6ggACeVl773E/efWPBXYvzm9l2TILF\nMMGPvnjky6DYOSdknlyrwwhWGfKvJuqpuksuuSHkkzbPwDXfJosuvn6ooMrC\nLHCu2pXK/q5YkOcYqwlSjzwOANUwll5KJu5/7VR3/PKcc5uQlTIU7zWCsMAF\nKjRknWfblaMr6up7wcgIQisrslqj1xOYNCT/LRgr2HuPbZNGiV15cl8MoviQ\nXAV5cyw+WgyMLvS6DkSTHbgOwYn5sMfM2exKqqz+IzUAmPvuLmTXiAZYFHJV\n/C61\r\n=MYtH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKDJB1TnOe1rHZYcp/5ZnQVrgpTfq6mdnwyApBWYj5TQIhAOzppJLGSkycJSCpT0/R1CycHhXI2RxRHSgIiV1cCiDf"}],"size":31065,"noattachment":false,"key":"/rc-menu/-/rc-menu-7.4.0-beta.1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-menu_7.4.0-beta.1_1535715353488_0.9537741486279308"},"_hasShrinkwrap":false,"publish_time":1535715353753,"_cnpm_publish_time":1535715353753,"dist-tags":{"beta":"7.4.0-beta.1","latest":"9.16.1"}}