@mui/material 9.0.1 → 9.1.0

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 (206) hide show
  1. package/Accordion/Accordion.d.mts +2 -2
  2. package/Accordion/Accordion.d.ts +2 -2
  3. package/Accordion/Accordion.js +3 -2
  4. package/Accordion/Accordion.mjs +3 -2
  5. package/AccordionSummary/AccordionSummary.js +27 -29
  6. package/AccordionSummary/AccordionSummary.mjs +27 -29
  7. package/Autocomplete/Autocomplete.js +8 -6
  8. package/Autocomplete/Autocomplete.mjs +8 -6
  9. package/Backdrop/Backdrop.d.mts +2 -2
  10. package/Backdrop/Backdrop.d.ts +2 -2
  11. package/Badge/Badge.js +28 -24
  12. package/Badge/Badge.mjs +28 -24
  13. package/BottomNavigationAction/BottomNavigationAction.js +6 -2
  14. package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
  15. package/Button/Button.js +11 -15
  16. package/Button/Button.mjs +11 -15
  17. package/ButtonBase/Ripple.js +21 -11
  18. package/ButtonBase/Ripple.mjs +21 -11
  19. package/ButtonBase/TouchRipple.js +252 -116
  20. package/ButtonBase/TouchRipple.mjs +253 -117
  21. package/CHANGELOG.md +84 -0
  22. package/CardActionArea/CardActionArea.js +2 -1
  23. package/CardActionArea/CardActionArea.mjs +2 -1
  24. package/Chip/Chip.js +2 -1
  25. package/Chip/Chip.mjs +2 -1
  26. package/CircularProgress/CircularProgress.js +85 -55
  27. package/CircularProgress/CircularProgress.mjs +84 -55
  28. package/Collapse/Collapse.d.mts +15 -3
  29. package/Collapse/Collapse.d.ts +15 -3
  30. package/Collapse/Collapse.js +44 -31
  31. package/Collapse/Collapse.mjs +43 -30
  32. package/Dialog/Dialog.d.mts +2 -2
  33. package/Dialog/Dialog.d.ts +2 -2
  34. package/Dialog/Dialog.js +2 -0
  35. package/Dialog/Dialog.mjs +2 -0
  36. package/Drawer/Drawer.d.mts +2 -2
  37. package/Drawer/Drawer.d.ts +2 -2
  38. package/Fab/Fab.js +2 -1
  39. package/Fab/Fab.mjs +2 -1
  40. package/Fade/Fade.d.mts +15 -2
  41. package/Fade/Fade.d.ts +15 -2
  42. package/Fade/Fade.js +46 -19
  43. package/Fade/Fade.mjs +45 -18
  44. package/FilledInput/FilledInput.js +4 -3
  45. package/FilledInput/FilledInput.mjs +4 -3
  46. package/Grow/Grow.d.mts +15 -2
  47. package/Grow/Grow.d.ts +15 -2
  48. package/Grow/Grow.js +45 -28
  49. package/Grow/Grow.mjs +44 -27
  50. package/IconButton/IconButton.js +2 -1
  51. package/IconButton/IconButton.mjs +2 -1
  52. package/Input/Input.js +3 -2
  53. package/Input/Input.mjs +3 -2
  54. package/InputBase/InputBase.js +2 -1
  55. package/InputBase/InputBase.mjs +2 -1
  56. package/InputLabel/InputLabel.js +2 -1
  57. package/InputLabel/InputLabel.mjs +2 -1
  58. package/LICENSE +1 -1
  59. package/LinearProgress/LinearProgress.js +187 -120
  60. package/LinearProgress/LinearProgress.mjs +186 -120
  61. package/ListItem/ListItem.js +2 -1
  62. package/ListItem/ListItem.mjs +2 -1
  63. package/ListItemButton/ListItemButton.js +2 -1
  64. package/ListItemButton/ListItemButton.mjs +2 -1
  65. package/Menu/Menu.d.mts +1 -1
  66. package/Menu/Menu.d.ts +1 -1
  67. package/MobileStepper/MobileStepper.js +2 -1
  68. package/MobileStepper/MobileStepper.mjs +2 -1
  69. package/OutlinedInput/NotchedOutline.js +4 -3
  70. package/OutlinedInput/NotchedOutline.mjs +4 -3
  71. package/PaginationItem/PaginationItem.js +2 -1
  72. package/PaginationItem/PaginationItem.mjs +2 -1
  73. package/Paper/Paper.js +2 -1
  74. package/Paper/Paper.mjs +2 -1
  75. package/Popover/Popover.d.mts +1 -1
  76. package/Popover/Popover.d.ts +1 -1
  77. package/README.md +3 -2
  78. package/Radio/RadioButtonIcon.js +3 -2
  79. package/Radio/RadioButtonIcon.mjs +3 -2
  80. package/Rating/Rating.js +2 -1
  81. package/Rating/Rating.mjs +2 -1
  82. package/Select/SelectInput.js +115 -25
  83. package/Select/SelectInput.mjs +115 -25
  84. package/Select/utils/closedTypeahead.js +73 -0
  85. package/Select/utils/closedTypeahead.mjs +63 -0
  86. package/Skeleton/Skeleton.js +22 -2
  87. package/Skeleton/Skeleton.mjs +22 -2
  88. package/Slide/Slide.d.mts +15 -2
  89. package/Slide/Slide.d.ts +15 -2
  90. package/Slide/Slide.js +53 -25
  91. package/Slide/Slide.mjs +52 -24
  92. package/Slider/Slider.js +4 -3
  93. package/Slider/Slider.mjs +4 -3
  94. package/Slider/useSlider.js +1 -1
  95. package/Slider/useSlider.mjs +1 -1
  96. package/Snackbar/Snackbar.d.mts +2 -2
  97. package/Snackbar/Snackbar.d.ts +2 -2
  98. package/SpeedDial/SpeedDial.d.mts +1 -1
  99. package/SpeedDial/SpeedDial.d.ts +1 -1
  100. package/SpeedDial/SpeedDial.js +6 -2
  101. package/SpeedDial/SpeedDial.mjs +6 -2
  102. package/SpeedDialAction/SpeedDialAction.js +11 -2
  103. package/SpeedDialAction/SpeedDialAction.mjs +12 -3
  104. package/SpeedDialIcon/SpeedDialIcon.js +40 -37
  105. package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
  106. package/Step/Step.js +47 -15
  107. package/Step/Step.mjs +47 -15
  108. package/StepButton/StepButton.js +9 -3
  109. package/StepButton/StepButton.mjs +9 -3
  110. package/StepConnector/StepConnector.js +10 -0
  111. package/StepConnector/StepConnector.mjs +10 -0
  112. package/StepContent/StepContent.d.mts +2 -2
  113. package/StepContent/StepContent.d.ts +2 -2
  114. package/StepContent/StepContent.js +26 -2
  115. package/StepContent/StepContent.mjs +26 -2
  116. package/StepIcon/StepIcon.js +2 -1
  117. package/StepIcon/StepIcon.mjs +2 -1
  118. package/StepLabel/StepLabel.js +52 -7
  119. package/StepLabel/StepLabel.mjs +52 -7
  120. package/Stepper/Stepper.d.mts +2 -0
  121. package/Stepper/Stepper.d.ts +2 -0
  122. package/Stepper/Stepper.js +18 -0
  123. package/Stepper/Stepper.mjs +18 -0
  124. package/SvgIcon/SvgIcon.js +2 -1
  125. package/SvgIcon/SvgIcon.mjs +2 -1
  126. package/SwipeableDrawer/SwipeableDrawer.js +14 -3
  127. package/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
  128. package/Switch/Switch.js +3 -2
  129. package/Switch/Switch.mjs +3 -2
  130. package/TableSortLabel/TableSortLabel.js +2 -1
  131. package/TableSortLabel/TableSortLabel.mjs +2 -1
  132. package/Tabs/Tabs.js +14 -3
  133. package/Tabs/Tabs.mjs +14 -3
  134. package/Tooltip/Tooltip.d.mts +2 -2
  135. package/Tooltip/Tooltip.d.ts +2 -2
  136. package/Tooltip/Tooltip.js +3 -0
  137. package/Tooltip/Tooltip.mjs +3 -0
  138. package/Unstable_TrapFocus/FocusTrap.js +42 -8
  139. package/Unstable_TrapFocus/FocusTrap.mjs +42 -8
  140. package/Zoom/Zoom.d.mts +15 -2
  141. package/Zoom/Zoom.d.ts +15 -2
  142. package/Zoom/Zoom.js +43 -16
  143. package/Zoom/Zoom.mjs +42 -15
  144. package/index.js +1 -1
  145. package/index.mjs +1 -1
  146. package/internal/Transition.d.mts +34 -0
  147. package/internal/Transition.d.ts +34 -0
  148. package/internal/Transition.js +444 -0
  149. package/internal/Transition.mjs +436 -0
  150. package/internal/react-transition-group.d.mts +8 -0
  151. package/internal/react-transition-group.d.ts +8 -0
  152. package/package.json +6 -6
  153. package/styles/createMotion.d.mts +8 -0
  154. package/styles/createMotion.d.ts +8 -0
  155. package/styles/createMotion.js +13 -0
  156. package/styles/createMotion.mjs +7 -0
  157. package/styles/createThemeFoundation.d.mts +2 -0
  158. package/styles/createThemeFoundation.d.ts +2 -0
  159. package/styles/createThemeNoVars.d.mts +3 -0
  160. package/styles/createThemeNoVars.d.ts +3 -0
  161. package/styles/createThemeNoVars.js +5 -0
  162. package/styles/createThemeNoVars.mjs +5 -0
  163. package/styles/createTransitions.d.mts +6 -2
  164. package/styles/createTransitions.d.ts +6 -2
  165. package/styles/createTransitions.js +12 -4
  166. package/styles/createTransitions.mjs +12 -4
  167. package/styles/enhanceHighContrast.d.mts +70 -0
  168. package/styles/enhanceHighContrast.d.ts +70 -0
  169. package/styles/enhanceHighContrast.js +502 -0
  170. package/styles/enhanceHighContrast.mjs +495 -0
  171. package/styles/index.d.mts +2 -0
  172. package/styles/index.d.ts +2 -0
  173. package/styles/index.js +8 -0
  174. package/styles/index.mjs +1 -0
  175. package/styles/reducedMotion.d.mts +7 -0
  176. package/styles/reducedMotion.d.ts +7 -0
  177. package/styles/reducedMotion.js +21 -0
  178. package/styles/reducedMotion.mjs +14 -0
  179. package/styles/shouldSkipGeneratingVar.js +1 -1
  180. package/styles/shouldSkipGeneratingVar.mjs +1 -1
  181. package/styles/stringifyTheme.js +1 -0
  182. package/styles/stringifyTheme.mjs +1 -0
  183. package/transitions/index.d.mts +1 -1
  184. package/transitions/index.d.ts +1 -1
  185. package/transitions/index.js +0 -11
  186. package/transitions/index.mjs +1 -1
  187. package/transitions/transition.d.mts +1 -12
  188. package/transitions/transition.d.ts +1 -12
  189. package/transitions/types.d.mts +73 -0
  190. package/transitions/types.d.ts +73 -0
  191. package/transitions/useReducedMotion.d.mts +14 -0
  192. package/transitions/useReducedMotion.d.ts +14 -0
  193. package/transitions/useReducedMotion.js +117 -0
  194. package/transitions/useReducedMotion.mjs +110 -0
  195. package/transitions/utils.d.mts +34 -2
  196. package/transitions/utils.d.ts +34 -2
  197. package/transitions/utils.js +33 -4
  198. package/transitions/utils.mjs +31 -4
  199. package/useAutocomplete/useAutocomplete.d.mts +8 -1
  200. package/useAutocomplete/useAutocomplete.d.ts +8 -1
  201. package/useAutocomplete/useAutocomplete.js +66 -4
  202. package/useAutocomplete/useAutocomplete.mjs +66 -4
  203. package/version/index.js +3 -3
  204. package/version/index.mjs +3 -3
  205. /package/transitions/{transition.js → types.js} +0 -0
  206. /package/transitions/{transition.mjs → types.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { Theme } from "../styles/index.mjs";
4
- import { TransitionProps } from "../transitions/transition.mjs";
4
+ import { TransitionProps } from "../transitions/types.mjs";
5
5
  import { AccordionClasses } from "./accordionClasses.mjs";
6
6
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
7
7
  import { ExtendPaperTypeMap, PaperProps } from "../Paper/Paper.mjs";
@@ -19,7 +19,7 @@ export interface AccordionSlots {
19
19
  heading: React.ElementType;
20
20
  /**
21
21
  * The component that renders the transition.
22
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
22
+ * [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
23
23
  * @default Collapse
24
24
  */
25
25
  transition: React.ElementType;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { Theme } from "../styles/index.js";
4
- import { TransitionProps } from "../transitions/transition.js";
4
+ import { TransitionProps } from "../transitions/types.js";
5
5
  import { AccordionClasses } from "./accordionClasses.js";
6
6
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
7
7
  import { ExtendPaperTypeMap, PaperProps } from "../Paper/Paper.js";
@@ -19,7 +19,7 @@ export interface AccordionSlots {
19
19
  heading: React.ElementType;
20
20
  /**
21
21
  * The component that renders the transition.
22
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
22
+ * [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
23
23
  * @default Collapse
24
24
  */
25
25
  transition: React.ElementType;
@@ -22,6 +22,7 @@ var _AccordionContext = _interopRequireDefault(require("./AccordionContext"));
22
22
  var _useControlled = _interopRequireDefault(require("../utils/useControlled"));
23
23
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
24
24
  var _accordionClasses = _interopRequireWildcard(require("./accordionClasses"));
25
+ var _utils = require("../transitions/utils");
25
26
  var _jsxRuntime = require("react/jsx-runtime");
26
27
  const useUtilityClasses = ownerState => {
27
28
  const {
@@ -57,7 +58,7 @@ const AccordionRoot = (0, _zeroStyled.styled)(_Paper.default, {
57
58
  };
58
59
  return {
59
60
  position: 'relative',
60
- transition: theme.transitions.create(['margin'], transition),
61
+ ...(0, _utils.getTransitionStyles)(theme, ['margin'], transition),
61
62
  overflowAnchor: 'none',
62
63
  // Keep the same scrolling position
63
64
  '&::before': {
@@ -69,7 +70,7 @@ const AccordionRoot = (0, _zeroStyled.styled)(_Paper.default, {
69
70
  content: '""',
70
71
  opacity: 1,
71
72
  backgroundColor: (theme.vars || theme).palette.divider,
72
- transition: theme.transitions.create(['opacity', 'background-color'], transition)
73
+ ...(0, _utils.getTransitionStyles)(theme, ['opacity', 'background-color'], transition)
73
74
  },
74
75
  '&:first-of-type': {
75
76
  '&::before': {
@@ -15,6 +15,7 @@ import AccordionContext from "./AccordionContext.mjs";
15
15
  import useControlled from "../utils/useControlled.mjs";
16
16
  import useSlot from "../utils/useSlot.mjs";
17
17
  import accordionClasses, { getAccordionUtilityClass } from "./accordionClasses.mjs";
18
+ import { getTransitionStyles } from "../transitions/utils.mjs";
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  const useUtilityClasses = ownerState => {
20
21
  const {
@@ -50,7 +51,7 @@ const AccordionRoot = styled(Paper, {
50
51
  };
51
52
  return {
52
53
  position: 'relative',
53
- transition: theme.transitions.create(['margin'], transition),
54
+ ...getTransitionStyles(theme, ['margin'], transition),
54
55
  overflowAnchor: 'none',
55
56
  // Keep the same scrolling position
56
57
  '&::before': {
@@ -62,7 +63,7 @@ const AccordionRoot = styled(Paper, {
62
63
  content: '""',
63
64
  opacity: 1,
64
65
  backgroundColor: (theme.vars || theme).palette.divider,
65
- transition: theme.transitions.create(['opacity', 'background-color'], transition)
66
+ ...getTransitionStyles(theme, ['opacity', 'background-color'], transition)
66
67
  },
67
68
  '&:first-of-type': {
68
69
  '&::before': {
@@ -16,6 +16,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
16
16
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
17
17
  var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
18
18
  var _AccordionContext = _interopRequireDefault(require("../Accordion/AccordionContext"));
19
+ var _utils = require("../transitions/utils");
19
20
  var _accordionSummaryClasses = _interopRequireWildcard(require("./accordionSummaryClasses"));
20
21
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
21
22
  var _jsxRuntime = require("react/jsx-runtime");
@@ -39,35 +40,32 @@ const AccordionSummaryRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
39
40
  slot: 'Root'
40
41
  })((0, _memoTheme.default)(({
41
42
  theme
42
- }) => {
43
- const transition = {
43
+ }) => ({
44
+ display: 'flex',
45
+ width: '100%',
46
+ minHeight: 48,
47
+ padding: theme.spacing(0, 2),
48
+ ...(0, _utils.getTransitionStyles)(theme, ['min-height', 'background-color'], {
44
49
  duration: theme.transitions.duration.shortest
45
- };
46
- return {
47
- display: 'flex',
48
- width: '100%',
49
- minHeight: 48,
50
- padding: theme.spacing(0, 2),
51
- transition: theme.transitions.create(['min-height', 'background-color'], transition),
52
- [`&.${_accordionSummaryClasses.default.focusVisible}`]: {
53
- backgroundColor: (theme.vars || theme).palette.action.focus
54
- },
55
- [`&.${_accordionSummaryClasses.default.disabled}`]: {
56
- opacity: (theme.vars || theme).palette.action.disabledOpacity
57
- },
58
- [`&:hover:not(.${_accordionSummaryClasses.default.disabled})`]: {
59
- cursor: 'pointer'
60
- },
61
- variants: [{
62
- props: props => !props.disableGutters,
63
- style: {
64
- [`&.${_accordionSummaryClasses.default.expanded}`]: {
65
- minHeight: 64
66
- }
50
+ }),
51
+ [`&.${_accordionSummaryClasses.default.focusVisible}`]: {
52
+ backgroundColor: (theme.vars || theme).palette.action.focus
53
+ },
54
+ [`&.${_accordionSummaryClasses.default.disabled}`]: {
55
+ opacity: (theme.vars || theme).palette.action.disabledOpacity
56
+ },
57
+ [`&:hover:not(.${_accordionSummaryClasses.default.disabled})`]: {
58
+ cursor: 'pointer'
59
+ },
60
+ variants: [{
61
+ props: props => !props.disableGutters,
62
+ style: {
63
+ [`&.${_accordionSummaryClasses.default.expanded}`]: {
64
+ minHeight: 64
67
65
  }
68
- }]
69
- };
70
- }));
66
+ }
67
+ }]
68
+ })));
71
69
  const AccordionSummaryContent = (0, _zeroStyled.styled)('span', {
72
70
  name: 'MuiAccordionSummary',
73
71
  slot: 'Content'
@@ -81,7 +79,7 @@ const AccordionSummaryContent = (0, _zeroStyled.styled)('span', {
81
79
  variants: [{
82
80
  props: props => !props.disableGutters,
83
81
  style: {
84
- transition: theme.transitions.create(['margin'], {
82
+ ...(0, _utils.getTransitionStyles)(theme, ['margin'], {
85
83
  duration: theme.transitions.duration.shortest
86
84
  }),
87
85
  [`&.${_accordionSummaryClasses.default.expanded}`]: {
@@ -99,7 +97,7 @@ const AccordionSummaryExpandIconWrapper = (0, _zeroStyled.styled)('span', {
99
97
  display: 'flex',
100
98
  color: (theme.vars || theme).palette.action.active,
101
99
  transform: 'rotate(0deg)',
102
- transition: theme.transitions.create('transform', {
100
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
103
101
  duration: theme.transitions.duration.shortest
104
102
  }),
105
103
  [`&.${_accordionSummaryClasses.default.expanded}`]: {
@@ -9,6 +9,7 @@ import memoTheme from "../utils/memoTheme.mjs";
9
9
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
10
10
  import ButtonBase from "../ButtonBase/index.mjs";
11
11
  import AccordionContext from "../Accordion/AccordionContext.mjs";
12
+ import { getTransitionStyles } from "../transitions/utils.mjs";
12
13
  import accordionSummaryClasses, { getAccordionSummaryUtilityClass } from "./accordionSummaryClasses.mjs";
13
14
  import useSlot from "../utils/useSlot.mjs";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -32,35 +33,32 @@ const AccordionSummaryRoot = styled(ButtonBase, {
32
33
  slot: 'Root'
33
34
  })(memoTheme(({
34
35
  theme
35
- }) => {
36
- const transition = {
36
+ }) => ({
37
+ display: 'flex',
38
+ width: '100%',
39
+ minHeight: 48,
40
+ padding: theme.spacing(0, 2),
41
+ ...getTransitionStyles(theme, ['min-height', 'background-color'], {
37
42
  duration: theme.transitions.duration.shortest
38
- };
39
- return {
40
- display: 'flex',
41
- width: '100%',
42
- minHeight: 48,
43
- padding: theme.spacing(0, 2),
44
- transition: theme.transitions.create(['min-height', 'background-color'], transition),
45
- [`&.${accordionSummaryClasses.focusVisible}`]: {
46
- backgroundColor: (theme.vars || theme).palette.action.focus
47
- },
48
- [`&.${accordionSummaryClasses.disabled}`]: {
49
- opacity: (theme.vars || theme).palette.action.disabledOpacity
50
- },
51
- [`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
52
- cursor: 'pointer'
53
- },
54
- variants: [{
55
- props: props => !props.disableGutters,
56
- style: {
57
- [`&.${accordionSummaryClasses.expanded}`]: {
58
- minHeight: 64
59
- }
43
+ }),
44
+ [`&.${accordionSummaryClasses.focusVisible}`]: {
45
+ backgroundColor: (theme.vars || theme).palette.action.focus
46
+ },
47
+ [`&.${accordionSummaryClasses.disabled}`]: {
48
+ opacity: (theme.vars || theme).palette.action.disabledOpacity
49
+ },
50
+ [`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
51
+ cursor: 'pointer'
52
+ },
53
+ variants: [{
54
+ props: props => !props.disableGutters,
55
+ style: {
56
+ [`&.${accordionSummaryClasses.expanded}`]: {
57
+ minHeight: 64
60
58
  }
61
- }]
62
- };
63
- }));
59
+ }
60
+ }]
61
+ })));
64
62
  const AccordionSummaryContent = styled('span', {
65
63
  name: 'MuiAccordionSummary',
66
64
  slot: 'Content'
@@ -74,7 +72,7 @@ const AccordionSummaryContent = styled('span', {
74
72
  variants: [{
75
73
  props: props => !props.disableGutters,
76
74
  style: {
77
- transition: theme.transitions.create(['margin'], {
75
+ ...getTransitionStyles(theme, ['margin'], {
78
76
  duration: theme.transitions.duration.shortest
79
77
  }),
80
78
  [`&.${accordionSummaryClasses.expanded}`]: {
@@ -92,7 +90,7 @@ const AccordionSummaryExpandIconWrapper = styled('span', {
92
90
  display: 'flex',
93
91
  color: (theme.vars || theme).palette.action.active,
94
92
  transform: 'rotate(0deg)',
95
- transition: theme.transitions.create('transform', {
93
+ ...getTransitionStyles(theme, 'transform', {
96
94
  duration: theme.transitions.duration.shortest
97
95
  }),
98
96
  [`&.${accordionSummaryClasses.expanded}`]: {
@@ -471,6 +471,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
471
471
  renderInput,
472
472
  renderOption: renderOptionProp,
473
473
  renderValue,
474
+ resetHighlightOnMouseLeave = false,
474
475
  selectOnFocus = !props.freeSolo,
475
476
  size = 'medium',
476
477
  slots = {},
@@ -549,10 +550,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
549
550
  const {
550
551
  onMouseDown: handleInputMouseDown
551
552
  } = getInputProps();
552
- const {
553
- ref: listboxRef,
554
- ...otherListboxProps
555
- } = getListboxProps();
556
553
  const defaultGetOptionLabel = option => option.label ?? option;
557
554
  const getOptionLabel = getOptionLabelProp || defaultGetOptionLabel;
558
555
 
@@ -591,8 +588,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
591
588
  externalForwardedProps,
592
589
  ownerState,
593
590
  className: classes.listbox,
594
- additionalProps: otherListboxProps,
595
- ref: listboxRef
591
+ getSlotProps: getListboxProps
596
592
  });
597
593
  const [PaperSlot, paperProps] = (0, _useSlot.default)('paper', {
598
594
  elementType: _Paper.default,
@@ -1170,6 +1166,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
1170
1166
  * @returns {ReactNode}
1171
1167
  */
1172
1168
  renderValue: _propTypes.default.func,
1169
+ /**
1170
+ * If `true`, clears an option highlighted by mouse movement when the mouse leaves the listbox.
1171
+ * This behavior will be enabled by default in the next major version.
1172
+ * @default false
1173
+ */
1174
+ resetHighlightOnMouseLeave: _propTypes.default.bool,
1173
1175
  /**
1174
1176
  * If `true`, the input's text is selected on focus.
1175
1177
  * It helps the user clear the selected value.
@@ -459,6 +459,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
459
459
  renderInput,
460
460
  renderOption: renderOptionProp,
461
461
  renderValue,
462
+ resetHighlightOnMouseLeave = false,
462
463
  selectOnFocus = !props.freeSolo,
463
464
  size = 'medium',
464
465
  slots = {},
@@ -537,10 +538,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
537
538
  const {
538
539
  onMouseDown: handleInputMouseDown
539
540
  } = getInputProps();
540
- const {
541
- ref: listboxRef,
542
- ...otherListboxProps
543
- } = getListboxProps();
544
541
  const defaultGetOptionLabel = option => option.label ?? option;
545
542
  const getOptionLabel = getOptionLabelProp || defaultGetOptionLabel;
546
543
 
@@ -579,8 +576,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
579
576
  externalForwardedProps,
580
577
  ownerState,
581
578
  className: classes.listbox,
582
- additionalProps: otherListboxProps,
583
- ref: listboxRef
579
+ getSlotProps: getListboxProps
584
580
  });
585
581
  const [PaperSlot, paperProps] = useSlot('paper', {
586
582
  elementType: Paper,
@@ -1158,6 +1154,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
1158
1154
  * @returns {ReactNode}
1159
1155
  */
1160
1156
  renderValue: PropTypes.func,
1157
+ /**
1158
+ * If `true`, clears an option highlighted by mouse movement when the mouse leaves the listbox.
1159
+ * This behavior will be enabled by default in the next major version.
1160
+ * @default false
1161
+ */
1162
+ resetHighlightOnMouseLeave: PropTypes.bool,
1161
1163
  /**
1162
1164
  * If `true`, the input's text is selected on focus.
1163
1165
  * It helps the user clear the selected value.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { FadeProps } from "../Fade/index.mjs";
4
- import { TransitionProps } from "../transitions/transition.mjs";
4
+ import { TransitionProps } from "../transitions/types.mjs";
5
5
  import { Theme } from "../styles/index.mjs";
6
6
  import { BackdropClasses } from "./backdropClasses.mjs";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
@@ -14,7 +14,7 @@ export interface BackdropSlots {
14
14
  root: React.ElementType;
15
15
  /**
16
16
  * The component that renders the transition.
17
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
17
+ * [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
18
18
  * @default Fade
19
19
  */
20
20
  transition: React.ElementType;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { FadeProps } from "../Fade/index.js";
4
- import { TransitionProps } from "../transitions/transition.js";
4
+ import { TransitionProps } from "../transitions/types.js";
5
5
  import { Theme } from "../styles/index.js";
6
6
  import { BackdropClasses } from "./backdropClasses.js";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
@@ -14,7 +14,7 @@ export interface BackdropSlots {
14
14
  root: React.ElementType;
15
15
  /**
16
16
  * The component that renders the transition.
17
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
17
+ * [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
18
18
  * @default Fade
19
19
  */
20
20
  transition: React.ElementType;
package/Badge/Badge.js CHANGED
@@ -20,6 +20,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
20
20
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
21
  var _badgeClasses = _interopRequireWildcard(require("./badgeClasses"));
22
22
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
23
+ var _utils = require("../transitions/utils");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const RADIUS_STANDARD = 10;
25
26
  const RADIUS_DOT = 4;
@@ -81,7 +82,7 @@ const BadgeBadge = (0, _zeroStyled.styled)('span', {
81
82
  '@media (forced-colors: active)': {
82
83
  border: '1px solid ButtonBorder'
83
84
  },
84
- transition: theme.transitions.create('transform', {
85
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
85
86
  easing: theme.transitions.easing.easeInOut,
86
87
  duration: theme.transitions.duration.enteringScreen
87
88
  }),
@@ -108,33 +109,19 @@ const BadgeBadge = (0, _zeroStyled.styled)('span', {
108
109
  invisible: true
109
110
  },
110
111
  style: {
111
- transition: theme.transitions.create('transform', {
112
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
112
113
  easing: theme.transitions.easing.easeInOut,
113
114
  duration: theme.transitions.duration.leavingScreen
114
115
  })
115
116
  }
116
117
  }, {
117
- style: ({
118
- ownerState
119
- }) => {
120
- const {
121
- vertical,
122
- horizontal
123
- } = ownerState.anchorOrigin;
124
- const offset = ownerState.overlap === 'circular' ? '14%' : 0;
125
- return {
126
- '--Badge-translateX': horizontal === 'right' ? '50%' : '-50%',
127
- '--Badge-translateY': vertical === 'top' ? '-50%' : '50%',
128
- top: vertical === 'top' ? offset : 'initial',
129
- bottom: vertical === 'bottom' ? offset : 'initial',
130
- right: horizontal === 'right' ? offset : 'initial',
131
- left: horizontal === 'left' ? offset : 'initial',
132
- transform: 'scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))',
133
- transformOrigin: `${horizontal === 'right' ? '100%' : '0%'} ${vertical === 'top' ? '0%' : '100%'}`,
134
- [`&.${_badgeClasses.default.invisible}`]: {
135
- transform: 'scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))'
136
- }
137
- };
118
+ style: {
119
+ inset: 'var(--Badge-inset)',
120
+ transform: 'scale(1) translate(var(--Badge-translate))',
121
+ transformOrigin: 'var(--Badge-origin)',
122
+ [`&.${_badgeClasses.default.invisible}`]: {
123
+ transform: 'scale(0) translate(var(--Badge-translate))'
124
+ }
138
125
  }
139
126
  }]
140
127
  })));
@@ -223,11 +210,28 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
223
210
  as: component
224
211
  }
225
212
  });
213
+ const {
214
+ vertical,
215
+ horizontal
216
+ } = anchorOrigin;
217
+ const offset = overlap === 'circular' ? '14%' : '0';
218
+ const top = vertical === 'top' ? offset : 'auto';
219
+ const bottom = vertical === 'bottom' ? offset : 'auto';
220
+ const right = horizontal === 'right' ? offset : 'auto';
221
+ const left = horizontal === 'left' ? offset : 'auto';
226
222
  const [BadgeSlot, badgeProps] = (0, _useSlot.default)('badge', {
227
223
  elementType: BadgeBadge,
228
224
  externalForwardedProps,
229
225
  ownerState,
230
- className: classes.badge
226
+ className: classes.badge,
227
+ additionalProps: {
228
+ 'aria-hidden': true,
229
+ style: {
230
+ '--Badge-translate': `${horizontal === 'right' ? '50%' : '-50%'}, ${vertical === 'top' ? '-50%' : '50%'}`,
231
+ '--Badge-inset': `${top} ${right} ${bottom} ${left}`,
232
+ '--Badge-origin': `${horizontal === 'right' ? '100%' : '0%'} ${vertical === 'top' ? '0%' : '100%'}`
233
+ }
234
+ }
231
235
  });
232
236
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
233
237
  ...rootProps,
package/Badge/Badge.mjs CHANGED
@@ -13,6 +13,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
13
13
  import capitalize from "../utils/capitalize.mjs";
14
14
  import badgeClasses, { getBadgeUtilityClass } from "./badgeClasses.mjs";
15
15
  import useSlot from "../utils/useSlot.mjs";
16
+ import { getTransitionStyles } from "../transitions/utils.mjs";
16
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
18
  const RADIUS_STANDARD = 10;
18
19
  const RADIUS_DOT = 4;
@@ -74,7 +75,7 @@ const BadgeBadge = styled('span', {
74
75
  '@media (forced-colors: active)': {
75
76
  border: '1px solid ButtonBorder'
76
77
  },
77
- transition: theme.transitions.create('transform', {
78
+ ...getTransitionStyles(theme, 'transform', {
78
79
  easing: theme.transitions.easing.easeInOut,
79
80
  duration: theme.transitions.duration.enteringScreen
80
81
  }),
@@ -101,33 +102,19 @@ const BadgeBadge = styled('span', {
101
102
  invisible: true
102
103
  },
103
104
  style: {
104
- transition: theme.transitions.create('transform', {
105
+ ...getTransitionStyles(theme, 'transform', {
105
106
  easing: theme.transitions.easing.easeInOut,
106
107
  duration: theme.transitions.duration.leavingScreen
107
108
  })
108
109
  }
109
110
  }, {
110
- style: ({
111
- ownerState
112
- }) => {
113
- const {
114
- vertical,
115
- horizontal
116
- } = ownerState.anchorOrigin;
117
- const offset = ownerState.overlap === 'circular' ? '14%' : 0;
118
- return {
119
- '--Badge-translateX': horizontal === 'right' ? '50%' : '-50%',
120
- '--Badge-translateY': vertical === 'top' ? '-50%' : '50%',
121
- top: vertical === 'top' ? offset : 'initial',
122
- bottom: vertical === 'bottom' ? offset : 'initial',
123
- right: horizontal === 'right' ? offset : 'initial',
124
- left: horizontal === 'left' ? offset : 'initial',
125
- transform: 'scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))',
126
- transformOrigin: `${horizontal === 'right' ? '100%' : '0%'} ${vertical === 'top' ? '0%' : '100%'}`,
127
- [`&.${badgeClasses.invisible}`]: {
128
- transform: 'scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))'
129
- }
130
- };
111
+ style: {
112
+ inset: 'var(--Badge-inset)',
113
+ transform: 'scale(1) translate(var(--Badge-translate))',
114
+ transformOrigin: 'var(--Badge-origin)',
115
+ [`&.${badgeClasses.invisible}`]: {
116
+ transform: 'scale(0) translate(var(--Badge-translate))'
117
+ }
131
118
  }
132
119
  }]
133
120
  })));
@@ -216,11 +203,28 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
216
203
  as: component
217
204
  }
218
205
  });
206
+ const {
207
+ vertical,
208
+ horizontal
209
+ } = anchorOrigin;
210
+ const offset = overlap === 'circular' ? '14%' : '0';
211
+ const top = vertical === 'top' ? offset : 'auto';
212
+ const bottom = vertical === 'bottom' ? offset : 'auto';
213
+ const right = horizontal === 'right' ? offset : 'auto';
214
+ const left = horizontal === 'left' ? offset : 'auto';
219
215
  const [BadgeSlot, badgeProps] = useSlot('badge', {
220
216
  elementType: BadgeBadge,
221
217
  externalForwardedProps,
222
218
  ownerState,
223
- className: classes.badge
219
+ className: classes.badge,
220
+ additionalProps: {
221
+ 'aria-hidden': true,
222
+ style: {
223
+ '--Badge-translate': `${horizontal === 'right' ? '50%' : '-50%'}, ${vertical === 'top' ? '-50%' : '50%'}`,
224
+ '--Badge-inset': `${top} ${right} ${bottom} ${left}`,
225
+ '--Badge-origin': `${horizontal === 'right' ? '100%' : '0%'} ${vertical === 'top' ? '0%' : '100%'}`
226
+ }
227
+ }
224
228
  });
225
229
  return /*#__PURE__*/_jsxs(RootSlot, {
226
230
  ...rootProps,
@@ -16,6 +16,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
16
16
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
17
17
  var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
18
18
  var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
19
+ var _utils = require("../transitions/utils");
19
20
  var _bottomNavigationActionClasses = _interopRequireWildcard(require("./bottomNavigationActionClasses"));
20
21
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
21
22
  var _jsxRuntime = require("react/jsx-runtime");
@@ -43,7 +44,7 @@ const BottomNavigationActionRoot = (0, _zeroStyled.styled)(_ButtonBase.default,
43
44
  })((0, _memoTheme.default)(({
44
45
  theme
45
46
  }) => ({
46
- transition: theme.transitions.create(['color', 'padding-top'], {
47
+ ...(0, _utils.getTransitionStyles)(theme, ['color', 'padding-top'], {
47
48
  duration: theme.transitions.duration.short
48
49
  }),
49
50
  padding: '0px 12px',
@@ -83,7 +84,10 @@ const BottomNavigationActionLabel = (0, _zeroStyled.styled)('span', {
83
84
  fontFamily: theme.typography.fontFamily,
84
85
  fontSize: theme.typography.pxToRem(12),
85
86
  opacity: 1,
86
- transition: 'font-size 0.2s, opacity 0.2s',
87
+ ...(0, _utils.getTransitionStyles)(theme, ['font-size', 'opacity'], {
88
+ duration: '0.2s',
89
+ easing: 'ease'
90
+ }),
87
91
  transitionDelay: '0.1s',
88
92
  [`&.${_bottomNavigationActionClasses.default.selected}`]: {
89
93
  fontSize: theme.typography.pxToRem(14)
@@ -9,6 +9,7 @@ import memoTheme from "../utils/memoTheme.mjs";
9
9
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
10
10
  import ButtonBase from "../ButtonBase/index.mjs";
11
11
  import unsupportedProp from "../utils/unsupportedProp.mjs";
12
+ import { getTransitionStyles } from "../transitions/utils.mjs";
12
13
  import bottomNavigationActionClasses, { getBottomNavigationActionUtilityClass } from "./bottomNavigationActionClasses.mjs";
13
14
  import useSlot from "../utils/useSlot.mjs";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -36,7 +37,7 @@ const BottomNavigationActionRoot = styled(ButtonBase, {
36
37
  })(memoTheme(({
37
38
  theme
38
39
  }) => ({
39
- transition: theme.transitions.create(['color', 'padding-top'], {
40
+ ...getTransitionStyles(theme, ['color', 'padding-top'], {
40
41
  duration: theme.transitions.duration.short
41
42
  }),
42
43
  padding: '0px 12px',
@@ -76,7 +77,10 @@ const BottomNavigationActionLabel = styled('span', {
76
77
  fontFamily: theme.typography.fontFamily,
77
78
  fontSize: theme.typography.pxToRem(12),
78
79
  opacity: 1,
79
- transition: 'font-size 0.2s, opacity 0.2s',
80
+ ...getTransitionStyles(theme, ['font-size', 'opacity'], {
81
+ duration: '0.2s',
82
+ easing: 'ease'
83
+ }),
80
84
  transitionDelay: '0.1s',
81
85
  [`&.${bottomNavigationActionClasses.selected}`]: {
82
86
  fontSize: theme.typography.pxToRem(14)