@mui/system 5.12.1 → 5.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +312 -0
- package/Container/Container.d.ts +13 -13
- package/Container/ContainerProps.d.ts +40 -40
- package/Container/containerClasses.d.ts +22 -22
- package/Container/createContainer.d.ts +18 -18
- package/Container/createContainer.js +41 -35
- package/GlobalStyles/GlobalStyles.d.ts +13 -13
- package/GlobalStyles/index.d.ts +2 -2
- package/Stack/Stack.d.ts +14 -14
- package/Stack/Stack.js +1 -1
- package/Stack/StackProps.d.ts +53 -53
- package/Stack/createStack.d.ts +21 -21
- package/Stack/createStack.js +24 -26
- package/Stack/index.d.ts +5 -5
- package/Stack/stackClasses.d.ts +8 -8
- package/ThemeProvider/ThemeProvider.js +9 -5
- package/Unstable_Grid/Grid.d.ts +12 -12
- package/Unstable_Grid/GridProps.d.ts +185 -185
- package/Unstable_Grid/createGrid.d.ts +11 -11
- package/Unstable_Grid/createGrid.js +21 -23
- package/Unstable_Grid/gridClasses.d.ts +20 -20
- package/Unstable_Grid/gridGenerator.d.ts +38 -38
- package/Unstable_Grid/gridGenerator.js +20 -18
- package/Unstable_Grid/index.d.ts +5 -5
- package/breakpoints.js +7 -6
- package/colorManipulator.js +2 -0
- package/createBox.js +9 -12
- package/createStyled.js +40 -31
- package/createTheme/createBreakpoints.js +24 -26
- package/createTheme/createSpacing.d.ts +10 -10
- package/createTheme/createSpacing.js +3 -1
- package/createTheme/createTheme.js +18 -14
- package/cssVars/createCssVarsProvider.js +21 -20
- package/cssVars/createCssVarsTheme.d.ts +15 -15
- package/cssVars/createCssVarsTheme.js +10 -10
- package/cssVars/createGetCssVar.d.ts +5 -5
- package/cssVars/cssVarsParser.d.ts +64 -64
- package/cssVars/getInitColorSchemeScript.d.ts +42 -42
- package/cssVars/index.d.ts +5 -5
- package/cssVars/prepareCssVars.d.ts +16 -16
- package/cssVars/prepareCssVars.js +13 -12
- package/cssVars/useCurrentColorScheme.d.ts +53 -53
- package/cssVars/useCurrentColorScheme.js +17 -11
- package/esm/Container/createContainer.js +41 -35
- package/esm/Stack/Stack.js +1 -1
- package/esm/Stack/createStack.js +24 -26
- package/esm/ThemeProvider/ThemeProvider.js +9 -5
- package/esm/Unstable_Grid/createGrid.js +21 -23
- package/esm/Unstable_Grid/gridGenerator.js +20 -17
- package/esm/breakpoints.js +7 -6
- package/esm/colorManipulator.js +1 -0
- package/esm/createBox.js +9 -12
- package/esm/createStyled.js +38 -31
- package/esm/createTheme/createBreakpoints.js +24 -25
- package/esm/createTheme/createSpacing.js +4 -0
- package/esm/createTheme/createTheme.js +18 -14
- package/esm/cssVars/createCssVarsProvider.js +21 -20
- package/esm/cssVars/createCssVarsTheme.js +10 -10
- package/esm/cssVars/prepareCssVars.js +13 -12
- package/esm/cssVars/useCurrentColorScheme.js +17 -10
- package/esm/propsToClassKey.js +3 -5
- package/esm/styleFunctionSx/extendSxProp.js +14 -10
- package/index.js +5 -2
- package/legacy/Container/createContainer.js +7 -6
- package/legacy/Stack/Stack.js +1 -1
- package/legacy/Stack/createStack.js +6 -5
- package/legacy/ThemeProvider/ThemeProvider.js +4 -3
- package/legacy/Unstable_Grid/createGrid.js +6 -4
- package/legacy/Unstable_Grid/gridGenerator.js +6 -4
- package/legacy/breakpoints.js +5 -3
- package/legacy/colorManipulator.js +1 -0
- package/legacy/createBox.js +4 -2
- package/legacy/createStyled.js +13 -11
- package/legacy/createTheme/createBreakpoints.js +4 -3
- package/legacy/createTheme/createSpacing.js +4 -0
- package/legacy/createTheme/createTheme.js +6 -4
- package/legacy/cssVars/createCssVarsProvider.js +6 -5
- package/legacy/cssVars/createCssVarsTheme.js +4 -2
- package/legacy/cssVars/prepareCssVars.js +5 -3
- package/legacy/cssVars/useCurrentColorScheme.js +9 -7
- package/legacy/index.js +1 -1
- package/legacy/styleFunctionSx/extendSxProp.js +6 -4
- package/modern/Container/createContainer.js +41 -35
- package/modern/Stack/Stack.js +1 -1
- package/modern/Stack/createStack.js +24 -26
- package/modern/ThemeProvider/ThemeProvider.js +9 -5
- package/modern/Unstable_Grid/createGrid.js +21 -23
- package/modern/Unstable_Grid/gridGenerator.js +20 -17
- package/modern/breakpoints.js +7 -6
- package/modern/colorManipulator.js +1 -0
- package/modern/createBox.js +9 -12
- package/modern/createStyled.js +38 -31
- package/modern/createTheme/createBreakpoints.js +24 -25
- package/modern/createTheme/createSpacing.js +4 -0
- package/modern/createTheme/createTheme.js +18 -14
- package/modern/cssVars/createCssVarsProvider.js +21 -20
- package/modern/cssVars/createCssVarsTheme.js +10 -10
- package/modern/cssVars/prepareCssVars.js +13 -12
- package/modern/cssVars/useCurrentColorScheme.js +17 -10
- package/modern/index.js +1 -1
- package/modern/propsToClassKey.js +3 -5
- package/modern/styleFunctionSx/extendSxProp.js +14 -10
- package/package.json +4 -4
- package/propsToClassKey.js +3 -6
- package/styleFunctionSx/extendSxProp.js +14 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Interpolation } from '@mui/styled-engine';
|
|
3
|
-
import { Theme as SystemTheme } from '../createTheme';
|
|
4
|
-
export interface GlobalStylesProps<Theme = SystemTheme> {
|
|
5
|
-
styles: Interpolation<Theme>;
|
|
6
|
-
defaultTheme?: object;
|
|
7
|
-
themeId?: string;
|
|
8
|
-
}
|
|
9
|
-
declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): JSX.Element;
|
|
10
|
-
declare namespace GlobalStyles {
|
|
11
|
-
var propTypes: any;
|
|
12
|
-
}
|
|
13
|
-
export default GlobalStyles;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Interpolation } from '@mui/styled-engine';
|
|
3
|
+
import { Theme as SystemTheme } from '../createTheme';
|
|
4
|
+
export interface GlobalStylesProps<Theme = SystemTheme> {
|
|
5
|
+
styles: Interpolation<Theme>;
|
|
6
|
+
defaultTheme?: object;
|
|
7
|
+
themeId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): JSX.Element;
|
|
10
|
+
declare namespace GlobalStyles {
|
|
11
|
+
var propTypes: any;
|
|
12
|
+
}
|
|
13
|
+
export default GlobalStyles;
|
package/GlobalStyles/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './GlobalStyles';
|
|
2
|
-
export * from './GlobalStyles';
|
|
1
|
+
export { default } from './GlobalStyles';
|
|
2
|
+
export * from './GlobalStyles';
|
package/Stack/Stack.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Demos:
|
|
4
|
-
*
|
|
5
|
-
* - [Stack (Joy UI)](https://mui.com/joy/react-stack/)
|
|
6
|
-
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
|
7
|
-
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
|
8
|
-
*
|
|
9
|
-
* API:
|
|
10
|
-
*
|
|
11
|
-
* - [Stack API](https://mui.com/system/api/stack/)
|
|
12
|
-
*/
|
|
13
|
-
declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
|
|
14
|
-
export default Stack;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
|
6
|
+
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
|
7
|
+
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
|
8
|
+
*
|
|
9
|
+
* API:
|
|
10
|
+
*
|
|
11
|
+
* - [Stack API](https://mui.com/system/api/stack/)
|
|
12
|
+
*/
|
|
13
|
+
declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
|
|
14
|
+
export default Stack;
|
package/Stack/Stack.js
CHANGED
|
@@ -11,7 +11,7 @@ var _createStack = _interopRequireDefault(require("./createStack"));
|
|
|
11
11
|
*
|
|
12
12
|
* Demos:
|
|
13
13
|
*
|
|
14
|
-
* - [Stack (Joy UI)](https://mui.com/joy/react-stack/)
|
|
14
|
+
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
|
15
15
|
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
|
16
16
|
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
|
17
17
|
*
|
package/Stack/StackProps.d.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { OverrideProps } from '@mui/types';
|
|
3
|
-
import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
|
|
4
|
-
import { SystemProps } from '../Box';
|
|
5
|
-
import { Theme } from '../createTheme';
|
|
6
|
-
export interface StackBaseProps {
|
|
7
|
-
/**
|
|
8
|
-
* The content of the component.
|
|
9
|
-
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* Defines the `flex-direction` style property.
|
|
13
|
-
* It is applied for all screen sizes.
|
|
14
|
-
* @default 'column'
|
|
15
|
-
*/
|
|
16
|
-
direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
|
|
17
|
-
/**
|
|
18
|
-
* Defines the space between immediate children.
|
|
19
|
-
* @default 0
|
|
20
|
-
*/
|
|
21
|
-
spacing?: ResponsiveStyleValue<number | string>;
|
|
22
|
-
/**
|
|
23
|
-
* Add an element between each child.
|
|
24
|
-
*/
|
|
25
|
-
divider?: React.ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
28
|
-
*
|
|
29
|
-
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
30
|
-
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
31
|
-
*
|
|
32
|
-
* To enable this flag globally, follow the theme's default props configuration.
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
useFlexGap?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
38
|
-
props: P & StackBaseProps & {
|
|
39
|
-
/**
|
|
40
|
-
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
41
|
-
*/
|
|
42
|
-
sx?: SxProps<Theme>;
|
|
43
|
-
} & SystemProps<Theme>;
|
|
44
|
-
defaultComponent: D;
|
|
45
|
-
}
|
|
46
|
-
export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
|
|
47
|
-
component?: React.ElementType;
|
|
48
|
-
}> = OverrideProps<StackTypeMap<P, D>, D>;
|
|
49
|
-
export interface StackOwnerState {
|
|
50
|
-
direction: StackProps['direction'];
|
|
51
|
-
spacing: StackProps['spacing'];
|
|
52
|
-
useFlexGap: boolean;
|
|
53
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverrideProps } from '@mui/types';
|
|
3
|
+
import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
|
|
4
|
+
import { SystemProps } from '../Box';
|
|
5
|
+
import { Theme } from '../createTheme';
|
|
6
|
+
export interface StackBaseProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the component.
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Defines the `flex-direction` style property.
|
|
13
|
+
* It is applied for all screen sizes.
|
|
14
|
+
* @default 'column'
|
|
15
|
+
*/
|
|
16
|
+
direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
|
|
17
|
+
/**
|
|
18
|
+
* Defines the space between immediate children.
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
spacing?: ResponsiveStyleValue<number | string>;
|
|
22
|
+
/**
|
|
23
|
+
* Add an element between each child.
|
|
24
|
+
*/
|
|
25
|
+
divider?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
28
|
+
*
|
|
29
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
30
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
31
|
+
*
|
|
32
|
+
* To enable this flag globally, follow the theme's default props configuration.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
useFlexGap?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
38
|
+
props: P & StackBaseProps & {
|
|
39
|
+
/**
|
|
40
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
41
|
+
*/
|
|
42
|
+
sx?: SxProps<Theme>;
|
|
43
|
+
} & SystemProps<Theme>;
|
|
44
|
+
defaultComponent: D;
|
|
45
|
+
}
|
|
46
|
+
export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
|
|
47
|
+
component?: React.ElementType;
|
|
48
|
+
}> = OverrideProps<StackTypeMap<P, D>, D>;
|
|
49
|
+
export interface StackOwnerState {
|
|
50
|
+
direction: StackProps['direction'];
|
|
51
|
+
spacing: StackProps['spacing'];
|
|
52
|
+
useFlexGap: boolean;
|
|
53
|
+
}
|
package/Stack/createStack.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { OverridableComponent } from '@mui/types';
|
|
3
|
-
import { StackTypeMap, StackOwnerState } from './StackProps';
|
|
4
|
-
import { Breakpoints } from '../createTheme/createBreakpoints';
|
|
5
|
-
import { Spacing } from '../createTheme/createSpacing';
|
|
6
|
-
interface StyleFunctionProps {
|
|
7
|
-
theme: {
|
|
8
|
-
breakpoints: Breakpoints;
|
|
9
|
-
spacing: Spacing;
|
|
10
|
-
};
|
|
11
|
-
ownerState: StackOwnerState;
|
|
12
|
-
}
|
|
13
|
-
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
|
|
14
|
-
declare function useThemePropsDefault<T extends {}>(props: T): T & {};
|
|
15
|
-
export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
|
|
16
|
-
export default function createStack(options?: {
|
|
17
|
-
createStyledComponent?: typeof defaultCreateStyledComponent;
|
|
18
|
-
useThemeProps?: typeof useThemePropsDefault;
|
|
19
|
-
componentName?: string;
|
|
20
|
-
}): OverridableComponent<StackTypeMap<{}, "div">>;
|
|
21
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverridableComponent } from '@mui/types';
|
|
3
|
+
import { StackTypeMap, StackOwnerState } from './StackProps';
|
|
4
|
+
import { Breakpoints } from '../createTheme/createBreakpoints';
|
|
5
|
+
import { Spacing } from '../createTheme/createSpacing';
|
|
6
|
+
interface StyleFunctionProps {
|
|
7
|
+
theme: {
|
|
8
|
+
breakpoints: Breakpoints;
|
|
9
|
+
spacing: Spacing;
|
|
10
|
+
};
|
|
11
|
+
ownerState: StackOwnerState;
|
|
12
|
+
}
|
|
13
|
+
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
|
|
14
|
+
declare function useThemePropsDefault<T extends {}>(props: T): T & {};
|
|
15
|
+
export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
|
|
16
|
+
export default function createStack(options?: {
|
|
17
|
+
createStyledComponent?: typeof defaultCreateStyledComponent;
|
|
18
|
+
useThemeProps?: typeof useThemePropsDefault;
|
|
19
|
+
componentName?: string;
|
|
20
|
+
}): OverridableComponent<StackTypeMap<{}, "div">>;
|
|
21
|
+
export {};
|
package/Stack/createStack.js
CHANGED
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = createStack;
|
|
8
8
|
exports.style = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
9
|
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -19,7 +17,6 @@ var _createTheme = _interopRequireDefault(require("../createTheme"));
|
|
|
19
17
|
var _breakpoints = require("../breakpoints");
|
|
20
18
|
var _spacing = require("../spacing");
|
|
21
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
|
|
23
20
|
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); }
|
|
24
21
|
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; }
|
|
25
22
|
const defaultTheme = (0, _createTheme.default)();
|
|
@@ -68,17 +65,18 @@ const style = ({
|
|
|
68
65
|
ownerState,
|
|
69
66
|
theme
|
|
70
67
|
}) => {
|
|
71
|
-
let styles =
|
|
68
|
+
let styles = {
|
|
72
69
|
display: 'flex',
|
|
73
|
-
flexDirection: 'column'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
flexDirection: 'column',
|
|
71
|
+
...(0, _breakpoints.handleBreakpoints)({
|
|
72
|
+
theme
|
|
73
|
+
}, (0, _breakpoints.resolveBreakpointValues)({
|
|
74
|
+
values: ownerState.direction,
|
|
75
|
+
breakpoints: theme.breakpoints.values
|
|
76
|
+
}), propValue => ({
|
|
77
|
+
flexDirection: propValue
|
|
78
|
+
}))
|
|
79
|
+
};
|
|
82
80
|
if (ownerState.spacing) {
|
|
83
81
|
const transformer = (0, _spacing.createUnarySpacing)(theme);
|
|
84
82
|
const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
|
|
@@ -143,29 +141,29 @@ function createStack(options = {}) {
|
|
|
143
141
|
const themeProps = useThemeProps(inProps);
|
|
144
142
|
const props = (0, _styleFunctionSx.extendSxProp)(themeProps); // `color` type conflicts with html color attribute.
|
|
145
143
|
const {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
144
|
+
component = 'div',
|
|
145
|
+
direction = 'column',
|
|
146
|
+
spacing = 0,
|
|
147
|
+
divider,
|
|
148
|
+
children,
|
|
149
|
+
className,
|
|
150
|
+
useFlexGap = false,
|
|
151
|
+
...other
|
|
152
|
+
} = props;
|
|
155
153
|
const ownerState = {
|
|
156
154
|
direction,
|
|
157
155
|
spacing,
|
|
158
156
|
useFlexGap
|
|
159
157
|
};
|
|
160
158
|
const classes = useUtilityClasses();
|
|
161
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackRoot,
|
|
159
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackRoot, {
|
|
162
160
|
as: component,
|
|
163
161
|
ownerState: ownerState,
|
|
164
162
|
ref: ref,
|
|
165
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
166
|
-
|
|
163
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
164
|
+
...other,
|
|
167
165
|
children: divider ? joinChildren(children, divider) : children
|
|
168
|
-
})
|
|
166
|
+
});
|
|
169
167
|
});
|
|
170
168
|
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
171
169
|
children: _propTypes.default.node,
|
package/Stack/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from './Stack';
|
|
2
|
-
export { default as createStack } from './createStack';
|
|
3
|
-
export * from './StackProps';
|
|
4
|
-
export { default as stackClasses } from './stackClasses';
|
|
5
|
-
export * from './stackClasses';
|
|
1
|
+
export { default } from './Stack';
|
|
2
|
+
export { default as createStack } from './createStack';
|
|
3
|
+
export * from './StackProps';
|
|
4
|
+
export { default as stackClasses } from './stackClasses';
|
|
5
|
+
export * from './stackClasses';
|
package/Stack/stackClasses.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface StackClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
|
-
export type StackClassKey = keyof StackClasses;
|
|
6
|
-
export declare function getStackUtilityClass(slot: string): string;
|
|
7
|
-
declare const stackClasses: StackClasses;
|
|
8
|
-
export default stackClasses;
|
|
1
|
+
export interface StackClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
}
|
|
5
|
+
export type StackClassKey = keyof StackClasses;
|
|
6
|
+
export declare function getStackUtilityClass(slot: string): string;
|
|
7
|
+
declare const stackClasses: StackClasses;
|
|
8
|
+
export default stackClasses;
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
10
|
var _privateTheming = require("@mui/private-theming");
|
|
@@ -21,9 +20,10 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
21
20
|
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
22
21
|
if (typeof localTheme === 'function') {
|
|
23
22
|
const mergedTheme = localTheme(resolvedTheme);
|
|
24
|
-
const result = themeId ?
|
|
23
|
+
const result = themeId ? {
|
|
24
|
+
...upperTheme,
|
|
25
25
|
[themeId]: mergedTheme
|
|
26
|
-
}
|
|
26
|
+
} : mergedTheme;
|
|
27
27
|
// must return a function for the private theme to NOT merge with the upper theme.
|
|
28
28
|
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
|
29
29
|
if (isPrivate) {
|
|
@@ -31,9 +31,13 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
31
31
|
}
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
|
-
return themeId ?
|
|
34
|
+
return themeId ? {
|
|
35
|
+
...upperTheme,
|
|
35
36
|
[themeId]: localTheme
|
|
36
|
-
}
|
|
37
|
+
} : {
|
|
38
|
+
...upperTheme,
|
|
39
|
+
...localTheme
|
|
40
|
+
};
|
|
37
41
|
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
38
42
|
}
|
|
39
43
|
|
package/Unstable_Grid/Grid.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Demos:
|
|
4
|
-
*
|
|
5
|
-
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
|
6
|
-
*
|
|
7
|
-
* API:
|
|
8
|
-
*
|
|
9
|
-
* - [Grid API](https://mui.com/system/api/grid/)
|
|
10
|
-
*/
|
|
11
|
-
declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
|
|
12
|
-
export default Grid;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
|
6
|
+
*
|
|
7
|
+
* API:
|
|
8
|
+
*
|
|
9
|
+
* - [Grid API](https://mui.com/system/api/grid/)
|
|
10
|
+
*/
|
|
11
|
+
declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
|
|
12
|
+
export default Grid;
|