@mui/material 5.11.0 → 5.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/Chip/Chip.js +3 -3
  3. package/FilledInput/FilledInput.js +8 -4
  4. package/Input/Input.js +9 -5
  5. package/InputLabel/InputLabel.d.ts +4 -1
  6. package/InputLabel/InputLabel.js +1 -1
  7. package/Popper/Popper.d.ts +1 -1
  8. package/Popper/Popper.js +11 -7
  9. package/Select/SelectInput.js +11 -6
  10. package/Slider/Slider.js +0 -5
  11. package/TableCell/TableCell.js +5 -1
  12. package/index.js +1 -1
  13. package/legacy/Chip/Chip.js +3 -3
  14. package/legacy/FilledInput/FilledInput.js +8 -4
  15. package/legacy/Input/Input.js +9 -5
  16. package/legacy/InputLabel/InputLabel.js +1 -1
  17. package/legacy/Popper/Popper.js +13 -9
  18. package/legacy/Select/SelectInput.js +9 -6
  19. package/legacy/Slider/Slider.js +0 -5
  20. package/legacy/TableCell/TableCell.js +5 -1
  21. package/legacy/index.js +1 -1
  22. package/legacy/locale/index.js +196 -117
  23. package/legacy/styles/index.js +6 -0
  24. package/locale/index.d.ts +2 -1
  25. package/locale/index.js +80 -5
  26. package/modern/Chip/Chip.js +3 -3
  27. package/modern/FilledInput/FilledInput.js +8 -4
  28. package/modern/Input/Input.js +9 -5
  29. package/modern/InputLabel/InputLabel.js +1 -1
  30. package/modern/Popper/Popper.js +11 -7
  31. package/modern/Select/SelectInput.js +7 -6
  32. package/modern/Slider/Slider.js +0 -5
  33. package/modern/TableCell/TableCell.js +5 -1
  34. package/modern/index.js +1 -1
  35. package/modern/locale/index.js +80 -5
  36. package/modern/styles/index.js +6 -0
  37. package/node/Chip/Chip.js +3 -3
  38. package/node/FilledInput/FilledInput.js +8 -4
  39. package/node/Input/Input.js +9 -5
  40. package/node/InputLabel/InputLabel.js +1 -1
  41. package/node/Popper/Popper.js +11 -7
  42. package/node/Select/SelectInput.js +11 -6
  43. package/node/Slider/Slider.js +0 -5
  44. package/node/TableCell/TableCell.js +5 -1
  45. package/node/index.js +1 -1
  46. package/node/locale/index.js +83 -7
  47. package/node/styles/index.js +9 -1
  48. package/package.json +6 -6
  49. package/styles/index.d.ts +3 -0
  50. package/styles/index.js +6 -0
  51. package/umd/material-ui.development.js +3745 -3642
  52. package/umd/material-ui.production.min.js +29 -20
@@ -168,7 +168,7 @@ const ChipRoot = styled('div', {
168
168
  color: (theme.vars || theme).palette[ownerState.color].contrastText
169
169
  }, ownerState.onDelete && {
170
170
  [`&.${chipClasses.focusVisible}`]: {
171
- 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)
171
+ 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)
172
172
  }
