@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.
Files changed (69) hide show
  1. package/Accordion/Accordion.d.ts +11 -0
  2. package/Accordion/Accordion.js +27 -7
  3. package/Accordion/accordionClasses.d.ts +2 -0
  4. package/Accordion/accordionClasses.js +1 -1
  5. package/CHANGELOG.md +41 -0
  6. package/Divider/Divider.js +6 -2
  7. package/Grid/Grid.d.ts +2 -0
  8. package/Grid/Grid.js +4 -0
  9. package/Grid2/Grid2.d.ts +110 -0
  10. package/Grid2/Grid2.js +112 -0
  11. package/{Unstable_Grid2 → Grid2}/grid2Classes.d.ts +1 -1
  12. package/{Unstable_Grid2 → Grid2}/index.d.ts +1 -1
  13. package/{Unstable_Grid2 → Grid2}/index.js +1 -1
  14. package/{Unstable_Grid2 → Grid2}/package.json +1 -1
  15. package/ImageListItemBar/ImageListItemBar.js +1 -1
  16. package/ImageListItemBar/imageListItemBarClasses.d.ts +16 -4
  17. package/ImageListItemBar/imageListItemBarClasses.js +1 -1
  18. package/PigmentGrid/PigmentGrid.js +1 -1
  19. package/PigmentGrid/index.d.ts +1 -1
  20. package/PigmentGrid/index.js +1 -1
  21. package/index.d.ts +2 -3
  22. package/index.js +3 -4
  23. package/modern/Accordion/Accordion.js +27 -7
  24. package/modern/Accordion/accordionClasses.js +1 -1
  25. package/modern/Divider/Divider.js +6 -2
  26. package/modern/Grid/Grid.js +4 -0
  27. package/modern/Grid2/Grid2.js +112 -0
  28. package/modern/{Unstable_Grid2 → Grid2}/index.js +1 -1
  29. package/modern/ImageListItemBar/ImageListItemBar.js +1 -1
  30. package/modern/ImageListItemBar/imageListItemBarClasses.js +1 -1
  31. package/modern/PigmentGrid/PigmentGrid.js +1 -1
  32. package/modern/PigmentGrid/index.js +1 -1
  33. package/modern/index.js +3 -4
  34. package/modern/styles/createGetSelector.js +4 -1
  35. package/modern/styles/index.js +1 -0
  36. package/modern/styles/stringifyTheme.js +1 -2
  37. package/node/Accordion/Accordion.js +27 -7
  38. package/node/Accordion/accordionClasses.js +1 -1
  39. package/node/Divider/Divider.js +6 -2
  40. package/node/Grid/Grid.js +4 -0
  41. package/node/Grid2/Grid2.js +118 -0
  42. package/node/{Unstable_Grid2 → Grid2}/index.js +4 -6
  43. package/node/ImageListItemBar/ImageListItemBar.js +1 -1
  44. package/node/ImageListItemBar/imageListItemBarClasses.js +1 -1
  45. package/node/PigmentGrid/PigmentGrid.js +1 -1
  46. package/node/PigmentGrid/index.js +1 -1
  47. package/node/index.js +13 -24
  48. package/node/styles/createGetSelector.js +4 -1
  49. package/node/styles/index.js +8 -0
  50. package/node/styles/stringifyTheme.js +1 -2
  51. package/package.json +6 -6
  52. package/styles/createGetSelector.d.ts +6 -1
  53. package/styles/createGetSelector.js +4 -1
  54. package/styles/index.d.ts +1 -0
  55. package/styles/index.js +1 -0
  56. package/styles/overrides.d.ts +1 -1
  57. package/styles/props.d.ts +1 -1
  58. package/styles/stringifyTheme.js +1 -2
  59. package/Unstable_Grid2/Grid2.d.ts +0 -4
  60. package/Unstable_Grid2/Grid2.js +0 -32
  61. package/Unstable_Grid2/Grid2Props.d.ts +0 -15
  62. package/Unstable_Grid2/Grid2Props.js +0 -1
  63. package/modern/Unstable_Grid2/Grid2.js +0 -32
  64. package/modern/Unstable_Grid2/Grid2Props.js +0 -1
  65. package/node/Unstable_Grid2/Grid2.js +0 -38
  66. package/node/Unstable_Grid2/Grid2Props.js +0 -5
  67. /package/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
  68. /package/modern/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
  69. /package/node/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
