@mui/system 6.1.2 → 6.1.4
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 +17 -11
- package/Box/boxClasses.js +10 -3
- package/Box/index.js +35 -3
- package/Box/package.json +2 -2
- package/CHANGELOG.md +357 -310
- package/Container/Container.js +17 -12
- package/Container/ContainerProps.js +5 -1
- package/Container/containerClasses.js +14 -6
- package/Container/createContainer.js +36 -28
- package/Container/index.js +35 -3
- package/Container/package.json +2 -2
- package/DefaultPropsProvider/DefaultPropsProvider.js +19 -11
- package/DefaultPropsProvider/index.js +19 -1
- package/DefaultPropsProvider/package.json +2 -2
- package/GlobalStyles/GlobalStyles.js +18 -11
- package/GlobalStyles/index.js +25 -2
- package/GlobalStyles/package.json +2 -2
- package/Grid/Grid.js +38 -27
- package/Grid/GridProps.d.ts +16 -11
- package/Grid/GridProps.js +5 -1
- package/Grid/createGrid.js +46 -38
- package/Grid/gridClasses.js +14 -6
- package/Grid/gridGenerator.d.ts +3 -7
- package/Grid/gridGenerator.js +62 -69
- package/Grid/index.js +63 -6
- package/Grid/package.json +2 -2
- package/Grid/traverseBreakpoints.js +11 -3
- package/InitColorSchemeScript/InitColorSchemeScript.js +16 -7
- package/InitColorSchemeScript/index.js +13 -1
- package/InitColorSchemeScript/package.json +2 -2
- package/RtlProvider/index.js +17 -8
- package/RtlProvider/package.json +2 -2
- package/Stack/Stack.js +17 -11
- package/Stack/StackProps.js +5 -1
- package/Stack/createStack.js +46 -36
- package/Stack/index.js +55 -5
- package/Stack/package.json +2 -2
- package/Stack/stackClasses.js +14 -6
- package/ThemeProvider/ThemeProvider.js +27 -20
- package/ThemeProvider/index.js +13 -1
- package/ThemeProvider/package.json +2 -2
- package/borders/borders.js +36 -26
- package/borders/index.js +25 -2
- package/borders/package.json +2 -2
- package/breakpoints/breakpoints.js +34 -21
- package/breakpoints/index.js +25 -2
- package/breakpoints/package.json +2 -2
- package/colorManipulator/colorManipulator.js +50 -25
- package/colorManipulator/index.js +16 -1
- package/colorManipulator/package.json +2 -2
- package/compose/compose.js +10 -3
- package/compose/index.js +13 -1
- package/compose/package.json +2 -2
- package/createBox/createBox.js +20 -13
- package/createBox/index.js +13 -1
- package/createBox/package.json +2 -2
- package/createBreakpoints/createBreakpoints.js +9 -2
- package/createBreakpoints/index.js +13 -3
- package/createBreakpoints/package.json +2 -2
- package/createStyled/createStyled.js +161 -117
- package/createStyled/index.js +25 -2
- package/createStyled/package.json +2 -2
- package/createTheme/applyStyles.js +7 -1
- package/createTheme/createSpacing.js +8 -3
- package/createTheme/createTheme.d.ts +16 -10
- package/createTheme/createTheme.js +25 -18
- package/createTheme/index.js +27 -3
- package/createTheme/package.json +2 -2
- package/createTheme/shape.js +7 -1
- package/cssContainerQueries/cssContainerQueries.js +16 -7
- package/cssContainerQueries/index.js +31 -2
- package/cssContainerQueries/package.json +2 -2
- package/cssGrid/cssGrid.js +40 -31
- package/cssGrid/index.js +25 -2
- package/cssGrid/package.json +2 -2
- package/cssVars/createCssVarsProvider.d.ts +1 -1
- package/cssVars/createCssVarsProvider.js +39 -30
- package/cssVars/createCssVarsTheme.js +14 -7
- package/cssVars/createGetCssVar.js +7 -1
- package/cssVars/cssVarsParser.js +13 -3
- package/cssVars/getColorSchemeSelector.js +7 -1
- package/cssVars/index.js +41 -5
- package/cssVars/package.json +2 -2
- package/cssVars/prepareCssVars.js +16 -9
- package/cssVars/prepareTypographyVars.js +7 -1
- package/cssVars/useCurrentColorScheme.js +15 -7
- package/display/display.js +16 -9
- package/display/index.js +25 -2
- package/display/package.json +2 -2
- package/esm/Box/Box.js +30 -0
- package/esm/Box/boxClasses.js +3 -0
- package/esm/Box/index.js +3 -0
- package/{node → esm}/Container/Container.js +12 -17
- package/esm/Container/ContainerProps.js +1 -0
- package/esm/Container/containerClasses.js +7 -0
- package/{node → esm}/Container/createContainer.js +28 -36
- package/esm/Container/index.js +3 -0
- package/{node → esm}/DefaultPropsProvider/DefaultPropsProvider.js +11 -19
- package/esm/DefaultPropsProvider/index.js +1 -0
- package/esm/GlobalStyles/GlobalStyles.js +37 -0
- package/esm/GlobalStyles/index.js +2 -0
- package/esm/Grid/Grid.js +106 -0
- package/esm/Grid/GridProps.js +1 -0
- package/esm/Grid/createGrid.js +148 -0
- package/{node → esm}/Grid/gridClasses.js +6 -14
- package/esm/Grid/gridGenerator.js +193 -0
- package/esm/Grid/index.js +6 -0
- package/{node → esm}/Grid/traverseBreakpoints.js +3 -11
- package/{node → esm}/InitColorSchemeScript/InitColorSchemeScript.js +7 -16
- package/esm/InitColorSchemeScript/index.js +1 -0
- package/esm/RtlProvider/index.js +22 -0
- package/{node → esm}/Stack/Stack.js +11 -17
- package/esm/Stack/StackProps.js +1 -0
- package/{node → esm}/Stack/createStack.js +36 -46
- package/esm/Stack/index.js +5 -0
- package/esm/Stack/stackClasses.js +7 -0
- package/{node → esm}/ThemeProvider/ThemeProvider.js +20 -27
- package/esm/ThemeProvider/index.js +1 -0
- package/esm/borders/borders.js +49 -0
- package/esm/borders/index.js +2 -0
- package/{node → esm}/breakpoints/breakpoints.js +21 -34
- package/esm/breakpoints/index.js +2 -0
- package/{node → esm}/colorManipulator/colorManipulator.js +23 -51
- package/esm/colorManipulator/index.js +1 -0
- package/{node → esm}/compose/compose.js +3 -10
- package/esm/compose/index.js +1 -0
- package/esm/createBox/createBox.js +35 -0
- package/esm/createBox/index.js +1 -0
- package/{node → esm}/createBreakpoints/createBreakpoints.js +2 -9
- package/esm/createBreakpoints/index.js +3 -0
- package/esm/createStyled/createStyled.js +276 -0
- package/esm/createStyled/index.js +2 -0
- package/{node → esm}/createTheme/applyStyles.js +1 -7
- package/{node → esm}/createTheme/createSpacing.js +3 -8
- package/esm/createTheme/createTheme.js +49 -0
- package/esm/createTheme/index.js +3 -0
- package/esm/createTheme/shape.js +4 -0
- package/{node → esm}/cssContainerQueries/cssContainerQueries.js +6 -17
- package/esm/cssContainerQueries/index.js +2 -0
- package/esm/cssGrid/cssGrid.js +85 -0
- package/esm/cssGrid/index.js +2 -0
- package/{node → esm}/cssVars/createCssVarsProvider.js +30 -39
- package/esm/cssVars/createCssVarsTheme.js +21 -0
- package/{node → esm}/cssVars/createGetCssVar.js +1 -7
- package/{node → esm}/cssVars/cssVarsParser.js +3 -13
- package/{node → esm}/cssVars/getColorSchemeSelector.js +1 -7
- package/esm/cssVars/index.js +5 -0
- package/{node → esm}/cssVars/prepareCssVars.js +9 -16
- package/{node → esm}/cssVars/prepareTypographyVars.js +1 -7
- package/{node → esm}/cssVars/useCurrentColorScheme.js +7 -15
- package/esm/display/display.js +27 -0
- package/esm/display/index.js +2 -0
- package/esm/flexbox/flexbox.js +43 -0
- package/esm/flexbox/index.js +2 -0
- package/esm/getThemeValue/getThemeValue.js +51 -0
- package/esm/getThemeValue/index.js +2 -0
- package/esm/index.js +68 -0
- package/esm/memoTheme.js +28 -0
- package/esm/memoize/index.js +1 -0
- package/{node → esm}/memoize/memoize.js +1 -7
- package/esm/merge/index.js +1 -0
- package/esm/merge/merge.js +10 -0
- package/esm/palette/index.js +2 -0
- package/esm/palette/palette.js +26 -0
- package/esm/positions/index.js +2 -0
- package/esm/positions/positions.js +22 -0
- package/esm/preprocessStyles.js +25 -0
- package/esm/propsToClassKey/index.js +1 -0
- package/esm/propsToClassKey/propsToClassKey.js +25 -0
- package/esm/responsivePropType/index.js +1 -0
- package/esm/responsivePropType/responsivePropType.js +3 -0
- package/esm/shadows/index.js +1 -0
- package/esm/shadows/shadows.js +6 -0
- package/esm/sizing/index.js +2 -0
- package/esm/sizing/sizing.js +64 -0
- package/esm/spacing/index.js +2 -0
- package/{node → esm}/spacing/spacing.js +21 -36
- package/esm/style/index.js +2 -0
- package/{node → esm}/style/style.js +9 -18
- package/{node → esm}/styleFunctionSx/defaultSxConfig.js +65 -71
- package/{node → esm}/styleFunctionSx/extendSxProp.js +5 -12
- package/esm/styleFunctionSx/index.js +4 -0
- package/{node → esm}/styleFunctionSx/styleFunctionSx.js +19 -27
- package/esm/styled/index.js +1 -0
- package/esm/styled/styled.js +3 -0
- package/esm/typography/index.js +2 -0
- package/esm/typography/typography.js +37 -0
- package/esm/useMediaQuery/index.js +2 -0
- package/{node → esm}/useMediaQuery/useMediaQuery.js +8 -15
- package/esm/useTheme/index.js +2 -0
- package/esm/useTheme/useTheme.js +9 -0
- package/esm/useThemeProps/getThemeProps.js +12 -0
- package/esm/useThemeProps/index.js +2 -0
- package/esm/useThemeProps/useThemeProps.js +20 -0
- package/esm/useThemeWithoutDefault/index.js +1 -0
- package/esm/useThemeWithoutDefault/useThemeWithoutDefault.js +12 -0
- package/esm/version/index.js +6 -0
- package/flexbox/flexbox.js +24 -17
- package/flexbox/index.js +25 -2
- package/flexbox/package.json +2 -2
- package/getThemeValue/getThemeValue.js +40 -33
- package/getThemeValue/index.js +25 -2
- package/getThemeValue/package.json +2 -2
- package/index.d.ts +2 -0
- package/index.js +606 -63
- package/memoTheme.d.ts +12 -0
- package/memoTheme.js +34 -0
- package/memoize/index.js +13 -1
- package/memoize/memoize.js +7 -1
- package/memoize/package.json +2 -2
- package/merge/index.js +13 -1
- package/merge/merge.js +10 -3
- package/merge/package.json +2 -2
- package/modern/Grid/Grid.js +16 -11
- package/modern/Grid/createGrid.js +1 -1
- package/modern/Grid/gridGenerator.js +28 -51
- package/modern/colorManipulator/colorManipulator.js +3 -4
- package/modern/createStyled/createStyled.js +144 -109
- package/modern/cssContainerQueries/cssContainerQueries.js +1 -2
- package/modern/index.js +3 -2
- package/modern/memoTheme.js +28 -0
- package/modern/preprocessStyles.js +25 -0
- package/modern/version/index.js +2 -2
- package/package.json +8 -8
- package/palette/index.js +25 -2
- package/palette/package.json +2 -2
- package/palette/palette.js +16 -8
- package/positions/index.js +25 -2
- package/positions/package.json +2 -2
- package/positions/positions.js +16 -9
- package/preprocessStyles.d.ts +5 -0
- package/preprocessStyles.js +31 -0
- package/propsToClassKey/index.js +13 -1
- package/propsToClassKey/package.json +2 -2
- package/propsToClassKey/propsToClassKey.js +11 -4
- package/responsivePropType/index.js +13 -1
- package/responsivePropType/package.json +2 -2
- package/responsivePropType/responsivePropType.js +10 -3
- package/shadows/index.js +13 -1
- package/shadows/package.json +2 -2
- package/shadows/shadows.js +10 -3
- package/sizing/index.js +25 -2
- package/sizing/package.json +2 -2
- package/sizing/sizing.js +27 -17
- package/spacing/index.js +25 -2
- package/spacing/package.json +2 -2
- package/spacing/spacing.js +36 -21
- package/style/index.js +25 -2
- package/style/package.json +2 -2
- package/style/style.js +18 -9
- package/styleFunctionSx/defaultSxConfig.js +71 -65
- package/styleFunctionSx/extendSxProp.js +12 -5
- package/styleFunctionSx/index.js +34 -4
- package/styleFunctionSx/package.json +2 -2
- package/styleFunctionSx/styleFunctionSx.d.ts +1 -1
- package/styleFunctionSx/styleFunctionSx.js +27 -19
- package/styled/index.js +13 -1
- package/styled/package.json +2 -2
- package/styled/styled.js +10 -3
- package/typography/index.js +25 -2
- package/typography/package.json +2 -2
- package/typography/typography.js +20 -13
- package/useMediaQuery/index.js +25 -2
- package/useMediaQuery/package.json +2 -2
- package/useMediaQuery/useMediaQuery.js +15 -8
- package/useTheme/index.js +25 -2
- package/useTheme/package.json +2 -2
- package/useTheme/useTheme.js +11 -5
- package/useThemeProps/getThemeProps.js +10 -3
- package/useThemeProps/index.js +20 -2
- package/useThemeProps/package.json +2 -2
- package/useThemeProps/useThemeProps.js +11 -5
- package/useThemeWithoutDefault/index.js +13 -1
- package/useThemeWithoutDefault/package.json +2 -2
- package/useThemeWithoutDefault/useThemeWithoutDefault.js +10 -4
- package/version/index.js +12 -6
- package/version/package.json +2 -2
- package/node/Box/Box.js +0 -36
- package/node/Box/boxClasses.js +0 -10
- package/node/Box/index.js +0 -35
- package/node/Container/ContainerProps.js +0 -5
- package/node/Container/containerClasses.js +0 -15
- package/node/Container/index.js +0 -35
- package/node/DefaultPropsProvider/index.js +0 -19
- package/node/GlobalStyles/GlobalStyles.js +0 -44
- package/node/GlobalStyles/index.js +0 -25
- package/node/Grid/Grid.js +0 -107
- package/node/Grid/GridProps.js +0 -5
- package/node/Grid/createGrid.js +0 -156
- package/node/Grid/gridGenerator.js +0 -232
- package/node/Grid/index.js +0 -63
- package/node/InitColorSchemeScript/index.js +0 -13
- package/node/RtlProvider/index.js +0 -31
- package/node/Stack/StackProps.js +0 -5
- package/node/Stack/index.js +0 -55
- package/node/Stack/stackClasses.js +0 -15
- package/node/ThemeProvider/index.js +0 -13
- package/node/borders/borders.js +0 -59
- package/node/borders/index.js +0 -25
- package/node/breakpoints/index.js +0 -25
- package/node/colorManipulator/index.js +0 -16
- package/node/compose/index.js +0 -13
- package/node/createBox/createBox.js +0 -42
- package/node/createBox/index.js +0 -13
- package/node/createBreakpoints/index.js +0 -13
- package/node/createStyled/createStyled.js +0 -252
- package/node/createStyled/index.js +0 -25
- package/node/createTheme/createTheme.js +0 -56
- package/node/createTheme/index.js +0 -27
- package/node/createTheme/shape.js +0 -10
- package/node/cssContainerQueries/index.js +0 -31
- package/node/cssGrid/cssGrid.js +0 -94
- package/node/cssGrid/index.js +0 -25
- package/node/cssVars/createCssVarsTheme.js +0 -28
- package/node/cssVars/index.js +0 -41
- package/node/display/display.js +0 -34
- package/node/display/index.js +0 -25
- package/node/flexbox/flexbox.js +0 -50
- package/node/flexbox/index.js +0 -25
- package/node/getThemeValue/getThemeValue.js +0 -58
- package/node/getThemeValue/index.js +0 -25
- package/node/index.js +0 -609
- package/node/memoize/index.js +0 -13
- package/node/merge/index.js +0 -13
- package/node/merge/merge.js +0 -17
- package/node/palette/index.js +0 -25
- package/node/palette/palette.js +0 -34
- package/node/positions/index.js +0 -25
- package/node/positions/positions.js +0 -29
- package/node/propsToClassKey/index.js +0 -13
- package/node/propsToClassKey/propsToClassKey.js +0 -32
- package/node/responsivePropType/index.js +0 -13
- package/node/responsivePropType/responsivePropType.js +0 -10
- package/node/shadows/index.js +0 -13
- package/node/shadows/shadows.js +0 -13
- package/node/sizing/index.js +0 -25
- package/node/sizing/sizing.js +0 -74
- package/node/spacing/index.js +0 -25
- package/node/style/index.js +0 -25
- package/node/styleFunctionSx/index.js +0 -34
- package/node/styled/index.js +0 -13
- package/node/styled/styled.js +0 -10
- package/node/typography/index.js +0 -25
- package/node/typography/typography.js +0 -44
- package/node/useMediaQuery/index.js +0 -25
- package/node/useTheme/index.js +0 -25
- package/node/useTheme/useTheme.js +0 -15
- package/node/useThemeProps/getThemeProps.js +0 -19
- package/node/useThemeProps/index.js +0 -20
- package/node/useThemeProps/useThemeProps.js +0 -26
- package/node/useThemeWithoutDefault/index.js +0 -13
- package/node/useThemeWithoutDefault/useThemeWithoutDefault.js +0 -18
- package/node/version/index.js +0 -12
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import isMuiElement from '@mui/utils/isMuiElement';
|
|
5
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import systemStyled from "../styled/index.js";
|
|
8
|
+
import useThemePropsSystem from "../useThemeProps/index.js";
|
|
9
|
+
import useTheme from "../useTheme/index.js";
|
|
10
|
+
import { extendSxProp } from "../styleFunctionSx/index.js";
|
|
11
|
+
import createTheme from "../createTheme/index.js";
|
|
12
|
+
import { generateGridStyles, generateGridSizeStyles, generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridDirectionStyles, generateGridOffsetStyles, generateSizeClassNames, generateSpacingClassNames, generateDirectionClasses } from "./gridGenerator.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const defaultTheme = createTheme();
|
|
15
|
+
|
|
16
|
+
// widening Theme to any so that the consumer can own the theme structure.
|
|
17
|
+
const defaultCreateStyledComponent = systemStyled('div', {
|
|
18
|
+
name: 'MuiGrid',
|
|
19
|
+
slot: 'Root',
|
|
20
|
+
overridesResolver: (props, styles) => styles.root
|
|
21
|
+
});
|
|
22
|
+
function useThemePropsDefault(props) {
|
|
23
|
+
return useThemePropsSystem({
|
|
24
|
+
props,
|
|
25
|
+
name: 'MuiGrid',
|
|
26
|
+
defaultTheme
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export default function createGrid(options = {}) {
|
|
30
|
+
const {
|
|
31
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
32
|
+
createStyledComponent = defaultCreateStyledComponent,
|
|
33
|
+
useThemeProps = useThemePropsDefault,
|
|
34
|
+
componentName = 'MuiGrid'
|
|
35
|
+
} = options;
|
|
36
|
+
const useUtilityClasses = (ownerState, theme) => {
|
|
37
|
+
const {
|
|
38
|
+
container,
|
|
39
|
+
direction,
|
|
40
|
+
spacing,
|
|
41
|
+
wrap,
|
|
42
|
+
size
|
|
43
|
+
} = ownerState;
|
|
44
|
+
const slots = {
|
|
45
|
+
root: ['root', container && 'container', wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(size), ...(container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : [])]
|
|
46
|
+
};
|
|
47
|
+
return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
|
|
48
|
+
};
|
|
49
|
+
function parseResponsiveProp(propValue, breakpoints, shouldUseValue = () => true) {
|
|
50
|
+
const parsedProp = {};
|
|
51
|
+
if (propValue === null) {
|
|
52
|
+
return parsedProp;
|
|
53
|
+
}
|
|
54
|
+
if (Array.isArray(propValue)) {
|
|
55
|
+
propValue.forEach((value, index) => {
|
|
56
|
+
if (value !== null && shouldUseValue(value) && breakpoints.keys[index]) {
|
|
57
|
+
parsedProp[breakpoints.keys[index]] = value;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
} else if (typeof propValue === 'object') {
|
|
61
|
+
Object.keys(propValue).forEach(key => {
|
|
62
|
+
const value = propValue[key];
|
|
63
|
+
if (value !== null && value !== undefined && shouldUseValue(value)) {
|
|
64
|
+
parsedProp[key] = value;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
parsedProp[breakpoints.keys[0]] = propValue;
|
|
69
|
+
}
|
|
70
|
+
return parsedProp;
|
|
71
|
+
}
|
|
72
|
+
const GridRoot = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
|
|
73
|
+
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
74
|
+
const theme = useTheme();
|
|
75
|
+
const themeProps = useThemeProps(inProps);
|
|
76
|
+
const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
|
|
77
|
+
const {
|
|
78
|
+
className,
|
|
79
|
+
children,
|
|
80
|
+
columns: columnsProp = 12,
|
|
81
|
+
container = false,
|
|
82
|
+
component = 'div',
|
|
83
|
+
direction = 'row',
|
|
84
|
+
wrap = 'wrap',
|
|
85
|
+
size: sizeProp = {},
|
|
86
|
+
offset: offsetProp = {},
|
|
87
|
+
spacing: spacingProp = 0,
|
|
88
|
+
rowSpacing: rowSpacingProp = spacingProp,
|
|
89
|
+
columnSpacing: columnSpacingProp = spacingProp,
|
|
90
|
+
unstable_level: level = 0,
|
|
91
|
+
...other
|
|
92
|
+
} = props;
|
|
93
|
+
const size = parseResponsiveProp(sizeProp, theme.breakpoints, val => val !== false);
|
|
94
|
+
const offset = parseResponsiveProp(offsetProp, theme.breakpoints);
|
|
95
|
+
const columns = inProps.columns ?? (level ? undefined : columnsProp);
|
|
96
|
+
const spacing = inProps.spacing ?? (level ? undefined : spacingProp);
|
|
97
|
+
const rowSpacing = inProps.rowSpacing ?? inProps.spacing ?? (level ? undefined : rowSpacingProp);
|
|
98
|
+
const columnSpacing = inProps.columnSpacing ?? inProps.spacing ?? (level ? undefined : columnSpacingProp);
|
|
99
|
+
const ownerState = {
|
|
100
|
+
...props,
|
|
101
|
+
level,
|
|
102
|
+
columns,
|
|
103
|
+
container,
|
|
104
|
+
direction,
|
|
105
|
+
wrap,
|
|
106
|
+
spacing,
|
|
107
|
+
rowSpacing,
|
|
108
|
+
columnSpacing,
|
|
109
|
+
size,
|
|
110
|
+
offset
|
|
111
|
+
};
|
|
112
|
+
const classes = useUtilityClasses(ownerState, theme);
|
|
113
|
+
return /*#__PURE__*/_jsx(GridRoot, {
|
|
114
|
+
ref: ref,
|
|
115
|
+
as: component,
|
|
116
|
+
ownerState: ownerState,
|
|
117
|
+
className: clsx(classes.root, className),
|
|
118
|
+
...other,
|
|
119
|
+
children: React.Children.map(children, child => {
|
|
120
|
+
if (/*#__PURE__*/React.isValidElement(child) && isMuiElement(child, ['Grid']) && container && child.props.container) {
|
|
121
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
122
|
+
unstable_level: child.props?.unstable_level ?? level + 1
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return child;
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
|
130
|
+
children: PropTypes.node,
|
|
131
|
+
className: PropTypes.string,
|
|
132
|
+
columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),
|
|
133
|
+
columnSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
134
|
+
component: PropTypes.elementType,
|
|
135
|
+
container: PropTypes.bool,
|
|
136
|
+
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
137
|
+
offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),
|
|
138
|
+
rowSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
139
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number])), PropTypes.object]),
|
|
140
|
+
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
141
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
142
|
+
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
|
143
|
+
} : void 0;
|
|
144
|
+
|
|
145
|
+
// @ts-ignore internal logic for nested grid
|
|
146
|
+
Grid.muiName = 'Grid';
|
|
147
|
+
return Grid;
|
|
148
|
+
}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
exports.getGridUtilityClass = getGridUtilityClass;
|
|
9
|
-
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
10
|
-
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
11
|
-
function getGridUtilityClass(slot) {
|
|
12
|
-
return (0, _generateUtilityClass.default)('MuiGrid', slot);
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
export function getGridUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiGrid', slot);
|
|
13
5
|
}
|
|
14
6
|
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
15
7
|
const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
|
|
16
8
|
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
|
17
9
|
const GRID_SIZES = ['auto', 'grow', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
18
|
-
const gridClasses = (
|
|
10
|
+
const gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container', 'item',
|
|
19
11
|
// spacings
|
|
20
12
|
...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
|
|
21
13
|
// direction values
|
|
@@ -24,4 +16,4 @@ const gridClasses = (0, _generateUtilityClasses.default)('MuiGrid', ['root', 'co
|
|
|
24
16
|
...WRAPS.map(wrap => `wrap-xs-${wrap}`),
|
|
25
17
|
// grid sizes for all breakpoints
|
|
26
18
|
...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
|
|
27
|
-
|
|
19
|
+
export default gridClasses;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { traverseBreakpoints } from "./traverseBreakpoints.js";
|
|
2
|
+
function getSelfSpacingVar(axis) {
|
|
3
|
+
return `--Grid-${axis}Spacing`;
|
|
4
|
+
}
|
|
5
|
+
function getParentSpacingVar(axis) {
|
|
6
|
+
return `--Grid-parent-${axis}Spacing`;
|
|
7
|
+
}
|
|
8
|
+
const selfColumnsVar = '--Grid-columns';
|
|
9
|
+
const parentColumnsVar = '--Grid-parent-columns';
|
|
10
|
+
export const generateGridSizeStyles = ({
|
|
11
|
+
theme,
|
|
12
|
+
ownerState
|
|
13
|
+
}) => {
|
|
14
|
+
const styles = {};
|
|
15
|
+
traverseBreakpoints(theme.breakpoints, ownerState.size, (appendStyle, value) => {
|
|
16
|
+
let style = {};
|
|
17
|
+
if (value === 'grow') {
|
|
18
|
+
style = {
|
|
19
|
+
flexBasis: 0,
|
|
20
|
+
flexGrow: 1,
|
|
21
|
+
maxWidth: '100%'
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (value === 'auto') {
|
|
25
|
+
style = {
|
|
26
|
+
flexBasis: 'auto',
|
|
27
|
+
flexGrow: 0,
|
|
28
|
+
flexShrink: 0,
|
|
29
|
+
maxWidth: 'none',
|
|
30
|
+
width: 'auto'
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (typeof value === 'number') {
|
|
34
|
+
style = {
|
|
35
|
+
flexGrow: 0,
|
|
36
|
+
flexBasis: 'auto',
|
|
37
|
+
width: `calc(100% * ${value} / var(${parentColumnsVar}) - (var(${parentColumnsVar}) - ${value}) * (var(${getParentSpacingVar('column')}) / var(${parentColumnsVar})))`
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
appendStyle(styles, style);
|
|
41
|
+
});
|
|
42
|
+
return styles;
|
|
43
|
+
};
|
|
44
|
+
export const generateGridOffsetStyles = ({
|
|
45
|
+
theme,
|
|
46
|
+
ownerState
|
|
47
|
+
}) => {
|
|
48
|
+
const styles = {};
|
|
49
|
+
traverseBreakpoints(theme.breakpoints, ownerState.offset, (appendStyle, value) => {
|
|
50
|
+
let style = {};
|
|
51
|
+
if (value === 'auto') {
|
|
52
|
+
style = {
|
|
53
|
+
marginLeft: 'auto'
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (typeof value === 'number') {
|
|
57
|
+
style = {
|
|
58
|
+
marginLeft: value === 0 ? '0px' : `calc(100% * ${value} / var(${parentColumnsVar}) + var(${getParentSpacingVar('column')}) * ${value} / var(${parentColumnsVar}))`
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
appendStyle(styles, style);
|
|
62
|
+
});
|
|
63
|
+
return styles;
|
|
64
|
+
};
|
|
65
|
+
export const generateGridColumnsStyles = ({
|
|
66
|
+
theme,
|
|
67
|
+
ownerState
|
|
68
|
+
}) => {
|
|
69
|
+
if (!ownerState.container) {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
const styles = {
|
|
73
|
+
[selfColumnsVar]: 12
|
|
74
|
+
};
|
|
75
|
+
traverseBreakpoints(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
|
|
76
|
+
const columns = value ?? 12;
|
|
77
|
+
appendStyle(styles, {
|
|
78
|
+
[selfColumnsVar]: columns,
|
|
79
|
+
'> *': {
|
|
80
|
+
[parentColumnsVar]: columns
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
return styles;
|
|
85
|
+
};
|
|
86
|
+
export const generateGridRowSpacingStyles = ({
|
|
87
|
+
theme,
|
|
88
|
+
ownerState
|
|
89
|
+
}) => {
|
|
90
|
+
if (!ownerState.container) {
|
|
91
|
+
return {};
|
|
92
|
+
}
|
|
93
|
+
const styles = {};
|
|
94
|
+
traverseBreakpoints(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
|
|
95
|
+
const spacing = typeof value === 'string' ? value : theme.spacing?.(value);
|
|
96
|
+
appendStyle(styles, {
|
|
97
|
+
[getSelfSpacingVar('row')]: spacing,
|
|
98
|
+
'> *': {
|
|
99
|
+
[getParentSpacingVar('row')]: spacing
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
return styles;
|
|
104
|
+
};
|
|
105
|
+
export const generateGridColumnSpacingStyles = ({
|
|
106
|
+
theme,
|
|
107
|
+
ownerState
|
|
108
|
+
}) => {
|
|
109
|
+
if (!ownerState.container) {
|
|
110
|
+
return {};
|
|
111
|
+
}
|
|
112
|
+
const styles = {};
|
|
113
|
+
traverseBreakpoints(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
|
|
114
|
+
const spacing = typeof value === 'string' ? value : theme.spacing?.(value);
|
|
115
|
+
appendStyle(styles, {
|
|
116
|
+
[getSelfSpacingVar('column')]: spacing,
|
|
117
|
+
'> *': {
|
|
118
|
+
[getParentSpacingVar('column')]: spacing
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
return styles;
|
|
123
|
+
};
|
|
124
|
+
export const generateGridDirectionStyles = ({
|
|
125
|
+
theme,
|
|
126
|
+
ownerState
|
|
127
|
+
}) => {
|
|
128
|
+
if (!ownerState.container) {
|
|
129
|
+
return {};
|
|
130
|
+
}
|
|
131
|
+
const styles = {};
|
|
132
|
+
traverseBreakpoints(theme.breakpoints, ownerState.direction, (appendStyle, value) => {
|
|
133
|
+
appendStyle(styles, {
|
|
134
|
+
flexDirection: value
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
return styles;
|
|
138
|
+
};
|
|
139
|
+
export const generateGridStyles = ({
|
|
140
|
+
ownerState
|
|
141
|
+
}) => {
|
|
142
|
+
return {
|
|
143
|
+
minWidth: 0,
|
|
144
|
+
boxSizing: 'border-box',
|
|
145
|
+
...(ownerState.container && {
|
|
146
|
+
display: 'flex',
|
|
147
|
+
flexWrap: 'wrap',
|
|
148
|
+
...(ownerState.wrap && ownerState.wrap !== 'wrap' && {
|
|
149
|
+
flexWrap: ownerState.wrap
|
|
150
|
+
}),
|
|
151
|
+
gap: `var(${getSelfSpacingVar('row')}) var(${getSelfSpacingVar('column')})`
|
|
152
|
+
})
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export const generateSizeClassNames = size => {
|
|
156
|
+
const classNames = [];
|
|
157
|
+
Object.entries(size).forEach(([key, value]) => {
|
|
158
|
+
if (value !== false && value !== undefined) {
|
|
159
|
+
classNames.push(`grid-${key}-${String(value)}`);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return classNames;
|
|
163
|
+
};
|
|
164
|
+
export const generateSpacingClassNames = (spacing, smallestBreakpoint = 'xs') => {
|
|
165
|
+
function isValidSpacing(val) {
|
|
166
|
+
if (val === undefined) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
return typeof val === 'string' && !Number.isNaN(Number(val)) || typeof val === 'number' && val > 0;
|
|
170
|
+
}
|
|
171
|
+
if (isValidSpacing(spacing)) {
|
|
172
|
+
return [`spacing-${smallestBreakpoint}-${String(spacing)}`];
|
|
173
|
+
}
|
|
174
|
+
if (typeof spacing === 'object' && !Array.isArray(spacing)) {
|
|
175
|
+
const classNames = [];
|
|
176
|
+
Object.entries(spacing).forEach(([key, value]) => {
|
|
177
|
+
if (isValidSpacing(value)) {
|
|
178
|
+
classNames.push(`spacing-${key}-${String(value)}`);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return classNames;
|
|
182
|
+
}
|
|
183
|
+
return [];
|
|
184
|
+
};
|
|
185
|
+
export const generateDirectionClasses = direction => {
|
|
186
|
+
if (direction === undefined) {
|
|
187
|
+
return [];
|
|
188
|
+
}
|
|
189
|
+
if (typeof direction === 'object') {
|
|
190
|
+
return Object.entries(direction).map(([key, value]) => `direction-${key}-${value}`);
|
|
191
|
+
}
|
|
192
|
+
return [`direction-xs-${String(direction)}`];
|
|
193
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from "./Grid.js";
|
|
2
|
+
export { default as createGrid } from "./createGrid.js";
|
|
3
|
+
export * from "./GridProps.js";
|
|
4
|
+
export { default as gridClasses } from "./gridClasses.js";
|
|
5
|
+
export * from "./gridClasses.js";
|
|
6
|
+
export { traverseBreakpoints as unstable_traverseBreakpoints } from "./traverseBreakpoints.js";
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.traverseBreakpoints = exports.filterBreakpointKeys = void 0;
|
|
7
|
-
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
8
|
-
exports.filterBreakpointKeys = filterBreakpointKeys;
|
|
9
|
-
const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
1
|
+
export const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
2
|
+
export const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
10
3
|
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
11
4
|
|
|
12
5
|
if (Array.isArray(responsive)) {
|
|
@@ -46,5 +39,4 @@ const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
|
46
39
|
Object.assign(responsiveStyles, style);
|
|
47
40
|
}, responsive);
|
|
48
41
|
}
|
|
49
|
-
};
|
|
50
|
-
exports.traverseBreakpoints = traverseBreakpoints;
|
|
42
|
+
};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.DEFAULT_MODE_STORAGE_KEY = exports.DEFAULT_COLOR_SCHEME_STORAGE_KEY = exports.DEFAULT_ATTRIBUTE = void 0;
|
|
8
|
-
exports.default = InitColorSchemeScript;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
1
|
/**
|
|
12
2
|
* Split this component for RSC import
|
|
13
3
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const DEFAULT_MODE_STORAGE_KEY = 'mode';
|
|
7
|
+
export const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
|
|
8
|
+
export const DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
|
9
|
+
export default function InitColorSchemeScript(options) {
|
|
19
10
|
const {
|
|
20
11
|
defaultLightColorScheme = 'light',
|
|
21
12
|
defaultDarkColorScheme = 'dark',
|
|
@@ -50,7 +41,7 @@ function InitColorSchemeScript(options) {
|
|
|
50
41
|
} else {
|
|
51
42
|
setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;
|
|
52
43
|
}
|
|
53
|
-
return /*#__PURE__*/(
|
|
44
|
+
return /*#__PURE__*/_jsx("script", {
|
|
54
45
|
suppressHydrationWarning: true,
|
|
55
46
|
nonce: typeof window === 'undefined' ? nonce : ''
|
|
56
47
|
// eslint-disable-next-line react/no-danger
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./InitColorSchemeScript.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const RtlContext = /*#__PURE__*/React.createContext();
|
|
5
|
+
function RtlProvider({
|
|
6
|
+
value,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /*#__PURE__*/_jsx(RtlContext.Provider, {
|
|
10
|
+
value: value ?? true,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
|
15
|
+
children: PropTypes.node,
|
|
16
|
+
value: PropTypes.bool
|
|
17
|
+
} : void 0;
|
|
18
|
+
export const useRtl = () => {
|
|
19
|
+
const value = React.useContext(RtlContext);
|
|
20
|
+
return value ?? false;
|
|
21
|
+
};
|
|
22
|
+
export default RtlProvider;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _createStack = _interopRequireDefault(require("./createStack"));
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import createStack from "./createStack.js";
|
|
11
5
|
/**
|
|
12
6
|
*
|
|
13
7
|
* Demos:
|
|
@@ -20,7 +14,7 @@ var _createStack = _interopRequireDefault(require("./createStack"));
|
|
|
20
14
|
*
|
|
21
15
|
* - [Stack API](https://mui.com/system/api/stack/)
|
|
22
16
|
*/
|
|
23
|
-
const Stack = (
|
|
17
|
+
const Stack = createStack();
|
|
24
18
|
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
25
19
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
26
20
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
@@ -29,31 +23,31 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
|
|
|
29
23
|
/**
|
|
30
24
|
* The content of the component.
|
|
31
25
|
*/
|
|
32
|
-
children:
|
|
26
|
+
children: PropTypes.node,
|
|
33
27
|
/**
|
|
34
28
|
* The component used for the root node.
|
|
35
29
|
* Either a string to use a HTML element or a component.
|
|
36
30
|
*/
|
|
37
|
-
component:
|
|
31
|
+
component: PropTypes.elementType,
|
|
38
32
|
/**
|
|
39
33
|
* Defines the `flex-direction` style property.
|
|
40
34
|
* It is applied for all screen sizes.
|
|
41
35
|
* @default 'column'
|
|
42
36
|
*/
|
|
43
|
-
direction:
|
|
37
|
+
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
44
38
|
/**
|
|
45
39
|
* Add an element between each child.
|
|
46
40
|
*/
|
|
47
|
-
divider:
|
|
41
|
+
divider: PropTypes.node,
|
|
48
42
|
/**
|
|
49
43
|
* Defines the space between immediate children.
|
|
50
44
|
* @default 0
|
|
51
45
|
*/
|
|
52
|
-
spacing:
|
|
46
|
+
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
53
47
|
/**
|
|
54
48
|
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
55
49
|
*/
|
|
56
|
-
sx:
|
|
50
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
57
51
|
/**
|
|
58
52
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
59
53
|
*
|
|
@@ -63,6 +57,6 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
|
|
|
63
57
|
* To enable this flag globally, follow the theme's default props configuration.
|
|
64
58
|
* @default false
|
|
65
59
|
*/
|
|
66
|
-
useFlexGap:
|
|
60
|
+
useFlexGap: PropTypes.bool
|
|
67
61
|
} : void 0;
|
|
68
|
-
|
|
62
|
+
export default Stack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|