@material-ui/system
Advanced tools
Comparing version 4.3.3 to 4.4.3
@@ -17,4 +17,2 @@ "use strict"; | ||
var _warning = _interopRequireDefault(require("warning")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
@@ -43,3 +41,7 @@ | ||
function handleBreakpoints(props, propValue, styleFromPropValue) { | ||
process.env.NODE_ENV !== "production" ? (0, _warning.default)(props.theme, '@material-ui/system: you are calling a style function without a theme value.') : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (!props.theme) { | ||
console.error('@material-ui/system: you are calling a style function without a theme value.'); | ||
} | ||
} | ||
@@ -46,0 +48,0 @@ if (Array.isArray(propValue)) { |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import warning from 'warning'; | ||
import PropTypes from 'prop-types'; | ||
@@ -21,3 +20,7 @@ import merge from './merge'; // The breakpoint **start** at this value. | ||
export function handleBreakpoints(props, propValue, styleFromPropValue) { | ||
process.env.NODE_ENV !== "production" ? warning(props.theme, '@material-ui/system: you are calling a style function without a theme value.') : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (!props.theme) { | ||
console.error('@material-ui/system: you are calling a style function without a theme value.'); | ||
} | ||
} | ||
@@ -24,0 +27,0 @@ if (Array.isArray(propValue)) { |
@@ -1,2 +0,1 @@ | ||
import warning from 'warning'; | ||
import responsivePropType from './responsivePropType'; | ||
@@ -53,3 +52,8 @@ import { handleBreakpoints } from './breakpoints'; | ||
return abs => { | ||
process.env.NODE_ENV !== "production" ? warning(abs <= themeSpacing.length - 1, [`@material-ui/system: the value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (abs > themeSpacing.length - 1) { | ||
console.error([`@material-ui/system: the value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n')); | ||
} | ||
} | ||
return themeSpacing[abs]; | ||
@@ -63,3 +67,6 @@ }; | ||
process.env.NODE_ENV !== "production" ? warning(false, [`@material-ui/system: the \`theme.spacing\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
console.error([`@material-ui/system: the \`theme.spacing\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n')); | ||
} | ||
return () => undefined; | ||
@@ -66,0 +73,0 @@ } |
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import warning from 'warning'; | ||
import PropTypes from 'prop-types'; | ||
@@ -25,3 +24,7 @@ import merge from './merge'; // The breakpoint **start** at this value. | ||
export function handleBreakpoints(props, propValue, styleFromPropValue) { | ||
process.env.NODE_ENV !== "production" ? warning(props.theme, '@material-ui/system: you are calling a style function without a theme value.') : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (!props.theme) { | ||
console.error('@material-ui/system: you are calling a style function without a theme value.'); | ||
} | ||
} | ||
@@ -28,0 +31,0 @@ if (Array.isArray(propValue)) { |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.3.3 | ||
/** @license Material-UI v4.4.3 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import warning from 'warning'; | ||
import responsivePropType from './responsivePropType'; | ||
@@ -62,3 +61,8 @@ import { handleBreakpoints } from './breakpoints'; | ||
return function (abs) { | ||
process.env.NODE_ENV !== "production" ? warning(abs <= themeSpacing.length - 1, ["@material-ui/system: the value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (abs > themeSpacing.length - 1) { | ||
console.error(["@material-ui/system: the value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n')); | ||
} | ||
} | ||
return themeSpacing[abs]; | ||
@@ -72,3 +76,6 @@ }; | ||
process.env.NODE_ENV !== "production" ? warning(false, ["@material-ui/system: the `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
console.error(["@material-ui/system: the `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n')); | ||
} | ||
return function () { | ||
@@ -75,0 +82,0 @@ return undefined; |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.3.3 | ||
/** @license Material-UI v4.4.3 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@material-ui/system", | ||
"version": "4.3.3", | ||
"version": "4.4.3", | ||
"private": false, | ||
@@ -32,4 +32,3 @@ "author": "Material-UI Team", | ||
"deepmerge": "^4.0.0", | ||
"prop-types": "^15.7.2", | ||
"warning": "^4.0.1" | ||
"prop-types": "^15.7.2" | ||
}, | ||
@@ -36,0 +35,0 @@ "sideEffects": false, |
@@ -12,4 +12,2 @@ "use strict"; | ||
var _warning = _interopRequireDefault(require("warning")); | ||
var _responsivePropType = _interopRequireDefault(require("./responsivePropType")); | ||
@@ -78,3 +76,8 @@ | ||
return function (abs) { | ||
process.env.NODE_ENV !== "production" ? (0, _warning.default)(abs <= themeSpacing.length - 1, ["@material-ui/system: the value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (abs > themeSpacing.length - 1) { | ||
console.error(["@material-ui/system: the value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n')); | ||
} | ||
} | ||
return themeSpacing[abs]; | ||
@@ -88,3 +91,6 @@ }; | ||
process.env.NODE_ENV !== "production" ? (0, _warning.default)(false, ["@material-ui/system: the `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n')) : void 0; | ||
if (process.env.NODE_ENV !== 'production') { | ||
console.error(["@material-ui/system: the `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n')); | ||
} | ||
return function () { | ||
@@ -91,0 +97,0 @@ return undefined; |
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
544196
5
2125
- Removedwarning@^4.0.1
- Removedwarning@4.0.3(transitive)