@@ -268,25 +247,15 @@ const ProfilePanel = () => {
This is your current email address — it cannot be changed.
-
-
- {errors[idToName["edit-email"]] ? (
-
- {errors[idToName["edit-email"]]}
-
- ) : (
- ""
- )}
-
+
diff --git a/Client/src/Components/TextFields/Description/DescriptionTextField.jsx b/Client/src/Components/TextFields/Description/DescriptionTextField.jsx
deleted file mode 100644
index dd4011da9..000000000
--- a/Client/src/Components/TextFields/Description/DescriptionTextField.jsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import React from "react";
-import "./descriptionTextField.css";
-import { TextField } from "@mui/material";
-import PropTypes from "prop-types";
-import { useTheme } from "@mui/material";
-
-/**
- * @component
- * @param {Object} props
- * @param {function} props.onChange - The function to call when the text field changes (optional)
- * @param {string} props.hintText - The hint text displayed within the text field (required)
- * @param {boolean} props.hasError - A flag indicating if the text field has an error (required)
- * @returns {JSX.Element} - Renders the description text field component
- */
-const DescriptionTextField = ({ onChange, hintText, hasError }) => {
- const theme = useTheme();
-
- const fontLookup = {
- default: theme.font.default.font,
- };
-
- const fontFamily = fontLookup["default"];
-
- return (
-
-
Description
-
-
- );
-};
-
-DescriptionTextField.propTypes = {
- hintText: PropTypes.string.isRequired,
- hasError: PropTypes.bool.isRequired,
-};
-
-export default DescriptionTextField;
diff --git a/Client/src/Components/TextFields/Description/descriptionTextField.css b/Client/src/Components/TextFields/Description/descriptionTextField.css
deleted file mode 100644
index e86727452..000000000
--- a/Client/src/Components/TextFields/Description/descriptionTextField.css
+++ /dev/null
@@ -1,77 +0,0 @@
-:root {
- --env-var-color-1: #101828;
- --env-var-color-2: #475467;
- --env-var-color-3: #1570ef;
-
- --env-var-color-4: #d0d5dd;
- --env-var-color-5: #344054;
- --env-var-color-6: #eaecf0;
- --env-var-color-7: #7f56d9;
- --env-var-color-8: #fff;
- --env-var-color-9: #f2f2f2;
- --env-var-color-10: #175cd3;
-
- --env-var-radius-1: 4px;
- --env-var-radius-2: 8px;
-
- --env-var-width-1: 100vw;
- --env-var-width-2: 360px;
-
- --env-var-height-1: 100vh;
-
- --env-var-spacing-1: 12px;
- --env-var-spacing-2: 24px;
- --env-var-spacing-3: 32px;
- --env-var-spacing-4: 40px;
-
- --env-var-font-size-small: 11px;
- --env-var-font-size-medium: 13px;
- --env-var-font-size-medium-plus: 14px;
- --env-var-font-size-large: 16px;
- --env-var-font-size-xlarge: 30px;
-
- --env-var-img-width-1: 20px;
-
- --env-var-default-1: 24px;
- --env-var-default-2: 40px;
-}
-
-.description-field-holder {
- margin: 10px 20px;
- margin-top: 20px;
-}
-
-.text-field-title {
- color: var(--env-var-color-5);
- font-weight: bold;
- margin-bottom: 10px;
- font-size: var(--env-var-font-size-medium);
- color: var(--env-var-color-5);
- font-weight: bold;
-}
-
-.description-field-area {
- min-width: 320px;
- font-size: var(--env-var-font-size-medium);
- border-radius: 8px;
-}
-
-.description-field-label {
- margin-top: 10px;
- font-size: var(--env-var-font-size-small);
-}
-
-.with-error {
- color: red;
-}
-
-#description-field-area-helper-text {
- margin-left: 0;
- margin-top: 10px;
- font-size: var(--env-var-font-size-small);
-}
-
-#description-field-area {
- min-width: 320px;
- font-size: var(--env-var-font-size-medium);
-}
diff --git a/Client/src/Components/TextFields/Email/EmailTextField.jsx b/Client/src/Components/TextFields/Email/EmailTextField.jsx
deleted file mode 100644
index 1e199e7da..000000000
--- a/Client/src/Components/TextFields/Email/EmailTextField.jsx
+++ /dev/null
@@ -1,106 +0,0 @@
-import React, { useState } from "react";
-import "./emailTextField.css";
-import { InputAdornment, TextField } from "@mui/material";
-import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
-import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
-import { useTheme } from "@mui/material";
-
-/**
- * `EmailTextField` is a functional React component that renders a text field for email input.
- *
- * @component
- * @param {Object} props - The properties that define the `EmailTextField` component.
- * @param {function} props.onChange - The function to call when the text field changes.
- * @param {string} props.id - The id of the text field.
- * @param {string} [props.label="Email"] - The label of the text field.
- * @param {string} props.value - The value of the text field.
- * @param {string} props.variant - The variant of the text field.
- * @param {string} props.placeholder - The placeholder of the text field.
- * @param {React.Element} props.icon - The icon to be displayed in the text field.
- * @param {string} props.helperText - The helper text to be displayed below the text field.
- * @param {boolean} props.error - If true, the text field will indicate an error state.
- * @param {boolean} props.disabled - If true, the text field will be disabled and cannot be interacted with.
- *
- * @example
- * // To use this component, import it and use it in your JSX like this:
- *
- *
- * @returns {React.Element} The `EmailTextField` component with a text field for email input.
- */
-
-const EmailTextField = ({
- onChange,
- id,
- label = "Email",
- value = undefined,
- variant,
- placeholder,
- autoComplete,
- icon,
- helperText,
- error,
- disabled
-}) => {
- const theme = useTheme();
-
- const fontLookup = {
- default: theme.font.default.font,
- };
-
- const fontFamily = fontLookup["default"];
-
- const [showIcon, setShowIcon] = useState(false);
-
- const handleMouseEnter = () => setShowIcon(true);
- const handleMouseLeave = () => setShowIcon(false);
-
- return (
-
@@ -439,7 +442,7 @@ const Demo = () => {
/>
-
+ {
body="Since you logged in via SSO, you cannot reset or modify your password."
/>
-
+
-
+
-
+ {
isToast={true}
/>
-
+ {
-
+
+
+
+
+
+
+
);
};
diff --git a/Client/src/Pages/ForgotPassword/index.jsx b/Client/src/Pages/ForgotPassword/index.jsx
index 5012b9d67..839e6a882 100644
--- a/Client/src/Pages/ForgotPassword/index.jsx
+++ b/Client/src/Pages/ForgotPassword/index.jsx
@@ -2,13 +2,13 @@ import BackgroundPattern from "../../Components/BackgroundPattern/BackgroundPatt
import "./index.css";
import React from "react";
import Logomark from "../../assets/Images/key-password.png";
-import EmailTextField from "../../Components/TextFields/Email/EmailTextField";
import Button from "../../Components/Button";
import LeftArrow from "../../assets/Images/arrow-left.png";
import { useState, useEffect } from "react";
import { recoveryValidation } from "../../Validation/validation";
import axiosInstance from "../../Utils/axiosConfig";
import { useNavigate } from "react-router-dom";
+import Field from "../../Components/Inputs/Field";
const ForgotPassword = () => {
const navigate = useNavigate();
@@ -76,12 +76,14 @@ const ForgotPassword = () => {
-
+
-
-
diff --git a/Client/src/Pages/Monitors/index.jsx b/Client/src/Pages/Monitors/index.jsx
index a8f30623f..e00061071 100644
--- a/Client/src/Pages/Monitors/index.jsx
+++ b/Client/src/Pages/Monitors/index.jsx
@@ -6,7 +6,7 @@ import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice";
import { useNavigate } from "react-router-dom";
import Button from "../../Components/Button";
import ServerStatus from "../../Components/Charts/Servers/ServerStatus";
-import SearchTextField from "../../Components/TextFields/Search/SearchTextField";
+import SearchTextField from "../../Components/Inputs/Search/SearchTextField";
import MonitorTable from "../../Components/MonitorTable";
import { useTheme } from "@emotion/react";
diff --git a/Client/src/Pages/PlayGround/PlayGround.jsx b/Client/src/Pages/PlayGround/PlayGround.jsx
index 247146362..70916508c 100644
--- a/Client/src/Pages/PlayGround/PlayGround.jsx
+++ b/Client/src/Pages/PlayGround/PlayGround.jsx
@@ -1,12 +1,8 @@
import React from "react";
-import EmailTextField from "../../Components/TextFields/Email/EmailTextField";
-import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
-import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
-import WebsiteTextField from "../../Components/TextFields/Website/WebsiteTextField";
-import DescriptionTextField from "../../Components/TextFields/Description/DescriptionTextField";
import PlayGroundCharts from "./PlayGround-Charts";
import PlayGroundPopupModals from "./PlayGround-Popup-Modals";
import PlayGroundTooltips from "./PlayGround-Tooltips";
+import Field from "../../Components/Inputs/Field";
// This Component is just for the development and test
// purposes and just to see what my components look like while development
@@ -15,49 +11,71 @@ function PlayGround() {
return (
{/* Default state of Email Text Fields */}
-
- {/* Email Text Field when validation error occures */}
- }
- helperText="This is an error message"
- />
- {/* Email Text Field while mouse hover */}
- }
- helperText="This is a hint text to help user."
- />
+
+
+ {/* Email Text Field when validation error occures */}
+
+
- {/* Now, illustration of the Website text fields */}
-
-
+ {/* Now, illustration of the Website text fields */}
+
+
+
+
{/* Now, illustration of the Description text fields */}
-
-
+
+
+
+
diff --git a/Client/src/Pages/Register/index.css b/Client/src/Pages/Register/index.css
index 8d4b99f1b..948f0afd0 100644
--- a/Client/src/Pages/Register/index.css
+++ b/Client/src/Pages/Register/index.css
@@ -1,5 +1,4 @@
.register-page {
- width: var(--env-var-width-1);
display: flex;
justify-content: center;
min-height: var(--env-var-height-1);
@@ -40,16 +39,6 @@
font-weight: 600;
}
-#register-firstname-input,
-#register-lastname-input,
-#register-email-input,
-#register-password-input {
- font-size: var(--env-var-font-size-medium);
- width: 294px;
- height: 11px;
- padding: 12px 14px;
-}
-
.register-bottom-spacing {
height: 50px;
}
diff --git a/Client/src/Pages/Register/index.jsx b/Client/src/Pages/Register/index.jsx
index 8bd026187..12332f27e 100644
--- a/Client/src/Pages/Register/index.jsx
+++ b/Client/src/Pages/Register/index.jsx
@@ -4,9 +4,6 @@ import { useNavigate } from "react-router-dom";
import "./index.css";
import BackgroundPattern from "../../Components/BackgroundPattern/BackgroundPattern";
import Logomark from "../../assets/Images/Logomark.png";
-import EmailTextField from "../../Components/TextFields/Email/EmailTextField";
-import PasswordTextField from "../../Components/TextFields/Password/PasswordTextField";
-import StringTextField from "../../Components/TextFields/Text/TextField";
import Check from "../../Components/Check/Check";
import Button from "../../Components/Button";
import Google from "../../assets/Images/Google.png";
@@ -15,6 +12,7 @@ import axiosInstance from "../../Utils/axiosConfig";
import { useDispatch } from "react-redux";
import { register } from "../../Features/Auth/authSlice";
import { createToast } from "../../Utils/toastUtils";
+import Field from "../../Components/Inputs/Field";
const Register = () => {
const dispatch = useDispatch();
@@ -119,6 +117,7 @@ const Register = () => {
}
};
+
return (
@@ -137,42 +136,58 @@ const Register = () => {
-
-
-
-
+
+ {/* TODO - hook up to form state and run checks */}
+
diff --git a/Client/src/Pages/SetNewPassword/index.jsx b/Client/src/Pages/SetNewPassword/index.jsx
index d0b4242ee..c06787b17 100644
--- a/Client/src/Pages/SetNewPassword/index.jsx
+++ b/Client/src/Pages/SetNewPassword/index.jsx
@@ -1,7 +1,6 @@
import BackgroundPattern from "../../Components/BackgroundPattern/BackgroundPattern";
import "./index.css";
import LockIcon from "../../assets/Images/lock-icon.png";
-import PasswordTextField from "../../Components/TextFields/Password/PasswordTextField";
import Check from "../../Components/Check/Check";
import Button from "../../Components/Button";
import LeftArrow from "../../assets/Images/arrow-left.png";
@@ -10,6 +9,7 @@ import { useState, useEffect } from "react";
import { newPasswordValidation } from "../../Validation/validation";
import axiosInstance from "../../Utils/axiosConfig";
import { useNavigate } from "react-router-dom";
+import Field from "../../Components/Inputs/Field";
const SetNewPassword = () => {
const navigate = useNavigate();
@@ -83,22 +83,24 @@ const SetNewPassword = () => {