@mui/material 5.14.7 → 5.14.9

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 (143) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/AccordionSummary/AccordionSummary.d.ts +22 -20
  3. package/AlertTitle/AlertTitle.d.ts +1 -0
  4. package/AppBar/AppBar.d.ts +33 -31
  5. package/Avatar/Avatar.d.ts +49 -50
  6. package/Backdrop/Backdrop.d.ts +87 -85
  7. package/Badge/Badge.d.ts +2 -2
  8. package/BottomNavigation/BottomNavigation.d.ts +35 -33
  9. package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
  10. package/Breadcrumbs/Breadcrumbs.d.ts +70 -67
  11. package/Button/Button.d.ts +72 -73
  12. package/Button/Button.js +4 -1
  13. package/ButtonBase/ButtonBase.d.ts +83 -81
  14. package/ButtonGroup/ButtonGroup.d.ts +72 -70
  15. package/ButtonGroup/ButtonGroup.js +86 -54
  16. package/ButtonGroup/ButtonGroupButtonContext.d.ts +6 -0
  17. package/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  18. package/ButtonGroup/buttonGroupClasses.d.ts +6 -0
  19. package/ButtonGroup/buttonGroupClasses.js +1 -1
  20. package/CHANGELOG.md +235 -38
  21. package/Card/Card.d.ts +19 -18
  22. package/CardActionArea/CardActionArea.d.ts +15 -13
  23. package/CardContent/CardContent.d.ts +18 -16
  24. package/CardHeader/CardHeader.d.ts +77 -67
  25. package/CardMedia/CardMedia.d.ts +30 -28
  26. package/Chip/Chip.d.ts +84 -82
  27. package/CircularProgress/CircularProgress.d.ts +1 -1
  28. package/CircularProgress/CircularProgress.js +1 -1
  29. package/Container/Container.d.ts +35 -33
  30. package/DialogContentText/DialogContentText.d.ts +14 -12
  31. package/DialogTitle/DialogTitle.d.ts +19 -16
  32. package/Divider/Divider.d.ts +49 -50
  33. package/Fab/Fab.d.ts +59 -56
  34. package/FormControl/FormControl.d.ts +74 -72
  35. package/FormHelperText/FormHelperText.d.ts +52 -50
  36. package/FormLabel/FormLabel.d.ts +7 -4
  37. package/Grid/Grid.d.ts +69 -68
  38. package/Hidden/Hidden.d.ts +10 -10
  39. package/Icon/Icon.d.ts +50 -48
  40. package/IconButton/IconButton.d.ts +52 -50
  41. package/ImageList/ImageList.d.ts +41 -39
  42. package/ImageListItem/ImageListItem.d.ts +28 -26
  43. package/ImageListItem/ImageListItem.js +2 -1
  44. package/InputAdornment/InputAdornment.d.ts +39 -37
  45. package/InputBase/InputBase.js +1 -1
  46. package/InputLabel/InputLabel.d.ts +58 -56
  47. package/InputLabel/InputLabel.js +2 -1
  48. package/Link/Link.d.ts +37 -39
  49. package/List/List.d.ts +34 -35
  50. package/ListItem/ListItem.d.ts +53 -49
  51. package/ListItemButton/ListItemButton.d.ts +9 -3
  52. package/ListSubheader/ListSubheader.d.ts +38 -36
  53. package/MenuItem/MenuItem.d.ts +47 -44
  54. package/MenuList/MenuList.d.ts +37 -35
  55. package/Modal/Modal.d.ts +172 -178
  56. package/Modal/Modal.js +1 -1
  57. package/PaginationItem/PaginationItem.d.ts +85 -83
  58. package/Paper/Paper.d.ts +2 -2
  59. package/README.md +9 -198
  60. package/Radio/Radio.js +3 -2
  61. package/Radio/radioClasses.d.ts +2 -0
  62. package/Radio/radioClasses.js +1 -1
  63. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
  64. package/Select/SelectInput.js +9 -5
  65. package/Skeleton/Skeleton.d.ts +42 -40
  66. package/Slider/Slider.d.ts +249 -247
  67. package/Slider/Slider.js +9 -86
  68. package/Stack/Stack.d.ts +39 -38
  69. package/Step/Step.d.ts +46 -44
  70. package/StepButton/StepButton.d.ts +27 -25
  71. package/Stepper/Stepper.d.ts +45 -44
  72. package/SvgIcon/SvgIcon.d.ts +77 -75
  73. package/SwipeableDrawer/SwipeableDrawer.js +4 -4
  74. package/Tab/Tab.d.ts +52 -50
  75. package/TabScrollButton/TabScrollButton.d.ts +3 -2
  76. package/Table/Table.d.ts +35 -33
  77. package/TableBody/TableBody.d.ts +18 -16
  78. package/TableContainer/TableContainer.d.ts +18 -16
  79. package/TableFooter/TableFooter.d.ts +18 -16
  80. package/TableHead/TableHead.d.ts +18 -16
  81. package/TablePagination/TablePagination.d.ts +113 -112
  82. package/TableRow/TableRow.d.ts +28 -26
  83. package/TableSortLabel/TableSortLabel.d.ts +40 -36
  84. package/Tabs/Tabs.d.ts +153 -150
  85. package/Tabs/Tabs.js +1 -4
  86. package/ToggleButton/ToggleButton.d.ts +72 -70
  87. package/Toolbar/Toolbar.d.ts +29 -27
  88. package/Typography/Typography.d.ts +2 -2
  89. package/index.js +1 -1
  90. package/legacy/Button/Button.js +4 -1
  91. package/legacy/ButtonGroup/ButtonGroup.js +81 -56
  92. package/legacy/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  93. package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
  94. package/legacy/CircularProgress/CircularProgress.js +1 -1
  95. package/legacy/ImageListItem/ImageListItem.js +2 -1
  96. package/legacy/InputBase/InputBase.js +1 -1
  97. package/legacy/InputLabel/InputLabel.js +2 -1
  98. package/legacy/Modal/Modal.js +3 -1
  99. package/legacy/Radio/Radio.js +3 -2
  100. package/legacy/Radio/radioClasses.js +1 -1
  101. package/legacy/Select/SelectInput.js +9 -5
  102. package/legacy/Slider/Slider.js +9 -86
  103. package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
  104. package/legacy/Tabs/Tabs.js +1 -4
  105. package/legacy/index.js +1 -1
  106. package/legacy/useTouchRipple/useTouchRipple.js +4 -4
  107. package/modern/Button/Button.js +4 -1
  108. package/modern/ButtonGroup/ButtonGroup.js +86 -54
  109. package/modern/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  110. package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
  111. package/modern/CircularProgress/CircularProgress.js +1 -1
  112. package/modern/ImageListItem/ImageListItem.js +2 -1
  113. package/modern/InputBase/InputBase.js +1 -1
  114. package/modern/InputLabel/InputLabel.js +2 -1
  115. package/modern/Modal/Modal.js +1 -1
  116. package/modern/Radio/Radio.js +3 -2
  117. package/modern/Radio/radioClasses.js +1 -1
  118. package/modern/Select/SelectInput.js +8 -5
  119. package/modern/Slider/Slider.js +9 -86
  120. package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
  121. package/modern/Tabs/Tabs.js +1 -4
  122. package/modern/index.js +1 -1
  123. package/node/Button/Button.js +4 -1
  124. package/node/ButtonGroup/ButtonGroup.js +86 -54
  125. package/node/ButtonGroup/ButtonGroupButtonContext.js +18 -0
  126. package/node/ButtonGroup/buttonGroupClasses.js +1 -1
  127. package/node/CircularProgress/CircularProgress.js +1 -1
  128. package/node/ImageListItem/ImageListItem.js +2 -1
  129. package/node/InputBase/InputBase.js +1 -1
  130. package/node/InputLabel/InputLabel.js +2 -1
  131. package/node/Modal/Modal.js +1 -1
  132. package/node/Radio/Radio.js +3 -2
  133. package/node/Radio/radioClasses.js +1 -1
  134. package/node/Select/SelectInput.js +9 -5
  135. package/node/Slider/Slider.js +3 -73
  136. package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
  137. package/node/Tabs/Tabs.js +1 -4
  138. package/node/index.js +1 -1
  139. package/node/useTouchRipple/useTouchRipple.js +4 -4
  140. package/package.json +16 -16
  141. package/umd/material-ui.development.js +258 -254
  142. package/umd/material-ui.production.min.js +18 -18
  143. package/useTouchRipple/useTouchRipple.js +4 -4
