create-modoock-app 2.3.1 → 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.
Files changed (29) hide show
  1. package/README.md +19 -7
  2. package/package.json +1 -1
  3. package/template/app/(main)/components/_shared.tsx +602 -0
  4. package/template/app/(main)/components/agenda/page.tsx +48 -0
  5. package/template/app/(main)/components/badges/page.tsx +42 -0
  6. package/template/app/(main)/components/barres-de-metrique/page.tsx +40 -0
  7. package/template/app/(main)/components/boutons/page.tsx +142 -0
  8. package/template/app/(main)/components/champs/page.tsx +175 -0
  9. package/template/app/(main)/components/date-picker/page.tsx +48 -0
  10. package/template/app/(main)/components/icones/page.tsx +96 -0
  11. package/template/app/(main)/components/loader/page.tsx +81 -0
  12. package/template/app/(main)/components/modale/page.tsx +48 -0
  13. package/template/app/(main)/components/onglets/page.tsx +36 -0
  14. package/template/app/(main)/components/page.tsx +130 -825
  15. package/template/app/(main)/components/selecteurs/page.tsx +49 -0
  16. package/template/app/(main)/components/stepper/page.tsx +69 -0
  17. package/template/app/(main)/components/tableau/page.tsx +67 -0
  18. package/template/app/(main)/design-system/page.tsx +15 -3
  19. package/template/app/(main)/documentation/page.tsx +413 -0
  20. package/template/app/(main)/layout.tsx +2 -0
  21. package/template/app/globals.css +3 -3
  22. package/template/app/layout.tsx +1 -1
  23. package/template/components/layout/side-nav.tsx +118 -61
  24. package/template/lib/scroll-to-section.ts +38 -0
  25. package/template/next.config.ts +0 -17
  26. package/template/package-lock.json +459 -314
  27. package/template/package.json +2 -0
  28. package/template/sgconfig.yml +1 -1
  29. package/template/tsconfig.json +41 -71
@@ -0,0 +1,48 @@
1
+ "use client";
2
+
3
+ import { DemoCard, ModalDemo, ShowcaseShell } from "../_shared";
4
+
5
+ export default function ModalePage() {
6
+ return (
7
+ <ShowcaseShell
8
+ title="Modale"
9
+ subtitle={
10
+ <>
11
+ Composant <code className="">Modal</code>
12
+ </>
13
+ }
14
+ usage="Ouvrez une modale pour une confirmation ou un formulaire court. Contrôlez open / onClose ; primaryAction et secondaryAction construisent le pied de page."
15
+ importCode={`import { Modal, ClickableButton } from "@modoock/components";`}
16
+ >
17
+ <div className="grid gap-component md:grid-cols-2">
18
+ <DemoCard
19
+ title="Actions primaire / secondaire"
20
+ description="Focus piégé, fermeture Escape, scroll verrouillé."
21
+ code={`const [open, setOpen] = useState(false);
22
+
23
+ <ClickableButton onClick={() => setOpen(true)}>
24
+ Ouvrir la modale
25
+ </ClickableButton>
26
+
27
+ <Modal
28
+ open={open}
29
+ title="Confirmation"
30
+ onClose={() => setOpen(false)}
31
+ primaryAction={{
32
+ label: "Confirmer",
33
+ onClick: () => setOpen(false),
34
+ }}
35
+ secondaryAction={{
36
+ label: "Annuler",
37
+ onClick: () => setOpen(false),
38
+ }}
39
+ >
40
+ <p>Cette action enregistrera les modifications.</p>
41
+ </Modal>`}
42
+ >
43
+ <ModalDemo />
44
+ </DemoCard>
45
+ </div>
46
+ </ShowcaseShell>
47
+ );
48
+ }
@@ -0,0 +1,36 @@
1
+ "use client";
2
+
3
+ import { DemoCard, ShowcaseShell, TabsDemo } from "../_shared";
4
+
5
+ export default function OngletsPage() {
6
+ return (
7
+ <ShowcaseShell
8
+ title="Onglets"
9
+ subtitle={
10
+ <>
11
+ Composant <code className="">Tabs</code>
12
+ </>
13
+ }
14
+ usage="Organisez un contenu en panneaux exclusifs. Un seul onglet actif à la fois ; le rendu enfant reçoit la valeur active."
15
+ importCode={`import { Tabs } from "@modoock/components";`}
16
+ >
17
+ <div className="grid gap-component md:grid-cols-2">
18
+ <DemoCard
19
+ title="Navigation par onglets"
20
+ code={`<Tabs
21
+ tabs={[
22
+ { value: "general", label: "Général" },
23
+ { value: "security", label: "Sécurité" },
24
+ { value: "notifications", label: "Notifications" },
25
+ ]}
26
+ defaultValue="general"
27
+ >
28
+ {(active) => <p>Contenu de l’onglet « {active} ».</p>}
29
+ </Tabs>`}
30
+ >
31
+ <TabsDemo />
32
+ </DemoCard>
33
+ </div>
34
+ </ShowcaseShell>
35
+ );
36
+ }