blob: d8b6147b755e21b13e260757296f5a4afa4d3bfb [file] [log] [blame]
simond47ef9e2022-09-28 22:24:28 -04001import { createTheme } from '@mui/material';
idillon-sfl837ea0b2022-08-25 11:35:29 -04002
idillon-sfldeabd282022-08-25 22:50:03 -04003const theme = createTheme({
4 palette: {
5 primary: {
simond47ef9e2022-09-28 22:24:28 -04006 light: '#E5EEF5', // same as "#0056991A"
7 main: '#0071C9',
8 dark: '#005699',
idillon-sfldeabd282022-08-25 22:50:03 -04009 },
10 error: {
simond47ef9e2022-09-28 22:24:28 -040011 main: '#CC0022',
idillon-sfldeabd282022-08-25 22:50:03 -040012 },
13 success: {
simond47ef9e2022-09-28 22:24:28 -040014 main: '#009980',
idillon-sfldeabd282022-08-25 22:50:03 -040015 },
16 },
idillon-sfl837ea0b2022-08-25 11:35:29 -040017 typography: {
simond47ef9e2022-09-28 22:24:28 -040018 fontFamily: 'Ubuntu',
idillon24fe8d82022-08-29 16:55:20 -040019 allVariants: {
simond47ef9e2022-09-28 22:24:28 -040020 color: 'black',
idillon24fe8d82022-08-29 16:55:20 -040021 },
idillon-sfl837ea0b2022-08-25 11:35:29 -040022 h1: {
23 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040024 fontSize: '26px',
25 lineHeight: '36px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040026 },
27 h2: {
28 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040029 fontSize: '22px',
30 lineHeight: '30px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040031 },
32 h3: {
33 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040034 fontSize: '18px',
35 lineHeight: '26px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040036 },
37 h4: {
38 fontWeight: 500,
simond47ef9e2022-09-28 22:24:28 -040039 fontSize: '15px',
40 lineHeight: '22px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040041 },
42 h5: {
43 fontWeight: 500,
simond47ef9e2022-09-28 22:24:28 -040044 fontSize: '13px',
45 lineHeight: '19px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040046 },
47 body1: {
48 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040049 fontSize: '15px',
50 lineHeight: '22px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040051 },
52 body2: {
53 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040054 fontSize: '13px',
55 lineHeight: '19px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040056 },
57 caption: {
58 fontWeight: 400,
simond47ef9e2022-09-28 22:24:28 -040059 fontSize: '12px',
60 lineHeight: '16px',
idillon-sfl837ea0b2022-08-25 11:35:29 -040061 },
62 },
63 components: {
idillon760b7fb2022-08-29 14:32:38 -040064 MuiCssBaseline: {
65 styleOverrides: `
66 @font-face {
67 font-family: "Ubuntu";
68 src: url("./fonts/Ubuntu-Th.ttf");
69 font-weight: 100;
70 font-style: normal;
71 }
72 @font-face {
73 font-family: "Ubuntu";
74 src: url("./fonts/Ubuntu-L.ttf");
75 font-weight: 300;
76 font-style: normal;
77 }
78 @font-face {
79 font-family: "Ubuntu";
80 src: url("./fonts/Ubuntu-LI.ttf");
81 font-weight: 300;
82 font-style: italic;
83 }
84 @font-face {
85 font-family: "Ubuntu";
86 src: url("./fonts/Ubuntu-R.ttf");
87 font-weight: 400;
88 font-style: normal;
89 }
90 @font-face {
91 font-family: "Ubuntu";
92 src: url("./fonts/Ubuntu-RI.ttf");
93 font-weight: 400;
94 font-style: italic;
95 }
96 @font-face {
97 font-family: "Ubuntu";
98 src: url("./fonts/Ubuntu-M.ttf");
99 font-weight: 500;
100 font-style: normal;
101 }
102 @font-face {
103 font-family: "Ubuntu";
104 src: url("./fonts/Ubuntu-MI.ttf");
105 font-weight: 500;
106 font-style: italic;
107 }
108 @font-face {
109 font-family: "Ubuntu";
110 src: url("./fonts/Ubuntu-B.ttf");
111 font-weight: 700;
112 font-style: normal;
113 }
114 @font-face {
115 font-family: "Ubuntu";
116 src: url("./fonts/Ubuntu-BI.ttf");
117 font-weight: 700;
118 font-style: italic;
119 }
120 `,
121 },
simond47ef9e2022-09-28 22:24:28 -0400122 },
123});
idillon760b7fb2022-08-29 14:32:38 -0400124
125export default createTheme(theme, {
126 components: {
idillon-sfl837ea0b2022-08-25 11:35:29 -0400127 MuiButton: {
128 styleOverrides: {
129 root: {
simond47ef9e2022-09-28 22:24:28 -0400130 height: '46px',
idillon-sfl837ea0b2022-08-25 11:35:29 -0400131 fontWeight: 700,
simond47ef9e2022-09-28 22:24:28 -0400132 fontSize: '15px',
133 lineHeight: '17px',
134 textTransform: 'none',
135 borderRadius: '5px',
idillon-sfl837ea0b2022-08-25 11:35:29 -0400136 },
137 sizeSmall: {
simond47ef9e2022-09-28 22:24:28 -0400138 height: '36px',
idillon-sfl837ea0b2022-08-25 11:35:29 -0400139 },
140 contained: {
idillon-sfldeabd282022-08-25 22:50:03 -0400141 background: theme.palette.primary.dark,
simond47ef9e2022-09-28 22:24:28 -0400142 '&:hover': {
idillon-sfldeabd282022-08-25 22:50:03 -0400143 background: theme.palette.primary.main,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400144 },
145 },
146 outlined: {
simond47ef9e2022-09-28 22:24:28 -0400147 background: '#FFF',
148 borderColor: '#0056995C',
idillon-sfldeabd282022-08-25 22:50:03 -0400149 color: theme.palette.primary.dark,
simond47ef9e2022-09-28 22:24:28 -0400150 '&:hover': {
idillon-sfldeabd282022-08-25 22:50:03 -0400151 background: theme.palette.primary.light,
152 borderColor: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400153 },
154 },
155 text: {
simond47ef9e2022-09-28 22:24:28 -0400156 background: '#fff',
idillon-sfldeabd282022-08-25 22:50:03 -0400157 color: theme.palette.primary.dark,
simond47ef9e2022-09-28 22:24:28 -0400158 '&:hover': {
idillon-sfldeabd282022-08-25 22:50:03 -0400159 background: theme.palette.primary.light,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400160 },
161 },
162 },
163 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400164 MuiSwitch: {
165 defaultProps: {
166 disableRipple: true,
167 },
168 styleOverrides: {
169 root: {
simond47ef9e2022-09-28 22:24:28 -0400170 width: '60px',
171 height: '30px',
idillon-sfl837ea0b2022-08-25 11:35:29 -0400172 padding: 0,
173 },
174 switchBase: {
175 padding: 0,
simond47ef9e2022-09-28 22:24:28 -0400176 '&.Mui-checked': {
idillon-sfl837ea0b2022-08-25 11:35:29 -0400177 transform: `translateX(30px)`,
178 },
179 },
180 thumb: {
simond47ef9e2022-09-28 22:24:28 -0400181 width: '28px',
182 height: '28px',
idillon-sfldeabd282022-08-25 22:50:03 -0400183 border: `1px solid ${theme.palette.primary.dark}`,
simond47ef9e2022-09-28 22:24:28 -0400184 '.Mui-checked.Mui-checked &': {
185 width: '30px',
186 height: '30px',
187 border: 'none',
188 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400189 },
190 track: {
idillon-sfldeabd282022-08-25 22:50:03 -0400191 backgroundColor: theme.palette.primary.light,
simond47ef9e2022-09-28 22:24:28 -0400192 borderRadius: '30px',
idillon-sfl837ea0b2022-08-25 11:35:29 -0400193 opacity: 1,
simond47ef9e2022-09-28 22:24:28 -0400194 '.Mui-checked.Mui-checked + &': {
idillon-sfldeabd282022-08-25 22:50:03 -0400195 backgroundColor: theme.palette.primary.light,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400196 opacity: 1,
simond47ef9e2022-09-28 22:24:28 -0400197 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400198 },
199 colorPrimary: {
simond47ef9e2022-09-28 22:24:28 -0400200 color: '#fff',
201 '&.Mui-checked': {
idillon-sfldeabd282022-08-25 22:50:03 -0400202 color: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400203 },
204 },
205 },
206 },
idillon-sfl37c18df2022-08-26 18:44:27 -0400207 MuiInput: {
208 styleOverrides: {
209 root: {
210 color: theme.palette.primary.dark,
simond47ef9e2022-09-28 22:24:28 -0400211 '&.Mui-error': {
idillon-sfl37c18df2022-08-26 18:44:27 -0400212 color: theme.palette.error.main,
213 },
214 },
215 underline: {
216 /*
217 Material UI uses "before" for the regular underline.
218 There is a second underline called "after" placed over "before"
219 */
simond47ef9e2022-09-28 22:24:28 -0400220 '&:before': {
idillon-sfl37c18df2022-08-26 18:44:27 -0400221 borderBottom: `2px solid ${theme.palette.primary.dark}`,
222 },
simond47ef9e2022-09-28 22:24:28 -0400223 '&:hover:not(.Mui-disabled, .Mui-error):before': {
224 borderBottom: '2px solid #03B9E9',
idillon-sfl37c18df2022-08-26 18:44:27 -0400225 },
simond47ef9e2022-09-28 22:24:28 -0400226 '&:after': {
227 borderBottom: '2px solid #03B9E9',
idillon-sfl37c18df2022-08-26 18:44:27 -0400228 },
simond47ef9e2022-09-28 22:24:28 -0400229 '&:hover:not(.Mui-error):after': {
230 borderBottom: '2px solid #03B9E9',
idillon-sfl37c18df2022-08-26 18:44:27 -0400231 },
232 },
simond47ef9e2022-09-28 22:24:28 -0400233 },
idillon-sfl37c18df2022-08-26 18:44:27 -0400234 },
235 MuiFormControl: {
236 styleOverrides: {
237 root: {
simond47ef9e2022-09-28 22:24:28 -0400238 height: '90px',
idillon-sfl37c18df2022-08-26 18:44:27 -0400239 },
240 },
241 },
242 MuiFormHelperText: {
243 styleOverrides: {
244 root: {
simond47ef9e2022-09-28 22:24:28 -0400245 position: 'absolute',
246 bottom: '0px',
247 fontSize: '15px',
idillon-sfl37c18df2022-08-26 18:44:27 -0400248 },
249 },
250 },
251 MuiInputLabel: {
252 styleOverrides: {
253 root: {
simond47ef9e2022-09-28 22:24:28 -0400254 color: 'black',
255 fontSize: '15px',
256 left: '50%',
257 transform: 'translate(-50%, 20px)',
258 transition: 'left .2s, transform .2s',
idillon-sfl37c18df2022-08-26 18:44:27 -0400259 },
260 shrink: {
simond47ef9e2022-09-28 22:24:28 -0400261 color: 'black',
idillon-sfl37c18df2022-08-26 18:44:27 -0400262 left: 0,
simond47ef9e2022-09-28 22:24:28 -0400263 transform: 'translate(0, 50px) scale(0.75)',
264 transition: 'left .2s, transform .2s',
265 '&.Mui-focused, &.Mui-error': {
266 color: 'black',
idillon-sfl37c18df2022-08-26 18:44:27 -0400267 },
268 },
269 },
270 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400271 },
simond47ef9e2022-09-28 22:24:28 -0400272});