@mui/material 5.4.1 → 5.4.2

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 (150) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  9. package/Avatar/avatarClasses.d.ts +20 -20
  10. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  11. package/BottomNavigation/BottomNavigation.js +0 -0
  12. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  13. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  14. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  15. package/Button/buttonClasses.d.ts +76 -76
  16. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  17. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  18. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  19. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  20. package/CHANGELOG.md +65 -0
  21. package/Card/cardClasses.d.ts +8 -8
  22. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  23. package/CardActions/cardActionsClasses.d.ts +10 -10
  24. package/CardContent/cardContentClasses.d.ts +8 -8
  25. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  26. package/CardMedia/cardMediaClasses.d.ts +12 -12
  27. package/Checkbox/checkboxClasses.d.ts +18 -18
  28. package/Chip/chipClasses.d.ts +80 -80
  29. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  30. package/ClickAwayListener/index.d.ts +2 -2
  31. package/Collapse/collapseClasses.d.ts +18 -18
  32. package/Container/containerClasses.d.ts +22 -22
  33. package/Dialog/DialogContext.d.ts +6 -6
  34. package/Dialog/dialogClasses.d.ts +36 -36
  35. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  36. package/DialogContent/dialogContentClasses.d.ts +10 -10
  37. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  38. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  39. package/Divider/dividerClasses.d.ts +34 -34
  40. package/Drawer/drawerClasses.d.ts +30 -30
  41. package/Fab/fabClasses.d.ts +26 -26
  42. package/FilledInput/filledInputClasses.d.ts +40 -40
  43. package/FormControl/formControlClasses.d.ts +14 -14
  44. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  45. package/FormGroup/formGroupClasses.d.ts +12 -12
  46. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  47. package/FormLabel/formLabelClasses.d.ts +22 -22
  48. package/Grid/gridClasses.d.ts +48 -48
  49. package/Icon/iconClasses.d.ts +24 -24
  50. package/IconButton/iconButtonClasses.d.ts +26 -26
  51. package/ImageList/imageListClasses.d.ts +16 -16
  52. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  53. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  54. package/Input/inputClasses.d.ts +34 -34
  55. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  56. package/InputBase/inputBaseClasses.d.ts +44 -44
  57. package/InputLabel/inputLabelClasses.d.ts +32 -32
  58. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  59. package/Link/linkClasses.d.ts +18 -18
  60. package/List/listClasses.d.ts +14 -14
  61. package/ListItem/listItemClasses.d.ts +30 -30
  62. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  63. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  64. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  65. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  66. package/ListItemText/listItemTextClasses.d.ts +18 -18
  67. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  68. package/Menu/menuClasses.d.ts +12 -12
  69. package/MenuItem/menuItemClasses.d.ts +20 -20
  70. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  71. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  72. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  73. package/Pagination/paginationClasses.d.ts +14 -14
  74. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  75. package/Paper/paperClasses.d.ts +39 -39
  76. package/Popover/popoverClasses.d.ts +10 -10
  77. package/Popper/Popper.d.ts +17 -17
  78. package/Radio/radioClasses.d.ts +16 -16
  79. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  80. package/RadioGroup/useRadioGroup.d.ts +4 -4
  81. package/Rating/ratingClasses.d.ts +40 -40
  82. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  83. package/Select/Select.js +19 -7
  84. package/Select/selectClasses.d.ts +30 -30
  85. package/Skeleton/skeletonClasses.d.ts +24 -24
  86. package/Snackbar/snackbarClasses.d.ts +20 -20
  87. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  88. package/SpeedDial/speedDialClasses.d.ts +22 -22
  89. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  90. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  91. package/Step/stepClasses.d.ts +16 -16
  92. package/StepButton/stepButtonClasses.d.ts +14 -14
  93. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  94. package/StepContent/stepContentClasses.d.ts +12 -12
  95. package/StepIcon/stepIconClasses.d.ts +16 -16
  96. package/StepLabel/stepLabelClasses.d.ts +28 -28
  97. package/Stepper/stepperClasses.d.ts +14 -14
  98. package/SvgIcon/svgIconClasses.d.ts +24 -24
  99. package/Switch/switchClasses.d.ts +32 -32
  100. package/Tab/tabClasses.d.ts +26 -26
  101. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  102. package/Table/tableClasses.d.ts +10 -10
  103. package/TableBody/tableBodyClasses.d.ts +8 -8
  104. package/TableCell/tableCellClasses.d.ts +32 -32
  105. package/TableContainer/tableContainerClasses.d.ts +8 -8
  106. package/TableFooter/tableFooterClasses.d.ts +8 -8
  107. package/TableHead/tableHeadClasses.d.ts +8 -8
  108. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  109. package/TableRow/tableRowClasses.d.ts +16 -16
  110. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  111. package/Tabs/tabsClasses.d.ts +32 -32
  112. package/TextField/textFieldClasses.d.ts +8 -8
  113. package/ToggleButton/ToggleButton.d.ts +15 -0
  114. package/ToggleButton/ToggleButton.js +8 -2
  115. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  116. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  117. package/Toolbar/toolbarClasses.d.ts +14 -14
  118. package/Tooltip/tooltipClasses.d.ts +30 -30
  119. package/Typography/typographyClasses.d.ts +50 -50
  120. package/darkScrollbar/index.d.ts +28 -28
  121. package/index.d.ts +3 -0
  122. package/index.js +3 -1
  123. package/internal/switchBaseClasses.d.ts +12 -12
  124. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  125. package/legacy/Select/Select.js +23 -7
  126. package/legacy/ToggleButton/ToggleButton.js +8 -2
  127. package/legacy/index.js +3 -1
  128. package/locale/index.d.ts +68 -68
  129. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  130. package/modern/Select/Select.js +19 -7
  131. package/modern/ToggleButton/ToggleButton.js +8 -2
  132. package/modern/index.js +3 -1
  133. package/node/BottomNavigation/BottomNavigation.js +0 -0
  134. package/node/Select/Select.js +22 -9
  135. package/node/ToggleButton/ToggleButton.js +8 -2
  136. package/node/index.js +22 -1
  137. package/package.json +5 -5
  138. package/styles/index.d.ts +3 -0
  139. package/transitions/index.d.ts +1 -1
  140. package/transitions/transition.d.ts +13 -13
  141. package/transitions/utils.d.ts +23 -23
  142. package/umd/material-ui.development.js +133 -79
  143. package/umd/material-ui.production.min.js +8 -8
  144. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  145. package/useTouchRipple/index.d.ts +1 -1
  146. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  147. package/utils/getScrollbarSize.d.ts +2 -2
  148. package/utils/ownerDocument.d.ts +2 -2
  149. package/utils/ownerWindow.d.ts +2 -2
  150. package/utils/setRef.d.ts +2 -2
