Comparing version 0.17.1 to 0.17.2
# Radium Changelog | ||
## 0.17.2 (July 12, 2016) | ||
### Bug Fixes | ||
- Fix `content` values in `Style` component (#719). | ||
- Improve stateless component check to work with native arrow functions (#771). | ||
### Improvements | ||
- Add support for `:disabled` pseudo-class (#689). | ||
- Add plugin to remove nested style objects and prevent `[Object object]` from rendering in the DOM (#703). | ||
## 0.17.1 (March 30, 2016) | ||
@@ -4,0 +14,0 @@ |
@@ -12,2 +12,6 @@ 'use strict'; | ||
var _quoteValueIfNeeded = require('./quote-value-if-needed'); | ||
var _quoteValueIfNeeded2 = _interopRequireDefault(_quoteValueIfNeeded); | ||
var _camelCasePropsToDashCase = require('./camel-case-props-to-dash-case'); | ||
@@ -27,3 +31,3 @@ | ||
return Object.keys(style).map(function (property) { | ||
return property + ': ' + style[property] + ';'; | ||
return property + ': ' + (0, _quoteValueIfNeeded2.default)(property, style[property]) + ';'; | ||
}).join('\n'); | ||
@@ -30,0 +34,0 @@ } |
@@ -42,2 +42,6 @@ 'use strict'; | ||
function isStateless(component) { | ||
return !component.render && !(component.prototype && component.prototype.render); | ||
} | ||
function enhanceWithRadium(configOrComposedComponent) { | ||
@@ -65,3 +69,3 @@ var _class, _temp; | ||
// Handle stateless components | ||
if (!ComposedComponent.render && !ComposedComponent.prototype.render) { | ||
if (isStateless(ComposedComponent)) { | ||
ComposedComponent = function (_Component) { | ||
@@ -68,0 +72,0 @@ _inherits(ComposedComponent, _Component); |
@@ -13,2 +13,2 @@ "use strict"; | ||
} | ||
module.exports = exports['default']; | ||
module.exports = exports["default"]; |
@@ -23,2 +23,6 @@ 'use strict'; | ||
var _removeNestedStylesPlugin = require('./remove-nested-styles-plugin'); | ||
var _removeNestedStylesPlugin2 = _interopRequireDefault(_removeNestedStylesPlugin); | ||
var _resolveInteractionStylesPlugin = require('./resolve-interaction-styles-plugin'); | ||
@@ -38,4 +42,2 @@ | ||
/* eslint-disable block-scoped-const */ | ||
exports.default = { | ||
@@ -46,2 +48,3 @@ checkProps: _checkPropsPlugin2.default, | ||
prefix: _prefixPlugin2.default, | ||
removeNestedStyles: _removeNestedStylesPlugin2.default, | ||
resolveInteractionStyles: _resolveInteractionStylesPlugin2.default, | ||
@@ -51,2 +54,4 @@ resolveMediaQueries: _resolveMediaQueriesPlugin2.default, | ||
}; | ||
/* eslint-disable block-scoped-const */ | ||
module.exports = exports['default']; |
@@ -104,3 +104,3 @@ 'use strict'; | ||
// Merge the styles in the order they were defined | ||
var interactionStyles = Object.keys(style).filter(function (name) { | ||
var interactionStyles = props.disabled ? [style[':disabled']] : Object.keys(style).filter(function (name) { | ||
return _isInteractiveStyleField(name) && getState(name); | ||
@@ -115,3 +115,3 @@ }).map(function (name) { | ||
newStyle = Object.keys(newStyle).reduce(function (styleWithoutInteractions, name) { | ||
if (!_isInteractiveStyleField(name)) { | ||
if (!_isInteractiveStyleField(name) && name !== ':disabled') { | ||
styleWithoutInteractions[name] = newStyle[name]; | ||
@@ -118,0 +118,0 @@ } |
@@ -48,3 +48,3 @@ 'use strict'; | ||
var DEFAULT_CONFIG = { | ||
plugins: [_plugins2.default.mergeStyleArray, _plugins2.default.checkProps, _plugins2.default.resolveMediaQueries, _plugins2.default.resolveInteractionStyles, _plugins2.default.keyframes, _plugins2.default.visited, _plugins2.default.prefix, _plugins2.default.checkProps] | ||
plugins: [_plugins2.default.mergeStyleArray, _plugins2.default.checkProps, _plugins2.default.resolveMediaQueries, _plugins2.default.resolveInteractionStyles, _plugins2.default.keyframes, _plugins2.default.visited, _plugins2.default.removeNestedStyles, _plugins2.default.prefix, _plugins2.default.checkProps] | ||
}; | ||
@@ -51,0 +51,0 @@ |
{ | ||
"name": "radium", | ||
"version": "0.17.1", | ||
"version": "0.17.2", | ||
"description": "A set of tools to manage inline styles on React elements", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"dist", | ||
"lib" | ||
], | ||
"repository": { | ||
@@ -27,3 +23,3 @@ "type": "git", | ||
"lib": "npm run babel && rimraf lib/__tests__ lib/__mocks__", | ||
"lint": "eslint src && npm run flow", | ||
"lint": "eslint src examples --ext .js --ext .jsx && npm run flow", | ||
"postinstall": "cd lib || npm run lib", | ||
@@ -47,13 +43,13 @@ "prepublish": "npm run lib && npm run dist && not-in-publish || (npm test && npm run lint && npm run deps-fix)", | ||
"devDependencies": { | ||
"babel-eslint": "^6.0.0", | ||
"babel-eslint": "^6.1.0", | ||
"babel-loader": "^6.2.0", | ||
"chai": "^3.0.0", | ||
"color": "^0.11.1", | ||
"concurrently": "^1.0.0", | ||
"color": "^0.11.3", | ||
"concurrently": "^2.2.0", | ||
"coveralls": "^2.11.2", | ||
"eslint": "^2.5.3", | ||
"eslint-plugin-flow-vars": "^0.2.1", | ||
"eslint-plugin-react": "^4.2.3", | ||
"eslint-plugin-flow-vars": "^0.4.0", | ||
"eslint-plugin-react": "^5.0.1", | ||
"express": "^4.13.3", | ||
"express-http-proxy": "^0.6.0", | ||
"express-http-proxy": "^0.7.2", | ||
"flow-bin": "^0.20.1", | ||
@@ -63,11 +59,11 @@ "in-publish": "^2.0.0", | ||
"isparta-loader": "^2.0.0", | ||
"karma": "^0.13.3", | ||
"karma": "^1.1.0", | ||
"karma-babel-preprocessor": "^6.0.1", | ||
"karma-coverage": "^0.5.3", | ||
"karma-ie-launcher": "^0.2.0", | ||
"karma-mocha": "^0.2.0", | ||
"karma-mocha-reporter": "^1.1.4", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"karma-coverage": "^1.0.0", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-mocha": "^1.1.1", | ||
"karma-mocha-reporter": "^2.0.3", | ||
"karma-phantomjs-launcher": "^1.0.1", | ||
"karma-phantomjs-shim": "^1.0.0", | ||
"karma-sinon-chai": "^1.0.0", | ||
"karma-sinon-chai": "^1.2.1", | ||
"karma-webpack": "^1.7.0", | ||
@@ -81,5 +77,5 @@ "lodash.merge": "^4.0.2", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"react": "^0.14.0", | ||
"react-addons-test-utils": "^0.14.0", | ||
"react-dom": "^0.14.0", | ||
"react": "^15.0.1", | ||
"react-addons-test-utils": "^15.0.1", | ||
"react-dom": "^15.0.1", | ||
"sinon": "^1.15.3", | ||
@@ -91,9 +87,9 @@ "sinon-chai": "^2.8.0", | ||
"babel-core": "^6.3.15", | ||
"babel-plugin-add-module-exports": "^0.1.1", | ||
"babel-plugin-add-module-exports": "^0.2.0", | ||
"babel-plugin-transform-decorators-legacy": "^1.2.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.4", | ||
"babel-preset-es2015-loose": "^6.1.3", | ||
"babel-preset-react": "^6.3.13", | ||
"babel-preset-react": "^6.11.1", | ||
"babel-preset-stage-1": "^6.3.13" | ||
} | ||
} |
@@ -139,2 +139,6 @@ [![Travis Status][trav_img]][trav_site] | ||
## More with Radium | ||
You can find a list of other tools, components, and frameworks to help you build with Radium on our [wiki](https://github.com/FormidableLabs/radium/wiki). Contributions welcome! | ||
## Contributing | ||
@@ -141,0 +145,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
470328
87
8849
162
18
1