boundless-checkbox
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){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}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=4)}([function(e,n){e.exports=require("boundless-utils-omit-keys")},function(e,n){e.exports=require("boundless-utils-uuid")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function p(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var i=t(3),s=t.n(i),a=t(2),c=t.n(a),u=t(0),l=t.n(u),h=t(1),f=t.n(h),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},b=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),y=function(e){return"function"==typeof e},P=function(){},m=function(e){function n(){var e,t,p,i;r(this,n);for(var s=arguments.length,a=Array(s),c=0;c<s;c++)a[c]=arguments[c];return t=p=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(a))),p.id=f()(),p.handleChange=function(e){p.props.inputProps.disabled||(p.props[p.props.inputProps.checked?"onUnchecked":"onChecked"](p.props.inputProps.name),y(p.props.inputProps.onChange)&&p.props.inputProps.onChange(e))},p.handleClick=function(e){p.props.inputProps.disabled||(p.refs.input.focus(),y(p.props.inputProps.onClick)&&p.props.inputProps.onClick(e))},i=t,o(p,i)}return p(n,e),b(n,[{key:"componentDidMount",value:function(){this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"componentDidUpdate",value:function(e){e.inputProps.indeterminate!==this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"setIndeterminate",value:function(){this.refs.input.indeterminate=!!this.props.inputProps.indeterminate}},{key:"getAriaState",value:function(){return this.props.inputProps.indeterminate?"mixed":String(this.props.inputProps.checked)}},{key:"renderInput",value:function(){return s.a.createElement("input",d({},l()(this.props.inputProps,"indeterminate"),{ref:"input",type:"checkbox",className:c()("b-checkbox",this.props.inputProps.className,{"b-checkbox-mixed":this.props.inputProps.indeterminate,"b-checkbox-checked":this.props.inputProps.checked,"b-checkbox-unchecked":!this.props.inputProps.indeterminate&&!this.props.inputProps.checked}),id:this.props.inputProps.id||this.id,"aria-checked":this.getAriaState(),onChange:this.handleChange,onClick:this.handleClick}))}},{key:"renderLabel",value:function(){if(this.props.label)return s.a.createElement("label",d({},this.props.labelProps,{ref:"label",className:c()("b-checkbox-label",this.props.labelProps.className),htmlFor:this.props.inputProps.id||this.id}),this.props.label)}},{key:"render",value:function(){return s.a.createElement(this.props.component,d({},l()(this.props,n.internalKeys),{ref:"wrapper",className:c()("b-checkbox-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),n}(s.a.PureComponent);m.propTypes={"*":i.PropTypes.any,component:i.PropTypes.string,inputProps:i.PropTypes.shape({"*":i.PropTypes.any,checked:i.PropTypes.bool,className:i.PropTypes.string,disabled:i.PropTypes.bool,id:i.PropTypes.string,indeterminate:i.PropTypes.bool,onChange:i.PropTypes.func,onClick:i.PropTypes.func,name:i.PropTypes.string,value:i.PropTypes.string}),label:i.PropTypes.node,labelProps:i.PropTypes.shape({"*":i.PropTypes.any}),onChecked:i.PropTypes.func,onUnchecked:i.PropTypes.func},m.defaultProps={component:"div",inputProps:{checked:!1,indeterminate:!1},label:null,labelProps:{},onChecked:P,onUnchecked:P},m.internalKeys=Object.keys(m.defaultProps),n.default=m}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDY5MDRlNWZkZDQxNTY1ZTVmZmYzIiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLXV0aWxzLXV1aWRcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtY2hlY2tib3gvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZm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zLmFueSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogYW55IHZhbGlkIEhUTUwgdGFnIG5hbWVcbiAgICAgICAgICovXG4gICAgICAgIGNvbXBvbmVudDogUHJvcFR5cGVzLnN0cmluZyxcblxuICAgICAgICAvKipcbiAgICAgICAgICogYWxsIGlucHV0LXNwZWNpZmljIHByb3BzIGxpa2UgYHZhbHVlYCwgYG5hbWVgLCBldGMgc2hvdWxkIGJlIHBhc3NlZCBoZXJlIC0tIGNvbW1vbiBvbmVzIGFyZSBsaXN0ZWQgYmVsb3dcbiAgICAgICAgICovXG4gICAgICAgIGlucHV0UHJvcHM6IFByb3BUeXBlcy5zaGFwZSh7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIGFueSBbUmVhY3Qtc3VwcG9ydGVkIGF0dHJpYnV0ZV0oaHR0cHM6Ly9mYWNlYm9vay5naXRodWIuaW8vcmVhY3QvZG9jcy90YWdzLWFuZC1hdHRyaWJ1dGVzLmh0bWwjaHRtbC1hdHRyaWJ1dGVzKVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICAnKic6IFByb3BUeXBlcy5hbnksXG5cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogZGV0ZXJtaW5lcyBpZiB0aGUgY2hlY2tib3ggaXMgcmVuZGVyZWQgYXMgY2hlY2tlZC91bmNoZWNrZWQsIHNlZSBSZWFjdCBbXCJjb250cm9sbGVkIGlucHV0c1wiXShodHRwczovL2ZhY2Vib29rLmdpdGh1Yi5pby9yZWFjdC9kb2NzL2Zvcm1zLmh0bWwjY29udHJvbGxlZC1jb21wb25lbnRzKSlcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgY2hlY2tlZDogUHJvcFR5cGVzLmJvb2wsXG5cbiAgICAgICAgICAgIGNsYXNzTmFtZTogUHJvcFR5cGVzLnN0cmluZyxcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBwcmV2ZW50cyB0aGUgYG9ue0NoZWNr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LmlkfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMubGFiZWx9XG4gICAgICAgICAgICAgICAgPC9sYWJlbD5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBDaGVja2JveC5pbnRlcm5hbEtleXMpfVxuICAgICAgICAgICAgICAgIHJlZj0nd3JhcHBlcidcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWNoZWNrYm94LXdyYXBwZXInLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlcklucHV0KCl9XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyTGFiZWwoKX1cbiAgICAgICAgICAgIDwvdGhpcy5wcm9wcy5jb21wb25lbnQ+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWNoZWNrYm94L2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){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}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=4)}([function(e,n){e.exports=require("boundless-utils-omit-keys")},function(e,n){e.exports=require("boundless-utils-uuid")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function p(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var i=t(3),s=(t.n(i),t(2)),c=t.n(s),u=t(0),a=t.n(u),l=t(1),h=t.n(l),f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),b=function(e){return"function"==typeof e},y=function(){},P=function(e){function n(){var e,t,p,i;r(this,n);for(var s=arguments.length,c=Array(s),u=0;u<s;u++)c[u]=arguments[u];return t=p=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(c))),p.id=h()(),p.handleChange=function(e){p.props.inputProps.disabled||(p.props[p.props.inputProps.checked?"onUnchecked":"onChecked"](p.props.inputProps.name),b(p.props.inputProps.onChange)&&p.props.inputProps.onChange(e))},p.handleClick=function(e){p.props.inputProps.disabled||(p.refs.input.focus(),b(p.props.inputProps.onClick)&&p.props.inputProps.onClick(e))},i=t,o(p,i)}return p(n,e),d(n,[{key:"componentDidMount",value:function(){this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"componentDidUpdate",value:function(e){e.inputProps.indeterminate!==this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"setIndeterminate",value:function(){this.refs.input.indeterminate=!!this.props.inputProps.indeterminate}},{key:"getAriaState",value:function(){return this.props.inputProps.indeterminate?"mixed":String(this.props.inputProps.checked)}},{key:"renderInput",value:function(){return t.i(i.createElement)("input",f({},a()(this.props.inputProps,"indeterminate"),{ref:"input",type:"checkbox",className:c()("b-checkbox",this.props.inputProps.className,{"b-checkbox-mixed":this.props.inputProps.indeterminate,"b-checkbox-checked":this.props.inputProps.checked,"b-checkbox-unchecked":!this.props.inputProps.indeterminate&&!this.props.inputProps.checked}),id:this.props.inputProps.id||this.id,"aria-checked":this.getAriaState(),onChange:this.handleChange,onClick:this.handleClick}))}},{key:"renderLabel",value:function(){if(this.props.label)return t.i(i.createElement)("label",f({},this.props.labelProps,{ref:"label",className:c()("b-checkbox-label",this.props.labelProps.className),htmlFor:this.props.inputProps.id||this.id}),this.props.label)}},{key:"render",value:function(){return t.i(i.createElement)(this.props.component,f({},a()(this.props,n.internalKeys),{ref:"wrapper",className:c()("b-checkbox-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),n}(i.PureComponent);P.propTypes={"*":i.PropTypes.any,component:i.PropTypes.string,inputProps:i.PropTypes.shape({"*":i.PropTypes.any,checked:i.PropTypes.bool,className:i.PropTypes.string,disabled:i.PropTypes.bool,id:i.PropTypes.string,indeterminate:i.PropTypes.bool,onChange:i.PropTypes.func,onClick:i.PropTypes.func,name:i.PropTypes.string,value:i.PropTypes.string}),label:i.PropTypes.node,labelProps:i.PropTypes.shape({"*":i.PropTypes.any}),onChecked:i.PropTypes.func,onUnchecked:i.PropTypes.func},P.defaultProps={component:"div",inputProps:{checked:!1,indeterminate:!1},label:null,labelProps:{},onChecked:y,onUnchecked:y},P.internalKeys=Object.keys(P.defaultProps),n.default=P}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2sv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YXR0cmlidXRlcylcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgJyonOiBQcm9wVHlwZXMuYW55LFxuXG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIGRldGVybWluZXMgaWYgdGhlIGNoZWNrYm94IGlzIHJlbmRlcmVkIGFzIGNoZWNrZWQvdW5jaGVja2VkLCBzZWUgUmVhY3QgW1wiY29udHJvbGxlZCBpbnB1dHNcIl0oaHR0cHM6Ly9mYWNlYm9vay5naXRodWIuaW8vcmVhY3QvZG9jcy9mb3Jtcy5odG1sI2NvbnRyb2xsZWQtY29tcG9uZW50cykpXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGNoZWNrZWQ6IFByb3BUeXBlcy5ib29sLFxuXG4gICAgICAgICAgICBjbGFzc05hbWU6IFByb3BUeXBlcy5zdHJpbmcsXG5cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogcHJldmVudHMgdGhlIGBvbntDaGVja2VkLFVuY2hlY2tlZH1gIGV2ZW50cyBmcm9tIGZpcmluZyB3aGVuIGB0cnVlYFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBkaXNhYmxlZDogUHJvcFR5cGVzLmJvb2wsXG4gICAgICAgICAgICBpZDogUHJvcFR5cGVzLnN0cmluZyxcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBlbmFibGVzIG9yIGRpc2FibGVzIFwibWl4ZWRcIiBjaGVja2JveCBzdGF0ZSwgcmVhZCB0aGlzIFtDU1MtVHJpY2tzIGFydGljbGVdKGh0dHBzOi8vY3NzLXRyaWNrcy5jb20vaW5kZXRlcm1pbmF0ZS1jaGVja2JveGVzLykgIGZvciBtb3JlIGluZm9ybWF0aW9uIGFuZCBleGFtcGxlc1xuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBpbmRldGVybWluYXRlOiBQcm9wVHlwZXMuYm9vbCxcblxuICAgICAgICAgICAgb25DaGFuZ2U6IFByb3BUeXBlcy5mdW5jLFxuICAgICAgICAgICAgb25DbGljazogUHJvcFR5cGVzLmZ1bmMsXG5cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogcmVuZGVyZWQgYXMgdGhlIGlucHV0IGNvbnRyb2wncyBmb3JtIG5hbWVcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiAgcGFzc2VkLXRocm91Z2ggdG8gdGhlIGlucHV0IG5vZGUsIGxpa2UgYG5hbWVgXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhbHVlOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgICB9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogYW55IFJlYWN0LXJlbmRlcmFibGUgY29udGVudCwgbW9zdCBjb21tb25seSBhIHNpbXBsZSBzdHJpbmdcbiAgICAgICAgICovXG4gICAgICAgIGxhYmVsOiBQcm9wVHlwZXMubm9kZSxcblxuICAgICAgICBsYWJlbFByb3BzOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBhbnkgW1JlYWN0LXN1cHBvcnRlZCBhdHRyaWJ1dGVdKGh0dHBzOi8vZmFjZWJvb2suZ2l0aHViLmlvL3JlYWN0L2RvY3MvdGFncy1hbmQtYXR0cmlidXRlcy5odG1sI2h0bWwtYXR0cmlidXRlcylcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgJyonOiBQcm9wVHlwZXMuYW55LFxuICAgICAgICB9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogY2FsbGVkIHdoZW4gdGhlIGVsZW1lbnQgYmVjb21lcyBjaGVja2VkOyBiYWNraW5nIGRhdGEgbXVzdCBiZSB1cGRhdGVkIHRvIHBlcnNpc3QgdGhlIHN0YXRlIGNoYW5nZVxuICAgICAgICAgKi9cbiAgICAgICAgb25DaGVja2VkOiBQ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1xuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5pbnB1dFByb3BzLmluZGV0ZXJtaW5hdGUgPyAnbWl4ZWQnIDogU3RyaW5nKHRoaXMucHJvcHMuaW5wdXRQcm9wcy5jaGVja2VkKTtcbiAgICB9XG5cbiAgICByZW5kZXJJbnB1dCgpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMuaW5wdXRQcm9wcywgJ2luZGV0ZXJtaW5hdGUnKX1cbiAgICAgICAgICAgICAgICByZWY9J2lucHV0J1xuICAgICAgICAgICAgICAgIHR5cGU9J2NoZWNrYm94J1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItY2hlY2tib3gnLCB0aGlzLnByb3BzLmlucHV0UHJvcHMuY2xhc3NOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICdiLWNoZWNrYm94LW1peGVkJzogdGhpcy5wcm9wcy5pbnB1dFByb3BzLmluZGV0ZXJtaW5hdGUsXG4gICAgICAgICAgICAgICAgICAgICdiLWNoZWNrYm94LWNoZWNrZWQnOiB0aGlzLnByb3BzLmlucHV0UHJvcHMuY2hlY2tlZCxcbiAgICAgICAgICAgICAgICAgICAgJ2ItY2hlY2tib3gtdW5jaGVja2VkJzogIXRoaXMucHJvcHMuaW5wdXRQcm9wcy5pbmRldGVybWluYXRlICYmICF0aGlzLnByb3BzLmlucHV0UHJvcHMuY2hlY2tlZCxcbiAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICBpZD17dGhpcy5wcm9wcy5pbnB1dFByb3BzLmlkIHx8IHRoaXMuaWR9XG4gICAgICAgICAgICAgICAgYXJpYS1jaGVja2VkPXt0aGlzLmdldEFyaWFTdGF0ZSgpfVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXt0aGlzLmhhbmRsZUNoYW5nZX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXt0aGlzLmhhbmRsZUNsaWNrfSAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckxhYmVsKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5sYWJlbCkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8bGFiZWxcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMubGFiZWxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdsYWJlbCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1jaGVja2JveC1sYWJlbCcsIHRoaXMucHJvcHMubGFiZWxQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBodG1sRm9yPXt0aGlzLnByb3BzLmlucHV0UHJvcHMuaWQgfHwgdGhpcy5pZH0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmxhYmVsfVxuICAgICAgICAgICAgICAgIDwvbGFiZWw+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgQ2hlY2tib3guaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1jaGVja2JveC13cmFwcGVyJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJJbnB1dCgpfVxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckxhYmVsKCl9XG4gICAgICAgICAgICA8L3RoaXMucHJvcHMuY29tcG9uZW50PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1jaGVja2JveC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= |
@@ -1,5 +0,5 @@ | ||
import React from 'react'; | ||
import Checkbox from '../index'; | ||
import {createElement, PureComponent} from 'react'; | ||
import Checkbox from '../'; | ||
export default class CheckboxDemo extends React.PureComponent { | ||
export default class CheckboxDemo extends PureComponent { | ||
state = { | ||
@@ -6,0 +6,0 @@ checkboxes: [{ |
@@ -1,2 +0,2 @@ | ||
import React, {PropTypes} from 'react'; | ||
import {createElement, PropTypes, PureComponent} from 'react'; | ||
import cx from 'classnames'; | ||
@@ -11,4 +11,2 @@ | ||
/** | ||
__An accessible checkbox with indeterminate support.__ | ||
Checkbox is implemented as a "controlled input", meaning it is a direct representation of the model data passed | ||
@@ -18,3 +16,3 @@ inside. User interaction will bubble changes in the form of `onChecked` and `onUnchecked` that a controller | ||
*/ | ||
export default class Checkbox extends React.PureComponent { | ||
export default class Checkbox extends PureComponent { | ||
static propTypes = { | ||
@@ -21,0 +19,0 @@ /** |
/* eslint no-unused-expressions:0 */ | ||
import React from 'react'; | ||
import {createElement} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
@@ -5,0 +5,0 @@ import sinon from 'sinon'; |
{ | ||
"name": "boundless-checkbox", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "An accessible checkbox with indeterminate support.", | ||
@@ -17,3 +17,3 @@ "main": "build/index.js", | ||
"contributors": [ | ||
"Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com)", | ||
"Evan Scott <probablyup@gmail.com> (http://yaycmyk.com)", | ||
"Abe Rubenstein <abe.rubenstein@enigma.io>", | ||
@@ -26,7 +26,7 @@ "Jenn Creighton <jenn.creighton@enigma.io>" | ||
}, | ||
"homepage": "http://boundless.js.org/Checkbox", | ||
"homepage": "https://boundless.js.org/Checkbox", | ||
"dependencies": { | ||
"classnames": "^2.1.5", | ||
"boundless-utils-omit-keys": "^1.0.3", | ||
"boundless-utils-uuid": "^1.0.3" | ||
"boundless-utils-omit-keys": "^1.0.4", | ||
"boundless-utils-uuid": "^1.0.4" | ||
}, | ||
@@ -33,0 +33,0 @@ "peerDependencies": { |
@@ -6,4 +6,2 @@ <!--- | ||
__An accessible checkbox with indeterminate support.__ | ||
Checkbox is implemented as a "controlled input", meaning it is a direct representation of the model data passed | ||
@@ -23,6 +21,8 @@ inside. User interaction will bubble changes in the form of `onChecked` and `onUnchecked` that a controller | ||
```jsx | ||
import React from 'react'; | ||
/** @jsx createElement */ | ||
import {createElement, PureComponent} from 'react'; | ||
import Checkbox from 'boundless-checkbox'; | ||
export default class CheckboxDemo extends React.PureComponent { | ||
export default class CheckboxDemo extends PureComponent { | ||
state = { | ||
@@ -88,3 +88,3 @@ checkboxes: [{ | ||
> Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Checkbox). | ||
> Note: only top-level props are in the README, for the full list check out the [website](https://boundless.js.org/Checkbox). | ||
@@ -98,27 +98,24 @@ ### Required Props | ||
- __`*`__ ・ any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
- __`*`__ · any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes) | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`any` | `n/a` | ||
- __`component`__ ・ any valid HTML tag name | ||
- __`component`__ · any valid HTML tag name | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`string` | `'div'` | ||
- __`inputProps`__ ・ all input-specific props like `value`, `name`, etc should be passed here -- common ones are listed below | ||
- __`inputProps`__ · all input-specific props like `value`, `name`, etc should be passed here -- common ones are listed below | ||
Expects | Default Value | ||
- | - | ||
`object` | `{ | ||
checked: false, | ||
indeterminate: false, | ||
}` | ||
--- | --- | ||
`object` | `{ checked: false, indeterminate: false }` | ||
- __`label`__ ・ any React-renderable content, most commonly a simple string | ||
- __`label`__ · any React-renderable content, most commonly a simple string | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`any renderable` | `null` | ||
@@ -129,15 +126,15 @@ | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`object` | `{}` | ||
- __`onChecked`__ ・ called when the element becomes checked; backing data must be updated to persist the state change | ||
- __`onChecked`__ · called when the element becomes checked; backing data must be updated to persist the state change | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`function` | `() => {}` | ||
- __`onUnchecked`__ ・ called when the element becomes unchecked; backing data must be updated to persist the state change | ||
- __`onUnchecked`__ · called when the element becomes unchecked; backing data must be updated to persist the state change | ||
Expects | Default Value | ||
- | - | ||
--- | --- | ||
`function` | `() => {}` | ||
@@ -148,7 +145,6 @@ | ||
### Stylus | ||
You can see what variables are available to override in [variables.styl](https://github.com/enigma-io/boundless/blob/master/variables.styl). | ||
```stylus | ||
// Bring in Boundless's base Stylus variables | ||
@require "node_modules/boundless-checkbox/variables" | ||
// Redefine any variables as desired, e.g. | ||
// Redefine any variables as desired, e.g: | ||
color-accent = royalblue | ||
@@ -155,0 +151,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
73525
439
153
1