@mui/material 5.7.0 → 5.8.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/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/Alert.js +1 -0
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.d.ts +23 -1
- package/Autocomplete/Autocomplete.js +3 -2
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.d.ts +1 -34
- package/Badge/badgeClasses.d.ts +56 -24
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Box/Box.js +1 -1
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/TouchRipple.js +5 -5
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +201 -4
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/Container.js +17 -106
- package/Container/containerClasses.d.ts +6 -22
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/Fab.js +3 -1
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Grow/Grow.js +4 -3
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/InputLabel.d.ts +5 -0
- package/InputLabel/InputLabel.js +6 -0
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.js +7 -1
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MenuList/MenuList.d.ts +1 -1
- package/MenuList/MenuList.js +1 -1
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/Paper.js +20 -15
- package/Paper/index.d.ts +1 -1
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +29 -29
- package/README.md +2 -1
- package/Radio/Radio.js +4 -4
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/SelectInput.js +2 -2
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.js +1 -5
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/Tabs.js +2 -2
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +1 -1
- package/className/index.js +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Alert/Alert.js +1 -0
- package/legacy/Autocomplete/Autocomplete.js +3 -2
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Box/Box.js +1 -1
- package/legacy/ButtonBase/TouchRipple.js +5 -5
- package/legacy/Container/Container.js +18 -103
- package/legacy/Fab/Fab.js +3 -1
- package/legacy/Grow/Grow.js +4 -3
- package/legacy/InputLabel/InputLabel.js +6 -0
- package/legacy/ListItemButton/ListItemButton.js +7 -1
- package/legacy/MenuList/MenuList.js +1 -1
- package/legacy/Paper/Paper.js +10 -7
- package/legacy/Radio/Radio.js +4 -4
- package/legacy/Select/SelectInput.js +2 -2
- package/legacy/Slider/Slider.js +1 -10
- package/legacy/Tabs/Tabs.js +2 -2
- package/legacy/className/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +22 -22
- package/legacy/styles/createMixins.js +5 -3
- package/legacy/styles/createTheme.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +22 -3
- package/locale/index.d.ts +71 -71
- package/locale/index.js +22 -22
- package/modern/Alert/Alert.js +1 -0
- package/modern/Autocomplete/Autocomplete.js +3 -2
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Box/Box.js +1 -1
- package/modern/ButtonBase/TouchRipple.js +5 -5
- package/modern/Container/Container.js +17 -106
- package/modern/Fab/Fab.js +3 -1
- package/modern/Grow/Grow.js +4 -3
- package/modern/InputLabel/InputLabel.js +6 -0
- package/modern/ListItemButton/ListItemButton.js +7 -1
- package/modern/MenuList/MenuList.js +1 -1
- package/modern/Paper/Paper.js +8 -7
- package/modern/Radio/Radio.js +4 -4
- package/modern/Select/SelectInput.js +2 -2
- package/modern/Slider/Slider.js +1 -5
- package/modern/Tabs/Tabs.js +2 -2
- package/modern/className/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +22 -22
- package/modern/styles/createMixins.js +5 -3
- package/modern/styles/createTheme.js +1 -1
- package/modern/styles/experimental_extendTheme.js +18 -2
- package/node/Alert/Alert.js +1 -0
- package/node/Autocomplete/Autocomplete.js +4 -2
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Box/Box.js +2 -2
- package/node/ButtonBase/TouchRipple.js +5 -5
- package/node/Container/Container.js +17 -113
- package/node/Fab/Fab.js +3 -1
- package/node/Grow/Grow.js +4 -3
- package/node/InputLabel/InputLabel.js +6 -0
- package/node/ListItemButton/ListItemButton.js +7 -1
- package/node/MenuList/MenuList.js +1 -1
- package/node/Paper/Paper.js +22 -14
- package/node/Radio/Radio.js +4 -4
- package/node/Select/SelectInput.js +2 -2
- package/node/Slider/Slider.js +1 -5
- package/node/Tabs/Tabs.js +2 -2
- package/node/className/index.js +2 -2
- package/node/index.js +1 -1
- package/node/locale/index.js +22 -22
- package/node/styles/createMixins.js +5 -3
- package/node/styles/createTheme.js +1 -1
- package/node/styles/experimental_extendTheme.js +20 -3
- package/package.json +5 -6
- package/styles/createMixins.d.ts +2 -6
- package/styles/createMixins.js +5 -3
- package/styles/createPalette.d.ts +1 -1
- package/styles/createTheme.js +1 -1
- package/styles/experimental_extendTheme.d.ts +30 -0
- package/styles/experimental_extendTheme.js +19 -3
- package/styles/index.d.ts +1 -0
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +697 -585
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/darkScrollbar/index.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export default function darkScrollbar(options?: {
|
|
2
|
-
track: string;
|
|
3
|
-
thumb: string;
|
|
4
|
-
active: string;
|
|
5
|
-
}): {
|
|
6
|
-
scrollbarColor: string;
|
|
7
|
-
'&::-webkit-scrollbar, & *::-webkit-scrollbar': {
|
|
8
|
-
backgroundColor: string;
|
|
9
|
-
};
|
|
10
|
-
'&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
|
|
11
|
-
borderRadius: number;
|
|
12
|
-
backgroundColor: string;
|
|
13
|
-
minHeight: number;
|
|
14
|
-
border: string;
|
|
15
|
-
};
|
|
16
|
-
'&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus': {
|
|
17
|
-
backgroundColor: string;
|
|
18
|
-
};
|
|
19
|
-
'&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active': {
|
|
20
|
-
backgroundColor: string;
|
|
21
|
-
};
|
|
22
|
-
'&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover': {
|
|
23
|
-
backgroundColor: string;
|
|
24
|
-
};
|
|
25
|
-
'&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner': {
|
|
26
|
-
backgroundColor: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
1
|
+
export default function darkScrollbar(options?: {
|
|
2
|
+
track: string;
|
|
3
|
+
thumb: string;
|
|
4
|
+
active: string;
|
|
5
|
+
}): {
|
|
6
|
+
scrollbarColor: string;
|
|
7
|
+
'&::-webkit-scrollbar, & *::-webkit-scrollbar': {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
};
|
|
10
|
+
'&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
|
|
11
|
+
borderRadius: number;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
minHeight: number;
|
|
14
|
+
border: string;
|
|
15
|
+
};
|
|
16
|
+
'&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus': {
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
};
|
|
19
|
+
'&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active': {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
};
|
|
22
|
+
'&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover': {
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
};
|
|
25
|
+
'&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner': {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface SwitchBaseClasses {
|
|
2
|
-
root: string;
|
|
3
|
-
checked: string;
|
|
4
|
-
disabled: string;
|
|
5
|
-
input: string;
|
|
6
|
-
edgeStart: string;
|
|
7
|
-
edgeEnd: string;
|
|
8
|
-
}
|
|
9
|
-
export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
|
|
10
|
-
export declare function getSwitchBaseUtilityClass(slot: string): string;
|
|
11
|
-
declare const switchBaseClasses: SwitchBaseClasses;
|
|
12
|
-
export default switchBaseClasses;
|
|
1
|
+
export interface SwitchBaseClasses {
|
|
2
|
+
root: string;
|
|
3
|
+
checked: string;
|
|
4
|
+
disabled: string;
|
|
5
|
+
input: string;
|
|
6
|
+
edgeStart: string;
|
|
7
|
+
edgeEnd: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
|
|
10
|
+
export declare function getSwitchBaseUtilityClass(slot: string): string;
|
|
11
|
+
declare const switchBaseClasses: SwitchBaseClasses;
|
|
12
|
+
export default switchBaseClasses;
|
package/legacy/Alert/Alert.js
CHANGED
|
@@ -166,6 +166,7 @@ var Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
166
166
|
className: classes.message,
|
|
167
167
|
children: children
|
|
168
168
|
}), action != null ? /*#__PURE__*/_jsx(AlertAction, {
|
|
169
|
+
ownerState: ownerState,
|
|
169
170
|
className: classes.action,
|
|
170
171
|
children: action
|
|
171
172
|
}) : null, action == null && onClose ? /*#__PURE__*/_jsx(AlertAction, {
|
|
@@ -458,7 +458,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
458
458
|
groupedOptions = _useAutocomplete.groupedOptions;
|
|
459
459
|
|
|
460
460
|
var hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
|
|
461
|
-
var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
|
|
461
|
+
var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false; // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
|
|
462
462
|
|
|
463
463
|
var ownerState = _extends({}, props, {
|
|
464
464
|
disablePortal: disablePortal,
|
|
@@ -483,7 +483,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
483
483
|
};
|
|
484
484
|
|
|
485
485
|
if (renderTags) {
|
|
486
|
-
startAdornment = renderTags(value, getCustomizedTagProps);
|
|
486
|
+
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
|
|
487
487
|
} else {
|
|
488
488
|
startAdornment = value.map(function (option, index) {
|
|
489
489
|
return /*#__PURE__*/_jsx(Chip, _extends({
|
|
@@ -1068,6 +1068,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
1068
1068
|
*
|
|
1069
1069
|
* @param {T[]} value The `value` provided to the component.
|
|
1070
1070
|
* @param {function} getTagProps A tag props getter.
|
|
1071
|
+
* @param {object} ownerState The state of the Autocomplete component.
|
|
1071
1072
|
* @returns {ReactNode}
|
|
1072
1073
|
*/
|
|
1073
1074
|
renderTags: PropTypes.func,
|
|
File without changes
|
package/legacy/Box/Box.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { createBox } from '@mui/system';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { unstable_ClassNameGenerator as ClassNameGenerator } from '../className';
|
|
4
4
|
import { createTheme } from '../styles';
|
|
5
5
|
var defaultTheme = createTheme();
|
|
@@ -133,12 +133,12 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
133
133
|
_options$fakeElement = options.fakeElement,
|
|
134
134
|
fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;
|
|
135
135
|
|
|
136
|
-
if (event.type === 'mousedown' && ignoringMouseDown.current) {
|
|
136
|
+
if ((event == null ? void 0 : event.type) === 'mousedown' && ignoringMouseDown.current) {
|
|
137
137
|
ignoringMouseDown.current = false;
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
if (event.type === 'touchstart') {
|
|
141
|
+
if ((event == null ? void 0 : event.type) === 'touchstart') {
|
|
142
142
|
ignoringMouseDown.current = true;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -154,7 +154,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
154
154
|
var rippleY;
|
|
155
155
|
var rippleSize;
|
|
156
156
|
|
|
157
|
-
if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
|
|
157
|
+
if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
|
|
158
158
|
rippleX = Math.round(rect.width / 2);
|
|
159
159
|
rippleY = Math.round(rect.height / 2);
|
|
160
160
|
} else {
|
|
@@ -179,7 +179,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
179
179
|
} // Touche devices
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
if (event.touches) {
|
|
182
|
+
if (event != null && event.touches) {
|
|
183
183
|
// check that this isn't another touchstart due to multitouch
|
|
184
184
|
// otherwise we will only clear a single timer when unmounting while two
|
|
185
185
|
// are running
|
|
@@ -222,7 +222,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
222
222
|
clearTimeout(startTimer.current); // The touch interaction occurs too quickly.
|
|
223
223
|
// We still want to show ripple effect.
|
|
224
224
|
|
|
225
|
-
if (event.type === 'touchend' && startTimerCommit.current) {
|
|
225
|
+
if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
|
|
226
226
|
startTimerCommit.current();
|
|
227
227
|
startTimerCommit.current = null;
|
|
228
228
|
startTimer.current = setTimeout(function () {
|
|
@@ -1,104 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import * as React from 'react';
|
|
1
|
+
/* eslint-disable material-ui/mui-name-matches-component-name */
|
|
5
2
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
9
|
-
import styled from '../styles/styled';
|
|
10
|
-
import { getContainerUtilityClass } from './containerClasses';
|
|
3
|
+
import { createContainer } from '@mui/system';
|
|
11
4
|
import capitalize from '../utils/capitalize';
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
return composeClasses(slots, getContainerUtilityClass, classes);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var ContainerRoot = styled('div', {
|
|
26
|
-
name: 'MuiContainer',
|
|
27
|
-
slot: 'Root',
|
|
28
|
-
overridesResolver: function overridesResolver(props, styles) {
|
|
29
|
-
var ownerState = props.ownerState;
|
|
30
|
-
return [styles.root, styles["maxWidth".concat(capitalize(String(ownerState.maxWidth)))], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
31
|
-
}
|
|
32
|
-
})(function (_ref) {
|
|
33
|
-
var theme = _ref.theme,
|
|
34
|
-
ownerState = _ref.ownerState;
|
|
35
|
-
return _extends({
|
|
36
|
-
width: '100%',
|
|
37
|
-
marginLeft: 'auto',
|
|
38
|
-
boxSizing: 'border-box',
|
|
39
|
-
marginRight: 'auto',
|
|
40
|
-
display: 'block'
|
|
41
|
-
}, !ownerState.disableGutters && _defineProperty({
|
|
42
|
-
paddingLeft: theme.spacing(2),
|
|
43
|
-
paddingRight: theme.spacing(2)
|
|
44
|
-
}, theme.breakpoints.up('sm'), {
|
|
45
|
-
paddingLeft: theme.spacing(3),
|
|
46
|
-
paddingRight: theme.spacing(3)
|
|
47
|
-
}));
|
|
48
|
-
}, function (_ref3) {
|
|
49
|
-
var theme = _ref3.theme,
|
|
50
|
-
ownerState = _ref3.ownerState;
|
|
51
|
-
return ownerState.fixed && Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {
|
|
52
|
-
var value = theme.breakpoints.values[breakpoint];
|
|
53
|
-
|
|
54
|
-
if (value !== 0) {
|
|
55
|
-
acc[theme.breakpoints.up(breakpoint)] = {
|
|
56
|
-
maxWidth: "".concat(value).concat(theme.breakpoints.unit)
|
|
57
|
-
};
|
|
5
|
+
import styled from '../styles/styled';
|
|
6
|
+
import _useThemeProps from '../styles/useThemeProps';
|
|
7
|
+
var Container = createContainer({
|
|
8
|
+
createStyledComponent: styled('div', {
|
|
9
|
+
name: 'MuiContainer',
|
|
10
|
+
slot: 'Root',
|
|
11
|
+
overridesResolver: function overridesResolver(props, styles) {
|
|
12
|
+
var ownerState = props.ownerState;
|
|
13
|
+
return [styles.root, styles["maxWidth".concat(capitalize(String(ownerState.maxWidth)))], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
58
14
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
maxWidth: Math.max(theme.breakpoints.values.xs, 444)
|
|
67
|
-
}), ownerState.maxWidth && ownerState.maxWidth !== 'xs' && _defineProperty({}, theme.breakpoints.up(ownerState.maxWidth), {
|
|
68
|
-
maxWidth: "".concat(theme.breakpoints.values[ownerState.maxWidth]).concat(theme.breakpoints.unit)
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
71
|
-
var Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
|
|
72
|
-
var props = useThemeProps({
|
|
73
|
-
props: inProps,
|
|
74
|
-
name: 'MuiContainer'
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
var className = props.className,
|
|
78
|
-
_props$component = props.component,
|
|
79
|
-
component = _props$component === void 0 ? 'div' : _props$component,
|
|
80
|
-
_props$disableGutters = props.disableGutters,
|
|
81
|
-
disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
|
82
|
-
_props$fixed = props.fixed,
|
|
83
|
-
fixed = _props$fixed === void 0 ? false : _props$fixed,
|
|
84
|
-
_props$maxWidth = props.maxWidth,
|
|
85
|
-
maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,
|
|
86
|
-
other = _objectWithoutProperties(props, ["className", "component", "disableGutters", "fixed", "maxWidth"]);
|
|
87
|
-
|
|
88
|
-
var ownerState = _extends({}, props, {
|
|
89
|
-
component: component,
|
|
90
|
-
disableGutters: disableGutters,
|
|
91
|
-
fixed: fixed,
|
|
92
|
-
maxWidth: maxWidth
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
var classes = useUtilityClasses(ownerState);
|
|
96
|
-
return /*#__PURE__*/_jsx(ContainerRoot, _extends({
|
|
97
|
-
as: component,
|
|
98
|
-
ownerState: ownerState,
|
|
99
|
-
className: clsx(classes.root, className),
|
|
100
|
-
ref: ref
|
|
101
|
-
}, other));
|
|
15
|
+
}),
|
|
16
|
+
useThemeProps: function useThemeProps(inProps) {
|
|
17
|
+
return _useThemeProps({
|
|
18
|
+
props: inProps,
|
|
19
|
+
name: 'MuiContainer'
|
|
20
|
+
});
|
|
21
|
+
}
|
|
102
22
|
});
|
|
103
23
|
process.env.NODE_ENV !== "production" ? Container.propTypes
|
|
104
24
|
/* remove-proptypes */
|
|
@@ -118,11 +38,6 @@ process.env.NODE_ENV !== "production" ? Container.propTypes
|
|
|
118
38
|
*/
|
|
119
39
|
classes: PropTypes.object,
|
|
120
40
|
|
|
121
|
-
/**
|
|
122
|
-
* @ignore
|
|
123
|
-
*/
|
|
124
|
-
className: PropTypes.string,
|
|
125
|
-
|
|
126
41
|
/**
|
|
127
42
|
* The component used for the root node.
|
|
128
43
|
* Either a string to use a HTML element or a component.
|
package/legacy/Fab/Fab.js
CHANGED
|
@@ -183,7 +183,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
|
|
|
183
183
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
184
184
|
* @default 'default'
|
|
185
185
|
*/
|
|
186
|
-
color: PropTypes
|
|
186
|
+
color: PropTypes
|
|
187
|
+
/* @typescript-to-proptypes-ignore */
|
|
188
|
+
.oneOfType([PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
|
|
187
189
|
|
|
188
190
|
/**
|
|
189
191
|
* The component used for the root node.
|
package/legacy/Grow/Grow.js
CHANGED
|
@@ -23,9 +23,10 @@ var styles = {
|
|
|
23
23
|
transform: 'none'
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/*
|
|
27
|
+
TODO v6: remove
|
|
28
|
+
Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
|
|
29
|
+
Remove this workaround once the WebKit bug fix is released.
|
|
29
30
|
*/
|
|
30
31
|
|
|
31
32
|
var isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);
|
|
@@ -207,6 +207,12 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
|
|
|
207
207
|
*/
|
|
208
208
|
shrink: PropTypes.bool,
|
|
209
209
|
|
|
210
|
+
/**
|
|
211
|
+
* The size of the component.
|
|
212
|
+
* @default 'normal'
|
|
213
|
+
*/
|
|
214
|
+
size: PropTypes.oneOf(['normal', 'small']),
|
|
215
|
+
|
|
210
216
|
/**
|
|
211
217
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
212
218
|
*/
|
|
@@ -151,7 +151,8 @@ var ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inPro
|
|
|
151
151
|
value: childContext,
|
|
152
152
|
children: /*#__PURE__*/_jsx(ListItemButtonRoot, _extends({
|
|
153
153
|
ref: handleRef,
|
|
154
|
-
|
|
154
|
+
href: other.href || other.to,
|
|
155
|
+
component: (other.href || other.to) && component === 'div' ? 'a' : component,
|
|
155
156
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
156
157
|
ownerState: ownerState
|
|
157
158
|
}, other, {
|
|
@@ -233,6 +234,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
|
|
|
233
234
|
*/
|
|
234
235
|
focusVisibleClassName: PropTypes.string,
|
|
235
236
|
|
|
237
|
+
/**
|
|
238
|
+
* @ignore
|
|
239
|
+
*/
|
|
240
|
+
href: PropTypes.string,
|
|
241
|
+
|
|
236
242
|
/**
|
|
237
243
|
* Use to apply selected styling.
|
|
238
244
|
* @default false
|
|
@@ -88,7 +88,7 @@ function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable,
|
|
|
88
88
|
return false;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
* A permanently displayed menu following https://www.w3.org/
|
|
91
|
+
* A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
|
|
92
92
|
* It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you
|
|
93
93
|
* use it separately you need to move focus into the component manually. Once
|
|
94
94
|
* the focus is placed inside the component it is fully keyboard accessible.
|
package/legacy/Paper/Paper.js
CHANGED
|
@@ -12,8 +12,7 @@ import useTheme from '../styles/useTheme';
|
|
|
12
12
|
import { getPaperUtilityClass } from './paperClasses'; // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
|
|
13
13
|
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
|
-
var getOverlayAlpha = function getOverlayAlpha(elevation) {
|
|
15
|
+
export var getOverlayAlpha = function getOverlayAlpha(elevation) {
|
|
17
16
|
var alphaValue;
|
|
18
17
|
|
|
19
18
|
if (elevation < 1) {
|
|
@@ -44,20 +43,24 @@ var PaperRoot = styled('div', {
|
|
|
44
43
|
return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles["elevation".concat(ownerState.elevation)]];
|
|
45
44
|
}
|
|
46
45
|
})(function (_ref) {
|
|
46
|
+
var _theme$vars$overlays;
|
|
47
|
+
|
|
47
48
|
var theme = _ref.theme,
|
|
48
49
|
ownerState = _ref.ownerState;
|
|
49
50
|
return _extends({
|
|
50
|
-
backgroundColor: theme.palette.background.paper,
|
|
51
|
-
color: theme.palette.text.primary,
|
|
51
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
52
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
52
53
|
transition: theme.transitions.create('box-shadow')
|
|
53
54
|
}, !ownerState.square && {
|
|
54
55
|
borderRadius: theme.shape.borderRadius
|
|
55
56
|
}, ownerState.variant === 'outlined' && {
|
|
56
|
-
border: "1px solid ".concat(theme.palette.divider)
|
|
57
|
+
border: "1px solid ".concat((theme.vars || theme).palette.divider)
|
|
57
58
|
}, ownerState.variant === 'elevation' && _extends({
|
|
58
|
-
boxShadow: theme.shadows[ownerState.elevation]
|
|
59
|
-
}, theme.palette.mode === 'dark' && {
|
|
59
|
+
boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
|
|
60
|
+
}, !theme.vars && theme.palette.mode === 'dark' && {
|
|
60
61
|
backgroundImage: "linear-gradient(".concat(alpha('#fff', getOverlayAlpha(ownerState.elevation)), ", ").concat(alpha('#fff', getOverlayAlpha(ownerState.elevation)), ")")
|
|
62
|
+
}, theme.vars && {
|
|
63
|
+
backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]
|
|
61
64
|
}));
|
|
62
65
|
});
|
|
63
66
|
var Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
|
package/legacy/Radio/Radio.js
CHANGED
|
@@ -40,18 +40,18 @@ var RadioRoot = styled(SwitchBase, {
|
|
|
40
40
|
var theme = _ref.theme,
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
42
42
|
return _extends({
|
|
43
|
-
color: theme.palette.text.secondary,
|
|
43
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
44
44
|
'&:hover': {
|
|
45
|
-
backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
45
|
+
backgroundColor: theme.vars ? "rgba(".concat(ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
46
46
|
// Reset on touch devices, it doesn't add specificity
|
|
47
47
|
'@media (hover: none)': {
|
|
48
48
|
backgroundColor: 'transparent'
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}, ownerState.color !== 'default' && _defineProperty({}, "&.".concat(radioClasses.checked), {
|
|
52
|
-
color: theme.palette[ownerState.color].main
|
|
52
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
53
53
|
}), _defineProperty({}, "&.".concat(radioClasses.disabled), {
|
|
54
|
-
color: theme.palette.action.disabled
|
|
54
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
55
55
|
}));
|
|
56
56
|
});
|
|
57
57
|
|
|
@@ -325,8 +325,8 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
325
325
|
|
|
326
326
|
var handleKeyDown = function handleKeyDown(event) {
|
|
327
327
|
if (!readOnly) {
|
|
328
|
-
var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on
|
|
329
|
-
// https://www.w3.org/
|
|
328
|
+
var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on macOS, but it's recommended by
|
|
329
|
+
// https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
|
|
330
330
|
'Enter'];
|
|
331
331
|
|
|
332
332
|
if (validKeys.indexOf(event.key) !== -1) {
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
@@ -21,15 +20,7 @@ var SliderRoot = styled('span', {
|
|
|
21
20
|
slot: 'Root',
|
|
22
21
|
overridesResolver: function overridesResolver(props, styles) {
|
|
23
22
|
var ownerState = props.ownerState;
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
value: ownerState.min + ownerState.step * index
|
|
27
|
-
};
|
|
28
|
-
}) : ownerState.marksProp || [];
|
|
29
|
-
var marked = marks.length > 0 && marks.some(function (mark) {
|
|
30
|
-
return mark.label;
|
|
31
|
-
});
|
|
32
|
-
return [styles.root, styles["color".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
|
|
23
|
+
return [styles.root, styles["color".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
|
|
33
24
|
}
|
|
34
25
|
})(function (_ref) {
|
|
35
26
|
var _extends2;
|
package/legacy/Tabs/Tabs.js
CHANGED
|
@@ -134,7 +134,7 @@ var TabsScroller = styled('div', {
|
|
|
134
134
|
overflowX: 'hidden',
|
|
135
135
|
width: '100%'
|
|
136
136
|
}, ownerState.hideScrollbar && {
|
|
137
|
-
// Hide dimensionless scrollbar on
|
|
137
|
+
// Hide dimensionless scrollbar on macOS
|
|
138
138
|
scrollbarWidth: 'none',
|
|
139
139
|
// Firefox
|
|
140
140
|
'&::-webkit-scrollbar': {
|
|
@@ -197,7 +197,7 @@ var TabsScrollbarSize = styled(ScrollbarSize, {
|
|
|
197
197
|
})({
|
|
198
198
|
overflowX: 'auto',
|
|
199
199
|
overflowY: 'hidden',
|
|
200
|
-
// Hide dimensionless scrollbar on
|
|
200
|
+
// Hide dimensionless scrollbar on macOS
|
|
201
201
|
scrollbarWidth: 'none',
|
|
202
202
|
// Firefox
|
|
203
203
|
'&::-webkit-scrollbar': {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
-
export { unstable_ClassNameGenerator } from '@mui/
|
|
2
|
+
export { unstable_ClassNameGenerator } from '@mui/utils';
|
package/legacy/index.js
CHANGED