@@ -1,12 +1,12 @@
1
- export interface SwitchBaseClasses {
2
- root: string;
3
- checked: string;
4
- disabled: string;
5
- input: string;
6
- edgeStart: string;
7
- edgeEnd: string;
8
- }
9
- export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
- export declare function getSwitchBaseUtilityClass(slot: string): string;
11
- declare const switchBaseClasses: SwitchBaseClasses;
12
- export default switchBaseClasses;
1
+ export interface SwitchBaseClasses {
2
+ root: string;
3
+ checked: string;
4
+ disabled: string;
5
+ input: string;
6
+ edgeStart: string;
7
+ edgeEnd: string;
8
+ }
9
+ export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
+ export declare function getSwitchBaseUtilityClass(slot: string): string;
11
+ declare const switchBaseClasses: SwitchBaseClasses;
12
+ export default switchBaseClasses;
File without changes
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
 
4
- var _Input, _FilledInput;
4
+ var _StyledInput, _StyledFilledInput;
5
5
 
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -17,6 +17,7 @@ import FilledInput from '../FilledInput';
17
17
  import OutlinedInput from '../OutlinedInput';
18
18
  import useThemeProps from '../styles/useThemeProps';
19
19
  import useForkRef from '../utils/useForkRef';
20
+ import styled, { rootShouldForwardProp } from '../styles/styled';
20
21
  import { jsx as _jsx } from "react/jsx-runtime";
