@mondaychen/elemental
Advanced tools
Comparing version 0.5.14 to 0.6.0-freewheel
# Elemental | ||
## v0.6.0 / 2016-07-26 | ||
This release fixes warnings in React 15.2.x, and includes a small breaking change to do with the calitalisation of `autoFocus`. | ||
* fixed; issues with passing unrecognised attributes to DOM elements, which caused warnings in React 15.2.x, thanks to [Monday Chen](https://github.com/mondaychen) | ||
* fixed; capitalisation inconsistencies with React on the `autoFocus` prop (Focus is now capitalised) | ||
## v0.5.14 / 2016-04-10 | ||
@@ -4,0 +11,0 @@ |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -8,0 +8,0 @@ module.exports = React.createClass({ |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -36,3 +36,3 @@ var blacklist = require('blacklist'); | ||
// props | ||
var props = blacklist(this.props, 'type', 'size', 'component', 'className'); | ||
var props = blacklist(this.props, 'type', 'size', 'component', 'className', 'submit'); | ||
props.className = componentClass; | ||
@@ -39,0 +39,0 @@ |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var classnames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -9,0 +9,0 @@ module.exports = React.createClass({ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -8,0 +8,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var classNames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -14,3 +14,3 @@ var Checkbox = React.createClass({ | ||
propTypes: { | ||
autofocus: React.PropTypes.bool, | ||
autoFocus: React.PropTypes.bool, | ||
className: React.PropTypes.string, | ||
@@ -25,3 +25,3 @@ disabled: React.PropTypes.bool, | ||
componentDidMount: function componentDidMount() { | ||
if (this.props.autofocus) { | ||
if (this.props.autoFocus) { | ||
this.refs.target.focus(); | ||
@@ -28,0 +28,0 @@ } |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -10,0 +10,0 @@ var _react2 = _interopRequireDefault(_react); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -10,0 +10,0 @@ var _react2 = _interopRequireDefault(_react); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var Transition = require('react-addons-css-transition-group'); | ||
@@ -8,0 +8,0 @@ var blacklist = require('blacklist'); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -8,0 +8,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var classnames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -23,3 +23,3 @@ module.exports = React.createClass({ | ||
render: function render() { | ||
var props = blacklist(this.props, 'children', 'type'); | ||
var props = blacklist(this.props, 'children', 'type', 'component'); | ||
props.className = classnames('Form', 'Form--' + this.props.type, this.props.className); | ||
@@ -26,0 +26,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -8,0 +8,0 @@ var classNames = require('classnames'); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ var Spinner = require('./Spinner'); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -5,0 +5,0 @@ var classNames = require('classnames'); |
@@ -5,3 +5,5 @@ 'use strict'; | ||
var React = require('react'); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -13,3 +15,3 @@ var classNames = require('classnames'); | ||
propTypes: { | ||
autofocus: React.PropTypes.bool, | ||
autoFocus: React.PropTypes.bool, | ||
className: React.PropTypes.string, | ||
@@ -35,3 +37,3 @@ disabled: React.PropTypes.bool, | ||
componentDidMount: function componentDidMount() { | ||
if (this.props.autofocus) { | ||
if (this.props.autoFocus) { | ||
this.focus(); | ||
@@ -46,19 +48,27 @@ } | ||
render: function render() { | ||
var _props = this.props; | ||
var noedit = _props.noedit; | ||
var multiline = _props.multiline; | ||
var size = _props.size; | ||
var className = _props.className; | ||
var rest = _objectWithoutProperties(_props, ['noedit', 'multiline', 'size', 'className']); | ||
// classes | ||
var className = classNames({ | ||
'FormInput-noedit': this.props.noedit, | ||
'FormInput-noedit--multiline': this.props.noedit && this.props.multiline, | ||
'FormInput': !this.props.noedit | ||
}, this.props.size ? 'FormInput--' + this.props.size : null, this.props.className); | ||
var props = _extends({}, this.props, { className: className, ref: 'input' }); | ||
var newClassName = classNames({ | ||
'FormInput-noedit': noedit, | ||
'FormInput-noedit--multiline': noedit && multiline, | ||
'FormInput': !noedit | ||
}, size ? 'FormInput--' + size : null, className); | ||
var props = _extends({}, rest, { className: newClassName, ref: 'input' }); | ||
var Element = 'input'; | ||
if (this.props.noedit && this.props.href) { | ||
if (noedit && this.props.href) { | ||
Element = 'a'; | ||
props.type = null; | ||
props.children = props.children || props.value; | ||
} else if (this.props.noedit) { | ||
} else if (noedit) { | ||
Element = 'div'; | ||
props.type = null; | ||
props.children = props.children || props.value; | ||
} else if (this.props.multiline) { | ||
} else if (multiline) { | ||
Element = 'textarea'; | ||
@@ -65,0 +75,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -8,0 +8,0 @@ var classNames = require('classnames'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -8,0 +8,0 @@ var classNames = require('classnames'); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
@@ -15,3 +15,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -18,0 +18,0 @@ var _react2 = _interopRequireDefault(_react); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
@@ -5,4 +5,5 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
var blacklist = require('blacklist'); | ||
@@ -20,4 +21,5 @@ module.exports = React.createClass({ | ||
}, this.props.className); | ||
var props = blacklist(this.props, 'contiguous'); | ||
return React.createElement('div', _extends({}, this.props, { className: className })); | ||
return React.createElement('div', _extends({}, props, { className: className })); | ||
} | ||
@@ -24,0 +26,0 @@ }); |
@@ -5,4 +5,5 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
var blacklist = require('blacklist'); | ||
@@ -20,5 +21,6 @@ module.exports = React.createClass({ | ||
}, this.props.className); | ||
var props = blacklist(this.props, 'grow'); | ||
return React.createElement('div', _extends({}, this.props, { className: className })); | ||
return React.createElement('div', _extends({}, props, { className: className })); | ||
} | ||
}); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -60,3 +60,3 @@ var _react2 = _interopRequireDefault(_react); | ||
propTypes: { | ||
autofocusFirstElement: _react2['default'].PropTypes.bool, | ||
autoFocusFirstElement: _react2['default'].PropTypes.bool, | ||
backdropClosesModal: _react2['default'].PropTypes.bool, | ||
@@ -94,3 +94,3 @@ className: _react2['default'].PropTypes.string, | ||
// receiving focus | ||
if (this.props.autofocusFirstElement) { | ||
if (this.props.autoFocusFirstElement) { | ||
ally.when.visibleArea({ | ||
@@ -101,3 +101,3 @@ context: this.modalElement, | ||
// keyboard focusable element (giving any element with | ||
// autofocus attribute precendence). If the modal does | ||
// autoFocus attribute precendence). If the modal does | ||
// not contain any keyboard focusabe elements, focus will | ||
@@ -104,0 +104,0 @@ // be given to the modal itself. |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var classnames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -9,0 +9,0 @@ module.exports = React.createClass({ |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var classnames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -9,0 +9,0 @@ module.exports = React.createClass({ |
@@ -6,3 +6,4 @@ 'use strict'; | ||
var classnames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -32,5 +33,7 @@ module.exports = React.createClass({ | ||
) : null; | ||
var props = blacklist(this.props, 'children', 'onClose', 'showCloseButton', 'text'); | ||
return React.createElement( | ||
'div', | ||
_extends({}, this.props, { className: className }), | ||
_extends({}, props, { className: className }), | ||
close, | ||
@@ -37,0 +40,0 @@ text, |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -5,0 +5,0 @@ var classNames = require('classnames'); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var classNames = require('classnames'); | ||
var React = require('react'); | ||
var React = require('../react'); | ||
@@ -10,0 +10,0 @@ var Radio = React.createClass({ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var blacklist = require('blacklist'); | ||
@@ -77,3 +77,3 @@ var classNames = require('classnames'); | ||
// props | ||
var props = blacklist(this.props, 'alwaysValidate', 'label', 'onChange', 'options', 'required', 'requiredMessage', 'value'); | ||
var props = blacklist(this.props, 'alwaysValidate', 'label', 'onChange', 'options', 'required', 'requiredMessage', 'value', 'inline'); | ||
@@ -80,0 +80,0 @@ // classes |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -8,0 +8,0 @@ var _react2 = _interopRequireDefault(_react); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -10,0 +10,0 @@ var _react2 = _interopRequireDefault(_react); |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -12,0 +12,0 @@ var _react2 = _interopRequireDefault(_react); |
'use strict'; | ||
var React = require('react'); | ||
var React = require('../react'); | ||
var classNames = require('classnames'); | ||
@@ -5,0 +5,0 @@ |
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _react = require('../react'); | ||
@@ -14,0 +14,0 @@ var _react2 = _interopRequireDefault(_react); |
{ | ||
"name": "@mondaychen/elemental", | ||
"version": "0.5.14", | ||
"version": "0.6.0-freewheel", | ||
"description": "React UI Framework", | ||
@@ -13,4 +13,4 @@ "main": "lib/Elemental.js", | ||
"dependencies": { | ||
"blacklist": "^1.1.2", | ||
"classnames": "^2.2.3" | ||
"blacklist": "^1.1.4", | ||
"classnames": "^2.2.5" | ||
}, | ||
@@ -21,3 +21,3 @@ "devDependencies": { | ||
"eslint-plugin-react": "^3.16.1", | ||
"glob": "^7.0.3", | ||
"glob": "^7.0.5", | ||
"gulp": "^3.9.1", | ||
@@ -29,7 +29,7 @@ "isparta": "^4.0.0", | ||
"react-dom": "^15.0.0", | ||
"react-router": "^2.0.1", | ||
"rimraf": "^2.5.2", | ||
"tap-xunit": "^1.3.1", | ||
"tape": "^4.5.1", | ||
"teaspoon": "^6.2.0" | ||
"react-router": "^2.6.0", | ||
"rimraf": "^2.5.4", | ||
"tap-xunit": "^1.4.0", | ||
"tape": "^4.6.0", | ||
"teaspoon": "^6.4.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210472
104
2244
Updatedblacklist@^1.1.4
Updatedclassnames@^2.2.5