From 628598668ec3a5dbe9245e5af511684ecd3d659f Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:13:12 +0100 Subject: [PATCH 1/9] feat(dossier): CardLayout component --- components/folders/CardLayout/index.tsx | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 components/folders/CardLayout/index.tsx diff --git a/components/folders/CardLayout/index.tsx b/components/folders/CardLayout/index.tsx new file mode 100644 index 0000000..17c13cb --- /dev/null +++ b/components/folders/CardLayout/index.tsx @@ -0,0 +1,26 @@ +import * as React from "react"; +import Card from "@mui/material/Card"; +import CardContent from "@mui/material/CardContent"; +import Typography from "@mui/material/Typography"; +import Stack from "@mui/material/Stack"; +import DeputyPreview from "../DeputyPreview"; + +interface CardLayoutProps { + title: string; + children: React.ReactNode; +} + +const CardLayout = ({ title, children }: CardLayoutProps) => { + return ( + + + + {title} + + {children} + + + ); +}; + +export default CardLayout; From f94bc974cda966232d1cc323c6cde7a32c798e1a Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:14:04 +0100 Subject: [PATCH 2/9] feat(dossier): Link and Info icons --- icons/InfoIcon.tsx | 20 ++++++++++++++++++++ icons/LinkIcon.tsx | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 icons/InfoIcon.tsx create mode 100644 icons/LinkIcon.tsx diff --git a/icons/InfoIcon.tsx b/icons/InfoIcon.tsx new file mode 100644 index 0000000..ae70a0f --- /dev/null +++ b/icons/InfoIcon.tsx @@ -0,0 +1,20 @@ +import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon"; + +export default function InfoIcon(props: SvgIconProps) { + return ( + + + + + + ); +} diff --git a/icons/LinkIcon.tsx b/icons/LinkIcon.tsx new file mode 100644 index 0000000..dc682ab --- /dev/null +++ b/icons/LinkIcon.tsx @@ -0,0 +1,20 @@ +import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon"; + +export default function LinkIcon(props: SvgIconProps) { + return ( + + + + + + ); +} From 5bd7f6f1283b1a3e1ee0d6a6dbb1141fb1d33e55 Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:14:35 +0100 Subject: [PATCH 3/9] refactor(dossier): AdditionalInfoCard --- .../folders/AdditionalInfoCard/index.tsx | 73 ++++++++++--------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/components/folders/AdditionalInfoCard/index.tsx b/components/folders/AdditionalInfoCard/index.tsx index 841b3bb..56cfdc1 100644 --- a/components/folders/AdditionalInfoCard/index.tsx +++ b/components/folders/AdditionalInfoCard/index.tsx @@ -1,52 +1,59 @@ import * as React from "react"; import Button from "@mui/material/Button"; -import Card from "@mui/material/Card"; -import CardContent from "@mui/material/CardContent"; import DeputyPreview from "../DeputyPreview"; import Typography from "@mui/material/Typography"; import Stack from "@mui/material/Stack"; +import InfoIcon from "@/icons/InfoIcon"; +import CardLayout from "@/components/folders/CardLayout"; + const AdditionalInfoCard = () => { return ( - - - - Informations complémentaires - - - Amendements - - - 411 - - - + + +
+ + + Amendements + + + + + 411 + +
+ + Co-signataires - - - - - + - + + + + + + + + - Orateurs + Co-signataires - - - - - + + + + + + -
-
+ + ); }; From 137a2225c2bd409bfaa10b1e6bd7aaeca8a38105 Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:14:46 +0100 Subject: [PATCH 4/9] refactor(dossier): CommiteeCard --- components/folders/CommiteeCard/index.tsx | 59 +++++++++++++++-------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/components/folders/CommiteeCard/index.tsx b/components/folders/CommiteeCard/index.tsx index 974e921..630fc19 100644 --- a/components/folders/CommiteeCard/index.tsx +++ b/components/folders/CommiteeCard/index.tsx @@ -1,29 +1,46 @@ import * as React from "react"; -import Card from "@mui/material/Card"; -import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; -import DeputyPreview from "../DeputyPreview"; +import Stack from "@mui/material/Stack"; + +import CardLayout from "@/components/folders/CardLayout"; +import DeputyPreview from "@/components/folders/DeputyPreview"; +import InfoIcon from "@/icons/InfoIcon"; const CommiteeCard = () => { return ( - - - - Comission - - - Commission de travail parlementaire - - - Commission du développement durable - - - Rapporteur - - - - - + + +
+ + + Comission saisie au fond + + + + + Commission des affaires économiques + +
+
+ + + Comission saisie pour avis + + + + + Commission du développement durable et de l'aménagement du + territoire + +
+
+ + Rapporteur + + +
+
+
); }; From 6fb8306b5f2f19d9be495827f7eba43837825149 Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:15:35 +0100 Subject: [PATCH 5/9] refactor(dossier): LegislativeDocumentCard --- .../folders/LegislativeDocuments/index.tsx | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/components/folders/LegislativeDocuments/index.tsx b/components/folders/LegislativeDocuments/index.tsx index d5dca51..49d43f8 100644 --- a/components/folders/LegislativeDocuments/index.tsx +++ b/components/folders/LegislativeDocuments/index.tsx @@ -1,22 +1,27 @@ import * as React from "react"; -import Card from "@mui/material/Card"; -import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; +import Stack from "@mui/material/Stack"; + +import CardLayout from "@/components/folders/CardLayout"; +import LinkIcon from "@/icons/LinkIcon"; +import Link from "next/link"; const LegislativeDocuments = () => { return ( - - - - Document législatifs - + + {Array.from(Array(10).keys()).map((link) => ( - - Lien vers {link} - + + + + + Lien vers {link} + + + ))} - - + + ); }; From 9a82b838075b6e59d10698faad61abeb2f303b61 Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:16:07 +0100 Subject: [PATCH 6/9] refactor(dossier): DeputyPreview --- components/folders/DeputyPreview/index.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/folders/DeputyPreview/index.tsx b/components/folders/DeputyPreview/index.tsx index d9e2616..bc382bf 100644 --- a/components/folders/DeputyPreview/index.tsx +++ b/components/folders/DeputyPreview/index.tsx @@ -27,9 +27,6 @@ const DeputyPreview = () => { REN - - Info complémentaire - From bed1d46ad7fe8141c9550509ad51e2b9edf26510 Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 00:16:43 +0100 Subject: [PATCH 7/9] feat(theme): Button --- components/ThemeRegistry/theme.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/components/ThemeRegistry/theme.ts b/components/ThemeRegistry/theme.ts index a056362..fcd8520 100644 --- a/components/ThemeRegistry/theme.ts +++ b/components/ThemeRegistry/theme.ts @@ -22,6 +22,10 @@ const theme = createTheme({ light: "#FEE6D9", main: "#EF4444", }, + secondary: { + main: "#E9ECEF", + contrastText: "#495057", + }, grey: { 900: "#171B1E", 800: "#343A40", @@ -52,8 +56,19 @@ const theme = createTheme({ allVariants: { color: "#171B1E", }, + button: { + fontSize: 12, + fontWeight: 700, + textTransform: "none", + }, + }, + components: { + MuiButton: { + defaultProps: { + disableElevation: true, + }, + }, }, - components: {}, }); export default theme; From a4db64c7c5321264ae631a48c24b53a30d479c1e Mon Sep 17 00:00:00 2001 From: alexandre Date: Wed, 29 Nov 2023 16:56:52 +0100 Subject: [PATCH 8/9] update textTransform only for secondary color --- components/ThemeRegistry/theme.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/ThemeRegistry/theme.ts b/components/ThemeRegistry/theme.ts index fcd8520..3d8ab7b 100644 --- a/components/ThemeRegistry/theme.ts +++ b/components/ThemeRegistry/theme.ts @@ -1,5 +1,6 @@ import { Raleway } from "next/font/google"; import { createTheme } from "@mui/material/styles"; +import { buttonClasses } from "@mui/material/Button"; const raleway = Raleway({ weight: ["400", "600", "700"], @@ -59,7 +60,6 @@ const theme = createTheme({ button: { fontSize: 12, fontWeight: 700, - textTransform: "none", }, }, components: { @@ -67,6 +67,10 @@ const theme = createTheme({ defaultProps: { disableElevation: true, }, + styleOverrides: { + root: ({ ownerState }) => + ownerState.color === "secondary" ? { textTransform: "none" } : {}, + }, }, }, }); From a365001ab0e1234ffcbc9fc6e0b2182fa85930cd Mon Sep 17 00:00:00 2001 From: aaadryyy Date: Wed, 29 Nov 2023 22:11:49 +0100 Subject: [PATCH 9/9] feat(button):add secondary buttons specific font weight and font size --- components/ThemeRegistry/theme.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/ThemeRegistry/theme.ts b/components/ThemeRegistry/theme.ts index 3d8ab7b..cf774fd 100644 --- a/components/ThemeRegistry/theme.ts +++ b/components/ThemeRegistry/theme.ts @@ -57,10 +57,6 @@ const theme = createTheme({ allVariants: { color: "#171B1E", }, - button: { - fontSize: 12, - fontWeight: 700, - }, }, components: { MuiButton: { @@ -68,8 +64,11 @@ const theme = createTheme({ disableElevation: true, }, styleOverrides: { - root: ({ ownerState }) => - ownerState.color === "secondary" ? { textTransform: "none" } : {}, + root: ({ ownerState }) => ({ + fontSize: 12, + fontWeight: 700, + textTransform: ownerState.color === "secondary" ? "none" : "inherit", + }), }, }, },