@mui/material 7.3.4 → 7.3.6

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 (202) hide show
  1. package/Accordion/Accordion.d.ts +56 -55
  2. package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  3. package/Alert/alertClasses.d.ts +24 -24
  4. package/AppBar/AppBar.d.ts +13 -2
  5. package/AppBar/AppBar.js +12 -1
  6. package/Breadcrumbs/BreadcrumbCollapsed.js +0 -2
  7. package/Button/Button.d.ts +1 -0
  8. package/Button/buttonClasses.d.ts +33 -33
  9. package/ButtonBase/ButtonBase.js +8 -1
  10. package/ButtonBase/TouchRipple.js +1 -1
  11. package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  12. package/CHANGELOG.md +142 -0
  13. package/Chip/Chip.js +1 -1
  14. package/Chip/chipClasses.d.ts +26 -26
  15. package/CircularProgress/circularProgressClasses.d.ts +2 -2
  16. package/Collapse/Collapse.d.ts +31 -1
  17. package/Collapse/Collapse.js +73 -30
  18. package/CssBaseline/CssBaseline.d.ts +1 -1
  19. package/CssBaseline/CssBaseline.js +1 -1
  20. package/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
  21. package/Dialog/dialogClasses.d.ts +2 -2
  22. package/Divider/dividerClasses.d.ts +1 -1
  23. package/Drawer/drawerClasses.d.ts +8 -8
  24. package/FormControl/FormControl.d.ts +1 -0
  25. package/FormHelperText/FormHelperText.d.ts +1 -0
  26. package/FormLabel/FormLabel.d.ts +1 -0
  27. package/GlobalStyles/GlobalStyles.js +0 -2
  28. package/IconButton/IconButton.d.ts +1 -0
  29. package/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
  30. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
  31. package/InitColorSchemeScript/InitColorSchemeScript.js +0 -2
  32. package/Input/inputClasses.d.ts +4 -4
  33. package/InputBase/inputBaseClasses.d.ts +5 -5
  34. package/InputLabel/InputLabel.d.ts +1 -0
  35. package/LinearProgress/linearProgressClasses.d.ts +9 -9
  36. package/ListItem/ListItem.d.ts +5 -0
  37. package/ListItem/ListItem.js +19 -4
  38. package/MenuList/MenuList.js +2 -1
  39. package/OutlinedInput/NotchedOutline.js +0 -2
  40. package/OutlinedInput/OutlinedInput.d.ts +1 -0
  41. package/OutlinedInput/outlinedInputClasses.d.ts +4 -4
  42. package/PaginationItem/paginationItemClasses.d.ts +4 -4
  43. package/Radio/RadioButtonIcon.js +0 -2
  44. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
  45. package/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
  46. package/Select/SelectInput.d.ts +2 -0
  47. package/Select/SelectInput.js +6 -0
  48. package/Select/selectClasses.d.ts +3 -3
  49. package/Slider/Slider.d.ts +1 -1
  50. package/Slider/sliderClasses.d.ts +7 -7
  51. package/Slider/useSlider.types.d.ts +1 -1
  52. package/Snackbar/Snackbar.js +1 -3
  53. package/StepConnector/stepConnectorClasses.d.ts +2 -2
  54. package/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
  55. package/Tabs/Tabs.js +3 -2
  56. package/TextField/TextField.d.ts +10 -5
  57. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  58. package/Unstable_TrapFocus/FocusTrap.js +13 -8
  59. package/Zoom/Zoom.d.ts +1 -1
  60. package/Zoom/Zoom.js +1 -1
  61. package/esm/Accordion/Accordion.d.ts +56 -55
  62. package/esm/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  63. package/esm/Alert/alertClasses.d.ts +24 -24
  64. package/esm/AppBar/AppBar.d.ts +13 -2
  65. package/esm/AppBar/AppBar.js +12 -1
  66. package/esm/Breadcrumbs/BreadcrumbCollapsed.js +0 -1
  67. package/esm/Button/Button.d.ts +1 -0
  68. package/esm/Button/buttonClasses.d.ts +33 -33
  69. package/esm/ButtonBase/ButtonBase.js +8 -1
  70. package/esm/ButtonBase/TouchRipple.js +1 -1
  71. package/esm/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  72. package/esm/Chip/Chip.js +1 -1
  73. package/esm/Chip/chipClasses.d.ts +26 -26
  74. package/esm/CircularProgress/circularProgressClasses.d.ts +2 -2
  75. package/esm/Collapse/Collapse.d.ts +31 -1
  76. package/esm/Collapse/Collapse.js +73 -30
  77. package/esm/CssBaseline/CssBaseline.d.ts +1 -1
  78. package/esm/CssBaseline/CssBaseline.js +1 -1
  79. package/esm/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
  80. package/esm/Dialog/dialogClasses.d.ts +2 -2
  81. package/esm/Divider/dividerClasses.d.ts +1 -1
  82. package/esm/Drawer/drawerClasses.d.ts +8 -8
  83. package/esm/FormControl/FormControl.d.ts +1 -0
  84. package/esm/FormHelperText/FormHelperText.d.ts +1 -0
  85. package/esm/FormLabel/FormLabel.d.ts +1 -0
  86. package/esm/GlobalStyles/GlobalStyles.js +0 -1
  87. package/esm/IconButton/IconButton.d.ts +1 -0
  88. package/esm/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
  89. package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
  90. package/esm/InitColorSchemeScript/InitColorSchemeScript.js +0 -1
  91. package/esm/Input/inputClasses.d.ts +4 -4
  92. package/esm/InputBase/inputBaseClasses.d.ts +5 -5
  93. package/esm/InputLabel/InputLabel.d.ts +1 -0
  94. package/esm/LinearProgress/linearProgressClasses.d.ts +9 -9
  95. package/esm/ListItem/ListItem.d.ts +5 -0
  96. package/esm/ListItem/ListItem.js +19 -4
  97. package/esm/MenuList/MenuList.js +2 -1
  98. package/esm/OutlinedInput/NotchedOutline.js +0 -1
  99. package/esm/OutlinedInput/OutlinedInput.d.ts +1 -0
  100. package/esm/OutlinedInput/outlinedInputClasses.d.ts +4 -4
  101. package/esm/PaginationItem/paginationItemClasses.d.ts +4 -4
  102. package/esm/Radio/RadioButtonIcon.js +0 -1
  103. package/esm/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
  104. package/esm/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
  105. package/esm/Select/SelectInput.d.ts +2 -0
  106. package/esm/Select/SelectInput.js +6 -0
  107. package/esm/Select/selectClasses.d.ts +3 -3
  108. package/esm/Slider/Slider.d.ts +1 -1
  109. package/esm/Slider/sliderClasses.d.ts +7 -7
  110. package/esm/Slider/useSlider.types.d.ts +1 -1
  111. package/esm/Snackbar/Snackbar.js +1 -3
  112. package/esm/StepConnector/stepConnectorClasses.d.ts +2 -2
  113. package/esm/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
  114. package/esm/Tabs/Tabs.js +3 -2
  115. package/esm/TextField/TextField.d.ts +10 -5
  116. package/esm/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  117. package/esm/Unstable_TrapFocus/FocusTrap.js +13 -8
  118. package/esm/Zoom/Zoom.d.ts +1 -1
  119. package/esm/Zoom/Zoom.js +1 -1
  120. package/esm/index.js +1 -1
  121. package/esm/internal/svg-icons/Add.js +0 -1
  122. package/esm/internal/svg-icons/ArrowDownward.js +0 -1
  123. package/esm/internal/svg-icons/ArrowDropDown.js +0 -1
  124. package/esm/internal/svg-icons/Cancel.js +0 -1
  125. package/esm/internal/svg-icons/CheckBox.js +0 -1
  126. package/esm/internal/svg-icons/CheckBoxOutlineBlank.js +0 -1
  127. package/esm/internal/svg-icons/CheckCircle.js +0 -1
  128. package/esm/internal/svg-icons/Close.js +0 -1
  129. package/esm/internal/svg-icons/ErrorOutline.js +0 -1
  130. package/esm/internal/svg-icons/FirstPage.js +0 -1
  131. package/esm/internal/svg-icons/IndeterminateCheckBox.js +0 -1
  132. package/esm/internal/svg-icons/InfoOutlined.js +0 -1
  133. package/esm/internal/svg-icons/KeyboardArrowLeft.js +0 -1
  134. package/esm/internal/svg-icons/KeyboardArrowRight.js +0 -1
  135. package/esm/internal/svg-icons/LastPage.js +0 -1
  136. package/esm/internal/svg-icons/MoreHoriz.js +0 -1
  137. package/esm/internal/svg-icons/NavigateBefore.js +0 -1
  138. package/esm/internal/svg-icons/NavigateNext.js +0 -1
  139. package/esm/internal/svg-icons/Person.js +0 -1
  140. package/esm/internal/svg-icons/RadioButtonChecked.js +0 -1
  141. package/esm/internal/svg-icons/RadioButtonUnchecked.js +0 -1
  142. package/esm/internal/svg-icons/ReportProblemOutlined.js +0 -1
  143. package/esm/internal/svg-icons/Star.js +0 -1
  144. package/esm/internal/svg-icons/StarBorder.js +0 -1
  145. package/esm/internal/svg-icons/SuccessOutlined.js +0 -1
  146. package/esm/internal/svg-icons/Warning.js +0 -1
  147. package/esm/locale/caES.js +45 -42
  148. package/esm/styles/ThemeProvider.d.ts +1 -1
  149. package/esm/styles/ThemeProviderWithVars.d.ts +2 -3
  150. package/esm/styles/ThemeProviderWithVars.js +0 -1
  151. package/esm/styles/createThemeFoundation.d.ts +5 -3
  152. package/esm/styles/createThemeNoVars.d.ts +6 -3
  153. package/esm/styles/createThemeWithVars.d.ts +4 -4
  154. package/esm/styles/index.d.ts +1 -1
  155. package/esm/useAutocomplete/useAutocomplete.js +15 -2
  156. package/esm/utils/getActiveElement.d.ts +2 -0
  157. package/esm/utils/getActiveElement.js +2 -0
  158. package/esm/version/index.js +2 -2
  159. package/esm/zero-styled/index.d.ts +1 -2
  160. package/esm/zero-styled/index.js +0 -1
  161. package/index.js +1 -1
  162. package/internal/svg-icons/Add.js +0 -2
  163. package/internal/svg-icons/ArrowDownward.js +0 -2
  164. package/internal/svg-icons/ArrowDropDown.js +0 -2
  165. package/internal/svg-icons/Cancel.js +0 -2
  166. package/internal/svg-icons/CheckBox.js +0 -2
  167. package/internal/svg-icons/CheckBoxOutlineBlank.js +0 -2
  168. package/internal/svg-icons/CheckCircle.js +0 -2
  169. package/internal/svg-icons/Close.js +0 -2
  170. package/internal/svg-icons/ErrorOutline.js +0 -2
  171. package/internal/svg-icons/FirstPage.js +0 -2
  172. package/internal/svg-icons/IndeterminateCheckBox.js +0 -2
  173. package/internal/svg-icons/InfoOutlined.js +0 -2
  174. package/internal/svg-icons/KeyboardArrowLeft.js +0 -2
  175. package/internal/svg-icons/KeyboardArrowRight.js +0 -2
  176. package/internal/svg-icons/LastPage.js +0 -2
  177. package/internal/svg-icons/MoreHoriz.js +0 -2
  178. package/internal/svg-icons/NavigateBefore.js +0 -2
  179. package/internal/svg-icons/NavigateNext.js +0 -2
  180. package/internal/svg-icons/Person.js +0 -2
  181. package/internal/svg-icons/RadioButtonChecked.js +0 -2
  182. package/internal/svg-icons/RadioButtonUnchecked.js +0 -2
  183. package/internal/svg-icons/ReportProblemOutlined.js +0 -2
  184. package/internal/svg-icons/Star.js +0 -2
  185. package/internal/svg-icons/StarBorder.js +0 -2
  186. package/internal/svg-icons/SuccessOutlined.js +0 -2
  187. package/internal/svg-icons/Warning.js +0 -2
  188. package/locale/caES.js +45 -42
  189. package/package.json +7 -7
  190. package/styles/ThemeProvider.d.ts +1 -1
  191. package/styles/ThemeProviderWithVars.d.ts +2 -3
  192. package/styles/ThemeProviderWithVars.js +0 -2
  193. package/styles/createThemeFoundation.d.ts +5 -3
  194. package/styles/createThemeNoVars.d.ts +6 -3
  195. package/styles/createThemeWithVars.d.ts +4 -4
  196. package/styles/index.d.ts +1 -1
  197. package/useAutocomplete/useAutocomplete.js +15 -2
  198. package/utils/getActiveElement.d.ts +2 -0
  199. package/utils/getActiveElement.js +9 -0
  200. package/version/index.js +2 -2
  201. package/zero-styled/index.d.ts +1 -2
  202. package/zero-styled/index.js +0 -2
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
5
  Object.defineProperty(exports, "__esModule", {
7
6
  value: true
8
7
  });
