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

@zendeskgarden/react-buttons

Package Overview
Dependencies
Maintainers
1
Versions
274
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zendeskgarden/react-buttons - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

<a name="3.2.1"></a>
## [3.2.1](https://github.com/zendeskgarden/react-components/compare/@zendeskgarden/react-buttons@3.2.0...@zendeskgarden/react-buttons@3.2.1) (2018-06-14)
**Note:** Version bump only for package @zendeskgarden/react-buttons
<a name="3.2.0"></a>

@@ -8,0 +16,0 @@ # [3.2.0](https://github.com/zendeskgarden/react-components/compare/@zendeskgarden/react-buttons@3.1.0...@zendeskgarden/react-buttons@3.2.0) (2018-06-11)

10

dist/index.js

@@ -178,3 +178,3 @@ /*!

'data-garden-id': COMPONENT_ID,
'data-garden-version': "3.2.0",
'data-garden-version': "3.2.1",
className: function className(_ref) {

@@ -296,3 +296,3 @@ var _classNames;

'data-garden-id': COMPONENT_ID,
'data-garden-version': "3.2.0",
'data-garden-version': "3.2.1",
className: function className(props) {

@@ -525,3 +525,3 @@ return (0, _classnames2.default)(_cssButtons2.default['l-btn-group'], _defineProperty({}, _cssButtons2.default['is-rtl'], (0, _reactTheming.isRtl)(props)));

'data-garden-id': COMPONENT_ID,
'data-garden-version': "3.2.0",
'data-garden-version': "3.2.1",
className: (0, _classnames2.default)(_cssButtons2.default['c-btn__icon'], _defineProperty({}, _cssButtons2.default['is-rotated'], rotated))

@@ -586,3 +586,3 @@ });

'data-garden-id': COMPONENT_ID,
'data-garden-version': "3.2.0",
'data-garden-version': "3.2.1",
className: _cssButtons2.default['c-btn--icon']

@@ -674,3 +674,3 @@ }).withConfig({

'data-garden-id': COMPONENT_ID,
'data-garden-version': "3.2.0",
'data-garden-version': "3.2.1",
className: function className(_ref) {

@@ -677,0 +677,0 @@ var _classNames;

@@ -31,3 +31,3 @@ /*!

*/
!function(e,t){for(var n in t)e[n]=t[n]}(t,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports=n(0)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.default={generateId:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"garden")+"-"+r++},setIdCounter:function(e){r=e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o,u=n(5),i=n(0),a=(o=i)&&o.__esModule?o:{default:o};function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,u=Array(o),i=0;i<o;i++)u[i]=arguments[i];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.isControlledProp=function(e){return Object.prototype.hasOwnProperty.call(r.props,e)},r.getControlledState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state;return Object.keys(e).reduce(function(t,n){return t[n]=r.isControlledProp(n)?r.props[n]:e[n],t},{})},r.setControlledState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props.onStateChange;if(t){var n={},o={};for(var u in e)r.isControlledProp(u)?n[u]=e[u]:o[u]=e[u];t(n),r.setState(o)}else r.setState(e)},l(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.Component),t}();d.propTypes={onStateChange:a.default.func},t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e&&e.defaultPrevented})}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).wrapping,n=void 0===t?"items":t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectedIndex=void 0,this.numItems=0,this.wrapping=n}return r(e,[{key:"fireSelectionChanged",value:function(e,t){this.onSelectionChanged&&this.onSelectionChanged({newSelection:e,previousSelection:t})}},{key:"select",value:function(e){var t=this.selectedIndex;this.selectedIndex=e,-1===this.selectedIndex&&(this.selectedIndex=void 0),this.fireSelectionChanged(this.selectedIndex,t)}},{key:"selectNext",value:function(){if(this.numItems>0){if(!this.hasSelection())return this.selectFirst();var e=this.selectedIndex+1;return this.numItems<=e&&("clear"===this.wrapping?e=-1:"items"===this.wrapping?e%=this.numItems:"off"===this.wrapping&&(e=this.numItems-1)),this.select(e),!0}return!1}},{key:"selectPrevious",value:function(){if(this.numItems>0){if(!this.hasSelection())return this.selectLast();var e=this.selectedIndex-1;return e<0&&("clear"===this.wrapping?e=-1:"items"===this.wrapping?e=this.numItems-1:"off"===this.wrapping&&(e=0)),this.select(e),!0}return!1}},{key:"selectFirst",value:function(){return this.numItems>0&&(this.select(0),!0)}},{key:"selectLast",value:function(){return this.numItems>0&&(this.select(this.numItems-1),!0)}},{key:"clearSelection",value:function(){this.select()}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.numItems,n=void 0===t?0:t,r=e.selectedIndex;this.numItems=n,this.selectedIndex=r}},{key:"hasSelection",value:function(){return void 0!==this.selectedIndex}}]),e}();t.default=o},function(e,t){e.exports=n(1)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={ALT:18,BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=d(n(0)),a=d(n(2)),l=d(n(1));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var c=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,u=Array(n),i=0;i<n;i++)u[i]=arguments[i];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u)));return a.retrieveInputId=function(){return a.getControlledState().id+"--input"},a.retrieveLabelId=function(){return a.getControlledState().id+"--label"},a.retrieveHintId=function(){return a.getControlledState().id+"--hint"},a.retrieveMessageId=function(){return a.getControlledState().id+"--message"},a.getLabelProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveLabelId():t,r=e.htmlFor,u=void 0===r?a.retrieveInputId():r,i=f(e,["id","htmlFor"]);return o({id:n,htmlFor:u},i)},a.getInputProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveInputId():t,r=f(e,["id"]);return o({id:n,"aria-labelledby":a.retrieveLabelId(),"aria-describedby":a.retrieveHintId()+" "+a.retrieveMessageId()},r)},a.getHintProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveHintId():t,r=f(e,["id"]);return o({id:n},r)},a.getMessageProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveMessageId():t,r=f(e,["id"]);return o({id:n},r)},a.state={id:l.default.generateId()},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n;return r({getLabelProps:this.getLabelProps,getInputProps:this.getInputProps,getHintProps:this.getHintProps,getMessageProps:this.getMessageProps})}}]),t}();c.propTypes={children:i.default.func,render:i.default.func,id:i.default.string},t.default=c},function(e,t){e.exports=n(3)},function(e,t){e.exports=n(34)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionContainer=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=v(n(0)),a=v(n(9)),l=n(8),d=v(n(2)),f=v(n(3)),c=v(n(1)),s=v(n(6)),p=v(n(4));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={HORIZONTAL:"horizontal",VERTICAL:"vertical",BOTH:"both"},_=t.SelectionContainer=function(e){function t(){var e,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=arguments.length,i=Array(u),a=0;a<u;a++)i[a]=arguments[a];var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i)));return d.keyDownEventHandlers=(b(n={},s.default.ENTER,function(e){e.preventDefault();var t=d.getControlledState().focusedKey;d.selectItem(t,t)}),b(n,s.default.SPACE,function(e){e.preventDefault();var t=d.getControlledState().focusedKey;d.selectItem(t,t)}),b(n,s.default.END,function(e){e.preventDefault(),d.focusSelectionModel.selectLast()}),b(n,s.default.HOME,function(e){e.preventDefault(),d.focusSelectionModel.selectFirst()}),b(n,s.default.LEFT,function(e){d.props.direction!==h.VERTICAL&&(e.preventDefault(),(0,l.isRtl)(d.props)?d.focusSelectionModel.selectNext():d.focusSelectionModel.selectPrevious())}),b(n,s.default.RIGHT,function(e){d.props.direction!==h.VERTICAL&&(e.preventDefault(),(0,l.isRtl)(d.props)?d.focusSelectionModel.selectPrevious():d.focusSelectionModel.selectNext())}),b(n,s.default.UP,function(e){d.props.direction!==h.HORIZONTAL&&(e.preventDefault(),d.focusSelectionModel.selectPrevious())}),b(n,s.default.DOWN,function(e){d.props.direction!==h.HORIZONTAL&&(e.preventDefault(),d.focusSelectionModel.selectNext())}),n),d.onFocusSelectionModelChange=function(e){var t=e.newSelection,n=d.indexKeyMap[t];d.setControlledState({focusedKey:n})},d.selectItem=function(e,t){d.setControlledState({selectedKey:e,focusedKey:t})},d.getContainerId=function(){return d.getControlledState().id+"--container"},d.getContainerProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?d.getContainerId():t,r=e.role,u=void 0===r?"listbox":r,i=e.tabIndex,a=void 0===i?0:i,l=e.onKeyDown,c=e.onFocus,s=e.onBlur,p=e.onMouseDown,v=y(e,["id","role","tabIndex","onKeyDown","onFocus","onBlur","onMouseDown"]),b=d.getControlledState().focusedKey,h=d.props.defaultFocusedIndex;return o({id:n,role:u,tabIndex:a,"aria-activedescendant":d.getItemId(b),onKeyDown:(0,f.default)(l,function(e){var t=d.keyDownEventHandlers[e.keyCode];t&&t(e)}),onFocus:(0,f.default)(c,function(){if(!d.containerMouseDown&&void 0===b){var e=d.keyIndexMap[d.getControlledState().selectedKey];void 0===e&&(e=-1===h?e=Object.keys(d.keyIndexMap).length-1:h),d.focusSelectionModel.select(e)}}),onMouseDown:(0,f.default)(p,function(){d.containerMouseDown=!0,setTimeout(function(){d.containerMouseDown=!1},0)}),onBlur:(0,f.default)(s,function(){d.focusSelectionModel.clearSelection()})},v)},d.getItemId=function(e){return void 0===e?"":d.getControlledState().id+"--item-"+e},d.getItemProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.id,r=void 0===n?d.getItemId(t):n,u=e.role,i=void 0===u?"option":u,a=e.onClick,l=y(e,["key","id","role","onClick"]);if(void 0===t)throw new Error('"key" must be defined within getItemProps regardless of being used within a .map()');var c=d.getControlledState(),s=c.selectedKey,p=c.focusedKey,v=t===s,b=t===p,h=d.focusSelectionModel.numItems;return d.indexKeyMap[h]=t,d.keyIndexMap[t]=h,(b||void 0===p&&v)&&(d.focusSelectionModel.selectedIndex=h),d.focusSelectionModel.numItems++,o({id:r,key:t,role:i,"aria-selected":v,onClick:(0,f.default)(a,function(){d.selectItem(t,void 0)})},l)},d.state={focusedKey:void 0,selectedKey:void 0,id:c.default.generateId()},d.focusSelectionModel=new p.default,d.focusSelectionModel.onSelectionChanged=d.onFocusSelectionModelChange,d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d.default),u(t,[{key:"componentDidUpdate",value:function(e,t){var n=void 0===this.props.focusedKey?this.state:this.props,r=void 0===e.focusedKey?t:e;if(void 0!==n.focusedKey&&n.focusedKey!==r.focusedKey){var o=document.getElementById(this.getItemId(n.focusedKey));o&&(0,a.default)(o)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n,o=this.getControlledState(),u=o.focusedKey,i=o.selectedKey;return this.focusSelectionModel.reset(),this.indexKeyMap={},this.keyIndexMap={},this.items=[],r({getContainerProps:this.getContainerProps,getItemProps:this.getItemProps,focusedKey:u,selectedKey:i,focusSelectionModel:this.focusSelectionModel})}}]),t}();_.propTypes={children:i.default.func,direction:i.default.oneOf([h.HORIZONTAL,h.VERTICAL,h.BOTH]),defaultFocusedIndex:i.default.number,focusedKey:i.default.oneOfType([i.default.string,i.default.number]),selectedKey:i.default.oneOfType([i.default.string,i.default.number]),onStateChange:i.default.func,id:i.default.string,render:i.default.func},_.defaultProps={defaultFocusedIndex:0,direction:h.HORIZONTAL},t.default=(0,l.withTheme)(_)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(5),a=d(n(0)),l=d(n(3));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,u=Array(n),i=0;i<n;i++)u[i]=arguments[i];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u)));return a.onMouseDown=function(){a.keyboardFocusable=!1,setTimeout(function(){a.keyboardFocusable=!0},0)},a.onFocus=function(){a.keyboardFocusable&&a.setState({keyboardFocused:!0})},a.onBlur=function(){a.setState({keyboardFocused:!1})},a.getFocusProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tabIndex,n=void 0===t?0:t,r=e.onBlur,u=e.onFocus,i=e.onMouseDown,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["tabIndex","onBlur","onFocus","onMouseDown"]);return o({tabIndex:n,onBlur:(0,l.default)(r,a.onBlur),onFocus:(0,l.default)(u,a.onFocus),onMouseDown:(0,l.default)(i,a.onMouseDown)},d)},a.state={keyboardFocused:!1},a.keyboardFocusable=!0,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n,o=this.state.keyboardFocused;return r({getFocusProps:this.getFocusProps,keyboardFocused:o})}}]),t}();f.propTypes={children:a.default.func,render:a.default.func},t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);Object.defineProperty(t,"KEY_CODES",{enumerable:!0,get:function(){return c(r).default}});var o=n(11);Object.defineProperty(t,"KeyboardFocusContainer",{enumerable:!0,get:function(){return c(o).default}});var u=n(10);Object.defineProperty(t,"SelectionContainer",{enumerable:!0,get:function(){return c(u).default}});var i=n(7);Object.defineProperty(t,"FieldContainer",{enumerable:!0,get:function(){return c(i).default}});var a=n(3);Object.defineProperty(t,"composeEventHandlers",{enumerable:!0,get:function(){return c(a).default}});var l=n(2);Object.defineProperty(t,"ControlledComponent",{enumerable:!0,get:function(){return c(l).default}});var d=n(1);Object.defineProperty(t,"IdManager",{enumerable:!0,get:function(){return c(d).default}});var f=n(4);function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"SingleSelectionModel",{enumerable:!0,get:function(){return c(f).default}})}]))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=c(n(1)),u=c(n(0)),i=c(n(5)),a=c(n(4)),l=c(n(2)),d=n(7),f=n(3);function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p="small",v="large",y=i.default.button.attrs({"data-garden-id":"buttons.button","data-garden-version":"3.2.0",className:function(e){var t,n=e.danger,r=e.size,o=e.stretched,u=e.disabled,i=e.focused,d=e.hovered,f=e.active,c=e.selected,y=e.pill,b=e.primary,h=e.basic,_=e.muted,g=e.link;return(0,a.default)(l.default["c-btn"],(s(t={},l.default["c-btn--danger"],n),s(t,l.default["c-btn--primary"],b),s(t,l.default["c-btn--basic"],h),s(t,l.default["c-btn--muted"],_),s(t,l.default["c-btn--pill"],y),s(t,l.default["c-btn--anchor"],g),s(t,l.default["c-btn--sm"],r===p),s(t,l.default["c-btn--lg"],r===v),s(t,l.default["c-btn--full"],o),s(t,l.default["is-active"],f),s(t,l.default["is-disabled"],u),s(t,l.default["is-focused"],i),s(t,l.default["is-hovered"],d),s(t,l.default["is-selected"],c),t))},type:"button"}).withConfig({displayName:"Button__StyledButton"})(["",";"],function(e){return(0,f.retrieveTheme)("buttons.button",e)}),b=function(e){var t=e.focused,n=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["focused"]);return o.default.createElement(d.KeyboardFocusContainer,null,function(e){var u=e.getFocusProps,i=e.keyboardFocused;return o.default.createElement(y,u(r({},n,{focused:t||i})))})};b.propTypes={danger:u.default.bool,size:u.default.oneOf([p,v]),stretched:u.default.bool,primary:u.default.bool,basic:u.default.bool,muted:u.default.bool,link:u.default.bool,pill:u.default.bool,disabled:u.default.bool,focused:u.default.bool,hovered:u.default.bool,active:u.default.bool,selected:u.default.bool},b.hasType=function(){return b},t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(5)),o=a(n(4)),u=a(n(2)),i=n(3);function a(e){return e&&e.__esModule?e:{default:e}}var l=r.default.div.attrs({"data-garden-id":"buttons.button_group_view","data-garden-version":"3.2.0",className:function(e){return(0,o.default)(u.default["l-btn-group"],(t={},n=u.default["is-rtl"],r=(0,i.isRtl)(e),n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t));var t,n,r}}).withConfig({displayName:"ButtonGroupView"})([":focus{outline:none;}",";"],function(e){return(0,i.retrieveTheme)("buttons.button_group_view",e)});t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,u.default)(e.replace(i,"ms-"))};var r,o=n(29),u=(r=o)&&r.__esModule?r:{default:r};var i=/^-ms-/;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);return n?n.innerHeight:t?e.clientHeight:(0,r.default)(e).height};var r=u(n(13)),o=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,u.default)(e),n=(0,o.default)(t),i=t&&t.documentElement,a={top:0,left:0,height:0,width:0};if(!t)return;if(!(0,r.default)(i,e))return a;void 0!==e.getBoundingClientRect&&(a=e.getBoundingClientRect());return a={top:a.top+(n.pageYOffset||i.scrollTop)-(i.clientTop||0),left:a.left+(n.pageXOffset||i.scrollLeft)-(i.clientLeft||0),width:(null==a.width?e.offsetWidth:a.width)||0,height:(null==a.height?e.offsetHeight:a.height)||0}};var r=i(n(33)),o=i(n(6)),u=i(n(32));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=l(n(1)),i=l(n(0)),a=n(7);function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),u=0;u<n;u++)o[u]=arguments[u];var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return i.getGroupProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.role,n=void 0===t?"group":t,o=d(e,["role"]);return r({role:n},o)},i.getButtonProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.role,n=void 0===t?"button":t,o=e.key,u=e.tabIndex,i=void 0===u?-1:u,a=d(e,["role","key","tabIndex"]);if(void 0===o||null===o)throw new Error('"key" must be defined within getButtonProps regardless of being used within a .map()');return r({role:n,key:o,tabIndex:i},a)},i.state={focusedKey:void 0,selectedKey:void 0,id:a.IdManager.generateId()},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.ControlledComponent),o(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.render,o=void 0===r?n:r,i=this.getControlledState(),l=i.focusedKey,d=i.selectedKey,f=i.id;return u.default.createElement(a.SelectionContainer,{id:f,focusedKey:l,selectedKey:d,onStateChange:this.setControlledState},function(t){var n=t.getContainerProps,r=t.getItemProps;return o({getGroupProps:function(t){return n(e.getGroupProps(t))},getButtonProps:function(t){return r(e.getButtonProps(t))},focusedKey:l,selectedKey:d})})}}]),t}();f.propTypes={id:i.default.string,focusedKey:i.default.oneOfType([i.default.string,i.default.number]),selectedKey:i.default.oneOfType([i.default.string,i.default.number]),onStateChange:i.default.func,children:i.default.func,render:i.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=l(r),u=l(n(0)),i=l(n(4)),a=l(n(2));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(e){var t,n,u,l=e.children,d=e.rotated;return o.default.cloneElement(r.Children.only(l),{"data-garden-id":"buttons.icon","data-garden-version":"3.2.0",className:(0,i.default)(a.default["c-btn__icon"],(t={},n=a.default["is-rotated"],u=d,n in t?Object.defineProperty(t,n,{value:u,enumerable:!0,configurable:!0,writable:!0}):t[n]=u,t))})};d.propTypes={rotated:u.default.bool},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(0)),o=l(n(5)),u=l(n(2)),i=n(3),a=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}var d="small",f="large",c=(0,o.default)(a.default).attrs({"data-garden-id":"buttons.icon_button","data-garden-version":"3.2.0",className:u.default["c-btn--icon"]}).withConfig({displayName:"IconButton"})(["",";"],function(e){return(0,i.retrieveTheme)("buttons.icon_button",e)});c.propTypes={danger:r.default.bool,size:r.default.oneOf([d,f]),primary:r.default.bool,basic:r.default.bool,muted:r.default.bool,pill:r.default.bool,disabled:r.default.bool,focused:r.default.bool,hovered:r.default.bool,active:r.default.bool},c.defaultProps={pill:!0,muted:!0,basic:!0},t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=c(n(1)),u=c(n(0)),i=c(n(5)),a=c(n(4)),l=c(n(2)),d=n(7),f=n(3);function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=i.default.a.attrs({"data-garden-id":"buttons.anchor","data-garden-version":"3.2.0",className:function(e){var t,n=e.danger,r=e.disabled,o=e.focused,u=e.hovered,i=e.active,d=e.selected;return(0,a.default)(l.default["c-btn"],l.default["c-btn--anchor"],(s(t={},l.default["c-btn--danger"],n),s(t,l.default["is-active"],i),s(t,l.default["is-disabled"],r),s(t,l.default["is-focused"],o),s(t,l.default["is-hovered"],u),s(t,l.default["is-selected"],d),t))}}).withConfig({displayName:"Anchor__StyledAnchor"})(["",";"],function(e){return(0,f.retrieveTheme)("buttons.anchor",e)}),v=function(e){var t=e.focused,n=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["focused"]);return o.default.createElement(d.KeyboardFocusContainer,null,function(e){var u=e.getFocusProps,i=e.keyboardFocused;return o.default.createElement(p,u(r({},n,{focused:t||i})))})};v.propTypes={danger:u.default.bool,disabled:u.default.bool,focused:u.default.bool,hovered:u.default.bool,active:u.default.bool},t.default=v},,function(e,t,n){"use strict";
!function(e,t){for(var n in t)e[n]=t[n]}(t,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports=n(0)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.default={generateId:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"garden")+"-"+r++},setIdCounter:function(e){r=e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o,u=n(5),i=n(0),a=(o=i)&&o.__esModule?o:{default:o};function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,u=Array(o),i=0;i<o;i++)u[i]=arguments[i];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.isControlledProp=function(e){return Object.prototype.hasOwnProperty.call(r.props,e)},r.getControlledState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state;return Object.keys(e).reduce(function(t,n){return t[n]=r.isControlledProp(n)?r.props[n]:e[n],t},{})},r.setControlledState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props.onStateChange;if(t){var n={},o={};for(var u in e)r.isControlledProp(u)?n[u]=e[u]:o[u]=e[u];t(n),r.setState(o)}else r.setState(e)},l(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.Component),t}();d.propTypes={onStateChange:a.default.func},t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e&&e.defaultPrevented})}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).wrapping,n=void 0===t?"items":t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectedIndex=void 0,this.numItems=0,this.wrapping=n}return r(e,[{key:"fireSelectionChanged",value:function(e,t){this.onSelectionChanged&&this.onSelectionChanged({newSelection:e,previousSelection:t})}},{key:"select",value:function(e){var t=this.selectedIndex;this.selectedIndex=e,-1===this.selectedIndex&&(this.selectedIndex=void 0),this.fireSelectionChanged(this.selectedIndex,t)}},{key:"selectNext",value:function(){if(this.numItems>0){if(!this.hasSelection())return this.selectFirst();var e=this.selectedIndex+1;return this.numItems<=e&&("clear"===this.wrapping?e=-1:"items"===this.wrapping?e%=this.numItems:"off"===this.wrapping&&(e=this.numItems-1)),this.select(e),!0}return!1}},{key:"selectPrevious",value:function(){if(this.numItems>0){if(!this.hasSelection())return this.selectLast();var e=this.selectedIndex-1;return e<0&&("clear"===this.wrapping?e=-1:"items"===this.wrapping?e=this.numItems-1:"off"===this.wrapping&&(e=0)),this.select(e),!0}return!1}},{key:"selectFirst",value:function(){return this.numItems>0&&(this.select(0),!0)}},{key:"selectLast",value:function(){return this.numItems>0&&(this.select(this.numItems-1),!0)}},{key:"clearSelection",value:function(){this.select()}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.numItems,n=void 0===t?0:t,r=e.selectedIndex;this.numItems=n,this.selectedIndex=r}},{key:"hasSelection",value:function(){return void 0!==this.selectedIndex}}]),e}();t.default=o},function(e,t){e.exports=n(1)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={ALT:18,BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=d(n(0)),a=d(n(2)),l=d(n(1));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var c=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,u=Array(n),i=0;i<n;i++)u[i]=arguments[i];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u)));return a.retrieveInputId=function(){return a.getControlledState().id+"--input"},a.retrieveLabelId=function(){return a.getControlledState().id+"--label"},a.retrieveHintId=function(){return a.getControlledState().id+"--hint"},a.retrieveMessageId=function(){return a.getControlledState().id+"--message"},a.getLabelProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveLabelId():t,r=e.htmlFor,u=void 0===r?a.retrieveInputId():r,i=f(e,["id","htmlFor"]);return o({id:n,htmlFor:u},i)},a.getInputProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveInputId():t,r=f(e,["id"]);return o({id:n,"aria-labelledby":a.retrieveLabelId(),"aria-describedby":a.retrieveHintId()+" "+a.retrieveMessageId()},r)},a.getHintProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveHintId():t,r=f(e,["id"]);return o({id:n},r)},a.getMessageProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?a.retrieveMessageId():t,r=f(e,["id"]);return o({id:n},r)},a.state={id:l.default.generateId()},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n;return r({getLabelProps:this.getLabelProps,getInputProps:this.getInputProps,getHintProps:this.getHintProps,getMessageProps:this.getMessageProps})}}]),t}();c.propTypes={children:i.default.func,render:i.default.func,id:i.default.string},t.default=c},function(e,t){e.exports=n(3)},function(e,t){e.exports=n(34)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionContainer=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=v(n(0)),a=v(n(9)),l=n(8),d=v(n(2)),f=v(n(3)),c=v(n(1)),s=v(n(6)),p=v(n(4));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={HORIZONTAL:"horizontal",VERTICAL:"vertical",BOTH:"both"},_=t.SelectionContainer=function(e){function t(){var e,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=arguments.length,i=Array(u),a=0;a<u;a++)i[a]=arguments[a];var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i)));return d.keyDownEventHandlers=(b(n={},s.default.ENTER,function(e){e.preventDefault();var t=d.getControlledState().focusedKey;d.selectItem(t,t)}),b(n,s.default.SPACE,function(e){e.preventDefault();var t=d.getControlledState().focusedKey;d.selectItem(t,t)}),b(n,s.default.END,function(e){e.preventDefault(),d.focusSelectionModel.selectLast()}),b(n,s.default.HOME,function(e){e.preventDefault(),d.focusSelectionModel.selectFirst()}),b(n,s.default.LEFT,function(e){d.props.direction!==h.VERTICAL&&(e.preventDefault(),(0,l.isRtl)(d.props)?d.focusSelectionModel.selectNext():d.focusSelectionModel.selectPrevious())}),b(n,s.default.RIGHT,function(e){d.props.direction!==h.VERTICAL&&(e.preventDefault(),(0,l.isRtl)(d.props)?d.focusSelectionModel.selectPrevious():d.focusSelectionModel.selectNext())}),b(n,s.default.UP,function(e){d.props.direction!==h.HORIZONTAL&&(e.preventDefault(),d.focusSelectionModel.selectPrevious())}),b(n,s.default.DOWN,function(e){d.props.direction!==h.HORIZONTAL&&(e.preventDefault(),d.focusSelectionModel.selectNext())}),n),d.onFocusSelectionModelChange=function(e){var t=e.newSelection,n=d.indexKeyMap[t];d.setControlledState({focusedKey:n})},d.selectItem=function(e,t){d.setControlledState({selectedKey:e,focusedKey:t})},d.getContainerId=function(){return d.getControlledState().id+"--container"},d.getContainerProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?d.getContainerId():t,r=e.role,u=void 0===r?"listbox":r,i=e.tabIndex,a=void 0===i?0:i,l=e.onKeyDown,c=e.onFocus,s=e.onBlur,p=e.onMouseDown,v=y(e,["id","role","tabIndex","onKeyDown","onFocus","onBlur","onMouseDown"]),b=d.getControlledState().focusedKey,h=d.props.defaultFocusedIndex;return o({id:n,role:u,tabIndex:a,"aria-activedescendant":d.getItemId(b),onKeyDown:(0,f.default)(l,function(e){var t=d.keyDownEventHandlers[e.keyCode];t&&t(e)}),onFocus:(0,f.default)(c,function(){if(!d.containerMouseDown&&void 0===b){var e=d.keyIndexMap[d.getControlledState().selectedKey];void 0===e&&(e=-1===h?e=Object.keys(d.keyIndexMap).length-1:h),d.focusSelectionModel.select(e)}}),onMouseDown:(0,f.default)(p,function(){d.containerMouseDown=!0,setTimeout(function(){d.containerMouseDown=!1},0)}),onBlur:(0,f.default)(s,function(){d.focusSelectionModel.clearSelection()})},v)},d.getItemId=function(e){return void 0===e?"":d.getControlledState().id+"--item-"+e},d.getItemProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.id,r=void 0===n?d.getItemId(t):n,u=e.role,i=void 0===u?"option":u,a=e.onClick,l=y(e,["key","id","role","onClick"]);if(void 0===t)throw new Error('"key" must be defined within getItemProps regardless of being used within a .map()');var c=d.getControlledState(),s=c.selectedKey,p=c.focusedKey,v=t===s,b=t===p,h=d.focusSelectionModel.numItems;return d.indexKeyMap[h]=t,d.keyIndexMap[t]=h,(b||void 0===p&&v)&&(d.focusSelectionModel.selectedIndex=h),d.focusSelectionModel.numItems++,o({id:r,key:t,role:i,"aria-selected":v,onClick:(0,f.default)(a,function(){d.selectItem(t,void 0)})},l)},d.state={focusedKey:void 0,selectedKey:void 0,id:c.default.generateId()},d.focusSelectionModel=new p.default,d.focusSelectionModel.onSelectionChanged=d.onFocusSelectionModelChange,d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d.default),u(t,[{key:"componentDidUpdate",value:function(e,t){var n=void 0===this.props.focusedKey?this.state:this.props,r=void 0===e.focusedKey?t:e;if(void 0!==n.focusedKey&&n.focusedKey!==r.focusedKey){var o=document.getElementById(this.getItemId(n.focusedKey));o&&(0,a.default)(o)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n,o=this.getControlledState(),u=o.focusedKey,i=o.selectedKey;return this.focusSelectionModel.reset(),this.indexKeyMap={},this.keyIndexMap={},this.items=[],r({getContainerProps:this.getContainerProps,getItemProps:this.getItemProps,focusedKey:u,selectedKey:i,focusSelectionModel:this.focusSelectionModel})}}]),t}();_.propTypes={children:i.default.func,direction:i.default.oneOf([h.HORIZONTAL,h.VERTICAL,h.BOTH]),defaultFocusedIndex:i.default.number,focusedKey:i.default.oneOfType([i.default.string,i.default.number]),selectedKey:i.default.oneOfType([i.default.string,i.default.number]),onStateChange:i.default.func,id:i.default.string,render:i.default.func},_.defaultProps={defaultFocusedIndex:0,direction:h.HORIZONTAL},t.default=(0,l.withTheme)(_)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(5),a=d(n(0)),l=d(n(3));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,u=Array(n),i=0;i<n;i++)u[i]=arguments[i];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u)));return a.onMouseDown=function(){a.keyboardFocusable=!1,setTimeout(function(){a.keyboardFocusable=!0},0)},a.onFocus=function(){a.keyboardFocusable&&a.setState({keyboardFocused:!0})},a.onBlur=function(){a.setState({keyboardFocused:!1})},a.getFocusProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tabIndex,n=void 0===t?0:t,r=e.onBlur,u=e.onFocus,i=e.onMouseDown,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["tabIndex","onBlur","onFocus","onMouseDown"]);return o({tabIndex:n,onBlur:(0,l.default)(r,a.onBlur),onFocus:(0,l.default)(u,a.onFocus),onMouseDown:(0,l.default)(i,a.onMouseDown)},d)},a.state={keyboardFocused:!1},a.keyboardFocusable=!0,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":r(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,r=void 0===n?t:n,o=this.state.keyboardFocused;return r({getFocusProps:this.getFocusProps,keyboardFocused:o})}}]),t}();f.propTypes={children:a.default.func,render:a.default.func},t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);Object.defineProperty(t,"KEY_CODES",{enumerable:!0,get:function(){return c(r).default}});var o=n(11);Object.defineProperty(t,"KeyboardFocusContainer",{enumerable:!0,get:function(){return c(o).default}});var u=n(10);Object.defineProperty(t,"SelectionContainer",{enumerable:!0,get:function(){return c(u).default}});var i=n(7);Object.defineProperty(t,"FieldContainer",{enumerable:!0,get:function(){return c(i).default}});var a=n(3);Object.defineProperty(t,"composeEventHandlers",{enumerable:!0,get:function(){return c(a).default}});var l=n(2);Object.defineProperty(t,"ControlledComponent",{enumerable:!0,get:function(){return c(l).default}});var d=n(1);Object.defineProperty(t,"IdManager",{enumerable:!0,get:function(){return c(d).default}});var f=n(4);function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"SingleSelectionModel",{enumerable:!0,get:function(){return c(f).default}})}]))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=c(n(1)),u=c(n(0)),i=c(n(5)),a=c(n(4)),l=c(n(2)),d=n(7),f=n(3);function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p="small",v="large",y=i.default.button.attrs({"data-garden-id":"buttons.button","data-garden-version":"3.2.1",className:function(e){var t,n=e.danger,r=e.size,o=e.stretched,u=e.disabled,i=e.focused,d=e.hovered,f=e.active,c=e.selected,y=e.pill,b=e.primary,h=e.basic,_=e.muted,g=e.link;return(0,a.default)(l.default["c-btn"],(s(t={},l.default["c-btn--danger"],n),s(t,l.default["c-btn--primary"],b),s(t,l.default["c-btn--basic"],h),s(t,l.default["c-btn--muted"],_),s(t,l.default["c-btn--pill"],y),s(t,l.default["c-btn--anchor"],g),s(t,l.default["c-btn--sm"],r===p),s(t,l.default["c-btn--lg"],r===v),s(t,l.default["c-btn--full"],o),s(t,l.default["is-active"],f),s(t,l.default["is-disabled"],u),s(t,l.default["is-focused"],i),s(t,l.default["is-hovered"],d),s(t,l.default["is-selected"],c),t))},type:"button"}).withConfig({displayName:"Button__StyledButton"})(["",";"],function(e){return(0,f.retrieveTheme)("buttons.button",e)}),b=function(e){var t=e.focused,n=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["focused"]);return o.default.createElement(d.KeyboardFocusContainer,null,function(e){var u=e.getFocusProps,i=e.keyboardFocused;return o.default.createElement(y,u(r({},n,{focused:t||i})))})};b.propTypes={danger:u.default.bool,size:u.default.oneOf([p,v]),stretched:u.default.bool,primary:u.default.bool,basic:u.default.bool,muted:u.default.bool,link:u.default.bool,pill:u.default.bool,disabled:u.default.bool,focused:u.default.bool,hovered:u.default.bool,active:u.default.bool,selected:u.default.bool},b.hasType=function(){return b},t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(5)),o=a(n(4)),u=a(n(2)),i=n(3);function a(e){return e&&e.__esModule?e:{default:e}}var l=r.default.div.attrs({"data-garden-id":"buttons.button_group_view","data-garden-version":"3.2.1",className:function(e){return(0,o.default)(u.default["l-btn-group"],(t={},n=u.default["is-rtl"],r=(0,i.isRtl)(e),n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t));var t,n,r}}).withConfig({displayName:"ButtonGroupView"})([":focus{outline:none;}",";"],function(e){return(0,i.retrieveTheme)("buttons.button_group_view",e)});t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,u.default)(e.replace(i,"ms-"))};var r,o=n(29),u=(r=o)&&r.__esModule?r:{default:r};var i=/^-ms-/;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);return n?n.innerHeight:t?e.clientHeight:(0,r.default)(e).height};var r=u(n(13)),o=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,u.default)(e),n=(0,o.default)(t),i=t&&t.documentElement,a={top:0,left:0,height:0,width:0};if(!t)return;if(!(0,r.default)(i,e))return a;void 0!==e.getBoundingClientRect&&(a=e.getBoundingClientRect());return a={top:a.top+(n.pageYOffset||i.scrollTop)-(i.clientTop||0),left:a.left+(n.pageXOffset||i.scrollLeft)-(i.clientLeft||0),width:(null==a.width?e.offsetWidth:a.width)||0,height:(null==a.height?e.offsetHeight:a.height)||0}};var r=i(n(33)),o=i(n(6)),u=i(n(32));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=l(n(1)),i=l(n(0)),a=n(7);function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),u=0;u<n;u++)o[u]=arguments[u];var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return i.getGroupProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.role,n=void 0===t?"group":t,o=d(e,["role"]);return r({role:n},o)},i.getButtonProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.role,n=void 0===t?"button":t,o=e.key,u=e.tabIndex,i=void 0===u?-1:u,a=d(e,["role","key","tabIndex"]);if(void 0===o||null===o)throw new Error('"key" must be defined within getButtonProps regardless of being used within a .map()');return r({role:n,key:o,tabIndex:i},a)},i.state={focusedKey:void 0,selectedKey:void 0,id:a.IdManager.generateId()},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.ControlledComponent),o(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.render,o=void 0===r?n:r,i=this.getControlledState(),l=i.focusedKey,d=i.selectedKey,f=i.id;return u.default.createElement(a.SelectionContainer,{id:f,focusedKey:l,selectedKey:d,onStateChange:this.setControlledState},function(t){var n=t.getContainerProps,r=t.getItemProps;return o({getGroupProps:function(t){return n(e.getGroupProps(t))},getButtonProps:function(t){return r(e.getButtonProps(t))},focusedKey:l,selectedKey:d})})}}]),t}();f.propTypes={id:i.default.string,focusedKey:i.default.oneOfType([i.default.string,i.default.number]),selectedKey:i.default.oneOfType([i.default.string,i.default.number]),onStateChange:i.default.func,children:i.default.func,render:i.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=l(r),u=l(n(0)),i=l(n(4)),a=l(n(2));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(e){var t,n,u,l=e.children,d=e.rotated;return o.default.cloneElement(r.Children.only(l),{"data-garden-id":"buttons.icon","data-garden-version":"3.2.1",className:(0,i.default)(a.default["c-btn__icon"],(t={},n=a.default["is-rotated"],u=d,n in t?Object.defineProperty(t,n,{value:u,enumerable:!0,configurable:!0,writable:!0}):t[n]=u,t))})};d.propTypes={rotated:u.default.bool},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(0)),o=l(n(5)),u=l(n(2)),i=n(3),a=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}var d="small",f="large",c=(0,o.default)(a.default).attrs({"data-garden-id":"buttons.icon_button","data-garden-version":"3.2.1",className:u.default["c-btn--icon"]}).withConfig({displayName:"IconButton"})(["",";"],function(e){return(0,i.retrieveTheme)("buttons.icon_button",e)});c.propTypes={danger:r.default.bool,size:r.default.oneOf([d,f]),primary:r.default.bool,basic:r.default.bool,muted:r.default.bool,pill:r.default.bool,disabled:r.default.bool,focused:r.default.bool,hovered:r.default.bool,active:r.default.bool},c.defaultProps={pill:!0,muted:!0,basic:!0},t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=c(n(1)),u=c(n(0)),i=c(n(5)),a=c(n(4)),l=c(n(2)),d=n(7),f=n(3);function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=i.default.a.attrs({"data-garden-id":"buttons.anchor","data-garden-version":"3.2.1",className:function(e){var t,n=e.danger,r=e.disabled,o=e.focused,u=e.hovered,i=e.active,d=e.selected;return(0,a.default)(l.default["c-btn"],l.default["c-btn--anchor"],(s(t={},l.default["c-btn--danger"],n),s(t,l.default["is-active"],i),s(t,l.default["is-disabled"],r),s(t,l.default["is-focused"],o),s(t,l.default["is-hovered"],u),s(t,l.default["is-selected"],d),t))}}).withConfig({displayName:"Anchor__StyledAnchor"})(["",";"],function(e){return(0,f.retrieveTheme)("buttons.anchor",e)}),v=function(e){var t=e.focused,n=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["focused"]);return o.default.createElement(d.KeyboardFocusContainer,null,function(e){var u=e.getFocusProps,i=e.keyboardFocused;return o.default.createElement(p,u(r({},n,{focused:t||i})))})};v.propTypes={danger:u.default.bool,disabled:u.default.bool,focused:u.default.bool,hovered:u.default.bool,active:u.default.bool},t.default=v},,function(e,t,n){"use strict";
/*!

@@ -34,0 +34,0 @@ * Copyright Zendesk, Inc.

@@ -11,3 +11,3 @@ {

},
"version": "3.2.0",
"version": "3.2.1",
"main": "./dist/index.js",

@@ -23,4 +23,4 @@ "files": [

"dependencies": {
"@zendeskgarden/react-selection": "^4.1.0",
"@zendeskgarden/react-utilities": "^0.1.0",
"@zendeskgarden/react-selection": "^4.1.1",
"@zendeskgarden/react-utilities": "^0.1.1",
"classnames": "^2.2.5"

@@ -37,3 +37,3 @@ },

"@zendeskgarden/css-buttons": "^6.0.0",
"@zendeskgarden/react-theming": "^2.1.0"
"@zendeskgarden/react-theming": "^2.1.1"
},

@@ -40,0 +40,0 @@ "keywords": [

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