@@ -13,6 +13,7 @@ import styled from '../styles/styled';
13
13
  import useThemeProps from '../styles/useThemeProps';
14
14
  import buttonGroupClasses, { getButtonGroupUtilityClass } from './buttonGroupClasses';
15
15
  import ButtonGroupContext from './ButtonGroupContext';
16
+ import ButtonGroupButtonContext from './ButtonGroupButtonContext';
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  const overridesResolver = (props, styles) => {
18
19
  const {
@@ -28,6 +29,12 @@ const overridesResolver = (props, styles) => {
28
29
  [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.orientation)}`]
29
30
  }, {
30
31
  [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.color)}`]
32
+ }, {
33
+ [`& .${buttonGroupClasses.firstButton}`]: styles.firstButton
34
+ }, {
35
+ [`& .${buttonGroupClasses.lastButton}`]: styles.lastButton
36
+ }, {
37
+ [`& .${buttonGroupClasses.middleButton}`]: styles.middleButton
31
38
  }, styles.root, styles[ownerState.variant], ownerState.disableElevation === true && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.orientation === 'vertical' && styles.vertical];
32
39
  };
33
40
  const useUtilityClasses = ownerState => {
@@ -42,7 +49,10 @@ const useUtilityClasses = ownerState => {
42
49
  } = ownerState;
43
50
  const slots = {
44
51
  root: ['root', variant, orientation === 'vertical' && 'vertical', fullWidth && 'fullWidth', disableElevation && 'disableElevation'],
45
- grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled']
52
+ grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled'],
53
+ firstButton: ['firstButton'],
54
+ lastButton: ['lastButton'],
55
+ middleButton: ['middleButton']
46
56
  };
47
57
  return composeClasses(slots, getButtonGroupUtilityClass, classes);
48
58
  };