@@ -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(AccordionContext.Provider, {
190
- value: contextValue,
191
- children: summary
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
  /**
@@ -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;
@@ -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
  }, {
@@ -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,
@@ -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;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
3
  export { default } from './Grid2';
4
- export * from './Grid2Props';
4
+ export * from './Grid2';
5
5
  export { default as grid2Classes } from './grid2Classes';
6
6
  export * from './grid2Classes';
@@ -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'],
@@ -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/Unstable_Grid/gridGenerator';
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 {
@@ -1,3 +1,3 @@
1
1
  export { default } from './PigmentGrid';
2
2
  export * from './PigmentGrid';
3
- export { default as grid2Classes } from '../Unstable_Grid2/grid2Classes';
3
+ export { default as grid2Classes } from '../Grid2/grid2Classes';
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.0.0-beta.3
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 * from './Grid';
113
- export { default as Unstable_Grid2 } from './Unstable_Grid2';
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';
@@ -28,7 +28,7 @@ export default (theme => (colorScheme, css) => {
28
28
  if (rule) {
29
29
  return {
30
30
  [rule.replace('%s', colorScheme)]: excludedVariables,
31
- ':root': css
31
+ [`:root, ${rule.replace('%s', colorScheme)}`]: css
32
32
  };
33
33
  }
34
34
  return {
@@ -38,6 +38,9 @@ export default (theme => (colorScheme, css) => {
38
38
  }
39
39
  };
40
40
  }
41
+ if (rule && rule !== 'media') {
42
+ return `:root, ${rule.replace('%s', String(colorScheme))}`;
43
+ }
41
44
  } else if (colorScheme) {
42
45
  if (rule === 'media') {
43
46
  return `@media (prefers-color-scheme: ${String(colorScheme)}) { :root`;
@@ -4,6 +4,7 @@ import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
4
4
  export { default as THEME_ID } from './identifier';
5
5
  export { default as adaptV4Theme } from './adaptV4Theme';
6
6
  export { hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, alpha, darken, lighten, css, keyframes } from '@mui/system';
7
+ export { unstable_createBreakpoints } from '@mui/system/createBreakpoints';
7
8
  // TODO: Remove this function in v6.
8
9
  // eslint-disable-next-line @typescript-eslint/naming-convention
9
10
  export function experimental_sx() {
@@ -43,8 +43,7 @@ export function stringifyTheme(baseTheme = {}) {
43
43
  }
44
44
  }
45
45
  serializeTheme(serializableTheme);
46
- return `import { createBreakpoints } from '@mui/system';
47
- import { createTransitions } from '@mui/material/styles';
46
+ return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
48
47
 
49
48
  const theme = ${JSON.stringify(serializableTheme, null, 2)};
50
49
 
@@ -33,6 +33,7 @@ const useUtilityClasses = ownerState => {
33
33
  } = ownerState;
34
34
  const slots = {
35
35
  root: ['root', !square && 'rounded', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],
36
+ heading: ['heading'],
36
37
  region: ['region']
37
38
  };
38
39
  return (0, _composeClasses.default)(slots, _accordionClasses.getAccordionUtilityClass, classes);
@@ -125,6 +126,13 @@ const AccordionRoot = (0, _zeroStyled.styled)(_Paper.default, {
125
126
  }
126
127
  }]
127
128
  }));
129
+ const AccordionHeading = (0, _zeroStyled.styled)('h3', {
130
+ name: 'MuiAccordion',
131
+ slot: 'Heading',
132
+ overridesResolver: (props, styles) => styles.heading
133
+ })({
134
+ all: 'unset'
135
+ });
128
136
  const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {
129
137
  const props = (0, _DefaultPropsProvider.useDefaultProps)({
130
138
  props: inProps,
@@ -180,12 +188,19 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
180
188
  transition: TransitionPropsProp,
181
189
  ...slotProps
182
190
  };
191
+ const externalForwardedProps = {
192
+ slots: backwardCompatibleSlots,
193
+ slotProps: backwardCompatibleSlotProps
194
+ };
195
+ const [AccordionHeadingSlot, accordionProps] = (0, _useSlot.default)('heading', {
196
+ elementType: AccordionHeading,
197
+ externalForwardedProps,
198
+ className: classes.heading,
199
+ ownerState
200
+ });
183
201
  const [TransitionSlot, transitionProps] = (0, _useSlot.default)('transition', {
184
202
  elementType: _Collapse.default,
185
- externalForwardedProps: {
186
- slots: backwardCompatibleSlots,
187
- slotProps: backwardCompatibleSlotProps
188
- },
203
+ externalForwardedProps,
189
204
  ownerState
190
205
  });
191
206
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AccordionRoot, {
@@ -194,9 +209,12 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
194
209
  ownerState: ownerState,
195
210
  square: square,
196
211
  ...other,
197
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccordionContext.default.Provider, {
198
- value: contextValue,
199
- children: summary
212
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionHeadingSlot, {
213
+ ...accordionProps,
214
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AccordionContext.default.Provider, {
215
+ value: contextValue,
216
+ children: summary
217
+ })
200
218
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionSlot, {
201
219
  in: expanded,
202
220
  timeout: "auto",
@@ -269,6 +287,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
269
287
  * @default {}
270
288
  */
271
289
  slotProps: _propTypes.default.shape({
290
+ heading: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
272
291
  transition: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
273
292
  }),
274
293
  /**
@@ -276,6 +295,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
276
295
  * @default {}
277
296
  */
278
297
  slots: _propTypes.default.shape({
298
+ heading: _propTypes.default.elementType,
279
299
  transition: _propTypes.default.elementType
280
300
  }),
281
301
  /**
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
11
11
  function getAccordionUtilityClass(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiAccordion', slot);
13
13
  }
14
- const accordionClasses = (0, _generateUtilityClasses.default)('MuiAccordion', ['root', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);
14
+ const accordionClasses = (0, _generateUtilityClasses.default)('MuiAccordion', ['root', 'heading', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);
15
15
  var _default = exports.default = accordionClasses;
@@ -121,6 +121,8 @@ const DividerRoot = (0, _zeroStyled.styled)('div', {
121
121
  whiteSpace: 'nowrap',
122
122
  textAlign: 'center',
123
123
  border: 0,
124
+ borderTopStyle: 'solid',
125
+ borderLeftStyle: 'solid',
124
126
  '&::before, &::after': {
125
127
  content: '""',
126
128
  alignSelf: 'center'
@@ -133,7 +135,8 @@ const DividerRoot = (0, _zeroStyled.styled)('div', {
133
135
  style: {
134
136
  '&::before, &::after': {
135
137
  width: '100%',
136
- borderTop: `thin solid ${(theme.vars || theme).palette.divider}`
138
+ borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,
139
+ borderTopStyle: 'inherit'
137
140
  }
138
141
  }
139
142
  }, {
@@ -144,7 +147,8 @@ const DividerRoot = (0, _zeroStyled.styled)('div', {
144
147
  flexDirection: 'column',
145
148
  '&::before, &::after': {
146
149
  height: '100%',
147
- borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`
150
+ borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,
151
+ borderLeftStyle: 'inherit'
148
152
  }
149
153
  }
150
154
  }, {
package/node/Grid/Grid.js CHANGED
@@ -376,6 +376,10 @@ const useUtilityClasses = ownerState => {
376
376
  };
377
377
  return (0, _composeClasses.default)(slots, _gridClasses.getGridUtilityClass, classes);
378
378
  };
379
+
380
+ /**
381
+ * @deprecated Use the [`Grid2`](https://next.mui.com/material-ui/react-grid2/) component instead.
382
+ */
379
383
  const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
380
384
  const themeProps = (0, _useThemeProps.default)({
381
385
  props: inProps,
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
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 _styles = require("../styles");
12
+ /**
13
+ *
14
+ * Demos:
15
+ *
16
+ * - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
17
+ *
18
+ * API:
19
+ *
20
+ * - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
21
+ */
22
+ const Grid2 = (0, _Grid.createGrid)({
23
+ createStyledComponent: (0, _styles.styled)('div', {
24
+ name: 'MuiGrid2',
25
+ slot: 'Root',
26
+ overridesResolver: (props, styles) => styles.root
27
+ }),
28
+ componentName: 'MuiGrid2',
29
+ useThemeProps: inProps => (0, _styles.useThemeProps)({
30
+ props: inProps,
31
+ name: 'MuiGrid2'
32
+ })
33
+ });
34
+ process.env.NODE_ENV !== "production" ? Grid2.propTypes /* remove-proptypes */ = {
35
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
36
+ // │ These PropTypes are generated from the TypeScript type definitions. │
37
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
38
+ // └─────────────────────────────────────────────────────────────────────┘
39
+ /**
40
+ * The content of the component.
41
+ */
42
+ children: _propTypes.default.node,
43
+ /**
44
+ * The number of columns.
45
+ * @default 12
46
+ */
47
+ columns: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
48
+ /**
49
+ * Defines the horizontal space between the type `item` components.
50
+ * It overrides the value of the `spacing` prop.
51
+ */
52
+ 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]),
53
+ /**
54
+ * If `true`, the component will have the flex *container* behavior.
55
+ * You should be wrapping *items* with a *container*.
56
+ * @default false
57
+ */
58
+ container: _propTypes.default.bool,
59
+ /**
60
+ * Defines the `flex-direction` style property.
61
+ * It is applied for all screen sizes.
62
+ * @default 'row'
63
+ */
64
+ 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]),
65
+ /**
66
+ * Defines the offset value for the type `item` components.
67
+ */
68
+ 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]),
69
+ /**
70
+ * Defines the vertical space between the type `item` components.
71
+ * It overrides the value of the `spacing` prop.
72
+ */
73
+ 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]),
74
+ /**
75
+ * Defines the size of the the type `item` components.
76
+ */
77
+ 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]),
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: _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]),
84
+ /**
85
+ * @ignore
86
+ */
87
+ 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]),
88
+ /**
89
+ * @internal
90
+ * The level of the grid starts from `0`
91
+ * and increases when the grid nests inside another grid regardless of container or item.
92
+ *
93
+ * ```js
94
+ * <Grid> // level 0
95
+ * <Grid> // level 1
96
+ * <Grid> // level 2
97
+ * <Grid> // level 1
98
+ * ```
99
+ *
100
+ * Only consecutive grid is considered nesting.
101
+ * A grid container will start at `0` if there are non-Grid element above it.
102
+ *
103
+ * ```js
104
+ * <Grid> // level 0
105
+ * <div>
106
+ * <Grid> // level 0
107
+ * <Grid> // level 1
108
+ * ```
109
+ */
110
+ unstable_level: _propTypes.default.number,
111
+ /**
112
+ * Defines the `flex-wrap` style property.
113
+ * It's applied for all screen sizes.
114
+ * @default 'wrap'
115
+ */
116
+ wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
117
+ } : void 0;
118
+ var _default = exports.default = Grid2;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -20,16 +19,15 @@ Object.defineProperty(exports, "grid2Classes", {
20
19
  return _grid2Classes.default;
21
20
  }
22
21
  });
