worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
83
node_modules/@mui/material/esm/styles/adaptV4Theme.js
generated
vendored
Normal file
83
node_modules/@mui/material/esm/styles/adaptV4Theme.js
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
'use client';
|
||||
|
||||
import { createBreakpoints, createSpacing } from '@mui/system';
|
||||
export default function adaptV4Theme(inputTheme) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.warn(['MUI: adaptV4Theme() is deprecated.', 'Follow the upgrade guide on https://mui.com/r/migration-v4#theme.'].join('\n'));
|
||||
}
|
||||
const {
|
||||
defaultProps = {},
|
||||
mixins = {},
|
||||
overrides = {},
|
||||
palette = {},
|
||||
props = {},
|
||||
styleOverrides = {},
|
||||
...other
|
||||
} = inputTheme;
|
||||
const theme = {
|
||||
...other,
|
||||
components: {}
|
||||
};
|
||||
|
||||
// default props
|
||||
Object.keys(defaultProps).forEach(component => {
|
||||
const componentValue = theme.components[component] || {};
|
||||
componentValue.defaultProps = defaultProps[component];
|
||||
theme.components[component] = componentValue;
|
||||
});
|
||||
Object.keys(props).forEach(component => {
|
||||
const componentValue = theme.components[component] || {};
|
||||
componentValue.defaultProps = props[component];
|
||||
theme.components[component] = componentValue;
|
||||
});
|
||||
|
||||
// CSS overrides
|
||||
Object.keys(styleOverrides).forEach(component => {
|
||||
const componentValue = theme.components[component] || {};
|
||||
componentValue.styleOverrides = styleOverrides[component];
|
||||
theme.components[component] = componentValue;
|
||||
});
|
||||
Object.keys(overrides).forEach(component => {
|
||||
const componentValue = theme.components[component] || {};
|
||||
componentValue.styleOverrides = overrides[component];
|
||||
theme.components[component] = componentValue;
|
||||
});
|
||||
|
||||
// theme.spacing
|
||||
theme.spacing = createSpacing(inputTheme.spacing);
|
||||
|
||||
// theme.mixins.gutters
|
||||
const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
|
||||
const spacing = theme.spacing;
|
||||
theme.mixins = {
|
||||
gutters: (styles = {}) => {
|
||||
return {
|
||||
paddingLeft: spacing(2),
|
||||
paddingRight: spacing(2),
|
||||
...styles,
|
||||
[breakpoints.up('sm')]: {
|
||||
paddingLeft: spacing(3),
|
||||
paddingRight: spacing(3),
|
||||
...styles[breakpoints.up('sm')]
|
||||
}
|
||||
};
|
||||
},
|
||||
...mixins
|
||||
};
|
||||
const {
|
||||
type: typeInput,
|
||||
mode: modeInput,
|
||||
...paletteRest
|
||||
} = palette;
|
||||
const finalMode = modeInput || typeInput || 'light';
|
||||
theme.palette = {
|
||||
// theme.palette.text.hint
|
||||
text: {
|
||||
hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
|
||||
},
|
||||
mode: finalMode,
|
||||
type: finalMode,
|
||||
...paletteRest
|
||||
};
|
||||
return theme;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue