rax-checkbox
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -134,2 +134,4 @@ module.exports = function(require, exports, module) { | ||
var _class, _temp; | ||
var _rax = __webpack_require__(0); | ||
@@ -157,3 +159,3 @@ | ||
var View = function (_Component) { | ||
var View = (_temp = _class = function (_Component) { | ||
_inherits(View, _Component); | ||
@@ -182,3 +184,3 @@ | ||
return View; | ||
}(_rax.Component); | ||
}(_rax.Component), _class.propTypes = {}, _temp); | ||
@@ -294,7 +296,6 @@ var styles = { | ||
nativeProps.style = _extends({ | ||
display: 'flex', | ||
nativeProps.style = _extends(_extends({}, !this.context.isInAParentText && { display: 'flex' }, { | ||
width: width, | ||
height: height | ||
}, style); | ||
}), style); | ||
nativeProps.src = uri; | ||
@@ -334,3 +335,3 @@ | ||
return Image; | ||
}(_rax.Component), _class.resizeMode = { | ||
}(_rax.Component), _class.propTypes = {}, _class.resizeMode = { | ||
contain: 'contain', | ||
@@ -341,2 +342,4 @@ cover: 'cover', | ||
repeat: 'repeat' | ||
}, _class.contextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _temp); | ||
@@ -362,3 +365,3 @@ | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -369,2 +372,8 @@ Object.defineProperty(exports, "__esModule", { | ||
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { | ||
return typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
} : function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
}; | ||
var _extends = Object.assign || function (target) { | ||
@@ -390,3 +399,3 @@ for (var i = 1; i < arguments.length; i++) { | ||
var _class, _temp; | ||
var _class, _temp2; | ||
@@ -406,3 +415,3 @@ var _rax = __webpack_require__(0); | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
}return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; | ||
}return call && ((typeof call === "undefined" ? "undefined" : _typeof2(call)) === "object" || typeof call === "function") ? call : self; | ||
} | ||
@@ -412,26 +421,22 @@ | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof2(superClass))); | ||
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | ||
} | ||
var Text = (_temp = _class = function (_Component) { | ||
var Text = (_temp2 = _class = function (_Component) { | ||
_inherits(Text, _Component); | ||
function Text() { | ||
var _ref; | ||
var _temp, _this, _ret; | ||
_classCallCheck(this, Text); | ||
return _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).apply(this, arguments)); | ||
} | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_createClass(Text, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { | ||
isInAParentText: true | ||
}; | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var props = this.props; | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Text.__proto__ || Object.getPrototypeOf(Text)).call.apply(_ref, [this].concat(args))), _this), _this.renderText = function () { | ||
var props = _this.props; | ||
var nativeProps = _extends({}, props, { | ||
@@ -450,2 +455,6 @@ style: props.style || {} | ||
if (_this.context.isInAParentText) { | ||
return (0, _rax.createElement)('span', nativeProps, textString); | ||
} | ||
if (props.onPress) { | ||
@@ -464,3 +473,3 @@ nativeProps.onClick = props.onPress; | ||
} else { | ||
var styleProps = _extends({}, styles.initial, nativeProps.style); | ||
var styleProps = _extends({}, styles.text, nativeProps.style); | ||
var numberOfLines = props.numberOfLines; | ||
@@ -481,14 +490,95 @@ if (numberOfLines) { | ||
} | ||
}, _this.renderRichText = function () { | ||
var props = _this.props; | ||
var children = props.children; | ||
var nativeProps = _extends({}, props, { | ||
style: props.style || {} | ||
}); | ||
var styleProps = _extends({}, styles.richtext, nativeProps.style); | ||
if (_universalEnv.isWeex) { | ||
children = transformChildren(children, _this); | ||
} | ||
return (0, _rax.createElement)('p', _extends({}, nativeProps, { style: styleProps }), children); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
_createClass(Text, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { | ||
isInAParentText: true | ||
}; | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var props = this.props; | ||
var children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
var nested = false; | ||
for (var i = 0; i < children.length; i++) { | ||
var child = children[i]; | ||
if (child && (typeof child === 'undefined' ? 'undefined' : _typeof(child)) === 'object') { | ||
nested = true; | ||
break; | ||
} | ||
} | ||
return nested ? this.renderRichText() : this.renderText(); | ||
} | ||
}]); | ||
return Text; | ||
}(_rax.Component), _class.contextTypes = { | ||
}(_rax.Component), _class.propTypes = {}, _class.contextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _class.childContextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _temp); | ||
}, _temp2); | ||
function transformChild(child, instance) { | ||
var Com = child.type, | ||
props = child.props; | ||
var children = props.children; | ||
if (typeof type === 'function') { | ||
var childInstance = new Com(); | ||
childInstance.props = props; | ||
if (children) { | ||
childInstance.props.children = transformChildren(children, instance); | ||
} | ||
childInstance.context = instance.getChildContext(); | ||
return childInstance.render(); | ||
} else { | ||
return child; | ||
} | ||
} | ||
function transformChildren(children, instance) { | ||
var elements = []; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
for (var i = 0; i < children.length; i++) { | ||
var child = children[i]; | ||
if (typeof child === 'string') { | ||
elements.push(child); | ||
} else if ((typeof child === 'undefined' ? 'undefined' : _typeof(child)) === 'object') { | ||
elements.push(transformChild(child, instance)); | ||
} | ||
} | ||
return elements; | ||
} | ||
var styles = { | ||
initial: { | ||
text: { | ||
border: '0 solid black', | ||
@@ -502,2 +592,6 @@ position: 'relative', | ||
fontSize: 32 | ||
}, | ||
richtext: { | ||
marginTop: 0, | ||
marginBottom: 0 | ||
} | ||
@@ -542,2 +636,4 @@ }; | ||
var _class, _temp; | ||
var _rax = __webpack_require__(0); | ||
@@ -573,3 +669,3 @@ | ||
var Touchable = function (_Component) { | ||
var Touchable = (_temp = _class = function (_Component) { | ||
_inherits(Touchable, _Component); | ||
@@ -599,3 +695,3 @@ | ||
return Touchable; | ||
}(_rax.Component); | ||
}(_rax.Component), _class.propTypes = {}, _temp); | ||
@@ -602,0 +698,0 @@ var styles = { |
@@ -156,2 +156,4 @@ | ||
var _class, _temp; | ||
var _rax = __webpack_require__(0); | ||
@@ -179,3 +181,3 @@ | ||
var View = function (_Component) { | ||
var View = (_temp = _class = function (_Component) { | ||
_inherits(View, _Component); | ||
@@ -204,3 +206,3 @@ | ||
return View; | ||
}(_rax.Component); | ||
}(_rax.Component), _class.propTypes = {}, _temp); | ||
@@ -316,7 +318,6 @@ var styles = { | ||
nativeProps.style = _extends({ | ||
display: 'flex', | ||
nativeProps.style = _extends(_extends({}, !this.context.isInAParentText && { display: 'flex' }, { | ||
width: width, | ||
height: height | ||
}, style); | ||
}), style); | ||
nativeProps.src = uri; | ||
@@ -356,3 +357,3 @@ | ||
return Image; | ||
}(_rax.Component), _class.resizeMode = { | ||
}(_rax.Component), _class.propTypes = {}, _class.resizeMode = { | ||
contain: 'contain', | ||
@@ -363,2 +364,4 @@ cover: 'cover', | ||
repeat: 'repeat' | ||
}, _class.contextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _temp); | ||
@@ -384,3 +387,3 @@ | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -391,2 +394,8 @@ Object.defineProperty(exports, "__esModule", { | ||
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { | ||
return typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
} : function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
}; | ||
var _extends = Object.assign || function (target) { | ||
@@ -412,3 +421,3 @@ for (var i = 1; i < arguments.length; i++) { | ||
var _class, _temp; | ||
var _class, _temp2; | ||
@@ -428,3 +437,3 @@ var _rax = __webpack_require__(0); | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
}return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; | ||
}return call && ((typeof call === "undefined" ? "undefined" : _typeof2(call)) === "object" || typeof call === "function") ? call : self; | ||
} | ||
@@ -434,26 +443,22 @@ | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof2(superClass))); | ||
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | ||
} | ||
var Text = (_temp = _class = function (_Component) { | ||
var Text = (_temp2 = _class = function (_Component) { | ||
_inherits(Text, _Component); | ||
function Text() { | ||
var _ref; | ||
var _temp, _this, _ret; | ||
_classCallCheck(this, Text); | ||
return _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).apply(this, arguments)); | ||
} | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_createClass(Text, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { | ||
isInAParentText: true | ||
}; | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var props = this.props; | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Text.__proto__ || Object.getPrototypeOf(Text)).call.apply(_ref, [this].concat(args))), _this), _this.renderText = function () { | ||
var props = _this.props; | ||
var nativeProps = _extends({}, props, { | ||
@@ -472,2 +477,6 @@ style: props.style || {} | ||
if (_this.context.isInAParentText) { | ||
return (0, _rax.createElement)('span', nativeProps, textString); | ||
} | ||
if (props.onPress) { | ||
@@ -486,3 +495,3 @@ nativeProps.onClick = props.onPress; | ||
} else { | ||
var styleProps = _extends({}, styles.initial, nativeProps.style); | ||
var styleProps = _extends({}, styles.text, nativeProps.style); | ||
var numberOfLines = props.numberOfLines; | ||
@@ -503,14 +512,95 @@ if (numberOfLines) { | ||
} | ||
}, _this.renderRichText = function () { | ||
var props = _this.props; | ||
var children = props.children; | ||
var nativeProps = _extends({}, props, { | ||
style: props.style || {} | ||
}); | ||
var styleProps = _extends({}, styles.richtext, nativeProps.style); | ||
if (_universalEnv.isWeex) { | ||
children = transformChildren(children, _this); | ||
} | ||
return (0, _rax.createElement)('p', _extends({}, nativeProps, { style: styleProps }), children); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
_createClass(Text, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { | ||
isInAParentText: true | ||
}; | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var props = this.props; | ||
var children = props.children; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
var nested = false; | ||
for (var i = 0; i < children.length; i++) { | ||
var child = children[i]; | ||
if (child && (typeof child === 'undefined' ? 'undefined' : _typeof(child)) === 'object') { | ||
nested = true; | ||
break; | ||
} | ||
} | ||
return nested ? this.renderRichText() : this.renderText(); | ||
} | ||
}]); | ||
return Text; | ||
}(_rax.Component), _class.contextTypes = { | ||
}(_rax.Component), _class.propTypes = {}, _class.contextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _class.childContextTypes = { | ||
isInAParentText: _rax.PropTypes.bool | ||
}, _temp); | ||
}, _temp2); | ||
function transformChild(child, instance) { | ||
var Com = child.type, | ||
props = child.props; | ||
var children = props.children; | ||
if (typeof type === 'function') { | ||
var childInstance = new Com(); | ||
childInstance.props = props; | ||
if (children) { | ||
childInstance.props.children = transformChildren(children, instance); | ||
} | ||
childInstance.context = instance.getChildContext(); | ||
return childInstance.render(); | ||
} else { | ||
return child; | ||
} | ||
} | ||
function transformChildren(children, instance) { | ||
var elements = []; | ||
if (!Array.isArray(children)) { | ||
children = [children]; | ||
} | ||
for (var i = 0; i < children.length; i++) { | ||
var child = children[i]; | ||
if (typeof child === 'string') { | ||
elements.push(child); | ||
} else if ((typeof child === 'undefined' ? 'undefined' : _typeof(child)) === 'object') { | ||
elements.push(transformChild(child, instance)); | ||
} | ||
} | ||
return elements; | ||
} | ||
var styles = { | ||
initial: { | ||
text: { | ||
border: '0 solid black', | ||
@@ -524,2 +614,6 @@ position: 'relative', | ||
fontSize: 32 | ||
}, | ||
richtext: { | ||
marginTop: 0, | ||
marginBottom: 0 | ||
} | ||
@@ -564,2 +658,4 @@ }; | ||
var _class, _temp; | ||
var _rax = __webpack_require__(0); | ||
@@ -595,3 +691,3 @@ | ||
var Touchable = function (_Component) { | ||
var Touchable = (_temp = _class = function (_Component) { | ||
_inherits(Touchable, _Component); | ||
@@ -621,3 +717,3 @@ | ||
return Touchable; | ||
}(_rax.Component); | ||
}(_rax.Component), _class.propTypes = {}, _temp); | ||
@@ -624,0 +720,0 @@ var styles = { |
@@ -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.i=function(e){return e},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=6)}([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},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},c=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),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),c(t,[{key:"render",value:function(){var e=this.props;if(f.isWeex)return(0,a.createElement)("div",e);var t=l({},p.initial,e.style);return(0,a.createElement)("div",l({},e,{style:t}))}}]),t}(a.Component),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,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,c,a=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},f=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}}(),s=n(0),p=n(1),y=n(2),b=function(e){return e&&e.__esModule?e:{default:e}}(y),d=(c=l=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),f(t,[{key:"render",value:function(){var e=a({},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=a({display:"flex",width:o,height:r},n),e.src=i,delete e.source;var u=void 0;u=p.isWeex?"image":"img";var l=e.resizeMode||e.style.resizeMode;return l&&(p.isWeex?(e.resize=l,e.style.resizeMode=l):e.style.objectFit=l),this.props.children?(e.children=null,(0,s.createElement)(b.default,{style:e.style},(0,s.createElement)(u,e),(0,s.createElement)(b.default,{style:h.absoluteImage},this.props.children))):(0,s.createElement)(u,e)}return null}}]),t}(s.Component),l.resizeMode={contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"},c),h={absoluteImage:{left:0,top:0,position:"absolute"}};t.default=d,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,c,a=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},f=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}}(),s=n(0),p=n(1),y=(c=l=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),f(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=a({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),e.onPress&&(t.onClick=e.onPress),p.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,s.createElement)("text",t);var o=a({},b.initial,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,s.createElement)("span",a({},t,{style:o}),n)}}]),t}(s.Component),l.contextTypes={isInAParentText:s.PropTypes.bool},l.childContextTypes={isInAParentText:s.PropTypes.bool},c),b={initial:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32}};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":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},c=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),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),c(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,a.createElement)(s.default,t)}}]),t}(a.Component),y={initial:{cursor:"pointer"}};t.default=p,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,c,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}}(),f=n(0),s=n(3),p=o(s),y=n(4),b=(o(y),n(2)),d=o(b),h=n(5),m=o(h),v=(c=l=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),a(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,f.createElement)(m.default,{onPress:this.onChange,style:A.flexContainer},(0,f.createElement)(d.default,{style:[A.container,i]},(0,f.createElement)(p.default,{style:[A.checkbox,u],source:{uri:e}})))}}]),t}(f.Component),l.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="},c),A={container:{flexDirection:"row",alignItems:"center",marginBottom:10},checkbox:{width:40,height:40}};t.default=v,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,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.i=function(e){return e},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=6)}([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},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 c,l,a=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},f=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}}(),s=n(0),p=n(1),y=(l=c=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),f(t,[{key:"render",value:function(){var e=this.props;if(p.isWeex)return(0,s.createElement)("div",e);var t=a({},b.initial,e.style);return(0,s.createElement)("div",a({},e,{style:t}))}}]),t}(s.Component),c.propTypes={},l),b={initial:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"flex",flexDirection:"column",alignContent:"flex-start",flexShrink:0}};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":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 c,l,a=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},f=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}}(),s=n(0),p=n(1),y=n(2),b=function(e){return e&&e.__esModule?e:{default:e}}(y),d=(l=c=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),f(t,[{key:"render",value:function(){var e=a({},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=a(a({},!this.context.isInAParentText&&{display:"flex"},{width:o,height:r}),n),e.src=i,delete e.source;var u=void 0;u=p.isWeex?"image":"img";var c=e.resizeMode||e.style.resizeMode;return c&&(p.isWeex?(e.resize=c,e.style.resizeMode=c):e.style.objectFit=c),this.props.children?(e.children=null,(0,s.createElement)(b.default,{style:e.style},(0,s.createElement)(u,e),(0,s.createElement)(b.default,{style:h.absoluteImage},this.props.children))):(0,s.createElement)(u,e)}return null}}]),t}(s.Component),c.propTypes={},c.resizeMode={contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"},c.contextTypes={isInAParentText:s.PropTypes.bool},l),h={absoluteImage:{left:0,top:0,position:"absolute"}};t.default=d,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":l(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":l(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 type){var i=new n;return i.props=o,r&&(i.props.children=c(r,t)),i.context=t.getChildContext(),i.render()}return e}function c(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":s(r))&&n.push(u(r,t))}return n}var l="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 a,f,s="function"==typeof Symbol&&"symbol"===l(Symbol.iterator)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":l(e)},p=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},y=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}}(),b=n(0),d=n(1),h=(f=a=function(e){function t(){var e,n,i,u;o(this,t);for(var l=arguments.length,a=Array(l),f=0;f<l;f++)a[f]=arguments[f];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),i.renderText=function(){var e=i.props,t=p({},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,b.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),d.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,b.createElement)("text",t);var o=p({},v.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,b.createElement)("span",p({},t,{style:o}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=p({},e,{style:e.style||{}}),o=p({},v.richtext,n.style);return d.isWeex&&(t=c(t,i)),(0,b.createElement)("p",p({},n,{style:o}),t)},u=n,r(i,u)}return i(t,e),y(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":s(r))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(b.Component),a.propTypes={},a.contextTypes={isInAParentText:b.PropTypes.bool},a.childContextTypes={isInAParentText:b.PropTypes.bool},f),v={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=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 c,l,a=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},f=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}}(),s=n(0),p=(n(1),n(2)),y=function(e){return e&&e.__esModule?e:{default:e}}(p),b=(l=c=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),f(t,[{key:"render",value:function(){var e=this.props,t=a({},e,{style:a({},d.initial,e.style),onClick:e.onPress});return delete t.onPress,(0,s.createElement)(y.default,t)}}]),t}(s.Component),c.propTypes={},l),d={initial:{cursor:"pointer"}};t.default=b,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 c,l,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}}(),f=n(0),s=n(3),p=o(s),y=n(4),b=(o(y),n(2)),d=o(b),h=n(5),v=o(h),m=(l=c=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),a(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,f.createElement)(v.default,{onPress:this.onChange,style:A.flexContainer},(0,f.createElement)(d.default,{style:[A.container,i]},(0,f.createElement)(p.default,{style:[A.checkbox,u],source:{uri:e}})))}}]),t}(f.Component),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="},l),A={container:{flexDirection:"row",alignItems:"center",marginBottom:10},checkbox:{width:40,height:40}};t.default=m,e.exports=t.default}])}); |
{ | ||
"name": "rax-checkbox", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "CheckBox component for Rax.", | ||
@@ -24,6 +24,6 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"rax-image": "^0.3.7", | ||
"rax-text": "^0.3.7", | ||
"rax-view": "^0.3.7", | ||
"rax-touchable": "^0.3.7" | ||
"rax-image": "^0.3.8", | ||
"rax-text": "^0.3.8", | ||
"rax-view": "^0.3.8", | ||
"rax-touchable": "^0.3.8" | ||
}, | ||
@@ -34,5 +34,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"rax-text": "^0.3.7", | ||
"rax-test-renderer": "^0.3.7" | ||
"rax-text": "^0.3.8", | ||
"rax-test-renderer": "^0.3.8" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
178903
1567
Updatedrax-image@^0.3.8
Updatedrax-text@^0.3.8
Updatedrax-touchable@^0.3.8
Updatedrax-view@^0.3.8