@skagerakenergi/design 0.9.0 → 0.10.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/INSTRUCTIONS.md CHANGED
@@ -930,6 +930,7 @@ Provides spacing utilities, breakpoint classes, responsive margins, an app shell
930
930
 
931
931
  Implements the M3 navigation region + body region window split. Required whenever `se-nav-rail` is used.
932
932
 
933
+ **Pattern A — simple body** (content scrolls as one unit):
933
934
  ```html
934
935
  <div class="se-app-shell">
935
936
  <nav class="se-nav-rail" aria-label="Main navigation">…</nav>
@@ -937,12 +938,25 @@ Implements the M3 navigation region + body region window split. Required wheneve
937
938
  </div>
938
939
  ```
939
940
 
941
+ **Pattern B — fixed header + scrollable content + fixed footer**:
942
+ ```html
943
+ <div class="se-app-shell">
944
+ <nav class="se-nav-rail" aria-label="Main navigation">…</nav>
945
+ <div class="se-app-shell__body">
946
+ <header class="se-app-bar">…</header>
947
+ <main class="se-app-shell__content">…</main>
948
+ <footer class="se-toolbar se-toolbar--docked">…</footer>
949
+ </div>
950
+ </div>
951
+ ```
952
+
940
953
  | Class | Properties |
941
954
  |-------|-----------|
942
- | `.se-app-shell` | `display: flex; height: 100dvh; overflow: hidden` — height-constrained flex shell |
943
- | `.se-app-shell__body` | `flex: 1 1 0; overflow-y: auto; min-width: 0` — independently scrollable content region |
955
+ | `.se-app-shell` | `display: flex; height: 100dvh; overflow: hidden` — height-constrained row flex shell |
956
+ | `.se-app-shell__body` | `flex: 1 1 0; display: flex; flex-direction: column; overflow-y: auto; min-width: 0` — column flex body; scrolls all children when no `__content` child |
957
+ | `.se-app-shell__content` | `flex: 1 1 0; overflow-y: auto; min-width: 0` — scrollable middle region; use alongside a fixed header/footer |
944
958
 
945
- The nav component occupies the left column at its own fixed width; the body fills the rest. On compact, hide the rail with `.se-show-medium` and the body spans full width automatically.
959
+ The nav component occupies the left column at its own fixed width; the body fills the rest. On compact, hide the rail with `.se-show-medium` and the body spans full width automatically. When `se-app-shell__content` is present, only the content scrolls — the header and footer are pinned at their natural heights.
946
960
 
947
961
  #### Canonical layouts
948
962
 
package/dist/layout.css CHANGED
@@ -306,11 +306,21 @@
306
306
  * height-constrained parent. Without this shell it collapses to zero height
307
307
  * in normal document flow.
308
308
  *
309
- * Usage:
309
+ * Pattern A — simple body (content directly in __body, body scrolls):
310
310
  * <div class="se-app-shell">
311
- * <nav class="se-nav-rail" aria-label="Main navigation">…</nav>
311
+ * <nav class="se-nav-rail">…</nav>
312
312
  * <main class="se-app-shell__body">…</main>
313
313
  * </div>
314
+ *
315
+ * Pattern B — fixed header + scrollable content + fixed footer:
316
+ * <div class="se-app-shell">
317
+ * <nav class="se-nav-rail">…</nav>
318
+ * <div class="se-app-shell__body">
319
+ * <header class="se-app-bar">…</header>
320
+ * <main class="se-app-shell__content">…</main>
321
+ * <footer class="se-toolbar se-toolbar--docked">…</footer>
322
+ * </div>
323
+ * </div>
314
324
  */
315
325
  .se-app-shell {
316
326
  display: flex;
@@ -320,6 +330,15 @@
320
330
  }
321
331
 
322
332
  .se-app-shell__body {
333
+ flex: 1 1 0;
334
+ display: flex;
335
+ flex-direction: column;
336
+ overflow-y: auto; /* scrolls all children when no __content child is used */
337
+ min-width: 0;
338
+ }
339
+
340
+ /* Scrollable middle region — use alongside a fixed header and/or footer */
341
+ .se-app-shell__content {
323
342
  flex: 1 1 0;
324
343
  overflow-y: auto;
325
344
  min-width: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skagerakenergi/design",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "author": "Chris Aurora Neumann Ruud <chrisauroraneumann.ruud@skagerakenergi.no>",
5
5
  "description": "Skagerak Energi design system — M3 component library (CSS only)",
6
6
  "type": "module",