blob: 6764097371b9bc866861102752d9c3b73a05d19d [file] [log] [blame]
idillon-sfl837ea0b2022-08-25 11:35:29 -04001import { createTheme } from "@mui/material";
2
idillon-sfldeabd282022-08-25 22:50:03 -04003const theme = createTheme({
4 palette: {
5 primary: {
6 light: "#E5EEF5", // same as "#0056991A"
7 main: "#0071C9",
8 dark: "#005699",
9 },
10 error: {
11 main: "#CC0022",
12 },
13 success: {
14 main: "#009980",
15 },
16 },
idillon-sfl837ea0b2022-08-25 11:35:29 -040017 typography: {
18 fontFamily: "Ubuntu",
19 h1: {
20 fontWeight: 400,
21 fontSize: "26px",
22 lineHeight: "36px",
23 },
24 h2: {
25 fontWeight: 400,
26 fontSize: "22px",
27 lineHeight: "30px",
28 },
29 h3: {
30 fontWeight: 400,
31 fontSize: "18px",
32 lineHeight: "26px",
33 },
34 h4: {
35 fontWeight: 500,
36 fontSize: "15px",
37 lineHeight: "22px",
38 },
39 h5: {
40 fontWeight: 500,
41 fontSize: "13px",
42 lineHeight: "19px",
43 },
44 body1: {
45 fontWeight: 400,
46 fontSize: "15px",
47 lineHeight: "22px"
48 },
49 body2: {
50 fontWeight: 400,
51 fontSize: "13px",
52 lineHeight: "19px",
53 },
54 caption: {
55 fontWeight: 400,
56 fontSize: "12px",
57 lineHeight: "16px",
58 },
59 },
60 components: {
idillon760b7fb2022-08-29 14:32:38 -040061 MuiCssBaseline: {
62 styleOverrides: `
63 @font-face {
64 font-family: "Ubuntu";
65 src: url("./fonts/Ubuntu-Th.ttf");
66 font-weight: 100;
67 font-style: normal;
68 }
69 @font-face {
70 font-family: "Ubuntu";
71 src: url("./fonts/Ubuntu-L.ttf");
72 font-weight: 300;
73 font-style: normal;
74 }
75 @font-face {
76 font-family: "Ubuntu";
77 src: url("./fonts/Ubuntu-LI.ttf");
78 font-weight: 300;
79 font-style: italic;
80 }
81 @font-face {
82 font-family: "Ubuntu";
83 src: url("./fonts/Ubuntu-R.ttf");
84 font-weight: 400;
85 font-style: normal;
86 }
87 @font-face {
88 font-family: "Ubuntu";
89 src: url("./fonts/Ubuntu-RI.ttf");
90 font-weight: 400;
91 font-style: italic;
92 }
93 @font-face {
94 font-family: "Ubuntu";
95 src: url("./fonts/Ubuntu-M.ttf");
96 font-weight: 500;
97 font-style: normal;
98 }
99 @font-face {
100 font-family: "Ubuntu";
101 src: url("./fonts/Ubuntu-MI.ttf");
102 font-weight: 500;
103 font-style: italic;
104 }
105 @font-face {
106 font-family: "Ubuntu";
107 src: url("./fonts/Ubuntu-B.ttf");
108 font-weight: 700;
109 font-style: normal;
110 }
111 @font-face {
112 font-family: "Ubuntu";
113 src: url("./fonts/Ubuntu-BI.ttf");
114 font-weight: 700;
115 font-style: italic;
116 }
117 `,
118 },
119 }
120})
121
122export default createTheme(theme, {
123 components: {
idillon-sfl837ea0b2022-08-25 11:35:29 -0400124 MuiButton: {
125 styleOverrides: {
126 root: {
127 height: "46px",
128 fontWeight: 700,
129 fontSize: "15px",
130 lineHeight: "17px",
131 textTransform: "none",
idillon-sfl37c18df2022-08-26 18:44:27 -0400132 borderRadius: "5px",
idillon-sfl837ea0b2022-08-25 11:35:29 -0400133 },
134 sizeSmall: {
135 height: "36px",
136 },
137 contained: {
idillon-sfldeabd282022-08-25 22:50:03 -0400138 background: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400139 "&:hover": {
idillon-sfldeabd282022-08-25 22:50:03 -0400140 background: theme.palette.primary.main,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400141 },
142 },
143 outlined: {
144 background: "#FFF",
145 borderColor: "#0056995C",
idillon-sfldeabd282022-08-25 22:50:03 -0400146 color: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400147 "&:hover": {
idillon-sfldeabd282022-08-25 22:50:03 -0400148 background: theme.palette.primary.light,
149 borderColor: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400150 },
151 },
152 text: {
153 background: "#fff",
idillon-sfldeabd282022-08-25 22:50:03 -0400154 color: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400155 "&:hover": {
idillon-sfldeabd282022-08-25 22:50:03 -0400156 background: theme.palette.primary.light,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400157 },
158 },
159 },
160 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400161 MuiSwitch: {
162 defaultProps: {
163 disableRipple: true,
164 },
165 styleOverrides: {
166 root: {
167 width: "60px",
168 height: "30px",
169 padding: 0,
170 },
171 switchBase: {
172 padding: 0,
173 "&.Mui-checked": {
174 transform: `translateX(30px)`,
175 },
176 },
177 thumb: {
178 width: "28px",
179 height: "28px",
idillon-sfldeabd282022-08-25 22:50:03 -0400180 border: `1px solid ${theme.palette.primary.dark}`,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400181 ".Mui-checked.Mui-checked &": {
182 width: "30px",
183 height: "30px",
184 border: "none",
185 }
186 },
187 track: {
idillon-sfldeabd282022-08-25 22:50:03 -0400188 backgroundColor: theme.palette.primary.light,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400189 borderRadius: "30px",
190 opacity: 1,
191 ".Mui-checked.Mui-checked + &": {
idillon-sfldeabd282022-08-25 22:50:03 -0400192 backgroundColor: theme.palette.primary.light,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400193 opacity: 1,
194 }
195 },
196 colorPrimary: {
197 color: "#fff",
198 "&.Mui-checked": {
idillon-sfldeabd282022-08-25 22:50:03 -0400199 color: theme.palette.primary.dark,
idillon-sfl837ea0b2022-08-25 11:35:29 -0400200 },
201 },
202 },
203 },
idillon-sfl37c18df2022-08-26 18:44:27 -0400204 MuiInput: {
205 styleOverrides: {
206 root: {
207 color: theme.palette.primary.dark,
208 "&.Mui-error": {
209 color: theme.palette.error.main,
210 },
211 },
212 underline: {
213 /*
214 Material UI uses "before" for the regular underline.
215 There is a second underline called "after" placed over "before"
216 */
217 "&:before": {
218 borderBottom: `2px solid ${theme.palette.primary.dark}`,
219 },
220 "&:hover:not(.Mui-disabled, .Mui-error):before": {
221 borderBottom: "2px solid #03B9E9",
222 },
223 "&:after": {
224 borderBottom: "2px solid #03B9E9",
225 },
226 "&:hover:not(.Mui-error):after": {
227 borderBottom: "2px solid #03B9E9",
228 },
229 },
230 }
231 },
232 MuiFormControl: {
233 styleOverrides: {
234 root: {
235 height: "90px",
236 },
237 },
238 },
239 MuiFormHelperText: {
240 styleOverrides: {
241 root: {
242 position: "absolute",
243 bottom: "0px",
244 fontSize: "15px",
245 },
246 },
247 },
248 MuiInputLabel: {
249 styleOverrides: {
250 root: {
251 color: "black",
252 fontSize: "15px",
253 left: "50%",
254 transform: "translate(-50%, 20px)",
255 transition: "left .2s, transform .2s",
256 },
257 shrink: {
258 color: "black",
259 left: 0,
260 transform: "translate(0, 50px) scale(0.75)",
261 transition: "left .2s, transform .2s",
262 "&.Mui-focused, &.Mui-error": {
263 color: "black",
264 },
265 },
266 },
267 },
idillon-sfl837ea0b2022-08-25 11:35:29 -0400268 },
idillon-sfldeabd282022-08-25 22:50:03 -0400269})