@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
@@ -10,9 +10,23 @@ import memoTheme from "../utils/memoTheme.mjs";
10
10
  import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.mjs";
11
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
12
12
  import capitalize from "../utils/capitalize.mjs";
13
+ import { getReducedMotionStyles, getTransitionStyles } from "../transitions/utils.mjs";
13
14
  import { getLinearProgressUtilityClass } from "./linearProgressClasses.mjs";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const TRANSITION_DURATION = 4; // seconds
17
+ const EMPTY_STYLE = {};
18
+ let warnedMinMaxWithoutVariant = false;
19
+ let warnedInvalidMinMaxValue = false;
20
+ let warnedValueRequired = false;
21
+ let warnedInvalidMinMaxValueBuffer = false;
22
+ let warnedValueBufferRequired = false;
23
+ export function resetWarningFlags() {
24
+ warnedMinMaxWithoutVariant = false;
25
+ warnedInvalidMinMaxValue = false;
26
+ warnedValueRequired = false;
27
+ warnedInvalidMinMaxValueBuffer = false;
28
+ warnedValueBufferRequired = false;
29
+ }
16
30
  const indeterminate1Keyframe = keyframes`
17
31
  0% {
18
32
  left: -35%;
@@ -188,7 +202,11 @@ const LinearProgressDashed = styled('span', {
188
202
  })), bufferAnimation || {
189
203
  // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
190
204
  animation: `${bufferKeyframe} 3s infinite linear`
191
- });
205
+ }, memoTheme(({
206
+ theme
207
+ }) => getReducedMotionStyles(theme, {
208
+ animation: 'none'
209
+ }) || EMPTY_STYLE));
192
210
  const LinearProgressBar1 = styled('span', {
193
211
  name: 'MuiLinearProgress',
194
212
  slot: 'Bar1',
@@ -197,59 +215,81 @@ const LinearProgressBar1 = styled('span', {
197
215
  }
198
216
  })(memoTheme(({
199
217
  theme
200
- }) => ({
201
- width: '100%',
202
- position: 'absolute',
203
- left: 0,
204
- bottom: 0,
205
- top: 0,
206
- transition: 'transform 0.2s linear',
207
- transformOrigin: 'left',
208
- variants: [{
209
- props: {
210
- color: 'inherit'
211
- },
212
- style: {
213
- backgroundColor: 'currentColor'
214
- }
215
- }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
216
- props: {
217
- color
218
- },
219
- style: {
220
- backgroundColor: (theme.vars || theme).palette[color].main
221
- }
222
- })), {
223
- props: {
224
- variant: 'determinate'
225
- },
226
- style: {
227
- transition: `transform .${TRANSITION_DURATION}s linear`
228
- }
229
- }, {
230
- props: {
231
- variant: 'buffer'
232
- },
233
- style: {
234
- zIndex: 1,
235
- transition: `transform .${TRANSITION_DURATION}s linear`
236
- }
237
- }, {
238
- props: ({
239
- ownerState
240
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
241
- style: {
242
- width: 'auto'
243
- }
244
- }, {
245
- props: ({
246
- ownerState
247
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
248
- style: indeterminate1Animation || {
249
- animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
250
- }
251
- }]
252
- })));
218
+ }) => {
219
+ const reducedMotionIndeterminateStyles = getReducedMotionStyles(theme, {
220
+ animation: 'none',
221
+ left: '30%',
222
+ right: 'auto',
223
+ width: '40%'
224
+ });
225
+ return {
226
+ width: '100%',
227
+ position: 'absolute',
228
+ left: 0,
229
+ bottom: 0,
230
+ top: 0,
231
+ ...getTransitionStyles(theme, 'transform', {
232
+ duration: '0.2s',
233
+ easing: 'linear'
234
+ }),
235
+ transformOrigin: 'left',
236
+ variants: [{
237
+ props: {
238
+ color: 'inherit'
239
+ },
240
+ style: {
241
+ backgroundColor: 'currentColor'
242
+ }
243
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
244
+ props: {
245
+ color
246
+ },
247
+ style: {
248
+ backgroundColor: (theme.vars || theme).palette[color].main
249
+ }
250
+ })), {
251
+ props: {
252
+ variant: 'determinate'
253
+ },
254
+ style: {
255
+ ...getTransitionStyles(theme, 'transform', {
256
+ duration: `.${TRANSITION_DURATION}s`,
257
+ easing: 'linear'
258
+ })
259
+ }
260
+ }, {
261
+ props: {
262
+ variant: 'buffer'
263
+ },
264
+ style: {
265
+ zIndex: 1,
266
+ ...getTransitionStyles(theme, 'transform', {
267
+ duration: `.${TRANSITION_DURATION}s`,
268
+ easing: 'linear'
269
+ })
270
+ }
271
+ }, {
272
+ props: ({
273
+ ownerState
274
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
275
+ style: {
276
+ width: 'auto'
277
+ }
278
+ }, {
279
+ props: ({
280
+ ownerState
281
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
282
+ style: indeterminate1Animation || {
283
+ animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
284
+ }
285
+ }, ...(reducedMotionIndeterminateStyles ? [{
286
+ props: ({
287
+ ownerState
288
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
289
+ style: reducedMotionIndeterminateStyles
290
+ }] : [])]
291
+ };
292
+ }));
253
293
  const LinearProgressBar2 = styled('span', {
254
294
  name: 'MuiLinearProgress',
255
295
  slot: 'Bar2',
@@ -258,67 +298,84 @@ const LinearProgressBar2 = styled('span', {
258
298
  }
259
299
  })(memoTheme(({
260
300
  theme
261
- }) => ({
262
- width: '100%',
263
- position: 'absolute',
264
- left: 0,
265
- bottom: 0,
266
- top: 0,
267
- transition: 'transform 0.2s linear',
268
- transformOrigin: 'left',
269
- variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
270
- props: {
271
- color
272
- },
273
- style: {
274
- '--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main
275
- }
276
- })), {
277
- props: ({
278
- ownerState
279
- }) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
280
- style: {
281
- backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
282
- }
283
- }, {
284
- props: ({
285
- ownerState
286
- }) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
287
- style: {
288
- backgroundColor: 'currentColor'
289
- }
290
- }, {
291
- props: {
292
- color: 'inherit'
293
- },
294
- style: {
295
- opacity: 0.3
296
- }
297
- }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
298
- props: {
299
- color,
300
- variant: 'buffer'
301
- },
302
- style: {
303
- backgroundColor: getColorShade(theme, color),
304
- transition: `transform .${TRANSITION_DURATION}s linear`
305
- }
306
- })), {
307
- props: ({
308
- ownerState
309
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
310
- style: {
311
- width: 'auto'
312
- }
313
- }, {
314
- props: ({
315
- ownerState
316
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
317
- style: indeterminate2Animation || {
318
- animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
319
- }
320
- }]
321
- })));
301
+ }) => {
302
+ const reducedMotionIndeterminateStyles = getReducedMotionStyles(theme, {
303
+ animation: 'none',
304
+ display: 'none'
305
+ });
306
+ return {
307
+ width: '100%',
308
+ position: 'absolute',
309
+ left: 0,
310
+ bottom: 0,
311
+ top: 0,
312
+ ...getTransitionStyles(theme, 'transform', {
313
+ duration: '0.2s',
314
+ easing: 'linear'
315
+ }),
316
+ transformOrigin: 'left',
317
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
318
+ props: {
319
+ color
320
+ },
321
+ style: {
322
+ '--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main
323
+ }
324
+ })), {
325
+ props: ({
326
+ ownerState
327
+ }) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
328
+ style: {
329
+ backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
330
+ }
331
+ }, {
332
+ props: ({
333
+ ownerState
334
+ }) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
335
+ style: {
336
+ backgroundColor: 'currentColor'
337
+ }
338
+ }, {
339
+ props: {
340
+ color: 'inherit'
341
+ },
342
+ style: {
343
+ opacity: 0.3
344
+ }
345
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
346
+ props: {
347
+ color,
348
+ variant: 'buffer'
349
+ },
350
+ style: {
351
+ backgroundColor: getColorShade(theme, color),
352
+ ...getTransitionStyles(theme, 'transform', {
353
+ duration: `.${TRANSITION_DURATION}s`,
354
+ easing: 'linear'
355
+ })
356
+ }
357
+ })), {
358
+ props: ({
359
+ ownerState
360
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
361
+ style: {
362
+ width: 'auto'
363
+ }
364
+ }, {
365
+ props: ({
366
+ ownerState
367
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
368
+ style: indeterminate2Animation || {
369
+ animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
370
+ }
371
+ }, ...(reducedMotionIndeterminateStyles ? [{
372
+ props: ({
373
+ ownerState
374
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
375
+ style: reducedMotionIndeterminateStyles
376
+ }] : [])]
377
+ };
378
+ }));
322
379
 
323
380
  /**
324
381
  * ## ARIA
@@ -348,8 +405,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
348
405
  variant
349
406
  };
350
407
  if (process.env.NODE_ENV !== 'production') {
351
- if (['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
408
+ if (!warnedMinMaxWithoutVariant && ['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
352
409
  console.warn(`MUI: You have provided the \`min\` or \`max\` props with an 'indeterminate' or 'query' variant. These props will have no effect.`);
