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

styled-system

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-system - npm Package Compare versions

Comparing version 2.0.0-3 to 2.0.0

56

dist/styles.js

@@ -301,28 +301,42 @@ 'use strict';

// pseudos
var hover = exports.hover = (0, _util.pseudoStyle)('hover')({
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
var hover = exports.hover = (0, _util.pseudoStyle)({
prop: 'hover',
pseudoclass: 'hover',
keys: {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
}
});
var focus = exports.focus = (0, _util.pseudoStyle)('focus')({
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
var focus = exports.focus = (0, _util.pseudoStyle)({
prop: 'focus',
keys: {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
}
});
var active = exports.active = (0, _util.pseudoStyle)('active')({
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
var active = exports.active = (0, _util.pseudoStyle)({
prop: 'active',
keys: {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
}
});
var disabled = exports.disabled = (0, _util.pseudoStyle)('disabled', 'disabledStyle')({
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
var disabled = exports.disabled = (0, _util.pseudoStyle)({
prop: 'disabledStyle',
pseudoclass: 'disabled',
keys: {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
boxShadow: 'shadows'
}
});

@@ -332,3 +346,3 @@

// these will be removed in v3
var __DEV__ = process.env.NODE_ENV !== 'production'; // && typeof console !== 'undefined')
var __DEV__ = process.env.NODE_ENV !== 'production';

@@ -335,0 +349,0 @@ var borderWidth = exports.borderWidth = (0, _util.style)({

@@ -161,25 +161,29 @@ 'use strict';

var pseudoStyle = exports.pseudoStyle = function pseudoStyle(pseudoclass, prop) {
return function () {
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
// export const pseudoStyle = (pseudoclass, prop) => (keys = {}) => {
var pseudoStyle = exports.pseudoStyle = function pseudoStyle(_ref6) {
var prop = _ref6.prop,
alias = _ref6.alias,
pseudoclass = _ref6.pseudoclass,
_ref6$keys = _ref6.keys,
keys = _ref6$keys === undefined ? {} : _ref6$keys,
_ref6$getters = _ref6.getters,
getters = _ref6$getters === undefined ? {} : _ref6$getters,
_ref6$numberToPx = _ref6.numberToPx,
numberToPx = _ref6$numberToPx === undefined ? {} : _ref6$numberToPx;
var fn = function fn(props) {
var style = props[prop || pseudoclass];
var numberToPx = keys.numberToPx || {};
for (var key in style) {
var toPx = numberToPx[key];
var fn = function fn(props) {
var style = props[prop] || props[alias];
pseudoclass = pseudoclass || prop;
var th = fallbackTheme(props);
for (var key in style) {
var toPx = numberToPx[key];
if (!keys[key] && !getters[key] && !toPx) continue;
var themeKey = [keys[key], style[key]].join('.');
style[key] = getValue(get(th, themeKey, style[key]), getters[key], numberToPx);
}
if (!keys[key] && !toPx) continue;
var themeKey = [keys[key], style[key]].join('.');
var th = fallbackTheme(props);
style[key] = get(th, themeKey, style[key]);
if (toPx) style[key] = px(style[key]);
}
return (0, _defineProperty3.default)({}, '&:' + pseudoclass, style);
};
fn.propTypes = (0, _defineProperty3.default)({}, prop, _propTypes2.default.object);
return fn;
return (0, _defineProperty3.default)({}, '&:' + pseudoclass, style);
};
fn.propTypes = (0, _defineProperty3.default)({}, prop, _propTypes2.default.object);
return fn;
};

@@ -186,0 +190,0 @@

{
"name": "styled-system",
"version": "2.0.0-3",
"version": "2.0.0",
"description": "Design system utilities for styled-components, glamorous, and other css-in-js libraries",

@@ -8,5 +8,2 @@ "main": "dist/index.js",

"prepare": "babel src -d dist",
"start": "x0 dev docs/App.js -op 8888",
"build": "x0 build docs/App.js -d docs --static --cssLibrary='styled-components'",
"bench": "node bench",
"size": "bundlesize",

@@ -25,3 +22,2 @@ "cover": "nyc report --reporter=html --reporter=lcov > coverage.lcov && codecov",

"devDependencies": {
"@compositor/x0": "^3.1.1",
"ava": "^0.25.0",

@@ -34,17 +30,9 @@ "babel-cli": "^6.24.1",

"babel-register": "^6.24.1",
"benchmark": "^2.1.4",
"bundlesize": "^0.16.0",
"codecov": "^2.2.0",
"grid-styled": "^2.0.0-2",
"microtime": "^2.1.6",
"nyc": "^11.0.3",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-live": "^1.6.1",
"react-test-renderer": "^16.2.0",
"remark": "^9.0.0",
"remark-react": "^4.0.1",
"remark-slug": "^5.0.0",
"sinon": "^4.3.0",
"styled-components": "^3.1.6"
"sinon": "^4.3.0"
},

@@ -51,0 +39,0 @@ "ava": {

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