fold-ng 0.5.1 → 0.6.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 +119 -1
- package/fesm2022/fold-ng.mjs +300 -183
- package/fesm2022/fold-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/scales.css +7 -0
- package/tokens/semantic.css +12 -0
- package/types/fold-ng.d.ts +147 -68
- package/types/fold-ng.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,122 @@ All notable changes to **fold-ng** are documented here. The format follows
|
|
|
8
8
|
|
|
9
9
|
_Nothing yet._
|
|
10
10
|
|
|
11
|
+
## [0.6.0] - 2026-07-28
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Larger spacing tokens: `--fold-space-{2xl,3xl,4xl,5xl}`** (24 · 32 · 40 ·
|
|
16
|
+
48px) — the 4px-grid scale extended upward for section padding, page gaps and
|
|
17
|
+
hero bands (it capped at `xl` 20px). Catalogued (`FoldSpaceToken`) + contract-
|
|
18
|
+
tested. A new `pnpm run lint:spacing` gate **fails** on any bare raw-px
|
|
19
|
+
`padding`/`margin`/`gap` under `src/components` (var() theming defaults and
|
|
20
|
+
≤2px hairlines excepted); wired into pre-push + CI, alongside the now-enforced
|
|
21
|
+
`api:check`.
|
|
22
|
+
- **`fold-icon` gains a `tone` input** (`primary` · `secondary` · `muted` ·
|
|
23
|
+
`faded`) — a semantic tint for the icon. Unset (default) keeps the current
|
|
24
|
+
behaviour: the icon inherits `currentColor`, matching its context. Set it to
|
|
25
|
+
override, so a consumer tints an icon through the primitive's own input instead
|
|
26
|
+
of reaching in with a colour class. Exposes the `FoldIconTone` type.
|
|
27
|
+
- **Two new UI icons: `archive` and `filter`** — stroke glyphs (`currentColor`),
|
|
28
|
+
the primitives a back-office table toolbar reaches for. Note the existing
|
|
29
|
+
`more-vertical` already covers the "kebab" ⋮ menu trigger.
|
|
30
|
+
- **Public-API surface guard** (`scripts/gen-api-surface.ts` +
|
|
31
|
+
`API-SURFACE.md` + `api-surface.spec.ts`, scripts `api:surface` / `api:check`).
|
|
32
|
+
Snapshots every exported symbol and every `input`/`model`/`output` of every
|
|
33
|
+
exported class; the spec fails when the live surface drifts. This catches the
|
|
34
|
+
binding breaks a consumer's plain `tsc` cannot see — Angular templates aren't
|
|
35
|
+
type-checked by `tsc` — forcing an intentional CHANGELOG entry + bump.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **`fold-tab-panel` now defaults to `display: block`** (was the custom-element
|
|
40
|
+
default `inline`). An inline panel wrapping block content broke height
|
|
41
|
+
propagation inside a bounded, scrolling `fold-page-layout` — a tall tabbed page
|
|
42
|
+
(e.g. a form split across tabs) stopped scrolling. The `[hidden]` state is
|
|
43
|
+
re-asserted so inactive panels still collapse.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **BREAKING — `fold-menu`: `expanded` defaults to `undefined` (unset) and now
|
|
48
|
+
follows `collapsible`.** `<fold-menu collapsible>` boots **expanded** (you
|
|
49
|
+
added a way to collapse, so open is the natural start) and a bare `<fold-menu>`
|
|
50
|
+
boots the icon rail — no `[(expanded)]` needed for the common case. A bound
|
|
51
|
+
value still wins. The model type widened to `boolean | undefined`, so a
|
|
52
|
+
two-way `[(expanded)]="sig"` needs `sig: WritableSignal<boolean | undefined>`
|
|
53
|
+
(or drop the binding and lean on the default). Fixes the DX trap where
|
|
54
|
+
`collapsible` booted collapsed (dev-rule 5.2.4).
|
|
55
|
+
- **BREAKING — `fold-tabs`: `activeKey` is now a two-way `model`; the `tabChange`
|
|
56
|
+
output is removed.** Migrate `[activeKey]="k()" (tabChange)="k.set($event)"` →
|
|
57
|
+
`[(activeKey)]="k"` (or keep one-way `[activeKey]` and listen to the model's
|
|
58
|
+
built-in `(activeKeyChange)`). One source of selection, no twin output (dev-rule
|
|
59
|
+
4.12).
|
|
60
|
+
- **BREAKING — `fold-view-nav`: `activeKey` is now a two-way `model`; the
|
|
61
|
+
`activeChange` output is removed.** Same migration as `fold-tabs`
|
|
62
|
+
(`[(activeKey)]`, or `(activeKeyChange)`). Link items are unaffected (their
|
|
63
|
+
active state comes from the router).
|
|
64
|
+
- **BREAKING — `fold-data-table`: `selected` is now a two-way `model`; the
|
|
65
|
+
`selectionChange` output is removed.** Migrate `[selected]="s()"
|
|
66
|
+
(selectionChange)="onSel($event)"` → `[(selected)]="s"` (or one-way `[selected]`
|
|
67
|
+
- `(selectedChange)`). The change payload is now `ReadonlySet<string | number>`
|
|
68
|
+
(was `Set`) — widen your handler's parameter type.
|
|
69
|
+
- **Spacing rhythm fully tokenised** — every bare raw-px `padding`/`margin`/`gap`
|
|
70
|
+
in `src/components` (136 declarations) now resolves through a `--fold-space-*`
|
|
71
|
+
token. Exact-grid values are renamed 1:1 (no visual change); off-grid drift
|
|
72
|
+
(6/10/14/18/26…) is snapped to the nearest step (max ±2px). Computed pixels are
|
|
73
|
+
unchanged except for the snapped off-grid handful. Themeable component defaults
|
|
74
|
+
keep their px inside `var(--fold-<component>-*, …)` fallbacks.
|
|
75
|
+
- **`fold-paginator`: `pageSize` is now optional** — when omitted it defaults to
|
|
76
|
+
the first of `pageSizeOptions`, so the common case needs only `currentPage` +
|
|
77
|
+
`totalItems`. Non-breaking (a passed `pageSize` behaves as before).
|
|
78
|
+
- **`fold-page-section`: `title` now renders a real `<h2>`** — a genuine section
|
|
79
|
+
heading under the page's `<h1>`, replacing the decorative `fold-element-title`
|
|
80
|
+
eyebrow. `headingLevel` still drives `aria-level` (a native `<h2>` at the
|
|
81
|
+
default 2). New `[sectionHeader]` slot projects a bespoke header (e.g. a
|
|
82
|
+
`fold-element-title` with an icon tile) _instead of_ `title`, and a new
|
|
83
|
+
`iconTone` input (forwarded to `fold-icon`'s `tone`; defaults to `secondary`)
|
|
84
|
+
tints the leading icon. The section's vertical rhythm (head↔body gap + the
|
|
85
|
+
`stack` body's item gap) is now a single token, `--fold-page-section-gap`
|
|
86
|
+
(default the `lg` space). Visual change to every section header.
|
|
87
|
+
- **`fold-page-layout` gutter & gap defaults are now fluid.** They gain a real
|
|
88
|
+
home in `:root` (they were fixed inline fallbacks of `32px`):
|
|
89
|
+
`--fold-page-gutter: clamp(1rem, 4vw, 2rem)` (16→32px) and
|
|
90
|
+
`--fold-page-gap: clamp(1.25rem, 3vw, 2rem)` (20→32px) — the gutter scales more
|
|
91
|
+
than the gap (horizontal room is tighter on small screens). Override on any
|
|
92
|
+
ancestor (or the element) to retune; set `--fold-page-gutter: 32px` to restore
|
|
93
|
+
the old fixed value. Requires `fold-ng/tokens.css` (components fall back to
|
|
94
|
+
`32px` without it).
|
|
95
|
+
- **`pnpm release` now regenerates the demo's generated changelog** after
|
|
96
|
+
stamping `CHANGELOG.md`, so the gallery no longer shows a just-cut version
|
|
97
|
+
under "Unreleased" in local dev (Pages already regenerated on deploy).
|
|
98
|
+
|
|
99
|
+
## [0.5.2] - 2026-07-27
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
|
|
103
|
+
- **`fold-listbox` gains a `selectionChange: T` output** — fires when the user
|
|
104
|
+
picks an option, carrying the chosen value and **never `null`**. Use it for
|
|
105
|
+
the common "do X on selection" case to skip the `T | null` narrowing that
|
|
106
|
+
`[(value)]` / `valueChange` force on every handler. Clearing the value (the ×
|
|
107
|
+
affordance) does not fire it — observe `value` / `valueChange` for that.
|
|
108
|
+
- **`fold-range-slider` gains a `rangeChange: FoldRangeValue` output** — the same
|
|
109
|
+
ergonomics for ranges: fires on a thumb drag with the resolved `{ min, max }`,
|
|
110
|
+
never `undefined`.
|
|
111
|
+
|
|
112
|
+
### Changed
|
|
113
|
+
|
|
114
|
+
- **`fold-card` `separators` / `raisedBands` accept a boolean shorthand.** On top
|
|
115
|
+
of the `FoldCardBandChrome` enum (`none`/`header`/`footer`/`both`), a bare
|
|
116
|
+
attribute (`<fold-card separators>`) or `[separators]="true"` now means `both`,
|
|
117
|
+
and `false` means `none` — the idiomatic Angular boolean-attribute ergonomics,
|
|
118
|
+
while the enum stays for per-band control. Exposes `foldCardBandChrome` (the
|
|
119
|
+
coercion fn) and `FoldCardBandChromeInput`.
|
|
120
|
+
- **`pnpm release` gates the full suite (incl. `test:e2e`) locally before
|
|
121
|
+
tagging.** Release tags are protected/immutable, so a tag pushed for a build
|
|
122
|
+
that then fails CI burns that version number (how `0.5.0` was lost). The
|
|
123
|
+
release script now runs `lint · tsc · strictTemplates · vitest · test:e2e`
|
|
124
|
+
(installing Chromium first) up front — a red build aborts with nothing bumped
|
|
125
|
+
or tagged.
|
|
126
|
+
|
|
11
127
|
## [0.5.1] - 2026-07-27
|
|
12
128
|
|
|
13
129
|
First published 0.5.x — same tree as the (unpublished, e2e-gated) v0.5.0 tag with the release e2e locator scoped to the first control.
|
|
@@ -505,7 +621,9 @@ design-token stylesheet.
|
|
|
505
621
|
`currentColor`; `prefers-reduced-motion` + `forced-colors` are respected;
|
|
506
622
|
strings localise via inputs / providers (`provideFoldPanelLabels`).
|
|
507
623
|
|
|
508
|
-
[unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.
|
|
624
|
+
[unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.6.0...HEAD
|
|
625
|
+
[0.6.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.6.0
|
|
626
|
+
[0.5.2]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.2
|
|
509
627
|
[0.5.1]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.1
|
|
510
628
|
[0.5.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.5.0
|
|
511
629
|
[0.4.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.4.0
|