@mui/material 5.2.7 → 5.4.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 (152) hide show
  1. package/Autocomplete/Autocomplete.d.ts +7 -0
  2. package/Autocomplete/Autocomplete.js +22 -10
  3. package/Backdrop/Backdrop.js +3 -1
  4. package/Badge/Badge.js +6 -7
  5. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  6. package/Button/buttonClasses.d.ts +1 -1
  7. package/ButtonBase/TouchRipple.js +1 -2
  8. package/CHANGELOG.md +284 -33
  9. package/FilledInput/FilledInput.js +4 -1
  10. package/FormControlLabel/FormControlLabel.js +14 -4
  11. package/FormControlLabel/formControlLabelClasses.d.ts +2 -0
  12. package/FormControlLabel/formControlLabelClasses.js +1 -1
  13. package/FormGroup/FormGroup.js +14 -3
  14. package/FormGroup/formGroupClasses.d.ts +2 -0
  15. package/FormGroup/formGroupClasses.js +1 -1
  16. package/FormHelperText/FormHelperText.js +7 -9
  17. package/Grid/Grid.js +2 -4
  18. package/Input/Input.js +4 -1
  19. package/InputAdornment/InputAdornment.js +6 -9
  20. package/InputBase/InputBase.js +4 -1
  21. package/InputLabel/InputLabel.js +4 -0
  22. package/ListItem/ListItem.js +3 -1
  23. package/Modal/Modal.js +3 -1
  24. package/OutlinedInput/NotchedOutline.js +14 -16
  25. package/OutlinedInput/OutlinedInput.js +1 -1
  26. package/README.md +5 -4
  27. package/Radio/RadioButtonIcon.js +2 -6
  28. package/Select/Select.d.ts +9 -1
  29. package/Select/Select.js +10 -1
  30. package/Select/SelectInput.d.ts +1 -0
  31. package/Select/SelectInput.js +32 -13
  32. package/Slider/Slider.d.ts +2 -0
  33. package/Slider/Slider.js +126 -53
  34. package/StepLabel/StepLabel.js +3 -1
  35. package/SvgIcon/SvgIcon.js +9 -9
  36. package/SwipeableDrawer/SwipeArea.js +1 -3
  37. package/TextField/TextField.d.ts +1 -0
  38. package/TextField/TextField.js +2 -1
  39. package/Tooltip/Tooltip.js +6 -1
  40. package/index.d.ts +7 -2
  41. package/index.js +6 -3
  42. package/internal/SwitchBase.js +2 -6
  43. package/legacy/Autocomplete/Autocomplete.js +23 -10
  44. package/legacy/Backdrop/Backdrop.js +3 -1
  45. package/legacy/Badge/Badge.js +6 -7
  46. package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  47. package/legacy/ButtonBase/TouchRipple.js +1 -2
  48. package/legacy/FilledInput/FilledInput.js +4 -1
  49. package/legacy/FormControlLabel/FormControlLabel.js +14 -4
  50. package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
  51. package/legacy/FormGroup/FormGroup.js +14 -3
  52. package/legacy/FormGroup/formGroupClasses.js +1 -1
  53. package/legacy/FormHelperText/FormHelperText.js +7 -9
  54. package/legacy/Grid/Grid.js +2 -4
  55. package/legacy/Input/Input.js +4 -1
  56. package/legacy/InputAdornment/InputAdornment.js +6 -9
  57. package/legacy/InputBase/InputBase.js +4 -1
  58. package/legacy/InputLabel/InputLabel.js +4 -0
  59. package/legacy/ListItem/ListItem.js +3 -1
  60. package/legacy/Modal/Modal.js +3 -1
  61. package/legacy/OutlinedInput/NotchedOutline.js +14 -16
  62. package/legacy/OutlinedInput/OutlinedInput.js +1 -1
  63. package/legacy/Radio/RadioButtonIcon.js +2 -6
  64. package/legacy/Select/Select.js +11 -1
  65. package/legacy/Select/SelectInput.js +36 -16
  66. package/legacy/Slider/Slider.js +127 -54
  67. package/legacy/StepLabel/StepLabel.js +3 -1
  68. package/legacy/SvgIcon/SvgIcon.js +9 -9
  69. package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
  70. package/legacy/TextField/TextField.js +2 -1
  71. package/legacy/Tooltip/Tooltip.js +6 -1
  72. package/legacy/index.js +6 -3
  73. package/legacy/internal/SwitchBase.js +2 -6
  74. package/legacy/useMediaQuery/useMediaQuery.js +86 -31
  75. package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
  76. package/modern/Autocomplete/Autocomplete.js +21 -9
  77. package/modern/Backdrop/Backdrop.js +3 -1
  78. package/modern/Badge/Badge.js +6 -7
  79. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  80. package/modern/ButtonBase/TouchRipple.js +1 -2
  81. package/modern/FilledInput/FilledInput.js +4 -1
  82. package/modern/FormControlLabel/FormControlLabel.js +14 -4
  83. package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
  84. package/modern/FormGroup/FormGroup.js +14 -3
  85. package/modern/FormGroup/formGroupClasses.js +1 -1
  86. package/modern/FormHelperText/FormHelperText.js +7 -9
  87. package/modern/Grid/Grid.js +2 -4
  88. package/modern/Input/Input.js +4 -1
  89. package/modern/InputAdornment/InputAdornment.js +6 -9
  90. package/modern/InputBase/InputBase.js +4 -1
  91. package/modern/InputLabel/InputLabel.js +4 -0
  92. package/modern/ListItem/ListItem.js +3 -1
  93. package/modern/Modal/Modal.js +3 -1
  94. package/modern/OutlinedInput/NotchedOutline.js +14 -16
  95. package/modern/OutlinedInput/OutlinedInput.js +1 -1
  96. package/modern/Radio/RadioButtonIcon.js +2 -6
  97. package/modern/Select/Select.js +10 -1
  98. package/modern/Select/SelectInput.js +32 -13
  99. package/modern/Slider/Slider.js +126 -53
  100. package/modern/StepLabel/StepLabel.js +3 -1
  101. package/modern/SvgIcon/SvgIcon.js +8 -8
  102. package/modern/SwipeableDrawer/SwipeArea.js +1 -3
  103. package/modern/TextField/TextField.js +2 -1
  104. package/modern/Tooltip/Tooltip.js +6 -1
  105. package/modern/index.js +6 -3
  106. package/modern/internal/SwitchBase.js +2 -6
  107. package/modern/useMediaQuery/useMediaQuery.js +68 -26
  108. package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
  109. package/node/Autocomplete/Autocomplete.js +22 -10
  110. package/node/Backdrop/Backdrop.js +3 -1
  111. package/node/Badge/Badge.js +8 -8
  112. package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  113. package/node/ButtonBase/TouchRipple.js +1 -2
  114. package/node/FilledInput/FilledInput.js +4 -1
  115. package/node/FormControlLabel/FormControlLabel.js +15 -4
  116. package/node/FormControlLabel/formControlLabelClasses.js +1 -1
  117. package/node/FormGroup/FormGroup.js +15 -3
  118. package/node/FormGroup/formGroupClasses.js +1 -1
  119. package/node/FormHelperText/FormHelperText.js +6 -9
  120. package/node/Grid/Grid.js +2 -4
  121. package/node/Input/Input.js +4 -1
  122. package/node/InputAdornment/InputAdornment.js +5 -9
  123. package/node/InputBase/InputBase.js +4 -1
  124. package/node/InputLabel/InputLabel.js +4 -0
  125. package/node/ListItem/ListItem.js +3 -1
  126. package/node/Modal/Modal.js +3 -1
  127. package/node/OutlinedInput/NotchedOutline.js +12 -16
  128. package/node/OutlinedInput/OutlinedInput.js +1 -1
  129. package/node/Radio/RadioButtonIcon.js +2 -6
  130. package/node/Select/Select.js +10 -1
  131. package/node/Select/SelectInput.js +31 -13
  132. package/node/Slider/Slider.js +112 -45
  133. package/node/StepLabel/StepLabel.js +3 -1
  134. package/node/SvgIcon/SvgIcon.js +9 -9
  135. package/node/SwipeableDrawer/SwipeArea.js +1 -3
  136. package/node/TextField/TextField.js +2 -1
  137. package/node/Tooltip/Tooltip.js +6 -1
  138. package/node/index.js +41 -16
  139. package/node/internal/SwitchBase.js +2 -6
  140. package/node/useMediaQuery/useMediaQuery.js +68 -26
  141. package/node/utils/shouldSpreadAdditionalProps.js +15 -0
  142. package/package.json +7 -7
  143. package/styles/ThemeProvider.d.ts +1 -1
  144. package/styles/components.d.ts +452 -113
  145. package/styles/createTheme.d.ts +12 -6
  146. package/styles/overrides.d.ts +16 -4
  147. package/styles/useThemeProps.d.ts +2 -1
  148. package/umd/material-ui.development.js +2988 -4926
  149. package/umd/material-ui.production.min.js +21 -21
  150. package/useMediaQuery/useMediaQuery.d.ts +4 -0
  151. package/useMediaQuery/useMediaQuery.js +68 -26
  152. package/utils/shouldSpreadAdditionalProps.js +7 -0
