@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
package/Input/Input.js CHANGED
@@ -20,6 +20,7 @@ var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/c
20
20
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
21
21
  var _inputLabelClasses = _interopRequireDefault(require("../InputLabel/inputLabelClasses"));
22
22
  var _inputClasses = _interopRequireWildcard(require("./inputClasses"));
23
+ var _utils = require("../transitions/utils");
23
24
  var _InputBase2 = require("../InputBase/InputBase");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const useUtilityClasses = ownerState => {
@@ -79,7 +80,7 @@ const InputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
79
80
  position: 'absolute',
80
81
  right: 0,
81
82
  transform: 'scaleX(0)',
82
- transition: theme.transitions.create('transform', {
83
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
83
84
  duration: theme.transitions.duration.shorter,
84
85
  easing: theme.transitions.easing.easeOut
85
86
  }),
@@ -102,7 +103,7 @@ const InputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
102
103
  content: '""',
103
104
  position: 'absolute',
104
105
  right: 0,
105
- transition: theme.transitions.create('border-bottom-color', {
106
+ ...(0, _utils.getTransitionStyles)(theme, 'border-bottom-color', {
106
107
  duration: theme.transitions.duration.shorter
107
108
  }),
108
109
  pointerEvents: 'none' // Transparent to the hover style.
package/Input/Input.mjs CHANGED
@@ -13,6 +13,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
13
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
14
14
  import inputLabelClasses from "../InputLabel/inputLabelClasses.mjs";
15
15
  import inputClasses, { getInputUtilityClass } from "./inputClasses.mjs";
16
+ import { getTransitionStyles } from "../transitions/utils.mjs";
16
17
  import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.mjs";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
@@ -72,7 +73,7 @@ const InputRoot = styled(InputBaseRoot, {
72
73
  position: 'absolute',
73
74
  right: 0,
74
75
  transform: 'scaleX(0)',
75
- transition: theme.transitions.create('transform', {
76
+ ...getTransitionStyles(theme, 'transform', {
76
77
  duration: theme.transitions.duration.shorter,
77
78
  easing: theme.transitions.easing.easeOut
78
79
  }),
@@ -95,7 +96,7 @@ const InputRoot = styled(InputBaseRoot, {
95
96
  content: '""',
96
97
  position: 'absolute',
97
98
  right: 0,
98
- transition: theme.transitions.create('border-bottom-color', {
99
+ ...getTransitionStyles(theme, 'border-bottom-color', {
99
100
  duration: theme.transitions.duration.shorter
100
101
  }),
101
102
  pointerEvents: 'none' // Transparent to the hover style.
@@ -28,6 +28,7 @@ var _ownerDocument = _interopRequireDefault(require("../utils/ownerDocument"));
28
28
  var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElement"));
29
29
  var _utils = require("./utils");
30
30
  var _inputBaseClasses = _interopRequireWildcard(require("./inputBaseClasses"));
31
+ var _utils2 = require("../transitions/utils");
31
32
  var _jsxRuntime = require("react/jsx-runtime");
32
33
  var _InputGlobalStyles;
33
34
  const MUI_AUTO_FILL = 'mui-auto-fill';
@@ -129,7 +130,7 @@ const InputBaseInput = exports.InputBaseInput = (0, _zeroStyled.styled)('input',
129
130
  } : {
130
131
  opacity: light ? 0.42 : 0.5
131
132
  }),
132
- transition: theme.transitions.create('opacity', {
133
+ ...(0, _utils2.getTransitionStyles)(theme, 'opacity', {
133
134
  duration: theme.transitions.duration.shorter
134
135
  })
135
136
  };
@@ -22,6 +22,7 @@ import ownerDocument from "../utils/ownerDocument.mjs";
22
22
  import getActiveElement from "../utils/getActiveElement.mjs";
23
23
  import { isFilled } from "./utils.mjs";
24
24
  import inputBaseClasses, { getInputBaseUtilityClass } from "./inputBaseClasses.mjs";
25
+ import { getTransitionStyles } from "../transitions/utils.mjs";
25
26
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
27
  const MUI_AUTO_FILL = 'mui-auto-fill';
27
28
  const MUI_AUTO_FILL_CANCEL = 'mui-auto-fill-cancel';
@@ -120,7 +121,7 @@ export const InputBaseInput = styled('input', {
120
121
  } : {
121
122
  opacity: light ? 0.42 : 0.5
122
123
  }),
123
- transition: theme.transitions.create('opacity', {
124
+ ...getTransitionStyles(theme, 'opacity', {
124
125
  duration: theme.transitions.duration.shorter
125
126
  })
126
127
  };
@@ -19,6 +19,7 @@ var _zeroStyled = require("../zero-styled");
19
19
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
20
20
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
21
21
  var _inputLabelClasses = require("./inputLabelClasses");
22
+ var _utils = require("../transitions/utils");
22
23
  var _jsxRuntime = require("react/jsx-runtime");
23
24
  const useUtilityClasses = ownerState => {
24
25
  const {
@@ -95,7 +96,7 @@ const InputLabelRoot = (0, _zeroStyled.styled)(_FormLabel.default, {
95
96
  ownerState
96
97
  }) => !ownerState.disableAnimation,
97
98
  style: {
98
- transition: theme.transitions.create(['color', 'transform', 'max-width'], {
99
+ ...(0, _utils.getTransitionStyles)(theme, ['color', 'transform', 'max-width'], {
99
100
  duration: theme.transitions.duration.shorter,
100
101
  easing: theme.transitions.easing.easeOut
101
102
  })
@@ -12,6 +12,7 @@ import { styled } from "../zero-styled/index.mjs";
12
12
  import memoTheme from "../utils/memoTheme.mjs";
13
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
14
14
  import { getInputLabelUtilityClasses } from "./inputLabelClasses.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 {
@@ -88,7 +89,7 @@ const InputLabelRoot = styled(FormLabel, {
88
89
  ownerState
89
90
  }) => !ownerState.disableAnimation,
90
91
  style: {
91
- transition: theme.transitions.create(['color', 'transform', 'max-width'], {
92
+ ...getTransitionStyles(theme, ['color', 'transform', 'max-width'], {
92
93
  duration: theme.transitions.duration.shorter,
93
94
  easing: theme.transitions.easing.easeOut
94
95
  })
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
3
  Copyright (c) 2014 Call-Em-All
4
4
 
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.default = void 0;
10
+ exports.resetWarningFlags = resetWarningFlags;
10
11
  var React = _interopRequireWildcard(require("react"));
11
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
13
  var _clsx = _interopRequireDefault(require("clsx"));
@@ -17,9 +18,23 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
17
18
  var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/createSimplePaletteValueFilter"));
18
19
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
19
20
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
+ var _utils = require("../transitions/utils");
20
22
  var _linearProgressClasses = require("./linearProgressClasses");
21
23
  var _jsxRuntime = require("react/jsx-runtime");
22
24
  const TRANSITION_DURATION = 4; // seconds
25
+ const EMPTY_STYLE = {};
26
+ let warnedMinMaxWithoutVariant = false;
27
+ let warnedInvalidMinMaxValue = false;
28
+ let warnedValueRequired = false;
29
+ let warnedInvalidMinMaxValueBuffer = false;
30
+ let warnedValueBufferRequired = false;
31
+ function resetWarningFlags() {
32
+ warnedMinMaxWithoutVariant = false;
33
+ warnedInvalidMinMaxValue = false;
34
+ warnedValueRequired = false;
35
+ warnedInvalidMinMaxValueBuffer = false;
36
+ warnedValueBufferRequired = false;
37
+ }
23
38
  const indeterminate1Keyframe = (0, _zeroStyled.keyframes)`
24
39
  0% {
25
40
  left: -35%;
@@ -195,7 +210,11 @@ const LinearProgressDashed = (0, _zeroStyled.styled)('span', {
195
210
  })), bufferAnimation || {
196
211
  // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
197
212
  animation: `${bufferKeyframe} 3s infinite linear`
198
- });
213
+ }, (0, _memoTheme.default)(({
214
+ theme
215
+ }) => (0, _utils.getReducedMotionStyles)(theme, {
216
+ animation: 'none'
217
+ }) || EMPTY_STYLE));
199
218
  const LinearProgressBar1 = (0, _zeroStyled.styled)('span', {
200
219
  name: 'MuiLinearProgress',
201
220
  slot: 'Bar1',
@@ -204,59 +223,81 @@ const LinearProgressBar1 = (0, _zeroStyled.styled)('span', {
204
223
  }
205
224
  })((0, _memoTheme.default)(({
206
225
  theme
207
- }) => ({
208
- width: '100%',
209
- position: 'absolute',
210
- left: 0,
211
- bottom: 0,
212
- top: 0,
213
- transition: 'transform 0.2s linear',
214
- transformOrigin: 'left',
215
- variants: [{
216
- props: {
217
- color: 'inherit'
218
- },
219
- style: {
220
- backgroundColor: 'currentColor'
221
- }
222
- }, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
223
- props: {
224
- color
225
- },
226
- style: {
227
- backgroundColor: (theme.vars || theme).palette[color].main
228
- }
229
- })), {
230
- props: {
231
- variant: 'determinate'
232
- },
233
- style: {
234
- transition: `transform .${TRANSITION_DURATION}s linear`
235
- }
236
- }, {
237
- props: {
238
- variant: 'buffer'
239
- },
240
- style: {
241
- zIndex: 1,
242
- transition: `transform .${TRANSITION_DURATION}s linear`
243
- }
244
- }, {
245
- props: ({
246
- ownerState
247
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
248
- style: {
249
- width: 'auto'
250
- }
251
- }, {
252
- props: ({
253
- ownerState
254
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
255
- style: indeterminate1Animation || {
256
- animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
257
- }
258
- }]
259
- })));
226
+ }) => {
227
+ const reducedMotionIndeterminateStyles = (0, _utils.getReducedMotionStyles)(theme, {
228
+ animation: 'none',
229
+ left: '30%',
230
+ right: 'auto',
231
+ width: '40%'
232
+ });
233
+ return {
234
+ width: '100%',
235
+ position: 'absolute',
236
+ left: 0,
237
+ bottom: 0,
238
+ top: 0,
239
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
240
+ duration: '0.2s',
241
+ easing: 'linear'
242
+ }),
243
+ transformOrigin: 'left',
244
+ variants: [{
245
+ props: {
246
+ color: 'inherit'
247
+ },
248
+ style: {
249
+ backgroundColor: 'currentColor'
250
+ }
251
+ }, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
252
+ props: {
253
+ color
254
+ },
255
+ style: {
256
+ backgroundColor: (theme.vars || theme).palette[color].main
257
+ }
258
+ })), {
259
+ props: {
260
+ variant: 'determinate'
261
+ },
262
+ style: {
263
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
264
+ duration: `.${TRANSITION_DURATION}s`,
265
+ easing: 'linear'
266
+ })
267
+ }
268
+ }, {
269
+ props: {
270
+ variant: 'buffer'
271
+ },
272
+ style: {
273
+ zIndex: 1,
274
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
275
+ duration: `.${TRANSITION_DURATION}s`,
276
+ easing: 'linear'
277
+ })
278
+ }
279
+ }, {
280
+ props: ({
281
+ ownerState
282
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
283
+ style: {
284
+ width: 'auto'
285
+ }
286
+ }, {
287
+ props: ({
288
+ ownerState
289
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
290
+ style: indeterminate1Animation || {
291
+ animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
292
+ }
293
+ }, ...(reducedMotionIndeterminateStyles ? [{
294
+ props: ({
295
+ ownerState
296
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
297
+ style: reducedMotionIndeterminateStyles
298
+ }] : [])]
299
+ };
300
+ }));
260
301
  const LinearProgressBar2 = (0, _zeroStyled.styled)('span', {
261
302
  name: 'MuiLinearProgress',
262
303
  slot: 'Bar2',
@@ -265,67 +306,84 @@ const LinearProgressBar2 = (0, _zeroStyled.styled)('span', {
265
306
  }
266
307
  })((0, _memoTheme.default)(({
267
308
  theme
268
- }) => ({
269
- width: '100%',
270
- position: 'absolute',
271
- left: 0,
272
- bottom: 0,
273
- top: 0,
274
- transition: 'transform 0.2s linear',
275
- transformOrigin: 'left',
276
- variants: [...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
277
- props: {
278
- color
279
- },
280
- style: {
281
- '--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main
282
- }
283
- })), {
284
- props: ({
285
- ownerState
286
- }) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
287
- style: {
288
- backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
289
- }
290
- }, {
291
- props: ({
292
- ownerState
293
- }) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
294
- style: {
295
- backgroundColor: 'currentColor'
296
- }
297
- }, {
298
- props: {
299
- color: 'inherit'
300
- },
301
- style: {
302
- opacity: 0.3
303
- }
304
- }, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
305
- props: {
306
- color,
307
- variant: 'buffer'
308
- },
309
- style: {
310
- backgroundColor: getColorShade(theme, color),
311
- transition: `transform .${TRANSITION_DURATION}s linear`
312
- }
313
- })), {
314
- props: ({
315
- ownerState
316
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
317
- style: {
318
- width: 'auto'
319
- }
320
- }, {
321
- props: ({
322
- ownerState
323
- }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
324
- style: indeterminate2Animation || {
325
- animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
326
- }
327
- }]
328
- })));
309
+ }) => {
310
+ const reducedMotionIndeterminateStyles = (0, _utils.getReducedMotionStyles)(theme, {
311
+ animation: 'none',
312
+ display: 'none'
313
+ });
314
+ return {
315
+ width: '100%',
316
+ position: 'absolute',
317
+ left: 0,
318
+ bottom: 0,
319
+ top: 0,
320
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
321
+ duration: '0.2s',
322
+ easing: 'linear'
323
+ }),
324
+ transformOrigin: 'left',
325
+ variants: [...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
326
+ props: {
327
+ color
328
+ },
329
+ style: {
330
+ '--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main
331
+ }
332
+ })), {
333
+ props: ({
334
+ ownerState
335
+ }) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
336
+ style: {
337
+ backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
338
+ }
339
+ }, {
340
+ props: ({
341
+ ownerState
342
+ }) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
343
+ style: {
344
+ backgroundColor: 'currentColor'
345
+ }
346
+ }, {
347
+ props: {
348
+ color: 'inherit'
349
+ },
350
+ style: {
351
+ opacity: 0.3
352
+ }
353
+ }, ...Object.entries(theme.palette).filter((0, _createSimplePaletteValueFilter.default)()).map(([color]) => ({
354
+ props: {
355
+ color,
356
+ variant: 'buffer'
357
+ },
358
+ style: {
359
+ backgroundColor: getColorShade(theme, color),
360
+ ...(0, _utils.getTransitionStyles)(theme, 'transform', {
361
+ duration: `.${TRANSITION_DURATION}s`,
362
+ easing: 'linear'
363
+ })
364
+ }
365
+ })), {
366
+ props: ({
367
+ ownerState
368
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
369
+ style: {
370
+ width: 'auto'
371
+ }
372
+ }, {
373
+ props: ({
374
+ ownerState
375
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
376
+ style: indeterminate2Animation || {
377
+ animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
378
+ }
379
+ }, ...(reducedMotionIndeterminateStyles ? [{
380
+ props: ({
381
+ ownerState
382
+ }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
383
+ style: reducedMotionIndeterminateStyles
384
+ }] : [])]
385
+ };
386
+ }));
329
387
 
330
388
  /**
331
389
  * ## ARIA
@@ -355,8 +413,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
355
413
  variant
356
414
  };
357
415
  if (process.env.NODE_ENV !== 'production') {
358
- if (['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
416
+ if (!warnedMinMaxWithoutVariant && ['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
359
417
  console.warn(`MUI: You have provided the \`min\` or \`max\` props with an 'indeterminate' or 'query' variant. These props will have no effect.`);
418
+ warnedMinMaxWithoutVariant = true;
360
419
  }
361
420
  }
362
421
  const min = minProp ?? 0;
@@ -371,8 +430,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
371
430
  if (variant === 'determinate' || variant === 'buffer') {
372
431
  if (value !== undefined) {
373
432
  if (process.env.NODE_ENV !== 'production') {
374
- if (value < min || value > max || min >= max) {
433
+ if (!warnedInvalidMinMaxValue && (value < min || value > max || min >= max)) {
375
434
  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}.`);
435
+ warnedInvalidMinMaxValue = true;
376
436
  }
377
437
  }
378
438
  const range = max - min;
@@ -386,14 +446,18 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
386
446
  rootProps['aria-valuemin'] = min;
387
447
  rootProps['aria-valuemax'] = max;
388
448
  } else if (process.env.NODE_ENV !== 'production') {
389
- console.error('MUI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress.');
449
+ if (!warnedValueRequired) {
450
+ console.error('MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress.');
451
+ warnedValueRequired = true;
452
+ }
390
453
  }
391
454
  }
392
455
  if (variant === 'buffer') {
393
456
  if (valueBuffer !== undefined) {
394
457
  if (process.env.NODE_ENV !== 'production') {
395
- if (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max) {
458
+ if (!warnedInvalidMinMaxValueBuffer && (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max)) {
396
459
  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}.`);
460
+ warnedInvalidMinMaxValueBuffer = true;
397
461
  }
398
462
  }
399
463
  const range = max - min;
@@ -403,7 +467,10 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
403
467
  }
404
468
  inlineStyles.bar2.transform = range > 0 ? `translateX(${transform}%)` : 'translateX(-100%)'; // empty-state fallback when range is invalid
405
469
  } else if (process.env.NODE_ENV !== 'production') {
406
- console.error('MUI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');
470
+ if (!warnedValueBufferRequired) {
471
+ console.error('MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.');
472
+ warnedValueBufferRequired = true;
473
+ }
407
474
  }
408
475
  }
409
476
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinearProgressRoot, {