@egen-civitas/esm-styleguide 1.0.1 → 1.2.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 (47) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/content-section/content-section.component.d.ts +44 -0
  3. package/dist/content-section/content-section.component.d.ts.map +1 -0
  4. package/dist/content-section/content-section.component.js +90 -0
  5. package/dist/content-section/content-section.module.scss +70 -0
  6. package/dist/content-section/index.d.ts +2 -0
  7. package/dist/content-section/index.d.ts.map +1 -0
  8. package/dist/content-section/index.js +1 -0
  9. package/dist/hero-mosaic/hero-mosaic.component.d.ts +15 -0
  10. package/dist/hero-mosaic/hero-mosaic.component.d.ts.map +1 -0
  11. package/dist/hero-mosaic/hero-mosaic.component.js +37 -0
  12. package/dist/hero-mosaic/hero-mosaic.module.scss +124 -0
  13. package/dist/hero-mosaic/hero-tile-card.component.d.ts +23 -0
  14. package/dist/hero-mosaic/hero-tile-card.component.d.ts.map +1 -0
  15. package/dist/hero-mosaic/hero-tile-card.component.js +62 -0
  16. package/dist/hero-mosaic/index.d.ts +3 -0
  17. package/dist/hero-mosaic/index.d.ts.map +1 -0
  18. package/dist/hero-mosaic/index.js +2 -0
  19. package/dist/internal.d.ts +4 -0
  20. package/dist/internal.d.ts.map +1 -1
  21. package/dist/internal.js +4 -0
  22. package/dist/page-background/gradient-wave.component.d.ts +22 -0
  23. package/dist/page-background/gradient-wave.component.d.ts.map +1 -0
  24. package/dist/page-background/gradient-wave.component.js +751 -0
  25. package/dist/page-background/index.d.ts +5 -0
  26. package/dist/page-background/index.d.ts.map +1 -0
  27. package/dist/page-background/index.js +4 -0
  28. package/dist/page-background/page-background.component.d.ts +96 -0
  29. package/dist/page-background/page-background.component.d.ts.map +1 -0
  30. package/dist/page-background/page-background.component.js +287 -0
  31. package/dist/page-background/page-background.context.d.ts +24 -0
  32. package/dist/page-background/page-background.context.d.ts.map +1 -0
  33. package/dist/page-background/page-background.context.js +31 -0
  34. package/dist/page-background/page-background.stories.js +42 -0
  35. package/dist/page-background/page-background.utils.d.ts +12 -0
  36. package/dist/page-background/page-background.utils.d.ts.map +1 -0
  37. package/dist/page-background/page-background.utils.js +11 -0
  38. package/dist/public.d.ts +4 -0
  39. package/dist/public.d.ts.map +1 -1
  40. package/dist/public.js +4 -0
  41. package/dist/top-bar/index.d.ts +2 -0
  42. package/dist/top-bar/index.d.ts.map +1 -0
  43. package/dist/top-bar/index.js +1 -0
  44. package/dist/top-bar/top-bar.component.d.ts +58 -0
  45. package/dist/top-bar/top-bar.component.d.ts.map +1 -0
  46. package/dist/top-bar/top-bar.component.js +124 -0
  47. package/package.json +13 -12
