@mui/material 5.13.5 → 5.13.7

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.
@@ -39,7 +39,9 @@ const SvgIconRoot = styled('svg', {
39
39
  width: '1em',
40
40
  height: '1em',
41
41
  display: 'inline-block',
42
- fill: 'currentColor',
42
+ // the <svg> will define the property that has `currentColor`
43
+ // e.g. heroicons uses fill="none" and stroke="currentColor"
44
+ fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
43
45
  flexShrink: 0,
44
46
  transition: theme.transitions?.create?.('fill', {
45
47
  duration: theme.transitions?.duration?.shorter
@@ -74,13 +76,15 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
74
76
  viewBox = '0 0 24 24'
75
77
  } = props,
76
78
  other = _objectWithoutPropertiesLoose(props, _excluded);
79
+ const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
77
80
  const ownerState = _extends({}, props, {
78
81
  color,
79
82
  component,
80
83
  fontSize,
81
84
  instanceFontSize: inProps.fontSize,
82
85
  inheritViewBox,
83
- viewBox
86
+ viewBox,
87
+ hasSvgAsChild
84
88
  });
85
89
  const more = {};
86
90
  if (!inheritViewBox) {
@@ -95,9 +99,9 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
95
99
  "aria-hidden": titleAccess ? undefined : true,
96
100
  role: titleAccess ? 'img' : undefined,
97
101
  ref: ref
98
- }, more, other, {
102
+ }, more, other, hasSvgAsChild && children.props, {
99
103
  ownerState: ownerState,
100
- children: [children, titleAccess ? /*#__PURE__*/_jsx("title", {
104
+ children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx("title", {
101
105
  children: titleAccess
102
106
  }) : null]
103
107
  }));
@@ -218,7 +218,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
218
218
  });
219
219
  const {
220
220
  arrow = false,
221
- children,
221
+ children: childrenProp,
222
222
  components = {},
223
223
  componentsProps = {},
224
224
  describeChild = false,
@@ -246,6 +246,11 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
246
246
  TransitionProps
247
247
  } = props,
248
248
  other = _objectWithoutPropertiesLoose(props, _excluded);
249
+
250
+ // to prevent runtime errors, developers will need to provide a child as a React element anyway.
251
+ const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx("span", {
252
+ children: childrenProp
253
+ });
249
254
  const theme = useTheme();
250
255
  const isRtl = theme.direction === 'rtl';
251
256
  const [childNode, setChildNode] = React.useState();
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.5
2
+ * @mui/material v5.13.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -161,14 +161,16 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
161
161
  const ignoringMouseDown = React.useRef(false);
162
162
  // We use a timer in order to only show the ripples for touch "click" like events.
163
163
  // We don't want to display the ripple for touch scroll events.
164
- const startTimer = React.useRef(null);
164
+ const startTimer = React.useRef(0);
165
165
 
166
166
  // This is the hook called once the previous timeout is ready.
167
167
  const startTimerCommit = React.useRef(null);
168
168
  const container = React.useRef(null);
169
169
  React.useEffect(() => {
170
170
  return () => {
171
- clearTimeout(startTimer.current);
171
+ if (startTimer.current) {
172
+ clearTimeout(startTimer.current);
173
+ }
172
174
  };
173
175
  }, []);
174
176
  const startCommit = React.useCallback(params => {
@@ -291,6 +291,14 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
291
291
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
292
292
  */
293
293
  onClose: _propTypes.default.func,
294
+ /**
295
+ * A function called when a transition enters.
296
+ */
297
+ onTransitionEnter: _propTypes.default.func,
298
+ /**
299
+ * A function called when a transition has exited.
300
+ */
301
+ onTransitionExited: _propTypes.default.func,
294
302
  /**
295
303
  * If `true`, the component is shown.
296
304
  */
@@ -146,7 +146,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
146
146
  const fcs = (0, _formControlState.default)({
147
147
  props,
148
148
  muiFormControl,
149
- states: ['required']
149
+ states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']
150
150
  });
151
151
  const ownerState = (0, _extends2.default)({}, props, {
152
152
  color: fcs.color || 'primary',
@@ -515,7 +515,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
515
515
  marks,
516
516
  values,
517
517
  trackOffset,
518
- trackLeap
518
+ trackLeap,
519
+ getThumbStyle
519
520
  } = (0, _useSlider.default)((0, _extends2.default)({}, ownerState, {
520
521
  rootRef: ref
521
522
  }));
@@ -646,9 +647,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
646
647
  "data-index": index
647
648
  }, thumbProps, {
648
649
  className: (0, _clsx.default)(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
649
- style: (0, _extends2.default)({}, style, {
650
- pointerEvents: disableSwap && active !== index ? 'none' : undefined
651
- }, thumbProps.style),
650
+ style: (0, _extends2.default)({}, style, getThumbStyle(index), thumbProps.style),
652
651
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InputSlot, (0, _extends2.default)({
653
652
  "data-index": index,
654
653
  "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
@@ -49,7 +49,9 @@ const SvgIconRoot = (0, _styled.default)('svg', {
49
49
  width: '1em',
50
50
  height: '1em',
51
51
  display: 'inline-block',
52
- fill: 'currentColor',
52
+ // the <svg> will define the property that has `currentColor`
53
+ // e.g. heroicons uses fill="none" and stroke="currentColor"
54
+ fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
53
55
  flexShrink: 0,
54
56
  transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
55
57
  duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
@@ -85,13 +87,15 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
85
87
  viewBox = '0 0 24 24'
86
88
  } = props,
87
89
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
90
+ const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
88
91
  const ownerState = (0, _extends2.default)({}, props, {
89
92
  color,
90
93
  component,
91
94
  fontSize,
92
95
  instanceFontSize: inProps.fontSize,
93
96
  inheritViewBox,
94
- viewBox
97
+ viewBox,
98
+ hasSvgAsChild
95
99
  });
96
100
  const more = {};
97
101
  if (!inheritViewBox) {
@@ -106,9 +110,9 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
106
110
  "aria-hidden": titleAccess ? undefined : true,
107
111
  role: titleAccess ? 'img' : undefined,
108
112
  ref: ref
109
- }, more, other, {
113
+ }, more, other, hasSvgAsChild && children.props, {
110
114
  ownerState: ownerState,
111
- children: [children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
115
+ children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
112
116
  children: titleAccess
113
117
  }) : null]
114
118
  }));
@@ -228,7 +228,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
228
228
  });
229
229
  const {
230
230
  arrow = false,
231
- children,
231
+ children: childrenProp,
232
232
  components = {},
233
233
  componentsProps = {},
234
234
  describeChild = false,
@@ -256,6 +256,11 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
256
256
  TransitionProps
257
257
  } = props,
258
258
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
259
+
260
+ // to prevent runtime errors, developers will need to provide a child as a React element anyway.
261
+ const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
262
+ children: childrenProp
263
+ });
259
264
  const theme = (0, _useTheme.default)();
