@mui/material 5.3.1 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/Autocomplete.d.ts +5 -0
- package/Autocomplete/Autocomplete.js +11 -3
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/TouchRipple.js +1 -2
- 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 +84 -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/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/containerClasses.d.ts +22 -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/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.js +11 -3
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -18
- package/FormControlLabel/formControlLabelClasses.js +1 -1
- package/FormGroup/FormGroup.js +14 -3
- package/FormGroup/formGroupClasses.d.ts +12 -10
- package/FormGroup/formGroupClasses.js +1 -1
- package/FormHelperText/FormHelperText.js +7 -9
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/Grid.js +2 -4
- 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/InputAdornment.js +6 -9
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +44 -44
- 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/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/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/NotchedOutline.js +14 -16
- package/OutlinedInput/OutlinedInput.js +1 -1
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- 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 +17 -17
- package/Radio/RadioButtonIcon.js +2 -6
- 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 +7 -9
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- 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/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/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/SwipeableDrawer/SwipeArea.js +1 -3
- 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/TextField.js +1 -1
- 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/darkScrollbar/index.d.ts +28 -28
- package/index.d.ts +7 -2
- package/index.js +6 -3
- package/internal/SwitchBase.js +2 -6
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Autocomplete/Autocomplete.js +12 -3
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/legacy/ButtonBase/TouchRipple.js +1 -2
- package/legacy/FormControlLabel/FormControlLabel.js +11 -3
- package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
- package/legacy/FormGroup/FormGroup.js +14 -3
- package/legacy/FormGroup/formGroupClasses.js +1 -1
- package/legacy/FormHelperText/FormHelperText.js +7 -9
- package/legacy/Grid/Grid.js +2 -4
- package/legacy/InputAdornment/InputAdornment.js +6 -9
- package/legacy/OutlinedInput/NotchedOutline.js +14 -16
- package/legacy/OutlinedInput/OutlinedInput.js +1 -1
- package/legacy/Radio/RadioButtonIcon.js +2 -6
- package/legacy/Select/SelectInput.js +7 -9
- package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
- package/legacy/TextField/TextField.js +1 -1
- package/legacy/index.js +6 -3
- package/legacy/internal/SwitchBase.js +2 -6
- package/legacy/useMediaQuery/useMediaQuery.js +86 -31
- package/locale/index.d.ts +68 -68
- package/modern/Autocomplete/Autocomplete.js +11 -3
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/modern/ButtonBase/TouchRipple.js +1 -2
- package/modern/FormControlLabel/FormControlLabel.js +11 -3
- package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
- package/modern/FormGroup/FormGroup.js +14 -3
- package/modern/FormGroup/formGroupClasses.js +1 -1
- package/modern/FormHelperText/FormHelperText.js +7 -9
- package/modern/Grid/Grid.js +2 -4
- package/modern/InputAdornment/InputAdornment.js +6 -9
- package/modern/OutlinedInput/NotchedOutline.js +14 -16
- package/modern/OutlinedInput/OutlinedInput.js +1 -1
- package/modern/Radio/RadioButtonIcon.js +2 -6
- package/modern/Select/SelectInput.js +7 -9
- package/modern/SwipeableDrawer/SwipeArea.js +1 -3
- package/modern/TextField/TextField.js +1 -1
- package/modern/index.js +6 -3
- package/modern/internal/SwitchBase.js +2 -6
- package/modern/useMediaQuery/useMediaQuery.js +68 -26
- package/node/Autocomplete/Autocomplete.js +11 -3
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/node/ButtonBase/TouchRipple.js +1 -2
- package/node/FormControlLabel/FormControlLabel.js +12 -3
- package/node/FormControlLabel/formControlLabelClasses.js +1 -1
- package/node/FormGroup/FormGroup.js +15 -3
- package/node/FormGroup/formGroupClasses.js +1 -1
- package/node/FormHelperText/FormHelperText.js +6 -9
- package/node/Grid/Grid.js +2 -4
- package/node/InputAdornment/InputAdornment.js +5 -9
- package/node/OutlinedInput/NotchedOutline.js +12 -16
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/Radio/RadioButtonIcon.js +2 -6
- package/node/Select/SelectInput.js +6 -9
- package/node/SwipeableDrawer/SwipeArea.js +1 -3
- package/node/TextField/TextField.js +1 -1
- package/node/index.js +41 -16
- package/node/internal/SwitchBase.js +2 -6
- package/node/useMediaQuery/useMediaQuery.js +68 -26
- package/package.json +3 -3
- package/styles/ThemeProvider.d.ts +1 -1
- 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 +5869 -8117
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +31 -27
- package/useMediaQuery/useMediaQuery.js +68 -26
- 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
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
3
|
-
*/
|
|
4
|
-
export interface MuiMediaQueryListEvent {
|
|
5
|
-
matches: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Not used internally. Use `MediaQueryList` from lib.dom.d.ts instead.
|
|
9
|
-
*/
|
|
10
|
-
export interface MuiMediaQueryList {
|
|
11
|
-
matches: boolean;
|
|
12
|
-
addListener: (listener: MuiMediaQueryListListener) => void;
|
|
13
|
-
removeListener: (listener: MuiMediaQueryListListener) => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Not used internally. Use `(event: MediaQueryListEvent) => void` instead.
|
|
17
|
-
*/
|
|
18
|
-
export declare type MuiMediaQueryListListener = (event: MuiMediaQueryListEvent) => void;
|
|
19
|
-
export interface Options {
|
|
20
|
-
defaultMatches?: boolean;
|
|
21
|
-
matchMedia?: typeof window.matchMedia;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
3
|
+
*/
|
|
4
|
+
export interface MuiMediaQueryListEvent {
|
|
5
|
+
matches: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Not used internally. Use `MediaQueryList` from lib.dom.d.ts instead.
|
|
9
|
+
*/
|
|
10
|
+
export interface MuiMediaQueryList {
|
|
11
|
+
matches: boolean;
|
|
12
|
+
addListener: (listener: MuiMediaQueryListListener) => void;
|
|
13
|
+
removeListener: (listener: MuiMediaQueryListListener) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Not used internally. Use `(event: MediaQueryListEvent) => void` instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare type MuiMediaQueryListListener = (event: MuiMediaQueryListEvent) => void;
|
|
19
|
+
export interface Options {
|
|
20
|
+
defaultMatches?: boolean;
|
|
21
|
+
matchMedia?: typeof window.matchMedia;
|
|
22
|
+
/**
|
|
23
|
+
* This option is kept for backwards compatibility and has no longer any effect.
|
|
24
|
+
* It's previous behavior is now handled automatically.
|
|
25
|
+
*/
|
|
26
|
+
noSsr?: boolean;
|
|
27
|
+
ssrMatchMedia?: (query: string) => {
|
|
28
|
+
matches: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export default function useMediaQuery<Theme = unknown>(queryInput: string | ((theme: Theme) => string), options?: Options): boolean;
|
|
@@ -5,32 +5,8 @@ import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
|
5
5
|
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const theme = useTheme(); // Wait for jsdom to support the match media feature.
|
|
10
|
-
// All the browsers MUI support have this built-in.
|
|
11
|
-
// This defensive check is here for simplicity.
|
|
12
|
-
// Most of the time, the match media logic isn't central to people tests.
|
|
13
|
-
|
|
8
|
+
function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
|
|
14
9
|
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
15
|
-
const {
|
|
16
|
-
defaultMatches = false,
|
|
17
|
-
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
18
|
-
noSsr = false,
|
|
19
|
-
ssrMatchMedia = null
|
|
20
|
-
} = getThemeProps({
|
|
21
|
-
name: 'MuiUseMediaQuery',
|
|
22
|
-
props: options,
|
|
23
|
-
theme
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
27
|
-
if (typeof queryInput === 'function' && theme === null) {
|
|
28
|
-
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
33
|
-
query = query.replace(/^@media( ?)/m, '');
|
|
34
10
|
const [match, setMatch] = React.useState(() => {
|
|
35
11
|
if (noSsr && supportMatchMedia) {
|
|
36
12
|
return matchMedia(query).matches;
|
|
@@ -62,13 +38,79 @@ export default function useMediaQuery(queryInput, options = {}) {
|
|
|
62
38
|
}
|
|
63
39
|
};
|
|
64
40
|
|
|
65
|
-
updateMatch();
|
|
41
|
+
updateMatch(); // TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
42
|
+
|
|
66
43
|
queryList.addListener(updateMatch);
|
|
67
44
|
return () => {
|
|
68
45
|
active = false;
|
|
69
46
|
queryList.removeListener(updateMatch);
|
|
70
47
|
};
|
|
71
48
|
}, [query, matchMedia, supportMatchMedia]);
|
|
49
|
+
return match;
|
|
50
|
+
} // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
|
|
54
|
+
|
|
55
|
+
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
56
|
+
const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
|
|
57
|
+
const getServerSnapshot = React.useMemo(() => {
|
|
58
|
+
if (ssrMatchMedia !== null) {
|
|
59
|
+
const {
|
|
60
|
+
matches
|
|
61
|
+
} = ssrMatchMedia(query);
|
|
62
|
+
return () => matches;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return getDefaultSnapshot;
|
|
66
|
+
}, [getDefaultSnapshot, query, ssrMatchMedia]);
|
|
67
|
+
const [getSnapshot, subscribe] = React.useMemo(() => {
|
|
68
|
+
if (matchMedia === null) {
|
|
69
|
+
return [getDefaultSnapshot, () => () => {}];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const mediaQueryList = matchMedia(query);
|
|
73
|
+
return [() => mediaQueryList.matches, notify => {
|
|
74
|
+
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
75
|
+
mediaQueryList.addListener(notify);
|
|
76
|
+
return () => {
|
|
77
|
+
mediaQueryList.removeListener(notify);
|
|
78
|
+
};
|
|
79
|
+
}];
|
|
80
|
+
}, [getDefaultSnapshot, matchMedia, query]);
|
|
81
|
+
const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
82
|
+
return match;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export default function useMediaQuery(queryInput, options = {}) {
|
|
86
|
+
const theme = useTheme(); // Wait for jsdom to support the match media feature.
|
|
87
|
+
// All the browsers MUI support have this built-in.
|
|
88
|
+
// This defensive check is here for simplicity.
|
|
89
|
+
// Most of the time, the match media logic isn't central to people tests.
|
|
90
|
+
|
|
91
|
+
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
92
|
+
const {
|
|
93
|
+
defaultMatches = false,
|
|
94
|
+
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
95
|
+
ssrMatchMedia = null,
|
|
96
|
+
noSsr
|
|
97
|
+
} = getThemeProps({
|
|
98
|
+
name: 'MuiUseMediaQuery',
|
|
99
|
+
props: options,
|
|
100
|
+
theme
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
104
|
+
if (typeof queryInput === 'function' && theme === null) {
|
|
105
|
+
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
110
|
+
query = query.replace(/^@media( ?)/m, ''); // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
|
|
111
|
+
|
|
112
|
+
const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
|
|
113
|
+
const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
|
|
72
114
|
|
|
73
115
|
if (process.env.NODE_ENV !== 'production') {
|
|
74
116
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './useTouchRipple';
|
|
1
|
+
export { default } from './useTouchRipple';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TouchRippleActions } from '../ButtonBase/TouchRipple';
|
|
3
|
-
interface UseTouchRippleProps {
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
disableFocusRipple?: boolean;
|
|
6
|
-
disableRipple?: boolean;
|
|
7
|
-
disableTouchRipple?: boolean;
|
|
8
|
-
focusVisible: boolean;
|
|
9
|
-
rippleRef: React.RefObject<TouchRippleActions>;
|
|
10
|
-
}
|
|
11
|
-
interface RippleEventHandlers {
|
|
12
|
-
onBlur: React.FocusEventHandler;
|
|
13
|
-
onContextMenu: React.MouseEventHandler;
|
|
14
|
-
onDragLeave: React.DragEventHandler;
|
|
15
|
-
onKeyDown: React.KeyboardEventHandler;
|
|
16
|
-
onKeyUp: React.KeyboardEventHandler;
|
|
17
|
-
onMouseDown: React.MouseEventHandler;
|
|
18
|
-
onMouseLeave: React.MouseEventHandler;
|
|
19
|
-
onMouseUp: React.MouseEventHandler;
|
|
20
|
-
onTouchEnd: React.TouchEventHandler;
|
|
21
|
-
onTouchMove: React.TouchEventHandler;
|
|
22
|
-
onTouchStart: React.TouchEventHandler;
|
|
23
|
-
}
|
|
24
|
-
declare const useTouchRipple: (props: UseTouchRippleProps) => {
|
|
25
|
-
enableTouchRipple: boolean;
|
|
26
|
-
getRippleHandlers: (otherEvents?: Partial<RippleEventHandlers>) => RippleEventHandlers;
|
|
27
|
-
};
|
|
28
|
-
export default useTouchRipple;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TouchRippleActions } from '../ButtonBase/TouchRipple';
|
|
3
|
+
interface UseTouchRippleProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
disableFocusRipple?: boolean;
|
|
6
|
+
disableRipple?: boolean;
|
|
7
|
+
disableTouchRipple?: boolean;
|
|
8
|
+
focusVisible: boolean;
|
|
9
|
+
rippleRef: React.RefObject<TouchRippleActions>;
|
|
10
|
+
}
|
|
11
|
+
interface RippleEventHandlers {
|
|
12
|
+
onBlur: React.FocusEventHandler;
|
|
13
|
+
onContextMenu: React.MouseEventHandler;
|
|
14
|
+
onDragLeave: React.DragEventHandler;
|
|
15
|
+
onKeyDown: React.KeyboardEventHandler;
|
|
16
|
+
onKeyUp: React.KeyboardEventHandler;
|
|
17
|
+
onMouseDown: React.MouseEventHandler;
|
|
18
|
+
onMouseLeave: React.MouseEventHandler;
|
|
19
|
+
onMouseUp: React.MouseEventHandler;
|
|
20
|
+
onTouchEnd: React.TouchEventHandler;
|
|
21
|
+
onTouchMove: React.TouchEventHandler;
|
|
22
|
+
onTouchStart: React.TouchEventHandler;
|
|
23
|
+
}
|
|
24
|
+
declare const useTouchRipple: (props: UseTouchRippleProps) => {
|
|
25
|
+
enableTouchRipple: boolean;
|
|
26
|
+
getRippleHandlers: (otherEvents?: Partial<RippleEventHandlers>) => RippleEventHandlers;
|
|
27
|
+
};
|
|
28
|
+
export default useTouchRipple;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';
|
|
2
|
-
export default getScrollbarSize;
|
|
1
|
+
import { unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';
|
|
2
|
+
export default getScrollbarSize;
|
package/utils/ownerDocument.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { unstable_ownerDocument as ownerDocument } from '@mui/utils';
|
|
2
|
-
export default ownerDocument;
|
|
1
|
+
import { unstable_ownerDocument as ownerDocument } from '@mui/utils';
|
|
2
|
+
export default ownerDocument;
|
package/utils/ownerWindow.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { unstable_ownerWindow as ownerWindow } from '@mui/utils';
|
|
2
|
-
export default ownerWindow;
|
|
1
|
+
import { unstable_ownerWindow as ownerWindow } from '@mui/utils';
|
|
2
|
+
export default ownerWindow;
|
package/utils/setRef.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { unstable_setRef as setRef } from '@mui/utils';
|
|
2
|
-
export default setRef;
|
|
1
|
+
import { unstable_setRef as setRef } from '@mui/utils';
|
|
2
|
+
export default setRef;
|