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

@atlaskit/dropdown-menu

Package Overview
Dependencies
Maintainers
1
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/dropdown-menu - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

dist/es/util/safeContextCall.js

14

CHANGELOG.md

@@ -1,6 +0,16 @@

<a name="3.5.0"></a>
# 3.5.0 (2017-07-28)
<a name="3.5.1"></a>
## 3.5.1 (2017-08-10)
<a name="3.5.1"></a>
## 3.5.1 (2017-08-10)
### Bug Fixes
* **component:** handle missing context in dropdown items gracefully ([5a36eea](https://bitbucket.org/atlassian/atlaskit/commits/5a36eea))
<a name="3.5.0"></a>

@@ -7,0 +17,0 @@ # 3.5.0 (2017-07-28)

2

dist/bundle-cjs.min.js

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

module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}});var i=n(10);Object.defineProperty(t,"DropdownMenuStateless",{enumerable:!0,get:function(){return r(i).default}});var u=n(24);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return r(u).default}});var a=n(29);Object.defineProperty(t,"DropdownItemRadio",{enumerable:!0,get:function(){return r(a).default}});var d=n(33);Object.defineProperty(t,"DropdownItemCheckbox",{enumerable:!0,get:function(){return r(d).default}});var l=n(35);Object.defineProperty(t,"DropdownItemGroup",{enumerable:!0,get:function(){return r(l).default}});var s=n(36);Object.defineProperty(t,"DropdownItemGroupRadio",{enumerable:!0,get:function(){return r(s).default}});var c=n(39);Object.defineProperty(t,"DropdownItemGroupCheckbox",{enumerable:!0,get:function(){return r(c).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),u=n(4),a=r(u),d=n(5),l=r(d),s=n(6),c=r(s),f=n(7),p=r(f),h=n(8),m=r(h),g=n(9),I=r(g),v=n(10),y=r(v),b=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var u=arguments.length,d=Array(u),s=0;s<u;s++)d[s]=arguments[s];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(d))),r.state={isOpen:r.props.defaultOpen,items:[].concat((0,i.default)(r.props.items))},r.findActivatedGroup=function(e){return r.state.items.filter(function(t){return t.items.indexOf(e)>-1})[0]},r.handleItemActivation=function(e){var t=e.item,n=r.findActivatedGroup(t),o=[].concat((0,i.default)(r.state.items));switch(t.type){case"checkbox":t.isChecked=!t.isChecked,r.props.onItemActivated({item:t}),r.setState({items:o});break;case"radio":n.items.forEach(function(e){e===t?e.isChecked=!0:e.isChecked=!1}),r.props.onItemActivated({item:t}),r.setState({items:o});break;case"link":default:r.props.onItemActivated({item:t}),r.close()}},r.handleOpenChange=function(e){r.setState({isOpen:e.isOpen}),r.props.onOpenChange(e)},r.close=function(){r.setState({isOpen:!1}),r.props.onOpenChange({isOpen:!1})},o=n,(0,l.default)(r,o)}return(0,c.default)(t,e),t.prototype.componentWillReceiveProps=function(e){e.items!==this.state.items&&this.setState({items:[].concat((0,i.default)(e.items))})},t.prototype.render=function(){var e=this.state.isOpen,t=this.props,n=t.appearance,r=t.children,o=t.isLoading,i=t.items,u=t.position,a=t.shouldAllowMultilineItems,d=t.shouldFitContainer,l=t.shouldFlip,s=t.trigger,c=t.triggerButtonProps,f=t.triggerType;return p.default.createElement(y.default,{appearance:n,isOpen:e,isLoading:o,items:i,onItemActivated:this.handleItemActivation,onOpenChange:this.handleOpenChange,position:u,shouldAllowMultilineItems:a,shouldFitContainer:d,shouldFlip:l,trigger:s,triggerButtonProps:c,triggerType:f},r)},t}(f.Component);b.propTypes={appearance:m.default.oneOf(["default","tall"]),children:m.default.node,defaultOpen:m.default.bool,isLoading:m.default.bool,items:m.default.arrayOf(m.default.shape({elemAfter:m.default.node,heading:m.default.string,items:m.default.arrayOf(m.default.shape({content:m.default.string,elemBefore:m.default.node,href:m.default.string,isDisabled:m.default.bool,target:m.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:m.default.func,shouldAllowMultilineItems:m.default.bool,onOpenChange:m.default.func,position:m.default.string,shouldFitContainer:m.default.bool,shouldFlip:m.default.bool,trigger:m.default.node,triggerButtonProps:m.default.shape(I.default.propTypes),triggerType:m.default.oneOf(["default","button"])},b.defaultProps={appearance:"default",defaultOpen:!1,isLoading:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=b},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@atlaskit/button")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),u=n(4),a=r(u),d=n(5),l=r(d),s=n(6),c=r(s),f=n(7),p=r(f),h=n(12),m=n(8),g=r(m),I=n(13),v=r(I),y=n(9),b=r(y),C=n(14),x=r(C),O=n(15),_=r(O),M=n(16),P=r(M),k=n(20),A=r(k),D=n(21),E=r(D),T=n(19),F=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var u=arguments.length,d=Array(u),s=0;s<u;s++)d[s]=arguments[s];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(d))),r.state={id:(0,v.default)()},r.componentDidMount=function(){r.isUsingDeprecatedAPI()&&(console.warn("DropdownMenu.items is deprecated. Please switch to the declarative API."),r.domItemsList&&r.focusFirstItem())},r.componentDidUpdate=function(e){r.isUsingDeprecatedAPI()&&r.props.isOpen&&!e.isOpen&&r.focusFirstItem()},r.getNextFocusable=function(e,t){var n=void 0===e?-1:e,o=void 0===t?n:t;return n<r.domItemsList.length-1?(n++,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getNextFocusable(n,o)):o},r.getPrevFocusable=function(e,t){var n=e,o=void 0===t?n:t;return n>0?(n--,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getPrevFocusable(n,o)):o||n},r.focusFirstItem=function(){"keydown"===r.sourceOfIsOpen&&r.focusItem(r.getNextFocusable())},r.focusNextItem=function(){r.focusItem(r.getNextFocusable(r.focusedItem))},r.focusPreviousItem=function(){r.focusItem(r.getPrevFocusable(r.focusedItem))},r.focusItem=function(e){r.focusedItem=e,r.domItemsList[r.focusedItem].focus()},r.isTargetChildItem=function(e){if(!e)return!1;var t="droplistItem"===e.getAttribute("data-role"),n=(0,h.findDOMNode)(r);return!(!t||!n)&&n.contains(e)},r.handleKeyboardInteractionForOpen=function(e){switch(e.key){case T.KEY_DOWN:case T.KEY_SPACE:case T.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleKeyboardInteractions=function(e){r.handleKeyboardInteractionForOpen(e)},r.handleKeyboardInteractionsDeprecated=function(e){if(r.props.isOpen)if(r.isTargetChildItem(e.target))switch(e.key){case"ArrowUp":e.preventDefault(),r.focusPreviousItem();break;case"ArrowDown":e.preventDefault(),r.focusNextItem();break;case"Tab":e.preventDefault(),r.close({event:e})}else"ArrowDown"===e.key?(r.sourceOfIsOpen="keydown",r.focusFirstItem()):"Tab"===e.key&&r.close({event:e});else switch(e.key){case T.KEY_DOWN:case T.KEY_SPACE:case T.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleClickDeprecated=function(e){var t=r.domMenuContainer;(!t||t&&!t.contains(e.target))&&r.toggle({source:"click",event:e})},r.isUsingDeprecatedAPI=function(){return Boolean(r.props.items.length)},r.handleClick=function(e){if(r.isUsingDeprecatedAPI())return void r.handleClickDeprecated(e);var t=r,n=t.triggerContainer;if(n&&n.contains(e.target)){var o=r.props.isOpen;r.props.onOpenChange({isOpen:!o,event:e})}},r.triggerContent=function(){var e=r.props,t=e.children,n=e.trigger,o=e.isOpen,u=e.triggerButtonProps,a=e.triggerType,d=r.isUsingDeprecatedAPI()?t:n;if("button"!==a)return d;var l=(0,i.default)({},u),s={ariaControls:r.state.id,ariaExpanded:o,ariaHaspopup:!0,isSelected:o};return l.iconAfter||l.iconBefore||(l.iconAfter=p.default.createElement(_.default,{size:"medium",label:""})),p.default.createElement(b.default,(0,i.default)({},s,l),d)},r.open=function(e){r.sourceOfIsOpen=e.source,r.props.onOpenChange({isOpen:!0,event:e.event})},r.close=function(e){r.sourceOfIsOpen=null,r.props.onOpenChange({isOpen:!1,event:e.event})},r.toggle=function(e){"keydown"!==e.source&&(r.props.isOpen?r.close(e):r.open(e))},r.renderTrigger=function(){var e=r.triggerContent();return r.isUsingDeprecatedAPI()?e:p.default.createElement("div",{ref:function(e){r.triggerContainer=e}},e)},r.renderItems=function(e){return e.map(function(e,t){return p.default.createElement(C.Item,(0,i.default)({},e,{key:t,onActivate:function(t){var n=t.event;r.props.onItemActivated({item:e,event:n})}}),e.content)})},r.renderGroups=function(e){return e.map(function(e,t){return p.default.createElement(C.Group,{heading:e.heading,elemAfter:e.elemAfter,key:t},r.renderItems(e.items))})},r.renderDeprecated=function(){var e=r.props,t=e.items,n=e.shouldFitContainer,o=r.state.id;return p.default.createElement("div",{id:o,ref:function(e){r.domMenuContainer=e,r.domItemsList=e?e.querySelectorAll('[data-role="droplistItem"]'):void 0},role:"menu",style:n?null:{maxWidth:300}},r.renderGroups(t))},o=n,(0,l.default)(r,o)}return(0,c.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.appearance,n=e.children,r=e.isLoading,o=e.isOpen,u=e.onOpenChange,a=e.position,d=e.shouldAllowMultilineItems,l=e.shouldFitContainer,s=e.shouldFlip,c=this.state.id,f=this.isUsingDeprecatedAPI(),h=f?{onKeyDown:this.handleKeyboardInteractionsDeprecated,shouldAllowMultilineItems:d}:{onKeyDown:this.handleKeyboardInteractions};return p.default.createElement(A.default,null,p.default.createElement(x.default,(0,i.default)({appearance:t,isLoading:r,isOpen:o,onClick:this.handleClick,onOpenChange:u,position:a,shouldFitContainer:l,shouldFlip:s,trigger:this.renderTrigger()},h),f?this.renderDeprecated():p.default.createElement(E.default,{id:c,role:"menu",shouldFitContainer:l},p.default.createElement(P.default,null,n))))},t}(f.Component);F.propTypes={appearance:g.default.oneOf(["default","tall"]),children:g.default.node,isLoading:g.default.bool,isOpen:g.default.bool,items:g.default.arrayOf(g.default.shape({elemAfter:g.default.node,heading:g.default.string,items:g.default.arrayOf(g.default.shape({content:g.default.string,elemBefore:g.default.node,href:g.default.string,isDisabled:g.default.bool,target:g.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:g.default.func,onOpenChange:g.default.func,position:g.default.string,shouldAllowMultilineItems:g.default.bool,shouldFitContainer:g.default.bool,shouldFlip:g.default.bool,trigger:g.default.node,triggerButtonProps:g.default.shape(b.default.propTypes),triggerType:g.default.oneOf(["default","button"])},F.defaultProps={appearance:"default",isLoading:!1,isOpen:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=F},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("uid")},function(e,t){e.exports=require("@atlaskit/droplist")},function(e,t){e.exports=require("@atlaskit/icon/glyph/expand")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(4),a=r(u),d=n(5),l=r(d),s=n(6),c=r(s),f=n(7),p=r(f),h=n(8),m=r(h),g=n(18),I=n(19),v=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var i=arguments.length,u=Array(i),d=0;d<i;d++)u[d]=arguments[d];return n=r=(0,l.default)(this,e.call.apply(e,[this].concat(u))),r.registeredItems=[],r.handleItemRegistered=function(e,t){r.registeredItems.push({itemId:e,itemNode:t}),1===r.registeredItems.length&&(r.focusedItemId=e,t.focus())},r.handleItemDeregistered=function(e){r.registeredItems=r.registeredItems.filter(function(t){return t.itemId!==e})},r.handleItemFocused=function(e){r.focusedItemId=e},r.handleItemUpdated=function(e,t){for(var n=-1,o=0;o<r.registeredItems.length;o++)if(r.registeredItems[o].itemId===e){n=o;break}return n===-1?void r.handleItemRegistered(e,t):(r.registeredItems[n].itemNode=t,void(r.focusedItemIndex()===n&&t.focus()))},r.focusedItemIndex=function(){for(var e=r,t=e.focusedItemId,n=e.registeredItems,o=0;o<n.length;o++)if(n[o].itemId===t)return o;return-1},r.handleKeyboard=function(e){var t=e.key;if(t===I.KEY_UP||t===I.KEY_DOWN){e.preventDefault();var n=r.focusedItemIndex();if(n<0)return;var o=t===I.KEY_UP?Math.max(0,n-1):Math.min(r.registeredItems.length-1,n+1);r.registeredItems[o].itemNode.focus()}},o=n,(0,l.default)(r,o)}return(0,c.default)(t,e),t.prototype.getChildContext=function(){return(0,i.default)({},g.focusManagerContext,{itemFocused:this.handleItemFocused,registerItem:this.handleItemRegistered,deregisterItem:this.handleItemDeregistered,updateItem:this.handleItemUpdated})},t.prototype.render=function(){return p.default.createElement("div",{onKeyDown:this.handleKeyboard},this.props.children)},t}(f.Component);v.propTypes={children:m.default.node},v.childContextTypes=(0,i.default)({},g.focusManagerContext,m.default.object),t.default=v},function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"@atlaskit-private-do-not-use/dropdown-menu:"+e};t.focusManagerContext=n("focus-manager"),t.selectionCacheContext=n("selection-cache"),t.selectionManagerContext=n("selection-manager")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_UP="ArrowUp",t.KEY_DOWN="ArrowDown",t.KEY_SPACE=" ",t.KEY_ENTER="Enter",t.KEY_TAB="Tab"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(3),a=r(u),d=n(4),l=r(d),s=n(5),c=r(s),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),I=r(g),v=n(18),y=function(e){function t(){var n,r,o;(0,l.default)(this,t);for(var i=arguments.length,u=Array(i),d=0;d<i;d++)u[d]=arguments[d];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(u))),r.state={selectedItems:[]},r.handleItemSelectionsChanged=function(e,t){var n=r.state.selectedItems,o=[].concat((0,a.default)(n.filter(function(t){return t.groupId!==e})),(0,a.default)(t));r.setState({selectedItems:o})},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},v.selectionCacheContext,{isItemSelected:function(t,n){for(var r=e.state.selectedItems,o=0;o<e.state.selectedItems.length;o++)if(r[o].id===n&&r[o].groupId===t)return!0;return!1},itemsInGroup:function(t){return e.state.selectedItems.filter(function(e){return e.groupId===t})},itemSelectionsChanged:this.handleItemSelectionsChanged})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);y.propTypes={children:I.default.node},y.childContextTypes=(0,i.default)({},v.selectionCacheContext,I.default.shape({isItemSelected:I.default.func,itemsInGroup:I.default.func,itemSelectionsChanged:I.default.func})),t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=r(o),u=(0,i.default)(["\n ","\n"],["\n ","\n"]),a=n(23),d=r(a);t.default=d.default.div(u,function(e){var t=e.shouldFitContainer;return t?"":"max-width: 300px;"})},function(e,t){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,t){e.exports=require("styled-components")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),i=r(o),u=n(26),a=r(u);t.default=(0,a.default)(i.default)},function(e,t){e.exports=require("@atlaskit/item")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(11),a=r(u),d=n(27),l=r(d),s=n(4),c=r(s),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),I=r(g),v=n(12),y=r(v),b=n(13),C=r(b),x=n(28),O=r(x),_=n(18),M=function(e){var t,n;return n=t=function(t){function n(){var e,r,o;(0,c.default)(this,n);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return e=r=(0,p.default)(this,t.call.apply(t,[this].concat(u))),r.isFocusable=function(){return!r.props.isDisabled&&!r.props.isHidden},r.handleFocus=function(){r.isFocusable()&&r.context[_.focusManagerContext].itemFocused(r.contextId)},o=e,(0,p.default)(r,o)}return(0,m.default)(n,t),n.prototype.componentDidMount=function(){this.isFocusable()&&(this.contextId=(0,C.default)(),this.context[_.focusManagerContext].registerItem(this.contextId,y.default.findDOMNode(this)))},n.prototype.componentDidUpdate=function(){this.isFocusable()&&this.context[_.focusManagerContext].updateItem(this.contextId,y.default.findDOMNode(this))},n.prototype.componentWillUnmount=function(){this.isFocusable()&&this.context[_.focusManagerContext].deregisterItem(this.contextId)},n.prototype.render=function(){var t=this.props,n=t.children,r=(0,l.default)(t,["children"]);return I.default.createElement(e,(0,a.default)({onFocus:this.handleFocus},r),n)},n}(g.Component),t.displayName="WithItemFocus("+(0,O.default)(e)+")",t.propTypes={children:g.PropTypes.node,isDisabled:g.PropTypes.bool,isHidden:g.PropTypes.bool},t.contextTypes=(0,i.default)({},_.focusManagerContext,g.PropTypes.object.isRequired),n};t.default=M},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),i=r(o),u=n(25),a=r(u),d=n(26),l=r(d),s=n(31),c=r(s);t.default=(0,c.default)((0,l.default)(a.default),i.default,"radio")},function(e,t){e.exports=require("@atlaskit/icon/glyph/radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(11),a=r(u),d=n(27),l=r(d),s=n(4),c=r(s),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),I=r(g),v=n(32),y=n(28),b=r(y),C=n(18),x=n(19),O=function(e,t,n){var r=function(r){function o(){var e,t,n;(0,c.default)(this,o);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return e=t=(0,p.default)(this,r.call.apply(r,[this].concat(u))),t.getIconColors=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?{primary:v.akColorB400,secondary:v.akColorN40}:{primary:v.akColorN40,secondary:v.akColorN40}},t.handleKeyboard=function(e){var n=e.key;n!==x.KEY_ENTER&&n!==x.KEY_SPACE||(e.preventDefault(),t.handleItemActivated())},t.handleItemActivated=function(){t.context[C.selectionManagerContext].itemClicked(t.props.id)},t.isSelectedInDropdown=function(){return t.context[C.selectionManagerContext].isItemSelected(t.props.id)},n=e,(0,p.default)(t,n)}return(0,m.default)(o,r),o.prototype.render=function(){var r=this.props,o=r.children,i=(0,l.default)(r,["children"]),u=this.isSelectedInDropdown(),d=this.getIconColors(u);return I.default.createElement(e,(0,a.default)({role:n,"aria-checked":u,isSelected:u,onClick:this.handleItemActivated,onKeyDown:this.handleKeyboard,elemBefore:I.default.createElement(t,{primaryColor:d.primary,secondaryColor:d.secondary,size:"medium",label:""})},i),o)},o}(g.Component);return r.propTypes={children:g.PropTypes.node,id:g.PropTypes.string.isRequired},r.contextTypes=(0,i.default)({},C.selectionManagerContext,g.PropTypes.object.isRequired),r.displayName="WithToggleInteraction("+(0,b.default)(e)+")",r};t.default=O},function(e,t){e.exports=require("@atlaskit/util-shared-styles")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),i=r(o),u=n(25),a=r(u),d=n(26),l=r(d),s=n(31),c=r(s);t.default=(0,c.default)((0,l.default)(a.default),i.default,"checkbox")},function(e,t){e.exports=require("@atlaskit/icon/glyph/checkbox")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),u=n(5),a=r(u),d=n(6),l=r(d),s=n(7),c=r(s),f=n(8),p=r(f),h=n(25),m=function(e){function t(){return(0,i.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,l.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.elemAfter,r=e.title;return c.default.createElement(h.ItemGroup,{elemAfter:n,title:r},t)},t}(s.Component);m.propTypes={children:p.default.node,title:p.default.string,elemAfter:p.default.oneOfType([p.default.node,p.default.string])},t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),u=n(37),a=r(u);t.default=(0,a.default)(i.default,"radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),i=r(o),u=n(4),a=r(u),d=n(5),l=r(d),s=n(6),c=r(s),f=n(7),p=r(f),h=n(28),m=r(h),g=n(38),I=r(g),v=function(e,t){var n,r;return r=n=function(n){function r(){return(0,a.default)(this,r),(0,l.default)(this,n.apply(this,arguments))}return(0,c.default)(r,n),r.prototype.render=function(){var n=this.props,r=n.children,o=n.id,u=(0,i.default)(n,["children","id"]);return p.default.createElement(e,u,p.default.createElement(I.default,{groupId:o,behavior:t},r))},r}(f.Component),n.displayName="WithDropdownItemSelectionManager("+(0,m.default)(e)+")",n.propTypes={children:f.PropTypes.node,id:f.PropTypes.string.isRequired},r};t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(3),a=r(u),d=n(4),l=r(d),s=n(5),c=r(s),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),I=r(g),v=n(18),y=function(e){function t(){var n,r,o;(0,l.default)(this,t);for(var i=arguments.length,u=Array(i),d=0;d<i;d++)u[d]=arguments[d];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(u))),r.handleItemClicked=function(e){var t=r.props.behavior;"checkbox"===t?r.handleCheckboxItemClicked(e):"radio"===t&&r.handleRadioItemClicked(e)},r.handleCheckboxItemClicked=function(e){var t=r.context[v.selectionCacheContext],n=t.itemsInGroup(r.props.groupId),o=t.isItemSelected(r.props.groupId,e)?n.filter(function(t){return t.id!==e}):[].concat((0,a.default)(n),[{id:e,groupId:r.props.groupId}]);r.updateCacheContextWithSelections(o)},r.handleRadioItemClicked=function(e){r.updateCacheContextWithSelections([{id:e,groupId:r.props.groupId}])},r.updateCacheContextWithSelections=function(e){r.context[v.selectionCacheContext].itemSelectionsChanged(r.props.groupId,e)},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},v.selectionManagerContext,{isItemSelected:function(t){return e.context[v.selectionCacheContext].isItemSelected(e.props.groupId,t)},itemClicked:this.handleItemClicked})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);y.propTypes={behavior:I.default.oneOf(["checkbox","radio"]).isRequired,groupId:I.default.string.isRequired,children:I.default.node},y.childContextTypes=(0,i.default)({},v.selectionManagerContext,I.default.object),y.contextTypes=(0,i.default)({},v.selectionCacheContext,I.default.object.isRequired),t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),u=n(37),a=r(u);t.default=(0,a.default)(i.default,"checkbox")}]);
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}});var i=n(10);Object.defineProperty(t,"DropdownMenuStateless",{enumerable:!0,get:function(){return r(i).default}});var u=n(24);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return r(u).default}});var a=n(30);Object.defineProperty(t,"DropdownItemRadio",{enumerable:!0,get:function(){return r(a).default}});var l=n(34);Object.defineProperty(t,"DropdownItemCheckbox",{enumerable:!0,get:function(){return r(l).default}});var d=n(36);Object.defineProperty(t,"DropdownItemGroup",{enumerable:!0,get:function(){return r(d).default}});var s=n(37);Object.defineProperty(t,"DropdownItemGroupRadio",{enumerable:!0,get:function(){return r(s).default}});var c=n(40);Object.defineProperty(t,"DropdownItemGroupCheckbox",{enumerable:!0,get:function(){return r(c).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),u=n(4),a=r(u),l=n(5),d=r(l),s=n(6),c=r(s),f=n(7),p=r(f),h=n(8),m=r(h),g=n(9),I=r(g),v=n(10),y=r(v),b=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var u=arguments.length,l=Array(u),s=0;s<u;s++)l[s]=arguments[s];return n=r=(0,d.default)(this,e.call.apply(e,[this].concat(l))),r.state={isOpen:r.props.defaultOpen,items:[].concat((0,i.default)(r.props.items))},r.findActivatedGroup=function(e){return r.state.items.filter(function(t){return t.items.indexOf(e)>-1})[0]},r.handleItemActivation=function(e){var t=e.item,n=r.findActivatedGroup(t),o=[].concat((0,i.default)(r.state.items));switch(t.type){case"checkbox":t.isChecked=!t.isChecked,r.props.onItemActivated({item:t}),r.setState({items:o});break;case"radio":n.items.forEach(function(e){e===t?e.isChecked=!0:e.isChecked=!1}),r.props.onItemActivated({item:t}),r.setState({items:o});break;case"link":default:r.props.onItemActivated({item:t}),r.close()}},r.handleOpenChange=function(e){r.setState({isOpen:e.isOpen}),r.props.onOpenChange(e)},r.close=function(){r.setState({isOpen:!1}),r.props.onOpenChange({isOpen:!1})},o=n,(0,d.default)(r,o)}return(0,c.default)(t,e),t.prototype.componentWillReceiveProps=function(e){e.items!==this.state.items&&this.setState({items:[].concat((0,i.default)(e.items))})},t.prototype.render=function(){var e=this.state.isOpen,t=this.props,n=t.appearance,r=t.children,o=t.isLoading,i=t.items,u=t.position,a=t.shouldAllowMultilineItems,l=t.shouldFitContainer,d=t.shouldFlip,s=t.trigger,c=t.triggerButtonProps,f=t.triggerType;return p.default.createElement(y.default,{appearance:n,isOpen:e,isLoading:o,items:i,onItemActivated:this.handleItemActivation,onOpenChange:this.handleOpenChange,position:u,shouldAllowMultilineItems:a,shouldFitContainer:l,shouldFlip:d,trigger:s,triggerButtonProps:c,triggerType:f},r)},t}(f.Component);b.propTypes={appearance:m.default.oneOf(["default","tall"]),children:m.default.node,defaultOpen:m.default.bool,isLoading:m.default.bool,items:m.default.arrayOf(m.default.shape({elemAfter:m.default.node,heading:m.default.string,items:m.default.arrayOf(m.default.shape({content:m.default.string,elemBefore:m.default.node,href:m.default.string,isDisabled:m.default.bool,target:m.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:m.default.func,shouldAllowMultilineItems:m.default.bool,onOpenChange:m.default.func,position:m.default.string,shouldFitContainer:m.default.bool,shouldFlip:m.default.bool,trigger:m.default.node,triggerButtonProps:m.default.shape(I.default.propTypes),triggerType:m.default.oneOf(["default","button"])},b.defaultProps={appearance:"default",defaultOpen:!1,isLoading:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=b},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@atlaskit/button")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),u=n(4),a=r(u),l=n(5),d=r(l),s=n(6),c=r(s),f=n(7),p=r(f),h=n(12),m=n(8),g=r(m),I=n(13),v=r(I),y=n(9),b=r(y),C=n(14),x=r(C),O=n(15),_=r(O),P=n(16),M=r(P),k=n(20),A=r(k),D=n(21),F=r(D),E=n(19),T=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var u=arguments.length,l=Array(u),s=0;s<u;s++)l[s]=arguments[s];return n=r=(0,d.default)(this,e.call.apply(e,[this].concat(l))),r.state={id:(0,v.default)()},r.componentDidMount=function(){r.isUsingDeprecatedAPI()&&(console.warn("DropdownMenu.items is deprecated. Please switch to the declarative API."),r.domItemsList&&r.focusFirstItem())},r.componentDidUpdate=function(e){r.isUsingDeprecatedAPI()&&r.props.isOpen&&!e.isOpen&&r.focusFirstItem()},r.getNextFocusable=function(e,t){var n=void 0===e?-1:e,o=void 0===t?n:t;return n<r.domItemsList.length-1?(n++,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getNextFocusable(n,o)):o},r.getPrevFocusable=function(e,t){var n=e,o=void 0===t?n:t;return n>0?(n--,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getPrevFocusable(n,o)):o||n},r.focusFirstItem=function(){"keydown"===r.sourceOfIsOpen&&r.focusItem(r.getNextFocusable())},r.focusNextItem=function(){r.focusItem(r.getNextFocusable(r.focusedItem))},r.focusPreviousItem=function(){r.focusItem(r.getPrevFocusable(r.focusedItem))},r.focusItem=function(e){r.focusedItem=e,r.domItemsList[r.focusedItem].focus()},r.isTargetChildItem=function(e){if(!e)return!1;var t="droplistItem"===e.getAttribute("data-role"),n=(0,h.findDOMNode)(r);return!(!t||!n)&&n.contains(e)},r.handleKeyboardInteractionForOpen=function(e){switch(e.key){case E.KEY_DOWN:case E.KEY_SPACE:case E.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleKeyboardInteractions=function(e){r.handleKeyboardInteractionForOpen(e)},r.handleKeyboardInteractionsDeprecated=function(e){if(r.props.isOpen)if(r.isTargetChildItem(e.target))switch(e.key){case"ArrowUp":e.preventDefault(),r.focusPreviousItem();break;case"ArrowDown":e.preventDefault(),r.focusNextItem();break;case"Tab":e.preventDefault(),r.close({event:e})}else"ArrowDown"===e.key?(r.sourceOfIsOpen="keydown",r.focusFirstItem()):"Tab"===e.key&&r.close({event:e});else switch(e.key){case E.KEY_DOWN:case E.KEY_SPACE:case E.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleClickDeprecated=function(e){var t=r.domMenuContainer;(!t||t&&!t.contains(e.target))&&r.toggle({source:"click",event:e})},r.isUsingDeprecatedAPI=function(){return Boolean(r.props.items.length)},r.handleClick=function(e){if(r.isUsingDeprecatedAPI())return void r.handleClickDeprecated(e);var t=r,n=t.triggerContainer;if(n&&n.contains(e.target)){var o=r.props.isOpen;r.props.onOpenChange({isOpen:!o,event:e})}},r.triggerContent=function(){var e=r.props,t=e.children,n=e.trigger,o=e.isOpen,u=e.triggerButtonProps,a=e.triggerType,l=r.isUsingDeprecatedAPI()?t:n;if("button"!==a)return l;var d=(0,i.default)({},u),s={ariaControls:r.state.id,ariaExpanded:o,ariaHaspopup:!0,isSelected:o};return d.iconAfter||d.iconBefore||(d.iconAfter=p.default.createElement(_.default,{size:"medium",label:""})),p.default.createElement(b.default,(0,i.default)({},s,d),l)},r.open=function(e){r.sourceOfIsOpen=e.source,r.props.onOpenChange({isOpen:!0,event:e.event})},r.close=function(e){r.sourceOfIsOpen=null,r.props.onOpenChange({isOpen:!1,event:e.event})},r.toggle=function(e){"keydown"!==e.source&&(r.props.isOpen?r.close(e):r.open(e))},r.renderTrigger=function(){var e=r.triggerContent();return r.isUsingDeprecatedAPI()?e:p.default.createElement("div",{ref:function(e){r.triggerContainer=e}},e)},r.renderItems=function(e){return e.map(function(e,t){return p.default.createElement(C.Item,(0,i.default)({},e,{key:t,onActivate:function(t){var n=t.event;r.props.onItemActivated({item:e,event:n})}}),e.content)})},r.renderGroups=function(e){return e.map(function(e,t){return p.default.createElement(C.Group,{heading:e.heading,elemAfter:e.elemAfter,key:t},r.renderItems(e.items))})},r.renderDeprecated=function(){var e=r.props,t=e.items,n=e.shouldFitContainer,o=r.state.id;return p.default.createElement("div",{id:o,ref:function(e){r.domMenuContainer=e,r.domItemsList=e?e.querySelectorAll('[data-role="droplistItem"]'):void 0},role:"menu",style:n?null:{maxWidth:300}},r.renderGroups(t))},o=n,(0,d.default)(r,o)}return(0,c.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.appearance,n=e.children,r=e.isLoading,o=e.isOpen,u=e.onOpenChange,a=e.position,l=e.shouldAllowMultilineItems,d=e.shouldFitContainer,s=e.shouldFlip,c=this.state.id,f=this.isUsingDeprecatedAPI(),h=f?{onKeyDown:this.handleKeyboardInteractionsDeprecated,shouldAllowMultilineItems:l}:{onKeyDown:this.handleKeyboardInteractions};return p.default.createElement(A.default,null,p.default.createElement(x.default,(0,i.default)({appearance:t,isLoading:r,isOpen:o,onClick:this.handleClick,onOpenChange:u,position:a,shouldFitContainer:d,shouldFlip:s,trigger:this.renderTrigger()},h),f?this.renderDeprecated():p.default.createElement(F.default,{id:c,role:"menu",shouldFitContainer:d},p.default.createElement(M.default,null,n))))},t}(f.Component);T.propTypes={appearance:g.default.oneOf(["default","tall"]),children:g.default.node,isLoading:g.default.bool,isOpen:g.default.bool,items:g.default.arrayOf(g.default.shape({elemAfter:g.default.node,heading:g.default.string,items:g.default.arrayOf(g.default.shape({content:g.default.string,elemBefore:g.default.node,href:g.default.string,isDisabled:g.default.bool,target:g.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:g.default.func,onOpenChange:g.default.func,position:g.default.string,shouldAllowMultilineItems:g.default.bool,shouldFitContainer:g.default.bool,shouldFlip:g.default.bool,trigger:g.default.node,triggerButtonProps:g.default.shape(b.default.propTypes),triggerType:g.default.oneOf(["default","button"])},T.defaultProps={appearance:"default",isLoading:!1,isOpen:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=T},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("uid")},function(e,t){e.exports=require("@atlaskit/droplist")},function(e,t){e.exports=require("@atlaskit/icon/glyph/expand")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(4),a=r(u),l=n(5),d=r(l),s=n(6),c=r(s),f=n(7),p=r(f),h=n(8),m=r(h),g=n(18),I=n(19),v=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var i=arguments.length,u=Array(i),l=0;l<i;l++)u[l]=arguments[l];return n=r=(0,d.default)(this,e.call.apply(e,[this].concat(u))),r.registeredItems=[],r.handleItemRegistered=function(e,t){r.registeredItems.push({itemId:e,itemNode:t}),1===r.registeredItems.length&&(r.focusedItemId=e,t.focus())},r.handleItemDeregistered=function(e){r.registeredItems=r.registeredItems.filter(function(t){return t.itemId!==e})},r.handleItemFocused=function(e){r.focusedItemId=e},r.handleItemUpdated=function(e,t){for(var n=-1,o=0;o<r.registeredItems.length;o++)if(r.registeredItems[o].itemId===e){n=o;break}return n===-1?void r.handleItemRegistered(e,t):(r.registeredItems[n].itemNode=t,void(r.focusedItemIndex()===n&&t.focus()))},r.focusedItemIndex=function(){for(var e=r,t=e.focusedItemId,n=e.registeredItems,o=0;o<n.length;o++)if(n[o].itemId===t)return o;return-1},r.handleKeyboard=function(e){var t=e.key;if(t===I.KEY_UP||t===I.KEY_DOWN){e.preventDefault();var n=r.focusedItemIndex();if(n<0)return;var o=t===I.KEY_UP?Math.max(0,n-1):Math.min(r.registeredItems.length-1,n+1);r.registeredItems[o].itemNode.focus()}},o=n,(0,d.default)(r,o)}return(0,c.default)(t,e),t.prototype.getChildContext=function(){return(0,i.default)({},g.focusManagerContext,{itemFocused:this.handleItemFocused,registerItem:this.handleItemRegistered,deregisterItem:this.handleItemDeregistered,updateItem:this.handleItemUpdated})},t.prototype.render=function(){return p.default.createElement("div",{onKeyDown:this.handleKeyboard},this.props.children)},t}(f.Component);v.propTypes={children:m.default.node},v.childContextTypes=(0,i.default)({},g.focusManagerContext,m.default.object),t.default=v},function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"@atlaskit-private-do-not-use/dropdown-menu:"+e};t.focusManagerContext=n("focus-manager"),t.selectionCacheContext=n("selection-cache"),t.selectionManagerContext=n("selection-manager")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_UP="ArrowUp",t.KEY_DOWN="ArrowDown",t.KEY_SPACE=" ",t.KEY_ENTER="Enter",t.KEY_TAB="Tab"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(3),a=r(u),l=n(4),d=r(l),s=n(5),c=r(s),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),I=r(g),v=n(18),y=function(e){function t(){var n,r,o;(0,d.default)(this,t);for(var i=arguments.length,u=Array(i),l=0;l<i;l++)u[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(u))),r.state={selectedItems:[]},r.handleItemSelectionsChanged=function(e,t){var n=r.state.selectedItems,o=[].concat((0,a.default)(n.filter(function(t){return t.groupId!==e})),(0,a.default)(t));r.setState({selectedItems:o})},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},v.selectionCacheContext,{isItemSelected:function(t,n){for(var r=e.state.selectedItems,o=0;o<e.state.selectedItems.length;o++)if(r[o].id===n&&r[o].groupId===t)return!0;return!1},itemsInGroup:function(t){return e.state.selectedItems.filter(function(e){return e.groupId===t})},itemSelectionsChanged:this.handleItemSelectionsChanged})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);y.propTypes={children:I.default.node},y.childContextTypes=(0,i.default)({},v.selectionCacheContext,I.default.shape({isItemSelected:I.default.func,itemsInGroup:I.default.func,itemSelectionsChanged:I.default.func})),t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=r(o),u=(0,i.default)(["\n ","\n"],["\n ","\n"]),a=n(23),l=r(a);t.default=l.default.div(u,function(e){var t=e.shouldFitContainer;return t?"":"max-width: 300px;"})},function(e,t){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,t){e.exports=require("styled-components")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),i=r(o),u=n(26),a=r(u);t.default=(0,a.default)(i.default)},function(e,t){e.exports=require("@atlaskit/item")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(11),a=r(u),l=n(27),d=r(l),s=n(4),c=r(s),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),I=r(g),v=n(12),y=r(v),b=n(13),C=r(b),x=n(28),O=r(x),_=n(29),P=r(_),M=n(18),k=function(e){var t,n;return n=t=function(t){function n(){var e,r,o;(0,c.default)(this,n);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return e=r=(0,p.default)(this,t.call.apply(t,[this].concat(u))),r.callContextFn=(0,P.default)(r,M.focusManagerContext),r.isFocusable=function(){return!r.props.isDisabled&&!r.props.isHidden},r.handleFocus=function(){r.isFocusable()&&r.callContextFn("itemFocused",r.contextId)},o=e,(0,p.default)(r,o)}return(0,m.default)(n,t),n.prototype.componentDidMount=function(){this.isFocusable()&&(this.contextId=(0,C.default)(),this.callContextFn("registerItem",this.contextId,y.default.findDOMNode(this)))},n.prototype.componentDidUpdate=function(){this.isFocusable()&&this.callContextFn("updateItem",this.contextId,y.default.findDOMNode(this))},n.prototype.componentWillUnmount=function(){this.isFocusable()&&this.callContextFn("deregisterItem",this.contextId)},n.prototype.render=function(){var t=this.props,n=t.children,r=(0,d.default)(t,["children"]);return I.default.createElement(e,(0,a.default)({onFocus:this.handleFocus},r),n)},n}(g.Component),t.displayName="WithItemFocus("+(0,O.default)(e)+")",t.propTypes={children:g.PropTypes.node,isDisabled:g.PropTypes.bool,isHidden:g.PropTypes.bool},t.contextTypes=(0,i.default)({},M.focusManagerContext,g.PropTypes.object),n};t.default=k},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(n){for(var r,o=arguments.length,i=Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];return e.context[t]?(r=e.context[t])[n].apply(r,i):null}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=r(o),u=n(25),a=r(u),l=n(26),d=r(l),s=n(32),c=r(s);t.default=(0,c.default)((0,d.default)(a.default),i.default,"radio")},function(e,t){e.exports=require("@atlaskit/icon/glyph/radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(11),a=r(u),l=n(27),d=r(l),s=n(4),c=r(s),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),I=r(g),v=n(33),y=n(28),b=r(y),C=n(29),x=r(C),O=n(18),_=n(19),P=function(e,t,n){var r=function(r){function o(){var e,t,n;(0,c.default)(this,o);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return e=t=(0,p.default)(this,r.call.apply(r,[this].concat(u))),t.getIconColors=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?{primary:v.akColorB400,secondary:v.akColorN40}:{primary:v.akColorN40,secondary:v.akColorN40}},t.callContextFn=(0,x.default)(t,O.selectionManagerContext),t.handleKeyboard=function(e){var n=e.key;n!==_.KEY_ENTER&&n!==_.KEY_SPACE||(e.preventDefault(),t.handleItemActivated())},t.handleItemActivated=function(){t.callContextFn("itemClicked",t.props.id)},t.isSelectedInDropdown=function(){return t.callContextFn("isItemSelected",t.props.id)},n=e,(0,p.default)(t,n)}return(0,m.default)(o,r),o.prototype.render=function(){var r=this.props,o=r.children,i=(0,d.default)(r,["children"]),u=this.isSelectedInDropdown(),l=this.getIconColors(u);return I.default.createElement(e,(0,a.default)({role:n,"aria-checked":u,isSelected:u,onClick:this.handleItemActivated,onKeyDown:this.handleKeyboard,elemBefore:I.default.createElement(t,{primaryColor:l.primary,secondaryColor:l.secondary,size:"medium",label:""})},i),o)},o}(g.Component);return r.propTypes={children:g.PropTypes.node,id:g.PropTypes.string.isRequired},r.contextTypes=(0,i.default)({},O.selectionManagerContext,g.PropTypes.object.isRequired),r.displayName="WithToggleInteraction("+(0,b.default)(e)+")",r};t.default=P},function(e,t){e.exports=require("@atlaskit/util-shared-styles")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),u=n(25),a=r(u),l=n(26),d=r(l),s=n(32),c=r(s);t.default=(0,c.default)((0,d.default)(a.default),i.default,"checkbox")},function(e,t){e.exports=require("@atlaskit/icon/glyph/checkbox")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),u=n(5),a=r(u),l=n(6),d=r(l),s=n(7),c=r(s),f=n(8),p=r(f),h=n(25),m=function(e){function t(){return(0,i.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,d.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.elemAfter,r=e.title;return c.default.createElement(h.ItemGroup,{elemAfter:n,title:r},t)},t}(s.Component);m.propTypes={children:p.default.node,title:p.default.string,elemAfter:p.default.oneOfType([p.default.node,p.default.string])},t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(36),i=r(o),u=n(38),a=r(u);t.default=(0,a.default)(i.default,"radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),i=r(o),u=n(4),a=r(u),l=n(5),d=r(l),s=n(6),c=r(s),f=n(7),p=r(f),h=n(28),m=r(h),g=n(39),I=r(g),v=function(e,t){var n,r;return r=n=function(n){function r(){return(0,a.default)(this,r),(0,d.default)(this,n.apply(this,arguments))}return(0,c.default)(r,n),r.prototype.render=function(){var n=this.props,r=n.children,o=n.id,u=(0,i.default)(n,["children","id"]);return p.default.createElement(e,u,p.default.createElement(I.default,{groupId:o,behavior:t},r))},r}(f.Component),n.displayName="WithDropdownItemSelectionManager("+(0,m.default)(e)+")",n.propTypes={children:f.PropTypes.node,id:f.PropTypes.string.isRequired},r};t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),u=n(3),a=r(u),l=n(4),d=r(l),s=n(5),c=r(s),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),I=r(g),v=n(18),y=function(e){function t(){var n,r,o;(0,d.default)(this,t);for(var i=arguments.length,u=Array(i),l=0;l<i;l++)u[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(u))),r.handleItemClicked=function(e){var t=r.props.behavior;"checkbox"===t?r.handleCheckboxItemClicked(e):"radio"===t&&r.handleRadioItemClicked(e)},r.handleCheckboxItemClicked=function(e){var t=r.context[v.selectionCacheContext],n=t.itemsInGroup(r.props.groupId),o=t.isItemSelected(r.props.groupId,e)?n.filter(function(t){return t.id!==e}):[].concat((0,a.default)(n),[{id:e,groupId:r.props.groupId}]);r.updateCacheContextWithSelections(o)},r.handleRadioItemClicked=function(e){r.updateCacheContextWithSelections([{id:e,groupId:r.props.groupId}])},r.updateCacheContextWithSelections=function(e){r.context[v.selectionCacheContext].itemSelectionsChanged(r.props.groupId,e)},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},v.selectionManagerContext,{isItemSelected:function(t){return e.context[v.selectionCacheContext].isItemSelected(e.props.groupId,t)},itemClicked:this.handleItemClicked})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);y.propTypes={behavior:I.default.oneOf(["checkbox","radio"]).isRequired,groupId:I.default.string.isRequired,children:I.default.node},y.childContextTypes=(0,i.default)({},v.selectionManagerContext,I.default.object),y.contextTypes=(0,i.default)({},v.selectionCacheContext,I.default.object.isRequired),t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(36),i=r(o),u=n(38),a=r(u);t.default=(0,a.default)(i.default,"checkbox")}]);

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/toConsumableArray"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("prop-types"),require("@atlaskit/button"),require("babel-runtime/helpers/extends"),require("react-dom"),require("uid"),require("@atlaskit/droplist"),require("@atlaskit/icon/glyph/expand"),require("babel-runtime/helpers/defineProperty"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/item"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/radio"),require("@atlaskit/util-shared-styles"),require("@atlaskit/icon/glyph/checkbox")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/toConsumableArray","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","react","prop-types","@atlaskit/button","babel-runtime/helpers/extends","react-dom","uid","@atlaskit/droplist","@atlaskit/icon/glyph/expand","babel-runtime/helpers/defineProperty","babel-runtime/helpers/taggedTemplateLiteral","styled-components","@atlaskit/item","babel-runtime/helpers/objectWithoutProperties","@atlaskit/icon/glyph/radio","@atlaskit/util-shared-styles","@atlaskit/icon/glyph/checkbox"],t):"object"==typeof exports?exports["@atlaskit/dropdownMenu"]=t(require("babel-runtime/helpers/toConsumableArray"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("prop-types"),require("@atlaskit/button"),require("babel-runtime/helpers/extends"),require("react-dom"),require("uid"),require("@atlaskit/droplist"),require("@atlaskit/icon/glyph/expand"),require("babel-runtime/helpers/defineProperty"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/item"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/radio"),require("@atlaskit/util-shared-styles"),require("@atlaskit/icon/glyph/checkbox")):e["@atlaskit/dropdownMenu"]=t(e["babel-runtime/helpers/toConsumableArray"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e.react,e["prop-types"],e["@atlaskit/button"],e["babel-runtime/helpers/extends"],e["react-dom"],e.uid,e["@atlaskit/droplist"],e["@atlaskit/icon/glyph/expand"],e["babel-runtime/helpers/defineProperty"],e["babel-runtime/helpers/taggedTemplateLiteral"],e["styled-components"],e["@atlaskit/item"],e["babel-runtime/helpers/objectWithoutProperties"],e["@atlaskit/icon/glyph/radio"],e["@atlaskit/util-shared-styles"],e["@atlaskit/icon/glyph/checkbox"])}(this,function(e,t,n,r,o,i,a,u,l,s,d,c,f,p,h,m,g,b,y,I){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}});var i=n(10);Object.defineProperty(t,"DropdownMenuStateless",{enumerable:!0,get:function(){return r(i).default}});var a=n(24);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return r(a).default}});var u=n(29);Object.defineProperty(t,"DropdownItemRadio",{enumerable:!0,get:function(){return r(u).default}});var l=n(33);Object.defineProperty(t,"DropdownItemCheckbox",{enumerable:!0,get:function(){return r(l).default}});var s=n(35);Object.defineProperty(t,"DropdownItemGroup",{enumerable:!0,get:function(){return r(s).default}});var d=n(36);Object.defineProperty(t,"DropdownItemGroupRadio",{enumerable:!0,get:function(){return r(d).default}});var c=n(39);Object.defineProperty(t,"DropdownItemGroupCheckbox",{enumerable:!0,get:function(){return r(c).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(8),m=r(h),g=n(9),b=r(g),y=n(10),I=r(y),v=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var a=arguments.length,l=Array(a),d=0;d<a;d++)l[d]=arguments[d];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(l))),r.state={isOpen:r.props.defaultOpen,items:[].concat((0,i.default)(r.props.items))},r.findActivatedGroup=function(e){return r.state.items.filter(function(t){return t.items.indexOf(e)>-1})[0]},r.handleItemActivation=function(e){var t=e.item,n=r.findActivatedGroup(t),o=[].concat((0,i.default)(r.state.items));switch(t.type){case"checkbox":t.isChecked=!t.isChecked,r.props.onItemActivated({item:t}),r.setState({items:o});break;case"radio":n.items.forEach(function(e){e===t?e.isChecked=!0:e.isChecked=!1}),r.props.onItemActivated({item:t}),r.setState({items:o});break;case"link":default:r.props.onItemActivated({item:t}),r.close()}},r.handleOpenChange=function(e){r.setState({isOpen:e.isOpen}),r.props.onOpenChange(e)},r.close=function(){r.setState({isOpen:!1}),r.props.onOpenChange({isOpen:!1})},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.componentWillReceiveProps=function(e){e.items!==this.state.items&&this.setState({items:[].concat((0,i.default)(e.items))})},t.prototype.render=function(){var e=this.state.isOpen,t=this.props,n=t.appearance,r=t.children,o=t.isLoading,i=t.items,a=t.position,u=t.shouldAllowMultilineItems,l=t.shouldFitContainer,s=t.shouldFlip,d=t.trigger,c=t.triggerButtonProps,f=t.triggerType;return p.default.createElement(I.default,{appearance:n,isOpen:e,isLoading:o,items:i,onItemActivated:this.handleItemActivation,onOpenChange:this.handleOpenChange,position:a,shouldAllowMultilineItems:u,shouldFitContainer:l,shouldFlip:s,trigger:d,triggerButtonProps:c,triggerType:f},r)},t}(f.Component);v.propTypes={appearance:m.default.oneOf(["default","tall"]),children:m.default.node,defaultOpen:m.default.bool,isLoading:m.default.bool,items:m.default.arrayOf(m.default.shape({elemAfter:m.default.node,heading:m.default.string,items:m.default.arrayOf(m.default.shape({content:m.default.string,elemBefore:m.default.node,href:m.default.string,isDisabled:m.default.bool,target:m.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:m.default.func,shouldAllowMultilineItems:m.default.bool,onOpenChange:m.default.func,position:m.default.string,shouldFitContainer:m.default.bool,shouldFlip:m.default.bool,trigger:m.default.node,triggerButtonProps:m.default.shape(b.default.propTypes),triggerType:m.default.oneOf(["default","button"])},v.defaultProps={appearance:"default",defaultOpen:!1,isLoading:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=v},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(12),m=n(8),g=r(m),b=n(13),y=r(b),I=n(9),v=r(I),C=n(14),x=r(C),k=n(15),O=r(k),_=n(16),P=r(_),M=n(20),A=r(M),D=n(21),q=r(D),E=n(19),T=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var a=arguments.length,l=Array(a),d=0;d<a;d++)l[d]=arguments[d];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(l))),r.state={id:(0,y.default)()},r.componentDidMount=function(){r.isUsingDeprecatedAPI()&&(console.warn("DropdownMenu.items is deprecated. Please switch to the declarative API."),r.domItemsList&&r.focusFirstItem())},r.componentDidUpdate=function(e){r.isUsingDeprecatedAPI()&&r.props.isOpen&&!e.isOpen&&r.focusFirstItem()},r.getNextFocusable=function(e,t){var n=void 0===e?-1:e,o=void 0===t?n:t;return n<r.domItemsList.length-1?(n++,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getNextFocusable(n,o)):o},r.getPrevFocusable=function(e,t){var n=e,o=void 0===t?n:t;return n>0?(n--,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getPrevFocusable(n,o)):o||n},r.focusFirstItem=function(){"keydown"===r.sourceOfIsOpen&&r.focusItem(r.getNextFocusable())},r.focusNextItem=function(){r.focusItem(r.getNextFocusable(r.focusedItem))},r.focusPreviousItem=function(){r.focusItem(r.getPrevFocusable(r.focusedItem))},r.focusItem=function(e){r.focusedItem=e,r.domItemsList[r.focusedItem].focus()},r.isTargetChildItem=function(e){if(!e)return!1;var t="droplistItem"===e.getAttribute("data-role"),n=(0,h.findDOMNode)(r);return!(!t||!n)&&n.contains(e)},r.handleKeyboardInteractionForOpen=function(e){switch(e.key){case E.KEY_DOWN:case E.KEY_SPACE:case E.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleKeyboardInteractions=function(e){r.handleKeyboardInteractionForOpen(e)},r.handleKeyboardInteractionsDeprecated=function(e){if(r.props.isOpen)if(r.isTargetChildItem(e.target))switch(e.key){case"ArrowUp":e.preventDefault(),r.focusPreviousItem();break;case"ArrowDown":e.preventDefault(),r.focusNextItem();break;case"Tab":e.preventDefault(),r.close({event:e})}else"ArrowDown"===e.key?(r.sourceOfIsOpen="keydown",r.focusFirstItem()):"Tab"===e.key&&r.close({event:e});else switch(e.key){case E.KEY_DOWN:case E.KEY_SPACE:case E.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleClickDeprecated=function(e){var t=r.domMenuContainer;(!t||t&&!t.contains(e.target))&&r.toggle({source:"click",event:e})},r.isUsingDeprecatedAPI=function(){return Boolean(r.props.items.length)},r.handleClick=function(e){if(r.isUsingDeprecatedAPI())return void r.handleClickDeprecated(e);var t=r,n=t.triggerContainer;if(n&&n.contains(e.target)){var o=r.props.isOpen;r.props.onOpenChange({isOpen:!o,event:e})}},r.triggerContent=function(){var e=r.props,t=e.children,n=e.trigger,o=e.isOpen,a=e.triggerButtonProps,u=e.triggerType,l=r.isUsingDeprecatedAPI()?t:n;if("button"!==u)return l;var s=(0,i.default)({},a),d={ariaControls:r.state.id,ariaExpanded:o,ariaHaspopup:!0,isSelected:o};return s.iconAfter||s.iconBefore||(s.iconAfter=p.default.createElement(O.default,{size:"medium",label:""})),p.default.createElement(v.default,(0,i.default)({},d,s),l)},r.open=function(e){r.sourceOfIsOpen=e.source,r.props.onOpenChange({isOpen:!0,event:e.event})},r.close=function(e){r.sourceOfIsOpen=null,r.props.onOpenChange({isOpen:!1,event:e.event})},r.toggle=function(e){"keydown"!==e.source&&(r.props.isOpen?r.close(e):r.open(e))},r.renderTrigger=function(){var e=r.triggerContent();return r.isUsingDeprecatedAPI()?e:p.default.createElement("div",{ref:function(e){r.triggerContainer=e}},e)},r.renderItems=function(e){return e.map(function(e,t){return p.default.createElement(C.Item,(0,i.default)({},e,{key:t,onActivate:function(t){var n=t.event;r.props.onItemActivated({item:e,event:n})}}),e.content)})},r.renderGroups=function(e){return e.map(function(e,t){return p.default.createElement(C.Group,{heading:e.heading,elemAfter:e.elemAfter,key:t},r.renderItems(e.items))})},r.renderDeprecated=function(){var e=r.props,t=e.items,n=e.shouldFitContainer,o=r.state.id;return p.default.createElement("div",{id:o,ref:function(e){r.domMenuContainer=e,r.domItemsList=e?e.querySelectorAll('[data-role="droplistItem"]'):void 0},role:"menu",style:n?null:{maxWidth:300}},r.renderGroups(t))},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.appearance,n=e.children,r=e.isLoading,o=e.isOpen,a=e.onOpenChange,u=e.position,l=e.shouldAllowMultilineItems,s=e.shouldFitContainer,d=e.shouldFlip,c=this.state.id,f=this.isUsingDeprecatedAPI(),h=f?{onKeyDown:this.handleKeyboardInteractionsDeprecated,shouldAllowMultilineItems:l}:{onKeyDown:this.handleKeyboardInteractions};return p.default.createElement(A.default,null,p.default.createElement(x.default,(0,i.default)({appearance:t,isLoading:r,isOpen:o,onClick:this.handleClick,onOpenChange:a,position:u,shouldFitContainer:s,shouldFlip:d,trigger:this.renderTrigger()},h),f?this.renderDeprecated():p.default.createElement(q.default,{id:c,role:"menu",shouldFitContainer:s},p.default.createElement(P.default,null,n))))},t}(f.Component);T.propTypes={appearance:g.default.oneOf(["default","tall"]),children:g.default.node,isLoading:g.default.bool,isOpen:g.default.bool,items:g.default.arrayOf(g.default.shape({elemAfter:g.default.node,heading:g.default.string,items:g.default.arrayOf(g.default.shape({content:g.default.string,elemBefore:g.default.node,href:g.default.string,isDisabled:g.default.bool,target:g.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:g.default.func,onOpenChange:g.default.func,position:g.default.string,shouldAllowMultilineItems:g.default.bool,shouldFitContainer:g.default.bool,shouldFlip:g.default.bool,trigger:g.default.node,triggerButtonProps:g.default.shape(v.default.propTypes),triggerType:g.default.oneOf(["default","button"])},T.defaultProps={appearance:"default",isLoading:!1,isOpen:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=T},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(8),m=r(h),g=n(18),b=n(19),y=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(a))),r.registeredItems=[],r.handleItemRegistered=function(e,t){r.registeredItems.push({itemId:e,itemNode:t}),1===r.registeredItems.length&&(r.focusedItemId=e,t.focus())},r.handleItemDeregistered=function(e){r.registeredItems=r.registeredItems.filter(function(t){return t.itemId!==e})},r.handleItemFocused=function(e){r.focusedItemId=e},r.handleItemUpdated=function(e,t){for(var n=-1,o=0;o<r.registeredItems.length;o++)if(r.registeredItems[o].itemId===e){n=o;break}return n===-1?void r.handleItemRegistered(e,t):(r.registeredItems[n].itemNode=t,void(r.focusedItemIndex()===n&&t.focus()))},r.focusedItemIndex=function(){for(var e=r,t=e.focusedItemId,n=e.registeredItems,o=0;o<n.length;o++)if(n[o].itemId===t)return o;return-1},r.handleKeyboard=function(e){var t=e.key;if(t===b.KEY_UP||t===b.KEY_DOWN){e.preventDefault();var n=r.focusedItemIndex();if(n<0)return;var o=t===b.KEY_UP?Math.max(0,n-1):Math.min(r.registeredItems.length-1,n+1);r.registeredItems[o].itemNode.focus()}},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.getChildContext=function(){return(0,i.default)({},g.focusManagerContext,{itemFocused:this.handleItemFocused,registerItem:this.handleItemRegistered,deregisterItem:this.handleItemDeregistered,updateItem:this.handleItemUpdated})},t.prototype.render=function(){return p.default.createElement("div",{onKeyDown:this.handleKeyboard},this.props.children)},t}(f.Component);y.propTypes={children:m.default.node},y.childContextTypes=(0,i.default)({},g.focusManagerContext,m.default.object),t.default=y},function(e,t){e.exports=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"@atlaskit-private-do-not-use/dropdown-menu:"+e};t.focusManagerContext=n("focus-manager"),t.selectionCacheContext=n("selection-cache"),t.selectionManagerContext=n("selection-manager")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_UP="ArrowUp",t.KEY_DOWN="ArrowDown",t.KEY_SPACE=" ",t.KEY_ENTER="Enter",t.KEY_TAB="Tab"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(3),u=r(a),l=n(4),s=r(l),d=n(5),c=r(d),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),b=r(g),y=n(18),I=function(e){function t(){var n,r,o;(0,s.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(a))),r.state={selectedItems:[]},r.handleItemSelectionsChanged=function(e,t){var n=r.state.selectedItems,o=[].concat((0,u.default)(n.filter(function(t){return t.groupId!==e})),(0,u.default)(t));r.setState({selectedItems:o})},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},y.selectionCacheContext,{isItemSelected:function(t,n){for(var r=e.state.selectedItems,o=0;o<e.state.selectedItems.length;o++)if(r[o].id===n&&r[o].groupId===t)return!0;return!1},itemsInGroup:function(t){return e.state.selectedItems.filter(function(e){return e.groupId===t})},itemSelectionsChanged:this.handleItemSelectionsChanged})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);I.propTypes={children:b.default.node},I.childContextTypes=(0,i.default)({},y.selectionCacheContext,b.default.shape({isItemSelected:b.default.func,itemsInGroup:b.default.func,itemSelectionsChanged:b.default.func})),t.default=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=r(o),a=(0,i.default)(["\n ","\n"],["\n ","\n"]),u=n(23),l=r(u);t.default=l.default.div(a,function(e){var t=e.shouldFitContainer;return t?"":"max-width: 300px;"})},function(e,t){e.exports=p},function(e,t){e.exports=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),i=r(o),a=n(26),u=r(a);t.default=(0,u.default)(i.default)},function(e,t){e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(11),u=r(a),l=n(27),s=r(l),d=n(4),c=r(d),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),b=r(g),y=n(12),I=r(y),v=n(13),C=r(v),x=n(28),k=r(x),O=n(18),_=function(e){var t,n;return n=t=function(t){function n(){var e,r,o;(0,c.default)(this,n);for(var i=arguments.length,a=Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=r=(0,p.default)(this,t.call.apply(t,[this].concat(a))),r.isFocusable=function(){return!r.props.isDisabled&&!r.props.isHidden},r.handleFocus=function(){r.isFocusable()&&r.context[O.focusManagerContext].itemFocused(r.contextId)},o=e,(0,p.default)(r,o)}return(0,m.default)(n,t),n.prototype.componentDidMount=function(){this.isFocusable()&&(this.contextId=(0,C.default)(),this.context[O.focusManagerContext].registerItem(this.contextId,I.default.findDOMNode(this)))},n.prototype.componentDidUpdate=function(){this.isFocusable()&&this.context[O.focusManagerContext].updateItem(this.contextId,I.default.findDOMNode(this))},n.prototype.componentWillUnmount=function(){this.isFocusable()&&this.context[O.focusManagerContext].deregisterItem(this.contextId)},n.prototype.render=function(){var t=this.props,n=t.children,r=(0,s.default)(t,["children"]);return b.default.createElement(e,(0,u.default)({onFocus:this.handleFocus},r),n)},n}(g.Component),t.displayName="WithItemFocus("+(0,k.default)(e)+")",t.propTypes={children:g.PropTypes.node,isDisabled:g.PropTypes.bool,isHidden:g.PropTypes.bool},t.contextTypes=(0,i.default)({},O.focusManagerContext,g.PropTypes.object.isRequired),n};t.default=_},function(e,t){e.exports=g},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),i=r(o),a=n(25),u=r(a),l=n(26),s=r(l),d=n(31),c=r(d);t.default=(0,c.default)((0,s.default)(u.default),i.default,"radio")},function(e,t){e.exports=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(11),u=r(a),l=n(27),s=r(l),d=n(4),c=r(d),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),b=r(g),y=n(32),I=n(28),v=r(I),C=n(18),x=n(19),k=function(e,t,n){var r=function(r){function o(){var e,t,n;(0,c.default)(this,o);for(var i=arguments.length,a=Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=t=(0,p.default)(this,r.call.apply(r,[this].concat(a))),t.getIconColors=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?{primary:y.akColorB400,secondary:y.akColorN40}:{primary:y.akColorN40,secondary:y.akColorN40}},t.handleKeyboard=function(e){var n=e.key;n!==x.KEY_ENTER&&n!==x.KEY_SPACE||(e.preventDefault(),t.handleItemActivated())},t.handleItemActivated=function(){t.context[C.selectionManagerContext].itemClicked(t.props.id)},t.isSelectedInDropdown=function(){return t.context[C.selectionManagerContext].isItemSelected(t.props.id)},n=e,(0,p.default)(t,n)}return(0,m.default)(o,r),o.prototype.render=function(){var r=this.props,o=r.children,i=(0,s.default)(r,["children"]),a=this.isSelectedInDropdown(),l=this.getIconColors(a);return b.default.createElement(e,(0,u.default)({role:n,"aria-checked":a,isSelected:a,onClick:this.handleItemActivated,onKeyDown:this.handleKeyboard,elemBefore:b.default.createElement(t,{primaryColor:l.primary,secondaryColor:l.secondary,size:"medium",label:""})},i),o)},o}(g.Component);return r.propTypes={children:g.PropTypes.node,id:g.PropTypes.string.isRequired},r.contextTypes=(0,i.default)({},C.selectionManagerContext,g.PropTypes.object.isRequired),r.displayName="WithToggleInteraction("+(0,v.default)(e)+")",r};t.default=k},function(e,t){e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(34),i=r(o),a=n(25),u=r(a),l=n(26),s=r(l),d=n(31),c=r(d);t.default=(0,c.default)((0,s.default)(u.default),i.default,"checkbox")},function(e,t){e.exports=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(5),u=r(a),l=n(6),s=r(l),d=n(7),c=r(d),f=n(8),p=r(f),h=n(25),m=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.elemAfter,r=e.title;return c.default.createElement(h.ItemGroup,{elemAfter:n,title:r},t)},t}(d.Component);m.propTypes={children:p.default.node,title:p.default.string,elemAfter:p.default.oneOfType([p.default.node,p.default.string])},t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),a=n(37),u=r(a);t.default=(0,u.default)(i.default,"radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(28),m=r(h),g=n(38),b=r(g),y=function(e,t){var n,r;return r=n=function(n){function r(){return(0,u.default)(this,r),(0,s.default)(this,n.apply(this,arguments))}return(0,c.default)(r,n),r.prototype.render=function(){var n=this.props,r=n.children,o=n.id,a=(0,i.default)(n,["children","id"]);return p.default.createElement(e,a,p.default.createElement(b.default,{groupId:o,behavior:t},r))},r}(f.Component),n.displayName="WithDropdownItemSelectionManager("+(0,m.default)(e)+")",n.propTypes={children:f.PropTypes.node,id:f.PropTypes.string.isRequired},r};t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(3),u=r(a),l=n(4),s=r(l),d=n(5),c=r(d),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),b=r(g),y=n(18),I=function(e){function t(){var n,r,o;(0,s.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(a))),r.handleItemClicked=function(e){var t=r.props.behavior;"checkbox"===t?r.handleCheckboxItemClicked(e):"radio"===t&&r.handleRadioItemClicked(e)},r.handleCheckboxItemClicked=function(e){var t=r.context[y.selectionCacheContext],n=t.itemsInGroup(r.props.groupId),o=t.isItemSelected(r.props.groupId,e)?n.filter(function(t){return t.id!==e}):[].concat((0,u.default)(n),[{id:e,groupId:r.props.groupId}]);r.updateCacheContextWithSelections(o)},r.handleRadioItemClicked=function(e){r.updateCacheContextWithSelections([{id:e,groupId:r.props.groupId}])},r.updateCacheContextWithSelections=function(e){r.context[y.selectionCacheContext].itemSelectionsChanged(r.props.groupId,e)},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},y.selectionManagerContext,{isItemSelected:function(t){return e.context[y.selectionCacheContext].isItemSelected(e.props.groupId,t)},itemClicked:this.handleItemClicked})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);I.propTypes={behavior:b.default.oneOf(["checkbox","radio"]).isRequired,groupId:b.default.string.isRequired,children:b.default.node},I.childContextTypes=(0,i.default)({},y.selectionManagerContext,b.default.object),I.contextTypes=(0,i.default)({},y.selectionCacheContext,b.default.object.isRequired),t.default=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),a=n(37),u=r(a);t.default=(0,u.default)(i.default,"checkbox")}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/toConsumableArray"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("prop-types"),require("@atlaskit/button"),require("babel-runtime/helpers/extends"),require("react-dom"),require("uid"),require("@atlaskit/droplist"),require("@atlaskit/icon/glyph/expand"),require("babel-runtime/helpers/defineProperty"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/item"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/radio"),require("@atlaskit/util-shared-styles"),require("@atlaskit/icon/glyph/checkbox")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/toConsumableArray","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","react","prop-types","@atlaskit/button","babel-runtime/helpers/extends","react-dom","uid","@atlaskit/droplist","@atlaskit/icon/glyph/expand","babel-runtime/helpers/defineProperty","babel-runtime/helpers/taggedTemplateLiteral","styled-components","@atlaskit/item","babel-runtime/helpers/objectWithoutProperties","@atlaskit/icon/glyph/radio","@atlaskit/util-shared-styles","@atlaskit/icon/glyph/checkbox"],t):"object"==typeof exports?exports["@atlaskit/dropdownMenu"]=t(require("babel-runtime/helpers/toConsumableArray"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("prop-types"),require("@atlaskit/button"),require("babel-runtime/helpers/extends"),require("react-dom"),require("uid"),require("@atlaskit/droplist"),require("@atlaskit/icon/glyph/expand"),require("babel-runtime/helpers/defineProperty"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/item"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/radio"),require("@atlaskit/util-shared-styles"),require("@atlaskit/icon/glyph/checkbox")):e["@atlaskit/dropdownMenu"]=t(e["babel-runtime/helpers/toConsumableArray"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e.react,e["prop-types"],e["@atlaskit/button"],e["babel-runtime/helpers/extends"],e["react-dom"],e.uid,e["@atlaskit/droplist"],e["@atlaskit/icon/glyph/expand"],e["babel-runtime/helpers/defineProperty"],e["babel-runtime/helpers/taggedTemplateLiteral"],e["styled-components"],e["@atlaskit/item"],e["babel-runtime/helpers/objectWithoutProperties"],e["@atlaskit/icon/glyph/radio"],e["@atlaskit/util-shared-styles"],e["@atlaskit/icon/glyph/checkbox"])}(this,function(e,t,n,r,o,i,a,u,l,s,d,c,f,p,h,m,g,b,y,I){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}});var i=n(10);Object.defineProperty(t,"DropdownMenuStateless",{enumerable:!0,get:function(){return r(i).default}});var a=n(24);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return r(a).default}});var u=n(30);Object.defineProperty(t,"DropdownItemRadio",{enumerable:!0,get:function(){return r(u).default}});var l=n(34);Object.defineProperty(t,"DropdownItemCheckbox",{enumerable:!0,get:function(){return r(l).default}});var s=n(36);Object.defineProperty(t,"DropdownItemGroup",{enumerable:!0,get:function(){return r(s).default}});var d=n(37);Object.defineProperty(t,"DropdownItemGroupRadio",{enumerable:!0,get:function(){return r(d).default}});var c=n(40);Object.defineProperty(t,"DropdownItemGroupCheckbox",{enumerable:!0,get:function(){return r(c).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(8),m=r(h),g=n(9),b=r(g),y=n(10),I=r(y),v=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var a=arguments.length,l=Array(a),d=0;d<a;d++)l[d]=arguments[d];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(l))),r.state={isOpen:r.props.defaultOpen,items:[].concat((0,i.default)(r.props.items))},r.findActivatedGroup=function(e){return r.state.items.filter(function(t){return t.items.indexOf(e)>-1})[0]},r.handleItemActivation=function(e){var t=e.item,n=r.findActivatedGroup(t),o=[].concat((0,i.default)(r.state.items));switch(t.type){case"checkbox":t.isChecked=!t.isChecked,r.props.onItemActivated({item:t}),r.setState({items:o});break;case"radio":n.items.forEach(function(e){e===t?e.isChecked=!0:e.isChecked=!1}),r.props.onItemActivated({item:t}),r.setState({items:o});break;case"link":default:r.props.onItemActivated({item:t}),r.close()}},r.handleOpenChange=function(e){r.setState({isOpen:e.isOpen}),r.props.onOpenChange(e)},r.close=function(){r.setState({isOpen:!1}),r.props.onOpenChange({isOpen:!1})},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.componentWillReceiveProps=function(e){e.items!==this.state.items&&this.setState({items:[].concat((0,i.default)(e.items))})},t.prototype.render=function(){var e=this.state.isOpen,t=this.props,n=t.appearance,r=t.children,o=t.isLoading,i=t.items,a=t.position,u=t.shouldAllowMultilineItems,l=t.shouldFitContainer,s=t.shouldFlip,d=t.trigger,c=t.triggerButtonProps,f=t.triggerType;return p.default.createElement(I.default,{appearance:n,isOpen:e,isLoading:o,items:i,onItemActivated:this.handleItemActivation,onOpenChange:this.handleOpenChange,position:a,shouldAllowMultilineItems:u,shouldFitContainer:l,shouldFlip:s,trigger:d,triggerButtonProps:c,triggerType:f},r)},t}(f.Component);v.propTypes={appearance:m.default.oneOf(["default","tall"]),children:m.default.node,defaultOpen:m.default.bool,isLoading:m.default.bool,items:m.default.arrayOf(m.default.shape({elemAfter:m.default.node,heading:m.default.string,items:m.default.arrayOf(m.default.shape({content:m.default.string,elemBefore:m.default.node,href:m.default.string,isDisabled:m.default.bool,target:m.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:m.default.func,shouldAllowMultilineItems:m.default.bool,onOpenChange:m.default.func,position:m.default.string,shouldFitContainer:m.default.bool,shouldFlip:m.default.bool,trigger:m.default.node,triggerButtonProps:m.default.shape(b.default.propTypes),triggerType:m.default.oneOf(["default","button"])},v.defaultProps={appearance:"default",defaultOpen:!1,isLoading:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=v},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(12),m=n(8),g=r(m),b=n(13),y=r(b),I=n(9),v=r(I),C=n(14),x=r(C),O=n(15),k=r(O),_=n(16),P=r(_),A=n(20),M=r(A),D=n(21),F=r(D),q=n(19),E=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var a=arguments.length,l=Array(a),d=0;d<a;d++)l[d]=arguments[d];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(l))),r.state={id:(0,y.default)()},r.componentDidMount=function(){r.isUsingDeprecatedAPI()&&(console.warn("DropdownMenu.items is deprecated. Please switch to the declarative API."),r.domItemsList&&r.focusFirstItem())},r.componentDidUpdate=function(e){r.isUsingDeprecatedAPI()&&r.props.isOpen&&!e.isOpen&&r.focusFirstItem()},r.getNextFocusable=function(e,t){var n=void 0===e?-1:e,o=void 0===t?n:t;return n<r.domItemsList.length-1?(n++,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getNextFocusable(n,o)):o},r.getPrevFocusable=function(e,t){var n=e,o=void 0===t?n:t;return n>0?(n--,"true"!==r.domItemsList[n].getAttribute("aria-hidden")?n:r.getPrevFocusable(n,o)):o||n},r.focusFirstItem=function(){"keydown"===r.sourceOfIsOpen&&r.focusItem(r.getNextFocusable())},r.focusNextItem=function(){r.focusItem(r.getNextFocusable(r.focusedItem))},r.focusPreviousItem=function(){r.focusItem(r.getPrevFocusable(r.focusedItem))},r.focusItem=function(e){r.focusedItem=e,r.domItemsList[r.focusedItem].focus()},r.isTargetChildItem=function(e){if(!e)return!1;var t="droplistItem"===e.getAttribute("data-role"),n=(0,h.findDOMNode)(r);return!(!t||!n)&&n.contains(e)},r.handleKeyboardInteractionForOpen=function(e){switch(e.key){case q.KEY_DOWN:case q.KEY_SPACE:case q.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleKeyboardInteractions=function(e){r.handleKeyboardInteractionForOpen(e)},r.handleKeyboardInteractionsDeprecated=function(e){if(r.props.isOpen)if(r.isTargetChildItem(e.target))switch(e.key){case"ArrowUp":e.preventDefault(),r.focusPreviousItem();break;case"ArrowDown":e.preventDefault(),r.focusNextItem();break;case"Tab":e.preventDefault(),r.close({event:e})}else"ArrowDown"===e.key?(r.sourceOfIsOpen="keydown",r.focusFirstItem()):"Tab"===e.key&&r.close({event:e});else switch(e.key){case q.KEY_DOWN:case q.KEY_SPACE:case q.KEY_ENTER:e.preventDefault(),r.open({event:e,source:"keydown"})}},r.handleClickDeprecated=function(e){var t=r.domMenuContainer;(!t||t&&!t.contains(e.target))&&r.toggle({source:"click",event:e})},r.isUsingDeprecatedAPI=function(){return Boolean(r.props.items.length)},r.handleClick=function(e){if(r.isUsingDeprecatedAPI())return void r.handleClickDeprecated(e);var t=r,n=t.triggerContainer;if(n&&n.contains(e.target)){var o=r.props.isOpen;r.props.onOpenChange({isOpen:!o,event:e})}},r.triggerContent=function(){var e=r.props,t=e.children,n=e.trigger,o=e.isOpen,a=e.triggerButtonProps,u=e.triggerType,l=r.isUsingDeprecatedAPI()?t:n;if("button"!==u)return l;var s=(0,i.default)({},a),d={ariaControls:r.state.id,ariaExpanded:o,ariaHaspopup:!0,isSelected:o};return s.iconAfter||s.iconBefore||(s.iconAfter=p.default.createElement(k.default,{size:"medium",label:""})),p.default.createElement(v.default,(0,i.default)({},d,s),l)},r.open=function(e){r.sourceOfIsOpen=e.source,r.props.onOpenChange({isOpen:!0,event:e.event})},r.close=function(e){r.sourceOfIsOpen=null,r.props.onOpenChange({isOpen:!1,event:e.event})},r.toggle=function(e){"keydown"!==e.source&&(r.props.isOpen?r.close(e):r.open(e))},r.renderTrigger=function(){var e=r.triggerContent();return r.isUsingDeprecatedAPI()?e:p.default.createElement("div",{ref:function(e){r.triggerContainer=e}},e)},r.renderItems=function(e){return e.map(function(e,t){return p.default.createElement(C.Item,(0,i.default)({},e,{key:t,onActivate:function(t){var n=t.event;r.props.onItemActivated({item:e,event:n})}}),e.content)})},r.renderGroups=function(e){return e.map(function(e,t){return p.default.createElement(C.Group,{heading:e.heading,elemAfter:e.elemAfter,key:t},r.renderItems(e.items))})},r.renderDeprecated=function(){var e=r.props,t=e.items,n=e.shouldFitContainer,o=r.state.id;return p.default.createElement("div",{id:o,ref:function(e){r.domMenuContainer=e,r.domItemsList=e?e.querySelectorAll('[data-role="droplistItem"]'):void 0},role:"menu",style:n?null:{maxWidth:300}},r.renderGroups(t))},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.appearance,n=e.children,r=e.isLoading,o=e.isOpen,a=e.onOpenChange,u=e.position,l=e.shouldAllowMultilineItems,s=e.shouldFitContainer,d=e.shouldFlip,c=this.state.id,f=this.isUsingDeprecatedAPI(),h=f?{onKeyDown:this.handleKeyboardInteractionsDeprecated,shouldAllowMultilineItems:l}:{onKeyDown:this.handleKeyboardInteractions};return p.default.createElement(M.default,null,p.default.createElement(x.default,(0,i.default)({appearance:t,isLoading:r,isOpen:o,onClick:this.handleClick,onOpenChange:a,position:u,shouldFitContainer:s,shouldFlip:d,trigger:this.renderTrigger()},h),f?this.renderDeprecated():p.default.createElement(F.default,{id:c,role:"menu",shouldFitContainer:s},p.default.createElement(P.default,null,n))))},t}(f.Component);E.propTypes={appearance:g.default.oneOf(["default","tall"]),children:g.default.node,isLoading:g.default.bool,isOpen:g.default.bool,items:g.default.arrayOf(g.default.shape({elemAfter:g.default.node,heading:g.default.string,items:g.default.arrayOf(g.default.shape({content:g.default.string,elemBefore:g.default.node,href:g.default.string,isDisabled:g.default.bool,target:g.default.oneOf(["_blank","_self"])})).isRequired})).isRequired,onItemActivated:g.default.func,onOpenChange:g.default.func,position:g.default.string,shouldAllowMultilineItems:g.default.bool,shouldFitContainer:g.default.bool,shouldFlip:g.default.bool,trigger:g.default.node,triggerButtonProps:g.default.shape(v.default.propTypes),triggerType:g.default.oneOf(["default","button"])},E.defaultProps={appearance:"default",isLoading:!1,isOpen:!1,items:[],onItemActivated:function(){},onOpenChange:function(){},position:"bottom left",shouldAllowMultilineItems:!1,shouldFitContainer:!1,shouldFlip:!0,triggerButtonProps:{},triggerType:"default"},t.default=E},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(8),m=r(h),g=n(18),b=n(19),y=function(e){function t(){var n,r,o;(0,u.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(a))),r.registeredItems=[],r.handleItemRegistered=function(e,t){r.registeredItems.push({itemId:e,itemNode:t}),1===r.registeredItems.length&&(r.focusedItemId=e,t.focus())},r.handleItemDeregistered=function(e){r.registeredItems=r.registeredItems.filter(function(t){return t.itemId!==e})},r.handleItemFocused=function(e){r.focusedItemId=e},r.handleItemUpdated=function(e,t){for(var n=-1,o=0;o<r.registeredItems.length;o++)if(r.registeredItems[o].itemId===e){n=o;break}return n===-1?void r.handleItemRegistered(e,t):(r.registeredItems[n].itemNode=t,void(r.focusedItemIndex()===n&&t.focus()))},r.focusedItemIndex=function(){for(var e=r,t=e.focusedItemId,n=e.registeredItems,o=0;o<n.length;o++)if(n[o].itemId===t)return o;return-1},r.handleKeyboard=function(e){var t=e.key;if(t===b.KEY_UP||t===b.KEY_DOWN){e.preventDefault();var n=r.focusedItemIndex();if(n<0)return;var o=t===b.KEY_UP?Math.max(0,n-1):Math.min(r.registeredItems.length-1,n+1);r.registeredItems[o].itemNode.focus()}},o=n,(0,s.default)(r,o)}return(0,c.default)(t,e),t.prototype.getChildContext=function(){return(0,i.default)({},g.focusManagerContext,{itemFocused:this.handleItemFocused,registerItem:this.handleItemRegistered,deregisterItem:this.handleItemDeregistered,updateItem:this.handleItemUpdated})},t.prototype.render=function(){return p.default.createElement("div",{onKeyDown:this.handleKeyboard},this.props.children)},t}(f.Component);y.propTypes={children:m.default.node},y.childContextTypes=(0,i.default)({},g.focusManagerContext,m.default.object),t.default=y},function(e,t){e.exports=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"@atlaskit-private-do-not-use/dropdown-menu:"+e};t.focusManagerContext=n("focus-manager"),t.selectionCacheContext=n("selection-cache"),t.selectionManagerContext=n("selection-manager")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_UP="ArrowUp",t.KEY_DOWN="ArrowDown",t.KEY_SPACE=" ",t.KEY_ENTER="Enter",t.KEY_TAB="Tab"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(3),u=r(a),l=n(4),s=r(l),d=n(5),c=r(d),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),b=r(g),y=n(18),I=function(e){function t(){var n,r,o;(0,s.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(a))),r.state={selectedItems:[]},r.handleItemSelectionsChanged=function(e,t){var n=r.state.selectedItems,o=[].concat((0,u.default)(n.filter(function(t){return t.groupId!==e})),(0,u.default)(t));r.setState({selectedItems:o})},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},y.selectionCacheContext,{isItemSelected:function(t,n){for(var r=e.state.selectedItems,o=0;o<e.state.selectedItems.length;o++)if(r[o].id===n&&r[o].groupId===t)return!0;return!1},itemsInGroup:function(t){return e.state.selectedItems.filter(function(e){return e.groupId===t})},itemSelectionsChanged:this.handleItemSelectionsChanged})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);I.propTypes={children:b.default.node},I.childContextTypes=(0,i.default)({},y.selectionCacheContext,b.default.shape({isItemSelected:b.default.func,itemsInGroup:b.default.func,itemSelectionsChanged:b.default.func})),t.default=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=r(o),a=(0,i.default)(["\n ","\n"],["\n ","\n"]),u=n(23),l=r(u);t.default=l.default.div(a,function(e){var t=e.shouldFitContainer;return t?"":"max-width: 300px;"})},function(e,t){e.exports=p},function(e,t){e.exports=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),i=r(o),a=n(26),u=r(a);t.default=(0,u.default)(i.default)},function(e,t){e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(11),u=r(a),l=n(27),s=r(l),d=n(4),c=r(d),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),b=r(g),y=n(12),I=r(y),v=n(13),C=r(v),x=n(28),O=r(x),k=n(29),_=r(k),P=n(18),A=function(e){var t,n;return n=t=function(t){function n(){var e,r,o;(0,c.default)(this,n);for(var i=arguments.length,a=Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=r=(0,p.default)(this,t.call.apply(t,[this].concat(a))),r.callContextFn=(0,_.default)(r,P.focusManagerContext),r.isFocusable=function(){return!r.props.isDisabled&&!r.props.isHidden},r.handleFocus=function(){r.isFocusable()&&r.callContextFn("itemFocused",r.contextId)},o=e,(0,p.default)(r,o)}return(0,m.default)(n,t),n.prototype.componentDidMount=function(){this.isFocusable()&&(this.contextId=(0,C.default)(),this.callContextFn("registerItem",this.contextId,I.default.findDOMNode(this)))},n.prototype.componentDidUpdate=function(){this.isFocusable()&&this.callContextFn("updateItem",this.contextId,I.default.findDOMNode(this))},n.prototype.componentWillUnmount=function(){this.isFocusable()&&this.callContextFn("deregisterItem",this.contextId)},n.prototype.render=function(){var t=this.props,n=t.children,r=(0,s.default)(t,["children"]);return b.default.createElement(e,(0,u.default)({onFocus:this.handleFocus},r),n)},n}(g.Component),t.displayName="WithItemFocus("+(0,O.default)(e)+")",t.propTypes={children:g.PropTypes.node,isDisabled:g.PropTypes.bool,isHidden:g.PropTypes.bool},t.contextTypes=(0,i.default)({},P.focusManagerContext,g.PropTypes.object),n};t.default=A},function(e,t){e.exports=g},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(n){for(var r,o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return e.context[t]?(r=e.context[t])[n].apply(r,i):null}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=r(o),a=n(25),u=r(a),l=n(26),s=r(l),d=n(32),c=r(d);t.default=(0,c.default)((0,s.default)(u.default),i.default,"radio")},function(e,t){e.exports=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(11),u=r(a),l=n(27),s=r(l),d=n(4),c=r(d),f=n(5),p=r(f),h=n(6),m=r(h),g=n(7),b=r(g),y=n(33),I=n(28),v=r(I),C=n(29),x=r(C),O=n(18),k=n(19),_=function(e,t,n){var r=function(r){function o(){var e,t,n;(0,c.default)(this,o);for(var i=arguments.length,a=Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=t=(0,p.default)(this,r.call.apply(r,[this].concat(a))),t.getIconColors=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?{primary:y.akColorB400,secondary:y.akColorN40}:{primary:y.akColorN40,secondary:y.akColorN40}},t.callContextFn=(0,x.default)(t,O.selectionManagerContext),t.handleKeyboard=function(e){var n=e.key;n!==k.KEY_ENTER&&n!==k.KEY_SPACE||(e.preventDefault(),t.handleItemActivated())},t.handleItemActivated=function(){t.callContextFn("itemClicked",t.props.id)},t.isSelectedInDropdown=function(){return t.callContextFn("isItemSelected",t.props.id)},n=e,(0,p.default)(t,n)}return(0,m.default)(o,r),o.prototype.render=function(){var r=this.props,o=r.children,i=(0,s.default)(r,["children"]),a=this.isSelectedInDropdown(),l=this.getIconColors(a);return b.default.createElement(e,(0,u.default)({role:n,"aria-checked":a,isSelected:a,onClick:this.handleItemActivated,onKeyDown:this.handleKeyboard,elemBefore:b.default.createElement(t,{primaryColor:l.primary,secondaryColor:l.secondary,size:"medium",label:""})},i),o)},o}(g.Component);return r.propTypes={children:g.PropTypes.node,id:g.PropTypes.string.isRequired},r.contextTypes=(0,i.default)({},O.selectionManagerContext,g.PropTypes.object.isRequired),r.displayName="WithToggleInteraction("+(0,v.default)(e)+")",r};t.default=_},function(e,t){e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(35),i=r(o),a=n(25),u=r(a),l=n(26),s=r(l),d=n(32),c=r(d);t.default=(0,c.default)((0,s.default)(u.default),i.default,"checkbox")},function(e,t){e.exports=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=r(o),a=n(5),u=r(a),l=n(6),s=r(l),d=n(7),c=r(d),f=n(8),p=r(f),h=n(25),m=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.elemAfter,r=e.title;return c.default.createElement(h.ItemGroup,{elemAfter:n,title:r},t)},t}(d.Component);m.propTypes={children:p.default.node,title:p.default.string,elemAfter:p.default.oneOfType([p.default.node,p.default.string])},t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(36),i=r(o),a=n(38),u=r(a);t.default=(0,u.default)(i.default,"radio")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(27),i=r(o),a=n(4),u=r(a),l=n(5),s=r(l),d=n(6),c=r(d),f=n(7),p=r(f),h=n(28),m=r(h),g=n(39),b=r(g),y=function(e,t){var n,r;return r=n=function(n){function r(){return(0,u.default)(this,r),(0,s.default)(this,n.apply(this,arguments))}return(0,c.default)(r,n),r.prototype.render=function(){var n=this.props,r=n.children,o=n.id,a=(0,i.default)(n,["children","id"]);return p.default.createElement(e,a,p.default.createElement(b.default,{groupId:o,behavior:t},r))},r}(f.Component),n.displayName="WithDropdownItemSelectionManager("+(0,m.default)(e)+")",n.propTypes={children:f.PropTypes.node,id:f.PropTypes.string.isRequired},r};t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o),a=n(3),u=r(a),l=n(4),s=r(l),d=n(5),c=r(d),f=n(6),p=r(f),h=n(7),m=r(h),g=n(8),b=r(g),y=n(18),I=function(e){function t(){var n,r,o;(0,s.default)(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=(0,c.default)(this,e.call.apply(e,[this].concat(a))),r.handleItemClicked=function(e){var t=r.props.behavior;"checkbox"===t?r.handleCheckboxItemClicked(e):"radio"===t&&r.handleRadioItemClicked(e)},r.handleCheckboxItemClicked=function(e){var t=r.context[y.selectionCacheContext],n=t.itemsInGroup(r.props.groupId),o=t.isItemSelected(r.props.groupId,e)?n.filter(function(t){return t.id!==e}):[].concat((0,u.default)(n),[{id:e,groupId:r.props.groupId}]);r.updateCacheContextWithSelections(o)},r.handleRadioItemClicked=function(e){r.updateCacheContextWithSelections([{id:e,groupId:r.props.groupId}])},r.updateCacheContextWithSelections=function(e){r.context[y.selectionCacheContext].itemSelectionsChanged(r.props.groupId,e)},o=n,(0,c.default)(r,o)}return(0,p.default)(t,e),t.prototype.getChildContext=function(){var e=this;return(0,i.default)({},y.selectionManagerContext,{isItemSelected:function(t){return e.context[y.selectionCacheContext].isItemSelected(e.props.groupId,t)},itemClicked:this.handleItemClicked})},t.prototype.render=function(){return m.default.createElement("div",null,this.props.children)},t}(h.Component);I.propTypes={behavior:b.default.oneOf(["checkbox","radio"]).isRequired,groupId:b.default.string.isRequired,children:b.default.node},I.childContextTypes=(0,i.default)({},y.selectionManagerContext,b.default.object),I.contextTypes=(0,i.default)({},y.selectionCacheContext,b.default.object.isRequired),t.default=I},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(36),i=r(o),a=n(38),u=r(a);t.default=(0,u.default)(i.default,"checkbox")}])});

@@ -12,2 +12,3 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty';

import getDisplayName from '../../util/getDisplayName';
import safeContextCall from '../../util/safeContextCall';
import { focusManagerContext } from '../../util/contextNamespace';

@@ -33,7 +34,7 @@

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.isFocusable = function () {
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.callContextFn = safeContextCall(_this, focusManagerContext), _this.isFocusable = function () {
return !_this.props.isDisabled && !_this.props.isHidden;
}, _this.handleFocus = function () {
if (_this.isFocusable()) {
_this.context[focusManagerContext].itemFocused(_this.contextId);
_this.callContextFn('itemFocused', _this.contextId);
}

@@ -49,5 +50,4 @@ }, _temp), _possibleConstructorReturn(_this, _ret);

this.contextId = uid();
this.context[focusManagerContext].registerItem(this.contextId,
// eslint-disable-next-line react/no-find-dom-node
ReactDOM.findDOMNode(this));
this.callContextFn('registerItem', this.contextId, ReactDOM.findDOMNode(this));
};

