@mui/system 5.15.15 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Box/Box.js +11 -17
- package/Box/boxClasses.js +3 -10
- package/Box/index.js +3 -35
- package/Box/package.json +2 -2
- package/CHANGELOG.md +169 -3
- package/Container/Container.d.ts +1 -1
- package/Container/Container.js +12 -17
- package/Container/ContainerProps.js +1 -5
- package/Container/containerClasses.js +6 -14
- package/Container/createContainer.js +34 -43
- package/Container/index.js +3 -35
- package/Container/package.json +2 -2
- package/GlobalStyles/GlobalStyles.js +11 -19
- package/GlobalStyles/index.js +2 -25
- package/GlobalStyles/package.json +2 -2
- package/README.md +2 -2
- package/RtlProvider/index.js +13 -23
- package/RtlProvider/package.json +2 -2
- package/Stack/Stack.d.ts +1 -1
- package/Stack/Stack.js +11 -17
- package/Stack/StackProps.js +1 -5
- package/Stack/createStack.d.ts +2 -2
- package/Stack/createStack.js +40 -51
- package/Stack/index.js +5 -55
- package/Stack/package.json +2 -2
- package/Stack/stackClasses.js +6 -14
- package/ThemeProvider/ThemeProvider.js +22 -30
- package/ThemeProvider/index.js +1 -12
- package/ThemeProvider/package.json +2 -2
- package/Unstable_Grid/Grid.d.ts +1 -1
- package/Unstable_Grid/Grid.js +25 -31
- package/Unstable_Grid/GridProps.js +1 -5
- package/Unstable_Grid/createGrid.d.ts +2 -2
- package/Unstable_Grid/createGrid.js +59 -70
- package/Unstable_Grid/gridClasses.js +6 -14
- package/Unstable_Grid/gridGenerator.js +24 -43
- package/Unstable_Grid/index.js +6 -63
- package/Unstable_Grid/package.json +2 -2
- package/Unstable_Grid/traverseBreakpoints.d.ts +1 -1
- package/Unstable_Grid/traverseBreakpoints.js +3 -11
- package/borders/borders.d.ts +14 -0
- package/{esm → borders}/borders.js +5 -5
- package/borders/index.d.ts +2 -0
- package/borders/index.js +4 -0
- package/borders/package.json +6 -0
- package/{breakpoints.d.ts → breakpoints/breakpoints.d.ts} +13 -3
- package/{modern → breakpoints}/breakpoints.js +1 -1
- package/breakpoints/index.d.ts +2 -0
- package/breakpoints/index.js +4 -0
- package/breakpoints/package.json +6 -0
- package/colorManipulator/index.d.ts +1 -0
- package/colorManipulator/index.js +3 -0
- package/colorManipulator/package.json +6 -0
- package/compose/compose.d.ts +5 -0
- package/{modern → compose}/compose.js +1 -1
- package/compose/index.d.ts +1 -0
- package/compose/index.js +3 -0
- package/compose/package.json +6 -0
- package/{createBox.d.ts → createBox/createBox.d.ts} +2 -2
- package/{modern → createBox}/createBox.js +2 -2
- package/createBox/index.d.ts +1 -0
- package/createBox/index.js +3 -0
- package/createBox/package.json +6 -0
- package/{createStyled.d.ts → createStyled/createStyled.d.ts} +2 -2
- package/{modern → createStyled}/createStyled.js +2 -2
- package/createStyled/index.d.ts +2 -0
- package/createStyled/index.js +4 -0
- package/createStyled/package.json +6 -0
- package/createTheme/applyStyles.js +1 -7
- package/createTheme/createBreakpoints.d.ts +4 -4
- package/createTheme/createBreakpoints.js +7 -15
- package/createTheme/createSpacing.d.ts +2 -2
- package/createTheme/createSpacing.js +8 -14
- package/createTheme/createTheme.js +20 -27
- package/createTheme/index.js +3 -27
- package/createTheme/package.json +2 -2
- package/createTheme/shape.js +1 -7
- package/cssGrid/cssGrid.d.ts +3 -0
- package/{esm → cssGrid}/cssGrid.js +5 -5
- package/cssGrid/index.d.ts +2 -0
- package/cssGrid/index.js +4 -0
- package/cssGrid/package.json +6 -0
- package/cssVars/createCssVarsProvider.d.ts +0 -8
- package/cssVars/createCssVarsProvider.js +70 -110
- package/cssVars/createCssVarsTheme.d.ts +2 -7
- package/cssVars/createCssVarsTheme.js +10 -20
- package/cssVars/createGetCssVar.js +1 -7
- package/cssVars/cssVarsParser.js +6 -15
- package/cssVars/getInitColorSchemeScript.js +7 -16
- package/cssVars/index.js +4 -33
- package/cssVars/package.json +2 -2
- package/cssVars/prepareCssVars.d.ts +5 -9
- package/cssVars/prepareCssVars.js +60 -41
- package/cssVars/useCurrentColorScheme.js +16 -26
- package/display/display.d.ts +3 -0
- package/{esm → display}/display.js +2 -2
- package/display/index.d.ts +2 -0
- package/display/index.js +4 -0
- package/display/package.json +6 -0
- package/flexbox/flexbox.d.ts +3 -0
- package/{modern → flexbox}/flexbox.js +2 -2
- package/flexbox/index.d.ts +2 -0
- package/flexbox/index.js +4 -0
- package/flexbox/package.json +6 -0
- package/getThemeValue/getThemeValue.d.ts +1 -0
- package/{esm → getThemeValue}/getThemeValue.js +10 -10
- package/getThemeValue/index.d.ts +2 -0
- package/getThemeValue/index.js +4 -0
- package/getThemeValue/package.json +6 -0
- package/index.d.ts +22 -83
- package/index.js +61 -579
- package/legacy/{borders.js → borders/borders.js} +5 -5
- package/legacy/borders/index.js +4 -0
- package/legacy/{breakpoints.js → breakpoints/breakpoints.js} +1 -1
- package/legacy/breakpoints/index.js +4 -0
- package/legacy/colorManipulator/index.js +3 -0
- package/legacy/{compose.js → compose/compose.js} +1 -1
- package/legacy/compose/index.js +3 -0
- package/legacy/{createBox.js → createBox/createBox.js} +2 -2
- package/legacy/createBox/index.js +3 -0
- package/legacy/{createStyled.js → createStyled/createStyled.js} +2 -2
- package/legacy/createStyled/index.js +4 -0
- package/legacy/createTheme/createSpacing.js +3 -7
- package/legacy/{cssGrid.js → cssGrid/cssGrid.js} +5 -5
- package/legacy/cssGrid/index.js +4 -0
- package/legacy/cssVars/createCssVarsProvider.js +36 -62
- package/legacy/cssVars/createCssVarsTheme.js +7 -7
- package/legacy/cssVars/cssVarsParser.js +3 -2
- package/legacy/cssVars/prepareCssVars.js +45 -25
- package/legacy/{display.js → display/display.js} +2 -2
- package/legacy/display/index.js +4 -0
- package/legacy/{flexbox.js → flexbox/flexbox.js} +2 -2
- package/legacy/flexbox/index.js +4 -0
- package/legacy/{getThemeValue.js → getThemeValue/getThemeValue.js} +10 -10
- package/legacy/getThemeValue/index.js +4 -0
- package/legacy/index.js +1 -1
- package/legacy/memoize/index.js +3 -0
- package/legacy/merge/index.js +3 -0
- package/legacy/palette/index.js +4 -0
- package/legacy/{palette.js → palette/palette.js} +2 -2
- package/legacy/positions/index.js +4 -0
- package/legacy/{positions.js → positions/positions.js} +2 -2
- package/legacy/propsToClassKey/index.js +3 -0
- package/legacy/responsivePropType/index.js +3 -0
- package/legacy/shadows/index.js +3 -0
- package/legacy/{shadows.js → shadows/shadows.js} +1 -1
- package/legacy/sizing/index.js +4 -0
- package/legacy/{sizing.js → sizing/sizing.js} +3 -3
- package/legacy/spacing/index.js +4 -0
- package/legacy/{spacing.js → spacing/spacing.js} +29 -26
- package/legacy/style/index.js +4 -0
- package/legacy/{style.js → style/style.js} +2 -2
- package/legacy/styled/index.js +3 -0
- package/legacy/styled/styled.js +3 -0
- package/legacy/typography/index.js +4 -0
- package/legacy/{typography.js → typography/typography.js} +2 -2
- package/legacy/useTheme/index.js +4 -0
- package/legacy/{useTheme.js → useTheme/useTheme.js} +2 -2
- package/legacy/useThemeWithoutDefault/index.js +3 -0
- package/memoize/index.d.ts +1 -0
- package/memoize/index.js +3 -0
- package/memoize/memoize.d.ts +3 -0
- package/memoize/package.json +6 -0
- package/merge/index.d.ts +1 -0
- package/merge/index.js +3 -0
- package/merge/package.json +6 -0
- package/modern/{borders.js → borders/borders.js} +5 -5
- package/modern/borders/index.js +4 -0
- package/{esm → modern/breakpoints}/breakpoints.js +2 -3
- package/modern/breakpoints/index.js +4 -0
- package/modern/colorManipulator/index.js +3 -0
- package/{esm → modern/compose}/compose.js +1 -1
- package/modern/compose/index.js +3 -0
- package/{esm → modern/createBox}/createBox.js +2 -2
- package/modern/createBox/index.js +3 -0
- package/{esm → modern/createStyled}/createStyled.js +5 -6
- package/modern/createStyled/index.js +4 -0
- package/modern/createTheme/createSpacing.js +7 -8
- package/modern/{cssGrid.js → cssGrid/cssGrid.js} +5 -5
- package/modern/cssGrid/index.js +4 -0
- package/modern/cssVars/createCssVarsProvider.js +29 -60
- package/modern/cssVars/createCssVarsTheme.js +7 -10
- package/modern/cssVars/cssVarsParser.js +3 -2
- package/modern/cssVars/prepareCssVars.js +49 -21
- package/modern/{display.js → display/display.js} +2 -2
- package/modern/display/index.js +4 -0
- package/{esm → modern/flexbox}/flexbox.js +2 -2
- package/modern/flexbox/index.js +4 -0
- package/modern/{getThemeValue.js → getThemeValue/getThemeValue.js} +10 -10
- package/modern/getThemeValue/index.js +4 -0
- package/modern/index.js +1 -1
- package/modern/memoize/index.js +3 -0
- package/modern/merge/index.js +3 -0
- package/modern/palette/index.js +4 -0
- package/{esm → modern/palette}/palette.js +2 -2
- package/modern/positions/index.js +4 -0
- package/modern/{positions.js → positions/positions.js} +2 -2
- package/modern/propsToClassKey/index.js +3 -0
- package/modern/responsivePropType/index.js +3 -0
- package/modern/shadows/index.js +3 -0
- package/{esm → modern/shadows}/shadows.js +1 -1
- package/modern/sizing/index.js +4 -0
- package/modern/{sizing.js → sizing/sizing.js} +3 -3
- package/modern/spacing/index.js +4 -0
- package/{esm → modern/spacing}/spacing.js +29 -27
- package/modern/style/index.js +4 -0
- package/modern/{style.js → style/style.js} +2 -2
- package/modern/styled/index.js +3 -0
- package/modern/styled/styled.js +3 -0
- package/modern/typography/index.js +4 -0
- package/modern/{typography.js → typography/typography.js} +2 -2
- package/modern/useTheme/index.js +4 -0
- package/{esm → modern/useTheme}/useTheme.js +2 -2
- package/modern/useThemeWithoutDefault/index.js +3 -0
- package/node/Box/Box.js +36 -0
- package/node/Box/boxClasses.js +10 -0
- package/node/Box/index.js +37 -0
- package/{esm → node}/Container/Container.js +17 -12
- package/node/Container/ContainerProps.js +5 -0
- package/node/Container/containerClasses.js +15 -0
- package/node/Container/createContainer.js +152 -0
- package/node/Container/index.js +37 -0
- package/node/GlobalStyles/GlobalStyles.js +45 -0
- package/node/GlobalStyles/index.js +27 -0
- package/node/RtlProvider/index.js +35 -0
- package/{esm → node}/Stack/Stack.js +17 -11
- package/node/Stack/StackProps.js +5 -0
- package/node/Stack/createStack.js +184 -0
- package/node/Stack/index.js +57 -0
- package/node/Stack/stackClasses.js +15 -0
- package/{esm → node}/ThemeProvider/ThemeProvider.js +30 -22
- package/node/ThemeProvider/index.js +14 -0
- package/{esm → node}/Unstable_Grid/Grid.js +31 -25
- package/node/Unstable_Grid/GridProps.js +5 -0
- package/node/Unstable_Grid/createGrid.js +180 -0
- package/{esm → node}/Unstable_Grid/gridClasses.js +14 -6
- package/{esm → node}/Unstable_Grid/gridGenerator.js +39 -22
- package/node/Unstable_Grid/index.js +65 -0
- package/{esm → node}/Unstable_Grid/traverseBreakpoints.js +11 -3
- package/{borders.js → node/borders/borders.js} +5 -5
- package/node/borders/index.js +27 -0
- package/{breakpoints.js → node/breakpoints/breakpoints.js} +1 -1
- package/node/breakpoints/index.js +27 -0
- package/node/colorManipulator/index.js +17 -0
- package/{compose.js → node/compose/compose.js} +1 -1
- package/node/compose/index.js +14 -0
- package/{createBox.js → node/createBox/createBox.js} +3 -3
- package/node/createBox/index.js +14 -0
- package/{createStyled.js → node/createStyled/createStyled.js} +3 -3
- package/node/createStyled/index.js +27 -0
- package/{esm → node}/createTheme/applyStyles.js +7 -1
- package/{esm → node}/createTheme/createBreakpoints.js +15 -7
- package/{esm → node}/createTheme/createSpacing.js +13 -9
- package/node/createTheme/createTheme.js +50 -0
- package/node/createTheme/index.js +27 -0
- package/node/createTheme/shape.js +10 -0
- package/{cssGrid.js → node/cssGrid/cssGrid.js} +5 -5
- package/node/cssGrid/index.js +27 -0
- package/{esm → node}/cssVars/createCssVarsProvider.js +79 -99
- package/node/cssVars/createCssVarsTheme.js +20 -0
- package/{esm → node}/cssVars/createGetCssVar.js +7 -1
- package/{esm → node}/cssVars/cssVarsParser.js +16 -5
- package/node/cssVars/getInitColorSchemeScript.js +53 -0
- package/node/cssVars/index.js +35 -0
- package/node/cssVars/prepareCssVars.js +106 -0
- package/{esm → node}/cssVars/useCurrentColorScheme.js +24 -14
- package/{display.js → node/display/display.js} +2 -2
- package/node/display/index.js +27 -0
- package/{flexbox.js → node/flexbox/flexbox.js} +2 -2
- package/node/flexbox/index.js +27 -0
- package/{getThemeValue.js → node/getThemeValue/getThemeValue.js} +10 -10
- package/node/getThemeValue/index.js +27 -0
- package/node/index.js +590 -0
- package/node/memoize/index.js +14 -0
- package/node/merge/index.js +14 -0
- package/node/palette/index.js +27 -0
- package/{palette.js → node/palette/palette.js} +2 -2
- package/node/positions/index.js +27 -0
- package/{positions.js → node/positions/positions.js} +2 -2
- package/node/propsToClassKey/index.js +14 -0
- package/node/responsivePropType/index.js +14 -0
- package/node/shadows/index.js +14 -0
- package/{shadows.js → node/shadows/shadows.js} +1 -1
- package/node/sizing/index.js +27 -0
- package/{sizing.js → node/sizing/sizing.js} +3 -3
- package/node/spacing/index.js +27 -0
- package/{spacing.js → node/spacing/spacing.js} +29 -26
- package/node/style/index.js +27 -0
- package/{style.js → node/style/style.js} +2 -2
- package/{esm → node}/styleFunctionSx/defaultSxConfig.js +71 -65
- package/node/styleFunctionSx/extendSxProp.js +55 -0
- package/node/styleFunctionSx/index.js +35 -0
- package/{esm → node}/styleFunctionSx/styleFunctionSx.js +26 -18
- package/node/styled/index.js +14 -0
- package/{styled.js → node/styled/styled.js} +1 -1
- package/node/typography/index.js +27 -0
- package/{typography.js → node/typography/typography.js} +2 -2
- package/node/useMediaQuery/index.js +26 -0
- package/{esm → node}/useMediaQuery/useMediaQuery.js +16 -9
- package/node/useTheme/index.js +27 -0
- package/{useTheme.js → node/useTheme/useTheme.js} +2 -2
- package/node/useThemeProps/getThemeProps.js +19 -0
- package/node/useThemeProps/index.js +21 -0
- package/node/useThemeProps/useThemeProps.js +27 -0
- package/node/useThemeWithoutDefault/index.js +14 -0
- package/{useThemeWithoutDefault.js → node/useThemeWithoutDefault/useThemeWithoutDefault.js} +1 -1
- package/package.json +8 -8
- package/palette/index.d.ts +2 -0
- package/palette/index.js +4 -0
- package/palette/package.json +6 -0
- package/palette/palette.d.ts +5 -0
- package/{modern → palette}/palette.js +2 -2
- package/positions/index.d.ts +2 -0
- package/positions/index.js +4 -0
- package/positions/package.json +6 -0
- package/positions/positions.d.ts +3 -0
- package/{esm → positions}/positions.js +2 -2
- package/propsToClassKey/index.d.ts +1 -0
- package/propsToClassKey/index.js +3 -0
- package/propsToClassKey/package.json +6 -0
- package/responsivePropType/index.d.ts +1 -0
- package/responsivePropType/index.js +3 -0
- package/responsivePropType/package.json +6 -0
- package/shadows/index.d.ts +1 -0
- package/shadows/index.js +3 -0
- package/shadows/package.json +6 -0
- package/shadows/shadows.d.ts +3 -0
- package/{modern → shadows}/shadows.js +1 -1
- package/sizing/index.d.ts +2 -0
- package/sizing/index.js +4 -0
- package/sizing/package.json +6 -0
- package/sizing/sizing.d.ts +12 -0
- package/{esm → sizing}/sizing.js +5 -6
- package/spacing/index.d.ts +2 -0
- package/spacing/index.js +4 -0
- package/spacing/package.json +6 -0
- package/{spacing.d.ts → spacing/spacing.d.ts} +1 -1
- package/{modern → spacing}/spacing.js +29 -26
- package/style/index.d.ts +2 -0
- package/style/index.js +4 -0
- package/style/package.json +6 -0
- package/{style.d.ts → style/style.d.ts} +1 -1
- package/{esm → style}/style.js +2 -2
- package/styleFunctionSx/defaultSxConfig.js +65 -71
- package/styleFunctionSx/extendSxProp.js +11 -19
- package/styleFunctionSx/index.js +4 -35
- package/styleFunctionSx/package.json +2 -2
- package/styleFunctionSx/styleFunctionSx.js +18 -27
- package/styled/index.d.ts +1 -0
- package/styled/index.js +3 -0
- package/styled/package.json +6 -0
- package/{styled.d.ts → styled/styled.d.ts} +1 -1
- package/styled/styled.js +3 -0
- package/typography/index.d.ts +2 -0
- package/typography/index.js +4 -0
- package/typography/package.json +6 -0
- package/typography/typography.d.ts +12 -0
- package/{esm → typography}/typography.js +2 -2
- package/useMediaQuery/index.js +2 -26
- package/useMediaQuery/package.json +2 -2
- package/useMediaQuery/useMediaQuery.js +9 -16
- package/useTheme/index.d.ts +2 -0
- package/useTheme/index.js +4 -0
- package/useTheme/package.json +6 -0
- package/{useTheme.d.ts → useTheme/useTheme.d.ts} +1 -1
- package/{modern → useTheme}/useTheme.js +2 -2
- package/useThemeProps/getThemeProps.js +3 -10
- package/useThemeProps/index.js +2 -19
- package/useThemeProps/package.json +2 -2
- package/useThemeProps/useThemeProps.js +5 -11
- package/useThemeWithoutDefault/index.d.ts +1 -0
- package/useThemeWithoutDefault/index.js +3 -0
- package/useThemeWithoutDefault/package.json +6 -0
- package/esm/Box/Box.js +0 -30
- package/esm/Box/boxClasses.js +0 -3
- package/esm/Box/index.js +0 -5
- package/esm/Container/ContainerProps.js +0 -1
- package/esm/Container/containerClasses.js +0 -7
- package/esm/Container/createContainer.js +0 -143
- package/esm/Container/index.js +0 -5
- package/esm/GlobalStyles/GlobalStyles.js +0 -37
- package/esm/GlobalStyles/index.js +0 -4
- package/esm/RtlProvider/index.js +0 -25
- package/esm/Stack/StackProps.js +0 -1
- package/esm/Stack/createStack.js +0 -173
- package/esm/Stack/index.js +0 -7
- package/esm/Stack/stackClasses.js +0 -7
- package/esm/ThemeProvider/index.js +0 -3
- package/esm/Unstable_Grid/GridProps.js +0 -1
- package/esm/Unstable_Grid/createGrid.js +0 -171
- package/esm/Unstable_Grid/index.js +0 -8
- package/esm/createTheme/createTheme.js +0 -43
- package/esm/createTheme/index.js +0 -3
- package/esm/createTheme/shape.js +0 -4
- package/esm/cssVars/createCssVarsTheme.js +0 -16
- package/esm/cssVars/getInitColorSchemeScript.js +0 -44
- package/esm/cssVars/index.js +0 -6
- package/esm/cssVars/prepareCssVars.js +0 -73
- package/esm/index.js +0 -65
- package/esm/styleFunctionSx/extendSxProp.js +0 -48
- package/esm/styleFunctionSx/index.js +0 -4
- package/esm/styled.js +0 -3
- package/esm/useMediaQuery/index.js +0 -2
- package/esm/useThemeProps/getThemeProps.js +0 -12
- package/esm/useThemeProps/index.js +0 -4
- package/esm/useThemeProps/useThemeProps.js +0 -21
- package/legacy/styled.js +0 -3
- package/modern/styled.js +0 -3
- /package/{colorManipulator.d.ts → colorManipulator/colorManipulator.d.ts} +0 -0
- /package/{esm → colorManipulator}/colorManipulator.js +0 -0
- /package/legacy/{colorManipulator.js → colorManipulator/colorManipulator.js} +0 -0
- /package/legacy/{memoize.js → memoize/memoize.js} +0 -0
- /package/{esm → legacy/merge}/merge.js +0 -0
- /package/legacy/{propsToClassKey.js → propsToClassKey/propsToClassKey.js} +0 -0
- /package/legacy/{responsivePropType.js → responsivePropType/responsivePropType.js} +0 -0
- /package/legacy/{useThemeWithoutDefault.js → useThemeWithoutDefault/useThemeWithoutDefault.js} +0 -0
- /package/{esm → memoize}/memoize.js +0 -0
- /package/{merge.d.ts → merge/merge.d.ts} +0 -0
- /package/{legacy → merge}/merge.js +0 -0
- /package/modern/{colorManipulator.js → colorManipulator/colorManipulator.js} +0 -0
- /package/modern/{memoize.js → memoize/memoize.js} +0 -0
- /package/modern/{merge.js → merge/merge.js} +0 -0
- /package/{esm → modern/propsToClassKey}/propsToClassKey.js +0 -0
- /package/{esm → modern/responsivePropType}/responsivePropType.js +0 -0
- /package/{esm → modern/useThemeWithoutDefault}/useThemeWithoutDefault.js +0 -0
- /package/{colorManipulator.js → node/colorManipulator/colorManipulator.js} +0 -0
- /package/{memoize.js → node/memoize/memoize.js} +0 -0
- /package/{merge.js → node/merge/merge.js} +0 -0
- /package/{propsToClassKey.js → node/propsToClassKey/propsToClassKey.js} +0 -0
- /package/{responsivePropType.js → node/responsivePropType/responsivePropType.js} +0 -0
- /package/{propsToClassKey.d.ts → propsToClassKey/propsToClassKey.d.ts} +0 -0
- /package/{modern → propsToClassKey}/propsToClassKey.js +0 -0
- /package/{responsivePropType.d.ts → responsivePropType/responsivePropType.d.ts} +0 -0
- /package/{modern → responsivePropType}/responsivePropType.js +0 -0
- /package/{useThemeWithoutDefault.d.ts → useThemeWithoutDefault/useThemeWithoutDefault.d.ts} +0 -0
- /package/{modern → useThemeWithoutDefault}/useThemeWithoutDefault.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import merge from '
|
|
2
|
+
import merge from '../merge';
|
|
3
3
|
function compose() {
|
|
4
4
|
for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5
5
|
styles[_key] = arguments[_key];
|
|
@@ -5,8 +5,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import styled from '@mui/styled-engine';
|
|
8
|
-
import styleFunctionSx, { extendSxProp } from '
|
|
9
|
-
import useTheme from '
|
|
8
|
+
import styleFunctionSx, { extendSxProp } from '../styleFunctionSx';
|
|
9
|
+
import useTheme from '../useTheme';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export default function createBox() {
|
|
12
12
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -8,8 +8,8 @@ import styledEngineStyled, { internal_processStyles as processStyles } from '@mu
|
|
|
8
8
|
import { isPlainObject } from '@mui/utils/deepmerge';
|
|
9
9
|
import capitalize from '@mui/utils/capitalize';
|
|
10
10
|
import getDisplayName from '@mui/utils/getDisplayName';
|
|
11
|
-
import createTheme from '
|
|
12
|
-
import styleFunctionSx from '
|
|
11
|
+
import createTheme from '../createTheme';
|
|
12
|
+
import styleFunctionSx from '../styleFunctionSx';
|
|
13
13
|
function isEmpty(obj) {
|
|
14
14
|
return Object.keys(obj).length === 0;
|
|
15
15
|
}
|
|
@@ -5,17 +5,13 @@ import { createUnarySpacing } from '../spacing';
|
|
|
5
5
|
|
|
6
6
|
export default function createSpacing() {
|
|
7
7
|
var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
|
|
8
|
+
var transform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createUnarySpacing({
|
|
9
|
+
spacing: spacingInput
|
|
10
|
+
});
|
|
8
11
|
// Already transformed.
|
|
9
12
|
if (spacingInput.mui) {
|
|
10
13
|
return spacingInput;
|
|
11
14
|
}
|
|
12
|
-
|
|
13
|
-
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
14
|
-
// Smaller components, such as icons, can align to a 4dp grid.
|
|
15
|
-
// https://m2.material.io/design/layout/understanding-layout.html
|
|
16
|
-
var transform = createUnarySpacing({
|
|
17
|
-
spacing: spacingInput
|
|
18
|
-
});
|
|
19
15
|
var spacing = function spacing() {
|
|
20
16
|
for (var _len = arguments.length, argsInput = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
17
|
argsInput[_key] = arguments[_key];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import style from '
|
|
2
|
-
import compose from '
|
|
3
|
-
import { createUnaryUnit, getValue } from '
|
|
4
|
-
import { handleBreakpoints } from '
|
|
5
|
-
import responsivePropType from '
|
|
1
|
+
import style from '../style';
|
|
2
|
+
import compose from '../compose';
|
|
3
|
+
import { createUnaryUnit, getValue } from '../spacing';
|
|
4
|
+
import { handleBreakpoints } from '../breakpoints';
|
|
5
|
+
import responsivePropType from '../responsivePropType';
|
|
6
6
|
|
|
7
7
|
// false positive
|
|
8
8
|
// eslint-disable-next-line react/function-component-definition
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -6,14 +5,12 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
|
6
5
|
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
7
6
|
import * as React from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
|
-
import deepmerge from '@mui/utils/deepmerge';
|
|
10
8
|
import { GlobalStyles } from '@mui/styled-engine';
|
|
11
9
|
import { useTheme as muiUseTheme } from '@mui/private-theming';
|
|
12
10
|
import ThemeProvider from '../ThemeProvider';
|
|
13
11
|
import systemGetInitColorSchemeScript, { DEFAULT_ATTRIBUTE, DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';
|
|
14
12
|
import useCurrentColorScheme from './useCurrentColorScheme';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
14
|
export var DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
18
15
|
export default function createCssVarsProvider(options) {
|
|
19
16
|
var themeId = options.themeId,
|
|
@@ -30,8 +27,7 @@ export default function createCssVarsProvider(options) {
|
|
|
30
27
|
designSystemColorScheme = options.defaultColorScheme,
|
|
31
28
|
_options$disableTrans = options.disableTransitionOnChange,
|
|
32
29
|
designSystemTransitionOnChange = _options$disableTrans === void 0 ? false : _options$disableTrans,
|
|
33
|
-
resolveTheme = options.resolveTheme
|
|
34
|
-
excludeVariablesFromRoot = options.excludeVariablesFromRoot;
|
|
30
|
+
resolveTheme = options.resolveTheme;
|
|
35
31
|
if (!defaultTheme.colorSchemes || typeof designSystemColorScheme === 'string' && !defaultTheme.colorSchemes[designSystemColorScheme] || _typeof(designSystemColorScheme) === 'object' && !defaultTheme.colorSchemes[designSystemColorScheme == null ? void 0 : designSystemColorScheme.light] || _typeof(designSystemColorScheme) === 'object' && !defaultTheme.colorSchemes[designSystemColorScheme == null ? void 0 : designSystemColorScheme.dark]) {
|
|
36
32
|
console.error("MUI: `".concat(designSystemColorScheme, "` does not exist in `theme.colorSchemes`."));
|
|
37
33
|
}
|
|
@@ -47,6 +43,7 @@ export default function createCssVarsProvider(options) {
|
|
|
47
43
|
return value;
|
|
48
44
|
};
|
|
49
45
|
function CssVarsProvider(props) {
|
|
46
|
+
var _restThemeProp$genera, _theme$generateStyleS;
|
|
50
47
|
var children = props.children,
|
|
51
48
|
_props$theme = props.theme,
|
|
52
49
|
themeProp = _props$theme === void 0 ? defaultTheme : _props$theme,
|
|
@@ -84,15 +81,8 @@ export default function createCssVarsProvider(options) {
|
|
|
84
81
|
colorSchemes = _ref$colorSchemes === void 0 ? {} : _ref$colorSchemes,
|
|
85
82
|
_ref$components = _ref.components,
|
|
86
83
|
components = _ref$components === void 0 ? {} : _ref$components,
|
|
87
|
-
_ref$generateCssVars = _ref.generateCssVars,
|
|
88
|
-
generateCssVars = _ref$generateCssVars === void 0 ? function () {
|
|
89
|
-
return {
|
|
90
|
-
vars: {},
|
|
91
|
-
css: {}
|
|
92
|
-
};
|
|
93
|
-
} : _ref$generateCssVars,
|
|
94
84
|
cssVarPrefix = _ref.cssVarPrefix,
|
|
95
|
-
restThemeProp = _objectWithoutProperties(_ref, ["colorSchemes", "components", "
|
|
85
|
+
restThemeProp = _objectWithoutProperties(_ref, ["colorSchemes", "components", "cssVarPrefix"]);
|
|
96
86
|
var allColorSchemes = Object.keys(colorSchemes);
|
|
97
87
|
var defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
98
88
|
var defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
@@ -142,33 +132,25 @@ export default function createCssVarsProvider(options) {
|
|
|
142
132
|
return colorScheme;
|
|
143
133
|
}();
|
|
144
134
|
|
|
145
|
-
// 2.
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
// 2. get the `vars` object that refers to the CSS custom properties
|
|
136
|
+
var themeVars = ((_restThemeProp$genera = restThemeProp.generateThemeVars) == null ? void 0 : _restThemeProp$genera.call(restThemeProp)) || restThemeProp.vars;
|
|
137
|
+
|
|
138
|
+
// 3. Start composing the theme object
|
|
149
139
|
var theme = _extends({}, restThemeProp, {
|
|
150
140
|
components: components,
|
|
151
141
|
colorSchemes: colorSchemes,
|
|
152
142
|
cssVarPrefix: cssVarPrefix,
|
|
153
|
-
vars:
|
|
154
|
-
getColorSchemeSelector: function getColorSchemeSelector(targetColorScheme) {
|
|
155
|
-
return "[".concat(attribute, "=\"").concat(targetColorScheme, "\"] &");
|
|
156
|
-
}
|
|
143
|
+
vars: themeVars
|
|
157
144
|
});
|
|
145
|
+
if (typeof theme.generateSpacing === 'function') {
|
|
146
|
+
theme.spacing = theme.generateSpacing();
|
|
147
|
+
}
|
|
158
148
|
|
|
159
|
-
// 4.
|
|
160
|
-
// The default color scheme stylesheet is constructed to have the least CSS specificity.
|
|
161
|
-
// The other color schemes uses selector, default as data attribute, to increase the CSS specificity so that they can override the default color scheme stylesheet.
|
|
162
|
-
var defaultColorSchemeStyleSheet = {};
|
|
163
|
-
var otherColorSchemesStyleSheet = {};
|
|
149
|
+
// 4. Resolve the color scheme and merge it to the theme
|
|
164
150
|
Object.entries(colorSchemes).forEach(function (_ref2) {
|
|
165
151
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
166
152
|
key = _ref3[0],
|
|
167
153
|
scheme = _ref3[1];
|
|
168
|
-
var _generateCssVars2 = generateCssVars(key),
|
|
169
|
-
css = _generateCssVars2.css,
|
|
170
|
-
vars = _generateCssVars2.vars;
|
|
171
|
-
theme.vars = deepmerge(theme.vars, vars);
|
|
172
154
|
if (key === calculatedColorScheme) {
|
|
173
155
|
// 4.1 Merge the selected color scheme to the theme
|
|
174
156
|
Object.keys(scheme).forEach(function (schemeKey) {
|
|
@@ -183,30 +165,24 @@ export default function createCssVarsProvider(options) {
|
|
|
183
165
|
theme.palette.colorScheme = key;
|
|
184
166
|
}
|
|
185
167
|
}
|
|
186
|
-
var resolvedDefaultColorScheme = function () {
|
|
187
|
-
if (typeof defaultColorScheme === 'string') {
|
|
188
|
-
return defaultColorScheme;
|
|
189
|
-
}
|
|
190
|
-
if (defaultMode === 'dark') {
|
|
191
|
-
return defaultColorScheme.dark;
|
|
192
|
-
}
|
|
193
|
-
return defaultColorScheme.light;
|
|
194
|
-
}();
|
|
195
|
-
if (key === resolvedDefaultColorScheme) {
|
|
196
|
-
if (excludeVariablesFromRoot) {
|
|
197
|
-
var excludedVariables = {};
|
|
198
|
-
excludeVariablesFromRoot(cssVarPrefix).forEach(function (cssVar) {
|
|
199
|
-
excludedVariables[cssVar] = css[cssVar];
|
|
200
|
-
delete css[cssVar];
|
|
201
|
-
});
|
|
202
|
-
defaultColorSchemeStyleSheet["[".concat(attribute, "=\"").concat(key, "\"]")] = excludedVariables;
|
|
203
|
-
}
|
|
204
|
-
defaultColorSchemeStyleSheet["".concat(colorSchemeSelector, ", [").concat(attribute, "=\"").concat(key, "\"]")] = css;
|
|
205
|
-
} else {
|
|
206
|
-
otherColorSchemesStyleSheet["".concat(colorSchemeSelector === ':root' ? '' : colorSchemeSelector, "[").concat(attribute, "=\"").concat(key, "\"]")] = css;
|
|
207
|
-
}
|
|
208
168
|
});
|
|
209
|
-
|
|
169
|
+
var resolvedDefaultColorScheme = function () {
|
|
170
|
+
if (typeof defaultColorScheme === 'string') {
|
|
171
|
+
return defaultColorScheme;
|
|
172
|
+
}
|
|
173
|
+
if (defaultMode === 'dark') {
|
|
174
|
+
return defaultColorScheme.dark;
|
|
175
|
+
}
|
|
176
|
+
return defaultColorScheme.light;
|
|
177
|
+
}();
|
|
178
|
+
themeProp.defaultColorScheme = resolvedDefaultColorScheme;
|
|
179
|
+
themeProp.colorSchemeSelector = colorSchemeSelector;
|
|
180
|
+
themeProp.attribute = attribute;
|
|
181
|
+
if (!theme.getColorSchemeSelector) {
|
|
182
|
+
theme.getColorSchemeSelector = function (targetColorScheme) {
|
|
183
|
+
return "[".concat(attribute, "=\"").concat(targetColorScheme, "\"] &");
|
|
184
|
+
};
|
|
185
|
+
}
|
|
210
186
|
|
|
211
187
|
// 5. Declaring effects
|
|
212
188
|
// 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
|
|
@@ -261,14 +237,12 @@ export default function createCssVarsProvider(options) {
|
|
|
261
237
|
shouldGenerateStyleSheet = false;
|
|
262
238
|
}
|
|
263
239
|
var element = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
264
|
-
children: [shouldGenerateStyleSheet && /*#__PURE__*/
|
|
265
|
-
children: [
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
})
|
|
270
|
-
styles: otherColorSchemesStyleSheet
|
|
271
|
-
})]
|
|
240
|
+
children: [shouldGenerateStyleSheet && /*#__PURE__*/_jsx(React.Fragment, {
|
|
241
|
+
children: (((_theme$generateStyleS = theme.generateStyleSheets) == null ? void 0 : _theme$generateStyleS.call(theme)) || []).map(function (styles, index) {
|
|
242
|
+
return /*#__PURE__*/_jsx(GlobalStyles, {
|
|
243
|
+
styles: styles
|
|
244
|
+
}, index);
|
|
245
|
+
})
|
|
272
246
|
}), /*#__PURE__*/_jsx(ThemeProvider, {
|
|
273
247
|
themeId: scopedTheme ? themeId : undefined,
|
|
274
248
|
theme: resolveTheme ? resolveTheme(theme) : theme,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
2
|
import prepareCssVars from './prepareCssVars';
|
|
4
3
|
function createCssVarsTheme(theme) {
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return _extends({}, theme, prepareCssVars(otherTheme, {
|
|
9
|
-
prefix: cssVarPrefix,
|
|
10
|
-
shouldSkipGeneratingVar: shouldSkipGeneratingVar
|
|
4
|
+
var output = theme;
|
|
5
|
+
var result = prepareCssVars(output, _extends({}, theme, {
|
|
6
|
+
prefix: theme.cssVarPrefix
|
|
11
7
|
}));
|
|
8
|
+
output.vars = result.vars;
|
|
9
|
+
output.generateThemeVars = result.generateThemeVars;
|
|
10
|
+
output.generateStyleSheets = result.generateStyleSheets;
|
|
11
|
+
return output;
|
|
12
12
|
}
|
|
13
13
|
export default createCssVarsTheme;
|
|
@@ -123,9 +123,10 @@ export default function cssVarsParser(theme, options) {
|
|
|
123
123
|
if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {
|
|
124
124
|
// only create css & var if `shouldSkipGeneratingVar` return false
|
|
125
125
|
var cssVar = "--".concat(prefix ? "".concat(prefix, "-") : '').concat(keys.join('-'));
|
|
126
|
-
|
|
126
|
+
var resolvedValue = getCssValue(keys, value);
|
|
127
|
+
_extends(css, _defineProperty({}, cssVar, resolvedValue));
|
|
127
128
|
assignNestedKeys(vars, keys, "var(".concat(cssVar, ")"), arrayKeys);
|
|
128
|
-
assignNestedKeys(varsWithDefaults, keys, "var(".concat(cssVar, ", ").concat(
|
|
129
|
+
assignNestedKeys(varsWithDefaults, keys, "var(".concat(cssVar, ", ").concat(resolvedValue, ")"), arrayKeys);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
}, function (keys) {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
6
|
import deepmerge from '@mui/utils/deepmerge';
|
|
6
7
|
import cssVarsParser from './cssVarsParser';
|
|
7
|
-
function prepareCssVars(theme
|
|
8
|
+
function prepareCssVars(theme) {
|
|
9
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10
|
+
var getSelector = _ref.getSelector,
|
|
11
|
+
parserConfig = _objectWithoutProperties(_ref, ["getSelector"]);
|
|
8
12
|
// @ts-ignore - ignore components do not exist
|
|
9
13
|
var _theme$colorSchemes = theme.colorSchemes,
|
|
10
14
|
colorSchemes = _theme$colorSchemes === void 0 ? {} : _theme$colorSchemes,
|
|
@@ -18,12 +22,12 @@ function prepareCssVars(theme, parserConfig) {
|
|
|
18
22
|
rootVarsWithDefaults = _cssVarsParser.varsWithDefaults;
|
|
19
23
|
var themeVars = rootVarsWithDefaults;
|
|
20
24
|
var colorSchemesMap = {};
|
|
21
|
-
var
|
|
25
|
+
var defaultScheme = colorSchemes[defaultColorScheme],
|
|
22
26
|
otherColorSchemes = _objectWithoutProperties(colorSchemes, [defaultColorScheme].map(_toPropertyKey));
|
|
23
|
-
Object.entries(otherColorSchemes || {}).forEach(function (
|
|
24
|
-
var
|
|
25
|
-
key =
|
|
26
|
-
scheme =
|
|
27
|
+
Object.entries(otherColorSchemes || {}).forEach(function (_ref2) {
|
|
28
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
29
|
+
key = _ref3[0],
|
|
30
|
+
scheme = _ref3[1];
|
|
27
31
|
var _cssVarsParser2 = cssVarsParser(scheme, parserConfig),
|
|
28
32
|
vars = _cssVarsParser2.vars,
|
|
29
33
|
css = _cssVarsParser2.css,
|
|
@@ -34,9 +38,9 @@ function prepareCssVars(theme, parserConfig) {
|
|
|
34
38
|
vars: vars
|
|
35
39
|
};
|
|
36
40
|
});
|
|
37
|
-
if (
|
|
41
|
+
if (defaultScheme) {
|
|
38
42
|
// default color scheme vars should be merged last to set as default
|
|
39
|
-
var _cssVarsParser3 = cssVarsParser(
|
|
43
|
+
var _cssVarsParser3 = cssVarsParser(defaultScheme, parserConfig),
|
|
40
44
|
_css = _cssVarsParser3.css,
|
|
41
45
|
vars = _cssVarsParser3.vars,
|
|
42
46
|
varsWithDefaults = _cssVarsParser3.varsWithDefaults;
|
|
@@ -46,27 +50,43 @@ function prepareCssVars(theme, parserConfig) {
|
|
|
46
50
|
vars: vars
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
var generateThemeVars = function generateThemeVars() {
|
|
54
|
+
var vars = _extends({}, rootVars);
|
|
55
|
+
Object.entries(colorSchemesMap).forEach(function (_ref4) {
|
|
56
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
57
|
+
schemeVars = _ref5[1].vars;
|
|
58
|
+
vars = deepmerge(vars, schemeVars);
|
|
59
|
+
});
|
|
60
|
+
return vars;
|
|
61
|
+
};
|
|
62
|
+
var generateStyleSheets = function generateStyleSheets() {
|
|
63
|
+
var stylesheets = [];
|
|
64
|
+
var colorScheme = theme.defaultColorScheme || 'light';
|
|
65
|
+
function insertStyleSheet(selector, css) {
|
|
66
|
+
if (Object.keys(css).length) {
|
|
67
|
+
stylesheets.push(typeof selector === 'string' ? _defineProperty({}, selector, _extends({}, css)) : selector);
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
insertStyleSheet((getSelector == null ? void 0 : getSelector(undefined, _extends({}, rootCss))) || ':root', rootCss);
|
|
71
|
+
var defaultSchemeVal = colorSchemesMap[colorScheme],
|
|
72
|
+
rest = _objectWithoutProperties(colorSchemesMap, [colorScheme].map(_toPropertyKey));
|
|
73
|
+
if (defaultSchemeVal) {
|
|
74
|
+
// default color scheme has to come before other color schemes
|
|
75
|
+
var _css2 = defaultSchemeVal.css;
|
|
76
|
+
insertStyleSheet((getSelector == null ? void 0 : getSelector(colorScheme, _extends({}, _css2))) || "[".concat(theme.attribute || 'data-color-scheme', "=\"").concat(colorScheme, "\"]"), _css2);
|
|
77
|
+
}
|
|
78
|
+
Object.entries(rest).forEach(function (_ref7) {
|
|
79
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
80
|
+
key = _ref8[0],
|
|
81
|
+
css = _ref8[1].css;
|
|
82
|
+
insertStyleSheet((getSelector == null ? void 0 : getSelector(key, _extends({}, css))) || "[".concat(theme.attribute || 'data-color-scheme', "=\"").concat(key, "\"]"), css);
|
|
83
|
+
});
|
|
84
|
+
return stylesheets;
|
|
66
85
|
};
|
|
67
86
|
return {
|
|
68
87
|
vars: themeVars,
|
|
69
|
-
|
|
88
|
+
generateThemeVars: generateThemeVars,
|
|
89
|
+
generateStyleSheets: generateStyleSheets
|
|
70
90
|
};
|
|
71
91
|
}
|
|
72
92
|
export default prepareCssVars;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import borders from '
|
|
3
|
-
import display from '
|
|
4
|
-
import flexbox from '
|
|
5
|
-
import grid from '
|
|
6
|
-
import positions from '
|
|
7
|
-
import palette from '
|
|
8
|
-
import shadows from '
|
|
9
|
-
import sizing from '
|
|
10
|
-
import spacing from '
|
|
11
|
-
import typography from '
|
|
2
|
+
import borders from '../borders';
|
|
3
|
+
import display from '../display';
|
|
4
|
+
import flexbox from '../flexbox';
|
|
5
|
+
import grid from '../cssGrid';
|
|
6
|
+
import positions from '../positions';
|
|
7
|
+
import palette from '../palette';
|
|
8
|
+
import shadows from '../shadows';
|
|
9
|
+
import sizing from '../sizing';
|
|
10
|
+
import spacing from '../spacing';
|
|
11
|
+
import typography from '../typography';
|
|
12
12
|
var filterPropsMapping = {
|
|
13
13
|
borders: borders.filterProps,
|
|
14
14
|
display: display.filterProps,
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import style from '
|
|
2
|
-
import compose from '
|
|
3
|
-
import { handleBreakpoints, values as breakpointsValues } from '
|
|
1
|
+
import style from '../style';
|
|
2
|
+
import compose from '../compose';
|
|
3
|
+
import { handleBreakpoints, values as breakpointsValues } from '../breakpoints';
|
|
4
4
|
export function sizingTransform(value) {
|
|
5
5
|
return value <= 1 && value !== 0 ? "".concat(value * 100, "%") : value;
|
|
6
6
|
}
|