diff --git a/Client/src/Components/Check/Check.jsx b/Client/src/Components/Check/Check.jsx
index 645e0b5e2..9eaba846e 100644
--- a/Client/src/Components/Check/Check.jsx
+++ b/Client/src/Components/Check/Check.jsx
@@ -2,7 +2,7 @@ import "./check.css";
import PropTypes from "prop-types";
import CheckGrey from "../../assets/icons/check.svg?react";
import CheckOutlined from "../../assets/icons/check-outlined.svg?react";
-import { Stack, Typography } from "@mui/material";
+import { Box, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react";
/**
@@ -22,25 +22,41 @@ import { useTheme } from "@emotion/react";
*/
const Check = ({ text, variant = "info", outlined = false }) => {
const theme = useTheme();
+ const colors = {
+ success: theme.palette.success.main,
+ error: theme.palette.error.text,
+ info: theme.palette.info.border,
+ };
+
return (
{outlined ? (
) : (
-
+ path": { fill: colors[variant] },
+ }}
+ >
+
+
)}
- {text}
+
+ {text}
+
);
};
diff --git a/Client/src/Components/Check/check.css b/Client/src/Components/Check/check.css
index 8d9bbc24e..8b1378917 100644
--- a/Client/src/Components/Check/check.css
+++ b/Client/src/Components/Check/check.css
@@ -1,17 +1 @@
-.check > span.MuiTypography-root {
- font-size: var(--env-var-font-size-small-plus);
- color: var(--secondary-color-light);
- opacity: 0.8;
-}
-.check-error span.MuiTypography-root {
- color: var(--error-color);
-}
-.check-error svg > path {
- fill: var(--error-color);
-}
-.check-success span.MuiTypography-root {
- color: var(--success-color);
-}
-.check-success svg > path {
- fill: var(--success-color);
-}
+
diff --git a/Client/src/Components/Fallback/index.css b/Client/src/Components/Fallback/index.css
index ea1925ff5..293eb13b3 100644
--- a/Client/src/Components/Fallback/index.css
+++ b/Client/src/Components/Fallback/index.css
@@ -7,10 +7,6 @@
font-size: var(--env-var-font-size-large);
font-weight: 600;
}
-[class*="fallback__"] .check span.MuiTypography-root,
-[class*="fallback__"] h1.MuiTypography-root {
- color: var(--secondary-color);
-}
[class*="fallback__"] button.MuiButtonBase-root,
[class*="fallback__"] .check {
width: max-content;
diff --git a/Client/src/Components/Fallback/index.jsx b/Client/src/Components/Fallback/index.jsx
index 976440f7d..79053e539 100644
--- a/Client/src/Components/Fallback/index.jsx
+++ b/Client/src/Components/Fallback/index.jsx
@@ -27,15 +27,19 @@ const Fallback = ({ title, checks, link = "/" }) => {
-
-
+
+
A {title} is used to:
{checks.map((check, index) => (
diff --git a/Client/src/Components/Inputs/Checkbox/index.css b/Client/src/Components/Inputs/Checkbox/index.css
index 130be8853..e69de29bb 100644
--- a/Client/src/Components/Inputs/Checkbox/index.css
+++ b/Client/src/Components/Inputs/Checkbox/index.css
@@ -1,14 +0,0 @@
-.checkbox-wrapper {
- border-radius: var(--env-var-radius-1);
-}
-.checkbox-wrapper:not(:has(.Mui-disabled)):hover {
- background-color: var(--unresolved-bg);
-}
-.checkbox-wrapper span.MuiTypography-root {
- font-size: var(--env-var-font-size-medium);
- color: var(--secondary-color-light);
-}
-.checkbox-wrapper .MuiButtonBase-root {
- margin-right: var(--env-var-spacing-1);
- padding: 0;
-}
diff --git a/Client/src/Components/Inputs/Checkbox/index.jsx b/Client/src/Components/Inputs/Checkbox/index.jsx
index e454bbc6e..c48c59bf5 100644
--- a/Client/src/Components/Inputs/Checkbox/index.jsx
+++ b/Client/src/Components/Inputs/Checkbox/index.jsx
@@ -1,5 +1,6 @@
import PropTypes from "prop-types";
import { FormControlLabel, Checkbox as MuiCheckbox } from "@mui/material";
+import { useTheme } from "@emotion/react";
import CheckboxOutline from "../../../assets/icons/checkbox-outline.svg?react";
import CheckboxFilled from "../../../assets/icons/checkbox-filled.svg?react";
@@ -16,7 +17,7 @@ import "./index.css";
* @param {boolean} [props.isDisabled] - Whether the checkbox is disabled or not.
*
* @returns {JSX.Element}
- *
+ *
* @example
* {
const sizes = { small: "14px", medium: "16px", large: "18px" };
+ const theme = useTheme();
return (
diff --git a/Client/src/Components/Inputs/Field/index.css b/Client/src/Components/Inputs/Field/index.css
index 8c86f9e30..ab1812013 100644
--- a/Client/src/Components/Inputs/Field/index.css
+++ b/Client/src/Components/Inputs/Field/index.css
@@ -8,24 +8,6 @@
.field .input-error {
font-size: var(--env-var-font-size-medium);
}
-.field h3.MuiTypography-root,
-.field h5.MuiTypography-root,
-.field input,
-.field textarea {
- color: var(--secondary-color);
-}
-.field h3.MuiTypography-root {
- font-weight: 500;
-}
-.field h3.MuiTypography-root span.field-required {
- color: var(--error-color);
- margin-left: 2px;
-}
-.field h3.MuiTypography-root span.field-optional {
- opacity: 0.6;
- margin-left: 4px;
- font-weight: 400;
-}
.field h5.MuiTypography-root {
position: relative;
opacity: 0.8;
@@ -37,24 +19,7 @@
.field .MuiInputBase-root:has(.MuiInputAdornment-root) {
padding-right: var(--env-var-spacing-1-minus);
}
-.field
- .MuiInputBase-root:has(.copy.MuiInputAdornment-root > .MuiButtonBase-root) {
- padding-right: 0;
-}
-.field .MuiInputBase-root .copy.MuiInputAdornment-root .MuiButtonBase-root {
- padding: 0 var(--env-var-spacing-1-minus);
- font-size: var(--env-var-font-size-medium);
- border-radius: 0;
- height: 34px;
-}
-.field .MuiInputBase-root .copy.MuiInputAdornment-root .MuiButtonBase-root svg {
- width: 20px;
- height: 20px;
- margin-right: 5px;
-}
-.field .MuiInputBase-root .MuiInputAdornment-root .MuiButtonBase-root:hover {
- border-color: var(--border-color-dark);
-}
+
.field input {
height: 100%;
padding: 0 var(--env-var-spacing-1-minus);
@@ -62,22 +27,6 @@
.field .MuiInputBase-root:has(textarea) {
padding: var(--env-var-spacing-1-minus);
}
-.field .MuiOutlinedInput-root fieldset {
- border-color: var(--border-color-dark);
- border-radius: var(--env-var-radius-1);
-}
-.field:not(:has(.Mui-disabled)):not(:has(.input-error))
- .MuiOutlinedInput-root:hover:not(:has(input:focus)):not(:has(textarea:focus))
- fieldset {
- border-color: var(--border-color-dark);
-}
-.field .input-error {
- color: var(--error-color);
- opacity: 0.8;
-}
-.field:has(.input-error) .MuiOutlinedInput-root fieldset {
- border-color: var(--error-color);
-}
.register-page .field .MuiOutlinedInput-root fieldset,
.register-page .field input,
diff --git a/Client/src/Components/Inputs/Field/index.jsx b/Client/src/Components/Inputs/Field/index.jsx
index 335ed178f..12ecc8775 100644
--- a/Client/src/Components/Inputs/Field/index.jsx
+++ b/Client/src/Components/Inputs/Field/index.jsx
@@ -23,7 +23,6 @@ import { forwardRef, useState } from "react";
* @param {boolean} [props.isRequired] - Indicates if the field is required, will display a red asterisk.
* @param {boolean} [props.isOptional] - Indicates if the field is optional, will display optional text.
* @param {string} [props.optionalLabel] - Optional label for the input field.
- * @param {boolean} [props.hasCopy] - Indicates if the field supports copying.
* @param {string} [props.autoComplete] - Autocomplete value for the input field.
* @param {string} [props.placeholder] - Placeholder text for the input field.
* @param {string} props.value - Value of the input field.
@@ -43,7 +42,6 @@ const Field = forwardRef(
isRequired,
isOptional,
optionalLabel,
- hasCopy,
autoComplete,
placeholder,
value,
@@ -56,25 +54,54 @@ const Field = forwardRef(
) => {
const theme = useTheme();
- // TODO - are we using this feature anywhere ?
- const [copy, setCopy] = useState(false);
- const handleCopy = () => {
- setCopy(true);
- setTimeout(() => setCopy(false), 1000);
- };
-
const [isVisible, setVisible] = useState(false);
return (
-
+
{label && (
-
+
{label}
- {isRequired ? * : ""}
+ {isRequired ? (
+
+ *
+
+ ) : (
+ ""
+ )}
{isOptional ? (
-
+
{optionalLabel || "(optional)"}
-
+
) : (
""
)}
@@ -115,60 +142,48 @@ const Field = forwardRef(
pl: theme.gap.medium,
}}
>
-
+
{https ? "https" : "http"}://
),
- endAdornment:
- type === "password" ? (
-
- setVisible((show) => !show)}
- tabIndex={-1}
- sx={{
- color: theme.palette.section.borderColor,
- padding: `calc(${theme.gap.xs} / 2)`,
- "&:focus": {
- outline: "none",
- },
- "& .MuiTouchRipple-root": {
- pointerEvents: "none",
- display: "none",
- },
- }}
- >
- {!isVisible ? : }
-
-
- ) : (
- hasCopy && (
-
- }
- onClick={handleCopy}
- sx={{
- borderLeft: `solid 1px ${theme.palette.section.borderColor}`,
- lineHeight: 0,
- "& .MuiTouchRipple-root": {
- pointerEvents: "none",
- display: "none",
- },
- }}
- />
-
- )
- ),
+ endAdornment: type === "password" && (
+
+ setVisible((show) => !show)}
+ tabIndex={-1}
+ sx={{
+ color: theme.palette.section.borderColor,
+ padding: `calc(${theme.gap.xs} / 2)`,
+ "&:focus": {
+ outline: "none",
+ },
+ "& .MuiTouchRipple-root": {
+ pointerEvents: "none",
+ display: "none",
+ },
+ }}
+ >
+ {!isVisible ? : }
+
+
+ ),
}}
/>
{error && (
{error}
@@ -188,7 +203,6 @@ Field.propTypes = {
isRequired: PropTypes.bool,
isOptional: PropTypes.bool,
optionalLabel: PropTypes.string,
- hasCopy: PropTypes.bool,
autoComplete: PropTypes.string,
placeholder: PropTypes.string,
value: PropTypes.string.isRequired,
diff --git a/Client/src/Components/Inputs/Image/index.css b/Client/src/Components/Inputs/Image/index.css
index 4c427c9de..649012e1c 100644
--- a/Client/src/Components/Inputs/Image/index.css
+++ b/Client/src/Components/Inputs/Image/index.css
@@ -1,9 +1,3 @@
-.image-field-wrapper h2.MuiTypography-root,
-.image-field-wrapper p.MuiTypography-root,
-.image-field-wrapper + p.MuiTypography-root,
-.MuiStack-root:has(#modal-update-picture) h1.MuiTypography-root {
- color: var(--secondary-color-light);
-}
.MuiStack-root:has(#modal-update-picture) h1.MuiTypography-root {
font-weight: 600;
}
@@ -20,10 +14,5 @@
}
.image-field-wrapper + p.MuiTypography-root,
.image-field-wrapper p.MuiTypography-root {
- opacity: 0.6;
font-size: var(--env-var-font-size-small-plus);
}
-.image-field-wrapper h2.MuiTypography-root span {
- color: var(--theme-main);
- font-weight: 500;
-}
diff --git a/Client/src/Components/Inputs/Image/index.jsx b/Client/src/Components/Inputs/Image/index.jsx
index 771f461b4..f7bdc9cf0 100644
--- a/Client/src/Components/Inputs/Image/index.jsx
+++ b/Client/src/Components/Inputs/Image/index.jsx
@@ -31,19 +31,19 @@ const ImageField = ({ id, src, loading, onChange }) => {
<>
{
-
- Click to upload or drag and drop
+
+
+ Click to upload
+ {" "}
+ or drag and drop
+
+
+ (maximum size: 3MB)
- (maximum size: 3MB)
- Supported formats: JPG, PNG
+
+ Supported formats: JPG, PNG
+
>
) : (
diff --git a/Client/src/Components/Inputs/Radio/index.css b/Client/src/Components/Inputs/Radio/index.css
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/Client/src/Components/Inputs/Radio/index.css
@@ -0,0 +1 @@
+
diff --git a/Client/src/Components/RadioButton/index.jsx b/Client/src/Components/Inputs/Radio/index.jsx
similarity index 53%
rename from Client/src/Components/RadioButton/index.jsx
rename to Client/src/Components/Inputs/Radio/index.jsx
index acc87c992..c5595be83 100644
--- a/Client/src/Components/RadioButton/index.jsx
+++ b/Client/src/Components/Inputs/Radio/index.jsx
@@ -1,10 +1,16 @@
+import PropTypes from "prop-types";
+import { FormControlLabel, Radio as MUIRadio, Typography } from "@mui/material";
+import { useTheme } from "@emotion/react";
+import RadioChecked from "../../../assets/icons/radio-checked.svg?react";
+import "./index.css";
+
/**
- * RadioButton component.
+ * Radio component.
*
* @component
* @example
* // Usage:
- * {
const theme = useTheme();
+
return (
}
+ sx={{
+ color: "transparent",
+ width: 16,
+ height: 16,
+ boxShadow: "inset 0 0 0 1px rgb(16 22 26 / 40%)",
+ mt: theme.spacing(0.5),
+ }}
/>
}
onChange={props.onChange}
label={
<>
{props.title}
-
+
{props.desc}
>
}
labelPlacement="end"
- sx={{ margin: 0, alignItems: "flex-start" }}
+ sx={{
+ alignItems: "flex-start",
+ p: theme.spacing(2.5),
+ m: theme.spacing(-2.5),
+ borderRadius: theme.shape.borderRadius,
+ "&:hover": {
+ backgroundColor: theme.palette.unresolved.bg,
+ },
+ "& .MuiButtonBase-root": {
+ p: 0,
+ mr: theme.spacing(6),
+ },
+ }}
/>
);
-}
+};
-RadioButton.propTypes = {
+Radio.propTypes = {
title: PropTypes.string.isRequired,
desc: PropTypes.string,
size: PropTypes.string,
};
-export default RadioButton;
+export default Radio;
diff --git a/Client/src/Components/Inputs/Select/index.css b/Client/src/Components/Inputs/Select/index.css
index a760010bf..be46ad109 100644
--- a/Client/src/Components/Inputs/Select/index.css
+++ b/Client/src/Components/Inputs/Select/index.css
@@ -1,46 +1,12 @@
.select-wrapper .select-component > .MuiSelect-select {
padding: 0 10px;
- height: 34px !important;
- display: flex !important;
+ height: 34px;
+ display: flex;
align-items: center;
- text-transform: capitalize;
line-height: 1;
}
-.select-wrapper .MuiInputBase-root:has(> .MuiSelect-select) {
- min-width: 150px;
-}
.select-wrapper .MuiInputBase-root:has(> .MuiSelect-select),
.MuiMenu-List .MuiMenuItem-root,
.select-wrapper h3.MuiTypography-root {
font-size: var(--env-var-font-size-medium);
- color: var(--secondary-color);
-}
-.select-wrapper h3.MuiTypography-root {
- font-weight: 500;
-}
-.MuiInputBase-root:has(> .MuiSelect-select) fieldset {
- border-color: var(--border-color-dark);
-}
-.MuiInputBase-root:not(.Mui-focused):has(> .MuiSelect-select):hover fieldset {
- border-color: var(--border-color-dark);
-}
-
-.select-dropdown.MuiPaper-root {
- box-shadow: var(--env-var-shadow-1);
- border: solid 1px var(--border-color);
- border-radius: var(--env-var-radius-1);
-}
-.select-dropdown .MuiList-root {
- min-width: 100px;
-}
-.select-dropdown li {
- font-size: var(--env-var-font-size-medium);
- color: var(--secondary-color);
- padding: 5px 8px;
- border-radius: var(--env-var-radius-1);
-}
-.select-dropdown li.Mui-selected,
-.select-dropdown li.Mui-selected.Mui-focusVisible,
-.select-dropdown li.Mui-selected:hover {
- background-color: var(--primary-bg-fill);
}
diff --git a/Client/src/Components/Inputs/Select/index.jsx b/Client/src/Components/Inputs/Select/index.jsx
index 99240bc2b..5ae0492fe 100644
--- a/Client/src/Components/Inputs/Select/index.jsx
+++ b/Client/src/Components/Inputs/Select/index.jsx
@@ -55,15 +55,22 @@ const Select = ({
const theme = useTheme();
const itemStyles = {
fontSize: "var(--env-var-font-size-medium)",
- color: theme.palette.otherColors.bluishGray,
- textTransform: "capitalize",
- borderRadius: `${theme.shape.borderRadius}px`,
- margin: theme.gap.xs,
+ color: theme.palette.text.tertiary,
+ borderRadius: theme.shape.borderRadius,
+ margin: theme.spacing(2),
};
return (
-
- {label && {label}}
+
+ {label && (
+
+ {label}
+
+ )}
{placeholder && (