260
265
  const isRtl = theme.direction === 'rtl';
261
266
  const [childNode, setChildNode] = React.useState();
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.5
2
+ * @mui/material v5.13.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.13.5",
3
+ "version": "5.13.7",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -21,7 +21,7 @@
21
21
  "bugs": {
22
22
  "url": "https://github.com/mui/material-ui/issues"
23
23
  },
24
- "homepage": "https://mui.com/material-ui/getting-started/overview/",
24
+ "homepage": "https://mui.com/material-ui/getting-started/",
25
25
  "funding": {
26
26
  "type": "opencollective",
27
27
  "url": "https://opencollective.com/mui"
@@ -45,12 +45,12 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@babel/runtime": "^7.21.0",
49
- "@mui/base": "5.0.0-beta.4",
50
- "@mui/core-downloads-tracker": "^5.13.4",
51
- "@mui/system": "^5.13.5",
48
+ "@babel/runtime": "^7.22.5",
49
+ "@mui/base": "5.0.0-beta.6",
50
+ "@mui/core-downloads-tracker": "^5.13.7",
51
+ "@mui/system": "^5.13.7",
52
52
  "@mui/types": "^7.2.4",
53
- "@mui/utils": "^5.13.1",
53
+ "@mui/utils": "^5.13.7",
54
54
  "@types/react-transition-group": "^4.4.6",
55
55
  "clsx": "^1.2.1",
56
56
  "csstype": "^3.1.2",
@@ -421,6 +421,7 @@ export interface CssVarsTheme extends ColorSystem {
421
421
  shadows: Theme['shadows'];
422
422
  mixins: Theme['mixins'];
423
423
  zIndex: Theme['zIndex'];
424
+ direction: Theme['direction'];
424
425
  /**
425
426
  * A function to determine if the key, value should be attached as CSS Variable
426
427
  * `keys` is an array that represents the object path keys.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.5
2
+ * @mui/material v5.13.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1968,6 +1968,7 @@
1968
1968
  let timeout;
1969
1969
  function debounced(...args) {
1970
1970
  const later = () => {
1971
+ // @ts-ignore
1971
1972
  func.apply(this, args);
1972
1973
  };
1973
1974
  clearTimeout(timeout);
@@ -4270,7 +4271,7 @@
4270
4271
 
4271
4272
  var pkg = {
4272
4273
  name: "@emotion/react",
4273
- version: "11.11.0",
4274
+ version: "11.11.1",
4274
4275
  main: "dist/emotion-react.cjs.js",
4275
4276
  module: "dist/emotion-react.esm.js",
4276
4277
  browser: {
@@ -9738,7 +9739,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
9738
9739
  };
9739
9740
  }
9740
9741
  return {
9741
- '& > :not(style) + :not(style)': {
9742
+ '& > :not(style) ~ :not(style)': {
9742
9743
  margin: 0,
9743
9744
  [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)
9744
9745
  }
@@ -11170,9 +11171,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
11170
11171
  * If `componentProps` is a function, calls it with the provided `ownerState`.
11171
11172
  * Otherwise, just returns `componentProps`.
11172
11173
  */
11173
- function resolveComponentProps(componentProps, ownerState) {
11174
+ function resolveComponentProps(componentProps, ownerState, slotState) {
11174
11175
  if (typeof componentProps === 'function') {
11175
- return componentProps(ownerState);
11176
+ return componentProps(ownerState, slotState);
11176
11177
  }
11177
11178
  return componentProps;
11178
11179
  }
@@ -11261,7 +11262,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
11261
11262
  };
11262
11263
  }
11263
11264
 
11264
- const _excluded$27 = ["elementType", "externalSlotProps", "ownerState"];
11265
+ const _excluded$27 = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
11265
11266
  /**
11266
11267
  * @ignore - do not document.
11267
11268
  * Builds the props to be passed into the slot of an unstyled component.
@@ -11275,10 +11276,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
11275
11276
  const {
11276
11277
  elementType,
11277
11278
  externalSlotProps,
11278
- ownerState
11279
+ ownerState,
11280
+ skipResolvingSlotProps = false
11279
11281
  } = parameters,
11280
11282
  rest = _objectWithoutPropertiesLoose(parameters, _excluded$27);
11281
- const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState);
11283
+ const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
11282
11284
  const {
11283
11285
  props: mergedProps,
11284
11286
  internalRef
@@ -14616,6 +14618,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14616
14618
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
14617
14619
  */
14618
14620
  onClose: PropTypes.func,
14621
+ /**
14622
+ * A function called when a transition enters.
14623
+ */
14624
+ onTransitionEnter: PropTypes.func,
14625
+ /**
14626
+ * A function called when a transition has exited.
14627
+ */
14628
+ onTransitionExited: PropTypes.func,
14619
14629
  /**
14620
14630
  * If `true`, the component is shown.
14621
14631
  */
@@ -14980,13 +14990,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
14980
14990
  // @ts-ignore
14981
14991
  let newValue = event.target.valueAsNumber;
14982
14992
  if (marks && step == null) {
14983
- newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];
14993
+ const maxMarksValue = marksValues[marksValues.length - 1];
14994
+ if (newValue > maxMarksValue) {
14995
+ newValue = maxMarksValue;
14996
+ } else if (newValue < marksValues[0]) {
14997
+ newValue = marksValues[0];
14998
+ } else {
14999
+ newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];
15000
+ }
14984
15001
  }
