@mui/material 6.0.1 → 6.1.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 (222) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Alert/Alert.d.ts +2 -2
  3. package/Alert/Alert.js +4 -3
  4. package/AppBar/AppBar.js +2 -1
  5. package/Autocomplete/Autocomplete.d.ts +8 -6
  6. package/Autocomplete/Autocomplete.js +4 -4
  7. package/Avatar/Avatar.d.ts +1 -1
  8. package/AvatarGroup/AvatarGroup.d.ts +1 -1
  9. package/Backdrop/Backdrop.d.ts +2 -2
  10. package/Badge/Badge.js +2 -1
  11. package/Button/Button.js +2 -1
  12. package/ButtonGroup/ButtonGroup.js +3 -2
  13. package/CHANGELOG.md +127 -15130
  14. package/Checkbox/Checkbox.js +3 -2
  15. package/Chip/Chip.js +6 -5
  16. package/CircularProgress/CircularProgress.js +2 -1
  17. package/Dialog/Dialog.js +1 -0
  18. package/Fab/Fab.js +2 -1
  19. package/FilledInput/FilledInput.js +2 -1
  20. package/FormControl/FormControl.d.ts +4 -4
  21. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  22. package/FormLabel/FormLabel.js +2 -1
  23. package/Grid/Grid.d.ts +0 -1
  24. package/Grid/Grid.js +0 -1
  25. package/Icon/Icon.js +2 -1
  26. package/IconButton/IconButton.js +3 -2
  27. package/Input/Input.js +2 -1
  28. package/InputAdornment/InputAdornment.js +1 -1
  29. package/InputBase/InputBase.js +1 -1
  30. package/LinearProgress/LinearProgress.js +6 -5
  31. package/Link/Link.js +2 -1
  32. package/MenuList/MenuList.js +8 -0
  33. package/Modal/Modal.d.ts +4 -4
  34. package/NoSsr/NoSsr.d.ts +4 -4
  35. package/NoSsr/NoSsr.js +4 -4
  36. package/OutlinedInput/OutlinedInput.js +2 -1
  37. package/PaginationItem/PaginationItem.d.ts +4 -4
  38. package/PaginationItem/PaginationItem.js +3 -2
  39. package/Popover/Popover.d.ts +27 -4
  40. package/Popover/Popover.js +20 -0
  41. package/Portal/Portal.js +1 -1
  42. package/Radio/Radio.js +19 -3
  43. package/Slider/Slider.js +4 -3
  44. package/SpeedDial/SpeedDial.d.ts +1 -1
  45. package/SpeedDialIcon/SpeedDialIcon.js +1 -1
  46. package/StepButton/StepButton.js +1 -1
  47. package/StepLabel/StepLabel.d.ts +2 -2
  48. package/Switch/Switch.js +2 -1
  49. package/TextField/TextField.d.ts +13 -13
  50. package/ToggleButton/ToggleButton.js +2 -1
  51. package/Typography/Typography.js +2 -1
  52. package/index.js +1 -1
  53. package/internal/svg-icons/Add.js +1 -1
  54. package/internal/svg-icons/ArrowDownward.js +1 -1
  55. package/internal/svg-icons/ArrowDropDown.js +1 -1
  56. package/internal/svg-icons/Cancel.js +1 -1
  57. package/internal/svg-icons/CheckBox.js +1 -1
  58. package/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
  59. package/internal/svg-icons/CheckCircle.js +1 -1
  60. package/internal/svg-icons/Close.js +1 -1
  61. package/internal/svg-icons/ErrorOutline.js +1 -1
  62. package/internal/svg-icons/FirstPage.js +1 -1
  63. package/internal/svg-icons/IndeterminateCheckBox.js +1 -1
  64. package/internal/svg-icons/InfoOutlined.js +1 -1
  65. package/internal/svg-icons/KeyboardArrowLeft.js +1 -1
  66. package/internal/svg-icons/KeyboardArrowRight.js +1 -1
  67. package/internal/svg-icons/LastPage.js +1 -1
  68. package/internal/svg-icons/MoreHoriz.js +1 -1
  69. package/internal/svg-icons/NavigateBefore.js +1 -1
  70. package/internal/svg-icons/NavigateNext.js +1 -1
  71. package/internal/svg-icons/Person.js +1 -1
  72. package/internal/svg-icons/RadioButtonChecked.js +1 -1
  73. package/internal/svg-icons/RadioButtonUnchecked.js +1 -1
  74. package/internal/svg-icons/ReportProblemOutlined.js +1 -1
  75. package/internal/svg-icons/Star.js +1 -1
  76. package/internal/svg-icons/StarBorder.js +1 -1
  77. package/internal/svg-icons/SuccessOutlined.js +1 -1
  78. package/internal/svg-icons/Warning.js +1 -1
  79. package/modern/Alert/Alert.js +4 -3
  80. package/modern/AppBar/AppBar.js +2 -1
  81. package/modern/Autocomplete/Autocomplete.js +4 -4
  82. package/modern/Badge/Badge.js +2 -1
  83. package/modern/Button/Button.js +2 -1
  84. package/modern/ButtonGroup/ButtonGroup.js +3 -2
  85. package/modern/Checkbox/Checkbox.js +3 -2
  86. package/modern/Chip/Chip.js +6 -5
  87. package/modern/CircularProgress/CircularProgress.js +2 -1
  88. package/modern/Dialog/Dialog.js +1 -0
  89. package/modern/Fab/Fab.js +2 -1
  90. package/modern/FilledInput/FilledInput.js +2 -1
  91. package/modern/FormLabel/FormLabel.js +2 -1
  92. package/modern/Grid/Grid.js +0 -1
  93. package/modern/Icon/Icon.js +2 -1
  94. package/modern/IconButton/IconButton.js +3 -2
  95. package/modern/Input/Input.js +2 -1
  96. package/modern/InputAdornment/InputAdornment.js +1 -1
  97. package/modern/InputBase/InputBase.js +1 -1
  98. package/modern/LinearProgress/LinearProgress.js +6 -5
  99. package/modern/Link/Link.js +2 -1
  100. package/modern/MenuList/MenuList.js +8 -0
  101. package/modern/NoSsr/NoSsr.js +4 -4
  102. package/modern/OutlinedInput/OutlinedInput.js +2 -1
  103. package/modern/PaginationItem/PaginationItem.js +3 -2
  104. package/modern/Popover/Popover.js +20 -0
  105. package/modern/Portal/Portal.js +1 -1
  106. package/modern/Radio/Radio.js +19 -3
  107. package/modern/Slider/Slider.js +4 -3
  108. package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -1
  109. package/modern/StepButton/StepButton.js +1 -1
  110. package/modern/Switch/Switch.js +2 -1
  111. package/modern/ToggleButton/ToggleButton.js +2 -1
  112. package/modern/Typography/Typography.js +2 -1
  113. package/modern/index.js +1 -1
  114. package/modern/internal/svg-icons/Add.js +1 -1
  115. package/modern/internal/svg-icons/ArrowDownward.js +1 -1
  116. package/modern/internal/svg-icons/ArrowDropDown.js +1 -1
  117. package/modern/internal/svg-icons/Cancel.js +1 -1
  118. package/modern/internal/svg-icons/CheckBox.js +1 -1
  119. package/modern/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
  120. package/modern/internal/svg-icons/CheckCircle.js +1 -1
  121. package/modern/internal/svg-icons/Close.js +1 -1
  122. package/modern/internal/svg-icons/ErrorOutline.js +1 -1
  123. package/modern/internal/svg-icons/FirstPage.js +1 -1
  124. package/modern/internal/svg-icons/IndeterminateCheckBox.js +1 -1
  125. package/modern/internal/svg-icons/InfoOutlined.js +1 -1
  126. package/modern/internal/svg-icons/KeyboardArrowLeft.js +1 -1
  127. package/modern/internal/svg-icons/KeyboardArrowRight.js +1 -1
  128. package/modern/internal/svg-icons/LastPage.js +1 -1
  129. package/modern/internal/svg-icons/MoreHoriz.js +1 -1
  130. package/modern/internal/svg-icons/NavigateBefore.js +1 -1
  131. package/modern/internal/svg-icons/NavigateNext.js +1 -1
  132. package/modern/internal/svg-icons/Person.js +1 -1
  133. package/modern/internal/svg-icons/RadioButtonChecked.js +1 -1
  134. package/modern/internal/svg-icons/RadioButtonUnchecked.js +1 -1
  135. package/modern/internal/svg-icons/ReportProblemOutlined.js +1 -1
  136. package/modern/internal/svg-icons/Star.js +1 -1
  137. package/modern/internal/svg-icons/StarBorder.js +1 -1
  138. package/modern/internal/svg-icons/SuccessOutlined.js +1 -1
  139. package/modern/internal/svg-icons/Warning.js +1 -1
  140. package/modern/styles/ThemeProviderWithVars.js +5 -3
  141. package/modern/styles/createGetSelector.js +2 -2
  142. package/modern/styles/createTheme.js +22 -3
  143. package/modern/utils/createSimplePaletteValueFilter.js +41 -0
  144. package/modern/utils/createSvgIcon.js +1 -1
  145. package/modern/version/index.js +4 -5
  146. package/node/Alert/Alert.js +4 -3
  147. package/node/AppBar/AppBar.js +2 -1
  148. package/node/Autocomplete/Autocomplete.js +4 -4
  149. package/node/Badge/Badge.js +2 -1
  150. package/node/Button/Button.js +2 -1
  151. package/node/ButtonGroup/ButtonGroup.js +3 -2
  152. package/node/Checkbox/Checkbox.js +3 -2
  153. package/node/Chip/Chip.js +6 -5
  154. package/node/CircularProgress/CircularProgress.js +2 -1
  155. package/node/Dialog/Dialog.js +1 -0
  156. package/node/Fab/Fab.js +2 -1
  157. package/node/FilledInput/FilledInput.js +2 -1
  158. package/node/FormLabel/FormLabel.js +2 -1
  159. package/node/Grid/Grid.js +0 -1
  160. package/node/Icon/Icon.js +2 -1
  161. package/node/IconButton/IconButton.js +3 -2
  162. package/node/Input/Input.js +2 -1
  163. package/node/InputAdornment/InputAdornment.js +1 -1
  164. package/node/InputBase/InputBase.js +1 -1
  165. package/node/LinearProgress/LinearProgress.js +6 -5
  166. package/node/Link/Link.js +2 -1
  167. package/node/MenuList/MenuList.js +8 -0
  168. package/node/NoSsr/NoSsr.js +4 -4
  169. package/node/OutlinedInput/OutlinedInput.js +2 -1
  170. package/node/PaginationItem/PaginationItem.js +3 -2
  171. package/node/Popover/Popover.js +20 -0
  172. package/node/Portal/Portal.js +1 -1
  173. package/node/Radio/Radio.js +19 -3
  174. package/node/Slider/Slider.js +4 -3
  175. package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
  176. package/node/StepButton/StepButton.js +1 -1
  177. package/node/Switch/Switch.js +2 -1
  178. package/node/ToggleButton/ToggleButton.js +2 -1
  179. package/node/Typography/Typography.js +2 -1
  180. package/node/index.js +1 -1
  181. package/node/internal/svg-icons/Add.js +1 -1
  182. package/node/internal/svg-icons/ArrowDownward.js +1 -1
  183. package/node/internal/svg-icons/ArrowDropDown.js +1 -1
  184. package/node/internal/svg-icons/Cancel.js +1 -1
  185. package/node/internal/svg-icons/CheckBox.js +1 -1
  186. package/node/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
  187. package/node/internal/svg-icons/CheckCircle.js +1 -1
  188. package/node/internal/svg-icons/Close.js +1 -1
  189. package/node/internal/svg-icons/ErrorOutline.js +1 -1
  190. package/node/internal/svg-icons/FirstPage.js +1 -1
  191. package/node/internal/svg-icons/IndeterminateCheckBox.js +1 -1
  192. package/node/internal/svg-icons/InfoOutlined.js +1 -1
  193. package/node/internal/svg-icons/KeyboardArrowLeft.js +1 -1
  194. package/node/internal/svg-icons/KeyboardArrowRight.js +1 -1
  195. package/node/internal/svg-icons/LastPage.js +1 -1
  196. package/node/internal/svg-icons/MoreHoriz.js +1 -1
  197. package/node/internal/svg-icons/NavigateBefore.js +1 -1
  198. package/node/internal/svg-icons/NavigateNext.js +1 -1
  199. package/node/internal/svg-icons/Person.js +1 -1
  200. package/node/internal/svg-icons/RadioButtonChecked.js +1 -1
  201. package/node/internal/svg-icons/RadioButtonUnchecked.js +1 -1
  202. package/node/internal/svg-icons/ReportProblemOutlined.js +1 -1
  203. package/node/internal/svg-icons/Star.js +1 -1
  204. package/node/internal/svg-icons/StarBorder.js +1 -1
  205. package/node/internal/svg-icons/SuccessOutlined.js +1 -1
  206. package/node/internal/svg-icons/Warning.js +1 -1
  207. package/node/styles/ThemeProviderWithVars.js +5 -3
  208. package/node/styles/createTheme.js +22 -3
  209. package/node/utils/createSimplePaletteValueFilter.js +47 -0
  210. package/node/utils/createSvgIcon.js +1 -1
  211. package/node/version/index.js +5 -6
  212. package/package.json +7 -7
  213. package/styles/ThemeProviderWithVars.js +5 -3
  214. package/styles/createGetSelector.js +2 -2
  215. package/styles/createTheme.js +22 -3
  216. package/utils/createSimplePaletteValueFilter.d.ts +12 -0
  217. package/utils/createSimplePaletteValueFilter.js +41 -0
  218. package/utils/createSvgIcon.js +1 -1
  219. package/utils/memoTheme.d.ts +1 -1
  220. package/utils/types.d.ts +3 -2
  221. package/version/index.d.ts +1 -2
  222. package/version/index.js +4 -5
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.js";
12
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
13
  import ButtonBase from "../ButtonBase/index.js";
