From 8887acd5a4a207b8565e8bdafca7500b102baeea Mon Sep 17 00:00:00 2001 From: chris-divvito Date: Wed, 25 Oct 2017 16:18:01 +1000 Subject: [PATCH 1/9] compatibility with React 16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2153fd5..417315e 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "color": "^0.11.4", "create-react-class": "^15.6.0", "lodash": "^4.17.2", - "uranium": "github:tuckerconnelly/uranium" + "uranium": "github:bavuongco10/uranium#9b44117" }, "peerDependencies": { "prop-types": "^15.5.10", From 03b93b23dbea70ac5f9f75fda771eb15bf5f0b81 Mon Sep 17 00:00:00 2001 From: chris-divvito Date: Wed, 25 Oct 2017 16:20:21 +1000 Subject: [PATCH 2/9] React 16 peerDependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 417315e..abad5de 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,6 @@ }, "peerDependencies": { "prop-types": "^15.5.10", - "react": "^15.6.1" + "react": "^16.0.0" } } From 83b587bfaf57e72d1c6921fdc85eccfa8046a4e9 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 25 Oct 2017 17:09:59 +1000 Subject: [PATCH 3/9] Better handling for merged themes --- lib/components/AppBar.js | 10 ++++---- lib/components/BottomNavigation.js | 4 ++-- lib/components/BottomNavigationIcon.js | 10 ++++---- lib/components/Card/Card.js | 4 ++-- lib/components/Card/CardActions.js | 4 ++-- lib/components/Card/CardText.js | 6 ++--- lib/components/Card/CardTitle.js | 8 +++---- lib/components/DataTable/Cell.js | 6 ++--- lib/components/DataTable/HeaderCell.js | 6 ++--- lib/components/DataTable/HeaderRow.js | 4 ++-- lib/components/DataTable/Row.js | 4 ++-- lib/components/DataTable/index.js | 6 ++--- lib/components/Dialog.js | 16 ++++++------- lib/components/Divider.js | 4 ++-- lib/components/ExpansionPanel.js | 20 ++++++++-------- lib/components/Icon.js | 4 ++-- lib/components/List.js | 4 ++-- lib/components/ListItem.js | 24 +++++++++---------- lib/components/NavigationDrawer.js | 10 ++++---- lib/components/Paper.js | 4 ++-- lib/components/Snackbar.js | 8 +++---- lib/components/TextField.js | 12 +++++----- lib/components/TextFieldError.js | 4 ++-- lib/components/TouchableRipple.js | 12 +++++----- lib/components/Type.js | 22 ++++++++--------- lib/components/buttons/FlatButton.js | 6 ++--- .../buttons/FloatingActionButton.js | 6 ++--- lib/components/buttons/IconToggle.js | 6 ++--- lib/components/buttons/RaisedButton.js | 6 ++--- lib/style/WebStyles.js | 4 ++-- lib/theme/connectTheme.js | 16 +++++++++---- src/theme/connectTheme.js | 10 ++++++-- 32 files changed, 141 insertions(+), 129 deletions(-) diff --git a/lib/components/AppBar.js b/lib/components/AppBar.js index f533d42..ea48c80 100644 --- a/lib/components/AppBar.js +++ b/lib/components/AppBar.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;} var HeaderRow=function HeaderRow(_ref){var children=_ref.children,style=_ref.style,other=_objectWithoutProperties(_ref,['children','style']);return( -_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other), +_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other,{__source:{fileName:_jsxFileName,lineNumber:8}}), _react2.default.Children.map(children,function(child,i){return( i===0? diff --git a/lib/components/DataTable/Row.js b/lib/components/DataTable/Row.js index 415e00b..e809306 100644 --- a/lib/components/DataTable/Row.js +++ b/lib/components/DataTable/Row.js @@ -1,11 +1,11 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;} var HeaderRow=function HeaderRow(_ref){var children=_ref.children,style=_ref.style,other=_objectWithoutProperties(_ref,['children','style']);return( -_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other), +_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other,{__source:{fileName:_jsxFileName,lineNumber:8}}), _react2.default.Children.map(children,function(child,i){return( i===0? diff --git a/lib/components/DataTable/index.js b/lib/components/DataTable/index.js index ed50e8d..5465aa2 100644 --- a/lib/components/DataTable/index.js +++ b/lib/components/DataTable/index.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof 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;} @@ -41,7 +41,7 @@ fontSize:SIZE, lineHeight:SIZE}]. concat(style)}, -other), +other,{__source:{fileName:_jsxFileName,lineNumber:33}}), name, children)); diff --git a/lib/components/List.js b/lib/components/List.js index 9770d9f..bfcc61e 100644 --- a/lib/components/List.js +++ b/lib/components/List.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i0; return( -_react2.default.createElement(_reactNative.View,null, +_react2.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:126}}, _react2.default.createElement(_index.TouchableRipple,{ style:styles.touchable, onMouseEnter:function onMouseEnter(){return _this3.setState({hovered:true});}, onMouseLeave:function onMouseLeave(){return _this3.setState({hovered:false});}, -onPress:onPress}, +onPress:onPress,__source:{fileName:_jsxFileName,lineNumber:127}}, _react2.default.createElement(_reactNative.Animated.View,_extends({ css:styles.body, style:[ (0,_uranium.animate)(['backgroundColor'],styles.body,styles.hovered,this._hoverAV)]. concat(style)}, -otherWithoutCustomProps), +otherWithoutCustomProps,{__source:{fileName:_jsxFileName,lineNumber:132}}), leftIcon&& _react2.default.createElement(_index.Icon,{ name:leftIcon, style:[ styles.leftIcon, -active&&styles.active]}), +active&&styles.active],__source:{fileName:_jsxFileName,lineNumber:139}}), _react2.default.createElement(_index.Subheading,{ @@ -149,7 +149,7 @@ active&&styles.active, thereIsSomethingOnTheRight&&styles.primaryTextGivenRightEl], numberOfLines:1, -ellipsizeMode:'tail'}, +ellipsizeMode:'tail',__source:{fileName:_jsxFileName,lineNumber:146}}, primaryText), secondaryText&& @@ -158,7 +158,7 @@ numberOfLines:secondaryTextLines, ellipsizeMode:'tail', style:[ styles.secondaryText, -rightIcon&&styles.secondaryTextGivenRightEl]}, +rightIcon&&styles.secondaryTextGivenRightEl],__source:{fileName:_jsxFileName,lineNumber:156}}, secondaryText), @@ -167,7 +167,7 @@ rightText&& _react2.default.createElement(_index.Caption,{ numberOfLines:1, ellipsizeMode:'tail', -css:styles.rightText}, +css:styles.rightText,__source:{fileName:_jsxFileName,lineNumber:167}}, rightText), @@ -181,7 +181,7 @@ rightText&&styles.rightIconGivenRightText], style:(0,_uranium.animate)( styles.expandIconCollapsed, styles.expandIconExpanded, -this._expandIconAV)}), +this._expandIconAV),__source:{fileName:_jsxFileName,lineNumber:175}}), rightIcon&& @@ -190,12 +190,12 @@ _react2.default.createElement(_index.Icon,{ name:rightIcon, css:[ styles.rightIcon, -rightText&&styles.rightIconGivenRightText]}): +rightText&&styles.rightIconGivenRightText],__source:{fileName:_jsxFileName,lineNumber:189}}): _react2.default.createElement(_reactNative.View,{ css:[ styles.rightIcon, -rightText&&styles.rightIconGivenRightText]}, +rightText&&styles.rightIconGivenRightText],__source:{fileName:_jsxFileName,lineNumber:195}}, rightIcon))), @@ -208,7 +208,7 @@ style:[ styles.nestedList, (0,_uranium.animate)('maxHeight',0,childrenCount*72+40,this._expandHeightAV), (0,_uranium.animate)('opacity',0,1,this._expandOpacityAV), -this.state.fullyExpanded&&{maxHeight:undefined}]}, +this.state.fullyExpanded&&{maxHeight:undefined}],__source:{fileName:_jsxFileName,lineNumber:206}}, children))); diff --git a/lib/components/NavigationDrawer.js b/lib/components/NavigationDrawer.js index dfaf5fa..f424d5c 100644 --- a/lib/components/NavigationDrawer.js +++ b/lib/components/NavigationDrawer.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;} @@ -29,8 +29,8 @@ _react2.default.createElement(_index.TouchableRipple,_extends({ rippleCentered:true, rippleSpread:0.34, style:[styles.base].concat(style)}, -other), -_react2.default.createElement(_index.Icon,{name:name,style:iconStyle}))); +other,{__source:{fileName:_jsxFileName,lineNumber:28}}), +_react2.default.createElement(_index.Icon,{name:name,style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:33}}))); }; diff --git a/lib/components/buttons/RaisedButton.js b/lib/components/buttons/RaisedButton.js index f0d2e72..e774296 100644 --- a/lib/components/buttons/RaisedButton.js +++ b/lib/components/buttons/RaisedButton.js @@ -1,4 +1,4 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof 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;}exports.default= function(component){ var WrappedComponent=component; @@ -17,16 +18,21 @@ return component(this.props,this.context); ConnectTheme=function(_Component2){_inherits(ConnectTheme,_Component2);function ConnectTheme(){var _ref;var _temp,_this2,_ret;_classCallCheck(this,ConnectTheme);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return _ret=(_temp=(_this2=_possibleConstructorReturn(this,(_ref=ConnectTheme.__proto__||Object.getPrototypeOf(ConnectTheme)).call.apply(_ref,[this].concat(args))),_this2),_this2. _node=null,_temp),_possibleConstructorReturn(_this2,_ret);}_createClass(ConnectTheme,[{key:'render',value:function render() -{var _this3=this; +{var _this3=this;var _props= +this.props,mergeTheme=_props.mergeTheme,rest=_objectWithoutProperties(_props,['mergeTheme']); return( _react2.default.createElement(WrappedComponent,_extends({}, -this.props,{ +rest,{ ref:function ref(c){_this3._node=c;}, -theme:this.context.theme||_index.themes.light}))); +theme:(0,_merge2.default)(this.context.theme||_index.themes.light,mergeTheme||{}),__source:{fileName:_jsxFileName,lineNumber:24}}))); }}]);return ConnectTheme;}(_react.Component); +ConnectTheme.propTypes={ +mergeTheme:_propTypes2.default.object}; + + ConnectTheme.displayName='ConnectTheme('+( _react.Component.displayName||_react.Component.name||'Component')+')'; diff --git a/src/theme/connectTheme.js b/src/theme/connectTheme.js index 11eae92..115deb0 100644 --- a/src/theme/connectTheme.js +++ b/src/theme/connectTheme.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' +import merge from 'lodash/merge' import { themes } from '../index' export default component => { @@ -18,15 +19,20 @@ export default component => { _node = null render() { + const { mergeTheme, ...rest } = this.props return ( { this._node = c }} - theme={this.context.theme || themes.light} /> + theme={merge(this.context.theme || themes.light, mergeTheme || {})} /> ) } } + ConnectTheme.propTypes = { + mergeTheme: PropTypes.object, + } + ConnectTheme.displayName = `ConnectTheme(${Component.displayName || Component.name || 'Component'})` From 8ad76235adc2fbe2861ad530b94f4422b1f57e12 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 26 Oct 2017 09:51:50 +1000 Subject: [PATCH 4/9] update dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index abad5de..e59581c 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,10 @@ "color": "^0.11.4", "create-react-class": "^15.6.0", "lodash": "^4.17.2", - "uranium": "github:bavuongco10/uranium#9b44117" + "uranium": "github:divvito/uranium#401ff1e" }, "peerDependencies": { "prop-types": "^15.5.10", - "react": "^16.0.0" + "react": "react@16.0.0-alpha.12" } } From c6c41d5c3d534a4865ca385ec1340eb9d175e93f Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 26 Oct 2017 09:54:13 +1000 Subject: [PATCH 5/9] typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e59581c..46ecc8c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,6 @@ }, "peerDependencies": { "prop-types": "^15.5.10", - "react": "react@16.0.0-alpha.12" + "react": "16.0.0-alpha.12" } } From 674f3fe5722a945978bdef2cb1ff608786a9dc36 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 26 Oct 2017 10:12:27 +1000 Subject: [PATCH 6/9] dependency update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ecc8c..f8c6bfd 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "color": "^0.11.4", "create-react-class": "^15.6.0", "lodash": "^4.17.2", - "uranium": "github:divvito/uranium#401ff1e" + "uranium": "github:divvito/uranium#1508941" }, "peerDependencies": { "prop-types": "^15.5.10", From 880e72006d94836cb34c79be3b4bc8456c02afe6 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 26 Oct 2017 10:18:03 +1000 Subject: [PATCH 7/9] dependency update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8c6bfd..ba16ab8 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "color": "^0.11.4", "create-react-class": "^15.6.0", "lodash": "^4.17.2", - "uranium": "github:divvito/uranium#1508941" + "uranium": "github:divvito/uranium#42484b8" }, "peerDependencies": { "prop-types": "^15.5.10", From c6d88716c1535c12f7bc5059ebbdca2b7689f9bd Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 26 Oct 2017 10:54:56 +1000 Subject: [PATCH 8/9] Fix some warnings --- lib/components/DataTable/Cell.js | 2 +- lib/components/DataTable/HeaderCell.js | 2 +- lib/components/Dialog.js | 2 +- lib/components/Icon.js | 2 +- lib/components/ListItem.js | 2 +- lib/components/NavigationDrawer.js | 4 ++-- lib/components/TextField.js | 6 +++--- lib/components/TouchableRipple.js | 2 +- lib/components/buttons/FlatButton.js | 2 +- lib/components/buttons/FloatingActionButton.js | 2 +- lib/components/buttons/IconToggle.js | 2 +- lib/components/buttons/RaisedButton.js | 2 +- lib/theme/connectTheme.js | 10 ++-------- src/components/DataTable/Cell.js | 2 +- src/components/DataTable/HeaderCell.js | 2 +- src/components/Dialog.js | 2 +- src/components/Icon.js | 2 +- src/components/ListItem.js | 2 +- src/components/NavigationDrawer.js | 4 ++-- src/components/TextField.js | 6 +++--- src/components/TouchableRipple.js | 2 +- src/components/buttons/FlatButton.js | 2 +- src/components/buttons/FloatingActionButton.js | 2 +- src/components/buttons/IconToggle.js | 2 +- src/components/buttons/RaisedButton.js | 2 +- src/theme/connectTheme.js | 6 ------ 26 files changed, 32 insertions(+), 44 deletions(-) diff --git a/lib/components/DataTable/Cell.js b/lib/components/DataTable/Cell.js index 406c4ea..dda9ea7 100644 --- a/lib/components/DataTable/Cell.js +++ b/lib/components/DataTable/Cell.js @@ -17,7 +17,7 @@ defaultedChildren)); Cell.propTypes={ children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])};exports.default= +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])};exports.default= Cell; diff --git a/lib/components/DataTable/HeaderCell.js b/lib/components/DataTable/HeaderCell.js index 31375dc..b258287 100644 --- a/lib/components/DataTable/HeaderCell.js +++ b/lib/components/DataTable/HeaderCell.js @@ -17,7 +17,7 @@ defaultedChildren)); HeaderCell.propTypes={ children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])};exports.default= +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])};exports.default= HeaderCell; diff --git a/lib/components/Dialog.js b/lib/components/Dialog.js index 8029d7b..48a0576 100644 --- a/lib/components/Dialog.js +++ b/lib/components/Dialog.js @@ -104,7 +104,7 @@ onOverlayPress:_propTypes2.default.func, children:_propTypes2.default.node.isRequired, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])}; +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])}; Dialog.defaultProps={ diff --git a/lib/components/Icon.js b/lib/components/Icon.js index e50c0e7..ee2ab15 100644 --- a/lib/components/Icon.js +++ b/lib/components/Icon.js @@ -56,7 +56,7 @@ Icon.propTypes={ name:_propTypes2.default.string.isRequired, children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])};exports.default= +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])};exports.default= Icon; diff --git a/lib/components/ListItem.js b/lib/components/ListItem.js index 0459b7e..779391d 100644 --- a/lib/components/ListItem.js +++ b/lib/components/ListItem.js @@ -258,7 +258,7 @@ expanded:_propTypes2.default.bool, children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), onPress:_propTypes2.default.func, diff --git a/lib/components/NavigationDrawer.js b/lib/components/NavigationDrawer.js index f424d5c..164af9b 100644 --- a/lib/components/NavigationDrawer.js +++ b/lib/components/NavigationDrawer.js @@ -109,11 +109,11 @@ NavigationDrawer.propTypes={ open:_propTypes2.default.bool, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), -menuStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +menuStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), diff --git a/lib/components/TextField.js b/lib/components/TextField.js index 02b5f0c..a778369 100644 --- a/lib/components/TextField.js +++ b/lib/components/TextField.js @@ -209,11 +209,11 @@ singleLine:_propTypes2.default.bool, -textInputStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +textInputStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), -placeholderStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +placeholderStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), @@ -225,7 +225,7 @@ theme:_propTypes2.default.object.isRequired, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])}; +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])}; TextField.defaultProps={ diff --git a/lib/components/TouchableRipple.js b/lib/components/TouchableRipple.js index afcfeff..40c44ba 100644 --- a/lib/components/TouchableRipple.js +++ b/lib/components/TouchableRipple.js @@ -72,7 +72,7 @@ rippleCentered:_propTypes2.default.bool, children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])}), +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])}), mixins:[_reactNative.Touchable.Mixin], diff --git a/lib/components/buttons/FlatButton.js b/lib/components/buttons/FlatButton.js index 33f70e6..04997d0 100644 --- a/lib/components/buttons/FlatButton.js +++ b/lib/components/buttons/FlatButton.js @@ -73,7 +73,7 @@ css:_propTypes2.default.object, -textStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +textStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), theme:_propTypes2.default.object.isRequired}; diff --git a/lib/components/buttons/FloatingActionButton.js b/lib/components/buttons/FloatingActionButton.js index d2ccd8b..bde35d8 100644 --- a/lib/components/buttons/FloatingActionButton.js +++ b/lib/components/buttons/FloatingActionButton.js @@ -82,7 +82,7 @@ accent:_propTypes2.default.bool, children:_propTypes2.default.node, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), onPressIn:_propTypes2.default.func, onPressOut:_propTypes2.default.func, diff --git a/lib/components/buttons/IconToggle.js b/lib/components/buttons/IconToggle.js index 461105f..731b835 100644 --- a/lib/components/buttons/IconToggle.js +++ b/lib/components/buttons/IconToggle.js @@ -44,7 +44,7 @@ name:_propTypes2.default.string.isRequired, -style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), diff --git a/lib/components/buttons/RaisedButton.js b/lib/components/buttons/RaisedButton.js index e774296..2229a78 100644 --- a/lib/components/buttons/RaisedButton.js +++ b/lib/components/buttons/RaisedButton.js @@ -81,7 +81,7 @@ children:_propTypes2.default.node, -textStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array]), +textStyle:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number]), theme:_propTypes2.default.object.isRequired}; diff --git a/lib/theme/connectTheme.js b/lib/theme/connectTheme.js index 7c1f1a4..cc0ba80 100644 --- a/lib/theme/connectTheme.js +++ b/lib/theme/connectTheme.js @@ -36,14 +36,8 @@ mergeTheme:_propTypes2.default.object}; ConnectTheme.displayName='ConnectTheme('+( _react.Component.displayName||_react.Component.name||'Component')+')'; -ConnectTheme.contextTypes=_extends({}, -ConnectTheme.contextTypes,{ -theme:_propTypes2.default.object}); - - -ConnectTheme.childContextTypes=_extends({}, -ConnectTheme.childContextTypes,{ -theme:_propTypes2.default.object}); +ConnectTheme.contextTypes={ +theme:_propTypes2.default.object}; return ConnectTheme; diff --git a/src/components/DataTable/Cell.js b/src/components/DataTable/Cell.js index fd0f8d0..a764891 100644 --- a/src/components/DataTable/Cell.js +++ b/src/components/DataTable/Cell.js @@ -17,7 +17,7 @@ const Cell = ({ children, style, ...other }) => { Cell.propTypes = { children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), } export default Cell diff --git a/src/components/DataTable/HeaderCell.js b/src/components/DataTable/HeaderCell.js index c0f13b0..45d40a3 100644 --- a/src/components/DataTable/HeaderCell.js +++ b/src/components/DataTable/HeaderCell.js @@ -17,7 +17,7 @@ const HeaderCell = ({ children, style, ...other }) => { HeaderCell.propTypes = { children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), } export default HeaderCell diff --git a/src/components/Dialog.js b/src/components/Dialog.js index 0eb8950..3faa8b6 100644 --- a/src/components/Dialog.js +++ b/src/components/Dialog.js @@ -104,7 +104,7 @@ Dialog.propTypes = { * The contents of the dialog */ children: PropTypes.node.isRequired, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), } Dialog.defaultProps = { diff --git a/src/components/Icon.js b/src/components/Icon.js index 2bf5831..b30a744 100644 --- a/src/components/Icon.js +++ b/src/components/Icon.js @@ -56,7 +56,7 @@ Icon.propTypes = { name: PropTypes.string.isRequired, children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), } export default Icon diff --git a/src/components/ListItem.js b/src/components/ListItem.js index afd6bca..9c8f004 100644 --- a/src/components/ListItem.js +++ b/src/components/ListItem.js @@ -258,7 +258,7 @@ ListItem.propTypes = { * and expandable. */ children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), onPress: PropTypes.func, // connectTheme diff --git a/src/components/NavigationDrawer.js b/src/components/NavigationDrawer.js index 675d68b..70eea4a 100644 --- a/src/components/NavigationDrawer.js +++ b/src/components/NavigationDrawer.js @@ -109,11 +109,11 @@ NavigationDrawer.propTypes = { * Will open the drawer if set to true. */ open: PropTypes.bool, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), /** * The style of the menu. */ - menuStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + menuStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), /** * Callback for when the overlay is pressed */ diff --git a/src/components/TextField.js b/src/components/TextField.js index fc55684..450f8f4 100644 --- a/src/components/TextField.js +++ b/src/components/TextField.js @@ -209,11 +209,11 @@ TextField.propTypes = { /** * The style passed to the React Native TextInput */ - textInputStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + textInputStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), /** * The style passed to the placeholder. */ - placeholderStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + placeholderStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), /** * Passed through to the underlying TextInput. */ @@ -225,7 +225,7 @@ TextField.propTypes = { /** * The style of the containing View. */ - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), } TextField.defaultProps = { diff --git a/src/components/TouchableRipple.js b/src/components/TouchableRipple.js index 58f577d..910fe5b 100644 --- a/src/components/TouchableRipple.js +++ b/src/components/TouchableRipple.js @@ -72,7 +72,7 @@ const TouchableRipple = createReactClass({ * a single element. */ children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), }, mixins: [Touchable.Mixin], diff --git a/src/components/buttons/FlatButton.js b/src/components/buttons/FlatButton.js index 8c29498..7383fc5 100644 --- a/src/components/buttons/FlatButton.js +++ b/src/components/buttons/FlatButton.js @@ -73,7 +73,7 @@ Button.propTypes = { /** * The style of the button text. Only applies if props.children isn't passed. */ - textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), // connectTheme theme: PropTypes.object.isRequired, diff --git a/src/components/buttons/FloatingActionButton.js b/src/components/buttons/FloatingActionButton.js index ffc5cde..bca35ae 100644 --- a/src/components/buttons/FloatingActionButton.js +++ b/src/components/buttons/FloatingActionButton.js @@ -82,7 +82,7 @@ FloatingActionButton.propTypes = { * Usually an */ children: PropTypes.node, - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), onPressIn: PropTypes.func, onPressOut: PropTypes.func, diff --git a/src/components/buttons/IconToggle.js b/src/components/buttons/IconToggle.js index 6611d1b..39bb096 100644 --- a/src/components/buttons/IconToggle.js +++ b/src/components/buttons/IconToggle.js @@ -44,7 +44,7 @@ IconToggle.propTypes = { /** * The style of the containing TouchableRipple (which is a View) */ - style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), /** * The style of the Icon element */ diff --git a/src/components/buttons/RaisedButton.js b/src/components/buttons/RaisedButton.js index b1b15a6..46850b1 100644 --- a/src/components/buttons/RaisedButton.js +++ b/src/components/buttons/RaisedButton.js @@ -81,7 +81,7 @@ RaisedButton.propTypes = { /** * The style of the button text. Only applies if props.children isn't passed. */ - textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), + textStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.number]), // connectTheme theme: PropTypes.object.isRequired, diff --git a/src/theme/connectTheme.js b/src/theme/connectTheme.js index 115deb0..532b2b3 100644 --- a/src/theme/connectTheme.js +++ b/src/theme/connectTheme.js @@ -37,12 +37,6 @@ export default component => { `ConnectTheme(${Component.displayName || Component.name || 'Component'})` ConnectTheme.contextTypes = { - ...ConnectTheme.contextTypes, - theme: PropTypes.object, - } - - ConnectTheme.childContextTypes = { - ...ConnectTheme.childContextTypes, theme: PropTypes.object, } From 32cbae03463c62c43f6146e2d478b22b1daa7592 Mon Sep 17 00:00:00 2001 From: dodgecm Date: Wed, 20 Dec 2017 00:00:53 -0500 Subject: [PATCH 9/9] Blindly updating some dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ba16ab8..b55917f 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,10 @@ "color": "^0.11.4", "create-react-class": "^15.6.0", "lodash": "^4.17.2", - "uranium": "github:divvito/uranium#42484b8" + "uranium": "github:tuckerconnelly/uranium" }, "peerDependencies": { "prop-types": "^15.5.10", - "react": "16.0.0-alpha.12" + "react": "^16.0.0" } }