diff --git a/BACKERS.md b/BACKERS.md index 4f1b3c60b5cf94..eb6e7a65b57f58 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -19,15 +19,24 @@ Gold Sponsors are those who have pledged $500/month and more to Material-UI. via [Patreon](https://www.patreon.com/oliviertassinari) -

- creative-tim - bitsrc +

+ + creative-tim + + + bitsrc +

via [OpenCollective](https://opencollective.com/material-ui) -

- Gold Sponsors +

+ + + + + +

## Silver Sponsors diff --git a/README.md b/README.md index 3d93de965eab74..57e7b249ef055b 100644 --- a/README.md +++ b/README.md @@ -67,14 +67,25 @@ Gold Sponsors are those who have pledged $500/month and more to Material-UI. via [Patreon](https://www.patreon.com/oliviertassinari) -

- creative-tim - bitsrc +

+ + creative-tim + + + bitsrc +

via [OpenCollective](https://opencollective.com/material-ui) -![gold-sponsors](https://opencollective.com/material-ui/tiers/gold-sponsors.svg?avatarHeight=80&width=600) +

+ + + + + + +

### There is more! diff --git a/docs/src/modules/components/MarkdownDocs.js b/docs/src/modules/components/MarkdownDocs.js index 93c4b38e1a37df..0db6402024a6a3 100644 --- a/docs/src/modules/components/MarkdownDocs.js +++ b/docs/src/modules/components/MarkdownDocs.js @@ -12,7 +12,12 @@ import AppTableOfContents from 'docs/src/modules/components/AppTableOfContents'; import Ad from 'docs/src/modules/components/Ad'; import EditPage from 'docs/src/modules/components/EditPage'; import MarkdownDocsContents from 'docs/src/modules/components/MarkdownDocsContents'; -import { getHeaders, getTitle, getDescription } from 'docs/src/modules/utils/parseMarkdown'; +import { + getHeaders, + getTitle, + getDescription, + demoRegexp, +} from 'docs/src/modules/utils/parseMarkdown'; const styles = theme => ({ root: { @@ -30,7 +35,6 @@ const styles = theme => ({ }, }); -const demoRegexp = /^"demo": "(.*)"/; const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/blob/master'; function MarkdownDocs(props) { @@ -59,9 +63,7 @@ function MarkdownDocs(props) { /> {contents.map(content => { - const match = content.match(demoRegexp); - - if (match && demos) { + if (demoRegexp.test(content) && demos) { let demoOptions; try { demoOptions = JSON.parse(`{${content}}`); @@ -71,7 +73,10 @@ function MarkdownDocs(props) { } const name = demoOptions.demo; - warning(demos && demos[name], `Missing demo: ${name}.`); + warning( + demos && demos[name], + `Missing demo: ${name}. You can use one of the following:\n${Object.keys(demos)}`, + ); return ( = 16.7.0-alpha.0 and [react-dom](https://www.npmjs.com/package/react-dom) >= 16.7.0-alpha.0 are peer dependencies. diff --git a/docs/src/pages/demos/drawers/ResponsiveDrawer.js b/docs/src/pages/demos/drawers/ResponsiveDrawer.js index a6565c6896ff13..79311cb8c221bb 100644 --- a/docs/src/pages/demos/drawers/ResponsiveDrawer.js +++ b/docs/src/pages/demos/drawers/ResponsiveDrawer.js @@ -117,9 +117,6 @@ class ResponsiveDrawer extends React.Component { classes={{ paper: classes.drawerPaper, }} - ModalProps={{ - keepMounted: true, // Better open performance on mobile. - }} > {drawer} diff --git a/docs/src/pages/demos/pickers/MaterialUIPickers.js b/docs/src/pages/demos/pickers/MaterialUIPickers.js index 2317e28980f00e..8a99ac9d05fa45 100644 --- a/docs/src/pages/demos/pickers/MaterialUIPickers.js +++ b/docs/src/pages/demos/pickers/MaterialUIPickers.js @@ -13,7 +13,8 @@ const styles = { class MaterialUIPickers extends React.Component { state = { - selectedDate: new Date(), + // The first commit of Material-UI + selectedDate: new Date('2014-08-18T21:11:54'), }; handleDateChange = date => { diff --git a/docs/src/pages/getting-started/installation/installation.md b/docs/src/pages/getting-started/installation/installation.md index 26c11f9d63e03a..d7e4c0f1a2efe1 100644 --- a/docs/src/pages/getting-started/installation/installation.md +++ b/docs/src/pages/getting-started/installation/installation.md @@ -9,7 +9,11 @@ Material-UI is available as an [npm package](https://www.npmjs.com/package/@mate To install and save in your `package.json` dependencies, run: ```sh +// with npm npm install @material-ui/core + +// with yarn +yarn add @material-ui/core ``` Please note that [react](https://www.npmjs.com/package/react) >= 16.3.0 and [react-dom](https://www.npmjs.com/package/react-dom) >= 16.3.0 are peer dependencies. diff --git a/docs/src/pages/lab/about/about.md b/docs/src/pages/lab/about/about.md index 569e8742ace607..ab6d2963c72043 100644 --- a/docs/src/pages/lab/about/about.md +++ b/docs/src/pages/lab/about/about.md @@ -18,5 +18,9 @@ The lab has a peer dependency on the core components. If you are not already using Material-UI in your project, you can install it with: ```sh +// with npm npm install @material-ui/core + +// with yarn +yarn add @material-ui/core ``` diff --git a/packages/material-ui-docs/README.md b/packages/material-ui-docs/README.md index 5b574bc3803da5..49f47c896c52d2 100644 --- a/packages/material-ui-docs/README.md +++ b/packages/material-ui-docs/README.md @@ -7,9 +7,14 @@ This package hosts the documentation building blocks. Install the package in your project directory with: ```sh +// with npm npm install @material-ui/docs + +// with yarn +yarn add @material-ui/docs ``` +The docs has a peer dependency on the core components. If you are not already using Material-UI in your project, you can add it with: ```sh diff --git a/packages/material-ui-docs/src/MarkdownElement/MarkdownElement.js b/packages/material-ui-docs/src/MarkdownElement/MarkdownElement.js index c85a73fef5497d..92ed7f3b82ff96 100644 --- a/packages/material-ui-docs/src/MarkdownElement/MarkdownElement.js +++ b/packages/material-ui-docs/src/MarkdownElement/MarkdownElement.js @@ -148,6 +148,10 @@ const styles = theme => ({ ...theme.typography.h6, margin: '24px 0 16px', }, + '& h5': { + ...theme.typography.subtitle2, + margin: '24px 0 16px', + }, '& p, & ul, & ol': { lineHeight: 1.6, }, diff --git a/packages/material-ui-lab/README.md b/packages/material-ui-lab/README.md index 1a55d1553c5663..7af7c79f3eb149 100644 --- a/packages/material-ui-lab/README.md +++ b/packages/material-ui-lab/README.md @@ -14,7 +14,8 @@ npm install @material-ui/lab yarn add @material-ui/lab ``` -If you are not already using Material-UI in your project, you can add it with: +The lab has a peer dependency on the core components. +If you are not already using Material-UI in your project, you can install it with: ```sh // with npm @@ -23,3 +24,7 @@ npm install @material-ui/core // with yarn yarn add @material-ui/core ``` + +## Documentation + +[The documentation](https://material-ui.com/lab/about/) diff --git a/packages/material-ui/src/styles/createMuiTheme.test.js b/packages/material-ui/src/styles/createMuiTheme.test.js index b6f53d42bf0a93..339f76fd87934e 100644 --- a/packages/material-ui/src/styles/createMuiTheme.test.js +++ b/packages/material-ui/src/styles/createMuiTheme.test.js @@ -33,8 +33,8 @@ describe('createMuiTheme', () => { const muiTheme = createMuiTheme(); assert.strictEqual( muiTheme.shadows[2], - '0px 1px 5px 0px rgba(0, 0, 0, 0.2),' + - '0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 3px 1px -2px rgba(0, 0, 0, 0.12)', + '0px 1px 5px 0px rgba(0,0,0,0.2),' + + '0px 2px 2px 0px rgba(0,0,0,0.14),0px 3px 1px -2px rgba(0,0,0,0.12)', ); }); diff --git a/packages/material-ui/src/styles/shadows.js b/packages/material-ui/src/styles/shadows.js index 3ca479a9c00e10..7db32a3de23a6f 100644 --- a/packages/material-ui/src/styles/shadows.js +++ b/packages/material-ui/src/styles/shadows.js @@ -4,9 +4,9 @@ const shadowAmbientShadowOpacity = 0.12; function createShadow(...px) { return [ - `${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0, 0, 0, ${shadowKeyUmbraOpacity})`, - `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0, 0, 0, ${shadowKeyPenumbraOpacity})`, - `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0, 0, 0, ${shadowAmbientShadowOpacity})`, + `${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, + `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, + `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`, ].join(','); } diff --git a/pages/_document.js b/pages/_document.js index 7e7350b93ca4f4..fcf59f973a149e 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -46,7 +46,10 @@ class MyDocument extends Document { */} {/* PWA primary color */} - + @@ -112,11 +115,15 @@ MyDocument.getInitialProps = async ctx => { return WrappedComponent; }); - let css = pageContext.sheetsRegistry.toString(); - if (process.env.NODE_ENV === 'production') { - const result1 = await prefixer.process(css, { from: undefined }); - css = result1.css; - css = cleanCSS.minify(css).styles; + let css; + // It might not be defined, it won't after an error occures. + if (pageContext) { + css = pageContext.sheetsRegistry.toString(); + if (process.env.NODE_ENV === 'production') { + const result1 = await prefixer.process(css, { from: undefined }); + css = result1.css; + css = cleanCSS.minify(css).styles; + } } return {