From 396e4ef3cf3e13bafeac4d2019dd0771fe9f8ebf Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Mon, 30 Mar 2020 15:56:13 -0600 Subject: [PATCH 1/7] [docs] Fix Tidelift UTM parameters (#20348) --- README.md | 2 +- docs/src/modules/components/Ad.js | 2 +- docs/src/pages/discover-more/backers/backers.md | 2 +- docs/src/pages/getting-started/support/support.md | 4 ++-- docs/src/pages/landing/QuickWord.js | 2 +- docs/src/pages/landing/backers.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ca351ef65a2b52..49838efa1ce1e0 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Diamond Sponsors are those who have pledged $1,500/month or more to Material-UI. via [Patreon](https://www.patreon.com/oliviertassinari)

- tidelift + tidelift bitsrc

diff --git a/docs/src/modules/components/Ad.js b/docs/src/modules/components/Ad.js index a246dbda5c302f..d085425d2e9d85 100644 --- a/docs/src/modules/components/Ad.js +++ b/docs/src/modules/components/Ad.js @@ -74,7 +74,7 @@ const inHouseAds = [ { name: 'tidelift', link: - 'https://tidelift.com/subscription/managed-open-source-survey?utm_source=docs&utm_medium=referral&utm_campaign=enterprise&utm_content=ad', + 'https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise&utm_content=ad', img: '/static/in-house/tidelift.png', description: 'Material-UI for enterprise
Save time and reduce risk. Managed open source β€” backed by maintainers.', diff --git a/docs/src/pages/discover-more/backers/backers.md b/docs/src/pages/discover-more/backers/backers.md index 43f46e1fe1ca45..cf54fb79024155 100644 --- a/docs/src/pages/discover-more/backers/backers.md +++ b/docs/src/pages/discover-more/backers/backers.md @@ -18,7 +18,7 @@ Please contact us at diamond@material-ui.com to subscribe to this tier. via [Patreon](https://www.patreon.com/oliviertassinari)

- tidelift + tidelift bitsrc

diff --git a/docs/src/pages/getting-started/support/support.md b/docs/src/pages/getting-started/support/support.md index 5fc7cb9cfd5f2d..3017eec34c19a1 100644 --- a/docs/src/pages/getting-started/support/support.md +++ b/docs/src/pages/getting-started/support/support.md @@ -81,9 +81,9 @@ The Tidelift Subscription manages your dependencies for you: The end result? All of the capabilities you expect from commercial-grade software, for the full breadth of open-source you use. That means less time grappling with esoteric open-source trivia, and more time building your own applications – and your business. -[Get more details](https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=material_ui&utm_medium=referral&utm_campaign=enterprise) +[Get more details](https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise) -[Request a demo](https://tidelift.com/subscription/request-a-demo?utm_source=material_ui&utm_medium=referral&utm_campaign=enterprise) +[Request a demo](https://tidelift.com/subscription/request-a-demo?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=enterprise) ### Custom work πŸ›  diff --git a/docs/src/pages/landing/QuickWord.js b/docs/src/pages/landing/QuickWord.js index 26120b937e1b04..62fc529013c10b 100644 --- a/docs/src/pages/landing/QuickWord.js +++ b/docs/src/pages/landing/QuickWord.js @@ -8,7 +8,7 @@ import Link from 'docs/src/modules/components/Link'; const backers = [ { href: - 'https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=material_ui&utm_medium=referral&utm_campaign=homepage', + 'https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage', alt: 'tidelift', title: 'Tidelift β€” Enterprise-ready open source software', }, diff --git a/docs/src/pages/landing/backers.md b/docs/src/pages/landing/backers.md index 2531b33977c3bc..1e51e492080d9b 100644 --- a/docs/src/pages/landing/backers.md +++ b/docs/src/pages/landing/backers.md @@ -9,7 +9,7 @@ The continued development and maintenance of Material-UI is made possible by the ### Gold πŸ†

- tidelift + tidelift bitsrc

From 5aad5f2f729066534bd9d408cc8518b51a9f0f14 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 31 Mar 2020 01:52:10 +0200 Subject: [PATCH 2/7] [core] Batch of small changes (#20349) --- docs/notifications.json | 6 ++++++ netlify.toml | 13 +++++++++++++ packages/material-ui/src/styles/overrides.d.ts | 4 +++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 netlify.toml diff --git a/docs/notifications.json b/docs/notifications.json index 83845fa8cc1325..040c4e0c4a0a69 100644 --- a/docs/notifications.json +++ b/docs/notifications.json @@ -14,5 +14,11 @@ "date": "2020-01-25", "title": "New blog post", "text": "2019 in review and beyond. 2019 was a great year for Material-UI. It puts us on an exciting path to solve even greater challenges in the coming years!" + }, + { + "id": 49, + "date": "2020-03-30", + "title": "Sketch", + "text": "Introducing Material-UI for Sketch. Today, we’re excited to introduce the Sketch symbols πŸ’Ž for Material-UI." } ] \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000000000..064819b1ae01f4 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,13 @@ +[build] + # Directory (relative to root of your repo) that contains the deploy-ready + # HTML files and assets generated by the build. If a base directory has + # been specified, include it in the publish directory path. + publish = "docs/export/" + + # Default build command. + command = "yarn docs:build && yarn docs:export" + +[build.environment] + YARN_VERSION = "1.21.1" + NODE_VERSION = "10" + NODE_OPTIONS = "--max_old_space_size=4096" diff --git a/packages/material-ui/src/styles/overrides.d.ts b/packages/material-ui/src/styles/overrides.d.ts index fae5ab226cdd86..8a35b9333e6f7e 100644 --- a/packages/material-ui/src/styles/overrides.d.ts +++ b/packages/material-ui/src/styles/overrides.d.ts @@ -67,6 +67,7 @@ import { OutlinedInputClassKey } from '../OutlinedInput'; import { PaperClassKey } from '../Paper'; import { PopoverClassKey } from '../Popover'; import { RadioClassKey } from '../Radio'; +import { ScopedCssBaselineClassKey } from '../ScopedCssBaseline'; import { SelectClassKey } from '../Select'; import { SliderClassKey } from '../Slider'; import { SnackbarClassKey } from '../Snackbar'; @@ -83,8 +84,8 @@ import { SwitchClassKey } from '../Switch'; import { TabClassKey } from '../Tab'; import { TableBodyClassKey } from '../TableBody'; import { TableCellClassKey } from '../TableCell'; -import { TableContainerClassKey } from '../TableContainer'; import { TableClassKey } from '../Table'; +import { TableContainerClassKey } from '../TableContainer'; import { TableFooterClassKey } from '../TableFooter'; import { TableHeadClassKey } from '../TableHead'; import { TablePaginationClassKey } from '../TablePagination'; @@ -169,6 +170,7 @@ export interface ComponentNameToClassKey { MuiPaper: PaperClassKey; MuiPopover: PopoverClassKey; MuiRadio: RadioClassKey; + MuiScopedCssBaseline: ScopedCssBaselineClassKey; MuiSelect: SelectClassKey; MuiSlider: SliderClassKey; MuiSnackbar: SnackbarClassKey; From 4e015162f21b3cff7f891d60fd60b7f7352a26b1 Mon Sep 17 00:00:00 2001 From: fyodorovandrei <46130932+fyodorovandrei@users.noreply.github.com> Date: Tue, 31 Mar 2020 23:47:56 +0200 Subject: [PATCH 3/7] [TextFIeld] Fix line-height and height that cut text (#20363) --- packages/material-ui/src/InputBase/InputBase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/material-ui/src/InputBase/InputBase.js b/packages/material-ui/src/InputBase/InputBase.js index cbbf3a3d647f5c..9e2e9594c53583 100644 --- a/packages/material-ui/src/InputBase/InputBase.js +++ b/packages/material-ui/src/InputBase/InputBase.js @@ -41,7 +41,7 @@ export const styles = (theme) => { // Mimics the default input display property used by browsers for an input. ...theme.typography.body1, color: theme.palette.text.primary, - lineHeight: '1.1875em', // Reset (19px), match the native input line-height + lineHeight: '1.1876em', // Reset (19px), match the native input line-height boxSizing: 'border-box', // Prevent padding issue with fullWidth. position: 'relative', cursor: 'text', @@ -87,7 +87,7 @@ export const styles = (theme) => { border: 0, boxSizing: 'content-box', background: 'none', - height: '1.1875em', // Reset (19px), match the native input line-height + height: '1.1876em', // Reset (19px), match the native input line-height margin: 0, // Reset for Safari WebkitTapHighlightColor: 'transparent', display: 'block', From 07c94a9dc7334630bc98936a9555be7e7edb4b75 Mon Sep 17 00:00:00 2001 From: Kevin Suen Date: Tue, 31 Mar 2020 14:48:35 -0700 Subject: [PATCH 4/7] [Select] onChange fired with current value (#20361) --- packages/material-ui/src/Select/Select.test.js | 2 +- packages/material-ui/src/Select/SelectInput.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/material-ui/src/Select/Select.test.js b/packages/material-ui/src/Select/Select.test.js index afe1738494ff92..fc559858e90997 100644 --- a/packages/material-ui/src/Select/Select.test.js +++ b/packages/material-ui/src/Select/Select.test.js @@ -214,7 +214,7 @@ describe(' + + + + + ', () => { const { getByRole } = render(', () => { expect(getByRole('button')).to.have.attribute( 'aria-labelledby', - ` ${getByRole('button').getAttribute('id')}`, + getByRole('button').getAttribute('id'), ); }); diff --git a/packages/material-ui/src/Select/SelectInput.js b/packages/material-ui/src/Select/SelectInput.js index 4bc58297fae498..8efca288dd40d1 100644 --- a/packages/material-ui/src/Select/SelectInput.js +++ b/packages/material-ui/src/Select/SelectInput.js @@ -26,6 +26,7 @@ function isEmpty(display) { */ const SelectInput = React.forwardRef(function SelectInput(props, ref) { const { + 'aria-label': ariaLabel, autoFocus, autoWidth, children, @@ -324,8 +325,9 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) { tabIndex={tabIndex} role="button" aria-expanded={open ? 'true' : undefined} - aria-labelledby={`${labelId || ''} ${buttonId || ''}`} aria-haspopup="listbox" + aria-label={ariaLabel} + aria-labelledby={[labelId, buttonId].filter(Boolean).join(' ') || undefined} onKeyDown={handleKeyDown} onMouseDown={disabled || readOnly ? null : handleMouseDown} onBlur={handleBlur} @@ -383,6 +385,10 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) { }); SelectInput.propTypes = { + /** + * @ignore + */ + 'aria-label': PropTypes.string, /** * @ignore */ diff --git a/packages/material-ui/src/TablePagination/TablePagination.js b/packages/material-ui/src/TablePagination/TablePagination.js index 019ce8d0bf3f9b..8ab941190f8b33 100644 --- a/packages/material-ui/src/TablePagination/TablePagination.js +++ b/packages/material-ui/src/TablePagination/TablePagination.js @@ -35,9 +35,9 @@ export const styles = (theme) => ({ caption: { flexShrink: 0, }, + // TODO v5: `.selectRoot` should be merged with `.input` /* Styles applied to the Select component root element. */ selectRoot: { - // `.selectRoot` should be merged with `.input` in v5. marginRight: 32, marginLeft: 8, }, @@ -122,6 +122,7 @@ const TablePagination = React.forwardRef(function TablePagination(props, ref) { input={} value={rowsPerPage} onChange={onChangeRowsPerPage} + inputProps={{ 'aria-label': labelRowsPerPage }} {...SelectProps} > {rowsPerPageOptions.map((rowsPerPageOption) => (