14
14
  import capitalize from "../utils/capitalize.js";
15
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
15
16
  import buttonClasses, { getButtonUtilityClass } from "./buttonClasses.js";
16
17
  import ButtonGroupContext from "../ButtonGroup/ButtonGroupContext.js";
17
18
  import ButtonGroupButtonContext from "../ButtonGroup/ButtonGroupButtonContext.js";
@@ -146,7 +147,7 @@ const ButtonRoot = styled(ButtonBase, {
146
147
  color: `var(--variant-textColor)`,
147
148
  backgroundColor: `var(--variant-textBg)`
148
149
  }
149
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main && palette.dark && palette.contrastText).map(([color]) => ({
150
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])).map(([color]) => ({
150
151
  props: {
151
152
  color
152
153
  },
@@ -9,6 +9,7 @@ import getValidReactChildren from '@mui/utils/getValidReactChildren';
9
9
  import capitalize from "../utils/capitalize.js";
10
10
  import { styled } from "../zero-styled/index.js";
11
11
  import memoTheme from "../utils/memoTheme.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
14
  import buttonGroupClasses, { getButtonGroupUtilityClass } from "./buttonGroupClasses.js";
14
15
  import ButtonGroupContext from "./ButtonGroupContext.js";
@@ -140,7 +141,7 @@ const ButtonGroupRoot = styled('div', {
140
141
  }
141
142
  }
142
143
  }
143
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).flatMap(([color]) => [{
144
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).flatMap(([color]) => [{
144
145
  props: {
145
146
  variant: 'text',
146
147
  color
@@ -208,7 +209,7 @@ const ButtonGroupRoot = styled('div', {
208
209
  }
209
210
  }
210
211
  }
211
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.dark).map(([color]) => ({
212
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
212
213
  props: {
213
214
  variant: 'contained',
214
215
  color
@@ -15,6 +15,7 @@ import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
15
15
  import checkboxClasses, { getCheckboxUtilityClass } from "./checkboxClasses.js";
16
16
  import { styled } from "../zero-styled/index.js";
17
17
  import memoTheme from "../utils/memoTheme.js";
18
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
18
19
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
19
20
  import { jsx as _jsx } from "react/jsx-runtime";
20
21
  const useUtilityClasses = ownerState => {
@@ -58,7 +59,7 @@ const CheckboxRoot = styled(SwitchBase, {
58
59
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
59
60
  }
60
61
  }
61
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
62
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
62
63
  props: {
63
64
  color,
64
65
  disableRipple: false
@@ -68,7 +69,7 @@ const CheckboxRoot = styled(SwitchBase, {
68
69
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
69
70
  }
70
71
  }
71
- })), ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
72
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
72
73
  props: {
73
74
  color
74
75
  },
@@ -12,6 +12,7 @@ import capitalize from "../utils/capitalize.js";
12
12
  import ButtonBase from "../ButtonBase/index.js";
13
13
  import { styled } from "../zero-styled/index.js";
14
14
  import memoTheme from "../utils/memoTheme.js";
15
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
15
16
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
16
17
  import chipClasses, { getChipUtilityClass } from "./chipClasses.js";
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -158,7 +159,7 @@ const ChipRoot = styled('div', {
158
159
  marginLeft: -4
159
160
  }
160
161
  }
161
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.contrastText).map(([color]) => {
162
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => {
162
163
  return {
163
164
  props: {
164
165
  color
@@ -197,7 +198,7 @@ const ChipRoot = styled('div', {
197
198
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
198
199
  }
199
200
  }
200
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.dark).map(([color]) => {
201
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => {
201
202
  return {
202
203
  props: {
203
204
  color,
@@ -227,7 +228,7 @@ const ChipRoot = styled('div', {
227
228
  boxShadow: (theme.vars || theme).shadows[1]
228
229
  }
229
230
  }
230
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.dark).map(([color]) => ({
231
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
231
232
  props: {
232
233
  color,
233
234
  clickable: true
@@ -269,7 +270,7 @@ const ChipRoot = styled('div', {
269
270
  marginRight: 3
270
271
  }
271
272
  }
272
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // no need to check for mainChannel as it's calculated from main
273
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // no need to check for mainChannel as it's calculated from main
273
274
  .map(([color]) => ({
274
275
  props: {
275
276
  variant: 'outlined',
@@ -426,7 +427,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
426
427
  } : {};
427
428
  let deleteIcon = null;
428
429
  if (onDelete) {
429
- deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? ( /*#__PURE__*/React.cloneElement(deleteIconProp, {
430
+ deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? (/*#__PURE__*/React.cloneElement(deleteIconProp, {
430
431
  className: clsx(deleteIconProp.props.className, classes.deleteIcon),
431
432
  onClick: handleDeleteIconClick
432
433
  })) : /*#__PURE__*/_jsx(CancelIcon, {
@@ -9,6 +9,7 @@ import { keyframes, css, styled } from "../zero-styled/index.js";
9
9
  import memoTheme from "../utils/memoTheme.js";
10
10
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
11
11
  import capitalize from "../utils/capitalize.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import { getCircularProgressUtilityClass } from "./circularProgressClasses.js";
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  const SIZE = 44;
@@ -88,7 +89,7 @@ const CircularProgressRoot = styled('span', {
88
89
  style: rotateAnimation || {
89
90
  animation: `${circularRotateKeyframe} 1.4s linear infinite`
90
91
  }
91
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
92
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
92
93
  props: {
93
94
  color
94
95
  },
@@ -106,6 +106,7 @@ const DialogPaper = styled(Paper, {
106
106
  }) => ({
107
107
  margin: 32,
108
108
  position: 'relative',
109
+ overflowY: 'auto',
109
110
  '@media print': {
110
111
  overflowY: 'visible',
111
112
  boxShadow: 'none'
package/modern/Fab/Fab.js CHANGED
@@ -10,6 +10,7 @@ import fabClasses, { getFabUtilityClass } from "./fabClasses.js";
10
10
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
11
11
  import { styled } from "../zero-styled/index.js";
12
12
  import memoTheme from "../utils/memoTheme.js";
13
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
13
14
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const useUtilityClasses = ownerState => {
@@ -133,7 +134,7 @@ const FabRoot = styled(ButtonBase, {
133
134
  })), memoTheme(({
134
135
  theme
135
136
  }) => ({
136
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.dark && value.contrastText) // check all the used fields in the style below
137
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])) // check all the used fields in the style below
137
138
  .map(([color]) => ({
138
139
  props: {
139
140
  color
@@ -9,6 +9,7 @@ import InputBase from "../InputBase/index.js";
9
9
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
10
10
  import { styled } from "../zero-styled/index.js";
11
11
  import memoTheme from "../utils/memoTheme.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
14
  import filledInputClasses, { getFilledInputUtilityClass } from "./filledInputClasses.js";
14
15
  import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
@@ -122,7 +123,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
122
123
  borderBottomStyle: 'dotted'
123
124
  }
124
125
  }
125
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
126
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
126
127
  .map(([color]) => ({
127
128
  props: {
128
129
  disableUnderline: false,
@@ -9,6 +9,7 @@ import useFormControl from "../FormControl/useFormControl.js";
9
9
  import capitalize from "../utils/capitalize.js";
10
10
  import { styled } from "../zero-styled/index.js";
11
11
  import memoTheme from "../utils/memoTheme.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
14
  import formLabelClasses, { getFormLabelUtilityClasses } from "./formLabelClasses.js";
14
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -48,7 +49,7 @@ export const FormLabelRoot = styled('label', {
48
49
  lineHeight: '1.4375em',
49
50
  padding: 0,
50
51
  position: 'relative',
51
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
52
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
52
53
  props: {
53
54
  color
54
55
  },
@@ -530,7 +530,6 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
530
530
  * Defines the `flex-wrap` style property.
531
531
  * It's applied for all screen sizes.
532
532
  * @default 'wrap'
533
- * @deprecated Use `flexWrap` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
534
533
  */
535
534
  wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap']),
536
535
  /**
@@ -7,6 +7,7 @@ import composeClasses from '@mui/utils/composeClasses';
7
7
  import capitalize from "../utils/capitalize.js";
8
8
  import { styled } from "../zero-styled/index.js";
9
9
  import memoTheme from "../utils/memoTheme.js";
10
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
10
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
11
12
  import { getIconUtilityClass } from "./iconClasses.js";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -93,7 +94,7 @@ const IconRoot = styled('span', {
93
94
  style: {
94
95
  color: undefined
95
96
  }
96
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
97
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
97
98
  props: {
98
99
  color
99
100
  },
@@ -8,6 +8,7 @@ import composeClasses from '@mui/utils/composeClasses';
8
8
  import { alpha } from '@mui/system/colorManipulator';
9
9
  import { styled } from "../zero-styled/index.js";
10
10
  import memoTheme from "../utils/memoTheme.js";
11
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
11
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
12
13
  import ButtonBase from "../ButtonBase/index.js";
13
14
  import capitalize from "../utils/capitalize.js";
@@ -101,7 +102,7 @@ const IconButtonRoot = styled(ButtonBase, {
101
102
  style: {
102
103
  color: 'inherit'
103
104
  }
104
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
105
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
105
106
  .map(([color]) => ({
106
107
  props: {
107
108
  color
@@ -109,7 +110,7 @@ const IconButtonRoot = styled(ButtonBase, {
109
110
  style: {
110
111
  color: (theme.vars || theme).palette[color].main
111
112
  }
112
- })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
113
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
113
114
  .map(([color]) => ({
114
115
  props: {
115
116
  color,
@@ -9,6 +9,7 @@ import InputBase from "../InputBase/index.js";
9
9
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
10
10
  import { styled } from "../zero-styled/index.js";
11
11
  import memoTheme from "../utils/memoTheme.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
13
14
  import inputClasses, { getInputUtilityClass } from "./inputClasses.js";
14
15
  import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
@@ -109,7 +110,7 @@ const InputRoot = styled(InputBaseRoot, {
109
110
  borderBottomStyle: 'dotted'
110
111
  }
111
112
  }
112
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
113
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
113
114
  props: {
114
115
  color,
115
116
  disableUnderline: false
@@ -126,7 +126,7 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
126
126
  color: "textSecondary",
127
127
  children: children
128
128
  }) : /*#__PURE__*/_jsxs(React.Fragment, {
129
- children: [position === 'start' ? ( /* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx("span", {
129
+ children: [position === 'start' ? (/* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx("span", {
130
130
  className: "notranslate",
131
131
  children: "\u200B"
132
132
  }))) : null, children]
@@ -461,7 +461,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
461
461
  ...(slotProps.input ?? componentsProps.input)
462
462
  };
463
463
  return /*#__PURE__*/_jsxs(React.Fragment, {
464
- children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && ( // For Emotion/Styled-components, InputGlobalStyles will be a function
464
+ children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (// For Emotion/Styled-components, InputGlobalStyles will be a function
465
465
  // For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
466
466
  _InputGlobalStyles || (_InputGlobalStyles = /*#__PURE__*/_jsx(InputGlobalStyles, {}))), /*#__PURE__*/_jsxs(Root, {
467
467
  ...rootProps,
@@ -8,6 +8,7 @@ import { darken, lighten } from '@mui/system/colorManipulator';
8
8
  import { useRtl } from '@mui/system/RtlProvider';
9
9
  import { keyframes, css, styled } from "../zero-styled/index.js";
10
10
  import memoTheme from "../utils/memoTheme.js";
11
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
11
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
12
13
  import capitalize from "../utils/capitalize.js";
13
14
  import { getLinearProgressUtilityClass } from "./linearProgressClasses.js";
@@ -115,7 +116,7 @@ const LinearProgressRoot = styled('span', {
115
116
  '@media print': {
116
117
  colorAdjust: 'exact'
117
118
  },
118
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
119
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
119
120
  props: {
120
121
  color
121
122
  },
@@ -180,7 +181,7 @@ const LinearProgressDashed = styled('span', {
180
181
  opacity: 0.3,
181
182
  backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
182
183
  }
183
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => {
184
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
184
185
  const backgroundColor = getColorShade(theme, color);
185
186
  return {
186
187
  props: {
@@ -221,7 +222,7 @@ const LinearProgressBar1 = styled('span', {
221
222
  style: {
222
223
  backgroundColor: 'currentColor'
223
224
  }
224
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
225
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
225
226
  props: {
226
227
  color
227
228
  },
@@ -278,7 +279,7 @@ const LinearProgressBar2 = styled('span', {
278
279
  top: 0,
279
280
  transition: 'transform 0.2s linear',
280
281
  transformOrigin: 'left',
281
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
282
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
282
283
  props: {
283
284
  color
284
285
  },
@@ -299,7 +300,7 @@ const LinearProgressBar2 = styled('span', {
299
300
  style: {
300
301
  opacity: 0.3
301
302
  }
302
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
303
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
303
304
  props: {
304
305
  color,
305
306
  variant: 'buffer'
@@ -10,6 +10,7 @@ import isFocusVisible from '@mui/utils/isFocusVisible';
10
10
  import capitalize from "../utils/capitalize.js";
11
11
  import { styled, useTheme } from "../zero-styled/index.js";
12
12
  import memoTheme from "../utils/memoTheme.js";
13
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
13
14
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
15
  import Typography from "../Typography/index.js";
15
16
  import linkClasses, { getLinkUtilityClass } from "./linkClasses.js";
@@ -86,7 +87,7 @@ const LinkRoot = styled(Typography, {
86
87
  style: {
87
88
  textDecorationColor: 'var(--Link-underlineColor)'
88
89
  }
89
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
90
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
90
91
  props: {
91
92
  underline: 'always',
92
93
  color
@@ -121,6 +121,14 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
121
121
  const handleKeyDown = event => {
122
122
  const list = listRef.current;
123
123
  const key = event.key;
124
+ const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;
125
+ if (isModifierKeyPressed) {
126
+ if (onKeyDown) {
127
+ onKeyDown(event);
128
+ }
129
+ return;
130
+ }
131
+
124
132
  /**
125
133
  * @type {Element} - will always be defined since we are in a keydown handler
126
134
  * attached to an element. A keydown event is either dispatched to the activeElement
@@ -9,10 +9,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  *
10
10
  * This component can be useful in a variety of situations:
11
11
  *
12
- * * Escape hatch for broken dependencies not supporting SSR.
13
- * * Improve the time-to-first paint on the client by only rendering above the fold.
14
- * * Reduce the rendering time on the server.
15
- * * Under too heavy server load, you can turn on service degradation.
12
+ * * Escape hatch for broken dependencies not supporting SSR.
13
+ * * Improve the time-to-first paint on the client by only rendering above the fold.
14
+ * * Reduce the rendering time on the server.
15
+ * * Under too heavy server load, you can turn on service degradation.
16
16
  *
17
17
  * Demos:
18
18
  *
@@ -10,6 +10,7 @@ import formControlState from "../FormControl/formControlState.js";
10
10
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
11
11
  import { styled } from "../zero-styled/index.js";
12
12
  import memoTheme from "../utils/memoTheme.js";
13
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
13
14
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
15
  import outlinedInputClasses, { getOutlinedInputUtilityClass } from "./outlinedInputClasses.js";
15
16
  import InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
@@ -48,7 +49,7 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
48
49
  [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
49
50
  borderWidth: 2
50
51
  },
51
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
52
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
52
53
  props: {
53
54
  color
54
55
  },
@@ -9,6 +9,7 @@ import { useRtl } from '@mui/system/RtlProvider';
9
9
  import paginationItemClasses, { getPaginationItemUtilityClass } from "./paginationItemClasses.js";
10
10
  import ButtonBase from "../ButtonBase/index.js";
11
11
  import capitalize from "../utils/capitalize.js";
12
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
12
13
  import FirstPageIcon from "../internal/svg-icons/FirstPage.js";
13
14
  import LastPageIcon from "../internal/svg-icons/LastPage.js";
14
15
  import NavigateBeforeIcon from "../internal/svg-icons/NavigateBefore.js";
@@ -193,7 +194,7 @@ const PaginationItemPage = styled(ButtonBase, {
193
194
  }
194
195
  }
195
196
  }
196
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.dark && value.contrastText).map(([color]) => ({
197
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])).map(([color]) => ({
197
198
  props: {
198
199
  variant: 'text',
199
200
  color
@@ -217,7 +218,7 @@ const PaginationItemPage = styled(ButtonBase, {
217
218
  }
218
219
  }
219
220
  }
220
- })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.light).map(([color]) => ({
221
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
221
222
  props: {
222
223
  variant: 'outlined',
223
224
  color
@@ -419,6 +419,26 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
419
419
  * @default 'anchorEl'
420
420
  */
421
421
  anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),
422
+ /**
423
+ * A backdrop component. This prop enables custom backdrop rendering.
424
+ * @deprecated Use `slotProps.root.slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
425
+ * Use the `slotProps.root.slots.backdrop` prop to make your application ready for the next version of Material UI.
426
+ * @default styled(Backdrop, {
427
+ * name: 'MuiModal',
428
+ * slot: 'Backdrop',
429
+ * overridesResolver: (props, styles) => {
430
+ * return styles.backdrop;
431
+ * },
432
+ * })({
433
+ * zIndex: -1,
434
+ * })
435
+ */
436
+ BackdropComponent: PropTypes.elementType,
437
+ /**
438
+ * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
439
+ * @deprecated Use `slotProps.root.slotProps.backdrop` instead.
440
+ */
441
+ BackdropProps: PropTypes.object,
422
442
  /**
423
443
  * The content of the component.
424
444
  */
@@ -44,7 +44,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
44
44
  return undefined;
45
45
  }, [forwardedRef, mountNode, disablePortal]);
46
46
  if (disablePortal) {
47
- if ( /*#__PURE__*/React.isValidElement(children)) {
47
+ if (/*#__PURE__*/React.isValidElement(children)) {
48
48
  const newProps = {
49
49
  ref: handleRef
50
50
  };
@@ -10,11 +10,13 @@ import SwitchBase from "../internal/SwitchBase.js";
10
10
  import RadioButtonIcon from "./RadioButtonIcon.js";
11
11
  import capitalize from "../utils/capitalize.js";
12
12
  import createChainedFunction from "../utils/createChainedFunction.js";
13
+ import useFormControl from "../FormControl/useFormControl.js";
13
14
  import useRadioGroup from "../RadioGroup/useRadioGroup.js";
14
15
  import radioClasses, { getRadioUtilityClass } from "./radioClasses.js";
15
16
  import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
16
17
  import { styled } from "../zero-styled/index.js";
17
18
  import memoTheme from "../utils/memoTheme.js";
19
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
18
20
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
19
21
  import { jsx as _jsx } from "react/jsx-runtime";
20
22
  const useUtilityClasses = ownerState => {
@@ -51,6 +53,7 @@ const RadioRoot = styled(SwitchBase, {
51
53
  variants: [{
52
54
  props: {
53
55
  color: 'default',
56
+ disabled: false,
54
57
  disableRipple: false
55
58
  },
56
59
  style: {
@@ -58,9 +61,10 @@ const RadioRoot = styled(SwitchBase, {
58
61
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
59
62
  }
60
63
  }
61
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
64
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
62
65
  props: {
63
66
  color,
67
+ disabled: false,
64
68
  disableRipple: false
65
69
  },
66
70
  style: {
@@ -68,9 +72,10 @@ const RadioRoot = styled(SwitchBase, {
68
72
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
69
73
  }
70
74
  }
71
- })), ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
75
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
72
76
  props: {
73
- color
77
+ color,
78
+ disabled: false
74
79
  },
75
80
  style: {
76
81
  [`&.${radioClasses.checked}`]: {
@@ -118,11 +123,21 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
118
123
  onChange: onChangeProp,
119
124
  size = 'medium',
120
125
  className,
126
+ disabled: disabledProp,
121
127
  disableRipple = false,
122
128
  ...other
123
129
  } = props;
130
+ const muiFormControl = useFormControl();
131
+ let disabled = disabledProp;
132
+ if (muiFormControl) {
133
+ if (typeof disabled === 'undefined') {
134
+ disabled = muiFormControl.disabled;
135
+ }
136
+ }
137
+ disabled ?? (disabled = false);
124
138
  const ownerState = {
125
139
  ...props,
140
+ disabled,
126
141
  disableRipple,
127
142
  color,
128
143
  size
@@ -148,6 +163,7 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
148
163
  checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {
149
164
  fontSize: defaultCheckedIcon.props.fontSize ?? size
150
165
  }),
166
+ disabled: disabled,
151
167
  ownerState: ownerState,
152
168
  classes: classes,
153
169
  name: name,
@@ -16,6 +16,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
16
16
  import slotShouldForwardProp from "../styles/slotShouldForwardProp.js";
17
17
  import shouldSpreadAdditionalProps from "../utils/shouldSpreadAdditionalProps.js";
18
18
  import capitalize from "../utils/capitalize.js";
19
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
19
20
  import BaseSliderValueLabel from "./SliderValueLabel.js";
20
21
  import sliderClasses, { getSliderUtilityClass } from "./sliderClasses.js";
21
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -54,7 +55,7 @@ export const SliderRoot = styled('span', {
54
55
  transition: 'none'
55
56
  }
56
57
  },
57
- variants: [...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
58
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
58
59
  props: {
59
60
  color
60
61
  },
@@ -210,7 +211,7 @@ export const SliderTrack = styled('span', {
210
211
  style: {
211
212
  display: 'none'
212
213
  }
213
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
214
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
214
215
  props: {
215
216
  color,
216
217
  track: 'inverted'
@@ -309,7 +310,7 @@ export const SliderThumb = styled('span', {
309
310
  left: '50%',
310
311
  transform: 'translate(-50%, 50%)'
311
312
  }
312
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
313
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
313
314
  props: {
314
315
  color
315
316
  },
@@ -104,7 +104,7 @@ const SpeedDialIcon = /*#__PURE__*/React.forwardRef(function SpeedDialIcon(inPro
104
104
  const ownerState = props;
105
105
  const classes = useUtilityClasses(ownerState);
106
106
  function formatIcon(icon, newClassName) {
107
- if ( /*#__PURE__*/React.isValidElement(icon)) {
107
+ if (/*#__PURE__*/React.isValidElement(icon)) {
108
108
  return /*#__PURE__*/React.cloneElement(icon, {
109
109
  className: newClassName
110
110
  });
@@ -82,7 +82,7 @@ const StepButton = /*#__PURE__*/React.forwardRef(function StepButton(inProps, re
82
82
  icon,
83
83
  optional
84
84
  };
85
- const child = isMuiElement(children, ['StepLabel']) ? ( /*#__PURE__*/React.cloneElement(children, childProps)) : /*#__PURE__*/_jsx(StepLabel, {
85
+ const child = isMuiElement(children, ['StepLabel']) ? (/*#__PURE__*/React.cloneElement(children, childProps)) : /*#__PURE__*/_jsx(StepLabel, {
86
86
  ...childProps,
87
87
  children: children
88
88
  });
@@ -8,6 +8,7 @@ import refType from '@mui/utils/refType';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
9
  import { alpha, darken, lighten } from '@mui/system/colorManipulator';
10
10
  import capitalize from "../utils/capitalize.js";
11
+ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
11
12
  import SwitchBase from "../internal/SwitchBase.js";
12
13
  import { styled } from "../zero-styled/index.js";
13
14
  import memoTheme from "../utils/memoTheme.js";
@@ -146,7 +147,7 @@ const SwitchSwitchBase = styled(SwitchBase, {
146
147
  backgroundColor: 'transparent'
147
148
  }
148
149
  },
149
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.light) // check all the used fields in the style below
150
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])) // check all the used fields in the style below
150
151
  .map(([color]) => ({
151
152
  props: {
152
153
  color