21
22
 
22
23
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -24,6 +25,19 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
24
25
  return classes;
25
26
  };
26
27
 
28
+ var styledRootConfig = {
29
+ name: 'MuiSelect',
30
+ overridesResolver: function overridesResolver(props, styles) {
31
+ return styles.root;
32
+ },
33
+ shouldForwardProp: function shouldForwardProp(prop) {
34
+ return rootShouldForwardProp(prop) && prop !== 'variant';
35
+ },
36
+ slot: 'Root'
37
+ };
38
+ var StyledInput = styled(Input, styledRootConfig)('');
39
+ var StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
40
+ var StyledFilledInput = styled(FilledInput, styledRootConfig)('');
27
41
  var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
28
42
  var props = useThemeProps({
29
43
  name: 'MuiSelect',
@@ -58,7 +72,7 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
58
72
  renderValue = props.renderValue,
59
73
  SelectDisplayProps = props.SelectDisplayProps,
60
74
  _props$variant = props.variant,
61
- variantProps = _props$variant === void 0 ? 'outlined' : _props$variant,
75
+ variantProp = _props$variant === void 0 ? 'outlined' : _props$variant,
62
76
  other = _objectWithoutProperties(props, ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]);
63
77
 
64
78
  var inputComponent = native ? NativeSelectInput : SelectInput;
@@ -68,16 +82,17 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
68
82
  muiFormControl: muiFormControl,
69
83
  states: ['variant']
70
84
  });
71
- var variant = fcs.variant || variantProps;
85
+ var variant = fcs.variant || variantProp;
72
86
  var InputComponent = input || {
73
- standard: _Input || (_Input = /*#__PURE__*/_jsx(Input, {})),
74
- outlined: /*#__PURE__*/_jsx(OutlinedInput, {
87
+ standard: _StyledInput || (_StyledInput = /*#__PURE__*/_jsx(StyledInput, {})),
88
+ outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {
75
89
  label: label
76
90
  }),
77
- filled: _FilledInput || (_FilledInput = /*#__PURE__*/_jsx(FilledInput, {}))
91
+ filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/_jsx(StyledFilledInput, {}))
78
92
  }[variant];
79
93
 
80
94
  var ownerState = _extends({}, props, {
95
+ variant: variant,
81
96
  classes: classesProp
82
97
  });
83
98
 
@@ -116,7 +131,8 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
116
131
  notched: true
117
132
  } : {}, {
118
133
  ref: inputComponentRef,
119
- className: clsx(InputComponent.props.className, className)
134
+ className: clsx(InputComponent.props.className, className),
135
+ variant: variant
120
136
  }, other));
121
137
  });
122
138
  process.env.NODE_ENV !== "production" ? Select.propTypes
@@ -196,12 +196,18 @@ process.env.NODE_ENV !== "production" ? ToggleButton.propTypes
196
196
  fullWidth: PropTypes.bool,
197
197
 
198
198
  /**
199
- * @ignore
199
+ * Callback fired when the state changes.
200
+ *
201
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
202
+ * @param {any} value of the selected button.
200
203
  */
201
204
  onChange: PropTypes.func,
202
205
 
203
206
  /**
204
- * @ignore
207
+ * Callback fired when the button is clicked.
208
+ *
209
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
210
+ * @param {any} value of the selected button.
205
211
  */
206
212
  onClick: PropTypes.func,
