2024-08-29 17:14:17 -04:00
import { createTheme } from "@mui/material" ;
2024-11-08 18:36:43 -05:00
import { baseTheme } from "./globalTheme" ;
2024-11-09 08:01:14 -05:00
import { colors } from "./constants" ;
2024-08-29 17:14:17 -04:00
2024-11-12 09:54:19 -05:00
/*
2024-11-13 05:50:32 -05:00
TODO
2024-11-13 06:08:58 -05:00
Next step: check if all keys here are being used in the codebase. e.g.: Search codebase for palette.primary; also check for destructuring palette ('= theme.palette')
2024-11-12 09:54:19 -05:00
*/
2024-08-29 17:14:17 -04:00
2024-11-10 17:00:13 -05:00
const {
primary ,
secondary ,
success ,
error ,
warning ,
2024-12-23 12:44:12 -05:00
neutral ,
2024-11-10 17:00:13 -05:00
gradient : {
color1 : { light : color1 },
color2 : { light : color2 },
color3 : { light : color3 },
color4 : { light : color4 },
color5 : { light : color5 },
},
2024-11-12 09:54:19 -05:00
background ,
text ,
border ,
unresolved ,
other ,
2024-11-10 17:00:13 -05:00
} = colors ;
2024-11-12 19:10:48 -05:00
const palette = {
2024-12-02 19:14:26 -05:00
/* TODO check if we need the addition of a new color gray150 for this. Also, this color would probably fit for primary contrastText */
2024-11-27 14:50:05 +08:00
action : {
disabled : border . light . disabled ,
},
2024-11-12 19:10:48 -05:00
primary : { main : primary . main . light },
secondary : {
main : secondary . main . light ,
2024-11-13 21:11:41 -05:00
contrastText : secondary . contrastText . light ,
2024-11-13 05:50:32 -05:00
light : secondary . dark . light ,
dark : secondary . dark . light ,
2024-11-12 19:10:48 -05:00
},
success : {
main : success . main . light ,
contrastText : success . contrastText . light ,
light : success . light . light ,
dark : success . dark . light ,
},
error : {
main : error . main . light ,
contrastText : error . contrastText . light ,
light : error . light . light ,
dark : error . dark . light ,
},
warning : {
main : warning . main . light ,
light : warning . light . light ,
contrastText : warning . contrastText . light ,
dark : warning . dark . light ,
},
2024-12-23 12:44:12 -05:00
neutral : {
contrastText : neutral . contrastText . light ,
2024-12-23 07:32:08 -05:00
},
2024-11-12 19:10:48 -05:00
/* From this part on, try to create semantic structure, not feature based structure */
percentage : {
uptimePoor : error . main . light ,
uptimeFair : warning . contrastText . light ,
uptimeGood : warning . main . light /* Change for a success color? */ ,
2024-11-13 05:50:32 -05:00
uptimeExcellent : success . main . light ,
2024-11-12 19:10:48 -05:00
},
unresolved : {
main : unresolved . main . light ,
light : unresolved . light . light ,
bg : unresolved . bg . light ,
},
divider : border . light . light ,
other : {
icon : other . icon . light ,
line : other . line . light ,
fill : secondary . dark . light ,
grid : other . grid . light ,
autofill : other . autofill . light ,
2024-10-17 12:05:06 +08:00
},
2024-11-12 19:10:48 -05:00
gradient : {
color1 ,
color2 ,
color3 ,
color4 ,
color5 ,
},
text : {
primary : text . primary . light ,
secondary : text . secondary . light ,
tertiary : text . tertiary . light ,
accent : text . accent . light ,
},
background : {
main : background . main . light ,
alt : background . alt . light ,
fill : background . fill . light ,
accent : background . accent . light ,
},
border : {
light : border . light . light ,
dark : border . dark . light ,
},
info : {
text : text . primary . light ,
main : text . tertiary . light ,
bg : background . main . light ,
light : background . main . light ,
border : border . dark . light ,
},
};
2024-11-13 06:08:58 -05:00
/* TODO I figured out we could have just one theme by passing mode as parameter for theme function. Implement later */
2024-11-12 19:10:48 -05:00
const lightTheme = createTheme ({
palette ,
... baseTheme ( palette ),
2024-08-29 17:14:17 -04:00
});
export default lightTheme ;