Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c2d31cc
add emotion peer dependencies
mnajdova Sep 25, 2020
5ae933f
fixed types & tests
mnajdova Sep 25, 2020
18b0668
prettier
mnajdova Sep 25, 2020
f0ef95c
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 28, 2020
c7bebb8
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 28, 2020
92b2d6e
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 28, 2020
13da531
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 29, 2020
cf5d9a5
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 29, 2020
b8d1291
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Sep 30, 2020
a9d8690
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova Oct 2, 2020
0e2b472
wip
mnajdova Oct 2, 2020
a7cfc84
prettier
mnajdova Oct 2, 2020
d6dbef3
Update packages/material-ui/src/styles/colorManipulator.js
mnajdova Oct 5, 2020
92848a2
Update docs/src/pages/guides/migration-v4/migration-v4.md
mnajdova Oct 5, 2020
1db1330
Merge branch 'next' into feat/colors-updates
mnajdova Oct 7, 2020
fb20fba
fixes after merge
mnajdova Oct 7, 2020
a46cc86
fix
mnajdova Oct 7, 2020
c42554d
prettier
mnajdova Oct 7, 2020
67ee2f2
added deprecated fade method
mnajdova Oct 7, 2020
9775213
trigger build
mnajdova Oct 7, 2020
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
12 changes: 6 additions & 6 deletions docs/src/modules/components/AppDrawerNavItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { makeStyles, fade } from '@material-ui/core/styles';
import { makeStyles, alpha } from '@material-ui/core/styles';
import Collapse from '@material-ui/core/Collapse';
import ButtonBase from '@material-ui/core/ButtonBase';
import ArrowRightIcon from '@material-ui/icons/ArrowRight';
Expand Down Expand Up @@ -29,7 +29,7 @@ const useStyles = makeStyles((theme) => ({
}),
'&:hover': {
color: theme.palette.text.primary,
backgroundColor: fade(theme.palette.text.primary, theme.palette.action.hoverOpacity),
backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
},
'&.Mui-focusVisible': {
backgroundColor: theme.palette.action.focus,
Expand Down Expand Up @@ -58,19 +58,19 @@ const useStyles = makeStyles((theme) => ({
color: theme.palette.text.secondary,
'&.app-drawer-active': {
color: theme.palette.primary.main,
backgroundColor: fade(theme.palette.primary.main, theme.palette.action.selectedOpacity),
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
'&:hover': {
backgroundColor: fade(
backgroundColor: alpha(
theme.palette.primary.main,
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity,
),
// Reset on touch devices, it doesn't add specificity
'@media (hover: none)': {
backgroundColor: fade(theme.palette.primary.main, theme.palette.action.selectedOpacity),
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
},
},
'&.Mui-focusVisible': {
backgroundColor: fade(
backgroundColor: alpha(
theme.palette.primary.main,
theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity,
),
Expand Down
6 changes: 3 additions & 3 deletions docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import url from 'url';
import { useSelector } from 'react-redux';
import useLazyCSS from 'docs/src/modules/utils/useLazyCSS';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import { fade, useTheme, makeStyles } from '@material-ui/core/styles';
import { alpha, useTheme, makeStyles } from '@material-ui/core/styles';
import Input from '@material-ui/core/Input';
import SearchIcon from '@material-ui/icons/Search';
import { handleEvent } from 'docs/src/modules/components/MarkdownLinks';
Expand Down Expand Up @@ -77,9 +77,9 @@ const useStyles = makeStyles(
marginRight: theme.spacing(2),
marginLeft: theme.spacing(1),
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
'& $inputInput': {
transition: theme.transitions.create('width'),
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import clsx from 'clsx';
import copy from 'clipboard-copy';
import { useSelector, useDispatch } from 'react-redux';
import { fade, makeStyles, useTheme } from '@material-ui/core/styles';
import { alpha, makeStyles, useTheme } from '@material-ui/core/styles';
import IconButton from '@material-ui/core/IconButton';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Collapse from '@material-ui/core/Collapse';
Expand Down Expand Up @@ -648,7 +648,7 @@ const useStyles = makeStyles(
/* Isolate the demo with an outline. */
demoBgOutlined: {
padding: theme.spacing(3),
border: `1px solid ${fade(theme.palette.action.active, 0.12)}`,
border: `1px solid ${alpha(theme.palette.action.active, 0.12)}`,
borderLeftWidth: 0,
borderRightWidth: 0,
[theme.breakpoints.up('sm')]: {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/components/ad.styles.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { fade } from '@material-ui/core/styles';
import { alpha } from '@material-ui/core/styles';
import { adShape } from 'docs/src/modules/components/AdManager';

const adBodyImageStyles = (theme) => ({
root: {
display: 'block',
overflow: 'hidden',
border: `1px solid ${fade(theme.palette.action.active, 0.12)}`,
border: `1px solid ${alpha(theme.palette.action.active, 0.12)}`,
padding: `${theme.spacing(1.5)} ${theme.spacing(1.5)} ${theme.spacing(
1.5,
)} calc(${theme.spacing(1.5)} + 130px)`,
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/app-bar/PrimarySearchAppBar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { fade, makeStyles } from '@material-ui/core/styles';
import { alpha, makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
Expand Down Expand Up @@ -31,9 +31,9 @@ const useStyles = makeStyles((theme) => ({
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginRight: theme.spacing(2),
marginLeft: 0,
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/app-bar/PrimarySearchAppBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {
fade,
alpha,
makeStyles,
Theme,
createStyles,
Expand Down Expand Up @@ -37,9 +37,9 @@ const useStyles = makeStyles((theme: Theme) =>
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginRight: theme.spacing(2),
marginLeft: 0,
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/app-bar/SearchAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import InputBase from '@material-ui/core/InputBase';
import { fade, makeStyles } from '@material-ui/core/styles';
import { alpha, makeStyles } from '@material-ui/core/styles';
import MenuIcon from '@material-ui/icons/Menu';
import SearchIcon from '@material-ui/icons/Search';

Expand All @@ -25,9 +25,9 @@ const useStyles = makeStyles((theme) => ({
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginLeft: 0,
width: '100%',
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/app-bar/SearchAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Typography from '@material-ui/core/Typography';
import InputBase from '@material-ui/core/InputBase';
import {
createStyles,
fade,
alpha,
Theme,
makeStyles,
} from '@material-ui/core/styles';
Expand All @@ -31,9 +31,9 @@ const useStyles = makeStyles((theme: Theme) =>
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginLeft: 0,
width: '100%',
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/autocomplete/GitHubLabel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-use-before-define */
import * as React from 'react';
import { useTheme, fade, makeStyles } from '@material-ui/core/styles';
import { useTheme, alpha, makeStyles } from '@material-ui/core/styles';
import Popper from '@material-ui/core/Popper';
import ClickAwayListener from '@material-ui/core/ClickAwayListener';
import SettingsIcon from '@material-ui/icons/Settings';
Expand Down Expand Up @@ -68,7 +68,7 @@ const useStyles = makeStyles((theme) => ({
border: '1px solid #ced4da',
fontSize: 14,
'&:focus': {
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
borderColor: theme.palette.primary.main,
},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/autocomplete/GitHubLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import {
useTheme,
fade,
alpha,
makeStyles,
Theme,
createStyles,
Expand Down Expand Up @@ -77,7 +77,7 @@ const useStyles = makeStyles((theme: Theme) =>
border: '1px solid #ced4da',
fontSize: 14,
'&:focus': {
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
borderColor: theme.palette.primary.main,
},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/switches/CustomizedSwitches.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { fade, withStyles } from '@material-ui/core/styles';
import { alpha, withStyles } from '@material-ui/core/styles';
import { purple } from '@material-ui/core/colors';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
Expand All @@ -13,7 +13,7 @@ const PurpleSwitch = withStyles((theme) => ({
'&$checked': {
color: purple[500],
'&:hover': {
backgroundColor: fade(purple[500], theme.palette.action.hoverOpacity),
backgroundColor: alpha(purple[500], theme.palette.action.hoverOpacity),
},
},
'&$checked + $track': {
Expand Down
7 changes: 5 additions & 2 deletions docs/src/pages/components/switches/CustomizedSwitches.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {
fade,
alpha,
withStyles,
Theme,
createStyles,
Expand All @@ -27,7 +27,10 @@ const PurpleSwitch = withStyles((theme: Theme) =>
'&$checked': {
color: purple[500],
'&:hover': {
backgroundColor: fade(purple[500], theme.palette.action.hoverOpacity),
backgroundColor: alpha(
purple[500],
theme.palette.action.hoverOpacity,
),
},
},
'&$checked + $track': {
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/text-fields/CustomizedInputs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {
fade,
alpha,
ThemeProvider,
useTheme,
withStyles,
Expand Down Expand Up @@ -68,7 +68,7 @@ const BootstrapInput = withStyles((theme) => ({
'"Segoe UI Symbol"',
].join(','),
'&:focus': {
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
borderColor: theme.palette.primary.main,
},
},
Expand All @@ -90,7 +90,7 @@ const useStylesReddit = makeStyles((theme) => ({
},
'&$focused': {
backgroundColor: 'transparent',
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 2px`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 2px`,
borderColor: theme.palette.primary.main,
},
},
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/components/text-fields/CustomizedInputs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import {
createStyles,
fade,
alpha,
Theme,
ThemeProvider,
useTheme,
Expand Down Expand Up @@ -72,7 +72,7 @@ const BootstrapInput = withStyles((theme: Theme) =>
'"Segoe UI Symbol"',
].join(','),
'&:focus': {
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`,
borderColor: theme.palette.primary.main,
},
},
Expand All @@ -96,7 +96,7 @@ const useStylesReddit = makeStyles((theme: Theme) =>
},
'&$focused': {
backgroundColor: 'transparent',
boxShadow: `${fade(theme.palette.primary.main, 0.25)} 0 0 0 2px`,
boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 2px`,
borderColor: theme.palette.primary.main,
},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/tree-view/CustomizedTreeView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import SvgIcon from '@material-ui/core/SvgIcon';
import { fade, makeStyles, withStyles } from '@material-ui/core/styles';
import { alpha, makeStyles, withStyles } from '@material-ui/core/styles';
import TreeView from '@material-ui/lab/TreeView';
import TreeItem from '@material-ui/lab/TreeItem';
import Collapse from '@material-ui/core/Collapse';
Expand Down Expand Up @@ -74,7 +74,7 @@ const StyledTreeItem = withStyles((theme) => ({
group: {
marginLeft: 15,
paddingLeft: 18,
borderLeft: `1px dashed ${fade(theme.palette.text.primary, 0.4)}`,
borderLeft: `1px dashed ${alpha(theme.palette.text.primary, 0.4)}`,
},
}))((props) => (
<TreeItem {...props} TransitionComponent={TransitionComponent} />
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/tree-view/CustomizedTreeView.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
import {
fade,
alpha,
makeStyles,
withStyles,
Theme,
Expand Down Expand Up @@ -74,7 +74,7 @@ const StyledTreeItem = withStyles((theme: Theme) =>
group: {
marginLeft: 15,
paddingLeft: 18,
borderLeft: `1px dashed ${fade(theme.palette.text.primary, 0.4)}`,
borderLeft: `1px dashed ${alpha(theme.palette.text.primary, 0.4)}`,
},
}),
)((props: TreeItemProps) => (
Expand Down
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 @@ -196,6 +196,20 @@ const theme = createMuiTheme({
});
```

### Styles

- Renamed `fade` to `alpha` to better describe the it's functionality.

```diff
- import { fade } from '@material-ui/core/styles';
+ import { alpha } from '@material-ui/core/styles';

const classes = makeStyles(theme => ({
- backgroundColor: fade(theme.palette.primary.main, theme.palette.action.selectedOpacity),
+ backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
}));
```

### Alert

- Move the component from the lab to the core. The component is now stable.
Expand Down
Loading