@mui/material 6.0.0-beta.3 → 6.0.0-beta.4
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/Accordion/Accordion.d.ts +11 -0
- package/Accordion/Accordion.js +27 -7
- package/Accordion/accordionClasses.d.ts +2 -0
- package/Accordion/accordionClasses.js +1 -1
- package/CHANGELOG.md +41 -0
- package/Divider/Divider.js +6 -2
- package/Grid/Grid.d.ts +2 -0
- package/Grid/Grid.js +4 -0
- package/Grid2/Grid2.d.ts +110 -0
- package/Grid2/Grid2.js +112 -0
- package/{Unstable_Grid2 → Grid2}/grid2Classes.d.ts +1 -1
- package/{Unstable_Grid2 → Grid2}/index.d.ts +1 -1
- package/{Unstable_Grid2 → Grid2}/index.js +1 -1
- package/{Unstable_Grid2 → Grid2}/package.json +1 -1
- package/ImageListItemBar/ImageListItemBar.js +1 -1
- package/ImageListItemBar/imageListItemBarClasses.d.ts +16 -4
- package/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/PigmentGrid/PigmentGrid.js +1 -1
- package/PigmentGrid/index.d.ts +1 -1
- package/PigmentGrid/index.js +1 -1
- package/index.d.ts +2 -3
- package/index.js +3 -4
- package/modern/Accordion/Accordion.js +27 -7
- package/modern/Accordion/accordionClasses.js +1 -1
- package/modern/Divider/Divider.js +6 -2
- package/modern/Grid/Grid.js +4 -0
- package/modern/Grid2/Grid2.js +112 -0
- package/modern/{Unstable_Grid2 → Grid2}/index.js +1 -1
- package/modern/ImageListItemBar/ImageListItemBar.js +1 -1
- package/modern/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/modern/PigmentGrid/PigmentGrid.js +1 -1
- package/modern/PigmentGrid/index.js +1 -1
- package/modern/index.js +3 -4
- package/modern/styles/createGetSelector.js +4 -1
- package/modern/styles/index.js +1 -0
- package/modern/styles/stringifyTheme.js +1 -2
- package/node/Accordion/Accordion.js +27 -7
- package/node/Accordion/accordionClasses.js +1 -1
- package/node/Divider/Divider.js +6 -2
- package/node/Grid/Grid.js +4 -0
- package/node/Grid2/Grid2.js +118 -0
- package/node/{Unstable_Grid2 → Grid2}/index.js +4 -6
- package/node/ImageListItemBar/ImageListItemBar.js +1 -1
- package/node/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/node/PigmentGrid/PigmentGrid.js +1 -1
- package/node/PigmentGrid/index.js +1 -1
- package/node/index.js +13 -24
- package/node/styles/createGetSelector.js +4 -1
- package/node/styles/index.js +8 -0
- package/node/styles/stringifyTheme.js +1 -2
- package/package.json +6 -6
- package/styles/createGetSelector.d.ts +6 -1
- package/styles/createGetSelector.js +4 -1
- package/styles/index.d.ts +1 -0
- package/styles/index.js +1 -0
- package/styles/overrides.d.ts +1 -1
- package/styles/props.d.ts +1 -1
- package/styles/stringifyTheme.js +1 -2
- package/Unstable_Grid2/Grid2.d.ts +0 -4
- package/Unstable_Grid2/Grid2.js +0 -32
- package/Unstable_Grid2/Grid2Props.d.ts +0 -15
- package/Unstable_Grid2/Grid2Props.js +0 -1
- package/modern/Unstable_Grid2/Grid2.js +0 -32
- package/modern/Unstable_Grid2/Grid2Props.js +0 -1
- package/node/Unstable_Grid2/Grid2.js +0 -38
- package/node/Unstable_Grid2/Grid2Props.js +0 -5
- /package/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
- /package/modern/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
- /package/node/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
package/Accordion/Accordion.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ import { ExtendPaperTypeMap } from '../Paper/Paper';
|
|
|
8
8
|
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
|
9
9
|
|
|
10
10
|
export interface AccordionSlots {
|
|
11
|
+
/**
|
|
12
|
+
* The component that renders the heading.
|
|
13
|
+
* @default 'h3'
|
|
14
|
+
*/
|
|
15
|
+
heading?: React.ElementType;
|
|
11
16
|
/**
|
|
12
17
|
* The component that renders the transition.
|
|
13
18
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
@@ -19,10 +24,16 @@ export interface AccordionSlots {
|
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
export interface AccordionTransitionSlotPropsOverrides {}
|
|
27
|
+
export interface AccordionHeadingSlotPropsOverrides {}
|
|
22
28
|
|
|
23
29
|
export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
24
30
|
AccordionSlots,
|
|
25
31
|
{
|
|
32
|
+
heading: SlotProps<
|
|
33
|
+
React.ElementType<React.HTMLProps<HTMLHeadingElement>>,
|
|
34
|
+
AccordionHeadingSlotPropsOverrides,
|
|
35
|
+
AccordionOwnerState
|
|
36
|
+
>;
|
|
26
37
|
transition: SlotProps<
|
|
27
38
|
React.ElementType<TransitionProps>,
|
|
28
39
|
AccordionTransitionSlotPropsOverrides,
|
package/Accordion/Accordion.js
CHANGED
|
@@ -25,6 +25,7 @@ const useUtilityClasses = ownerState => {
|
|
|
25
25
|
} = ownerState;
|
|
26
26
|
const slots = {
|
|
27
27
|
root: ['root', !square && 'rounded', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],
|
|
28
|
+
heading: ['heading'],
|
|
28
29
|
region: ['region']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getAccordionUtilityClass, classes);
|
|
@@ -117,6 +118,13 @@ const AccordionRoot = styled(Paper, {
|
|
|
117
118
|
}
|
|
118
119
|
}]
|
|
119
120
|
}));
|
|
121
|
+
const AccordionHeading = styled('h3', {
|
|
122
|
+
name: 'MuiAccordion',
|
|
123
|
+
slot: 'Heading',
|
|
124
|
+
overridesResolver: (props, styles) => styles.heading
|
|
125
|
+
})({
|
|
126
|
+
all: 'unset'
|
|
127
|
+
});
|
|
120
128
|
const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {
|
|
121
129
|
const props = useDefaultProps({
|
|
122
130
|
props: inProps,
|
|
@@ -172,12 +180,19 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
172
180
|
transition: TransitionPropsProp,
|
|
173
181
|
...slotProps
|
|
174
182
|
};
|
|
183
|
+
const externalForwardedProps = {
|
|
184
|
+
slots: backwardCompatibleSlots,
|
|
185
|
+
slotProps: backwardCompatibleSlotProps
|
|
186
|
+
};
|
|
187
|
+
const [AccordionHeadingSlot, accordionProps] = useSlot('heading', {
|
|
188
|
+
elementType: AccordionHeading,
|
|
189
|
+
externalForwardedProps,
|
|
190
|
+
className: classes.heading,
|
|
191
|
+
ownerState
|
|
192
|
+
});
|
|
175
193
|
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
|
176
194
|
elementType: Collapse,
|
|
177
|
-
externalForwardedProps
|
|
178
|
-
slots: backwardCompatibleSlots,
|
|
179
|
-
slotProps: backwardCompatibleSlotProps
|
|
180
|
-
},
|
|
195
|
+
externalForwardedProps,
|
|
181
196
|
ownerState
|
|
182
197
|
});
|
|
183
198
|
return /*#__PURE__*/_jsxs(AccordionRoot, {
|
|
@@ -186,9 +201,12 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
186
201
|
ownerState: ownerState,
|
|
187
202
|
square: square,
|
|
188
203
|
...other,
|
|
189
|
-
children: [/*#__PURE__*/_jsx(
|
|
190
|
-
|
|
191
|
-
children:
|
|
204
|
+
children: [/*#__PURE__*/_jsx(AccordionHeadingSlot, {
|
|
205
|
+
...accordionProps,
|
|
206
|
+
children: /*#__PURE__*/_jsx(AccordionContext.Provider, {
|
|
207
|
+
value: contextValue,
|
|
208
|
+
children: summary
|
|
209
|
+
})
|
|
192
210
|
}), /*#__PURE__*/_jsx(TransitionSlot, {
|
|
193
211
|
in: expanded,
|
|
194
212
|
timeout: "auto",
|
|
@@ -261,6 +279,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
261
279
|
* @default {}
|
|
262
280
|
*/
|
|
263
281
|
slotProps: PropTypes.shape({
|
|
282
|
+
heading: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
264
283
|
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
265
284
|
}),
|
|
266
285
|
/**
|
|
@@ -268,6 +287,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
268
287
|
* @default {}
|
|
269
288
|
*/
|
|
270
289
|
slots: PropTypes.shape({
|
|
290
|
+
heading: PropTypes.elementType,
|
|
271
291
|
transition: PropTypes.elementType
|
|
272
292
|
}),
|
|
273
293
|
/**
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface AccordionClasses {
|
|
2
2
|
/** Styles applied to the root element. */
|
|
3
3
|
root: string;
|
|
4
|
+
/** Styles applied to the heading element. */
|
|
5
|
+
heading: string;
|
|
4
6
|
/** Styles applied to the root element unless `square={true}`. */
|
|
5
7
|
rounded: string;
|
|
6
8
|
/** State class applied to the root element if `expanded={true}`. */
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getAccordionUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiAccordion', slot);
|
|
5
5
|
}
|
|
6
|
-
const accordionClasses = generateUtilityClasses('MuiAccordion', ['root', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);
|
|
6
|
+
const accordionClasses = generateUtilityClasses('MuiAccordion', ['root', 'heading', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);
|
|
7
7
|
export default accordionClasses;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 6.0.0-beta.4
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.0.0-beta.3..next -->
|
|
6
|
+
|
|
7
|
+
_Jul 30, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 12 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@6.0.0-beta.4`
|
|
12
|
+
|
|
13
|
+
- [Accordion] Render a heading wrapping `AccordionSummary` button per W3C Accordion Pattern standards (#42914) @ZeeshanTamboli
|
|
14
|
+
- [Divider] Enable borderStyle enhancement in divider with children (#42715) @anuujj
|
|
15
|
+
- [ImageListItemBar] Deprecate composed classes (#42905) @sai6855
|
|
16
|
+
- Attach selector for default color scheme (#43035) @siriwatknp
|
|
17
|
+
- Stabilize Grid v2 and deprecate Grid v1 (#43054) @DiegoAndai
|
|
18
|
+
|
|
19
|
+
### `@mui/system@6.0.0-beta.4`
|
|
20
|
+
|
|
21
|
+
- Make `createBreakpoints` independent for stringify theme (#43048) @siriwatknp
|
|
22
|
+
|
|
23
|
+
### `@mui/utils@6.0.0-beta.4`
|
|
24
|
+
|
|
25
|
+
- Fix issues reported by the React Compiler (#43051) @markliu2013
|
|
26
|
+
|
|
27
|
+
### Docs
|
|
28
|
+
|
|
29
|
+
- [material-ui] Replace deprecated `<ListItem button/>` with `ListItemButton` component in routing libraries list example (#43110) @aliharis99
|
|
30
|
+
- [material-ui][Card] Update CardMedia description (#43067) @shahzaibdev1
|
|
31
|
+
- [material-ui] Polish out data table demo (#43072) @zanivan
|
|
32
|
+
- [material-ui][Snackbar] Improve reason type in demos (#43077) @sai6855
|
|
33
|
+
- [pigment-css] Fix syntax in migrating-to-pigment-css guide (#43107) @KevinVandy
|
|
34
|
+
- Fix page description line break @oliviertassinari
|
|
35
|
+
|
|
36
|
+
### Core
|
|
37
|
+
|
|
38
|
+
- Fix event naming convention @oliviertassinari
|
|
39
|
+
- [docs-infra] Move ads to the `@mui/docs` package (#42944) @alexfauquette
|
|
40
|
+
- [website] Fine-tune button styles on the branding theme (#43082) @zanivan
|
|
41
|
+
|
|
42
|
+
All contributors of this release in alphabetical order: @alexfauquette, @aliharis99, @anuujj, @DiegoAndai, @KevinVandy, @markliu2013, @oliviertassinari, @sai6855, @shahzaibdev1, @siriwatknp, @zanivan, @ZeeshanTamboli
|
|
43
|
+
|
|
3
44
|
## 6.0.0-beta.3
|
|
4
45
|
|
|
5
46
|
<!-- generated comparing v6.0.0-beta.2..next -->
|
package/Divider/Divider.js
CHANGED
|
@@ -113,6 +113,8 @@ const DividerRoot = styled('div', {
|
|
|
113
113
|
whiteSpace: 'nowrap',
|
|
114
114
|
textAlign: 'center',
|
|
115
115
|
border: 0,
|
|
116
|
+
borderTopStyle: 'solid',
|
|
117
|
+
borderLeftStyle: 'solid',
|
|
116
118
|
'&::before, &::after': {
|
|
117
119
|
content: '""',
|
|
118
120
|
alignSelf: 'center'
|
|
@@ -125,7 +127,8 @@ const DividerRoot = styled('div', {
|
|
|
125
127
|
style: {
|
|
126
128
|
'&::before, &::after': {
|
|
127
129
|
width: '100%',
|
|
128
|
-
borderTop: `thin solid ${(theme.vars || theme).palette.divider}
|
|
130
|
+
borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,
|
|
131
|
+
borderTopStyle: 'inherit'
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}, {
|
|
@@ -136,7 +139,8 @@ const DividerRoot = styled('div', {
|
|
|
136
139
|
flexDirection: 'column',
|
|
137
140
|
'&::before, &::after': {
|
|
138
141
|
height: '100%',
|
|
139
|
-
borderLeft: `thin solid ${(theme.vars || theme).palette.divider}
|
|
142
|
+
borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,
|
|
143
|
+
borderLeftStyle: 'inherit'
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
146
|
}, {
|
package/Grid/Grid.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ export interface GridTypeMap<
|
|
|
167
167
|
* API:
|
|
168
168
|
*
|
|
169
169
|
* - [Grid API](https://next.mui.com/material-ui/api/grid/)
|
|
170
|
+
*
|
|
171
|
+
* @deprecated Use the [`Grid2`](https://next.mui.com/material-ui/react-grid2/) component instead.
|
|
170
172
|
*/
|
|
171
173
|
declare const Grid: OverridableComponent<GridTypeMap>;
|
|
172
174
|
|
package/Grid/Grid.js
CHANGED
|
@@ -360,6 +360,10 @@ const useUtilityClasses = ownerState => {
|
|
|
360
360
|
};
|
|
361
361
|
return composeClasses(slots, getGridUtilityClass, classes);
|
|
362
362
|
};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @deprecated Use the [`Grid2`](https://next.mui.com/material-ui/react-grid2/) component instead.
|
|
366
|
+
*/
|
|
363
367
|
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
364
368
|
const themeProps = useThemeProps({
|
|
365
369
|
props: inProps,
|
package/Grid2/Grid2.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SxProps, SystemProps } from '@mui/system';
|
|
3
|
+
import { OverridableComponent, OverrideProps } from '@mui/types';
|
|
4
|
+
import { Theme, Breakpoint } from '../styles';
|
|
5
|
+
export type Grid2Slot = 'root';
|
|
6
|
+
type ResponsiveStyleValue<T> = T | Array<T | null> | {
|
|
7
|
+
[key in Breakpoint]?: T | null;
|
|
8
|
+
};
|
|
9
|
+
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
10
|
+
export type GridSpacing = number | string;
|
|
11
|
+
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
12
|
+
export type GridSize = 'auto' | 'grow' | number | false;
|
|
13
|
+
export type GridOffset = 'auto' | number;
|
|
14
|
+
export interface GridBaseProps {
|
|
15
|
+
/**
|
|
16
|
+
* The content of the component.
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The number of columns.
|
|
21
|
+
* @default 12
|
|
22
|
+
*/
|
|
23
|
+
columns?: ResponsiveStyleValue<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the horizontal space between the type `item` components.
|
|
26
|
+
* It overrides the value of the `spacing` prop.
|
|
27
|
+
*/
|
|
28
|
+
columnSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
29
|
+
/**
|
|
30
|
+
* If `true`, the component will have the flex *container* behavior.
|
|
31
|
+
* You should be wrapping *items* with a *container*.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
container?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Defines the `flex-direction` style property.
|
|
37
|
+
* It is applied for all screen sizes.
|
|
38
|
+
* @default 'row'
|
|
39
|
+
*/
|
|
40
|
+
direction?: ResponsiveStyleValue<GridDirection>;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the offset value for the type `item` components.
|
|
43
|
+
*/
|
|
44
|
+
offset?: ResponsiveStyleValue<GridOffset>;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* The level of the grid starts from `0`
|
|
48
|
+
* and increases when the grid nests inside another grid regardless of container or item.
|
|
49
|
+
*
|
|
50
|
+
* ```js
|
|
51
|
+
* <Grid> // level 0
|
|
52
|
+
* <Grid> // level 1
|
|
53
|
+
* <Grid> // level 2
|
|
54
|
+
* <Grid> // level 1
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* Only consecutive grid is considered nesting.
|
|
58
|
+
* A grid container will start at `0` if there are non-Grid element above it.
|
|
59
|
+
*
|
|
60
|
+
* ```js
|
|
61
|
+
* <Grid> // level 0
|
|
62
|
+
* <div>
|
|
63
|
+
* <Grid> // level 0
|
|
64
|
+
* <Grid> // level 1
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
unstable_level?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Defines the vertical space between the type `item` components.
|
|
70
|
+
* It overrides the value of the `spacing` prop.
|
|
71
|
+
*/
|
|
72
|
+
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
73
|
+
/**
|
|
74
|
+
* Defines the size of the the type `item` components.
|
|
75
|
+
*/
|
|
76
|
+
size?: ResponsiveStyleValue<GridSize>;
|
|
77
|
+
/**
|
|
78
|
+
* Defines the space between the type `item` components.
|
|
79
|
+
* It can only be used on a type `container` component.
|
|
80
|
+
* @default 0
|
|
81
|
+
*/
|
|
82
|
+
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Defines the `flex-wrap` style property.
|
|
85
|
+
* It's applied for all screen sizes.
|
|
86
|
+
* @default 'wrap'
|
|
87
|
+
*/
|
|
88
|
+
wrap?: GridWrap;
|
|
89
|
+
}
|
|
90
|
+
export interface Grid2TypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
91
|
+
props: P & GridBaseProps & {
|
|
92
|
+
sx?: SxProps<Theme>;
|
|
93
|
+
} & SystemProps<Theme>;
|
|
94
|
+
defaultComponent: D;
|
|
95
|
+
}
|
|
96
|
+
export type Grid2Props<D extends React.ElementType = Grid2TypeMap['defaultComponent'], P = {
|
|
97
|
+
component?: React.ElementType;
|
|
98
|
+
}> = OverrideProps<Grid2TypeMap<P, D>, D>;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* Demos:
|
|
102
|
+
*
|
|
103
|
+
* - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
|
|
104
|
+
*
|
|
105
|
+
* API:
|
|
106
|
+
*
|
|
107
|
+
* - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
|
|
108
|
+
*/
|
|
109
|
+
declare const Grid2: OverridableComponent<Grid2TypeMap<{}, "div">>;
|
|
110
|
+
export default Grid2;
|
package/Grid2/Grid2.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { createGrid as createGrid2 } from '@mui/system/Grid';
|
|
5
|
+
import { styled, useThemeProps } from '../styles';
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* Demos:
|
|
9
|
+
*
|
|
10
|
+
* - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
|
|
11
|
+
*
|
|
12
|
+
* API:
|
|
13
|
+
*
|
|
14
|
+
* - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
|
|
15
|
+
*/
|
|
16
|
+
const Grid2 = createGrid2({
|
|
17
|
+
createStyledComponent: styled('div', {
|
|
18
|
+
name: 'MuiGrid2',
|
|
19
|
+
slot: 'Root',
|
|
20
|
+
overridesResolver: (props, styles) => styles.root
|
|
21
|
+
}),
|
|
22
|
+
componentName: 'MuiGrid2',
|
|
23
|
+
useThemeProps: inProps => useThemeProps({
|
|
24
|
+
props: inProps,
|
|
25
|
+
name: 'MuiGrid2'
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
process.env.NODE_ENV !== "production" ? Grid2.propTypes /* remove-proptypes */ = {
|
|
29
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
30
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
31
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
32
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
33
|
+
/**
|
|
34
|
+
* The content of the component.
|
|
35
|
+
*/
|
|
36
|
+
children: PropTypes.node,
|
|
37
|
+
/**
|
|
38
|
+
* The number of columns.
|
|
39
|
+
* @default 12
|
|
40
|
+
*/
|
|
41
|
+
columns: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),
|
|
42
|
+
/**
|
|
43
|
+
* Defines the horizontal space between the type `item` components.
|
|
44
|
+
* It overrides the value of the `spacing` prop.
|
|
45
|
+
*/
|
|
46
|
+
columnSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
47
|
+
/**
|
|
48
|
+
* If `true`, the component will have the flex *container* behavior.
|
|
49
|
+
* You should be wrapping *items* with a *container*.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
container: PropTypes.bool,
|
|
53
|
+
/**
|
|
54
|
+
* Defines the `flex-direction` style property.
|
|
55
|
+
* It is applied for all screen sizes.
|
|
56
|
+
* @default 'row'
|
|
57
|
+
*/
|
|
58
|
+
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]),
|
|
59
|
+
/**
|
|
60
|
+
* Defines the offset value for the type `item` components.
|
|
61
|
+
*/
|
|
62
|
+
offset: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),
|
|
63
|
+
/**
|
|
64
|
+
* Defines the vertical space between the type `item` components.
|
|
65
|
+
* It overrides the value of the `spacing` prop.
|
|
66
|
+
*/
|
|
67
|
+
rowSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
68
|
+
/**
|
|
69
|
+
* Defines the size of the the type `item` components.
|
|
70
|
+
*/
|
|
71
|
+
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]),
|
|
72
|
+
/**
|
|
73
|
+
* Defines the space between the type `item` components.
|
|
74
|
+
* It can only be used on a type `container` component.
|
|
75
|
+
* @default 0
|
|
76
|
+
*/
|
|
77
|
+
spacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
78
|
+
/**
|
|
79
|
+
* @ignore
|
|
80
|
+
*/
|
|
81
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* The level of the grid starts from `0`
|
|
85
|
+
* and increases when the grid nests inside another grid regardless of container or item.
|
|
86
|
+
*
|
|
87
|
+
* ```js
|
|
88
|
+
* <Grid> // level 0
|
|
89
|
+
* <Grid> // level 1
|
|
90
|
+
* <Grid> // level 2
|
|
91
|
+
* <Grid> // level 1
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* Only consecutive grid is considered nesting.
|
|
95
|
+
* A grid container will start at `0` if there are non-Grid element above it.
|
|
96
|
+
*
|
|
97
|
+
* ```js
|
|
98
|
+
* <Grid> // level 0
|
|
99
|
+
* <div>
|
|
100
|
+
* <Grid> // level 0
|
|
101
|
+
* <Grid> // level 1
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
unstable_level: PropTypes.number,
|
|
105
|
+
/**
|
|
106
|
+
* Defines the `flex-wrap` style property.
|
|
107
|
+
* It's applied for all screen sizes.
|
|
108
|
+
* @default 'wrap'
|
|
109
|
+
*/
|
|
110
|
+
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
|
111
|
+
} : void 0;
|
|
112
|
+
export default Grid2;
|
|
@@ -17,7 +17,7 @@ const useUtilityClasses = ownerState => {
|
|
|
17
17
|
actionPosition
|
|
18
18
|
} = ownerState;
|
|
19
19
|
const slots = {
|
|
20
|
-
root: ['root', `position${capitalize(position)}`],
|
|
20
|
+
root: ['root', `position${capitalize(position)}`, `actionPosition${capitalize(actionPosition)}`],
|
|
21
21
|
titleWrap: ['titleWrap', `titleWrap${capitalize(position)}`, actionIcon && `titleWrapActionPos${capitalize(actionPosition)}`],
|
|
22
22
|
title: ['title'],
|
|
23
23
|
subtitle: ['subtitle'],
|
|
@@ -7,13 +7,23 @@ export interface ImageListItemBarClasses {
|
|
|
7
7
|
positionTop: string;
|
|
8
8
|
/** Styles applied to the root element if `position="below"`. */
|
|
9
9
|
positionBelow: string;
|
|
10
|
+
/** Styles applied to the action container element if `actionPosition="left"`. */
|
|
11
|
+
actionPositionLeft: string;
|
|
12
|
+
/** Styles applied to the action container element if `actionPosition="right"`. */
|
|
13
|
+
actionPositionRight: string;
|
|
10
14
|
/** Styles applied to the title and subtitle container element. */
|
|
11
15
|
titleWrap: string;
|
|
12
|
-
/** Styles applied to the title and subtitle container element if `position="below"`.
|
|
16
|
+
/** Styles applied to the title and subtitle container element if `position="below"`.
|
|
17
|
+
* @deprecated Combine the [.MuiImageListItemBar-titleWrap](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-titleWrap) and [.MuiImageListItemBar-positionBelow](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-positionBelow) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
18
|
+
*/
|
|
13
19
|
titleWrapBelow: string;
|
|
14
|
-
/** Styles applied to the container element if `actionPosition="left"`.
|
|
20
|
+
/** Styles applied to the container element if `actionPosition="left"`.
|
|
21
|
+
* @deprecated Combine the [.MuiImageListItemBar-titleWrap](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-titleWrap) and [.MuiImageListItemBar-actionPositionLeft](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-actionPositionLeft) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
22
|
+
*/
|
|
15
23
|
titleWrapActionPosLeft: string;
|
|
16
|
-
/** Styles applied to the container element if `actionPosition="right"`.
|
|
24
|
+
/** Styles applied to the container element if `actionPosition="right"`.
|
|
25
|
+
* @deprecated Combine the [.MuiImageListItemBar-titleWrap](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-titleWrap) and [.MuiImageListItemBar-actionPositionRight](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-actionPositionRight) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
26
|
+
*/
|
|
17
27
|
titleWrapActionPosRight: string;
|
|
18
28
|
/** Styles applied to the title container element. */
|
|
19
29
|
title: string;
|
|
@@ -21,7 +31,9 @@ export interface ImageListItemBarClasses {
|
|
|
21
31
|
subtitle: string;
|
|
22
32
|
/** Styles applied to the actionIcon if supplied. */
|
|
23
33
|
actionIcon: string;
|
|
24
|
-
/** Styles applied to the actionIcon if `actionPosition="left"`.
|
|
34
|
+
/** Styles applied to the actionIcon if `actionPosition="left"`.
|
|
35
|
+
* @deprecated Combine the [.MuiImageListItemBar-actionIcon](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-actionIcon) and [.MuiImageListItemBar-actionPositionLeft](/material-ui/api/image-list-item-bar/#image-list-item-bar-classes-actionPositionLeft) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
36
|
+
*/
|
|
25
37
|
actionIconActionPosLeft: string;
|
|
26
38
|
}
|
|
27
39
|
export type ImageListItemBarClassKey = keyof ImageListItemBarClasses;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getImageListItemBarUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiImageListItemBar', slot);
|
|
5
5
|
}
|
|
6
|
-
const imageListItemBarClasses = generateUtilityClasses('MuiImageListItemBar', ['root', 'positionBottom', 'positionTop', 'positionBelow', 'titleWrap', 'titleWrapBottom', 'titleWrapTop', 'titleWrapBelow', 'titleWrapActionPosLeft', 'titleWrapActionPosRight', 'title', 'subtitle', 'actionIcon', 'actionIconActionPosLeft', 'actionIconActionPosRight']);
|
|
6
|
+
const imageListItemBarClasses = generateUtilityClasses('MuiImageListItemBar', ['root', 'positionBottom', 'positionTop', 'positionBelow', 'actionPositionLeft', 'actionPositionRight', 'titleWrap', 'titleWrapBottom', 'titleWrapTop', 'titleWrapBelow', 'titleWrapActionPosLeft', 'titleWrapActionPosRight', 'title', 'subtitle', 'actionIcon', 'actionIconActionPosLeft', 'actionIconActionPosRight']);
|
|
7
7
|
export default imageListItemBarClasses;
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Grid from '@mui/material-pigment-css/Grid';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
8
|
-
import { generateDirectionClasses, generateSizeClassNames, generateSpacingClassNames } from '@mui/system/
|
|
8
|
+
import { generateDirectionClasses, generateSizeClassNames, generateSpacingClassNames } from '@mui/system/Grid/gridGenerator';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
const useUtilityClasses = ownerState => {
|
|
11
11
|
const {
|
package/PigmentGrid/index.d.ts
CHANGED
package/PigmentGrid/index.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -222,10 +222,9 @@ export { default as FormLabel } from './FormLabel';
|
|
|
222
222
|
export * from './FormLabel';
|
|
223
223
|
|
|
224
224
|
export { default as Grid } from './Grid';
|
|
225
|
-
export * from './Grid';
|
|
226
225
|
|
|
227
|
-
export { default as
|
|
228
|
-
export * from './
|
|
226
|
+
export { default as Grid2 } from './Grid2';
|
|
227
|
+
export * from './Grid2';
|
|
229
228
|
|
|
230
229
|
export { default as Grow } from './Grow';
|
|
231
230
|
export * from './Grow';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v6.0.0-beta.
|
|
2
|
+
* @mui/material v6.0.0-beta.4
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -109,9 +109,8 @@ export * from './FormHelperText';
|
|
|
109
109
|
export { default as FormLabel } from './FormLabel';
|
|
110
110
|
export * from './FormLabel';
|
|
111
111
|
export { default as Grid } from './Grid';
|
|
112
|
-
export
|
|
113
|
-
export
|
|
114
|
-
export * from './Unstable_Grid2';
|
|
112
|
+
export { default as Grid2 } from './Grid2';
|
|
113
|
+
export * from './Grid2';
|
|
115
114
|
export { default as Grow } from './Grow';
|
|
116
115
|
export * from './Grow';
|
|
117
116
|
export { default as Hidden } from './Hidden';
|