@@ -67,63 +77,63 @@ const ButtonGroupRoot = styled('div', {
67
77
  }, {
68
78
  [`& .${buttonGroupClasses.grouped}`]: _extends({
69
79
  minWidth: 40,
70
- '&:not(:first-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
71
- borderTopLeftRadius: 0,
72
- borderBottomLeftRadius: 0
73
- }, ownerState.orientation === 'vertical' && {
74
- borderTopRightRadius: 0,
75
- borderTopLeftRadius: 0
76
- }, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
77
- marginLeft: -1
78
- }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
79
- marginTop: -1
80
- }),
81
- '&:not(:last-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
82
- borderTopRightRadius: 0,
83
- borderBottomRightRadius: 0
84
- }, ownerState.orientation === 'vertical' && {
85
- borderBottomRightRadius: 0,
86
- borderBottomLeftRadius: 0
87
- }, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && {
88
- borderRight: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
89
- [`&.${buttonGroupClasses.disabled}`]: {
90
- borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
91
- }
92
- }, ownerState.variant === 'text' && ownerState.orientation === 'vertical' && {
93
- borderBottom: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
94
- [`&.${buttonGroupClasses.disabled}`]: {
95
- borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
96
- }
97
- }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
98
- borderColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)
99
- }, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
100
- borderRightColor: 'transparent'
101
- }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
102
- borderBottomColor: 'transparent'
103
- }, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && {
104
- borderRight: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
105
- [`&.${buttonGroupClasses.disabled}`]: {
106
- borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
107
- }
108
- }, ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && {
109
- borderBottom: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
110
- [`&.${buttonGroupClasses.disabled}`]: {
111
- borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
112
- }
113
- }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
114
- borderColor: (theme.vars || theme).palette[ownerState.color].dark
115
- }, {
116
- '&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
117
- borderRightColor: 'currentColor'
118
- }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
119
- borderBottomColor: 'currentColor'
120
- })
121
- }),
122
80
  '&:hover': _extends({}, ownerState.variant === 'contained' && {
123
81
  boxShadow: 'none'
124
82
  })