14985
15002
  newValue = clamp$2(newValue, min, max);
14986
- if (marks && step == null) {
14987
- const currentMarkIndex = marksValues.indexOf(values[index]);
14988
- newValue = newValue < values[index] ? marksValues[currentMarkIndex - 1] : marksValues[currentMarkIndex + 1];
14989
- }
14990
15003
  if (range) {
14991
15004
  // Bound the new value to the thumb's neighbours.
14992
15005
  if (disableSwap) {
@@ -15274,6 +15287,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15274
15287
  };
15275
15288
  return _extends({}, otherHandlers, ownEventHandlers);
15276
15289
  };
15290
+ const getThumbStyle = index => {
15291
+ return {
15292
+ // So the non active thumb doesn't show its label on hover.
15293
+ pointerEvents: active !== -1 && active !== index ? 'none' : undefined
15294
+ };
15295
+ };
15277
15296
  const getHiddenInputProps = (otherHandlers = {}) => {
15278
15297
  var _parameters$step;
15279
15298
  const ownEventHandlers = {
@@ -15292,7 +15311,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15292
15311
  type: 'range',
15293
15312
  min: parameters.min,
15294
15313
  max: parameters.max,
15295
- step: (_parameters$step = parameters.step) != null ? _parameters$step : undefined,
15314
+ step: parameters.step === null && parameters.marks ? 'any' : (_parameters$step = parameters.step) != null ? _parameters$step : undefined,
15296
15315
  disabled
15297
15316
  }, mergedEventHandlers, {
15298
15317
  style: _extends({}, visuallyHidden$1, {
@@ -15318,7 +15337,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15318
15337
  rootRef: handleRef,
15319
15338
  trackLeap,
15320
15339
  trackOffset,
15321
- values
15340
+ values,
15341
+ getThumbStyle
15322
15342
  };
15323
15343
  }
15324
15344
 
@@ -15664,7 +15684,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15664
15684
  ref: shadowRef,
15665
15685
  tabIndex: -1,
15666
15686
  style: _extends({}, styles$5.shadow, style, {
15667
- padding: 0
15687
+ paddingTop: 0,
15688
+ paddingBottom: 0
15668
15689
  })
15669
15690
  })]
