@mui/system
Advanced tools
Comparing version 5.0.0-rc.0 to 5.0.0-rc.1
@@ -85,3 +85,3 @@ "use strict"; | ||
const borderRadius = props => { | ||
if (props.borderRadius) { | ||
if (props.borderRadius !== undefined && props.borderRadius !== null) { | ||
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'shape.borderRadius', 4, 'borderRadius'); | ||
@@ -88,0 +88,0 @@ |
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.resolveBreakpointValues = resolveBreakpointValues; | ||
exports.default = void 0; | ||
exports.default = exports.values = void 0; | ||
@@ -38,2 +38,3 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
}; | ||
exports.values = values; | ||
const defaultBreakpoints = { | ||
@@ -40,0 +41,0 @@ // Sorted ASC by size. That's important. |
@@ -91,3 +91,3 @@ import * as React from 'react'; | ||
slot?: string; | ||
overridesResolver?: (props: any, styles: Record<string, any>) => Record<string, any>; | ||
overridesResolver?: (props: any, styles: Record<string, CSSInterpolation>) => CSSInterpolation; | ||
skipVariantsResolver?: boolean; | ||
@@ -94,0 +94,0 @@ skipSx?: boolean; |
@@ -113,6 +113,8 @@ "use strict"; | ||
const skipSx = inputSkipSx || false; | ||
let className; | ||
let label; | ||
if (componentName) { | ||
className = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (componentName) { | ||
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
} | ||
} | ||
@@ -131,3 +133,3 @@ | ||
shouldForwardProp: shouldForwardPropOption, | ||
label: className || componentName || '' | ||
label | ||
}, options)); | ||
@@ -134,0 +136,0 @@ |
@@ -0,0 +0,0 @@ export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>; |
@@ -61,3 +61,3 @@ import responsivePropType from './responsivePropType'; | ||
export const borderRadius = props => { | ||
if (props.borderRadius) { | ||
if (props.borderRadius !== undefined && props.borderRadius !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius'); | ||
@@ -64,0 +64,0 @@ |
@@ -7,3 +7,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const values = { | ||
export const values = { | ||
xs: 0, | ||
@@ -10,0 +10,0 @@ // phone |
@@ -94,6 +94,8 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const skipSx = inputSkipSx || false; | ||
let className; | ||
let label; | ||
if (componentName) { | ||
className = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (componentName) { | ||
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
} | ||
} | ||
@@ -112,3 +114,3 @@ | ||
shouldForwardProp: shouldForwardPropOption, | ||
label: className || componentName || '' | ||
label | ||
}, options)); | ||
@@ -115,0 +117,0 @@ |
@@ -7,3 +7,3 @@ import style from './style'; | ||
export const gap = props => { | ||
if (props.gap) { | ||
if (props.gap !== undefined && props.gap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap'); | ||
@@ -25,3 +25,3 @@ | ||
export const columnGap = props => { | ||
if (props.columnGap) { | ||
if (props.columnGap !== undefined && props.columnGap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap'); | ||
@@ -43,3 +43,3 @@ | ||
export const rowGap = props => { | ||
if (props.rowGap) { | ||
if (props.rowGap !== undefined && props.rowGap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap'); | ||
@@ -46,0 +46,0 @@ |
import style from './style'; | ||
import compose from './compose'; | ||
import { handleBreakpoints } from './breakpoints'; | ||
import { handleBreakpoints, values as breakpointsValues } from './breakpoints'; | ||
function transform(value) { | ||
return value <= 1 ? `${value * 100}%` : value; | ||
return value <= 1 && value !== 0 ? `${value * 100}%` : value; | ||
} | ||
@@ -14,5 +14,7 @@ | ||
export const maxWidth = props => { | ||
if (props.maxWidth) { | ||
if (props.maxWidth !== undefined && props.maxWidth !== null) { | ||
const styleFromPropValue = propValue => { | ||
const breakpoint = props.theme.breakpoints.values[propValue]; | ||
var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2; | ||
const breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || breakpointsValues[propValue]; | ||
return { | ||
@@ -19,0 +21,0 @@ maxWidth: breakpoint || transform(propValue) |
@@ -21,3 +21,3 @@ "use strict"; | ||
const gap = props => { | ||
if (props.gap) { | ||
if (props.gap !== undefined && props.gap !== null) { | ||
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'gap'); | ||
@@ -42,3 +42,3 @@ | ||
const columnGap = props => { | ||
if (props.columnGap) { | ||
if (props.columnGap !== undefined && props.columnGap !== null) { | ||
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'columnGap'); | ||
@@ -63,3 +63,3 @@ | ||
const rowGap = props => { | ||
if (props.rowGap) { | ||
if (props.rowGap !== undefined && props.rowGap !== null) { | ||
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'rowGap'); | ||
@@ -66,0 +66,0 @@ |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.0 | ||
/** @license Material-UI v5.0.0-rc.1 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -61,3 +61,3 @@ import responsivePropType from './responsivePropType'; | ||
export var borderRadius = function borderRadius(props) { | ||
if (props.borderRadius) { | ||
if (props.borderRadius !== undefined && props.borderRadius !== null) { | ||
var transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius'); | ||
@@ -64,0 +64,0 @@ |
@@ -9,3 +9,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
var values = { | ||
export var values = { | ||
xs: 0, | ||
@@ -12,0 +12,0 @@ // phone |
@@ -93,6 +93,8 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
var skipSx = inputSkipSx || false; | ||
var className; | ||
var label; | ||
if (componentName) { | ||
className = "".concat(componentName, "-").concat(lowercaseFirstLetter(componentSlot || 'Root')); | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (componentName) { | ||
label = "".concat(componentName, "-").concat(lowercaseFirstLetter(componentSlot || 'Root')); | ||
} | ||
} | ||
@@ -111,3 +113,3 @@ | ||
shouldForwardProp: shouldForwardPropOption, | ||
label: className || componentName || '' | ||
label: label | ||
}, options)); | ||
@@ -114,0 +116,0 @@ |
@@ -7,3 +7,3 @@ import style from './style'; | ||
export var gap = function gap(props) { | ||
if (props.gap) { | ||
if (props.gap !== undefined && props.gap !== null) { | ||
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap'); | ||
@@ -27,3 +27,3 @@ | ||
export var columnGap = function columnGap(props) { | ||
if (props.columnGap) { | ||
if (props.columnGap !== undefined && props.columnGap !== null) { | ||
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap'); | ||
@@ -47,3 +47,3 @@ | ||
export var rowGap = function rowGap(props) { | ||
if (props.rowGap) { | ||
if (props.rowGap !== undefined && props.rowGap !== null) { | ||
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap'); | ||
@@ -50,0 +50,0 @@ |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.0 | ||
/** @license Material-UI v5.0.0-rc.1 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
import style from './style'; | ||
import compose from './compose'; | ||
import { handleBreakpoints } from './breakpoints'; | ||
import { handleBreakpoints, values as breakpointsValues } from './breakpoints'; | ||
function transform(value) { | ||
return value <= 1 ? "".concat(value * 100, "%") : value; | ||
return value <= 1 && value !== 0 ? "".concat(value * 100, "%") : value; | ||
} | ||
@@ -14,5 +14,7 @@ | ||
export var maxWidth = function maxWidth(props) { | ||
if (props.maxWidth) { | ||
if (props.maxWidth !== undefined && props.maxWidth !== null) { | ||
var styleFromPropValue = function styleFromPropValue(propValue) { | ||
var breakpoint = props.theme.breakpoints.values[propValue]; | ||
var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2; | ||
var breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || breakpointsValues[propValue]; | ||
return { | ||
@@ -19,0 +21,0 @@ maxWidth: breakpoint || transform(propValue) |
@@ -61,3 +61,3 @@ import responsivePropType from './responsivePropType'; | ||
export const borderRadius = props => { | ||
if (props.borderRadius) { | ||
if (props.borderRadius !== undefined && props.borderRadius !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius'); | ||
@@ -64,0 +64,0 @@ |
@@ -7,3 +7,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const values = { | ||
export const values = { | ||
xs: 0, | ||
@@ -10,0 +10,0 @@ // phone |
@@ -92,6 +92,8 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
const skipSx = inputSkipSx || false; | ||
let className; | ||
let label; | ||
if (componentName) { | ||
className = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (componentName) { | ||
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`; | ||
} | ||
} | ||
@@ -110,3 +112,3 @@ | ||
shouldForwardProp: shouldForwardPropOption, | ||
label: className || componentName || '' | ||
label | ||
}, options)); | ||
@@ -113,0 +115,0 @@ |
@@ -7,3 +7,3 @@ import style from './style'; | ||
export const gap = props => { | ||
if (props.gap) { | ||
if (props.gap !== undefined && props.gap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap'); | ||
@@ -25,3 +25,3 @@ | ||
export const columnGap = props => { | ||
if (props.columnGap) { | ||
if (props.columnGap !== undefined && props.columnGap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap'); | ||
@@ -43,3 +43,3 @@ | ||
export const rowGap = props => { | ||
if (props.rowGap) { | ||
if (props.rowGap !== undefined && props.rowGap !== null) { | ||
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap'); | ||
@@ -46,0 +46,0 @@ |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.0 | ||
/** @license Material-UI v5.0.0-rc.1 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
import style from './style'; | ||
import compose from './compose'; | ||
import { handleBreakpoints } from './breakpoints'; | ||
import { handleBreakpoints, values as breakpointsValues } from './breakpoints'; | ||
function transform(value) { | ||
return value <= 1 ? `${value * 100}%` : value; | ||
return value <= 1 && value !== 0 ? `${value * 100}%` : value; | ||
} | ||
@@ -14,5 +14,5 @@ | ||
export const maxWidth = props => { | ||
if (props.maxWidth) { | ||
if (props.maxWidth !== undefined && props.maxWidth !== null) { | ||
const styleFromPropValue = propValue => { | ||
const breakpoint = props.theme.breakpoints.values[propValue]; | ||
const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue]; | ||
return { | ||
@@ -19,0 +19,0 @@ maxWidth: breakpoint || transform(propValue) |
{ | ||
"name": "@mui/system", | ||
"version": "5.0.0-rc.0", | ||
"version": "5.0.0-rc.1", | ||
"private": false, | ||
@@ -17,3 +17,3 @@ "author": "Material-UI Team", | ||
"url": "https://github.com/mui-org/material-ui.git", | ||
"directory": "packages/material-ui-system" | ||
"directory": "packages/mui-system" | ||
}, | ||
@@ -48,6 +48,6 @@ "license": "MIT", | ||
"@babel/runtime": "^7.14.8", | ||
"@mui/private-theming": "5.0.0-rc.0", | ||
"@mui/styled-engine": "5.0.0-rc.0", | ||
"@mui/types": "7.0.0-rc.0", | ||
"@mui/utils": "5.0.0-rc.0", | ||
"@mui/private-theming": "5.0.0-rc.1", | ||
"@mui/styled-engine": "5.0.0-rc.1", | ||
"@mui/types": "7.0.0-rc.1", | ||
"@mui/utils": "5.0.0-rc.1", | ||
"clsx": "^1.1.1", | ||
@@ -54,0 +54,0 @@ "csstype": "^3.0.8", |
@@ -17,3 +17,3 @@ "use strict"; | ||
function transform(value) { | ||
return value <= 1 ? `${value * 100}%` : value; | ||
return value <= 1 && value !== 0 ? `${value * 100}%` : value; | ||
} | ||
@@ -28,5 +28,7 @@ | ||
const maxWidth = props => { | ||
if (props.maxWidth) { | ||
if (props.maxWidth !== undefined && props.maxWidth !== null) { | ||
const styleFromPropValue = propValue => { | ||
const breakpoint = props.theme.breakpoints.values[propValue]; | ||
var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2; | ||
const breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || _breakpoints.values[propValue]; | ||
return { | ||
@@ -33,0 +35,0 @@ maxWidth: breakpoint || transform(propValue) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
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
595410
8250
100
1
+ Added@mui/private-theming@5.0.0-rc.1(transitive)
+ Added@mui/styled-engine@5.0.0-rc.1(transitive)
+ Added@mui/types@7.0.0-rc.1(transitive)
+ Added@mui/utils@5.0.0-rc.1(transitive)
- Removed@mui/private-theming@5.0.0-rc.0(transitive)
- Removed@mui/styled-engine@5.0.0-rc.0(transitive)
- Removed@mui/types@7.0.0-rc.0(transitive)
- Removed@mui/utils@5.0.0-rc.0(transitive)
Updated@mui/types@7.0.0-rc.1
Updated@mui/utils@5.0.0-rc.1