@skagerakenergi/design 0.9.0 → 0.11.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 +24 -6
- package/dist/layout.css +41 -8
- package/package.json +1 -1
package/INSTRUCTIONS.md
CHANGED
|
@@ -928,21 +928,39 @@ Provides spacing utilities, breakpoint classes, responsive margins, an app shell
|
|
|
928
928
|
|
|
929
929
|
#### App shell
|
|
930
930
|
|
|
931
|
-
Implements the M3
|
|
931
|
+
Implements the M3 window structure: optional full-width header/footer + nav rail + scrollable body. Required whenever `se-nav-rail` is used.
|
|
932
932
|
|
|
933
|
+
**Pattern A — nav + body only**:
|
|
933
934
|
```html
|
|
934
935
|
<div class="se-app-shell">
|
|
935
|
-
<
|
|
936
|
-
|
|
936
|
+
<div class="se-app-shell__row">
|
|
937
|
+
<nav class="se-nav-rail" aria-label="Main navigation">…</nav>
|
|
938
|
+
<main class="se-app-shell__body">…</main>
|
|
939
|
+
</div>
|
|
940
|
+
</div>
|
|
941
|
+
```
|
|
942
|
+
|
|
943
|
+
**Pattern B — full-width header + nav + body + full-width footer**:
|
|
944
|
+
```html
|
|
945
|
+
<div class="se-app-shell">
|
|
946
|
+
<header class="se-app-bar">…</header>
|
|
947
|
+
<div class="se-app-shell__row">
|
|
948
|
+
<nav class="se-nav-rail" aria-label="Main navigation">…</nav>
|
|
949
|
+
<main class="se-app-shell__body">
|
|
950
|
+
<div class="se-layout-list-detail">…</div>
|
|
951
|
+
</main>
|
|
952
|
+
</div>
|
|
953
|
+
<footer class="se-toolbar se-toolbar--docked">…</footer>
|
|
937
954
|
</div>
|
|
938
955
|
```
|
|
939
956
|
|
|
940
957
|
| Class | Properties |
|
|
941
958
|
|-------|-----------|
|
|
942
|
-
| `.se-app-shell` | `display: flex; height: 100dvh; overflow: hidden` —
|
|
943
|
-
| `.se-app-
|
|
959
|
+
| `.se-app-shell` | `display: flex; flex-direction: column; height: 100dvh; overflow: hidden` — column flex shell |
|
|
960
|
+
| `.se-app-shell__row` | `display: flex; flex: 1 1 0; min-height: 0; overflow: hidden` — row region containing nav + body |
|
|
961
|
+
| `.se-app-shell__body` | `flex: 1 1 0; overflow-y: auto; min-width: 0` — scrollable content area |
|
|
944
962
|
|
|
945
|
-
|
|
963
|
+
`se-app-shell` stacks header / row / footer as a column at full width. `se-app-shell__row` arranges nav and body side by side and fills all remaining height. On compact, hide the rail with `.se-show-medium` and the body spans the full row. Canonical layouts placed directly inside `se-app-shell__body` work unchanged — they are independent of the shell.
|
|
946
964
|
|
|
947
965
|
#### Canonical layouts
|
|
948
966
|
|
package/dist/layout.css
CHANGED
|
@@ -297,28 +297,61 @@
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
/* ── App Shell —
|
|
300
|
+
/* ── App Shell — Window structure ── */
|
|
301
301
|
/*
|
|
302
|
-
* Implements the M3 window structure:
|
|
303
|
-
*
|
|
302
|
+
* Implements the M3 window structure: full-width header/footer + nav region
|
|
303
|
+
* (nav rail/drawer) + body region (content) side by side.
|
|
304
304
|
*
|
|
305
305
|
* Required for se-nav-rail: the rail uses height: 100% and needs a
|
|
306
|
-
* height-constrained parent. Without this shell it collapses to zero
|
|
307
|
-
* in normal document flow.
|
|
306
|
+
* height-constrained parent (__row). Without this shell it collapses to zero
|
|
307
|
+
* height in normal document flow.
|
|
308
308
|
*
|
|
309
|
-
*
|
|
309
|
+
* Pattern A — nav + body only (no header/footer):
|
|
310
310
|
* <div class="se-app-shell">
|
|
311
|
-
* <
|
|
312
|
-
*
|
|
311
|
+
* <div class="se-app-shell__row">
|
|
312
|
+
* <nav class="se-nav-rail">…</nav>
|
|
313
|
+
* <main class="se-app-shell__body">…</main>
|
|
314
|
+
* </div>
|
|
313
315
|
* </div>
|
|
316
|
+
*
|
|
317
|
+
* Pattern B — full-width header + nav + body + full-width footer:
|
|
318
|
+
* <div class="se-app-shell">
|
|
319
|
+
* <header class="se-app-bar">…</header>
|
|
320
|
+
* <div class="se-app-shell__row">
|
|
321
|
+
* <nav class="se-nav-rail">…</nav>
|
|
322
|
+
* <main class="se-app-shell__body">…</main>
|
|
323
|
+
* </div>
|
|
324
|
+
* <footer class="se-toolbar se-toolbar--docked">…</footer>
|
|
325
|
+
* </div>
|
|
326
|
+
*
|
|
327
|
+
* Pattern C — no nav rail (body fills full row width):
|
|
328
|
+
* <div class="se-app-shell">
|
|
329
|
+
* <header class="se-app-bar">…</header>
|
|
330
|
+
* <div class="se-app-shell__row">
|
|
331
|
+
* <main class="se-app-shell__body">…</main>
|
|
332
|
+
* </div>
|
|
333
|
+
* <footer>…</footer>
|
|
334
|
+
* </div>
|
|
335
|
+
*
|
|
336
|
+
* Canonical layouts (se-layout-list-detail, etc.) can be placed directly
|
|
337
|
+
* inside se-app-shell__body — they work as normal block/grid content.
|
|
314
338
|
*/
|
|
315
339
|
.se-app-shell {
|
|
316
340
|
display: flex;
|
|
341
|
+
flex-direction: column;
|
|
317
342
|
height: 100vh; /* fallback for older browsers */
|
|
318
343
|
height: 100dvh; /* excludes mobile browser chrome (address bar) */
|
|
319
344
|
overflow: hidden;
|
|
320
345
|
}
|
|
321
346
|
|
|
347
|
+
/* Row region — nav + body side by side; fills all remaining vertical space */
|
|
348
|
+
.se-app-shell__row {
|
|
349
|
+
display: flex;
|
|
350
|
+
flex: 1 1 0;
|
|
351
|
+
min-height: 0; /* required: allows flex children to shrink below content height */
|
|
352
|
+
overflow: hidden; /* required: gives se-nav-rail a height-constrained parent */
|
|
353
|
+
}
|
|
354
|
+
|
|
322
355
|
.se-app-shell__body {
|
|
323
356
|
flex: 1 1 0;
|
|
324
357
|
overflow-y: auto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skagerakenergi/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|