package/Slider/Slider.js CHANGED
@@ -1,20 +1,21 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["components", "componentsProps", "color", "size"];
3
+ const _excluded = ["component", "components", "componentsProps", "color", "size"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { chainPropTypes } from '@mui/utils';
8
- import { generateUtilityClasses, isHostComponent } from '@mui/base';
8
+ import { generateUtilityClasses } from '@mui/base';
9
9
  import SliderUnstyled, { SliderValueLabelUnstyled, sliderUnstyledClasses, getSliderUtilityClass } from '@mui/base/SliderUnstyled';
10
10
  import { alpha, lighten, darken } from '@mui/system';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
12
  import styled, { slotShouldForwardProp } from '../styles/styled';
13
13
  import useTheme from '../styles/useTheme';
14
+ import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
14
15
  import capitalize from '../utils/capitalize';
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  export const sliderClasses = _extends({}, sliderUnstyledClasses, generateUtilityClasses('MuiSlider', ['colorPrimary', 'colorSecondary', 'thumbColorPrimary', 'thumbColorSecondary', 'sizeSmall', 'thumbSizeSmall']));
17
- export const SliderRoot = styled('span', {
18
+ const SliderRoot = styled('span', {
18
19
  name: 'MuiSlider',
19
20
  slot: 'Root',
20
21
  overridesResolver: (props, styles) => {
@@ -80,7 +81,21 @@ export const SliderRoot = styled('span', {
80
81
  }
81
82
  }
82
83
  }));
83
- export const SliderRail = styled('span', {
84
+ process.env.NODE_ENV !== "production" ? SliderRoot.propTypes
85
+ /* remove-proptypes */
86
+ = {
87
+ // ----------------------------- Warning --------------------------------
88
+ // | These PropTypes are generated from the TypeScript type definitions |
89
+ // | To update them edit the d.ts file and run "yarn proptypes" |
90
+ // ----------------------------------------------------------------------
91
+
92
+ /**
93
+ * @ignore
94
+ */
95
+ children: PropTypes.node
96
+ } : void 0;
97
+ export { SliderRoot };
98
+ const SliderRail = styled('span', {
84
99
  name: 'MuiSlider',
85
100
  slot: 'Rail',
86
101
  overridesResolver: (props, styles) => styles.rail
@@ -105,7 +120,21 @@ export const SliderRail = styled('span', {
105
120
  }, ownerState.track === 'inverted' && {
106
121
  opacity: 1
107
122
  }));
108
- export const SliderTrack = styled('span', {
123
+ process.env.NODE_ENV !== "production" ? SliderRail.propTypes
124
+ /* remove-proptypes */
125
+ = {
126
+ // ----------------------------- Warning --------------------------------
127
+ // | These PropTypes are generated from the TypeScript type definitions |
128
+ // | To update them edit the d.ts file and run "yarn proptypes" |
129
+ // ----------------------------------------------------------------------
130
+
131
+ /**
132
+ * @ignore
133
+ */
134
+ children: PropTypes.node
135
+ } : void 0;
136
+ export { SliderRail };
137
+ const SliderTrack = styled('span', {
109
138
  name: 'MuiSlider',
110
139
  slot: 'Track',
111
140
  overridesResolver: (props, styles) => styles.track
@@ -141,7 +170,21 @@ export const SliderTrack = styled('span', {
141
170
  borderColor: color
142
171
  });
143
172
  });
144
- export const SliderThumb = styled('span', {
173
+ process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
174
+ /* remove-proptypes */
175
+ = {
176
+ // ----------------------------- Warning --------------------------------
177
+ // | These PropTypes are generated from the TypeScript type definitions |
178
+ // | To update them edit the d.ts file and run "yarn proptypes" |
179
+ // ----------------------------------------------------------------------
180
+
181
+ /**
182
+ * @ignore
183
+ */
184
+ children: PropTypes.node
185
+ } : void 0;
186
+ export { SliderTrack };
187
+ const SliderThumb = styled('span', {
145
188
  name: 'MuiSlider',
146
189
  slot: 'Thumb',
147
190
  overridesResolver: (props, styles) => {
@@ -213,7 +256,21 @@ export const SliderThumb = styled('span', {
213
256
  }
214
257
  }
215
258
  }));
216
- export const SliderValueLabel = styled(SliderValueLabelUnstyled, {
259
+ process.env.NODE_ENV !== "production" ? SliderThumb.propTypes
260
+ /* remove-proptypes */
261
+ = {
262
+ // ----------------------------- Warning --------------------------------
263
+ // | These PropTypes are generated from the TypeScript type definitions |
264
+ // | To update them edit the d.ts file and run "yarn proptypes" |
265
+ // ----------------------------------------------------------------------
266
+
267
+ /**
268
+ * @ignore
269
+ */
270
+ children: PropTypes.node
271
+ } : void 0;
272
+ export { SliderThumb };
273
+ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
217
274
  name: 'MuiSlider',
218
275
  slot: 'ValueLabel',
219
276
  overridesResolver: (props, styles) => styles.valueLabel
@@ -257,7 +314,21 @@ export const SliderValueLabel = styled(SliderValueLabelUnstyled, {
257
314
  backgroundColor: 'inherit'
258
315
  }
259
316
  }));
260
- export const SliderMark = styled('span', {
317
+ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes
318
+ /* remove-proptypes */
319
+ = {
320
+ // ----------------------------- Warning --------------------------------
321
+ // | These PropTypes are generated from the TypeScript type definitions |
322
+ // | To update them edit the d.ts file and run "yarn proptypes" |
323
+ // ----------------------------------------------------------------------
324
+
325
+ /**
326
+ * @ignore
327
+ */
328
+ children: PropTypes.node
329
+ } : void 0;
330
+ export { SliderValueLabel };
331
+ const SliderMark = styled('span', {
261
332
  name: 'MuiSlider',
262
333
  slot: 'Mark',
263
334
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markActive',
@@ -282,7 +353,21 @@ export const SliderMark = styled('span', {
282
353
  backgroundColor: theme.palette.background.paper,
283
354
  opacity: 0.8
284
355
  }));
285
- export const SliderMarkLabel = styled('span', {
356
+ process.env.NODE_ENV !== "production" ? SliderMark.propTypes
357
+ /* remove-proptypes */
358
+ = {
359
+ // ----------------------------- Warning --------------------------------
360
+ // | These PropTypes are generated from the TypeScript type definitions |
361
+ // | To update them edit the d.ts file and run "yarn proptypes" |
362
+ // ----------------------------------------------------------------------
363
+
364
+ /**
365
+ * @ignore
366
+ */
367
+ children: PropTypes.node
368
+ } : void 0;
369
+ export { SliderMark };
370
+ const SliderMarkLabel = styled('span', {
286
371
  name: 'MuiSlider',
287
372
  slot: 'MarkLabel',
288
373
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markLabelActive',
@@ -310,7 +395,9 @@ export const SliderMarkLabel = styled('span', {
310
395
  }, markLabelActive && {
311
396
  color: theme.palette.text.primary
312
397
  }));
313
- SliderRoot.propTypes = {
398
+ process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
399
+ /* remove-proptypes */
400
+ = {
314
401
  // ----------------------------- Warning --------------------------------
315
402
  // | These PropTypes are generated from the TypeScript type definitions |
316
403
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -319,40 +406,9 @@ SliderRoot.propTypes = {
319
406
  /**
320
407
  * @ignore
321
408
  */
322
- children: PropTypes.node,
323
-
324
- /**
325
- * @ignore
326
- */
327
- ownerState: PropTypes.shape({
328
- 'aria-label': PropTypes.string,
329
- 'aria-labelledby': PropTypes.string,
330
- 'aria-valuetext': PropTypes.string,
331
- classes: PropTypes.object,
332
- color: PropTypes.oneOf(['primary', 'secondary']),
333
- defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
334
- disabled: PropTypes.bool,
335
- getAriaLabel: PropTypes.func,
336
- getAriaValueText: PropTypes.func,
337
- isRtl: PropTypes.bool,
338
- marks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
339
- label: PropTypes.node,
340
- value: PropTypes.number.isRequired
341
- })), PropTypes.bool]),
342
- max: PropTypes.number,
343
- min: PropTypes.number,
344
- name: PropTypes.string,
345
- onChange: PropTypes.func,
346
- onChangeCommitted: PropTypes.func,
347
- orientation: PropTypes.oneOf(['horizontal', 'vertical']),
348
- scale: PropTypes.func,
349
- step: PropTypes.number,
350
- track: PropTypes.oneOf(['inverted', 'normal', false]),
351
- value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
352
- valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on']),
353
- valueLabelFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
354
- })
355
- };
409
+ children: PropTypes.node
410
+ } : void 0;
411
+ export { SliderMarkLabel };
356
412
 
357
413
  const extendUtilityClasses = ownerState => {
358
414
  const {
@@ -366,10 +422,6 @@ const extendUtilityClasses = ownerState => {
366
422
  });
367
423
  };
368
424
 
369
- const shouldSpreadOwnerState = Component => {
370
- return !Component || !isHostComponent(Component);
371
- };
372
-
373
425
  const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
374
426
  var _componentsProps$root, _componentsProps$thum, _componentsProps$trac, _componentsProps$valu;
375
427
 
@@ -381,6 +433,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
381
433
  const isRtl = theme.direction === 'rtl';
382
434
 
383
435
  const {
436
+ // eslint-disable-next-line react/prop-types
437
+ component = 'span',
384
438
  components = {},
385
439
  componentsProps = {},
386
440
  color = 'primary',
@@ -406,25 +460,26 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
406
460
  MarkLabel: SliderMarkLabel
407
461
  }, components),
408
462
  componentsProps: _extends({}, componentsProps, {
409
- root: _extends({}, componentsProps.root, shouldSpreadOwnerState(components.Root) && {
463
+ root: _extends({}, componentsProps.root, shouldSpreadAdditionalProps(components.Root) && {
464
+ as: component,
410
465
  ownerState: _extends({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState, {
411
466
  color,
412
467
  size
413
468
  })
414
469
  }),
415
- thumb: _extends({}, componentsProps.thumb, shouldSpreadOwnerState(components.Thumb) && {
470
+ thumb: _extends({}, componentsProps.thumb, shouldSpreadAdditionalProps(components.Thumb) && {
416
471
  ownerState: _extends({}, (_componentsProps$thum = componentsProps.thumb) == null ? void 0 : _componentsProps$thum.ownerState, {
417
472
  color,
418
473
  size
419
474
  })
420
475
  }),
421
- track: _extends({}, componentsProps.track, shouldSpreadOwnerState(components.Track) && {
476
+ track: _extends({}, componentsProps.track, shouldSpreadAdditionalProps(components.Track) && {
422
477
  ownerState: _extends({}, (_componentsProps$trac = componentsProps.track) == null ? void 0 : _componentsProps$trac.ownerState, {
423
478
  color,
424
479
  size
425
480
  })
426
481
  }),
427
- valueLabel: _extends({}, componentsProps.valueLabel, shouldSpreadOwnerState(components.ValueLabel) && {
482
+ valueLabel: _extends({}, componentsProps.valueLabel, shouldSpreadAdditionalProps(components.ValueLabel) && {
428
483
  ownerState: _extends({}, (_componentsProps$valu = componentsProps.valueLabel) == null ? void 0 : _componentsProps$valu.ownerState, {
429
484
  color,
430
485
  size
@@ -498,6 +553,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
498
553
  * @default {}
499
554
  */
500
555
  components: PropTypes.shape({
556
+ Input: PropTypes.elementType,
501
557
  Mark: PropTypes.elementType,
502
558
  MarkLabel: PropTypes.elementType,
503
559
  Rail: PropTypes.elementType,
@@ -511,7 +567,24 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
511
567
  * The props used for each slot inside the Slider.
512
568
  * @default {}
513
569
  */
514
- componentsProps: PropTypes.object,
570
+ componentsProps: PropTypes.shape({
571
+ input: PropTypes.object,
572
+ mark: PropTypes.object,
573
+ markLabel: PropTypes.object,
574
+ rail: PropTypes.object,
575
+ root: PropTypes.object,
576
+ thumb: PropTypes.object,
577
+ track: PropTypes.object,
578
+ valueLabel: PropTypes.shape({
579
+ className: PropTypes.string,
580
+ components: PropTypes.shape({
581
+ Root: PropTypes.elementType
582
+ }),
583
+ style: PropTypes.object,
584
+ value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
585
+ valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
586
+ })
587
+ }),
515
588
 
516
589
  /**
517
590
  * The default value. Use when the component is not controlled.
@@ -205,7 +205,9 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
205
205
  * The props used for each slot inside.
206
206
  * @default {}
207
207
  */
208
- componentsProps: PropTypes.object,
208
+ componentsProps: PropTypes.shape({
209
+ label: PropTypes.object
210
+ }),
209
211
 
210
212
  /**
211
213
  * If `true`, the step is marked as failed.
@@ -37,7 +37,7 @@ const SvgIconRoot = styled('svg', {
37
37
  theme,
38
38
  ownerState
39
39
  }) => {
40
- var _theme$palette$ownerS, _theme$palette$ownerS2;
40
+ var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _theme$palette$ownerS, _theme$palette, _theme$palette$ownerS2, _theme$palette2, _theme$palette2$actio, _theme$palette3, _theme$palette3$actio;
41
41
 
42
42
  return {
43
43
  userSelect: 'none',
@@ -46,19 +46,19 @@ const SvgIconRoot = styled('svg', {
46
46
  display: 'inline-block',
47
47
  fill: 'currentColor',
48
48
  flexShrink: 0,
49
- transition: theme.transitions.create('fill', {
50
- duration: theme.transitions.duration.shorter
49
+ transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
50
+ duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
51
51
  }),
52
52
  fontSize: {
53
53
  inherit: 'inherit',
54
- small: theme.typography.pxToRem(20),
55
- medium: theme.typography.pxToRem(24),
56
- large: theme.typography.pxToRem(35)
54
+ small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
55
+ medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
56
+ large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875'
57
57
  }[ownerState.fontSize],
58
58
  // TODO v5 deprecate, v6 remove for sx
59
- color: (_theme$palette$ownerS = (_theme$palette$ownerS2 = theme.palette[ownerState.color]) == null ? void 0 : _theme$palette$ownerS2.main) != null ? _theme$palette$ownerS : {
60
- action: theme.palette.action.active,
61
- disabled: theme.palette.action.disabled,
59
+ color: (_theme$palette$ownerS = (_theme$palette = theme.palette) == null ? void 0 : (_theme$palette$ownerS2 = _theme$palette[ownerState.color]) == null ? void 0 : _theme$palette$ownerS2.main) != null ? _theme$palette$ownerS : {
60
+ action: (_theme$palette2 = theme.palette) == null ? void 0 : (_theme$palette2$actio = _theme$palette2.action) == null ? void 0 : _theme$palette2$actio.active,
61
+ disabled: (_theme$palette3 = theme.palette) == null ? void 0 : (_theme$palette3$actio = _theme$palette3.action) == null ? void 0 : _theme$palette3$actio.disabled,
62
62
  inherit: undefined
63
63
  }[ownerState.color]
64
64
  };
@@ -8,9 +8,7 @@ import styled from '../styles/styled';
8
8
  import capitalize from '../utils/capitalize';
9
9
  import { isHorizontal } from '../Drawer/Drawer';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const SwipeAreaRoot = styled('div', {
12
- skipSx: true
13
- })(({
11
+ const SwipeAreaRoot = styled('div')(({
14
12
  theme,
15
13
  ownerState
16
14
  }) => _extends({
@@ -83,6 +83,7 @@ export interface BaseTextFieldProps
83
83
  id?: string;
84
84
  /**
85
85
  * Props applied to the [`InputLabel`](/api/input-label/) element.
86
+ * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
86
87
  */
87
88
  InputLabelProps?: Partial<InputLabelProps>;
88
89
  /**
@@ -191,7 +191,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
191
191
  variant: variant,
192
192
  ownerState: ownerState
193
193
  }, other, {
194
- children: [label && /*#__PURE__*/_jsx(InputLabel, _extends({
194
+ children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabel, _extends({
195
195
  htmlFor: id,
196
196
  id: inputLabelId
197
197
  }, InputLabelProps, {
@@ -296,6 +296,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
296
296
 
297
297
  /**
298
298
  * Props applied to the [`InputLabel`](/api/input-label/) element.
299
+ * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
299
300
  */
300
301
  InputLabelProps: PropTypes.object,
301
302
 
@@ -681,7 +681,12 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
681
681
  * and `componentsProps.transition` prop values win over `TransitionProps` if both are applied.
682
682
  * @default {}
683
683
  */
684
- componentsProps: PropTypes.object,
684
+ componentsProps: PropTypes.shape({
685
+ arrow: PropTypes.object,
686
+ popper: PropTypes.object,
687
+ tooltip: PropTypes.object,
688
+ transition: PropTypes.object
689
+ }),
685
690
 
686
691
  /**
687
692
  * Set to `true` if the `title` acts as an accessible description.
package/index.d.ts CHANGED
@@ -74,8 +74,6 @@ export * from './styles';
74
74
 
75
75
  export * from './utils';
76
76
 
77
- export * from '@mui/base';
78
-
79
77
  export { default as Accordion } from './Accordion';
80
78
  export * from './Accordion';
81
79
 
@@ -476,3 +474,10 @@ export * from './GlobalStyles';
476
474
  * @deprecated will be removed in v5.beta, please use StyledEngineProvider from @mui/material/styles instead
477
475
  */
478
476
  export { StyledEngineProvider } from './styles';
477
+
478
+ export { default as unstable_composeClasses } from '@mui/base/composeClasses';
479
+
480
+ export { default as generateUtilityClass } from '@mui/base/generateUtilityClass';
481
+ export * from '@mui/base/generateUtilityClass';
482
+
483
+ export { default as generateUtilityClasses } from '@mui/base/generateUtilityClasses';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.7
1
+ /** @license MUI v5.4.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -8,7 +8,6 @@ import * as colors from './colors';
8
8
  export { colors };
9
9
  export * from './styles';
10
10
  export * from './utils';
11
- export * from '@mui/base';
12
11
  export { default as Accordion } from './Accordion';
13
12
  export * from './Accordion';
14
13
  export { default as AccordionActions } from './AccordionActions';
@@ -273,4 +272,8 @@ export * from './Zoom'; // createFilterOptions is exported from Autocomplete
273
272
  export { default as useAutocomplete } from './useAutocomplete';
274
273
  export { default as GlobalStyles } from './GlobalStyles';
275
274
  export * from './GlobalStyles';
276
- export { StyledEngineProvider } from './styles';
275
+ export { StyledEngineProvider } from './styles';
276
+ export { default as unstable_composeClasses } from '@mui/base/composeClasses';
277
+ export { default as generateUtilityClass } from '@mui/base/generateUtilityClass';
278
+ export * from '@mui/base/generateUtilityClass';
279
+ export { default as generateUtilityClasses } from '@mui/base/generateUtilityClasses';
@@ -29,9 +29,7 @@ const useUtilityClasses = ownerState => {
29
29
  return composeClasses(slots, getSwitchBaseUtilityClass, classes);
30
30
  };
31
31
 
32
- const SwitchBaseRoot = styled(ButtonBase, {
33
- skipSx: true
34
- })(({
32
+ const SwitchBaseRoot = styled(ButtonBase)(({
35
33
  ownerState
36
34
  }) => _extends({
37
35
  padding: 9,
@@ -41,9 +39,7 @@ const SwitchBaseRoot = styled(ButtonBase, {
41
39
  }, ownerState.edge === 'end' && {
42
40
  marginRight: ownerState.size === 'small' ? -3 : -12
43
41
  }));
44
- const SwitchBaseInput = styled('input', {
45
- skipSx: true
46
- })({
42
+ const SwitchBaseInput = styled('input')({
47
43
  cursor: 'inherit',
48
44
  position: 'absolute',
49
45
  opacity: 0,
@@ -316,7 +316,7 @@ var AutocompleteGroupUl = styled('ul', {
316
316
  }));
317
317
  export { createFilterOptions };
318
318
  var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
319
- var _componentsProps$clea;
319
+ var _componentsProps$clea, _componentsProps$pape;
320
320
 
321
321
  var props = useThemeProps({
322
322
  props: inProps,
@@ -420,6 +420,8 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
420
420
  PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,
421
421
  _props$popupIcon = props.popupIcon,
422
422
  popupIcon = _props$popupIcon === void 0 ? _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})) : _props$popupIcon,
423
+ _props$readOnly = props.readOnly,
424
+ readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
423
425
  renderGroupProp = props.renderGroup,
424
426
  renderInput = props.renderInput,
425
427
  renderOptionProp = props.renderOption,
@@ -429,7 +431,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
429
431
  _props$size = props.size,
430
432
  size = _props$size === void 0 ? 'medium' : _props$size,
431
433
  valueProp = props.value,
432
- other = _objectWithoutProperties(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
434
+ other = _objectWithoutProperties(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
433
435
  /* eslint-enable @typescript-eslint/no-unused-vars */
434
436
 
435
437
 
@@ -455,7 +457,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
455
457
  inputValue = _useAutocomplete.inputValue,
456
458
  groupedOptions = _useAutocomplete.groupedOptions;
457
459
 
458
- var hasClearIcon = !disableClearable && !disabled && dirty;
460
+ var hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
459
461
  var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
460
462
 
461
463
  var ownerState = _extends({}, props, {
@@ -582,7 +584,8 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
582
584
  },
583
585
  inputProps: _extends({
584
586
  className: clsx(classes.input),
585
- disabled: disabled
587
+ disabled: disabled,
588
+ readOnly: readOnly
586
589
  }, getInputProps())
587
590
  })
588
591
  })), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
@@ -596,10 +599,11 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
596
599
  role: "presentation",
597
600
  anchorEl: anchorEl,
598
601
  open: true,
599
- children: /*#__PURE__*/_jsxs(AutocompletePaper, {
600
- as: PaperComponent,
601
- className: classes.paper,
602
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
602
603
  ownerState: ownerState,
604
+ as: PaperComponent
605
+ }, componentsProps.paper, {
606
+ className: clsx(classes.paper, (_componentsProps$pape = componentsProps.paper) == null ? void 0 : _componentsProps$pape.className),
603
607
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
604
608
  className: classes.loading,
605
609
  ownerState: ownerState,
@@ -632,7 +636,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
632
636
  return renderListOption(option, index);
633
637
  })
634
638
  })) : null]
635
- })
639
+ }))
636
640
  }) : null]
637
641
  });
638
642
  });
@@ -702,7 +706,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
702
706
  * If `true`, the input's text is cleared on blur if no value is selected.
703
707
  *
704
708
  * Set to `true` if you want to help the user enter a new value.
705
- * Set to `false` if you want to help the user resume his search.
709
+ * Set to `false` if you want to help the user resume their search.
706
710
  * @default !props.freeSolo
707
711
  */
708
712
  clearOnBlur: PropTypes.bool,
@@ -733,7 +737,10 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
733
737
  * The props used for each slot inside.
734
738
  * @default {}
735
739
  */
736
- componentsProps: PropTypes.object,
740
+ componentsProps: PropTypes.shape({
741
+ clearIndicator: PropTypes.object,
742
+ paper: PropTypes.object
743
+ }),
737
744
 
738
745
  /**
739
746
  * The default value. Use when the component is not controlled.
@@ -1021,6 +1028,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1021
1028
  */
1022
1029
  popupIcon: PropTypes.node,
1023
1030
 
1031
+ /**
1032
+ * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
1033
+ * @default false
1034
+ */
1035
+ readOnly: PropTypes.bool,
1036
+
1024
1037
  /**
1025
1038
  * Render the group.
1026
1039
  *
@@ -123,7 +123,9 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
123
123
  * The props used for each slot inside the Backdrop.
124
124
  * @default {}
125
125
  */
126
- componentsProps: PropTypes.object,
126
+ componentsProps: PropTypes.shape({
127
+ root: PropTypes.object
128
+ }),
127
129
 
128
130
  /**
129
131
  * If `true`, the backdrop is invisible.
@@ -5,10 +5,11 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { usePreviousProps } from '@mui/utils';
8
- import { generateUtilityClasses, isHostComponent } from '@mui/base';
8
+ import { generateUtilityClasses } from '@mui/base';
9
9
  import BadgeUnstyled, { badgeUnstyledClasses, getBadgeUtilityClass } from '@mui/base/BadgeUnstyled';
10
10
  import styled from '../styles/styled';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
+ import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
12
13
  import capitalize from '../utils/capitalize';
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  export var badgeClasses = _extends({}, badgeUnstyledClasses, generateUtilityClasses('MuiBadge', ['colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
@@ -144,11 +145,6 @@ var BadgeBadge = styled('span', {
144
145
  })
145
146
  });
146
147
  });
147
-
148
- var shouldSpreadAdditionalProps = function shouldSpreadAdditionalProps(Slot) {
149
- return !Slot || !isHostComponent(Slot);
150
- };
151
-
152
148
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
153
149
  var _componentsProps$root, _componentsProps$badg;
154
150
 
@@ -300,7 +296,10 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
300
296
  * The props used for each slot inside the Badge.
301
297
  * @default {}
302
298
  */
303
- componentsProps: PropTypes.object,
299
+ componentsProps: PropTypes.shape({
300
+ badge: PropTypes.object,
301
+ root: PropTypes.object
302
+ }),
304
303
 
305
304
  /**
306
305
  * If `true`, the badge is invisible.
@@ -6,9 +6,7 @@ import styled from '../styles/styled';
6
6
  import MoreHorizIcon from '../internal/svg-icons/MoreHoriz';
7
7
  import ButtonBase from '../ButtonBase';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- var BreadcrumbCollapsedButton = styled(ButtonBase, {
10
- skipSx: true
11
- })(function (_ref) {
9
+ var BreadcrumbCollapsedButton = styled(ButtonBase)(function (_ref) {
12
10
  var theme = _ref.theme;
13
11
  return _extends({
14
12
  display: 'flex',
@@ -22,8 +22,7 @@ var exitKeyframe = keyframes(_templateObject2 || (_templateObject2 = _taggedTemp
22
22
  var pulsateKeyframe = keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])));
23
23
  export var TouchRippleRoot = styled('span', {
24
24
  name: 'MuiTouchRipple',
25
- slot: 'Root',
26
- skipSx: true
25
+ slot: 'Root'
27
26
  })({
28
27
  overflow: 'hidden',
29
28
  pointerEvents: 'none',
@@ -255,7 +255,10 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
255
255
  * The props used for each slot inside the Input.
256
256
  * @default {}
257
257
  */
258
- componentsProps: PropTypes.object,
258
+ componentsProps: PropTypes.shape({
259
+ input: PropTypes.object,
260
+ root: PropTypes.object
261
+ }),
259
262
 
260
263
  /**
261
264
  * The default value. Use when the component is not controlled.