@egen-civitas/esm-styleguide 1.17.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @egen-civitas/esm-styleguide
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d5c883a: Zones : l'en-tête expose un emplacement d'actions entre le titre et le bouton de fermeture, alimenté par le composant `ToolWindowHeader` (portail) depuis le contenu d'une fenêtre d'outils. Rendu sur place hors zone.
8
+
9
+ ## 2.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - b8a56e7: Suppression complète de l'ancienne barre latérale (sidebar) : plus aucune app ne peut la monter. La navigation passe par les rails et zones du shell (`shell-rail-left-slot`, `shell-rail-bottom-slot`, `shell-rail-right-slot`) et la TopBar niveau 2 (`topbar-level2-nav`).
14
+
15
+ Retirés : `LeftNavMenu`, `setLeftNav`, `unsetLeftNav`, `SetLeftNavParams`, `LeftNavStore`, `useLeftNav`, `useLeftNavStore`, `DashboardExtension`, `createDashboard` (lien de sidebar), la variable `--egen-sidenav-width`, les styles `.cds--side-nav*` / `.active-left-nav-link`, la clé de traduction `leftNavigation` et les alias `side-nav` / `sidenav` de `esm-ai-tools`.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [b8a56e7]
20
+ - @egen-civitas/esm-react-utils@2.0.0
21
+ - @egen-civitas/esm-extensions@2.0.0
22
+ - @egen-civitas/esm-translations@1.0.2
23
+ - @egen-civitas/esm-routes@1.0.3
24
+
3
25
  ## 1.17.0
4
26
 
5
27
  ### Minor Changes
@@ -33,16 +33,6 @@
33
33
  border-right: none;
34
34
  }
35
35
 
36
- .cds--side-nav__overlay-active {
37
- display: none;
38
- }
39
-
40
- /* Side nav */
41
- .cds--side-nav {
42
- overflow: auto;
43
- z-index: 0;
44
- }
45
-
46
36
  /* Tooltip */
47
37
  .cds--tooltip--definition .cds--tooltip__trigger {
48
38
  border-bottom: none;
@@ -676,32 +666,6 @@ html[dir='rtl'] {
676
666
  }
677
667
  }
678
668
 