207
213
 
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.4.1
1
+ /** @license MUI v5.4.2
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.
@@ -174,6 +174,8 @@ export { default as Popover } from './Popover';
174
174
  export * from './Popover';
175
175
  export { default as Popper } from './Popper';
176
176
  export * from './Popper';
177
+ export { default as Portal } from './Portal';
178
+ export * from './Portal';
177
179
  export { default as Radio } from './Radio';
178
180
  export * from './Radio';
179
181
  export { default as RadioGroup } from './RadioGroup';
package/locale/index.d.ts CHANGED
@@ -1,68 +1,68 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSD: Localization;
27
- export declare const azAZ: Localization;
28
- export declare const bnBD: Localization;
29
- export declare const bgBG: Localization;
30
- export declare const caES: Localization;
31
- export declare const csCZ: Localization;
32
- export declare const daDK: Localization;
33
- export declare const deDE: Localization;
34
- export declare const elGR: Localization;
35
- export declare const enUS: Localization;
36
- export declare const esES: Localization;
37
- export declare const etEE: Localization;
38
- export declare const faIR: Localization;
39
- export declare const fiFI: Localization;
40
- export declare const frFR: Localization;
41
- export declare const heIL: Localization;
42
- export declare const hiIN: Localization;
43
- export declare const huHU: Localization;
44
- export declare const hyAM: Localization;
45
- export declare const idID: Localization;
46
- export declare const isIS: Localization;
47
- export declare const itIT: Localization;
48
- export declare const jaJP: Localization;
49
- export declare const khKH: Localization;
50
- export declare const koKR: Localization;
51
- export declare const kzKZ: Localization;
52
- export declare const nbNO: Localization;
53
- export declare const nlNL: Localization;
54
- export declare const plPL: Localization;
55
- export declare const ptBR: Localization;
56
- export declare const ptPT: Localization;
57
- export declare const roRO: Localization;
58
- export declare const ruRU: Localization;
59
- export declare const siLK: Localization;
60
- export declare const skSK: Localization;
61
- export declare const svSE: Localization;
62
- export declare const thTH: Localization;
63
- export declare const trTR: Localization;
64
- export declare const ukUA: Localization;
65
- export declare const viVN: Localization;
66
- export declare const zhCN: Localization;
67
- export declare const zhHK: Localization;
68
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSD: Localization;
27
+ export declare const azAZ: Localization;
28
+ export declare const bnBD: Localization;
29
+ export declare const bgBG: Localization;
30
+ export declare const caES: Localization;
31
+ export declare const csCZ: Localization;
32
+ export declare const daDK: Localization;
33
+ export declare const deDE: Localization;
34
+ export declare const elGR: Localization;
35
+ export declare const enUS: Localization;
36
+ export declare const esES: Localization;
37
+ export declare const etEE: Localization;
38
+ export declare const faIR: Localization;
39
+ export declare const fiFI: Localization;
40
+ export declare const frFR: Localization;
41
+ export declare const heIL: Localization;
42
+ export declare const hiIN: Localization;
43
+ export declare const huHU: Localization;
44
+ export declare const hyAM: Localization;
45
+ export declare const idID: Localization;
46
+ export declare const isIS: Localization;
47
+ export declare const itIT: Localization;
48
+ export declare const jaJP: Localization;
49
+ export declare const khKH: Localization;
50
+ export declare const koKR: Localization;
51
+ export declare const kzKZ: Localization;
52
+ export declare const nbNO: Localization;
53
+ export declare const nlNL: Localization;
54
+ export declare const plPL: Localization;
55
+ export declare const ptBR: Localization;
56
+ export declare const ptPT: Localization;
57
+ export declare const roRO: Localization;
58
+ export declare const ruRU: Localization;
59
+ export declare const siLK: Localization;
60
+ export declare const skSK: Localization;
61
+ export declare const svSE: Localization;
62
+ export declare const thTH: Localization;
63
+ export declare const trTR: Localization;
64
+ export declare const ukUA: Localization;
65
+ export declare const viVN: Localization;
66
+ export declare const zhCN: Localization;
67
+ export declare const zhHK: Localization;
68
+ export declare const zhTW: Localization;
File without changes
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
 
4
- var _Input, _FilledInput;
4
+ var _StyledInput, _StyledFilledInput;
5
5
 
6
6
  const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
7
7
  import * as React from 'react';
@@ -18,6 +18,7 @@ import FilledInput from '../FilledInput';
18
18
  import OutlinedInput from '../OutlinedInput';
19
19
  import useThemeProps from '../styles/useThemeProps';
20
20
  import useForkRef from '../utils/useForkRef';
21
+ import styled, { rootShouldForwardProp } from '../styles/styled';
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
 
23
24
  const useUtilityClasses = ownerState => {
@@ -27,6 +28,15 @@ const useUtilityClasses = ownerState => {
27
28
  return classes;
28
29
  };
29
30
 
31
+ const styledRootConfig = {
32
+ name: 'MuiSelect',
33
+ overridesResolver: (props, styles) => styles.root,
34
+ shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'variant',
35
+ slot: 'Root'
36
+ };
37
+ const StyledInput = styled(Input, styledRootConfig)('');
38
+ const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
39
+ const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
30
40
  const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
31
41
  const props = useThemeProps({
32
42
  name: 'MuiSelect',
@@ -54,7 +64,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
54
64
  open,
55
65
  renderValue,
56
66
  SelectDisplayProps,
57
- variant: variantProps = 'outlined'
67
+ variant: variantProp = 'outlined'
58
68
  } = props,
59
69
  other = _objectWithoutPropertiesLoose(props, _excluded);
60
70
 
@@ -65,16 +75,17 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
65
75
  muiFormControl,
66
76
  states: ['variant']
67
77
  });
68
- const variant = fcs.variant || variantProps;
78
+ const variant = fcs.variant || variantProp;
69
79
  const InputComponent = input || {
70
- standard: _Input || (_Input = /*#__PURE__*/_jsx(Input, {})),
71
- outlined: /*#__PURE__*/_jsx(OutlinedInput, {
80
+ standard: _StyledInput || (_StyledInput = /*#__PURE__*/_jsx(StyledInput, {})),
81
+ outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {
72
82
  label: label
73
83
  }),
74
- filled: _FilledInput || (_FilledInput = /*#__PURE__*/_jsx(FilledInput, {}))
84
+ filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/_jsx(StyledFilledInput, {}))
75
85
  }[variant];