@@ -60,5 +60,4 @@

this.context[focusManagerContext].updateItem(this.contextId,
// eslint-disable-next-line react/no-find-dom-node
ReactDOM.findDOMNode(this));
this.callContextFn('updateItem', this.contextId, ReactDOM.findDOMNode(this));
};

@@ -68,3 +67,3 @@

if (this.isFocusable()) {
this.context[focusManagerContext].deregisterItem(this.contextId);
this.callContextFn('deregisterItem', this.contextId);
}

@@ -95,5 +94,5 @@ };

isHidden: PropTypes.bool
}, _class.contextTypes = _defineProperty({}, focusManagerContext, PropTypes.object.isRequired), _temp2;
}, _class.contextTypes = _defineProperty({}, focusManagerContext, PropTypes.object), _temp2;
};
export default withItemFocus;

@@ -11,2 +11,3 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty';

import getDisplayName from '../../util/getDisplayName';
import safeContextCall from '../../util/safeContextCall';
import { selectionManagerContext } from '../../util/contextNamespace';

@@ -38,3 +39,3 @@

return { primary: akColorN40, secondary: akColorN40 };
}, _this.handleKeyboard = function (event) {
}, _this.callContextFn = safeContextCall(_this, selectionManagerContext), _this.handleKeyboard = function (event) {
var key = event.key;

@@ -49,5 +50,5 @@

}, _this.handleItemActivated = function () {
_this.context[selectionManagerContext].itemClicked(_this.props.id);
_this.callContextFn('itemClicked', _this.props.id);
}, _this.isSelectedInDropdown = function () {
return _this.context[selectionManagerContext].isItemSelected(_this.props.id);
return _this.callContextFn('isItemSelected', _this.props.id);
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -54,0 +55,0 @@ }

