Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ module.exports = [
name: 'The initial cost people pay for using one component',
webpack: true,
path: 'packages/material-ui/build/Paper/index.js',
limit: '17.3 KB',
limit: '18.2 KB',
},
{
name: 'The size of all the modules of material-ui.',
webpack: true,
path: 'packages/material-ui/build/index.js',
limit: '91.5 KB',
limit: '92.5 KB',
},
{
name: 'The main bundle of the docs',
webpack: false,
path: main.path,
limit: '176 KB',
limit: '177 KB',
},
{
name: 'The home page of the docs',
Expand Down
8 changes: 5 additions & 3 deletions docs/src/modules/components/Ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ class Ad extends React.Component {
if (adblock) {
return (
<Paper elevation={0} className={classes.paper}>
<Typography gutterBottom>Like Material-UI?</Typography>
<Typography gutterBottom>
<Typography variant="body2" gutterBottom>
Like Material-UI?
</Typography>
<Typography variant="body2" gutterBottom>
{`If you don't mind tech-related ads, and want to support Open Source,
please whitelist Material-UI in your ad blocker.`}
</Typography>
<Typography>
<Typography variant="body2">
Thank you!{' '}
<span role="img" aria-label="Love">
❤️
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function AppDrawer(props, context) {
<div className={classes.toolbarIe11}>
<div className={classes.toolbar}>
<Link className={classes.title} href="/" onClick={onClose}>
<Typography variant="title" color="inherit">
<Typography variant="h6" color="inherit">
Material-UI
</Typography>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class AppFrame extends React.Component {
<MenuIcon />
</IconButton>
{title !== null && (
<Typography className={classes.title} variant="title" color="inherit" noWrap>
<Typography className={classes.title} variant="h6" color="inherit" noWrap>
{title}
</Typography>
)}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ const styles = theme => ({
background: 'transparent',
},
'& .algolia-docsearch-suggestion--title': {
...theme.typography.title,
...theme.typography.h6,
},
'& .algolia-docsearch-suggestion--text': {
...theme.typography.body1,
...theme.typography.body2,
},
'& .ds-dropdown-menu': {
boxShadow: theme.shadows[1],
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/HomeFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function HomeFooter(props) {

return (
<footer className={classes.root}>
<Typography variant="title" gutterBottom>
<Typography variant="h6" gutterBottom>
Quick Links
</Typography>
<Typography variant="subheading" component="div">
<Typography variant="subtitle1" component="div">
<Grid container>
<Grid item xs={12} sm={6}>
<ul className={classes.list}>
Expand Down
16 changes: 8 additions & 8 deletions docs/src/modules/components/HomeSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ function HomeSteps(props) {
<Grid item xs={12} md={4} className={classNames(classes.step, classes.leftStep)}>
<div className={classes.stepTitle}>
<FileDownloadIcon className={classes.stepIcon} />
<Typography variant="title">Installation</Typography>
<Typography variant="h6">Installation</Typography>
</div>
<div className={classes.stepBody}>
<Typography variant="subheading" gutterBottom>
<Typography variant="subtitle1" gutterBottom>
{`
Install Material-UI's source files via npm.
We take care of injecting the CSS needed.
Expand All @@ -104,7 +104,7 @@ function HomeSteps(props) {
\`\`\`
`}
/>
<Typography variant="subheading" gutterBottom>
<Typography variant="subtitle1" gutterBottom>
{'or use a CDN.'}
</Typography>
<MarkdownElement
Expand All @@ -115,7 +115,7 @@ function HomeSteps(props) {
\`\`\`
`}
/>
<Typography variant="subheading" gutterBottom>
<Typography variant="subtitle1" gutterBottom>
{'Load the default Roboto font.'}
</Typography>
<MarkdownElement
Expand All @@ -139,10 +139,10 @@ function HomeSteps(props) {
<Grid item xs={12} md={4} className={classes.step}>
<div className={classes.stepTitle}>
<BuildIcon className={classes.stepIcon} />
<Typography variant="title">Usage</Typography>
<Typography variant="h6">Usage</Typography>
</div>
<div className={classes.stepBody}>
<Typography variant="subheading" gutterBottom>
<Typography variant="subtitle1" gutterBottom>
{'Material-UI components work in isolation. They are self-supporting.'}
</Typography>
<MarkdownElement
Expand Down Expand Up @@ -173,10 +173,10 @@ function HomeSteps(props) {
<Grid item xs={12} md={4} className={classNames(classes.step, classes.rightStep)}>
<div className={classes.stepTitle}>
<WhatshotIcon className={classes.stepIcon} />
<Typography variant="title">Premium Themes</Typography>
<Typography variant="h6">Premium Themes</Typography>
</div>
<div className={classes.stepBody}>
<Typography variant="subheading" gutterBottom>
<Typography variant="subtitle1" gutterBottom>
{`Take Material-UI to the next level with premium themes from
our official marketplace—all built on Material-UI.`}
</Typography>
Expand Down
3 changes: 3 additions & 0 deletions docs/src/modules/styles/getPageContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function getTheme(uiTheme) {
color: uiTheme.paletteType === 'light' ? '#000' : '#fff',
},
palette: { ...uiTheme.paletteColors, type: uiTheme.paletteType },
typography: {
useNextVariants: true,
},
});

// Expose the theme as a global variable so people can play with it.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/css-in-js/CssInJs.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MyLinkStyled = withStyles(styles)(MyLink);

export default function CssInJs() {
return (
<Typography variant="subheading">
<Typography variant="subtitle1">
<MyLinkStyled href="#">MyLink</MyLinkStyled>
{' - '}
<MyLinkStyled href="#" variant="primary">
Expand Down
3 changes: 3 additions & 0 deletions docs/src/pages/customization/themes/DarkTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const theme = createMuiTheme({
palette: {
type: 'dark', // Switching the dark mode on is a single property value change.
},
typography: {
useNextVariants: true,
},
});

function DarkTheme() {
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/customization/themes/FontSizeTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const theme = createMuiTheme({
typography: {
// Tell Material-UI what the font-size on the html element is.
htmlFontSize: 10,
useNextVariants: true,
},
});

Expand Down
5 changes: 3 additions & 2 deletions docs/src/pages/customization/themes/TypographyTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const styles = {

const theme = createMuiTheme({
typography: {
useNextVariants: true,
// Use the system font instead of the default Roboto font.
fontFamily: [
'-apple-system',
Expand All @@ -29,7 +30,7 @@ const theme = createMuiTheme({
body1: {
fontWeight: 500,
},
subheading: {
subtitle1: {
fontSize: 12,
},
button: {
Expand All @@ -44,7 +45,7 @@ function TypographyTheme(props) {
const children = (
<div>
<Typography>body1</Typography>
<Typography variant="subheading">subheading</Typography>
<Typography variant="subtitle1">subtitle</Typography>
<Button>Button</Button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/ButtonAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ButtonAppBar(props) {
<IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit" className={classes.grow}>
<Typography variant="h6" color="inherit" className={classes.grow}>
News
</Typography>
<Button color="inherit">Login</Button>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/DenseAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function DenseAppBar(props) {
<IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit">
<Typography variant="h6" color="inherit">
Photos
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/MenuAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MenuAppBar extends React.Component {
<IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit" className={classes.grow}>
<Typography variant="h6" color="inherit" className={classes.grow}>
Photos
</Typography>
{auth && (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/PrimarySearchAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class PrimarySearchAppBar extends React.Component {
<IconButton className={classes.menuButton} color="inherit" aria-label="Open drawer">
<MenuIcon />
</IconButton>
<Typography className={classes.title} variant="title" color="inherit" noWrap>
<Typography className={classes.title} variant="h6" color="inherit" noWrap>
Material-UI
</Typography>
<div className={classes.search}>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/SearchAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function SearchAppBar(props) {
<IconButton className={classes.menuButton} color="inherit" aria-label="Open drawer">
<MenuIcon />
</IconButton>
<Typography className={classes.title} variant="title" color="inherit" noWrap>
<Typography className={classes.title} variant="h6" color="inherit" noWrap>
Material-UI
</Typography>
<div className={classes.grow} />
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/SimpleAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function SimpleAppBar(props) {
<div className={classes.root}>
<AppBar position="static" color="default">
<Toolbar>
<Typography variant="title" color="inherit">
<Typography variant="h6" color="inherit">
Photos
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/buttons/ButtonBases.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function ButtonBases(props) {
<span className={classes.imageButton}>
<Typography
component="span"
variant="subheading"
variant="subtitle1"
color="inherit"
className={classes.imageTitle}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/cards/ImgMediaCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function ImgMediaCard(props) {
title="Contemplative Reptile"
/>
<CardContent>
<Typography gutterBottom variant="headline" component="h2">
<Typography gutterBottom variant="h5" component="h2">
Lizard
</Typography>
<Typography component="p">
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/cards/MediaCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function MediaCard(props) {
title="Contemplative Reptile"
/>
<CardContent>
<Typography gutterBottom variant="headline" component="h2">
<Typography gutterBottom variant="h5" component="h2">
Lizard
</Typography>
<Typography component="p">
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/demos/cards/MediaControlCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ function MediaControlCard(props) {
<Card className={classes.card}>
<div className={classes.details}>
<CardContent className={classes.content}>
<Typography component="h2" variant="headline">
<Typography component="h5" variant="h5">
Live From Space
</Typography>
<Typography variant="subheading" color="textSecondary">
<Typography variant="subtitle1" color="textSecondary">
Mac Miller
</Typography>
</CardContent>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/cards/SimpleCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function SimpleCard(props) {
<Typography className={classes.title} color="textSecondary">
Word of the Day
</Typography>
<Typography variant="headline" component="h2">
<Typography variant="h5" component="h2">
be
{bull}
nev
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/dialogs/FullScreenDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FullScreenDialog extends React.Component {
<IconButton color="inherit" onClick={this.handleClose} aria-label="Close">
<CloseIcon />
</IconButton>
<Typography variant="title" color="inherit" className={classes.flex}>
<Typography variant="h6" color="inherit" className={classes.flex}>
Sound
</Typography>
<Button color="inherit" onClick={this.handleClose}>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/dialogs/SimpleDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class SimpleDialogDemo extends React.Component {
render() {
return (
<div>
<Typography variant="subheading">Selected: {this.state.selectedValue}</Typography>
<Typography variant="subtitle1">Selected: {this.state.selectedValue}</Typography>
<br />
<Button onClick={this.handleClickOpen}>Open simple dialog</Button>
<SimpleDialogWrapped
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/drawers/ClippedDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function ClippedDrawer(props) {
<div className={classes.root}>
<AppBar position="absolute" className={classes.appBar}>
<Toolbar>
<Typography variant="title" color="inherit" noWrap>
<Typography variant="h6" color="inherit" noWrap>
Clipped drawer
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/drawers/MiniDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class MiniDrawer extends React.Component {
>
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit" noWrap>
<Typography variant="h6" color="inherit" noWrap>
Mini variant drawer
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/drawers/PermanentDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PermanentDrawer extends React.Component {
className={classNames(classes.appBar, classes[`appBar-${anchor}`])}
>
<Toolbar>
<Typography variant="title" color="inherit" noWrap>
<Typography variant="h6" color="inherit" noWrap>
Permanent drawer
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/drawers/PersistentDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class PersistentDrawer extends React.Component {
>
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit" noWrap>
<Typography variant="h6" color="inherit" noWrap>
Persistent drawer
</Typography>
</Toolbar>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/drawers/ResponsiveDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ResponsiveDrawer extends React.Component {
>
<MenuIcon />
</IconButton>
<Typography variant="title" color="inherit" noWrap>
<Typography variant="h6" color="inherit" noWrap>
Responsive drawer
</Typography>
</Toolbar>
Expand Down
Loading