@material-ui/system
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2
import style from './style'; | ||
import compose from './compose'; | ||
function transform(value) { | ||
return value <= 1 ? `${value * 100}%` : value; | ||
} | ||
export const width = style({ | ||
prop: 'width' | ||
prop: 'width', | ||
transform | ||
}); | ||
export const maxWidth = style({ | ||
prop: 'maxWidth' | ||
prop: 'maxWidth', | ||
transform | ||
}); | ||
export const minWidth = style({ | ||
prop: 'minWidth' | ||
prop: 'minWidth', | ||
transform | ||
}); | ||
export const height = style({ | ||
prop: 'height' | ||
prop: 'height', | ||
transform | ||
}); | ||
export const maxHeight = style({ | ||
prop: 'maxHeight' | ||
prop: 'maxHeight', | ||
transform | ||
}); | ||
export const minHeight = style({ | ||
prop: 'minHeight' | ||
prop: 'minHeight', | ||
transform | ||
}); | ||
export const sizeWidth = style({ | ||
prop: 'size', | ||
cssProperty: 'width' | ||
cssProperty: 'width', | ||
transform | ||
}); | ||
export const sizeHeight = style({ | ||
prop: 'size', | ||
cssProperty: 'height' | ||
cssProperty: 'height', | ||
transform | ||
}); | ||
const sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight); | ||
export default sizing; |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v3.0.0-alpha.1 | ||
/** @license Material-UI v3.0.0-alpha.2 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v3.0.0-alpha.1 | ||
/** @license Material-UI v3.0.0-alpha.2 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -5,3 +5,3 @@ { | ||
"author": "Material-UI Team", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-alpha.2", | ||
"description": "Material-UI System - Design system for Material-UI.", | ||
@@ -30,4 +30,4 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@babel/runtime": "7.1.2", | ||
"deepmerge": "^2.0.1", | ||
"@babel/runtime": "^7.2.0", | ||
"deepmerge": "^3.0.0", | ||
"prop-types": "^15.6.0", | ||
@@ -34,0 +34,0 @@ "warning": "^4.0.1" |
@@ -14,24 +14,34 @@ "use strict"; | ||
function transform(value) { | ||
return value <= 1 ? "".concat(value * 100, "%") : value; | ||
} | ||
var width = (0, _style.default)({ | ||
prop: 'width' | ||
prop: 'width', | ||
transform: transform | ||
}); | ||
exports.width = width; | ||
var maxWidth = (0, _style.default)({ | ||
prop: 'maxWidth' | ||
prop: 'maxWidth', | ||
transform: transform | ||
}); | ||
exports.maxWidth = maxWidth; | ||
var minWidth = (0, _style.default)({ | ||
prop: 'minWidth' | ||
prop: 'minWidth', | ||
transform: transform | ||
}); | ||
exports.minWidth = minWidth; | ||
var height = (0, _style.default)({ | ||
prop: 'height' | ||
prop: 'height', | ||
transform: transform | ||
}); | ||
exports.height = height; | ||
var maxHeight = (0, _style.default)({ | ||
prop: 'maxHeight' | ||
prop: 'maxHeight', | ||
transform: transform | ||
}); | ||
exports.maxHeight = maxHeight; | ||
var minHeight = (0, _style.default)({ | ||
prop: 'minHeight' | ||
prop: 'minHeight', | ||
transform: transform | ||
}); | ||
@@ -41,3 +51,4 @@ exports.minHeight = minHeight; | ||
prop: 'size', | ||
cssProperty: 'width' | ||
cssProperty: 'width', | ||
transform: transform | ||
}); | ||
@@ -47,3 +58,4 @@ exports.sizeWidth = sizeWidth; | ||
prop: 'size', | ||
cssProperty: 'height' | ||
cssProperty: 'height', | ||
transform: transform | ||
}); | ||
@@ -50,0 +62,0 @@ exports.sizeHeight = sizeHeight; |
46000
1318
+ Added@babel/runtime@7.26.9(transitive)
+ Addeddeepmerge@3.3.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@babel/runtime@7.1.2(transitive)
- Removeddeepmerge@2.2.1(transitive)
- Removedregenerator-runtime@0.12.1(transitive)
Updated@babel/runtime@^7.2.0
Updateddeepmerge@^3.0.0