@mui/material 5.10.11 → 5.10.12
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/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- 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/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/TouchRipple.js +1 -1
- 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 +76 -0
- 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/Chip.js +8 -4
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- 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/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControl.js +29 -29
- 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/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 +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/ListItem.js +2 -2
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.js +2 -2
- 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/MenuItem.js +2 -2
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/OverridableComponentAugmentation.d.ts +31 -31
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +37 -37
- package/Radio/Radio.js +2 -1
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroup.js +12 -12
- 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/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- 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 +26 -26
- package/SwipeableDrawer/SwipeableDrawer.js +10 -2
- 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/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/Tooltip.js +1 -1
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/esm/BottomNavigation/BottomNavigation.js +0 -0
- package/esm/ButtonBase/TouchRipple.js +1 -1
- package/esm/Chip/Chip.js +8 -4
- package/esm/FormControl/FormControl.js +29 -29
- package/esm/ListItem/ListItem.js +2 -2
- package/esm/ListItemButton/ListItemButton.js +2 -2
- package/esm/MenuItem/MenuItem.js +2 -2
- package/esm/Radio/Radio.js +2 -1
- package/esm/RadioGroup/RadioGroup.js +12 -12
- package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/esm/Tooltip/Tooltip.js +1 -1
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/ButtonBase/TouchRipple.js +1 -1
- package/legacy/Chip/Chip.js +8 -4
- package/legacy/FormControl/FormControl.js +29 -29
- package/legacy/ListItem/ListItem.js +7 -5
- package/legacy/ListItemButton/ListItemButton.js +7 -5
- package/legacy/MenuItem/MenuItem.js +6 -4
- package/legacy/Radio/Radio.js +2 -1
- package/legacy/RadioGroup/RadioGroup.js +14 -14
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +72 -72
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/ButtonBase/TouchRipple.js +1 -1
- package/modern/Chip/Chip.js +8 -4
- package/modern/FormControl/FormControl.js +29 -29
- package/modern/ListItem/ListItem.js +2 -2
- package/modern/ListItemButton/ListItemButton.js +2 -2
- package/modern/MenuItem/MenuItem.js +2 -2
- package/modern/Radio/Radio.js +2 -1
- package/modern/RadioGroup/RadioGroup.js +12 -12
- package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/package.json +4 -4
- package/styles/CssVarsProvider.d.ts +14 -14
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- 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 +84 -70
- 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
|
@@ -182,35 +182,35 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
};
|
|
185
|
+
const childContext = React.useMemo(() => {
|
|
186
|
+
return {
|
|
187
|
+
adornedStart,
|
|
188
|
+
setAdornedStart,
|
|
189
|
+
color,
|
|
190
|
+
disabled,
|
|
191
|
+
error,
|
|
192
|
+
filled,
|
|
193
|
+
focused,
|
|
194
|
+
fullWidth,
|
|
195
|
+
hiddenLabel,
|
|
196
|
+
size,
|
|
197
|
+
onBlur: () => {
|
|
198
|
+
setFocused(false);
|
|
199
|
+
},
|
|
200
|
+
onEmpty: () => {
|
|
201
|
+
setFilled(false);
|
|
202
|
+
},
|
|
203
|
+
onFilled: () => {
|
|
204
|
+
setFilled(true);
|
|
205
|
+
},
|
|
206
|
+
onFocus: () => {
|
|
207
|
+
setFocused(true);
|
|
208
|
+
},
|
|
209
|
+
registerEffect,
|
|
210
|
+
required,
|
|
211
|
+
variant
|
|
212
|
+
};
|
|
213
|
+
}, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
|
|
214
214
|
return /*#__PURE__*/_jsx(FormControlContext.Provider, {
|
|
215
215
|
value: childContext,
|
|
216
216
|
children: /*#__PURE__*/_jsx(FormControlRoot, _extends({
|
package/esm/ListItem/ListItem.js
CHANGED
|
@@ -165,11 +165,11 @@ const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
|
|
|
165
165
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
166
166
|
|
|
167
167
|
const context = React.useContext(ListContext);
|
|
168
|
-
const childContext = {
|
|
168
|
+
const childContext = React.useMemo(() => ({
|
|
169
169
|
dense: dense || context.dense || false,
|
|
170
170
|
alignItems,
|
|
171
171
|
disableGutters
|
|
172
|
-
};
|
|
172
|
+
}), [alignItems, context.dense, dense, disableGutters]);
|
|
173
173
|
const listItemRef = React.useRef(null);
|
|
174
174
|
useEnhancedEffect(() => {
|
|
175
175
|
if (autoFocus) {
|
|
@@ -121,11 +121,11 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
|
|
|
121
121
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
122
122
|
|
|
123
123
|
const context = React.useContext(ListContext);
|
|
124
|
-
const childContext = {
|
|
124
|
+
const childContext = React.useMemo(() => ({
|
|
125
125
|
dense: dense || context.dense || false,
|
|
126
126
|
alignItems,
|
|
127
127
|
disableGutters
|
|
128
|
-
};
|
|
128
|
+
}), [alignItems, context.dense, dense, disableGutters]);
|
|
129
129
|
const listItemRef = React.useRef(null);
|
|
130
130
|
useEnhancedEffect(() => {
|
|
131
131
|
if (autoFocus) {
|
package/esm/MenuItem/MenuItem.js
CHANGED
|
@@ -144,10 +144,10 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
|
|
|
144
144
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
145
145
|
|
|
146
146
|
const context = React.useContext(ListContext);
|
|
147
|
-
const childContext = {
|
|
147
|
+
const childContext = React.useMemo(() => ({
|
|
148
148
|
dense: dense || context.dense || false,
|
|
149
149
|
disableGutters
|
|
150
|
-
};
|
|
150
|
+
}), [context.dense, dense, disableGutters]);
|
|
151
151
|
const menuItemRef = React.useRef(null);
|
|
152
152
|
useEnhancedEffect(() => {
|
|
153
153
|
if (autoFocus) {
|
package/esm/Radio/Radio.js
CHANGED
|
@@ -42,7 +42,8 @@ const RadioRoot = styled(SwitchBase, {
|
|
|
42
42
|
theme,
|
|
43
43
|
ownerState
|
|
44
44
|
}) => _extends({
|
|
45
|
-
color: (theme.vars || theme).palette.text.secondary
|
|
45
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
46
|
+
}, !ownerState.disableRipple && {
|
|
46
47
|
'&:hover': {
|
|
47
48
|
backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
48
49
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -42,22 +42,22 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
42
42
|
}
|
|
43
43
|
}), []);
|
|
44
44
|
const handleRef = useForkRef(ref, rootRef);
|
|
45
|
+
const name = useId(nameProp);
|
|
46
|
+
const contextValue = React.useMemo(() => ({
|
|
47
|
+
name,
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
onChange(event) {
|
|
50
|
+
setValueState(event.target.value);
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
if (onChange) {
|
|
53
|
+
onChange(event, event.target.value);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
value
|
|
58
|
+
}), [name, onChange, setValueState, value]);
|
|
55
59
|
return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {
|
|
56
|
-
value:
|
|
57
|
-
name,
|
|
58
|
-
onChange: handleChange,
|
|
59
|
-
value
|
|
60
|
-
},
|
|
60
|
+
value: contextValue,
|
|
61
61
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
62
62
|
role: "radiogroup",
|
|
63
63
|
ref: handleRef
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["BackdropProps"],
|
|
4
4
|
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
5
5
|
import * as React from 'react';
|
|
6
|
+
import { flushSync } from 'react-dom';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
8
|
import { elementTypeAcceptingRef } from '@mui/utils';
|
|
8
9
|
import { useThemeProps } from '@mui/system';
|
|
@@ -218,7 +219,9 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
218
219
|
|
|
219
220
|
claimedSwipeInstance = null;
|
|
220
221
|
touchDetected.current = false;
|
|
221
|
-
|
|
222
|
+
flushSync(() => {
|
|
223
|
+
setMaybeSwiping(false);
|
|
224
|
+
}); // The swipe wasn't started.
|
|
222
225
|
|
|
223
226
|
if (!swipeInstance.current.isSwiping) {
|
|
224
227
|
swipeInstance.current.isSwiping = null;
|
|
@@ -420,7 +423,9 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
420
423
|
claimedSwipeInstance = null;
|
|
421
424
|
swipeInstance.current.startX = currentX;
|
|
422
425
|
swipeInstance.current.startY = currentY;
|
|
423
|
-
|
|
426
|
+
flushSync(() => {
|
|
427
|
+
setMaybeSwiping(true);
|
|
428
|
+
});
|
|
424
429
|
|
|
425
430
|
if (!open && paperRef.current) {
|
|
426
431
|
// The ref may be null when a parent component updates while swiping.
|
|
@@ -476,6 +481,8 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
476
481
|
BackdropProps: _extends({}, BackdropProps, {
|
|
477
482
|
ref: backdropRef
|
|
478
483
|
})
|
|
484
|
+
}, variant === 'temporary' && {
|
|
485
|
+
keepMounted: true
|
|
479
486
|
}, ModalPropsProp),
|
|
480
487
|
hideBackdrop: hideBackdrop,
|
|
481
488
|
PaperProps: _extends({}, PaperProps, {
|
package/esm/Tooltip/Tooltip.js
CHANGED
|
@@ -463,7 +463,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
463
463
|
}, [handleClose, open]);
|
|
464
464
|
const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
465
465
|
|
|
466
|
-
if (
|
|
466
|
+
if (!title && title !== 0) {
|
|
467
467
|
open = false;
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { unstable_generateUtilityClass as default } from '@mui/utils';
|
|
2
|
-
export type { GlobalStateSlot } from '@mui/utils';
|
|
1
|
+
export { unstable_generateUtilityClass as default } from '@mui/utils';
|
|
2
|
+
export type { GlobalStateSlot } from '@mui/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { unstable_generateUtilityClasses as default } from '@mui/utils';
|
|
1
|
+
export { unstable_generateUtilityClasses as default } from '@mui/utils';
|
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;
|
|
File without changes
|
|
@@ -125,7 +125,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
125
125
|
var start = React.useCallback(function () {
|
|
126
126
|
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
127
127
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
128
|
-
var cb = arguments.length > 2 ? arguments[2] :
|
|
128
|
+
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
|
129
129
|
var _options$pulsate = options.pulsate,
|
|
130
130
|
pulsate = _options$pulsate === void 0 ? false : _options$pulsate,
|
|
131
131
|
_options$center = options.center,
|
package/legacy/Chip/Chip.js
CHANGED
|
@@ -22,6 +22,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
22
22
|
disabled = ownerState.disabled,
|
|
23
23
|
size = ownerState.size,
|
|
24
24
|
color = ownerState.color,
|
|
25
|
+
iconColor = ownerState.iconColor,
|
|
25
26
|
onDelete = ownerState.onDelete,
|
|
26
27
|
clickable = ownerState.clickable,
|
|
27
28
|
variant = ownerState.variant;
|
|
@@ -29,7 +30,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
29
30
|
root: ['root', variant, disabled && 'disabled', "size".concat(capitalize(size)), "color".concat(capitalize(color)), clickable && 'clickable', clickable && "clickableColor".concat(capitalize(color)), onDelete && 'deletable', onDelete && "deletableColor".concat(capitalize(color)), "".concat(variant).concat(capitalize(color))],
|
|
30
31
|
label: ['label', "label".concat(capitalize(size))],
|
|
31
32
|
avatar: ['avatar', "avatar".concat(capitalize(size)), "avatarColor".concat(capitalize(color))],
|
|
32
|
-
icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(
|
|
33
|
+
icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(iconColor))],
|
|
33
34
|
deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]
|
|
34
35
|
};
|
|
35
36
|
return composeClasses(slots, getChipUtilityClass, classes);
|
|
@@ -41,11 +42,12 @@ var ChipRoot = styled('div', {
|
|
|
41
42
|
overridesResolver: function overridesResolver(props, styles) {
|
|
42
43
|
var ownerState = props.ownerState;
|
|
43
44
|
var color = ownerState.color,
|
|
45
|
+
iconColor = ownerState.iconColor,
|
|
44
46
|
clickable = ownerState.clickable,
|
|
45
47
|
onDelete = ownerState.onDelete,
|
|
46
48
|
size = ownerState.size,
|
|
47
49
|
variant = ownerState.variant;
|
|
48
|
-
return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(
|
|
50
|
+
return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(iconColor))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles.deleteIcon), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]), styles.root, styles["size".concat(capitalize(size))], styles["color".concat(capitalize(color))], clickable && styles.clickable, clickable && color !== 'default' && styles["clickableColor".concat(capitalize(color), ")")], onDelete && styles.deletable, onDelete && color !== 'default' && styles["deletableColor".concat(capitalize(color))], styles[variant], styles["".concat(variant).concat(capitalize(color))]];
|
|
49
51
|
}
|
|
50
52
|
})(function (_ref11) {
|
|
51
53
|
var _extends2;
|
|
@@ -101,16 +103,17 @@ var ChipRoot = styled('div', {
|
|
|
101
103
|
height: 18,
|
|
102
104
|
fontSize: theme.typography.pxToRem(10)
|
|
103
105
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.icon), _extends({
|
|
104
|
-
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
|
|
105
106
|
marginLeft: 5,
|
|
106
107
|
marginRight: -6
|
|
107
108
|
}, ownerState.size === 'small' && {
|
|
108
109
|
fontSize: 18,
|
|
109
110
|
marginLeft: 4,
|
|
110
111
|
marginRight: -4
|
|
112
|
+
}, ownerState.iconColor === ownerState.color && _extends({
|
|
113
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
|
|
111
114
|
}, ownerState.color !== 'default' && {
|
|
112
115
|
color: 'inherit'
|
|
113
|
-
})), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
|
|
116
|
+
}))), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
|
|
114
117
|
WebkitTapHighlightColor: 'transparent',
|
|
115
118
|
color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.26)") : deleteIconColor,
|
|
116
119
|
fontSize: 22,
|
|
@@ -300,6 +303,7 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
300
303
|
disabled: disabled,
|
|
301
304
|
size: size,
|
|
302
305
|
color: color,
|
|
306
|
+
iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
|
|
303
307
|
onDelete: !!onDelete,
|
|
304
308
|
clickable: clickable,
|
|
305
309
|
variant: variant
|
|
@@ -196,35 +196,35 @@ var FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, re
|
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
};
|
|
199
|
+
var childContext = React.useMemo(function () {
|
|
200
|
+
return {
|
|
201
|
+
adornedStart: adornedStart,
|
|
202
|
+
setAdornedStart: setAdornedStart,
|
|
203
|
+
color: color,
|
|
204
|
+
disabled: disabled,
|
|
205
|
+
error: error,
|
|
206
|
+
filled: filled,
|
|
207
|
+
focused: focused,
|
|
208
|
+
fullWidth: fullWidth,
|
|
209
|
+
hiddenLabel: hiddenLabel,
|
|
210
|
+
size: size,
|
|
211
|
+
onBlur: function onBlur() {
|
|
212
|
+
setFocused(false);
|
|
213
|
+
},
|
|
214
|
+
onEmpty: function onEmpty() {
|
|
215
|
+
setFilled(false);
|
|
216
|
+
},
|
|
217
|
+
onFilled: function onFilled() {
|
|
218
|
+
setFilled(true);
|
|
219
|
+
},
|
|
220
|
+
onFocus: function onFocus() {
|
|
221
|
+
setFocused(true);
|
|
222
|
+
},
|
|
223
|
+
registerEffect: registerEffect,
|
|
224
|
+
required: required,
|
|
225
|
+
variant: variant
|
|
226
|
+
};
|
|
227
|
+
}, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
|
|
228
228
|
return /*#__PURE__*/_jsx(FormControlContext.Provider, {
|
|
229
229
|
value: childContext,
|
|
230
230
|
children: /*#__PURE__*/_jsx(FormControlRoot, _extends({
|
|
@@ -167,11 +167,13 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
|
|
|
167
167
|
other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected"]);
|
|
168
168
|
|
|
169
169
|
var context = React.useContext(ListContext);
|
|
170
|
-
var childContext = {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
var childContext = React.useMemo(function () {
|
|
171
|
+
return {
|
|
172
|
+
dense: dense || context.dense || false,
|
|
173
|
+
alignItems: alignItems,
|
|
174
|
+
disableGutters: disableGutters
|
|
175
|
+
};
|
|
176
|
+
}, [alignItems, context.dense, dense, disableGutters]);
|
|
175
177
|
var listItemRef = React.useRef(null);
|
|
176
178
|
useEnhancedEffect(function () {
|
|
177
179
|
if (autoFocus) {
|
|
@@ -122,11 +122,13 @@ var ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inPro
|
|
|
122
122
|
other = _objectWithoutProperties(props, ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"]);
|
|
123
123
|
|
|
124
124
|
var context = React.useContext(ListContext);
|
|
125
|
-
var childContext = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
var childContext = React.useMemo(function () {
|
|
126
|
+
return {
|
|
127
|
+
dense: dense || context.dense || false,
|
|
128
|
+
alignItems: alignItems,
|
|
129
|
+
disableGutters: disableGutters
|
|
130
|
+
};
|
|
131
|
+
}, [alignItems, context.dense, dense, disableGutters]);
|
|
130
132
|
var listItemRef = React.useRef(null);
|
|
131
133
|
useEnhancedEffect(function () {
|
|
132
134
|
if (autoFocus) {
|
|
@@ -135,10 +135,12 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
|
|
|
135
135
|
other = _objectWithoutProperties(props, ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"]);
|
|
136
136
|
|
|
137
137
|
var context = React.useContext(ListContext);
|
|
138
|
-
var childContext = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
var childContext = React.useMemo(function () {
|
|
139
|
+
return {
|
|
140
|
+
dense: dense || context.dense || false,
|
|
141
|
+
disableGutters: disableGutters
|
|
142
|
+
};
|
|
143
|
+
}, [context.dense, dense, disableGutters]);
|
|
142
144
|
var menuItemRef = React.useRef(null);
|
|
143
145
|
useEnhancedEffect(function () {
|
|
144
146
|
if (autoFocus) {
|
package/legacy/Radio/Radio.js
CHANGED
|
@@ -41,7 +41,8 @@ var RadioRoot = styled(SwitchBase, {
|
|
|
41
41
|
var theme = _ref.theme,
|
|
42
42
|
ownerState = _ref.ownerState;
|
|
43
43
|
return _extends({
|
|
44
|
-
color: (theme.vars || theme).palette.text.secondary
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
45
|
+
}, !ownerState.disableRipple && {
|
|
45
46
|
'&:hover': {
|
|
46
47
|
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),
|
|
47
48
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -14,7 +14,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
|
14
14
|
children = props.children,
|
|
15
15
|
defaultValue = props.defaultValue,
|
|
16
16
|
nameProp = props.name,
|
|
17
|
-
|
|
17
|
+
_onChange = props.onChange,
|
|
18
18
|
valueProp = props.value,
|
|
19
19
|
other = _objectWithoutProperties(props, ["actions", "children", "defaultValue", "name", "onChange", "value"]);
|
|
20
20
|
|
|
@@ -45,22 +45,22 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
|
45
45
|
};
|
|
46
46
|
}, []);
|
|
47
47
|
var handleRef = useForkRef(ref, rootRef);
|
|
48
|
-
|
|
49
|
-
var handleChange = function handleChange(event) {
|
|
50
|
-
setValueState(event.target.value);
|
|
51
|
-
|
|
52
|
-
if (onChange) {
|
|
53
|
-
onChange(event, event.target.value);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
48
|
var name = useId(nameProp);
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
var contextValue = React.useMemo(function () {
|
|
50
|
+
return {
|
|
60
51
|
name: name,
|
|
61
|
-
onChange:
|
|
52
|
+
onChange: function onChange(event) {
|
|
53
|
+
setValueState(event.target.value);
|
|
54
|
+
|
|
55
|
+
if (_onChange) {
|
|
56
|
+
_onChange(event, event.target.value);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
62
59
|
value: value
|
|
63
|
-
}
|
|
60
|
+
};
|
|
61
|
+
}, [name, _onChange, setValueState, value]);
|
|
62
|
+
return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {
|
|
63
|
+
value: contextValue,
|
|
64
64
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
65
65
|
role: "radiogroup",
|
|
66
66
|
ref: handleRef
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { flushSync } from 'react-dom';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import { elementTypeAcceptingRef } from '@mui/utils';
|
|
6
7
|
import { useThemeProps } from '@mui/system';
|
|
@@ -227,7 +228,9 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
227
228
|
|
|
228
229
|
claimedSwipeInstance = null;
|
|
229
230
|
touchDetected.current = false;
|
|
230
|
-
|
|
231
|
+
flushSync(function () {
|
|
232
|
+
setMaybeSwiping(false);
|
|
233
|
+
}); // The swipe wasn't started.
|
|
231
234
|
|
|
232
235
|
if (!swipeInstance.current.isSwiping) {
|
|
233
236
|
swipeInstance.current.isSwiping = null;
|
|
@@ -429,7 +432,9 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
429
432
|
claimedSwipeInstance = null;
|
|
430
433
|
swipeInstance.current.startX = currentX;
|
|
431
434
|
swipeInstance.current.startY = currentY;
|
|
432
|
-
|
|
435
|
+
flushSync(function () {
|
|
436
|
+
setMaybeSwiping(true);
|
|
437
|
+
});
|
|
433
438
|
|
|
434
439
|
if (!open && paperRef.current) {
|
|
435
440
|
// The ref may be null when a parent component updates while swiping.
|
|
@@ -487,6 +492,8 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
487
492
|
BackdropProps: _extends({}, BackdropProps, {
|
|
488
493
|
ref: backdropRef
|
|
489
494
|
})
|
|
495
|
+
}, variant === 'temporary' && {
|
|
496
|
+
keepMounted: true
|
|
490
497
|
}, ModalPropsProp),
|
|
491
498
|
hideBackdrop: hideBackdrop,
|
|
492
499
|
PaperProps: _extends({}, PaperProps, {
|
|
@@ -486,7 +486,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
486
486
|
}, [handleClose, open]);
|
|
487
487
|
var handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
488
488
|
|
|
489
|
-
if (
|
|
489
|
+
if (!title && title !== 0) {
|
|
490
490
|
open = false;
|
|
491
491
|
}
|
|
492
492
|
|
package/legacy/index.js
CHANGED