@mui/system 7.0.1 → 7.1.0
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.d.ts +12 -31
- package/CHANGELOG.md +157 -0
- package/Grid/createGrid.js +1 -2
- package/InitColorSchemeScript/InitColorSchemeScript.js +1 -1
- package/Stack/createStack.js +1 -2
- package/borders/borders.d.ts +2 -1
- package/breakpoints/breakpoints.d.ts +1 -1
- package/compose/compose.d.ts +14 -1
- package/compose/index.d.ts +1 -1
- package/cssGrid/cssGrid.d.ts +2 -1
- package/cssVars/cssVarsParser.d.ts +1 -1
- package/display/display.d.ts +2 -1
- package/esm/Box/Box.d.ts +12 -31
- package/esm/Grid/createGrid.js +1 -2
- package/esm/InitColorSchemeScript/InitColorSchemeScript.js +1 -1
- package/esm/Stack/createStack.js +1 -2
- package/esm/borders/borders.d.ts +2 -1
- package/esm/breakpoints/breakpoints.d.ts +1 -1
- package/esm/compose/compose.d.ts +14 -1
- package/esm/compose/index.d.ts +1 -1
- package/esm/cssGrid/cssGrid.d.ts +2 -1
- package/esm/cssVars/cssVarsParser.d.ts +1 -1
- package/esm/display/display.d.ts +2 -1
- package/esm/flexbox/flexbox.d.ts +15 -1
- package/esm/index.d.ts +10 -0
- package/esm/index.js +1 -1
- package/esm/memoTheme.d.ts +1 -1
- package/esm/palette/palette.d.ts +2 -1
- package/esm/positions/positions.d.ts +2 -1
- package/esm/shadows/shadows.d.ts +2 -1
- package/esm/sizing/sizing.d.ts +2 -1
- package/esm/spacing/spacing.d.ts +2 -1
- package/esm/style/style.d.ts +5 -1
- package/esm/styleFunctionSx/defaultSxConfig.d.ts +1 -2
- package/esm/typography/typography.d.ts +2 -1
- package/esm/useMediaQuery/useMediaQuery.js +3 -0
- package/esm/useThemeProps/getThemeProps.d.ts +0 -5
- package/esm/version/index.js +3 -3
- package/flexbox/flexbox.d.ts +15 -1
- package/index.d.ts +10 -0
- package/index.js +1 -1
- package/memoTheme.d.ts +1 -1
- package/package.json +7 -15
- package/palette/palette.d.ts +2 -1
- package/positions/positions.d.ts +2 -1
- package/shadows/shadows.d.ts +2 -1
- package/sizing/sizing.d.ts +2 -1
- package/spacing/spacing.d.ts +2 -1
- package/style/style.d.ts +5 -1
- package/styleFunctionSx/defaultSxConfig.d.ts +1 -2
- package/typography/typography.d.ts +2 -1
- package/useMediaQuery/useMediaQuery.js +3 -0
- package/useThemeProps/getThemeProps.d.ts +0 -5
- package/version/index.js +3 -3
- package/modern/Box/Box.d.ts +0 -72
- package/modern/Box/Box.js +0 -30
- package/modern/Box/boxClasses.d.ts +0 -7
- package/modern/Box/boxClasses.js +0 -3
- package/modern/Box/index.d.ts +0 -4
- package/modern/Box/index.js +0 -3
- package/modern/CSSProperties.d.ts +0 -7
- package/modern/Container/Container.d.ts +0 -13
- package/modern/Container/Container.js +0 -61
- package/modern/Container/ContainerProps.d.ts +0 -40
- package/modern/Container/ContainerProps.js +0 -1
- package/modern/Container/containerClasses.d.ts +0 -22
- package/modern/Container/containerClasses.js +0 -7
- package/modern/Container/createContainer.d.ts +0 -18
- package/modern/Container/createContainer.js +0 -149
- package/modern/Container/index.d.ts +0 -4
- package/modern/Container/index.js +0 -3
- package/modern/DefaultPropsProvider/DefaultPropsProvider.d.ts +0 -18
- package/modern/DefaultPropsProvider/DefaultPropsProvider.js +0 -64
- package/modern/DefaultPropsProvider/index.d.ts +0 -1
- package/modern/DefaultPropsProvider/index.js +0 -1
- package/modern/GlobalStyles/GlobalStyles.d.ts +0 -17
- package/modern/GlobalStyles/GlobalStyles.js +0 -37
- package/modern/GlobalStyles/index.d.ts +0 -2
- package/modern/GlobalStyles/index.js +0 -2
- package/modern/Grid/Grid.d.ts +0 -13
- package/modern/Grid/Grid.js +0 -106
- package/modern/Grid/GridProps.d.ts +0 -103
- package/modern/Grid/GridProps.js +0 -1
- package/modern/Grid/createGrid.d.ts +0 -13
- package/modern/Grid/createGrid.js +0 -155
- package/modern/Grid/deleteLegacyGridProps.d.ts +0 -11
- package/modern/Grid/deleteLegacyGridProps.js +0 -41
- package/modern/Grid/gridClasses.d.ts +0 -20
- package/modern/Grid/gridClasses.js +0 -19
- package/modern/Grid/gridGenerator.d.ts +0 -42
- package/modern/Grid/gridGenerator.js +0 -193
- package/modern/Grid/index.d.ts +0 -7
- package/modern/Grid/index.js +0 -7
- package/modern/Grid/traverseBreakpoints.d.ts +0 -7
- package/modern/Grid/traverseBreakpoints.js +0 -42
- package/modern/InitColorSchemeScript/InitColorSchemeScript.d.ts +0 -51
- package/modern/InitColorSchemeScript/InitColorSchemeScript.js +0 -78
- package/modern/InitColorSchemeScript/index.d.ts +0 -2
- package/modern/InitColorSchemeScript/index.js +0 -1
- package/modern/RtlProvider/index.d.ts +0 -8
- package/modern/RtlProvider/index.js +0 -24
- package/modern/Stack/Stack.d.ts +0 -14
- package/modern/Stack/Stack.js +0 -62
- package/modern/Stack/StackProps.d.ts +0 -53
- package/modern/Stack/StackProps.js +0 -1
- package/modern/Stack/createStack.d.ts +0 -24
- package/modern/Stack/createStack.js +0 -173
- package/modern/Stack/index.d.ts +0 -5
- package/modern/Stack/index.js +0 -5
- package/modern/Stack/stackClasses.d.ts +0 -8
- package/modern/Stack/stackClasses.js +0 -7
- package/modern/ThemeProvider/ThemeProvider.d.ts +0 -24
- package/modern/ThemeProvider/ThemeProvider.js +0 -97
- package/modern/ThemeProvider/index.d.ts +0 -2
- package/modern/ThemeProvider/index.js +0 -1
- package/modern/borders/borders.d.ts +0 -14
- package/modern/borders/borders.js +0 -49
- package/modern/borders/index.d.ts +0 -2
- package/modern/borders/index.js +0 -2
- package/modern/breakpoints/breakpoints.d.ts +0 -19
- package/modern/breakpoints/breakpoints.js +0 -171
- package/modern/breakpoints/index.d.ts +0 -2
- package/modern/breakpoints/index.js +0 -2
- package/modern/colorManipulator/colorManipulator.d.ts +0 -25
- package/modern/colorManipulator/colorManipulator.js +0 -349
- package/modern/colorManipulator/index.d.ts +0 -1
- package/modern/colorManipulator/index.js +0 -1
- package/modern/compose/compose.d.ts +0 -2
- package/modern/compose/compose.js +0 -24
- package/modern/compose/index.d.ts +0 -1
- package/modern/compose/index.js +0 -1
- package/modern/createBox/createBox.d.ts +0 -9
- package/modern/createBox/createBox.js +0 -35
- package/modern/createBox/index.d.ts +0 -1
- package/modern/createBox/index.js +0 -1
- package/modern/createBreakpoints/createBreakpoints.d.ts +0 -78
- package/modern/createBreakpoints/createBreakpoints.js +0 -81
- package/modern/createBreakpoints/index.d.ts +0 -3
- package/modern/createBreakpoints/index.js +0 -3
- package/modern/createStyled/createStyled.d.ts +0 -27
- package/modern/createStyled/createStyled.js +0 -276
- package/modern/createStyled/index.d.ts +0 -2
- package/modern/createStyled/index.js +0 -2
- package/modern/createTheme/applyStyles.d.ts +0 -67
- package/modern/createTheme/applyStyles.js +0 -87
- package/modern/createTheme/createSpacing.d.ts +0 -10
- package/modern/createTheme/createSpacing.js +0 -31
- package/modern/createTheme/createTheme.d.ts +0 -54
- package/modern/createTheme/createTheme.js +0 -49
- package/modern/createTheme/index.d.ts +0 -4
- package/modern/createTheme/index.js +0 -3
- package/modern/createTheme/shape.d.ts +0 -6
- package/modern/createTheme/shape.js +0 -4
- package/modern/cssContainerQueries/cssContainerQueries.d.ts +0 -23
- package/modern/cssContainerQueries/cssContainerQueries.js +0 -69
- package/modern/cssContainerQueries/index.d.ts +0 -3
- package/modern/cssContainerQueries/index.js +0 -2
- package/modern/cssGrid/cssGrid.d.ts +0 -15
- package/modern/cssGrid/cssGrid.js +0 -85
- package/modern/cssGrid/index.d.ts +0 -2
- package/modern/cssGrid/index.js +0 -2
- package/modern/cssVars/createCssVarsProvider.d.ts +0 -141
- package/modern/cssVars/createCssVarsProvider.js +0 -338
- package/modern/cssVars/createCssVarsTheme.d.ts +0 -15
- package/modern/cssVars/createCssVarsTheme.js +0 -21
- package/modern/cssVars/createGetCssVar.d.ts +0 -5
- package/modern/cssVars/createGetCssVar.js +0 -22
- package/modern/cssVars/cssVarsParser.d.ts +0 -64
- package/modern/cssVars/cssVarsParser.js +0 -129
- package/modern/cssVars/getColorSchemeSelector.d.ts +0 -1
- package/modern/cssVars/getColorSchemeSelector.js +0 -26
- package/modern/cssVars/index.d.ts +0 -8
- package/modern/cssVars/index.js +0 -5
- package/modern/cssVars/localStorageManager.d.ts +0 -34
- package/modern/cssVars/localStorageManager.js +0 -51
- package/modern/cssVars/prepareCssVars.d.ts +0 -16
- package/modern/cssVars/prepareCssVars.js +0 -153
- package/modern/cssVars/prepareTypographyVars.d.ts +0 -4
- package/modern/cssVars/prepareTypographyVars.js +0 -11
- package/modern/cssVars/useCurrentColorScheme.d.ts +0 -56
- package/modern/cssVars/useCurrentColorScheme.js +0 -228
- package/modern/display/display.d.ts +0 -3
- package/modern/display/display.js +0 -27
- package/modern/display/index.d.ts +0 -2
- package/modern/display/index.js +0 -2
- package/modern/flexbox/flexbox.d.ts +0 -3
- package/modern/flexbox/flexbox.js +0 -43
- package/modern/flexbox/index.d.ts +0 -2
- package/modern/flexbox/index.js +0 -2
- package/modern/getThemeValue/getThemeValue.d.ts +0 -1
- package/modern/getThemeValue/getThemeValue.js +0 -51
- package/modern/getThemeValue/index.d.ts +0 -2
- package/modern/getThemeValue/index.js +0 -2
- package/modern/index.d.ts +0 -80
- package/modern/index.js +0 -75
- package/modern/memoTheme.d.ts +0 -12
- package/modern/memoTheme.js +0 -28
- package/modern/memoize/index.d.ts +0 -1
- package/modern/memoize/index.js +0 -1
- package/modern/memoize/memoize.d.ts +0 -1
- package/modern/memoize/memoize.js +0 -9
- package/modern/merge/index.d.ts +0 -1
- package/modern/merge/index.js +0 -1
- package/modern/merge/merge.d.ts +0 -1
- package/modern/merge/merge.js +0 -10
- package/modern/package.json +0 -1
- package/modern/palette/index.d.ts +0 -2
- package/modern/palette/index.js +0 -2
- package/modern/palette/palette.d.ts +0 -5
- package/modern/palette/palette.js +0 -26
- package/modern/positions/index.d.ts +0 -2
- package/modern/positions/index.js +0 -2
- package/modern/positions/positions.d.ts +0 -3
- package/modern/positions/positions.js +0 -22
- package/modern/preprocessStyles.d.ts +0 -5
- package/modern/preprocessStyles.js +0 -25
- package/modern/propsToClassKey/index.d.ts +0 -1
- package/modern/propsToClassKey/index.js +0 -1
- package/modern/propsToClassKey/propsToClassKey.d.ts +0 -1
- package/modern/propsToClassKey/propsToClassKey.js +0 -25
- package/modern/responsivePropType/index.d.ts +0 -1
- package/modern/responsivePropType/index.js +0 -1
- package/modern/responsivePropType/responsivePropType.d.ts +0 -2
- package/modern/responsivePropType/responsivePropType.js +0 -3
- package/modern/shadows/index.d.ts +0 -1
- package/modern/shadows/index.js +0 -1
- package/modern/shadows/shadows.d.ts +0 -3
- package/modern/shadows/shadows.js +0 -6
- package/modern/sizing/index.d.ts +0 -2
- package/modern/sizing/index.js +0 -2
- package/modern/sizing/sizing.d.ts +0 -12
- package/modern/sizing/sizing.js +0 -64
- package/modern/spacing/index.d.ts +0 -2
- package/modern/spacing/index.js +0 -2
- package/modern/spacing/spacing.d.ts +0 -19
- package/modern/spacing/spacing.js +0 -157
- package/modern/style/index.d.ts +0 -2
- package/modern/style/index.js +0 -2
- package/modern/style/style.d.ts +0 -19
- package/modern/style/style.js +0 -75
- package/modern/styleFunctionSx/AliasesCSSProperties.d.ts +0 -269
- package/modern/styleFunctionSx/AliasesCSSProperties.js +0 -1
- package/modern/styleFunctionSx/OverwriteCSSProperties.d.ts +0 -54
- package/modern/styleFunctionSx/OverwriteCSSProperties.js +0 -1
- package/modern/styleFunctionSx/StandardCssProperties.d.ts +0 -2
- package/modern/styleFunctionSx/StandardCssProperties.js +0 -1
- package/modern/styleFunctionSx/defaultSxConfig.d.ts +0 -15
- package/modern/styleFunctionSx/defaultSxConfig.js +0 -294
- package/modern/styleFunctionSx/extendSxProp.d.ts +0 -4
- package/modern/styleFunctionSx/extendSxProp.js +0 -51
- package/modern/styleFunctionSx/index.d.ts +0 -9
- package/modern/styleFunctionSx/index.js +0 -4
- package/modern/styleFunctionSx/styleFunctionSx.d.ts +0 -62
- package/modern/styleFunctionSx/styleFunctionSx.js +0 -127
- package/modern/styled/index.d.ts +0 -1
- package/modern/styled/index.js +0 -1
- package/modern/styled/styled.d.ts +0 -3
- package/modern/styled/styled.js +0 -3
- package/modern/typography/index.d.ts +0 -2
- package/modern/typography/index.js +0 -2
- package/modern/typography/typography.d.ts +0 -12
- package/modern/typography/typography.js +0 -37
- package/modern/useMediaQuery/index.d.ts +0 -2
- package/modern/useMediaQuery/index.js +0 -2
- package/modern/useMediaQuery/useMediaQuery.d.ts +0 -32
- package/modern/useMediaQuery/useMediaQuery.js +0 -118
- package/modern/useTheme/index.d.ts +0 -2
- package/modern/useTheme/index.js +0 -2
- package/modern/useTheme/useTheme.d.ts +0 -2
- package/modern/useTheme/useTheme.js +0 -9
- package/modern/useThemeProps/getThemeProps.d.ts +0 -16
- package/modern/useThemeProps/getThemeProps.js +0 -12
- package/modern/useThemeProps/index.d.ts +0 -3
- package/modern/useThemeProps/index.js +0 -2
- package/modern/useThemeProps/useThemeProps.d.ts +0 -14
- package/modern/useThemeProps/useThemeProps.js +0 -20
- package/modern/useThemeWithoutDefault/index.d.ts +0 -1
- package/modern/useThemeWithoutDefault/index.js +0 -1
- package/modern/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +0 -1
- package/modern/useThemeWithoutDefault/useThemeWithoutDefault.js +0 -12
- package/modern/version/index.d.ts +0 -6
- package/modern/version/index.js +0 -6
- package/tsconfig.build.tsbuildinfo +0 -1
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { padding, margin } from "../spacing/index.js";
|
|
2
|
-
import { borderRadius, borderTransform } from "../borders/index.js";
|
|
3
|
-
import { gap, rowGap, columnGap } from "../cssGrid/index.js";
|
|
4
|
-
import { paletteTransform } from "../palette/index.js";
|
|
5
|
-
import { maxWidth, sizingTransform } from "../sizing/index.js";
|
|
6
|
-
const defaultSxConfig = {
|
|
7
|
-
// borders
|
|
8
|
-
border: {
|
|
9
|
-
themeKey: 'borders',
|
|
10
|
-
transform: borderTransform
|
|
11
|
-
},
|
|
12
|
-
borderTop: {
|
|
13
|
-
themeKey: 'borders',
|
|
14
|
-
transform: borderTransform
|
|
15
|
-
},
|
|
16
|
-
borderRight: {
|
|
17
|
-
themeKey: 'borders',
|
|
18
|
-
transform: borderTransform
|
|
19
|
-
},
|
|
20
|
-
borderBottom: {
|
|
21
|
-
themeKey: 'borders',
|
|
22
|
-
transform: borderTransform
|
|
23
|
-
},
|
|
24
|
-
borderLeft: {
|
|
25
|
-
themeKey: 'borders',
|
|
26
|
-
transform: borderTransform
|
|
27
|
-
},
|
|
28
|
-
borderColor: {
|
|
29
|
-
themeKey: 'palette'
|
|
30
|
-
},
|
|
31
|
-
borderTopColor: {
|
|
32
|
-
themeKey: 'palette'
|
|
33
|
-
},
|
|
34
|
-
borderRightColor: {
|
|
35
|
-
themeKey: 'palette'
|
|
36
|
-
},
|
|
37
|
-
borderBottomColor: {
|
|
38
|
-
themeKey: 'palette'
|
|
39
|
-
},
|
|
40
|
-
borderLeftColor: {
|
|
41
|
-
themeKey: 'palette'
|
|
42
|
-
},
|
|
43
|
-
outline: {
|
|
44
|
-
themeKey: 'borders',
|
|
45
|
-
transform: borderTransform
|
|
46
|
-
},
|
|
47
|
-
outlineColor: {
|
|
48
|
-
themeKey: 'palette'
|
|
49
|
-
},
|
|
50
|
-
borderRadius: {
|
|
51
|
-
themeKey: 'shape.borderRadius',
|
|
52
|
-
style: borderRadius
|
|
53
|
-
},
|
|
54
|
-
// palette
|
|
55
|
-
color: {
|
|
56
|
-
themeKey: 'palette',
|
|
57
|
-
transform: paletteTransform
|
|
58
|
-
},
|
|
59
|
-
bgcolor: {
|
|
60
|
-
themeKey: 'palette',
|
|
61
|
-
cssProperty: 'backgroundColor',
|
|
62
|
-
transform: paletteTransform
|
|
63
|
-
},
|
|
64
|
-
backgroundColor: {
|
|
65
|
-
themeKey: 'palette',
|
|
66
|
-
transform: paletteTransform
|
|
67
|
-
},
|
|
68
|
-
// spacing
|
|
69
|
-
p: {
|
|
70
|
-
style: padding
|
|
71
|
-
},
|
|
72
|
-
pt: {
|
|
73
|
-
style: padding
|
|
74
|
-
},
|
|
75
|
-
pr: {
|
|
76
|
-
style: padding
|
|
77
|
-
},
|
|
78
|
-
pb: {
|
|
79
|
-
style: padding
|
|
80
|
-
},
|
|
81
|
-
pl: {
|
|
82
|
-
style: padding
|
|
83
|
-
},
|
|
84
|
-
px: {
|
|
85
|
-
style: padding
|
|
86
|
-
},
|
|
87
|
-
py: {
|
|
88
|
-
style: padding
|
|
89
|
-
},
|
|
90
|
-
padding: {
|
|
91
|
-
style: padding
|
|
92
|
-
},
|
|
93
|
-
paddingTop: {
|
|
94
|
-
style: padding
|
|
95
|
-
},
|
|
96
|
-
paddingRight: {
|
|
97
|
-
style: padding
|
|
98
|
-
},
|
|
99
|
-
paddingBottom: {
|
|
100
|
-
style: padding
|
|
101
|
-
},
|
|
102
|
-
paddingLeft: {
|
|
103
|
-
style: padding
|
|
104
|
-
},
|
|
105
|
-
paddingX: {
|
|
106
|
-
style: padding
|
|
107
|
-
},
|
|
108
|
-
paddingY: {
|
|
109
|
-
style: padding
|
|
110
|
-
},
|
|
111
|
-
paddingInline: {
|
|
112
|
-
style: padding
|
|
113
|
-
},
|
|
114
|
-
paddingInlineStart: {
|
|
115
|
-
style: padding
|
|
116
|
-
},
|
|
117
|
-
paddingInlineEnd: {
|
|
118
|
-
style: padding
|
|
119
|
-
},
|
|
120
|
-
paddingBlock: {
|
|
121
|
-
style: padding
|
|
122
|
-
},
|
|
123
|
-
paddingBlockStart: {
|
|
124
|
-
style: padding
|
|
125
|
-
},
|
|
126
|
-
paddingBlockEnd: {
|
|
127
|
-
style: padding
|
|
128
|
-
},
|
|
129
|
-
m: {
|
|
130
|
-
style: margin
|
|
131
|
-
},
|
|
132
|
-
mt: {
|
|
133
|
-
style: margin
|
|
134
|
-
},
|
|
135
|
-
mr: {
|
|
136
|
-
style: margin
|
|
137
|
-
},
|
|
138
|
-
mb: {
|
|
139
|
-
style: margin
|
|
140
|
-
},
|
|
141
|
-
ml: {
|
|
142
|
-
style: margin
|
|
143
|
-
},
|
|
144
|
-
mx: {
|
|
145
|
-
style: margin
|
|
146
|
-
},
|
|
147
|
-
my: {
|
|
148
|
-
style: margin
|
|
149
|
-
},
|
|
150
|
-
margin: {
|
|
151
|
-
style: margin
|
|
152
|
-
},
|
|
153
|
-
marginTop: {
|
|
154
|
-
style: margin
|
|
155
|
-
},
|
|
156
|
-
marginRight: {
|
|
157
|
-
style: margin
|
|
158
|
-
},
|
|
159
|
-
marginBottom: {
|
|
160
|
-
style: margin
|
|
161
|
-
},
|
|
162
|
-
marginLeft: {
|
|
163
|
-
style: margin
|
|
164
|
-
},
|
|
165
|
-
marginX: {
|
|
166
|
-
style: margin
|
|
167
|
-
},
|
|
168
|
-
marginY: {
|
|
169
|
-
style: margin
|
|
170
|
-
},
|
|
171
|
-
marginInline: {
|
|
172
|
-
style: margin
|
|
173
|
-
},
|
|
174
|
-
marginInlineStart: {
|
|
175
|
-
style: margin
|
|
176
|
-
},
|
|
177
|
-
marginInlineEnd: {
|
|
178
|
-
style: margin
|
|
179
|
-
},
|
|
180
|
-
marginBlock: {
|
|
181
|
-
style: margin
|
|
182
|
-
},
|
|
183
|
-
marginBlockStart: {
|
|
184
|
-
style: margin
|
|
185
|
-
},
|
|
186
|
-
marginBlockEnd: {
|
|
187
|
-
style: margin
|
|
188
|
-
},
|
|
189
|
-
// display
|
|
190
|
-
displayPrint: {
|
|
191
|
-
cssProperty: false,
|
|
192
|
-
transform: value => ({
|
|
193
|
-
'@media print': {
|
|
194
|
-
display: value
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
},
|
|
198
|
-
display: {},
|
|
199
|
-
overflow: {},
|
|
200
|
-
textOverflow: {},
|
|
201
|
-
visibility: {},
|
|
202
|
-
whiteSpace: {},
|
|
203
|
-
// flexbox
|
|
204
|
-
flexBasis: {},
|
|
205
|
-
flexDirection: {},
|
|
206
|
-
flexWrap: {},
|
|
207
|
-
justifyContent: {},
|
|
208
|
-
alignItems: {},
|
|
209
|
-
alignContent: {},
|
|
210
|
-
order: {},
|
|
211
|
-
flex: {},
|
|
212
|
-
flexGrow: {},
|
|
213
|
-
flexShrink: {},
|
|
214
|
-
alignSelf: {},
|
|
215
|
-
justifyItems: {},
|
|
216
|
-
justifySelf: {},
|
|
217
|
-
// grid
|
|
218
|
-
gap: {
|
|
219
|
-
style: gap
|
|
220
|
-
},
|
|
221
|
-
rowGap: {
|
|
222
|
-
style: rowGap
|
|
223
|
-
},
|
|
224
|
-
columnGap: {
|
|
225
|
-
style: columnGap
|
|
226
|
-
},
|
|
227
|
-
gridColumn: {},
|
|
228
|
-
gridRow: {},
|
|
229
|
-
gridAutoFlow: {},
|
|
230
|
-
gridAutoColumns: {},
|
|
231
|
-
gridAutoRows: {},
|
|
232
|
-
gridTemplateColumns: {},
|
|
233
|
-
gridTemplateRows: {},
|
|
234
|
-
gridTemplateAreas: {},
|
|
235
|
-
gridArea: {},
|
|
236
|
-
// positions
|
|
237
|
-
position: {},
|
|
238
|
-
zIndex: {
|
|
239
|
-
themeKey: 'zIndex'
|
|
240
|
-
},
|
|
241
|
-
top: {},
|
|
242
|
-
right: {},
|
|
243
|
-
bottom: {},
|
|
244
|
-
left: {},
|
|
245
|
-
// shadows
|
|
246
|
-
boxShadow: {
|
|
247
|
-
themeKey: 'shadows'
|
|
248
|
-
},
|
|
249
|
-
// sizing
|
|
250
|
-
width: {
|
|
251
|
-
transform: sizingTransform
|
|
252
|
-
},
|
|
253
|
-
maxWidth: {
|
|
254
|
-
style: maxWidth
|
|
255
|
-
},
|
|
256
|
-
minWidth: {
|
|
257
|
-
transform: sizingTransform
|
|
258
|
-
},
|
|
259
|
-
height: {
|
|
260
|
-
transform: sizingTransform
|
|
261
|
-
},
|
|
262
|
-
maxHeight: {
|
|
263
|
-
transform: sizingTransform
|
|
264
|
-
},
|
|
265
|
-
minHeight: {
|
|
266
|
-
transform: sizingTransform
|
|
267
|
-
},
|
|
268
|
-
boxSizing: {},
|
|
269
|
-
// typography
|
|
270
|
-
font: {
|
|
271
|
-
themeKey: 'font'
|
|
272
|
-
},
|
|
273
|
-
fontFamily: {
|
|
274
|
-
themeKey: 'typography'
|
|
275
|
-
},
|
|
276
|
-
fontSize: {
|
|
277
|
-
themeKey: 'typography'
|
|
278
|
-
},
|
|
279
|
-
fontStyle: {
|
|
280
|
-
themeKey: 'typography'
|
|
281
|
-
},
|
|
282
|
-
fontWeight: {
|
|
283
|
-
themeKey: 'typography'
|
|
284
|
-
},
|
|
285
|
-
letterSpacing: {},
|
|
286
|
-
textTransform: {},
|
|
287
|
-
lineHeight: {},
|
|
288
|
-
textAlign: {},
|
|
289
|
-
typography: {
|
|
290
|
-
cssProperty: false,
|
|
291
|
-
themeKey: 'typography'
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
export default defaultSxConfig;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { isPlainObject } from '@mui/utils/deepmerge';
|
|
2
|
-
import defaultSxConfig from "./defaultSxConfig.js";
|
|
3
|
-
const splitProps = props => {
|
|
4
|
-
const result = {
|
|
5
|
-
systemProps: {},
|
|
6
|
-
otherProps: {}
|
|
7
|
-
};
|
|
8
|
-
const config = props?.theme?.unstable_sxConfig ?? defaultSxConfig;
|
|
9
|
-
Object.keys(props).forEach(prop => {
|
|
10
|
-
if (config[prop]) {
|
|
11
|
-
result.systemProps[prop] = props[prop];
|
|
12
|
-
} else {
|
|
13
|
-
result.otherProps[prop] = props[prop];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
export default function extendSxProp(props) {
|
|
19
|
-
const {
|
|
20
|
-
sx: inSx,
|
|
21
|
-
...other
|
|
22
|
-
} = props;
|
|
23
|
-
const {
|
|
24
|
-
systemProps,
|
|
25
|
-
otherProps
|
|
26
|
-
} = splitProps(other);
|
|
27
|
-
let finalSx;
|
|
28
|
-
if (Array.isArray(inSx)) {
|
|
29
|
-
finalSx = [systemProps, ...inSx];
|
|
30
|
-
} else if (typeof inSx === 'function') {
|
|
31
|
-
finalSx = (...args) => {
|
|
32
|
-
const result = inSx(...args);
|
|
33
|
-
if (!isPlainObject(result)) {
|
|
34
|
-
return systemProps;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
...systemProps,
|
|
38
|
-
...result
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
} else {
|
|
42
|
-
finalSx = {
|
|
43
|
-
...systemProps,
|
|
44
|
-
...inSx
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
...otherProps,
|
|
49
|
-
sx: finalSx
|
|
50
|
-
};
|
|
51
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { default } from "./styleFunctionSx.js";
|
|
2
|
-
export * from "./styleFunctionSx.js";
|
|
3
|
-
export * from "./AliasesCSSProperties.js";
|
|
4
|
-
export * from "./OverwriteCSSProperties.js";
|
|
5
|
-
export * from "./StandardCssProperties.js";
|
|
6
|
-
export { default as extendSxProp } from "./extendSxProp.js";
|
|
7
|
-
export { default as unstable_defaultSxConfig } from "./defaultSxConfig.js";
|
|
8
|
-
export * from "./defaultSxConfig.js";
|
|
9
|
-
export * from "./extendSxProp.js";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as CSS from 'csstype';
|
|
2
|
-
import { CSSObject } from '@mui/styled-engine';
|
|
3
|
-
import { StandardCSSProperties } from "./StandardCssProperties.js";
|
|
4
|
-
import { AliasesCSSProperties } from "./AliasesCSSProperties.js";
|
|
5
|
-
import { OverwriteCSSProperties } from "./OverwriteCSSProperties.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The `css` function accepts arrays as values for mobile-first responsive styles.
|
|
9
|
-
* Note that this extends to non-theme values also. For example `display=['none', 'block']`
|
|
10
|
-
* will also works.
|
|
11
|
-
*/
|
|
12
|
-
export type ResponsiveStyleValue<T> = T | ReadonlyArray<T | null> | {
|
|
13
|
-
[key: string]: T | null;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Map of all CSS pseudo selectors (`:hover`, `:focus`, ...).
|
|
18
|
-
*/
|
|
19
|
-
export type CSSPseudoSelectorProps<Theme extends object = {}> = { [K in CSS.Pseudos]?: ((theme: Theme) => SystemStyleObject<Theme>) | SystemStyleObject<Theme> };
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Map all nested selectors.
|
|
23
|
-
*/
|
|
24
|
-
export interface CSSSelectorObject<Theme extends object = {}> {
|
|
25
|
-
[cssSelector: string]: ((theme: Theme) => SystemStyleObject<Theme>) | SystemStyleObject<Theme>;
|
|
26
|
-
}
|
|
27
|
-
type CssVariableType = string | number;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Map all nested selectors and CSS variables.
|
|
31
|
-
*/
|
|
32
|
-
export interface CSSSelectorObjectOrCssVariables<Theme extends object = {}> {
|
|
33
|
-
[cssSelectorOrVariable: string]: ((theme: Theme) => SystemStyleObject<Theme> | string | number) | SystemStyleObject<Theme> | CssVariableType;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Map of all available CSS properties (including aliases) and their raw value.
|
|
38
|
-
* Only used internally to map CSS properties to input types (responsive value,
|
|
39
|
-
* theme function or nested) in `SystemCssProperties`.
|
|
40
|
-
*/
|
|
41
|
-
export interface AllSystemCSSProperties extends Omit<StandardCSSProperties, keyof OverwriteCSSProperties>, OverwriteCSSProperties, AliasesCSSProperties {}
|
|
42
|
-
export type SystemCssProperties<Theme extends object = {}> = { [K in keyof AllSystemCSSProperties]: ResponsiveStyleValue<AllSystemCSSProperties[K]> | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>) | null };
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The `SystemStyleObject` defines custom properties that will be transformed to
|
|
46
|
-
* their corresponding values from the `Theme`. Other valid CSS properties are also allowed.
|
|
47
|
-
*/
|
|
48
|
-
export type SystemStyleObject<Theme extends object = {}> = SystemCssProperties<Theme> | CSSPseudoSelectorProps<Theme> | CSSSelectorObjectOrCssVariables<Theme> | null;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The `SxProps` can be either object or function
|
|
52
|
-
*/
|
|
53
|
-
export type SxProps<Theme extends object = {}> = SystemStyleObject<Theme> | ((theme: Theme) => SystemStyleObject<Theme>) | ReadonlyArray<boolean | SystemStyleObject<Theme> | ((theme: Theme) => SystemStyleObject<Theme>)>;
|
|
54
|
-
export interface StyleFunctionSx {
|
|
55
|
-
(props: object): CSSObject;
|
|
56
|
-
filterProps?: string[];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
60
|
-
export function unstable_createStyleFunctionSx(styleFunctionMapping: Record<string, StyleFunctionSx>): StyleFunctionSx;
|
|
61
|
-
declare const styleFunctionSx: StyleFunctionSx;
|
|
62
|
-
export default styleFunctionSx;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import capitalize from '@mui/utils/capitalize';
|
|
2
|
-
import merge from "../merge/index.js";
|
|
3
|
-
import { getPath, getStyleValue as getValue } from "../style/index.js";
|
|
4
|
-
import { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from "../breakpoints/index.js";
|
|
5
|
-
import { sortContainerQueries } from "../cssContainerQueries/index.js";
|
|
6
|
-
import defaultSxConfig from "./defaultSxConfig.js";
|
|
7
|
-
function objectsHaveSameKeys(...objects) {
|
|
8
|
-
const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
|
|
9
|
-
const union = new Set(allKeys);
|
|
10
|
-
return objects.every(object => union.size === Object.keys(object).length);
|
|
11
|
-
}
|
|
12
|
-
function callIfFn(maybeFn, arg) {
|
|
13
|
-
return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
17
|
-
export function unstable_createStyleFunctionSx() {
|
|
18
|
-
function getThemeValue(prop, val, theme, config) {
|
|
19
|
-
const props = {
|
|
20
|
-
[prop]: val,
|
|
21
|
-
theme
|
|
22
|
-
};
|
|
23
|
-
const options = config[prop];
|
|
24
|
-
if (!options) {
|
|
25
|
-
return {
|
|
26
|
-
[prop]: val
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
const {
|
|
30
|
-
cssProperty = prop,
|
|
31
|
-
themeKey,
|
|
32
|
-
transform,
|
|
33
|
-
style
|
|
34
|
-
} = options;
|
|
35
|
-
if (val == null) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// TODO v6: remove, see https://github.com/mui/material-ui/pull/38123
|
|
40
|
-
if (themeKey === 'typography' && val === 'inherit') {
|
|
41
|
-
return {
|
|
42
|
-
[prop]: val
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const themeMapping = getPath(theme, themeKey) || {};
|
|
46
|
-
if (style) {
|
|
47
|
-
return style(props);
|
|
48
|
-
}
|
|
49
|
-
const styleFromPropValue = propValueFinal => {
|
|
50
|
-
let value = getValue(themeMapping, transform, propValueFinal);
|
|
51
|
-
if (propValueFinal === value && typeof propValueFinal === 'string') {
|
|
52
|
-
// Haven't found value
|
|
53
|
-
value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);
|
|
54
|
-
}
|
|
55
|
-
if (cssProperty === false) {
|
|
56
|
-
return value;
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
[cssProperty]: value
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
return handleBreakpoints(props, val, styleFromPropValue);
|
|
63
|
-
}
|
|
64
|
-
function styleFunctionSx(props) {
|
|
65
|
-
const {
|
|
66
|
-
sx,
|
|
67
|
-
theme = {}
|
|
68
|
-
} = props || {};
|
|
69
|
-
if (!sx) {
|
|
70
|
-
return null; // Emotion & styled-components will neglect null
|
|
71
|
-
}
|
|
72
|
-
const config = theme.unstable_sxConfig ?? defaultSxConfig;
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
* Receive `sxInput` as object or callback
|
|
76
|
-
* and then recursively check keys & values to create media query object styles.
|
|
77
|
-
* (the result will be used in `styled`)
|
|
78
|
-
*/
|
|
79
|
-
function traverse(sxInput) {
|
|
80
|
-
let sxObject = sxInput;
|
|
81
|
-
if (typeof sxInput === 'function') {
|
|
82
|
-
sxObject = sxInput(theme);
|
|
83
|
-
} else if (typeof sxInput !== 'object') {
|
|
84
|
-
// value
|
|
85
|
-
return sxInput;
|
|
86
|
-
}
|
|
87
|
-
if (!sxObject) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);
|
|
91
|
-
const breakpointsKeys = Object.keys(emptyBreakpoints);
|
|
92
|
-
let css = emptyBreakpoints;
|
|
93
|
-
Object.keys(sxObject).forEach(styleKey => {
|
|
94
|
-
const value = callIfFn(sxObject[styleKey], theme);
|
|
95
|
-
if (value !== null && value !== undefined) {
|
|
96
|
-
if (typeof value === 'object') {
|
|
97
|
-
if (config[styleKey]) {
|
|
98
|
-
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
99
|
-
} else {
|
|
100
|
-
const breakpointsValues = handleBreakpoints({
|
|
101
|
-
theme
|
|
102
|
-
}, value, x => ({
|
|
103
|
-
[styleKey]: x
|
|
104
|
-
}));
|
|
105
|
-
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
106
|
-
css[styleKey] = styleFunctionSx({
|
|
107
|
-
sx: value,
|
|
108
|
-
theme
|
|
109
|
-
});
|
|
110
|
-
} else {
|
|
111
|
-
css = merge(css, breakpointsValues);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
|
|
120
|
-
}
|
|
121
|
-
return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
|
|
122
|
-
}
|
|
123
|
-
return styleFunctionSx;
|
|
124
|
-
}
|
|
125
|
-
const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
126
|
-
styleFunctionSx.filterProps = ['sx'];
|
|
127
|
-
export default styleFunctionSx;
|
package/modern/styled/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./styled.js";
|
package/modern/styled/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./styled.js";
|
package/modern/styled/styled.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction, typography } from "../Box/index.js";
|
|
2
|
-
export const typographyVariant: SimpleStyleFunction<'typography'>;
|
|
3
|
-
export const fontFamily: SimpleStyleFunction<'fontFamily'>;
|
|
4
|
-
export const fontSize: SimpleStyleFunction<'fontSize'>;
|
|
5
|
-
export const fontStyle: SimpleStyleFunction<'fontStyle'>;
|
|
6
|
-
export const fontWeight: SimpleStyleFunction<'fontWeight'>;
|
|
7
|
-
export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
|
|
8
|
-
export const lineHeight: SimpleStyleFunction<'lineHeight'>;
|
|
9
|
-
export const textAlign: SimpleStyleFunction<'textAlign'>;
|
|
10
|
-
export const textTransform: SimpleStyleFunction<'textTransform'>;
|
|
11
|
-
export type TypographyProps = PropsFor<typeof typography>;
|
|
12
|
-
export default typography;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import style from "../style/index.js";
|
|
2
|
-
import compose from "../compose/index.js";
|
|
3
|
-
export const fontFamily = style({
|
|
4
|
-
prop: 'fontFamily',
|
|
5
|
-
themeKey: 'typography'
|
|
6
|
-
});
|
|
7
|
-
export const fontSize = style({
|
|
8
|
-
prop: 'fontSize',
|
|
9
|
-
themeKey: 'typography'
|
|
10
|
-
});
|
|
11
|
-
export const fontStyle = style({
|
|
12
|
-
prop: 'fontStyle',
|
|
13
|
-
themeKey: 'typography'
|
|
14
|
-
});
|
|
15
|
-
export const fontWeight = style({
|
|
16
|
-
prop: 'fontWeight',
|
|
17
|
-
themeKey: 'typography'
|
|
18
|
-
});
|
|
19
|
-
export const letterSpacing = style({
|
|
20
|
-
prop: 'letterSpacing'
|
|
21
|
-
});
|
|
22
|
-
export const textTransform = style({
|
|
23
|
-
prop: 'textTransform'
|
|
24
|
-
});
|
|
25
|
-
export const lineHeight = style({
|
|
26
|
-
prop: 'lineHeight'
|
|
27
|
-
});
|
|
28
|
-
export const textAlign = style({
|
|
29
|
-
prop: 'textAlign'
|
|
30
|
-
});
|
|
31
|
-
export const typographyVariant = style({
|
|
32
|
-
prop: 'typography',
|
|
33
|
-
cssProperty: false,
|
|
34
|
-
themeKey: 'typography'
|
|
35
|
-
});
|
|
36
|
-
const typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, textTransform);
|
|
37
|
-
export default typography;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export interface UseMediaQueryOptions {
|
|
2
|
-
/**
|
|
3
|
-
* As `window.matchMedia()` is unavailable on the server,
|
|
4
|
-
* it returns a default matches during the first mount.
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
defaultMatches?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* You can provide your own implementation of matchMedia.
|
|
10
|
-
* This can be used for handling an iframe content window.
|
|
11
|
-
*/
|
|
12
|
-
matchMedia?: typeof window.matchMedia;
|
|
13
|
-
/**
|
|
14
|
-
* To perform the server-side hydration, the hook needs to render twice.
|
|
15
|
-
* A first time with `defaultMatches`, the value of the server, and a second time with the resolved value.
|
|
16
|
-
* This double pass rendering cycle comes with a drawback: it's slower.
|
|
17
|
-
* You can set this option to `true` if you use the returned value **only** client-side.
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
noSsr?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* You can provide your own implementation of `matchMedia`, it's used when rendering server-side.
|
|
23
|
-
*/
|
|
24
|
-
ssrMatchMedia?: (query: string) => {
|
|
25
|
-
matches: boolean;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export declare function unstable_createUseMediaQuery(params?: {
|
|
29
|
-
themeId?: string;
|
|
30
|
-
}): <Theme = unknown>(queryInput: string | ((theme: Theme) => string), options?: UseMediaQueryOptions) => boolean;
|
|
31
|
-
declare const useMediaQuery: <Theme = unknown>(queryInput: string | ((theme: Theme) => string), options?: UseMediaQueryOptions) => boolean;
|
|
32
|
-
export default useMediaQuery;
|