@canonical/react-ds-app 0.44.1 → 0.47.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 (57) hide show
  1. package/dist/esm/lib/SideNavigation/SideNavigation.js +7 -22
  2. package/dist/esm/lib/SideNavigation/SideNavigation.js.map +1 -1
  3. package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js +15 -3
  4. package/dist/esm/lib/SideNavigation/common/CollapseToggle/CollapseToggle.js.map +1 -1
  5. package/dist/esm/lib/SideNavigation/common/CollapseToggle/constants.js +10 -0
  6. package/dist/esm/lib/SideNavigation/common/CollapseToggle/constants.js.map +1 -0
  7. package/dist/esm/lib/SideNavigation/common/CollapseToggle/styles.css +1 -2
  8. package/dist/esm/lib/SideNavigation/common/Content/Content.js +1 -1
  9. package/dist/esm/lib/SideNavigation/common/Content/Content.js.map +1 -1
  10. package/dist/esm/lib/SideNavigation/common/Content/styles.css +1 -1
  11. package/dist/esm/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.js +3 -3
  12. package/dist/esm/lib/SideNavigation/common/ContextSwitcher/styles.css +1 -1
  13. package/dist/esm/lib/SideNavigation/common/Footer/Footer.js +26 -24
  14. package/dist/esm/lib/SideNavigation/common/Footer/Footer.js.map +1 -1
  15. package/dist/esm/lib/SideNavigation/common/Footer/styles.css +16 -4
  16. package/dist/esm/lib/SideNavigation/common/Header/Header.js +2 -2
  17. package/dist/esm/lib/SideNavigation/common/Header/Header.js.map +1 -1
  18. package/dist/esm/lib/SideNavigation/common/ItemExpandable/styles.css +70 -1
  19. package/dist/esm/lib/SideNavigation/constants.js +8 -0
  20. package/dist/esm/lib/SideNavigation/constants.js.map +1 -0
  21. package/dist/esm/lib/SideNavigation/helpItem.js +2 -1
  22. package/dist/esm/lib/SideNavigation/helpItem.js.map +1 -1
  23. package/dist/esm/lib/SideNavigation/styles.css +35 -143
  24. package/dist/esm/lib/SidePanel/Provider.js +9 -3
  25. package/dist/esm/lib/SidePanel/Provider.js.map +1 -1
  26. package/dist/esm/lib/SidePanel/common/Content/Content.js +41 -3
  27. package/dist/esm/lib/SidePanel/common/Content/Content.js.map +1 -1
  28. package/dist/esm/lib/SidePanel/common/Content/styles.css +85 -0
  29. package/dist/esm/lib/SidePanel/common/Footer/styles.css +2 -13
  30. package/dist/esm/lib/SidePanel/common/Header/styles.css +1 -3
  31. package/dist/esm/lib/SidePanel/styles.css +9 -3
  32. package/dist/types/lib/SideNavigation/SideNavigation.d.ts +4 -4
  33. package/dist/types/lib/SideNavigation/SideNavigation.d.ts.map +1 -1
  34. package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts +1 -1
  35. package/dist/types/lib/SideNavigation/common/CollapseToggle/CollapseToggle.d.ts.map +1 -1
  36. package/dist/types/lib/SideNavigation/common/CollapseToggle/constants.d.ts +4 -0
  37. package/dist/types/lib/SideNavigation/common/CollapseToggle/constants.d.ts.map +1 -0
  38. package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts +20 -0
  39. package/dist/types/lib/SideNavigation/common/CollapseToggle/types.d.ts.map +1 -1
  40. package/dist/types/lib/SideNavigation/common/Content/types.d.ts +1 -1
  41. package/dist/types/lib/SideNavigation/common/Content/types.d.ts.map +1 -1
  42. package/dist/types/lib/SideNavigation/common/ContextSwitcher/ContextSwitcher.d.ts +3 -3
  43. package/dist/types/lib/SideNavigation/common/Footer/Footer.d.ts.map +1 -1
  44. package/dist/types/lib/SideNavigation/common/Header/Header.d.ts +1 -1
  45. package/dist/types/lib/SideNavigation/common/Header/Header.d.ts.map +1 -1
  46. package/dist/types/lib/SideNavigation/common/Header/types.d.ts +3 -0
  47. package/dist/types/lib/SideNavigation/common/Header/types.d.ts.map +1 -1
  48. package/dist/types/lib/SideNavigation/constants.d.ts +4 -0
  49. package/dist/types/lib/SideNavigation/constants.d.ts.map +1 -0
  50. package/dist/types/lib/SideNavigation/helpItem.d.ts +2 -0
  51. package/dist/types/lib/SideNavigation/helpItem.d.ts.map +1 -1
  52. package/dist/types/lib/SideNavigation/types.d.ts +17 -0
  53. package/dist/types/lib/SideNavigation/types.d.ts.map +1 -1
  54. package/dist/types/lib/SidePanel/Provider.d.ts.map +1 -1
  55. package/dist/types/lib/SidePanel/common/Content/Content.d.ts +1 -1
  56. package/dist/types/lib/SidePanel/common/Content/Content.d.ts.map +1 -1
  57. package/package.json +18 -18
