@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
package/modern/Grid2/Grid2.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
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 };
|
|
5
|
-
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
6
|
-
export type GridSpacing = number | string;
|
|
7
|
-
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
8
|
-
export type GridSize = 'auto' | 'grow' | number | false;
|
|
9
|
-
export type GridOffset = 'auto' | number;
|
|
10
|
-
export interface GridBaseProps {
|
|
11
|
-
/**
|
|
12
|
-
* The content of the component.
|
|
13
|
-
*/
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* The number of columns.
|
|
17
|
-
* @default 12
|
|
18
|
-
*/
|
|
19
|
-
columns?: ResponsiveStyleValue<number>;
|
|
20
|
-
/**
|
|
21
|
-
* Defines the horizontal space between the type `item` components.
|
|
22
|
-
* It overrides the value of the `spacing` prop.
|
|
23
|
-
*/
|
|
24
|
-
columnSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
25
|
-
/**
|
|
26
|
-
* If `true`, the component will have the flex *container* behavior.
|
|
27
|
-
* You should be wrapping *items* with a *container*.
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
container?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Defines the `flex-direction` style property.
|
|
33
|
-
* It is applied for all screen sizes.
|
|
34
|
-
* @default 'row'
|
|
35
|
-
*/
|
|
36
|
-
direction?: ResponsiveStyleValue<GridDirection>;
|
|
37
|
-
/**
|
|
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;
|
|
69
|
-
/**
|
|
70
|
-
* Defines the vertical space between the type `item` components.
|
|
71
|
-
* It overrides the value of the `spacing` prop.
|
|
72
|
-
*/
|
|
73
|
-
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
74
|
-
/**
|
|
75
|
-
* Defines the size of the the type `item` components.
|
|
76
|
-
*/
|
|
77
|
-
size?: ResponsiveStyleValue<GridSize>;
|
|
78
|
-
/**
|
|
79
|
-
* Defines the space between the type `item` components.
|
|
80
|
-
* It can only be used on a type `container` component.
|
|
81
|
-
* @default 0
|
|
82
|
-
*/
|
|
83
|
-
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Defines the `flex-wrap` style property.
|
|
86
|
-
* It's applied for all screen sizes.
|
|
87
|
-
* @default 'wrap'
|
|
88
|
-
*/
|
|
89
|
-
wrap?: GridWrap;
|
|
90
|
-
}
|
|
91
|
-
export interface Grid2TypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
92
|
-
props: P & GridBaseProps & {
|
|
93
|
-
sx?: SxProps<Theme>;
|
|
94
|
-
} & SystemProps<Theme>;
|
|
95
|
-
defaultComponent: D;
|
|
96
|
-
}
|
|
97
|
-
export type Grid2Props<D extends React.ElementType = Grid2TypeMap['defaultComponent'], P = {
|
|
98
|
-
component?: React.ElementType;
|
|
99
|
-
}> = OverrideProps<Grid2TypeMap<P, D>, D>;
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* Demos:
|
|
103
|
-
*
|
|
104
|
-
* - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
|
|
105
|
-
*
|
|
106
|
-
* API:
|
|
107
|
-
*
|
|
108
|
-
* - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
|
|
109
|
-
*/
|
|
110
|
-
declare const Grid2: OverridableComponent<Grid2TypeMap>;
|
|
111
|
-
export default Grid2;
|
package/modern/Grid2/Grid2.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { createGrid as createGrid2 } from '@mui/system/Grid';
|
|
5
|
-
import requirePropFactory from "../utils/requirePropFactory.js";
|
|
6
|
-
import { styled } from "../styles/index.js";
|
|
7
|
-
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
8
|
-
import useTheme from "../styles/useTheme.js";
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* Demos:
|
|
12
|
-
*
|
|
13
|
-
* - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
|
|
14
|
-
*
|
|
15
|
-
* API:
|
|
16
|
-
*
|
|
17
|
-
* - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
|
|
18
|
-
*/
|
|
19
|
-
const Grid2 = createGrid2({
|
|
20
|
-
createStyledComponent: styled('div', {
|
|
21
|
-
name: 'MuiGrid2',
|
|
22
|
-
slot: 'Root',
|
|
23
|
-
overridesResolver: (props, styles) => {
|
|
24
|
-
const {
|
|
25
|
-
ownerState
|
|
26
|
-
} = props;
|
|
27
|
-
return [styles.root, ownerState.container && styles.container];
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
componentName: 'MuiGrid2',
|
|
31
|
-
useThemeProps: inProps => useDefaultProps({
|
|
32
|
-
props: inProps,
|
|
33
|
-
name: 'MuiGrid2'
|
|
34
|
-
}),
|
|
35
|
-
useTheme
|
|
36
|
-
});
|
|
37
|
-
process.env.NODE_ENV !== "production" ? Grid2.propTypes /* remove-proptypes */ = {
|
|
38
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
39
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
40
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
41
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
42
|
-
/**
|
|
43
|
-
* The content of the component.
|
|
44
|
-
*/
|
|
45
|
-
children: PropTypes.node,
|
|
46
|
-
/**
|
|
47
|
-
* The number of columns.
|
|
48
|
-
* @default 12
|
|
49
|
-
*/
|
|
50
|
-
columns: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),
|
|
51
|
-
/**
|
|
52
|
-
* Defines the horizontal space between the type `item` components.
|
|
53
|
-
* It overrides the value of the `spacing` prop.
|
|
54
|
-
*/
|
|
55
|
-
columnSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
56
|
-
/**
|
|
57
|
-
* If `true`, the component will have the flex *container* behavior.
|
|
58
|
-
* You should be wrapping *items* with a *container*.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
container: PropTypes.bool,
|
|
62
|
-
/**
|
|
63
|
-
* Defines the `flex-direction` style property.
|
|
64
|
-
* It is applied for all screen sizes.
|
|
65
|
-
* @default 'row'
|
|
66
|
-
*/
|
|
67
|
-
direction: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
68
|
-
/**
|
|
69
|
-
* Defines the offset value for the type `item` components.
|
|
70
|
-
*/
|
|
71
|
-
offset: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),
|
|
72
|
-
/**
|
|
73
|
-
* Defines the vertical space between the type `item` components.
|
|
74
|
-
* It overrides the value of the `spacing` prop.
|
|
75
|
-
*/
|
|
76
|
-
rowSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
77
|
-
/**
|
|
78
|
-
* Defines the size of the the type `item` components.
|
|
79
|
-
*/
|
|
80
|
-
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number])), PropTypes.object]),
|
|
81
|
-
/**
|
|
82
|
-
* Defines the space between the type `item` components.
|
|
83
|
-
* It can only be used on a type `container` component.
|
|
84
|
-
* @default 0
|
|
85
|
-
*/
|
|
86
|
-
spacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
87
|
-
/**
|
|
88
|
-
* @ignore
|
|
89
|
-
*/
|
|
90
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
91
|
-
/**
|
|
92
|
-
* @internal
|
|
93
|
-
* The level of the grid starts from `0` and increases when the grid nests
|
|
94
|
-
* inside another grid. Nesting is defined as a container Grid being a direct
|
|
95
|
-
* child of a container Grid.
|
|
96
|
-
*
|
|
97
|
-
* ```js
|
|
98
|
-
* <Grid container> // level 0
|
|
99
|
-
* <Grid container> // level 1
|
|
100
|
-
* <Grid container> // level 2
|
|
101
|
-
* ```
|
|
102
|
-
*
|
|
103
|
-
* Only consecutive grid is considered nesting. A grid container will start at
|
|
104
|
-
* `0` if there are non-Grid container element above it.
|
|
105
|
-
*
|
|
106
|
-
* ```js
|
|
107
|
-
* <Grid container> // level 0
|
|
108
|
-
* <div>
|
|
109
|
-
* <Grid container> // level 0
|
|
110
|
-
* ```
|
|
111
|
-
*
|
|
112
|
-
* ```js
|
|
113
|
-
* <Grid container> // level 0
|
|
114
|
-
* <Grid>
|
|
115
|
-
* <Grid container> // level 0
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
unstable_level: PropTypes.number,
|
|
119
|
-
/**
|
|
120
|
-
* Defines the `flex-wrap` style property.
|
|
121
|
-
* It's applied for all screen sizes.
|
|
122
|
-
* @default 'wrap'
|
|
123
|
-
*/
|
|
124
|
-
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
|
125
|
-
} : void 0;
|
|
126
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
127
|
-
const Component = Grid2;
|
|
128
|
-
const requireProp = requirePropFactory('Grid2', Component);
|
|
129
|
-
// eslint-disable-next-line no-useless-concat
|
|
130
|
-
Component['propTypes' + ''] = {
|
|
131
|
-
// eslint-disable-next-line react/forbid-foreign-prop-types
|
|
132
|
-
...Component.propTypes,
|
|
133
|
-
direction: requireProp('container'),
|
|
134
|
-
spacing: requireProp('container'),
|
|
135
|
-
wrap: requireProp('container')
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
export default Grid2;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface Grid2Classes {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** Styles applied to the root element if `container={true}`. */
|
|
5
|
-
container: string;
|
|
6
|
-
}
|
|
7
|
-
export type Grid2ClassKey = keyof Grid2Classes;
|
|
8
|
-
export declare function getGrid2UtilityClass(slot: string): string;
|
|
9
|
-
declare const grid2Classes: Grid2Classes;
|
|
10
|
-
export default grid2Classes;
|
package/modern/Grid2/index.d.ts
DELETED
package/modern/Grid2/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StyledEngineProvider as default } from '@mui/system';
|