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

@mondaychen/elemental

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mondaychen/elemental - npm Package Compare versions

Comparing version 0.5.14 to 0.6.0

less/reset.less

7

HISTORY.md
# 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 @@

2

lib/components/Button.js

@@ -36,3 +36,3 @@ 'use strict';

// 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 @@

@@ -13,3 +13,3 @@ 'use strict';

propTypes: {
autofocus: React.PropTypes.bool,
autoFocus: React.PropTypes.bool,
className: React.PropTypes.string,

@@ -24,3 +24,3 @@ disabled: React.PropTypes.bool,

componentDidMount: function componentDidMount() {
if (this.props.autofocus) {
if (this.props.autoFocus) {
this.refs.target.focus();

@@ -27,0 +27,0 @@ }

@@ -22,3 +22,3 @@ 'use strict';

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);

@@ -25,0 +25,0 @@

@@ -5,2 +5,4 @@ 'use strict';

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');

@@ -13,3 +15,3 @@ var blacklist = require('blacklist');

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 @@ }

@@ -7,2 +7,3 @@ 'use strict';

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 @@ });

@@ -7,2 +7,3 @@ 'use strict';

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 }));
}
});

@@ -59,3 +59,3 @@ 'use strict';

propTypes: {
autofocusFirstElement: _react2['default'].PropTypes.bool,
autoFocusFirstElement: _react2['default'].PropTypes.bool,
backdropClosesModal: _react2['default'].PropTypes.bool,

@@ -93,3 +93,3 @@ className: _react2['default'].PropTypes.string,

// receiving focus
if (this.props.autofocusFirstElement) {
if (this.props.autoFocusFirstElement) {
ally.when.visibleArea({

@@ -100,3 +100,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

@@ -103,0 +103,0 @@ // be given to the modal itself.

@@ -7,2 +7,3 @@ 'use strict';

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,

@@ -76,3 +76,3 @@ 'use strict';

// 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');

@@ -79,0 +79,0 @@ // classes

{
"name": "@mondaychen/elemental",
"version": "0.5.14",
"version": "0.6.0",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc