2022-08-23 14:20:02 +02:00
|
|
|
import { createTheme } from '@mui/material/styles';
|
2023-03-22 15:37:40 +01:00
|
|
|
import { alpha } from '@mui/material';
|
|
|
|
import { focusable } from 'themes/themeStyles';
|
2023-07-26 11:36:16 +02:00
|
|
|
import { colors } from './colors';
|
2022-08-23 14:20:02 +02:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
const actionColors = {
|
|
|
|
0.54: 'rgba(223, 222, 255, 0.54)',
|
|
|
|
0.32: 'rgba(223, 222, 255, 0.32)',
|
|
|
|
0.12: 'rgba(223, 222, 255, 0.12)',
|
|
|
|
0.08: 'rgba(223, 222, 255, 0.08)',
|
|
|
|
0.05: 'rgba(223, 222, 255, 0.05)',
|
|
|
|
};
|
|
|
|
|
|
|
|
const theme = {
|
2022-08-23 14:20:02 +02:00
|
|
|
breakpoints: {
|
|
|
|
values: {
|
|
|
|
xs: 0,
|
|
|
|
sm: 600,
|
|
|
|
md: 960,
|
2023-08-27 19:36:02 +02:00
|
|
|
lg: 1280,
|
2022-08-23 14:20:02 +02:00
|
|
|
xl: 1536,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
boxShadows: {
|
|
|
|
main: '0px 2px 4px rgba(129, 122, 254, 0.2)',
|
|
|
|
card: '0px 2px 10px rgba(28, 25, 78, 0.12)',
|
|
|
|
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
|
2024-04-29 11:51:44 +02:00
|
|
|
accordionFooter: 'inset 0px 2px 4px rgba(32, 32, 33, 0.05)',
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
typography: {
|
|
|
|
fontFamily: 'Sen, Roboto, sans-serif',
|
|
|
|
fontWeightBold: '700',
|
|
|
|
fontWeightMedium: '700',
|
|
|
|
allVariants: { lineHeight: 1.4 },
|
|
|
|
button: { lineHeight: 1.75 },
|
|
|
|
h1: {
|
|
|
|
fontSize: '1.5rem',
|
|
|
|
lineHeight: 1.875,
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
h2: {
|
|
|
|
fontSize: `${20 / 16}rem`,
|
|
|
|
fontWeight: '700',
|
|
|
|
},
|
2022-08-23 14:20:02 +02:00
|
|
|
h3: {
|
|
|
|
fontSize: '1rem',
|
|
|
|
fontWeight: '700',
|
|
|
|
},
|
2023-09-14 14:01:29 +02:00
|
|
|
h4: {
|
|
|
|
fontSize: '1rem',
|
|
|
|
fontWeight: '400',
|
|
|
|
},
|
2022-08-23 14:20:02 +02:00
|
|
|
caption: {
|
|
|
|
fontSize: `${12 / 16}rem`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fontSizes: {
|
2024-01-25 14:43:59 +01:00
|
|
|
extraLargeHeader: '2.5rem',
|
2023-03-06 11:58:36 +01:00
|
|
|
largeHeader: '2rem',
|
2024-04-18 10:55:15 +02:00
|
|
|
mediumHeader: '1.5rem',
|
2022-08-23 14:20:02 +02:00
|
|
|
mainHeader: '1.25rem',
|
|
|
|
bodySize: '1rem',
|
|
|
|
smallBody: `${14 / 16}rem`,
|
|
|
|
smallerBody: `${12 / 16}rem`,
|
|
|
|
},
|
|
|
|
fontWeight: {
|
|
|
|
thin: 300,
|
|
|
|
medium: 400,
|
|
|
|
semi: 700,
|
|
|
|
bold: 700,
|
|
|
|
},
|
|
|
|
shape: {
|
|
|
|
borderRadius: 4,
|
|
|
|
borderRadiusMedium: 8,
|
|
|
|
borderRadiusLarge: 12,
|
|
|
|
borderRadiusExtraLarge: 20,
|
|
|
|
tableRowHeight: 64,
|
|
|
|
tableRowHeightCompact: 56,
|
|
|
|
tableRowHeightDense: 48,
|
|
|
|
},
|
2023-05-11 20:01:08 +02:00
|
|
|
zIndex: {
|
2023-05-25 19:28:08 +02:00
|
|
|
sticky: 1400,
|
2023-05-11 20:01:08 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2022-08-23 14:20:02 +02:00
|
|
|
palette: {
|
2023-03-06 11:58:36 +01:00
|
|
|
common: {
|
2023-03-22 15:37:40 +01:00
|
|
|
white: '#EEEEFC', // Switch base (OFF) // Tooltips text color // Text color
|
|
|
|
black: '#A0A0B1', // Switch track (OFF)
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
text: {
|
2023-03-22 15:37:40 +01:00
|
|
|
primary: '#EEEEFC',
|
|
|
|
secondary: '#A0A0B1',
|
|
|
|
disabled: '#888799',
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
2022-08-23 14:20:02 +02:00
|
|
|
primary: {
|
2023-03-22 15:37:40 +01:00
|
|
|
main: '#9792ED',
|
|
|
|
light: '#4C4992',
|
|
|
|
// Maybe to move links color to another variable????
|
|
|
|
dark: '#9792ED', // Color used for links and on hover for primary buttons
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when primary.main is used as a background
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
secondary: {
|
2023-03-06 11:58:36 +01:00
|
|
|
// Used for purple badges and puple light elements
|
2023-03-30 17:57:35 +02:00
|
|
|
main: '#9792ED', // used on icons on these elements
|
2023-03-22 15:37:40 +01:00
|
|
|
light: '#34325E', // used as a bakground on these elements
|
|
|
|
dark: '#EEEEFC', // used for text on these elements
|
|
|
|
border: '#4C4992',
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when info.main is used as a background
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
info: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// main: '#5483C9', // used on icons on these elements
|
|
|
|
main: '#a2bbe2', // used on icons on these elements
|
|
|
|
light: '#1A2641', // used as a bakground on these elements
|
|
|
|
dark: '#a2bbe2', // used for text on these elements
|
|
|
|
border: '#1B407A',
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when info.main is used as a background
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
success: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// main: '#62872F', // used on icons on these elements
|
|
|
|
main: '#94ae6f', // used on icons on these elements
|
|
|
|
light: '#333D30', // used as a bakground on these elements
|
|
|
|
dark: '#94ae6f', // used for text on these elements
|
|
|
|
border: '#3D600C',
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when success.main is used as a background
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
warning: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// main: '#9E691C', // used on icons on these elements
|
|
|
|
main: '#bc7d21', // used on icons on these elements
|
|
|
|
light: '#3B302C', // used as a bakground on these elements
|
|
|
|
dark: '#bc7d21', // used for text on these elements
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when warning.main is used as a background
|
|
|
|
border: '#6C4A19',
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
error: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// main: '#B93F4A', // used on error buttons // used on icons on these elements
|
|
|
|
main: '#ff6472', // used on error buttons // used on icons on these elements
|
|
|
|
light: '#3F2835', // used as a bakground on these elements
|
|
|
|
// dark: '#F15260', // used for text on these elements
|
|
|
|
dark: '#ff6472', // used for text on these elements
|
|
|
|
border: '#8A3E45',
|
|
|
|
contrastText: '#EEEEFC', // Color used for content when error.main is used as a background
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
2023-04-27 09:15:17 +02:00
|
|
|
web: {
|
|
|
|
main: '#1A4049', // used on sales-related elements
|
|
|
|
contrastText: '#EEEEFC', // Color used for inner text
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for grey badges, hover elements, and grey light elements
|
|
|
|
*/
|
2022-08-23 14:20:02 +02:00
|
|
|
neutral: {
|
2023-03-22 15:37:40 +01:00
|
|
|
main: '#858699', // used on icons on these elements
|
|
|
|
light: '#2B2A3C', // used as a bakground on these elements
|
|
|
|
dark: '#EEEEFC', // used for text on these elements
|
|
|
|
border: '#454360',
|
|
|
|
contrastText: '#EEEEFC', // Color used for text inside badge
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
background: {
|
2023-03-22 15:37:40 +01:00
|
|
|
paper: '#222130', // Background color for all containers
|
|
|
|
default: '#222130',
|
|
|
|
application: '#1A1924',
|
|
|
|
sidebar: '#4C4992',
|
|
|
|
alternative: '#4C4992', // used on the dark theme to shwitch primary main to a darker shade
|
|
|
|
elevation1: '#2B2A3C',
|
|
|
|
elevation2: '#2B2A3C',
|
|
|
|
// elevation2: '#302E42',
|
2022-08-23 14:20:02 +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
|
2023-03-22 15:37:40 +01:00
|
|
|
active: actionColors[0.54],
|
|
|
|
hover: actionColors[0.05],
|
2023-03-06 11:58:36 +01:00
|
|
|
hoverOpacity: 0.05,
|
2023-03-22 15:37:40 +01:00
|
|
|
selected: actionColors[0.08],
|
2023-03-06 11:58:36 +01:00
|
|
|
selectedOpacity: 0.08,
|
2023-03-22 15:37:40 +01:00
|
|
|
disabled: actionColors[0.32],
|
|
|
|
disabledBackground: actionColors[0.12],
|
2023-03-06 11:58:36 +01:00
|
|
|
disabledOpacity: 0.38,
|
2023-03-22 15:37:40 +01:00
|
|
|
focus: actionColors[0.12],
|
2023-03-06 11:58:36 +01:00
|
|
|
focusOpacity: 0.12,
|
|
|
|
activatedOpacity: 0.12,
|
feat: add "my projects" filter to projects list (#6831)
This PR adds the buttons (only UI, no functionality) to show either "all
projects" or "my projects".
The buttons use a styled button group and are hidden behind the new
`projectListFilterMyProjects` flag.
The button placement breaks with the previously established page header
pattern of having all actions moved to the right. To accommodate this
new placement, I created a new flex container in the header called
`leftActions`, which is essentially just a mirror of the normal actions.
I went with `leftActions` instead of `inlineStartActions` or something
similar because I think it's clearer, and I don't see us adapting
Unleash for different writing directions right now. We can always change
it later.
I have also slightly increased the end margin of the page header to
accommodate the new designs and to adjust the spacing before the
buttons. I adjusted the margin of the text instead of the padding of the
left actions because this will keep the spacing to the page header the
same on every page. Without it, we could end up in situations where the
spacing changes from page to page based on whether it has left actions
or not, which is probably undesirable.
![image](https://github.com/Unleash/unleash/assets/17786332/7d6ba98c-a34b-45d4-85f4-2b1c2f3dc0c8)
## Still to do:
### Hover colors
~~Find out what the right hover color variable is. I'm using the light
mode hover color for now, which works well in both light and dark modes
(looks nice and is AAccessible), but it's not the same as the hover
color for other buttons in dark mode.~~
Fixed ☝🏼
### Small windows
Also worth noting: at around 500px, the layout shift starts to cause
problems and we end up with overlapping elements. How do we want to deal
with narrower screens? Today, the UI is pretty functional until we reach
about 250px. It would be nice to not increase that size.
The new version breaking at about 500px:
![image](https://github.com/Unleash/unleash/assets/17786332/bf4f70d7-13b7-410a-9de4-30f4873a2ab8)
The old version breaking at about 250px:
![image](https://github.com/Unleash/unleash/assets/17786332/2d4e1e9c-8442-471c-91e4-67c024736234)
### Margins
We also need to figure out how much space we want on smaller windows:
![image](https://github.com/Unleash/unleash/assets/17786332/b12804b1-a2db-4547-88d5-0d9d49221fe2)
2024-04-12 12:35:47 +02:00
|
|
|
alternative: colors.purple[1000],
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* General divider
|
|
|
|
*/
|
2023-03-22 15:37:40 +01:00
|
|
|
divider: '#39384C',
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Table colors.
|
|
|
|
*/
|
|
|
|
table: {
|
2023-03-22 15:37:40 +01:00
|
|
|
headerBackground: '#2B2A3C',
|
|
|
|
headerHover: '#313045',
|
|
|
|
divider: '#323144',
|
|
|
|
rowHover: '#262536',
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
*/
|
2023-03-22 15:37:40 +01:00
|
|
|
highlight: 'rgba(255, 234, 204, 0.7)',
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-05-03 20:47:35 +02:00
|
|
|
/**
|
|
|
|
* Used for the interactive guide spotlight
|
|
|
|
*/
|
|
|
|
spotlight: {
|
|
|
|
border: '#8c89bf',
|
|
|
|
outline: '#bcb9f3',
|
|
|
|
pulse: '#bcb9f3',
|
|
|
|
},
|
|
|
|
|
2023-03-06 11:58:36 +01:00
|
|
|
/**
|
|
|
|
* Background color used for the API command in the sidebar
|
|
|
|
*/
|
2023-03-22 15:37:40 +01:00
|
|
|
codebox: 'rgba(52, 50, 94, 0.3)',
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Links color
|
|
|
|
*/
|
|
|
|
links: '#9792ED',
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gradient for the login page
|
|
|
|
*/
|
|
|
|
loginGradient: {
|
2023-03-22 15:37:40 +01:00
|
|
|
from: '#4C4992',
|
|
|
|
to: '#4944a7',
|
2022-08-23 14:20:02 +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: {
|
2023-03-22 15:37:40 +01:00
|
|
|
diffAdd: '#77AB2E',
|
|
|
|
diffSub: '#df626c',
|
|
|
|
edited: '#EEEEFC',
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2024-05-23 12:19:49 +02:00
|
|
|
* For 'Seen' column on feature flags list and other
|
2023-03-06 11:58:36 +01:00
|
|
|
*/
|
|
|
|
seen: {
|
2023-03-22 15:37:40 +01:00
|
|
|
unknown: '#2B2A3C',
|
|
|
|
recent: '#4E6131',
|
|
|
|
inactive: '#875D21',
|
|
|
|
abandoned: '#8A3E45',
|
|
|
|
primary: '#302E42',
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For Environment Accordion
|
|
|
|
*/
|
|
|
|
envAccordion: {
|
|
|
|
disabled: '#2B2A3C',
|
|
|
|
expanded: '#1A1924',
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MUI grey colors
|
|
|
|
*/
|
|
|
|
grey: {
|
|
|
|
// This was to see were these colors are used from MUI
|
|
|
|
// 50: '#A6000E',
|
|
|
|
100: '#888799', // Disabled Switch base (OFF)
|
|
|
|
// 200: '#A6000E',
|
|
|
|
// 300: '#A6000E',
|
|
|
|
// 400: '#A6000E',
|
|
|
|
// 500: '#A6000E',
|
|
|
|
600: '#343348', // slider tooltip background
|
|
|
|
700: '#343348', // Dark tooltip background
|
|
|
|
// 800: '#A6000E',
|
|
|
|
// 900: '#A6000E',
|
|
|
|
// A100: '#A6000E',
|
|
|
|
// A200: '#A6000E',
|
|
|
|
// A400: '#A6000E',
|
|
|
|
// A700: '#A6000E',
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
2023-07-26 11:36:16 +02:00
|
|
|
variants: colors.variants,
|
2024-02-14 13:32:12 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Dashboard and charts
|
|
|
|
*/
|
|
|
|
charts: {
|
|
|
|
gauge: {
|
|
|
|
gradientStart: '#4C4992',
|
|
|
|
gradientEnd: '#9792ED',
|
|
|
|
background: '#39384C',
|
|
|
|
sectionLine: '#8c89bf',
|
|
|
|
text: colors.grey[800],
|
|
|
|
},
|
2024-02-23 09:05:59 +01:00
|
|
|
health: {
|
|
|
|
mainCircleBackground: '#34325E',
|
|
|
|
orbit: '#4C4992',
|
|
|
|
circles: '#2B2A3C',
|
|
|
|
text: colors.grey[500],
|
|
|
|
title: colors.grey[50],
|
|
|
|
healthy: colors.purple[800],
|
|
|
|
stale: colors.red[800],
|
2024-02-28 08:58:27 +01:00
|
|
|
potentiallyStale: colors.orange[800],
|
2024-02-23 09:05:59 +01:00
|
|
|
gradientStale: '#8A3E45',
|
2024-02-28 08:58:27 +01:00
|
|
|
gradientPotentiallyStale: '#875D21',
|
2024-02-23 09:05:59 +01:00
|
|
|
},
|
2024-03-13 10:46:32 +01:00
|
|
|
series: colors.chartSeries,
|
2024-02-14 13:32:12 +01:00
|
|
|
},
|
2023-03-06 11:58:36 +01: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,
|
2023-03-06 11:58:36 +01:00
|
|
|
components: {
|
2023-03-22 15:37:40 +01:00
|
|
|
// Skeleton
|
|
|
|
MuiCssBaseline: {
|
|
|
|
styleOverrides: {
|
2023-05-03 20:47:35 +02:00
|
|
|
'#react-joyride-portal ~ .MuiDialog-root': {
|
2023-05-25 19:28:08 +02:00
|
|
|
zIndex: 1399,
|
2023-05-03 20:47:35 +02:00
|
|
|
},
|
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
'.skeleton': {
|
|
|
|
'&::before': {
|
|
|
|
backgroundColor: theme.palette.background.elevation1,
|
|
|
|
},
|
|
|
|
'&::after': {
|
|
|
|
background:
|
|
|
|
'linear-gradient(90deg, rgba(223, 222, 255, 0) 0, rgba(223, 222, 255, 0.2) 100%, rgba(223, 222, 255, 0.5) 100%, rgba(223, 222, 255, 0))',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
a: {
|
|
|
|
color: theme.palette.links,
|
|
|
|
},
|
|
|
|
'.dropdown-outline, .MuiAutocomplete-popper': {
|
|
|
|
// used for user dropdown, autocomplete, and change request primary button dropdown, notifications dropdown
|
|
|
|
outline: `1px solid ${theme.palette.divider}`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-03-06 11:58:36 +01:00
|
|
|
// Links
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
'&:hover': {
|
|
|
|
textDecoration: 'none',
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Breadcrumb
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiBreadcrumbs: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
color: theme.palette.text.primary,
|
2022-08-23 14:20:02 +02:00
|
|
|
fontSize: '0.875rem',
|
|
|
|
'& a': {
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.links,
|
2023-03-06 11:58:36 +01:00
|
|
|
textDecoration: 'none',
|
2022-08-23 14:20:02 +02:00
|
|
|
'&:hover': {
|
2023-03-06 11:58:36 +01:00
|
|
|
textDecoration: 'underline',
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Tables
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiTableHead: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTableCell: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
borderBottomColor: theme.palette.table.divider,
|
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Alerts
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
'&.MuiAlert-standardInfo': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.info.light,
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.info.contrastText,
|
2023-03-06 11:58:36 +01:00
|
|
|
border: `1px solid ${theme.palette.info.border}`,
|
|
|
|
'& .MuiAlert-icon': {
|
|
|
|
color: theme.palette.info.main,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardSuccess': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.success.light,
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.success.contrastText,
|
2023-03-06 11:58:36 +01:00
|
|
|
border: `1px solid ${theme.palette.success.border}`,
|
|
|
|
'& .MuiAlert-icon': {
|
|
|
|
color: theme.palette.success.main,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardWarning': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.warning.light,
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.warning.contrastText,
|
2023-03-06 11:58:36 +01:00
|
|
|
border: `1px solid ${theme.palette.warning.border}`,
|
|
|
|
'& .MuiAlert-icon': {
|
|
|
|
color: theme.palette.warning.main,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'&.MuiAlert-standardError': {
|
2023-03-06 11:58:36 +01:00
|
|
|
backgroundColor: theme.palette.error.light,
|
2023-03-22 15:37:40 +01:00
|
|
|
color: theme.palette.error.contrastText,
|
2023-03-06 11:58:36 +01:00
|
|
|
border: `1px solid ${theme.palette.error.border}`,
|
|
|
|
'& .MuiAlert-icon': {
|
|
|
|
color: theme.palette.error.main,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
|
|
|
// Horizontal menu tabs
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiTabs: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2022-08-23 14:20:02 +02:00
|
|
|
'& .MuiTabs-indicator': {
|
2023-03-22 15:37:40 +01:00
|
|
|
backgroundColor: theme.palette.background.alternative,
|
2022-08-23 14:20:02 +02:00
|
|
|
height: '4px',
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
'& .MuiTabs-flexContainer': {
|
|
|
|
minHeight: '70px',
|
|
|
|
maxHeight: '70px',
|
|
|
|
},
|
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiTab: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
color: theme.palette.text.primary,
|
2022-08-23 14:20:02 +02:00
|
|
|
fontSize: '1rem',
|
|
|
|
textTransform: 'none',
|
|
|
|
fontWeight: 400,
|
2023-03-06 11:58:36 +01:00
|
|
|
lineHeight: '1',
|
2022-08-23 14:20:02 +02:00
|
|
|
minHeight: '62px',
|
|
|
|
'&:hover': {
|
2023-03-22 15:37:40 +01:00
|
|
|
backgroundColor: theme.palette.action.hover,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
'&.Mui-selected': {
|
2023-03-06 11:58:36 +01:00
|
|
|
color: theme.palette.text.primary,
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
[theme.breakpoints.down('md')]: {
|
|
|
|
padding: '12px 0px',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Environment accordion
|
2023-03-06 11:58:36 +01:00
|
|
|
MuiAccordion: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
'&:first-of-type, &:last-of-type': {
|
2023-03-22 15:37:40 +01:00
|
|
|
borderRadius: theme.shape.borderRadiusLarge,
|
2023-03-06 11:58:36 +01:00
|
|
|
},
|
2023-03-22 15:37:40 +01:00
|
|
|
'&.environment-accordion.Mui-expanded': {
|
|
|
|
outline: `2px solid ${alpha(
|
|
|
|
theme.palette.background.alternative,
|
2023-10-02 14:25:46 +02:00
|
|
|
0.6,
|
2023-03-22 15:37:40 +01:00
|
|
|
)}`,
|
|
|
|
boxShadow: `0px 2px 8px ${alpha(
|
|
|
|
theme.palette.primary.main,
|
2023-10-02 14:25:46 +02:00
|
|
|
0.2,
|
2023-03-22 15:37:40 +01:00
|
|
|
)}`,
|
|
|
|
},
|
|
|
|
'&.accordion-disabled': {
|
|
|
|
outline: `1px solid ${alpha('#39384C', 0.5)}`,
|
|
|
|
backgroundColor: theme.palette.background.application,
|
|
|
|
},
|
|
|
|
'&.accordion-disabled.Mui-expanded .MuiAccordionSummary-root':
|
|
|
|
{
|
|
|
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiAccordionSummary: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: {
|
|
|
|
'& > .MuiAccordionSummary-content.Mui-expanded': {
|
|
|
|
margin: '12px 0',
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
'&.Mui-expanded': {
|
|
|
|
minHeight: '0',
|
|
|
|
},
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Project overview, improve switch (ON - state) hover effect color
|
2022-08-23 14:20:02 +02:00
|
|
|
MuiSwitch: {
|
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
2022-08-23 14:20:02 +02:00
|
|
|
zIndex: 1,
|
2023-03-22 15:37:40 +01:00
|
|
|
'&&& > .Mui-checked:hover': {
|
|
|
|
backgroundColor: actionColors[0.08],
|
|
|
|
},
|
|
|
|
'&&& > .Mui-checked.Mui-disabled': {
|
|
|
|
color: '#423F6E',
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
}),
|
2022-08-23 14:20:02 +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-08-23 14:20:02 +02:00
|
|
|
MuiMenuItem: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: {
|
|
|
|
'&.Mui-disabled': {
|
2023-03-22 15:37:40 +01:00
|
|
|
opacity: 0.4,
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-03-06 11:58:36 +01:00
|
|
|
|
2023-03-22 15:37:40 +01:00
|
|
|
// Inputs background - This is used when we have inputs on a darker 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
|
|
|
|
MuiAppBar: {
|
2022-08-23 14:20:02 +02:00
|
|
|
styleOverrides: {
|
2023-03-06 11:58:36 +01:00
|
|
|
root: ({ theme }) => ({
|
|
|
|
color: theme.palette.text.primary,
|
|
|
|
}),
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
},
|
2023-03-22 15:37:40 +01:00
|
|
|
|
|
|
|
// For dark theme, primary buttons are a bit darker then the primary.main that we use as a primary color
|
|
|
|
MuiButton: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
'&:not(.Mui-disabled).MuiButton-containedPrimary': {
|
|
|
|
backgroundColor: theme.palette.background.alternative,
|
|
|
|
'&:hover': {
|
2023-03-30 17:57:35 +02:00
|
|
|
backgroundColor: theme.palette.secondary.light,
|
2023-03-22 15:37:40 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Constraints negation icon
|
|
|
|
MuiIconButton: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
'&.operator-is-active svg': {
|
|
|
|
fill: theme.palette.background.application,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Inputs
|
|
|
|
MuiOutlinedInput: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
fieldset: {
|
|
|
|
borderColor: '#646382',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&&&:hover fieldset': {
|
|
|
|
borderColor: '#8B8BA7',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&&&.Mui-focused fieldset': {
|
|
|
|
borderColor: '#9792ED',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&&&.Mui-disabled fieldset': {
|
|
|
|
borderColor: '#47475D',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Popovers
|
|
|
|
MuiPopover: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: ({ theme }) => ({
|
|
|
|
'.MuiPopover-paper': {
|
|
|
|
outline: `1px solid ${theme.palette.divider}`,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
2023-10-12 12:22:23 +02:00
|
|
|
|
|
|
|
MuiIcon: {
|
|
|
|
defaultProps: {
|
|
|
|
baseClassName: 'material-symbols-outlined',
|
|
|
|
},
|
|
|
|
},
|
2022-08-23 14:20:02 +02:00
|
|
|
},
|
|
|
|
});
|