Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

react-switchable

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-switchable - npm Package Compare versions

Comparing version
0.4.2
to
0.4.3
+1
-1
dist/index.js

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

module.exports=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,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=4)}([function(e,t){e.exports=require("react")},function(e,t,n){e.exports=n(6)()},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=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}n(10);t.default=function e(t){e.propTypes={goTo:a.default.number.isRequired,items:a.default.number.isRequired,classTransition:a.default.string,className:a.default.string},e.defaultProps={classTransition:"abg-switch__overlay-transition",className:""};var n=t.goTo,i=t.items,u=(t.classTransition,t.className),l=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}(t,["goTo","items","classTransition","className"]),c=[u,"abg-switch__overlay"].join(" ");return o.default.createElement("span",r({className:c,style:{width:100/i+"%",transform:"translateX("+100*n+"%)"}},l))}},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}}(),a=u(n(0)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}n(12);var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}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.default.Component),o(t,[{key:"render",value:function(){var e=this.props,t=(e.name,e.active),n=e.className,o=e.disable,i=e.value,u=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,["name","active","className","disable","value"]),l=["abg-switch__item",n,t?"abg-switch__item--on":"",o?"abg-switch__item--disable":""].join(" ");return a.default.createElement("span",r({className:l},u,{role:"radio",tabIndex:o?-1:0,"aria-checked":t,"aria-disabled":o}),this.props.children,a.default.createElement("input",{type:"radio",value:i,defaultChecked:t}))}}]),t}();l.propTypes={value:i.default.string.isRequired,children:i.default.node,disable:i.default.bool,active:i.default.bool,className:i.default.string,name:i.default.string.isRequired},l.defaultProps={children:"",active:!1,disable:!1,className:""},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i(r).default}});var o=n(2);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return i(o).default}});var a=n(3);function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"State",{enumerable:!0,get:function(){return i(a).default}}),Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return i(a).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.proxy=void 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}}(),a=n(0),i=s(a),u=s(n(1)),l=s(n(2)),c=s(n(3));function s(e){return e&&e.__esModule?e:{default:e}}function f(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}n(14);var d=t.proxy=function(e){return function(t){return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(void 0,r),t&&t.apply(t,r)}}},p=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,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={activeIndex:r.getDefaultActiveIndex()},f(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 "+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.Component),o(t,[{key:"onStateClicked",value:function(e){this.onSelection(e)}},{key:"onSwitchKeyDown",value:function(e){var t=e.key;"ArrowLeft"===t&&this.state.activeIndex>0?this.onSelection(this.state.activeIndex-1):"ArrowRight"===t&&this.state.activeIndex<this.props.children.length-1&&this.onSelection(this.state.activeIndex+1)}},{key:"onStateKeyDown",value:function(e,t){var n=t.key;"Enter"!==n&&" "!==n||this.onSelection(e)}},{key:"onSelection",value:function(e){this.props.disable||this.props.children[e].props.disable||(this.props.onSelection&&this.props.onSelection(e),this.props.onItemSelected&&this.props.onItemSelected(e),!1!==this.state.autoControlled&&this.setChecked(e))}},{key:"getDefaultActiveIndex",value:function(){var e=this.props.children.findIndex(function(e){return e.props.default});return e>-1?e:0}},{key:"setChecked",value:function(e){this.setState({activeIndex:e});var t=this.props,n=t.onValueChange,r=t.onItemChanged,o=void 0!==n?n:r;if(void 0!==o){var a=this.props.children[e],i=this.state.activeIndex;o(a.props.value,e,i,a)}}},{key:"injectChildCapabilities",value:function(e,t){return{onClick:d(this.onStateClicked.bind(this,t))(e.props.onClick),onKeyDown:d(this.onStateKeyDown.bind(this,t))(e.props.onKeyDown),tabIndex:this.props.disable?-1:e.props.tabIndex,active:this.state.activeIndex===t,name:this.props.name}}},{key:"render",value:function(){var e=this,t=this.props,n=t.disable,o=t.children,a=t.tabIndex,u=t.className,c=(t.name,t.onValueChange,t.onSelection,t.onItemSelected,t.onItemChanged,t.arrowSelection,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}(t,["disable","children","tabIndex","className","name","onValueChange","onSelection","onItemSelected","onItemChanged","arrowSelection"])),s=["abg-switch",u,n?"abg-switch--disable":""].join(" ");return i.default.createElement("div",r({},c,{className:s}),i.default.createElement("div",{onKeyDown:this.props.arrowSelection?function(t){return e.onSwitchKeyDown(t)}:void 0,className:"abg-switch__container",role:"radiogroup","aria-disabled":n,tabIndex:n?-1:a},i.default.Children.map(o,function(t,n){return i.default.cloneElement(t,e.injectChildCapabilities(t,n))}),i.default.createElement(l.default,{goTo:this.state.activeIndex,items:o.length})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.children.findIndex(function(e){return e.props.active});return n<0?r({},t,{autoControlled:!0}):n!==t.activeIndex?r({},t,{activeIndex:n,autoControlled:!1}):null}}]),t}();p.propTypes={children:function(e){var t=e.children;if(!1===Array.isArray(t))return new Error("Children must be an array of <Item />.");if(!1===function(e,t){var n=!0;return i.default.Children.forEach(e,function(){!1===t.apply(void 0,arguments)&&(n=!1)}),n}(t,function(e){return t=e,n=c.default,t.type===n;var t,n}))return new Error("All Children of <Switch /> must be of type <Item />");var n=t.some(function(e){return e.props.default}),r=t.some(function(e){return e.props.active});return n&&r?new Error("Switch component can't have State with default and active property at the same time."):r&&e.onValueChange||r&&e.onItemChanged?new Error("onValueChange() | onItemChanged() is only available to switch components whose children don't use the 'active' attribute."):""},onValueChange:u.default.func,onSelection:u.default.func,onItemChanged:u.default.func,onItemSelected:u.default.func,tabIndex:u.default.number,disable:u.default.bool,arrowSelection:u.default.bool,className:u.default.string,name:u.default.string.isRequired},p.defaultProps={onValueChange:void 0,onSelection:void 0,onItemChanged:void 0,onItemSelected:void 0,tabIndex:0,disable:!1,arrowSelection:!0,className:"",children:[]},t.default=p},function(e,t,n){"use strict";var r=n(7),o=n(8),a=n(9);e.exports=function(){function e(e,t,n,r,i,u){u!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,a,i,u,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,a,i,u,l],f=0;(c=new Error(t.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},,function(e,t,n){},,function(e,t,n){}]);
module.exports=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,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=4)}([function(e,t){e.exports=require("react")},function(e,t,n){e.exports=n(6)()},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=i(n(0)),a=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}n(10);t.default=function e(t){e.propTypes={goTo:a.default.number.isRequired,items:a.default.number.isRequired,classTransition:a.default.string,className:a.default.string},e.defaultProps={classTransition:"abg-switch__overlay-transition",className:""};var n=t.goTo,i=t.items,u=(t.classTransition,t.className),l=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}(t,["goTo","items","classTransition","className"]),c=[u,"abg-switch__overlay"].join(" ");return o.default.createElement("span",r({className:c,style:{width:100/i+"%",transform:"translateX("+100*n+"%)"}},l))}},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}}(),a=u(n(0)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}n(12);var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),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,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}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.default.Component),o(t,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.active,o=e.className,i=e.disable,u=e.value,l=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,["name","active","className","disable","value"]),c=["abg-switch__item",o,n?"abg-switch__item--on":"",i?"abg-switch__item--disable":""].join(" ");return a.default.createElement("span",r({className:c},l,{role:"radio",tabIndex:i?-1:0,"aria-checked":n,"aria-disabled":i}),this.props.children,a.default.createElement("input",{type:"radio",value:u,name:t,defaultChecked:n}))}}]),t}();l.propTypes={value:i.default.string.isRequired,children:i.default.node,disable:i.default.bool,active:i.default.bool,className:i.default.string,name:i.default.string.isRequired},l.defaultProps={children:"",active:!1,disable:!1,className:""},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i(r).default}});var o=n(2);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return i(o).default}});var a=n(3);function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"State",{enumerable:!0,get:function(){return i(a).default}}),Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return i(a).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.proxy=void 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}}(),a=n(0),i=s(a),u=s(n(1)),l=s(n(2)),c=s(n(3));function s(e){return e&&e.__esModule?e:{default:e}}function f(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}n(14);var d=t.proxy=function(e){return function(t){return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(void 0,r),t&&t.apply(t,r)}}},p=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,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={activeIndex:r.getDefaultActiveIndex()},f(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 "+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.Component),o(t,[{key:"onStateClicked",value:function(e){this.onSelection(e)}},{key:"onSwitchKeyDown",value:function(e){var t=e.key;"ArrowLeft"===t&&this.state.activeIndex>0?this.onSelection(this.state.activeIndex-1):"ArrowRight"===t&&this.state.activeIndex<this.props.children.length-1&&this.onSelection(this.state.activeIndex+1)}},{key:"onStateKeyDown",value:function(e,t){var n=t.key;"Enter"!==n&&" "!==n||this.onSelection(e)}},{key:"onSelection",value:function(e){this.props.disable||this.props.children[e].props.disable||(this.props.onSelection&&this.props.onSelection(e),this.props.onItemSelected&&this.props.onItemSelected(e),!1!==this.state.autoControlled&&this.setChecked(e))}},{key:"getDefaultActiveIndex",value:function(){var e=this.props.children.findIndex(function(e){return e.props.default});return e>-1?e:0}},{key:"setChecked",value:function(e){this.setState({activeIndex:e});var t=this.props,n=t.onValueChange,r=t.onItemChanged,o=void 0!==n?n:r;if(void 0!==o){var a=this.props.children[e],i=this.state.activeIndex;o(a.props.value,e,i,a)}}},{key:"injectChildCapabilities",value:function(e,t){return{onClick:d(this.onStateClicked.bind(this,t))(e.props.onClick),onKeyDown:d(this.onStateKeyDown.bind(this,t))(e.props.onKeyDown),tabIndex:this.props.disable?-1:e.props.tabIndex,active:this.state.activeIndex===t,name:this.props.name}}},{key:"render",value:function(){var e=this,t=this.props,n=t.disable,o=t.children,a=t.tabIndex,u=t.className,c=(t.name,t.onValueChange,t.onSelection,t.onItemSelected,t.onItemChanged,t.arrowSelection,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}(t,["disable","children","tabIndex","className","name","onValueChange","onSelection","onItemSelected","onItemChanged","arrowSelection"])),s=["abg-switch",u,n?"abg-switch--disable":""].join(" ");return i.default.createElement("div",r({},c,{className:s}),i.default.createElement("div",{onKeyDown:this.props.arrowSelection?function(t){return e.onSwitchKeyDown(t)}:void 0,className:"abg-switch__container",role:"radiogroup","aria-disabled":n,tabIndex:n?-1:a},i.default.Children.map(o,function(t,n){return i.default.cloneElement(t,e.injectChildCapabilities(t,n))}),i.default.createElement(l.default,{goTo:this.state.activeIndex,items:o.length})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.children.findIndex(function(e){return e.props.active});return n<0?r({},t,{autoControlled:!0}):n!==t.activeIndex?r({},t,{activeIndex:n,autoControlled:!1}):null}}]),t}();p.propTypes={children:function(e){var t=e.children;if(!1===Array.isArray(t))return new Error("Children must be an array of <Item />.");if(!1===function(e,t){var n=!0;return i.default.Children.forEach(e,function(){!1===t.apply(void 0,arguments)&&(n=!1)}),n}(t,function(e){return t=e,n=c.default,t.type===n;var t,n}))return new Error("All Children of <Switch /> must be of type <Item />");var n=t.some(function(e){return e.props.default}),r=t.some(function(e){return e.props.active});return n&&r?new Error("Switch component can't have State with default and active property at the same time."):r&&e.onValueChange||r&&e.onItemChanged?new Error("onValueChange() | onItemChanged() is only available to switch components whose children don't use the 'active' attribute."):""},onValueChange:u.default.func,onSelection:u.default.func,onItemChanged:u.default.func,onItemSelected:u.default.func,tabIndex:u.default.number,disable:u.default.bool,arrowSelection:u.default.bool,className:u.default.string,name:u.default.string.isRequired},p.defaultProps={onValueChange:void 0,onSelection:void 0,onItemChanged:void 0,onItemSelected:void 0,tabIndex:0,disable:!1,arrowSelection:!0,className:"",children:[]},t.default=p},function(e,t,n){"use strict";var r=n(7),o=n(8),a=n(9);e.exports=function(){function e(e,t,n,r,i,u){u!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,a,i,u,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,a,i,u,l],f=0;(c=new Error(t.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},,function(e,t,n){},,function(e,t,n){}]);
{
"name": "react-switchable",
"version": "0.4.2",
"version": "0.4.3",
"description": "A customizable react switch component",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -165,5 +165,5 @@ # [react](https://reactjs.org)-switchable

`name`| string | Yes | "" | Unique global identifier.
`children` | Array[Item] | Yes | [] | A list of Items.
`onItemChanged`| function | No | "" | Fires after the selection of an Item.
`onItemSelected`| function | No | "" | Fires when an Item is selected.
`children` | Array[Item] | Yes | [] | A list of Items.
`disable` | boolean | No | false | Disables the switch.

@@ -170,0 +170,0 @@ `arrowSelection` | boolean | No | true | Enables the selection of Items with arrow keys.