create-modoock-app 2.3.1 → 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 CHANGED
@@ -22,22 +22,32 @@ npm run dev
22
22
  The generator creates a ready-to-develop Modooock project containing:
23
23
 
24
24
  - Modooock project foundation
25
- - Modooock UI components as local source files
26
- - Modooock Knowledge Base as an npm dependency
25
+ - Modooock UI components as an npm dependency (`@modoock/components`)
26
+ - Modooock Knowledge Base as an npm dependency (`@modoock/knowledge-base`)
27
27
  - Required project dependencies and configuration
28
28
 
29
29
  ## Component Architecture
30
30
 
31
- Modooock UI components are copied into the generated project:
31
+ Modooock UI primitives are installed from npm and resolved from `node_modules`:
32
32
 
33
33
  ```text
34
- components/
35
- └── ui/
34
+ node_modules/
35
+ └── @modoock/
36
+ └── components/
36
37
  ```
37
38
 
38
- The generated project owns these source files and can modify them directly.
39
+ Import them with `@modoock/components` (or `@/components/ui`, which aliases to the package UI source).
39
40
 
40
- The `@modoock/components` package is used as the upstream source during project creation and is not installed as a dependency in the generated project.
41
+ Project-local code lives under:
42
+
43
+ ```text
44
+ components/
45
+ ├── layout/
46
+ ├── shared/
47
+ └── ui/ # empty — only for new app-level UI after human validation
48
+ ```
49
+
50
+ Do not copy or edit package primitives under `node_modules/`.
41
51
 
42
52
  ## Knowledge Base
43
53
 
@@ -49,6 +59,8 @@ node_modules/
49
59
  └── knowledge-base/
