diff --git a/docs/bundle.js b/docs/bundle.js index 792012d..ebb418d 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -626,7 +626,7 @@ eval("\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _class, _temp2;\n\nvar _chainedFunction = __webpack_require__(\"../node_modules/chained-function/lib/index.js\");\n\nvar _chainedFunction2 = _interopRequireDefault(_chainedFunction);\n\nvar _classnames = __webpack_require__(\"../node_modules/classnames/index.js\");\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _propTypes = __webpack_require__(\"../node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(\"../node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _matchComponent = __webpack_require__(\"../src/match-component.js\");\n\nvar _matchComponent2 = _interopRequireDefault(_matchComponent);\n\nvar _DropdownMenu = __webpack_require__(\"../src/DropdownMenu.jsx\");\n\nvar _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);\n\nvar _index = __webpack_require__(\"../src/index.styl\");\n\nvar _index2 = _interopRequireDefault(_index);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MenuItem = (_temp2 = _class = function (_Component) {\n _inherits(MenuItem, _Component);\n\n function MenuItem() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MenuItem);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.isMenuItem = (0, _matchComponent2.default)(MenuItem), _this.handleClick = function (event) {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n onSelect = _this$props.onSelect,\n eventKey = _this$props.eventKey;\n\n\n if (disabled) {\n event.preventDefault();\n }\n\n if (disabled) {\n return;\n }\n\n if (onSelect) {\n onSelect(eventKey, event);\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MenuItem.prototype.render = function render() {\n var _this2 = this,\n _cx;\n\n var _props = this.props,\n componentType = _props.componentType,\n Component = _props.componentClass,\n active = _props.active,\n disabled = _props.disabled,\n divider = _props.divider,\n eventKey = _props.eventKey,\n header = _props.header,\n onClick = _props.onClick,\n open = _props.open,\n pullRight = _props.pullRight,\n onClose = _props.onClose,\n onSelect = _props.onSelect,\n rootCloseEvent = _props.rootCloseEvent,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = _objectWithoutProperties(_props, ['componentType', 'componentClass', 'active', 'disabled', 'divider', 'eventKey', 'header', 'onClick', 'open', 'pullRight', 'onClose', 'onSelect', 'rootCloseEvent', 'className', 'style', 'children']);\n\n if (divider) {\n // Forcibly blank out the children; separators shouldn't render any.\n props.children = undefined;\n\n return _react2.default.createElement(\n Component,\n _extends({}, props, {\n role: 'separator',\n className: (0, _classnames2.default)(className, _index2.default.divider),\n style: style\n }),\n children\n );\n }\n\n if (header) {\n return _react2.default.createElement(\n Component,\n _extends({}, props, {\n role: 'heading',\n className: (0, _classnames2.default)(className, _index2.default.header),\n style: style\n }),\n children\n );\n }\n\n var menuItems = _react2.default.Children.toArray(children).filter(function (child) {\n return _react2.default.isValidElement(child) && _this2.isMenuItem(child);\n });\n\n var others = _react2.default.Children.toArray(children).filter(function (child) {\n return !(_react2.default.isValidElement(child) && _this2.isMenuItem(child));\n });\n\n return _react2.default.createElement(\n Component,\n {\n role: 'presentation',\n className: (0, _classnames2.default)(className, _index2.default.menuItemWrapper, (_cx = {}, _cx[_index2.default.active] = active, _cx[_index2.default.disabled] = disabled, _cx[_index2.default.dropdownSubmenu] = menuItems.length > 0, _cx[_index2.default.open] = open, _cx)),\n style: style\n },\n _react2.default.createElement(\n 'div',\n _extends({}, props, {\n className: _index2.default.menuItem,\n disabled: disabled,\n role: 'menuitem',\n tabIndex: '-1',\n onClick: (0, _chainedFunction2.default)(onClick, this.handleClick)\n }),\n others\n ),\n menuItems.length > 0 && _react2.default.createElement(\n _DropdownMenu2.default,\n {\n open: open,\n pullRight: pullRight,\n onClose: onClose,\n onSelect: onSelect,\n rootCloseEvent: rootCloseEvent\n },\n menuItems\n )\n );\n };\n\n return MenuItem;\n}(_react.Component), _class.propTypes = {\n componentType: _propTypes2.default.any,\n\n // A custom element for this component.\n componentClass: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),\n\n // Highlight the menu item as active.\n active: _propTypes2.default.bool,\n\n // Disable the menu item, making it unselectable.\n disabled: _propTypes2.default.bool,\n\n // Style the menu item as a horizontal rule, providing visual separation between groups of menu items.\n divider: _propTypes2.default.bool,\n\n // Value passed to the `onSelect` handler, useful for identifying the selected menu item.\n eventKey: _propTypes2.default.any,\n\n // Style the menu item as a header label, useful for describing a group of menu items.\n header: _propTypes2.default.bool,\n\n // Callback fired when the menu item is clicked.\n onClick: _propTypes2.default.func,\n\n // Dropdown\n open: _propTypes2.default.bool,\n pullRight: _propTypes2.default.bool,\n onClose: _propTypes2.default.func,\n onSelect: _propTypes2.default.func,\n rootCloseEvent: _propTypes2.default.oneOf(['click', 'mousedown'])\n}, _class.defaultProps = {\n componentClass: 'div',\n active: false,\n disabled: false,\n divider: false,\n header: false,\n\n // DropdownMenu\n open: false,\n pullRight: false\n}, _temp2);\n\n// For component matching\n\nMenuItem.defaultProps.componentType = MenuItem;\n\nexports.default = MenuItem;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vc3JjL01lbnVJdGVtLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uLi9zcmMvTWVudUl0ZW0uanN4P2M3MTYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNoYWluZWRGdW5jdGlvbiBmcm9tICdjaGFpbmVkLWZ1bmN0aW9uJztcbmltcG9ydCBjeCBmcm9tICdjbGFzc25hbWVzJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IG1hdGNoIGZyb20gJy4vbWF0Y2gtY29tcG9uZW50JztcbmltcG9ydCBEcm9wZG93bk1lbnUgZnJvbSAnLi9Ecm9wZG93bk1lbnUnO1xuaW1wb3J0IHN0eWxlcyBmcm9tICcuL2luZGV4LnN0eWwnO1xuXG5jbGFzcyBNZW51SXRlbSBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgc3RhdGljIHByb3BUeXBlcyA9IHtcbiAgICAgICAgY29tcG9uZW50VHlwZTogUHJvcFR5cGVzLmFueSxcblxuICAgICAgICAvLyBBIGN1c3RvbSBlbGVtZW50IGZvciB0aGlzIGNvbXBvbm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gICAgfVxuICAgIH07XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgIGNvbXBvbmVudFR5cGUsIC8vIGVzbGludC1kaXNhYmxlLWxpbmVcbiAgICAgICAgICAgIGNvbXBvbmVudENsYXNzOiBDb21wb25lbnQsXG4gICAgICAgICAgICBhY3RpdmUsXG4gICAgICAgICAgICBkaXNhYmxlZCxcbiAgICAgICAgICAgIGRpdmlkZXIsXG4gICAgICAgICAgICBldmVudEtleSwgLy8gZXNsaW50LWRpc2FibGUtbGluZVxuICAgICAgICAgICAgaGVhZGVyLFxuICAgICAgICAgICAgb25DbGljayxcblxuICAgICAgICAgICAgLy8gRHJvcGRvd25cbiAgICAgICAgICAgIG9wZW4sXG4gICAgICAgICAgICBwdWxsUmlnaHQsXG4gICAgICAgICAgICBvbkNsb3NlLFxuICAgICAgICAgICAgb25TZWxlY3QsXG4gICAgICAgICAgICByb290Q2xvc2VFdmVudCxcblxuICAgICAgICAgICAgY2xhc3NOYW1lLFxuICAgICAgICAgICAgc3R5bGUsXG4gICAgICAgICAgICBjaGlsZHJlbixcbiAgICAgICAgICAgIC4uLnByb3BzXG4gICAgICAgIH0gPSB0aGlzLnByb3BzO1xuXG4gICAgICAgIGlmIChkaXZpZGVyKSB7XG4gICAgICAgICAgICAvLyBGb3JjaWJseSBibGFuayBvdXQgdGhlIGNoaWxkcmVuOyBzZXBhcmF0b3JzIHNob3VsZG4ndCByZW5kZXIgYW55LlxuICAgICAgICAgICAgcHJvcHMuY2hpbGRyZW4gPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPENvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgICB7Li4ucHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIHJvbGU9XCJzZXBhcmF0b3JcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KGNsYXNzTmFtZSwgc3R5bGVzLmRpdmlkZXIpfVxuICAgICAgICAgICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgICAgICAgPC9Db21wb25lbnQ+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhlYWRlcikge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcm9sZT1cImhlYWRpbmdcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KGNsYXNzTmFtZSwgc3R5bGVzLmhlYWRlcil9XG4gICAgICAgICAgICAgICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgICAgICA8L0NvbXBvbmVudD5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBtZW51SXRlbXMgPSBSZWFjdC5DaGlsZHJlbi50b0FycmF5KGNoaWxkcmVuKVxuICAgICAgICAgICAgLmZpbHRlcihjaGlsZCA9PiBSZWFjdC5pc1ZhbGlkRWxlbWVudChjaGlsZCkgJiYgdGhpcy5pc01lbnVJdGVtKGNoaWxkKSk7XG5cbiAgICAgICAgY29uc3Qgb3RoZXJzID0gUmVhY3QuQ2hpbGRyZW4udG9BcnJheShjaGlsZHJlbilcbiAgICAgICAgICAgIC5maWx0ZXIoY2hpbGQgPT4gIShSZWFjdC5pc1ZhbGlkRWxlbWVudChjaGlsZCkgJiYgdGhpcy5pc01lbnVJdGVtKGNoaWxkKSkpO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgcm9sZT1cInByZXNlbnRhdGlvblwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeChjbGFzc05hbWUsIHN0eWxlcy5tZW51SXRlbVdyYXBwZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5hY3RpdmVdOiBhY3RpdmUsXG4gICAgICAgICAgICAgICAgICAgIFtzdHlsZXMuZGlzYWJsZWRdOiBkaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5kcm9wZG93blN1Ym1lbnVdOiBtZW51SXRlbXMubGVuZ3RoID4gMCxcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5vcGVuXTogb3BlblxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtzdHlsZXMubWVudUl0ZW19XG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9e2NoYWluZWRGdW5jdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZUNsaWNrXG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7b3RoZXJzfVxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIHsobWVudUl0ZW1zLmxlbmd0aCA+IDApICYmXG4gICAgICAgICAgICAgICAgICAgIDxEcm9wZG93bk1lbnVcbiAgICAgICAgICAgICAgICAgICAg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E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQXVCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUVBO0FBQ0E7QUFDQTtBQUpBO0FBTUE7QUFOQTtBQVNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUVBO0FBQ0E7QUFDQTtBQUpBO0FBTUE7QUFOQTtBQVNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQU1BO0FBUkE7QUFVQTtBQUFBO0FBQUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTkE7QUFXQTtBQVhBO0FBYUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBT0E7QUFQQTtBQXhCQTtBQW9DQTtBQUNBOztBQXJLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFoQ0E7QUF1Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBVEE7QUFDQTtBQWdJQTtBQUNBO0FBQUE7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../src/MenuItem.jsx\n"); +eval("\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _class, _temp2;\n\nvar _chainedFunction = __webpack_require__(\"../node_modules/chained-function/lib/index.js\");\n\nvar _chainedFunction2 = _interopRequireDefault(_chainedFunction);\n\nvar _classnames = __webpack_require__(\"../node_modules/classnames/index.js\");\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _propTypes = __webpack_require__(\"../node_modules/prop-types/index.js\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(\"../node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _matchComponent = __webpack_require__(\"../src/match-component.js\");\n\nvar _matchComponent2 = _interopRequireDefault(_matchComponent);\n\nvar _DropdownMenu = __webpack_require__(\"../src/DropdownMenu.jsx\");\n\nvar _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);\n\nvar _index = __webpack_require__(\"../src/index.styl\");\n\nvar _index2 = _interopRequireDefault(_index);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MenuItem = (_temp2 = _class = function (_Component) {\n _inherits(MenuItem, _Component);\n\n function MenuItem() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MenuItem);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.isMenuItem = (0, _matchComponent2.default)(MenuItem), _this.handleClick = function (event) {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n onSelect = _this$props.onSelect,\n eventKey = _this$props.eventKey;\n\n\n if (disabled) {\n event.preventDefault();\n }\n\n if (disabled) {\n return;\n }\n\n if (onSelect) {\n onSelect(eventKey, event);\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MenuItem.prototype.render = function render() {\n var _this2 = this,\n _cx;\n\n var _props = this.props,\n componentType = _props.componentType,\n Component = _props.componentClass,\n active = _props.active,\n disabled = _props.disabled,\n divider = _props.divider,\n eventKey = _props.eventKey,\n header = _props.header,\n onClick = _props.onClick,\n open = _props.open,\n pullRight = _props.pullRight,\n onClose = _props.onClose,\n onSelect = _props.onSelect,\n rootCloseEvent = _props.rootCloseEvent,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = _objectWithoutProperties(_props, ['componentType', 'componentClass', 'active', 'disabled', 'divider', 'eventKey', 'header', 'onClick', 'open', 'pullRight', 'onClose', 'onSelect', 'rootCloseEvent', 'className', 'style', 'children']);\n\n if (divider) {\n // Forcibly blank out the children; separators shouldn't render any.\n props.children = undefined;\n\n return _react2.default.createElement(\n Component,\n _extends({}, props, {\n role: 'separator',\n className: (0, _classnames2.default)(className, _index2.default.divider),\n style: style\n }),\n children\n );\n }\n\n if (header) {\n return _react2.default.createElement(\n Component,\n _extends({}, props, {\n role: 'heading',\n className: (0, _classnames2.default)(className, _index2.default.header),\n style: style\n }),\n children\n );\n }\n\n var menuItems = _react2.default.Children.toArray(children).filter(function (child) {\n return _react2.default.isValidElement(child) && _this2.isMenuItem(child);\n });\n\n var others = _react2.default.Children.toArray(children).filter(function (child) {\n return !(_react2.default.isValidElement(child) && _this2.isMenuItem(child));\n });\n\n return _react2.default.createElement(\n Component,\n {\n role: 'presentation',\n className: (0, _classnames2.default)(className, _index2.default.menuItemWrapper, (_cx = {}, _cx[_index2.default.active] = active, _cx[_index2.default.disabled] = disabled, _cx[_index2.default.dropdownSubmenu] = menuItems.length > 0, _cx[_index2.default.open] = open, _cx)),\n style: style\n },\n _react2.default.createElement(\n 'div',\n _extends({}, props, {\n className: _index2.default.menuItem,\n disabled: disabled,\n role: 'menuitem',\n tabIndex: '-1',\n onClick: (0, _chainedFunction2.default)(onClick, this.handleClick)\n }),\n others\n ),\n menuItems.length > 0 && _react2.default.createElement(\n _DropdownMenu2.default,\n {\n open: open,\n pullRight: pullRight,\n onClose: onClose,\n onSelect: onSelect,\n rootCloseEvent: rootCloseEvent\n },\n menuItems\n )\n );\n };\n\n return MenuItem;\n}(_react.Component), _class.propTypes = {\n componentType: _propTypes2.default.any,\n\n // A custom element for this component.\n componentClass: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),\n\n // Highlight the menu item as active.\n active: _propTypes2.default.bool,\n\n // Disable the menu item, making it unselectable.\n disabled: _propTypes2.default.bool,\n\n // Style the menu item as a horizontal rule, providing visual separation between groups of menu items.\n divider: _propTypes2.default.bool,\n\n // Value passed to the `onSelect` handler, useful for identifying the selected menu item.\n eventKey: _propTypes2.default.any,\n\n // Style the menu item as a header label, useful for describing a group of menu items.\n header: _propTypes2.default.bool,\n\n // Callback fired when the menu item is clicked, even if it is disabled.\n onClick: _propTypes2.default.func,\n\n // Dropdown\n open: _propTypes2.default.bool,\n pullRight: _propTypes2.default.bool,\n onClose: _propTypes2.default.func,\n onSelect: _propTypes2.default.func,\n rootCloseEvent: _propTypes2.default.oneOf(['click', 'mousedown'])\n}, _class.defaultProps = {\n componentClass: 'div',\n active: false,\n disabled: false,\n divider: false,\n header: false,\n\n // DropdownMenu\n open: false,\n pullRight: false\n}, _temp2);\n\n// For component matching\n\nMenuItem.defaultProps.componentType = MenuItem;\n\nexports.default = MenuItem;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vc3JjL01lbnVJdGVtLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uLi9zcmMvTWVudUl0ZW0uanN4P2M3MTYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNoYWluZWRGdW5jdGlvbiBmcm9tICdjaGFpbmVkLWZ1bmN0aW9uJztcbmltcG9ydCBjeCBmcm9tICdjbGFzc25hbWVzJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgUmVhY3QsIHsgQ29tcG9uZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IG1hdGNoIGZyb20gJy4vbWF0Y2gtY29tcG9uZW50JztcbmltcG9ydCBEcm9wZG93bk1lbnUgZnJvbSAnLi9Ecm9wZG93bk1lbnUnO1xuaW1wb3J0IHN0eWxlcyBmcm9tICcuL2luZGV4LnN0eWwnO1xuXG5jbGFzcyBNZW51SXRlbSBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgc3RhdGljIHByb3BUeXBlcyA9IHtcbiAgICAgICAgY29tcG9uZW50VHlwZTogUHJvcFR5cGVzLmFueSxcblxuICAgICAgICAvLyBBIGN1c3RvbSBlbGVtZW50IGZvciB0aGlzIGNvbXBvbmVudC5cbiAgICAgICAgY29tcG9uZW50Q2xhc3M6IFByb3BUeXBlcy5vbmVPZlR5cGUoW1xuICAgICAgICAgICAgUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIFByb3BUeXBlcy5mdW5jXG4gICAgICAgIF0pLFxuXG4gICAgICAgIC8vIEhpZ2hsaWdodCB0aGUgbWVudSBpdGVtIGFzIGFjdGl2ZS5cbiAgICAgICAgYWN0aXZlOiBQcm9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zZUV2ZW50OiBQcm9wVHlwZXMub25lT2YoW1xuICAgICAgICAgICAgJ2NsaWNrJyxcbiAgICAgICAgICAgICdtb3VzZWRvd24nXG4gICAgICAgIF0pXG4gICAgfTtcblxuICAgIHN0YXRpYyBkZWZhdWx0UHJvcHMgPSB7XG4gICAgICAgIGNvbXBvbmVudENsYXNzOiAnZGl2JyxcbiAgICAgICAgYWN0aXZlOiBmYWxzZSxcbiAgICAgICAgZGlzYWJsZWQ6IGZhbHNlLFxuICAgICAgICBkaXZpZGVyOiBmYWxzZSxcbiAgICAgICAgaGVhZGVyOiBmYWxzZSxcblxuICAgICAgICAvLyBEcm9wZG93bk1lbnVcbiAgICAgICAgb3BlbjogZmFsc2UsXG4gICAgICAgIHB1bGxSaWdodDogZmFsc2VcbiAgICB9O1xuXG4gICAgaXNNZW51SXRlbSA9IG1hdGNoKE1lbnVJdGVtKTtcblxuICAgIGhhbmRsZUNsaWNrID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGNvbnN0IHsgZGlzYWJsZWQsIG9uU2VsZWN0LCBldmVudEtleSB9ID0gdGhpcy5wcm9wcztcblxuICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvblNlbGVjdCkge1xuICAgICAgICAgICAgb25TZWxlY3QoZXZlbnRLZXksIGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgIGNvbXBvbmVudFR5cGUsIC8vIGVzbGludC1kaXNhYmxlLWxpbmVcbiAgICAgICAgICAgIGNvbXBvbmVudENsYXNzOiBDb21wb25lbnQsXG4gICAgICAgICAgICBhY3RpdmUsXG4gICAgICAgICAgICBkaXNhYmxlZCxcbiAgICAgICAgICAgIGRpdmlkZXIsXG4gICAgICAgICAgICBldmVudEtleSwgLy8gZXNsaW50LWRpc2FibGUtbGluZVxuICAgICAgICAgICAgaGVhZGVyLFxuICAgICAgICAgICAgb25DbGljayxcblxuICAgICAgICAgICAgLy8gRHJvcGRvd25cbiAgICAgICAgICAgIG9wZW4sXG4gICAgICAgICAgICBwdWxsUmlnaHQsXG4gICAgICAgICAgICBvbkNsb3NlLFxuICAgICAgICAgICAgb25TZWxlY3QsXG4gICAgICAgICAgICByb290Q2xvc2VFdmVudCxcblxuICAgICAgICAgICAgY2xhc3NOYW1lLFxuICAgICAgICAgICAgc3R5bGUsXG4gICAgICAgICAgICBjaGlsZHJlbixcbiAgICAgICAgICAgIC4uLnByb3BzXG4gICAgICAgIH0gPSB0aGlzLnByb3BzO1xuXG4gICAgICAgIGlmIChkaXZpZGVyKSB7XG4gICAgICAgICAgICAvLyBGb3JjaWJseSBibGFuayBvdXQgdGhlIGNoaWxkcmVuOyBzZXBhcmF0b3JzIHNob3VsZG4ndCByZW5kZXIgYW55LlxuICAgICAgICAgICAgcHJvcHMuY2hpbGRyZW4gPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPENvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgICB7Li4ucHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIHJvbGU9XCJzZXBhcmF0b3JcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KGNsYXNzTmFtZSwgc3R5bGVzLmRpdmlkZXIpfVxuICAgICAgICAgICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgICAgICAgPC9Db21wb25lbnQ+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhlYWRlcikge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcm9sZT1cImhlYWRpbmdcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KGNsYXNzTmFtZSwgc3R5bGVzLmhlYWRlcil9XG4gICAgICAgICAgICAgICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgICAgICA8L0NvbXBvbmVudD5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBtZW51SXRlbXMgPSBSZWFjdC5DaGlsZHJlbi50b0FycmF5KGNoaWxkcmVuKVxuICAgICAgICAgICAgLmZpbHRlcihjaGlsZCA9PiBSZWFjdC5pc1ZhbGlkRWxlbWVudChjaGlsZCkgJiYgdGhpcy5pc01lbnVJdGVtKGNoaWxkKSk7XG5cbiAgICAgICAgY29uc3Qgb3RoZXJzID0gUmVhY3QuQ2hpbGRyZW4udG9BcnJheShjaGlsZHJlbilcbiAgICAgICAgICAgIC5maWx0ZXIoY2hpbGQgPT4gIShSZWFjdC5pc1ZhbGlkRWxlbWVudChjaGlsZCkgJiYgdGhpcy5pc01lbnVJdGVtKGNoaWxkKSkpO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgcm9sZT1cInByZXNlbnRhdGlvblwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeChjbGFzc05hbWUsIHN0eWxlcy5tZW51SXRlbVdyYXBwZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5hY3RpdmVdOiBhY3RpdmUsXG4gICAgICAgICAgICAgICAgICAgIFtzdHlsZXMuZGlzYWJsZWRdOiBkaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5kcm9wZG93blN1Ym1lbnVdOiBtZW51SXRlbXMubGVuZ3RoID4gMCxcbiAgICAgICAgICAgICAgICAgICAgW3N0eWxlcy5vcGVuXTogb3BlblxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtzdHlsZXMubWVudUl0ZW19XG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9e2NoYWluZWRGdW5jdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZUNsaWNrXG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7b3RoZXJzfVxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIHsobWVudUl0ZW1zLmxlbmd0aCA+IDApICYmXG4gICAgICAgICAgICAgICAgICAgIDxEcm9wZG93bk1lbnVcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZW49e29wZW59XG4gICAgICAgICAgICAgICAgICAgICAgICBwdWxsUmlnaHQ9e3B1bGxSaWdodH1cbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xvc2U9e29uQ2xvc2V9XG4gICAgICAgICAgICAgICAgICAgICAgICBvblNlbGVjdD17b25TZWxlY3R9XG4gICAgICAgICAgICAgICAgICAgICAgICByb290Q2xv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VBO0FBQ0E7QUFDQTtBQUpBO0FBTUE7QUFOQTtBQVNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQU1BO0FBUkE7QUFVQTtBQUFBO0FBQUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTkE7QUFXQTtBQVhBO0FBYUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBT0E7QUFQQTtBQXhCQTtBQW9DQTtBQUNBOztBQXJLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFoQ0E7QUF1Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBVEE7QUFDQTtBQWdJQTtBQUNBO0FBQUE7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../src/MenuItem.jsx\n"); /***/ }), diff --git a/docs/index.html b/docs/index.html index d4c417e..cd03cb9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,5 +11,5 @@
- + diff --git a/src/MenuItem.jsx b/src/MenuItem.jsx index aacc98d..250cb13 100644 --- a/src/MenuItem.jsx +++ b/src/MenuItem.jsx @@ -31,7 +31,7 @@ class MenuItem extends Component { // Style the menu item as a header label, useful for describing a group of menu items. header: PropTypes.bool, - // Callback fired when the menu item is clicked. + // Callback fired when the menu item is clicked, even if it is disabled. onClick: PropTypes.func, // Dropdown