fold-ng 0.5.2 → 0.6.1

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
@@ -8,6 +8,123 @@ All notable changes to **fold-ng** are documented here. The format follows
8
8
 
9
9
  _Nothing yet._
10
10
 
11
+ ## [0.6.1] - 2026-07-28
12
+
13
+ ### Changed
14
+
15
+ - **`fold-tab-panel` now owns the vertical rhythm between its children.** It was
16
+ a neutral `display: block` with no spacing, so stacked `fold-page-section`s (or
17
+ cards) inside a panel sat flush against each other — the page gap only reaches
18
+ the _direct_ children of `.page-body`, and a tab panel isn't one. A panel is a
19
+ content region, like `.page-body`, so it now lays its children out as a flex
20
+ column with a `gap`. The gap is the new **`--fold-panel-gap`** token — fluid
21
+ `16 → 24px`, deliberately one notch tighter than `--fold-page-gap` (`20 → 32px`)
22
+ so panel content reads as one screen rather than distinct page bands. Escape
23
+ hatch unchanged from `.page-body`: wrap two elements in a container to tighten
24
+ them (a single child gets no gap at all). Consumers that re-established this
25
+ spacing by hand on the panel can drop it.
26
+
27
+ ### Fixed
28
+
29
+ - **`fold-page-layout` header no longer starves the title/description on narrow
30
+ screens.** The head was a permanent `space-between` row: the actions slot held
31
+ its intrinsic width (`flex: none`) while the text column carried `min-width: 0`,
32
+ so wide `[pageActions]` (e.g. two full-label buttons) squeezed the description
33
+ down to its longest word — one word per line, stacked vertically. Below `640px`
34
+ the head now stacks: title/description take the full width and the actions drop
35
+ onto their own row beneath. Keyed to **both** the viewport (`@media`) and an
36
+ ancestor container (`@container`, for the gallery's responsive preview), mirroring
37
+ `app-shell`. The actions slot also gained `flex-wrap` so several wide buttons
38
+ wrap among themselves instead of overflowing the gutter.
39
+
40
+ ## [0.6.0] - 2026-07-28
41
+
42
+ ### Added
43
+
44
+ - **Larger spacing tokens: `--fold-space-{2xl,3xl,4xl,5xl}`** (24 · 32 · 40 ·
45
+ 48px) — the 4px-grid scale extended upward for section padding, page gaps and
46
+ hero bands (it capped at `xl` 20px). Catalogued (`FoldSpaceToken`) + contract-
47
+ tested. A new `pnpm run lint:spacing` gate **fails** on any bare raw-px
48
+ `padding`/`margin`/`gap` under `src/components` (var() theming defaults and
49
+ ≤2px hairlines excepted); wired into pre-push + CI, alongside the now-enforced
50
+ `api:check`.
51
+ - **`fold-icon` gains a `tone` input** (`primary` · `secondary` · `muted` ·
52
+ `faded`) — a semantic tint for the icon. Unset (default) keeps the current
53
+ behaviour: the icon inherits `currentColor`, matching its context. Set it to
54
+ override, so a consumer tints an icon through the primitive's own input instead
55
+ of reaching in with a colour class. Exposes the `FoldIconTone` type.
56
+ - **Two new UI icons: `archive` and `filter`** — stroke glyphs (`currentColor`),
57
+ the primitives a back-office table toolbar reaches for. Note the existing
58
+ `more-vertical` already covers the "kebab" ⋮ menu trigger.
59
+ - **Public-API surface guard** (`scripts/gen-api-surface.ts` +
60
+ `API-SURFACE.md` + `api-surface.spec.ts`, scripts `api:surface` / `api:check`).
61
+ Snapshots every exported symbol and every `input`/`model`/`output` of every
62
+ exported class; the spec fails when the live surface drifts. This catches the
63
+ binding breaks a consumer's plain `tsc` cannot see — Angular templates aren't
64
+ type-checked by `tsc` — forcing an intentional CHANGELOG entry + bump.
65
+
66
+ ### Fixed
67
+
68
+ - **`fold-tab-panel` now defaults to `display: block`** (was the custom-element
69
+ default `inline`). An inline panel wrapping block content broke height
70
+ propagation inside a bounded, scrolling `fold-page-layout` — a tall tabbed page
71
+ (e.g. a form split across tabs) stopped scrolling. The `[hidden]` state is
72
+ re-asserted so inactive panels still collapse.
73
+
74
+ ### Changed
75
+
76
+ - **BREAKING — `fold-menu`: `expanded` defaults to `undefined` (unset) and now
77
+ follows `collapsible`.** `<fold-menu collapsible>` boots **expanded** (you
78
+ added a way to collapse, so open is the natural start) and a bare `<fold-menu>`
79
+ boots the icon rail — no `[(expanded)]` needed for the common case. A bound
80
+ value still wins. The model type widened to `boolean | undefined`, so a
81
+ two-way `[(expanded)]="sig"` needs `sig: WritableSignal<boolean | undefined>`
82
+ (or drop the binding and lean on the default). Fixes the DX trap where
83
+ `collapsible` booted collapsed (dev-rule 5.2.4).
84
+ - **BREAKING — `fold-tabs`: `activeKey` is now a two-way `model`; the `tabChange`
85
+ output is removed.** Migrate `[activeKey]="k()" (tabChange)="k.set($event)"` →
86
+ `[(activeKey)]="k"` (or keep one-way `[activeKey]` and listen to the model's
87
+ built-in `(activeKeyChange)`). One source of selection, no twin output (dev-rule
88
+ 4.12).
89
+ - **BREAKING — `fold-view-nav`: `activeKey` is now a two-way `model`; the
90
+ `activeChange` output is removed.** Same migration as `fold-tabs`
91
+ (`[(activeKey)]`, or `(activeKeyChange)`). Link items are unaffected (their
92
+ active state comes from the router).
93
+ - **BREAKING — `fold-data-table`: `selected` is now a two-way `model`; the
94
+ `selectionChange` output is removed.** Migrate `[selected]="s()"
95
+ (selectionChange)="onSel($event)"` → `[(selected)]="s"` (or one-way `[selected]`
96
+ - `(selectedChange)`). The change payload is now `ReadonlySet<string | number>`
97
+ (was `Set`) — widen your handler's parameter type.
98
+ - **Spacing rhythm fully tokenised** — every bare raw-px `padding`/`margin`/`gap`
99
+ in `src/components` (136 declarations) now resolves through a `--fold-space-*`
100
+ token. Exact-grid values are renamed 1:1 (no visual change); off-grid drift
101
+ (6/10/14/18/26…) is snapped to the nearest step (max ±2px). Computed pixels are
102
+ unchanged except for the snapped off-grid handful. Themeable component defaults
103
+ keep their px inside `var(--fold-<component>-*, …)` fallbacks.
104
+ - **`fold-paginator`: `pageSize` is now optional** — when omitted it defaults to
105
+ the first of `pageSizeOptions`, so the common case needs only `currentPage` +
106
+ `totalItems`. Non-breaking (a passed `pageSize` behaves as before).
107
+ - **`fold-page-section`: `title` now renders a real `<h2>`** — a genuine section
108
+ heading under the page's `<h1>`, replacing the decorative `fold-element-title`
109
+ eyebrow. `headingLevel` still drives `aria-level` (a native `<h2>` at the
110
+ default 2). New `[sectionHeader]` slot projects a bespoke header (e.g. a
111
+ `fold-element-title` with an icon tile) _instead of_ `title`, and a new
112
+ `iconTone` input (forwarded to `fold-icon`'s `tone`; defaults to `secondary`)
113
+ tints the leading icon. The section's vertical rhythm (head↔body gap + the
114
+ `stack` body's item gap) is now a single token, `--fold-page-section-gap`
115
+ (default the `lg` space). Visual change to every section header.
116
+ - **`fold-page-layout` gutter & gap defaults are now fluid.** They gain a real
117
+ home in `:root` (they were fixed inline fallbacks of `32px`):
118
+ `--fold-page-gutter: clamp(1rem, 4vw, 2rem)` (16→32px) and
119
+ `--fold-page-gap: clamp(1.25rem, 3vw, 2rem)` (20→32px) — the gutter scales more
120
+ than the gap (horizontal room is tighter on small screens). Override on any
121
+ ancestor (or the element) to retune; set `--fold-page-gutter: 32px` to restore
122
+ the old fixed value. Requires `fold-ng/tokens.css` (components fall back to
123
+ `32px` without it).
124
+ - **`pnpm release` now regenerates the demo's generated changelog** after
125
+ stamping `CHANGELOG.md`, so the gallery no longer shows a just-cut version
126
+ under "Unreleased" in local dev (Pages already regenerated on deploy).
127
+
11
128
  ## [0.5.2] - 2026-07-27
12
129
 
13
130
  ### Added
@@ -533,7 +650,9 @@ design-token stylesheet.
533
650
  `currentColor`; `prefers-reduced-motion` + `forced-colors` are respected;
534
651
  strings localise via inputs / providers (`provideFoldPanelLabels`).
535
652
 
536
- [unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.5.2...HEAD
653
+ [unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.6.1...HEAD
654
+ [0.6.1]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.6.1
655
+ [0.6.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.6.0
537
656
  [0.5.2]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.2
538
657
  [0.5.1]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.1
539
658
  [0.5.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.0