@mui/material 5.2.3 → 5.2.4

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 (172) 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/Avatar.d.ts +1 -1
  10. package/Avatar/avatarClasses.d.ts +20 -20
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/Badge/Badge.js +16 -3
  13. package/BottomNavigation/BottomNavigation.js +0 -0
  14. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  15. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  16. package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  17. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  18. package/Button/buttonClasses.d.ts +76 -76
  19. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  20. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  21. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  22. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  23. package/CHANGELOG.md +72 -0
  24. package/Card/cardClasses.d.ts +8 -8
  25. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  26. package/CardActions/cardActionsClasses.d.ts +10 -10
  27. package/CardContent/cardContentClasses.d.ts +8 -8
  28. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  29. package/CardMedia/cardMediaClasses.d.ts +12 -12
  30. package/Checkbox/checkboxClasses.d.ts +18 -18
  31. package/Chip/chipClasses.d.ts +80 -80
  32. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  33. package/ClickAwayListener/index.d.ts +2 -2
  34. package/Collapse/collapseClasses.d.ts +18 -18
  35. package/Container/containerClasses.d.ts +22 -22
  36. package/CssBaseline/CssBaseline.d.ts +1 -1
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/drawerClasses.d.ts +30 -30
  45. package/Fab/fabClasses.d.ts +26 -26
  46. package/FilledInput/filledInputClasses.d.ts +40 -40
  47. package/FormControl/formControlClasses.d.ts +14 -14
  48. package/FormControlLabel/formControlLabelClasses.d.ts +18 -18
  49. package/FormGroup/formGroupClasses.d.ts +10 -10
  50. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  51. package/FormLabel/formLabelClasses.d.ts +22 -22
  52. package/GlobalStyles/GlobalStyles.d.ts +2 -1
  53. package/Grid/Grid.js +74 -66
  54. package/Grid/gridClasses.d.ts +48 -48
  55. package/Icon/iconClasses.d.ts +24 -24
  56. package/IconButton/iconButtonClasses.d.ts +26 -26
  57. package/ImageList/imageListClasses.d.ts +16 -16
  58. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  59. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  60. package/Input/inputClasses.d.ts +34 -34
  61. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  62. package/InputBase/InputBase.d.ts +6 -0
  63. package/InputBase/InputBase.js +10 -2
  64. package/InputBase/inputBaseClasses.d.ts +44 -44
  65. package/InputLabel/inputLabelClasses.d.ts +32 -32
  66. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  67. package/Link/linkClasses.d.ts +18 -18
  68. package/List/listClasses.d.ts +14 -14
  69. package/ListItem/ListItem.d.ts +1 -1
  70. package/ListItem/listItemClasses.d.ts +30 -30
  71. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  72. package/ListItemButton/ListItemButton.d.ts +1 -1
  73. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  74. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  75. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  76. package/ListItemText/listItemTextClasses.d.ts +18 -18
  77. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  78. package/Menu/menuClasses.d.ts +12 -12
  79. package/MenuItem/MenuItem.d.ts +1 -1
  80. package/MenuItem/menuItemClasses.d.ts +20 -20
  81. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  82. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  83. package/OutlinedInput/OutlinedInput.js +14 -1
  84. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  85. package/Pagination/paginationClasses.d.ts +14 -14
  86. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  87. package/Paper/paperClasses.d.ts +39 -39
  88. package/Popover/popoverClasses.d.ts +10 -10
  89. package/Popper/Popper.d.ts +17 -17
  90. package/Radio/radioClasses.d.ts +16 -16
  91. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  92. package/RadioGroup/useRadioGroup.d.ts +4 -4
  93. package/Rating/ratingClasses.d.ts +40 -40
  94. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  95. package/Select/SelectInput.js +11 -3
  96. package/Select/selectClasses.d.ts +30 -30
  97. package/Skeleton/skeletonClasses.d.ts +24 -24
  98. package/Snackbar/snackbarClasses.d.ts +20 -20
  99. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  100. package/SpeedDial/speedDialClasses.d.ts +22 -22
  101. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  102. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  103. package/Step/stepClasses.d.ts +16 -16
  104. package/StepButton/stepButtonClasses.d.ts +14 -14
  105. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  106. package/StepContent/stepContentClasses.d.ts +12 -12
  107. package/StepIcon/stepIconClasses.d.ts +16 -16
  108. package/StepLabel/stepLabelClasses.d.ts +28 -28
  109. package/Stepper/stepperClasses.d.ts +14 -14
  110. package/SvgIcon/svgIconClasses.d.ts +24 -24
  111. package/Switch/switchClasses.d.ts +32 -32
  112. package/Tab/tabClasses.d.ts +26 -26
  113. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  114. package/Table/tableClasses.d.ts +10 -10
  115. package/TableBody/tableBodyClasses.d.ts +8 -8
  116. package/TableCell/tableCellClasses.d.ts +32 -32
  117. package/TableContainer/tableContainerClasses.d.ts +8 -8
  118. package/TableFooter/tableFooterClasses.d.ts +8 -8
  119. package/TableHead/tableHeadClasses.d.ts +8 -8
  120. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  121. package/TableRow/tableRowClasses.d.ts +16 -16
  122. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  123. package/Tabs/tabsClasses.d.ts +32 -32
  124. package/TextField/TextField.js +2 -9
  125. package/TextField/textFieldClasses.d.ts +8 -8
  126. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  127. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  128. package/Toolbar/toolbarClasses.d.ts +14 -14
  129. package/Tooltip/tooltipClasses.d.ts +30 -30
  130. package/Typography/typographyClasses.d.ts +50 -50
  131. package/darkScrollbar/index.d.ts +28 -28
  132. package/index.js +1 -1
  133. package/internal/switchBaseClasses.d.ts +12 -12
  134. package/legacy/Badge/Badge.js +18 -4
  135. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  136. package/legacy/Grid/Grid.js +84 -78
  137. package/legacy/InputBase/InputBase.js +10 -2
  138. package/legacy/OutlinedInput/OutlinedInput.js +14 -1
  139. package/legacy/Select/SelectInput.js +11 -5
  140. package/legacy/TextField/TextField.js +2 -9
  141. package/legacy/index.js +1 -1
  142. package/locale/index.d.ts +66 -66
  143. package/modern/Badge/Badge.js +16 -3
  144. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  145. package/modern/Grid/Grid.js +74 -66
  146. package/modern/InputBase/InputBase.js +10 -2
  147. package/modern/OutlinedInput/OutlinedInput.js +14 -1
  148. package/modern/Select/SelectInput.js +11 -3
  149. package/modern/TextField/TextField.js +2 -7
  150. package/modern/index.js +1 -1
  151. package/node/Badge/Badge.js +16 -3
  152. package/node/BottomNavigation/BottomNavigation.js +0 -0
  153. package/node/Grid/Grid.js +75 -65
  154. package/node/InputBase/InputBase.js +10 -2
  155. package/node/OutlinedInput/OutlinedInput.js +15 -1
  156. package/node/Select/SelectInput.js +11 -3
  157. package/node/TextField/TextField.js +1 -8
  158. package/node/index.js +1 -1
  159. package/package.json +3 -3
  160. package/styles/createTheme.d.ts +1 -1
  161. package/transitions/index.d.ts +1 -1
  162. package/transitions/transition.d.ts +13 -14
  163. package/transitions/utils.d.ts +23 -23
  164. package/umd/material-ui.development.js +160 -114
  165. package/umd/material-ui.production.min.js +21 -21
  166. package/useMediaQuery/useMediaQuery.d.ts +27 -27
  167. package/useTouchRipple/index.d.ts +1 -1
  168. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  169. package/utils/getScrollbarSize.d.ts +2 -2
  170. package/utils/ownerDocument.d.ts +2 -2
  171. package/utils/ownerWindow.d.ts +2 -2
  172. package/utils/setRef.d.ts +2 -2
