Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,16 @@ The following changes are supported by the adapter:
+});
```

TypeScript: You can add it to the palette using [module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)

```ts
declare module '@mui/material/styles/createPalette' {
interface TypeText {
hint: string;
}
}
```

- The components' definitions in the theme were restructured under the `components` key, to allow for easier discoverability of the definitions related to any one component.

1. `props`
Expand Down Expand Up @@ -2207,6 +2217,10 @@ As the core components use emotion as their style engine, the props used by emot
+<Tooltip>
```

### TouchRipple

`@mui/material/ButtonBase/TouchRipple` is now considered private and has therefore been removed from the `ThemeOptions` object. Customization can still be done via the `ButtonBase.TouchRippleProps` property.

### Typography

- Remove the `srOnly` variant. You can use the `visuallyHidden` utility in conjunction with the `sx` prop instead.
Expand Down
5 changes: 1 addition & 4 deletions packages/mui-material/src/ButtonBase/TouchRipple.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TransitionGroup } from 'react-transition-group';
import clsx from 'clsx';
import { keyframes } from '@mui/system';
import styled from '../styles/styled';
import useThemeProps from '../styles/useThemeProps';
import Ripple from './Ripple';
import touchRippleClasses from './touchRippleClasses';

Expand Down Expand Up @@ -118,9 +117,7 @@ export const TouchRippleRipple = styled(Ripple, {
*
* TODO v5: Make private
*/
const TouchRipple = React.forwardRef(function TouchRipple(inProps, ref) {
const props = useThemeProps({ props: inProps, name: 'MuiTouchRipple' });

const TouchRipple = React.forwardRef(function TouchRipple(props, ref) {
const { center: centerProp = false, classes = {}, className, ...other } = props;
const [ripples, setRipples] = React.useState([]);
const nextKey = React.useRef(0);
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/ButtonBase/TouchRipple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe('<TouchRipple />', () => {
'componentProp',
'componentsProp',
'refForwarding',
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
],
Expand Down
5 changes: 0 additions & 5 deletions packages/mui-material/src/styles/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,6 @@ export interface Components {
styleOverrides?: ComponentsOverrides['MuiTooltip'];
variants?: ComponentsVariants['MuiTooltip'];
};
MuiTouchRipple?: {
defaultProps?: ComponentsProps['MuiTouchRipple'];
styleOverrides?: ComponentsOverrides['MuiTouchRipple'];
variants?: ComponentsVariants['MuiTouchRipple'];
};
MuiTypography?: {
defaultProps?: ComponentsProps['MuiTypography'];
styleOverrides?: ComponentsOverrides['MuiTypography'];
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/styles/props.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ import { ToggleButtonProps } from '../ToggleButton';
import { ToggleButtonGroupProps } from '../ToggleButtonGroup';
import { ToolbarProps } from '../Toolbar';
import { TooltipProps } from '../Tooltip';
import { TouchRippleProps } from '../ButtonBase/TouchRipple';
import { TypographyProps } from '../Typography';

export type ComponentsProps = {
Expand Down Expand Up @@ -233,7 +232,6 @@ export interface ComponentsPropsList {
MuiToggleButtonGroup: ToggleButtonGroupProps;
MuiToolbar: ToolbarProps;
MuiTooltip: TooltipProps;
MuiTouchRipple: TouchRippleProps;
MuiTypography: TypographyProps;
MuiUseMediaQuery: useMediaQueryOptions;
}