23
- var _Grid = _interopRequireDefault(require("./Grid2"));
24
- var _Grid2Props = require("./Grid2Props");
25
- Object.keys(_Grid2Props).forEach(function (key) {
22
+ var _Grid = _interopRequireWildcard(require("./Grid2"));
23
+ Object.keys(_Grid).forEach(function (key) {
26
24
  if (key === "default" || key === "__esModule") return;
27
25
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
- if (key in exports && exports[key] === _Grid2Props[key]) return;
26
+ if (key in exports && exports[key] === _Grid[key]) return;
29
27
  Object.defineProperty(exports, key, {
30
28
  enumerable: true,
31
29
  get: function () {
32
- return _Grid2Props[key];
30
+ return _Grid[key];
33
31
  }
34
32
  });
35
33
  });
@@ -25,7 +25,7 @@ const useUtilityClasses = ownerState => {
25
25
  actionPosition
26
26
  } = ownerState;
27
27
  const slots = {
28
- root: ['root', `position${(0, _capitalize.default)(position)}`],
28
+ root: ['root', `position${(0, _capitalize.default)(position)}`, `actionPosition${(0, _capitalize.default)(actionPosition)}`],
29
29
  titleWrap: ['titleWrap', `titleWrap${(0, _capitalize.default)(position)}`, actionIcon && `titleWrapActionPos${(0, _capitalize.default)(actionPosition)}`],
30
30
  title: ['title'],
31
31
  subtitle: ['subtitle'],
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
11
11
  function getImageListItemBarUtilityClass(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiImageListItemBar', slot);
13
13
  }
14
- const imageListItemBarClasses = (0, _generateUtilityClasses.default)('MuiImageListItemBar', ['root', 'positionBottom', 'positionTop', 'positionBelow', 'titleWrap', 'titleWrapBottom', 'titleWrapTop', 'titleWrapBelow', 'titleWrapActionPosLeft', 'titleWrapActionPosRight', 'title', 'subtitle', 'actionIcon', 'actionIconActionPosLeft', 'actionIconActionPosRight']);
14
+ const imageListItemBarClasses = (0, _generateUtilityClasses.default)('MuiImageListItemBar', ['root', 'positionBottom', 'positionTop', 'positionBelow', 'actionPositionLeft', 'actionPositionRight', 'titleWrap', 'titleWrapBottom', 'titleWrapTop', 'titleWrapBelow', 'titleWrapActionPosLeft', 'titleWrapActionPosRight', 'title', 'subtitle', 'actionIcon', 'actionIconActionPosLeft', 'actionIconActionPosRight']);
15
15
  var _default = exports.default = imageListItemBarClasses;
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _Grid = _interopRequireDefault(require("@mui/material-pigment-css/Grid"));
12
12
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
13
13
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
14
- var _gridGenerator = require("@mui/system/Unstable_Grid/gridGenerator");
14
+ var _gridGenerator = require("@mui/system/Grid/gridGenerator");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }