@mui/material 5.2.8 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) 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/Autocomplete.d.ts +2 -0
  9. package/Autocomplete/Autocomplete.js +8 -6
  10. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  11. package/Avatar/avatarClasses.d.ts +20 -20
  12. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  13. package/Badge/Badge.js +2 -6
  14. package/BottomNavigation/BottomNavigation.js +0 -0
  15. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  16. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  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 +73 -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/Dialog/DialogContext.d.ts +6 -6
  37. package/Dialog/dialogClasses.d.ts +36 -36
  38. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  39. package/DialogContent/dialogContentClasses.d.ts +10 -10
  40. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  41. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  42. package/Divider/dividerClasses.d.ts +34 -34
  43. package/Drawer/drawerClasses.d.ts +30 -30
  44. package/Fab/fabClasses.d.ts +26 -26
  45. package/FilledInput/filledInputClasses.d.ts +40 -40
  46. package/FormControl/formControlClasses.d.ts +14 -14
  47. package/FormControlLabel/formControlLabelClasses.d.ts +18 -18
  48. package/FormGroup/formGroupClasses.d.ts +10 -10
  49. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  50. package/FormLabel/formLabelClasses.d.ts +22 -22
  51. package/Grid/gridClasses.d.ts +48 -48
  52. package/Icon/iconClasses.d.ts +24 -24
  53. package/IconButton/iconButtonClasses.d.ts +26 -26
  54. package/ImageList/imageListClasses.d.ts +16 -16
  55. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  56. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  57. package/Input/inputClasses.d.ts +34 -34
  58. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  59. package/InputBase/inputBaseClasses.d.ts +44 -44
  60. package/InputLabel/inputLabelClasses.d.ts +32 -32
  61. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  62. package/Link/linkClasses.d.ts +18 -18
  63. package/List/listClasses.d.ts +14 -14
  64. package/ListItem/listItemClasses.d.ts +30 -30
  65. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  66. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  67. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  68. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  69. package/ListItemText/listItemTextClasses.d.ts +18 -18
  70. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  71. package/Menu/menuClasses.d.ts +12 -12
  72. package/MenuItem/menuItemClasses.d.ts +20 -20
  73. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  74. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  75. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  76. package/Pagination/paginationClasses.d.ts +14 -14
  77. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  78. package/Paper/paperClasses.d.ts +39 -39
  79. package/Popover/popoverClasses.d.ts +10 -10
  80. package/Popper/Popper.d.ts +17 -17
  81. package/README.md +3 -3
  82. package/Radio/radioClasses.d.ts +16 -16
  83. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  84. package/RadioGroup/useRadioGroup.d.ts +4 -4
  85. package/Rating/ratingClasses.d.ts +40 -40
  86. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  87. package/Select/Select.d.ts +9 -1
  88. package/Select/Select.js +10 -1
  89. package/Select/SelectInput.d.ts +1 -0
  90. package/Select/SelectInput.js +25 -4
  91. package/Select/selectClasses.d.ts +30 -30
  92. package/Skeleton/skeletonClasses.d.ts +24 -24
  93. package/Slider/Slider.js +109 -54
  94. package/Snackbar/snackbarClasses.d.ts +20 -20
  95. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  96. package/SpeedDial/speedDialClasses.d.ts +22 -22
  97. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  98. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  99. package/Step/stepClasses.d.ts +16 -16
  100. package/StepButton/stepButtonClasses.d.ts +14 -14
  101. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  102. package/StepContent/stepContentClasses.d.ts +12 -12
  103. package/StepIcon/stepIconClasses.d.ts +16 -16
  104. package/StepLabel/stepLabelClasses.d.ts +28 -28
  105. package/Stepper/stepperClasses.d.ts +14 -14
  106. package/SvgIcon/svgIconClasses.d.ts +24 -24
  107. package/Switch/switchClasses.d.ts +32 -32
  108. package/Tab/tabClasses.d.ts +26 -26
  109. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  110. package/Table/tableClasses.d.ts +10 -10
  111. package/TableBody/tableBodyClasses.d.ts +8 -8
  112. package/TableCell/tableCellClasses.d.ts +32 -32
  113. package/TableContainer/tableContainerClasses.d.ts +8 -8
  114. package/TableFooter/tableFooterClasses.d.ts +8 -8
  115. package/TableHead/tableHeadClasses.d.ts +8 -8
  116. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  117. package/TableRow/tableRowClasses.d.ts +16 -16
  118. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  119. package/Tabs/tabsClasses.d.ts +32 -32
  120. package/TextField/textFieldClasses.d.ts +8 -8
  121. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  122. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  123. package/Toolbar/toolbarClasses.d.ts +14 -14
  124. package/Tooltip/tooltipClasses.d.ts +30 -30
  125. package/Typography/typographyClasses.d.ts +50 -50
  126. package/darkScrollbar/index.d.ts +28 -28
  127. package/index.js +1 -1
  128. package/internal/switchBaseClasses.d.ts +12 -12
  129. package/legacy/Autocomplete/Autocomplete.js +8 -6
  130. package/legacy/Badge/Badge.js +2 -6
  131. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  132. package/legacy/Select/Select.js +11 -1
  133. package/legacy/Select/SelectInput.js +29 -7
  134. package/legacy/Slider/Slider.js +110 -55
  135. package/legacy/index.js +1 -1
  136. package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
  137. package/locale/index.d.ts +68 -68
  138. package/modern/Autocomplete/Autocomplete.js +7 -5
  139. package/modern/Badge/Badge.js +2 -6
  140. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  141. package/modern/Select/Select.js +10 -1
  142. package/modern/Select/SelectInput.js +25 -4
  143. package/modern/Slider/Slider.js +109 -54
  144. package/modern/index.js +1 -1
  145. package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
  146. package/node/Autocomplete/Autocomplete.js +8 -6
  147. package/node/Badge/Badge.js +4 -7
  148. package/node/BottomNavigation/BottomNavigation.js +0 -0
  149. package/node/Select/Select.js +10 -1
  150. package/node/Select/SelectInput.js +25 -4
  151. package/node/Slider/Slider.js +95 -46
  152. package/node/index.js +1 -1
  153. package/node/utils/shouldSpreadAdditionalProps.js +15 -0
  154. package/package.json +7 -7
  155. package/styles/components.d.ts +452 -113
  156. package/styles/createTheme.d.ts +12 -6
  157. package/styles/overrides.d.ts +16 -4
  158. package/styles/useThemeProps.d.ts +2 -1
  159. package/transitions/index.d.ts +1 -1
  160. package/transitions/transition.d.ts +13 -13
  161. package/transitions/utils.d.ts +23 -23
  162. package/umd/material-ui.development.js +464 -255
  163. package/umd/material-ui.production.min.js +21 -21
  164. package/useMediaQuery/useMediaQuery.d.ts +27 -27
  165. package/useTouchRipple/index.d.ts +1 -1
  166. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  167. package/utils/getScrollbarSize.d.ts +2 -2
  168. package/utils/ownerDocument.d.ts +2 -2
  169. package/utils/ownerWindow.d.ts +2 -2
  170. package/utils/setRef.d.ts +2 -2
  171. package/utils/shouldSpreadAdditionalProps.js +7 -0
@@ -1,8 +1,8 @@
1
- export interface TextFieldClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
5
- export declare type TextFieldClassKey = keyof TextFieldClasses;
6
- export declare function getTextFieldUtilityClass(slot: string): string;
7
- declare const textFieldClasses: TextFieldClasses;
8
- export default textFieldClasses;
1
+ export interface TextFieldClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ }
5
+ export declare type TextFieldClassKey = keyof TextFieldClasses;
6
+ export declare function getTextFieldUtilityClass(slot: string): string;
7
+ declare const textFieldClasses: TextFieldClasses;
8
+ export default textFieldClasses;
@@ -1,24 +1,24 @@
1
- export interface ToggleButtonClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** State class applied to the root element if `disabled={true}`. */
5
- disabled: string;
6
- /** State class applied to the root element if `selected={true}`. */
7
- selected: string;
8
- /** State class applied to the root element if `color="standard"`. */
9
- standard: string;
10
- /** State class applied to the root element if `color="primary"`. */
11
- primary: string;
12
- /** State class applied to the root element if `color="secondary"`. */
13
- secondary: string;
14
- /** Styles applied to the root element if `size="small"`. */
15
- sizeSmall: string;
16
- /** Styles applied to the root element if `size="medium"`. */
17
- sizeMedium: string;
18
- /** Styles applied to the root element if `size="large"`. */
19
- sizeLarge: string;
20
- }
21
- export declare type ToggleButtonClassKey = keyof ToggleButtonClasses;
22
- export declare function getToggleButtonUtilityClass(slot: string): string;
23
- declare const toggleButtonClasses: ToggleButtonClasses;
24
- export default toggleButtonClasses;
1
+ export interface ToggleButtonClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** State class applied to the root element if `disabled={true}`. */
5
+ disabled: string;
6
+ /** State class applied to the root element if `selected={true}`. */
7
+ selected: string;
8
+ /** State class applied to the root element if `color="standard"`. */
9
+ standard: string;
10
+ /** State class applied to the root element if `color="primary"`. */
11
+ primary: string;
12
+ /** State class applied to the root element if `color="secondary"`. */
13
+ secondary: string;
14
+ /** Styles applied to the root element if `size="small"`. */
15
+ sizeSmall: string;
16
+ /** Styles applied to the root element if `size="medium"`. */
17
+ sizeMedium: string;
18
+ /** Styles applied to the root element if `size="large"`. */
19
+ sizeLarge: string;
20
+ }
21
+ export declare type ToggleButtonClassKey = keyof ToggleButtonClasses;
22
+ export declare function getToggleButtonUtilityClass(slot: string): string;
23
+ declare const toggleButtonClasses: ToggleButtonClasses;
24
+ export default toggleButtonClasses;
@@ -1,18 +1,18 @@
1
- export interface ToggleButtonGroupClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `orientation="vertical"`. */
5
- vertical: string;
6
- /** State class applied to the root element if `disabled={true}`. */
7
- disabled: string;
8
- /** Styles applied to the children. */
9
- grouped: string;
10
- /** Styles applied to the children if `orientation="horizontal"`. */
11
- groupedHorizontal: string;
12
- /** Styles applied to the children if `orientation="vertical"`. */
13
- groupedVertical: string;
14
- }
15
- export declare type ToggleButtonGroupClassKey = keyof ToggleButtonGroupClasses;
16
- export declare function getToggleButtonGroupUtilityClass(slot: string): string;
17
- declare const toggleButtonGroupClasses: ToggleButtonGroupClasses;
18
- export default toggleButtonGroupClasses;
1
+ export interface ToggleButtonGroupClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `orientation="vertical"`. */
5
+ vertical: string;
6
+ /** State class applied to the root element if `disabled={true}`. */
7
+ disabled: string;
8
+ /** Styles applied to the children. */
9
+ grouped: string;
10
+ /** Styles applied to the children if `orientation="horizontal"`. */
11
+ groupedHorizontal: string;
12
+ /** Styles applied to the children if `orientation="vertical"`. */
13
+ groupedVertical: string;
14
+ }
15
+ export declare type ToggleButtonGroupClassKey = keyof ToggleButtonGroupClasses;
16
+ export declare function getToggleButtonGroupUtilityClass(slot: string): string;
17
+ declare const toggleButtonGroupClasses: ToggleButtonGroupClasses;
18
+ export default toggleButtonGroupClasses;
@@ -1,14 +1,14 @@
1
- export interface ToolbarClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element unless `disableGutters={true}`. */
5
- gutters: string;
6
- /** Styles applied to the root element if `variant="regular"`. */
7
- regular: string;
8
- /** Styles applied to the root element if `variant="dense"`. */
9
- dense: string;
10
- }
11
- export declare type ToolbarClassKey = keyof ToolbarClasses;
12
- export declare function getToolbarUtilityClass(slot: string): string;
13
- declare const toolbarClasses: ToolbarClasses;
14
- export default toolbarClasses;
1
+ export interface ToolbarClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element unless `disableGutters={true}`. */
5
+ gutters: string;
6
+ /** Styles applied to the root element if `variant="regular"`. */
7
+ regular: string;
8
+ /** Styles applied to the root element if `variant="dense"`. */
9
+ dense: string;
10
+ }
11
+ export declare type ToolbarClassKey = keyof ToolbarClasses;
12
+ export declare function getToolbarUtilityClass(slot: string): string;
13
+ declare const toolbarClasses: ToolbarClasses;
14
+ export default toolbarClasses;
@@ -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.8
1
+ /** @license MUI v5.3.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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;
@@ -316,7 +316,7 @@ var AutocompleteGroupUl = styled('ul', {
316
316
  }));
317
317
  export { createFilterOptions };
318
318
  var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
319
- var _componentsProps$clea;
319
+ var _componentsProps$clea, _componentsProps$pape;
320
320
 
321
321
  var props = useThemeProps({
322
322
  props: inProps,
@@ -596,10 +596,11 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
596
596
  role: "presentation",
597
597
  anchorEl: anchorEl,
598
598
  open: true,
599
- children: /*#__PURE__*/_jsxs(AutocompletePaper, {
600
- as: PaperComponent,
601
- className: classes.paper,
599
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
602
600
  ownerState: ownerState,
601
+ as: PaperComponent
602
+ }, componentsProps.paper, {
603
+ className: clsx(classes.paper, (_componentsProps$pape = componentsProps.paper) == null ? void 0 : _componentsProps$pape.className),
603
604
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
604
605
  className: classes.loading,
605
606
  ownerState: ownerState,
@@ -632,7 +633,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
632
633
  return renderListOption(option, index);
633
634
  })
634
635
  })) : null]
635
- })
636
+ }))
636
637
  }) : null]
637
638
  });
638
639
  });
@@ -734,7 +735,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
734
735
  * @default {}
735
736
  */
736
737
  componentsProps: PropTypes.shape({
737
- clearIndicator: PropTypes.object
738
+ clearIndicator: PropTypes.object,
739
+ paper: PropTypes.object
738
740
  }),
739
741
 
740
742
  /**
@@ -5,10 +5,11 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { usePreviousProps } from '@mui/utils';
8
- import { generateUtilityClasses, isHostComponent } from '@mui/base';
8
+ import { generateUtilityClasses } from '@mui/base';
9
9
  import BadgeUnstyled, { badgeUnstyledClasses, getBadgeUtilityClass } from '@mui/base/BadgeUnstyled';
10
10
  import styled from '../styles/styled';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
+ import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
12
13
  import capitalize from '../utils/capitalize';
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  export var badgeClasses = _extends({}, badgeUnstyledClasses, generateUtilityClasses('MuiBadge', ['colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
@@ -144,11 +145,6 @@ var BadgeBadge = styled('span', {
144
145
  })
145
146
  });
146
147
  });
147
-
148
- var shouldSpreadAdditionalProps = function shouldSpreadAdditionalProps(Slot) {
149
- return !Slot || !isHostComponent(Slot);
150
- };
151
-
152
148
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
153
149
  var _componentsProps$root, _componentsProps$badg;
154
150
 
File without changes
@@ -36,6 +36,8 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
36
36
  _props$classes = props.classes,
37
37
  classesProp = _props$classes === void 0 ? {} : _props$classes,
38
38
  className = props.className,
39
+ _props$defaultOpen = props.defaultOpen,
40
+ defaultOpen = _props$defaultOpen === void 0 ? false : _props$defaultOpen,
39
41
  _props$displayEmpty = props.displayEmpty,
40
42
  displayEmpty = _props$displayEmpty === void 0 ? false : _props$displayEmpty,
41
43
  _props$IconComponent = props.IconComponent,
@@ -57,7 +59,7 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
57
59
  SelectDisplayProps = props.SelectDisplayProps,
58
60
  _props$variant = props.variant,
59
61
  variantProps = _props$variant === void 0 ? 'outlined' : _props$variant,
60
- other = _objectWithoutProperties(props, ["autoWidth", "children", "classes", "className", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]);
62
+ other = _objectWithoutProperties(props, ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]);
61
63
 
62
64
  var inputComponent = native ? NativeSelectInput : SelectInput;
63
65
  var muiFormControl = useFormControl();
@@ -96,6 +98,7 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
96
98
  id: id
97
99
  } : {
98
100
  autoWidth: autoWidth,
101
+ defaultOpen: defaultOpen,
99
102
  displayEmpty: displayEmpty,
100
103
  labelId: labelId,
101
104
  MenuProps: MenuProps,
@@ -150,6 +153,13 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
150
153
  */
151
154
  className: PropTypes.string,
152
155
 
156
+ /**
157
+ * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
158
+ * You can only use it when the `native` prop is `false` (default).
159
+ * @default false
160
+ */
161
+ defaultOpen: PropTypes.bool,
162
+
153
163
  /**
154
164
  * The default value. Use when the component is not controlled.
155
165
  */
@@ -103,6 +103,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
103
103
  autoWidth = props.autoWidth,
104
104
  children = props.children,
105
105
  className = props.className,
106
+ defaultOpen = props.defaultOpen,
106
107
  defaultValue = props.defaultValue,
107
108
  disabled = props.disabled,
108
109
  displayEmpty = props.displayEmpty,
@@ -128,7 +129,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
128
129
  valueProp = props.value,
129
130
  _props$variant = props.variant,
130
131
  variant = _props$variant === void 0 ? 'standard' : _props$variant,
131
- other = _objectWithoutProperties(props, ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"]);
132
+ other = _objectWithoutProperties(props, ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"]);
132
133
 
133
134
  var _useControlled = useControlled({
134
135
  controlled: valueProp,
@@ -139,6 +140,15 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
139
140
  value = _useControlled2[0],
140
141
  setValueState = _useControlled2[1];
141
142
 
143
+ var _useControlled3 = useControlled({
144
+ controlled: openProp,
145
+ default: defaultOpen,
146
+ name: 'Select'
147
+ }),
148
+ _useControlled4 = _slicedToArray(_useControlled3, 2),
149
+ openState = _useControlled4[0],
150
+ setOpenState = _useControlled4[1];
151
+
142
152
  var inputRef = React.useRef(null);
143
153
  var displayRef = React.useRef(null);
144
154
 
@@ -153,10 +163,6 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
153
163
  menuMinWidthState = _React$useState2[0],
154
164
  setMenuMinWidthState = _React$useState2[1];
155
165
 
156
- var _React$useState3 = React.useState(false),
157
- openState = _React$useState3[0],
158
- setOpenState = _React$useState3[1];
159
-
160
166
  var handleRef = useForkRef(ref, inputRefProp);
161
167
  var handleDisplayRef = React.useCallback(function (node) {
162
168
  displayRef.current = node;
@@ -173,7 +179,17 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
173
179
  node: inputRef.current,
174
180
  value: value
175
181
  };
176
- }, [value]);
182
+ }, [value]); // Resize menu on `defaultOpen` automatic toggle.
183
+
184
+ React.useEffect(function () {
185
+ if (defaultOpen && openState && displayNode && !isOpenControlled) {
186
+ setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
187
+ displayRef.current.focus();
188
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
189
+
190
+ }, [displayNode, autoWidth]); // `isOpenControlled` is ignored because the component should never switch between controlled and uncontrolled modes.
191
+ // `defaultOpen` and `openState` are ignored to avoid unnecessary callbacks.
192
+
177
193
  React.useEffect(function () {
178
194
  if (autoFocus) {
179
195
  displayRef.current.focus();
@@ -313,7 +329,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
313
329
  }
314
330
  };
315
331
 
316
- var open = displayNode !== null && (isOpenControlled ? openProp : openState);
332
+ var open = displayNode !== null && openState;
317
333
 
318
334
  var handleBlur = function handleBlur(event) {
319
335
  // if open event.stopImmediatePropagation
@@ -580,6 +596,12 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
580
596
  */
581
597
  className: PropTypes.string,
582
598
 
599
+ /**
600
+ * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
601
+ * You can only use it when the `native` prop is `false` (default).
602
+ */
603
+ defaultOpen: PropTypes.bool,
604
+
583
605
  /**
584
606
  * The default value. Use when the component is not controlled.
585
607
  */