9
8
  exports.default = NotchedOutline;
10
- var React = _interopRequireWildcard(require("react"));
11
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
10
  var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
13
11
  var _zeroStyled = require("../zero-styled");
@@ -43,6 +43,7 @@ export interface OutlinedInputOwnerState extends Omit<OutlinedInputProps, 'slots
43
43
  *
44
44
  * Demos:
45
45
  *
46
+ * - [Number Field](https://mui.com/material-ui/react-number-field/)
46
47
  * - [Text Field](https://mui.com/material-ui/react-text-field/)
47
48
  *
48
49
  * API:
@@ -22,19 +22,19 @@ export interface OutlinedInputClasses {
22
22
  /** Styles applied to the input element. */
23
23
  input: string;
24
24
  /** Styles applied to the input element if `size="small"`.
25
- * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
25
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#input-base-classes-MuiInputBase-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#input-base-classes-MuiInputBase-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
26
26
  */
27
27
  inputSizeSmall: string;
28
28
  /** Styles applied to the input element if `multiline={true}`.
29
- * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
29
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#input-base-classes-MuiInputBase-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#input-base-classes-MuiInputBase-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
30
30
  */
31
31
  inputMultiline: string;
32
32
  /** Styles applied to the input element if `startAdornment` is provided.
33
- * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
33
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#input-base-classes-MuiInputBase-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#input-base-classes-MuiInputBase-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
34
34
  */
35
35
  inputAdornedStart: string;
36
36
  /** Styles applied to the input element if `endAdornment` is provided.
37
- * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
37
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#input-base-classes-MuiInputBase-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#input-base-classes-MuiInputBase-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
38
38
  */
39
39
  inputAdornedEnd: string;
40
40
  /** Styles applied to the input element if `type="search"`. */
@@ -10,21 +10,21 @@ export interface PaginationItemClasses {
10
10
  /** Styles applied to the root element if `variant="text"`. */
11
11
  text: string;
12
12
  /** Styles applied to the root element if `variant="text"` and `color="primary"`.
13
- * @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-text) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
13
+ * @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
14
14
  */
15
15
  textPrimary: string;
16
16
  /** Styles applied to the root element if `variant="text"` and `color="secondary"`.
17
- * @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-text) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
17
+ * @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
18
18
  */
19
19
  textSecondary: string;
20
20
  /** Styles applied to the root element if `variant="outlined"`. */
21
21
  outlined: string;
22
22
  /** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
23
- * @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-outlined) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
23
+ * @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
24
24
  */
25
25
  outlinedPrimary: string;
26
26
  /** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
27
- * @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-outlined) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
27
+ * @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
28
28
  */
29
29
  outlinedSecondary: string;
30
30
  /** Styles applied to the root element if `rounded="true"`. */
@@ -2,12 +2,10 @@
2
2
  'use client';
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
5
  Object.defineProperty(exports, "__esModule", {
7
6
  value: true
8
7
  });
9
8
  exports.default = void 0;
10
- var React = _interopRequireWildcard(require("react"));
11
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
10
  var _RadioButtonUnchecked = _interopRequireDefault(require("../internal/svg-icons/RadioButtonUnchecked"));
13
11
  var _RadioButtonChecked = _interopRequireDefault(require("../internal/svg-icons/RadioButtonChecked"));
@@ -14,7 +14,7 @@ export interface ScopedCssBaselineOwnProps {
14
14
  classes?: Partial<ScopedCssBaselineClasses>;
15
15
  /**
16
16
  * Enable `color-scheme` CSS property to use `theme.palette.mode`.
17
- * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
17
+ * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/color-scheme
18
18
  * For browser support, check out https://caniuse.com/?search=color-scheme
19
19
  */
20
20
  enableColorScheme?: boolean;
@@ -114,7 +114,7 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes /* remove-pr
114
114
  component: _propTypes.default.elementType,
115
115
  /**
116
116
  * Enable `color-scheme` CSS property to use `theme.palette.mode`.
117
- * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
117
+ * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/color-scheme
118
118
  * For browser support, check out https://caniuse.com/?search=color-scheme
119
119
  */
120
120
  enableColorScheme: _propTypes.default.bool,
@@ -41,6 +41,8 @@ export interface SelectInputProps<Value = unknown> {
41
41
  onChange?: (event: SelectChangeEvent<Value>, child: React.ReactNode) => void;
42
42
  onClose?: (event: React.SyntheticEvent) => void;
43
43
  onFocus?: React.FocusEventHandler<any>;
44
+ onKeyDown?: React.KeyboardEventHandler;
45
+ onMouseDown?: React.MouseEventHandler;
44
46
  onOpen?: (event: React.SyntheticEvent) => void;
45
47
  open?: boolean;
46
48
  readOnly?: boolean;
@@ -135,6 +135,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
135
135
  onChange,
136
136
  onClose,
137
137
  onFocus,
138
+ // eslint-disable-next-line react/prop-types
139
+ onKeyDown,
140
+ // eslint-disable-next-line react/prop-types
141
+ onMouseDown,
138
142
  onOpen,
139
143
  open: openProp,
140
144
  readOnly,
@@ -229,6 +233,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
229
233
  }
230
234
  };
231
235
  const handleMouseDown = event => {
236
+ onMouseDown?.(event);
232
237
  // Ignore everything but left-click
233
238
  if (event.button !== 0) {
234
239
  return;
@@ -308,6 +313,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
308
313
  event.preventDefault();
309
314
  update(true, event);
310
315
  }
316
+ onKeyDown?.(event);
311
317
  }
312
318
  };
313
319
  const open = displayNode !== null && openState;
@@ -20,15 +20,15 @@ export interface SelectClasses {
20
20
  /** Styles applied to the icon component if the popup is open. */
21
21
  iconOpen: string;
22
22
  /** Styles applied to the icon component if `variant="filled"`.
23
- * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-filled](/material-ui/api/select/#select-classes-filled) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
23
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-MuiSelect-icon) and [.MuiSelect-filled](/material-ui/api/select/#select-classes-MuiSelect-filled) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
24
24
  */
25
25
  iconFilled: string;
26
26
  /** Styles applied to the icon component if `variant="outlined"`.
27
- * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-outlined](/material-ui/api/select/#select-classes-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
27
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-MuiSelect-icon) and [.MuiSelect-outlined](/material-ui/api/select/#select-classes-MuiSelect-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
28
28
  */
29
29
  iconOutlined: string;
30
30
  /** Styles applied to the icon component if `variant="standard"`.
31
- * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-icon) and [.MuiSelect-standard](/material-ui/api/select/#select-classes-standard) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
31
+ * @deprecated Combine the [.MuiSelect-icon](/material-ui/api/select/#select-classes-MuiSelect-icon) and [.MuiSelect-standard](/material-ui/api/select/#select-classes-MuiSelect-standard) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
32
32
  */
33
33
  iconStandard: string;
34
34
  /** Styles applied to the underlying native input component. */
@@ -113,7 +113,7 @@ export interface SliderOwnProps<Value extends number | number[]> {
113
113
  * If an array, it should contain objects with `value` and an optional `label` keys.
114
114
  * @default false
115
115
  */
116
- marks?: boolean | Mark[];
116
+ marks?: boolean | readonly Mark[];
117
117
  /**
118
118
  * The maximum allowed value of the slider.
119
119
  * Should not be equal to min.
@@ -46,31 +46,31 @@ export interface SliderClasses {
46
46
  /** Styles applied to the root element if `size="small"`. */
47
47
  sizeSmall: string;
48
48
  /** Styles applied to the thumb element if `color="primary"`.
49
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorPrimary](/material-ui/api/slider/#slider-classes-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
49
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorPrimary](/material-ui/api/slider/#slider-classes-MuiSlider-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
50
50
  */
51
51
  thumbColorPrimary: string;
52
52
  /** Styles applied to the thumb element if `color="secondary"`.
53
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorSecondary](/material-ui/api/slider/#slider-classes-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
53
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorSecondary](/material-ui/api/slider/#slider-classes-MuiSlider-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
54
54
  */
55
55
  thumbColorSecondary: string;
56
56
  /** Styles applied to the thumb element if `color="error"`.
57
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorError](/material-ui/api/slider/#slider-classes-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
57
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorError](/material-ui/api/slider/#slider-classes-MuiSlider-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
58
58
  */
59
59
  thumbColorError: string;
60
60
  /** Styles applied to the thumb element if `color="info"`.
61
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorInfo](/material-ui/api/slider/#slider-classes-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
61
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorInfo](/material-ui/api/slider/#slider-classes-MuiSlider-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
62
62
  */
63
63
  thumbColorInfo: string;
64
64
  /** Styles applied to the thumb element if `color="success"`.
65
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorSuccess](/material-ui/api/slider/#slider-classes-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
65
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorSuccess](/material-ui/api/slider/#slider-classes-MuiSlider-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
66
66
  */
67
67
  thumbColorSuccess: string;
68
68
  /** Styles applied to the thumb element if `color="warning"`.
69
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-colorWarning](/material-ui/api/slider/#slider-classes-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
69
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-colorWarning](/material-ui/api/slider/#slider-classes-MuiSlider-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
70
70
  */
71
71
  thumbColorWarning: string;
72
72
  /** Styles applied to the thumb element if `size="small"`.
73
- * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-thumb) and [.MuiSlider-sizeSmall](/material-ui/api/slider/#slider-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
73
+ * @deprecated Combine the [.MuiSlider-thumb](/material-ui/api/slider/#slider-classes-MuiSlider-thumb) and [.MuiSlider-sizeSmall](/material-ui/api/slider/#slider-classes-MuiSlider-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
74
74
  */
75
75
  thumbSizeSmall: string;
76
76
  /** Styles applied to the thumb label element. */
@@ -198,7 +198,7 @@ export interface UseSliderReturnValue {
198
198
  /**
199
199
  * The marks of the slider. Marks indicate predetermined values to which the user can move the slider.
200
200
  */
201
- marks: Mark[];
201
+ marks: readonly Mark[];
202
202
  /**
203
203
  * The thumb index for the current value when in hover state.
204
204
  */
@@ -164,9 +164,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
164
164
  const {
165
165
  getRootProps,
166
166
  onClickAway
167
- } = (0, _useSnackbar.default)({
168
- ...ownerState
169
- });
167
+ } = (0, _useSnackbar.default)(ownerState);
170
168
  const [exited, setExited] = React.useState(true);
171
169
  const handleExited = node => {
172
170
  setExited(true);
@@ -16,11 +16,11 @@ export interface StepConnectorClasses {
16
16
  /** Styles applied to the line element. */
17
17
  line: string;
18
18
  /** Styles applied to the line element if `orientation="horizontal"`.
19
- * @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19
+ * @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-MuiStepConnector-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-MuiStepConnector-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
20
20
  */
21
21
  lineHorizontal: string;
22
22
  /** Styles applied to the line element if `orientation="vertical"`.
23
- * @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
23
+ * @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-MuiStepConnector-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-MuiStepConnector-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
24
24
  */
25
25
  lineVertical: string;
26
26
  }
@@ -10,11 +10,11 @@ export interface TableSortLabelClasses {
10
10
  /** Styles applied to the icon component. */
11
11
  icon: string;
12
12
  /** Styles applied to the icon component if `direction="desc"`.
13
- * @deprecated Combine the [.MuiTableSortLabel-icon](/material-ui/api/table-sort-label/#table-sort-label-classes-icon) and [.MuiTableSortLabel-directionDesc](/material-ui/api/table-sort-label/#table-sort-label-classes-direction-desc) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
13
+ * @deprecated Combine the [.MuiTableSortLabel-icon](/material-ui/api/table-sort-label/#TableSortLabel-css-MuiTableSortLabel-icon) and [.MuiTableSortLabel-directionDesc](/material-ui/api/table-sort-label/#table-sort-label-classes-MuiTableSortLabel-directionDesc) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
14
14
  */
15
15
  iconDirectionDesc: string;
16
16
  /** Styles applied to the icon component if `direction="asc"`.
17
- * @deprecated Combine the [.MuiTableSortLabel-icon](/material-ui/api/table-sort-label/#table-sort-label-classes-icon) and [.MuiTableSortLabel-directionAsc](/material-ui/api/table-sort-label/#table-sort-label-classes-direction-asc) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
17
+ * @deprecated Combine the [.MuiTableSortLabel-icon](/material-ui/api/table-sort-label/#TableSortLabel-css-MuiTableSortLabel-icon) and [.MuiTableSortLabel-directionAsc](/material-ui/api/table-sort-label/#table-sort-label-classes-MuiTableSortLabel-directionAsc) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
18
18
  */
19
19
  iconDirectionAsc: string;
20
20
  }
package/Tabs/Tabs.js CHANGED
@@ -26,6 +26,7 @@ var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallbac
26
26
  var _tabsClasses = _interopRequireWildcard(require("./tabsClasses"));
27
27
  var _ownerDocument = _interopRequireDefault(require("../utils/ownerDocument"));
28
28
  var _ownerWindow = _interopRequireDefault(require("../utils/ownerWindow"));
29
+ var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElement"));
29
30
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
30
31
  var _jsxRuntime = require("react/jsx-runtime");
31
32
  const nextItem = (list, item) => {
@@ -704,11 +705,11 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
704
705
  return;
705
706
  }
706
707
  const list = tabListRef.current;
707
- const currentFocus = (0, _ownerDocument.default)(list).activeElement;
708
+ const currentFocus = (0, _getActiveElement.default)((0, _ownerDocument.default)(list));
708
709
  // Keyboard navigation assumes that [role="tab"] are siblings
709
710
  // though we might warn in the future about nested, interactive elements
710
711
  // as a a11y violation
711
- const role = currentFocus.getAttribute('role');
712
+ const role = currentFocus?.getAttribute('role');
712
713
  if (role !== 'tab') {
713
714
  return;
714
715
  }
@@ -47,22 +47,27 @@ export interface TextFieldSlots {
47
47
  */
48
48
  select: React.ElementType;
49
49
  }
50
+ export interface TextFieldRootSlotPropsOverrides {}
51
+ export interface TextFieldInputSlotPropsOverrides {}
52
+ export interface TextFieldInputLabelSlotPropsOverrides {}
53
+ export interface TextFieldFormHelperTextSlotPropsOverrides {}
54
+ export interface TextFieldSelectSlotPropsOverrides {}
50
55
  export type TextFieldSlotsAndSlotProps<InputPropsType> = CreateSlotsAndSlotProps<TextFieldSlots, {
51
56
  /**
52
57
  * Props forwarded to the root slot.
53
58
  * By default, the available props are based on the [FormControl](https://mui.com/material-ui/api/form-control/#props) component.
54
59
  */
55
- root: SlotProps<React.ElementType<FormControlProps>, {}, TextFieldOwnerState>;
60
+ root: SlotProps<React.ElementType<FormControlProps>, TextFieldRootSlotPropsOverrides, TextFieldOwnerState>;
56
61
  /**
57
62
  * Props forwarded to the input slot.
58
63
  * By default, the available props are based on the [Input](https://mui.com/material-ui/api/input/#props) component.
59
64
  */
60
- input: SlotProps<React.ElementType<InputPropsType>, {}, TextFieldOwnerState>;
65
+ input: SlotProps<React.ElementType<InputPropsType>, TextFieldInputSlotPropsOverrides, TextFieldOwnerState>;
61
66
  /**
62
67
  * Props forwarded to the input label slot.
63
68
  * By default, the available props are based on the [InputLabel](https://mui.com/material-ui/api/input-label/#props) component.
64
69
  */
65
- inputLabel: SlotProps<React.ElementType<InputLabelProps>, {}, TextFieldOwnerState>;
70
+ inputLabel: SlotProps<React.ElementType<InputLabelProps>, TextFieldInputLabelSlotPropsOverrides, TextFieldOwnerState>;
66
71
  /**
67
72
  * Props forwarded to the html input slot.
68
73
  * By default, the available props are based on the html input element.
@@ -72,12 +77,12 @@ export type TextFieldSlotsAndSlotProps<InputPropsType> = CreateSlotsAndSlotProps
72
77
  * Props forwarded to the form helper text slot.
73
78
  * By default, the available props are based on the [FormHelperText](https://mui.com/material-ui/api/form-helper-text/#props) component.
74
79
  */
75
- formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, {}, TextFieldOwnerState>;
80
+ formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, TextFieldFormHelperTextSlotPropsOverrides, TextFieldOwnerState>;
76
81
  /**
77
82
  * Props forwarded to the select slot.
78
83
  * By default, the available props are based on the [Select](https://mui.com/material-ui/api/select/#props) component.
79
84
  */
80
- select: SlotProps<React.ElementType<SelectProps>, {}, TextFieldOwnerState>;
85
+ select: SlotProps<React.ElementType<SelectProps>, TextFieldSelectSlotPropsOverrides, TextFieldOwnerState>;
81
86
  }>;
82
87
  export interface BaseTextFieldProps extends StandardProps<FormControlProps,
83
88
  // event handlers are declared on derived interfaces
@@ -12,11 +12,11 @@ export interface ToggleButtonGroupClasses {
12
12
  /** Styles applied to the children. */
13
13
  grouped: string;
14
14
  /** Styles applied to the children if `orientation="horizontal"`.
15
- * @deprecated Combine the [.MuiToggleButtonGroup-horizontal](/material-ui/api/toggle-button-group/#toggle-button-group-classes-horizontal) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
15
+ * @deprecated Combine the [.MuiToggleButtonGroup-horizontal](/material-ui/api/toggle-button-group/#toggle-button-group-classes-MuiToggleButtonGroup-horizontal) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-MuiToggleButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
16
16
  */
17
17
  groupedHorizontal: string;
18
18
  /** Styles applied to the children if `orientation="vertical"`.
19
- * @deprecated Combine the [.MuiToggleButtonGroup-vertical](/material-ui/api/toggle-button-group/#toggle-button-group-classes-vertical) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19
+ * @deprecated Combine the [.MuiToggleButtonGroup-vertical](/material-ui/api/toggle-button-group/#toggle-button-group-classes-MuiToggleButtonGroup-vertical) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-MuiToggleButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
20
20
  */
21
21
  groupedVertical: string;
22
22
  /** Styles applied to the root element if `fullWidth={true}`. */
@@ -15,6 +15,7 @@ var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"))
15
15
  var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
16
16
  var _exactProp = _interopRequireDefault(require("@mui/utils/exactProp"));
17
17
  var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
18
+ var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElement"));
18
19
  var _jsxRuntime = require("react/jsx-runtime");
19
20
  // Inspired by https://github.com/focus-trap/tabbable
20
21
  const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(',');
@@ -118,7 +119,8 @@ function FocusTrap(props) {
118
119
  return;
119
120
  }
120
121
  const doc = (0, _ownerDocument.default)(rootRef.current);
121
- if (!rootRef.current.contains(doc.activeElement)) {
122
+ const activeElement = (0, _getActiveElement.default)(doc);
123
+ if (!rootRef.current.contains(activeElement)) {
122
124
  if (!rootRef.current.hasAttribute('tabIndex')) {
123
125
  if (process.env.NODE_ENV !== 'production') {
124
126
  console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to "-1".'].join('\n'));
@@ -153,6 +155,7 @@ function FocusTrap(props) {
153
155
  return;
154
156
  }
155
157
  const doc = (0, _ownerDocument.default)(rootRef.current);
158
+ const activeElement = (0, _getActiveElement.default)(doc);
156
159
  const loopFocus = nativeEvent => {
157
160
  lastKeydown.current = nativeEvent;
158
161
  if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
@@ -160,8 +163,8 @@ function FocusTrap(props) {
160
163
  }
161
164
 
162
165
  // Make sure the next tab starts from the right place.
163
- // doc.activeElement refers to the origin.
164
- if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {
166
+ // activeElement refers to the origin.
167
+ if (activeElement === rootRef.current && nativeEvent.shiftKey) {
165
168
  // We need to ignore the next contain as
166
169
  // it will try to move the focus back to the rootRef element.
167
170
  ignoreNextEnforceFocus.current = true;
@@ -178,23 +181,24 @@ function FocusTrap(props) {
178
181
  if (rootElement === null) {
179
182
  return;
180
183
  }
184
+ const activeEl = (0, _getActiveElement.default)(doc);
181
185
  if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
182
186
  ignoreNextEnforceFocus.current = false;
183
187
  return;
184
188
  }
185
189
 
186
190
  // The focus is already inside
187
- if (rootElement.contains(doc.activeElement)) {
191
+ if (rootElement.contains(activeEl)) {
188
192
  return;
189
193
  }
190
194
 
191
195
  // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)
192
- if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
196
+ if (disableEnforceFocus && activeEl !== sentinelStart.current && activeEl !== sentinelEnd.current) {
193
197
  return;
194
198
  }
195
199
 
196
200
  // if the focus event is not coming from inside the children's react tree, reset the refs
197
- if (doc.activeElement !== reactFocusEventTarget.current) {
201
+ if (activeEl !== reactFocusEventTarget.current) {
198
202
  reactFocusEventTarget.current = null;
199
203
  } else if (reactFocusEventTarget.current !== null) {
200
204
  return;
@@ -203,7 +207,7 @@ function FocusTrap(props) {
203
207
  return;
204
208
  }
205
209
  let tabbable = [];
206
- if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
210
+ if (activeEl === sentinelStart.current || activeEl === sentinelEnd.current) {
207
211
  tabbable = getTabbable(rootRef.current);
208
212
  }
209
213
 
@@ -235,7 +239,8 @@ function FocusTrap(props) {
235
239
  // The whatwg spec defines how the browser should behave but does not explicitly mention any events:
236
240
  // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.
237
241
  const interval = setInterval(() => {
238
- if (doc.activeElement && doc.activeElement.tagName === 'BODY') {
242
+ const activeEl = (0, _getActiveElement.default)(doc);
243
+ if (activeEl && activeEl.tagName === 'BODY') {
239
244
  contain();
240
245
  }
241
246
  }, 50);
package/Zoom/Zoom.d.ts CHANGED
@@ -34,7 +34,7 @@ export interface ZoomProps extends TransitionProps {
34
34
 
35
35
  /**
36
36
  * The Zoom transition can be used for the floating variant of the
37
- * [Button](https://mui.com/material-ui/react-button/#floating-action-buttons) component.
37
+ * [Button](https://mui.com/material-ui/react-floating-action-button/#animation) component.
38
38
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
39
39
  *
40
40
  * Demos:
package/Zoom/Zoom.js CHANGED
@@ -27,7 +27,7 @@ const styles = {
27
27
 
28
28
  /**
29
29
  * The Zoom transition can be used for the floating variant of the
30
- * [Button](/material-ui/react-button/#floating-action-buttons) component.
30
+ * [Button](/material-ui/react-floating-action-button/#animation) component.
31
31
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
32
32
  */
33
33
  const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
@@ -55,62 +55,63 @@ export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots,
55
55
  */
56
56
  region: SlotProps<'div', AccordionRegionSlotPropsOverrides, AccordionOwnerState>;
57
57
  }>;
58
+ export interface AccordionOwnProps {
59
+ /**
60
+ * The content of the component.
61
+ */
62
+ children: NonNullable<React.ReactNode>;
63
+ /**
64
+ * Override or extend the styles applied to the component.
65
+ */
66
+ classes?: Partial<AccordionClasses>;
67
+ /**
68
+ * If `true`, expands the accordion by default.
69
+ * @default false
70
+ */
71
+ defaultExpanded?: boolean;
72
+ /**
73
+ * If `true`, the component is disabled.
74
+ * @default false
75
+ */
76
+ disabled?: boolean;
77
+ /**
78
+ * If `true`, it removes the margin between two expanded accordion items and the increase of height.
79
+ * @default false
80
+ */
81
+ disableGutters?: boolean;
82
+ /**
83
+ * If `true`, expands the accordion, otherwise collapse it.
84
+ * Setting this prop enables control over the accordion.
85
+ */
86
+ expanded?: boolean;
87
+ /**
88
+ * Callback fired when the expand/collapse state is changed.
89
+ *
90
+ * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
91
+ * @param {boolean} expanded The `expanded` state of the accordion.
92
+ */
93
+ onChange?: (event: React.SyntheticEvent, expanded: boolean) => void;
94
+ /**
95
+ * The system prop that allows defining system overrides as well as additional CSS styles.
96
+ */
97
+ sx?: SxProps<Theme>;
98
+ /**
99
+ * The component used for the transition.
100
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
101
+ * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
102
+ */
103
+ TransitionComponent?: React.JSXElementConstructor<TransitionProps & {
104
+ children?: React.ReactElement<unknown, any>;
105
+ }>;
106
+ /**
107
+ * Props applied to the transition element.
108
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
109
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
110
+ */
111
+ TransitionProps?: TransitionProps;
112
+ }
58
113
  export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{
59
- props: AdditionalProps & {
60
- /**
61
- * The content of the component.
62
- */
63
- children: NonNullable<React.ReactNode>;
64
- /**
65
- * Override or extend the styles applied to the component.
66
- */
67
- classes?: Partial<AccordionClasses>;
68
- /**
69
- * If `true`, expands the accordion by default.
70
- * @default false
71
- */
72
- defaultExpanded?: boolean;
73
- /**
74
- * If `true`, the component is disabled.
75
- * @default false
76
- */
77
- disabled?: boolean;
78
- /**
79
- * If `true`, it removes the margin between two expanded accordion items and the increase of height.
80
- * @default false
81
- */
82
- disableGutters?: boolean;
83
- /**
84
- * If `true`, expands the accordion, otherwise collapse it.
85
- * Setting this prop enables control over the accordion.
86
- */
87
- expanded?: boolean;
88
- /**
89
- * Callback fired when the expand/collapse state is changed.
90
- *
91
- * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
92
- * @param {boolean} expanded The `expanded` state of the accordion.
93
- */
94
- onChange?: (event: React.SyntheticEvent, expanded: boolean) => void;
95
- /**
96
- * The system prop that allows defining system overrides as well as additional CSS styles.
97
- */
98
- sx?: SxProps<Theme>;
99
- /**
100
- * The component used for the transition.
101
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
102
- * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
103
- */
104
- TransitionComponent?: React.JSXElementConstructor<TransitionProps & {
105
- children?: React.ReactElement<unknown, any>;
106
- }>;
107
- /**
108
- * Props applied to the transition element.
109
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
110
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
111
- */
112
- TransitionProps?: TransitionProps;
113
- } & AccordionSlotsAndSlotProps;
114
+ props: AdditionalProps & AccordionOwnProps & AccordionSlotsAndSlotProps;
114
115
  defaultComponent: RootComponent;
115
116
  }, 'onChange' | 'classes'>;
116
117
 
@@ -11,7 +11,7 @@ export interface AccordionSummaryClasses {
11
11
  gutters: string;
12
12
  /**
13
13
  * Styles applied to the children wrapper element unless `disableGutters={true}`.
14
- * @deprecated Combine the [.MuiAccordionSummary-gutters](/material-ui/api/accordion-summary/#AccordionSummary-classes-gutters) and [.MuiAccordionSummary-content](/material-ui/api/accordion-summary/#AccordionSummary-classes-content) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
14
+ * @deprecated Combine the [.MuiAccordionSummary-gutters](/material-ui/api/accordion-summary/#accordion-summary-classes-MuiAccordionSummary-gutters) and [.MuiAccordionSummary-content](/material-ui/api/accordion-summary/#AccordionSummary-css-MuiAccordionSummary-content) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
15
15
  */
16
16
  contentGutters: string;
17
17
  /** Styles applied to the children wrapper element. */