@pienter/ui 0.13.0 → 0.14.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
@@ -2,6 +2,42 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.14.0 - 2026-09-15
6
+
7
+ ### Changed
8
+
9
+ - `AppLayout`'s main region is now the scrollport. The shell is one viewport
10
+ tall (`100dvh`), `.pui-app-layout__main` takes the height left under the
11
+ header and scrolls with `overflow: auto`, and the document never scrolls.
12
+ The header and navigation rail lose their `position: sticky`; they simply
13
+ stay put. This gives a page a definite height to work against: a sticky
14
+ pagination or action band pins to the region's bottom edge, a `1fr` row
15
+ takes the real leftover space, and a short page no longer grows a scrollbar
16
+ to fit a sticky aside. `overscroll-behavior-block: contain` on the region
17
+ keeps an iOS rubber-band from dragging the whole shell, and a print rule
18
+ (`block-size: auto`, `overflow: visible`) prints the whole page rather than
19
+ one screenful.
20
+
21
+ Consumer-visible: anything that scrolled the window must now scroll the
22
+ region. Vue Router's `scrollBehavior` only scrolls the window, so return
23
+ `false` from it and set `main.scrollTop` yourself on route change (and on
24
+ back, if you restore); move a `scroll-padding-block-end` for sticky bands
25
+ from `html` to `<main>`, and drop any `scroll-padding-block-start` for the
26
+ header, which is now outside the scrollport. A sticky band pins at the
27
+ region's content edge, inside its padding, so a page that ends in one
28
+ sets `--pui-app-layout-main-padding` with a `0` block-end instead of
29
+ pulling the band down with a negative margin. Fragment links to targets
30
+ inside the region keep working natively. Escape hatch, one line:
31
+ `.pui-app-layout { block-size: auto; min-block-size: 100dvh }` makes the
32
+ document the scrollport again (pin the header yourself if you want it
33
+ fixed).
34
+ ### Added
35
+
36
+ - `sidebar-left` and `sidebar-right` icons: a panel outline with the divider on
37
+ the left or the right, for toggling a side column. `sidebar-left` is
38
+ Feather's `sidebar`; `sidebar-right` is its mirror on the same 24px grid.
39
+
40
+
5
41
  ## 0.13.0 - 2026-09-15
6
42
 
7
43
  ### Added
package/CONVENTIONS.md CHANGED
@@ -1424,6 +1424,13 @@ Pinned upstream SHAs used across the table:
1424
1424
  `Index`, `RecordForm`, and `RecordDetails` compose existing primitives. Consumers
1425
1425
  register routes and supply endpoint-specific data functions, rendering and actions.
1426
1426
 
1427
+ They render inside `AppLayout`, whose main region is the scrollport: the shell
1428
+ is `100dvh` tall, `<main>` scrolls, the document does not. Page-level bands
1429
+ (`position: sticky`) and leftover-height rows (`1fr`) inside a page therefore
1430
+ resolve against a definite height. Scroll-to-top on navigation,
1431
+ `scroll-padding` for sticky bands and scroll restoration target that region,
1432
+ not the window; the AppLayout audit lists what a consumer wires.
1433
+
1427
1434
  Index accepts `load(query, { signal })`, `columns` and `queryOptions`. It owns
1428
1435
  query state, rows, metadata, loading, failures and retry. Search is debounced;
1429
1436
  search/filter/sort/page-size changes reset page to 1. New requests and unmount
@@ -2,7 +2,7 @@
2
2
  .pui-app-layout {
3
3
  display: grid;
4
4
  grid-template-rows: auto minmax(0, 1fr);
5
- min-block-size: 100vh;
5
+ block-size: 100dvh;
6
6
 
7
7
  & .pui-app-layout__skip-link {
8
8
  position: fixed;
@@ -33,9 +33,6 @@
33
33
  }
34
34
 
35
35
  & .pui-app-layout__header {
36
- position: sticky;
37
- inset-block-start: 0;
38
- z-index: var(--layer-4);
39
36
  display: flex;
40
37
  align-items: center;
41
38
  gap: var(--space-s);
@@ -60,6 +57,7 @@
60
57
  & .pui-app-layout__body {
61
58
  display: grid;
62
59
  grid-template-columns: auto minmax(0, 1fr);
60
+ grid-template-rows: minmax(0, 1fr);
63
61
  min-block-size: 0;
64
62
  }
65
63
 
@@ -69,8 +67,12 @@
69
67
 
70
68
  & .pui-app-layout__main {
71
69
  display: grid;
72
- grid-template-rows: minmax(0, 1fr);
70
+ /* minmax(auto, 1fr): a page fills the region and grows past it. */
71
+ grid-template-rows: 1fr;
73
72
  min-inline-size: 0;
73
+ min-block-size: 0;
74
+ overflow: auto;
75
+ overscroll-behavior-block: contain;
74
76
  padding: var(
75
77
  --pui-app-layout-main-padding,
76
78
  var(--space-m) var(--space-l) var(--space-xl)
@@ -91,14 +93,6 @@
91
93
  flex-shrink: 0;
92
94
  }
93
95
 
94
- @media (min-width: 48em) {
95
- & .pui-app-layout__navigation {
96
- position: sticky;
97
- inset-block-start: var(--space-2xl);
98
- block-size: calc(100vh - var(--space-2xl));
99
- }
100
- }
101
-
102
96
  @media (max-width: 47.999em) {
103
97
  & .pui-app-layout__drawer-toggle {
104
98
  display: inline-flex;
@@ -111,5 +105,13 @@
111
105
  );
112
106
  }
113
107
  }
108
+
109
+ @media print {
110
+ block-size: auto;
111
+
112
+ & .pui-app-layout__main {
113
+ overflow: visible;
114
+ }
115
+ }
114
116
  }
115
117
  }
package/icons/index.ts CHANGED
@@ -41,6 +41,8 @@ import send from './send.js';
41
41
  import settings from './settings.js';
42
42
  import tool from './tool.js';
43
43
  import trash from './trash.js';
44
+ import sidebarLeft from './sidebar-left.js';
45
+ import sidebarRight from './sidebar-right.js';
44
46
 
45
47
  export const icons = {
46
48
  info: info,
@@ -86,6 +88,8 @@ export const icons = {
86
88
  settings: settings,
87
89
  tool: tool,
88
90
  trash: trash,
91
+ 'sidebar-left': sidebarLeft,
92
+ 'sidebar-right': sidebarRight,
89
93
  } as const;
90
94
 
91
95
  export type IconName = keyof typeof icons;
@@ -0,0 +1 @@
1
+ export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><path d="M9 3v18"/></svg>';
@@ -0,0 +1 @@
1
+ export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><path d="M15 3v18"/></svg>';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pienter/ui",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Shared Pienter UI components, styles, icons, and browser utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",