15670
15691
  });
@@ -15888,7 +15909,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
15888
15909
  }) : [];
15889
15910
  const previousProps = usePreviousProps$1({
15890
15911
  filteredOptions,
15891
- value
15912
+ value,
15913
+ inputValue
15892
15914
  });
15893
15915
  React__namespace.useEffect(() => {
15894
15916
  const valueChange = value !== previousProps.value;
@@ -16081,7 +16103,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16081
16103
  const label2 = value2 ? getOptionLabel(value2) : '';
16082
16104
  return label1 === label2;
16083
16105
  };
16084
- if (highlightedIndexRef.current !== -1 && previousProps.filteredOptions && previousProps.filteredOptions.length !== filteredOptions.length && (multiple ? value.length === previousProps.value.length && previousProps.value.every((val, i) => getOptionLabel(value[i]) === getOptionLabel(val)) : isSameValue(previousProps.value, value))) {
16106
+ if (highlightedIndexRef.current !== -1 && previousProps.filteredOptions && previousProps.filteredOptions.length !== filteredOptions.length && previousProps.inputValue === inputValue && (multiple ? value.length === previousProps.value.length && previousProps.value.every((val, i) => getOptionLabel(value[i]) === getOptionLabel(val)) : isSameValue(previousProps.value, value))) {
16085
16107
  const previousHighlightedOption = previousProps.filteredOptions[highlightedIndexRef.current];
16086
16108
  if (previousHighlightedOption) {
16087
16109
  const previousHighlightedOptionExists = filteredOptions.some(option => {
@@ -16099,8 +16121,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16099
16121
  return;
16100
16122
  }
16101
16123
 
16102
- // Check if the previously highlighted option still exists in the updated filtered options list and if the value hasn't changed
16103
- // If it exists and the value hasn't changed, return, otherwise continue execution
16124
+ // Check if the previously highlighted option still exists in the updated filtered options list and if the value and inputValue haven't changed
16125
+ // If it exists and the value and the inputValue haven't changed, return, otherwise continue execution
16104
16126
  if (checkHighlightedOptionExists()) {
16105
16127
  return;
16106
16128
  }
@@ -16717,7 +16739,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16717
16739
  width: '1em',
16718
16740
  height: '1em',
16719
16741
  display: 'inline-block',
16720
- fill: 'currentColor',
16742
+ // the <svg> will define the property that has `currentColor`
16743
+ // e.g. heroicons uses fill="none" and stroke="currentColor"
16744
+ fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
16721
16745
  flexShrink: 0,
16722
16746
  transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
16723
16747
  duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
@@ -16753,13 +16777,15 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16753
16777
  viewBox = '0 0 24 24'
16754
16778
  } = props,
16755
16779
  other = _objectWithoutPropertiesLoose(props, _excluded$23);
16780
+ const hasSvgAsChild = /*#__PURE__*/React__namespace.isValidElement(children) && children.type === 'svg';
16756
16781
  const ownerState = _extends({}, props, {
16757
16782
  color,
16758
16783
  component,
16759
16784
  fontSize,
16760
16785
  instanceFontSize: inProps.fontSize,
16761
16786
  inheritViewBox,
16762
- viewBox
16787
+ viewBox,
16788
+ hasSvgAsChild
16763
16789
  });
16764
16790
  const more = {};
16765
16791
  if (!inheritViewBox) {
@@ -16774,9 +16800,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
16774
16800
  "aria-hidden": titleAccess ? undefined : true,
16775
16801
  role: titleAccess ? 'img' : undefined,
16776
16802
  ref: ref
16777
- }, more, other, {
16803
+ }, more, other, hasSvgAsChild && children.props, {
16778
16804
  ownerState: ownerState,
16779
- children: [children, titleAccess ? /*#__PURE__*/jsxRuntime_1("title", {
16805
+ children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/jsxRuntime_1("title", {
16780
16806
  children: titleAccess
16781
16807
  }) : null]
16782
16808
  }));
@@ -19029,14 +19055,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
19029
19055
  const ignoringMouseDown = React__namespace.useRef(false);
19030
19056
  // We use a timer in order to only show the ripples for touch "click" like events.
19031
19057
  // We don't want to display the ripple for touch scroll events.
19032
- const startTimer = React__namespace.useRef(null);
19058
+ const startTimer = React__namespace.useRef(0);
19033
19059
 
19034
19060
  // This is the hook called once the previous timeout is ready.
19035
19061
  const startTimerCommit = React__namespace.useRef(null);
19036
19062
  const container = React__namespace.useRef(null);
19037
19063
  React__namespace.useEffect(() => {
19038
19064
  return () => {
19039
- clearTimeout(startTimer.current);
19065
+ if (startTimer.current) {
19066
+ clearTimeout(startTimer.current);
19067
+ }
19040
19068
  };
19041
19069
  }, []);
19042
19070
  const startCommit = React__namespace.useCallback(params => {
@@ -27759,6 +27787,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
27759
27787
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
27760
27788
  */
27761
27789
  onClose: PropTypes.func,
27790
+ /**
27791
+ * A function called when a transition enters.
27792
+ */
27793
+ onTransitionEnter: PropTypes.func,
27794
+ /**
27795
+ * A function called when a transition has exited.
27796
+ */
27797
+ onTransitionExited: PropTypes.func,
27762
27798
  /**
27763
27799
  * If `true`, the component is shown.
27764
27800
  */
@@ -37584,7 +37620,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
37584
37620
  const fcs = formControlState({
37585
37621
  props,
37586
37622
  muiFormControl,
37587
- states: ['required']
37623
+ states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']
37588
37624
  });
37589
37625
  const ownerState = _extends({}, props, {
37590
37626
  color: fcs.color || 'primary',
@@ -41277,7 +41313,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41277
41313
  marks,
41278
41314
  values,
41279
41315
  trackOffset,
41280
- trackLeap
41316
+ trackLeap,
41317
+ getThumbStyle
41281
41318
  } = useSlider(_extends({}, ownerState, {
41282
41319
  rootRef: ref
41283
41320
  }));
@@ -41408,9 +41445,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
41408
41445
  "data-index": index
41409
41446
  }, thumbProps, {
41410
41447
  className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
41411
- style: _extends({}, style, {
41412
- pointerEvents: disableSwap && active !== index ? 'none' : undefined
41413
- }, thumbProps.style),
41448
+ style: _extends({}, style, getThumbStyle(index), thumbProps.style),
41414
41449
  children: /*#__PURE__*/jsxRuntime_1(InputSlot, _extends({
41415
41450
  "data-index": index,
41416
41451
  "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
@@ -43012,7 +43047,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
43012
43047
  });
43013
43048
  const {
43014
43049
  arrow = false,
43015
- children,
43050
+ children: childrenProp,
43016
43051
  components = {},
43017
43052
  componentsProps = {},
43018
43053
  describeChild = false,
@@ -43040,6 +43075,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
43040
43075
  TransitionProps
43041
43076
  } = props,
43042
43077
  other = _objectWithoutPropertiesLoose(props, _excluded$v);
43078
+
43079
+ // to prevent runtime errors, developers will need to provide a child as a React element anyway.
43080
+ const children = /*#__PURE__*/React__namespace.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/jsxRuntime_1("span", {
43081
+ children: childrenProp
43082
+ });
43043
43083
  const theme = useTheme();
43044
43084
  const isRtl = theme.direction === 'rtl';
43045
43085
  const [childNode, setChildNode] = React__namespace.useState();