@mui/system
Advanced tools
Comparing version 5.15.4 to 5.15.5
@@ -25,2 +25,3 @@ "use strict"; | ||
var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage")); | ||
var _utils = require("@mui/utils"); | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
@@ -35,3 +36,3 @@ | ||
*/ | ||
function clamp(value, min = 0, max = 1) { | ||
function clampWrapper(value, min = 0, max = 1) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -42,3 +43,3 @@ if (value < min || value > max) { | ||
} | ||
return Math.min(Math.max(min, value), max); | ||
return (0, _utils.clamp)(value, min, max); | ||
} | ||
@@ -251,3 +252,3 @@ | ||
color = decomposeColor(color); | ||
value = clamp(value); | ||
value = clampWrapper(value); | ||
if (color.type === 'rgb' || color.type === 'hsl') { | ||
@@ -282,3 +283,3 @@ color.type += 'a'; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -312,3 +313,3 @@ color.values[2] *= 1 - coefficient; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -315,0 +316,0 @@ color.values[2] += (100 - color.values[2]) * coefficient; |
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage"; | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { clamp } from '@mui/utils'; | ||
/** | ||
@@ -10,3 +11,3 @@ * Returns a number whose value is limited to the given range. | ||
*/ | ||
function clamp(value, min = 0, max = 1) { | ||
function clampWrapper(value, min = 0, max = 1) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -17,3 +18,3 @@ if (value < min || value > max) { | ||
} | ||
return Math.min(Math.max(min, value), max); | ||
return clamp(value, min, max); | ||
} | ||
@@ -224,3 +225,3 @@ | ||
color = decomposeColor(color); | ||
value = clamp(value); | ||
value = clampWrapper(value); | ||
if (color.type === 'rgb' || color.type === 'hsl') { | ||
@@ -255,3 +256,3 @@ color.type += 'a'; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -285,3 +286,3 @@ color.values[2] *= 1 - coefficient; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -288,0 +289,0 @@ color.values[2] += (100 - color.values[2]) * coefficient; |
/** | ||
* @mui/system v5.15.4 | ||
* @mui/system v5.15.5 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage"; | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { clamp } from '@mui/utils'; | ||
/** | ||
@@ -10,3 +11,3 @@ * Returns a number whose value is limited to the given range. | ||
*/ | ||
function clamp(value) { | ||
function clampWrapper(value) { | ||
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; | ||
@@ -19,3 +20,3 @@ var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; | ||
} | ||
return Math.min(Math.max(min, value), max); | ||
return clamp(value, min, max); | ||
} | ||
@@ -231,3 +232,3 @@ | ||
color = decomposeColor(color); | ||
value = clamp(value); | ||
value = clampWrapper(value); | ||
if (color.type === 'rgb' || color.type === 'hsl') { | ||
@@ -262,3 +263,3 @@ color.type += 'a'; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -292,3 +293,3 @@ color.values[2] *= 1 - coefficient; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -295,0 +296,0 @@ color.values[2] += (100 - color.values[2]) * coefficient; |
/** | ||
* @mui/system v5.15.4 | ||
* @mui/system v5.15.5 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage"; | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { clamp } from '@mui/utils'; | ||
/** | ||
@@ -10,3 +11,3 @@ * Returns a number whose value is limited to the given range. | ||
*/ | ||
function clamp(value, min = 0, max = 1) { | ||
function clampWrapper(value, min = 0, max = 1) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -17,3 +18,3 @@ if (value < min || value > max) { | ||
} | ||
return Math.min(Math.max(min, value), max); | ||
return clamp(value, min, max); | ||
} | ||
@@ -224,3 +225,3 @@ | ||
color = decomposeColor(color); | ||
value = clamp(value); | ||
value = clampWrapper(value); | ||
if (color.type === 'rgb' || color.type === 'hsl') { | ||
@@ -255,3 +256,3 @@ color.type += 'a'; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -285,3 +286,3 @@ color.values[2] *= 1 - coefficient; | ||
color = decomposeColor(color); | ||
coefficient = clamp(coefficient); | ||
coefficient = clampWrapper(coefficient); | ||
if (color.type.indexOf('hsl') !== -1) { | ||
@@ -288,0 +289,0 @@ color.values[2] += (100 - color.values[2]) * coefficient; |
/** | ||
* @mui/system v5.15.4 | ||
* @mui/system v5.15.5 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
{ | ||
"name": "@mui/system", | ||
"version": "5.15.4", | ||
"version": "5.15.5", | ||
"private": false, | ||
@@ -29,10 +29,10 @@ "author": "MUI Team", | ||
"dependencies": { | ||
"@babel/runtime": "^7.23.7", | ||
"@babel/runtime": "^7.23.8", | ||
"clsx": "^2.1.0", | ||
"csstype": "^3.1.2", | ||
"prop-types": "^15.8.1", | ||
"@mui/private-theming": "^5.15.4", | ||
"@mui/private-theming": "^5.15.5", | ||
"@mui/types": "^7.2.13", | ||
"@mui/utils": "^5.15.4", | ||
"@mui/styled-engine": "^5.15.4" | ||
"@mui/utils": "^5.15.5", | ||
"@mui/styled-engine": "^5.15.5" | ||
}, | ||
@@ -39,0 +39,0 @@ "peerDependencies": { |
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
1529722
20436
Updated@babel/runtime@^7.23.8
Updated@mui/private-theming@^5.15.5
Updated@mui/styled-engine@^5.15.5
Updated@mui/utils@^5.15.5