410
+ warnedMinMaxWithoutVariant = true;
353
411
  }
354
412
  }
355
413
  const min = minProp ?? 0;
@@ -364,8 +422,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
364
422
  if (variant === 'determinate' || variant === 'buffer') {
365
423
  if (value !== undefined) {
366
424
  if (process.env.NODE_ENV !== 'production') {
367
- if (value < min || value > max || min >= max) {
425
+ if (!warnedInvalidMinMaxValue && (value < min || value > max || min >= max)) {
368
426
  console.error(`MUI: The min, max, and value props in LinearProgress should be numbers where min < max and min <= value <= max. Received min=${min}, max=${max}, value=${value}.`);
427
+ warnedInvalidMinMaxValue = true;
369
428
  }
370
429
  }
371
430
  const range = max - min;
@@ -379,14 +438,18 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
379
438
  rootProps['aria-valuemin'] = min;
380
439
  rootProps['aria-valuemax'] = max;
381
440
  } else if (process.env.NODE_ENV !== 'production') {
382
- console.error('MUI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress.');
441
+ if (!warnedValueRequired) {
442
+ console.error('MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress.');
443
+ warnedValueRequired = true;
444
+ }
383
445
  }
384
446
  }
385
447
  if (variant === 'buffer') {
386
448
  if (valueBuffer !== undefined) {
387
449
  if (process.env.NODE_ENV !== 'production') {
388
- if (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max) {
450
+ if (!warnedInvalidMinMaxValueBuffer && (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max)) {
389
451
  console.error(`MUI: The min, max, value, and valueBuffer props in LinearProgress should be numbers where min < max and min <= value <= valueBuffer <= max. Received min=${min}, max=${max}, value=${value}, valueBuffer=${valueBuffer}.`);
452
+ warnedInvalidMinMaxValueBuffer = true;
390
453
  }
391
454
  }
392
455
  const range = max - min;
@@ -396,7 +459,10 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
396
459
  }
397
460
  inlineStyles.bar2.transform = range > 0 ? `translateX(${transform}%)` : 'translateX(-100%)'; // empty-state fallback when range is invalid
398
461
  } else if (process.env.NODE_ENV !== 'production') {
399
- console.error('MUI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');
462
+ if (!warnedValueBufferRequired) {
463
+ console.error('MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.');
464
+ warnedValueBufferRequired = true;
465
+ }
400
466
  }
401
467
  }
402
468
  return /*#__PURE__*/_jsxs(LinearProgressRoot, {
@@ -19,6 +19,7 @@ var _ListContext = _interopRequireDefault(require("../List/ListContext"));
19
19
  var _listItemClasses = require("./listItemClasses");
20
20
  var _ListItemButton = require("../ListItemButton");
21
21
  var _ListItemSecondaryAction = _interopRequireDefault(require("../ListItemSecondaryAction"));
22
+ var _utils = require("../transitions/utils");
22
23
  var _jsxRuntime = require("react/jsx-runtime");
23
24
  const overridesResolver = (props, styles) => {
24
25
  const {
@@ -119,7 +120,7 @@ const ListItemRoot = exports.ListItemRoot = (0, _zeroStyled.styled)('div', {
119
120
  ownerState
120
121
  }) => ownerState.button,
121
122
  style: {
122
- transition: theme.transitions.create('background-color', {
123
+ ...(0, _utils.getTransitionStyles)(theme, 'background-color', {
123
124
  duration: theme.transitions.duration.shortest
124
125
  }),
125
126
  '&:hover': {
@@ -12,6 +12,7 @@ import ListContext from "../List/ListContext.mjs";
12
12
  import { getListItemUtilityClass } from "./listItemClasses.mjs";
13
13
  import { listItemButtonClasses } from "../ListItemButton/index.mjs";
14
14
  import ListItemSecondaryAction from "../ListItemSecondaryAction/index.mjs";
15
+ import { getTransitionStyles } from "../transitions/utils.mjs";
15
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
17
  export const overridesResolver = (props, styles) => {
17
18
  const {
@@ -111,7 +112,7 @@ export const ListItemRoot = styled('div', {
111
112
  ownerState
112
113
  }) => ownerState.button,
113
114
  style: {
114
- transition: theme.transitions.create('background-color', {
115
+ ...getTransitionStyles(theme, 'background-color', {
115
116
  duration: theme.transitions.duration.shortest
116
117
  }),
117
118
  '&:hover': {
@@ -20,6 +20,7 @@ var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEff
20
20
  var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
21
21
  var _ListContext = _interopRequireDefault(require("../List/ListContext"));
22
22
  var _listItemButtonClasses = _interopRequireWildcard(require("./listItemButtonClasses"));
23
+ var _utils = require("../transitions/utils");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const overridesResolver = (props, styles) => {
25
26
  const {
@@ -66,7 +67,7 @@ const ListItemButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
66
67
  textAlign: 'left',
67
68
  paddingTop: 8,
68
69
  paddingBottom: 8,
69
- transition: theme.transitions.create('background-color', {
70
+ ...(0, _utils.getTransitionStyles)(theme, 'background-color', {
70
71
  duration: theme.transitions.duration.shortest
71
72
  }),
72
73
  '&:hover': {
@@ -13,6 +13,7 @@ import useEnhancedEffect from "../utils/useEnhancedEffect.mjs";
13
13
  import useForkRef from "../utils/useForkRef.mjs";
14
14
  import ListContext from "../List/ListContext.mjs";
15
15
  import listItemButtonClasses, { getListItemButtonUtilityClass } from "./listItemButtonClasses.mjs";
16
+ import { getTransitionStyles } from "../transitions/utils.mjs";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  export const overridesResolver = (props, styles) => {
18
19
  const {
@@ -58,7 +59,7 @@ const ListItemButtonRoot = styled(ButtonBase, {
58
59
  textAlign: 'left',
59
60
  paddingTop: 8,
60
61
  paddingBottom: 8,
61
- transition: theme.transitions.create('background-color', {
62
+ ...getTransitionStyles(theme, 'background-color', {
62
63
  duration: theme.transitions.duration.shortest
63
64
  }),
64
65
  '&:hover': {
package/Menu/Menu.d.mts CHANGED
@@ -7,7 +7,7 @@ import { PopoverProps } from "../Popover/index.mjs";
7
7
  import { MenuListProps } from "../MenuList/index.mjs";
8
8
  import { ModalProps } from "../Modal/index.mjs";
9
9
  import { BackdropProps } from "../Backdrop/index.mjs";
10
- import { TransitionProps } from "../transitions/transition.mjs";
10
+ import { TransitionProps } from "../transitions/types.mjs";
11
11
  import { MenuClasses } from "./menuClasses.mjs";
12
12
  import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.mjs";
13
13
  export interface MenuRootSlotPropsOverrides {}
package/Menu/Menu.d.ts CHANGED
@@ -7,7 +7,7 @@ import { PopoverProps } from "../Popover/index.js";
7
7
  import { MenuListProps } from "../MenuList/index.js";
8
8
  import { ModalProps } from "../Modal/index.js";
9
9
  import { BackdropProps } from "../Backdrop/index.js";
10
- import { TransitionProps } from "../transitions/transition.js";
10
+ import { TransitionProps } from "../transitions/types.js";
11
11
  import { MenuClasses } from "./menuClasses.js";
12
12
  import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
13
13
  export interface MenuRootSlotPropsOverrides {}
@@ -21,6 +21,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
21
21
  var _slotShouldForwardProp = _interopRequireDefault(require("../styles/slotShouldForwardProp"));
22
22
  var _mobileStepperClasses = require("./mobileStepperClasses");
23
23
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
24
+ var _utils = require("../transitions/utils");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const useUtilityClasses = ownerState => {
26
27
  const {
@@ -112,7 +113,7 @@ const MobileStepperDot = (0, _zeroStyled.styled)('div', {
112
113
  variant: 'dots'
113
114
  },
114
115
  style: {
115
- transition: theme.transitions.create('background-color', {
116
+ ...(0, _utils.getTransitionStyles)(theme, 'background-color', {
116
117
  duration: theme.transitions.duration.shortest
117
118
  }),
118
119
  backgroundColor: (theme.vars || theme).palette.action.disabled,
@@ -14,6 +14,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
14
14
  import slotShouldForwardProp from "../styles/slotShouldForwardProp.mjs";
15
15
  import { getMobileStepperUtilityClass } from "./mobileStepperClasses.mjs";
16
16
  import useSlot from "../utils/useSlot.mjs";
17
+ import { getTransitionStyles } from "../transitions/utils.mjs";
17
18
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -105,7 +106,7 @@ const MobileStepperDot = styled('div', {
105
106
  variant: 'dots'
106
107
  },
107
108
  style: {
108
- transition: theme.transitions.create('background-color', {
109
+ ...getTransitionStyles(theme, 'background-color', {
109
110
  duration: theme.transitions.duration.shortest
110
111
  }),
111
112
  backgroundColor: (theme.vars || theme).palette.action.disabled,
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
11
11
  var _zeroStyled = require("../zero-styled");
12
12
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
13
+ var _utils = require("../transitions/utils");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  var _span;
15
16
  const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
@@ -51,7 +52,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
51
52
  padding: 0,
52
53
  lineHeight: '11px',
53
54
  // sync with `height` in `legend` styles
54
- transition: theme.transitions.create('width', {
55
+ ...(0, _utils.getTransitionStyles)(theme, 'width', {
55
56
  duration: 150,
56
57
  easing: theme.transitions.easing.easeOut
57
58
  })
@@ -69,7 +70,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
69
70
  fontSize: '0.75em',
70
71
  visibility: 'hidden',
71
72
  maxWidth: 0.01,
72
- transition: theme.transitions.create('max-width', {
73
+ ...(0, _utils.getTransitionStyles)(theme, 'max-width', {
73
74
  duration: 50,
74
75
  easing: theme.transitions.easing.easeOut
75
76
  }),
@@ -88,7 +89,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
88
89
  }) => ownerState.withLabel && ownerState.notched,
89
90
  style: {
90
91
  maxWidth: '100%',
91
- transition: theme.transitions.create('max-width', {
92
+ ...(0, _utils.getTransitionStyles)(theme, 'max-width', {
92
93
  duration: 100,
93
94
  easing: theme.transitions.easing.easeOut,
94
95
  delay: 50
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
6
6
  import { styled } from "../zero-styled/index.mjs";
7
7
  import memoTheme from "../utils/memoTheme.mjs";
8
+ import { getTransitionStyles } from "../transitions/utils.mjs";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  const NotchedOutlineRoot = styled('fieldset', {
10
11
  name: 'MuiNotchedOutlined',
@@ -45,7 +46,7 @@ const NotchedOutlineLegend = styled('legend', {
45
46
  padding: 0,
46
47
  lineHeight: '11px',
47
48
  // sync with `height` in `legend` styles
48
- transition: theme.transitions.create('width', {
49
+ ...getTransitionStyles(theme, 'width', {
49
50
  duration: 150,
50
51
  easing: theme.transitions.easing.easeOut
51
52
  })
@@ -63,7 +64,7 @@ const NotchedOutlineLegend = styled('legend', {
63
64
  fontSize: '0.75em',
64
65
  visibility: 'hidden',
65
66
  maxWidth: 0.01,
66
- transition: theme.transitions.create('max-width', {
67
+ ...getTransitionStyles(theme, 'max-width', {
67
68
  duration: 50,
68
69
  easing: theme.transitions.easing.easeOut
69
70
  }),
@@ -82,7 +83,7 @@ const NotchedOutlineLegend = styled('legend', {
82
83
  }) => ownerState.withLabel && ownerState.notched,
83
84
  style: {
84
85
  maxWidth: '100%',
85
- transition: theme.transitions.create('max-width', {
86
+ ...getTransitionStyles(theme, 'max-width', {
86
87
  duration: 100,
87
88
  easing: theme.transitions.easing.easeOut,
88
89
  delay: 50
@@ -24,6 +24,7 @@ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
24
24
  var _zeroStyled = require("../zero-styled");
25
25
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
26
26
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
27
+ var _utils = require("../transitions/utils");
27
28
  var _jsxRuntime = require("react/jsx-runtime");
28
29
  const overridesResolver = (props, styles) => {
29
30
  const {
@@ -119,7 +120,7 @@ const PaginationItemPage = (0, _zeroStyled.styled)(_ButtonBase.default, {
119
120
  [`&.${_paginationItemClasses.default.disabled}`]: {
120
121
  opacity: (theme.vars || theme).palette.action.disabledOpacity
121
122
  },
122
- transition: theme.transitions.create(['color', 'background-color'], {
123
+ ...(0, _utils.getTransitionStyles)(theme, ['color', 'background-color'], {
123
124
  duration: theme.transitions.duration.short
124
125
  }),
125
126
  '&:hover': {
@@ -17,6 +17,7 @@ import useSlot from "../utils/useSlot.mjs";
17
17
  import { styled } from "../zero-styled/index.mjs";
18
18
  import memoTheme from "../utils/memoTheme.mjs";
19
19
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
20
+ import { getTransitionStyles } from "../transitions/utils.mjs";
20
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
22
  const overridesResolver = (props, styles) => {
22
23
  const {
@@ -112,7 +113,7 @@ const PaginationItemPage = styled(ButtonBase, {
112
113
  [`&.${paginationItemClasses.disabled}`]: {
113
114
  opacity: (theme.vars || theme).palette.action.disabledOpacity
114
115
  },
115
- transition: theme.transitions.create(['color', 'background-color'], {
116
+ ...getTransitionStyles(theme, ['color', 'background-color'], {
116
117
  duration: theme.transitions.duration.short
117
118
  }),
118
119
  '&:hover': {
package/Paper/Paper.js CHANGED
@@ -19,6 +19,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
19
19
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
20
20
  var _getOverlayAlpha = _interopRequireDefault(require("../styles/getOverlayAlpha"));
21
21
  var _paperClasses = require("./paperClasses");
22
+ var _utils = require("../transitions/utils");
22
23
  var _jsxRuntime = require("react/jsx-runtime");
23
24
  const useUtilityClasses = ownerState => {
24
25
  const {
@@ -46,7 +47,7 @@ const PaperRoot = (0, _zeroStyled.styled)('div', {
46
47
  }) => ({
47
48
  backgroundColor: (theme.vars || theme).palette.background.paper,
48
49
  color: (theme.vars || theme).palette.text.primary,
49
- transition: theme.transitions.create('box-shadow'),
50
+ ...(0, _utils.getTransitionStyles)(theme, 'box-shadow'),
50
51
  variants: [{
51
52
  props: ({
52
53
  ownerState
package/Paper/Paper.mjs CHANGED
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.mjs";
12
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
13
13
  import getOverlayAlpha from "../styles/getOverlayAlpha.mjs";
14
14
  import { getPaperUtilityClass } from "./paperClasses.mjs";
15
+ import { getTransitionStyles } from "../transitions/utils.mjs";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  const useUtilityClasses = ownerState => {
17
18
  const {
@@ -39,7 +40,7 @@ const PaperRoot = styled('div', {
39
40
  }) => ({
40
41
  backgroundColor: (theme.vars || theme).palette.background.paper,
41
42
  color: (theme.vars || theme).palette.text.primary,
42
- transition: theme.transitions.create('box-shadow'),
43
+ ...getTransitionStyles(theme, 'box-shadow'),
43
44
  variants: [{
44
45
  props: ({
45
46
  ownerState
@@ -6,7 +6,7 @@ import { Theme } from "../styles/index.mjs";
6
6
  import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
7
7
  import { PaperProps } from "../Paper/index.mjs";
8
8
  import { ModalProps } from "../Modal/index.mjs";
9
- import { TransitionProps } from "../transitions/transition.mjs";
9
+ import { TransitionProps } from "../transitions/types.mjs";
10
10
  import { PopoverClasses } from "./popoverClasses.mjs";
11
11
  import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
12
12
  export interface PopoverSlots {