2021-07-21 08:59:52 +00:00
|
|
|
import { Theme } from "@material-ui/core/styles";
|
2023-02-20 15:21:28 +00:00
|
|
|
import { dark, light, Themes } from "@saleor/macaw-ui";
|
|
|
|
import { themes, vars } from "@saleor/macaw-ui/next";
|
2021-07-21 08:59:52 +00:00
|
|
|
|
2023-02-20 15:21:28 +00:00
|
|
|
const breakpoints = {
|
2022-10-06 08:15:16 +00:00
|
|
|
keys: ["xs", "sm", "md", "lg", "xl"],
|
|
|
|
values: { lg: 1680, md: 1280, sm: 600, xl: 1920, xs: 0 },
|
2023-02-20 15:21:28 +00:00
|
|
|
} as unknown as Theme["breakpoints"];
|
2022-10-06 08:15:16 +00:00
|
|
|
|
2023-02-20 15:21:28 +00:00
|
|
|
export const themeOverrides: Partial<Theme> = {
|
2022-10-06 08:15:16 +00:00
|
|
|
breakpoints,
|
2023-02-20 15:21:28 +00:00
|
|
|
overrides: {
|
|
|
|
MuiCard: {
|
|
|
|
root: {
|
|
|
|
border: 0,
|
|
|
|
backgroundColor: vars.colors.background.surfaceNeutralPlain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTypography: {
|
|
|
|
body2: {
|
|
|
|
fontSize: "13px",
|
|
|
|
},
|
|
|
|
caption: {
|
|
|
|
fontSize: "13px",
|
|
|
|
fontWeight: 500,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTextField: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.surfaceNeutralPlain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiInputBase: {
|
|
|
|
root: {
|
|
|
|
borderColor: vars.colors.border.neutralPlain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiOutlinedInput: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.surfaceNeutralPlain,
|
|
|
|
borderColor: vars.colors.border.neutralPlain,
|
|
|
|
color: vars.colors.foreground.textNeutralDefault,
|
|
|
|
"&:hover": {
|
|
|
|
boxShadow: "none !important",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiInputLabel: {
|
|
|
|
root: {
|
|
|
|
color: vars.colors.foreground.textNeutralDefault,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiCardHeader: {
|
|
|
|
root: {
|
|
|
|
paddingRight: vars.space[11],
|
|
|
|
backgroundColor: vars.colors.background.surfaceNeutralPlain,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
fontSize: vars.fontSize.bodyEmpLarge,
|
|
|
|
// MUI it strictly typed to be a number, but we are passing CSS variable here
|
|
|
|
fontWeight: vars.fontWeight.bodyEmpLarge as unknown as number,
|
|
|
|
lineHeight: vars.lineHeight.bodyEmpLarge,
|
|
|
|
letterSpacing: vars.letterSpacing.bodyEmpLarge,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiCardContent: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.plain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiPaper: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.plain,
|
|
|
|
color: vars.colors.foreground.textNeutralDefault,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTable: {
|
|
|
|
root: {
|
|
|
|
tableLayout: "auto !important" as "auto",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTableCell: {
|
|
|
|
root: {
|
|
|
|
borderBottomColor: vars.colors.border.neutralPlain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiIconButton: {
|
|
|
|
edgeEnd: {
|
|
|
|
marginRight: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiCardActions: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.plain,
|
|
|
|
paddingLeft: 0,
|
|
|
|
paddingRight: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiFormHelperText: {
|
|
|
|
root: {
|
|
|
|
backgroundColor: vars.colors.background.plain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiDialogTitle: {
|
|
|
|
root: {
|
|
|
|
fontSize: vars.fontSize.bodyEmpLarge,
|
|
|
|
// MUI it strictly typed to be a number, but we are passing CSS variable here
|
|
|
|
fontWeight: vars.fontWeight.bodyEmpLarge as unknown as number,
|
|
|
|
lineHeight: vars.lineHeight.bodyEmpLarge,
|
|
|
|
letterSpacing: vars.letterSpacing.bodyEmpLarge,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-07-21 08:59:52 +00:00
|
|
|
};
|
2022-10-06 08:15:16 +00:00
|
|
|
|
2023-02-20 15:21:28 +00:00
|
|
|
export const paletteOverrides: Themes = {
|
|
|
|
light: {
|
|
|
|
...light,
|
|
|
|
background: {
|
|
|
|
...light.background,
|
|
|
|
default: themes.defaultLight.colors.background.plain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dark: {
|
|
|
|
...dark,
|
|
|
|
background: {
|
|
|
|
...dark.background,
|
|
|
|
default: themes.defaultDark.colors.background.plain,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|