Merge branch 'dev' of github.com:smart-chain-fr/leCoffre-front into dev
This commit is contained in:
commit
478aebfeb3
@ -32,7 +32,9 @@
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
&:hover {
|
||||
background-color: var(--background-elevation-1);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export default function MuiTable(props: IProps) {
|
||||
<TableBody>
|
||||
{rows.map((row) => {
|
||||
return (
|
||||
<TableRow key={row.key} sx={{ verticalAlign: "middle" }}>
|
||||
<TableRow key={row.key} sx={{ verticalAlign: "middle" }} className={classes["row"]}>
|
||||
{Object.values(row.content).map((cell) => (
|
||||
<TableCell
|
||||
className={classes["cell"]}
|
||||
|
@ -0,0 +1,19 @@
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 32px;
|
||||
.components {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
|
||||
.rows {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
152
src/front/Components/Layouts/DesignSystem/index.tsx
Normal file
152
src/front/Components/Layouts/DesignSystem/index.tsx
Normal file
@ -0,0 +1,152 @@
|
||||
import Button, { EButtonSize, EButtonStyleType, EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import CircleProgress from "@Front/Components/DesignSystem/CircleProgress";
|
||||
import Newsletter from "@Front/Components/DesignSystem/Newsletter";
|
||||
import Table from "@Front/Components/DesignSystem/Table";
|
||||
import Tag, { ETagColor, ETagVariant } from "@Front/Components/DesignSystem/Tag";
|
||||
import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography";
|
||||
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
||||
|
||||
import classes from "./classes.module.scss";
|
||||
|
||||
export default function DesignSystem() {
|
||||
return (
|
||||
<DefaultTemplate title={"DesignSystem"}>
|
||||
<Newsletter isOpen />
|
||||
<div className={classes["root"]}>
|
||||
<Typography typo={ETypo.DISPLAY_LARGE}>DesignSystem</Typography>
|
||||
<div className={classes["components"]}>
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Circle Progress</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<CircleProgress percentage={0} />
|
||||
<CircleProgress percentage={30} />
|
||||
<CircleProgress percentage={60} />
|
||||
<CircleProgress percentage={100} />
|
||||
</div>
|
||||
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Tags</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<Tag color={ETagColor.INFO} variant={ETagVariant.REGULAR} label="Info" />
|
||||
<Tag color={ETagColor.SUCCESS} variant={ETagVariant.REGULAR} label="Success" />
|
||||
<Tag color={ETagColor.WARNING} variant={ETagVariant.REGULAR} label="Warning" />
|
||||
<Tag color={ETagColor.ERROR} variant={ETagVariant.REGULAR} label="Error" />
|
||||
</div>
|
||||
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Table Tags</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<Tag color={ETagColor.INFO} variant={ETagVariant.SEMI_BOLD} label="INFO" />
|
||||
<Tag color={ETagColor.SUCCESS} variant={ETagVariant.SEMI_BOLD} label="SUCCESS" />
|
||||
<Tag color={ETagColor.WARNING} variant={ETagVariant.SEMI_BOLD} label="WARNING" />
|
||||
<Tag color={ETagColor.ERROR} variant={ETagVariant.SEMI_BOLD} label="ERROR" />
|
||||
</div>
|
||||
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Table</Typography>
|
||||
<Table
|
||||
className={classes["table"]}
|
||||
header={[
|
||||
{
|
||||
key: "name",
|
||||
title: "Nom",
|
||||
},
|
||||
{
|
||||
key: "firstname",
|
||||
title: "Prénom",
|
||||
},
|
||||
{
|
||||
key: "button",
|
||||
},
|
||||
]}
|
||||
rows={[
|
||||
{
|
||||
key: "1",
|
||||
name: "Doe",
|
||||
firstname: "John",
|
||||
button: (
|
||||
<Button size={EButtonSize.SM} variant={EButtonVariant.PRIMARY}>
|
||||
Send email
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
name: "Doe",
|
||||
firstname: "Jane",
|
||||
button: <Tag color={ETagColor.SUCCESS} variant={ETagVariant.SEMI_BOLD} label="Actif" />,
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
name: "Doe",
|
||||
firstname: "Jack",
|
||||
button: <Tag color={ETagColor.ERROR} variant={ETagVariant.SEMI_BOLD} label="Inactif" />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Buttons</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.PRIMARY}>PRIMARY</Button>
|
||||
<Button variant={EButtonVariant.PRIMARY} styleType={EButtonStyleType.OUTLINED}>
|
||||
PRIMARY
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.PRIMARY} styleType={EButtonStyleType.TEXT}>
|
||||
PRIMARY
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.SECONDARY}>SECONDARY</Button>
|
||||
<Button variant={EButtonVariant.SECONDARY} styleType={EButtonStyleType.OUTLINED}>
|
||||
SECONDARY
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.SECONDARY} styleType={EButtonStyleType.TEXT}>
|
||||
SECONDARY
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.NEUTRAL}>NEUTRAL</Button>
|
||||
<Button variant={EButtonVariant.NEUTRAL} styleType={EButtonStyleType.OUTLINED}>
|
||||
NEUTRAL
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.NEUTRAL} styleType={EButtonStyleType.TEXT}>
|
||||
NEUTRAL
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.ERROR}>ERROR</Button>
|
||||
<Button variant={EButtonVariant.ERROR} styleType={EButtonStyleType.OUTLINED}>
|
||||
ERROR
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.ERROR} styleType={EButtonStyleType.TEXT}>
|
||||
ERROR
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.WARNING}>WARNING</Button>
|
||||
<Button variant={EButtonVariant.WARNING} styleType={EButtonStyleType.OUTLINED}>
|
||||
WARNING
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.WARNING} styleType={EButtonStyleType.TEXT}>
|
||||
WARNING
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.SUCCESS}>SUCCESS</Button>
|
||||
<Button variant={EButtonVariant.SUCCESS} styleType={EButtonStyleType.OUTLINED}>
|
||||
SUCCESS
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.SUCCESS} styleType={EButtonStyleType.TEXT}>
|
||||
SUCCESS
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["rows"]}>
|
||||
<Button variant={EButtonVariant.INFO}>INFO</Button>
|
||||
<Button variant={EButtonVariant.INFO} styleType={EButtonStyleType.OUTLINED}>
|
||||
INFO
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.INFO} styleType={EButtonStyleType.TEXT}>
|
||||
INFO
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</DefaultTemplate>
|
||||
);
|
||||
}
|
@ -1,91 +1,5 @@
|
||||
@import "@Themes/constants.scss";
|
||||
|
||||
.root {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
min-height: 100%;
|
||||
|
||||
.no-folder-selected {
|
||||
width: 100%;
|
||||
|
||||
.choose-a-folder {
|
||||
margin-top: 96px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.folder-informations {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
|
||||
.folder-header {
|
||||
width: 100%;
|
||||
|
||||
.header {
|
||||
margin-bottom: 32px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.second-box {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
:first-child {
|
||||
margin-right: 12px;
|
||||
}
|
||||
> * {
|
||||
margin: auto;
|
||||
}
|
||||
@media (max-width: $screen-m) {
|
||||
:first-child {
|
||||
margin-right: 0;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
> * {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.modal-title {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.components {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
|
||||
.rows {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
@ -1,179 +1,20 @@
|
||||
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||
import { OfficeFolder } from "le-coffre-resources/dist/Notary";
|
||||
import { useCallback, useState } from "react";
|
||||
|
||||
import BasePage from "../Base";
|
||||
import classes from "./classes.module.scss";
|
||||
import Newletter from "@Front/Components/DesignSystem/Newsletter";
|
||||
import Button, { EButtonSize, EButtonStyleType, EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import Tag, { ETagColor, ETagVariant } from "@Front/Components/DesignSystem/Tag";
|
||||
import CircleProgress from "@Front/Components/DesignSystem/CircleProgress";
|
||||
import Table from "@Front/Components/DesignSystem/Table";
|
||||
import { EnvelopeIcon } from "@heroicons/react/20/solid";
|
||||
|
||||
type IProps = {};
|
||||
type IState = {
|
||||
selectedFolder: OfficeFolder | null;
|
||||
isArchivedModalOpen: boolean;
|
||||
};
|
||||
export default class Folder extends BasePage<IProps, IState> {
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedFolder: null,
|
||||
isArchivedModalOpen: true,
|
||||
};
|
||||
this.onSelectedFolder = this.onSelectedFolder.bind(this);
|
||||
}
|
||||
export default function Folder() {
|
||||
const [_selectedFolder, setSelectedFolder] = useState<OfficeFolder | null>(null);
|
||||
const [_isArchivedModalOpen, _setIsArchivedModalOpen] = useState(true);
|
||||
|
||||
// TODO: Message if the user has not created any folder yet
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder} mobileBackText={"Liste des dossiers"}>
|
||||
<div className={classes["root"]}>
|
||||
<div className={classes["components"]}>
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Circle Progress</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<CircleProgress percentage={0} />
|
||||
<CircleProgress percentage={30} />
|
||||
<CircleProgress percentage={60} />
|
||||
<CircleProgress percentage={100} />
|
||||
</div>
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Tags</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<Tag color={ETagColor.INFO} variant={ETagVariant.REGULAR} label="Info" />
|
||||
<Tag color={ETagColor.SUCCESS} variant={ETagVariant.REGULAR} label="Success" />
|
||||
<Tag color={ETagColor.WARNING} variant={ETagVariant.REGULAR} label="Warning" />
|
||||
<Tag color={ETagColor.ERROR} variant={ETagVariant.REGULAR} label="Error" />
|
||||
</div>
|
||||
const onSelectedFolder = useCallback((folder: OfficeFolder): void => {
|
||||
setSelectedFolder(folder);
|
||||
}, []);
|
||||
|
||||
<Typography typo={ETypo.TEXT_LG_BOLD}>Table Tags</Typography>
|
||||
<div className={classes["rows"]}>
|
||||
<Tag color={ETagColor.INFO} variant={ETagVariant.SEMI_BOLD} label="INFO" />
|
||||
<Tag color={ETagColor.SUCCESS} variant={ETagVariant.SEMI_BOLD} label="SUCCESS" />
|
||||
<Tag color={ETagColor.WARNING} variant={ETagVariant.SEMI_BOLD} label="WARNING" />
|
||||
<Tag color={ETagColor.ERROR} variant={ETagVariant.SEMI_BOLD} label="ERROR" />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
header={[
|
||||
{
|
||||
key: "name",
|
||||
title: "Nom",
|
||||
},
|
||||
{
|
||||
key: "firstname",
|
||||
title: "Prénom",
|
||||
},
|
||||
{
|
||||
key: "button",
|
||||
},
|
||||
]}
|
||||
rows={[
|
||||
{
|
||||
key: "1",
|
||||
name: "Doe",
|
||||
firstname: "John",
|
||||
button: (
|
||||
<Button size={EButtonSize.SM} variant={EButtonVariant.PRIMARY} >
|
||||
Send email
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
name: "Doe",
|
||||
firstname: "Jane",
|
||||
button: <Tag color={ETagColor.SUCCESS} variant={ETagVariant.SEMI_BOLD} label="Actif" />,
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
name: "Doe",
|
||||
firstname: "Jack",
|
||||
button: <Tag color={ETagColor.ERROR} variant={ETagVariant.SEMI_BOLD} label="Inactif" />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={classes["no-folder-selected"]}>
|
||||
<Typography typo={ETypo.TITLE_H1}>Informations du dossier</Typography>
|
||||
<div className={classes["choose-a-folder"]}>
|
||||
<Typography typo={ETypo.TEXT_LG_REGULAR} color={ETypoColor.COLOR_NEUTRAL_500}>
|
||||
Sélectionnez un dossier
|
||||
</Typography>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.PRIMARY}>PRIMARY</Button>
|
||||
<Button variant={EButtonVariant.PRIMARY} styleType={EButtonStyleType.OUTLINED}>
|
||||
PRIMARY
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.PRIMARY} styleType={EButtonStyleType.TEXT}>
|
||||
PRIMARY
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.SECONDARY}>SECONDARY</Button>
|
||||
<Button variant={EButtonVariant.SECONDARY} styleType={EButtonStyleType.OUTLINED}>
|
||||
SECONDARY
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.SECONDARY} styleType={EButtonStyleType.TEXT}>
|
||||
SECONDARY
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.NEUTRAL}>NEUTRAL</Button>
|
||||
<Button variant={EButtonVariant.NEUTRAL} styleType={EButtonStyleType.OUTLINED}>
|
||||
NEUTRAL
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.NEUTRAL} styleType={EButtonStyleType.TEXT}>
|
||||
NEUTRAL
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.ERROR}>ERROR</Button>
|
||||
<Button variant={EButtonVariant.ERROR} styleType={EButtonStyleType.OUTLINED}>
|
||||
ERROR
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.ERROR} styleType={EButtonStyleType.TEXT}>
|
||||
ERROR
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.WARNING}>WARNING</Button>
|
||||
<Button variant={EButtonVariant.WARNING} styleType={EButtonStyleType.OUTLINED}>
|
||||
WARNING
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.WARNING} styleType={EButtonStyleType.TEXT}>
|
||||
WARNING
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.SUCCESS}>SUCCESS</Button>
|
||||
<Button variant={EButtonVariant.SUCCESS} styleType={EButtonStyleType.OUTLINED}>
|
||||
SUCCESS
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.SUCCESS} styleType={EButtonStyleType.TEXT}>
|
||||
SUCCESS
|
||||
</Button>
|
||||
</div>
|
||||
<div className={classes["buttons"]}>
|
||||
<Button variant={EButtonVariant.INFO}>INFO</Button>
|
||||
<Button variant={EButtonVariant.INFO} styleType={EButtonStyleType.OUTLINED}>
|
||||
INFO
|
||||
</Button>
|
||||
<Button variant={EButtonVariant.INFO} styleType={EButtonStyleType.TEXT}>
|
||||
INFO
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<Newletter isOpen={false} />
|
||||
</div>
|
||||
</div>
|
||||
</DefaultNotaryDashboard>
|
||||
);
|
||||
}
|
||||
|
||||
private onSelectedFolder(folder: OfficeFolder): void {
|
||||
this.setState({ selectedFolder: folder });
|
||||
}
|
||||
return (
|
||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={onSelectedFolder} mobileBackText={"Liste des dossiers"}>
|
||||
<div className={classes["root"]}></div>
|
||||
</DefaultNotaryDashboard>
|
||||
);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/login",
|
||||
"labelKey": "design_system"
|
||||
"labelKey": "login"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
|
@ -21,7 +21,7 @@
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/login",
|
||||
"labelKey": "design_system"
|
||||
"labelKey": "login"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
|
@ -21,7 +21,7 @@
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/login",
|
||||
"labelKey": "design_system"
|
||||
"labelKey": "login"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
|
@ -21,7 +21,7 @@
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/login",
|
||||
"labelKey": "design_system"
|
||||
"labelKey": "login"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
|
5
src/pages/design-system/index.tsx
Normal file
5
src/pages/design-system/index.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import DesignSystem from "@Front/Components/Layouts/DesignSystem";
|
||||
|
||||
export default function Route() {
|
||||
return <DesignSystem />;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user