@mui/material 6.1.4 → 6.1.6

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 (59) hide show
  1. package/Autocomplete/Autocomplete.d.ts +1 -0
  2. package/Autocomplete/Autocomplete.js +12 -5
  3. package/AvatarGroup/AvatarGroup.js +5 -5
  4. package/CHANGELOG.md +102 -2
  5. package/Container/Container.js +2 -2
  6. package/Dialog/Dialog.d.ts +6 -0
  7. package/Dialog/Dialog.js +8 -0
  8. package/Divider/Divider.js +1 -1
  9. package/Grid/Grid.js +2 -2
  10. package/Grid2/Grid2.js +3 -2
  11. package/NativeSelect/NativeSelect.js +2 -2
  12. package/Select/Select.js +2 -2
  13. package/Slider/Slider.d.ts +1 -1
  14. package/Slider/Slider.js +3 -3
  15. package/Slider/SliderValueLabel.types.d.ts +1 -2
  16. package/Stack/Stack.js +2 -2
  17. package/index.js +1 -1
  18. package/modern/Autocomplete/Autocomplete.js +12 -5
  19. package/modern/AvatarGroup/AvatarGroup.js +5 -5
  20. package/modern/Container/Container.js +2 -2
  21. package/modern/Dialog/Dialog.js +8 -0
  22. package/modern/Divider/Divider.js +1 -1
  23. package/modern/Grid/Grid.js +2 -2
  24. package/modern/Grid2/Grid2.js +3 -2
  25. package/modern/NativeSelect/NativeSelect.js +2 -2
  26. package/modern/Select/Select.js +2 -2
  27. package/modern/Slider/Slider.js +3 -3
  28. package/modern/Stack/Stack.js +2 -2
  29. package/modern/index.js +1 -1
  30. package/modern/styles/ThemeProviderWithVars.js +1 -1
  31. package/modern/styles/createThemeNoVars.js +3 -0
  32. package/modern/styles/stringifyTheme.js +1 -1
  33. package/modern/useAutocomplete/useAutocomplete.js +1 -3
  34. package/modern/version/index.js +2 -2
  35. package/node/Autocomplete/Autocomplete.js +12 -5
  36. package/node/AvatarGroup/AvatarGroup.js +5 -5
  37. package/node/Container/Container.js +2 -2
  38. package/node/Dialog/Dialog.js +8 -0
  39. package/node/Divider/Divider.js +1 -1
  40. package/node/Grid/Grid.js +2 -2
  41. package/node/Grid2/Grid2.js +2 -1
  42. package/node/NativeSelect/NativeSelect.js +2 -2
  43. package/node/Select/Select.js +2 -2
  44. package/node/Slider/Slider.js +3 -3
  45. package/node/Stack/Stack.js +2 -2
  46. package/node/index.js +1 -1
  47. package/node/styles/ThemeProviderWithVars.js +1 -1
  48. package/node/styles/createThemeNoVars.js +3 -0
  49. package/node/styles/stringifyTheme.js +1 -1
  50. package/node/useAutocomplete/useAutocomplete.js +1 -3
  51. package/node/version/index.js +2 -2
  52. package/package.json +7 -7
  53. package/styles/ThemeProviderWithVars.d.ts +1 -1
  54. package/styles/ThemeProviderWithVars.js +1 -1
  55. package/styles/createThemeNoVars.js +3 -0
  56. package/styles/stringifyTheme.d.ts +1 -1
  57. package/styles/stringifyTheme.js +1 -1
  58. package/useAutocomplete/useAutocomplete.js +1 -3
  59. package/version/index.js +2 -2
@@ -81,6 +81,7 @@ export interface AutocompleteRenderInputParams {
81
81
  className: string;
82
82
  startAdornment: React.ReactNode;
83
83
  endAdornment: React.ReactNode;
84
+ onMouseDown: React.MouseEventHandler;
84
85
  };
