@mui/material 7.0.0-alpha.2 → 7.0.0-beta.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 +57 -0
- package/Dialog/Dialog.d.ts +0 -5
- package/Dialog/Dialog.js +0 -9
- package/Grid/Grid.d.ts +51 -100
- package/Grid/Grid.js +68 -515
- package/Grid/gridClasses.d.ts +0 -38
- package/Grid/gridClasses.js +1 -1
- package/Grid/index.js +12 -2
- package/GridLegacy/GridLegacy.d.ts +160 -0
- package/GridLegacy/GridLegacy.js +601 -0
- package/{Grid/GridContext.js → GridLegacy/GridLegacyContext.js} +3 -3
- package/GridLegacy/gridLegacyClasses.d.ts +48 -0
- package/{Grid2/grid2Classes.js → GridLegacy/gridLegacyClasses.js} +5 -5
- package/GridLegacy/index.d.ts +4 -0
- package/GridLegacy/index.js +35 -0
- package/Menu/Menu.d.ts +68 -1
- package/Menu/Menu.js +52 -17
- package/Modal/Modal.d.ts +0 -5
- package/Modal/Modal.js +0 -9
- package/PigmentGrid/PigmentGrid.d.ts +1 -1
- package/PigmentGrid/PigmentGrid.js +2 -2
- package/PigmentGrid/index.d.ts +1 -1
- package/PigmentGrid/index.js +4 -4
- package/Rating/Rating.d.ts +52 -1
- package/Rating/Rating.js +132 -46
- package/Select/SelectInput.js +8 -8
- package/StepButton/StepButton.d.ts +0 -5
- package/esm/Dialog/Dialog.d.ts +0 -5
- package/esm/Dialog/Dialog.js +0 -9
- package/esm/Grid/Grid.d.ts +51 -100
- package/esm/Grid/Grid.js +68 -508
- package/esm/Grid/gridClasses.d.ts +0 -38
- package/esm/Grid/gridClasses.js +1 -1
- package/esm/Grid/index.js +1 -0
- package/esm/GridLegacy/GridLegacy.d.ts +160 -0
- package/esm/GridLegacy/GridLegacy.js +588 -0
- package/esm/GridLegacy/GridLegacyContext.js +12 -0
- package/esm/GridLegacy/gridLegacyClasses.d.ts +48 -0
- package/esm/{Grid2/grid2Classes.js → GridLegacy/gridLegacyClasses.js} +4 -4
- package/esm/GridLegacy/index.d.ts +4 -0
- package/esm/GridLegacy/index.js +3 -0
- package/esm/Menu/Menu.d.ts +68 -1
- package/esm/Menu/Menu.js +52 -17
- package/esm/Modal/Modal.d.ts +0 -5
- package/esm/Modal/Modal.js +0 -9
- package/esm/PigmentGrid/PigmentGrid.d.ts +1 -1
- package/esm/PigmentGrid/PigmentGrid.js +2 -2
- package/esm/PigmentGrid/index.d.ts +1 -1
- package/esm/PigmentGrid/index.js +1 -1
- package/esm/Rating/Rating.d.ts +52 -1
- package/esm/Rating/Rating.js +131 -45
- package/esm/Select/SelectInput.js +8 -8
- package/esm/StepButton/StepButton.d.ts +0 -5
- package/esm/index.d.ts +3 -8
- package/esm/index.js +3 -3
- package/esm/styles/components.d.ts +5 -5
- package/esm/styles/createTheme.d.ts +0 -1
- package/esm/styles/createTheme.js +0 -1
- package/esm/styles/createThemeNoVars.d.ts +0 -6
- package/esm/styles/createThemeNoVars.js +7 -12
- package/esm/styles/index.d.ts +1 -5
- package/esm/styles/index.js +1 -2
- package/esm/styles/overrides.d.ts +2 -2
- package/esm/styles/props.d.ts +2 -2
- package/esm/utils/createSvgIcon.d.ts +1 -1
- package/esm/utils/createSvgIcon.js +1 -1
- package/esm/version/index.js +2 -2
- package/index.d.ts +3 -8
- package/index.js +9 -9
- package/modern/Dialog/Dialog.d.ts +0 -5
- package/modern/Dialog/Dialog.js +0 -9
- package/modern/Grid/Grid.d.ts +51 -100
- package/modern/Grid/Grid.js +68 -508
- package/modern/Grid/gridClasses.d.ts +0 -38
- package/modern/Grid/gridClasses.js +1 -1
- package/modern/Grid/index.js +1 -0
- package/modern/GridLegacy/GridLegacy.d.ts +160 -0
- package/modern/GridLegacy/GridLegacy.js +588 -0
- package/modern/GridLegacy/GridLegacyContext.js +12 -0
- package/modern/GridLegacy/gridLegacyClasses.d.ts +48 -0
- package/modern/{Grid2/grid2Classes.js → GridLegacy/gridLegacyClasses.js} +4 -4
- package/modern/GridLegacy/index.d.ts +4 -0
- package/modern/GridLegacy/index.js +3 -0
- package/modern/Menu/Menu.d.ts +68 -1
- package/modern/Menu/Menu.js +52 -17
- package/modern/Modal/Modal.d.ts +0 -5
- package/modern/Modal/Modal.js +0 -9
- package/modern/PigmentGrid/PigmentGrid.d.ts +1 -1
- package/modern/PigmentGrid/PigmentGrid.js +2 -2
- package/modern/PigmentGrid/index.d.ts +1 -1
- package/modern/PigmentGrid/index.js +1 -1
- package/modern/Rating/Rating.d.ts +52 -1
- package/modern/Rating/Rating.js +131 -45
- package/modern/Select/SelectInput.js +8 -8
- package/modern/StepButton/StepButton.d.ts +0 -5
- package/modern/index.d.ts +3 -8
- package/modern/index.js +3 -3
- package/modern/styles/components.d.ts +5 -5
- package/modern/styles/createTheme.d.ts +0 -1
- package/modern/styles/createTheme.js +0 -1
- package/modern/styles/createThemeNoVars.d.ts +0 -6
- package/modern/styles/createThemeNoVars.js +7 -12
- package/modern/styles/index.d.ts +1 -5
- package/modern/styles/index.js +1 -2
- package/modern/styles/overrides.d.ts +2 -2
- package/modern/styles/props.d.ts +2 -2
- package/modern/utils/createSvgIcon.d.ts +1 -1
- package/modern/utils/createSvgIcon.js +1 -1
- package/modern/version/index.js +2 -2
- package/package.json +4 -4
- package/styles/components.d.ts +5 -5
- package/styles/createTheme.d.ts +0 -1
- package/styles/createTheme.js +1 -8
- package/styles/createThemeNoVars.d.ts +0 -6
- package/styles/createThemeNoVars.js +7 -13
- package/styles/index.d.ts +1 -5
- package/styles/index.js +1 -15
- package/styles/overrides.d.ts +2 -2
- package/styles/props.d.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/createSvgIcon.d.ts +1 -1
- package/utils/createSvgIcon.js +1 -1
- package/version/index.js +2 -2
- package/Grid2/Grid2.d.ts +0 -111
- package/Grid2/Grid2.js +0 -144
- package/Grid2/grid2Classes.d.ts +0 -10
- package/Grid2/index.d.ts +0 -4
- package/Grid2/index.js +0 -45
- package/StyledEngineProvider/index.d.ts +0 -4
- package/StyledEngineProvider/index.js +0 -12
- package/esm/Grid/GridContext.js +0 -12
- package/esm/Grid2/Grid2.d.ts +0 -111
- package/esm/Grid2/Grid2.js +0 -138
- package/esm/Grid2/grid2Classes.d.ts +0 -10
- package/esm/Grid2/index.d.ts +0 -4
- package/esm/Grid2/index.js +0 -4
- package/esm/StyledEngineProvider/index.d.ts +0 -4
- package/esm/StyledEngineProvider/index.js +0 -1
- package/modern/Grid/GridContext.js +0 -12
- package/modern/Grid2/Grid2.d.ts +0 -111
- package/modern/Grid2/Grid2.js +0 -138
- package/modern/Grid2/grid2Classes.d.ts +0 -10
- package/modern/Grid2/index.d.ts +0 -4
- package/modern/Grid2/index.js +0 -4
- package/modern/StyledEngineProvider/index.d.ts +0 -4
- package/modern/StyledEngineProvider/index.js +0 -1
|
@@ -500,16 +500,16 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
500
500
|
horizontal: 'center'
|
|
501
501
|
},
|
|
502
502
|
...MenuProps,
|
|
503
|
-
MenuListProps: {
|
|
504
|
-
'aria-labelledby': labelId,
|
|
505
|
-
role: 'listbox',
|
|
506
|
-
'aria-multiselectable': multiple ? 'true' : undefined,
|
|
507
|
-
disableListWrap: true,
|
|
508
|
-
id: listboxId,
|
|
509
|
-
...MenuProps.MenuListProps
|
|
510
|
-
},
|
|
511
503
|
slotProps: {
|
|
512
504
|
...MenuProps.slotProps,
|
|
505
|
+
list: {
|
|
506
|
+
'aria-labelledby': labelId,
|
|
507
|
+
role: 'listbox',
|
|
508
|
+
'aria-multiselectable': multiple ? 'true' : undefined,
|
|
509
|
+
disableListWrap: true,
|
|
510
|
+
id: listboxId,
|
|
511
|
+
...MenuProps.MenuListProps
|
|
512
|
+
},
|
|
513
513
|
paper: {
|
|
514
514
|
...paperProps,
|
|
515
515
|
style: {
|
|
@@ -4,11 +4,6 @@ import { ButtonBaseTypeMap, ExtendButtonBase, ExtendButtonBaseTypeMap } from "..
|
|
|
4
4
|
import { OverrideProps } from "../OverridableComponent/index.js";
|
|
5
5
|
import { Theme } from "../styles/index.js";
|
|
6
6
|
import { StepButtonClasses } from "./stepButtonClasses.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated use `StepButtonProps['icon']` instead.
|
|
10
|
-
*/
|
|
11
|
-
export type StepButtonIcon = React.ReactNode;
|
|
12
7
|
export interface StepButtonOwnProps {
|
|
13
8
|
/**
|
|
14
9
|
* Can be a `StepLabel` or a node to place inside `StepLabel` as children.
|
package/esm/index.d.ts
CHANGED
|
@@ -147,10 +147,10 @@ export { default as FormHelperText } from "./FormHelperText/index.js";
|
|
|
147
147
|
export * from "./FormHelperText/index.js";
|
|
148
148
|
export { default as FormLabel } from "./FormLabel/index.js";
|
|
149
149
|
export * from "./FormLabel/index.js";
|
|
150
|
+
export { default as GridLegacy } from "./GridLegacy/index.js";
|
|
151
|
+
export { GridLegacyProps, GridLegacyTypeMap } from "./GridLegacy/index.js";
|
|
150
152
|
export { default as Grid } from "./Grid/index.js";
|
|
151
|
-
export
|
|
152
|
-
export { default as Grid2 } from "./Grid2/index.js";
|
|
153
|
-
export * from "./Grid2/index.js";
|
|
153
|
+
export * from "./Grid/index.js";
|
|
154
154
|
export { default as Grow } from "./Grow/index.js";
|
|
155
155
|
export * from "./Grow/index.js";
|
|
156
156
|
export { default as Icon } from "./Icon/index.js";
|
|
@@ -316,11 +316,6 @@ export * from "./useAutocomplete/index.js";
|
|
|
316
316
|
export { default as GlobalStyles } from "./GlobalStyles/index.js";
|
|
317
317
|
export * from "./GlobalStyles/index.js";
|
|
318
318
|
export * from "./version/index.js";
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* @deprecated will be removed in v5.beta, please use StyledEngineProvider from @mui/material/styles instead
|
|
322
|
-
*/
|
|
323
|
-
export { StyledEngineProvider } from "./styles/index.js";
|
|
324
319
|
export { unstable_composeClasses } from '@mui/utils';
|
|
325
320
|
export { default as generateUtilityClass } from "./generateUtilityClass/index.js";
|
|
326
321
|
export * from "./generateUtilityClass/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v7.0.0-
|
|
2
|
+
* @mui/material v7.0.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -108,9 +108,9 @@ export { default as FormHelperText } from "./FormHelperText/index.js";
|
|
|
108
108
|
export * from "./FormHelperText/index.js";
|
|
109
109
|
export { default as FormLabel } from "./FormLabel/index.js";
|
|
110
110
|
export * from "./FormLabel/index.js";
|
|
111
|
+
export { default as GridLegacy } from "./GridLegacy/index.js";
|
|
111
112
|
export { default as Grid } from "./Grid/index.js";
|
|
112
|
-
export
|
|
113
|
-
export * from "./Grid2/index.js";
|
|
113
|
+
export * from "./Grid/index.js";
|
|
114
114
|
export { default as Grow } from "./Grow/index.js";
|
|
115
115
|
export * from "./Grow/index.js";
|
|
116
116
|
export { default as Icon } from "./Icon/index.js";
|
|
@@ -222,16 +222,16 @@ export interface Components<Theme = unknown> {
|
|
|
222
222
|
styleOverrides?: ComponentsOverrides<Theme>['MuiFormLabel'];
|
|
223
223
|
variants?: ComponentsVariants<Theme>['MuiFormLabel'];
|
|
224
224
|
};
|
|
225
|
+
MuiGridLegacy?: {
|
|
226
|
+
defaultProps?: ComponentsProps['MuiGridLegacy'];
|
|
227
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiGridLegacy'];
|
|
228
|
+
variants?: ComponentsVariants<Theme>['MuiGridLegacy'];
|
|
229
|
+
};
|
|
225
230
|
MuiGrid?: {
|
|
226
231
|
defaultProps?: ComponentsProps['MuiGrid'];
|
|
227
232
|
styleOverrides?: ComponentsOverrides<Theme>['MuiGrid'];
|
|
228
233
|
variants?: ComponentsVariants<Theme>['MuiGrid'];
|
|
229
234
|
};
|
|
230
|
-
MuiGrid2?: {
|
|
231
|
-
defaultProps?: ComponentsProps['MuiGrid2'];
|
|
232
|
-
styleOverrides?: ComponentsOverrides<Theme>['MuiGrid2'];
|
|
233
|
-
variants?: ComponentsVariants<Theme>['MuiGrid2'];
|
|
234
|
-
};
|
|
235
235
|
MuiImageList?: {
|
|
236
236
|
defaultProps?: ComponentsProps['MuiImageList'];
|
|
237
237
|
styleOverrides?: ComponentsOverrides<Theme>['MuiImageList'];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CssVarsThemeOptions } from "./createThemeWithVars.js";
|
|
2
2
|
import { Theme, ThemeOptions } from "./createThemeNoVars.js";
|
|
3
|
-
export { createMuiTheme } from "./createThemeNoVars.js";
|
|
4
3
|
export type { ThemeOptions, Theme, CssThemeVariables } from "./createThemeNoVars.js";
|
|
5
4
|
/**
|
|
6
5
|
* Generate a theme base on the options received.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import createPalette from "./createPalette.js";
|
|
2
2
|
import createThemeWithVars from "./createThemeWithVars.js";
|
|
3
3
|
import createThemeNoVars from "./createThemeNoVars.js";
|
|
4
|
-
export { createMuiTheme } from "./createThemeNoVars.js";
|
|
5
4
|
// eslint-disable-next-line consistent-return
|
|
6
5
|
function attachColorScheme(theme, scheme, colorScheme) {
|
|
7
6
|
if (!theme.colorSchemes) {
|
|
@@ -61,12 +61,6 @@ export interface Theme extends BaseTheme, CssVarsProperties {
|
|
|
61
61
|
unstable_sxConfig: SxConfig;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated
|
|
66
|
-
* Use `import { createTheme } from '@mui/material/styles'` instead.
|
|
67
|
-
*/
|
|
68
|
-
export function createMuiTheme(options?: ThemeOptions, ...args: object[]): Theme;
|
|
69
|
-
|
|
70
64
|
/**
|
|
71
65
|
* Generate a theme base on the options received.
|
|
72
66
|
* @param options Takes an incomplete theme object and adds the missing parts.
|
|
@@ -21,8 +21,13 @@ function createThemeNoVars(options = {}, ...args) {
|
|
|
21
21
|
shape: shapeInput,
|
|
22
22
|
...other
|
|
23
23
|
} = options;
|
|
24
|
-
if (options.vars
|
|
25
|
-
|
|
24
|
+
if (options.vars &&
|
|
25
|
+
// The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
26
|
+
// `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
27
|
+
options.generateThemeVars === undefined) {
|
|
28
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
|
|
29
|
+
// #host-reference
|
|
30
|
+
'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
|
|
26
31
|
}
|
|
27
32
|
const palette = createPalette(paletteInput);
|
|
28
33
|
const systemTheme = systemCreateTheme(options);
|
|
@@ -83,14 +88,4 @@ function createThemeNoVars(options = {}, ...args) {
|
|
|
83
88
|
|
|
84
89
|
return muiTheme;
|
|
85
90
|
}
|
|
86
|
-
let warnedOnce = false;
|
|
87
|
-
export function createMuiTheme(...args) {
|
|
88
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
89
|
-
if (!warnedOnce) {
|
|
90
|
-
warnedOnce = true;
|
|
91
|
-
console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@mui/material/styles'`"].join('\n'));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return createThemeNoVars(...args);
|
|
95
|
-
}
|
|
96
91
|
export default createThemeNoVars;
|
package/esm/styles/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as THEME_ID } from "./identifier.js";
|
|
2
|
-
export { default as createTheme, default as unstable_createMuiStrictModeTheme,
|
|
2
|
+
export { default as createTheme, default as unstable_createMuiStrictModeTheme, ThemeOptions, Theme, CssThemeVariables } from "./createTheme.js";
|
|
3
3
|
export { default as adaptV4Theme, DeprecatedThemeOptions } from "./adaptV4Theme.js";
|
|
4
4
|
export { Shadows } from "./shadows.js";
|
|
5
5
|
export { ZIndex } from "./zIndex.js";
|
|
@@ -21,10 +21,6 @@ export { default as useTheme } from "./useTheme.js";
|
|
|
21
21
|
export { default as useThemeProps } from "./useThemeProps.js";
|
|
22
22
|
export * from "./useThemeProps.js";
|
|
23
23
|
export { default as styled } from "./styled.js";
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated will be removed in v5.beta, please use styled from @mui/material/styles instead
|
|
26
|
-
*/
|
|
27
|
-
export { default as experimentalStyled } from "./styled.js";
|
|
28
24
|
export { default as ThemeProvider } from "./ThemeProvider.js";
|
|
29
25
|
export { ComponentsProps, ComponentsPropsList } from "./props.js";
|
|
30
26
|
export { ComponentsVariants } from "./variants.js";
|
package/esm/styles/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { unstable_createBreakpoints } from '@mui/system/createBreakpoints';
|
|
|
8
8
|
export function experimental_sx() {
|
|
9
9
|
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.' + 'For more details, see https://github.com/mui/material-ui/pull/35150.' : _formatMuiErrorMessage(19));
|
|
10
10
|
}
|
|
11
|
-
export { default as createTheme
|
|
11
|
+
export { default as createTheme } from "./createTheme.js";
|
|
12
12
|
export { default as unstable_createMuiStrictModeTheme } from "./createMuiStrictModeTheme.js";
|
|
13
13
|
export { default as createStyles } from "./createStyles.js";
|
|
14
14
|
export { getUnit as unstable_getUnit, toUnitless as unstable_toUnitless } from "./cssUtils.js";
|
|
@@ -18,7 +18,6 @@ export { default as createColorScheme } from "./createColorScheme.js";
|
|
|
18
18
|
export { default as useTheme } from "./useTheme.js";
|
|
19
19
|
export { default as useThemeProps } from "./useThemeProps.js";
|
|
20
20
|
export { default as styled } from "./styled.js";
|
|
21
|
-
export { default as experimentalStyled } from "./styled.js";
|
|
22
21
|
export { default as ThemeProvider } from "./ThemeProvider.js";
|
|
23
22
|
export { StyledEngineProvider } from '@mui/system';
|
|
24
23
|
// The legacy utilities from @mui/styles
|
|
@@ -44,8 +44,8 @@ import { FormControlLabelClassKey } from "../FormControlLabel/index.js";
|
|
|
44
44
|
import { FormGroupClassKey } from "../FormGroup/index.js";
|
|
45
45
|
import { FormHelperTextClassKey } from "../FormHelperText/index.js";
|
|
46
46
|
import { FormLabelClassKey } from "../FormLabel/index.js";
|
|
47
|
+
import { GridLegacyClassKey } from "../GridLegacy/index.js";
|
|
47
48
|
import { GridClassKey } from "../Grid/index.js";
|
|
48
|
-
import { Grid2ClassKey } from "../Grid2/index.js";
|
|
49
49
|
import { IconButtonClassKey } from "../IconButton/index.js";
|
|
50
50
|
import { IconClassKey } from "../Icon/index.js";
|
|
51
51
|
import { ImageListClassKey } from "../ImageList/index.js";
|
|
@@ -168,8 +168,8 @@ export interface ComponentNameToClassKey {
|
|
|
168
168
|
MuiFormGroup: FormGroupClassKey;
|
|
169
169
|
MuiFormHelperText: FormHelperTextClassKey;
|
|
170
170
|
MuiFormLabel: FormLabelClassKey;
|
|
171
|
+
MuiGridLegacy: GridLegacyClassKey;
|
|
171
172
|
MuiGrid: GridClassKey;
|
|
172
|
-
MuiGrid2: Grid2ClassKey;
|
|
173
173
|
MuiIcon: IconClassKey;
|
|
174
174
|
MuiIconButton: IconButtonClassKey;
|
|
175
175
|
MuiImageList: ImageListClassKey;
|
package/esm/styles/props.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ import { FormControlProps } from "../FormControl/index.js";
|
|
|
42
42
|
import { FormGroupProps } from "../FormGroup/index.js";
|
|
43
43
|
import { FormHelperTextProps } from "../FormHelperText/index.js";
|
|
44
44
|
import { FormLabelProps } from "../FormLabel/index.js";
|
|
45
|
+
import { GridLegacyProps } from "../GridLegacy/index.js";
|
|
45
46
|
import { GridProps } from "../Grid/index.js";
|
|
46
|
-
import { Grid2Props } from "../Grid2/index.js";
|
|
47
47
|
import { IconButtonProps } from "../IconButton/index.js";
|
|
48
48
|
import { IconProps } from "../Icon/index.js";
|
|
49
49
|
import { ImageListProps } from "../ImageList/index.js";
|
|
@@ -163,8 +163,8 @@ export interface ComponentsPropsList {
|
|
|
163
163
|
MuiFormGroup: FormGroupProps;
|
|
164
164
|
MuiFormHelperText: FormHelperTextProps;
|
|
165
165
|
MuiFormLabel: FormLabelProps;
|
|
166
|
+
MuiGridLegacy: GridLegacyProps;
|
|
166
167
|
MuiGrid: GridProps;
|
|
167
|
-
MuiGrid2: Grid2Props;
|
|
168
168
|
MuiImageList: ImageListProps;
|
|
169
169
|
MuiImageListItem: ImageListItemProps;
|
|
170
170
|
MuiImageListItemBar: ImageListItemBarProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import SvgIcon from
|
|
1
|
+
import SvgIcon from "../SvgIcon/index.js";
|
|
2
2
|
export default function createSvgIcon(path: React.ReactNode, displayName: string): typeof SvgIcon;
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
export default function createSvgIcon(path, displayName) {
|
|
11
11
|
function Component(props, ref) {
|
|
12
12
|
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
|
-
"data-testid": `${displayName}Icon
|
|
13
|
+
"data-testid": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,
|
|
14
14
|
ref: ref,
|
|
15
15
|
...props,
|
|
16
16
|
children: path
|
package/esm/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "7.0.0-
|
|
1
|
+
export const version = "7.0.0-beta.1";
|
|
2
2
|
export const major = Number("7");
|
|
3
3
|
export const minor = Number("0");
|
|
4
4
|
export const patch = Number("0");
|
|
5
|
-
export const prerelease = "
|
|
5
|
+
export const prerelease = "beta.1";
|
|
6
6
|
export default version;
|
package/index.d.ts
CHANGED
|
@@ -147,10 +147,10 @@ export { default as FormHelperText } from "./FormHelperText/index.js";
|
|
|
147
147
|
export * from "./FormHelperText/index.js";
|
|
148
148
|
export { default as FormLabel } from "./FormLabel/index.js";
|
|
149
149
|
export * from "./FormLabel/index.js";
|
|
150
|
+
export { default as GridLegacy } from "./GridLegacy/index.js";
|
|
151
|
+
export { GridLegacyProps, GridLegacyTypeMap } from "./GridLegacy/index.js";
|
|
150
152
|
export { default as Grid } from "./Grid/index.js";
|
|
151
|
-
export
|
|
152
|
-
export { default as Grid2 } from "./Grid2/index.js";
|
|
153
|
-
export * from "./Grid2/index.js";
|
|
153
|
+
export * from "./Grid/index.js";
|
|
154
154
|
export { default as Grow } from "./Grow/index.js";
|
|
155
155
|
export * from "./Grow/index.js";
|
|
156
156
|
export { default as Icon } from "./Icon/index.js";
|
|
@@ -316,11 +316,6 @@ export * from "./useAutocomplete/index.js";
|
|
|
316
316
|
export { default as GlobalStyles } from "./GlobalStyles/index.js";
|
|
317
317
|
export * from "./GlobalStyles/index.js";
|
|
318
318
|
export * from "./version/index.js";
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* @deprecated will be removed in v5.beta, please use StyledEngineProvider from @mui/material/styles instead
|
|
322
|
-
*/
|
|
323
|
-
export { StyledEngineProvider } from "./styles/index.js";
|
|
324
319
|
export { unstable_composeClasses } from '@mui/utils';
|
|
325
320
|
export { default as generateUtilityClass } from "./generateUtilityClass/index.js";
|
|
326
321
|
export * from "./generateUtilityClass/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v7.0.0-
|
|
2
|
+
* @mui/material v7.0.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -62,8 +62,8 @@ var _exportNames = {
|
|
|
62
62
|
FormGroup: true,
|
|
63
63
|
FormHelperText: true,
|
|
64
64
|
FormLabel: true,
|
|
65
|
+
GridLegacy: true,
|
|
65
66
|
Grid: true,
|
|
66
|
-
Grid2: true,
|
|
67
67
|
Grow: true,
|
|
68
68
|
Icon: true,
|
|
69
69
|
IconButton: true,
|
|
@@ -446,10 +446,10 @@ Object.defineProperty(exports, "Grid", {
|
|
|
446
446
|
return _Grid.default;
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
|
-
Object.defineProperty(exports, "
|
|
449
|
+
Object.defineProperty(exports, "GridLegacy", {
|
|
450
450
|
enumerable: true,
|
|
451
451
|
get: function () {
|
|
452
|
-
return
|
|
452
|
+
return _GridLegacy.default;
|
|
453
453
|
}
|
|
454
454
|
});
|
|
455
455
|
Object.defineProperty(exports, "Grow", {
|
|
@@ -1577,16 +1577,16 @@ Object.keys(_FormLabel).forEach(function (key) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
1579
|
});
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1582
|
-
Object.keys(
|
|
1580
|
+
var _GridLegacy = _interopRequireDefault(require("./GridLegacy"));
|
|
1581
|
+
var _Grid = _interopRequireWildcard(require("./Grid"));
|
|
1582
|
+
Object.keys(_Grid).forEach(function (key) {
|
|
1583
1583
|
if (key === "default" || key === "__esModule") return;
|
|
1584
1584
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1585
|
-
if (key in exports && exports[key] ===
|
|
1585
|
+
if (key in exports && exports[key] === _Grid[key]) return;
|
|
1586
1586
|
Object.defineProperty(exports, key, {
|
|
1587
1587
|
enumerable: true,
|
|
1588
1588
|
get: function () {
|
|
1589
|
-
return
|
|
1589
|
+
return _Grid[key];
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
1592
|
});
|
|
@@ -111,11 +111,6 @@ export interface DialogProps extends Omit<StandardProps<ModalProps, 'children'>,
|
|
|
111
111
|
* @default 'sm'
|
|
112
112
|
*/
|
|
113
113
|
maxWidth?: Breakpoint | false;
|
|
114
|
-
/**
|
|
115
|
-
* Callback fired when the backdrop is clicked.
|
|
116
|
-
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
117
|
-
*/
|
|
118
|
-
onBackdropClick?: ModalProps['onBackdropClick'];
|
|
119
114
|
/**
|
|
120
115
|
* Callback fired when the component requests to be closed.
|
|
121
116
|
*
|
package/modern/Dialog/Dialog.js
CHANGED
|
@@ -212,7 +212,6 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
212
212
|
fullScreen = false,
|
|
213
213
|
fullWidth = false,
|
|
214
214
|
maxWidth = 'sm',
|
|
215
|
-
onBackdropClick,
|
|
216
215
|
onClick,
|
|
217
216
|
onClose,
|
|
218
217
|
open,
|
|
@@ -251,9 +250,6 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
251
250
|
return;
|
|
252
251
|
}
|
|
253
252
|
backdropClick.current = null;
|
|
254
|
-
if (onBackdropClick) {
|
|
255
|
-
onBackdropClick(event);
|
|
256
|
-
}
|
|
257
253
|
if (onClose) {
|
|
258
254
|
onClose(event, 'backdropClick');
|
|
259
255
|
}
|
|
@@ -430,11 +426,6 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
430
426
|
* @default 'sm'
|
|
431
427
|
*/
|
|
432
428
|
maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),
|
|
433
|
-
/**
|
|
434
|
-
* Callback fired when the backdrop is clicked.
|
|
435
|
-
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
436
|
-
*/
|
|
437
|
-
onBackdropClick: PropTypes.func,
|
|
438
429
|
/**
|
|
439
430
|
* @ignore
|
|
440
431
|
*/
|
package/modern/Grid/Grid.d.ts
CHANGED
|
@@ -1,77 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
|
|
6
|
-
import { GridClasses } from "./gridClasses.js";
|
|
1
|
+
import { SxProps, SystemProps } from '@mui/system';
|
|
2
|
+
import { OverridableComponent, OverrideProps } from '@mui/types';
|
|
3
|
+
import { Theme, Breakpoint } from "../styles/index.js";
|
|
4
|
+
type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
|
|
7
5
|
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
8
6
|
export type GridSpacing = number | string;
|
|
9
7
|
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
10
|
-
export type GridSize = 'auto' | number;
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
* If a number, it sets the number of columns the grid item uses.
|
|
14
|
-
* It can't be greater than the total number of columns of the container (12 by default).
|
|
15
|
-
* If 'auto', the grid item's width matches its content.
|
|
16
|
-
* If false, the prop is ignored.
|
|
17
|
-
* If true, the grid item's width grows to use the space available in the grid container.
|
|
18
|
-
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
lg?: boolean | GridSize;
|
|
22
|
-
/**
|
|
23
|
-
* If a number, it sets the number of columns the grid item uses.
|
|
24
|
-
* It can't be greater than the total number of columns of the container (12 by default).
|
|
25
|
-
* If 'auto', the grid item's width matches its content.
|
|
26
|
-
* If false, the prop is ignored.
|
|
27
|
-
* If true, the grid item's width grows to use the space available in the grid container.
|
|
28
|
-
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
md?: boolean | GridSize;
|
|
32
|
-
/**
|
|
33
|
-
* If a number, it sets the number of columns the grid item uses.
|
|
34
|
-
* It can't be greater than the total number of columns of the container (12 by default).
|
|
35
|
-
* If 'auto', the grid item's width matches its content.
|
|
36
|
-
* If false, the prop is ignored.
|
|
37
|
-
* If true, the grid item's width grows to use the space available in the grid container.
|
|
38
|
-
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
sm?: boolean | GridSize;
|
|
42
|
-
/**
|
|
43
|
-
* If a number, it sets the number of columns the grid item uses.
|
|
44
|
-
* It can't be greater than the total number of columns of the container (12 by default).
|
|
45
|
-
* If 'auto', the grid item's width matches its content.
|
|
46
|
-
* If false, the prop is ignored.
|
|
47
|
-
* If true, the grid item's width grows to use the space available in the grid container.
|
|
48
|
-
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
xl?: boolean | GridSize;
|
|
52
|
-
/**
|
|
53
|
-
* If a number, it sets the number of columns the grid item uses.
|
|
54
|
-
* It can't be greater than the total number of columns of the container (12 by default).
|
|
55
|
-
* If 'auto', the grid item's width matches its content.
|
|
56
|
-
* If false, the prop is ignored.
|
|
57
|
-
* If true, the grid item's width grows to use the space available in the grid container.
|
|
58
|
-
* The value is applied for all the screen sizes with the lowest priority.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
xs?: boolean | GridSize;
|
|
62
|
-
}
|
|
63
|
-
type CustomBreakpoints = Partial<Record<Breakpoint, boolean | GridSize>>;
|
|
64
|
-
interface BreakpointOverridesEmpty {}
|
|
65
|
-
type Breakpoints = IfEquals<BreakpointOverrides, BreakpointOverridesEmpty, RegularBreakpoints, CustomBreakpoints>;
|
|
66
|
-
export interface GridOwnProps extends SystemProps<Theme>, Breakpoints {
|
|
8
|
+
export type GridSize = 'auto' | 'grow' | number | false;
|
|
9
|
+
export type GridOffset = 'auto' | number;
|
|
10
|
+
export interface GridBaseProps {
|
|
67
11
|
/**
|
|
68
12
|
* The content of the component.
|
|
69
13
|
*/
|
|
70
14
|
children?: React.ReactNode;
|
|
71
|
-
/**
|
|
72
|
-
* Override or extend the styles applied to the component.
|
|
73
|
-
*/
|
|
74
|
-
classes?: Partial<GridClasses>;
|
|
75
15
|
/**
|
|
76
16
|
* The number of columns.
|
|
77
17
|
* @default 12
|
|
@@ -95,48 +35,68 @@ export interface GridOwnProps extends SystemProps<Theme>, Breakpoints {
|
|
|
95
35
|
*/
|
|
96
36
|
direction?: ResponsiveStyleValue<GridDirection>;
|
|
97
37
|
/**
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
38
|
+
* Defines the offset value for the type `item` components.
|
|
39
|
+
*/
|
|
40
|
+
offset?: ResponsiveStyleValue<GridOffset>;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* The level of the grid starts from `0` and increases when the grid nests
|
|
44
|
+
* inside another grid. Nesting is defined as a container Grid being a direct
|
|
45
|
+
* child of a container Grid.
|
|
46
|
+
*
|
|
47
|
+
* ```js
|
|
48
|
+
* <Grid container> // level 0
|
|
49
|
+
* <Grid container> // level 1
|
|
50
|
+
* <Grid container> // level 2
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* Only consecutive grid is considered nesting. A grid container will start at
|
|
54
|
+
* `0` if there are non-Grid container element above it.
|
|
55
|
+
*
|
|
56
|
+
* ```js
|
|
57
|
+
* <Grid container> // level 0
|
|
58
|
+
* <div>
|
|
59
|
+
* <Grid container> // level 0
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* ```js
|
|
63
|
+
* <Grid container> // level 0
|
|
64
|
+
* <Grid>
|
|
65
|
+
* <Grid container> // level 0
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
unstable_level?: number;
|
|
103
69
|
/**
|
|
104
70
|
* Defines the vertical space between the type `item` components.
|
|
105
71
|
* It overrides the value of the `spacing` prop.
|
|
106
72
|
*/
|
|
107
73
|
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
74
|
+
/**
|
|
75
|
+
* Defines the size of the the type `item` components.
|
|
76
|
+
*/
|
|
77
|
+
size?: ResponsiveStyleValue<GridSize>;
|
|
108
78
|
/**
|
|
109
79
|
* Defines the space between the type `item` components.
|
|
110
80
|
* It can only be used on a type `container` component.
|
|
111
81
|
* @default 0
|
|
112
82
|
*/
|
|
113
|
-
spacing?: ResponsiveStyleValue<GridSpacing
|
|
114
|
-
/**
|
|
115
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
116
|
-
*/
|
|
117
|
-
sx?: SxProps<Theme>;
|
|
83
|
+
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
|
|
118
84
|
/**
|
|
119
85
|
* Defines the `flex-wrap` style property.
|
|
120
86
|
* It's applied for all screen sizes.
|
|
121
87
|
* @default 'wrap'
|
|
122
88
|
*/
|
|
123
89
|
wrap?: GridWrap;
|
|
124
|
-
/**
|
|
125
|
-
* If `true`, it sets `min-width: 0` on the item.
|
|
126
|
-
* Refer to the limitations section of the documentation to better understand the use case.
|
|
127
|
-
* @default false
|
|
128
|
-
*/
|
|
129
|
-
zeroMinWidth?: boolean;
|
|
130
90
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
props: AdditionalProps & GridOwnProps;
|
|
137
|
-
defaultComponent: RootComponent;
|
|
91
|
+
export interface GridTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
92
|
+
props: P & GridBaseProps & {
|
|
93
|
+
sx?: SxProps<Theme>;
|
|
94
|
+
} & SystemProps<Theme>;
|
|
95
|
+
defaultComponent: D;
|
|
138
96
|
}
|
|
139
|
-
|
|
97
|
+
export type GridProps<D extends React.ElementType = GridTypeMap['defaultComponent'], P = {
|
|
98
|
+
component?: React.ElementType;
|
|
99
|
+
}> = OverrideProps<GridTypeMap<P, D>, D>;
|
|
140
100
|
/**
|
|
141
101
|
*
|
|
142
102
|
* Demos:
|
|
@@ -146,15 +106,6 @@ export interface GridTypeMap<AdditionalProps = {}, RootComponent extends React.E
|
|
|
146
106
|
* API:
|
|
147
107
|
*
|
|
148
108
|
* - [Grid API](https://next.mui.com/material-ui/api/grid/)
|
|
149
|
-
*
|
|
150
|
-
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
151
109
|
*/
|
|
152
110
|
declare const Grid: OverridableComponent<GridTypeMap>;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
156
|
-
*/
|
|
157
|
-
export type GridProps<RootComponent extends React.ElementType = GridTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<GridTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
|
158
|
-
component?: React.ElementType;
|
|
159
|
-
};
|
|
160
111
|
export default Grid;
|