Skip to content

v5.0.0-alpha.17

Pre-release
Pre-release
Compare
Choose a tag to compare
@oliviertassinari oliviertassinari released this 23 Nov 10:22
Nov 23, 2020

Big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:

  • 📚 Improve the IntelliSense support for the sx prop (#23599) @mnajdova.
    You should now get a description for each property of the system. For instance with mx:

    system TypeScript

  • 💅 Migrate the first core component to the v5 styling architecture (#23308) @mnajdova.
    We have spent the last few months iterating on the new styling approach in the lab, and are confident enough in the new approach to move it to the core, so we have migrated the Slider. We will wait a week or two to collect feedback on it, before scaling it to the rest of the codebase.

  • 📅 Fix the first few issues on the date picker components since the migration in the lab.

  • And many more 🐛 bug fixes and 📚 improvements.

@material-ui/[email protected]

Breaking changes

  • [Slider] Migrate to emotion (#23308) @mnajdova

    By default, emotion injects its style after JSS, this breaks the computed styles. In order to get the correct CSS injection order until all the components are migrated, you need to wrap the root of your application with:

    import * as React from 'react';
    import ReactDOM from 'react-dom';
    import { StylesProvider } from '@material-ui/core';
    import App from './App';
    
    ReactDOM.render(
      <StylesProvider injectFirst>
        <App />
      </StylesProvider>,
      document.querySelector('#root'),
    );

    This enforces emotion being injected first. More details in the documentation.

  • [Autocomplete] Rename closeIcon prop with clearIcon to avoid confusion (#23617) @akhilmhdh.

    -<Autocomplete closeIcon={icon} />
    +<Autocomplete clearIcon={icon} />
  • [Dialog] Remove the disableBackdropClick prop. It's redundant with the reason argument (#23607) @eps1lon.

    <Dialog
    - disableBackdropClick
    - onClose={handleClose}
    + onClose={(event, reason) => {
    +   if (reason !== 'backdropClick') {
    +     onClose(event, reason);
    +   }
    + }}
    />
  • [Modal] Remove the disableBackdropClick prop. It's redundant with the reason argument (#23607) @eps1lon.

    <Modal
    - disableBackdropClick
    - onClose={handleClose}
    + onClose={(event, reason) => {
    +   if (reason !== 'backdropClick') {
    +     onClose(event, reason);
    +   }
    + }}
    />
  • [Modal] Remove the onEscapeKeyDown prop. It's redundant with the reason argument. (#23571) @eps1lon

    <Modal
    -  onEscapeKeyDown={handleEscapeKeyDown}
    +  onClose={(event, reason) => {
    +    if (reason === "escapeKeyDown") {
    +      handleEscapeKeyDown(event);
    +    }
    +  }}
    />;

Changes

@material-ui/[email protected]

  • [codemod] Add moved-lab-modules (#23588) @eps1lon
    This codemod is part of our effort to make the migration from v4 to v5 as painless as possible.

@material-ui/[email protected]

@material-ui/[email protected]

@material-ui/[email protected]

@material-ui/[email protected]

Breaking changes

  • [DatePicker] Change the import path of the date adapters (#23568) @eps1lon.
    It better fits with the current import convention.

    -import AdapterDateFns from '@material-ui/lab/dateAdapter/date-fns';
    +import AdapterDateFns from '@material-ui/lab/AdapterDateFns';

Changes

Docs

Core