@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/utils/createSvgIcon.d.ts
CHANGED
|
@@ -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;
|
package/utils/createSvgIcon.js
CHANGED
|
@@ -15,7 +15,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
15
|
*/function createSvgIcon(path, displayName) {
|
|
16
16
|
function Component(props, ref) {
|
|
17
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
|
|
18
|
-
"data-testid": `${displayName}Icon
|
|
18
|
+
"data-testid": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,
|
|
19
19
|
ref: ref,
|
|
20
20
|
...props,
|
|
21
21
|
children: path
|
package/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "7.0.0-
|
|
7
|
+
const version = exports.version = "7.0.0-beta.1";
|
|
8
8
|
const major = exports.major = Number("7");
|
|
9
9
|
const minor = exports.minor = Number("0");
|
|
10
10
|
const patch = exports.patch = Number("0");
|
|
11
|
-
const prerelease = exports.prerelease = "
|
|
11
|
+
const prerelease = exports.prerelease = "beta.1";
|
|
12
12
|
var _default = exports.default = version;
|
package/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/Grid2/Grid2.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _Grid = require("@mui/system/Grid");
|
|
11
|
-
var _requirePropFactory = _interopRequireDefault(require("../utils/requirePropFactory"));
|
|
12
|
-
var _styles = require("../styles");
|
|
13
|
-
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
14
|
-
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* Demos:
|
|
18
|
-
*
|
|
19
|
-
* - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
|
|
20
|
-
*
|
|
21
|
-
* API:
|
|
22
|
-
*
|
|
23
|
-
* - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
|
|
24
|
-
*/
|
|
25
|
-
const Grid2 = (0, _Grid.createGrid)({
|
|
26
|
-
createStyledComponent: (0, _styles.styled)('div', {
|
|
27
|
-
name: 'MuiGrid2',
|
|
28
|
-
slot: 'Root',
|
|
29
|
-
overridesResolver: (props, styles) => {
|
|
30
|
-
const {
|
|
31
|
-
ownerState
|
|
32
|
-
} = props;
|
|
33
|
-
return [styles.root, ownerState.container && styles.container];
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
36
|
-
componentName: 'MuiGrid2',
|
|
37
|
-
useThemeProps: inProps => (0, _DefaultPropsProvider.useDefaultProps)({
|
|
38
|
-
props: inProps,
|
|
39
|
-
name: 'MuiGrid2'
|
|
40
|
-
}),
|
|
41
|
-
useTheme: _useTheme.default
|
|
42
|
-
});
|
|
43
|
-
process.env.NODE_ENV !== "production" ? Grid2.propTypes /* remove-proptypes */ = {
|
|
44
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
45
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
46
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
47
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
48
|
-
/**
|
|
49
|
-
* The content of the component.
|
|
50
|
-
*/
|
|
51
|
-
children: _propTypes.default.node,
|
|
52
|
-
/**
|
|
53
|
-
* The number of columns.
|
|
54
|
-
* @default 12
|
|
55
|
-
*/
|
|
56
|
-
columns: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
|
57
|
-
/**
|
|
58
|
-
* Defines the horizontal space between the type `item` components.
|
|
59
|
-
* It overrides the value of the `spacing` prop.
|
|
60
|
-
*/
|
|
61
|
-
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]),
|
|
62
|
-
/**
|
|
63
|
-
* If `true`, the component will have the flex *container* behavior.
|
|
64
|
-
* You should be wrapping *items* with a *container*.
|
|
65
|
-
* @default false
|
|
66
|
-
*/
|
|
67
|
-
container: _propTypes.default.bool,
|
|
68
|
-
/**
|
|
69
|
-
* Defines the `flex-direction` style property.
|
|
70
|
-
* It is applied for all screen sizes.
|
|
71
|
-
* @default 'row'
|
|
72
|
-
*/
|
|
73
|
-
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]),
|
|
74
|
-
/**
|
|
75
|
-
* Defines the offset value for the type `item` components.
|
|
76
|
-
*/
|
|
77
|
-
offset: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])), _propTypes.default.object]),
|
|
78
|
-
/**
|
|
79
|
-
* Defines the vertical space between the type `item` components.
|
|
80
|
-
* It overrides the value of the `spacing` prop.
|
|
81
|
-
*/
|
|
82
|
-
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]),
|
|
83
|
-
/**
|
|
84
|
-
* Defines the size of the the type `item` components.
|
|
85
|
-
*/
|
|
86
|
-
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number])), _propTypes.default.object]),
|
|
87
|
-
/**
|
|
88
|
-
* Defines the space between the type `item` components.
|
|
89
|
-
* It can only be used on a type `container` component.
|
|
90
|
-
* @default 0
|
|
91
|
-
*/
|
|
92
|
-
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]),
|
|
93
|
-
/**
|
|
94
|
-
* @ignore
|
|
95
|
-
*/
|
|
96
|
-
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]),
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
* The level of the grid starts from `0` and increases when the grid nests
|
|
100
|
-
* inside another grid. Nesting is defined as a container Grid being a direct
|
|
101
|
-
* child of a container Grid.
|
|
102
|
-
*
|
|
103
|
-
* ```js
|
|
104
|
-
* <Grid container> // level 0
|
|
105
|
-
* <Grid container> // level 1
|
|
106
|
-
* <Grid container> // level 2
|
|
107
|
-
* ```
|
|
108
|
-
*
|
|
109
|
-
* Only consecutive grid is considered nesting. A grid container will start at
|
|
110
|
-
* `0` if there are non-Grid container element above it.
|
|
111
|
-
*
|
|
112
|
-
* ```js
|
|
113
|
-
* <Grid container> // level 0
|
|
114
|
-
* <div>
|
|
115
|
-
* <Grid container> // level 0
|
|
116
|
-
* ```
|
|
117
|
-
*
|
|
118
|
-
* ```js
|
|
119
|
-
* <Grid container> // level 0
|
|
120
|
-
* <Grid>
|
|
121
|
-
* <Grid container> // level 0
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
unstable_level: _propTypes.default.number,
|
|
125
|
-
/**
|
|
126
|
-
* Defines the `flex-wrap` style property.
|
|
127
|
-
* It's applied for all screen sizes.
|
|
128
|
-
* @default 'wrap'
|
|
129
|
-
*/
|
|
130
|
-
wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
|
131
|
-
} : void 0;
|
|
132
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
133
|
-
const Component = Grid2;
|
|
134
|
-
const requireProp = (0, _requirePropFactory.default)('Grid2', Component);
|
|
135
|
-
// eslint-disable-next-line no-useless-concat
|
|
136
|
-
Component['propTypes' + ''] = {
|
|
137
|
-
// eslint-disable-next-line react/forbid-foreign-prop-types
|
|
138
|
-
...Component.propTypes,
|
|
139
|
-
direction: requireProp('container'),
|
|
140
|
-
spacing: requireProp('container'),
|
|
141
|
-
wrap: requireProp('container')
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
var _default = exports.default = Grid2;
|
package/Grid2/grid2Classes.d.ts
DELETED
|
@@ -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/Grid2/index.d.ts
DELETED
package/Grid2/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
var _exportNames = {
|
|
8
|
-
grid2Classes: true
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "default", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _Grid.default;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "grid2Classes", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return _grid2Classes.default;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
var _Grid = _interopRequireWildcard(require("./Grid2"));
|
|
23
|
-
Object.keys(_Grid).forEach(function (key) {
|
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
|
25
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
-
if (key in exports && exports[key] === _Grid[key]) return;
|
|
27
|
-
Object.defineProperty(exports, key, {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return _Grid[key];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
var _grid2Classes = _interopRequireWildcard(require("./grid2Classes"));
|
|
35
|
-
Object.keys(_grid2Classes).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
38
|
-
if (key in exports && exports[key] === _grid2Classes[key]) return;
|
|
39
|
-
Object.defineProperty(exports, key, {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () {
|
|
42
|
-
return _grid2Classes[key];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _system.StyledEngineProvider;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _system = require("@mui/system");
|
package/esm/Grid/GridContext.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - internal component.
|
|
7
|
-
*/
|
|
8
|
-
const GridContext = /*#__PURE__*/React.createContext();
|
|
9
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
-
GridContext.displayName = 'GridContext';
|
|
11
|
-
}
|
|
12
|
-
export default GridContext;
|
package/esm/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/esm/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/esm/Grid2/index.d.ts
DELETED
package/esm/Grid2/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StyledEngineProvider as default } from '@mui/system';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - internal component.
|
|
7
|
-
*/
|
|
8
|
-
const GridContext = /*#__PURE__*/React.createContext();
|
|
9
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
-
GridContext.displayName = 'GridContext';
|
|
11
|
-
}
|
|
12
|
-
export default GridContext;
|