create-modoock-app 2.4.0 → 2.5.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/package.json +1 -1
- package/template/app/(main)/components/_shared.tsx +219 -3
- package/template/app/(main)/components/agenda/page.tsx +48 -0
- package/template/app/(main)/components/badges/page.tsx +1 -1
- package/template/app/(main)/components/barres-de-metrique/page.tsx +1 -1
- package/template/app/(main)/components/boutons/page.tsx +14 -7
- package/template/app/(main)/components/champs/page.tsx +2 -2
- package/template/app/(main)/components/date-picker/page.tsx +48 -0
- package/template/app/(main)/components/icones/page.tsx +1 -1
- package/template/app/(main)/components/modale/page.tsx +1 -1
- package/template/app/(main)/components/onglets/page.tsx +1 -1
- package/template/app/(main)/components/page.tsx +12 -0
- package/template/app/(main)/components/tableau/page.tsx +1 -1
- package/template/app/(main)/design-system/page.tsx +2 -2
- package/template/app/globals.css +3 -3
- package/template/components/layout/side-nav.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
Agenda,
|
|
5
|
+
AGENDA_STATUS_OPTIONS,
|
|
4
6
|
Badge,
|
|
5
7
|
ClickableButton,
|
|
8
|
+
DatePicker,
|
|
9
|
+
DateRangePicker,
|
|
10
|
+
DateTimePicker,
|
|
6
11
|
Icon,
|
|
7
12
|
Loader,
|
|
8
13
|
Modal,
|
|
@@ -13,8 +18,14 @@ import {
|
|
|
13
18
|
SelectWithSearch,
|
|
14
19
|
Tabs,
|
|
15
20
|
} from "@modoock/components";
|
|
16
|
-
import type {
|
|
17
|
-
|
|
21
|
+
import type {
|
|
22
|
+
AgendaEvent,
|
|
23
|
+
AgendaView,
|
|
24
|
+
CardAction,
|
|
25
|
+
Column,
|
|
26
|
+
DateRangeValue,
|
|
27
|
+
} from "@modoock/components";
|
|
28
|
+
import { useEffect, useMemo, useState, type ReactNode } from "react";
|
|
18
29
|
|
|
19
30
|
export const noop = () => undefined;
|
|
20
31
|
|
|
@@ -116,7 +127,7 @@ export const COLUMNS: Column<AppUser>[] = [
|
|
|
116
127
|
|
|
117
128
|
export function CodeBlock({ code }: { code: string }) {
|
|
118
129
|
return (
|
|
119
|
-
<pre className="mt-component overflow-x-auto rounded-large border border-border bg-surface-muted p-component
|
|
130
|
+
<pre className="mt-component overflow-x-auto rounded-large border border-border bg-surface-muted p-component text-small text-foreground">
|
|
120
131
|
<code>{code}</code>
|
|
121
132
|
</pre>
|
|
122
133
|
);
|
|
@@ -360,6 +371,211 @@ export function SelectorsDemo() {
|
|
|
360
371
|
);
|
|
361
372
|
}
|
|
362
373
|
|
|
374
|
+
function atDay(base: Date, dayOffset: number, hour: number, minute = 0): Date {
|
|
375
|
+
const d = new Date(base.getFullYear(), base.getMonth(), base.getDate() + dayOffset);
|
|
376
|
+
d.setHours(hour, minute, 0, 0);
|
|
377
|
+
return d;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function buildDemoAgendaEvents(anchor: Date): AgendaEvent[] {
|
|
381
|
+
return [
|
|
382
|
+
{
|
|
383
|
+
id: "1",
|
|
384
|
+
title: "Amine Berrada",
|
|
385
|
+
subtitle: "Dr. El Fassi — Salle A",
|
|
386
|
+
kind: "Consultation",
|
|
387
|
+
status: "confirmed",
|
|
388
|
+
startAt: atDay(anchor, 0, 9, 0),
|
|
389
|
+
endAt: atDay(anchor, 0, 9, 45),
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: "2",
|
|
393
|
+
title: "Sarah El Fassi",
|
|
394
|
+
subtitle: "Dr. Amrani — Salle B",
|
|
395
|
+
kind: "Suivi",
|
|
396
|
+
status: "planned",
|
|
397
|
+
startAt: atDay(anchor, 0, 11, 0),
|
|
398
|
+
endAt: atDay(anchor, 0, 11, 30),
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: "3",
|
|
402
|
+
title: "Youssef Amrani",
|
|
403
|
+
subtitle: "Dr. El Fassi — Salle A",
|
|
404
|
+
kind: "Consultation",
|
|
405
|
+
status: "delayed",
|
|
406
|
+
startAt: atDay(anchor, 1, 10, 0),
|
|
407
|
+
endAt: atDay(anchor, 1, 10, 45),
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: "4",
|
|
411
|
+
title: "Leïla Benkirane",
|
|
412
|
+
subtitle: "Dr. Tazi — Box 2",
|
|
413
|
+
kind: "Contrôle",
|
|
414
|
+
status: "completed",
|
|
415
|
+
startAt: atDay(anchor, -2, 14, 0),
|
|
416
|
+
endAt: atDay(anchor, -2, 14, 30),
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
id: "5",
|
|
420
|
+
title: "Karim Tazi",
|
|
421
|
+
subtitle: "Dr. Amrani — Salle B",
|
|
422
|
+
kind: "Consultation",
|
|
423
|
+
status: "cancelled",
|
|
424
|
+
startAt: atDay(anchor, 2, 15, 0),
|
|
425
|
+
endAt: atDay(anchor, 2, 15, 45),
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
id: "6",
|
|
429
|
+
title: "Nadia Chraibi",
|
|
430
|
+
subtitle: "Dr. El Fassi — Salle A",
|
|
431
|
+
kind: "Suivi",
|
|
432
|
+
status: "confirmed",
|
|
433
|
+
startAt: atDay(anchor, 3, 9, 30),
|
|
434
|
+
endAt: atDay(anchor, 3, 10, 15),
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
id: "7",
|
|
438
|
+
title: "Omar Alaoui",
|
|
439
|
+
subtitle: "Dr. Tazi — Box 1",
|
|
440
|
+
kind: "Consultation",
|
|
441
|
+
status: "planned",
|
|
442
|
+
startAt: atDay(anchor, 0, 16, 0),
|
|
443
|
+
endAt: atDay(anchor, 0, 16, 45),
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
id: "8",
|
|
447
|
+
title: "Imane Ait Mbarek",
|
|
448
|
+
subtitle: "Dr. Amrani — Salle B",
|
|
449
|
+
kind: "Contrôle",
|
|
450
|
+
status: "confirmed",
|
|
451
|
+
startAt: atDay(anchor, 5, 11, 0),
|
|
452
|
+
endAt: atDay(anchor, 5, 11, 30),
|
|
453
|
+
},
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
const AGENDA_KIND_OPTIONS = [
|
|
458
|
+
{ value: "all", label: "Tous les types" },
|
|
459
|
+
{ value: "Consultation", label: "Consultation" },
|
|
460
|
+
{ value: "Suivi", label: "Suivi" },
|
|
461
|
+
{ value: "Contrôle", label: "Contrôle" },
|
|
462
|
+
];
|
|
463
|
+
|
|
464
|
+
export function AgendaDemo() {
|
|
465
|
+
const [view, setView] = useState<AgendaView>("month");
|
|
466
|
+
const [anchorDate, setAnchorDate] = useState(() => new Date());
|
|
467
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
468
|
+
const [statusFilter, setStatusFilter] = useState<string[]>([]);
|
|
469
|
+
const [kindFilter, setKindFilter] = useState("all");
|
|
470
|
+
const [selected, setSelected] = useState<AgendaEvent | null>(null);
|
|
471
|
+
const [createdSlot, setCreatedSlot] = useState<Date | null>(null);
|
|
472
|
+
|
|
473
|
+
const allEvents = useMemo(
|
|
474
|
+
() => buildDemoAgendaEvents(new Date()),
|
|
475
|
+
[],
|
|
476
|
+
);
|
|
477
|
+
|
|
478
|
+
const events = useMemo(() => {
|
|
479
|
+
return allEvents.filter((event) => {
|
|
480
|
+
if (statusFilter.length > 0 && !statusFilter.includes(event.status ?? "")) {
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
if (kindFilter !== "all" && event.kind !== kindFilter) return false;
|
|
484
|
+
return true;
|
|
485
|
+
});
|
|
486
|
+
}, [allEvents, statusFilter, kindFilter]);
|
|
487
|
+
|
|
488
|
+
return (
|
|
489
|
+
<div className="flex flex-col gap-component">
|
|
490
|
+
<Agenda
|
|
491
|
+
events={events}
|
|
492
|
+
view={view}
|
|
493
|
+
onViewChange={setView}
|
|
494
|
+
anchorDate={anchorDate}
|
|
495
|
+
onAnchorDateChange={setAnchorDate}
|
|
496
|
+
searchQuery={searchQuery}
|
|
497
|
+
onSearchChange={setSearchQuery}
|
|
498
|
+
searchPlaceholder="Patient, praticien, titre…"
|
|
499
|
+
statusOptions={AGENDA_STATUS_OPTIONS}
|
|
500
|
+
onSelectEvent={setSelected}
|
|
501
|
+
onCreateSlot={setCreatedSlot}
|
|
502
|
+
filters={
|
|
503
|
+
<>
|
|
504
|
+
<div className="w-[10.5rem]">
|
|
505
|
+
<Select
|
|
506
|
+
label="Type"
|
|
507
|
+
options={AGENDA_KIND_OPTIONS}
|
|
508
|
+
value={kindFilter}
|
|
509
|
+
onChange={setKindFilter}
|
|
510
|
+
placeholder="Tous les types"
|
|
511
|
+
/>
|
|
512
|
+
</div>
|
|
513
|
+
<div className="w-[12rem]">
|
|
514
|
+
<SelectFilter
|
|
515
|
+
label="Statut"
|
|
516
|
+
options={AGENDA_STATUS_OPTIONS}
|
|
517
|
+
values={statusFilter}
|
|
518
|
+
onChange={setStatusFilter}
|
|
519
|
+
placeholder="Tous les statuts"
|
|
520
|
+
/>
|
|
521
|
+
</div>
|
|
522
|
+
</>
|
|
523
|
+
}
|
|
524
|
+
/>
|
|
525
|
+
|
|
526
|
+
{selected ? (
|
|
527
|
+
<p className="text-small text-muted-foreground">
|
|
528
|
+
Sélection : <span className="text-foreground">{selected.title}</span>
|
|
529
|
+
{selected.kind ? ` — ${selected.kind}` : ""}
|
|
530
|
+
{selected.status ? ` (${selected.status})` : ""}
|
|
531
|
+
</p>
|
|
532
|
+
) : null}
|
|
533
|
+
{createdSlot ? (
|
|
534
|
+
<p className="text-small text-muted-foreground">
|
|
535
|
+
Créneau demandé :{" "}
|
|
536
|
+
<span className="text-foreground">
|
|
537
|
+
{createdSlot.toLocaleString("fr-FR")}
|
|
538
|
+
</span>
|
|
539
|
+
</p>
|
|
540
|
+
) : null}
|
|
541
|
+
</div>
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export function DatePickersDemo() {
|
|
546
|
+
const [date, setDate] = useState<Date | null>(new Date());
|
|
547
|
+
const [dateTime, setDateTime] = useState<Date | null>(() => {
|
|
548
|
+
const next = new Date();
|
|
549
|
+
next.setHours(14, 30, 0, 0);
|
|
550
|
+
return next;
|
|
551
|
+
});
|
|
552
|
+
const [range, setRange] = useState<DateRangeValue>({
|
|
553
|
+
from: null,
|
|
554
|
+
to: null,
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
return (
|
|
558
|
+
<div className="grid gap-component md:grid-cols-2">
|
|
559
|
+
<DemoCard title="DatePicker" description="Une seule date.">
|
|
560
|
+
<DatePicker label="Date" value={date} onChange={setDate} />
|
|
561
|
+
</DemoCard>
|
|
562
|
+
<DemoCard title="DateTimePicker" description="Date et heure.">
|
|
563
|
+
<DateTimePicker
|
|
564
|
+
label="Date et heure"
|
|
565
|
+
value={dateTime}
|
|
566
|
+
onChange={setDateTime}
|
|
567
|
+
/>
|
|
568
|
+
</DemoCard>
|
|
569
|
+
<DemoCard
|
|
570
|
+
title="DateRangePicker"
|
|
571
|
+
description="Période du… au… (deux clics)."
|
|
572
|
+
>
|
|
573
|
+
<DateRangePicker label="Période" value={range} onChange={setRange} />
|
|
574
|
+
</DemoCard>
|
|
575
|
+
</div>
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
|
|
363
579
|
export function TabsDemo() {
|
|
364
580
|
return (
|
|
365
581
|
<Tabs
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { AgendaDemo, CodeBlock, ShowcaseShell } from "../_shared";
|
|
4
|
+
|
|
5
|
+
export default function AgendaPage() {
|
|
6
|
+
return (
|
|
7
|
+
<ShowcaseShell
|
|
8
|
+
title="Agenda"
|
|
9
|
+
subtitle="Mois, semaine et liste"
|
|
10
|
+
usage="Passez events, view et anchorDate. En vue Liste, un filtre de période (DateRangePicker) est intégré — contrôlable via listRange / onListRangeChange. La barre expose aussi la recherche et le slot filters. Cliquez un jour vide pour onCreateSlot, un événement pour onSelectEvent."
|
|
11
|
+
importCode={`import { Agenda, AGENDA_STATUS_OPTIONS } from "@modoock/components";`}
|
|
12
|
+
>
|
|
13
|
+
<div className="mb-section">
|
|
14
|
+
<p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
15
|
+
Exemple de base
|
|
16
|
+
</p>
|
|
17
|
+
<CodeBlock
|
|
18
|
+
code={`const [view, setView] = useState("month");
|
|
19
|
+
const [anchorDate, setAnchorDate] = useState(new Date());
|
|
20
|
+
const [listRange, setListRange] = useState({ from: null, to: null });
|
|
21
|
+
const [q, setQ] = useState("");
|
|
22
|
+
|
|
23
|
+
<Agenda
|
|
24
|
+
events={events}
|
|
25
|
+
view={view}
|
|
26
|
+
onViewChange={setView}
|
|
27
|
+
anchorDate={anchorDate}
|
|
28
|
+
onAnchorDateChange={setAnchorDate}
|
|
29
|
+
listRange={listRange}
|
|
30
|
+
onListRangeChange={setListRange}
|
|
31
|
+
searchQuery={q}
|
|
32
|
+
onSearchChange={setQ}
|
|
33
|
+
statusOptions={AGENDA_STATUS_OPTIONS}
|
|
34
|
+
onSelectEvent={handleSelect}
|
|
35
|
+
onCreateSlot={handleCreate}
|
|
36
|
+
filters={
|
|
37
|
+
<>
|
|
38
|
+
<Select options={kinds} value={kind} onChange={setKind} />
|
|
39
|
+
<SelectFilter options={statuses} values={status} onChange={setStatus} />
|
|
40
|
+
</>
|
|
41
|
+
}
|
|
42
|
+
/>`}
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<AgendaDemo />
|
|
46
|
+
</ShowcaseShell>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -9,7 +9,7 @@ export default function BadgesPage() {
|
|
|
9
9
|
title="Badges"
|
|
10
10
|
subtitle={
|
|
11
11
|
<>
|
|
12
|
-
Composant <code className="
|
|
12
|
+
Composant <code className="">Badge</code>
|
|
13
13
|
</>
|
|
14
14
|
}
|
|
15
15
|
usage="Utilisez Badge pour un statut ou une étiquette courte. Le variant porte la sémantique (succès, danger, info…)."
|
|
@@ -9,7 +9,7 @@ export default function BarresDeMetriquePage() {
|
|
|
9
9
|
title="Barres de métrique"
|
|
10
10
|
subtitle={
|
|
11
11
|
<>
|
|
12
|
-
Composant <code className="
|
|
12
|
+
Composant <code className="">MetricBar</code>
|
|
13
13
|
</>
|
|
14
14
|
}
|
|
15
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é."
|
|
@@ -9,7 +9,7 @@ export default function BoutonsPage() {
|
|
|
9
9
|
title="Boutons"
|
|
10
10
|
subtitle={
|
|
11
11
|
<>
|
|
12
|
-
Composant <code className="
|
|
12
|
+
Composant <code className="">ClickableButton</code>
|
|
13
13
|
</>
|
|
14
14
|
}
|
|
15
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."
|
|
@@ -19,9 +19,9 @@ export default function BoutonsPage() {
|
|
|
19
19
|
<DemoCard
|
|
20
20
|
title="Variants"
|
|
21
21
|
code={`<ClickableButton>Primary</ClickableButton>
|
|
22
|
-
<ClickableButton variant="secondary">Secondary</ClickableButton>
|
|
23
|
-
<ClickableButton variant="ghost">Ghost</ClickableButton>
|
|
24
|
-
<ClickableButton variant="danger">Danger</ClickableButton>`}
|
|
22
|
+
<ClickableButton variant="secondary">Secondary</ClickableButton>
|
|
23
|
+
<ClickableButton variant="ghost">Ghost</ClickableButton>
|
|
24
|
+
<ClickableButton variant="danger">Danger</ClickableButton>`}
|
|
25
25
|
>
|
|
26
26
|
<div className="flex flex-wrap gap-inline">
|
|
27
27
|
<ClickableButton>Primary</ClickableButton>
|
|
@@ -47,7 +47,11 @@ export default function BoutonsPage() {
|
|
|
47
47
|
<ClickableButton size="sm">Small</ClickableButton>
|
|
48
48
|
<ClickableButton size="md">Medium</ClickableButton>
|
|
49
49
|
<ClickableButton size="lg">Large</ClickableButton>
|
|
50
|
-
<ClickableButton
|
|
50
|
+
<ClickableButton
|
|
51
|
+
size="icon"
|
|
52
|
+
variant="secondary"
|
|
53
|
+
aria-label="Actualiser"
|
|
54
|
+
>
|
|
51
55
|
<Icon name="RefreshCw" size="small" aria-hidden="true" />
|
|
52
56
|
</ClickableButton>
|
|
53
57
|
</div>
|
|
@@ -82,7 +86,7 @@ export default function BoutonsPage() {
|
|
|
82
86
|
<ClickableButton
|
|
83
87
|
disabled
|
|
84
88
|
variant="danger"
|
|
85
|
-
leftIcon={<Icon name="
|
|
89
|
+
leftIcon={<Icon name="Trash" size="small" />}
|
|
86
90
|
>
|
|
87
91
|
Supprimer
|
|
88
92
|
</ClickableButton>
|
|
@@ -125,7 +129,10 @@ export default function BoutonsPage() {
|
|
|
125
129
|
Créer un nouveau projet
|
|
126
130
|
</ClickableButton>`}
|
|
127
131
|
>
|
|
128
|
-
<ClickableButton
|
|
132
|
+
<ClickableButton
|
|
133
|
+
fullWidth
|
|
134
|
+
leftIcon={<Icon name="Plus" size="small" />}
|
|
135
|
+
>
|
|
129
136
|
Créer un nouveau projet
|
|
130
137
|
</ClickableButton>
|
|
131
138
|
</DemoCard>
|
|
@@ -9,8 +9,8 @@ export default function ChampsPage() {
|
|
|
9
9
|
title="Champs de saisie"
|
|
10
10
|
subtitle={
|
|
11
11
|
<>
|
|
12
|
-
Composants <code className="
|
|
13
|
-
<code className="
|
|
12
|
+
Composants <code className="">Input</code> et{" "}
|
|
13
|
+
<code className="">Textarea</code>
|
|
14
14
|
</>
|
|
15
15
|
}
|
|
16
16
|
usage="Utilisez Input pour une saisie courte et Textarea pour un texte long. Préférez ces composants à un champ HTML brut : libellé, aide, erreur et compteur sont déjà prévus."
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { CodeBlock, DatePickersDemo, ShowcaseShell } from "../_shared";
|
|
4
|
+
|
|
5
|
+
export default function DatePickerPage() {
|
|
6
|
+
return (
|
|
7
|
+
<ShowcaseShell
|
|
8
|
+
title="Sélecteurs de date"
|
|
9
|
+
subtitle="Date, date et heure, plage"
|
|
10
|
+
usage="Utilisez DatePicker pour une date seule, DateTimePicker lorsqu’une heure est nécessaire, et DateRangePicker pour une période (début → fin). Passez value et onChange ; les textes d’interface sont en français."
|
|
11
|
+
importCode={`import {
|
|
12
|
+
DatePicker,
|
|
13
|
+
DateTimePicker,
|
|
14
|
+
DateRangePicker,
|
|
15
|
+
} from "@modoock/components";`}
|
|
16
|
+
>
|
|
17
|
+
<div className="mb-section">
|
|
18
|
+
<p className="mb-inline text-label uppercase tracking-[0.12em] text-muted-foreground">
|
|
19
|
+
Exemple de base
|
|
20
|
+
</p>
|
|
21
|
+
<CodeBlock
|
|
22
|
+
code={`const [date, setDate] = useState<Date | null>(null);
|
|
23
|
+
const [dateTime, setDateTime] = useState<Date | null>(null);
|
|
24
|
+
const [range, setRange] = useState({ from: null, to: null });
|
|
25
|
+
|
|
26
|
+
<DatePicker
|
|
27
|
+
label="Date"
|
|
28
|
+
value={date}
|
|
29
|
+
onChange={setDate}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<DateTimePicker
|
|
33
|
+
label="Date et heure"
|
|
34
|
+
value={dateTime}
|
|
35
|
+
onChange={setDateTime}
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<DateRangePicker
|
|
39
|
+
label="Période"
|
|
40
|
+
value={range}
|
|
41
|
+
onChange={setRange}
|
|
42
|
+
/>`}
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<DatePickersDemo />
|
|
46
|
+
</ShowcaseShell>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -9,7 +9,7 @@ export default function IconesPage() {
|
|
|
9
9
|
title="Icônes"
|
|
10
10
|
subtitle={
|
|
11
11
|
<>
|
|
12
|
-
Composant <code className="
|
|
12
|
+
Composant <code className="">Icon</code>
|
|
13
13
|
</>
|
|
14
14
|
}
|
|
15
15
|
usage="Passez toujours par Icon (noms Lucide). Choisissez size et variant du Design System — ne pas importer lucide-react directement dans les pages."
|
|
@@ -8,7 +8,7 @@ export default function ModalePage() {
|
|
|
8
8
|
title="Modale"
|
|
9
9
|
subtitle={
|
|
10
10
|
<>
|
|
11
|
-
Composant <code className="
|
|
11
|
+
Composant <code className="">Modal</code>
|
|
12
12
|
</>
|
|
13
13
|
}
|
|
14
14
|
usage="Ouvrez une modale pour une confirmation ou un formulaire court. Contrôlez open / onClose ; primaryAction et secondaryAction construisent le pied de page."
|
|
@@ -8,7 +8,7 @@ export default function OngletsPage() {
|
|
|
8
8
|
title="Onglets"
|
|
9
9
|
subtitle={
|
|
10
10
|
<>
|
|
11
|
-
Composant <code className="
|
|
11
|
+
Composant <code className="">Tabs</code>
|
|
12
12
|
</>
|
|
13
13
|
}
|
|
14
14
|
usage="Organisez un contenu en panneaux exclusifs. Un seul onglet actif à la fois ; le rendu enfant reçoit la valeur active."
|
|
@@ -44,6 +44,18 @@ const CATALOG: {
|
|
|
44
44
|
description: "Select, multi-select, recherche et filtre.",
|
|
45
45
|
icon: "ListFilter",
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
href: "/components/date-picker",
|
|
49
|
+
title: "Sélecteurs de date",
|
|
50
|
+
description: "Date, date et heure, plage du… au….",
|
|
51
|
+
icon: "Calendar",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
href: "/components/agenda",
|
|
55
|
+
title: "Agenda",
|
|
56
|
+
description: "Vues mois, semaine et liste avec filtres.",
|
|
57
|
+
icon: "CalendarDays",
|
|
58
|
+
},
|
|
47
59
|
{
|
|
48
60
|
href: "/components/onglets",
|
|
49
61
|
title: "Onglets",
|
|
@@ -16,7 +16,7 @@ export default function TableauPage() {
|
|
|
16
16
|
title="Tableau"
|
|
17
17
|
subtitle={
|
|
18
18
|
<>
|
|
19
|
-
Composant <code className="
|
|
19
|
+
Composant <code className="">Table</code>
|
|
20
20
|
</>
|
|
21
21
|
}
|
|
22
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."
|
|
@@ -60,7 +60,7 @@ function TokenCard({
|
|
|
60
60
|
{children}
|
|
61
61
|
<div className="mt-component">
|
|
62
62
|
<p className="text-component-title text-foreground">{title}</p>
|
|
63
|
-
<p className="mt-micro
|
|
63
|
+
<p className="mt-micro text-small text-muted-foreground">
|
|
64
64
|
{value}
|
|
65
65
|
</p>
|
|
66
66
|
{description && (
|
|
@@ -87,7 +87,7 @@ function ColorSwatch({
|
|
|
87
87
|
<div className={`h-28 w-full ${className}`} />
|
|
88
88
|
<div className="p-component">
|
|
89
89
|
<p className="text-body-medium text-foreground">{name}</p>
|
|
90
|
-
<p className="mt-micro
|
|
90
|
+
<p className="mt-micro text-small text-muted-foreground">
|
|
91
91
|
{value}
|
|
92
92
|
</p>
|
|
93
93
|
</div>
|
package/template/app/globals.css
CHANGED
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
|
|
94
94
|
/* Radius */
|
|
95
95
|
|
|
96
|
-
--radius-small: 0.
|
|
97
|
-
--radius-medium: 0.
|
|
98
|
-
--radius-large:
|
|
96
|
+
--radius-small: 0.25rem; /* Used for compact UI elements. (Ex: small controls, tags and badges.) */
|
|
97
|
+
--radius-medium: 0.50rem; /* Used for standard interactive components. (Ex: buttons, inputs, selects and dropdowns.) */
|
|
98
|
+
--radius-large: 0.70rem; /* Used for larger containers and surfaces. (Ex: cards, panels and major content blocks.) */
|
|
99
99
|
--radius-full: 9999rem; /* Used for fully rounded elements. (Ex: pills, badges, avatars and circular buttons.) */
|
|
100
100
|
|
|
101
101
|
/* Layout */
|
|
@@ -63,6 +63,8 @@ const NAV_ITEMS: NavItem[] = [
|
|
|
63
63
|
{ label: "Loader", href: "/components/loader" },
|
|
64
64
|
{ label: "Badges", href: "/components/badges" },
|
|
65
65
|
{ label: "Sélecteurs", href: "/components/selecteurs" },
|
|
66
|
+
{ label: "Sélecteurs de date", href: "/components/date-picker" },
|
|
67
|
+
{ label: "Agenda", href: "/components/agenda" },
|
|
66
68
|
{ label: "Onglets", href: "/components/onglets" },
|
|
67
69
|
{ label: "Modale", href: "/components/modale" },
|
|
68
70
|
{ label: "Barres de métrique", href: "/components/barres-de-metrique" },
|