Skip to content

Commit

Permalink
Update to react@15.5 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
veged authored and awinogradov committed Apr 24, 2017
1 parent bafa6bf commit 012fd5b
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 63 deletions.
15 changes: 8 additions & 7 deletions blocks/Button/Button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import warning from 'warning';
import ButtonText from 'e:Text';
Expand Down Expand Up @@ -192,13 +193,13 @@ export default decl({
}
}, {
propTypes : {
type : React.PropTypes.oneOf(['link']),
role : React.PropTypes.oneOf(['button', 'checkbox']),
disabled : React.PropTypes.bool,
focused : React.PropTypes.bool,
onClick : React.PropTypes.func,
onFocusChange : React.PropTypes.func,
onCheckChange : React.PropTypes.func
type : PropTypes.oneOf(['link']),
role : PropTypes.oneOf(['button', 'checkbox']),
disabled : PropTypes.bool,
focused : PropTypes.bool,
onClick : PropTypes.func,
onFocusChange : PropTypes.func,
onCheckChange : PropTypes.func
},

defaultProps : {
Expand Down
25 changes: 13 additions & 12 deletions blocks/CheckBox/CheckBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Bem, { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import warning from 'warning';
import CheckBoxControl from 'e:Control';
Expand Down Expand Up @@ -59,18 +60,18 @@ export default decl({
}
}, {
propTypes : {
id : React.PropTypes.string,
name : React.PropTypes.string,
value : React.PropTypes.any,
checked : React.PropTypes.bool,
text : React.PropTypes.string,
title : React.PropTypes.string,
type : React.PropTypes.oneOf([undefined, 'button']),
tabIndex : React.PropTypes.number,
disabled : React.PropTypes.bool,
focused : React.PropTypes.bool,
onFocusChange : React.PropTypes.func,
onChange : React.PropTypes.func
id : PropTypes.string,
name : PropTypes.string,
value : PropTypes.any,
checked : PropTypes.bool,
text : PropTypes.string,
title : PropTypes.string,
type : PropTypes.oneOf([undefined, 'button']),
tabIndex : PropTypes.number,
disabled : PropTypes.bool,
focused : PropTypes.bool,
onFocusChange : PropTypes.func,
onChange : PropTypes.func
},

defaultProps : {
Expand Down
2 changes: 1 addition & 1 deletion blocks/Image/Image.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import { decl } from 'bem-react-core';

export default decl({
Expand Down
9 changes: 5 additions & 4 deletions blocks/Link/Link.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import warning from 'warning';

Expand Down Expand Up @@ -117,10 +118,10 @@ export default decl({
}
}, {
propTypes : {
disabled : React.PropTypes.bool,
focused : React.PropTypes.bool,
onClick : React.PropTypes.func,
onFocusChange : React.PropTypes.func
disabled : PropTypes.bool,
focused : PropTypes.bool,
onClick : PropTypes.func,
onFocusChange : PropTypes.func
},

defaultProps : {
Expand Down
15 changes: 8 additions & 7 deletions blocks/Popup/Popup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import Portal from 'e:Portal';

Expand Down Expand Up @@ -97,19 +98,19 @@ export default decl({
}
}, {
propTypes : {
visible : React.PropTypes.bool,
onVisibleChange : React.PropTypes.func,
onHide : React.PropTypes.func
visible : PropTypes.bool,
onVisibleChange : PropTypes.func,
onHide : PropTypes.func
},

childContextTypes : {
isParentLayerVisible : React.PropTypes.func,
zIndexGroup : React.PropTypes.number
isParentLayerVisible : PropTypes.func,
zIndexGroup : PropTypes.number
},

contextTypes : {
isParentLayerVisible : React.PropTypes.func,
zIndexGroup : React.PropTypes.number
isParentLayerVisible : PropTypes.func,
zIndexGroup : PropTypes.number
},

defaultProps : {
Expand Down
3 changes: 2 additions & 1 deletion blocks/Popup/Popup.tests/z-index-group.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import ReactDom from 'react-dom';
import Bem from 'bem-react-core';
Expand All @@ -23,7 +24,7 @@ class Example extends React.Component { // eslint-disable-line react/prefer-stat
}

Example.contextTypes = {
zIndexGroupStyle : React.PropTypes.object
zIndexGroupStyle : PropTypes.object
};

class App extends React.Component {
Expand Down
3 changes: 2 additions & 1 deletion blocks/Popup/_target/Popup_target_anchor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { declMod } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import ReactDom from 'react-dom';

Expand Down Expand Up @@ -29,7 +30,7 @@ export default declMod(({ target }) => target === 'anchor', {

}, {
propTypes : {
anchor : React.PropTypes.func
anchor : PropTypes.func
}
});

3 changes: 2 additions & 1 deletion blocks/Popup/_target/Popup_target_position.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { declMod } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';

export default declMod(({ target }) => target === 'position', {
Expand All @@ -15,6 +16,6 @@ export default declMod(({ target }) => target === 'position', {
}
}, {
propTypes : {
position : React.PropTypes.object // TODO left, top
position : PropTypes.object // TODO left, top
}
});
2 changes: 1 addition & 1 deletion blocks/ProgressBar/ProgressBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import { decl } from 'bem-react-core';

export default decl({
Expand Down
2 changes: 1 addition & 1 deletion blocks/Spin/Spin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import { decl } from 'bem-react-core';

export default decl({
Expand Down
21 changes: 11 additions & 10 deletions blocks/TextArea/TextArea.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import TextInput from 'b:TextInput';
import TextAreaControl from 'e:Control';
Expand All @@ -15,16 +16,16 @@ export default decl(TextInput, {
}
}, {
propTypes : {
id : React.PropTypes.string,
name : React.PropTypes.string,
value : React.PropTypes.any,
tabIndex : React.PropTypes.number,
placeholder : React.PropTypes.string,
autoComplete : React.PropTypes.bool,
disabled : React.PropTypes.bool,
focused : React.PropTypes.bool,
onFocusChange : React.PropTypes.func,
onChange : React.PropTypes.func
id : PropTypes.string,
name : PropTypes.string,
value : PropTypes.any,
tabIndex : PropTypes.number,
placeholder : PropTypes.string,
autoComplete : PropTypes.bool,
disabled : PropTypes.bool,
focused : PropTypes.bool,
onFocusChange : PropTypes.func,
onChange : PropTypes.func
},

defaultProps : {
Expand Down
27 changes: 14 additions & 13 deletions blocks/TextInput/TextInput.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Bem, { decl } from 'bem-react-core';
import PropTypes from 'prop-types';
import React from 'react';
import warning from 'warning';
import TextInputControl from 'e:Control';
Expand Down Expand Up @@ -61,19 +62,19 @@ export default decl({
}
}, {
propTypes : {
id : React.PropTypes.string,
name : React.PropTypes.string,
value : React.PropTypes.any,
type : React.PropTypes.oneOf(['text', 'password', 'search']),
maxLength : React.PropTypes.number,
tabIndex : React.PropTypes.number,
placeholder : React.PropTypes.string,
autoComplete : React.PropTypes.bool,
hasClear : React.PropTypes.bool,
disabled : React.PropTypes.bool,
focused : React.PropTypes.bool,
onFocusChange : React.PropTypes.func,
onChange : React.PropTypes.func
id : PropTypes.string,
name : PropTypes.string,
value : PropTypes.any,
type : PropTypes.oneOf(['text', 'password', 'search']),
maxLength : PropTypes.number,
tabIndex : PropTypes.number,
placeholder : PropTypes.string,
autoComplete : PropTypes.bool,
hasClear : PropTypes.bool,
disabled : PropTypes.bool,
focused : PropTypes.bool,
onFocusChange : PropTypes.func,
onChange : PropTypes.func
},

defaultProps : {
Expand Down
5 changes: 3 additions & 2 deletions blocks/ZIndexGroup/ZIndexGroup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import { decl } from 'bem-react-core';

Expand All @@ -22,7 +23,7 @@ export default decl({
}
}, {
childContextTypes : {
zIndexGroup : React.PropTypes.number,
zIndexGroupStyle : React.PropTypes.object
zIndexGroup : PropTypes.number,
zIndexGroupStyle : PropTypes.object
}
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"license": "MPL-2.0",
"dependencies": {
"bem-react-core": "0.3.1",
"react": "^15.1.0",
"react-dom": "^15.1.0",
"prop-types": "15.5.7",
"react": "15.5.4",
"react-dom": "15.5.4",
"throttle-debounce": "^1.0.1",
"warning": "^3.0.0"
},
Expand Down

0 comments on commit 012fd5b

Please sign in to comment.