@mui/system 6.0.0-alpha.0 → 6.0.0-alpha.3
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/CHANGELOG.md +243 -4
- package/Container/Container.d.ts +1 -1
- package/Stack/Stack.d.ts +1 -1
- package/Stack/createStack.d.ts +1 -1
- package/Unstable_Grid/Grid.d.ts +1 -1
- package/Unstable_Grid/createGrid.d.ts +1 -1
- package/breakpoints/breakpoints.js +19 -1
- package/createTheme/createSpacing.d.ts +2 -2
- package/createTheme/createSpacing.js +7 -8
- package/createTheme/createTheme.d.ts +2 -1
- package/createTheme/createTheme.js +2 -0
- package/cssContainerQueries/cssContainerQueries.d.ts +24 -0
- package/cssContainerQueries/cssContainerQueries.js +68 -0
- package/cssContainerQueries/index.d.ts +3 -0
- package/cssContainerQueries/index.js +2 -0
- package/cssContainerQueries/package.json +6 -0
- package/cssVars/createCssVarsProvider.js +3 -0
- package/cssVars/cssVarsParser.d.ts +1 -1
- package/cssVars/cssVarsParser.js +3 -2
- package/index.d.ts +2 -0
- package/index.js +2 -1
- package/modern/breakpoints/breakpoints.js +19 -1
- package/modern/createTheme/createSpacing.js +7 -8
- package/modern/createTheme/createTheme.js +2 -0
- package/modern/cssContainerQueries/cssContainerQueries.js +68 -0
- package/modern/cssContainerQueries/index.js +2 -0
- package/modern/cssVars/createCssVarsProvider.js +3 -0
- package/modern/cssVars/cssVarsParser.js +3 -2
- package/modern/index.js +2 -1
- package/modern/spacing/spacing.js +24 -21
- package/modern/styleFunctionSx/styleFunctionSx.js +2 -1
- package/node/breakpoints/breakpoints.js +19 -1
- package/node/createTheme/createSpacing.js +7 -8
- package/node/createTheme/createTheme.js +2 -0
- package/node/cssContainerQueries/cssContainerQueries.js +79 -0
- package/node/cssContainerQueries/index.js +32 -0
- package/node/cssVars/createCssVarsProvider.js +3 -0
- package/node/cssVars/cssVarsParser.js +3 -2
- package/node/index.js +9 -1
- package/node/spacing/spacing.js +24 -21
- package/node/styleFunctionSx/styleFunctionSx.js +2 -1
- package/package.json +5 -5
- package/spacing/spacing.js +24 -21
- package/styleFunctionSx/styleFunctionSx.js +2 -1
- package/legacy/Box/Box.js +0 -30
- package/legacy/Box/boxClasses.js +0 -3
- package/legacy/Box/index.js +0 -5
- package/legacy/Container/Container.js +0 -61
- package/legacy/Container/ContainerProps.js +0 -1
- package/legacy/Container/containerClasses.js +0 -7
- package/legacy/Container/createContainer.js +0 -140
- package/legacy/Container/index.js +0 -5
- package/legacy/GlobalStyles/GlobalStyles.js +0 -37
- package/legacy/GlobalStyles/index.js +0 -4
- package/legacy/RtlProvider/index.js +0 -22
- package/legacy/Stack/Stack.js +0 -62
- package/legacy/Stack/StackProps.js +0 -1
- package/legacy/Stack/createStack.js +0 -180
- package/legacy/Stack/index.js +0 -7
- package/legacy/Stack/stackClasses.js +0 -7
- package/legacy/ThemeProvider/ThemeProvider.js +0 -87
- package/legacy/ThemeProvider/index.js +0 -3
- package/legacy/Unstable_Grid/Grid.js +0 -177
- package/legacy/Unstable_Grid/GridProps.js +0 -1
- package/legacy/Unstable_Grid/createGrid.js +0 -184
- package/legacy/Unstable_Grid/gridClasses.js +0 -28
- package/legacy/Unstable_Grid/gridGenerator.js +0 -216
- package/legacy/Unstable_Grid/index.js +0 -8
- package/legacy/Unstable_Grid/traverseBreakpoints.js +0 -48
- package/legacy/borders/borders.js +0 -51
- package/legacy/borders/index.js +0 -4
- package/legacy/breakpoints/breakpoints.js +0 -162
- package/legacy/breakpoints/index.js +0 -4
- package/legacy/colorManipulator/colorManipulator.js +0 -356
- package/legacy/colorManipulator/index.js +0 -3
- package/legacy/compose/compose.js +0 -32
- package/legacy/compose/index.js +0 -3
- package/legacy/createBox/createBox.js +0 -38
- package/legacy/createBox/index.js +0 -3
- package/legacy/createStyled/createStyled.js +0 -250
- package/legacy/createStyled/index.js +0 -4
- package/legacy/createTheme/applyStyles.js +0 -73
- package/legacy/createTheme/createBreakpoints.js +0 -83
- package/legacy/createTheme/createSpacing.js +0 -36
- package/legacy/createTheme/createTheme.js +0 -49
- package/legacy/createTheme/index.js +0 -3
- package/legacy/createTheme/shape.js +0 -4
- package/legacy/cssGrid/cssGrid.js +0 -91
- package/legacy/cssGrid/index.js +0 -4
- package/legacy/cssVars/createCssVarsProvider.js +0 -335
- package/legacy/cssVars/createCssVarsTheme.js +0 -13
- package/legacy/cssVars/createGetCssVar.js +0 -30
- package/legacy/cssVars/cssVarsParser.js +0 -140
- package/legacy/cssVars/getInitColorSchemeScript.js +0 -28
- package/legacy/cssVars/index.js +0 -6
- package/legacy/cssVars/prepareCssVars.js +0 -92
- package/legacy/cssVars/useCurrentColorScheme.js +0 -237
- package/legacy/display/display.js +0 -29
- package/legacy/display/index.js +0 -4
- package/legacy/flexbox/flexbox.js +0 -43
- package/legacy/flexbox/index.js +0 -4
- package/legacy/getThemeValue/getThemeValue.js +0 -47
- package/legacy/getThemeValue/index.js +0 -4
- package/legacy/index.js +0 -72
- package/legacy/memoize/index.js +0 -3
- package/legacy/memoize/memoize.js +0 -9
- package/legacy/merge/index.js +0 -3
- package/legacy/merge/merge.js +0 -10
- package/legacy/palette/index.js +0 -4
- package/legacy/palette/palette.js +0 -26
- package/legacy/positions/index.js +0 -4
- package/legacy/positions/positions.js +0 -22
- package/legacy/propsToClassKey/index.js +0 -3
- package/legacy/propsToClassKey/propsToClassKey.js +0 -24
- package/legacy/responsivePropType/index.js +0 -3
- package/legacy/responsivePropType/responsivePropType.js +0 -3
- package/legacy/shadows/index.js +0 -3
- package/legacy/shadows/shadows.js +0 -6
- package/legacy/sizing/index.js +0 -4
- package/legacy/sizing/sizing.js +0 -65
- package/legacy/spacing/index.js +0 -4
- package/legacy/spacing/spacing.js +0 -158
- package/legacy/style/index.js +0 -4
- package/legacy/style/style.js +0 -73
- package/legacy/styleFunctionSx/defaultSxConfig.js +0 -293
- package/legacy/styleFunctionSx/extendSxProp.js +0 -45
- package/legacy/styleFunctionSx/index.js +0 -4
- package/legacy/styleFunctionSx/styleFunctionSx.js +0 -126
- package/legacy/styled/index.js +0 -3
- package/legacy/styled/styled.js +0 -3
- package/legacy/typography/index.js +0 -4
- package/legacy/typography/typography.js +0 -37
- package/legacy/useMediaQuery/index.js +0 -2
- package/legacy/useMediaQuery/useMediaQuery.js +0 -145
- package/legacy/useTheme/index.js +0 -4
- package/legacy/useTheme/useTheme.js +0 -10
- package/legacy/useThemeProps/getThemeProps.js +0 -10
- package/legacy/useThemeProps/index.js +0 -4
- package/legacy/useThemeProps/useThemeProps.js +0 -20
- package/legacy/useThemeWithoutDefault/index.js +0 -3
- package/legacy/useThemeWithoutDefault/useThemeWithoutDefault.js +0 -13
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* A universal utility to style components with multiple color modes. Always use it from the theme object.
|
|
4
|
-
* It works with:
|
|
5
|
-
* - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
|
|
6
|
-
* - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
|
|
7
|
-
* - Zero-runtime engine
|
|
8
|
-
*
|
|
9
|
-
* Tips: Use an array over object spread and place `theme.applyStyles()` last.
|
|
10
|
-
*
|
|
11
|
-
* ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]
|
|
12
|
-
*
|
|
13
|
-
* 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* 1. using with `styled`:
|
|
17
|
-
* ```jsx
|
|
18
|
-
* const Component = styled('div')(({ theme }) => [
|
|
19
|
-
* { background: '#e5e5e5' },
|
|
20
|
-
* theme.applyStyles('dark', {
|
|
21
|
-
* background: '#1c1c1c',
|
|
22
|
-
* color: '#fff',
|
|
23
|
-
* }),
|
|
24
|
-
* ]);
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* 2. using with `sx` prop:
|
|
29
|
-
* ```jsx
|
|
30
|
-
* <Box sx={theme => [
|
|
31
|
-
* { background: '#e5e5e5' },
|
|
32
|
-
* theme.applyStyles('dark', {
|
|
33
|
-
* background: '#1c1c1c',
|
|
34
|
-
* color: '#fff',
|
|
35
|
-
* }),
|
|
36
|
-
* ]}
|
|
37
|
-
* />
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* 3. theming a component:
|
|
42
|
-
* ```jsx
|
|
43
|
-
* extendTheme({
|
|
44
|
-
* components: {
|
|
45
|
-
* MuiButton: {
|
|
46
|
-
* styleOverrides: {
|
|
47
|
-
* root: ({ theme }) => [
|
|
48
|
-
* { background: '#e5e5e5' },
|
|
49
|
-
* theme.applyStyles('dark', {
|
|
50
|
-
* background: '#1c1c1c',
|
|
51
|
-
* color: '#fff',
|
|
52
|
-
* }),
|
|
53
|
-
* ],
|
|
54
|
-
* },
|
|
55
|
-
* }
|
|
56
|
-
* }
|
|
57
|
-
* })
|
|
58
|
-
*```
|
|
59
|
-
*/
|
|
60
|
-
export default function applyStyles(key, styles) {
|
|
61
|
-
// @ts-expect-error this is 'any' type
|
|
62
|
-
var theme = this;
|
|
63
|
-
if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {
|
|
64
|
-
// If CssVarsProvider is used as a provider,
|
|
65
|
-
// returns '* :where([data-mui-color-scheme="light|dark"]) &'
|
|
66
|
-
var selector = theme.getColorSchemeSelector(key).replace(/(\[[^\]]+\])/, '*:where($1)');
|
|
67
|
-
return _defineProperty({}, selector, styles);
|
|
68
|
-
}
|
|
69
|
-
if (theme.palette.mode === key) {
|
|
70
|
-
return styles;
|
|
71
|
-
}
|
|
72
|
-
return {};
|
|
73
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
// Sorted ASC by size. That's important.
|
|
5
|
-
// It can't be configured as it's used statically for propTypes.
|
|
6
|
-
export var breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
7
|
-
var sortBreakpointsValues = function sortBreakpointsValues(values) {
|
|
8
|
-
var breakpointsAsArray = Object.keys(values).map(function (key) {
|
|
9
|
-
return {
|
|
10
|
-
key: key,
|
|
11
|
-
val: values[key]
|
|
12
|
-
};
|
|
13
|
-
}) || [];
|
|
14
|
-
// Sort in ascending order
|
|
15
|
-
breakpointsAsArray.sort(function (breakpoint1, breakpoint2) {
|
|
16
|
-
return breakpoint1.val - breakpoint2.val;
|
|
17
|
-
});
|
|
18
|
-
return breakpointsAsArray.reduce(function (acc, obj) {
|
|
19
|
-
return _extends({}, acc, _defineProperty({}, obj.key, obj.val));
|
|
20
|
-
}, {});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// Keep in mind that @media is inclusive by the CSS specification.
|
|
24
|
-
export default function createBreakpoints(breakpoints) {
|
|
25
|
-
var _breakpoints$values = breakpoints.values,
|
|
26
|
-
values = _breakpoints$values === void 0 ? {
|
|
27
|
-
xs: 0,
|
|
28
|
-
// phone
|
|
29
|
-
sm: 600,
|
|
30
|
-
// tablet
|
|
31
|
-
md: 900,
|
|
32
|
-
// small laptop
|
|
33
|
-
lg: 1200,
|
|
34
|
-
// desktop
|
|
35
|
-
xl: 1536 // large screen
|
|
36
|
-
} : _breakpoints$values,
|
|
37
|
-
_breakpoints$unit = breakpoints.unit,
|
|
38
|
-
unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
|
|
39
|
-
_breakpoints$step = breakpoints.step,
|
|
40
|
-
step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
|
|
41
|
-
other = _objectWithoutProperties(breakpoints, ["values", "unit", "step"]);
|
|
42
|
-
var sortedValues = sortBreakpointsValues(values);
|
|
43
|
-
var keys = Object.keys(sortedValues);
|
|
44
|
-
function up(key) {
|
|
45
|
-
var value = typeof values[key] === 'number' ? values[key] : key;
|
|
46
|
-
return "@media (min-width:".concat(value).concat(unit, ")");
|
|
47
|
-
}
|
|
48
|
-
function down(key) {
|
|
49
|
-
var value = typeof values[key] === 'number' ? values[key] : key;
|
|
50
|
-
return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
|
|
51
|
-
}
|
|
52
|
-
function between(start, end) {
|
|
53
|
-
var endIndex = keys.indexOf(end);
|
|
54
|
-
return "@media (min-width:".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100).concat(unit, ")");
|
|
55
|
-
}
|
|
56
|
-
function only(key) {
|
|
57
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
58
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
59
|
-
}
|
|
60
|
-
return up(key);
|
|
61
|
-
}
|
|
62
|
-
function not(key) {
|
|
63
|
-
// handle first and last key separately, for better readability
|
|
64
|
-
var keyIndex = keys.indexOf(key);
|
|
65
|
-
if (keyIndex === 0) {
|
|
66
|
-
return up(keys[1]);
|
|
67
|
-
}
|
|
68
|
-
if (keyIndex === keys.length - 1) {
|
|
69
|
-
return down(keys[keyIndex]);
|
|
70
|
-
}
|
|
71
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
72
|
-
}
|
|
73
|
-
return _extends({
|
|
74
|
-
keys: keys,
|
|
75
|
-
values: sortedValues,
|
|
76
|
-
up: up,
|
|
77
|
-
down: down,
|
|
78
|
-
between: between,
|
|
79
|
-
only: only,
|
|
80
|
-
not: not,
|
|
81
|
-
unit: unit
|
|
82
|
-
}, other);
|
|
83
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createUnarySpacing } from '../spacing';
|
|
2
|
-
|
|
3
|
-
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
4
|
-
// We express the difference with variable names.
|
|
5
|
-
|
|
6
|
-
export default function createSpacing() {
|
|
7
|
-
var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
|
|
8
|
-
// Already transformed.
|
|
9
|
-
if (spacingInput.mui) {
|
|
10
|
-
return spacingInput;
|
|
11
|
-
}
|
|
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
|
-
var spacing = function spacing() {
|
|
20
|
-
for (var _len = arguments.length, argsInput = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
|
-
argsInput[_key] = arguments[_key];
|
|
22
|
-
}
|
|
23
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
-
if (!(argsInput.length <= 4)) {
|
|
25
|
-
console.error("MUI: Too many arguments provided, expected between 0 and 4, got ".concat(argsInput.length));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
var args = argsInput.length === 0 ? [1] : argsInput;
|
|
29
|
-
return args.map(function (argument) {
|
|
30
|
-
var output = transform(argument);
|
|
31
|
-
return typeof output === 'number' ? "".concat(output, "px") : output;
|
|
32
|
-
}).join(' ');
|
|
33
|
-
};
|
|
34
|
-
spacing.mui = true;
|
|
35
|
-
return spacing;
|
|
36
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import deepmerge from '@mui/utils/deepmerge';
|
|
4
|
-
import createBreakpoints from './createBreakpoints';
|
|
5
|
-
import shape from './shape';
|
|
6
|
-
import createSpacing from './createSpacing';
|
|
7
|
-
import styleFunctionSx from '../styleFunctionSx/styleFunctionSx';
|
|
8
|
-
import defaultSxConfig from '../styleFunctionSx/defaultSxConfig';
|
|
9
|
-
import applyStyles from './applyStyles';
|
|
10
|
-
function createTheme() {
|
|
11
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
|
-
var _options$breakpoints = options.breakpoints,
|
|
13
|
-
breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,
|
|
14
|
-
_options$palette = options.palette,
|
|
15
|
-
paletteInput = _options$palette === void 0 ? {} : _options$palette,
|
|
16
|
-
spacingInput = options.spacing,
|
|
17
|
-
_options$shape = options.shape,
|
|
18
|
-
shapeInput = _options$shape === void 0 ? {} : _options$shape,
|
|
19
|
-
other = _objectWithoutProperties(options, ["breakpoints", "palette", "spacing", "shape"]);
|
|
20
|
-
var breakpoints = createBreakpoints(breakpointsInput);
|
|
21
|
-
var spacing = createSpacing(spacingInput);
|
|
22
|
-
var muiTheme = deepmerge({
|
|
23
|
-
breakpoints: breakpoints,
|
|
24
|
-
direction: 'ltr',
|
|
25
|
-
components: {},
|
|
26
|
-
// Inject component definitions.
|
|
27
|
-
palette: _extends({
|
|
28
|
-
mode: 'light'
|
|
29
|
-
}, paletteInput),
|
|
30
|
-
spacing: spacing,
|
|
31
|
-
shape: _extends({}, shape, shapeInput)
|
|
32
|
-
}, other);
|
|
33
|
-
muiTheme.applyStyles = applyStyles;
|
|
34
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
35
|
-
args[_key - 1] = arguments[_key];
|
|
36
|
-
}
|
|
37
|
-
muiTheme = args.reduce(function (acc, argument) {
|
|
38
|
-
return deepmerge(acc, argument);
|
|
39
|
-
}, muiTheme);
|
|
40
|
-
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
|
|
41
|
-
muiTheme.unstable_sx = function sx(props) {
|
|
42
|
-
return styleFunctionSx({
|
|
43
|
-
sx: props,
|
|
44
|
-
theme: this
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
return muiTheme;
|
|
48
|
-
}
|
|
49
|
-
export default createTheme;
|
|
@@ -1,91 +0,0 @@
|
|
|
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
|
-
|
|
7
|
-
// false positive
|
|
8
|
-
// eslint-disable-next-line react/function-component-definition
|
|
9
|
-
export var gap = function gap(props) {
|
|
10
|
-
if (props.gap !== undefined && props.gap !== null) {
|
|
11
|
-
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');
|
|
12
|
-
var styleFromPropValue = function styleFromPropValue(propValue) {
|
|
13
|
-
return {
|
|
14
|
-
gap: getValue(transformer, propValue)
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
return handleBreakpoints(props, props.gap, styleFromPropValue);
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
};
|
|
21
|
-
gap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
22
|
-
gap: responsivePropType
|
|
23
|
-
} : {};
|
|
24
|
-
gap.filterProps = ['gap'];
|
|
25
|
-
|
|
26
|
-
// false positive
|
|
27
|
-
// eslint-disable-next-line react/function-component-definition
|
|
28
|
-
export var columnGap = function columnGap(props) {
|
|
29
|
-
if (props.columnGap !== undefined && props.columnGap !== null) {
|
|
30
|
-
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');
|
|
31
|
-
var styleFromPropValue = function styleFromPropValue(propValue) {
|
|
32
|
-
return {
|
|
33
|
-
columnGap: getValue(transformer, propValue)
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
return handleBreakpoints(props, props.columnGap, styleFromPropValue);
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
};
|
|
40
|
-
columnGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
41
|
-
columnGap: responsivePropType
|
|
42
|
-
} : {};
|
|
43
|
-
columnGap.filterProps = ['columnGap'];
|
|
44
|
-
|
|
45
|
-
// false positive
|
|
46
|
-
// eslint-disable-next-line react/function-component-definition
|
|
47
|
-
export var rowGap = function rowGap(props) {
|
|
48
|
-
if (props.rowGap !== undefined && props.rowGap !== null) {
|
|
49
|
-
var transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');
|
|
50
|
-
var styleFromPropValue = function styleFromPropValue(propValue) {
|
|
51
|
-
return {
|
|
52
|
-
rowGap: getValue(transformer, propValue)
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
return handleBreakpoints(props, props.rowGap, styleFromPropValue);
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
};
|
|
59
|
-
rowGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
60
|
-
rowGap: responsivePropType
|
|
61
|
-
} : {};
|
|
62
|
-
rowGap.filterProps = ['rowGap'];
|
|
63
|
-
export var gridColumn = style({
|
|
64
|
-
prop: 'gridColumn'
|
|
65
|
-
});
|
|
66
|
-
export var gridRow = style({
|
|
67
|
-
prop: 'gridRow'
|
|
68
|
-
});
|
|
69
|
-
export var gridAutoFlow = style({
|
|
70
|
-
prop: 'gridAutoFlow'
|
|
71
|
-
});
|
|
72
|
-
export var gridAutoColumns = style({
|
|
73
|
-
prop: 'gridAutoColumns'
|
|
74
|
-
});
|
|
75
|
-
export var gridAutoRows = style({
|
|
76
|
-
prop: 'gridAutoRows'
|
|
77
|
-
});
|
|
78
|
-
export var gridTemplateColumns = style({
|
|
79
|
-
prop: 'gridTemplateColumns'
|
|
80
|
-
});
|
|
81
|
-
export var gridTemplateRows = style({
|
|
82
|
-
prop: 'gridTemplateRows'
|
|
83
|
-
});
|
|
84
|
-
export var gridTemplateAreas = style({
|
|
85
|
-
prop: 'gridTemplateAreas'
|
|
86
|
-
});
|
|
87
|
-
export var gridArea = style({
|
|
88
|
-
prop: 'gridArea'
|
|
89
|
-
});
|
|
90
|
-
var grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
|
91
|
-
export default grid;
|
package/legacy/cssGrid/index.js
DELETED