125
83
  }, ownerState.variant === 'contained' && {
126
84
  boxShadow: 'none'
85
+ }),
86
+ [`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: _extends({}, ownerState.orientation === 'horizontal' && {
87
+ borderTopRightRadius: 0,
88
+ borderBottomRightRadius: 0
89
+ }, ownerState.orientation === 'vertical' && {
90
+ borderBottomRightRadius: 0,
91
+ borderBottomLeftRadius: 0
92
+ }, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && {
93
+ borderRight: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
94
+ [`&.${buttonGroupClasses.disabled}`]: {
95
+ borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
96
+ }
97
+ }, ownerState.variant === 'text' && ownerState.orientation === 'vertical' && {
98
+ borderBottom: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
99
+ [`&.${buttonGroupClasses.disabled}`]: {
100
+ borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
101
+ }
102
+ }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
103
+ borderColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)
104
+ }, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
105
+ borderRightColor: 'transparent'
106
+ }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
107
+ borderBottomColor: 'transparent'
108
+ }, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && {
109
+ borderRight: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
110
+ [`&.${buttonGroupClasses.disabled}`]: {
111
+ borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
112
+ }
113
+ }, ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && {
114
+ borderBottom: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
115
+ [`&.${buttonGroupClasses.disabled}`]: {
116
+ borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
117
+ }
118
+ }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
119
+ borderColor: (theme.vars || theme).palette[ownerState.color].dark
120
+ }, {
121
+ '&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
122
+ borderRightColor: 'currentColor'
123
+ }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
124
+ borderBottomColor: 'currentColor'
125
+ })
126
+ }),
127
+ [`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: _extends({}, ownerState.orientation === 'horizontal' && {
128
+ borderTopLeftRadius: 0,
129
+ borderBottomLeftRadius: 0
130
+ }, ownerState.orientation === 'vertical' && {
131
+ borderTopRightRadius: 0,
132
+ borderTopLeftRadius: 0
133
+ }, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
134
+ marginLeft: -1
135
+ }, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
136
+ marginTop: -1
127
137
  })
128
138
  }));
129
139
  const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
@@ -170,6 +180,20 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps,
170
180
  size,
171
181
  variant
172
182
  }), [color, disabled, disableElevation, disableFocusRipple, disableRipple, fullWidth, size, variant, classes.grouped]);
183
+ const getButtonPositionClassName = (index, childrenParam) => {
184
+ const isFirstButton = index === 0;
185
+ const isLastButton = index === React.Children.count(childrenParam) - 1;
186
+ if (isFirstButton && isLastButton) {
187
+ return '';
188
+ }
189
+ if (isFirstButton) {
190
+ return classes.firstButton;
191
+ }
192
+ if (isLastButton) {
193
+ return classes.lastButton;
194
+ }
195
+ return classes.middleButton;
196
+ };
173
197
  return /*#__PURE__*/_jsx(ButtonGroupRoot, _extends({
174
198
  as: component,
175
199
  role: "group",
@@ -179,7 +203,15 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps,
179
203
  }, other, {
180
204
  children: /*#__PURE__*/_jsx(ButtonGroupContext.Provider, {
181
205
  value: context,
182
- children: children
206
+ children: React.Children.map(children, (child, index) => {
207
+ if (! /*#__PURE__*/React.isValidElement(child)) {
208
+ return child;
209
+ }
210
+ return /*#__PURE__*/_jsx(ButtonGroupButtonContext.Provider, {
211
+ value: getButtonPositionClassName(index, children),
212
+ children: child
213
+ });
214
+ })
183
215
  })
184
216
  }));