@@ -1,30 +1,30 @@
1
- export interface TooltipClasses {
2
- /** Styles applied to the Popper component. */
3
- popper: string;
4
- /** Styles applied to the Popper component unless `disableInteractive={true}`. */
5
- popperInteractive: string;
6
- /** Styles applied to the Popper component if `arrow={true}`. */
7
- popperArrow: string;
8
- /** Styles applied to the Popper component unless the tooltip is open. */
9
- popperClose: string;
10
- /** Styles applied to the tooltip (label wrapper) element. */
11
- tooltip: string;
12
- /** Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */
13
- tooltipArrow: string;
14
- /** Styles applied to the arrow element. */
15
- arrow: string;
16
- /** Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */
17
- touch: string;
18
- /** Styles applied to the tooltip (label wrapper) element if `placement` contains "left". */
19
- tooltipPlacementLeft: string;
20
- /** Styles applied to the tooltip (label wrapper) element if `placement` contains "right". */
21
- tooltipPlacementRight: string;
22
- /** Styles applied to the tooltip (label wrapper) element if `placement` contains "top". */
23
- tooltipPlacementTop: string;
24
- /** Styles applied to the tooltip (label wrapper) element if `placement` contains "bottom". */
25
- tooltipPlacementBottom: string;
26
- }
27
- export declare type TooltipClassKey = keyof TooltipClasses;
28
- export declare function getTooltipUtilityClass(slot: string): string;
29
- declare const tooltipClasses: TooltipClasses;
30
- export default tooltipClasses;
1
+ export interface TooltipClasses {
2
+ /** Styles applied to the Popper component. */
3
+ popper: string;
4
+ /** Styles applied to the Popper component unless `disableInteractive={true}`. */
5
+ popperInteractive: string;
6
+ /** Styles applied to the Popper component if `arrow={true}`. */
7
+ popperArrow: string;
8
+ /** Styles applied to the Popper component unless the tooltip is open. */
9
+ popperClose: string;
10
+ /** Styles applied to the tooltip (label wrapper) element. */
11
+ tooltip: string;
12
+ /** Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */
13
+ tooltipArrow: string;
14
+ /** Styles applied to the arrow element. */
15
+ arrow: string;
16
+ /** Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */
17
+ touch: string;
18
+ /** Styles applied to the tooltip (label wrapper) element if `placement` contains "left". */
19
+ tooltipPlacementLeft: string;
20
+ /** Styles applied to the tooltip (label wrapper) element if `placement` contains "right". */
21
+ tooltipPlacementRight: string;
22
+ /** Styles applied to the tooltip (label wrapper) element if `placement` contains "top". */
23
+ tooltipPlacementTop: string;
24
+ /** Styles applied to the tooltip (label wrapper) element if `placement` contains "bottom". */
25
+ tooltipPlacementBottom: string;
26
+ }
27
+ export declare type TooltipClassKey = keyof TooltipClasses;
28
+ export declare function getTooltipUtilityClass(slot: string): string;
29
+ declare const tooltipClasses: TooltipClasses;
30
+ export default tooltipClasses;
@@ -1,50 +1,50 @@
1
- export interface TypographyClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `variant="body2"`. */
5
- body2: string;
6
- /** Styles applied to the root element if `variant="body1"`. */
7
- body1: string;
8
- /** Styles applied to the root element if `variant="caption"`. */
9
- caption: string;
10
- /** Styles applied to the root element if `variant="button"`. */
11
- button: string;
12
- /** Styles applied to the root element if `variant="h1"`. */
13
- h1: string;
14
- /** Styles applied to the root element if `variant="h2"`. */
15
- h2: string;
16
- /** Styles applied to the root element if `variant="h3"`. */
17
- h3: string;
18
- /** Styles applied to the root element if `variant="h4"`. */
19
- h4: string;
20
- /** Styles applied to the root element if `variant="h5"`. */
21
- h5: string;
22
- /** Styles applied to the root element if `variant="h6"`. */
23
- h6: string;
24
- /** Styles applied to the root element if `variant="subtitle1"`. */
25
- subtitle1: string;
26
- /** Styles applied to the root element if `variant="subtitle2"`. */
27
- subtitle2: string;
28
- /** Styles applied to the root element if `variant="overline"`. */
29
- overline: string;
30
- /** Styles applied to the root element if `variant="inherit"`. */
31
- inherit: string;
32
- /** Styles applied to the root element if `align="left"`. */
33
- alignLeft: string;
34
- /** Styles applied to the root element if `align="center"`. */
35
- alignCenter: string;
36
- /** Styles applied to the root element if `align="right"`. */
37
- alignRight: string;
38
- /** Styles applied to the root element if `align="justify"`. */
39
- alignJustify: string;
40
- /** Styles applied to the root element if `nowrap={true}`. */
41
- noWrap: string;
42
- /** Styles applied to the root element if `gutterBottom={true}`. */
43
- gutterBottom: string;
44
- /** Styles applied to the root element if `paragraph={true}`. */
45
- paragraph: string;
46
- }
47
- export declare type TypographyClassKey = keyof TypographyClasses;
48
- export declare function getTypographyUtilityClass(slot: string): string;
49
- declare const typographyClasses: TypographyClasses;
50
- export default typographyClasses;
1
+ export interface TypographyClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `variant="body2"`. */
5
+ body2: string;
6
+ /** Styles applied to the root element if `variant="body1"`. */
7
+ body1: string;
8
+ /** Styles applied to the root element if `variant="caption"`. */
9
+ caption: string;
10
+ /** Styles applied to the root element if `variant="button"`. */
11
+ button: string;
12
+ /** Styles applied to the root element if `variant="h1"`. */
13
+ h1: string;
14
+ /** Styles applied to the root element if `variant="h2"`. */
15
+ h2: string;
16
+ /** Styles applied to the root element if `variant="h3"`. */
17
+ h3: string;
18
+ /** Styles applied to the root element if `variant="h4"`. */
19
+ h4: string;
20
+ /** Styles applied to the root element if `variant="h5"`. */
21
+ h5: string;
22
+ /** Styles applied to the root element if `variant="h6"`. */
23
+ h6: string;
24
+ /** Styles applied to the root element if `variant="subtitle1"`. */
25
+ subtitle1: string;
26
+ /** Styles applied to the root element if `variant="subtitle2"`. */
27
+ subtitle2: string;
28
+ /** Styles applied to the root element if `variant="overline"`. */
29
+ overline: string;
30
+ /** Styles applied to the root element if `variant="inherit"`. */
31
+ inherit: string;
32
+ /** Styles applied to the root element if `align="left"`. */
33
+ alignLeft: string;
34
+ /** Styles applied to the root element if `align="center"`. */
35
+ alignCenter: string;
36
+ /** Styles applied to the root element if `align="right"`. */
37
+ alignRight: string;
38
+ /** Styles applied to the root element if `align="justify"`. */
39
+ alignJustify: string;
40
+ /** Styles applied to the root element if `nowrap={true}`. */
41
+ noWrap: string;
42
+ /** Styles applied to the root element if `gutterBottom={true}`. */
43
+ gutterBottom: string;
44
+ /** Styles applied to the root element if `paragraph={true}`. */
45
+ paragraph: string;
46
+ }
47
+ export declare type TypographyClassKey = keyof TypographyClasses;
48
+ export declare function getTypographyUtilityClass(slot: string): string;
49
+ declare const typographyClasses: TypographyClasses;
50
+ export default typographyClasses;
@@ -1,28 +1,28 @@
1
- export default function darkScrollbar(options?: {
2
- track: string;
3
- thumb: string;
4
- active: string;
5
- }): {
6
- scrollbarColor: string;
7
- '&::-webkit-scrollbar, & *::-webkit-scrollbar': {
8
- backgroundColor: string;
9
- };
10
- '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
11
- borderRadius: number;
12
- backgroundColor: string;
13
- minHeight: number;
14
- border: string;
15
- };
16
- '&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus': {
17
- backgroundColor: string;
18
- };
19
- '&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active': {
20
- backgroundColor: string;
21
- };
22
- '&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover': {
23
- backgroundColor: string;
24
- };
25
- '&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner': {
26
- backgroundColor: string;
27
- };
28
- };
1
+ export default function darkScrollbar(options?: {
2
+ track: string;
3
+ thumb: string;
4
+ active: string;
5
+ }): {
6
+ scrollbarColor: string;
7
+ '&::-webkit-scrollbar, & *::-webkit-scrollbar': {
8
+ backgroundColor: string;
9
+ };
10
+ '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
11
+ borderRadius: number;
12
+ backgroundColor: string;
13
+ minHeight: number;
14
+ border: string;
15
+ };
16
+ '&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus': {
17
+ backgroundColor: string;
18
+ };
19
+ '&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active': {
20
+ backgroundColor: string;
21
+ };
22
+ '&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover': {
23
+ backgroundColor: string;
24
+ };
25
+ '&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner': {
26
+ backgroundColor: string;
27
+ };
28
+ };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.3
1
+ /** @license MUI v5.2.4
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.
@@ -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;
@@ -141,6 +141,11 @@ var BadgeBadge = styled('span', {
141
141
  })
142
142
  });
143
143
  });
144
+
145
+ var shouldSpreadAdditionalProps = function shouldSpreadAdditionalProps(Slot) {
146
+ return !Slot || !isHostComponent(Slot);
147
+ };
148
+
144
149
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
145
150
  var _componentsProps$root, _componentsProps$badg;
146
151
 
@@ -149,7 +154,9 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
149
154
  name: 'MuiBadge'
150
155
  });
151
156
 
152
- var _props$components = props.components,
157
+ var _props$component = props.component,
158
+ component = _props$component === void 0 ? 'span' : _props$component,
159
+ _props$components = props.components,
153
160
  components = _props$components === void 0 ? {} : _props$components,
154
161
  _props$componentsProp = props.componentsProps,
155
162
  componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
@@ -161,7 +168,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
161
168
  showZero = _props$showZero === void 0 ? false : _props$showZero,
162
169
  _props$variant = props.variant,
163
170
  variantProp = _props$variant === void 0 ? 'standard' : _props$variant,
164
- other = _objectWithoutProperties(props, ["components", "componentsProps", "color", "invisible", "badgeContent", "showZero", "variant"]);
171
+ other = _objectWithoutProperties(props, ["component", "components", "componentsProps", "color", "invisible", "badgeContent", "showZero", "variant"]);
165
172
 
166
173
  var prevProps = usePreviousProps({
167
174
  color: colorProp
@@ -193,12 +200,13 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
193
200
  Badge: BadgeBadge
194
201
  }, components),
195
202
  componentsProps: {
196
- root: _extends({}, componentsProps.root, (!components.Root || !isHostComponent(components.Root)) && {
203
+ root: _extends({}, componentsProps.root, shouldSpreadAdditionalProps(components.Root) && {
204
+ as: component,
197
205
  ownerState: _extends({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState, {
198
206
  color: color
199
207
  })
200
208
  }),
201
- badge: _extends({}, componentsProps.badge, (!components.Thumb || !isHostComponent(components.Thumb)) && {
209
+ badge: _extends({}, componentsProps.badge, shouldSpreadAdditionalProps(components.Badge) && {
202
210
  ownerState: _extends({}, (_componentsProps$badg = componentsProps.badge) == null ? void 0 : _componentsProps$badg.ownerState, {
203
211
  color: color
204
212
  })
@@ -251,6 +259,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
251
259
  /* @typescript-to-proptypes-ignore */
