2022-05-02 15:52:41 +02:00
|
|
|
import { createTheme } from '@mui/material/styles';
|
2022-05-05 15:34:46 +02:00
|
|
|
import { colors } from './colors';
|
2023-03-22 15:37:40 +01:00
|
|
|
import { alpha } from '@mui/material';
|
|
|
|
import { focusable } from 'themes/themeStyles';
|
2022-05-02 15:52:41 +02:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
const theme = {
|
2022-05-13 14:51:22 +02:00
|
|
|
breakpoints: {
|
|
|
|
values: {
|
|
|
|
xs: 0,
|
|
|
|
sm: 600,
|
|
|
|
md: 960,
|
|
|
|
lg: 1260,
|
|
|
|
xl: 1536,
|
|
|
|
},
|
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
boxShadows: {
|
|
|
|
main: '0px 2px 4px rgba(129, 122, 254, 0.2)',
|
2022-07-22 09:31:08 +02:00
|
|
|
card: '0px 2px 10px rgba(28, 25, 78, 0.12)',
|
2022-05-25 23:26:05 +02:00
|
|
|
elevated: '0px 1px 20px rgba(45, 42, 89, 0.1)',
|
2022-10-03 11:49:52 +02:00
|
|
|
popup: '0px 2px 6px rgba(0, 0, 0, 0.25)',
|
|
|
|
primaryHeader: '0px 8px 24px rgba(97, 91, 194, 0.2)',
|
2023-03-22 15:37:40 +01:00
|
|
|
separator: '0px 2px 4px rgba(32, 32, 33, 0.12)', // Notifications header
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
|
|
|
typography: {
|
|
|
|
fontFamily: 'Sen, Roboto, sans-serif',
|
|
|
|
fontWeightBold: '700',
|
|
|
|
fontWeightMedium: '700',
|
|
|
|
allVariants: { lineHeight: 1.4 },
|
|
|
|
button: { lineHeight: 1.75 },
|
2022-05-05 15:34:46 +02:00
|
|
|
h1: {
|
|
|
|
fontSize: '1.5rem',
|
|
|
|
lineHeight: 1.875,
|
|
|
|
},
|
2022-11-02 16:05:27 +01:00
|
|
|
h2: {
|
|
|
|
fontSize: `${20 / 16}rem`,
|
|
|
|
fontWeight: '700',
|
|
|
|
},
|
2022-08-04 10:13:07 +02:00
|
|
|
h3: {
|
|
|
|
fontSize: '1rem',
|
|
|
|
fontWeight: '700',
|
|
|
|
},
|
2022-07-27 12:00:15 +02:00
|
|
|
caption: {
|
|
|
|
fontSize: `${12 / 16}rem`,
|
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
|
|
|
fontSizes: {
|
2023-01-18 10:10:41 +01:00
|
|
|
largeHeader: '2rem',
|
2022-05-09 12:01:12 +02:00
|
|
|
mainHeader: '1.25rem',
|
2022-05-02 15:52:41 +02:00
|
|
|
bodySize: '1rem',
|
2022-05-13 14:51:22 +02:00
|
|
|
smallBody: `${14 / 16}rem`,
|
|
|
|
smallerBody: `${12 / 16}rem`,
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
|
|
|
fontWeight: {
|
|
|
|
thin: 300,
|
|
|
|
medium: 400,
|
|
|
|
semi: 700,
|
|
|
|
bold: 700,
|
|
|
|
},
|
2022-05-09 12:01:12 +02:00
|
|
|
shape: {
|
2022-08-11 10:36:23 +02:00
|
|
|
borderRadius: 4,
|
|
|
|
borderRadiusMedium: 8,
|
|
|
|
borderRadiusLarge: 12,
|
|
|
|
borderRadiusExtraLarge: 20,
|
2022-05-25 16:39:14 +02:00
|
|
|
tableRowHeight: 64,
|
2022-05-27 08:57:30 +02:00
|
|
|
tableRowHeightCompact: 56,
|
2022-05-25 16:39:14 +02:00
|
|
|
tableRowHeightDense: 48,
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2022-05-02 15:52:41 +02:00
|
|
|
palette: {
|
2023-03-06 11:58:36 +01:00
|
|
|
common: {
|
2023-03-22 15:37:40 +01:00
|
|
|
white: colors.grey[50], // Tooltips text color // Switch base (OFF) // Text color
|
|
|
|
black: colors.grey[900], // Switch track (OFF)
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
text: {
|
|
|
|
primary: colors.grey[900],
|
|
|
|
secondary: colors.grey[800],
|
|
|
|
disabled: colors.grey[600],
|
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
primary: {
|
2022-05-05 15:34:46 +02:00
|
|
|
main: colors.purple[800],
|
|
|
|
light: colors.purple[700],
|
|
|
|
dark: colors.purple[900],
|
2023-03-06 11:58:36 +01:00
|
|
|
contrastText: colors.grey[50], // Color used for content when primary.main is used as a background
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
|
|
|
secondary: {
|
2023-03-06 11:58:36 +01:00
|
|
|
// Used for purple badges and puple light elements
|
2022-05-05 15:34:46 +02:00
|
|
|
main: colors.purple[800],
|
2023-03-22 15:37:40 +01:00
|
|
|
light: colors.purple[50],
|
|
|
|
dark: colors.purple[900], // Color used for text
|
2022-07-22 09:31:08 +02:00
|
|
|
border: colors.purple[300],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.purple[900], // Color used for text inside badge
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
2022-05-09 12:01:12 +02:00
|
|
|
info: {
|
2022-05-12 15:34:04 +02:00
|
|
|
main: colors.blue[500],
|
2023-03-22 15:37:40 +01:00
|
|
|
light: colors.blue[50],
|
|
|
|
dark: colors.blue[800], // Color used for text
|
2022-05-25 23:26:05 +02:00
|
|
|
border: colors.blue[200],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.blue[800], // Color used for text inside alert
|
2022-05-09 12:01:12 +02:00
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
success: {
|
2022-06-02 09:21:51 +02:00
|
|
|
main: colors.green[600],
|
2023-03-22 15:37:40 +01:00
|
|
|
light: colors.green[50],
|
|
|
|
dark: colors.green[800], // Color used for text
|
2022-05-25 23:26:05 +02:00
|
|
|
border: colors.green[300],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.green[800], // Color used for text inside alert
|
2022-05-05 15:34:46 +02:00
|
|
|
},
|
|
|
|
warning: {
|
2022-05-12 15:34:04 +02:00
|
|
|
main: colors.orange[800],
|
2023-03-22 15:37:40 +01:00
|
|
|
light: colors.orange[100],
|
|
|
|
dark: colors.orange[900], // Color used for text
|
2022-05-25 23:26:05 +02:00
|
|
|
border: colors.orange[500],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.orange[900], // Color used for text inside alert
|
2022-05-05 15:34:46 +02:00
|
|
|
},
|
|
|
|
error: {
|
2023-03-22 15:37:40 +01:00
|
|
|
main: colors.red[700], // used on error buttons // used on icons on these elements
|
2022-05-12 15:34:04 +02:00
|
|
|
light: colors.red[50],
|
2023-03-22 15:37:40 +01:00
|
|
|
dark: colors.red[800], // Color used for text
|
2022-05-25 23:26:05 +02:00
|
|
|
border: colors.red[300],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.red[800], // Color used for text inside alert
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for grey badges, hover elements, and grey light elements
|
|
|
|
*/
|
2022-07-22 09:31:08 +02:00
|
|
|
neutral: {
|
|
|
|
main: colors.grey[700],
|
2023-03-22 15:37:40 +01:00
|
|
|
light: colors.grey[100],
|
2022-07-22 09:31:08 +02:00
|
|
|
dark: colors.grey[800],
|
2023-03-06 11:58:36 +01:00
|
|
|
border: colors.grey[400],
|
2023-03-22 15:37:40 +01:00
|
|
|
contrastText: colors.grey[800], // Color used for text inside badge
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
background: {
|
|
|
|
paper: colors.grey[50],
|
|
|
|
default: colors.grey[50],
|
|
|
|
application: colors.grey[300],
|
|
|
|
sidebar: colors.purple[800],
|
2023-03-22 15:37:40 +01:00
|
|
|
alternative: colors.purple[800], // used on the dark theme to shwitch primary main to a darker shade
|
2023-03-06 11:58:36 +01:00
|
|
|
elevation1: colors.grey[100],
|
|
|
|
elevation2: colors.grey[200],
|
2022-05-06 12:21:31 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
action: {
|
|
|
|
// Colors used for Icons and Buttons -> this comes from MUI and we overwriting it with our colors
|
|
|
|
active: colors.action[0.54],
|
|
|
|
hover: colors.action[0.05],
|
|
|
|
hoverOpacity: 0.05,
|
|
|
|
selected: colors.action[0.08],
|
|
|
|
selectedOpacity: 0.08,
|
|
|
|
disabled: colors.action[0.32],
|
|
|
|
disabledBackground: colors.action[0.12],
|
|
|
|
disabledOpacity: 0.38,
|
|
|
|
focus: colors.action[0.12],
|
|
|
|
focusOpacity: 0.12,
|
|
|
|
activatedOpacity: 0.12,
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* General divider
|
|
|
|
*/
|
|
|
|
divider: colors.grey[400],
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Table colors.
|
|
|
|
*/
|
|
|
|
table: {
|
|
|
|
headerBackground: colors.grey[200],
|
|
|
|
headerHover: colors.grey[300],
|
|
|
|
divider: colors.grey[300],
|
|
|
|
rowHover: colors.grey[100],
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2023-03-22 15:37:40 +01:00
|
|
|
* Text highlight effect color. Used when filtering/searching over content
|
2023-03-06 11:58:36 +01:00
|
|
|
*/
|
|
|
|
highlight: colors.orange[200],
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Background color used for the API command in the sidebar
|
|
|
|
*/
|
|
|
|
codebox: colors.action[0.12],
|
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
/**
|
|
|
|
* Links color
|
|
|
|
*/
|
|
|
|
links: colors.purple[900],
|
|
|
|
|
2023-03-06 11:58:36 +01:00
|
|
|
/**
|
|
|
|
* Gradient for the login page
|
|
|
|
*/
|
|
|
|
loginGradient: {
|
|
|
|
from: colors.purple[800],
|
|
|
|
to: colors.purple[950],
|
2022-05-06 12:21:31 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
/**
|
2023-03-22 15:37:40 +01:00
|
|
|
* Colors for event log output
|
2023-03-06 11:58:36 +01:00
|
|
|
*/
|
|
|
|
eventLog: {
|
|
|
|
diffAdd: colors.green[800],
|
|
|
|
diffSub: colors.red[800],
|
|
|
|
edited: colors.grey[900],
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2023-03-22 15:37:40 +01:00
|
|
|
* For 'Seen' column on feature toggles list and other
|
2023-03-06 11:58:36 +01:00
|
|
|
*/
|
|
|
|
seen: {
|
2022-05-09 12:01:12 +02:00
|
|
|
unknown: colors.grey[100],
|
|
|
|
recent: colors.green[100],
|
|
|
|
inactive: colors.orange[200],
|
|
|
|
abandoned: colors.red[200],
|
2022-08-04 10:13:07 +02:00
|
|
|
primary: colors.purple[100],
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
2023-03-22 15:37:40 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* For Environment Accordion.
|
|
|
|
*/
|
|
|
|
envAccordion: {
|
|
|
|
disabled: colors.grey[100],
|
|
|
|
expanded: colors.grey[200],
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MUI grey colors
|
|
|
|
*/
|
|
|
|
grey: {
|
|
|
|
// This was to see were these colors are used from MUI
|
|
|
|
// 50: '#A6000E',
|
|
|
|
100: colors.grey[100], // Disabled Switch base (OFF)
|
|
|
|
// 200: '#A6000E',
|
|
|
|
// 300: '#A6000E',
|
|
|
|
// 400: '#A6000E',
|
|
|
|
// 500: '#A6000E',
|
|
|
|
600: colors.grey[800], // slider tooltip background
|
|
|
|
700: colors.grey[800], // Dark tooltip background
|
|
|
|
// 800: '#A6000E',
|
|
|
|
// 900: '#A6000E',
|
|
|
|
// A100: '#A6000E',
|
|
|
|
// A200: '#A6000E',
|
|
|
|
// A400: '#A6000E',
|
|
|
|
// A700: '#A6000E',
|
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
},
|
2023-03-22 15:37:40 +01:00
|
|
|
};
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
export default createTheme({
|
|
|
|
...theme,
|
2022-05-05 15:34:46 +02:00
|
|
|
components: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// Skeleton
|
|
|
|
MuiCssBaseline: {
|
|
|
|
styleOverrides: {
|
|
|
|
'.skeleton': {
|
|
|
|
'&::before': {
|
|
|
|
backgroundColor: theme.palette.background.elevation1,
|
|
|
|
},
|
|
|
|
'&::after': {
|
|
|
|
background:
|
|
|
|
'linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 100%, rgba(255, 255, 255, 0.5) 100%, rgba(255, 255, 255, 0))',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
a: {
|
|
|
|
color: theme.palette.links,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-03-06 11:58:36 +01:00
|
|
|
// Links
|
2022-05-06 12:21:31 +02:00
|
|
|
MuiLink: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2023-03-22 15:37:40 +01:00
|
|
|
...focusable(theme),
|
|
|
|
color: theme.palette.links,
|
2022-05-12 15:34:04 +02:00
|
|
|
'&:hover': {
|
|
|
|
textDecoration: 'none',
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-06 12:21:31 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Breadcrumb
|
2022-05-09 12:01:12 +02:00
|
|
|
MuiBreadcrumbs: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
color: theme.palette.text.primary,
|
2022-05-12 15:34:04 +02:00
|
|
|
fontSize: '0.875rem',
|
2022-05-09 12:01:12 +02:00
|
|
|
'& a': {
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.links,
|
2023-01-16 13:09:38 +01:00
|
|
|
textDecoration: 'none',
|
2022-05-12 15:34:04 +02:00
|
|
|
'&:hover': {
|
2023-01-16 13:09:38 +01:00
|
|
|
textDecoration: 'underline',
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
2022-05-09 12:01:12 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-09 12:01:12 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Tables
|
2022-05-09 14:38:12 +02:00
|
|
|
MuiTableHead: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2022-05-13 14:51:22 +02:00
|
|
|
'& th': {
|
2023-03-06 11:58:36 +01:00
|
|
|
height: theme.shape.tableRowHeightCompact,
|
|
|
|
backgroundColor: theme.palette.table.headerBackground,
|
|
|
|
border: 0,
|
|
|
|
'&:first-of-type': {
|
|
|
|
borderTopLeftRadius: theme.shape.borderRadiusMedium,
|
|
|
|
borderBottomLeftRadius:
|
|
|
|
theme.shape.borderRadiusMedium,
|
|
|
|
},
|
|
|
|
'&:last-of-type': {
|
|
|
|
borderTopRightRadius:
|
|
|
|
theme.shape.borderRadiusMedium,
|
|
|
|
borderBottomRightRadius:
|
|
|
|
theme.shape.borderRadiusMedium,
|
|
|
|
},
|
2022-05-13 14:51:22 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-09 14:38:12 +02:00
|
|
|
},
|
|
|
|
},
|
2022-05-09 12:01:12 +02:00
|
|
|
MuiTableRow: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
'&.MuiTableRow-root:hover': {
|
|
|
|
//Not all the tables have row hover background. This will add background color on row hover for all the tables
|
|
|
|
background: theme.palette.table.rowHover, //overwrite action.hover
|
2022-05-09 12:01:12 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-09 12:01:12 +02:00
|
|
|
},
|
|
|
|
},
|
2022-05-09 14:38:12 +02:00
|
|
|
MuiTableCell: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
borderBottomColor: theme.palette.table.divider,
|
|
|
|
}),
|
2022-05-09 14:38:12 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Alerts
|
2022-05-12 15:34:04 +02:00
|
|
|
MuiAlert: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2023-03-22 15:37:40 +01:00
|
|
|
padding: theme.spacing(2, 3),
|
2023-03-06 11:58:36 +01:00
|
|
|
borderRadius: theme.shape.borderRadiusMedium,
|
2022-05-12 15:34:04 +02:00
|
|
|
a: {
|
|
|
|
color: 'inherit',
|
|
|
|
},
|
2023-03-22 15:37:40 +01:00
|
|
|
'> .MuiAlert-icon': {
|
|
|
|
padding: 0,
|
|
|
|
opacity: 1,
|
|
|
|
fontSize: '24px',
|
|
|
|
},
|
|
|
|
'> .MuiAlert-message': {
|
|
|
|
padding: '3px 0 0 0',
|
|
|
|
},
|
2022-05-12 15:34:04 +02:00
|
|
|
'&.MuiAlert-standardInfo': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.info.light,
|
|
|
|
color: theme.palette.info.dark,
|
|
|
|
border: `1px solid ${theme.palette.info.border}`,
|
2022-05-12 15:34:04 +02:00
|
|
|
'& .MuiAlert-icon': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.info.main,
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardSuccess': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.success.light,
|
|
|
|
color: theme.palette.success.dark,
|
|
|
|
border: `1px solid ${theme.palette.success.border}`,
|
2022-05-12 15:34:04 +02:00
|
|
|
'& .MuiAlert-icon': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.success.main,
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardWarning': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.warning.light,
|
|
|
|
color: theme.palette.warning.dark,
|
|
|
|
border: `1px solid ${theme.palette.warning.border}`,
|
2022-05-12 15:34:04 +02:00
|
|
|
'& .MuiAlert-icon': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.warning.main,
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardError': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.error.light,
|
|
|
|
color: theme.palette.error.dark,
|
|
|
|
border: `1px solid ${theme.palette.error.border}`,
|
2022-05-12 15:34:04 +02:00
|
|
|
'& .MuiAlert-icon': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.error.main,
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Horizontal menu tabs
|
2022-05-12 15:34:04 +02:00
|
|
|
MuiTabs: {
|
|
|
|
styleOverrides: {
|
2022-09-06 14:32:42 +02:00
|
|
|
root: ({ theme }) => ({
|
2022-05-12 15:34:04 +02:00
|
|
|
'& .MuiTabs-indicator': {
|
|
|
|
height: '4px',
|
|
|
|
},
|
2022-09-06 14:32:42 +02:00
|
|
|
'& .MuiTabs-flexContainer': {
|
|
|
|
minHeight: '70px',
|
|
|
|
maxHeight: '70px',
|
|
|
|
},
|
|
|
|
}),
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTab: {
|
|
|
|
styleOverrides: {
|
2022-09-06 14:32:42 +02:00
|
|
|
root: ({ theme }) => ({
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.text.primary,
|
2022-05-12 15:34:04 +02:00
|
|
|
fontSize: '1rem',
|
|
|
|
textTransform: 'none',
|
|
|
|
fontWeight: 400,
|
2022-09-06 14:32:42 +02:00
|
|
|
lineHeight: '1',
|
2022-05-12 15:34:04 +02:00
|
|
|
minHeight: '62px',
|
|
|
|
'&:hover': {
|
2023-03-22 15:37:40 +01:00
|
|
|
backgroundColor: theme.palette.action.hover,
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
'&.Mui-selected': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.text.primary,
|
2022-05-12 15:34:04 +02:00
|
|
|
fontWeight: 700,
|
|
|
|
},
|
|
|
|
'& > span': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.primary.main, //Based on this color is created the focus color/effect
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
2022-09-06 14:32:42 +02:00
|
|
|
[theme.breakpoints.down('md')]: {
|
|
|
|
padding: '12px 0px',
|
|
|
|
},
|
|
|
|
}),
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Environment accordion
|
2022-08-04 14:44:18 +02:00
|
|
|
MuiAccordion: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
'&:first-of-type, &:last-of-type': {
|
2023-03-22 15:37:40 +01:00
|
|
|
borderRadius: theme.shape.borderRadiusLarge,
|
|
|
|
},
|
|
|
|
'&.environment-accordion.Mui-expanded': {
|
|
|
|
outline: `2px solid ${alpha(
|
|
|
|
theme.palette.background.alternative,
|
|
|
|
0.6
|
|
|
|
)}`,
|
|
|
|
boxShadow: `0px 2px 8px ${alpha(
|
|
|
|
theme.palette.primary.main,
|
|
|
|
0.2
|
|
|
|
)}`,
|
2022-08-04 14:44:18 +02:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
2022-05-12 15:34:04 +02:00
|
|
|
MuiAccordionSummary: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: {
|
|
|
|
'& > .MuiAccordionSummary-content.Mui-expanded': {
|
|
|
|
margin: '12px 0',
|
|
|
|
},
|
2022-08-04 14:44:18 +02:00
|
|
|
'&.Mui-expanded': {
|
|
|
|
minHeight: '0',
|
|
|
|
},
|
2022-05-12 15:34:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Project overview, improve switch (OFF - state) focus effect color
|
2022-05-18 11:56:55 +02:00
|
|
|
MuiSwitch: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2022-05-18 11:56:55 +02:00
|
|
|
zIndex: 1,
|
2023-03-22 15:37:40 +01:00
|
|
|
'.MuiSwitch-switchBase:not(.Mui-checked) .MuiTouchRipple-child':
|
|
|
|
{
|
|
|
|
color: theme.palette.action.disabled,
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-05-20 10:29:23 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Overwiteing the action.disabledOpacity from MUI
|
2022-06-10 16:09:50 +02:00
|
|
|
MuiMenuItem: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: {
|
|
|
|
'&.Mui-disabled': {
|
|
|
|
opacity: 0.66,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Inputs background - This is used when we have inputs on a grey background (e.g. edit contstraints, playground)
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiInputBase: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
backgroundColor: theme.palette.background.paper,
|
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Top menu text color
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiAppBar: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
color: theme.palette.text.primary,
|
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2022-05-05 15:34:46 +02:00
|
|
|
},
|
2022-05-02 15:52:41 +02:00
|
|
|
});
|