185
217
  });
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * @ignore - internal component.
4
+ */
5
+ const ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
6
+ if (process.env.NODE_ENV !== 'production') {
7
+ ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
8
+ }
9
+ export default ButtonGroupButtonContext;
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
3
3
  export function getButtonGroupUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiButtonGroup', slot);
5
5
  }
6
- const buttonGroupClasses = generateUtilityClasses('MuiButtonGroup', ['root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'fullWidth', 'vertical', 'grouped', 'groupedHorizontal', 'groupedVertical', 'groupedText', 'groupedTextHorizontal', 'groupedTextVertical', 'groupedTextPrimary', 'groupedTextSecondary', 'groupedOutlined', 'groupedOutlinedHorizontal', 'groupedOutlinedVertical', 'groupedOutlinedPrimary', 'groupedOutlinedSecondary', 'groupedContained', 'groupedContainedHorizontal', 'groupedContainedVertical', 'groupedContainedPrimary', 'groupedContainedSecondary']);
6
+ const buttonGroupClasses = generateUtilityClasses('MuiButtonGroup', ['root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'firstButton', 'fullWidth', 'vertical', 'grouped', 'groupedHorizontal', 'groupedVertical', 'groupedText', 'groupedTextHorizontal', 'groupedTextVertical', 'groupedTextPrimary', 'groupedTextSecondary', 'groupedOutlined', 'groupedOutlinedHorizontal', 'groupedOutlinedVertical', 'groupedOutlinedPrimary', 'groupedOutlinedSecondary', 'groupedContained', 'groupedContainedHorizontal', 'groupedContainedVertical', 'groupedContainedPrimary', 'groupedContainedSecondary', 'lastButton', 'middleButton']);
7
7
  export default buttonGroupClasses;
@@ -214,7 +214,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-pro
214
214
  /**
215
215
  * The size of the component.
216
216
  * If using a number, the pixel unit is assumed.
217
- * If using a string, you need to provide the CSS unit, e.g '3rem'.
217
+ * If using a string, you need to provide the CSS unit, e.g. '3rem'.
218
218
  * @default 40
219
219
  */
220
220
  size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
@@ -107,7 +107,8 @@ const ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inPro
107
107
  height,
108
108
  gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,
109
109
  gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,
110
- marginBottom: variant === 'masonry' ? gap : undefined
110
+ marginBottom: variant === 'masonry' ? gap : undefined,
111
+ breakInside: variant === 'masonry' ? 'avoid' : undefined
111
112
  }, style),
112
113
  ownerState: ownerState
113
114
  }, other, {
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
52
52
  type
53
53
  } = ownerState;
54
54
  const slots = {
55
- root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
55
+ root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
56
56
  input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
57
57
  };
58
58
  return composeClasses(slots, getInputBaseUtilityClass, classes);
@@ -11,6 +11,7 @@ import formControlState from '../FormControl/formControlState';
11
11
  import useFormControl from '../FormControl/useFormControl';
12
12
  import FormLabel, { formLabelClasses } from '../FormLabel';
13
13
  import useThemeProps from '../styles/useThemeProps';
14
+ import capitalize from '../utils/capitalize';
14
15
  import styled, { rootShouldForwardProp } from '../styles/styled';
15
16
  import { getInputLabelUtilityClasses } from './inputLabelClasses';
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -25,7 +26,7 @@ const useUtilityClasses = ownerState => {
25
26
  required
26
27
  } = ownerState;
27
28
  const slots = {
28
- root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size === 'small' && 'sizeSmall', variant],
29
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],
29
30
  asterisk: [required && 'asterisk']
30
31
  };
31
32
  const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"];
5
+ const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -21,10 +21,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const useUtilityClasses = ownerState => {
22
22
  const {
23
23
  classes,
24
- color
24
+ color,
25
+ size
25
26
  } = ownerState;
26
27
  const slots = {
27
- root: ['root', `color${capitalize(color)}`]
28
+ root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]
28
29
  };
29
30
  return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