252
260
  .oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
253
261
 
262
+ /**
263
+ * The component used for the root node.
264
+ * Either a string to use a HTML element or a component.
265
+ */
266
+ component: PropTypes.elementType,
267
+
254
268
  /**
255
269
  * The components used for each slot inside the Badge.
256
270
  * Either a string to use a HTML element or a component.
File without changes
@@ -30,72 +30,86 @@ function getOffset(val) {
30
30
  return "".concat(parse).concat(String(val).replace(String(parse), '') || 'px');
31
31
  }
32
32
 
33
- function generateGrid(globalStyles, theme, breakpoint, ownerState) {
34
- var size = ownerState[breakpoint];
35
-
36
- if (!size) {
37
- return;
38
- }
39
-
40
- var styles = {};
41
-
42
- if (size === true) {
43
- // For the auto layouting
44
- styles = {
45
- flexBasis: 0,
46
- flexGrow: 1,
47
- maxWidth: '100%'
48
- };
49
- } else if (size === 'auto') {
50
- styles = {
51
- flexBasis: 'auto',
52
- flexGrow: 0,
53
- flexShrink: 0,
54
- maxWidth: 'none',
55
- width: 'auto'
56
- };
57
- } else {
58
- var columnsBreakpointValues = resolveBreakpointValues({
59
- values: ownerState.columns,
60
- breakpoints: theme.breakpoints.values
61
- });
62
- var columnValue = _typeof(columnsBreakpointValues) === 'object' ? columnsBreakpointValues[breakpoint] : columnsBreakpointValues; // Keep 7 significant numbers.
63
-
64
- var width = "".concat(Math.round(size / columnValue * 10e7) / 10e5, "%");
65
- var more = {};
66
-
67
- if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {
68
- var themeSpacing = theme.spacing(ownerState.columnSpacing);
69
-
70
- if (themeSpacing !== '0px') {
71
- var fullWidth = "calc(".concat(width, " + ").concat(getOffset(themeSpacing), ")");
72
- more = {
73
- flexBasis: fullWidth,
74
- maxWidth: fullWidth
75
- };
76
- }
77
- } // Close to the bootstrap implementation:
78
- // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41
33
+ export function generateGrid(_ref) {
34
+ var theme = _ref.theme,
35
+ ownerState = _ref.ownerState;
36
+ var size;
37
+ return theme.breakpoints.keys.reduce(function (globalStyles, breakpoint) {
38
+ // Use side effect over immutability for better performance.
39
+ var styles = {};
79
40
 
41
+ if (ownerState[breakpoint]) {
42
+ size = ownerState[breakpoint];
43
+ }
80
44
 
81
- styles = _extends({
82
- flexBasis: width,
83
- flexGrow: 0,
84
- maxWidth: width
85
- }, more);
86
- } // No need for a media query for the first size.
45
+ if (!size) {
46
+ return globalStyles;
47
+ }
87
48
 
49
+ if (size === true) {
50
+ // For the auto layouting
51
+ styles = {
52
+ flexBasis: 0,
53
+ flexGrow: 1,
54
+ maxWidth: '100%'
55
+ };
56
+ } else if (size === 'auto') {
57
+ styles = {
58
+ flexBasis: 'auto',
59
+ flexGrow: 0,
60
+ flexShrink: 0,
61
+ maxWidth: 'none',
62
+ width: 'auto'
63
+ };
64
+ } else {
65
+ var columnsBreakpointValues = resolveBreakpointValues({
66
+ values: ownerState.columns,
67
+ breakpoints: theme.breakpoints.values
68
+ });
69
+ var columnValue = _typeof(columnsBreakpointValues) === 'object' ? columnsBreakpointValues[breakpoint] : columnsBreakpointValues;
70
+
71
+ if (columnValue === undefined || columnValue === null) {
72
+ return globalStyles;
73
+ } // Keep 7 significant numbers.
74
+
75
+
76
+ var width = "".concat(Math.round(size / columnValue * 10e7) / 10e5, "%");
77
+ var more = {};
78
+
79
+ if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {
80
+ var themeSpacing = theme.spacing(ownerState.columnSpacing);
81
+
82
+ if (themeSpacing !== '0px') {
83
+ var fullWidth = "calc(".concat(width, " + ").concat(getOffset(themeSpacing), ")");
84
+ more = {
85
+ flexBasis: fullWidth,
86
+ maxWidth: fullWidth
87
+ };
88
+ }
89
+ } // Close to the bootstrap implementation:
90
+ // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41
91
+
92
+
93
+ styles = _extends({
94
+ flexBasis: width,
95
+ flexGrow: 0,
96
+ maxWidth: width
97
+ }, more);
98
+ } // No need for a media query for the first size.
99
+
100
+
101
+ if (theme.breakpoints.values[breakpoint] === 0) {
102
+ _extends(globalStyles, styles);
103
+ } else {
104
+ globalStyles[theme.breakpoints.up(breakpoint)] = styles;
105
+ }
88
106
 
89
- if (theme.breakpoints.values[breakpoint] === 0) {
90
- _extends(globalStyles, styles);
91
- } else {
92
- globalStyles[theme.breakpoints.up(breakpoint)] = styles;
93
- }
107
+ return globalStyles;
108
+ }, {});
94
109
  }
95
-
96
- export function generateDirection(_ref) {
97
- var theme = _ref.theme,
98
- ownerState = _ref.ownerState;
110
+ export function generateDirection(_ref2) {
111
+ var theme = _ref2.theme,
112
+ ownerState = _ref2.ownerState;
99
113
  var directionValues = resolveBreakpointValues({
100
114
  values: ownerState.direction,
101
115
  breakpoints: theme.breakpoints.values
@@ -116,9 +130,9 @@ export function generateDirection(_ref) {
116
130
  return output;
117
131
  });
118
132
  }
119
- export function generateRowGap(_ref2) {
120
- var theme = _ref2.theme,
121
- ownerState = _ref2.ownerState;
133
+ export function generateRowGap(_ref3) {
134
+ var theme = _ref3.theme,
135
+ ownerState = _ref3.ownerState;
122
136
  var container = ownerState.container,
123
137
  rowSpacing = ownerState.rowSpacing;
124
138
  var styles = {};
@@ -147,9 +161,9 @@ export function generateRowGap(_ref2) {
147
161
 
148
162
  return styles;
149
163
  }
150
- export function generateColumnGap(_ref4) {
151
- var theme = _ref4.theme,
152
- ownerState = _ref4.ownerState;
164
+ export function generateColumnGap(_ref5) {
165
+ var theme = _ref5.theme,
166
+ ownerState = _ref5.ownerState;
153
167
  var container = ownerState.container,
154
168
  columnSpacing = ownerState.columnSpacing;
155
169
  var styles = {};
@@ -224,8 +238,8 @@ var GridRoot = styled('div', {
224
238
  zeroMinWidth = _props$ownerState.zeroMinWidth;
225
239
  return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth].concat(_toConsumableArray(resolveSpacingClasses(spacing, container, styles)), [direction !== 'row' && styles["direction-xs-".concat(String(direction))], wrap !== 'wrap' && styles["wrap-xs-".concat(String(wrap))], xs !== false && styles["grid-xs-".concat(String(xs))], sm !== false && styles["grid-sm-".concat(String(sm))], md !== false && styles["grid-md-".concat(String(md))], lg !== false && styles["grid-lg-".concat(String(lg))], xl !== false && styles["grid-xl-".concat(String(xl))]]);
226
240
  }
227
- })(function (_ref6) {
228
- var ownerState = _ref6.ownerState;
241
+ })(function (_ref7) {
242
+ var ownerState = _ref7.ownerState;
229
243
  return _extends({
230
244
  boxSizing: 'border-box'
231
245
  }, ownerState.container && {
@@ -242,15 +256,7 @@ var GridRoot = styled('div', {
242
256
  }, ownerState.wrap === 'reverse' && {
243
257
  flexWrap: 'wrap-reverse'
244
258
  });
245
- }, generateDirection, generateRowGap, generateColumnGap, function (_ref7) {
246
- var theme = _ref7.theme,
247
- ownerState = _ref7.ownerState;
248
- return theme.breakpoints.keys.reduce(function (globalStyles, breakpoint) {
249
- // Use side effect over immutability for better performance.
250
- generateGrid(globalStyles, theme, breakpoint, ownerState);
251
- return globalStyles;
252
- }, {});
253
- });
259
+ }, generateDirection, generateRowGap, generateColumnGap, generateGrid);
254
260
 
255
261
  var useUtilityClasses = function useUtilityClasses(ownerState) {
256
262
  var classes = ownerState.classes,
@@ -213,6 +213,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
213
213
  componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
214
214
  defaultValue = props.defaultValue,
215
215
  disabled = props.disabled,
216
+ disableInjectingGlobalStyles = props.disableInjectingGlobalStyles,
216
217
  endAdornment = props.endAdornment,
217
218
  error = props.error,
218
219
  _props$fullWidth = props.fullWidth,
@@ -244,7 +245,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
244
245
  _props$type = props.type,
245
246
  type = _props$type === void 0 ? 'text' : _props$type,
246
247
  valueProp = props.value,
247
- other = _objectWithoutProperties(props, ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "startAdornment", "type", "value"]);
248
+ other = _objectWithoutProperties(props, ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "startAdornment", "type", "value"]);
248
249
 
249
250
  var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;
250
251
 
@@ -459,7 +460,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
459
460
  var Input = components.Input || InputBaseComponent;
460
461
  inputProps = _extends({}, inputProps, componentsProps.input);
461
462
  return /*#__PURE__*/_jsxs(React.Fragment, {
462
- children: [inputGlobalStyles, /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, !isHostComponent(Root) && {
463
+ children: [!disableInjectingGlobalStyles && inputGlobalStyles, /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, !isHostComponent(Root) && {
463
464
  ownerState: _extends({}, ownerState, rootProps.ownerState)
464
465
  }, {
465
466
  ref: ref,
@@ -573,6 +574,13 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
573
574
  */
574
575
  disabled: PropTypes.bool,
575
576
 
577
+ /**
578
+ * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.
579
+ * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.
580
+ * @default false
581
+ */
582
+ disableInjectingGlobalStyles: PropTypes.bool,
583
+
576
584
  /**
577
585
  * End `InputAdornment` for this component.
578
586
  */
@@ -6,10 +6,13 @@ import PropTypes from 'prop-types';
6
6
  import { refType } from '@mui/utils';
7
7
  import { unstable_composeClasses as composeClasses } from '@mui/base';
8
8
  import NotchedOutline from './NotchedOutline';
9
+ import useFormControl from '../FormControl/useFormControl';
10
+ import formControlState from '../FormControl/formControlState';
9
11
  import styled, { rootShouldForwardProp } from '../styles/styled';
10
12
  import outlinedInputClasses, { getOutlinedInputUtilityClass } from './outlinedInputClasses';
11
13
  import InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';
12
14
  import useThemeProps from '../styles/useThemeProps';
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
16
  import { jsx as _jsx } from "react/jsx-runtime";
14
17
 
15
18
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -98,6 +101,8 @@ var OutlinedInputInput = styled(InputBaseInput, {
98
101
  });
99
102
  });
100
103
  var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
104
+ var _React$Fragment;
105
+
101
106
  var props = useThemeProps({
102
107
  props: inProps,
103
108
  name: 'MuiOutlinedInput'
@@ -118,6 +123,12 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
118
123
  other = _objectWithoutProperties(props, ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "type"]);
119
124
 
120
125
  var classes = useUtilityClasses(props);
126
+ var muiFormControl = useFormControl();
127
+ var fcs = formControlState({
128
+ props: props,
129
+ muiFormControl: muiFormControl,
130
+ states: ['required']
131
+ });
121
132
  return /*#__PURE__*/_jsx(InputBase, _extends({
122
133
  components: _extends({
123
134
  Root: OutlinedInputRoot,
@@ -126,7 +137,9 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
126
137
  renderSuffix: function renderSuffix(state) {
127
138
  return /*#__PURE__*/_jsx(NotchedOutlineRoot, {
128
139
  className: classes.notchedOutline,
129
- label: label,
140
+ label: label && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
141
+ children: [label, "\xA0", '*']
142
+ })) : label,
130
143
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
131
144
  });
132
145
  },
@@ -426,12 +426,18 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
426
426
 
427
427
  if (computeDisplay) {
428
428
  if (multiple) {
429
- if (value.length === 0) {
430
- display = '';
429
+ if (displayMultiple.length === 0) {
430
+ display = null;
431
431
  } else {
432
- display = displayMultiple.reduce(function (prev, curr) {
433
- return [prev, ', ', curr];
434
- });
432
+ display = displayMultiple.reduce(function (output, child, index) {
433
+ output.push(child);
434
+
435
+ if (index < displayMultiple.length - 1) {
436
+ output.push(', ');
437
+ }
438
+
439
+ return output;
440
+ }, []);
435
441
  }
436
442
  } else {
437
443
  display = displaySingle;
@@ -15,8 +15,8 @@ import FormControl from '../FormControl';
15
15
  import FormHelperText from '../FormHelperText';
16
16
  import Select from '../Select';
17
17
  import { getTextFieldUtilityClass } from './textFieldClasses';
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
20
  var variantComponent = {
21
21
  standard: Input,
22
22
  filled: FilledInput,
@@ -147,14 +147,7 @@ var TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
147
147
  InputMore.notched = InputLabelProps.shrink;
148
148
  }
149
149
 
150
- if (label) {
151
- var _InputLabelProps$requ;
152
-
153
- var displayRequired = (_InputLabelProps$requ = InputLabelProps == null ? void 0 : InputLabelProps.required) != null ? _InputLabelProps$requ : required;
154
- InputMore.label = /*#__PURE__*/_jsxs(React.Fragment, {
155
- children: [label, displayRequired && "\xA0*"]
156
- });
157
- }
150
+ InputMore.label = label;
158
151
  }
159
152
 
160
153
  if (select) {