fold-ng 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/CHANGELOG.md +97 -1
- package/README.md +2 -0
- package/fesm2022/fold-ng.mjs +2744 -2499
- package/fesm2022/fold-ng.mjs.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/tmp-esm2022/tsconfig.lib.tsbuildinfo +1 -1
- package/types/fold-ng.d.ts +189 -26
- package/types/fold-ng.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,101 @@ All notable changes to **fold-ng** are documented here. The format follows
|
|
|
8
8
|
|
|
9
9
|
_Nothing yet._
|
|
10
10
|
|
|
11
|
+
## [0.10.0] - 2026-08-11
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **BREAKING — `fold-file-dropzone` defaults to English copy.** `label` was
|
|
16
|
+
`"Glissez un fichier ou parcourez"` and `busyLabel` `"Téléversement en
|
|
17
|
+
cours…"`; they are now `"Drag a file or browse"` and `"Uploading…"`. Both were
|
|
18
|
+
always inputs, so the fix for a French app is to pass the old strings — but a
|
|
19
|
+
library that defaults to one natural language makes every other consumer
|
|
20
|
+
override it just to be readable, which is the portability promise leaking. It
|
|
21
|
+
was the last of the seven release blockers in `docs/RELEASE-READINESS.md`.
|
|
22
|
+
|
|
23
|
+
- **BREAKING — identical toasts collapse instead of stacking.** A `show()` whose
|
|
24
|
+
message _and_ variant match a toast already on screen now folds into it as a
|
|
25
|
+
`×N` tally and restarts its countdown, rather than queueing a copy: a retry
|
|
26
|
+
loop used to bury the screen under the same sentence. Opt out with
|
|
27
|
+
`provideFoldToasts({ dedupe: false })`. `FoldToast` gained a required
|
|
28
|
+
`repeats` field, so anything constructing that type by hand must supply it.
|
|
29
|
+
|
|
30
|
+
- **`FoldToastService.show()` returns the toast's id** (it returned `void`). The
|
|
31
|
+
id was generated and thrown away, which made a sticky "Uploading…" impossible
|
|
32
|
+
to close from the code that opened it. A deduped call returns the id of the
|
|
33
|
+
toast it folded into. Ids now come from `FoldIdService`'s counter rather than
|
|
34
|
+
`crypto.randomUUID()`, which **throws outright** in a non-secure context
|
|
35
|
+
(plain http off localhost) and whose randomness bought nothing for an id that
|
|
36
|
+
only has to be unique within one queue.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **`fold-info` — the `i` that answers "what is this?", now a primitive.** The
|
|
41
|
+
affordance shipped inlined in the field label row; it is extracted so the same
|
|
42
|
+
bubble works where there is no field at all — a dashboard card's corner, a
|
|
43
|
+
table header — which is exactly where the second consumer had hand-rolled it
|
|
44
|
+
(LaFolieDouce's admin: ~30 sites across the growth dashboard and the booking
|
|
45
|
+
rules). `text` · `label` (accessible name, English default) · `placement`.
|
|
46
|
+
`fold-input-base` now composes it instead of carrying its own copy, so the
|
|
47
|
+
`info` input on every labelled field renders the same component. A click, not
|
|
48
|
+
a hover: hover-only help is unreachable on a touch screen.
|
|
49
|
+
|
|
50
|
+
- **`maxVisible` bounds the toast stack.** Beyond the cap the oldest toast is
|
|
51
|
+
evicted — it has been on screen longest, so it is the one already read. Unset
|
|
52
|
+
(the default) stays unbounded. Deliberately eviction and not a waiting queue:
|
|
53
|
+
a queue only drains when a visible toast leaves, and a sticky one — an
|
|
54
|
+
`error`, by default — never does, so the backlog would sit behind it forever.
|
|
55
|
+
|
|
56
|
+
- **`fold-toast` pauses its countdown while it is being read.** Hovering the
|
|
57
|
+
toast, or moving the keyboard focus into it, freezes the auto-dismiss timer;
|
|
58
|
+
leaving resumes it with **the time that was left**, not a fresh `duration` —
|
|
59
|
+
a toast that renewed itself on every mouse pass would never leave. Focus
|
|
60
|
+
moving between the message and the close button counts as staying inside.
|
|
61
|
+
This is WCAG 2.2.1 (Timing Adjustable): the previous timer ran regardless, so
|
|
62
|
+
a message could expire mid-sentence, or while the pointer was travelling to
|
|
63
|
+
its ✕. The paused state is exposed as `data-paused` for styling.
|
|
64
|
+
|
|
65
|
+
- **`info` on every labelled input — the explanation a `hint` can't carry.** An
|
|
66
|
+
`i` button at the end of the label line reveals a sentence or two in a
|
|
67
|
+
`fold-popover`. Lives in `fold-input-base`, so it lands on the whole family at
|
|
68
|
+
once: `fold-input`, `fold-number-input`, `fold-select`, `fold-textarea`,
|
|
69
|
+
`fold-date`, `fold-time`, `fold-listbox`, `fold-multiselect` (`[info]`, plus
|
|
70
|
+
`[infoLabel]` for the button's accessible name, default `More information`).
|
|
71
|
+
Composes with `hint` rather than replacing it — short line under the control,
|
|
72
|
+
the _why_ behind the `i`. The panel rides the popover's native top layer, so a
|
|
73
|
+
long explanation never pushes the next control down, and it escapes any
|
|
74
|
+
`overflow: hidden`. Consumers were hand-rolling this: LaFolieDouce B2B had a
|
|
75
|
+
bespoke absolutely-positioned bubble anchored to each field wrapper.
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
|
|
79
|
+
- **Opening a panel no longer shoves the page sideways.** The main content
|
|
80
|
+
jumped left by the panel's width and eased back — a long-standing glitch whose
|
|
81
|
+
cause turned out to be neither of the two suspects (an inner scrollbar, a
|
|
82
|
+
`backdrop-filter` repaint). Measured frame by frame: a panel begins its enter
|
|
83
|
+
animation parked off-edge at `translateX(100%)`, the dock did not clip, so the
|
|
84
|
+
parked panel joined the positioned host's **scrollable overflow**
|
|
85
|
+
(`scrollWidth` 960 → 1221 on the gallery); the focus trap then moved focus into
|
|
86
|
+
it and the browser scrolled the host sideways to reveal it
|
|
87
|
+
(`scrollLeft` 0 → 261); the slide-in shrank the overflow again and the scroll
|
|
88
|
+
was clamped back frame by frame, hence the eased return. Fixed with
|
|
89
|
+
`overflow: clip` on the dock — a parked panel has no business in anyone's
|
|
90
|
+
scrollable overflow — plus `focus({ preventScroll: true })` when a focus trap
|
|
91
|
+
activates, since entering an overlay must never scroll the page behind it.
|
|
92
|
+
`e2e/panel.spec.ts` samples the whole animation and fails on any sideways
|
|
93
|
+
scroll; jsdom cannot see this class of bug at all.
|
|
94
|
+
|
|
95
|
+
- **A horizontal tab bar that doesn't fit now scrolls instead of clipping its
|
|
96
|
+
tail.** `fold-view-nav` and `fold-tabs` share a bar whose host clipped its
|
|
97
|
+
overflow while its items never wrap — so on a phone, the last entries of a
|
|
98
|
+
four-item `size="comfortable"` bar simply vanished, and with them any way of
|
|
99
|
+
reaching those pages. The host now scrolls on the inline axis (thin house
|
|
100
|
+
scrollbar, `overscroll-behavior-x: contain`) and the bar keeps its natural
|
|
101
|
+
width. Vertical rails are untouched — the page scroll already covers them, and
|
|
102
|
+
an inner scroll box there would trap the wheel — and so is `collapsed`, the
|
|
103
|
+
icon accordion, which is designed to fit any width and needs its overflow
|
|
104
|
+
visible for its tooltips.
|
|
105
|
+
|
|
11
106
|
## [0.9.0] - 2026-08-04
|
|
12
107
|
|
|
13
108
|
### Changed
|
|
@@ -1263,7 +1358,8 @@ design-token stylesheet.
|
|
|
1263
1358
|
`currentColor`; `prefers-reduced-motion` + `forced-colors` are respected;
|
|
1264
1359
|
strings localise via inputs / providers (`provideFoldPanelLabels`).
|
|
1265
1360
|
|
|
1266
|
-
[unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.
|
|
1361
|
+
[unreleased]: https://github.com/hugoheynard/fold-ng/compare/v0.10.0...HEAD
|
|
1362
|
+
[0.10.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.10.0
|
|
1267
1363
|
[0.9.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.9.0
|
|
1268
1364
|
[0.8.1]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.8.1
|
|
1269
1365
|
[0.8.0]: https://github.com/hugoheynard/fold-ng/releases/tag/v0.8.0
|
package/README.md
CHANGED
|
@@ -310,6 +310,7 @@ ships it.
|
|
|
310
310
|
| a **"delete X" danger block** (type-to-confirm) | `fold-danger-zone` (alert frame + blast-radius text + retype-to-arm) |
|
|
311
311
|
| a **status / count pill** · status→colour | `fold-badge` · `fold-status-badge` |
|
|
312
312
|
| a **tinted message / alert** row | `fold-callout` (`inset` for in-flow) |
|
|
313
|
+
| a **"what is this?"** help bubble | `fold-info` (the `i` → popover; also the `info` input on every labelled field) |
|
|
313
314
|
| a transient **toast** | `fold-toast` + `FoldToastService` |
|
|
314
315
|
| a **card** · titled info card · page **splash** | `fold-card` · `fold-context-card` · `fold-hero-section` (bordered → `fold-hero-card`) |
|
|
315
316
|
| in-page **tabs** · a routed **nav bar** · a segmented control | `fold-tabs` · `fold-view-nav` · `fold-view-toggle` / `fold-choice-row` |
|
|
@@ -385,6 +386,7 @@ ships it.
|
|
|
385
386
|
| `FoldPanelFooterComponent` | `fold-panel-footer` | Panel/dialog action bar pairing with `fold-panel-header`: tokenised top border + padding + `align="end" \| "between" \| "start"`. Projects the buttons; sits `flex: none` so it stays pinned to the panel bottom while the body scrolls (no `position: sticky`). |
|
|
386
387
|
| `FoldPopoverComponent` | `fold-popover` | Anchored floating layer — projected content in the native top layer (escapes `overflow`/`z-index`), positioned by a dependency-free **flip → size → shift** engine (`computePlacement`): a tall panel gets a `max-height` and scrolls inside the viewport. `[(open)]`; `autoUpdate` (ResizeObserver); optional `arrow`; native CSS enter/exit (`@starting-style` + `allow-discrete`); outside-click + `Escape` dismissal, focus-return, auto-wired `aria-haspopup`/`expanded`/`controls`. |
|
|
387
388
|
| `FoldDropdownComponent` | `fold-dropdown` | Actions menu on `fold-popover` — `role="menu"` with `<fold-dropdown-item>`s, ↑/↓ roving, `Home`/`End`, type-ahead; opens onto the first enabled item, closes returning focus to the trigger. Give the trigger `foldPopoverTrigger="menu"`. |
|
|
389
|
+
| `FoldInfoComponent` | `fold-info` | The small `i` that answers "what is this?" — a quiet round trigger revealing a sentence or two in a `fold-popover` (native top layer, so it escapes `overflow: hidden` and every `z-index`). A **click**, not a hover: hover-only help is unreachable by touch. `text` · `label` (accessible name) · `placement`. It is what the `info` input on every labelled field renders, and it stands alone where there is no field — a card corner, a table header. |
|
|
388
390
|
|
|
389
391
|
| `FoldCalendarMonthComponent` | `fold-calendar-month` | Month grid where events **span** the days they cover: a date-axis `role="grid"` with one roving tab stop, and over it a lane-packed layer of bands (one per week crossed, with open edges). `+N` chips sit on the crowded day, not at the end of the row. |
|
|
390
392
|
| `FoldCalendarWeekComponent` | `fold-calendar-week` | Seven day columns of stacked chips — nothing spans, so nothing is clipped and every chip is a real button in the tab order. Container-queried: labels and icons drop out before they truncate. |
|