30
31
  };
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
3
3
  export function getRadioUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiRadio', slot);
5
5
  }
6
- const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
6
+ const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
7
7
  export default radioClasses;
@@ -432,6 +432,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
432
432
  error
433
433
  });
434
434
  const classes = useUtilityClasses(ownerState);
435
+ const paperProps = _extends({}, MenuProps.PaperProps, MenuProps.slotProps?.paper);
435
436
  return /*#__PURE__*/_jsxs(React.Fragment, {
436
437
  children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
437
438
  ref: handleDisplayRef,
@@ -493,11 +494,13 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
493
494
  role: 'listbox',
494
495
  disableListWrap: true
495
496
  }, MenuProps.MenuListProps),
496
- PaperProps: _extends({}, MenuProps.PaperProps, {
497
- style: _extends({
498
- minWidth: menuMinWidth
499
- }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null)
500
- }),
497
+ slotProps: {
498
+ paper: _extends({}, paperProps, {
499
+ style: _extends({
500
+ minWidth: menuMinWidth
501
+ }, paperProps != null ? paperProps.style : null)
502
+ })
503
+ },
501
504
  children: items
502
505
  }))]
503
506
  });
@@ -15,14 +15,14 @@ import styled, { slotShouldForwardProp } from '../styles/styled';
15
15
  import useTheme from '../styles/useTheme';
16
16
  import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
17
17
  import capitalize from '../utils/capitalize';
18
- import SliderValueLabel from './SliderValueLabel';
18
+ import BaseSliderValueLabel from './SliderValueLabel';
19
19
  import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
22
22
  function Identity(x) {
23
23
  return x;
24
24
  }
