diff --git a/src/front/Components/DesignSystem/Form/BaseField.tsx b/src/front/Components/DesignSystem/Form/BaseField.tsx
index 08be103f..3fe14388 100644
--- a/src/front/Components/DesignSystem/Form/BaseField.tsx
+++ b/src/front/Components/DesignSystem/Form/BaseField.tsx
@@ -15,6 +15,7 @@ export type IProps = {
disableValidation?: boolean;
validationError?: ValidationError;
disabled?: boolean;
+ label?: string;
};
type IState = {
@@ -107,7 +108,7 @@ export default abstract class BaseField
{
errors.push(
-
+
{value}
,
);
diff --git a/src/front/Components/DesignSystem/Form/DateField/classes.module.scss b/src/front/Components/DesignSystem/Form/DateField/classes.module.scss
index 8cfc21c9..8fad4077 100644
--- a/src/front/Components/DesignSystem/Form/DateField/classes.module.scss
+++ b/src/front/Components/DesignSystem/Form/DateField/classes.module.scss
@@ -13,7 +13,7 @@
width: 100%;
height: 70px;
border: 1px solid var(--color-neutral-200);
-
+ font-family: var(--font-text-family);
&:disabled {
cursor: not-allowed;
}
diff --git a/src/front/Components/DesignSystem/Form/TextField/classes.module.scss b/src/front/Components/DesignSystem/Form/TextField/classes.module.scss
index 8cfc21c9..8b25310c 100644
--- a/src/front/Components/DesignSystem/Form/TextField/classes.module.scss
+++ b/src/front/Components/DesignSystem/Form/TextField/classes.module.scss
@@ -3,89 +3,103 @@
.root {
position: relative;
- .input {
- z-index: 1;
- display: flex;
- flex-direction: row;
- align-items: center;
- padding: 24px;
- gap: 10px;
- width: 100%;
- height: 70px;
- border: 1px solid var(--color-neutral-200);
-
- &:disabled {
+ &[data-is-disabled="true"] {
+ opacity: var(--opacity-disabled, 0.3);
+ .input-container {
cursor: not-allowed;
- }
-
- &:focus {
- ~ .fake-placeholder {
- transform: translateY(-35px);
- }
- }
-
- &:not([data-value=""]) {
- ~ .fake-placeholder {
- transform: translateY(-35px);
- }
- }
-
- &[type="number"] {
- &:focus {
- ~ .fake-placeholder {
- transform: translateY(-35px);
- }
+ border: 1px solid var(--input-main-border-default, #d7dce0);
+ &::placeholder {
+ background: var(--input-background, #fff);
}
- &:not([data-value=""]) {
- ~ .fake-placeholder {
- transform: translateY(-35px);
- }
+ &:hover {
+ border: 1px solid var(--input-main-border-default, #d7dce0);
}
- &::-webkit-inner-spin-button,
- &::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
+ .input {
+ cursor: not-allowed;
}
-
- /* For Chrome, Safari, and Opera */
- &::-webkit-inner-spin-button,
- &::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
-
- /* For IE 10+ */
- &::-ms-inner-spin-button,
- &::-ms-outer-spin-button {
- display: none;
- }
- }
-
- &:not([data-value=""]) {
- ~ .fake-placeholder {
- transform: translateY(-35px);
- }
- }
-
- ~ .fake-placeholder {
- z-index: 2;
- top: 35%;
- margin-left: 8px;
- padding: 0 16px;
- pointer-events: none;
- position: absolute;
- background: var(--color-generic-white);
- transition: transform 0.3s ease-in-out;
}
}
- &[data-is-errored="true"] {
+ .label {
+ padding: 0px var(--spacing-2, 16px);
+ }
+
+ .input-container {
+ display: flex;
+ padding: var(--spacing-2, 16px) var(--spacing-sm, 8px);
+ align-items: center;
+ gap: var(--spacing-2, 16px);
+
+ border-radius: var(--input-radius, 0px);
+ border: 1px solid var(--input-main-border-default, #d7dce0);
+ background: var(--input-background, #fff);
+
+ &:hover {
+ border: 1px solid var(--input-main-border-hovered, #b4bec5);
+ }
+
+ &:not([data-value=""]) {
+ border: 1px solid var(--input-main-border-filled, #6d7e8a);
+ .input {
+ font-weight: var(--font-text-weight-semibold, 600);
+ }
+ }
+
+ &[data-is-errored="true"] {
+ border: 1px solid var(--input-error, #dc2625);
+ }
+
+ &:focus,
+ &:focus-within,
+ &:focus-visible {
+ border: 1px solid var(--input-main-border-focused, #005bcb);
+ .input {
+ font-weight: var(--font-text-weight-semibold, 600);
+ }
+ }
+
.input {
- border: 1px solid var(--color-error-600);
- ~ .fake-placeholder {
- color: var(--color-error-600);
+ display: flex;
+ padding: 0px var(--spacing-2, 16px);
+
+ align-items: center;
+ gap: 8px;
+
+ flex: 1 0 0;
+ border: none;
+
+ &::placeholder {
+ color: var(--input-placeholder-empty, #6d7e8a);
+ /* text/md/regular */
+ font-family: var(--font-text-family, Poppins);
+ font-size: 16px;
+ font-style: normal;
+ font-weight: var(--font-text-weight-regular, 400);
+ line-height: normal;
+ letter-spacing: 0.08px;
+ }
+
+ &[type="number"] {
+ &::-webkit-inner-spin-button,
+ &::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+ }
+
+ /* For Chrome, Safari, and Opera */
+ &::-webkit-inner-spin-button,
+ &::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+ }
+
+ /* For IE 10+ */
+ &::-ms-inner-spin-button,
+ &::-ms-outer-spin-button {
+ display: none;
+ }
}
}
}
@@ -94,9 +108,9 @@
cursor: pointer;
height: 24px;
width: 24px;
- position: absolute;
- top: 50%;
- right: 24px;
- transform: translate(0, -50%);
+ }
+
+ .errors-container {
+ margin-top: 8px;
}
}
diff --git a/src/front/Components/DesignSystem/Form/TextField/index.tsx b/src/front/Components/DesignSystem/Form/TextField/index.tsx
index 0021f518..92f5d601 100644
--- a/src/front/Components/DesignSystem/Form/TextField/index.tsx
+++ b/src/front/Components/DesignSystem/Form/TextField/index.tsx
@@ -21,31 +21,34 @@ export default class TextField extends BaseField {
public override render(): ReactNode {
const value = this.state.value ?? "";
return (
-
-
-
-
- {this.props.placeholder} {!this.props.required && " (Facultatif)"}
-
- {this.props.canCopy && (
-
-
-
+
+
+
+
+ {this.props.canCopy && (
+
+
+
+ )}
+
+
{this.hasError() &&
{this.renderErrors()}
}
-
+
);
}
diff --git a/src/front/Components/DesignSystem/Form/TextareaField/classes.module.scss b/src/front/Components/DesignSystem/Form/TextareaField/classes.module.scss
index 42a5c80a..0a699277 100644
--- a/src/front/Components/DesignSystem/Form/TextareaField/classes.module.scss
+++ b/src/front/Components/DesignSystem/Form/TextareaField/classes.module.scss
@@ -3,61 +3,92 @@
.root {
position: relative;
- .textarea {
- resize: none;
- height: auto;
- box-sizing: border-box;
- font-family: "Inter", sans-serif;
- font-style: normal;
- font-weight: 400;
- font-size: 18px;
- line-height: 22px;
-
- &:read-only {
+ &[data-is-disabled="true"] {
+ opacity: var(--opacity-disabled, 0.3);
+ .input-container {
cursor: not-allowed;
- }
- z-index: 1;
- display: flex;
- flex-direction: row;
- align-items: center;
- padding: 24px;
- gap: 10px;
-
- width: 100%;
- height: 100px;
- border: 1px solid var(--color-neutral-200);
-
- ~ .fake-placeholder {
- z-index: 2;
- top: -12px;
- margin-left: 8px;
- padding: 0 16px;
- pointer-events: none;
- position: absolute;
- background: var(--color-generic-white);
- transform: translateY(35px);
- transition: transform 0.3s ease-in-out;
- }
-
- &:focus {
- ~ .fake-placeholder {
- transform: translateY(0px);
+ border: 1px solid var(--input-main-border-default, #d7dce0);
+ &::placeholder {
+ background: var(--input-background, #fff);
}
+
+ &:hover {
+ border: 1px solid var(--input-main-border-default, #d7dce0);
+ }
+
+ .input {
+ cursor: not-allowed;
+ }
+ }
+ }
+
+ .label {
+ padding: 0px var(--spacing-2, 16px);
+ }
+
+ .input-container {
+ display: flex;
+ padding: var(--spacing-2, 16px) var(--spacing-sm, 8px);
+ align-items: center;
+ gap: var(--spacing-2, 16px);
+
+ border-radius: var(--input-radius, 0px);
+ border: 1px solid var(--input-main-border-default, #d7dce0);
+ background: var(--input-background, #fff);
+
+ &:hover {
+ border: 1px solid var(--input-main-border-hovered, #b4bec5);
}
&:not([data-value=""]) {
- ~ .fake-placeholder {
- transform: translateY(0px);
+ border: 1px solid var(--input-main-border-filled, #6d7e8a);
+ .input {
+ font-weight: var(--font-text-weight-semibold, 600);
}
}
- }
- &[data-is-errored="true"] {
- .textarea {
- border: 1px solid var(--color-error-600);
- ~ .fake-placeholder {
- color: var(--color-error-600);
+ &[data-is-errored="true"] {
+ border: 1px solid var(--input-error, #dc2625);
+ }
+
+ &:focus,
+ &:focus-within,
+ &:focus-visible {
+ border: 1px solid var(--input-main-border-focused, #005bcb);
+ .input {
+ font-weight: var(--font-text-weight-semibold, 600);
}
}
+
+ .input {
+ display: flex;
+ padding: 0px var(--spacing-2, 16px);
+
+ align-items: center;
+ gap: 8px;
+
+ flex: 1 0 0;
+ border: none;
+ height: 94px;
+ &::placeholder {
+ color: var(--input-placeholder-empty, #6d7e8a);
+ /* text/md/regular */
+ font-family: var(--font-text-family, Poppins);
+ font-size: 16px;
+ font-style: normal;
+ font-weight: var(--font-text-weight-regular, 400);
+ line-height: normal;
+ letter-spacing: 0.08px;
+ }
+
+ color: var(--input-placeholder-filled, #24282e);
+ /* text/md/semibold */
+ font-family: var(--font-text-family, Poppins);
+ font-size: 16px;
+ font-style: normal;
+ font-weight: var(--font-text-weight-semibold, 600);
+ line-height: normal;
+ letter-spacing: 0.08px;
+ }
}
}
diff --git a/src/front/Components/DesignSystem/Form/TextareaField/index.tsx b/src/front/Components/DesignSystem/Form/TextareaField/index.tsx
index 485bb0f9..ce4da58a 100644
--- a/src/front/Components/DesignSystem/Form/TextareaField/index.tsx
+++ b/src/front/Components/DesignSystem/Form/TextareaField/index.tsx
@@ -1,8 +1,7 @@
-import BaseField, { IProps as IBaseFieldProps } from "../BaseField";
-import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
import React from "react";
+import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
import { ReactNode } from "react";
-
+import BaseField, { IProps as IBaseFieldProps } from "../BaseField";
import classes from "./classes.module.scss";
import classnames from "classnames";
@@ -18,30 +17,29 @@ export default class TextAreaField extends BaseField {
const value = this.state.value ?? "";
return (
-
-
-
- {this.props.placeholder} {!this.props.required && " (Facultatif)"}
-
- {this.hasError() &&
{this.renderErrors()}
}
+
+
+ {this.hasError() &&
{this.renderErrors()}
}
);
}
-
- public override componentDidMount() {
- this.setState({
- value: this.props.defaultValue ?? "",
- });
- }
}
diff --git a/src/front/Components/DesignSystem/Typography/index.tsx b/src/front/Components/DesignSystem/Typography/index.tsx
index 86dd26dc..0f81e46e 100644
--- a/src/front/Components/DesignSystem/Typography/index.tsx
+++ b/src/front/Components/DesignSystem/Typography/index.tsx
@@ -144,6 +144,9 @@ export enum ETypoColor {
TABS_CONTRAST_DEFAULT = "--tabs-contrast-default",
TABS_CONTRAST_ACTIVATED = "--tabs-contrast-actived",
+
+ INPUT_LABEL = "--input-label",
+ INPUT_ERROR = "--input-error",
}
export default function Typography(props: IProps) {
diff --git a/src/front/Components/Elements/NumberPicker/classes.module.scss b/src/front/Components/Elements/NumberPicker/classes.module.scss
index 0768ef30..04ead720 100644
--- a/src/front/Components/Elements/NumberPicker/classes.module.scss
+++ b/src/front/Components/Elements/NumberPicker/classes.module.scss
@@ -4,16 +4,20 @@
align-items: center;
width: fit-content;
border: 1px solid #e7e7e7;
- padding: 24px;
-
+ padding: var(--spacing-1-5, 12px) var(--spacing-md, 16px);
+ gap: var(--spacing-2, 16px);
.button {
border: none;
background: none;
+ padding: 0;
+ height: 24px;
+ width: 24px;
cursor: pointer;
}
.input {
- width: 50px;
+ width: 40px;
+ height: 40px;
text-align: center;
border: none;
}
diff --git a/src/front/Components/Elements/NumberPicker/index.tsx b/src/front/Components/Elements/NumberPicker/index.tsx
index 5bb08189..c69a3e34 100644
--- a/src/front/Components/Elements/NumberPicker/index.tsx
+++ b/src/front/Components/Elements/NumberPicker/index.tsx
@@ -35,11 +35,11 @@ export default function NumberPicker(props: IProps) {
return (
);
diff --git a/src/front/Components/Layouts/DesignSystem/classes.module.scss b/src/front/Components/Layouts/DesignSystem/classes.module.scss
index 2228c147..57f1d643 100644
--- a/src/front/Components/Layouts/DesignSystem/classes.module.scss
+++ b/src/front/Components/Layouts/DesignSystem/classes.module.scss
@@ -3,6 +3,11 @@
flex-direction: column;
gap: 32px;
.components {
+ .inputs {
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
+ }
display: flex;
flex-direction: column;
gap: 24px;
diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx
index 599555c1..880e89ba 100644
--- a/src/front/Components/Layouts/DesignSystem/index.tsx
+++ b/src/front/Components/Layouts/DesignSystem/index.tsx
@@ -13,6 +13,9 @@ import classes from "./classes.module.scss";
import useOpenable from "@Front/Hooks/useOpenable";
import Modal from "@Front/Components/DesignSystem/Modal";
import IconButton, { EIconButtonVariant } from "@Front/Components/DesignSystem/IconButton";
+import Form from "@Front/Components/DesignSystem/Form";
+import TextField from "@Front/Components/DesignSystem/Form/TextField";
+import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField";
export default function DesignSystem() {
const { isOpen, open, close } = useOpenable();
@@ -64,6 +67,15 @@ export default function DesignSystem() {
+
Inputs
+
+
Modal
+