76
86
 
77
87
  const ownerState = _extends({}, props, {
88
+ variant,
78
89
  classes: classesProp
79
90
  });
80
91
 
@@ -113,7 +124,8 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
113
124
  notched: true
114
125
  } : {}, {
115
126
  ref: inputComponentRef,
116
- className: clsx(InputComponent.props.className, className)
127
+ className: clsx(InputComponent.props.className, className),
128
+ variant
117
129
  }, other));
118
130
  });
119
131
  process.env.NODE_ENV !== "production" ? Select.propTypes
@@ -200,12 +200,18 @@ process.env.NODE_ENV !== "production" ? ToggleButton.propTypes
200
200
  fullWidth: PropTypes.bool,
201
201
 
202
202
  /**
203
- * @ignore
203
+ * Callback fired when the state changes.
204
+ *
205
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
206
+ * @param {any} value of the selected button.
204
207
  */
205
208
  onChange: PropTypes.func,
206
209
 
207
210
  /**
208
- * @ignore
211
+ * Callback fired when the button is clicked.
212
+ *
213
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
214
+ * @param {any} value of the selected button.
209
215
  */
210
216
  onClick: PropTypes.func,
211
217
 
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.4.1
1
+ /** @license MUI v5.4.2
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.
@@ -174,6 +174,8 @@ export { default as Popover } from './Popover';
174
174
  export * from './Popover';
175
175
  export { default as Popper } from './Popper';
176
176
  export * from './Popper';
177
+ export { default as Portal } from './Portal';
178
+ export * from './Portal';
177
179
  export { default as Radio } from './Radio';
178
180
  export * from './Radio';
179
181
  export { default as RadioGroup } from './RadioGroup';
File without changes
@@ -27,11 +27,11 @@ var _useFormControl = _interopRequireDefault(require("../FormControl/useFormCont
27
27
 
28
28
  var _ArrowDropDown = _interopRequireDefault(require("../internal/svg-icons/ArrowDropDown"));
29
29
 
30
- var _Input2 = _interopRequireDefault(require("../Input"));
30
+ var _Input = _interopRequireDefault(require("../Input"));
31
31
 
32
32
  var _NativeSelectInput = _interopRequireDefault(require("../NativeSelect/NativeSelectInput"));
33
33
 
34
- var _FilledInput2 = _interopRequireDefault(require("../FilledInput"));
34
+ var _FilledInput = _interopRequireDefault(require("../FilledInput"));
35
35
 
36
36
  var _OutlinedInput = _interopRequireDefault(require("../OutlinedInput"));
37
37
 
@@ -39,9 +39,11 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
39
39
 
40
40
  var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
41
41
 
42
+ var _styled = _interopRequireWildcard(require("../styles/styled"));
43
+
42
44
  var _jsxRuntime = require("react/jsx-runtime");
43
45
 
44
- var _Input, _FilledInput;
46
+ var _StyledInput, _StyledFilledInput;
45
47
 
46
48
  const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
47
49
 
@@ -56,6 +58,15 @@ const useUtilityClasses = ownerState => {
56
58
  return classes;
57
59
  };
58
60
 
61
+ const styledRootConfig = {
62
+ name: 'MuiSelect',
63
+ overridesResolver: (props, styles) => styles.root,
64
+ shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) && prop !== 'variant',
65
+ slot: 'Root'
66
+ };
67
+ const StyledInput = (0, _styled.default)(_Input.default, styledRootConfig)('');
68
+ const StyledOutlinedInput = (0, _styled.default)(_OutlinedInput.default, styledRootConfig)('');
69
+ const StyledFilledInput = (0, _styled.default)(_FilledInput.default, styledRootConfig)('');
59
70
  const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
60
71
  const props = (0, _useThemeProps.default)({
61
72
  name: 'MuiSelect',
@@ -82,7 +93,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
82
93
  open,
83
94
  renderValue,
84
95
  SelectDisplayProps,
85
- variant: variantProps = 'outlined'
96
+ variant: variantProp = 'outlined'
86
97
  } = props,
87
98
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
88
99
  const inputComponent = native ? _NativeSelectInput.default : _SelectInput.default;
@@ -92,15 +103,16 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
92
103
  muiFormControl,
93
104
  states: ['variant']
94
105
  });
95
- const variant = fcs.variant || variantProps;
106
+ const variant = fcs.variant || variantProp;
96
107
  const InputComponent = input || {
97
- standard: _Input || (_Input = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input2.default, {})),
98
- outlined: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OutlinedInput.default, {
108
+ standard: _StyledInput || (_StyledInput = /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInput, {})),
109
+ outlined: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledOutlinedInput, {
99
110
  label: label
100
111
  }),
101
- filled: _FilledInput || (_FilledInput = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FilledInput2.default, {}))
112
+ filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledFilledInput, {}))
102
113
  }[variant];
103
114
  const ownerState = (0, _extends2.default)({}, props, {
115
+ variant,
104
116
  classes: classesProp
105
117
  });
106
118
  const classes = useUtilityClasses(ownerState);
@@ -138,7 +150,8 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
138
150
  notched: true
139
151
  } : {}, {
140
152
  ref: inputComponentRef,
141
- className: (0, _clsx.default)(InputComponent.props.className, className)
153
+ className: (0, _clsx.default)(InputComponent.props.className, className),
154
+ variant
142
155
  }, other));
143
156
  });
144
157
  process.env.NODE_ENV !== "production" ? Select.propTypes
@@ -222,12 +222,18 @@ process.env.NODE_ENV !== "production" ? ToggleButton.propTypes
222
222
  fullWidth: _propTypes.default.bool,
223
223
 
224
224
  /**
225
- * @ignore
225
+ * Callback fired when the state changes.
226
+ *
227
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
228
+ * @param {any} value of the selected button.
226
229
  */