85
86
  inputProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
86
87
  }
@@ -533,7 +533,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
533
533
  const classes = useUtilityClasses(ownerState);
534
534
  const externalForwardedProps = {
535
535
  slots: {
536
- listbox: ListboxComponentProp,
537
536
  paper: PaperComponentProp,
538
537
  popper: PopperComponentProp,
539
538
  ...slots
@@ -546,7 +545,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
546
545
  }
547
546
  };
548
547
  const [ListboxSlot, listboxProps] = useSlot('listbox', {
549
- elementType: 'ul',
548
+ elementType: AutocompleteListbox,
550
549
  externalForwardedProps,
551
550
  ownerState,
552
551
  className: classes.listbox,
@@ -662,8 +661,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
662
661
  });
663
662
  let autocompletePopper = null;
664
663
  if (groupedOptions.length > 0) {
665
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteListbox, {
666
- as: ListboxSlot,
664
+ autocompletePopper = renderAutocompletePopperChildren(
665
+ /*#__PURE__*/
666
+ // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
+ // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
+ _jsx(ListboxSlot, {
669
+ as: ListboxComponentProp,
667
670
  ...listboxProps,
668
671
  children: groupedOptions.map((option, index) => {
669
672
  if (groupBy) {
@@ -710,7 +713,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
710
713
  ref: setAnchorEl,
711
714
  className: classes.inputRoot,
712
715
  startAdornment,
713
- onMouseDown: event => handleInputMouseDown(event),
716
+ onMouseDown: event => {
717
+ if (event.target === event.currentTarget) {
718
+ handleInputMouseDown(event);
719
+ }
720
+ },
714
721
  ...((hasClearIcon || hasPopupIcon) && {
715
722
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
716
723
  className: classes.endAdornment,
@@ -107,11 +107,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
107
107
  className: classes.avatar,
108
108
  ownerState,
109
109
  additionalProps: {
110
- variant,
111
- style: {
112
- '--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
113
- ...other.style
114
- }
110
+ variant
115
111
  }
116
112
  });
117
113
  return /*#__PURE__*/_jsxs(AvatarGroupRoot, {
@@ -120,6 +116,10 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
120
116
  className: clsx(classes.root, className),
121
117
  ref: ref,
122
118
  ...other,
119
+ style: {
120
+ '--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined,
121
+ ...other.style
122
+ },
123
123
  children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
124
124
  ...surplusProps,
125
125
  children: extraAvatarsElement
package/CHANGELOG.md CHANGED
@@ -1,5 +1,105 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.1.6
4
+
5
+ <!-- generated comparing v6.1.5..master -->
6
+
7
+ _Oct 30, 2024_
8
+
9
+ A big thanks to the 13 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.1.6`
12
+
13
+ - [Autocomplete] Add missing `onMouseDown` type to AutocompleteRenderInputParams (#44183) @sai6855
14
+ - [Avatar] Fix AvatarGroup spacing (#44208) @aarongarciah
15
+ - [AvatarGroup] Fix spacing CSS variable (#44202) @navedqb
16
+ - [Divider] Fix CSS specificity order (#44204) @o-alexandrov
17
+ - [Slider] Fix value prop type warning (#44131) @joshkel
18
+ - Replace `useThemeProps` with `useDefaultProps` (#44193) @siriwatknp
19
+
20
+ ### `@mui/material-nextjs@6.1.6`
21
+
22
+ - Support Next 15.0.0 (#42428) @nphmuller
23
+
24
+ ### `@mui/lab@6.0.0-beta.14`
25
+
26
+ - [Tabs] Fix type of TabPanel component (#44207) @blackcow1987
27
+
28
+ ### `@mui/codemod@6.1.6`
29
+
30
+ - Fix system props default import specifier (#44170) @siriwatknp
31
+
32
+ ### `@mui/utils@6.1.6`
33
+
34
+ - Bring back useIsFocusVisible (#44256) @aarongarciah
35
+ - Bring back getReactNodeRef (#44248) @aarongarciah
36
+
37
+ ### Docs
38
+
39
+ - [material-ui][Avatar] Add AvatarGroup spacing demo (#44209) @aarongarciah
40
+ - Fix a typo in CONTRIBUTING.md (#44200) @prakhargupta1
41
+ - Mark the Hidden component as deprecated in the sidenav (#44068) @jimmycallin
42
+ - Use () when referencing functions (#44184) @oliviertassinari
43
+ - Follow types description convention (#44187) @oliviertassinari
44
+
45
+ ### Core
46
+
47
+ - Lock file maintenance (#43947)
48
+ - Run @mui/icon-material src:icons (#44097) @oliviertassinari
49
+ - [test][material-ui] Add tests for Pigment Grid and Stack (#44132) @DiegoAndai
50
+ - [test] Distinguish private with public tests API (#44188) @oliviertassinari
51
+ - [docs-infra] Add recursively the relative modules in the demos (#44150) @mnajdova
52
+
53
+ All contributors of this release in alphabetical order: @aarongarciah, @blackcow1987, @DiegoAndai, @jimmycallin, @joshkel, @mnajdova, @navedqb, @nphmuller, @o-alexandrov, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp
54
+
55
+ ## 6.1.5
56
+
57
+ <!-- generated comparing v6.1.4..master -->
58
+
59
+ _Oct 22, 2024_
60
+
61
+ A big thanks to the 9 contributors who made this release possible.
62
+
63
+ ### `@mui/material@6.1.5`
64
+
65
+ - [Autocomplete] Fix bug with child chip button events propagating to parent (#43982) @snapwich
66
+ - [Autocomplete] Fix Autocomplete crashing if ownerState is used in styleOverrides (#43994) @sai6855
67
+ - [Checkbox] Fix disableRipple regression (#44099) @siriwatknp
68
+ - [Dialog] Add the aria-modal="true" by default (#44118) @mnajdova
69
+ - [IconButton] Fix disableRipple behavior when disableRipple is set in MuiButtonBase theme (#43714) @sai6855
70
+ - [pigment-css] Support project without enabling CSS variables (#44171) @siriwatknp
71
+ - Make the palette always return new light and dark object (#44059) @siriwatknp
72
+
73
+ ### `@mui/system@6.1.5`
74
+
75
+ - Add `defaultMode` to `InitColorSchemeScript` (#44139) @siriwatknp
76
+
77
+ ### `@mui/codemod@6.1.5`
78
+
79
+ - [Grid2] Add removal `zeroMinWidth` prop to codemod (#44178) @sai6855
80
+
81
+ ### Docs
82
+
83
+ - [material-ui][FormControlLabel] Don't use unintuitive label position on chec… (#44119) @mnajdova
84
+ - [material-ui][TextField] Dynamically modify the eye password button aria-label (#44122) @ChinoUkaegbu
85
+ - [icons] Run pnpm docs:mdicons:synonyms (#44098) @oliviertassinari
86
+ - [joy-ui] Update Overview copy to match Readme (#44136) @samuelsycamore
87
+ - Add CodeSandbox/Stackblitz to the rest of the templates (#43708) @siriwatknp
88
+ - Update Figma link to fix 301 (a7b7d9c) @oliviertassinari
89
+ - Link Toolpad from Core repo (#44111) @prakhargupta1
90
+ - Remove HighlightedCode max-width (#43731) @Janpot
91
+
92
+ ### Core
93
+
94
+ - [code-infra] Widen eslint file patterns (#44148) @Janpot
95
+ - [code-infra] Fix icon builder tests (#44143) @Janpot
96
+ - [code-infra] Fix dependabot vulnerabilities (#44124) @Janpot
97
+ - [core] Reference commits in changelog when no PR (#44115) @oliviertassinari
98
+ - [examples] Fix Pigment CSS Vite example (#44074) @oliviertassinari
99
+ - Fix fast-xml-parser vulnerability (#44121) @Janpot
100
+
101
+ All contributors of this release in alphabetical order: @ChinoUkaegbu, @Janpot, @mnajdova, @oliviertassinari, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @snapwich
102
+
3
103
  ## v6.1.4
4
104
 
5
105
  <!-- generated comparing v6.1.3..master -->
@@ -310,7 +410,7 @@ A big thanks to the 11 contributors who made this release possible.
310
410
 
311
411
  ### `@mui/material@6.0.2`
312
412
 
313
- - Fix `createTheme` with just color schemes (#43518) @siriwatknp
413
+ - Fix `createTheme()` with just color schemes (#43518) @siriwatknp
314
414
  - [Menu,Popover] Fix Backdrop props descriptions (#43503) @Michael-Hutchinson
315
415
  - [MenuList] Do not react to an event with modifier key pressed (#43505) @MateuszGroth
316
416
 
@@ -1052,7 +1152,7 @@ A big thanks to the 18 contributors who made this release possible.
1052
1152
 
1053
1153
  ### Docs
1054
1154
 
1055
- - Add `theme.applyStyles` and migrate docs (#42498) @siriwatknp
1155
+ - Add `theme.applyStyles()` and migrate docs (#42498) @siriwatknp
1056
1156
  - Fix dashboard template console error (#42594) @oliviertassinari
1057
1157
  - Migrate system props to `sx` prop (#42475) @siriwatknp
1058
1158
  - [material-ui]Fix duplicated sentence (#42521) @alexfauquette
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import { createContainer } from '@mui/system';
5
5
  import capitalize from "../utils/capitalize.js";
6
6
  import styled from "../styles/styled.js";
7
- import useThemeProps from "../styles/useThemeProps.js";
7
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
8
8
  const Container = createContainer({
9
9
  createStyledComponent: styled('div', {
10
10
  name: 'MuiContainer',
@@ -16,7 +16,7 @@ const Container = createContainer({
16
16
  return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
17
17
  }
18
18
  }),
19
- useThemeProps: inProps => useThemeProps({
19
+ useThemeProps: inProps => useDefaultProps({
20
20
  props: inProps,
21
21
  name: 'MuiContainer'
22
22
  })
@@ -15,6 +15,12 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
15
15
  * The id(s) of the element(s) that label the dialog.
16
16
  */
17
17
  'aria-labelledby'?: string;
18
+ /**
19
+ * Informs assistive technologies that the element is modal.
20
+ * It's added on the element with role="dialog".
21
+ * @default true
22
+ */
23
+ 'aria-modal'?: boolean | 'true' | 'false';
18
24
  /**
19
25
  * Dialog children, usually the included sub-components.
20
26
  */
package/Dialog/Dialog.js CHANGED
@@ -202,6 +202,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
202
202
  const {
203
203
  'aria-describedby': ariaDescribedby,
204
204
  'aria-labelledby': ariaLabelledbyProp,
205
+ 'aria-modal': ariaModal = true,
205
206
  BackdropComponent,
206
207
  BackdropProps,
207
208
  children,
@@ -296,6 +297,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
296
297
  role: "dialog",
297
298
  "aria-describedby": ariaDescribedby,
298
299
  "aria-labelledby": ariaLabelledby,
300
+ "aria-modal": ariaModal,
299
301
  ...PaperProps,
300
302
  className: clsx(classes.paper, PaperProps.className),
301
303
  ownerState: ownerState,
@@ -321,6 +323,12 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
321
323
  * The id(s) of the element(s) that label the dialog.
322
324
  */
323
325
  'aria-labelledby': PropTypes.string,
326
+ /**
327
+ * Informs assistive technologies that the element is modal.
328
+ * It's added on the element with role="dialog".
329
+ * @default true
330
+ */
331
+ 'aria-modal': PropTypes.oneOfType([PropTypes.oneOf(['false', 'true']), PropTypes.bool]),
324
332
  /**
325
333
  * A backdrop component. This prop enables custom backdrop rendering.
326
334
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
@@ -111,7 +111,6 @@ const DividerRoot = styled('div', {
111
111
  }) => !!ownerState.children,
112
112
  style: {
113
113
  display: 'flex',
114
- whiteSpace: 'nowrap',
115
114
  textAlign: 'center',
116
115
  border: 0,
117
116
  borderTopStyle: 'solid',
@@ -185,6 +184,7 @@ const DividerWrapper = styled('span', {
185
184
  display: 'inline-block',
186
185
  paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
187
186
  paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
187
+ whiteSpace: 'nowrap',
188
188
  variants: [{
189
189
  props: {
190
190
  orientation: 'vertical'
package/Grid/Grid.js CHANGED
@@ -18,7 +18,7 @@ import { extendSxProp } from '@mui/system/styleFunctionSx';
18
18
  import composeClasses from '@mui/utils/composeClasses';
19
19
  import requirePropFactory from "../utils/requirePropFactory.js";
20
20
  import styled from "../styles/styled.js";
21
- import useThemeProps from "../styles/useThemeProps.js";
21
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
22
22
  import useTheme from "../styles/useTheme.js";
23
23
  import GridContext from "./GridContext.js";
24
24
  import gridClasses, { getGridUtilityClass } from "./gridClasses.js";
@@ -367,7 +367,7 @@ const useUtilityClasses = ownerState => {
367
367
  * @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
368
368
  */
369
369
  const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
370
- const themeProps = useThemeProps({
370
+ const themeProps = useDefaultProps({
371
371
  props: inProps,
372
372
  name: 'MuiGrid'
373
373
  });
package/Grid2/Grid2.js CHANGED
@@ -3,7 +3,8 @@
3
3
  import PropTypes from 'prop-types';
4
4
  import { createGrid as createGrid2 } from '@mui/system/Grid';
5
5
  import requirePropFactory from "../utils/requirePropFactory.js";
6
- import { styled, useThemeProps } from "../styles/index.js";
6
+ import { styled } from "../styles/index.js";
7
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
7
8
  /**
8
9
  *
9
10
  * Demos:
@@ -21,7 +22,7 @@ const Grid2 = createGrid2({
21
22
  overridesResolver: (props, styles) => styles.root
22
23
  }),
23
24
  componentName: 'MuiGrid2',
24
- useThemeProps: inProps => useThemeProps({
25
+ useThemeProps: inProps => useDefaultProps({
25
26
  props: inProps,
26
27
  name: 'MuiGrid2'
27
28
  })
@@ -9,7 +9,7 @@ import formControlState from "../FormControl/formControlState.js";
9
9
  import useFormControl from "../FormControl/useFormControl.js";
10
10
  import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
11
11
  import Input from "../Input/index.js";
12
- import useThemeProps from "../styles/useThemeProps.js";
12
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
13
  import { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  const useUtilityClasses = ownerState => {
@@ -26,7 +26,7 @@ const defaultInput = /*#__PURE__*/_jsx(Input, {});
26
26
  * An alternative to `<Select native />` with a much smaller bundle size footprint.
27
27
  */
28
28
  const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
29
- const props = useThemeProps({
29
+ const props = useDefaultProps({
30
30
  name: 'MuiNativeSelect',
31
31
  props: inProps
32
32
  });
package/Select/Select.js CHANGED
@@ -13,7 +13,7 @@ import Input from "../Input/index.js";
13
13
  import NativeSelectInput from "../NativeSelect/NativeSelectInput.js";
14
14
  import FilledInput from "../FilledInput/index.js";
15
15
  import OutlinedInput from "../OutlinedInput/index.js";
16
- import useThemeProps from "../styles/useThemeProps.js";
16
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
17
17
  import useForkRef from "../utils/useForkRef.js";
18
18
  import { styled } from "../zero-styled/index.js";
19
19
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
@@ -34,7 +34,7 @@ const StyledInput = styled(Input, styledRootConfig)('');
34
34
  const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
35
35
  const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
36
36
  const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
37
- const props = useThemeProps({
37
+ const props = useDefaultProps({
38
38
  name: 'MuiSelect',
39
39
  props: inProps
40
40
  });
@@ -284,7 +284,7 @@ export interface SliderValueLabelProps extends React.HTMLAttributes<HTMLSpanElem
284
284
  children: React.ReactElement<unknown>;
285
285
  index: number;
286
286
  open: boolean;
287
- value: number;
287
+ value: React.ReactNode;
288
288
  }
289
289
 
290
290
  type SliderRootProps = NonNullable<SliderTypeMap['props']['componentsProps']>['root'];
package/Slider/Slider.js CHANGED
@@ -440,7 +440,7 @@ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes /* remove-pro
440
440
  /**
441
441
  * @ignore
442
442
  */
443
- value: PropTypes.number.isRequired
443
+ value: PropTypes.node
444
444
  } : void 0;
445
445
  export { SliderValueLabel };
446
446
  export const SliderMark = styled('span', {
@@ -901,7 +901,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
901
901
  className: PropTypes.string,
902
902
  open: PropTypes.bool,
903
903
  style: PropTypes.object,
904
- value: PropTypes.number,
904
+ value: PropTypes.node,
905
905
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
906
906
  })])
907
907
  }),
@@ -1018,7 +1018,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
1018
1018
  className: PropTypes.string,
1019
1019
  open: PropTypes.bool,
1020
1020
  style: PropTypes.object,
1021
- value: PropTypes.number,
1021
+ value: PropTypes.node,
1022
1022
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
1023
1023
  })])
1024
1024
  }),
@@ -8,9 +8,8 @@ export interface SliderValueLabelProps {
8
8
  open: boolean;
9
9
  /**
10
10
  * The value of the slider.
11
- * For ranged sliders, provide an array with two values.
12
11
  */
13
- value: number;
12
+ value: React.ReactNode;
14
13
  /**
15
14
  * Controls when the value label is displayed:
16
15
  *
package/Stack/Stack.js CHANGED
@@ -3,14 +3,14 @@
3
3
  import PropTypes from 'prop-types';
4
4
  import { createStack } from '@mui/system';
5
5
  import styled from "../styles/styled.js";
6
- import useThemeProps from "../styles/useThemeProps.js";
6
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
7
7
  const Stack = createStack({
8
8
  createStyledComponent: styled('div', {
9
9
  name: 'MuiStack',
10
10
  slot: 'Root',
11
11
  overridesResolver: (props, styles) => styles.root
12
12
  }),
13
- useThemeProps: inProps => useThemeProps({
13
+ useThemeProps: inProps => useDefaultProps({
14
14
  props: inProps,
15
15
  name: 'MuiStack'
16
16
  })
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.1.4
2
+ * @mui/material v6.1.6
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -533,7 +533,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
533
533
  const classes = useUtilityClasses(ownerState);
534
534
  const externalForwardedProps = {
535
535
  slots: {
536
- listbox: ListboxComponentProp,
537
536
  paper: PaperComponentProp,
538
537
  popper: PopperComponentProp,
539
538
  ...slots
@@ -546,7 +545,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
546
545
  }
547
546
  };
548
547
  const [ListboxSlot, listboxProps] = useSlot('listbox', {
549
- elementType: 'ul',
548
+ elementType: AutocompleteListbox,
550
549
  externalForwardedProps,
551
550
  ownerState,
552
551
  className: classes.listbox,
@@ -662,8 +661,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
662
661
  });
663
662
  let autocompletePopper = null;
664
663
  if (groupedOptions.length > 0) {
665
- autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteListbox, {
666
- as: ListboxSlot,
664
+ autocompletePopper = renderAutocompletePopperChildren(
665
+ /*#__PURE__*/
666
+ // TODO v7: remove `as` prop and move ListboxComponentProp to externalForwardedProps or remove ListboxComponentProp entirely
667
+ // https://github.com/mui/material-ui/pull/43994#issuecomment-2401945800
668
+ _jsx(ListboxSlot, {
669
+ as: ListboxComponentProp,
667
670
  ...listboxProps,
668
671
  children: groupedOptions.map((option, index) => {
669
672
  if (groupBy) {
@@ -710,7 +713,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
710
713
  ref: setAnchorEl,
711
714
  className: classes.inputRoot,
712
715
  startAdornment,
713
- onMouseDown: event => handleInputMouseDown(event),
716
+ onMouseDown: event => {
717
+ if (event.target === event.currentTarget) {
718
+ handleInputMouseDown(event);
719
+ }
720
+ },
714
721
  ...((hasClearIcon || hasPopupIcon) && {
715
722
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
716
723
  className: classes.endAdornment,
@@ -107,11 +107,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
107
107
  className: classes.avatar,
108
108
  ownerState,
109
109
  additionalProps: {
110
- variant,
111
- style: {
112
- '--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
113
- ...other.style
114
- }
110
+ variant
115
111
  }
116
112
  });
117
113
  return /*#__PURE__*/_jsxs(AvatarGroupRoot, {
@@ -120,6 +116,10 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
120
116
  className: clsx(classes.root, className),
121
117
  ref: ref,
122
118
  ...other,
119
+ style: {
120
+ '--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined,
121
+ ...other.style
122
+ },
123
123
  children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
124
124
  ...surplusProps,
125
125
  children: extraAvatarsElement
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import { createContainer } from '@mui/system';
5
5
  import capitalize from "../utils/capitalize.js";
6
6
  import styled from "../styles/styled.js";
7
- import useThemeProps from "../styles/useThemeProps.js";
7
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
8
8
  const Container = createContainer({
9
9
  createStyledComponent: styled('div', {
10
10
  name: 'MuiContainer',
@@ -16,7 +16,7 @@ const Container = createContainer({
16
16
  return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
17
17
  }
18
18
  }),
19
- useThemeProps: inProps => useThemeProps({
19
+ useThemeProps: inProps => useDefaultProps({
20
20
  props: inProps,
21
21
  name: 'MuiContainer'
22
22
  })
@@ -202,6 +202,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
202
202
  const {
203
203
  'aria-describedby': ariaDescribedby,
204
204
  'aria-labelledby': ariaLabelledbyProp,
205
+ 'aria-modal': ariaModal = true,
205
206
  BackdropComponent,
206
207
  BackdropProps,
207
208
  children,
@@ -296,6 +297,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
296
297
  role: "dialog",
297
298
  "aria-describedby": ariaDescribedby,
298
299
  "aria-labelledby": ariaLabelledby,
300
+ "aria-modal": ariaModal,
299
301
  ...PaperProps,
300
302
  className: clsx(classes.paper, PaperProps.className),
301
303
  ownerState: ownerState,
@@ -321,6 +323,12 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
321
323
  * The id(s) of the element(s) that label the dialog.
322
324
  */
323
325
  'aria-labelledby': PropTypes.string,
326
+ /**
327
+ * Informs assistive technologies that the element is modal.
328
+ * It's added on the element with role="dialog".
329
+ * @default true
330
+ */
331
+ 'aria-modal': PropTypes.oneOfType([PropTypes.oneOf(['false', 'true']), PropTypes.bool]),
324
332
  /**
325
333
  * A backdrop component. This prop enables custom backdrop rendering.
326
334
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
@@ -111,7 +111,6 @@ const DividerRoot = styled('div', {
111
111
  }) => !!ownerState.children,
112
112
  style: {
113
113
  display: 'flex',
114
- whiteSpace: 'nowrap',
115
114
  textAlign: 'center',
116
115
  border: 0,
117
116
  borderTopStyle: 'solid',
@@ -185,6 +184,7 @@ const DividerWrapper = styled('span', {
185
184
  display: 'inline-block',
186
185
  paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
187
186
  paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
187
+ whiteSpace: 'nowrap',
188
188
  variants: [{
189
189
  props: {
190
190
  orientation: 'vertical'
@@ -18,7 +18,7 @@ import { extendSxProp } from '@mui/system/styleFunctionSx';
18
18
  import composeClasses from '@mui/utils/composeClasses';
19
19
  import requirePropFactory from "../utils/requirePropFactory.js";
20
20
  import styled from "../styles/styled.js";
21
- import useThemeProps from "../styles/useThemeProps.js";
21
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
22
22
  import useTheme from "../styles/useTheme.js";
23
23
  import GridContext from "./GridContext.js";
24
24
  import gridClasses, { getGridUtilityClass } from "./gridClasses.js";
@@ -367,7 +367,7 @@ const useUtilityClasses = ownerState => {
367
367
  * @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
368
368
  */
369
369
  const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
370
- const themeProps = useThemeProps({
370
+ const themeProps = useDefaultProps({
371
371
  props: inProps,
372
372
  name: 'MuiGrid'
373
373
  });
@@ -3,7 +3,8 @@
3
3
  import PropTypes from 'prop-types';
4
4
  import { createGrid as createGrid2 } from '@mui/system/Grid';
5
5
  import requirePropFactory from "../utils/requirePropFactory.js";
6
- import { styled, useThemeProps } from "../styles/index.js";
6
+ import { styled } from "../styles/index.js";
7
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
7
8
  /**
8
9
  *
9
10
  * Demos:
@@ -21,7 +22,7 @@ const Grid2 = createGrid2({
21
22
  overridesResolver: (props, styles) => styles.root
22
23
  }),
23
24
  componentName: 'MuiGrid2',
24
- useThemeProps: inProps => useThemeProps({
25
+ useThemeProps: inProps => useDefaultProps({
25
26
  props: inProps,
26
27
  name: 'MuiGrid2'
27
28
  })
@@ -9,7 +9,7 @@ import formControlState from "../FormControl/formControlState.js";
9
9
  import useFormControl from "../FormControl/useFormControl.js";
10
10
  import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
11
11
  import Input from "../Input/index.js";
12
- import useThemeProps from "../styles/useThemeProps.js";
12
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
13
  import { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  const useUtilityClasses = ownerState => {
@@ -26,7 +26,7 @@ const defaultInput = /*#__PURE__*/_jsx(Input, {});
26
26
  * An alternative to `<Select native />` with a much smaller bundle size footprint.
27
27
  */
28
28
  const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
29
- const props = useThemeProps({
29
+ const props = useDefaultProps({
30
30
  name: 'MuiNativeSelect',
31
31
  props: inProps
32
32
  });
@@ -13,7 +13,7 @@ import Input from "../Input/index.js";
13
13
  import NativeSelectInput from "../NativeSelect/NativeSelectInput.js";
14
14
  import FilledInput from "../FilledInput/index.js";
15
15
  import OutlinedInput from "../OutlinedInput/index.js";
16
- import useThemeProps from "../styles/useThemeProps.js";
16
+ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
17
17
  import useForkRef from "../utils/useForkRef.js";
18
18
  import { styled } from "../zero-styled/index.js";
19
19
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
@@ -34,7 +34,7 @@ const StyledInput = styled(Input, styledRootConfig)('');
34
34
  const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
35
35
  const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
36
36
  const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
37
- const props = useThemeProps({
37
+ const props = useDefaultProps({
38
38
  name: 'MuiSelect',
39
39
  props: inProps
40
40
  });