173
173
  }, ownerState.onDelete && ownerState.color !== 'default' && {
174
174
  [`&.${chipClasses.focusVisible}`]: {
@@ -183,10 +183,10 @@ const ChipRoot = styled('div', {
183
183
  WebkitTapHighlightColor: 'transparent',
184
184
  cursor: 'pointer',
185
185
  '&:hover': {
186
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
186
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
187
187
  },
188
188
  [`&.${chipClasses.focusVisible}`]: {
189
- 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)
189
+ 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)
190
190
  },
191
191
  '&:active': {
192
192
  boxShadow: (theme.vars || theme).shadows[1]
@@ -86,9 +86,13 @@ const FilledInputRoot = styled(InputBaseRoot, {
86
86
  // See https://github.com/mui/material-ui/issues/31766
87
87
  transform: 'scaleX(1) translateX(0)'
88
88
  },
89
- [`&.${filledInputClasses.error}:after`]: {
90
- borderBottomColor: (theme.vars || theme).palette.error.main,
91
- transform: 'scaleX(1)' // error is always underlined in red
89
+ [`&.${filledInputClasses.error}`]: {
90
+ '&:before, &:after': {
91
+ borderBottomColor: (theme.vars || theme).palette.error.main
92
+ },
93
+ '&:focus-within:after': {
94
+ transform: 'scaleX(1)' // error is always underlined in red
95
+ }
92
96
  },
93
97
 
94
98
  '&:before': {
@@ -105,7 +109,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
105
109
  pointerEvents: 'none' // Transparent to the hover style.
106
110
  },
107
111
 
108
- [`&:hover:not(.${filledInputClasses.disabled}):before`]: {
112
+ [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {
109
113
  borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
110
114
  },
111
115
  [`&.${filledInputClasses.disabled}:before`]: {
@@ -70,9 +70,13 @@ const InputRoot = styled(InputBaseRoot, {
70
70
  // See https://github.com/mui/material-ui/issues/31766
71
71
  transform: 'scaleX(1) translateX(0)'
72
72
  },
73
- [`&.${inputClasses.error}:after`]: {
74
- borderBottomColor: (theme.vars || theme).palette.error.main,
75
- transform: 'scaleX(1)' // error is always underlined in red
73
+ [`&.${inputClasses.error}`]: {
74
+ '&:before, &:after': {
75
+ borderBottomColor: (theme.vars || theme).palette.error.main
76
+ },
77
+ '&:focus-within:after': {
78
+ transform: 'scaleX(1)' // error is always underlined in red
79
+ }
76
80
  },
77
81
 
78
82
  '&:before': {
@@ -89,8 +93,8 @@ const InputRoot = styled(InputBaseRoot, {
89
93
  pointerEvents: 'none' // Transparent to the hover style.
90
94
  },
91
95
 
92
- [`&:hover:not(.${inputClasses.disabled}):before`]: {
93
- borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
96
+ [`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]: {
97
+ borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`,
94
98
  // Reset on touch devices, it doesn't add specificity
95
99
  '@media (hover: none)': {
96
100
  borderBottom: `1px solid ${bottomLineColor}`
@@ -197,7 +197,7 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes
197
197
  * The size of the component.
198
198
  * @default 'normal'
199
199
  */
200
- size: PropTypes.oneOf(['normal', 'small']),
200
+ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]),
201
201
  /**
202
202
  * The system prop that allows defining system overrides as well as additional CSS styles.
203
203
  */
@@ -28,17 +28,17 @@ const PopperRoot = styled(PopperUnstyled, {
28
28
  */
29
29
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
30
30
  const theme = useTheme();
31
- const _useThemeProps = useThemeProps({
32
- props: inProps,
33
- name: 'MuiPopper'
34
- }),
35
- {
31
+ const props = useThemeProps({
32
+ props: inProps,
33
+ name: 'MuiPopper'
34
+ });
35
+ const {
36
36
  components,
37
37
  componentsProps,
38
38
  slots,
39
39
  slotProps
40
- } = _useThemeProps,
41
- other = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
40
+ } = props,
41
+ other = _objectWithoutPropertiesLoose(props, _excluded);
42
42
  const RootComponent = slots?.root ?? components?.Root;
43
43
  return /*#__PURE__*/_jsx(PopperRoot, _extends({
44
44
  direction: theme?.direction,
@@ -129,6 +129,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
129
129
  * If `true`, the component is shown.
130
130
  */
131
131
  open: PropTypes.bool.isRequired,
132
+ /**
133
+ * @ignore
134
+ */
135
+ ownerState: PropTypes.any,
132
136
  /**
133
137
  * Popper placement.
134
138
  * @default 'bottom'
@@ -159,6 +159,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
159
159
  setDisplayNode(node);
160
160
  }
161
161
  }, []);
162
+ const anchorElement = displayNode?.parentNode;
162
163
  React.useImperativeHandle(handleRef, () => ({
163
164
  focus: () => {
164
165
  displayRef.current.focus();
@@ -170,7 +171,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
170
171
  // Resize menu on `defaultOpen` automatic toggle.
171
172
  React.useEffect(() => {
172
173
  if (defaultOpen && openState && displayNode && !isOpenControlled) {
173
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
174
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
174
175
  displayRef.current.focus();
175
176
  }
176
177
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -209,7 +210,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
209
210
  onClose(event);
210
211
  }
211
212
  if (!isOpenControlled) {
212
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
213
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
213
214
  setOpenState(open);
214
215
  }
215
216
  };
@@ -365,7 +366,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
365
366
  if (value) {
366
367
  return selected;
367
368
  }
368
- const firstSelectableElement = arr.find(item => item.props.value !== undefined && item.props.disabled !== true);
369
+ const firstSelectableElement = arr.find(item => item?.props?.value !== undefined && item.props.disabled !== true);
369
370
  if (child === firstSelectableElement) {
370
371
  return true;
371
372
  }
@@ -386,7 +387,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
386
387
  }
387
388
  },
388
389
  role: 'option',
389
- selected: arr[0].props.value === undefined || arr[0].props.disabled === true ? isFirstSelectableElement() : selected,
390
+ selected: arr[0]?.props?.value === undefined || arr[0]?.props?.disabled === true ? isFirstSelectableElement() : selected,
390
391
  value: undefined,
391
392
  // The value is most likely not a valid HTML attribute.
392
393
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -423,7 +424,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
423
424
  // Avoid performing a layout computation in the render method.
424
425
  let menuMinWidth = menuMinWidthState;
425
426
  if (!autoWidth && isOpenControlled && displayNode) {
426
- menuMinWidth = displayNode.clientWidth;
427
+ menuMinWidth = anchorElement.clientWidth;
427
428
  }
428
429
  let tabIndex;
429
430
  if (typeof tabIndexProp !== 'undefined') {
@@ -481,7 +482,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
481
482
  ownerState: ownerState
482
483
  }), /*#__PURE__*/_jsx(Menu, _extends({
483
484
  id: `menu-${name || ''}`,
484
- anchorEl: displayNode,
485
+ anchorEl: anchorElement,
485
486
  open: open,
486
487
  onClose: handleClose,
487
488
  anchorOrigin: {
@@ -619,11 +619,6 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
619
619
  * @returns {string}
620
620
  */
621
621
  getAriaValueText: PropTypes.func,
622
- /**
623
- * Indicates whether the theme context has rtl direction. It is set automatically.
624
- * @default false
625
- */
626
- isRtl: PropTypes.bool,
627
622
  /**
628
623
  * Marks indicate predetermined values to which the user can move the slider.
629
624
  * If `true` the marks are spaced according the value of the `step` prop.
@@ -120,7 +120,11 @@ const TableCell = /*#__PURE__*/React.forwardRef(function TableCell(inProps, ref)
120
120
  component = isHeadCell ? 'th' : 'td';
121
121
  }
122
122
  let scope = scopeProp;
123
- if (!scope && isHeadCell) {
123
+ // scope is not a valid attribute for <td/> elements.
124
+ // source: https://html.spec.whatwg.org/multipage/tables.html#the-td-element
125
+ if (component === 'td') {
126
+ scope = undefined;
127
+ } else if (!scope && isHeadCell) {
124
128
  scope = 'col';
125
129
  }
126
130
  const variant = variantProp || tablelvl2 && tablelvl2.variant;
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.11.0
1
+ /** @license MUI v5.11.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1121,12 +1121,14 @@ export const faIR = {
1121
1121
  // if (type === 'previous') {
1122
1122
  return 'رفتن به صفحه‌ی قبلی';
1123
1123
  },
1124
- labelRowsPerPage: 'تعداد سطرهای هر صفحه:'
1125
- // labelDisplayedRows: ({ from, to, count }) =>
1126
- // `${from}–${to} از ${count !== -1 ? count : `more than ${to}`}`,
1124
+ labelRowsPerPage: 'تعداد سطرهای هر صفحه:',
1125
+ labelDisplayedRows: ({
1126
+ from,
1127
+ to,
1128
+ count
1129
+ }) => `${from}–${to} از ${count !== -1 ? count : `بیشتر از ${to}`}`
1127
1130
  }
1128
1131
  },
1129
-
1130
1132
  MuiRating: {
1131
1133
  defaultProps: {
1132
1134
  getLabelText: value => `${value} ستاره`,
@@ -2124,7 +2126,80 @@ export const koKR = {
2124
2126
  }
2125
2127
  }
2126
2128
  };
2127
- export const kzKZ = {
2129
+ export const kuLatn = {
2130
+ components: {
2131
+ MuiBreadcrumbs: {
2132
+ defaultProps: {
2133
+ expandText: 'Rê nîşan bide'
2134
+ }
2135
+ },
2136
+ MuiTablePagination: {
2137
+ defaultProps: {
2138
+ getItemAriaLabel: type => {
2139
+ if (type === 'first') {
2140
+ return 'Biçe rûpela yekem';
2141
+ }
2142
+ if (type === 'last') {
2143
+ return 'Biçe rûpela dawî';
2144
+ }
2145
+ if (type === 'next') {
2146
+ return 'Biçe rûpela din';
2147
+ }
2148
+ // if (type === 'previous') {
2149
+ return 'Biçe rûpela berê';
2150
+ },
2151
+ labelRowsPerPage: 'Rêz li ser rûpelê:',
2152
+ labelDisplayedRows: ({
2153
+ from,
2154
+ to,
2155
+ count
2156
+ }) => `${from}–${to} of ${count !== -1 ? count : `zêdetir ji ${to}`}`
2157
+ }
2158
+ },
2159
+ MuiRating: {
2160
+ defaultProps: {
2161
+ getLabelText: value => `${value} Stêrk`,
2162
+ emptyLabelText: 'Vala'
2163
+ }
2164
+ },
2165
+ MuiAutocomplete: {
2166
+ defaultProps: {
2167
+ clearText: 'Paqij bike',
2168
+ closeText: 'Bigre',
2169
+ loadingText: 'Tê barkirin…',
2170
+ noOptionsText: 'Vebijêrk tune',
2171
+ openText: 'Veke'
2172
+ }
2173
+ },
2174
+ MuiAlert: {
2175
+ defaultProps: {
2176
+ closeText: 'Bigre'
2177
+ }
2178
+ },
2179
+ MuiPagination: {
2180
+ defaultProps: {
2181
+ 'aria-label': 'Navîgasyona rûpelan',
2182
+ getItemAriaLabel: (type, page, selected) => {
2183
+ if (type === 'page') {
2184
+ return `${selected ? '' : 'Biçe '}rûpel ${page}`;
2185
+ }
2186
+ if (type === 'first') {
2187
+ return 'Biçe rûpela yekem';
2188
+ }
2189
+ if (type === 'last') {
2190
+ return 'Biçe rûpela dawî';
2191
+ }
2192
+ if (type === 'next') {
2193
+ return 'Biçe rûpela din';
2194
+ }
2195
+ // if (type === 'previous') {
2196
+ return 'Biçe rûpela berê';
2197
+ }
2198
+ }
2199
+ }
2200
+ }
2201
+ };
2202
+ export const kkKZ = {
2128
2203
  components: {
2129
2204
  MuiBreadcrumbs: {
2130
2205
  defaultProps: {
@@ -1,5 +1,11 @@
1
+ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
1
2
  export { default as adaptV4Theme } from './adaptV4Theme';
2
3
  export { hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, alpha, darken, lighten, css, keyframes } from '@mui/system';
4
+ // TODO: Remove this function in v6.
5
+ // eslint-disable-next-line @typescript-eslint/naming-convention
6
+ export function experimental_sx() {
7
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`experimental_sx\` has been moved to \`theme.unstable_sx\`.For more details, see https://github.com/mui/material-ui/pull/35150.` : _formatMuiErrorMessage(20));
8
+ }
3
9
  export { default as createTheme, createMuiTheme } from './createTheme';
4
10
  export { default as unstable_createMuiStrictModeTheme } from './createMuiStrictModeTheme';
5
11
  export { default as createStyles } from './createStyles';
package/node/Chip/Chip.js CHANGED
@@ -176,7 +176,7 @@ const ChipRoot = (0, _styled.default)('div', {
176
176
  color: (theme.vars || theme).palette[ownerState.color].contrastText
177
177
  }, ownerState.onDelete && {
178
178
  [`&.${_chipClasses.default.focusVisible}`]: {
179
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
179
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
180
180
  }
181
181
  }, ownerState.onDelete && ownerState.color !== 'default' && {
182
182
  [`&.${_chipClasses.default.focusVisible}`]: {
@@ -191,10 +191,10 @@ const ChipRoot = (0, _styled.default)('div', {
191
191
  WebkitTapHighlightColor: 'transparent',
192
192
  cursor: 'pointer',
193
193
  '&:hover': {
194
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
194
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
195
195
  },
196
196
  [`&.${_chipClasses.default.focusVisible}`]: {
197
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
197
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : (0, _system.alpha)(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
198
198
  },
199
199
  '&:active': {
200
200
  boxShadow: (theme.vars || theme).shadows[1]
@@ -96,9 +96,13 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
96
96
  // See https://github.com/mui/material-ui/issues/31766
97
97
  transform: 'scaleX(1) translateX(0)'
98
98
  },
99
- [`&.${_filledInputClasses.default.error}:after`]: {
100
- borderBottomColor: (theme.vars || theme).palette.error.main,
101
- transform: 'scaleX(1)' // error is always underlined in red
99
+ [`&.${_filledInputClasses.default.error}`]: {
100
+ '&:before, &:after': {
101
+ borderBottomColor: (theme.vars || theme).palette.error.main
102
+ },
103
+ '&:focus-within:after': {
104
+ transform: 'scaleX(1)' // error is always underlined in red
105
+ }
102
106
  },
103
107
 
104
108
  '&:before': {
@@ -115,7 +119,7 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
115
119
  pointerEvents: 'none' // Transparent to the hover style.
116
120
  },
117
121
 
118
- [`&:hover:not(.${_filledInputClasses.default.disabled}):before`]: {
122
+ [`&:hover:not(.${_filledInputClasses.default.disabled}, .${_filledInputClasses.default.error}):before`]: {
119
123
  borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
120
124
  },
121
125
  [`&.${_filledInputClasses.default.disabled}:before`]: {
@@ -79,9 +79,13 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
79
79
  // See https://github.com/mui/material-ui/issues/31766
80
80
  transform: 'scaleX(1) translateX(0)'
81
81
  },
82
- [`&.${_inputClasses.default.error}:after`]: {
83
- borderBottomColor: (theme.vars || theme).palette.error.main,
84
- transform: 'scaleX(1)' // error is always underlined in red
82
+ [`&.${_inputClasses.default.error}`]: {
83
+ '&:before, &:after': {
84
+ borderBottomColor: (theme.vars || theme).palette.error.main
85
+ },
86
+ '&:focus-within:after': {
87
+ transform: 'scaleX(1)' // error is always underlined in red
88
+ }
85
89
  },
86
90
 
87
91
  '&:before': {
@@ -98,8 +102,8 @@ const InputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
98
102
  pointerEvents: 'none' // Transparent to the hover style.
99
103
  },
100
104
 
101
- [`&:hover:not(.${_inputClasses.default.disabled}):before`]: {
102
- borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
105
+ [`&:hover:not(.${_inputClasses.default.disabled}, .${_inputClasses.default.error}):before`]: {
106
+ borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`,
103
107
  // Reset on touch devices, it doesn't add specificity
104
108
  '@media (hover: none)': {
105
109
  borderBottom: `1px solid ${bottomLineColor}`
@@ -206,7 +206,7 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes
206
206
  * The size of the component.
207
207
  * @default 'normal'
208
208
  */
209
- size: _propTypes.default.oneOf(['normal', 'small']),
209
+ size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['normal', 'small']), _propTypes.default.string]),
210
210
  /**
211
211
  * The system prop that allows defining system overrides as well as additional CSS styles.
212
212
  */
@@ -38,17 +38,17 @@ const PopperRoot = (0, _styles.styled)(_PopperUnstyled.default, {
38
38
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
39
39
  var _slots$root;
40
40
  const theme = (0, _system.useThemeWithoutDefault)();
41
- const _useThemeProps = (0, _styles.useThemeProps)({
42
- props: inProps,
43
- name: 'MuiPopper'
44
- }),
45
- {
41
+ const props = (0, _styles.useThemeProps)({
42
+ props: inProps,
43
+ name: 'MuiPopper'
44
+ });
45
+ const {
46
46
  components,
47
47
  componentsProps,
48
48
  slots,
49
49
  slotProps
50
- } = _useThemeProps,
51
- other = (0, _objectWithoutPropertiesLoose2.default)(_useThemeProps, _excluded);
50
+ } = props,
51
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
52
52
  const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
53
53
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(PopperRoot, (0, _extends2.default)({
54
54
  direction: theme == null ? void 0 : theme.direction,
@@ -139,6 +139,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
139
139
  * If `true`, the component is shown.
140
140
  */
141
141
  open: _propTypes.default.bool.isRequired,
142
+ /**
143
+ * @ignore
144
+ */
145
+ ownerState: _propTypes.default.any,
142
146
  /**
143
147
  * Popper placement.
144
148
  * @default 'bottom'
@@ -166,6 +166,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
166
166
  setDisplayNode(node);
167
167
  }
168
168
  }, []);
169
+ const anchorElement = displayNode == null ? void 0 : displayNode.parentNode;
169
170
  React.useImperativeHandle(handleRef, () => ({
170
171
  focus: () => {
171
172
  displayRef.current.focus();
@@ -177,7 +178,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
177
178
  // Resize menu on `defaultOpen` automatic toggle.
178
179
  React.useEffect(() => {
179
180
  if (defaultOpen && openState && displayNode && !isOpenControlled) {
180
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
181
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
181
182
  displayRef.current.focus();
182
183
  }
183
184
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -216,7 +217,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
216
217
  onClose(event);
217
218
  }
218
219
  if (!isOpenControlled) {
219
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
220
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
220
221
  setOpenState(open);
221
222
  }
222
223
  };
@@ -336,6 +337,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
336
337
  }
337
338
  }
338
339
  const items = childrenArray.map((child, index, arr) => {
340
+ var _arr$, _arr$$props, _arr$2, _arr$2$props;
339
341
  if (! /*#__PURE__*/React.isValidElement(child)) {
340
342
  return null;
341
343
  }
@@ -372,7 +374,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
372
374
  if (value) {
373
375
  return selected;
374
376
  }
375
- const firstSelectableElement = arr.find(item => item.props.value !== undefined && item.props.disabled !== true);
377
+ const firstSelectableElement = arr.find(item => {
378
+ var _item$props;
379
+ return (item == null ? void 0 : (_item$props = item.props) == null ? void 0 : _item$props.value) !== undefined && item.props.disabled !== true;
380
+ });
376
381
  if (child === firstSelectableElement) {
377
382
  return true;
378
383
  }
@@ -393,7 +398,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
393
398
  }
394
399
  },
395
400
  role: 'option',
396
- selected: arr[0].props.value === undefined || arr[0].props.disabled === true ? isFirstSelectableElement() : selected,
401
+ selected: ((_arr$ = arr[0]) == null ? void 0 : (_arr$$props = _arr$.props) == null ? void 0 : _arr$$props.value) === undefined || ((_arr$2 = arr[0]) == null ? void 0 : (_arr$2$props = _arr$2.props) == null ? void 0 : _arr$2$props.disabled) === true ? isFirstSelectableElement() : selected,
397
402
  value: undefined,
398
403
  // The value is most likely not a valid HTML attribute.
399
404
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -430,7 +435,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
430
435
  // Avoid performing a layout computation in the render method.
431
436
  let menuMinWidth = menuMinWidthState;
432
437
  if (!autoWidth && isOpenControlled && displayNode) {
433
- menuMinWidth = displayNode.clientWidth;
438
+ menuMinWidth = anchorElement.clientWidth;
434
439
  }
435
440
  let tabIndex;
436
441
  if (typeof tabIndexProp !== 'undefined') {
@@ -488,7 +493,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
488
493
  ownerState: ownerState
489
494
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, (0, _extends2.default)({
490
495
  id: `menu-${name || ''}`,
491
- anchorEl: displayNode,
496
+ anchorEl: anchorElement,
492
497
  open: open,
493
498
  onClose: handleClose,
494
499
  anchorOrigin: {
@@ -630,11 +630,6 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
630
630
  * @returns {string}
631
631
  */
632
632
  getAriaValueText: _propTypes.default.func,
633
- /**
634
- * Indicates whether the theme context has rtl direction. It is set automatically.
635
- * @default false
636
- */
637
- isRtl: _propTypes.default.bool,
638
633
  /**
639
634
  * Marks indicate predetermined values to which the user can move the slider.
640
635
  * If `true` the marks are spaced according the value of the `step` prop.
@@ -129,7 +129,11 @@ const TableCell = /*#__PURE__*/React.forwardRef(function TableCell(inProps, ref)
129
129
  component = isHeadCell ? 'th' : 'td';
130
130
  }
131
131
  let scope = scopeProp;
132
- if (!scope && isHeadCell) {
132
+ // scope is not a valid attribute for <td/> elements.
133
+ // source: https://html.spec.whatwg.org/multipage/tables.html#the-td-element
134
+ if (component === 'td') {
135
+ scope = undefined;
136
+ } else if (!scope && isHeadCell) {
133
137
  scope = 'col';
134
138
  }
135
139
  const variant = variantProp || tablelvl2 && tablelvl2.variant;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.11.0
1
+ /** @license MUI v5.11.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.