227
230
  onChange: _propTypes.default.func,
228
231
 
229
232
  /**
230
- * @ignore
233
+ * Callback fired when the button is clicked.
234
+ *
235
+ * @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
236
+ * @param {any} value of the selected button.
231
237
  */
232
238
  onClick: _propTypes.default.func,
233
239
 
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.4.1
1
+ /** @license MUI v5.4.2
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.
@@ -96,6 +96,7 @@ var _exportNames = {
96
96
  Paper: true,
97
97
  Popover: true,
98
98
  Popper: true,
99
+ Portal: true,
99
100
  Radio: true,
100
101
  RadioGroup: true,
101
102
  Rating: true,
@@ -647,6 +648,12 @@ Object.defineProperty(exports, "Popper", {
647
648
  return _Popper.default;
648
649
  }
649
650
  });
651
+ Object.defineProperty(exports, "Portal", {
652
+ enumerable: true,
653
+ get: function () {
654
+ return _Portal.default;
655
+ }
656
+ });
650
657
  Object.defineProperty(exports, "Radio", {
651
658
  enumerable: true,
652
659
  get: function () {
@@ -2161,6 +2168,20 @@ Object.keys(_Popper).forEach(function (key) {
2161
2168
  });
2162
2169
  });
2163
2170
 
2171
+ var _Portal = _interopRequireWildcard(require("./Portal"));
2172
+
2173
+ Object.keys(_Portal).forEach(function (key) {
2174
+ if (key === "default" || key === "__esModule") return;
2175
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
2176
+ if (key in exports && exports[key] === _Portal[key]) return;
2177
+ Object.defineProperty(exports, key, {
2178
+ enumerable: true,
2179
+ get: function () {
2180
+ return _Portal[key];
2181
+ }
2182
+ });
2183
+ });
2184
+
2164
2185
  var _Radio = _interopRequireWildcard(require("./Radio"));
2165
2186
 
2166
2187
  Object.keys(_Radio).forEach(function (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.",
@@ -46,10 +46,10 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.17.0",
49
- "@mui/base": "5.0.0-alpha.68",
50
- "@mui/system": "^5.4.1",
51
- "@mui/types": "^7.1.1",
52
- "@mui/utils": "^5.4.1",
49
+ "@mui/base": "5.0.0-alpha.69",
50
+ "@mui/system": "^5.4.2",
51
+ "@mui/types": "^7.1.2",
52
+ "@mui/utils": "^5.4.2",
53
53
  "@types/react-transition-group": "^4.4.4",
54
54
  "clsx": "^1.1.1",
55
55
  "csstype": "^3.0.10",
package/styles/index.d.ts CHANGED
@@ -12,6 +12,9 @@ export {
12
12
  PaletteColorOptions,
13
13
  PaletteOptions,
14
14
  SimplePaletteColorOptions,
15
+ TypeText,
16
+ TypeAction,
17
+ TypeBackground,
15
18
  } from './createPalette';
16
19
  export { default as createStyles } from './createStyles';
17
20
  export {
@@ -1 +1 @@
1
- export * from './transition';
1
+ export * from './transition';
@@ -1,13 +1,13 @@
1
- import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
2
- import * as React from 'react';
3
- export declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
- export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
- export interface EasingProps {
6
- easing: string | {
7
- enter?: string;
8
- exit?: string;
9
- };
10
- }
11
- export declare type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
12
- export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
13
- }
1
+ import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
2
+ import * as React from 'react';
3
+ export declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
+ export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
+ export interface EasingProps {
6
+ easing: string | {
7
+ enter?: string;
8
+ exit?: string;
9
+ };
10
+ }
11
+ export declare type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
12
+ export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
13
+ }