idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 1 | import { createTheme } from "@mui/material"; |
| 2 | |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 3 | const 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 | }, |
| 17 | }) |
| 18 | |
| 19 | export default createTheme(theme, { |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 20 | typography: { |
| 21 | fontFamily: "Ubuntu", |
| 22 | h1: { |
| 23 | fontWeight: 400, |
| 24 | fontSize: "26px", |
| 25 | lineHeight: "36px", |
| 26 | }, |
| 27 | h2: { |
| 28 | fontWeight: 400, |
| 29 | fontSize: "22px", |
| 30 | lineHeight: "30px", |
| 31 | }, |
| 32 | h3: { |
| 33 | fontWeight: 400, |
| 34 | fontSize: "18px", |
| 35 | lineHeight: "26px", |
| 36 | }, |
| 37 | h4: { |
| 38 | fontWeight: 500, |
| 39 | fontSize: "15px", |
| 40 | lineHeight: "22px", |
| 41 | }, |
| 42 | h5: { |
| 43 | fontWeight: 500, |
| 44 | fontSize: "13px", |
| 45 | lineHeight: "19px", |
| 46 | }, |
| 47 | body1: { |
| 48 | fontWeight: 400, |
| 49 | fontSize: "15px", |
| 50 | lineHeight: "22px" |
| 51 | }, |
| 52 | body2: { |
| 53 | fontWeight: 400, |
| 54 | fontSize: "13px", |
| 55 | lineHeight: "19px", |
| 56 | }, |
| 57 | caption: { |
| 58 | fontWeight: 400, |
| 59 | fontSize: "12px", |
| 60 | lineHeight: "16px", |
| 61 | }, |
| 62 | }, |
| 63 | components: { |
| 64 | MuiButton: { |
| 65 | styleOverrides: { |
| 66 | root: { |
| 67 | height: "46px", |
| 68 | fontWeight: 700, |
| 69 | fontSize: "15px", |
| 70 | lineHeight: "17px", |
| 71 | textTransform: "none", |
idillon-sfl | 37c18df | 2022-08-26 18:44:27 -0400 | [diff] [blame^] | 72 | borderRadius: "5px", |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 73 | }, |
| 74 | sizeSmall: { |
| 75 | height: "36px", |
| 76 | }, |
| 77 | contained: { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 78 | background: theme.palette.primary.dark, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 79 | "&:hover": { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 80 | background: theme.palette.primary.main, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 81 | }, |
| 82 | }, |
| 83 | outlined: { |
| 84 | background: "#FFF", |
| 85 | borderColor: "#0056995C", |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 86 | color: theme.palette.primary.dark, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 87 | "&:hover": { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 88 | background: theme.palette.primary.light, |
| 89 | borderColor: theme.palette.primary.dark, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 90 | }, |
| 91 | }, |
| 92 | text: { |
| 93 | background: "#fff", |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 94 | color: theme.palette.primary.dark, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 95 | "&:hover": { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 96 | background: theme.palette.primary.light, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 97 | }, |
| 98 | }, |
| 99 | }, |
| 100 | }, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 101 | MuiSwitch: { |
| 102 | defaultProps: { |
| 103 | disableRipple: true, |
| 104 | }, |
| 105 | styleOverrides: { |
| 106 | root: { |
| 107 | width: "60px", |
| 108 | height: "30px", |
| 109 | padding: 0, |
| 110 | }, |
| 111 | switchBase: { |
| 112 | padding: 0, |
| 113 | "&.Mui-checked": { |
| 114 | transform: `translateX(30px)`, |
| 115 | }, |
| 116 | }, |
| 117 | thumb: { |
| 118 | width: "28px", |
| 119 | height: "28px", |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 120 | border: `1px solid ${theme.palette.primary.dark}`, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 121 | ".Mui-checked.Mui-checked &": { |
| 122 | width: "30px", |
| 123 | height: "30px", |
| 124 | border: "none", |
| 125 | } |
| 126 | }, |
| 127 | track: { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 128 | backgroundColor: theme.palette.primary.light, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 129 | borderRadius: "30px", |
| 130 | opacity: 1, |
| 131 | ".Mui-checked.Mui-checked + &": { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 132 | backgroundColor: theme.palette.primary.light, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 133 | opacity: 1, |
| 134 | } |
| 135 | }, |
| 136 | colorPrimary: { |
| 137 | color: "#fff", |
| 138 | "&.Mui-checked": { |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 139 | color: theme.palette.primary.dark, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 140 | }, |
| 141 | }, |
| 142 | }, |
| 143 | }, |
idillon-sfl | 37c18df | 2022-08-26 18:44:27 -0400 | [diff] [blame^] | 144 | MuiInput: { |
| 145 | styleOverrides: { |
| 146 | root: { |
| 147 | color: theme.palette.primary.dark, |
| 148 | "&.Mui-error": { |
| 149 | color: theme.palette.error.main, |
| 150 | }, |
| 151 | }, |
| 152 | underline: { |
| 153 | /* |
| 154 | Material UI uses "before" for the regular underline. |
| 155 | There is a second underline called "after" placed over "before" |
| 156 | */ |
| 157 | "&:before": { |
| 158 | borderBottom: `2px solid ${theme.palette.primary.dark}`, |
| 159 | }, |
| 160 | "&:hover:not(.Mui-disabled, .Mui-error):before": { |
| 161 | borderBottom: "2px solid #03B9E9", |
| 162 | }, |
| 163 | "&:after": { |
| 164 | borderBottom: "2px solid #03B9E9", |
| 165 | }, |
| 166 | "&:hover:not(.Mui-error):after": { |
| 167 | borderBottom: "2px solid #03B9E9", |
| 168 | }, |
| 169 | }, |
| 170 | } |
| 171 | }, |
| 172 | MuiFormControl: { |
| 173 | styleOverrides: { |
| 174 | root: { |
| 175 | height: "90px", |
| 176 | }, |
| 177 | }, |
| 178 | }, |
| 179 | MuiFormHelperText: { |
| 180 | styleOverrides: { |
| 181 | root: { |
| 182 | position: "absolute", |
| 183 | bottom: "0px", |
| 184 | fontSize: "15px", |
| 185 | }, |
| 186 | }, |
| 187 | }, |
| 188 | MuiInputLabel: { |
| 189 | styleOverrides: { |
| 190 | root: { |
| 191 | color: "black", |
| 192 | fontSize: "15px", |
| 193 | left: "50%", |
| 194 | transform: "translate(-50%, 20px)", |
| 195 | transition: "left .2s, transform .2s", |
| 196 | }, |
| 197 | shrink: { |
| 198 | color: "black", |
| 199 | left: 0, |
| 200 | transform: "translate(0, 50px) scale(0.75)", |
| 201 | transition: "left .2s, transform .2s", |
| 202 | "&.Mui-focused, &.Mui-error": { |
| 203 | color: "black", |
| 204 | }, |
| 205 | }, |
| 206 | }, |
| 207 | }, |
idillon-sfl | 837ea0b | 2022-08-25 11:35:29 -0400 | [diff] [blame] | 208 | MuiCssBaseline: { |
| 209 | styleOverrides: ` |
| 210 | @font-face { |
| 211 | font-family: "Ubuntu"; |
| 212 | src: url("./fonts/Ubuntu-Th.ttf"); |
| 213 | font-weight: 100; |
| 214 | font-style: normal; |
| 215 | } |
| 216 | @font-face { |
| 217 | font-family: "Ubuntu"; |
| 218 | src: url("./fonts/Ubuntu-L.ttf"); |
| 219 | font-weight: 300; |
| 220 | font-style: normal; |
| 221 | } |
| 222 | @font-face { |
| 223 | font-family: "Ubuntu"; |
| 224 | src: url("./fonts/Ubuntu-LI.ttf"); |
| 225 | font-weight: 300; |
| 226 | font-style: italic; |
| 227 | } |
| 228 | @font-face { |
| 229 | font-family: "Ubuntu"; |
| 230 | src: url("./fonts/Ubuntu-R.ttf"); |
| 231 | font-weight: 400; |
| 232 | font-style: normal; |
| 233 | } |
| 234 | @font-face { |
| 235 | font-family: "Ubuntu"; |
| 236 | src: url("./fonts/Ubuntu-RI.ttf"); |
| 237 | font-weight: 400; |
| 238 | font-style: italic; |
| 239 | } |
| 240 | @font-face { |
| 241 | font-family: "Ubuntu"; |
| 242 | src: url("./fonts/Ubuntu-M.ttf"); |
| 243 | font-weight: 500; |
| 244 | font-style: normal; |
| 245 | } |
| 246 | @font-face { |
| 247 | font-family: "Ubuntu"; |
| 248 | src: url("./fonts/Ubuntu-MI.ttf"); |
| 249 | font-weight: 500; |
| 250 | font-style: italic; |
| 251 | } |
| 252 | @font-face { |
| 253 | font-family: "Ubuntu"; |
| 254 | src: url("./fonts/Ubuntu-B.ttf"); |
| 255 | font-weight: 700; |
| 256 | font-style: normal; |
| 257 | } |
| 258 | @font-face { |
| 259 | font-family: "Ubuntu"; |
| 260 | src: url("./fonts/Ubuntu-BI.ttf"); |
| 261 | font-weight: 700; |
| 262 | font-style: italic; |
| 263 | } |
| 264 | `, |
| 265 | }, |
| 266 | }, |
idillon-sfl | deabd28 | 2022-08-25 22:50:03 -0400 | [diff] [blame] | 267 | }) |