{
"name": "@atlaskit/dropdown-menu",
"version": "3.5.0",
"version": "3.5.1",
"config": {

@@ -16,6 +16,8 @@ "access": "public"

"scripts": {
"eslint": "../../build/bin/lint.eslint.sh",
"jest": "echo 'yarn run jest is deprecated and removed. please run yarn run test:unit instead.'",
"prepublish": "../../node_modules/.bin/in-publish && { cd ../.. && npm run prepublish-with-babel/single @atlaskit/dropdown-menu; } || ../../node_modules/.bin/not-in-publish",
"jest": "../../node_modules/.bin/jest -c ../../build/config/jest.config.js",
"storybook": "../../build/bin/storybook.single.sh",
"eslint": "../../build/bin/lint.eslint.sh"
"storybook": "../../build/bin/storybook/run.local.js",
"storybook:static": "../../build/bin/storybook/build.static.js",
"test:unit": "../../node_modules/.bin/jest -c ../../build/config/jest.config.js"
},

@@ -22,0 +24,0 @@ "files": [

@@ -12,3 +12,3 @@ [![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://atlaskit.atlassian.com)

See more detailed documentation and code examples in the [live demo of the component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/dropdown-menu/3.5.0/).
See more detailed documentation and code examples in the [live demo of the component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/dropdown-menu/3.5.1/).

@@ -15,0 +15,0 @@ ## Installation

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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