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

rax-checkbox

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-checkbox - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

dist/checkbox.min.js

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("rax-checkbox",function(t,n,o){o.exports=e()});else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,t.RaxCheckbox=e()}}(function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){e.exports=function(){var e;if(!e)try{e=require("rax")}catch(e){}return e}()},function(e,t,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)};t.isWeb="object"===("undefined"==typeof navigator?"undefined":r(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),t.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),t.isWeex="function"==typeof callNative,t.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig;t.default=e.exports,t.default=e.exports},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":u(t))&&"function"!=typeof t?e:t}function i(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":u(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)}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(0),f=n(1),s=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"render",value:function(){var e=this.props;if(f.isWeex)return(0,c.createElement)("div",e);var t=l({},p.initial,e.style);return(0,c.createElement)("div",l({},e,{style:t}))}}]),t}(c.Component);s.propTypes={};var p={initial:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"flex",flexDirection:"column",alignContent:"flex-start",flexShrink:0}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function u(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),c=n(4),f=o(c),s=n(5),p=(o(s),n(2)),y=o(p),b=n(6),d=o(b),h=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={internalChecked:!1},n.onChange=n.onChange.bind(n),n}return u(t,e),l(t,[{key:"onChange",value:function(){var e=this.props,t=e.checked,n=e.onChange;if(n&&"boolean"==typeof t)n(t);else{var o=this.state.internalChecked;n&&n(!o),this.setState({internalChecked:!o})}}},{key:"render",value:function(){var e=void 0,t=this.props,n=t.checked,o=t.checkedImage,r=t.uncheckedImage,i=t.containerStyle,u=t.checkboxStyle;return e="boolean"==typeof n?n?o:r:this.state.internalChecked?o:r,(0,a.createElement)(d.default,{onPress:this.onChange,style:v.flexContainer},(0,a.createElement)(y.default,{style:[v.container,i]},(0,a.createElement)(f.default,{style:[v.checkbox,u],source:{uri:e}})))}}]),t}(a.Component);h.defaultProps={checked:null,checkedImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURUxpcTMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzLRwScAAAAPdFJOUwDvEI8wz69QQL/fIHCAYDHs4yUAAACoSURBVCjPfdIBDoMgDAXQ31JE1K33v60UZSJ2NjEmvvgpUIAD6aMoMMBR3YqMoBpmDDXbV1B5nApKUB3/kU9ZR1QLDcKklACPJmvCpWSSPWLbJK0e1bgNDrW4J/3iLmLbSov7oqNyjtFsM5nQUzyOc61xfKPlOOpsr4QbSb0x6uKuNqTdZovrmm+W8KDTJjhUbeGB5LS8SDcChV4GwB0bqWPzMmz/R3QHJwAPwC8jHWQAAAAASUVORK5CYII=",uncheckedImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAYUExURUxpcTMzMzMzMzMzMzMzMzMzMzMzMzMzM2vW5DoAAAAHdFJOUwCPEO9AzzBOX/xUAAAASklEQVQoz+2SMRKAQAwCIcmF///YaKl4tYU7Q8O2CwRTD5IBxJJlBSixcKPOFzkzUAmpnGppFCy/+qpqZ2rUJgCbTV/ZbGJ7T/QAwyIE71akwQMAAAAASUVORK5CYII="};var v={container:{flexDirection:"row",alignItems:"center",marginBottom:10},checkbox:{width:40,height:40}};t.default=h,e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":u(t))&&"function"!=typeof t?e:t}function i(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":u(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)}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(0),f=n(1),s=n(2),p=function(e){return e&&e.__esModule?e:{default:e}}(s),y=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"render",value:function(){var e=l({},this.props),t=e.source;if(t&&t.uri){var n=e.style,o=t.width,r=t.height,i=t.uri;null==o&&null==r&&null==n.height&&null==n.width&&(o=0,r=0),e.style=l(l({},!this.context.isInAParentText&&{display:"flex"},{width:o,height:r}),n),e.src=i,delete e.source;var u=void 0;u=f.isWeex?"image":"img";var a=e.resizeMode||e.style.resizeMode;return a&&(f.isWeex?(e.resize=a,e.style.resizeMode=a):e.style.objectFit=a),this.props.children?(e.children=null,(0,c.createElement)(p.default,{style:e.style},(0,c.createElement)(u,e),(0,c.createElement)(p.default,{style:b.absoluteImage},this.props.children))):(0,c.createElement)(u,e)}return null}}]),t}(c.Component);y.propTypes={},y.resizeMode={contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"},y.contextTypes={isInAParentText:c.PropTypes.bool};var b={absoluteImage:{left:0,top:0,position:"absolute"}};t.default=y,e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function i(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":a(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)}function u(e,t){var n=e.type,o=e.props,r=o.children;if("function"==typeof n){var i=new n;return i.props=o,r&&(i.props.children=l(r,t)),i.context=t.getChildContext(),i.render()}return e}function l(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var o=0;o<e.length;o++){var r=e[o];"string"==typeof r?n.push(r):"object"===(void 0===r?"undefined":c(r))&&n.push(u(r,t))}return n}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":a(e)},f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),p=n(0),y=n(1),b=function(e){function t(){var e,n,i,u;o(this,t);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),i.renderText=function(){var e=i.props,t=f({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,p.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),y.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,p.createElement)("text",t);var o=f({},d.text,t.style),r=e.numberOfLines;return r&&(1===parseInt(r)?o.whiteSpace="nowrap":(o.display="-webkit-box",o.webkitBoxOrient="vertical",o.webkitLineClamp=String(r)),o.overflow="hidden"),(0,p.createElement)("span",f({},t,{style:o}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=f({},e,{style:e.style||{}}),o=f({},d.richtext,n.style);return y.isWeex&&(t=l(t,i)),(0,p.createElement)("p",f({},n,{style:o}),t)},u=n,r(i,u)}return i(t,e),s(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,o=0;o<t.length;o++){var r=t[o];if(r&&"object"===(void 0===r?"undefined":c(r))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(p.Component);b.propTypes={},b.contextTypes={isInAParentText:p.PropTypes.bool},b.childContextTypes={isInAParentText:p.PropTypes.bool};var d={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=b,e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":u(t))&&"function"!=typeof t?e:t}function i(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":u(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)}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(0),f=(n(1),n(2)),s=function(e){return e&&e.__esModule?e:{default:e}}(f),p=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=l({},e,{style:l({},y.initial,e.style),onClick:e.onPress});return delete t.onPress,(0,c.createElement)(s.default,t)}}]),t}(c.Component);p.propTypes={};var y={initial:{cursor:"pointer"}};t.default=p,e.exports=t.default}])});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("rax-checkbox",function(t,n,r){r.exports=e()});else{("undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this).RaxCheckbox=e()}}(function(){return 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.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=3)}([function(e,t){e.exports=function(){var e;if(!e)try{e=require("rax")}catch(e){}return e}()},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":r(e)};t.isWeb="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),t.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),t.isWeex="function"==typeof callNative,t.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig;t.default=e.exports,t.default=e.exports},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};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},i=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=n(0),a=n(1);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"!==(void 0===t?"undefined":r(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 "+(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),i(t,[{key:"render",value:function(){var e=this.props;if(a.isWeex)return(0,u.createElement)("div",e);var t=o({},c.initial,e.style);return(0,u.createElement)("div",o({},e,{style:t}))}}]),t}();l.propTypes={};var c={initial:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"flex",flexDirection:"column",alignContent:"flex-start",flexShrink:0}};t.default=l,e.exports=t.default},function(e,t,n){"use strict";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}}(),o=n(0),i=l(n(4)),u=(l(n(5)),l(n(2))),a=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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)).call(this,e));return n.state={internalChecked:!1},n.onChange=n.onChange.bind(n),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,o.Component),r(t,[{key:"onChange",value:function(){var e=this.props,t=e.checked,n=e.onChange;if(n&&"boolean"==typeof t)n(t);else{var r=this.state.internalChecked;n&&n(!r),this.setState({internalChecked:!r})}}},{key:"render",value:function(){var e=void 0,t=this.props,n=t.checked,r=t.checkedImage,l=t.uncheckedImage,c=t.containerStyle,s=t.checkboxStyle;return e="boolean"==typeof n?n?r:l:this.state.internalChecked?r:l,(0,o.createElement)(a.default,{onPress:this.onChange,style:f.flexContainer},(0,o.createElement)(u.default,{style:[f.container,c]},(0,o.createElement)(i.default,{style:[f.checkbox,s],source:{uri:e}})))}}]),t}();c.defaultProps={checked:null,checkedImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURUxpcTMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzLRwScAAAAPdFJOUwDvEI8wz69QQL/fIHCAYDHs4yUAAACoSURBVCjPfdIBDoMgDAXQ31JE1K33v60UZSJ2NjEmvvgpUIAD6aMoMMBR3YqMoBpmDDXbV1B5nApKUB3/kU9ZR1QLDcKklACPJmvCpWSSPWLbJK0e1bgNDrW4J/3iLmLbSov7oqNyjtFsM5nQUzyOc61xfKPlOOpsr4QbSb0x6uKuNqTdZovrmm+W8KDTJjhUbeGB5LS8SDcChV4GwB0bqWPzMmz/R3QHJwAPwC8jHWQAAAAASUVORK5CYII=",uncheckedImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAYUExURUxpcTMzMzMzMzMzMzMzMzMzMzMzMzMzM2vW5DoAAAAHdFJOUwCPEO9AzzBOX/xUAAAASklEQVQoz+2SMRKAQAwCIcmF///YaKl4tYU7Q8O2CwRTD5IBxJJlBSixcKPOFzkzUAmpnGppFCy/+qpqZ2rUJgCbTV/ZbGJ7T/QAwyIE71akwQMAAAAASUVORK5CYII="};var f={container:{flexDirection:"row",alignItems:"center",marginBottom:10},checkbox:{width:40,height:40}};t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o,i=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}}(),a=n(0),l=n(1),c=n(2),f=(o=c)&&o.__esModule?o:{default:o};var s=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"!==(void 0===t?"undefined":r(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 "+(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.Component),u(t,[{key:"render",value:function(){var e=i({},this.props),t=e.source;if(t&&t.uri){var n=e.style,r=t.width,o=t.height,u=t.uri;null==r&&null==o&&null==n.height&&null==n.width&&(r=0,o=0),e.style=i(i({},!this.context.isInAParentText&&{display:"flex"},{width:r,height:o}),n),e.src=u,delete e.source;var c=void 0;c=l.isWeex?"image":"img";var s=e.resizeMode||e.style.resizeMode;return s&&(l.isWeex?(e.resize=s,e.style.resizeMode=s):e.style.objectFit=s),this.props.children?(e.children=null,(0,a.createElement)(f.default,{style:e.style},(0,a.createElement)(c,e),(0,a.createElement)(f.default,{style:p.absoluteImage},this.props.children))):(0,a.createElement)(c,e)}return null}}]),t}();s.propTypes={},s.resizeMode={contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"},s.contextTypes={isInAParentText:a.PropTypes.bool};var p={absoluteImage:{left:0,top:0,position:"absolute"}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":r(e)},i=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}}(),a=n(0),l=n(1);function c(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 f=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),f=0;f<o;f++)u[f]=arguments[f];return n=r=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.renderText=function(){var e=r.props,t=i({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),r.context.isInAParentText)return(0,a.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),l.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,a.createElement)("text",t);var o=i({},y.text,t.style),u=e.numberOfLines;return u&&(1===parseInt(u)?o.whiteSpace="nowrap":(o.display="-webkit-box",o.webkitBoxOrient="vertical",o.webkitLineClamp=String(u)),o.overflow="hidden"),(0,a.createElement)("span",i({},t,{style:o}),n)},r.renderRichText=function(){var e=r.props,t=e.children,n=i({},e,{style:e.style||{}}),o=i({},y.richtext,n.style);return l.isWeex&&(t=p(t,r)),(0,a.createElement)("p",i({},n,{style:o}),t)},c(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,a.Component),u(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props.children;Array.isArray(e)||(e=[e]);for(var t=!1,n=0;n<e.length;n++){var r=e[n];if(r&&"object"===(void 0===r?"undefined":o(r))){t=!0;break}}return t?this.renderRichText():this.renderText()}}]),t}();function s(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=p(o,t)),i.context=t.getChildContext(),i.render()}return e}function p(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];"string"==typeof i?n.push(i):"object"===(void 0===i?"undefined":o(i))&&n.push(s(i,t))}return n}f.propTypes={},f.contextTypes={isInAParentText:a.PropTypes.bool},f.childContextTypes={isInAParentText:a.PropTypes.bool};var y={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o,i=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}}(),a=n(0),l=(n(1),n(2)),c=(o=l)&&o.__esModule?o:{default:o};var f=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"!==(void 0===t?"undefined":r(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 "+(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.Component),u(t,[{key:"render",value:function(){var e=this.props,t=i({},e,{style:i({},s.initial,e.style),onClick:e.onPress});return delete t.onPress,(0,a.createElement)(c.default,t)}}]),t}();f.propTypes={};var s={initial:{cursor:"pointer"}};t.default=f,e.exports=t.default}])});
{
"name": "rax-checkbox",
"version": "0.5.0",
"version": "0.5.1",
"description": "CheckBox component for Rax.",

@@ -24,6 +24,6 @@ "license": "BSD-3-Clause",

"dependencies": {
"rax-image": "^0.5.0",
"rax-text": "^0.5.0",
"rax-touchable": "^0.5.0",
"rax-view": "^0.5.0"
"rax-image": "^0.5.1",
"rax-text": "^0.5.1",
"rax-touchable": "^0.5.1",
"rax-view": "^0.5.1"
},

@@ -34,5 +34,5 @@ "peerDependencies": {

"devDependencies": {
"rax-test-renderer": "^0.5.0",
"rax-text": "^0.5.0"
"rax-test-renderer": "^0.5.1",
"rax-text": "^0.5.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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