package/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ # @egen-civitas/esm-styleguide
2
+
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 321720c: feat(styleguide): ajoute `TopBar`, `TopBarIconButton`, `TopBarDivider`, `TopBarAvatar` (Tailwind, présentationnels, guide d'usage en commentaire). Le preset Tailwind scanne désormais le styleguide publié (`@source`) et expose l'échelle `error-*`.
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - b90a6f6: Nouveau module `page-background` (100% Tailwind, sans SCSS ni CSS Modules) : système d'arrière-plan de page porté depuis Civitas-GED, où il habillait déjà toutes les pages de l'intranet — `<PageBackgroundProvider>` / `<GlobalPageBackground>` (à monter une fois dans le shell), `<PageBackground>` (déclaratif, par page) et `<GradientWave>` (fond animé WebGL, réutilisable seul).
14
+
15
+ Corrigé lors du portage : le listener `resize` de `GradientWave` n'était jamais désinscrit (une arrow function anonyme était attachée dans `init()`, différente de la référence `handleResize` retirée dans `destroy()`) — fuite mémoire à chaque montage/démontage. Le composant réutilise maintenant la même référence liée pour l'attachement et le retrait.
16
+
17
+ Guide d'utilisation complet en commentaire en bas de `page-background.component.tsx` et `gradient-wave.component.tsx`.
18
+
19
+ ### Patch Changes
20
+
21
+ - c82f723: Corrige une série de dépendances manquantes/mal déclarées trouvées en débloquant la CI (l'installation était bloquée depuis fin août, masquant ces problèmes) :
22
+
23
+ - `esm-tenant` : `happy-dom` manquait alors que ses tests l'utilisent (ni dep, ni peerDep) → ajouté en devDependency.
24
+ - `esm-ai-tools` : `swr` est chargé via un `import()` dynamique dans `native/index.ts` mais n'était déclaré nulle part → ajouté en peerDependency (`2.x`, cohérent avec `esm-styleguide`/`esm-react-utils`/`esm-framework`).
25
+ - `esm-api`, `esm-data-api` : `rxjs` utilisé au runtime mais absent de peerDependencies → ajouté (`7.x`).
26
+ - `esm-navigation`, `esm-styleguide`, `esm-react-utils` : `single-spa` utilisé au runtime mais absent de peerDependencies → ajouté (`6.x`).
27
+ - `esm-extensions` : `react` utilisé au runtime mais absent de peerDependencies → ajouté (`18.x`).
28
+ - `esm-ai-framework` : `framework.test.ts` faisait `require('@egen-civitas/esm-ai-tools')` en plein milieu du corps de 3 tests (au lieu d'un import statique en haut de fichier) — ce require contournait le mock de `@egen-civitas/esm-styleguide` et déclenchait une résolution Node native qui tentait de charger pour de vrai des fichiers `.module.scss` compilés (`Unknown file extension ".scss"`). Remplacé par un import statique de `hasTool`/`getTool`/`overrideTool`, et ajout d'un `vi.mock('@egen-civitas/esm-styleguide', ...)` en tête de fichier (même pattern déjà utilisé dans `esm-ai-tools/src/native/native.test.ts`).
29
+
30
+ Tous les fixes vérifiés par reproduction isolée réelle (installation + exécution effective des tests concernés), pas seulement par lecture de code.
31
+
32
+ - Updated dependencies [4e5e0a1]
33
+ - Updated dependencies [c82f723]
34
+ - @egen-civitas/esm-react-utils@1.0.3
35
+ - @egen-civitas/esm-api@1.1.1
36
+ - @egen-civitas/esm-data-api@1.0.2
37
+ - @egen-civitas/esm-extensions@1.0.2
38
+ - @egen-civitas/esm-navigation@1.0.2
@@ -0,0 +1,44 @@
1
+ /** @category Content Section */
2
+ import React from 'react';
3
+ export interface ContentSectionProps {
4
+ /** Identifiant HTML de la section (ancre, `aria-labelledby`...). */
5
+ id?: string;
6
+ /** Balise racine du composant. @default 'section' */
7
+ as?: 'section' | 'div' | 'aside';
8
+ /** Habillage visuel. @default 'transparent' */
9
+ variant?: 'transparent' | 'panel';
10
+ /** Titre de la section. Omis (avec description et actions) : aucun en-tête n'est rendu. */
11
+ title?: React.ReactNode;
12
+ /** Niveau de titre HTML. @default 'h2' */
13
+ titleAs?: 'h2' | 'h3';
14
+ /** Texte ou contenu descriptif sous le titre. */
15
+ description?: React.ReactNode;
16
+ /** Contenu aligné à droite du titre (bouton « Voir tout », filtre...). */
17
+ actions?: React.ReactNode;
18
+ /** Libellé d'accessibilité, si le titre visuel ne suffit pas à décrire la section. */
19
+ ariaLabel?: string;
20
+ /** Retire le padding et l'habillage du variant `panel`. @default false */
21
+ bare?: boolean;
22
+ /** Classe additionnelle sur la racine. */
23
+ className?: string;
24
+ children?: React.ReactNode;
25
+ }
26
+ /**
27
+ * Squelette réutilisable pour une section de contenu de page : un titre
28
+ * optionnel, une description optionnelle, un slot d'actions optionnel
29
+ * (ex. « Voir tout ») et une zone de contenu libre.
30
+ *
31
+ * Factorise le motif titre/description/actions/contenu que chaque section
32
+ * d'une page réécrivait à la main. Entièrement personnalisable :
33
+ * - `as` change la balise racine (`section` par défaut, `div`/`aside` pour une
34
+ * zone qui n'est pas sémantiquement une section de page, ex. un panneau latéral).
35
+ * - `variant` change l'habillage : `transparent` (par défaut, posé directement
36
+ * sur le fond de la page) ou `panel` (carte vitrée).
37
+ * - `titleAs` change le niveau de titre HTML (`h2` par défaut).
38
+ * - `actions` reçoit n'importe quel contenu (bouton, lien, menu...), aligné
39
+ * à droite du titre.
40
+ * - `bare` retire le padding et l'habillage du variant `panel`, pour les
41
+ * sections qui gèrent elles-mêmes leur mise en page interne.
42
+ */
43
+ export declare function ContentSection({ id, as, variant, title, titleAs, description, actions, ariaLabel, bare, className, children, }: ContentSectionProps): React.JSX.Element;
44
+ //# sourceMappingURL=content-section.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-section.component.d.ts","sourceRoot":"","sources":["../../src/content-section/content-section.component.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,EAAc,EACd,OAAuB,EACvB,KAAK,EACL,OAAc,EACd,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAY,EACZ,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,qBA8BrB"}
@@ -0,0 +1,90 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** @category Content Section */ import React from "react";
3
+ import styles from "./content-section.module.scss";
4
+ /**
5
+ * Squelette réutilisable pour une section de contenu de page : un titre
6
+ * optionnel, une description optionnelle, un slot d'actions optionnel
7
+ * (ex. « Voir tout ») et une zone de contenu libre.
8
+ *
9
+ * Factorise le motif titre/description/actions/contenu que chaque section
10
+ * d'une page réécrivait à la main. Entièrement personnalisable :
11
+ * - `as` change la balise racine (`section` par défaut, `div`/`aside` pour une
12
+ * zone qui n'est pas sémantiquement une section de page, ex. un panneau latéral).
13
+ * - `variant` change l'habillage : `transparent` (par défaut, posé directement
14
+ * sur le fond de la page) ou `panel` (carte vitrée).
15
+ * - `titleAs` change le niveau de titre HTML (`h2` par défaut).
16
+ * - `actions` reçoit n'importe quel contenu (bouton, lien, menu...), aligné
17
+ * à droite du titre.
18
+ * - `bare` retire le padding et l'habillage du variant `panel`, pour les
19
+ * sections qui gèrent elles-mêmes leur mise en page interne.
20
+ */ export function ContentSection({ id, as = 'section', variant = 'transparent', title, titleAs = 'h2', description, actions, ariaLabel, bare = false, className, children }) {
21
+ const Root = as;
22
+ const TitleTag = titleAs;
23
+ const hasHeader = Boolean(title || description || actions);
24
+ return /*#__PURE__*/ _jsxs(Root, {
25
+ id: id,
26
+ "aria-label": ariaLabel,
27
+ className: [
28
+ styles.root,
29
+ variant === 'panel' ? styles.panel : styles.transparent,
30
+ bare && variant === 'panel' ? styles.bare : '',
31
+ className ?? ''
32
+ ].filter(Boolean).join(' '),
33
+ children: [
34
+ hasHeader && /*#__PURE__*/ _jsxs("div", {
35
+ className: styles.header,
36
+ children: [
37
+ /*#__PURE__*/ _jsxs("div", {
38
+ className: styles.headerText,
39
+ children: [
40
+ title && /*#__PURE__*/ _jsx(TitleTag, {
41
+ className: styles.title,
42
+ children: title
43
+ }),
44
+ description && /*#__PURE__*/ _jsx("p", {
45
+ className: styles.description,
46
+ children: description
47
+ })
48
+ ]
49
+ }),
50
+ actions && /*#__PURE__*/ _jsx("div", {
51
+ className: styles.actions,
52
+ children: actions
53
+ })
54
+ ]
55
+ }),
56
+ /*#__PURE__*/ _jsx("div", {
57
+ className: styles.body,
58
+ children: children
59
+ })
60
+ ]
61
+ });
62
+ } /* ============================================================================
63
+ * GUIDE D'UTILISATION — ContentSection
64
+ * ============================================================================
65
+ * Section simple, posée sur le fond de la page :
66
+ *
67
+ * <ContentSection title="À la une">
68
+ * <HeroMosaic mainTile={...} secondaryTiles={...} onSelectTile={...} />
69
+ * </ContentSection>
70
+ *
71
+ * Section avec description et action à droite :
72
+ *
73
+ * <ContentSection
74
+ * title="Actualités"
75
+ * description="Les dernières publications de l'organisation."
76
+ * actions={<button onClick={...}>Voir tout</button>}
77
+ * >
78
+ * <BlogSection articles={articles} />
79
+ * </ContentSection>
80
+ *
81
+ * Carte vitrée (panneau latéral) :
82
+ *
83
+ * <ContentSection as="div" variant="panel" title="Raccourcis" bare>
84
+ * <QuickLinks items={items} onSelectItem={...} />
85
+ * </ContentSection>
86
+ *
87
+ * Omettre `title`, `description` et `actions` rend uniquement le conteneur et
88
+ * son contenu, sans en-tête — utile quand le composant enfant affiche déjà
89
+ * son propre titre (cas de TeamCalendar et DocumentList).
90
+ * ==========================================================================*/
@@ -0,0 +1,70 @@
1
+ .root {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+
7
+ .transparent {
8
+ gap: 0.75rem;
9
+ }
10
+
11
+ .panel {
12
+ gap: 0.75rem;
13
+ padding: 1.25rem;
14
+ border-radius: 0;
15
+ background: rgba(0, 0, 0, 0.4);
16
+ backdrop-filter: blur(20px);
17
+ -webkit-backdrop-filter: blur(20px);
18
+ border: 1px solid rgba(255, 255, 255, 0.1);
19
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
20
+ }
21
+
22
+ .panel.bare {
23
+ padding: 0;
24
+ background: transparent;
25
+ backdrop-filter: none;
26
+ -webkit-backdrop-filter: none;
27
+ border: none;
28
+ box-shadow: none;
29
+ }
30
+
31
+ .header {
32
+ display: flex;
33
+ align-items: flex-start;
34
+ justify-content: space-between;
35
+ gap: 1rem;
36
+ }
37
+
38
+ .headerText {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: 0.375rem;
42
+ min-width: 0;
43
+ }
44
+
45
+ .title {
46
+ margin: 0;
47
+ font-weight: 300;
48
+ letter-spacing: -0.01em;
49
+ color: #fff;
50
+ font-size: 1.5rem;
51
+ line-height: 1.25;
52
+ }
53
+
54
+ .description {
55
+ margin: 0;
56
+ font-size: 0.875rem;
57
+ line-height: 1.5;
58
+ color: rgba(255, 255, 255, 0.65);
59
+ max-width: 48rem;
60
+ }
61
+
62
+ .actions {
63
+ flex-shrink: 0;
64
+ }
65
+
66
+ .body {
67
+ display: flex;
68
+ flex-direction: column;
69
+ min-width: 0;
70
+ }
@@ -0,0 +1,2 @@
1
+ export { ContentSection, type ContentSectionProps } from './content-section.component.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content-section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1 @@
1
+ export { ContentSection } from "./content-section.component.js";
@@ -0,0 +1,15 @@
1
+ /** @category Hero Mosaic */
2
+ import React from 'react';
3
+ import { type HeroTile } from './hero-tile-card.component.js';
4
+ export interface HeroMosaicProps {
5
+ mainTile: HeroTile;
6
+ /** Jusqu'à 4 tuiles secondaires, affichées en grille 2×2 à droite/en dessous. */
7
+ secondaryTiles: HeroTile[];
8
+ onSelectTile: (tile: HeroTile) => void;
9
+ }
10
+ /**
11
+ * Grille « À la une » : une tuile principale et jusqu'à quatre tuiles
12
+ * secondaires, toutes fournies par l'appelant (`mainTile`, `secondaryTiles`).
13
+ */
14
+ export declare function HeroMosaic({ mainTile, secondaryTiles, onSelectTile }: HeroMosaicProps): React.JSX.Element;
15
+ //# sourceMappingURL=hero-mosaic.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hero-mosaic.component.d.ts","sourceRoot":"","sources":["../../src/hero-mosaic/hero-mosaic.component.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAG5E,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,iFAAiF;IACjF,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC3B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,eAAe,qBASrF"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** @category Hero Mosaic */ import React from "react";
3
+ import { HeroTileCard } from "./hero-tile-card.component.js";
4
+ import styles from "./hero-mosaic.module.scss";
5
+ /**
6
+ * Grille « À la une » : une tuile principale et jusqu'à quatre tuiles
7
+ * secondaires, toutes fournies par l'appelant (`mainTile`, `secondaryTiles`).
8
+ */ export function HeroMosaic({ mainTile, secondaryTiles, onSelectTile }) {
9
+ return /*#__PURE__*/ _jsxs("div", {
10
+ className: styles.grid,
11
+ children: [
12
+ /*#__PURE__*/ _jsx(HeroTileCard, {
13
+ tile: mainTile,
14
+ size: "large",
15
+ onSelect: onSelectTile
16
+ }),
17
+ secondaryTiles.slice(0, 4).map((tile)=>/*#__PURE__*/ _jsx(HeroTileCard, {
18
+ tile: tile,
19
+ size: "medium",
20
+ onSelect: onSelectTile
21
+ }, tile.id))
22
+ ]
23
+ });
24
+ } /* ============================================================================
25
+ * GUIDE D'UTILISATION — HeroMosaic
26
+ * ============================================================================
27
+ * <ContentSection title="À la une">
28
+ * <HeroMosaic
29
+ * mainTile={{ id: '1', title: '...', imageUrl: '...', linkText: 'Lire →' }}
30
+ * secondaryTiles={[{ id: '2', title: '...', imageUrl: '...' }, ...]}
31
+ * onSelectTile={(tile) => navigate(`/actualites/${tile.id}`)}
32
+ * />
33
+ * </ContentSection>
34
+ *
35
+ * `secondaryTiles` : les 4 premières sont affichées, le reste est ignoré
36
+ * (mosaïque à 5 emplacements fixes).
37
+ * ==========================================================================*/
@@ -0,0 +1,124 @@
1
+ .grid {
2
+ width: 100%;
3
+ display: grid;
4
+ grid-template-columns: repeat(12, 1fr);
5
+ gap: 0.375rem;
6
+ grid-auto-rows: 1fr;
7
+
8
+ @media (max-width: 767px) {
9
+ grid-template-columns: 1fr;
10
+ }
11
+ @media (min-width: 768px) and (max-width: 1023px) {
12
+ grid-template-columns: repeat(2, 1fr);
13
+ }
14
+ }
15
+
16
+ .tile {
17
+ position: relative;
18
+ overflow: hidden;
19
+ cursor: pointer;
20
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
21
+ border: 1px solid rgba(255, 255, 255, 0.1);
22
+ background: #0f172a;
23
+ display: flex;
24
+ flex-direction: column;
25
+ justify-content: flex-end;
26
+
27
+ &:focus-visible {
28
+ outline: 2px solid #14b8a6;
29
+ outline-offset: 2px;
30
+ }
31
+ }
32
+
33
+ .tileLarge {
34
+ grid-column: span 6;
35
+ grid-row: span 2;
36
+ min-height: 280px;
37
+
38
+ @media (min-width: 640px) {
39
+ min-height: 340px;
40
+ }
41
+ @media (max-width: 1023px) {
42
+ grid-column: 1 / -1;
43
+ }
44
+ }
45
+
46
+ .tileMedium {
47
+ grid-column: span 3;
48
+ grid-row: span 1;
49
+ min-height: 160px;
50
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
51
+
52
+ @media (max-width: 1023px) {
53
+ grid-column: span 1;
54
+ }
55
+ }
56
+
57
+ .tileImage {
58
+ position: absolute;
59
+ inset: 0;
60
+ width: 100%;
61
+ height: 100%;
62
+ object-fit: cover;
63
+ object-position: center;
64
+ transition: transform 0.7s ease-out;
65
+
66
+ .tile:hover & {
67
+ transform: scale(1.05);
68
+ }
69
+ }
70
+
71
+ .tileGradient {
72
+ position: absolute;
73
+ inset: 0;
74
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35), transparent);
75
+
76
+ .tileMedium & {
77
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), transparent);
78
+ }
79
+ }
80
+
81
+ .tileContent {
82
+ position: relative;
83
+ z-index: 1;
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: 0.375rem;
87
+ padding: 0.875rem;
88
+
89
+ .tileLarge & {
90
+ padding: 1.25rem 1.5rem;
91
+ }
92
+ }
93
+
94
+ .tileTitleLarge {
95
+ margin: 0;
96
+ color: #fff;
97
+ font-weight: 700;
98
+ line-height: 1.2;
99
+ font-size: 1.25rem;
100
+ text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
101
+
102
+ @media (min-width: 1024px) {
103
+ font-size: 1.75rem;
104
+ }
105
+ }
106
+
107
+ .tileTitleMedium {
108
+ margin: 0;
109
+ color: #fff;
110
+ font-weight: 700;
111
+ line-height: 1.35;
112
+ font-size: 0.8125rem;
113
+ text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
114
+ display: -webkit-box;
115
+ -webkit-line-clamp: 3;
116
+ -webkit-box-orient: vertical;
117
+ overflow: hidden;
118
+ }
119
+
120
+ .tileLink {
121
+ font-size: 0.875rem;
122
+ font-weight: 600;
123
+ color: #5eead4;
124
+ }
@@ -0,0 +1,23 @@
1
+ /** @category Hero Mosaic */
2
+ import React from 'react';
3
+ /** Une tuile de la mosaïque « À la une ». */
4
+ export interface HeroTile {
5
+ id: string;
6
+ title: string;
7
+ imageUrl: string;
8
+ /** Texte du lien d'action — uniquement affiché sur la tuile 'large'. */
9
+ linkText?: string;
10
+ }
11
+ export interface HeroTileCardProps {
12
+ tile: HeroTile;
13
+ size: 'large' | 'medium';
14
+ onSelect: (tile: HeroTile) => void;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Carte individuelle de la mosaïque « À la une ». Reçoit sa tuile et sa taille
19
+ * en props : une seule carte réutilisable pour toutes les tuiles, au lieu de
20
+ * cinq blocs JSX quasi identiques dupliqués à la main.
21
+ */
22
+ export declare function HeroTileCard({ tile, size, onSelect, className }: HeroTileCardProps): React.JSX.Element;
23
+ //# sourceMappingURL=hero-tile-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hero-tile-card.component.d.ts","sourceRoot":"","sources":["../../src/hero-mosaic/hero-tile-card.component.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,6CAA6C;AAC7C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,qBA+BlF"}
@@ -0,0 +1,62 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /** @category Hero Mosaic */ import React from "react";
3
+ import { motion } from "framer-motion";
4
+ import styles from "./hero-mosaic.module.scss";
5
+ /**
6
+ * Carte individuelle de la mosaïque « À la une ». Reçoit sa tuile et sa taille
7
+ * en props : une seule carte réutilisable pour toutes les tuiles, au lieu de
8
+ * cinq blocs JSX quasi identiques dupliqués à la main.
9
+ */ export function HeroTileCard({ tile, size, onSelect, className }) {
10
+ return /*#__PURE__*/ _jsxs(motion.div, {
11
+ whileHover: {
12
+ scale: size === 'large' ? 1.008 : 1.012
13
+ },
14
+ transition: {
15
+ duration: 0.2
16
+ },
17
+ onClick: ()=>onSelect(tile),
18
+ role: "button",
19
+ tabIndex: 0,
20
+ onKeyDown: (e)=>{
21
+ if (e.key === 'Enter' || e.key === ' ') {
22
+ // Sans preventDefault, la barre d'espace fait aussi défiler la page.
23
+ e.preventDefault();
24
+ onSelect(tile);
25
+ }
26
+ },
27
+ className: [
28
+ styles.tile,
29
+ size === 'large' ? styles.tileLarge : styles.tileMedium,
30
+ className ?? ''
31
+ ].join(' '),
32
+ children: [
33
+ /*#__PURE__*/ _jsx("img", {
34
+ src: tile.imageUrl,
35
+ alt: tile.title,
36
+ className: styles.tileImage,
37
+ referrerPolicy: "no-referrer"
38
+ }),
39
+ /*#__PURE__*/ _jsx("div", {
40
+ className: styles.tileGradient
41
+ }),
42
+ /*#__PURE__*/ _jsx("div", {
43
+ className: styles.tileContent,
44
+ children: size === 'large' ? /*#__PURE__*/ _jsxs(_Fragment, {
45
+ children: [
46
+ /*#__PURE__*/ _jsx("h3", {
47
+ className: styles.tileTitleLarge,
48
+ children: tile.title
49
+ }),
50
+ /*#__PURE__*/ _jsx("span", {
51
+ className: styles.tileLink,
52
+ children: tile.linkText ?? 'En savoir plus →'
53
+ })
54
+ ]
55
+ }) : /*#__PURE__*/ _jsx("h4", {
56
+ className: styles.tileTitleMedium,
57
+ children: tile.title
58
+ })
59
+ })
60
+ ]
61
+ });
62
+ }
@@ -0,0 +1,3 @@
1
+ export { HeroMosaic, type HeroMosaicProps } from './hero-mosaic.component.js';
2
+ export { HeroTileCard, type HeroTile, type HeroTileCardProps } from './hero-tile-card.component.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hero-mosaic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { HeroMosaic } from "./hero-mosaic.component.js";
2
+ export { HeroTileCard } from "./hero-tile-card.component.js";
@@ -17,6 +17,7 @@ export * from './notifications/index.js';
17
17
  export * from './notifications/actionable-notification.component.js';
18
18
  export * from './notifications/notification.component.js';
19
19
  export * from './numeric-datapoint/numeric-datapoint.component.js';
20
+ export * from './page-background/index.js';
20
21
  export * from './page-header/index.js';
21
22
  export * from './pagination/index.js';
22
23
  export * from './entity-banner/index.js';
@@ -40,4 +41,7 @@ export * from './master-detail/index.js';
40
41
  export * from './dialogs/index.js';
41
42
  export * from './selections/index.js';
42
43
  export * from './carousel/index.js';
44
+ export * from './content-section/index.js';
45
+ export * from './hero-mosaic/index.js';
46
+ export * from './top-bar/index.js';
43
47
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oDAAoD,CAAC;AACnE,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uDAAuD,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uDAAuD,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC"}
package/dist/internal.js CHANGED
@@ -17,6 +17,7 @@ export * from "./notifications/index.js";
17
17
  export * from "./notifications/actionable-notification.component.js";
18
18
  export * from "./notifications/notification.component.js";
19
19
  export * from "./numeric-datapoint/numeric-datapoint.component.js";
20
+ export * from "./page-background/index.js";
20
21
  export * from "./page-header/index.js";
21
22
  export * from "./pagination/index.js";
22
23
  export * from "./entity-banner/index.js";
@@ -40,3 +41,6 @@ export * from "./master-detail/index.js";
40
41
  export * from "./dialogs/index.js";
41
42
  export * from "./selections/index.js";
42
43
  export * from "./carousel/index.js";
44
+ export * from "./content-section/index.js";
45
+ export * from "./hero-mosaic/index.js";
46
+ export * from "./top-bar/index.js";
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ export interface GradientWaveProps {
3
+ colors?: string[];
4
+ isPlaying?: boolean;
5
+ className?: string;
6
+ shadowPower?: number;
7
+ darkenTop?: boolean;
8
+ noiseSpeed?: number;
9
+ noiseFrequency?: [number, number];
10
+ deform?: {
11
+ incline?: number;
12
+ offsetTop?: number;
13
+ offsetBottom?: number;
14
+ noiseFreq?: [number, number];
15
+ noiseAmp?: number;
16
+ noiseSpeed?: number;
17
+ noiseFlow?: number;
18
+ noiseSeed?: number;
19
+ };
20
+ }
21
+ export declare function GradientWave({ colors, isPlaying, className, shadowPower, darkenTop, noiseSpeed, noiseFrequency, deform, }: GradientWaveProps): React.JSX.Element;
22
+ //# sourceMappingURL=gradient-wave.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradient-wave.component.d.ts","sourceRoot":"","sources":["../../src/page-background/gradient-wave.component.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA4B,MAAM,OAAO,CAAC;AA6qBjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAA2E,EAC3E,SAAgB,EAChB,SAAc,EACd,WAAe,EACf,SAAiB,EACjB,UAAoB,EACpB,cAAiC,EACjC,MAAsD,GACvD,EAAE,iBAAiB,qBAqEnB"}