Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99839793
CssVarsProvider.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 26, 21:54
Size
1 KB
Mime Type
text/x-java
Expires
Tue, Jan 28, 21:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23831973
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
CssVarsProvider.js
View Options
import _extends from "@babel/runtime/helpers/esm/extends";
import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';
import experimental_extendTheme from './experimental_extendTheme';
import createTypography from './createTypography';
import excludeVariablesFromRoot from './excludeVariablesFromRoot';
const shouldSkipGeneratingVar = keys => {
var _keys$;
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
};
const defaultTheme = experimental_extendTheme();
const {
CssVarsProvider,
useColorScheme,
getInitColorSchemeScript
} = createCssVarsProvider({
theme: defaultTheme,
attribute: 'data-mui-color-scheme',
modeStorageKey: 'mui-mode',
colorSchemeStorageKey: 'mui-color-scheme',
defaultColorScheme: {
light: 'light',
dark: 'dark'
},
resolveTheme: theme => {
const newTheme = _extends({}, theme, {
typography: createTypography(theme.palette, theme.typography)
});
newTheme.unstable_sx = function sx(props) {
return styleFunctionSx({
sx: props,
theme: this
});
};
return newTheme;
},
shouldSkipGeneratingVar,
excludeVariablesFromRoot
});
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider };
Event Timeline
Log In to Comment