create-modoock-app 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -7
- package/dist/constants.js +5 -0
- package/package.json +1 -1
- package/template/app/(main)/components/_shared.tsx +386 -0
- package/template/app/(main)/components/badges/page.tsx +42 -0
- package/template/app/(main)/components/barres-de-metrique/page.tsx +40 -0
- package/template/app/(main)/components/boutons/page.tsx +135 -0
- package/template/app/(main)/components/champs/page.tsx +175 -0
- package/template/app/(main)/components/icones/page.tsx +96 -0
- package/template/app/(main)/components/loader/page.tsx +81 -0
- package/template/app/(main)/components/modale/page.tsx +48 -0
- package/template/app/(main)/components/onglets/page.tsx +36 -0
- package/template/app/(main)/components/page.tsx +118 -825
- package/template/app/(main)/components/selecteurs/page.tsx +49 -0
- package/template/app/(main)/components/stepper/page.tsx +69 -0
- package/template/app/(main)/components/tableau/page.tsx +67 -0
- package/template/app/(main)/design-system/page.tsx +13 -1
- package/template/app/(main)/documentation/page.tsx +413 -0
- package/template/app/(main)/layout.tsx +2 -0
- package/template/app/layout.tsx +1 -1
- package/template/components/layout/side-nav.tsx +116 -61
- package/template/lib/scroll-to-section.ts +38 -0
- package/template/next.config.ts +0 -17
- package/template/package-lock.json +459 -314
- package/template/package.json +2 -0
- package/template/sgconfig.yml +1 -1
- package/template/tsconfig.json +41 -71
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { CodeBlock, SelectorsDemo, ShowcaseShell } from "../_shared";
|
|
4
|
+
|
|
5
|
+
export default function SelecteursPage() {
|
|
6
|
+
return (
|
|
7
|
+
<ShowcaseShell
|
|
8
|
+
title="Sélecteurs"
|
|
9
|
+
subtitle="Select, MultiSelect, recherche et filtre"
|
|
10
|
+
usage="Préférez Select / MultiSelect (et variantes avec recherche) à un élément HTML select brut. Passez options, value(s) et onChange. SelectFilter sert aux filtres de colonne."
|
|
11
|
+
importCode={`import {
|
|
12
|
+
Select,
|
|
13
|
+
MultiSelect,
|
|
14
|
+
SelectWithSearch,
|
|
15
|
+
MultiSelectWithSearch,
|
|
16
|
+
SelectFilter,
|
|
17
|
+
} from "@modoock/components";`}
|
|
18
|
+
>
|
|
19
|
+
<div className="mb-section">
|
|
20
|
+
<p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
21
|
+
Exemple de base
|
|
22
|
+
</p>
|
|
23
|
+
<CodeBlock
|
|
24
|
+
code={`const options = [
|
|
25
|
+
{ value: "admin", label: "Administrateur" },
|
|
26
|
+
{ value: "manager", label: "Gestionnaire" },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
<Select
|
|
30
|
+
label="Rôle"
|
|
31
|
+
options={options}
|
|
32
|
+
value={role}
|
|
33
|
+
onChange={setRole}
|
|
34
|
+
placeholder="Choisir un rôle…"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<MultiSelect
|
|
38
|
+
label="Rôles"
|
|
39
|
+
options={options}
|
|
40
|
+
values={roles}
|
|
41
|
+
onChange={setRoles}
|
|
42
|
+
placeholder="Choisir des rôles…"
|
|
43
|
+
/>`}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
<SelectorsDemo />
|
|
47
|
+
</ShowcaseShell>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Stepper } from "@modoock/components";
|
|
4
|
+
import { DemoCard, ShowcaseShell, STEPPER_STEPS } from "../_shared";
|
|
5
|
+
|
|
6
|
+
export default function StepperPage() {
|
|
7
|
+
return (
|
|
8
|
+
<ShowcaseShell
|
|
9
|
+
title="Stepper"
|
|
10
|
+
subtitle="Progression d'un cycle"
|
|
11
|
+
usage="Visualisez le cycle de vie d’un dossier (brouillon → … → publié). currentIndex pointe l’étape courante ; complete ou rejected finalisent le parcours."
|
|
12
|
+
importCode={`import { Stepper } from "@modoock/components";`}
|
|
13
|
+
>
|
|
14
|
+
<div className="grid gap-component">
|
|
15
|
+
<DemoCard
|
|
16
|
+
title="Étape en cours"
|
|
17
|
+
description="currentIndex = 1"
|
|
18
|
+
code={`const steps = ["Brouillon", "Revue", "Validation", "Publié"];
|
|
19
|
+
|
|
20
|
+
<Stepper
|
|
21
|
+
steps={steps}
|
|
22
|
+
currentIndex={1}
|
|
23
|
+
label="Progression du dossier"
|
|
24
|
+
/>`}
|
|
25
|
+
>
|
|
26
|
+
<Stepper
|
|
27
|
+
steps={STEPPER_STEPS}
|
|
28
|
+
currentIndex={1}
|
|
29
|
+
label="Progression du dossier"
|
|
30
|
+
/>
|
|
31
|
+
</DemoCard>
|
|
32
|
+
<DemoCard
|
|
33
|
+
title="Terminé"
|
|
34
|
+
description="complete = true"
|
|
35
|
+
code={`<Stepper
|
|
36
|
+
steps={steps}
|
|
37
|
+
currentIndex={3}
|
|
38
|
+
complete
|
|
39
|
+
label="Progression terminée"
|
|
40
|
+
/>`}
|
|
41
|
+
>
|
|
42
|
+
<Stepper
|
|
43
|
+
steps={STEPPER_STEPS}
|
|
44
|
+
currentIndex={3}
|
|
45
|
+
complete
|
|
46
|
+
label="Progression terminée"
|
|
47
|
+
/>
|
|
48
|
+
</DemoCard>
|
|
49
|
+
<DemoCard
|
|
50
|
+
title="Rejeté"
|
|
51
|
+
description="rejected = true"
|
|
52
|
+
code={`<Stepper
|
|
53
|
+
steps={steps}
|
|
54
|
+
currentIndex={2}
|
|
55
|
+
rejected
|
|
56
|
+
label="Progression rejetée"
|
|
57
|
+
/>`}
|
|
58
|
+
>
|
|
59
|
+
<Stepper
|
|
60
|
+
steps={STEPPER_STEPS}
|
|
61
|
+
currentIndex={2}
|
|
62
|
+
rejected
|
|
63
|
+
label="Progression rejetée"
|
|
64
|
+
/>
|
|
65
|
+
</DemoCard>
|
|
66
|
+
</div>
|
|
67
|
+
</ShowcaseShell>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Table } from "@modoock/components";
|
|
4
|
+
import {
|
|
5
|
+
CodeBlock,
|
|
6
|
+
COLUMNS,
|
|
7
|
+
ShowcaseShell,
|
|
8
|
+
USERS,
|
|
9
|
+
noop,
|
|
10
|
+
userRowActions,
|
|
11
|
+
} from "../_shared";
|
|
12
|
+
|
|
13
|
+
export default function TableauPage() {
|
|
14
|
+
return (
|
|
15
|
+
<ShowcaseShell
|
|
16
|
+
title="Tableau"
|
|
17
|
+
subtitle={
|
|
18
|
+
<>
|
|
19
|
+
Composant <code className="font-mono">Table</code>
|
|
20
|
+
</>
|
|
21
|
+
}
|
|
22
|
+
usage="Une liste = une entité. Passez columns et data ; rowsPerPage active la pagination. Sur mobile, le tableau se transforme en cartes. Une seule table visible à la fois."
|
|
23
|
+
importCode={`import { Table } from "@modoock/components";
|
|
24
|
+
import type { Column } from "@modoock/components";`}
|
|
25
|
+
className="min-h-0"
|
|
26
|
+
>
|
|
27
|
+
<div className="mb-section">
|
|
28
|
+
<p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
29
|
+
Exemple de base
|
|
30
|
+
</p>
|
|
31
|
+
<CodeBlock
|
|
32
|
+
code={`const columns: Column<User>[] = [
|
|
33
|
+
{ key: "fullName", label: "Nom", sortable: true },
|
|
34
|
+
{ key: "email", label: "Adresse e-mail", sortable: true },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
<Table
|
|
38
|
+
columns={columns}
|
|
39
|
+
data={users}
|
|
40
|
+
rowsPerPage={8}
|
|
41
|
+
getRowKey={(user) => user.id}
|
|
42
|
+
cardActions={{
|
|
43
|
+
table: [{ label: "Exporter", icon: "Download", onSelect: onExport }],
|
|
44
|
+
row: (user) => [
|
|
45
|
+
{ label: "Voir", icon: "Eye", onSelect: () => onView(user) },
|
|
46
|
+
],
|
|
47
|
+
}}
|
|
48
|
+
/>`}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="flex h-[min(32rem,70dvh)] min-h-0 flex-col">
|
|
52
|
+
<div className="min-h-0 flex-1">
|
|
53
|
+
<Table
|
|
54
|
+
columns={COLUMNS}
|
|
55
|
+
data={USERS}
|
|
56
|
+
rowsPerPage={8}
|
|
57
|
+
getRowKey={(user) => user.id}
|
|
58
|
+
cardActions={{
|
|
59
|
+
table: [{ label: "Exporter", icon: "Download", onSelect: noop }],
|
|
60
|
+
row: userRowActions,
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</ShowcaseShell>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -15,15 +15,17 @@ function Section({
|
|
|
15
15
|
number,
|
|
16
16
|
title,
|
|
17
17
|
description,
|
|
18
|
+
id,
|
|
18
19
|
children,
|
|
19
20
|
}: {
|
|
20
21
|
number: string;
|
|
21
22
|
title: string;
|
|
22
23
|
description?: string;
|
|
24
|
+
id: string;
|
|
23
25
|
children: React.ReactNode;
|
|
24
26
|
}) {
|
|
25
27
|
return (
|
|
26
|
-
<section className="border-b border-border">
|
|
28
|
+
<section id={id} className="scroll-mt-component border-b border-border">
|
|
27
29
|
<div className="container-system py-major-section">
|
|
28
30
|
<div className="mb-section">
|
|
29
31
|
<p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
@@ -99,6 +101,7 @@ export default function DesignSystemPage() {
|
|
|
99
101
|
<section className="page-container">
|
|
100
102
|
{/* 01 COLORS */}
|
|
101
103
|
<Section
|
|
104
|
+
id="colors"
|
|
102
105
|
number="01"
|
|
103
106
|
title="Colors"
|
|
104
107
|
description="Core visual palette used throughout the interface."
|
|
@@ -268,6 +271,7 @@ export default function DesignSystemPage() {
|
|
|
268
271
|
|
|
269
272
|
{/* 02 TYPOGRAPHY */}
|
|
270
273
|
<Section
|
|
274
|
+
id="typography"
|
|
271
275
|
number="02"
|
|
272
276
|
title="Typography"
|
|
273
277
|
description="Role-based typography. Each style has a defined purpose within the interface."
|
|
@@ -368,6 +372,7 @@ export default function DesignSystemPage() {
|
|
|
368
372
|
|
|
369
373
|
{/* 03 SPACING */}
|
|
370
374
|
<Section
|
|
375
|
+
id="spacing"
|
|
371
376
|
number="03"
|
|
372
377
|
title="Spacing"
|
|
373
378
|
description="Adopted spacing values used to establish consistent relationships between interface elements."
|
|
@@ -447,6 +452,7 @@ export default function DesignSystemPage() {
|
|
|
447
452
|
|
|
448
453
|
{/* 04 RADIUS */}
|
|
449
454
|
<Section
|
|
455
|
+
id="border-radius"
|
|
450
456
|
number="04"
|
|
451
457
|
title="Border Radius"
|
|
452
458
|
description="A four-level radius scale used consistently across the interface."
|
|
@@ -498,6 +504,7 @@ export default function DesignSystemPage() {
|
|
|
498
504
|
|
|
499
505
|
{/* 05 ICONOGRAPHY */}
|
|
500
506
|
<Section
|
|
507
|
+
id="iconography"
|
|
501
508
|
number="05"
|
|
502
509
|
title="Iconography"
|
|
503
510
|
description="Lucide Icons are the standard icon library across the interface."
|
|
@@ -725,6 +732,7 @@ export default function DesignSystemPage() {
|
|
|
725
732
|
|
|
726
733
|
{/* 06 LAYOUT */}
|
|
727
734
|
<Section
|
|
735
|
+
id="layout-rules"
|
|
728
736
|
number="06"
|
|
729
737
|
title="Layout Rules"
|
|
730
738
|
description="Global rules that define how pages and sections are structured."
|
|
@@ -776,6 +784,7 @@ export default function DesignSystemPage() {
|
|
|
776
784
|
|
|
777
785
|
{/* 07 SIZING */}
|
|
778
786
|
<Section
|
|
787
|
+
id="sizing-principle"
|
|
779
788
|
number="07"
|
|
780
789
|
title="Sizing Principle"
|
|
781
790
|
description="Interactive elements derive their dimensions from content and spacing rather than fixed heights."
|
|
@@ -888,6 +897,7 @@ export default function DesignSystemPage() {
|
|
|
888
897
|
|
|
889
898
|
{/* 08 VISUAL HIERARCHY */}
|
|
890
899
|
<Section
|
|
900
|
+
id="visual-hierarchy"
|
|
891
901
|
number="08"
|
|
892
902
|
title="Visual Hierarchy"
|
|
893
903
|
description="Hierarchy is created through surface contrast, borders, spacing and typography — not shadows."
|
|
@@ -948,6 +958,7 @@ export default function DesignSystemPage() {
|
|
|
948
958
|
|
|
949
959
|
{/* 09 SEMANTIC STATES */}
|
|
950
960
|
<Section
|
|
961
|
+
id="semantic-states"
|
|
951
962
|
number="09"
|
|
952
963
|
title="Semantic States"
|
|
953
964
|
description="Semantic colors communicate system states consistently across the interface."
|
|
@@ -1005,6 +1016,7 @@ export default function DesignSystemPage() {
|
|
|
1005
1016
|
|
|
1006
1017
|
{/* 10 COMPLETE EXAMPLE */}
|
|
1007
1018
|
<Section
|
|
1019
|
+
id="complete-example"
|
|
1008
1020
|
number="10"
|
|
1009
1021
|
title="Complete Example"
|
|
1010
1022
|
description="A practical composition showing how the foundation tokens work together."
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
import { Icon } from "@modoock/components";
|
|
3
|
+
import type { IconName, IconVariant } from "@modoock/components";
|
|
4
|
+
|
|
5
|
+
type Tone = "primary" | "success" | "info" | "accent";
|
|
6
|
+
|
|
7
|
+
const TONE: Record<Tone, { surface: string; icon: IconVariant }> = {
|
|
8
|
+
primary: {
|
|
9
|
+
surface: "bg-primary-light",
|
|
10
|
+
icon: "primary",
|
|
11
|
+
},
|
|
12
|
+
success: {
|
|
13
|
+
surface: "bg-success-light",
|
|
14
|
+
icon: "success",
|
|
15
|
+
},
|
|
16
|
+
info: {
|
|
17
|
+
surface: "bg-info-light",
|
|
18
|
+
icon: "default",
|
|
19
|
+
},
|
|
20
|
+
accent: {
|
|
21
|
+
surface: "bg-accent-light",
|
|
22
|
+
icon: "default",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function SectionHeader({
|
|
27
|
+
title,
|
|
28
|
+
description,
|
|
29
|
+
icon,
|
|
30
|
+
}: {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
icon: IconName;
|
|
34
|
+
}) {
|
|
35
|
+
return (
|
|
36
|
+
<div className="mb-component">
|
|
37
|
+
<div className="flex items-center gap-inline">
|
|
38
|
+
<Icon name={icon} size="default" variant="primary" />
|
|
39
|
+
<h2 className="text-section-title text-foreground">{title}</h2>
|
|
40
|
+
</div>
|
|
41
|
+
<p className="mt-inline max-w-2xl text-body text-muted-foreground">
|
|
42
|
+
{description}
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function PillarCard({
|
|
49
|
+
icon,
|
|
50
|
+
title,
|
|
51
|
+
description,
|
|
52
|
+
}: {
|
|
53
|
+
icon: IconName;
|
|
54
|
+
title: string;
|
|
55
|
+
description: string;
|
|
56
|
+
}) {
|
|
57
|
+
return (
|
|
58
|
+
<article className="flex h-full flex-col gap-inline rounded-large border border-border bg-surface p-component">
|
|
59
|
+
<div className="flex size-9 items-center justify-center rounded-medium bg-primary-light">
|
|
60
|
+
<Icon name={icon} size="small" variant="primary" />
|
|
61
|
+
</div>
|
|
62
|
+
<div>
|
|
63
|
+
<h3 className="text-component-title text-foreground">{title}</h3>
|
|
64
|
+
<p className="mt-micro text-small text-muted-foreground">{description}</p>
|
|
65
|
+
</div>
|
|
66
|
+
</article>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function JourneyStep({
|
|
71
|
+
step,
|
|
72
|
+
title,
|
|
73
|
+
description,
|
|
74
|
+
icon,
|
|
75
|
+
tone,
|
|
76
|
+
isLast,
|
|
77
|
+
}: {
|
|
78
|
+
step: string;
|
|
79
|
+
title: string;
|
|
80
|
+
description: string;
|
|
81
|
+
icon: IconName;
|
|
82
|
+
tone: Tone;
|
|
83
|
+
isLast?: boolean;
|
|
84
|
+
}) {
|
|
85
|
+
const t = TONE[tone];
|
|
86
|
+
return (
|
|
87
|
+
<li className="relative flex gap-component">
|
|
88
|
+
<div className="flex flex-col items-center">
|
|
89
|
+
<div
|
|
90
|
+
className={`flex size-10 shrink-0 items-center justify-center rounded-full ${t.surface}`}
|
|
91
|
+
>
|
|
92
|
+
<Icon name={icon} size="small" variant={t.icon} />
|
|
93
|
+
</div>
|
|
94
|
+
{!isLast && (
|
|
95
|
+
<div className="mt-inline w-px flex-1 bg-border" aria-hidden />
|
|
96
|
+
)}
|
|
97
|
+
</div>
|
|
98
|
+
<div className={isLast ? "" : "pb-component"}>
|
|
99
|
+
<p className="text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
100
|
+
Étape {step}
|
|
101
|
+
</p>
|
|
102
|
+
<h3 className="mt-micro text-component-title text-foreground">{title}</h3>
|
|
103
|
+
<p className="mt-micro max-w-xl text-body text-muted-foreground">
|
|
104
|
+
{description}
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
107
|
+
</li>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function PrincipleRow({
|
|
112
|
+
icon,
|
|
113
|
+
title,
|
|
114
|
+
description,
|
|
115
|
+
tone,
|
|
116
|
+
}: {
|
|
117
|
+
icon: IconName;
|
|
118
|
+
title: string;
|
|
119
|
+
description: string;
|
|
120
|
+
tone: Tone;
|
|
121
|
+
}) {
|
|
122
|
+
const t = TONE[tone];
|
|
123
|
+
return (
|
|
124
|
+
<div className="flex gap-component rounded-large border border-border bg-surface p-component">
|
|
125
|
+
<div
|
|
126
|
+
className={`flex size-9 shrink-0 items-center justify-center rounded-medium ${t.surface}`}
|
|
127
|
+
>
|
|
128
|
+
<Icon name={icon} size="small" variant={t.icon} />
|
|
129
|
+
</div>
|
|
130
|
+
<div className="min-w-0">
|
|
131
|
+
<h3 className="text-component-title text-foreground">{title}</h3>
|
|
132
|
+
<p className="mt-micro text-small text-muted-foreground">{description}</p>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const PILLARS = [
|
|
139
|
+
{
|
|
140
|
+
icon: "Palette" as const,
|
|
141
|
+
title: "Identité visuelle",
|
|
142
|
+
description:
|
|
143
|
+
"Couleurs, typographie et rythme partagés. Chaque écran parle la même voix.",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
icon: "Puzzle" as const,
|
|
147
|
+
title: "Composants prêts",
|
|
148
|
+
description:
|
|
149
|
+
"Des blocs éprouvés. Composer plutôt que reconstruire.",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
icon: "LayoutDashboard" as const,
|
|
153
|
+
title: "Écrans clairs",
|
|
154
|
+
description:
|
|
155
|
+
"Un écran, un objectif. Le détail s’ouvre au moment utile.",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
icon: "ShieldCheck" as const,
|
|
159
|
+
title: "Cadre partagé",
|
|
160
|
+
description:
|
|
161
|
+
"Des conventions communes. Moins d’interprétation, plus de qualité.",
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
const JOURNEY = [
|
|
166
|
+
{
|
|
167
|
+
step: "01",
|
|
168
|
+
title: "Créer votre espace",
|
|
169
|
+
description:
|
|
170
|
+
"Démarrez un projet Modoock. La base visuelle, les composants et le cadre sont déjà en place.",
|
|
171
|
+
icon: "Rocket" as const,
|
|
172
|
+
tone: "primary" as const,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
step: "02",
|
|
176
|
+
title: "Explorer le socle",
|
|
177
|
+
description:
|
|
178
|
+
"Parcourez le design system et le catalogue. Voyez ce qui existe avant d’inventer.",
|
|
179
|
+
icon: "Compass" as const,
|
|
180
|
+
tone: "info" as const,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
step: "03",
|
|
184
|
+
title: "Composer vos métiers",
|
|
185
|
+
description:
|
|
186
|
+
"Assemblez listes, fiches et parcours avec les mêmes briques.",
|
|
187
|
+
icon: "Layers" as const,
|
|
188
|
+
tone: "accent" as const,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
step: "04",
|
|
192
|
+
title: "Livrer avec confiance",
|
|
193
|
+
description:
|
|
194
|
+
"Gardez le même niveau de clarté d’une page à l’autre.",
|
|
195
|
+
icon: "BadgeCheck" as const,
|
|
196
|
+
tone: "success" as const,
|
|
197
|
+
},
|
|
198
|
+
];
|
|
199
|
+
|
|
200
|
+
const PRINCIPLES = [
|
|
201
|
+
{
|
|
202
|
+
icon: "FolderTree" as const,
|
|
203
|
+
title: "Respecter l’organisation",
|
|
204
|
+
description:
|
|
205
|
+
"Interface générique, structure de l’app, blocs métier partagés — chaque chose a sa place.",
|
|
206
|
+
tone: "primary" as const,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
icon: "Recycle" as const,
|
|
210
|
+
title: "Réutiliser avant d’ajouter",
|
|
211
|
+
description:
|
|
212
|
+
"Chercher d’abord ce qui existe. Étendre un composant connu coûte moins cher.",
|
|
213
|
+
tone: "success" as const,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
icon: "Focus" as const,
|
|
217
|
+
title: "Un écran, une intention",
|
|
218
|
+
description:
|
|
219
|
+
"Une liste pour une entité. Une fiche pour le détail. Pas de métiers mélangés.",
|
|
220
|
+
tone: "info" as const,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
icon: "MessageSquareText" as const,
|
|
224
|
+
title: "Parler le langage de l’utilisateur",
|
|
225
|
+
description:
|
|
226
|
+
"Français, mots directs, actions claires. L’interface explique l’état, pas la technique.",
|
|
227
|
+
tone: "accent" as const,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
icon: "CircleQuestionMark" as const,
|
|
231
|
+
title: "Demander plutôt qu’assumer",
|
|
232
|
+
description:
|
|
233
|
+
"Besoin non tranché → question. Une décision partagée vaut mieux qu’une invention.",
|
|
234
|
+
tone: "primary" as const,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
icon: "Sparkles" as const,
|
|
238
|
+
title: "Garder la simplicité",
|
|
239
|
+
description:
|
|
240
|
+
"Pas de détail « au cas où ». Chaque élément justifie sa présence.",
|
|
241
|
+
tone: "success" as const,
|
|
242
|
+
},
|
|
243
|
+
];
|
|
244
|
+
|
|
245
|
+
const APPROACH = [
|
|
246
|
+
{
|
|
247
|
+
icon: "Lightbulb" as const,
|
|
248
|
+
label: "Intention",
|
|
249
|
+
title: "Clarifier le besoin",
|
|
250
|
+
description:
|
|
251
|
+
"Une demande précise délimite l’écran. On construit ce qui a été demandé.",
|
|
252
|
+
tone: "primary" as const,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
icon: "Boxes" as const,
|
|
256
|
+
label: "Composition",
|
|
257
|
+
title: "Assembler les briques",
|
|
258
|
+
description:
|
|
259
|
+
"Listes, fiches et états s’appuient sur les mêmes composants.",
|
|
260
|
+
tone: "accent" as const,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
icon: "CheckCheck" as const,
|
|
264
|
+
label: "Qualité",
|
|
265
|
+
title: "Vérifier la lecture",
|
|
266
|
+
description:
|
|
267
|
+
"Hiérarchie, libellés et états vides ou en erreur font partie du livrable.",
|
|
268
|
+
tone: "success" as const,
|
|
269
|
+
},
|
|
270
|
+
];
|
|
271
|
+
|
|
272
|
+
export default function DocumentationPage() {
|
|
273
|
+
return (
|
|
274
|
+
<main className="flex flex-col">
|
|
275
|
+
<div className="page-container">
|
|
276
|
+
<section className="border-b border-border py-section">
|
|
277
|
+
<h2 className="text-section-title text-foreground">
|
|
278
|
+
Qu'est-ce que le boilerplate Modoock ?
|
|
279
|
+
</h2>
|
|
280
|
+
<p className="mt-inline max-w-2xl text-body text-muted-foreground">
|
|
281
|
+
Le boilerplate Modoock est le socle commun des produits Modoock :
|
|
282
|
+
identité visuelle, composants prêts à composer et principes pour
|
|
283
|
+
des interfaces immédiatement lisibles.
|
|
284
|
+
</p>
|
|
285
|
+
</section>
|
|
286
|
+
|
|
287
|
+
<section
|
|
288
|
+
id="fondations"
|
|
289
|
+
className="scroll-mt-component border-b border-border py-section"
|
|
290
|
+
>
|
|
291
|
+
<SectionHeader
|
|
292
|
+
title="Pourquoi ce cadre existe"
|
|
293
|
+
description="Accélérer le démarrage sans sacrifier la qualité. Chaque projet commence au même niveau d’exigence."
|
|
294
|
+
icon="Target"
|
|
295
|
+
/>
|
|
296
|
+
<div className="grid gap-inline sm:grid-cols-2 xl:grid-cols-4">
|
|
297
|
+
{PILLARS.map((pillar) => (
|
|
298
|
+
<PillarCard key={pillar.title} {...pillar} />
|
|
299
|
+
))}
|
|
300
|
+
</div>
|
|
301
|
+
</section>
|
|
302
|
+
|
|
303
|
+
<section
|
|
304
|
+
id="approche"
|
|
305
|
+
className="scroll-mt-component border-b border-border bg-surface-muted/50 py-section"
|
|
306
|
+
>
|
|
307
|
+
<SectionHeader
|
|
308
|
+
title="Comment le cadre guide le travail"
|
|
309
|
+
description="De l’idée à l’écran : comprendre le besoin, composer avec l’existant, vérifier la clarté."
|
|
310
|
+
icon="Waypoints"
|
|
311
|
+
/>
|
|
312
|
+
<div className="grid gap-inline lg:grid-cols-3">
|
|
313
|
+
{APPROACH.map((item) => {
|
|
314
|
+
const t = TONE[item.tone];
|
|
315
|
+
return (
|
|
316
|
+
<article
|
|
317
|
+
key={item.title}
|
|
318
|
+
className="rounded-large border border-border bg-surface p-component"
|
|
319
|
+
>
|
|
320
|
+
<div
|
|
321
|
+
className={`mb-inline flex size-9 items-center justify-center rounded-medium ${t.surface}`}
|
|
322
|
+
>
|
|
323
|
+
<Icon name={item.icon} size="small" variant={t.icon} />
|
|
324
|
+
</div>
|
|
325
|
+
<p className="text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
326
|
+
{item.label}
|
|
327
|
+
</p>
|
|
328
|
+
<h3 className="mt-micro text-component-title text-foreground">
|
|
329
|
+
{item.title}
|
|
330
|
+
</h3>
|
|
331
|
+
<p className="mt-micro text-small text-muted-foreground">
|
|
332
|
+
{item.description}
|
|
333
|
+
</p>
|
|
334
|
+
</article>
|
|
335
|
+
);
|
|
336
|
+
})}
|
|
337
|
+
</div>
|
|
338
|
+
</section>
|
|
339
|
+
|
|
340
|
+
<section
|
|
341
|
+
id="parcours"
|
|
342
|
+
className="scroll-mt-component border-b border-border py-section"
|
|
343
|
+
>
|
|
344
|
+
<SectionHeader
|
|
345
|
+
title="Prendre en main le boilerplate"
|
|
346
|
+
description="Quatre étapes pour passer du socle à un module métier cohérent."
|
|
347
|
+
icon="Map"
|
|
348
|
+
/>
|
|
349
|
+
<ol className="max-w-2xl">
|
|
350
|
+
{JOURNEY.map((item, index) => (
|
|
351
|
+
<JourneyStep
|
|
352
|
+
key={item.step}
|
|
353
|
+
{...item}
|
|
354
|
+
isLast={index === JOURNEY.length - 1}
|
|
355
|
+
/>
|
|
356
|
+
))}
|
|
357
|
+
</ol>
|
|
358
|
+
</section>
|
|
359
|
+
|
|
360
|
+
<section
|
|
361
|
+
id="principes"
|
|
362
|
+
className="scroll-mt-component border-b border-border py-section"
|
|
363
|
+
>
|
|
364
|
+
<SectionHeader
|
|
365
|
+
title="Principes pour bien construire ensemble"
|
|
366
|
+
description="Des repères simples pour garder le produit lisible quand l’équipe grandit."
|
|
367
|
+
icon="Users"
|
|
368
|
+
/>
|
|
369
|
+
<div className="grid gap-inline md:grid-cols-2">
|
|
370
|
+
{PRINCIPLES.map((item) => (
|
|
371
|
+
<PrincipleRow key={item.title} {...item} />
|
|
372
|
+
))}
|
|
373
|
+
</div>
|
|
374
|
+
</section>
|
|
375
|
+
|
|
376
|
+
<section id="suite" className="scroll-mt-component py-section">
|
|
377
|
+
<div className="flex flex-col gap-component rounded-large border border-primary-muted bg-primary-light p-component sm:flex-row sm:items-center sm:justify-between sm:gap-section">
|
|
378
|
+
<div className="flex gap-component">
|
|
379
|
+
<div className="flex size-10 shrink-0 items-center justify-center rounded-medium bg-primary">
|
|
380
|
+
<Icon name="BookOpen" size="small" variant="white" />
|
|
381
|
+
</div>
|
|
382
|
+
<div>
|
|
383
|
+
<h2 className="text-component-title text-foreground">
|
|
384
|
+
Continuer l’exploration
|
|
385
|
+
</h2>
|
|
386
|
+
<p className="mt-micro max-w-xl text-small text-muted-foreground">
|
|
387
|
+
Le design system montre le langage visuel. Le catalogue montre
|
|
388
|
+
ce que vous pouvez assembler dès maintenant.
|
|
389
|
+
</p>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
<div className="flex flex-wrap gap-inline">
|
|
393
|
+
<Link
|
|
394
|
+
href="/design-system"
|
|
395
|
+
className="inline-flex items-center gap-micro rounded-large bg-primary px-component py-inline text-label text-primary-foreground transition-colors hover:bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
|
|
396
|
+
>
|
|
397
|
+
Design system
|
|
398
|
+
<Icon name="ArrowRight" size="small" variant="white" />
|
|
399
|
+
</Link>
|
|
400
|
+
<Link
|
|
401
|
+
href="/components"
|
|
402
|
+
className="inline-flex items-center gap-micro rounded-large border border-border bg-surface px-component py-inline text-label text-foreground transition-colors hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
|
|
403
|
+
>
|
|
404
|
+
Composants
|
|
405
|
+
<Icon name="ArrowRight" size="small" variant="muted" />
|
|
406
|
+
</Link>
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
</section>
|
|
410
|
+
</div>
|
|
411
|
+
</main>
|
|
412
|
+
);
|
|
413
|
+
}
|