}
{...props}
/>
+
))(({ theme }) => ({
"& .MuiFilledInput-root": {
overflow: "hidden",
borderRadius: 4,
- backgroundColor: "#577ba840",
- border: "1px solid",
- borderColor: "#577ba840",
+ backgroundColor: theme.palette.primary.dark,
+ border: "2px solid",
+ borderColor: theme.palette.primary.dark,
+
transition: theme.transitions.create([
"border-color",
"background-color",
"box-shadow",
]),
+
"&:hover": {
- backgroundColor: "#577ba840",
+ backgroundColor: theme.palette.primary.dark,
},
"&.Mui-focused": {
- backgroundColor: "#AFCOD5",
- borderColor: "#577ba840",
- color: "info",
+
+ backgroundColor: theme.palette.primary.dark,
+ borderColor: theme.palette.secondary.main,
},
+
},
}));
+
const SearchSidebar = (props: SearchSidebarProps) => {
const { listComponent: ListComponent, id, height } = props;
const [searchQuery, setSearchQuery] = useState("");
const intl = useIntl();
+ const theme = useTheme();
+
+
return (
@@ -62,6 +72,10 @@ const SearchSidebar = (props: SearchSidebarProps) => {
onChange={(e) => setSearchQuery(e.target.value)}
/> */}
setSearchQuery(e.target.value)}
@@ -71,7 +85,6 @@ const SearchSidebar = (props: SearchSidebarProps) => {
id: "search",
defaultMessage: "Search",
})}
- color="info"
type="search"
/>
diff --git a/typescript/Frontend/src/components/Users/User.tsx b/typescript/Frontend/src/components/Users/User.tsx
index 3af824b3d..dfdee929a 100644
--- a/typescript/Frontend/src/components/Users/User.tsx
+++ b/typescript/Frontend/src/components/Users/User.tsx
@@ -1,4 +1,4 @@
-import { Box, CircularProgress, Alert } from "@mui/material";
+import { Box, CircularProgress, Alert, collapseClasses, useTheme } from "@mui/material";
import { AxiosError } from "axios";
import { useState, useEffect } from "react";
import { useParams } from "react-router-dom";
@@ -6,6 +6,7 @@ import axiosConfig from "../../config/axiosConfig";
import { I_User } from "../../util/user.util";
import UserForm from "./UserForm";
import { useIntl } from "react-intl";
+import { colors } from "../..";
interface I_DetailProps {
hasMoveButton?: boolean;
@@ -39,13 +40,14 @@ const Detail = (props: I_DetailProps) => {
language: locale,
});
};
+ const theme = useTheme();
if (values && values.id && values.id.toString() === id) {
return (
{
WebkitBorderTopRightRadius: 0,
borderBottomLeftRadius: 4,
borderBottomRightRadius: 4,
- borderColor: "#90a7c5",
+ borderColor: colors.greyLight,
}}
>
@@ -66,7 +68,7 @@ const Detail = (props: I_DetailProps) => {
-
+
);
} else if (error) {
diff --git a/typescript/Frontend/src/components/Users/UserForm.tsx b/typescript/Frontend/src/components/Users/UserForm.tsx
index 7c1105f97..4f6cb325d 100644
--- a/typescript/Frontend/src/components/Users/UserForm.tsx
+++ b/typescript/Frontend/src/components/Users/UserForm.tsx
@@ -1,4 +1,4 @@
-import { Alert, CircularProgress, Grid, Snackbar } from "@mui/material";
+import { Alert, CircularProgress, Grid, Snackbar, useTheme } from "@mui/material";
import { AxiosError, AxiosResponse } from "axios";
import { useFormik } from "formik";
import { useContext, useState } from "react";
@@ -25,6 +25,7 @@ const UserForm = (props: I_UserFormProps) => {
const currentUser = getCurrentUser();
const readOnly = !currentUser.hasWriteAccess;
+ const theme = useTheme();
const formik = useFormik({
initialValues: {
@@ -88,7 +89,7 @@ const UserForm = (props: I_UserFormProps) => {
disabled={readOnly}
/>
- {loading && }
+ {loading && }
{currentUser.hasWriteAccess && (
diff --git a/typescript/Frontend/src/components/Users/UserList.tsx b/typescript/Frontend/src/components/Users/UserList.tsx
index 17c4f9804..f3b8bb3f6 100644
--- a/typescript/Frontend/src/components/Users/UserList.tsx
+++ b/typescript/Frontend/src/components/Users/UserList.tsx
@@ -1,13 +1,14 @@
import List from "@mui/material/List";
import ListItemButton from "@mui/material/ListItemButton";
import ListItemText from "@mui/material/ListItemText";
-import { Divider } from "@mui/material";
+import { Divider, useTheme } from "@mui/material";
import { Link } from "react-router-dom";
import useRouteMatch from "../../hooks/useRouteMatch";
import routes from "../../routes.json";
import { Fragment, useContext } from "react";
import { UsersContext } from "../Context/UsersContextProvider";
import { I_User } from "../../util/user.util";
+import { colors } from "../..";
const getPathWithoutId = (path?: string) => {
if (path) {
@@ -35,6 +36,7 @@ const UserList = (props: UserListProps) => {
const filteredData = filterData(props.searchQuery, availableUsers);
const routeMatch = useRouteMatch([routes.users + routes.user + ":id"]);
+ const theme = useTheme();
if (filteredData && filteredData.length) {
return (
@@ -44,7 +46,6 @@ const UserList = (props: UserListProps) => {
bgcolor: "background.paper",
position: "relative",
overflow: "auto",
- maxHeight: 400,
py: 0,
mt: 1,
}}
@@ -63,15 +64,15 @@ const UserList = (props: UserListProps) => {
sx={{
mr: "1px",
borderStyle: "solid",
- backgroundColor: "#577ba840",
+ backgroundColor: theme.palette.primary.dark,
"&.Mui-selected": {
- backgroundColor: "#90A7C5",
+ backgroundColor: colors.orangeSelected,
},
":hover": {
- backgroundColor: "#AFC0D5",
+ backgroundColor: colors.orangeHover,
},
"&.Mui-selected:hover": {
- backgroundColor: "#90A7C5",
+ backgroundColor: colors.orangeSelected,
},
}}
>
diff --git a/typescript/Frontend/src/index.css b/typescript/Frontend/src/index.css
index 037bdfc79..60529211e 100644
--- a/typescript/Frontend/src/index.css
+++ b/typescript/Frontend/src/index.css
@@ -13,6 +13,6 @@ code {
}
body {
- background-color: #F2F4F8;
+ background-color: #f3f4f8;
}
\ No newline at end of file
diff --git a/typescript/Frontend/src/index.tsx b/typescript/Frontend/src/index.tsx
index ca146b01c..e926be2c9 100644
--- a/typescript/Frontend/src/index.tsx
+++ b/typescript/Frontend/src/index.tsx
@@ -5,11 +5,21 @@ import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { createTheme, ThemeProvider } from "@mui/material";
import UserContextProvider from "./components/Context/UserContextProvider";
+import { orange } from "@mui/material/colors";
const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
);
+export const colors = {
+ black: '#2b3e54',
+ fond: '#f3f4f7',
+ greyDark: '#d1d7de',
+ greyLight:'#e1e4e7',
+ orangeSelected: '#ffd280',
+ orangeHover: '#ffe4b3',
+}
+
const theme = createTheme({
components: {
MuiButtonBase: {
@@ -20,22 +30,21 @@ const theme = createTheme({
},
palette: {
text: {
- primary: "#2b3e54",
+ primary: colors.black,
secondary: "#000000",
disabled: "#000000",
},
+ primary: {
+ main: colors.fond,
+ light: colors.greyLight,
+ dark: colors.greyDark,
+ },
secondary: {
- main: "#90A7C5",
- dark: "#CCD6E4",
- },
- info: {
- main: "#2b3e54",
- },
- warning: {
- main: "#90a7c5",
+ main: colors.orangeSelected,
+ light: colors.orangeHover,
},
+
},
-
typography: {
fontFamily: `"Ubuntu", sans-serif`,
fontWeightRegular: 300,
diff --git a/typescript/Frontend/src/util/installation.util.tsx b/typescript/Frontend/src/util/installation.util.tsx
index 2f3c5d13b..b3b77e36e 100644
--- a/typescript/Frontend/src/util/installation.util.tsx
+++ b/typescript/Frontend/src/util/installation.util.tsx
@@ -22,9 +22,6 @@ export const StyledTab = styled((props: any) => (
marginTop: "1px",
bottom: -1,
},
- "&.Mui-focusVisible": {
- backgroundColor: "rgba(100, 95, 228, 0.32)",
- },
}));
export const StyledTabBlue = styled((props: any) => (
@@ -50,9 +47,7 @@ export const StyledTabBlue = styled((props: any) => (
borderColor: "#90A7c5 #90A7c5 #CCD6E4",
marginTop: "1px",
},
- "&.Mui-focusVisible": {
- backgroundColor: "rgba(100, 95, 228, 0.32)",
- },
+
}));
export const StyledTabBig = styled((props: any) => (
@@ -78,9 +73,7 @@ export const StyledTabBig = styled((props: any) => (
marginTop: "1px",
bottom: -2,
},
- "&.Mui-focusVisible": {
- backgroundColor: "rgba(100, 95, 228, 0.32)",
- },
+
}));
export const StyledTabWhite = styled((props: any) => (
@@ -105,9 +98,7 @@ export const StyledTabWhite = styled((props: any) => (
marginTop: "1px",
bottom: -1,
},
- "&.Mui-focusVisible": {
- backgroundColor: "rgba(100, 95, 228, 0.32)",
- },
+
}));
export const AntTabsBig = styled(Tabs)({