@material-ui/system
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.default = exports.whiteSpace = exports.textOverflow = exports.overflow = exports.displayPrint = exports.displayRaw = void 0; | ||
exports.default = exports.whiteSpace = exports.visibility = exports.textOverflow = exports.overflow = exports.displayRaw = exports.displayPrint = void 0; | ||
@@ -15,6 +15,2 @@ var _style = _interopRequireDefault(require("./style")); | ||
var displayRaw = (0, _style.default)({ | ||
prop: 'display' | ||
}); | ||
exports.displayRaw = displayRaw; | ||
var displayPrint = (0, _style.default)({ | ||
@@ -32,2 +28,6 @@ prop: 'displayPrint', | ||
exports.displayPrint = displayPrint; | ||
var displayRaw = (0, _style.default)({ | ||
prop: 'display' | ||
}); | ||
exports.displayRaw = displayRaw; | ||
var overflow = (0, _style.default)({ | ||
@@ -41,2 +41,6 @@ prop: 'overflow' | ||
exports.textOverflow = textOverflow; | ||
var visibility = (0, _style.default)({ | ||
prop: 'visibility' | ||
}); | ||
exports.visibility = visibility; | ||
var whiteSpace = (0, _style.default)({ | ||
@@ -47,4 +51,4 @@ prop: 'whiteSpace' | ||
var _default = (0, _compose.default)(displayRaw, displayPrint, overflow, textOverflow, whiteSpace); | ||
var _default = (0, _compose.default)(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace); | ||
exports.default = _default; |
import style from './style'; | ||
import compose from './compose'; | ||
export const displayRaw = style({ | ||
prop: 'display' | ||
}); | ||
export const displayPrint = style({ | ||
@@ -15,2 +12,5 @@ prop: 'displayPrint', | ||
}); | ||
export const displayRaw = style({ | ||
prop: 'display' | ||
}); | ||
export const overflow = style({ | ||
@@ -22,5 +22,8 @@ prop: 'overflow' | ||
}); | ||
export const visibility = style({ | ||
prop: 'visibility' | ||
}); | ||
export const whiteSpace = style({ | ||
prop: 'whiteSpace' | ||
}); | ||
export default compose(displayRaw, displayPrint, overflow, textOverflow, whiteSpace); | ||
export default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace); |
@@ -17,2 +17,8 @@ import warning from 'warning'; | ||
y: ['Top', 'Bottom'] | ||
}; | ||
const aliases = { | ||
marginX: 'mx', | ||
marginY: 'my', | ||
paddingX: 'px', | ||
paddingY: 'py' | ||
}; // memoize() impact: | ||
@@ -24,4 +30,8 @@ // From 300,000 ops/sec | ||
// It's not a shorthand notation. | ||
if (prop.length > 3) { | ||
return [prop]; | ||
if (prop.length > 2) { | ||
if (aliases[prop]) { | ||
prop = aliases[prop]; | ||
} else { | ||
return [prop]; | ||
} | ||
} | ||
@@ -34,3 +44,3 @@ | ||
}); | ||
const spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']; | ||
const spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY']; | ||
@@ -89,3 +99,3 @@ function getTransformer(theme) { | ||
return Object.keys(props).map(prop => { | ||
// Using a hash computation over an array iteration could be faster, but with only 14 items, | ||
// Using a hash computation over an array iteration could be faster, but with only 28 items, | ||
// it's doesn't worth the bundle size. | ||
@@ -92,0 +102,0 @@ if (spacingKeys.indexOf(prop) === -1) { |
import style from './style'; | ||
import compose from './compose'; | ||
export var displayRaw = style({ | ||
prop: 'display' | ||
}); | ||
export var displayPrint = style({ | ||
@@ -17,2 +14,5 @@ prop: 'displayPrint', | ||
}); | ||
export var displayRaw = style({ | ||
prop: 'display' | ||
}); | ||
export var overflow = style({ | ||
@@ -24,5 +24,8 @@ prop: 'overflow' | ||
}); | ||
export var visibility = style({ | ||
prop: 'visibility' | ||
}); | ||
export var whiteSpace = style({ | ||
prop: 'whiteSpace' | ||
}); | ||
export default compose(displayRaw, displayPrint, overflow, textOverflow, whiteSpace); | ||
export default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace); |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.2.0 | ||
/** @license Material-UI v4.3.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -18,2 +18,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
y: ['Top', 'Bottom'] | ||
}; | ||
var aliases = { | ||
marginX: 'mx', | ||
marginY: 'my', | ||
paddingX: 'px', | ||
paddingY: 'py' | ||
}; // memoize() impact: | ||
@@ -25,4 +31,8 @@ // From 300,000 ops/sec | ||
// It's not a shorthand notation. | ||
if (prop.length > 3) { | ||
return [prop]; | ||
if (prop.length > 2) { | ||
if (aliases[prop]) { | ||
prop = aliases[prop]; | ||
} else { | ||
return [prop]; | ||
} | ||
} | ||
@@ -41,3 +51,3 @@ | ||
}); | ||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']; | ||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY']; | ||
@@ -102,3 +112,3 @@ function getTransformer(theme) { | ||
return Object.keys(props).map(function (prop) { | ||
// Using a hash computation over an array iteration could be faster, but with only 14 items, | ||
// Using a hash computation over an array iteration could be faster, but with only 28 items, | ||
// it's doesn't worth the bundle size. | ||
@@ -105,0 +115,0 @@ if (spacingKeys.indexOf(prop) === -1) { |
@@ -62,3 +62,3 @@ import * as CSS from 'csstype'; | ||
export const display: SimpleStyleFunction< | ||
'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'whiteSpace' | ||
'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace' | ||
>; | ||
@@ -137,6 +137,8 @@ | ||
| 'margin' | ||
| 'marginLeft' | ||
| 'marginTop' | ||
| 'marginRight' | ||
| 'marginBottom' | ||
| 'marginLeft' | ||
| 'marginX' | ||
| 'marginY' | ||
| 'padding' | ||
@@ -147,2 +149,4 @@ | 'paddingTop' | ||
| 'paddingLeft' | ||
| 'paddingX' | ||
| 'paddingY' | ||
>; | ||
@@ -149,0 +153,0 @@ export type SpacingProps = PropsFor<typeof spacing>; |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.2.0 | ||
/** @license Material-UI v4.3.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@material-ui/system", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "Material-UI Team", |
@@ -33,2 +33,8 @@ "use strict"; | ||
y: ['Top', 'Bottom'] | ||
}; | ||
var aliases = { | ||
marginX: 'mx', | ||
marginY: 'my', | ||
paddingX: 'px', | ||
paddingY: 'py' | ||
}; // memoize() impact: | ||
@@ -40,4 +46,8 @@ // From 300,000 ops/sec | ||
// It's not a shorthand notation. | ||
if (prop.length > 3) { | ||
return [prop]; | ||
if (prop.length > 2) { | ||
if (aliases[prop]) { | ||
prop = aliases[prop]; | ||
} else { | ||
return [prop]; | ||
} | ||
} | ||
@@ -56,3 +66,3 @@ | ||
}); | ||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']; | ||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY']; | ||
@@ -117,3 +127,3 @@ function getTransformer(theme) { | ||
return Object.keys(props).map(function (prop) { | ||
// Using a hash computation over an array iteration could be faster, but with only 14 items, | ||
// Using a hash computation over an array iteration could be faster, but with only 28 items, | ||
// it's doesn't worth the bundle size. | ||
@@ -120,0 +130,0 @@ if (spacingKeys.indexOf(prop) === -1) { |
Sorry, the diff of this file is too big to display
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
513991
2111