679
- .active-left-nav-link {
680
- border-right: layout.$spacing-02 solid var(--brand-01);
681
- border-left: unset !important;
682
- }
683
-
684
- .egen-breakpoint-gt-tablet {
685
- main {
686
- & > section {
687
- margin-left: unset;
688
- margin-right: var(--egen-sidenav-width);
689
-
690
- nav {
691
- left: calc(100vw - var(--egen-sidenav-width));
692
- border-left: 1px solid var(--colors-border-default, #e0e0e0);
693
- border-right: unset;
694
- }
695
- }
696
- }
697
- }
698
-
699
- .egen-breakpoint-lt-desktop {
700
- .cds--side-nav {
701
- left: unset !important;
702
- }
703
- }
704
-
705
669
  .form-container {
706
670
  .tab-container {
707
671
  .tab {
package/dist/_vars.scss CHANGED
@@ -5,7 +5,7 @@
5
5
  //
6
6
  // Ces ~25 variables SCSS étaient des couleurs Carbon v10 (thème clair OpenMRS)
7
7
  // figées en hexadécimal, consommées par ~15 fichiers du styleguide
8
- // (pagination, datepicker, cards, left-nav, entity-banner, workspaces,
8
+ // (pagination, datepicker, cards, entity-banner, workspaces,
9
9
  // canvas, breadcrumbs, overrides...) ET par des apps entières
10
10
  // (esm-implementer-tools-app). Modifier colors.* dans theme.default.json
11
11
  // n'avait donc aucun effet sur tout ce qui en dépendait.
@@ -1,14 +1,13 @@
1
1
  @use '@carbon/layout';
2
2
 
3
3
  :root {
4
- --egen-sidenav-width: 16rem;
5
4
  --egen-offline-banner-height: 0;
6
5
  --egen-navbar-height: #{layout.$spacing-09};
7
6
  // Hauteur réelle du footer (0 tant qu'il n'est pas monté / sur routes publiques),
8
7
  // mesurée en direct par le shell (layout-sync.ts).
9
8
  --egen-footer-height: 0px;
10
9
  // Niveau d'empilement partagé par la TopBar et le Footer : au-dessus de tout le
11
- // contenu applicatif, de la side-nav Carbon (8000) et des rails tablette
10
+ // contenu applicatif et des rails tablette
12
11
  // (8003), sous les modales/toasts.
13
12
  --egen-shell-bar-z-index: 8100;
14
13
  --egen-topnav-height: var(--egen-navbar-height);
@@ -23,9 +22,7 @@
23
22
  --egen-offline-banner-height: #{layout.$spacing-06};
24
23
  --egen-topnav-height: 4.5rem;
25
24
 
26
- .cds--side-nav,
27
- .cds--header-panel--expanded,
28
- .cds--side-nav__overlay {
25
+ .cds--header-panel--expanded {
29
26
  top: var(--egen-topnav-height);
30
27
  }
31
28
  }
@@ -30,18 +30,6 @@
30
30
  backdrop-filter: var(--panel-xs-backdrop-filter);
31
31
  }
32
32
 
33
- // ── Side Nav (leftNav) ───────────────────────────────────────────────────────
34
- .cds--side-nav {
35
- @include panel.panel-sidebar;
36
- }
37
-
38
- .cds--side-nav__item--active .cds--side-nav__link,
39
- .cds--side-nav__link:hover {
40
- background: var(--colors-surface-translucent-hover) !important;
41
- backdrop-filter: var(--panel-xs-backdrop-filter);
42
- border-radius: var(--border-radius-md);
43
- }
44
-
45
33
  // ── Modals ───────────────────────────────────────────────────────────────────
46
34
  .cds--modal-container {
47
35
  @include panel.panel-surface('modal');
@@ -3,14 +3,12 @@ export * from './cards/index.js';
3
3
  export * from './config-schema.js';
4
4
  export * from './data-table-batch-actions/index.js';
5
5
  export * from './custom-overflow-menu/index.js';
6
- export * from './dashboard-extension/index.js';
7
6
  export * from './datepicker/index.js';
8
7
  export * from './classification-tags/index.js';
9
8
  export * from './empty-card/index.js';
10
9
  export * from './error-state/index.js';
11
10
  export * from './fields/index.js';
12
11
  export * from './icons/icons.js';
13
- export * from './left-nav/index.js';
14
12
  export * from './location-picker/index.js';
15
13
  export * from './modals/index.js';
16
14
  export * from './notifications/index.js';
@@ -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;AA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B,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
package/dist/internal.js CHANGED
@@ -3,14 +3,12 @@ export * from "./cards/index.js";
3
3
  export * from "./config-schema.js";
4
4
  export * from "./data-table-batch-actions/index.js";
5
5
  export * from "./custom-overflow-menu/index.js";
6
- export * from "./dashboard-extension/index.js";
7
6
  export * from "./datepicker/index.js";
8
7
  export * from "./classification-tags/index.js";
9
8
  export * from "./empty-card/index.js";
10
9
  export * from "./error-state/index.js";
11
10
  export * from "./fields/index.js";
12
11
  export * from "./icons/icons.js";
13
- export * from "./left-nav/index.js";
14
12
  export * from "./location-picker/index.js";
15
13
  export * from "./modals/index.js";
16
14
  export * from "./notifications/index.js";
package/dist/public.d.ts CHANGED
@@ -2,14 +2,12 @@ export { type StyleguideConfigObject } from './config-schema.js';
2
2
  export * from './cards/index.js';
3
3
  export * from './custom-overflow-menu/index.js';
4
4
  export * from './data-table-batch-actions/index.js';
5
- export * from './dashboard-extension/index.js';
6
5
  export * from './datepicker/index.js';
7
6
  export * from './classification-tags/index.js';
8
7
  export * from './empty-card/index.js';
9
8
  export * from './error-state/index.js';
10
9
  export * from './fields/index.js';
11
10
  export * from './icons/icons.js';
12
- export * from './left-nav/index.js';
13
11
  export * from './location-picker/index.js';
14
12
  export * from './numeric-datapoint/index.js';
15
13
  export * from './page-background/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,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;AA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cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAChC,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,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/public.js CHANGED
@@ -1,14 +1,12 @@
1
1
  export * from "./cards/index.js";
2
2
  export * from "./custom-overflow-menu/index.js";
3
3
  export * from "./data-table-batch-actions/index.js";
4
- export * from "./dashboard-extension/index.js";
5
4
  export * from "./datepicker/index.js";
6
5
  export * from "./classification-tags/index.js";
7
6
  export * from "./empty-card/index.js";
8
7
  export * from "./error-state/index.js";
9
8
  export * from "./fields/index.js";
10
9
  export * from "./icons/icons.js";
11
- export * from "./left-nav/index.js";
12
10
  export * from "./location-picker/index.js";
13
11
  export * from "./numeric-datapoint/index.js";
14
12
  export * from "./page-background/index.js";
@@ -2,6 +2,7 @@ export * from './use-active-app-modules.js';
2
2
  export * from './use-tool-windows.js';
3
3
  export * from './tool-window-rail.component.js';
4
4
  export * from './tool-window-zone.component.js';
5
+ export * from './tool-window-header.component.js';
5
6
  export * from './splitter.component.js';
6
7
  export * from './workbench-icons.js';
7
8
  export * from './workbench.render.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workbench/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workbench/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
@@ -2,6 +2,7 @@ export * from "./use-active-app-modules.js";
2
2
  export * from "./use-tool-windows.js";
3
3
  export * from "./tool-window-rail.component.js";
4
4
  export * from "./tool-window-zone.component.js";
5
+ export * from "./tool-window-header.component.js";
5
6
  export * from "./splitter.component.js";
6
7
  export * from "./workbench-icons.js";
7
8
  export * from "./workbench.render.js";
@@ -0,0 +1,17 @@
1
+ import React, { type ReactNode } from 'react';
2
+ /** Attribut de l'emplacement d'en-tête d'une zone (entre le titre et le bouton de fermeture). */
3
+ export declare const TOOL_WINDOW_HEADER_ATTRIBUTE = "data-tool-window-header";
4
+ export interface ToolWindowHeaderProps {
5
+ /** Actions et contrôles de la fenêtre d'outils (boutons, recherche, filtres…). */
6
+ children: ReactNode;
7
+ }
8
+ /**
9
+ * Place `children` dans l'en-tête de la zone qui affiche la fenêtre d'outils, à droite du titre et à
10
+ * gauche du bouton de fermeture : la fenêtre n'a ainsi pas à réserver une barre d'outils dans son
11
+ * propre contenu. Les enfants restent rendus par la fenêtre (son état, ses contextes et ses
12
+ * gestionnaires d'événements) ; seul leur emplacement dans le DOM change.
13
+ *
14
+ * Hors d'une zone (Storybook, tests, rendu autonome), les enfants sont rendus sur place.
15
+ */
16
+ export declare function ToolWindowHeader({ children }: ToolWindowHeaderProps): React.JSX.Element;
17
+ //# sourceMappingURL=tool-window-header.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-window-header.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-header.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjF,iGAAiG;AACjG,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,qBAgBnE"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React, { useLayoutEffect, useRef, useState } from "react";
3
+ import { createPortal } from "react-dom";
4
+ /** Attribut de l'emplacement d'en-tête d'une zone (entre le titre et le bouton de fermeture). */ export const TOOL_WINDOW_HEADER_ATTRIBUTE = 'data-tool-window-header';
5
+ /**
6
+ * Place `children` dans l'en-tête de la zone qui affiche la fenêtre d'outils, à droite du titre et à
7
+ * gauche du bouton de fermeture : la fenêtre n'a ainsi pas à réserver une barre d'outils dans son
8
+ * propre contenu. Les enfants restent rendus par la fenêtre (son état, ses contextes et ses
9
+ * gestionnaires d'événements) ; seul leur emplacement dans le DOM change.
10
+ *
11
+ * Hors d'une zone (Storybook, tests, rendu autonome), les enfants sont rendus sur place.
12
+ */ export function ToolWindowHeader({ children }) {
13
+ const markerRef = useRef(null);
14
+ // undefined : pas encore résolu · null : hors zone (rendu sur place) · élément : emplacement de la zone.
15
+ const [slot, setSlot] = useState(undefined);
16
+ useLayoutEffect(()=>{
17
+ const zone = markerRef.current?.closest('aside[data-anchor]');
18
+ setSlot(zone?.querySelector(`[${TOOL_WINDOW_HEADER_ATTRIBUTE}]`) ?? null);
19
+ }, []);
20
+ return /*#__PURE__*/ _jsxs(_Fragment, {
21
+ children: [
22
+ /*#__PURE__*/ _jsx("span", {
23
+ ref: markerRef,
24
+ hidden: true
25
+ }),
26
+ slot === undefined ? null : slot === null ? children : /*#__PURE__*/ createPortal(children, slot)
27
+ ]
28
+ });
29
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwF,MAAM,OAAO,CAAC;AAC7G,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAuCxF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBA0F7D"}
1
+ {"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwF,MAAM,OAAO,CAAC;AAC7G,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAwCxF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBA4F7D"}
@@ -4,6 +4,7 @@ import { TOOL_WINDOW_SLOTS } from "@egen-civitas/esm-extensions";
4
4
  import { ComponentContext, ExtensionSlot, useStore } from "@egen-civitas/esm-react-utils";
5
5
  import { X } from "lucide-react";
6
6
  import { Splitter } from "./splitter.component.js";
7
+ import { TOOL_WINDOW_HEADER_ATTRIBUTE } from "./tool-window-header.component.js";
7
8
  import { toolWindowTitle, useToolWindows } from "./use-tool-windows.js";
8
9
  import { closeToolWindow, workbenchStore } from "./workbench.store.js";
9
10
  import styles from "./workbench.module.scss";
@@ -109,6 +110,10 @@ const EXIT_CLASS = {
109
110
  className: styles.zoneTitle,
110
111
  children: title
111
112
  }),
113
+ /*#__PURE__*/ _jsx("div", {
114
+ className: styles.zoneHeaderTools,
115
+ [TOOL_WINDOW_HEADER_ATTRIBUTE]: ''
116
+ }),
112
117
  /*#__PURE__*/ _jsx("button", {
113
118
  type: "button",
114
119
  className: styles.zoneClose,
@@ -164,6 +164,8 @@ $gap: var(--egen-workbench-gap, 0.375rem);
164
164
  }
165
165
 
166
166
  .zoneTitle {
167
+ flex: 0 1 auto;
168
+ max-width: 50%;
167
169
  margin: 0;
168
170
  overflow: hidden;
169
171
  font-size: 0.8125rem;
@@ -173,7 +175,24 @@ $gap: var(--egen-workbench-gap, 0.375rem);
173
175
  white-space: nowrap;
174
176
  }
175
177
 
178
+ .zoneHeaderTools {
179
+ display: flex;
180
+ flex: 1 1 0;
181
+ align-items: center;
182
+ justify-content: flex-end;
183
+ gap: 0.375rem;
184
+ min-width: 0;
185
+ // Trop étroit : les actions défilent horizontalement plutôt que de repousser le titre ou la fermeture.
186
+ overflow-x: auto;
187
+ scrollbar-width: none;
188
+
189
+ &::-webkit-scrollbar {
190
+ display: none;
191
+ }
192
+ }
193
+
176
194
  .zoneClose {
195
+ flex: 0 0 auto;
177
196
  display: inline-flex;
178
197
  align-items: center;
179
198
  justify-content: center;
package/mock-jest.tsx CHANGED
@@ -78,6 +78,99 @@ export const ReportIcon = () => <span>ReportIcon</span>;
78
78
  export const ResetIcon = () => <span>ResetIcon</span>;
79
79
  export const SaveIcon = () => <span>SaveIcon</span>;
80
80
  export const SearchIcon = () => <span>SearchIcon</span>;
81
+
82
+ // Section skeleton stubs (header / body / footer rendered flat; no styling)
83
+ export const SectionAction = ({
84
+ children,
85
+ label,
86
+ active,
87
+ disabled,
88
+ href,
89
+ onClick,
90
+ }: {
91
+ children?: React.ReactNode;
92
+ label?: string;
93
+ active?: boolean;
94
+ disabled?: boolean;
95
+ href?: string;
96
+ onClick?: () => void;
97
+ }) =>
98
+ href ? (
99
+ <a href={href}>{children}</a>
100
+ ) : (
101
+ <button
102
+ type="button"
103
+ aria-label={children ? undefined : label}
104
+ aria-pressed={active || undefined}
105
+ disabled={disabled}
106
+ onClick={onClick}
107
+ >
108
+ {children}
109
+ </button>
110
+ );
111
+ export const SectionBody = ({ children }: { children?: React.ReactNode }) => <div>{children}</div>;
112
+ export const SectionDivider = () => <hr />;
113
+ export const SectionFooter = ({ children, actions }: { children?: React.ReactNode; actions?: React.ReactNode }) => (
114
+ <div>
115
+ {children}
116
+ {actions}
117
+ </div>
118
+ );
119
+ export const SectionGrid = ({ children }: { children?: React.ReactNode }) => <div>{children}</div>;
120
+ export const SectionHeader = ({
121
+ title,
122
+ actions,
123
+ children,
124
+ }: {
125
+ title?: React.ReactNode;
126
+ actions?: React.ReactNode;
127
+ children?: React.ReactNode;
128
+ }) => (
129
+ <div>
130
+ {children ?? (title ? <h2>{title}</h2> : null)}
131
+ {actions}
132
+ </div>
133
+ );
134
+ export const Section = Object.assign(
135
+ ({
136
+ title,
137
+ description,
138
+ actions,
139
+ header,
140
+ footer,
141
+ footerActions,
142
+ children,
143
+ }: {
144
+ title?: React.ReactNode;
145
+ description?: React.ReactNode;
146
+ actions?: React.ReactNode;
147
+ header?: React.ReactNode;
148
+ footer?: React.ReactNode;
149
+ footerActions?: React.ReactNode;
150
+ children?: React.ReactNode;
151
+ }) => (
152
+ <section>
153
+ {header ?? (title ? <h2>{title}</h2> : null)}
154
+ {description ? <p>{description}</p> : null}
155
+ {actions}
156
+ {children}
157
+ {footer || footerActions ? (
158
+ <div>
159
+ {footer}
160
+ {footerActions}
161
+ </div>
162
+ ) : null}
163
+ </section>
164
+ ),
165
+ {
166
+ Header: SectionHeader,
167
+ Body: SectionBody,
168
+ Footer: SectionFooter,
169
+ Divider: SectionDivider,
170
+ Action: SectionAction,
171
+ Grid: SectionGrid,
172
+ },
173
+ );
81
174
  export const ShoppingCartAddItemIcon = () => <span>ShoppingCartAddItemIcon</span>;
82
175
  export const ShoppingCartArrowDownIcon = () => <span>ShoppingCartArrowDownIcon</span>;
83
176
  export const ShoppingCartIcon = () => <span>ShoppingCartIcon</span>;
package/mock.tsx CHANGED
@@ -79,6 +79,99 @@ export const ReportIcon = () => <span>ReportIcon</span>;
79
79
  export const ResetIcon = () => <span>ResetIcon</span>;
80
80
  export const SaveIcon = () => <span>SaveIcon</span>;
81
81
  export const SearchIcon = () => <span>SearchIcon</span>;
82
+
83
+ // Section skeleton stubs (header / body / footer rendered flat; no styling)
84
+ export const SectionAction = ({
85
+ children,
86
+ label,
87
+ active,
88
+ disabled,
89
+ href,
90
+ onClick,
91
+ }: {
92
+ children?: React.ReactNode;
93
+ label?: string;
94
+ active?: boolean;
95
+ disabled?: boolean;
96
+ href?: string;
97
+ onClick?: () => void;
98
+ }) =>
99
+ href ? (
100
+ <a href={href}>{children}</a>
101
+ ) : (
102
+ <button
103
+ type="button"
104
+ aria-label={children ? undefined : label}
105
+ aria-pressed={active || undefined}
106
+ disabled={disabled}
107
+ onClick={onClick}
108
+ >
109
+ {children}
110
+ </button>
111
+ );
112
+ export const SectionBody = ({ children }: { children?: React.ReactNode }) => <div>{children}</div>;
113
+ export const SectionDivider = () => <hr />;
114
+ export const SectionFooter = ({ children, actions }: { children?: React.ReactNode; actions?: React.ReactNode }) => (
115
+ <div>
116
+ {children}
117
+ {actions}
118
+ </div>
119
+ );
120
+ export const SectionGrid = ({ children }: { children?: React.ReactNode }) => <div>{children}</div>;
121
+ export const SectionHeader = ({
122
+ title,
123
+ actions,
124
+ children,
125
+ }: {
126
+ title?: React.ReactNode;
127
+ actions?: React.ReactNode;
128
+ children?: React.ReactNode;
129
+ }) => (
130
+ <div>
131
+ {children ?? (title ? <h2>{title}</h2> : null)}
132
+ {actions}
133
+ </div>
134
+ );
135
+ export const Section = Object.assign(
136
+ ({
137
+ title,
138
+ description,
139
+ actions,
140
+ header,
141
+ footer,
142
+ footerActions,
143
+ children,
144
+ }: {
145
+ title?: React.ReactNode;
146
+ description?: React.ReactNode;
147
+ actions?: React.ReactNode;
148
+ header?: React.ReactNode;
149
+ footer?: React.ReactNode;
150
+ footerActions?: React.ReactNode;
151
+ children?: React.ReactNode;
152
+ }) => (
153
+ <section>
154
+ {header ?? (title ? <h2>{title}</h2> : null)}
155
+ {description ? <p>{description}</p> : null}
156
+ {actions}
157
+ {children}
158
+ {footer || footerActions ? (
159
+ <div>
160
+ {footer}
161
+ {footerActions}
162
+ </div>
163
+ ) : null}
164
+ </section>
165
+ ),
166
+ {
167
+ Header: SectionHeader,
168
+ Body: SectionBody,
169
+ Footer: SectionFooter,
170
+ Divider: SectionDivider,
171
+ Action: SectionAction,
172
+ Grid: SectionGrid,
173
+ },
174
+ );
82
175
  export const ShoppingCartAddItemIcon = () => <span>ShoppingCartAddItemIcon</span>;
83
176
  export const ShoppingCartArrowDownIcon = () => <span>ShoppingCartArrowDownIcon</span>;
84
177
  export const ShoppingCartIcon = () => <span>ShoppingCartIcon</span>;
@@ -90,6 +183,7 @@ export const TableOfContentsIcon = () => <span>TableOfContentsIcon</span>;
90
183
  export const TimeIcon = () => <span>TimeIcon</span>;
91
184
  export const ToolsIcon = () => <span>ToolsIcon</span>;
92
185
  export const TranslateIcon = () => <span>TranslateIcon</span>;
186
+ export const ToolWindowHeader = ({ children }: { children?: React.ReactNode }) => <>{children}</>;
93
187
  export const TrashCanIcon = () => <span>TrashCanIcon</span>;
94
188
  export const TreeViewAltIcon = () => <span>TreeViewAltIcon</span>;
95
189
  export const UserAvatarIcon = () => <span>UserAvatarIcon</span>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egen-civitas/esm-styleguide",
3
- "version": "1.17.0",
3
+ "version": "2.1.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for Egen SPA",
6
6
  "main": "dist/internal.js",
@@ -98,13 +98,13 @@
98
98
  "@egen-civitas/esm-config": "^1.0.0",
99
99
  "@egen-civitas/esm-data-api": "^1.0.2",
100
100
  "@egen-civitas/esm-error-handling": "^1.0.0",
101
- "@egen-civitas/esm-extensions": "^1.5.0",
101
+ "@egen-civitas/esm-extensions": "^2.0.0",
102
102
  "@egen-civitas/esm-globals": "^1.0.3",
103
103
  "@egen-civitas/esm-navigation": "^1.0.2",
104
- "@egen-civitas/esm-react-utils": "^1.0.5",
105
- "@egen-civitas/esm-routes": "^1.0.0",
104
+ "@egen-civitas/esm-react-utils": "^2.0.0",
105
+ "@egen-civitas/esm-routes": "^1.0.3",
106
106
  "@egen-civitas/esm-state": "^1.0.0",
107
- "@egen-civitas/esm-translations": "^1.0.0",
107
+ "@egen-civitas/esm-translations": "^1.0.2",
108
108
  "@egen-civitas/esm-utils": "^1.0.0",
109
109
  "dayjs": "1.x",
110
110
  "i18next": "25.x",
@@ -121,13 +121,13 @@
121
121
  "@egen-civitas/esm-data-api": "^1.0.2",
122
122
  "@egen-civitas/esm-error-handling": "^1.0.0",
123
123
  "@egen-civitas/esm-expression-evaluator": "^1.0.0",
124
- "@egen-civitas/esm-extensions": "^1.5.0",
124
+ "@egen-civitas/esm-extensions": "^2.0.0",
125
125
  "@egen-civitas/esm-globals": "^1.0.3",
126
126
  "@egen-civitas/esm-navigation": "^1.0.2",
127
- "@egen-civitas/esm-react-utils": "^1.0.5",
128
- "@egen-civitas/esm-routes": "^1.0.0",
127
+ "@egen-civitas/esm-react-utils": "^2.0.0",
128
+ "@egen-civitas/esm-routes": "^1.0.3",
129
129
  "@egen-civitas/esm-state": "^1.0.0",
130
- "@egen-civitas/esm-translations": "^1.0.0",
130
+ "@egen-civitas/esm-translations": "^1.0.2",
131
131
  "@egen-civitas/esm-utils": "^1.0.0",
132
132
  "@swc/cli": "0.8.1",
133
133
  "@swc/core": "1.15.21",
package/src/_vars.scss CHANGED
@@ -5,7 +5,7 @@
5
5
  //
6
6
  // Ces ~25 variables SCSS étaient des couleurs Carbon v10 (thème clair OpenMRS)
7
7
  // figées en hexadécimal, consommées par ~15 fichiers du styleguide
8
- // (pagination, datepicker, cards, left-nav, entity-banner, workspaces,
8
+ // (pagination, datepicker, cards, entity-banner, workspaces,
9
9
  // canvas, breadcrumbs, overrides...) ET par des apps entières
10
10
  // (esm-implementer-tools-app). Modifier colors.* dans theme.default.json
11
11
  // n'avait donc aucun effet sur tout ce qui en dépendait.
@@ -1,13 +0,0 @@
1
- @use '@carbon/colors';
2
- @use '@carbon/layout';
3
-
4
- .menu {
5
- display: flex;
6
- align-items: center;
7
- justify-content: center;
8
- }
9
-
10
- .icon {
11
- margin-right: layout.$spacing-06;
12
- fill: colors.$gray-70;
13
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { type IconId } from '../icons/index.js';
3
- export interface DashboardExtensionProps {
4
- path: string;
5
- title: string;
6
- basePath?: string;
7
- icon?: IconId;
8
- }
9
- export declare const DashboardExtension: ({ path, title, basePath, icon }: DashboardExtensionProps) => React.JSX.Element;
10
- export declare function createDashboard(props: Omit<DashboardExtensionProps, 'basePath'>): ({ basePath }: {
11
- basePath: string;
12
- }) => React.JSX.Element;
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard-extension/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAAiC,uBAAuB,sBAmC1F,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,IAC7D,cAAc;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,uBAOpD"}
@@ -1,59 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useMemo } from "react";
3
- import classNames from "classnames";
4
- import { useTranslation } from "react-i18next";
5
- import { BrowserRouter, useLocation } from "react-router-dom";
6
- import { ConfigurableLink } from "@egen-civitas/esm-react-utils";
7
- import { MaybeIcon } from "../icons/icons.js";
8
- import styles from "./dashboard.module.scss";
9
- export const DashboardExtension = ({ path, title, basePath, icon })=>{
10
- const { t } = useTranslation();
11
- const location = useLocation();
12
- const isActive = useMemo(()=>{
13
- if (!path) {
14
- return false;
15
- }
16
- const p = path.startsWith('/') ? path.slice(1) : path;
17
- if (p.startsWith('http')) {
18
- return p === window.location.href;
19
- }
20
- const pathSegments = p.split('/').map((s)=>decodeURIComponent(s));
21
- const localSegments = (location.pathname ?? '').split('/').slice(1).map((s)=>decodeURIComponent(s));
22
- // Check if pathSegments appear as a contiguous slice anywhere in localSegments
23
- return localSegments.some((_, i)=>pathSegments.every((seg, j)=>localSegments[i + j] === seg));
24
- }, [
25
- location.pathname,
26
- path
27
- ]);
28
- return /*#__PURE__*/ _jsx("div", {
29
- children: /*#__PURE__*/ _jsx(ConfigurableLink, {
30
- className: classNames('cds--side-nav__link', {
31
- 'active-left-nav-link': isActive
32
- }),
33
- to: `${basePath}/${encodeURIComponent(path)}`,
34
- children: /*#__PURE__*/ _jsxs("span", {
35
- className: styles.menu,
36
- children: [
37
- /*#__PURE__*/ _jsx(MaybeIcon, {
38
- icon: icon,
39
- className: styles.icon,
40
- size: 16
41
- }),
42
- /*#__PURE__*/ _jsx("span", {
43
- children: t(title)
44
- })
45
- ]
46
- })
47
- })
48
- }, path);
49
- };
50
- export function createDashboard(props) {
51
- return function({ basePath }) {
52
- return /*#__PURE__*/ _jsx(BrowserRouter, {
53
- children: /*#__PURE__*/ _jsx(DashboardExtension, {
54
- basePath: basePath,
55
- ...props
56
- })
57
- });
58
- };
59
- }
@@ -1,27 +0,0 @@
1
- /** @module @category UI */
2
- import React from 'react';
3
- import { type SideNavProps } from '@carbon/react';
4
- /**
5
- * Extended props for the LeftNavMenu component
6
- */
7
- interface LeftNavMenuProps extends SideNavProps {
8
- /**
9
- * Flag indicating if this component is a child of the header component.
10
- * When true, the component renders the left nav menu.
11
- * When false, it renders an empty fragment.
12
- */
13
- isChildOfHeader?: boolean;
14
- }
15
- /**
16
- * This component renders the left nav in desktop mode. It's also used to render the same
17
- * nav when the hamburger menu is clicked on in tablet mode. See side-menu-panel.component.tsx
18
- *
19
- * Use of this component by anything other than <SideMenuPanel> (where isChildOfHeader == false)
20
- * is deprecated; it simply renders nothing.
21
- */
22
- /**
23
- * @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
24
- */
25
- export declare const LeftNavMenu: React.ForwardRefExoticComponent<LeftNavMenuProps & React.RefAttributes<HTMLElement>>;
26
- export {};
27
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/left-nav/index.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAW3D;;GAEG;AACH,UAAU,gBAAiB,SAAQ,YAAY;IAC7C;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH;;GAEG;AACH,eAAO,MAAM,WAAW,sFA8BtB,CAAC"}
@@ -1,60 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /** @module @category UI */ import React from "react";
3
- import { SideNav } from "@carbon/react";
4
- import { ComponentContext, ExtensionSlot, RenderIfValueIsTruthy, useAssignedExtensions, useLeftNavStore } from "@egen-civitas/esm-react-utils";
5
- import { getCoreTranslation } from "@egen-civitas/esm-translations";
6
- import styles from "./left-nav.module.scss";
7
- /**
8
- * This component renders the left nav in desktop mode. It's also used to render the same
9
- * nav when the hamburger menu is clicked on in tablet mode. See side-menu-panel.component.tsx
10
- *
11
- * Use of this component by anything other than <SideMenuPanel> (where isChildOfHeader == false)
12
- * is deprecated; it simply renders nothing.
13
- */ /**
14
- * @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
15
- */ export const LeftNavMenu = /*#__PURE__*/ React.forwardRef((props, ref)=>{
16
- const { slotName, basePath, componentContext, state } = useLeftNavStore();
17
- const currentPath = window.location ?? {
18
- pathname: ''
19
- };
20
- const navMenuItems = useAssignedExtensions(slotName ?? '');
21
- if (props.isChildOfHeader && slotName && navMenuItems.length > 0) {
22
- return /*#__PURE__*/ _jsxs(SideNav, {
23
- "aria-label": getCoreTranslation('leftNavigation', 'Left navigation'),
24
- className: styles.leftNav,
25
- expanded: true,
26
- isFixedNav: true,
27
- ref: ref,
28
- ...props,
29
- children: [
30
- /*#__PURE__*/ _jsx(ExtensionSlot, {
31
- name: "global-nav-menu-slot"
32
- }),
33
- slotName ? /*#__PURE__*/ _jsx(RenderIfValueIsTruthy, {
34
- value: componentContext,
35
- fallback: /*#__PURE__*/ _jsx(ExtensionSlot, {
36
- name: slotName,
37
- state: {
38
- basePath,
39
- currentPath,
40
- ...state
41
- }
42
- }),
43
- children: /*#__PURE__*/ _jsx(ComponentContext.Provider, {
44
- value: componentContext,
45
- children: /*#__PURE__*/ _jsx(ExtensionSlot, {
46
- name: slotName,
47
- state: {
48
- basePath,
49
- currentPath,
50
- ...state
51
- }
52
- })
53
- })
54
- }) : null
55
- ]
56
- });
57
- } else {
58
- return null;
59
- }
60
- });
@@ -1,43 +0,0 @@
1
- @use '@carbon/type';
2
- @use '@carbon/layout';
3
- @use '../vars' as *;
4
-
5
- .leftNav {
6
- border-inline-end: 1px solid $color-gray-30;
7
- padding-top: layout.$spacing-05;
8
-
9
- // Left nav menu item
10
- :global(.cds--side-nav__link) {
11
- color: $text-02;
12
- @include type.type-style('heading-compact-01');
13
- padding: 0 1rem;
14
-
15
- &:focus,
16
- &:hover {
17
- background-color: $ui-01;
18
- }
19
-
20
- // Active menu item
21
- &:global(.active-left-nav-link) {
22
- color: $ui-05;
23
- border-inline-start: layout.$spacing-02 solid var(--brand-01);
24
- background-color: $ui-03;
25
- outline: none;
26
- padding: 0 layout.$spacing-04;
27
- }
28
- }
29
- }
30
-
31
- /* Desktop */
32
- :global(.egen-breakpoint-gt-tablet) {
33
- :global(.cds--side-nav__link) {
34
- height: layout.$spacing-07;
35
- }
36
- }
37
-
38
- /* Tablet */
39
- :global(.egen-breakpoint-lt-desktop) {
40
- :global(.cds--side-nav__link) {
41
- height: layout.$spacing-09;
42
- }
43
- }