@mui/system
Advanced tools
Comparing version 5.10.14 to 5.10.15
export {}; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export interface ContainerClasses { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
export {}; |
@@ -0,0 +0,0 @@ export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>; |
@@ -126,3 +126,3 @@ "use strict"; | ||
// 3. Start composing the theme object | ||
let theme = (0, _extends2.default)({}, parsedTheme, { | ||
const theme = (0, _extends2.default)({}, parsedTheme, { | ||
components, | ||
@@ -152,3 +152,10 @@ colorSchemes, | ||
// 4.1 Merge the selected color scheme to the theme | ||
theme = (0, _extends2.default)({}, theme, parsedScheme); | ||
Object.keys(parsedScheme).forEach(schemeKey => { | ||
if (parsedScheme[schemeKey] && typeof parsedScheme[schemeKey] === 'object') { | ||
// shallow merge the 1st level structure of the theme. | ||
theme[schemeKey] = (0, _extends2.default)({}, theme[schemeKey], parsedScheme[schemeKey]); | ||
} else { | ||
theme[schemeKey] = parsedScheme[schemeKey]; | ||
} | ||
}); | ||
if (theme.palette) { | ||
@@ -155,0 +162,0 @@ theme.palette.colorScheme = key; |
export {}; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ declare type NestedRecord<V = any> = { |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
export { default } from './createCssVarsProvider'; | ||
export type { CreateCssVarsProviderResult, CssVarsProviderConfig, ColorSchemeContextValue, } from './createCssVarsProvider'; | ||
export { default as getInitColorSchemeScript } from './getInitColorSchemeScript'; |
@@ -0,0 +0,0 @@ export declare type Mode = 'light' | 'dark' | 'system'; |
@@ -117,3 +117,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
// 3. Start composing the theme object | ||
let theme = _extends({}, parsedTheme, { | ||
const theme = _extends({}, parsedTheme, { | ||
components, | ||
@@ -143,3 +143,10 @@ colorSchemes, | ||
// 4.1 Merge the selected color scheme to the theme | ||
theme = _extends({}, theme, parsedScheme); | ||
Object.keys(parsedScheme).forEach(schemeKey => { | ||
if (parsedScheme[schemeKey] && typeof parsedScheme[schemeKey] === 'object') { | ||
// shallow merge the 1st level structure of the theme. | ||
theme[schemeKey] = _extends({}, theme[schemeKey], parsedScheme[schemeKey]); | ||
} else { | ||
theme[schemeKey] = parsedScheme[schemeKey]; | ||
} | ||
}); | ||
if (theme.palette) { | ||
@@ -146,0 +153,0 @@ theme.palette.colorScheme = key; |
@@ -21,3 +21,3 @@ export { css, keyframes, GlobalStyles, StyledEngineProvider } from '@mui/styled-engine'; | ||
export * from './spacing'; | ||
export { default as style, getPath } from './style'; | ||
export { default as style, getPath, getStyleValue } from './style'; | ||
export { default as typography } from './typography'; | ||
@@ -44,2 +44,3 @@ export * from './typography'; | ||
export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar'; | ||
export { default as responsivePropType } from './responsivePropType'; | ||
@@ -46,0 +47,0 @@ /** ----------------- */ |
@@ -23,3 +23,3 @@ import { unstable_capitalize as capitalize } from '@mui/utils'; | ||
} | ||
function getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
export function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
let value; | ||
@@ -53,6 +53,6 @@ if (typeof themeMapping === 'function') { | ||
const styleFromPropValue = propValueFinal => { | ||
let value = getValue(themeMapping, transform, propValueFinal); | ||
let value = getStyleValue(themeMapping, transform, propValueFinal); | ||
if (propValueFinal === value && typeof propValueFinal === 'string') { | ||
// Haven't found value | ||
value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal); | ||
value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal); | ||
} | ||
@@ -59,0 +59,0 @@ if (cssProperty === false) { |
@@ -168,2 +168,4 @@ import { | ||
export { default as responsivePropType } from './responsivePropType'; | ||
export { default as createContainer } from './Container/createContainer'; | ||
@@ -170,0 +172,0 @@ export * from './Container/createContainer'; |
17
index.js
@@ -1,2 +0,2 @@ | ||
/** @license MUI v5.10.14 | ||
/** @license MUI v5.10.15 | ||
* | ||
@@ -33,2 +33,3 @@ * This source code is licensed under the MIT license found in the | ||
getPath: true, | ||
getStyleValue: true, | ||
typography: true, | ||
@@ -55,2 +56,3 @@ unstable_styleFunctionSx: true, | ||
unstable_createGetCssVar: true, | ||
responsivePropType: true, | ||
createContainer: true, | ||
@@ -187,2 +189,8 @@ Container: true, | ||
}); | ||
Object.defineProperty(exports, "getStyleValue", { | ||
enumerable: true, | ||
get: function () { | ||
return _style.getStyleValue; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getThemeProps", { | ||
@@ -230,2 +238,8 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "responsivePropType", { | ||
enumerable: true, | ||
get: function () { | ||
return _responsivePropType.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "shadows", { | ||
@@ -475,2 +489,3 @@ enumerable: true, | ||
var _createGetCssVar = _interopRequireDefault(require("./cssVars/createGetCssVar")); | ||
var _responsivePropType = _interopRequireDefault(require("./responsivePropType")); | ||
var _createContainer = _interopRequireDefault(require("./Container/createContainer")); | ||
@@ -477,0 +492,0 @@ var _Container = _interopRequireWildcard(require("./Container")); |
export {}; |
@@ -159,3 +159,10 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
// 4.1 Merge the selected color scheme to the theme | ||
theme = _extends({}, theme, parsedScheme); | ||
Object.keys(parsedScheme).forEach(function (schemeKey) { | ||
if (parsedScheme[schemeKey] && _typeof(parsedScheme[schemeKey]) === 'object') { | ||
// shallow merge the 1st level structure of the theme. | ||
theme[schemeKey] = _extends({}, theme[schemeKey], parsedScheme[schemeKey]); | ||
} else { | ||
theme[schemeKey] = parsedScheme[schemeKey]; | ||
} | ||
}); | ||
if (theme.palette) { | ||
@@ -162,0 +169,0 @@ theme.palette.colorScheme = key; |
@@ -1,2 +0,2 @@ | ||
/** @license MUI v5.10.14 | ||
/** @license MUI v5.10.15 | ||
* | ||
@@ -26,3 +26,3 @@ * This source code is licensed under the MIT license found in the | ||
export * from './spacing'; | ||
export { default as style, getPath } from './style'; | ||
export { default as style, getPath, getStyleValue } from './style'; | ||
export { default as typography } from './typography'; | ||
@@ -49,2 +49,3 @@ export * from './typography'; | ||
export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar'; | ||
export { default as responsivePropType } from './responsivePropType'; | ||
@@ -51,0 +52,0 @@ /** ----------------- */ |
@@ -27,3 +27,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
} | ||
function getValue(themeMapping, transform, propValueFinal) { | ||
export function getStyleValue(themeMapping, transform, propValueFinal) { | ||
var userValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : propValueFinal; | ||
@@ -57,6 +57,6 @@ var value; | ||
var styleFromPropValue = function styleFromPropValue(propValueFinal) { | ||
var value = getValue(themeMapping, transform, propValueFinal); | ||
var value = getStyleValue(themeMapping, transform, propValueFinal); | ||
if (propValueFinal === value && typeof propValueFinal === 'string') { | ||
// Haven't found value | ||
value = getValue(themeMapping, transform, "".concat(prop).concat(propValueFinal === 'default' ? '' : capitalize(propValueFinal)), propValueFinal); | ||
value = getStyleValue(themeMapping, transform, "".concat(prop).concat(propValueFinal === 'default' ? '' : capitalize(propValueFinal)), propValueFinal); | ||
} | ||
@@ -63,0 +63,0 @@ if (cssProperty === false) { |
@@ -117,3 +117,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
// 3. Start composing the theme object | ||
let theme = _extends({}, parsedTheme, { | ||
const theme = _extends({}, parsedTheme, { | ||
components, | ||
@@ -143,3 +143,10 @@ colorSchemes, | ||
// 4.1 Merge the selected color scheme to the theme | ||
theme = _extends({}, theme, parsedScheme); | ||
Object.keys(parsedScheme).forEach(schemeKey => { | ||
if (parsedScheme[schemeKey] && typeof parsedScheme[schemeKey] === 'object') { | ||
// shallow merge the 1st level structure of the theme. | ||
theme[schemeKey] = _extends({}, theme[schemeKey], parsedScheme[schemeKey]); | ||
} else { | ||
theme[schemeKey] = parsedScheme[schemeKey]; | ||
} | ||
}); | ||
if (theme.palette) { | ||
@@ -146,0 +153,0 @@ theme.palette.colorScheme = key; |
@@ -1,2 +0,2 @@ | ||
/** @license MUI v5.10.14 | ||
/** @license MUI v5.10.15 | ||
* | ||
@@ -26,3 +26,3 @@ * This source code is licensed under the MIT license found in the | ||
export * from './spacing'; | ||
export { default as style, getPath } from './style'; | ||
export { default as style, getPath, getStyleValue } from './style'; | ||
export { default as typography } from './typography'; | ||
@@ -49,2 +49,3 @@ export * from './typography'; | ||
export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar'; | ||
export { default as responsivePropType } from './responsivePropType'; | ||
@@ -51,0 +52,0 @@ /** ----------------- */ |
@@ -23,3 +23,3 @@ import { unstable_capitalize as capitalize } from '@mui/utils'; | ||
} | ||
function getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
export function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
let value; | ||
@@ -53,6 +53,6 @@ if (typeof themeMapping === 'function') { | ||
const styleFromPropValue = propValueFinal => { | ||
let value = getValue(themeMapping, transform, propValueFinal); | ||
let value = getStyleValue(themeMapping, transform, propValueFinal); | ||
if (propValueFinal === value && typeof propValueFinal === 'string') { | ||
// Haven't found value | ||
value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal); | ||
value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal); | ||
} | ||
@@ -59,0 +59,0 @@ if (cssProperty === false) { |
{ | ||
"name": "@mui/system", | ||
"version": "5.10.14", | ||
"version": "5.10.15", | ||
"private": false, | ||
@@ -47,6 +47,6 @@ "author": "MUI Team", | ||
"@babel/runtime": "^7.20.1", | ||
"@mui/private-theming": "^5.10.14", | ||
"@mui/private-theming": "^5.10.15", | ||
"@mui/styled-engine": "^5.10.14", | ||
"@mui/types": "^7.2.1", | ||
"@mui/utils": "^5.10.14", | ||
"@mui/utils": "^5.10.15", | ||
"clsx": "^1.2.1", | ||
@@ -53,0 +53,0 @@ "csstype": "^3.1.1", |
@@ -13,2 +13,16 @@ import { SimpleStyleFunction, spacing, PropsFor } from './Box'; | ||
export function createUnaryUnit<Spacing>( | ||
theme: { spacing: Spacing }, | ||
themeKey: string, | ||
defaultValue: Spacing, | ||
propName: string, | ||
): Spacing extends number | ||
? (abs: number | string) => number | number | ||
: Spacing extends any[] | ||
? <Index extends number>(abs: Index | string) => Spacing[Index] | string | ||
: Spacing extends (...args: unknown[]) => unknown | ||
? Spacing | ||
: // warns in Dev | ||
() => undefined; | ||
export const margin: SimpleStyleFunction< | ||
@@ -15,0 +29,0 @@ | 'm' |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './Stack'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export interface StackClasses { |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -20,1 +20,7 @@ import { CSSObject } from '@mui/styled-engine'; | ||
export function getPath<T>(obj: T, path: string | undefined, checkVars?: boolean): null | unknown; | ||
export function getStyleValue( | ||
themeMapping: object | ((val: any) => any), | ||
transform?: (val: any, userVal: any) => any, | ||
propValueFinal?: any, | ||
userValue?: any, | ||
): any; |
@@ -9,2 +9,3 @@ "use strict"; | ||
exports.getPath = getPath; | ||
exports.getStyleValue = getStyleValue; | ||
var _utils = require("@mui/utils"); | ||
@@ -32,3 +33,3 @@ var _responsivePropType = _interopRequireDefault(require("./responsivePropType")); | ||
} | ||
function getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) { | ||
let value; | ||
@@ -62,6 +63,6 @@ if (typeof themeMapping === 'function') { | ||
const styleFromPropValue = propValueFinal => { | ||
let value = getValue(themeMapping, transform, propValueFinal); | ||
let value = getStyleValue(themeMapping, transform, propValueFinal); | ||
if (propValueFinal === value && typeof propValueFinal === 'string') { | ||
// Haven't found value | ||
value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0, _utils.unstable_capitalize)(propValueFinal)}`, propValueFinal); | ||
value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0, _utils.unstable_capitalize)(propValueFinal)}`, propValueFinal); | ||
} | ||
@@ -68,0 +69,0 @@ if (cssProperty === false) { |
export {}; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export interface GridClasses { |
@@ -0,0 +0,0 @@ import { Breakpoints, Breakpoint } from '../createTheme/createBreakpoints'; |
@@ -0,0 +0,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ export { default } from './Grid'; |
Sorry, the diff of this file is too big to display
1196845
331
17037
Updated@mui/utils@^5.10.15