25
- const SliderRoot = styled('span', {
25
+ export const SliderRoot = styled('span', {
26
26
  name: 'MuiSlider',
27
27
  slot: 'Root',
28
28
  overridesResolver: (props, styles) => {
@@ -84,18 +84,7 @@ const SliderRoot = styled('span', {
84
84
  }
85
85
  }
86
86
  }));
87
- process.env.NODE_ENV !== "production" ? SliderRoot.propTypes /* remove-proptypes */ = {
88
- // ----------------------------- Warning --------------------------------
89
- // | These PropTypes are generated from the TypeScript type definitions |
90
- // | To update them edit the d.ts file and run "yarn proptypes" |
91
- // ----------------------------------------------------------------------
92
- /**
93
- * @ignore
94
- */
95
- children: PropTypes.node
96
- } : void 0;
97
- export { SliderRoot };
98
- const SliderRail = styled('span', {
87
+ export const SliderRail = styled('span', {
99
88
  name: 'MuiSlider',
100
89
  slot: 'Rail',
101
90
  overridesResolver: (props, styles) => styles.rail
@@ -120,18 +109,7 @@ const SliderRail = styled('span', {
120
109
  }, ownerState.track === 'inverted' && {
121
110
  opacity: 1
122
111
  }));
123
- process.env.NODE_ENV !== "production" ? SliderRail.propTypes /* remove-proptypes */ = {
124
- // ----------------------------- Warning --------------------------------
125
- // | These PropTypes are generated from the TypeScript type definitions |
126
- // | To update them edit the d.ts file and run "yarn proptypes" |
127
- // ----------------------------------------------------------------------
128
- /**
129
- * @ignore
130
- */
131
- children: PropTypes.node
132
- } : void 0;
133
- export { SliderRail };
134
- const SliderTrack = styled('span', {
112
+ export const SliderTrack = styled('span', {
135
113
  name: 'MuiSlider',
136
114
  slot: 'Track',
137
115
  overridesResolver: (props, styles) => styles.track
@@ -168,18 +146,7 @@ const SliderTrack = styled('span', {
168
146
  borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
169
147
  });
170
148
  });
171
- process.env.NODE_ENV !== "production" ? SliderTrack.propTypes /* remove-proptypes */ = {
172
- // ----------------------------- Warning --------------------------------
173
- // | These PropTypes are generated from the TypeScript type definitions |
174
- // | To update them edit the d.ts file and run "yarn proptypes" |
175
- // ----------------------------------------------------------------------
176
- /**
177
- * @ignore
178
- */
179
- children: PropTypes.node
180
- } : void 0;
181
- export { SliderTrack };
182
- const SliderThumb = styled('span', {
149
+ export const SliderThumb = styled('span', {
183
150
  name: 'MuiSlider',
184
151
  slot: 'Thumb',
185
152
  overridesResolver: (props, styles) => {
@@ -251,18 +218,7 @@ const SliderThumb = styled('span', {
251
218
  }
252
219
  }
253
220
  }));
254
- process.env.NODE_ENV !== "production" ? SliderThumb.propTypes /* remove-proptypes */ = {
255
- // ----------------------------- Warning --------------------------------
256
- // | These PropTypes are generated from the TypeScript type definitions |
257
- // | To update them edit the d.ts file and run "yarn proptypes" |
258
- // ----------------------------------------------------------------------
259
- /**
260
- * @ignore
261
- */
262
- children: PropTypes.node
263
- } : void 0;
264
- export { SliderThumb };
265
- const StyledSliderValueLabel = styled(SliderValueLabel, {
221
+ export const SliderValueLabel = styled(BaseSliderValueLabel, {
266
222
  name: 'MuiSlider',
267
223
  slot: 'ValueLabel',
268
224
  overridesResolver: (props, styles) => styles.valueLabel
@@ -320,18 +276,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
320
276
  fontSize: theme.typography.pxToRem(12),
321
277
  padding: '0.25rem 0.5rem'
322
278
  }));
323
- process.env.NODE_ENV !== "production" ? StyledSliderValueLabel.propTypes /* remove-proptypes */ = {
324
- // ----------------------------- Warning --------------------------------
325
- // | These PropTypes are generated from the TypeScript type definitions |
326
- // | To update them edit the d.ts file and run "yarn proptypes" |
327
- // ----------------------------------------------------------------------
328
- /**
329
- * @ignore
330
- */
331
- children: PropTypes.node
332
- } : void 0;
333
- export { StyledSliderValueLabel as SliderValueLabel };
334
- const SliderMark = styled('span', {
279
+ export const SliderMark = styled('span', {
335
280
  name: 'MuiSlider',
336
281
  slot: 'Mark',
337
282
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markActive',
@@ -361,18 +306,7 @@ const SliderMark = styled('span', {
361
306
  backgroundColor: (theme.vars || theme).palette.background.paper,
362
307
  opacity: 0.8
363
308
  }));
364
- process.env.NODE_ENV !== "production" ? SliderMark.propTypes /* remove-proptypes */ = {
365
- // ----------------------------- Warning --------------------------------
366
- // | These PropTypes are generated from the TypeScript type definitions |
367
- // | To update them edit the d.ts file and run "yarn proptypes" |
368
- // ----------------------------------------------------------------------
369
- /**
370
- * @ignore
371
- */
372
- children: PropTypes.node
373
- } : void 0;
374
- export { SliderMark };
375
- const SliderMarkLabel = styled('span', {
309
+ export const SliderMarkLabel = styled('span', {
376
310
  name: 'MuiSlider',
377
311
  slot: 'MarkLabel',
378
312
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markLabelActive',
@@ -400,17 +334,6 @@ const SliderMarkLabel = styled('span', {
400
334
  }, markLabelActive && {
401
335
  color: (theme.vars || theme).palette.text.primary
402
336
  }));
403
- process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes /* remove-proptypes */ = {
404
- // ----------------------------- Warning --------------------------------
405
- // | These PropTypes are generated from the TypeScript type definitions |
406
- // | To update them edit the d.ts file and run "yarn proptypes" |
407
- // ----------------------------------------------------------------------
408
- /**
409
- * @ignore
410
- */
411
- children: PropTypes.node
412
- } : void 0;
413
- export { SliderMarkLabel };
414
337
  const useUtilityClasses = ownerState => {
415
338
  const {
416
339
  disabled,
@@ -523,7 +446,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
523
446
  const RailSlot = slots?.rail ?? components.Rail ?? SliderRail;
524
447
  const TrackSlot = slots?.track ?? components.Track ?? SliderTrack;
525
448
  const ThumbSlot = slots?.thumb ?? components.Thumb ?? SliderThumb;
526
- const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ?? StyledSliderValueLabel;
449
+ const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ?? SliderValueLabel;
527
450
  const MarkSlot = slots?.mark ?? components.Mark ?? SliderMark;
528
451
  const MarkLabelSlot = slots?.markLabel ?? components.MarkLabel ?? SliderMarkLabel;
529
452
  const InputSlot = slots?.input ?? components.Input ?? 'input';
@@ -501,7 +501,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
501
501
  *
502
502
  * @default false
503
503
  */
504
- allowSwipeInChildren: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
504
+ allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
505
505
  /**
506
506
  * @ignore
507
507
  */
@@ -556,20 +556,20 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
556
556
  /**
557
557
  * Callback fired when the component requests to be closed.
558
558
  *
559
- * @param {object} event The event source of the callback.
559
+ * @param {React.SyntheticEvent<{}>} event The event source of the callback.
560
560
  */
561
561
  onClose: PropTypes.func.isRequired,
562
562
  /**
563
563
  * Callback fired when the component requests to be opened.
564
564
  *
565
- * @param {object} event The event source of the callback.
565
+ * @param {React.SyntheticEvent<{}>} event The event source of the callback.
566
566
  */
567
567
  onOpen: PropTypes.func.isRequired,
568
568
  /**
569
569
  * If `true`, the component is shown.
570
570
  * @default false
571
571
  */
572
- open: PropTypes.bool.isRequired,
572
+ open: PropTypes.bool,
573
573
  /**
574
574
  * @ignore
575
575
  */
@@ -190,10 +190,7 @@ const TabsIndicator = styled('span', {
190
190
  width: 2,
191
191
  right: 0
192
192
  }));
193
- const TabsScrollbarSize = styled(ScrollbarSize, {
194
- name: 'MuiTabs',
195
- slot: 'ScrollbarSize'
196
- })({
193
+ const TabsScrollbarSize = styled(ScrollbarSize)({
197
194
  overflowX: 'auto',
198
195
  overflowY: 'hidden',
199
196
  // Hide dimensionless scrollbar on macOS
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.14.7
2
+ * @mui/material v5.14.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -20,6 +20,7 @@ var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
20
20
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
21
  var _buttonClasses = _interopRequireWildcard(require("./buttonClasses"));
22
22
  var _ButtonGroupContext = _interopRequireDefault(require("../ButtonGroup/ButtonGroupContext"));
23
+ var _ButtonGroupButtonContext = _interopRequireDefault(require("../ButtonGroup/ButtonGroupButtonContext"));
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
25
  const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
25
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -228,6 +229,7 @@ const ButtonEndIcon = (0, _styled.default)('span', {
228
229
  const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
229
230
  // props priority: `inProps` > `contextProps` > `themeDefaultProps`
230
231
  const contextProps = React.useContext(_ButtonGroupContext.default);
232
+ const buttonGroupButtonContextPositionClassName = React.useContext(_ButtonGroupButtonContext.default);
231
233
  const resolvedProps = (0, _utils.internal_resolveProps)(contextProps, inProps);
232
234
  const props = (0, _useThemeProps.default)({
233
235
  props: resolvedProps,
@@ -272,9 +274,10 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
272
274
  ownerState: ownerState,
273
275
  children: endIconProp
274
276
  });
277
+ const positionClassName = buttonGroupButtonContextPositionClassName || '';
275
278
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ButtonRoot, (0, _extends2.default)({
276
279
  ownerState: ownerState,
277
- className: (0, _clsx.default)(contextProps.className, classes.root, className),
280
+ className: (0, _clsx.default)(contextProps.className, classes.root, className, positionClassName),
278
281
  component: component,
279
282
  disabled: disabled,
280
283
  focusRipple: !disableFocusRipple,