50
60
  ```
51
61
 
62
+ Agents and `sg:scan` read rules from that package path. Do not edit files under `node_modules/`.
63
+
52
64
  ## Development
53
65
 
54
66
  Build the generator:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-modoock-app",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Official Modoock project starter and boilerplate generator.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -0,0 +1,386 @@
1
+ "use client";
2
+
3
+ import {
4
+ Badge,
5
+ ClickableButton,
6
+ Icon,
7
+ Loader,
8
+ Modal,
9
+ MultiSelect,
10
+ MultiSelectWithSearch,
11
+ Select,
12
+ SelectFilter,
13
+ SelectWithSearch,
14
+ Tabs,
15
+ } from "@modoock/components";
16
+ import type { CardAction, Column } from "@modoock/components";
17
+ import { useEffect, useState, type ReactNode } from "react";
18
+
19
+ export const noop = () => undefined;
20
+
21
+ export const SELECT_OPTIONS = [
22
+ { value: "admin", label: "Administrateur" },
23
+ { value: "manager", label: "Gestionnaire" },
24
+ { value: "viewer", label: "Observateur" },
25
+ { value: "editor", label: "Éditeur" },
26
+ { value: "analyst", label: "Analyste" },
27
+ ];
28
+
29
+ export const STEPPER_STEPS = ["Brouillon", "Revue", "Validation", "Publié"] as const;
30
+
31
+ type UserRole = "Administrateur" | "Gestionnaire" | "Observateur";
32
+ type UserStatus = "Actif" | "En attente" | "Suspendu";
33
+
34
+ export interface AppUser {
35
+ id: number;
36
+ fullName: string;
37
+ email: string;
38
+ role: UserRole;
39
+ status: UserStatus;
40
+ joinedAt: string;
41
+ }
42
+
43
+ const ROLE_VARIANT: Record<UserRole, "primary" | "info" | "default"> = {
44
+ Administrateur: "primary",
45
+ Gestionnaire: "info",
46
+ Observateur: "default",
47
+ };
48
+
49
+ const STATUS_VARIANT: Record<UserStatus, "success" | "warning" | "danger"> = {
50
+ Actif: "success",
51
+ "En attente": "warning",
52
+ Suspendu: "danger",
53
+ };
54
+
55
+ export function userRowActions(_user: AppUser): CardAction[] {
56
+ return [
57
+ { label: "Voir", icon: "Eye", onSelect: noop },
58
+ { label: "Modifier", icon: "Pencil", onSelect: noop },
59
+ { label: "Valider", icon: "CircleCheck", onSelect: noop },
60
+ { label: "Supprimer", icon: "Trash2", danger: true, onSelect: noop },
61
+ ];
62
+ }
63
+
64
+ export const USERS: AppUser[] = [
65
+ { id: 1, fullName: "Amine Berrada", email: "amine.berrada@modoock.com", role: "Administrateur", status: "Actif", joinedAt: "2024-01-12" },
66
+ { id: 2, fullName: "Sarah El Fassi", email: "sarah.elfassi@modoock.com", role: "Gestionnaire", status: "Actif", joinedAt: "2024-02-03" },
67
+ { id: 3, fullName: "Youssef Amrani", email: "youssef.amrani@modoock.com", role: "Observateur", status: "En attente", joinedAt: "2024-03-18" },
68
+ { id: 4, fullName: "Leïla Benkirane", email: "leila.benkirane@modoock.com", role: "Gestionnaire", status: "Actif", joinedAt: "2024-04-25" },
69
+ { id: 5, fullName: "Karim Tazi", email: "karim.tazi@modoock.com", role: "Observateur", status: "Suspendu", joinedAt: "2024-05-09" },
70
+ { id: 6, fullName: "Nadia Chraibi", email: "nadia.chraibi@modoock.com", role: "Administrateur", status: "Actif", joinedAt: "2024-06-14" },
71
+ { id: 7, fullName: "Omar Alaoui", email: "omar.alaoui@modoock.com", role: "Gestionnaire", status: "Actif", joinedAt: "2024-07-21" },
72
+ { id: 8, fullName: "Imane Ait Mbarek", email: "imane.aitmbarek@modoock.com", role: "Gestionnaire", status: "En attente", joinedAt: "2024-08-02" },
73
+ { id: 9, fullName: "Mehdi Ouazzani", email: "mehdi.ouazzani@modoock.com", role: "Observateur", status: "Actif", joinedAt: "2024-09-30" },
74
+ { id: 10, fullName: "Salma Bennis", email: "salma.bennis@modoock.com", role: "Gestionnaire", status: "Actif", joinedAt: "2024-10-11" },
75
+ { id: 11, fullName: "Reda Lahlou", email: "reda.lahlou@modoock.com", role: "Observateur", status: "Suspendu", joinedAt: "2024-11-05" },
76
+ { id: 12, fullName: "Hajar Squalli", email: "hajar.squalli@modoock.com", role: "Administrateur", status: "Actif", joinedAt: "2025-01-20" },
77
+ { id: 13, fullName: "Anas Belkacem", email: "anas.belkacem@modoock.com", role: "Observateur", status: "En attente", joinedAt: "2025-02-27" },
78
+ { id: 14, fullName: "Meryem Haddadi", email: "meryem.haddadi@modoock.com", role: "Gestionnaire", status: "Actif", joinedAt: "2025-03-15" },
79
+ ];
80
+
81
+ export const COLUMNS: Column<AppUser>[] = [
82
+ { key: "fullName", label: "Nom", sortable: true },
83
+ {
84
+ key: "email",
85
+ label: "Adresse e-mail",
86
+ sortable: true,
87
+ className: "text-body text-muted-foreground",
88
+ },
89
+ {
90
+ key: "role",
91
+ label: "Rôle",
92
+ sortable: true,
93
+ render: (user) => <Badge variant={ROLE_VARIANT[user.role]}>{user.role}</Badge>,
94
+ },
95
+ {
96
+ key: "status",
97
+ label: "Statut",
98
+ sortable: true,
99
+ render: (user) => (
100
+ <Badge variant={STATUS_VARIANT[user.status]}>{user.status}</Badge>
101
+ ),
102
+ },
103
+ {
104
+ key: "joinedAt",
105
+ label: "Date d'inscription",
106
+ sortable: true,
107
+ className: "whitespace-nowrap text-body-medium",
108
+ render: (user) =>
109
+ new Date(user.joinedAt).toLocaleDateString("fr-FR", {
110
+ day: "numeric",
111
+ month: "long",
112
+ year: "numeric",
113
+ }),
114
+ },
115
+ ];
116
+
117
+ export function CodeBlock({ code }: { code: string }) {
118
+ return (
119
+ <pre className="mt-component overflow-x-auto rounded-large border border-border bg-surface-muted p-component font-mono text-small text-foreground">
120
+ <code>{code}</code>
121
+ </pre>
122
+ );
123
+ }
124
+
125
+ export function DemoCard({
126
+ title,
127
+ description,
128
+ code,
129
+ children,
130
+ }: {
131
+ title: string;
132
+ description?: string;
133
+ code?: string;
134
+ children: ReactNode;
135
+ }) {
136
+ return (
137
+ <div className="rounded-large border border-border bg-surface p-card">
138
+ <p className="text-component-title text-foreground">{title}</p>
139
+ {description && (
140
+ <p className="mt-micro text-small text-muted-foreground">{description}</p>
141
+ )}
142
+ <div className="mt-component">{children}</div>
143
+ {code ? <CodeBlock code={code} /> : null}
144
+ </div>
145
+ );
146
+ }
147
+
148
+ export function ShowcaseShell({
149
+ title,
150
+ subtitle,
151
+ usage,
152
+ importCode,
153
+ children,
154
+ className = "",
155
+ }: {
156
+ title: string;
157
+ subtitle: ReactNode;
158
+ usage?: string;
159
+ importCode?: string;
160
+ children: ReactNode;
161
+ className?: string;
162
+ }) {
163
+ return (
164
+ <main className={`flex flex-col ${className}`.trim()}>
165
+ <div className="page-container py-section">
166
+ <div className="flex flex-wrap items-baseline justify-between gap-inline">
167
+ <h2 className="text-section-title text-foreground">{title}</h2>
168
+ <span className="text-small text-muted-foreground">{subtitle}</span>
169
+ </div>
170
+ {usage ? (
171
+ <p className="mt-component text-body text-muted-foreground">{usage}</p>
172
+ ) : null}
173
+ {importCode ? (
174
+ <div className="mt-component">
175
+ <p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
176
+ Import
177
+ </p>
178
+ <CodeBlock code={importCode} />
179
+ </div>
180
+ ) : null}
181
+ <div className="mt-section">{children}</div>
182
+ </div>
183
+ </main>
184
+ );
185
+ }
186
+
187
+ export function FullScreenLoaderDemo() {
188
+ const [visible, setVisible] = useState(false);
189
+
190
+ useEffect(() => {
191
+ if (!visible) return;
192
+ const timer = setTimeout(() => setVisible(false), 2000);
193
+ return () => clearTimeout(timer);
194
+ }, [visible]);
195
+
196
+ return (
197
+ <>
198
+ <ClickableButton type="button" variant="secondary" onClick={() => setVisible(true)}>
199
+ Afficher (2 s)
200
+ </ClickableButton>
201
+ {visible && <Loader fullScreen message="Chargement des données…" />}
202
+ </>
203
+ );
204
+ }
205
+
206
+ export function CardLoaderDemo() {
207
+ const [loading, setLoading] = useState(false);
208
+
209
+ useEffect(() => {
210
+ if (!loading) return;
211
+ const timer = setTimeout(() => setLoading(false), 2000);
212
+ return () => clearTimeout(timer);
213
+ }, [loading]);
214
+
215
+ return (
216
+ <div className="flex flex-col gap-component">
217
+ <ClickableButton type="button" variant="secondary" onClick={() => setLoading(true)}>
218
+ Recharger (2 s)
219
+ </ClickableButton>
220
+ <div className="relative rounded-large border border-border bg-surface p-component">
221
+ <div className="space-y-component opacity-40" aria-hidden="true">
222
+ <div className="h-3 w-2/3 rounded bg-surface-muted" />
223
+ <div className="h-3 w-1/2 rounded bg-surface-muted" />
224
+ <div className="h-3 w-3/4 rounded bg-surface-muted" />
225
+ </div>
226
+ {loading && <Loader message="Rechargement…" />}
227
+ </div>
228
+ </div>
229
+ );
230
+ }
231
+
232
+ export function ModalLoaderDemo() {
233
+ const [open, setOpen] = useState(false);
234
+ const [loading, setLoading] = useState(false);
235
+
236
+ const handleOpen = () => {
237
+ setOpen(true);
238
+ setLoading(true);
239
+ };
240
+
241
+ useEffect(() => {
242
+ if (!open || !loading) return;
243
+ const timer = setTimeout(() => setLoading(false), 2000);
244
+ return () => clearTimeout(timer);
245
+ }, [open, loading]);
246
+
247
+ return (
248
+ <>
249
+ <ClickableButton type="button" variant="secondary" onClick={handleOpen}>
250
+ Ouvrir la modale (2 s)
251
+ </ClickableButton>
252
+ <Modal
253
+ open={open}
254
+ title="Chargement dans une modale"
255
+ onClose={() => setOpen(false)}
256
+ primaryAction={{ label: "Fermer", onClick: () => setOpen(false) }}
257
+ >
258
+ <div className="relative min-h-40">
259
+ {loading ? (
260
+ <Loader message="Chargement des données…" />
261
+ ) : (
262
+ <div className="space-y-inline">
263
+ {["Service importé", "Utilisateurs synchronisés", "Rapport généré"].map(
264
+ (item) => (
265
+ <div
266
+ key={item}
267
+ className="flex items-center gap-inline rounded-large border border-border bg-surface-muted px-component py-control"
268
+ >
269
+ <Icon name="CircleCheck" variant="success" aria-hidden="true" />
270
+ <span className="text-body-medium text-foreground">{item}</span>
271
+ </div>
272
+ ),
273
+ )}
274
+ </div>
275
+ )}
276
+ </div>
277
+ </Modal>
278
+ </>
279
+ );
280
+ }
281
+
282
+ export function ModalDemo() {
283
+ const [open, setOpen] = useState(false);
284
+
285
+ return (
286
+ <>
287
+ <ClickableButton type="button" variant="secondary" onClick={() => setOpen(true)}>
288
+ Ouvrir la modale
289
+ </ClickableButton>
290
+ <Modal
291
+ open={open}
292
+ title="Confirmation"
293
+ onClose={() => setOpen(false)}
294
+ primaryAction={{ label: "Confirmer", onClick: () => setOpen(false) }}
295
+ secondaryAction={{ label: "Annuler", onClick: () => setOpen(false) }}
296
+ >
297
+ <p className="text-body text-muted-foreground">
298
+ Cette action enregistrera les modifications. Souhaitez-vous continuer ?
299
+ </p>
300
+ </Modal>
301
+ </>
302
+ );
303
+ }
304
+
305
+ export function SelectorsDemo() {
306
+ const [role, setRole] = useState("manager");
307
+ const [roles, setRoles] = useState<string[]>(["admin", "manager"]);
308
+ const [city, setCity] = useState("");
309
+ const [tags, setTags] = useState<string[]>(["viewer"]);
310
+ const [filters, setFilters] = useState<string[]>([]);
311
+
312
+ return (
313
+ <div className="grid gap-component md:grid-cols-2">
314
+ <DemoCard title="Select" description="Sélection simple.">
315
+ <Select
316
+ label="Rôle"
317
+ options={SELECT_OPTIONS}
318
+ value={role}
319
+ onChange={setRole}
320
+ placeholder="Choisir un rôle…"
321
+ />
322
+ </DemoCard>
323
+ <DemoCard title="MultiSelect" description="Sélection multiple avec chips.">
324
+ <MultiSelect
325
+ label="Rôles"
326
+ options={SELECT_OPTIONS}
327
+ values={roles}
328
+ onChange={setRoles}
329
+ placeholder="Choisir des rôles…"
330
+ />
331
+ </DemoCard>
332
+ <DemoCard title="SelectWithSearch" description="Liste longue avec recherche.">
333
+ <SelectWithSearch
334
+ label="Profil"
335
+ options={SELECT_OPTIONS}
336
+ value={city}
337
+ onChange={setCity}
338
+ placeholder="Rechercher un profil…"
339
+ />
340
+ </DemoCard>
341
+ <DemoCard title="MultiSelectWithSearch" description="Multi-sélection avec recherche.">
342
+ <MultiSelectWithSearch
343
+ label="Profils"
344
+ options={SELECT_OPTIONS}
345
+ values={tags}
346
+ onChange={setTags}
347
+ placeholder="Rechercher…"
348
+ />
349
+ </DemoCard>
350
+ <DemoCard title="SelectFilter" description="Filtre de colonne (table).">
351
+ <SelectFilter
352
+ label="Filtrer par rôle"
353
+ options={SELECT_OPTIONS}
354
+ values={filters}
355
+ onChange={setFilters}
356
+ placeholder="Filtrer…"
357
+ />
358
+ </DemoCard>
359
+ </div>
360
+ );
361
+ }
362
+
363
+ export function TabsDemo() {
364
+ return (
365
+ <Tabs
366
+ tabs={[
367
+ { value: "general", label: "Général" },
368
+ { value: "security", label: "Sécurité" },
369
+ { value: "notifications", label: "Notifications" },
370
+ ]}
371
+ defaultValue="general"
372
+ >
373
+ {(active) => (
374
+ <p className="text-body text-muted-foreground">
375
+ Contenu de l&apos;onglet «{" "}
376
+ {active === "general"
377
+ ? "Général"
378
+ : active === "security"
379
+ ? "Sécurité"
380
+ : "Notifications"}{" "}
381
+ ».
382
+ </p>
383
+ )}
384
+ </Tabs>
385
+ );
386
+ }
@@ -0,0 +1,42 @@
1
+ "use client";
2
+
3
+ import { Badge } from "@modoock/components";
4
+ import { DemoCard, ShowcaseShell } from "../_shared";
5
+
6
+ export default function BadgesPage() {
7
+ return (
8
+ <ShowcaseShell
9
+ title="Badges"
10
+ subtitle={
11
+ <>
12
+ Composant <code className="font-mono">Badge</code>
13
+ </>
14
+ }
15
+ usage="Utilisez Badge pour un statut ou une étiquette courte. Le variant porte la sémantique (succès, danger, info…)."
16
+ importCode={`import { Badge } from "@modoock/components";`}
17
+ >
18
+ <div className="grid gap-component md:grid-cols-2">
19
+ <DemoCard
20
+ title="Variants"
21
+ code={`<Badge>Default</Badge>
22
+ <Badge variant="primary">Primary</Badge>
23
+ <Badge variant="success">Success</Badge>
24
+ <Badge variant="warning">Warning</Badge>
25
+ <Badge variant="danger">Danger</Badge>
26
+ <Badge variant="info">Info</Badge>`}
27
+ >
28
+ <div className="flex flex-wrap gap-inline">
29
+ <Badge>Default</Badge>
30
+ <Badge variant="primary">Primary</Badge>
31
+ <Badge variant="secondary">Secondary</Badge>
32
+ <Badge variant="success">Success</Badge>
33
+ <Badge variant="warning">Warning</Badge>
34
+ <Badge variant="danger">Danger</Badge>
35
+ <Badge variant="info">Info</Badge>
36
+ <Badge variant="accent">Accent</Badge>
37
+ </div>
38
+ </DemoCard>
39
+ </div>
40
+ </ShowcaseShell>
41
+ );
42
+ }
@@ -0,0 +1,40 @@
1
+ "use client";
2
+
3
+ import { MetricBar } from "@modoock/components";
4
+ import { DemoCard, ShowcaseShell } from "../_shared";
5
+
6
+ export default function BarresDeMetriquePage() {
7
+ return (
8
+ <ShowcaseShell
9
+ title="Barres de métrique"
10
+ subtitle={
11
+ <>
12
+ Composant <code className="font-mono">MetricBar</code>
13
+ </>
14
+ }
15
+ usage="Affichez une progression numérique (0–100) avec un ton sémantique. Idéal pour indicateurs compacts dans une fiche ou un résumé."
16
+ importCode={`import { MetricBar } from "@modoock/components";`}
17
+ >
18
+ <div className="grid gap-component md:grid-cols-2">
19
+ <DemoCard
20
+ title="Tons"
21
+ code={`<MetricBar value={72} tone="primary" />
22
+ <MetricBar value={45} tone="success" />
23
+ <MetricBar value={88} tone="warning" />
24
+ <MetricBar value={20} tone="danger" />
25
+ <MetricBar value={60} tone="info" />
26
+ <MetricBar value={35} tone="accent" />`}
27
+ >
28
+ <div className="flex flex-col gap-component">
29
+ <MetricBar value={72} tone="primary" />
30
+ <MetricBar value={45} tone="success" />
31
+ <MetricBar value={88} tone="warning" />
32
+ <MetricBar value={20} tone="danger" />
33
+ <MetricBar value={60} tone="info" />
34
+ <MetricBar value={35} tone="accent" />
35
+ </div>
36
+ </DemoCard>
37
+ </div>
38
+ </ShowcaseShell>
39
+ );
40
+ }
@@ -0,0 +1,135 @@
1
+ "use client";
2
+
3
+ import { ClickableButton, Icon } from "@modoock/components";
4
+ import { DemoCard, ShowcaseShell } from "../_shared";
5
+
6
+ export default function BoutonsPage() {
7
+ return (
8
+ <ShowcaseShell
9
+ title="Boutons"
10
+ subtitle={
11
+ <>
12
+ Composant <code className="font-mono">ClickableButton</code>
13
+ </>
14
+ }
15
+ usage="Utilisez ClickableButton pour toute action déclenchée par l’utilisateur. Choisissez le variant selon l’importance (primaire, secondaire, danger…) et évitez un élément HTML button brut."
16
+ importCode={`import { ClickableButton, Icon } from "@modoock/components";`}
17
+ >
18
+ <div className="grid gap-component md:grid-cols-2">
19
+ <DemoCard
20
+ title="Variants"
21
+ code={`<ClickableButton>Primary</ClickableButton>
22
+ <ClickableButton variant="secondary">Secondary</ClickableButton>
23
+ <ClickableButton variant="ghost">Ghost</ClickableButton>
24
+ <ClickableButton variant="danger">Danger</ClickableButton>`}
25
+ >
26
+ <div className="flex flex-wrap gap-inline">
27
+ <ClickableButton>Primary</ClickableButton>
28
+ <ClickableButton variant="secondary">Secondary</ClickableButton>
29
+ <ClickableButton variant="ghost">Ghost</ClickableButton>
30
+ <ClickableButton variant="accent">Accent</ClickableButton>
31
+ <ClickableButton variant="success">Success</ClickableButton>
32
+ <ClickableButton variant="warning">Warning</ClickableButton>
33
+ <ClickableButton variant="danger">Danger</ClickableButton>
34
+ <ClickableButton variant="info">Info</ClickableButton>
35
+ </div>
36
+ </DemoCard>
37
+ <DemoCard
38
+ title="Tailles"
39
+ code={`<ClickableButton size="sm">Small</ClickableButton>
40
+ <ClickableButton size="md">Medium</ClickableButton>
41
+ <ClickableButton size="lg">Large</ClickableButton>
42
+ <ClickableButton size="icon" variant="secondary" aria-label="Actualiser">
43
+ <Icon name="RefreshCw" size="small" />
44
+ </ClickableButton>`}
45
+ >
46
+ <div className="flex flex-wrap items-center gap-inline">
47
+ <ClickableButton size="sm">Small</ClickableButton>
48
+ <ClickableButton size="md">Medium</ClickableButton>
49
+ <ClickableButton size="lg">Large</ClickableButton>
50
+ <ClickableButton size="icon" variant="secondary" aria-label="Actualiser">
51
+ <Icon name="RefreshCw" size="small" aria-hidden="true" />
52
+ </ClickableButton>
53
+ </div>
54
+ </DemoCard>
55
+ <DemoCard
56
+ title="Chargement (loading)"
57
+ code={`<ClickableButton loading loadingText="Enregistrement…">
58
+ Enregistrer
59
+ </ClickableButton>`}
60
+ >
61
+ <div className="flex flex-wrap items-center gap-inline">
62
+ <ClickableButton loading loadingText="Enregistrement…">
63
+ Enregistrer
64
+ </ClickableButton>
65
+ <ClickableButton loading variant="secondary">
66
+ Traitement
67
+ </ClickableButton>
68
+ </div>
69
+ </DemoCard>
70
+ <DemoCard
71
+ title="Désactivé (disabled)"
72
+ code={`<ClickableButton disabled>Désactivé</ClickableButton>
73
+ <ClickableButton disabled variant="danger" leftIcon={<Icon name="Trash2" size="small" />}>
74
+ Supprimer
75
+ </ClickableButton>`}
76
+ >
77
+ <div className="flex flex-wrap gap-inline">
78
+ <ClickableButton disabled>Désactivé</ClickableButton>
79
+ <ClickableButton disabled variant="secondary">
80
+ Indisponible
81
+ </ClickableButton>
82
+ <ClickableButton
83
+ disabled
84
+ variant="danger"
85
+ leftIcon={<Icon name="Trash2" size="small" />}
86
+ >
87
+ Supprimer
88
+ </ClickableButton>
89
+ </div>
90
+ </DemoCard>
91
+ <DemoCard
92
+ title="Icônes (gauche / droite)"
93
+ code={`<ClickableButton leftIcon={<Icon name="Plus" size="small" />}>
94
+ Créer
95
+ </ClickableButton>
96
+ <ClickableButton
97
+ rightIcon={<Icon name="ArrowRight" size="small" />}
98
+ variant="secondary"
99
+ >
100
+ Continuer
101
+ </ClickableButton>`}
102
+ >
103
+ <div className="flex flex-wrap items-center gap-inline">
104
+ <ClickableButton leftIcon={<Icon name="Plus" size="small" />}>
105
+ Créer
106
+ </ClickableButton>
107
+ <ClickableButton
108
+ rightIcon={<Icon name="ArrowRight" size="small" />}
109
+ variant="secondary"
110
+ >
111
+ Continuer
112
+ </ClickableButton>
113
+ <ClickableButton
114
+ leftIcon={<Icon name="Save" size="small" />}
115
+ rightIcon={<Icon name="Download" size="small" />}
116
+ variant="accent"
117
+ >
118
+ Exporter
119
+ </ClickableButton>
120
+ </div>
121
+ </DemoCard>
122
+ <DemoCard
123
+ title="Largeur pleine (fullWidth)"
124
+ code={`<ClickableButton fullWidth leftIcon={<Icon name="Plus" size="small" />}>
125
+ Créer un nouveau projet
126
+ </ClickableButton>`}
127
+ >
128
+ <ClickableButton fullWidth leftIcon={<Icon name="Plus" size="small" />}>
129
+ Créer un nouveau projet
130
+ </ClickableButton>
131
+ </DemoCard>
132
+ </div>
133
+ </ShowcaseShell>
134
+ );
135
+ }