@@ -1,5 +1,8 @@
1
1
  /* Generated by @canonical/summon-component:react v0.1.0
2
2
  * Layer: ds.components.apps (@canonical/styles README, "Cascade layers"). */
3
+
4
+ /* Shell-only sheet: root box, region placement, shared tokens. Subcomponent
5
+ anatomy lives in each subcomponent's own styles.css. */
3
6
  @layer ds.components.apps {
4
7
  :root {
5
8
  /* ── Rail ───────────────────────────────────────────────────────── */
@@ -28,17 +31,13 @@
28
31
  --sidenav-inset-inline: var(--dimension-100);
29
32
  /* 0.5rem between a leading icon and its label. */
30
33
  --sidenav-icon-gap: var(--dimension-100);
31
- /* Fixed leading-icon column so labels align down the rail with or
32
- without an icon — matches the Icon component's default rendered size
33
- (1rem). No design token names it, so this stays a provisional value
34
- scoped here rather than reusing a spacing token for a sizing concern. */
34
+ /* Leading-icon column so labels align with or without an icon. No token
35
+ names it; provisional, scoped here. */
35
36
  --sidenav-icon-column-inline-size: 1.5rem;
36
37
 
37
38
  /* ── Row background channel ────────────────────────────────────────
38
- Item/ItemButton/ItemExpandable/CollapseToggle consume THIS, not the
39
- navigation-primary token directly, so every row retints from one
40
- place (an inherited custom-property override on any ancestor) instead
41
- of threading an "is this retinted?" flag through every row component. */
39
+ Rows consume this channel, not the navigation-primary token directly,
40
+ so an ancestor custom-property override retints every row at once. */
42
41
  --sidenav-row-background: var(--color-foreground-navigation-primary);
43
42
  --sidenav-row-background-hover: var(
44
43
  --color-foreground-navigation-primary-hover
@@ -51,10 +50,16 @@
51
50
  );
52
51
 
53
52
  /* ── Collapsed-rail popover ──────────────────────────────────────── */
54
- /* No design token names an elevated-popover shadow; component-scoped
55
- (overridable by any ancestor) rather than a phantom reference to a
56
- `--box-shadow-high` token that does not exist. */
53
+ /* No token names an elevated-popover shadow; scoped here so any
54
+ ancestor can override. */
57
55
  --sidenav-popover-shadow: 0 0.25rem 0.5rem rgb(0 0 0 / 20%);
56
+
57
+ /* ── CollapseToggle ─────────────────────────────────────────────── */
58
+ /* Hit target: icon square (2rem) plus 0.25rem breathing room. */
59
+ --sidenav-collapse-toggle-inline-size: calc(
60
+ var(--dimension-400) +
61
+ var(--dimension-050)
62
+ );
58
63
  }
59
64
 
60
65
  .ds.side-navigation {
@@ -64,11 +69,8 @@
64
69
  background: var(--color-foreground-navigation-primary);
65
70
  display: flex;
66
71
  flex-direction: column;
67
- /* Gap between Header / Content / Footer. Deliberate deviation from the
68
- upstream 24.04 design's per-seam 1rem (below the logo, above the
69
- first footer item): a single flex gap applies one value
70
- between every adjacent child, and this ships 0.5rem so the rail reads
71
- tight. */
72
+ /* Deliberate deviation from the upstream design's per-seam 1rem: one flex
73
+ gap, 0.5rem, so the rail reads tight. */
72
74
  gap: var(--dimension-100); /* 0.5rem */
73
75
 
74
76
  inline-size: var(--sidenav-rail-inline-size);
@@ -80,22 +82,14 @@
80
82
  to the bottom. */
81
83
  block-size: 100%;
82
84
 
83
- /* Per-component override of the shared overflow-fade token (default 2rem
84
- in @canonical/styles/overflow.css): the upstream 24.04 design calls
85
- for 1.75rem specifically at the Header/Content and Content/Footer
86
- seams. */
85
+ /* Override of the shared overflow-fade token (2rem default in
86
+ @canonical/styles/overflow.css): the design calls for 1.75rem. */
87
87
  --overflow-gradient-height: 1.75rem;
88
88
 
89
- /* Collapsed: the rail narrows to fit just
90
- the logo, and no navigation items show — a deliberate scope cut. The
91
- footer stays visible (icon-only); only Content is hidden. The width
92
- change animates over --motion-duration-medium — a deliberate
93
- deviation from the upstream 24.04 design's no-animation stance:
94
- the resize reads as motion, and it honours reduced motion (the
95
- motion tokens are zeroed under prefers-reduced-motion by
96
- @canonical/styles/motion.css). Both the physical and logical
97
- properties transition, for engines that implement only one of
98
- them. */
89
+ /* The width change animates — a deliberate deviation from the upstream
90
+ design's no-animation stance. Reduced motion is honoured via the
91
+ zeroed motion tokens. Both physical and logical properties
92
+ transition, for engines that implement only one. */
99
93
 
100
94
  transition:
101
95
  width var(--motion-duration-medium) ease-in-out,
@@ -136,129 +130,28 @@
136
130
  inline-size: var(--sidenav-rail-inline-size-collapsed);
137
131
  justify-content: space-between;
138
132
 
139
- & > .ds.content {
133
+ & > .ds.side-navigation-content {
140
134
  display: none;
141
135
  }
142
136
 
143
- /* The ContextSwitcher region hides with Content: its rows are
144
- label-driven (the switcher has no icon form), so nothing survives
145
- icon-only degradation. */
146
- & > .ds.side-navigation-context-switcher-region {
137
+ /* Label-driven rows — nothing survives icon-only degradation. */
138
+ & > .ds.side-navigation-context-switcher {
147
139
  display: none;
148
140
  }
149
141
 
150
- /* Footer stays visible, icon-only. The collapsed footer's labels
151
- show in tooltips on hover after 800ms — a documented follow-up;
152
- this is the icon-only layout half. */
153
- & > .ds.footer {
154
- .label,
155
- .end {
156
- display: none;
157
- }
158
-
159
- .row {
160
- grid-template-columns: var(--sidenav-icon-column-inline-size);
161
- }
162
- }
163
-
164
- /* Every ItemExpandable in the collapsed rail degrades its sub-items
165
- into a floating popover on the inline-end. Native <details>
166
- disclosure: the tree stays in the DOM and Tab reaches the panel's
167
- links from the summary; the expanded state keeps its inline
168
- disclosure (rules here are scoped to the collapsed state). */
169
- .ds.side-navigation-item-expandable {
170
- position: relative;
171
-
172
- .children {
173
- position: absolute;
174
- inset-block-start: 0;
175
- inset-inline-start: calc(100% + var(--dimension-100));
176
- z-index: var(--z-index-overlay, 100);
177
-
178
- display: none;
179
- inline-size: max-content;
180
- min-inline-size: calc(var(--sidenav-rail-inline-size) / 2);
181
- margin: 0;
182
-
183
- background: var(--color-background-default, #fff);
184
- border: var(--dimension-stroke-thickness-medium) solid
185
- var(--color-border-muted);
186
- border-radius: var(--dimension-radius-small);
187
- box-shadow: var(--sidenav-popover-shadow);
188
- }
189
-
190
- .details[open] .children {
191
- display: block;
192
-
193
- /* Undo the icon-only compression for popover rows: full grid and
194
- visible titles inside the panel. */
195
- .row {
196
- margin: 0;
197
- grid-template-columns:
198
- var(--sidenav-icon-column-inline-size) 1fr
199
- auto;
200
- padding-inline: var(--sidenav-inset-inline);
201
- }
202
-
203
- .label {
204
- display: inline-block;
205
- }
206
-
207
- .end {
208
- display: flex;
209
- }
210
- }
211
-
212
- /* Anchor-positioned popover (Baseline 2026; ~86% support): the
213
- children panel is fixed against its summary's anchor (inline
214
- styles from ItemExpandable) and position-try-fallbacks flips it
215
- above the trigger on viewport overflow — browser-measured, moving
216
- up exactly what it needs plus the mirrored 0.5rem gap. Browsers
217
- without the feature keep the absolute top-anchored popover above.
218
-
219
- NOTE: pinned to the summary's own edges via anchor(), not
220
- position-area — position-area regions are whole strips reaching
221
- the viewport edges, so a start-aligned panel would land pinned to
222
- the viewport's top-right corner, not beside the trigger. */
223
- @supports (anchor-name: --a) and (position-try-fallbacks: flip-block) {
224
- .children {
225
- position: fixed;
226
-
227
- /* Panel's top-left at the summary's top-right corner, growing
228
- down/right. Physical anchor() sides — the rail is
229
- horizontal-tb and they have the widest shipped support. */
230
- inset-block-start: anchor(top);
231
- inset-inline-start: anchor(right);
232
- inset-block-end: auto;
233
- inset-inline-end: auto;
234
-
235
- margin-inline-start: var(--dimension-100);
236
-
237
- position-try-fallbacks: flip-block;
238
-
239
- /* Both sides overflowing (taller than the viewport): flip-block
240
- reverts to the default position, so cap the panel and scroll
241
- internally rather than clip. */
242
- max-block-size: 100dvh;
243
- overflow-y: auto;
244
- }
245
- }
246
- }
142
+ /* Footer (icon-only) and ItemExpandable (popover) keep rendering —
143
+ their collapsed anatomy lives in their own stylesheets. */
247
144
  }
248
145
 
249
- /* Responsive: below Vanilla's "small" breakpoint
250
- ($breakpoint-small, 620px) the rail stops being a rail — the header is
251
- always shown; the body (Content AND Footer, unlike the desktop
252
- collapsed state which keeps the footer) is hidden until Menu is
253
- activated, then takes over the full screen. Same `data-expanded`
254
- attribute as desktop. Drill-down navigation is out of scope. */
146
+ /* Below the small breakpoint (620px) the rail stops being a rail: the
147
+ body (Content AND Footer) stays hidden until Menu activates it, then
148
+ takes over the full screen. Drill-down navigation is out of scope. */
255
149
  @media (width < 620px) {
256
150
  inline-size: 100%;
257
151
  flex-shrink: 1;
258
152
  block-size: auto;
259
153
 
260
- /* :not() form — a consumer shell that omits the attribute defaults
261
- open, matching the desktop rule's semantics. */
154
+ /* :not() form — a shell omitting the attribute defaults open. */
262
155
  &:not([data-expanded="false"]) {
263
156
  position: fixed;
264
157
  inset: 0;
@@ -270,9 +163,8 @@
270
163
  &[data-expanded="false"] {
271
164
  inline-size: 100%;
272
165
 
273
- /* Overrides the desktop collapsed rule above: the body is hidden
274
- entirely on mobile, not shown icon-only. */
275
- & > .ds.footer {
166
+ /* Overrides the desktop icon-only footer: hidden entirely on mobile. */
167
+ & > .ds.side-navigation-footer {
276
168
  display: none;
277
169
  }
278
170
  }
@@ -29,9 +29,15 @@ const componentCssClassName = "ds side-panel";
29
29
  * Compose the body from `SidePanel.Header`, `SidePanel.Content` and
30
30
  * `SidePanel.Footer`. The panel lays them out as a flex column: header and
31
31
  * footer keep their size, and the content pane takes the rest and scrolls
32
- * within it. The content pane is a tab stop, so keyboard users can scroll it;
33
- * opening the panel still focuses the panel itself, so from there Tab reaches
34
- * the close button, then the content, then the footer's actions.
32
+ * within it. 2px lines mark the pane's edges while content is hidden past
33
+ * them — the start line once the pane scrolls away from the top, the end
34
+ * line until it bottoms out, both together in between — drawn CSS-first:
35
+ * engines with scroll-driven animations paint them with or without
36
+ * JavaScript, and engines without fall back to measurement by the
37
+ * `useScrollOverflow` hook; engines with neither paint nothing. The content
38
+ * pane is a tab stop, so keyboard users can scroll it; opening the panel
39
+ * still focuses the panel itself, so from there Tab reaches the close
40
+ * button, then the content, then the footer's actions.
35
41
  *
36
42
  * There are two consumption patterns, `withSidePanel` and `SidePanel`.
37
43
  * `withSidePanel` is meant for static content: the call belongs at module
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/lib/SidePanel/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,QAAQ,EACR,GAAG,KAAK,EACe,EAAsB,EAAE;IAC/C,MAAM,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,GACZ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC9B,wEAAwE;IACxE,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,wEAAwE;IACxE,qBAAqB;IACrB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAE3E,0EAA0E;IAC1E,6EAA6E;IAC7E,4EAA4E;IAC5E,IACE,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QACrC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC9B,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAC1D,EACD,CAAC;QACD,OAAO,CAAC,IAAI,CACV,2FAA2F,CAC5F,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACnC,iBACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,qBAOtD,OAAO;YACxB,iEAAiE;YACjE,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,KAChB,WAAW,YAEd,QAAQ,GACF,GACQ,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AAEzB,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AAEnC,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/lib/SidePanel/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,QAAQ,EACR,GAAG,KAAK,EACe,EAAsB,EAAE;IAC/C,MAAM,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,GACZ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC9B,wEAAwE;IACxE,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,wEAAwE;IACxE,qBAAqB;IACrB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAE3E,0EAA0E;IAC1E,6EAA6E;IAC7E,4EAA4E;IAC5E,IACE,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QACrC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC9B,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAC1D,EACD,CAAC;QACD,OAAO,CAAC,IAAI,CACV,2FAA2F,CAC5F,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACnC,iBACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,qBAOtD,OAAO;YACxB,iEAAiE;YACjE,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,KAChB,WAAW,YAEd,QAAQ,GACF,GACQ,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AAEzB,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AAEnC,eAAe,QAAQ,CAAC"}
@@ -1,20 +1,58 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useScrollOverflow } from "@canonical/react-hooks";
3
+ import { useEffect, useState } from "react";
2
4
  import "./styles.css";
3
5
  const componentCssClassName = "ds side-panel-content";
6
+ /**
7
+ * Whether the engine paints the pane's edge lines with scroll-driven
8
+ * animations — the CSS-first mechanism in styles.css. Client-only: the
9
+ * server and engines without the feature report false, so the pane measures
10
+ * with JavaScript until the probe says the CSS owns the lines.
11
+ */
12
+ const useScrollTimelineSupport = () => {
13
+ const [supported, setSupported] = useState(false);
14
+ useEffect(() => {
15
+ setSupported(typeof CSS !== "undefined" &&
16
+ typeof CSS.supports === "function" &&
17
+ CSS.supports("animation-timeline", "scroll()"));
18
+ }, []);
19
+ return supported;
20
+ };
4
21
  /**
5
22
  * Body of a SidePanel, and the only part of it that scrolls: however tall its
6
23
  * children are, the header and footer stay visible.
7
24
  *
25
+ * While content is hidden past an edge, the pane marks that edge with a 2px
26
+ * line — the top line once the pane scrolls away from the top, the bottom
27
+ * line until it bottoms out, both together in between, neither when
28
+ * everything fits. The lines are CSS-first: engines with scroll-driven
29
+ * animations paint them by animating the pane's borders against its own
30
+ * scroll progress, with or without JavaScript. Engines without fall back to
31
+ * measurement: `useScrollOverflow` reports the two edge states, and the pane
32
+ * publishes them as `data-overflow-top` and `data-overflow-bottom` for the
33
+ * CSS to draw. Engines with neither paint nothing: without a measurement
34
+ * there is no truthful answer about which edges overflow.
35
+ *
8
36
  * The pane is its own scroll container, so it is a tab stop: a keyboard
9
37
  * user tabs to it and scrolls it with the arrow and page keys, even when it
10
38
  * holds nothing focusable.
11
39
  *
12
40
  * @implements ds:apps.subcomponent.side_panel-content
13
41
  */
14
- const Content = ({ children, className, fill = false, ...props }) => {
15
- return (_jsx("div", { className: [componentCssClassName, fill && "fill", className]
42
+ const Content = ({ children, className, fill = false, ref, ...props }) => {
43
+ // The edge lines are CSS-first: where scroll-driven animations run,
44
+ // styles.css paints them and the measurement must stand down; everywhere
45
+ // else the hook drives. The probe starts pessimistic, so the very first
46
+ // frame is measured either way and the lines are never a frame late.
47
+ const cssDriven = useScrollTimelineSupport();
48
+ // The overflow measurement needs its own look at the pane element, and a
49
+ // consumer ref must keep receiving it too: the hook fans the element out
50
+ // to both. Stood down, it clears the flags it measured on mount, so the
51
+ // edge attributes below exist only while JavaScript drives the lines.
52
+ const { ref: paneRef, overflowTop, overflowBottom, } = useScrollOverflow(ref, { enabled: !cssDriven });
53
+ return (_jsx("div", { ref: paneRef, className: [componentCssClassName, fill && "fill", className]
16
54
  .filter(Boolean)
17
- .join(" "),
55
+ .join(" "), "data-overflow-top": overflowTop || undefined, "data-overflow-bottom": overflowBottom || undefined,
18
56
  // A scroll container a keyboard user cannot focus cannot be scrolled,
19
57
  // so the pane is a tab stop. Set before the spread, so the native prop
20
58
  // can still take it out of the tab order.
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../../src/lib/SidePanel/common/Content/Content.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,KAAK,EACZ,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,CAAC;aAC1D,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC;QACZ,sEAAsE;QACtE,uEAAuE;QACvE,0CAA0C;QAC1C,4GAA4G;QAC5G,QAAQ,EAAE,CAAC,KACP,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAE1C,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../../../src/lib/SidePanel/common/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,wBAAwB,GAAG,GAAY,EAAE;IAC7C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CACV,OAAO,GAAG,KAAK,WAAW;YACxB,OAAO,GAAG,CAAC,QAAQ,KAAK,UAAU;YAClC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,EAAE,UAAU,CAAC,CACjD,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,KAAK,EACZ,GAAG,EACH,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,oEAAoE;IACpE,yEAAyE;IACzE,wEAAwE;IACxE,qEAAqE;IACrE,MAAM,SAAS,GAAG,wBAAwB,EAAE,CAAC;IAE7C,yEAAyE;IACzE,yEAAyE;IACzE,wEAAwE;IACxE,sEAAsE;IACtE,MAAM,EACJ,GAAG,EAAE,OAAO,EACZ,WAAW,EACX,cAAc,GACf,GAAG,iBAAiB,CAAiB,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;IAEpE,OAAO,CACL,cACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,CAAC;aAC1D,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,uBAKO,WAAW,IAAI,SAAS,0BACrB,cAAc,IAAI,SAAS;QACjD,sEAAsE;QACtE,uEAAuE;QACvE,0CAA0C;QAC1C,4GAA4G;QAC5G,QAAQ,EAAE,CAAC,KACP,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAE1C,eAAe,OAAO,CAAC"}
@@ -25,6 +25,39 @@
25
25
  /* Don't hand the scroll to the page behind once the content bottoms out. */
26
26
  overscroll-behavior: contain;
27
27
 
28
+ /*
29
+ The scroll region's edges — 2px lines marking the boundaries the header
30
+ and footer meet the pane at, painted only while content is hidden past
31
+ that edge. CSS-first: the `@supports` block at the end of this sheet
32
+ animates these borders against the pane's own scroll progress in the
33
+ engines that ship scroll-driven animations — with or without
34
+ JavaScript. The engines without fall back to measurement:
35
+ `useScrollOverflow` publishes the two edge states as
36
+ `data-overflow-top` / `data-overflow-bottom` (see Content.tsx), and the
37
+ selectors below switch the border colours on them. Engines with neither
38
+ paint nothing: without a measurement there is nothing to say which
39
+ edges overflow, and a line that cannot tell the truth is worse than
40
+ none.
41
+
42
+ The borders are always reserved — animation or attributes switch their
43
+ colour, never their width — so the lines appearing or disappearing
44
+ never shifts the pane. And a scroll container's borders are part of its
45
+ box, not its content: they stay pinned at the edges while the pane
46
+ scrolls. A border spans the padding box, so with the pane's inline
47
+ padding the lines run edge to edge across the panel while the text
48
+ stays in its column. The colour is the panel's to own:
49
+ `--side-panel-color-border` is declared in the panel's `:root` block.
50
+ */
51
+ border-block: var(--side-panel-overflow-line-thickness) solid transparent;
52
+
53
+ &[data-overflow-top] {
54
+ border-block-start-color: var(--side-panel-color-border);
55
+ }
56
+
57
+ &[data-overflow-bottom] {
58
+ border-block-end-color: var(--side-panel-color-border);
59
+ }
60
+
28
61
  /*
29
62
  Inline padding, not margin: the pane must span the full panel width, so
30
63
  its scrollbar hugs the panel edge and the focus ring below reaches it,
@@ -46,4 +79,56 @@
46
79
  outline-offset: calc(-1 * var(--side-panel-focus-ring-width));
47
80
  }
48
81
  }
82
+
83
+ /*
84
+ The primary mechanism, with or without JavaScript: in the engines that
85
+ ship scroll-driven animations the pane animates the same borders against
86
+ its OWN scroll progress — the engine does the measuring. Content.tsx
87
+ probes the same capability and stands the `useScrollOverflow` hook down
88
+ when it holds, so nothing is measured twice and no edge attributes
89
+ appear in the markup; in the engines this `@supports` test excludes, the
90
+ hook's attributes own the lines instead (selectors above). Engines with
91
+ neither mechanism paint nothing.
92
+
93
+ Each animation is narrowed to a single pixel of the scroll range by
94
+ `animation-range`, so the colour change reads as a switch, not a fade:
95
+
96
+ - `side-panel-line-top` runs across the FIRST pixel — before it the pane
97
+ sits at the top and nothing is hidden above, so the line stays
98
+ transparent; past it, content is hidden above and the line holds the
99
+ border colour (`both` fills the range's far side).
100
+ - `side-panel-line-bottom` runs across the LAST pixel — before it there
101
+ is still content below, so `both` fills the near side and the line
102
+ holds the border colour; across it the pane bottoms out and the line
103
+ turns transparent.
104
+ */
105
+ @supports (animation-timeline: scroll()) {
106
+ .ds.side-panel-content {
107
+ animation:
108
+ side-panel-line-top linear both,
109
+ side-panel-line-bottom linear both;
110
+ animation-timeline: scroll(self block), scroll(self block);
111
+ animation-range:
112
+ 0px 1px,
113
+ calc(100% - 1px) 100%;
114
+ }
115
+ }
116
+
117
+ @keyframes side-panel-line-top {
118
+ from {
119
+ border-block-start-color: transparent;
120
+ }
121
+ to {
122
+ border-block-start-color: var(--side-panel-color-border);
123
+ }
124
+ }
125
+
126
+ @keyframes side-panel-line-bottom {
127
+ from {
128
+ border-block-end-color: var(--side-panel-color-border);
129
+ }
130
+ to {
131
+ border-block-end-color: transparent;
132
+ }
133
+ }
49
134
  }
@@ -9,19 +9,8 @@
9
9
  flex: none;
10
10
 
11
11
  /*
12
- Closes the scroll region, marking where the content pane ends and the
13
- actions begin.
14
-
15
- The colour is the panel's to own, and is read without a local fallback so
16
- the two cannot state different defaults: `--side-panel-color-border` is
17
- declared in the panel's `:root` block.
18
- */
19
- border-block-start: var(--dimension-stroke-thickness-medium) solid
20
- var(--side-panel-color-border);
21
- /*
22
- Inset by margin rather than padding: a border spans the padding box, so
23
- padding would run the hairline edge to edge. The margin keeps it stopping
24
- short of both panel edges, in line with the text column.
12
+ Inset by margin rather than padding, so the actions stay in line with
13
+ the text column while the pane's edge line runs the full panel width.
25
14
  */
26
15
  margin-inline: var(--side-panel-padding-inline);
27
16
 
@@ -40,9 +40,7 @@
40
40
  padding-block: var(--side-panel-header-padding-block);
41
41
  /*
42
42
  Inline padding, not margin: nothing here needs the header's box itself
43
- inset, and padding keeps it full panel width. The footer is the
44
- exception — its border spans the padding box, so it insets with margin
45
- (see Footer/styles.css).
43
+ inset, and padding keeps it full panel width.
46
44
  */
47
45
  padding-inline: var(--side-panel-padding-inline);
48
46
 
@@ -32,11 +32,17 @@
32
32
 
33
33
  --side-panel-border-radius: var(--dimension-radius-medium);
34
34
  /*
35
- The hairline closing the scroll region is a divider, not a boundary, so it
36
- takes the muted border rather than the default one — gray-100 in light mode
37
- against gray-520, and gray-820 in dark so it stays pale either way.
35
+ The colour of the scroll region's divider lines, kept muted.
38
36
  */
39
37
  --side-panel-color-border: var(--color-border-muted);
38
+ /*
39
+ The edge lines marking the scroll region when the content pane
40
+ overflows. The design calls for 2px; design-tokens ships no stroke
41
+ token at that width (the scale jumps from 1px to 3px), so this is a
42
+ literal.
43
+ TODO: replace with a token when one exists.
44
+ */
45
+ --side-panel-overflow-line-thickness: 2px;
40
46
  /* One inline padding, read by the header, content and footer alike. */
41
47
  --side-panel-padding-inline: var(--dimension-300);
42
48
  /* Block padding of the two pinned regions, so the rhythm is tunable. */
@@ -8,9 +8,9 @@ import "./styles.css";
8
8
  * region it controls.
9
9
  *
10
10
  * Four regions: Header (branding, collapse toggle), the optional
11
- * ContextSwitcher region (a `role="menu"` select-like widget — not
12
- * navigation, so it sits outside the landmark in a plain `<div>` between
13
- * Header and Content; hidden when collapsed, where labels are unviable),
11
+ * ContextSwitcher (a `role="menu"` select-like widget — not navigation,
12
+ * so it sits outside the landmark between Header and Content; hidden
13
+ * when collapsed, where labels are unviable),
14
14
  * Content (the main `<nav>` landmark) and Footer (user profile, settings
15
15
  * and non-navigational actions). The root element is a plain `<div>` and
16
16
  * the component's single *navigation* landmark is Content's `<nav>`, so
@@ -34,6 +34,6 @@ import "./styles.css";
34
34
  *
35
35
  * @implements ds:apps.pattern.side-navigation
36
36
  */
37
- declare const SideNavigation: ({ className, brand, applicationName, root, contextSwitcher, footerRoot, LinkComponent, currentUrl, skipTo, defaultExpanded: defaultExpandedProp, keyboardShortcut, "aria-label": ariaLabel, ...props }: SideNavigationProps) => React.ReactElement;
37
+ declare const SideNavigation: ({ className, brand, applicationName, root, contextSwitcher, footerRoot, LinkComponent, currentUrl, skipTo, defaultExpanded: defaultExpandedProp, keyboardShortcut, "aria-label": ariaLabel, messages: messagesProp, ...props }: SideNavigationProps) => React.ReactElement;
38
38
  export default SideNavigation;
39
39
  //# sourceMappingURL=SideNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,cAAc,2MAiBjB,mBAAmB,KAAG,KAAK,CAAC,YAkF9B,CAAC;eAEa,cAAc"}
1
+ {"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/SideNavigation/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,cAAc,mOAejB,mBAAmB,KAAG,KAAK,CAAC,YAmE9B,CAAC;eAEa,cAAc"}
@@ -16,6 +16,6 @@ import "./styles.css";
16
16
  *
17
17
  * @implements ds:apps.subcomponent.side-navigation-collapse-toggle
18
18
  */
19
- declare const CollapseToggle: ({ expanded, ...props }: CollapseToggleProps) => React.ReactElement;
19
+ declare const CollapseToggle: ({ expanded, messages, ...props }: CollapseToggleProps) => React.ReactElement;
20
20
  export default CollapseToggle;
21
21
  //# sourceMappingURL=CollapseToggle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapseToggle.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/CollapseToggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AA8BtB;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,2BAGjB,mBAAmB,KAAG,KAAK,CAAC,YAO9B,CAAC;eAEa,cAAc"}
1
+ {"version":3,"file":"CollapseToggle.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/CollapseToggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,cAAc,CAAC;AAyCtB;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,qCAIjB,mBAAmB,KAAG,KAAK,CAAC,YAe9B,CAAC;eAEa,cAAc"}
@@ -0,0 +1,4 @@
1
+ import type { CollapseToggleMessages } from "./types.js";
2
+ /** The collapse toggle's English text, used for any message not supplied. */
3
+ export declare const DEFAULT_MESSAGES: CollapseToggleMessages;
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,EAAE,sBAO9B,CAAC"}
@@ -1,10 +1,30 @@
1
1
  import type { ComponentProps } from "react";
2
+ /**
3
+ * The collapse toggle's text, one function per string, so an application can
4
+ * supply translations. Each defaults to its English text.
5
+ */
6
+ export interface CollapseToggleMessages {
7
+ /** The button's accessible name while the rail is expanded. */
8
+ collapseNavigation: () => string;
9
+ /** The button's accessible name while the rail is collapsed. */
10
+ expandNavigation: () => string;
11
+ /** The tooltip naming the action while the rail is expanded. */
12
+ collapse: () => string;
13
+ /** The tooltip naming the action while the rail is collapsed. */
14
+ expand: () => string;
15
+ /** The button's visible text below the small breakpoint, menu closed. */
16
+ openMenu: () => string;
17
+ /** The button's visible text below the small breakpoint, menu open. */
18
+ closeMenu: () => string;
19
+ }
2
20
  type OwnProps = {
3
21
  /**
4
22
  * Whether the navigation is currently expanded. Drives `aria-expanded` and
5
23
  * the default `aria-label`. Controlled by the parent SideNavigation.
6
24
  */
7
25
  expanded?: boolean;
26
+ /** The toggle's text. Any message left out keeps its English default. */
27
+ messages?: Partial<CollapseToggleMessages>;
8
28
  };
9
29
  /**
10
30
  * `type` is excluded in addition to `OwnProps`: this is always a disclosure
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/CollapseToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,+DAA+D;IAC/D,kBAAkB,EAAE,MAAM,MAAM,CAAC;IACjC,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,MAAM,CAAC;IAC/B,gEAAgE;IAChE,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,iEAAiE;IACjE,MAAM,EAAE,MAAM,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,uEAAuE;IACvE,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB;AAED,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps, ComponentType } from "react";
2
2
  import type { LinkComponentProps, NavRoot } from "../../types.js";
3
3
  type OwnProps = {
4
- /** Root whose direct children render as groups — see NavRoot. Data-only: rows render exclusively from this tree (there is no children escape hatch into the landmark). */
4
+ /** Root whose direct children render as groups — see NavRoot. */
5
5
  root?: NavRoot;
6
6
  /** Component used to render navigable items. Defaults to `"a"`. */
7
7
  LinkComponent?: ComponentType<LinkComponentProps> | "a";
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,QAAQ,GAAG;IACd,0KAA0K;IAC1K,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,QAAQ,GAAG;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC;IACxD,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
@@ -9,9 +9,9 @@ import "./styles.css";
9
9
  * full roving-focus keyboard navigation. `title`, when given, renders via
10
10
  * `SideNavigation.GroupHeader` as a sibling above the dropdown field.
11
11
  *
12
- * Not part of the `NavRoot`/`NavGroup` content-tree data model — its
13
- * position is content-defined: compose this component directly where
14
- * the consumer wants it. See SPEC.md's known issues.
12
+ * Not part of the `NavRoot`/`NavGroup` content-tree data model — it
13
+ * embeds via `SideNavigation`'s `contextSwitcher` prop slot, its region
14
+ * class owning the collapsed-rail hide.
15
15
  *
16
16
  * @implements ds:apps.subcomponent.side-navigation-context-switcher
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,CAAC;AA6DtB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,MAAM,6DAMT,WAAW,KAAG,KAAK,CAAC,YAwCtB,CAAC;eAEa,MAAM"}
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/SideNavigation/common/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,CAAC;AA2DtB;;;;;;;;;;GAUG;AACH,QAAA,MAAM,MAAM,6DAMT,WAAW,KAAG,KAAK,CAAC,YAqDtB,CAAC;eAEa,MAAM"}
@@ -10,6 +10,6 @@ import "./styles.css";
10
10
  *
11
11
  * @implements ds:apps.subcomponent.side-navigation-header
12
12
  */
13
- declare const Header: ({ className, brand, applicationName, expanded, onToggle, collapseControls, ...props }: HeaderProps) => React.ReactElement;
13
+ declare const Header: ({ className, brand, applicationName, expanded, onToggle, collapseControls, collapseToggleMessages, ...props }: HeaderProps) => React.ReactElement;
14
14
  export default Header;
15
15
  //# sourceMappingURL=Header.d.ts.map