@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.
- package/CHANGELOG.md +127 -0
- package/Chip/Chip.js +3 -3
- package/FilledInput/FilledInput.js +8 -4
- package/Input/Input.js +9 -5
- package/InputLabel/InputLabel.d.ts +4 -1
- package/InputLabel/InputLabel.js +1 -1
- package/Popper/Popper.d.ts +1 -1
- package/Popper/Popper.js +11 -7
- package/Select/SelectInput.js +11 -6
- package/Slider/Slider.js +0 -5
- package/TableCell/TableCell.js +5 -1
- package/index.js +1 -1
- package/legacy/Chip/Chip.js +3 -3
- package/legacy/FilledInput/FilledInput.js +8 -4
- package/legacy/Input/Input.js +9 -5
- package/legacy/InputLabel/InputLabel.js +1 -1
- package/legacy/Popper/Popper.js +13 -9
- package/legacy/Select/SelectInput.js +9 -6
- package/legacy/Slider/Slider.js +0 -5
- package/legacy/TableCell/TableCell.js +5 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +196 -117
- package/legacy/styles/index.js +6 -0
- package/locale/index.d.ts +2 -1
- package/locale/index.js +80 -5
- package/modern/Chip/Chip.js +3 -3
- package/modern/FilledInput/FilledInput.js +8 -4
- package/modern/Input/Input.js +9 -5
- package/modern/InputLabel/InputLabel.js +1 -1
- package/modern/Popper/Popper.js +11 -7
- package/modern/Select/SelectInput.js +7 -6
- package/modern/Slider/Slider.js +0 -5
- package/modern/TableCell/TableCell.js +5 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +80 -5
- package/modern/styles/index.js +6 -0
- package/node/Chip/Chip.js +3 -3
- package/node/FilledInput/FilledInput.js +8 -4
- package/node/Input/Input.js +9 -5
- package/node/InputLabel/InputLabel.js +1 -1
- package/node/Popper/Popper.js +11 -7
- package/node/Select/SelectInput.js +11 -6
- package/node/Slider/Slider.js +0 -5
- package/node/TableCell/TableCell.js +5 -1
- package/node/index.js +1 -1
- package/node/locale/index.js +83 -7
- package/node/styles/index.js +9 -1
- package/package.json +6 -6
- package/styles/index.d.ts +3 -0
- package/styles/index.js +6 -0
- package/umd/material-ui.development.js +3745 -3642
- package/umd/material-ui.production.min.js +29 -20
package/modern/Chip/Chip.js
CHANGED
|
@@ -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}
|
|
90
|
-
|
|
91
|
-
|
|
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`]: {
|
package/modern/Input/Input.js
CHANGED
|
@@ -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}
|
|
74
|
-
|
|
75
|
-
|
|
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: `
|
|
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
|
*/
|
package/modern/Popper/Popper.js
CHANGED
|
@@ -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
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
} =
|
|
41
|
-
other = _objectWithoutPropertiesLoose(
|
|
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 :
|
|
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 :
|
|
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
|
|
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]
|
|
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 =
|
|
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:
|
|
485
|
+
anchorEl: anchorElement,
|
|
485
486
|
open: open,
|
|
486
487
|
onClose: handleClose,
|
|
487
488
|
anchorOrigin: {
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -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
|
-
|
|
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
package/modern/locale/index.js
CHANGED
|
@@ -1121,12 +1121,14 @@ export const faIR = {
|
|
|
1121
1121
|
// if (type === 'previous') {
|
|
1122
1122
|
return 'رفتن به صفحهی قبلی';
|
|
1123
1123
|
},
|
|
1124
|
-
labelRowsPerPage: 'تعداد سطرهای هر صفحه:'
|
|
1125
|
-
|
|
1126
|
-
|
|
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
|
|
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: {
|
package/modern/styles/index.js
CHANGED
|
@@ -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}
|
|
100
|
-
|
|
101
|
-
|
|
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`]: {
|
package/node/Input/Input.js
CHANGED
|
@@ -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}
|
|
83
|
-
|
|
84
|
-
|
|
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: `
|
|
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
|
*/
|
package/node/Popper/Popper.js
CHANGED
|
@@ -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
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
} =
|
|
51
|
-
other = (0, _objectWithoutPropertiesLoose2.default)(
|
|
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 :
|
|
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 :
|
|
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 =>
|
|
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]
|
|
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 =
|
|
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:
|
|
496
|
+
anchorEl: anchorElement,
|
|
492
497
|
open: open,
|
|
493
498
|
onClose: handleClose,
|
|
494
499
|
anchorOrigin: {
|
package/node/Slider/Slider.js
CHANGED
|
@@ -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
|
-
|
|
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