@mui/utils
Advanced tools
Comparing version 5.0.0-rc.1 to 5.0.0
@@ -18,3 +18,3 @@ "use strict"; | ||
if (typeof string !== 'string') { | ||
throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: \`capitalize(string)\` expects a string argument.` : (0, _formatMuiErrorMessage2.default)(7)); | ||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`capitalize(string)\` expects a string argument.` : (0, _formatMuiErrorMessage2.default)(7)); | ||
} | ||
@@ -21,0 +21,0 @@ |
@@ -51,3 +51,3 @@ "use strict"; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -54,0 +54,0 @@ |
@@ -50,3 +50,3 @@ "use strict"; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -53,0 +53,0 @@ |
@@ -8,3 +8,3 @@ import _formatMuiErrorMessage from "./formatMuiErrorMessage"; | ||
if (typeof string !== 'string') { | ||
throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: \`capitalize(string)\` expects a string argument.` : _formatMuiErrorMessage(7)); | ||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`capitalize(string)\` expects a string argument.` : _formatMuiErrorMessage(7)); | ||
} | ||
@@ -11,0 +11,0 @@ |
@@ -41,3 +41,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -44,0 +44,0 @@ |
@@ -40,3 +40,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -12,3 +12,3 @@ /** | ||
/* eslint-disable prefer-template */ | ||
let url = 'https://material-ui.com/production-error/?code=' + code; | ||
let url = 'https://mui.com/production-error/?code=' + code; | ||
@@ -21,4 +21,4 @@ for (let i = 1; i < arguments.length; i += 1) { | ||
return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.'; | ||
return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.'; | ||
/* eslint-enable prefer-template */ | ||
} |
@@ -19,3 +19,3 @@ /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ | ||
if (isControlled !== (controlled !== undefined)) { | ||
console.error([`Material-UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
} | ||
@@ -28,3 +28,3 @@ }, [state, name, controlled]); | ||
if (!isControlled && defaultValue !== defaultProp) { | ||
console.error([`Material-UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
} | ||
@@ -31,0 +31,0 @@ }, [JSON.stringify(defaultProp)]); |
@@ -19,3 +19,3 @@ "use strict"; | ||
/* eslint-disable prefer-template */ | ||
let url = 'https://material-ui.com/production-error/?code=' + code; | ||
let url = 'https://mui.com/production-error/?code=' + code; | ||
@@ -28,4 +28,4 @@ for (let i = 1; i < arguments.length; i += 1) { | ||
return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.'; | ||
return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.'; | ||
/* eslint-enable prefer-template */ | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.1 | ||
/** @license MUI v5.0.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -8,3 +8,3 @@ import _formatMuiErrorMessage from "./formatMuiErrorMessage"; | ||
if (typeof string !== 'string') { | ||
throw new Error(process.env.NODE_ENV !== "production" ? "Material-UI: `capitalize(string)` expects a string argument." : _formatMuiErrorMessage(7)); | ||
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : _formatMuiErrorMessage(7)); | ||
} | ||
@@ -11,0 +11,0 @@ |
@@ -40,3 +40,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -39,3 +39,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element type that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element type that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -42,0 +42,0 @@ |
@@ -12,3 +12,3 @@ /** | ||
/* eslint-disable prefer-template */ | ||
var url = 'https://material-ui.com/production-error/?code=' + code; | ||
var url = 'https://mui.com/production-error/?code=' + code; | ||
@@ -21,4 +21,4 @@ for (var i = 1; i < arguments.length; i += 1) { | ||
return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.'; | ||
return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.'; | ||
/* eslint-enable prefer-template */ | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.1 | ||
/** @license MUI v5.0.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -23,3 +23,3 @@ /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ | ||
if (isControlled !== (controlled !== undefined)) { | ||
console.error(["Material-UI: A component is changing the ".concat(isControlled ? '' : 'un', "controlled ").concat(state, " state of ").concat(name, " to be ").concat(isControlled ? 'un' : '', "controlled."), 'Elements should not switch from uncontrolled to controlled (or vice versa).', "Decide between using a controlled or uncontrolled ".concat(name, " ") + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
console.error(["MUI: A component is changing the ".concat(isControlled ? '' : 'un', "controlled ").concat(state, " state of ").concat(name, " to be ").concat(isControlled ? 'un' : '', "controlled."), 'Elements should not switch from uncontrolled to controlled (or vice versa).', "Decide between using a controlled or uncontrolled ".concat(name, " ") + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
} | ||
@@ -33,3 +33,3 @@ }, [state, name, controlled]); | ||
if (!isControlled && defaultValue !== defaultProp) { | ||
console.error(["Material-UI: A component is changing the default ".concat(state, " state of an uncontrolled ").concat(name, " after being initialized. ") + "To suppress this warning opt to use a controlled ".concat(name, ".")].join('\n')); | ||
console.error(["MUI: A component is changing the default ".concat(state, " state of an uncontrolled ").concat(name, " after being initialized. ") + "To suppress this warning opt to use a controlled ".concat(name, ".")].join('\n')); | ||
} | ||
@@ -36,0 +36,0 @@ }, [JSON.stringify(defaultProp)]); |
@@ -8,3 +8,3 @@ import _formatMuiErrorMessage from "./formatMuiErrorMessage"; | ||
if (typeof string !== 'string') { | ||
throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: \`capitalize(string)\` expects a string argument.` : _formatMuiErrorMessage(7)); | ||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`capitalize(string)\` expects a string argument.` : _formatMuiErrorMessage(7)); | ||
} | ||
@@ -11,0 +11,0 @@ |
@@ -41,3 +41,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -44,0 +44,0 @@ |
@@ -40,3 +40,3 @@ import PropTypes from 'prop-types'; | ||
if (warningHint !== undefined) { | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://material-ui.com/r/caveat-with-refs-guide'); | ||
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide'); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -12,3 +12,3 @@ /** | ||
/* eslint-disable prefer-template */ | ||
let url = 'https://material-ui.com/production-error/?code=' + code; | ||
let url = 'https://mui.com/production-error/?code=' + code; | ||
@@ -21,4 +21,4 @@ for (let i = 1; i < arguments.length; i += 1) { | ||
return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.'; | ||
return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.'; | ||
/* eslint-enable prefer-template */ | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v5.0.0-rc.1 | ||
/** @license MUI v5.0.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -19,3 +19,3 @@ /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ | ||
if (isControlled !== (controlled !== undefined)) { | ||
console.error([`Material-UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
} | ||
@@ -28,3 +28,3 @@ }, [state, name, controlled]); | ||
if (!isControlled && defaultValue !== defaultProp) { | ||
console.error([`Material-UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
} | ||
@@ -31,0 +31,0 @@ }, [JSON.stringify(defaultProp)]); |
{ | ||
"name": "@mui/utils", | ||
"version": "5.0.0-rc.1", | ||
"version": "5.0.0", | ||
"private": false, | ||
"author": "Material-UI Team", | ||
"author": "MUI Team", | ||
"description": "Utility functions for React components.", | ||
@@ -23,3 +23,3 @@ "main": "./index.js", | ||
}, | ||
"homepage": "https://github.com/mui-org/material-ui/tree/next/packages/mui-utils", | ||
"homepage": "https://github.com/mui-org/material-ui/tree/master/packages/mui-utils", | ||
"peerDependencies": { | ||
@@ -26,0 +26,0 @@ "react": "^17.0.2" |
# @mui/utils | ||
Shared utilities used by Material-UI packages. | ||
Shared utilities used by MUI packages. |
@@ -31,3 +31,3 @@ "use strict"; | ||
if (isControlled !== (controlled !== undefined)) { | ||
console.error([`Material-UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n')); | ||
} | ||
@@ -40,3 +40,3 @@ }, [state, name, controlled]); | ||
if (!isControlled && defaultValue !== defaultProp) { | ||
console.error([`Material-UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n')); | ||
} | ||
@@ -43,0 +43,0 @@ }, [JSON.stringify(defaultProp)]); |
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
445740
0
0