@mui/system 5.10.13 → 5.10.15
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 +1 -10
- package/Box/index.js +0 -2
- package/CHANGELOG.md +132 -2
- package/Container/Container.js +2 -17
- package/Container/containerClasses.js +0 -3
- package/Container/createContainer.js +15 -37
- package/Container/index.js +0 -6
- package/Stack/Stack.js +1 -12
- package/Stack/createStack.js +10 -48
- package/Stack/index.js +0 -9
- package/Stack/stackClasses.js +0 -3
- package/ThemeProvider/ThemeProvider.js +2 -22
- package/ThemeProvider/index.js +0 -2
- package/Unstable_Grid/Grid.js +6 -42
- package/Unstable_Grid/createGrid.js +19 -49
- package/Unstable_Grid/gridClasses.js +8 -7
- package/Unstable_Grid/gridGenerator.d.ts +4 -3
- package/Unstable_Grid/gridGenerator.js +22 -63
- package/Unstable_Grid/index.js +0 -9
- package/borders.js +0 -14
- package/breakpoints.js +3 -32
- package/colorManipulator.js +13 -55
- package/compose.js +0 -7
- package/createBox.js +5 -20
- package/createStyled.js +27 -71
- package/createTheme/createBreakpoints.js +22 -37
- package/createTheme/createSpacing.js +4 -8
- package/createTheme/createTheme.js +6 -16
- package/createTheme/index.js +0 -2
- package/cssGrid.js +0 -21
- package/cssVars/createCssVarsProvider.js +33 -74
- package/cssVars/createGetCssVar.js +2 -7
- package/cssVars/cssVarsParser.js +3 -15
- package/cssVars/getInitColorSchemeScript.js +0 -6
- package/cssVars/index.js +0 -3
- package/cssVars/useCurrentColorScheme.js +20 -49
- package/display.js +0 -6
- package/esm/Box/Box.js +1 -6
- package/esm/Container/Container.js +3 -14
- package/esm/Container/createContainer.js +15 -25
- package/esm/Stack/Stack.js +1 -9
- package/esm/Stack/createStack.js +10 -29
- package/esm/ThemeProvider/ThemeProvider.js +2 -11
- package/esm/Unstable_Grid/Grid.js +6 -39
- package/esm/Unstable_Grid/createGrid.js +18 -35
- package/esm/Unstable_Grid/gridClasses.js +8 -4
- package/esm/Unstable_Grid/gridGenerator.js +20 -38
- package/esm/borders.js +0 -6
- package/esm/breakpoints.js +7 -22
- package/esm/colorManipulator.js +13 -43
- package/esm/compose.js +0 -5
- package/esm/createBox.js +5 -7
- package/esm/createStyled.js +27 -64
- package/esm/createTheme/createBreakpoints.js +22 -34
- package/esm/createTheme/createSpacing.js +4 -7
- package/esm/createTheme/createTheme.js +6 -9
- package/esm/cssGrid.js +0 -9
- package/esm/cssVars/createCssVarsProvider.js +33 -60
- package/esm/cssVars/createGetCssVar.js +2 -6
- package/esm/cssVars/cssVarsParser.js +3 -11
- package/esm/cssVars/useCurrentColorScheme.js +20 -44
- package/esm/getThemeValue.js +0 -2
- package/esm/index.js +3 -3
- package/esm/memoize.js +0 -1
- package/esm/merge.js +0 -3
- package/esm/palette.js +0 -3
- package/esm/propsToClassKey.js +4 -7
- package/esm/sizing.js +0 -5
- package/esm/spacing.js +3 -23
- package/esm/style.js +5 -22
- package/esm/styleFunctionSx/extendSxProp.js +3 -10
- package/esm/styleFunctionSx/styleFunctionSx.js +3 -16
- package/esm/sx/sx.js +0 -2
- package/esm/useTheme.js +0 -2
- package/esm/useThemeProps/getThemeProps.js +0 -2
- package/esm/useThemeWithoutDefault.js +0 -3
- package/flexbox.js +0 -4
- package/getThemeValue.js +0 -14
- package/index.d.ts +2 -0
- package/index.js +16 -55
- package/legacy/Box/Box.js +1 -6
- package/legacy/Container/Container.js +3 -14
- package/legacy/Container/createContainer.js +29 -39
- package/legacy/Stack/Stack.js +1 -9
- package/legacy/Stack/createStack.js +17 -37
- package/legacy/ThemeProvider/ThemeProvider.js +3 -12
- package/legacy/Unstable_Grid/Grid.js +6 -39
- package/legacy/Unstable_Grid/createGrid.js +34 -53
- package/legacy/Unstable_Grid/gridGenerator.js +36 -58
- package/legacy/borders.js +0 -6
- package/legacy/breakpoints.js +9 -28
- package/legacy/colorManipulator.js +16 -48
- package/legacy/compose.js +0 -6
- package/legacy/createBox.js +9 -11
- package/legacy/createStyled.js +27 -68
- package/legacy/createTheme/createBreakpoints.js +20 -33
- package/legacy/createTheme/createSpacing.js +4 -9
- package/legacy/createTheme/createTheme.js +7 -13
- package/legacy/cssGrid.js +0 -9
- package/legacy/cssVars/createCssVarsProvider.js +98 -130
- package/legacy/cssVars/createGetCssVar.js +2 -10
- package/legacy/cssVars/cssVarsParser.js +7 -20
- package/legacy/cssVars/getInitColorSchemeScript.js +14 -15
- package/legacy/cssVars/useCurrentColorScheme.js +43 -69
- package/legacy/getThemeValue.js +0 -3
- package/legacy/index.js +4 -4
- package/legacy/memoize.js +0 -1
- package/legacy/merge.js +0 -3
- package/legacy/palette.js +0 -3
- package/legacy/propsToClassKey.js +2 -5
- package/legacy/sizing.js +0 -5
- package/legacy/spacing.js +6 -27
- package/legacy/style.js +9 -27
- package/legacy/styleFunctionSx/extendSxProp.js +3 -11
- package/legacy/styleFunctionSx/styleFunctionSx.js +6 -21
- package/legacy/sx/sx.js +0 -2
- package/legacy/useTheme.js +0 -2
- package/legacy/useThemeProps/getThemeProps.js +2 -4
- package/legacy/useThemeProps/useThemeProps.js +2 -2
- package/legacy/useThemeWithoutDefault.js +0 -3
- package/memoize.js +0 -2
- package/merge.js +0 -5
- package/modern/Box/Box.js +1 -6
- package/modern/Container/Container.js +3 -14
- package/modern/Container/createContainer.js +15 -25
- package/modern/Stack/Stack.js +1 -9
- package/modern/Stack/createStack.js +10 -29
- package/modern/ThemeProvider/ThemeProvider.js +2 -11
- package/modern/Unstable_Grid/Grid.js +6 -39
- package/modern/Unstable_Grid/createGrid.js +18 -34
- package/modern/Unstable_Grid/gridClasses.js +8 -4
- package/modern/Unstable_Grid/gridGenerator.js +20 -36
- package/modern/borders.js +0 -6
- package/modern/breakpoints.js +7 -21
- package/modern/colorManipulator.js +13 -43
- package/modern/compose.js +0 -5
- package/modern/createBox.js +5 -7
- package/modern/createStyled.js +27 -63
- package/modern/createTheme/createBreakpoints.js +22 -34
- package/modern/createTheme/createSpacing.js +4 -7
- package/modern/createTheme/createTheme.js +6 -9
- package/modern/cssGrid.js +0 -9
- package/modern/cssVars/createCssVarsProvider.js +33 -60
- package/modern/cssVars/createGetCssVar.js +2 -6
- package/modern/cssVars/cssVarsParser.js +3 -11
- package/modern/cssVars/useCurrentColorScheme.js +20 -44
- package/modern/getThemeValue.js +0 -2
- package/modern/index.js +4 -4
- package/modern/memoize.js +0 -1
- package/modern/merge.js +0 -3
- package/modern/palette.js +0 -3
- package/modern/propsToClassKey.js +4 -7
- package/modern/sizing.js +0 -4
- package/modern/spacing.js +3 -22
- package/modern/style.js +5 -22
- package/modern/styleFunctionSx/extendSxProp.js +3 -10
- package/modern/styleFunctionSx/styleFunctionSx.js +3 -16
- package/modern/sx/sx.js +0 -2
- package/modern/useTheme.js +0 -2
- package/modern/useThemeProps/getThemeProps.js +0 -2
- package/modern/useThemeWithoutDefault.js +0 -3
- package/package.json +6 -6
- package/palette.js +0 -6
- package/positions.js +0 -6
- package/propsToClassKey.js +4 -10
- package/responsivePropType.d.ts +3 -0
- package/responsivePropType.js +0 -3
- package/shadows.js +0 -3
- package/sizing.js +0 -11
- package/spacing.d.ts +14 -0
- package/spacing.js +3 -37
- package/style.d.ts +6 -0
- package/style.js +6 -27
- package/styleFunctionSx/extendSxProp.js +3 -15
- package/styleFunctionSx/index.js +0 -5
- package/styleFunctionSx/styleFunctionSx.js +3 -21
- package/styled.js +0 -3
- package/sx/index.js +0 -2
- package/sx/sx.js +0 -4
- package/typography.js +0 -4
- package/useTheme.js +0 -6
- package/useThemeProps/getThemeProps.js +0 -4
- package/useThemeProps/index.js +0 -3
- package/useThemeProps/useThemeProps.js +0 -4
- package/useThemeWithoutDefault.js +0 -4
package/Stack/createStack.js
CHANGED
|
@@ -1,45 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = createStack;
|
|
9
8
|
exports.style = void 0;
|
|
10
|
-
|
|
11
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
|
-
|
|
13
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
-
|
|
15
11
|
var React = _interopRequireWildcard(require("react"));
|
|
16
|
-
|
|
17
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
|
|
19
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
20
|
-
|
|
21
14
|
var _utils = require("@mui/utils");
|
|
22
|
-
|
|
23
15
|
var _styled = _interopRequireDefault(require("../styled"));
|
|
24
|
-
|
|
25
16
|
var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
|
26
|
-
|
|
27
17
|
var _styleFunctionSx = require("../styleFunctionSx");
|
|
28
|
-
|
|
29
18
|
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
|
30
|
-
|
|
31
19
|
var _breakpoints = require("../breakpoints");
|
|
32
|
-
|
|
33
20
|
var _spacing = require("../spacing");
|
|
34
|
-
|
|
35
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
36
|
-
|
|
37
22
|
const _excluded = ["component", "direction", "spacing", "divider", "children", "className"];
|
|
38
|
-
|
|
39
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
40
|
-
|
|
41
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
42
|
-
|
|
43
25
|
const defaultTheme = (0, _createTheme.default)();
|
|
44
26
|
// widening Theme to any so that the consumer can own the theme structure.
|
|
45
27
|
const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
|
@@ -47,7 +29,6 @@ const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
|
|
47
29
|
slot: 'Root',
|
|
48
30
|
overridesResolver: (props, styles) => styles.root
|
|
49
31
|
});
|
|
50
|
-
|
|
51
32
|
function useThemePropsDefault(props) {
|
|
52
33
|
return (0, _useThemeProps.default)({
|
|
53
34
|
props,
|
|
@@ -55,6 +36,7 @@ function useThemePropsDefault(props) {
|
|
|
55
36
|
defaultTheme
|
|
56
37
|
});
|
|
57
38
|
}
|
|
39
|
+
|
|
58
40
|
/**
|
|
59
41
|
* Return an array with the separator React element interspersed between
|
|
60
42
|
* each React node of the input children.
|
|
@@ -62,23 +44,18 @@ function useThemePropsDefault(props) {
|
|
|
62
44
|
* > joinChildren([1,2,3], 0)
|
|
63
45
|
* [1,0,2,0,3]
|
|
64
46
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
47
|
function joinChildren(children, separator) {
|
|
68
48
|
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
69
49
|
return childrenArray.reduce((output, child, index) => {
|
|
70
50
|
output.push(child);
|
|
71
|
-
|
|
72
51
|
if (index < childrenArray.length - 1) {
|
|
73
52
|
output.push( /*#__PURE__*/React.cloneElement(separator, {
|
|
74
53
|
key: `separator-${index}`
|
|
75
54
|
}));
|
|
76
55
|
}
|
|
77
|
-
|
|
78
56
|
return output;
|
|
79
57
|
}, []);
|
|
80
58
|
}
|
|
81
|
-
|
|
82
59
|
const getSideFromDirection = direction => {
|
|
83
60
|
return {
|
|
84
61
|
row: 'Left',
|
|
@@ -87,7 +64,6 @@ const getSideFromDirection = direction => {
|
|
|
87
64
|
'column-reverse': 'Bottom'
|
|
88
65
|
}[direction];
|
|
89
66
|
};
|
|
90
|
-
|
|
91
67
|
const style = ({
|
|
92
68
|
ownerState,
|
|
93
69
|
theme
|
|
@@ -103,14 +79,12 @@ const style = ({
|
|
|
103
79
|
}), propValue => ({
|
|
104
80
|
flexDirection: propValue
|
|
105
81
|
})));
|
|
106
|
-
|
|
107
82
|
if (ownerState.spacing) {
|
|
108
83
|
const transformer = (0, _spacing.createUnarySpacing)(theme);
|
|
109
84
|
const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
|
|
110
85
|
if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
|
|
111
86
|
acc[breakpoint] = true;
|
|
112
87
|
}
|
|
113
|
-
|
|
114
88
|
return acc;
|
|
115
89
|
}, {});
|
|
116
90
|
const directionValues = (0, _breakpoints.resolveBreakpointValues)({
|
|
@@ -121,18 +95,15 @@ const style = ({
|
|
|
121
95
|
values: ownerState.spacing,
|
|
122
96
|
base
|
|
123
97
|
});
|
|
124
|
-
|
|
125
98
|
if (typeof directionValues === 'object') {
|
|
126
99
|
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
|
127
100
|
const directionValue = directionValues[breakpoint];
|
|
128
|
-
|
|
129
101
|
if (!directionValue) {
|
|
130
102
|
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
131
103
|
directionValues[breakpoint] = previousDirectionValue;
|
|
132
104
|
}
|
|
133
105
|
});
|
|
134
106
|
}
|
|
135
|
-
|
|
136
107
|
const styleFromPropValue = (propValue, breakpoint) => {
|
|
137
108
|
return {
|
|
138
109
|
'& > :not(style) + :not(style)': {
|
|
@@ -141,18 +112,14 @@ const style = ({
|
|
|
141
112
|
}
|
|
142
113
|
};
|
|
143
114
|
};
|
|
144
|
-
|
|
145
115
|
styles = (0, _utils.deepmerge)(styles, (0, _breakpoints.handleBreakpoints)({
|
|
146
116
|
theme
|
|
147
117
|
}, spacingValues, styleFromPropValue));
|
|
148
118
|
}
|
|
149
|
-
|
|
150
119
|
styles = (0, _breakpoints.mergeBreakpointsInOrder)(theme.breakpoints, styles);
|
|
151
120
|
return styles;
|
|
152
121
|
};
|
|
153
|
-
|
|
154
122
|
exports.style = style;
|
|
155
|
-
|
|
156
123
|
function createStack(options = {}) {
|
|
157
124
|
const {
|
|
158
125
|
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
@@ -160,28 +127,25 @@ function createStack(options = {}) {
|
|
|
160
127
|
useThemeProps = useThemePropsDefault,
|
|
161
128
|
componentName = 'MuiStack'
|
|
162
129
|
} = options;
|
|
163
|
-
|
|
164
130
|
const useUtilityClasses = () => {
|
|
165
131
|
const slots = {
|
|
166
132
|
root: ['root']
|
|
167
133
|
};
|
|
168
134
|
return (0, _utils.unstable_composeClasses)(slots, slot => (0, _utils.unstable_generateUtilityClass)(componentName, slot), {});
|
|
169
135
|
};
|
|
170
|
-
|
|
171
136
|
const StackRoot = createStyledComponent(style);
|
|
172
137
|
const Stack = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
173
138
|
const themeProps = useThemeProps(inProps);
|
|
174
139
|
const props = (0, _styleFunctionSx.extendSxProp)(themeProps); // `color` type conflicts with html color attribute.
|
|
175
|
-
|
|
176
140
|
const {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
141
|
+
component = 'div',
|
|
142
|
+
direction = 'column',
|
|
143
|
+
spacing = 0,
|
|
144
|
+
divider,
|
|
145
|
+
children,
|
|
146
|
+
className
|
|
147
|
+
} = props,
|
|
148
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
185
149
|
const ownerState = {
|
|
186
150
|
direction,
|
|
187
151
|
spacing
|
|
@@ -196,9 +160,7 @@ function createStack(options = {}) {
|
|
|
196
160
|
children: divider ? joinChildren(children, divider) : children
|
|
197
161
|
}));
|
|
198
162
|
});
|
|
199
|
-
process.env.NODE_ENV !== "production" ? Stack.propTypes
|
|
200
|
-
/* remove-proptypes */
|
|
201
|
-
= {
|
|
163
|
+
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
202
164
|
children: _propTypes.default.node,
|
|
203
165
|
direction: _propTypes.default.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
|
204
166
|
divider: _propTypes.default.node,
|
package/Stack/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -27,13 +26,9 @@ Object.defineProperty(exports, "stackClasses", {
|
|
|
27
26
|
return _stackClasses.default;
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
|
-
|
|
31
29
|
var _Stack = _interopRequireDefault(require("./Stack"));
|
|
32
|
-
|
|
33
30
|
var _createStack = _interopRequireDefault(require("./createStack"));
|
|
34
|
-
|
|
35
31
|
var _StackProps = require("./StackProps");
|
|
36
|
-
|
|
37
32
|
Object.keys(_StackProps).forEach(function (key) {
|
|
38
33
|
if (key === "default" || key === "__esModule") return;
|
|
39
34
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -45,9 +40,7 @@ Object.keys(_StackProps).forEach(function (key) {
|
|
|
45
40
|
}
|
|
46
41
|
});
|
|
47
42
|
});
|
|
48
|
-
|
|
49
43
|
var _stackClasses = _interopRequireWildcard(require("./stackClasses"));
|
|
50
|
-
|
|
51
44
|
Object.keys(_stackClasses).forEach(function (key) {
|
|
52
45
|
if (key === "default" || key === "__esModule") return;
|
|
53
46
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -59,7 +52,5 @@ Object.keys(_stackClasses).forEach(function (key) {
|
|
|
59
52
|
}
|
|
60
53
|
});
|
|
61
54
|
});
|
|
62
|
-
|
|
63
55
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
64
|
-
|
|
65
56
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/Stack/stackClasses.js
CHANGED
|
@@ -5,13 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
exports.getStackUtilityClass = getStackUtilityClass;
|
|
8
|
-
|
|
9
8
|
var _utils = require("@mui/utils");
|
|
10
|
-
|
|
11
9
|
function getStackUtilityClass(slot) {
|
|
12
10
|
return (0, _utils.unstable_generateUtilityClass)('MuiStack', slot);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
const stackClasses = (0, _utils.unstable_generateUtilityClasses)('MuiStack', ['root']);
|
|
16
13
|
var _default = stackClasses;
|
|
17
14
|
exports.default = _default;
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _privateTheming = require("@mui/private-theming");
|
|
15
|
-
|
|
16
11
|
var _utils = require("@mui/utils");
|
|
17
|
-
|
|
18
12
|
var _styledEngine = require("@mui/styled-engine");
|
|
19
|
-
|
|
20
13
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
21
|
-
|
|
22
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
17
|
const EMPTY_THEME = {};
|
|
29
|
-
|
|
30
18
|
function InnerThemeProvider(props) {
|
|
31
19
|
const theme = (0, _useTheme.default)();
|
|
32
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.ThemeContext.Provider, {
|
|
@@ -34,18 +22,17 @@ function InnerThemeProvider(props) {
|
|
|
34
22
|
children: props.children
|
|
35
23
|
});
|
|
36
24
|
}
|
|
37
|
-
|
|
38
25
|
process.env.NODE_ENV !== "production" ? InnerThemeProvider.propTypes = {
|
|
39
26
|
/**
|
|
40
27
|
* Your component tree.
|
|
41
28
|
*/
|
|
42
29
|
children: _propTypes.default.node
|
|
43
30
|
} : void 0;
|
|
31
|
+
|
|
44
32
|
/**
|
|
45
33
|
* This component makes the `theme` available down the React tree.
|
|
46
34
|
* It should preferably be used at **the root of your component tree**.
|
|
47
35
|
*/
|
|
48
|
-
|
|
49
36
|
function ThemeProvider(props) {
|
|
50
37
|
const {
|
|
51
38
|
children,
|
|
@@ -58,29 +45,22 @@ function ThemeProvider(props) {
|
|
|
58
45
|
})
|
|
59
46
|
});
|
|
60
47
|
}
|
|
61
|
-
|
|
62
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes
|
|
63
|
-
/* remove-proptypes */
|
|
64
|
-
= {
|
|
48
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-proptypes */ = {
|
|
65
49
|
// ----------------------------- Warning --------------------------------
|
|
66
50
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
67
51
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
68
52
|
// ----------------------------------------------------------------------
|
|
69
|
-
|
|
70
53
|
/**
|
|
71
54
|
* Your component tree.
|
|
72
55
|
*/
|
|
73
56
|
children: _propTypes.default.node,
|
|
74
|
-
|
|
75
57
|
/**
|
|
76
58
|
* A theme object. You can provide a function to extend the outer theme.
|
|
77
59
|
*/
|
|
78
60
|
theme: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]).isRequired
|
|
79
61
|
} : void 0;
|
|
80
|
-
|
|
81
62
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
63
|
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = (0, _utils.exactProp)(ThemeProvider.propTypes) : void 0;
|
|
83
64
|
}
|
|
84
|
-
|
|
85
65
|
var _default = ThemeProvider;
|
|
86
66
|
exports.default = _default;
|
package/ThemeProvider/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _ThemeProvider.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
|
package/Unstable_Grid/Grid.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _createGrid = _interopRequireDefault(require("./createGrid"));
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
*
|
|
16
12
|
* Demos:
|
|
@@ -22,56 +18,41 @@ var _createGrid = _interopRequireDefault(require("./createGrid"));
|
|
|
22
18
|
* - [Grid API](https://mui.com/system/api/grid/)
|
|
23
19
|
*/
|
|
24
20
|
const Grid = (0, _createGrid.default)();
|
|
25
|
-
process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
26
|
-
/* remove-proptypes */
|
|
27
|
-
= {
|
|
21
|
+
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
|
28
22
|
// ----------------------------- Warning --------------------------------
|
|
29
23
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
30
24
|
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
31
25
|
// ----------------------------------------------------------------------
|
|
32
|
-
|
|
33
26
|
/**
|
|
34
27
|
* The content of the component.
|
|
35
28
|
*/
|
|
36
29
|
children: _propTypes.default.node,
|
|
37
|
-
|
|
38
30
|
/**
|
|
39
31
|
* The number of columns.
|
|
40
32
|
* @default 12
|
|
41
33
|
*/
|
|
42
|
-
columns: _propTypes.default
|
|
43
|
-
/* @typescript-to-proptypes-ignore */
|
|
44
|
-
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
|
45
|
-
|
|
34
|
+
columns: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
|
46
35
|
/**
|
|
47
36
|
* Defines the horizontal space between the type `item` components.
|
|
48
37
|
* It overrides the value of the `spacing` prop.
|
|
49
38
|
*/
|
|
50
|
-
columnSpacing: _propTypes.default
|
|
51
|
-
/* @typescript-to-proptypes-ignore */
|
|
52
|
-
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
53
|
-
|
|
39
|
+
columnSpacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
54
40
|
/**
|
|
55
41
|
* If `true`, the component will have the flex *container* behavior.
|
|
56
42
|
* You should be wrapping *items* with a *container*.
|
|
57
43
|
* @default false
|
|
58
44
|
*/
|
|
59
45
|
container: _propTypes.default.bool,
|
|
60
|
-
|
|
61
46
|
/**
|
|
62
47
|
* Defines the `flex-direction` style property.
|
|
63
48
|
* It is applied for all screen sizes.
|
|
64
49
|
* @default 'row'
|
|
65
50
|
*/
|
|
66
|
-
direction: _propTypes.default
|
|
67
|
-
/* @typescript-to-proptypes-ignore */
|
|
68
|
-
.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
|
69
|
-
|
|
51
|
+
direction: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
|
70
52
|
/**
|
|
71
53
|
* If `true`, the negative margin and padding are apply only to the top and left sides of the grid.
|
|
72
54
|
*/
|
|
73
55
|
disableEqualOverflow: _propTypes.default.bool,
|
|
74
|
-
|
|
75
56
|
/**
|
|
76
57
|
* If a number, it sets the number of columns the grid item uses.
|
|
77
58
|
* It can't be greater than the total number of columns of the container (12 by default).
|
|
@@ -82,14 +63,12 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
|
82
63
|
* @default false
|
|
83
64
|
*/
|
|
84
65
|
lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
85
|
-
|
|
86
66
|
/**
|
|
87
67
|
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
88
68
|
* If 'auto', the grid item push itself to the right-end of the container.
|
|
89
69
|
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
90
70
|
*/
|
|
91
71
|
lgOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
92
|
-
|
|
93
72
|
/**
|
|
94
73
|
* If a number, it sets the number of columns the grid item uses.
|
|
95
74
|
* It can't be greater than the total number of columns of the container (12 by default).
|
|
@@ -100,22 +79,17 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
|
100
79
|
* @default false
|
|
101
80
|
*/
|
|
102
81
|
md: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
103
|
-
|
|
104
82
|
/**
|
|
105
83
|
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
106
84
|
* If 'auto', the grid item push itself to the right-end of the container.
|
|
107
85
|
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
108
86
|
*/
|
|
109
87
|
mdOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
110
|
-
|
|
111
88
|
/**
|
|
112
89
|
* Defines the vertical space between the type `item` components.
|
|
113
90
|
* It overrides the value of the `spacing` prop.
|
|
114
91
|
*/
|
|
115
|
-
rowSpacing: _propTypes.default
|
|
116
|
-
/* @typescript-to-proptypes-ignore */
|
|
117
|
-
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
118
|
-
|
|
92
|
+
rowSpacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
119
93
|
/**
|
|
120
94
|
* If a number, it sets the number of columns the grid item uses.
|
|
121
95
|
* It can't be greater than the total number of columns of the container (12 by default).
|
|
@@ -126,35 +100,28 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
|
126
100
|
* @default false
|
|
127
101
|
*/
|
|
128
102
|
sm: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
129
|
-
|
|
130
103
|
/**
|
|
131
104
|
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
132
105
|
* If 'auto', the grid item push itself to the right-end of the container.
|
|
133
106
|
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
134
107
|
*/
|
|
135
108
|
smOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
136
|
-
|
|
137
109
|
/**
|
|
138
110
|
* Defines the space between the type `item` components.
|
|
139
111
|
* It can only be used on a type `container` component.
|
|
140
112
|
* @default 0
|
|
141
113
|
*/
|
|
142
|
-
spacing: _propTypes.default
|
|
143
|
-
/* @typescript-to-proptypes-ignore */
|
|
144
|
-
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
145
|
-
|
|
114
|
+
spacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
146
115
|
/**
|
|
147
116
|
* @ignore
|
|
148
117
|
*/
|
|
149
118
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
150
|
-
|
|
151
119
|
/**
|
|
152
120
|
* Defines the `flex-wrap` style property.
|
|
153
121
|
* It's applied for all screen sizes.
|
|
154
122
|
* @default 'wrap'
|
|
155
123
|
*/
|
|
156
124
|
wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap']),
|
|
157
|
-
|
|
158
125
|
/**
|
|
159
126
|
* If a number, it sets the number of columns the grid item uses.
|
|
160
127
|
* It can't be greater than the total number of columns of the container (12 by default).
|
|
@@ -165,14 +132,12 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
|
165
132
|
* @default false
|
|
166
133
|
*/
|
|
167
134
|
xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
168
|
-
|
|
169
135
|
/**
|
|
170
136
|
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
171
137
|
* If 'auto', the grid item push itself to the right-end of the container.
|
|
172
138
|
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
173
139
|
*/
|
|
174
140
|
xlOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
175
|
-
|
|
176
141
|
/**
|
|
177
142
|
* If a number, it sets the number of columns the grid item uses.
|
|
178
143
|
* It can't be greater than the total number of columns of the container (12 by default).
|
|
@@ -183,7 +148,6 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes
|
|
|
183
148
|
* @default false
|
|
184
149
|
*/
|
|
185
150
|
xs: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
186
|
-
|
|
187
151
|
/**
|
|
188
152
|
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
189
153
|
* If 'auto', the grid item push itself to the right-end of the container.
|