@dloizides/ui-forms 1.34.1 → 1.35.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
@@ -1,532 +1,533 @@
1
- # Changelog
2
-
3
- ## [Unreleased]
4
-
5
- ### Added
6
- - `SearchSelect`: type to filter by name and detail, Recent then All, arrow keys + Enter + Esc, phone sheet / computer unfold, reduced motion = no slide (FINREG-INPUTS-1 "Searchable dropdowns, shared country field, formatted IBAN/BIC inputs").
7
- - `CountryField` + `COUNTRIES` (ISO 3166-1 alpha-2, 249): drawn SVG flag (`CountryFlag`, needs peer `react-native-svg >=13.0.0`), name, grey code; stores the code only.
8
- - `SearchSelect`: `renderDetail` slot, typing highlights the first match, web outside press closes the dropdown; `IbanInput` keeps the caret through regrouping.
9
- - `IbanInput` / `BicInput` + pure `validateIban` / `validateBic` / `draftIban` / `draftBic`, same verdicts as `Finreg.Core.Banking` on a shared fixture list.
10
-
11
- ### Changed
12
- - `suggestOptions` also matches an option's `detail` (ranked last).
13
-
14
- ## 1.32.0
15
-
16
- KEFI-LAUNCH-1 "Do every open Kefi task" (UI-COMPOSE-1 extraction from kefi-web landing parity).
17
-
18
- - New `AddOnRequest`: an optional field group, an Add button until asked for or filled, then the children and a Remove button. Labels and hints are pre-localized props; testIDs `<testID>-add` / `<testID>-remove`. `isAddOnOpen` exported.
19
- - New `FixBar`: a pre-localized message (alert, error ink from the theme) naming the fields that stop the save, and a Show button; renders nothing at count 0. testIDs `<testID>-count` / `<testID>-show`. `isFixBarVisible` exported.
20
-
21
- ## 1.30.0
22
-
23
- FINREG-DATE-2 "Every FinReg date field uses the shared input".
24
-
25
- - `DateRangeControl` renders the shared `DateField` for From and To (DATE-INPUT-1): on web each side is a real `type="date"` input. Props and testIDs unchanged.
26
- - `DateField` / `DateTimeField` accept an optional `placeholder` (native text input only).
27
- - New `FormStack`: a vertical form column whose `gap` owns the rhythm, so nested `Field`s drop their bottom margin.
28
- - New `ResponsiveFormLayout` (`narrow` / `wide` / `breakpoint`, default 768) and `isWideFormLayout`.
29
-
30
- ## 1.29.0
31
-
32
- FINREG-BRAND-1 "Logo without its background and one palette from the logo": error and status TEXT reads `semanticText` when the theme provides it, readable in dark mode. Unchanged without it.
33
-
34
- ## 1.28.2
35
-
36
- INVOICE-FU-22 "To and Cc dropdown of saved people".
37
-
38
- - A `SelectControl` without `menuAnchor` sets `aria-haspopup="menu"`, matching its `role=menu` popup; with `menuAnchor` it stays `"listbox"`.
39
-
40
- ## 1.28.1
41
-
42
- INVOICE-FU-22 "To and Cc dropdown of saved people".
43
-
44
- - Every `SelectControl` trigger sets `aria-haspopup="listbox"`, which `useEscapeKey` in `ui-layout` reads to give Escape to the open menu.
45
-
46
- ## 1.28.0
47
-
48
- INVOICE-FU-22 "To and Cc dropdown of saved people", D-FU22-5 "Review findings are fixed in the packages".
49
-
50
- - `SelectControl` gains `menuAnchor` (`listboxLabel`, `anchorRef`): the menu stays on screen, focus stays on the trigger, arrows, Enter and Space work from it, and the trigger is a combobox with `aria-activedescendant`. Callers without it are unchanged.
51
- - `AnchoredMenu` gains `placement`; `AnchoredMenuListbox.highlightedValue` is optional.
52
- - `nextHighlight` is exported.
53
-
54
- ## 1.27.0
55
-
56
- DATE-INPUT-1 "Every date or date-time field uses the shared input".
57
-
58
- - New `DateField` (`YYYY-MM-DD`) and `DateTimeField` (`YYYY-MM-DDTHH:mm`), rendered through `Field`; a real `<input type>` on web.
59
-
60
- ## 1.26.0
61
-
62
- INVOICE-3 "Invoice interface over a user-chosen folder": owner picks.
63
-
64
- - `SelectControl` trigger fills with `surfaceElevated`, like an editable field, so it differs from read-only.
65
- - Read-only `useThemedInput` draws the rest border, so the box shows on a form of the same fill.
66
- - Placeholder is solid `textSecondary`: 0.6 alpha measured 2.38 against the 4.5 AA floor.
67
- - `FormField` gains `inputRef`.
68
-
69
- ## 1.25.0
70
-
71
- INVOICE-3 "Invoice interface over a user-chosen folder": extracted from invoice-web.
72
-
73
- - New `SelectField`: `Field` + `SelectControl`, its accessible name carries the selection.
74
-
75
- ## 1.24.0
76
-
77
- BEAD-3 "Report form: searchable pattern field": review fix.
78
-
79
- - New `useKeepInView(trigger)`, moved from Jinx: scrolls the returned view into sight each time `trigger` takes a new value, as far as needed and no further. Web only; a no-op on native.
80
-
81
- ## 1.23.0
82
-
83
- BEAD-3 "Report form: searchable pattern field and shared form feedback".
84
-
85
- - `TypeaheadControl` takes `search` instead of `options` for async results: `load(query, signal)`, `onPick(option | null)`, loading, empty and error text, 250 ms debounce, stale responses ignored, editing after a pick clears it.
86
- - `TypeaheadControl` is a WAI-ARIA combobox in both modes: Down, Up, Enter, Esc, `aria-activedescendant`, a ref to its input. Its rows change role from `menuitem` to `option`; testIDs are unchanged.
87
- - `ControlOption` gains an optional `detail`, shown under the title on a phone and beside it from 768 px.
88
- - `AnchoredMenu` fits its height above the on-screen keyboard through `visualViewport`; new `listbox` prop for listbox roles and a status line.
89
- - New `FormStatusLine` and `useFocusFirstInvalid`.
90
-
91
- ## 1.22.0
92
-
93
- KEFI-EDITOR-UI-2 "Extract stepper and upload-with-link field to @dloizides/ui-forms", extracted from kefi-web.
94
-
95
- - New `StepperTabs`, `StepperNav` and pure `resolveStepNeighbours`: step tabs sharing the row width, back and next under the step. Generic over the step key; every string is a prop.
96
- - New `UploadWithLinkField`: preview, an upload control slot and a link input revealed on request. The slot keeps ui-forms free of ui-media; pass `ImagePickerButton`.
97
-
98
- ## 1.20.0
99
-
100
- **Horizontal form fields line up (D-ALL-22 "Horizontal form fields are aligned").**
101
-
102
- - `FormGrid` rows set `alignItems: flex-start`: every cell starts on one top edge and a tall cell (hint, error) no longer stretches its neighbours.
103
- - New `AlignToControl`: an aria-hidden label line with the same font and spacing model as `Field`, so a button beside labelled fields sits on the input line, not the label line. `FormCell alignToControl` applies it to a cell.
104
- - New `InlineFieldRow` (extracted from kefi-web): a field and its action stacked below `inlineMinWidth` (default 1024) and on one row above it, the action placed by `AlignToControl` instead of a hand-measured offset.
105
-
106
- ## 1.18.7
107
-
108
- - Focused inputs draw the fleet focus ring (`@dloizides/design-tokens` 1.14 `FOCUS_RING`: 2 px solid outline, 2 px offset, contrast-checked colour; error colour when errored) instead of the 3 px 16% box-shadow halo (FOCUS-RING-1 "One focus ring across the shared kit").
109
-
110
- ## 1.18.6
111
-
112
- **ChipSelector: a short chip (e.g. "All") is at least 44 px wide, not only 44 px tall (KEFI-FIT-1 "kefi-web fit and hit-box fixes").**
113
-
114
- `chip` and `chipOutline` get `minWidth: 44` next to the existing `minHeight: 44`; measured 42x44 on kefi-web approvals at 360.
115
-
116
- ## 1.18.3
117
-
118
- **FormCheckbox: the hint/description is now announced by screen readers.**
119
-
120
- The hint Text gets a stable per-instance id (`useFieldIds().hintId`, as `Field` does) and the role=checkbox
121
- Pressable sets `aria-describedby` to it when a hint is present; with no hint the attribute is omitted.
122
-
123
- ## 1.18.2
124
-
125
- **FormSwitch: the switch now sits in a 44x44 (MIN_TOUCH_TARGET_PX) pressable slot on web.**
126
-
127
- Visual QA on kefi-web Site settings (360 and 1280) measured the switch at 40x20: react-native-web sizes the
128
- native input to the Switch root, and `hitSlop` is inert on web. The switch is now centred in a slot with
129
- `minWidth`/`minHeight` MIN_TOUCH_TARGET_PX inside the pressable row, so the row stays at least 44 tall even when a
130
- `containerStyle` overrides `minHeight`. The track and thumb are unchanged; the switch gains a few px of horizontal gutter.
131
- New testID: `<testID>-hitbox`.
132
-
133
- ## 1.17.0
134
-
135
- **Chips now have a 44px minimum touch target on web. `hitSlop` never did that — it is native-only.**
136
-
137
- `CHIP_HIT_SLOP` was documented as expanding the chip's touch area toward the WCAG ≥44px floor
138
- "without changing the rendered pill size". Measured in headless Chromium at 360x640 on 2026-09-21:
139
- a chip's box is 33px tall (`paddingVertical: 6`), and `document.elementFromPoint(68, 35)` — 5px
140
- above a top edge at y=40, inside `CHIP_HIT_SLOP.top: 10` — returns the PARENT element, not the
141
- chip. react-native-web 0.21.2 references `hitSlop` only inside the legacy `Touchable` mixin's
142
- press-RETENTION path (after the responder is already granted) and not at all in `Pressable`, so on
143
- web the rendered box is the entire tappable area. The chips were a 33px target in all seven portals.
144
-
145
- - `chipStyles.chip` and `chipStyles.chipOutline` gain `minHeight: 44` + `justifyContent: 'center'`.
146
- Chip width is unchanged (56.7px and 68px before and after for the same labels), so wrapping and
147
- `CHIP_GUTTER` spacing are untouched; a chip row grows 33px → 44px tall.
148
- - `CHIP_HIT_SLOP` is kept and still helps iOS/Android. Its doc comment now states the web result
149
- instead of claiming one.
150
- - Consumers with a dense chip strip should re-check row spacing: the pill itself is taller now.
151
-
152
- ## 1.15.0
153
-
154
- **`FormSwitch` now emits `aria-checked` / `aria-disabled` on web; `ChipSelector` gained an option icon slot and opt-in radio semantics.**
155
-
156
- `FormSwitch` (A11Y-ARIA-CHECKED-1): react-native-web 0.21 emits nothing from `accessibilityState` on web, so the
157
- switch wrapper rendered `role="switch"` with no `aria-checked` - an invalid switch that announced no state. The
158
- state is now passed as literal `aria-checked` (always) and `aria-disabled` (only when disabled) web props;
159
- `accessibilityState` also carries `disabled` for native.
160
-
161
- `ChipSelector`:
162
- - `ChipOption.icon?: React.ReactNode` - rendered before the label inside the chip, wrapped `aria-hidden`. Options
163
- without an icon render the exact same tree as before.
164
- - `singleSelectRole?: 'button' | 'radio'` (type `ChipSingleSelectRole`). Default `button` = unchanged. With
165
- `radio` and `multiple` unset, the group is `role="radiogroup"` and each chip `role="radio"` + `aria-checked`.
166
- Ignored for multi-select. Trade-off: RN-web renders a radio chip as a `<div>`, which activates on Enter but not
167
- Space and has no arrow-key roving focus.
168
-
169
- **Additive and backward-compatible.** No prop set = identical DOM for every existing consumer.
170
-
171
- ## 1.14.0
172
-
173
- **`FormField` gained an opt-in `recentKey` — remember the last N submitted values and offer them on focus.**
174
-
175
- A search / filter / lookup box that the user retypes the same handful of values into now gets a
176
- "recent values" dropdown for free. Set `recentKey="<namespace>"` on a `FormField` and the values it
177
- submits are remembered (per key) and surfaced in a menu on focus; picking one fills the input. A
178
- value is recorded on submit (Enter) **and** on blur-with-content, so both "hit enter" and "typed then
179
- moved on" are captured. The dropdown reuses the kit's `AnchoredMenu` (portalled to `document.body`, so
180
- it is never painted behind a table / card / the next field) with full a11y (menu name, per-row label +
181
- hint + role).
182
-
183
- Persistence is `localStorage` under `@dloizides/ui-forms:recent:<recentKey>`; the list de-dupes
184
- case-insensitively, promotes a repeat to the front, and caps at `recentMax` (default 10). On native /
185
- SSR / when storage is disabled it is a silent no-op (recents are always `[]`), and every storage
186
- access is wrapped so a quota or privacy-mode failure can never throw into render.
187
-
188
- **Additive and backward-compatible.** Leave `recentKey` unset — the default — and the field behaves
189
- exactly as before: nothing rendered, no state/refs/effects, no storage touched. NEVER set it on a
190
- password / secure field. The engine is also exported standalone as `useRecentValues(key, max?)` for
191
- bespoke recents surfaces, and `AnchoredMenu` gained an optional `accessibilityLabel` for naming the menu.
192
-
193
- ## 1.13.3
194
-
195
- **Placeholder text was too dark — it read like an already-filled value.**
196
-
197
- `useThemedInput` painted the placeholder with the theme's `textSecondary` — a deliberately
198
- dark, accessible grey (design-tokens UX-11) that also renders readable secondary *copy*. At
199
- full strength a placeholder (e.g. `follower` in a "Dance role" box) was hard to tell apart
200
- from entered text. It is now `textSecondary` composited toward the field background at 0.6
201
- alpha, so a hint reads clearly lighter than the solid entered text (`colors.text`) while
202
- keeping the theme hue — and it works in dark mode too (it composites toward whatever the
203
- field background is). The field's visible label still carries the accessible name, so this
204
- is a usability win, not an a11y regression. Affects every `@dloizides/ui-forms`-driven input
205
- (`FormField`, `Field`, `ThemedTextInput`, the `ui-tables` `Filters` search box) across all
206
- seven portals.
207
-
208
- ## 1.12.0
209
-
210
- **`FormField` gained `labelHidden` — hide the visible label, keep the accessible name.**
211
-
212
- A field whose placeholder already names it (a toolbar search box, an inline filter) does
213
- not want a stacked visible label: the label wastes a row and, worse, pushes the input a
214
- label-row lower than a bare button beside it, so the two misalign. Until now the only way
215
- to drop the visible label was to blank `label` — which ALSO blanked the input's
216
- `accessibilityLabel`, silently stripping the accessible name.
217
-
218
- `labelHidden` removes ONLY the visible `<label>` row: `label` stays required and the input
219
- keeps `accessibilityLabel={label}`, so a screen reader reads the same name and the field
220
- still resolves by role + name. Additive and backward-compatible — default `false`, every
221
- existing call renders unchanged.
222
-
223
- ## 1.11.1
224
-
225
- **`ThemedTextInput` shipped no metrics, so every direct caller got a raw 19px input.**
226
-
227
- It documented itself as "the ONE source of truth for the input look" while shipping
228
- only **colours** — no border, radius, padding or height. `FormField` quietly passed its
229
- own private duplicate of those metrics, so anything reached *through* `FormField` looked
230
- correct and the gap was invisible. Every **direct** caller — the documented, blessed
231
- usage — got a raw browser input.
232
-
233
- Measured live in the Digital Kin CMS before: **10/10 inputs below the 48px floor**, text
234
- inputs 19px, textareas 38px. After: **0/10**, at 48/96px.
235
-
236
- **Label association was absent entirely** (0 `label[for]`, 0 ids). Two defects only a
237
- real browser could find, both fixed here:
238
-
239
- - **`htmlFor` is silently dropped by react-native-web** — it is not on the prop
240
- allowlist, the same family as the dropped `accessibilityHint`. A prop-level assertion
241
- passes against the broken build; only a DOM-level test catches it, so that is what the
242
- new tests assert.
243
- - **Dangling `for`.** `Field` assumed render-function children place the id they are
244
- handed, but `SelectControl` uses `aria-labelledby` instead — so the difficulty label
245
- shipped `for="field-control-3"` pointing at **nothing**, passing every structural check
246
- while focusing no field. `useHtmlFor` now sets `for` only when the target is genuinely
247
- in the document.
248
-
249
- > ⚠️ **Cross-fleet visual change.** `controlStyles.input` gaining `minHeight: 48` lifts
250
- > dense filter inputs and select triggers in `aml-v2`/`agora-web` from ~38-41px to 48px.
251
- > This cannot be avoided: the input floor is what fixes the 19px defect, and nothing
252
- > fixes that without also lifting inputs that already had padding. Owner-approved.
253
-
254
-
255
- ## 1.9.0
256
-
257
- **Campaign F3 — `Field`'s spacing model, and the layout primitives.** `Field` hard-coded a 16px
258
- bottom margin on its container. That is the pre-flexbox model — the CHILD owns the space after
259
- itself — and in a `gap`-laid-out parent, which is how every modern form row in this fleet is
260
- written, the margin STACKS on the parent's gap. So consumers cancelled it by hand: **16
261
- `containerStyle={{ marginBottom: 0 }}` sites across the fleet**, 13 of them in aml-v2, each with an
262
- apologetic comment. AML v1 got this right in CSS years ago (`.ui-field { display: flex;
263
- flex-direction: column; gap: 6px; }`) and wrote the contract down in `shared/FORMS.md`.
264
-
265
- **This release moves NO pixels for any existing consumer.** The fix is opt-in, not a 2.0.0 — see
266
- "Why not a major bump" below.
267
-
268
- - **Add `FormGrid` + `FormCell`** — the wrapping form row, extracted from the copy the fleet
269
- re-declares verbatim (`{ flexDirection: 'row', flexWrap: 'wrap', gap: 12 }` +
270
- `{ minWidth: 220, flexGrow: 1, flexBasis: 260 }`), with the min-width/basis parameterised. Cell
271
- metrics live on the GRID, so the common call site is a bare `<FormCell>` and only the genuine
272
- one-offs (`<FormCell basis={160} grow={false} minWidth={140}>`) carry props.
273
- - **Add `FormSection`** — the fieldset/legend grouping only v1 had. react-native-web has no
274
- `fieldset` mapping, so this is the ARIA equivalent: `role="group"` + `aria-labelledby` pointing
275
- at the legend. The legend reuses `resolveLabelVariantStyle` — the SAME function `Field` uses — so
276
- a section heading cannot drift into a third label voice.
277
- - **Add `Field.spacing` (`'stack' | 'gap'`)** — the two spacing models. `stack` is the historical
278
- 16px margin + 4px child margins, byte-identical to 1.8.0, and remains the default. `gap` is the
279
- FORMS.md contract: no bottom margin, one uniform 6px internal gap, parent owns the rhythm.
280
- - **`Field` inside a `FormGrid` or `FormSection` resolves to `gap` automatically.** Adopting the
281
- shared grid IS the opt-in: a consumer deletes its hand-rolled `grid`/`field` styles AND its
282
- `marginBottom: 0` cancel in the same edit. An explicit `spacing` prop beats the context in both
283
- directions.
284
- - **`ChipSelector`**: the chip row now spaces with `gap: 8` instead of per-chip margins plus a
285
- compensating `marginBottom: -8`. Rendered box is byte-identical. Also gains a `spacing`
286
- passthrough, and `containerStyle` widens to `StyleProp<ViewStyle>` to match `Field`'s.
287
-
288
- ### Why not a major bump
289
-
290
- The brief for this work allowed a breaking 2.0.0. It was rejected. Switching every `Field` to the
291
- gap model in one publish moves pixels on every form in seven portals simultaneously — which is
292
- precisely the change you cannot visually QA, because no app remains on the old behaviour to compare
293
- against, and a regression surfaces as "some form somewhere looks slightly wrong" with seven
294
- suspects. The context-aware opt-in gives the identical end state via a per-app rollout, each step
295
- behind visual QA, with `git revert` scoped to one app. The cost is that both models live in the
296
- code until the fleet has migrated; that is a smaller price than an un-QA-able fleet-wide pixel
297
- change.
298
-
299
- ### Correction to the campaign premise
300
-
301
- `ChipSelector`'s `marginBottom: -CHIP_GUTTER` was documented — and briefed — as compensation for
302
- `Field`'s 16px margin, load-bearing enough that changing one without the other would break chip
303
- spacing in 7+ sites. **That was wrong.** The -8 cancelled the chips' OWN bottom gutter hanging off
304
- the last wrapped row; it behaved identically whatever `Field` contributed. It has been replaced with
305
- `gap` regardless, because a margin/negative-margin pair is fragile and leaks a negative margin onto
306
- the block's box. `fieldSpacing.test.tsx` now pins `Field` and `ChipSelector` to the same box in both
307
- models, so the relationship is checkable rather than folkloric.
308
-
309
-
310
- ## 1.8.0
311
-
312
- **Campaign F2 — the dense CONTROLS arrive.** `@dloizides/ui-tables` shipped a complete, themed,
313
- a11y-wired set of form controls inside its `Filters` bar and exported NONE of them: its
314
- `src/index.ts` exposed only `Filters`, `useFilterDraft`, `suggestOptions`, `isUnmatched` and
315
- types. Six portals could SEE those controls working and none could import them, so the fleet
316
- reimplemented them — **6 independent select implementations, 5 date fields, 2 typeaheads**. Same
317
- shape as `MultiTenancy.EntityFrameworkCore` shipping no EF Core. This release makes them public.
318
-
319
- Nothing here moves a pixel for an existing consumer: the metrics are the promoted originals,
320
- unchanged. `CONTAINER_MARGIN_BOTTOM` and `ChipSelector`'s compensating `marginBottom:
321
- -CHIP_GUTTER` remain deliberately untouched.
322
-
323
- - **Add `SelectControl`** — single-select enum/status dropdown. Bordered trigger + chevron opening
324
- the shared `AnchoredMenu`.
325
- - **Add `TypeaheadControl`** — search-as-you-type combobox (aml-v2's CountryPicker, generalized).
326
- Free typing is preserved (the value is raw text the caller normalises at query time); picking a
327
- suggestion fills the canonical LABEL, not the value.
328
- - **Add `DateRangeControl`** — inclusive from/to pair. Editing one side patches ONLY that side.
329
- - **Add `AnchoredMenu`** — the floating option list both of the above compose. Kept in-tree with
330
- NO `ui-layout` dependency; that was a considered choice in `ui-tables` and it still holds, since
331
- depending on the higher-level `ModalDropdown` would invert the graph for every consumer.
332
- - **Add `controlStyles`** — the tuned metrics, promoted verbatim. `ui-tables`' `Filters/styles.ts`
333
- said the quiet part out loud in its own header: it "reconcile[d] the per-field styles that were
334
- copy-pasted across aml-v2's filter files into one shared source" — and then locked the
335
- reconciliation inside one bar where no other surface could reach it.
336
- - **Add `suggestOptions` / `isUnmatched`** — the ranked substring matcher behind the typeahead.
337
- - **Add `ControlOption` / `DateRangeValue`** types. `ui-tables` now ALIASES its long-standing
338
- public `FilterOption` / `DateRangeValue` onto these, so there is one definition rather than two
339
- structurally-compatible twins free to drift.
340
-
341
- ### The controls are LABEL-FREE, on purpose
342
-
343
- They render the control only. Compose them inside `Field` — with `labelVariant="control"` on a
344
- dense surface — to get the label, hint and error slots. That is what retires `ui-tables`' private
345
- `FieldShell` fork (see `@dloizides/ui-tables` 1.14.0) and leaves ONE label implementation for
346
- every control instead of one per control.
347
-
348
- ### i18n: this package still never calls `t`
349
-
350
- Every string — `accessibilityLabel`, `placeholder`, `optionHint`, `error`, `fromLabel`/`toLabel`
351
- — is a PRE-LOCALIZED prop. This is load-bearing, not stylistic: aml-v2 localizes through
352
- `@dloizides/i18n` with positional `{0}` while the other six portals use i18next `{{p1}}`, so a
353
- component that localized internally could not serve both. `SelectControl`'s `accessibilityLabel`
354
- is therefore composed BY THE CALLER — it must carry the selection ("Status: Active", not
355
- "Status"), and building that string needs a `t` call this package must not make.
356
-
357
- ### Fixed — a WCAG defect carried in by the promoted code
358
-
359
- `AnchoredMenu` marked the current option with `accessibilityState={{ selected }}` alone.
360
- **react-native-web does not read `accessibilityState` at all** (verified against
361
- `react-native-web@0.21`'s `createDOMProps`, which enumerates `aria-selected` /
362
- `accessibilitySelected` and never `accessibilityState`), so on web the selected option was
363
- distinguished by colour and font-weight ONLY — no screen reader could tell which option was
364
- current (WCAG 1.4.1, use of colour). `aria-selected` is now passed alongside, so each platform
365
- gets the channel it honours. The trigger already paired `aria-expanded` with `accessibilityState`;
366
- the option row was simply missed when that was done. A test asserts it, and that test FAILED
367
- before the fix.
368
-
369
- ## 1.7.0
370
-
371
- Additive wave implementing the shared cross-stack forms contract now written down at
372
- `PROOViD/AMLService/AMLService/wwwroot/shared/FORMS.md`. **Nothing in this release moves a pixel
373
- for an existing consumer**: every addition is opt-in and every default is the previous behaviour.
374
- `CONTAINER_MARGIN_BOTTOM` and `ChipSelector`'s compensating `marginBottom: -CHIP_GUTTER` are
375
- deliberately untouched — they are load-bearing and move together in a later, visual-QA-gated wave.
376
-
377
- - **Add `FormActions` — the submit/cancel row.** Promoted from the BYTE-IDENTICAL
378
- `erevna-web/src/components/Forms/FormActions.tsx` and `katalogos-web/.../FormActions.tsx`
379
- (68 lines each; `diff` returns nothing). All seven portals hand-roll this row; aml-v2, agora,
380
- kefi, ichnos and zygos each inline their own variant. The primary action is LAST in DOM order so
381
- tab reaches Cancel before Save, and `saving` drives the primary button's spinner rather than
382
- disabling-and-relabelling it. `saveDisabled` blocks Save WITHOUT blocking Cancel — an invalid
383
- form stays escapable. testIDs default to the twins' `save-button` / `cancel-button`, so existing
384
- Playwright selectors keep matching.
385
- - **`Field` gains `hint`.** ~21 hand-rolled copies of `{fontSize:12, marginTop:4, color:
386
- textSecondary}` exist across the fleet; aml-v2 alone declares a local `hint` style in 8 files.
387
- Because `Field` had no hint slot, consumers rendered the hint as a SIBLING, where it lands past
388
- the container's 16px bottom margin and detaches from the control it explains (see the apologetic
389
- comment in `aml-v2/src/screens/screening/CoverageSelector.tsx`). The hint renders UNDER the
390
- control and ABOVE the error, and hint and error COEXIST — both are reachable from the control via
391
- a composed `aria-describedby` (hint id then error id, in reading order). Only the error is a
392
- `role="alert"` live region; a hint that announced itself would interrupt on every focus.
393
- - **`Field` gains `optional` + `optionalLabel`.** Mutually exclusive with `required`; when a caller
394
- sets both, `required` WINS — the safe direction, since an under-marked required field sends the
395
- user into a failed submit. Enforced at runtime in `resolveFieldMarker` rather than in the type
396
- system, so a caller spreading a computed props object still gets a defined single-marker result
397
- instead of a compile error it cannot act on. Like the asterisk, the optional text is decorative
398
- (`aria-hidden`) — "optional" is the ABSENCE of `aria-required`, which assistive tech already
399
- conveys.
400
- - **`Field` gains `labelVariant` (+ `labelStyle` as the escape hatch).** `Field` hard-coded
401
- 13/600/sentence-case, which is exactly why kefi-web refused it and why `@dloizides/ui-tables`'
402
- private `FieldShell` forked to 11/700/uppercase. `labelVariant` makes the contract's TWO
403
- legitimate voices first-class and named: `field` (13/600 sentence case — a label that is READ)
404
- and `control` (11/700 UPPERCASE + letter-spacing — a label that is SCANNED, for dense filter bars
405
- and toolbars). An absent variant resolves to `field`, so every existing consumer renders
406
- byte-identically. `labelStyle` applies AFTER the variant for the genuine one-off.
407
- - **`Field`'s `containerStyle` widens `ViewStyle` -> `StyleProp<ViewStyle>`.** The narrow type was a
408
- documented pain: `aml-v2/src/screens/leaders/CountryPicker.tsx` has to build a COMPLETE style per
409
- variant because it cannot compose an array.
410
- - **`useThemedInput`: a focused errored field now keeps a RED focus ring.** It previously computed
411
- `isFocused && !hasError`, so an errored field got NO focus ring at all — removing the focus
412
- indicator (WCAG 2.4.7) from precisely the field the user was sent back to fix, at the moment they
413
- are most likely navigating by keyboard. It now always rings on focus and only changes the ring's
414
- COLOUR, matching v1's `input.invalid:focus { box-shadow: 0 0 0 3px var(--danger-tint) }`.
415
- One pre-existing test necessarily changed: it asserted `boxShadow === 'none'` for this state,
416
- i.e. it encoded the defect as intended behaviour.
417
- - **New peer dependency `@dloizides/ui-buttons >= 1.4.0`**, required by `FormActions` so the estate
418
- keeps exactly one button implementation rather than forking one here.
419
- - No i18n runtime is introduced: all user-visible copy (`saveLabel`, `cancelLabel`, `optionalLabel`,
420
- `hint`, `error`) arrives pre-localized. aml-v2 localizes via `@dloizides/i18n` with positional
421
- `{0}` params while the other six apps use i18next `{{p1}}`, and nothing bridges them, so a
422
- component that localized internally could not serve both.
423
- - Also shipping in this tarball, from a CONCURRENT workstream (commit `13bd281`, not part of this
424
- wave): `ChipSelector` gains `chipTestIDPrefix`, `optionAccessibilityHint` and `multiple`
425
- toggle semantics, and reads its on-primary ink from the theme's `onBrand` scale instead of a
426
- hardcoded `#fff`. All opt-in; the `chip-selector-chip-<value>` testID default is frozen.
427
-
428
- ## 1.6.0
429
-
430
- - **`ChipSelector` now composes `Field` internally — its label was drifting.** It rendered its OWN
431
- `<Text>` label whose metrics differed from `Field`'s on three of four axes: `marginBottom: 8`
432
- (vs 4), NO `fontSize` at all so it fell back to RN's ~14 (vs 13), and `colors.text`
433
- (vs `textSecondary`). A `ChipSelector` next to a `FormField` in a row/grid therefore started a
434
- different distance down the column and read as a different weight of text. Found at 4 sites in
435
- aml-v2 (`TenantWatchlistsEditor`, `CoverageSelector`, `CustomCoverageFields`,
436
- `AdvancedMatching`); fixing it in the package fixes every consumer with zero app churn.
437
- The local label styles are deleted — there is now exactly one label implementation in the kit.
438
- - **`ChipSelectorProps` is unchanged and fully backward-compatible** — every existing prop keeps
439
- its name, type and default, and `label` stays OPTIONAL. With no label (or an empty one) NO label
440
- row is rendered, so composing `Field` cannot introduce a phantom gap above the chips.
441
- - **`ChipSelector` gains `required`, `error` and `testID`** (all optional, all additive) now that
442
- `Field` provides them for free. `error` renders the same `role="alert"` line as `FormField` and
443
- is tied to the chip group via `aria-describedby` + `aria-invalid` (web only; no-op on native).
444
- - **Spacing:** a `ChipSelector` now carries `Field`'s `marginBottom: 16` like every other field
445
- (it previously had none). The chips' own 8px trailing gutter is cancelled on the group so the
446
- block's total bottom spacing is exactly 16 — the same as a `FormField`, not 24. Pass
447
- `containerStyle` to override, as before.
448
- - **`Field`'s `label` is now optional** (widened from `label: string`, so existing callers are
449
- unaffected). An absent or empty label renders no label row, letting a control whose label lives
450
- elsewhere still use the shared shell for its error line and spacing.
451
- - `FormSwitch` / `FormCheckbox` are deliberately NOT changed — see `src/labelRoles.test.tsx`.
452
- Their labels are INLINE control labels (beside the control in a row, the row's primary text),
453
- not field headers stacked above a control, so they have no alignment defect to fix and `Field`'s
454
- smaller/dimmer header treatment would be a regression. They were already identical to each
455
- other; a new test now enforces that they stay so.
456
-
457
- ## 1.5.0
458
-
459
- - **Add `Field` — the generic label-over-control wrapper.** `FormField` is hard-wired to a text
460
- input (`FormFieldProps extends Omit<TextInputProps,'style'>`), so any NON-text control (a
461
- dropdown, a date picker, a chip selector) had no shared way to get a label — and ended up
462
- visually misaligned next to its `FormField` siblings: the control's box started ~21px higher
463
- (no label row) and it missed `FormField`'s `marginBottom: 16`, so wrapped rows lost their
464
- vertical rhythm. This was hand-rolled in 5 places across zygos-web and aml-v2.
465
- `Field` takes `{ label, required?, error?, children, containerStyle?, testID? }` and renders the
466
- same label row / required mark / error line / spacing.
467
- - **`FormField` now composes `Field` internally**, so the two can never drift apart — the metrics
468
- live in exactly one place. `FormFieldProps` and every rendered attribute (`form-field-input`
469
- testID, `aria-invalid` / `aria-describedby` / `aria-required`, the `role="alert"` error line)
470
- are unchanged: fully backward-compatible.
471
- - `Field`'s `children` may be a plain node (the common case) or a render function receiving
472
- `{ describedById, hasError }`, so a custom control can wire the error line into its own
473
- `aria-describedby` / invalid state exactly the way `FormField` does.
474
-
475
- ## 1.4.0
476
-
477
- - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
478
- - `FormField`: the error message is now programmatically tied to the input — the input gets
479
- `aria-invalid` when errored and `aria-describedby` pointing at the error line (which is a
480
- `role="alert"` live region), and `aria-required` when `required`. The required `*` is marked
481
- decorative (`aria-hidden` / `accessibilityElementsHidden`) so a screen reader hears "required"
482
- (via `aria-required`) instead of "star".
483
- - `ThemedTextInput`: new optional `describedById` + `requiredField` props forward
484
- `aria-describedby` / `aria-required`, and it emits `aria-invalid` from `hasError` (web only;
485
- no-ops on native). Existing callers are unaffected.
486
- - `FormCheckbox`: now keyboard-operable — the `role="checkbox"` Pressable renders a `<div>`
487
- (no free Enter/Space), so an explicit web-only Enter/Space handler toggles it (WCAG 2.1.1).
488
- - `ChipSelector`: chips gain a `hitSlop` so the touch target reaches ~44px WITHOUT changing the
489
- rendered pill size, and expose `accessibilityState.disabled` when the selector is disabled.
490
- - `useThemedInput`: the focus/hover CSS transition now collapses to instant when the user
491
- requests `prefers-reduced-motion: reduce` (WCAG 2.3.3, web only).
492
-
493
- ## 1.3.0
494
-
495
- - `ChipSelector` gains a `variant` prop (`'solid' | 'outline'`, default `'solid'`). `solid` is the
496
- original filled-pill look (selected = solid brand fill, white ink) — existing consumers
497
- (erevna / katalogos / kefi) render **identically**, no change. `outline` is the AML v1 console
498
- look: an outlined pill on a muted fill where the **selected** state is a subtle tinted-outline
499
- (brand border + brand ink + a low-alpha brand wash), NOT a solid fill; on web, hover lifts the
500
- border + ink to the brand colour. Fully theme-driven (brand colour + alpha, border/text from the
501
- theme), so it re-themes per tenant. Additive + backward-compatible.
502
-
503
- ## 1.2.0
504
-
505
- - Add `ThemedTextInput` + `useThemedInput` — the shared "readable + lively" text-input treatment,
506
- driven entirely by the active theme (re-themes per tenant, no hard-coded hex). At rest: dark
507
- readable text on a subtle off-white surface with a soft border. On hover (web): the border
508
- strengthens a touch. On focus: the border becomes the brand primary, the background brightens to
509
- the plain surface (white), and a soft 3px brand-tinted focus ring fades in. The animation is a
510
- pure GPU-cheap CSS transition on `border-color`/`background-color`/`box-shadow` (the ring is a
511
- `box-shadow`, so no layout/reflow) — NO `Animated`/`LayoutAnimation`/JS timers. Web-only style
512
- keys and the mouse-hover handlers are guarded behind `Platform.OS === 'web'`, so it stays
513
- native-safe (native applies the state-driven colours instantly).
514
- - `FormField` now renders `ThemedTextInput`, so every field gets the treatment for free; its label
515
- uses `textSecondary` at 13px/600 for readability. Props/behaviour (label, hint, error, testID,
516
- a11y, `onFocus`/`onBlur` pass-through) are backward-compatible.
517
-
518
- ## 1.1.0
519
-
520
- - Add `FormCheckbox` — a native-safe (`Pressable`-based, RN-web + native) themed checkbox: a rounded
521
- square that fills with the brand colour and shows a check glyph when on, with a label and optional
522
- hint. Mirrors `FormSwitch`'s prop shape (`value`, `onValueChange`/`onChange`, `label`, `hint`,
523
- `disabled`, `testID`, a11y) so it is a drop-in for boolean toggles that should read as checkboxes.
524
- Exposes `role="checkbox"` + `aria-checked` / `accessibilityState={{ checked }}`.
525
-
526
- ## 1.0.0
527
-
528
- Initial release. Extracted the proven duplicated form components from erevna-web ↔ katalogos-web
529
- (Capability Wave C1, batch 2).
530
-
531
- - `FormField`, `ChipSelector`, `FormSwitch` — share the `@dloizides/ui-feedback` UI context (`useUi`).
532
- - `FormActions` deferred (depends on a not-yet-shared `core/Button`).
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ### Added
6
+ - `ChipOption.labelWrap` (`'none' | 'wrap' | 'truncate'`, default `none` = unchanged): `wrap` and `truncate` cap a chip at its container width so a long label never runs past its card at 360 px; `chipLabelLayout` exported (D-LD-7 in LIST-DEFAULTS-1 "Operator-set default watchlists", TEXT-FIT-1).
7
+ - `SearchSelect`: type to filter by name and detail, Recent then All, arrow keys + Enter + Esc, phone sheet / computer unfold, reduced motion = no slide (FINREG-INPUTS-1 "Searchable dropdowns, shared country field, formatted IBAN/BIC inputs").
8
+ - `CountryField` + `COUNTRIES` (ISO 3166-1 alpha-2, 249): drawn SVG flag (`CountryFlag`, needs peer `react-native-svg >=13.0.0`), name, grey code; stores the code only.
9
+ - `SearchSelect`: `renderDetail` slot, typing highlights the first match, web outside press closes the dropdown; `IbanInput` keeps the caret through regrouping.
10
+ - `IbanInput` / `BicInput` + pure `validateIban` / `validateBic` / `draftIban` / `draftBic`, same verdicts as `Finreg.Core.Banking` on a shared fixture list.
11
+
12
+ ### Changed
13
+ - `suggestOptions` also matches an option's `detail` (ranked last).
14
+
15
+ ## 1.32.0
16
+
17
+ KEFI-LAUNCH-1 "Do every open Kefi task" (UI-COMPOSE-1 extraction from kefi-web landing parity).
18
+
19
+ - New `AddOnRequest`: an optional field group, an Add button until asked for or filled, then the children and a Remove button. Labels and hints are pre-localized props; testIDs `<testID>-add` / `<testID>-remove`. `isAddOnOpen` exported.
20
+ - New `FixBar`: a pre-localized message (alert, error ink from the theme) naming the fields that stop the save, and a Show button; renders nothing at count 0. testIDs `<testID>-count` / `<testID>-show`. `isFixBarVisible` exported.
21
+
22
+ ## 1.30.0
23
+
24
+ FINREG-DATE-2 "Every FinReg date field uses the shared input".
25
+
26
+ - `DateRangeControl` renders the shared `DateField` for From and To (DATE-INPUT-1): on web each side is a real `type="date"` input. Props and testIDs unchanged.
27
+ - `DateField` / `DateTimeField` accept an optional `placeholder` (native text input only).
28
+ - New `FormStack`: a vertical form column whose `gap` owns the rhythm, so nested `Field`s drop their bottom margin.
29
+ - New `ResponsiveFormLayout` (`narrow` / `wide` / `breakpoint`, default 768) and `isWideFormLayout`.
30
+
31
+ ## 1.29.0
32
+
33
+ FINREG-BRAND-1 "Logo without its background and one palette from the logo": error and status TEXT reads `semanticText` when the theme provides it, readable in dark mode. Unchanged without it.
34
+
35
+ ## 1.28.2
36
+
37
+ INVOICE-FU-22 "To and Cc dropdown of saved people".
38
+
39
+ - A `SelectControl` without `menuAnchor` sets `aria-haspopup="menu"`, matching its `role=menu` popup; with `menuAnchor` it stays `"listbox"`.
40
+
41
+ ## 1.28.1
42
+
43
+ INVOICE-FU-22 "To and Cc dropdown of saved people".
44
+
45
+ - Every `SelectControl` trigger sets `aria-haspopup="listbox"`, which `useEscapeKey` in `ui-layout` reads to give Escape to the open menu.
46
+
47
+ ## 1.28.0
48
+
49
+ INVOICE-FU-22 "To and Cc dropdown of saved people", D-FU22-5 "Review findings are fixed in the packages".
50
+
51
+ - `SelectControl` gains `menuAnchor` (`listboxLabel`, `anchorRef`): the menu stays on screen, focus stays on the trigger, arrows, Enter and Space work from it, and the trigger is a combobox with `aria-activedescendant`. Callers without it are unchanged.
52
+ - `AnchoredMenu` gains `placement`; `AnchoredMenuListbox.highlightedValue` is optional.
53
+ - `nextHighlight` is exported.
54
+
55
+ ## 1.27.0
56
+
57
+ DATE-INPUT-1 "Every date or date-time field uses the shared input".
58
+
59
+ - New `DateField` (`YYYY-MM-DD`) and `DateTimeField` (`YYYY-MM-DDTHH:mm`), rendered through `Field`; a real `<input type>` on web.
60
+
61
+ ## 1.26.0
62
+
63
+ INVOICE-3 "Invoice interface over a user-chosen folder": owner picks.
64
+
65
+ - `SelectControl` trigger fills with `surfaceElevated`, like an editable field, so it differs from read-only.
66
+ - Read-only `useThemedInput` draws the rest border, so the box shows on a form of the same fill.
67
+ - Placeholder is solid `textSecondary`: 0.6 alpha measured 2.38 against the 4.5 AA floor.
68
+ - `FormField` gains `inputRef`.
69
+
70
+ ## 1.25.0
71
+
72
+ INVOICE-3 "Invoice interface over a user-chosen folder": extracted from invoice-web.
73
+
74
+ - New `SelectField`: `Field` + `SelectControl`, its accessible name carries the selection.
75
+
76
+ ## 1.24.0
77
+
78
+ BEAD-3 "Report form: searchable pattern field": review fix.
79
+
80
+ - New `useKeepInView(trigger)`, moved from Jinx: scrolls the returned view into sight each time `trigger` takes a new value, as far as needed and no further. Web only; a no-op on native.
81
+
82
+ ## 1.23.0
83
+
84
+ BEAD-3 "Report form: searchable pattern field and shared form feedback".
85
+
86
+ - `TypeaheadControl` takes `search` instead of `options` for async results: `load(query, signal)`, `onPick(option | null)`, loading, empty and error text, 250 ms debounce, stale responses ignored, editing after a pick clears it.
87
+ - `TypeaheadControl` is a WAI-ARIA combobox in both modes: Down, Up, Enter, Esc, `aria-activedescendant`, a ref to its input. Its rows change role from `menuitem` to `option`; testIDs are unchanged.
88
+ - `ControlOption` gains an optional `detail`, shown under the title on a phone and beside it from 768 px.
89
+ - `AnchoredMenu` fits its height above the on-screen keyboard through `visualViewport`; new `listbox` prop for listbox roles and a status line.
90
+ - New `FormStatusLine` and `useFocusFirstInvalid`.
91
+
92
+ ## 1.22.0
93
+
94
+ KEFI-EDITOR-UI-2 "Extract stepper and upload-with-link field to @dloizides/ui-forms", extracted from kefi-web.
95
+
96
+ - New `StepperTabs`, `StepperNav` and pure `resolveStepNeighbours`: step tabs sharing the row width, back and next under the step. Generic over the step key; every string is a prop.
97
+ - New `UploadWithLinkField`: preview, an upload control slot and a link input revealed on request. The slot keeps ui-forms free of ui-media; pass `ImagePickerButton`.
98
+
99
+ ## 1.20.0
100
+
101
+ **Horizontal form fields line up (D-ALL-22 "Horizontal form fields are aligned").**
102
+
103
+ - `FormGrid` rows set `alignItems: flex-start`: every cell starts on one top edge and a tall cell (hint, error) no longer stretches its neighbours.
104
+ - New `AlignToControl`: an aria-hidden label line with the same font and spacing model as `Field`, so a button beside labelled fields sits on the input line, not the label line. `FormCell alignToControl` applies it to a cell.
105
+ - New `InlineFieldRow` (extracted from kefi-web): a field and its action stacked below `inlineMinWidth` (default 1024) and on one row above it, the action placed by `AlignToControl` instead of a hand-measured offset.
106
+
107
+ ## 1.18.7
108
+
109
+ - Focused inputs draw the fleet focus ring (`@dloizides/design-tokens` 1.14 `FOCUS_RING`: 2 px solid outline, 2 px offset, contrast-checked colour; error colour when errored) instead of the 3 px 16% box-shadow halo (FOCUS-RING-1 "One focus ring across the shared kit").
110
+
111
+ ## 1.18.6
112
+
113
+ **ChipSelector: a short chip (e.g. "All") is at least 44 px wide, not only 44 px tall (KEFI-FIT-1 "kefi-web fit and hit-box fixes").**
114
+
115
+ `chip` and `chipOutline` get `minWidth: 44` next to the existing `minHeight: 44`; measured 42x44 on kefi-web approvals at 360.
116
+
117
+ ## 1.18.3
118
+
119
+ **FormCheckbox: the hint/description is now announced by screen readers.**
120
+
121
+ The hint Text gets a stable per-instance id (`useFieldIds().hintId`, as `Field` does) and the role=checkbox
122
+ Pressable sets `aria-describedby` to it when a hint is present; with no hint the attribute is omitted.
123
+
124
+ ## 1.18.2
125
+
126
+ **FormSwitch: the switch now sits in a 44x44 (MIN_TOUCH_TARGET_PX) pressable slot on web.**
127
+
128
+ Visual QA on kefi-web Site settings (360 and 1280) measured the switch at 40x20: react-native-web sizes the
129
+ native input to the Switch root, and `hitSlop` is inert on web. The switch is now centred in a slot with
130
+ `minWidth`/`minHeight` MIN_TOUCH_TARGET_PX inside the pressable row, so the row stays at least 44 tall even when a
131
+ `containerStyle` overrides `minHeight`. The track and thumb are unchanged; the switch gains a few px of horizontal gutter.
132
+ New testID: `<testID>-hitbox`.
133
+
134
+ ## 1.17.0
135
+
136
+ **Chips now have a 44px minimum touch target on web. `hitSlop` never did that — it is native-only.**
137
+
138
+ `CHIP_HIT_SLOP` was documented as expanding the chip's touch area toward the WCAG ≥44px floor
139
+ "without changing the rendered pill size". Measured in headless Chromium at 360x640 on 2026-09-21:
140
+ a chip's box is 33px tall (`paddingVertical: 6`), and `document.elementFromPoint(68, 35)` — 5px
141
+ above a top edge at y=40, inside `CHIP_HIT_SLOP.top: 10` — returns the PARENT element, not the
142
+ chip. react-native-web 0.21.2 references `hitSlop` only inside the legacy `Touchable` mixin's
143
+ press-RETENTION path (after the responder is already granted) and not at all in `Pressable`, so on
144
+ web the rendered box is the entire tappable area. The chips were a 33px target in all seven portals.
145
+
146
+ - `chipStyles.chip` and `chipStyles.chipOutline` gain `minHeight: 44` + `justifyContent: 'center'`.
147
+ Chip width is unchanged (56.7px and 68px before and after for the same labels), so wrapping and
148
+ `CHIP_GUTTER` spacing are untouched; a chip row grows 33px → 44px tall.
149
+ - `CHIP_HIT_SLOP` is kept and still helps iOS/Android. Its doc comment now states the web result
150
+ instead of claiming one.
151
+ - Consumers with a dense chip strip should re-check row spacing: the pill itself is taller now.
152
+
153
+ ## 1.15.0
154
+
155
+ **`FormSwitch` now emits `aria-checked` / `aria-disabled` on web; `ChipSelector` gained an option icon slot and opt-in radio semantics.**
156
+
157
+ `FormSwitch` (A11Y-ARIA-CHECKED-1): react-native-web 0.21 emits nothing from `accessibilityState` on web, so the
158
+ switch wrapper rendered `role="switch"` with no `aria-checked` - an invalid switch that announced no state. The
159
+ state is now passed as literal `aria-checked` (always) and `aria-disabled` (only when disabled) web props;
160
+ `accessibilityState` also carries `disabled` for native.
161
+
162
+ `ChipSelector`:
163
+ - `ChipOption.icon?: React.ReactNode` - rendered before the label inside the chip, wrapped `aria-hidden`. Options
164
+ without an icon render the exact same tree as before.
165
+ - `singleSelectRole?: 'button' | 'radio'` (type `ChipSingleSelectRole`). Default `button` = unchanged. With
166
+ `radio` and `multiple` unset, the group is `role="radiogroup"` and each chip `role="radio"` + `aria-checked`.
167
+ Ignored for multi-select. Trade-off: RN-web renders a radio chip as a `<div>`, which activates on Enter but not
168
+ Space and has no arrow-key roving focus.
169
+
170
+ **Additive and backward-compatible.** No prop set = identical DOM for every existing consumer.
171
+
172
+ ## 1.14.0
173
+
174
+ **`FormField` gained an opt-in `recentKey` — remember the last N submitted values and offer them on focus.**
175
+
176
+ A search / filter / lookup box that the user retypes the same handful of values into now gets a
177
+ "recent values" dropdown for free. Set `recentKey="<namespace>"` on a `FormField` and the values it
178
+ submits are remembered (per key) and surfaced in a menu on focus; picking one fills the input. A
179
+ value is recorded on submit (Enter) **and** on blur-with-content, so both "hit enter" and "typed then
180
+ moved on" are captured. The dropdown reuses the kit's `AnchoredMenu` (portalled to `document.body`, so
181
+ it is never painted behind a table / card / the next field) with full a11y (menu name, per-row label +
182
+ hint + role).
183
+
184
+ Persistence is `localStorage` under `@dloizides/ui-forms:recent:<recentKey>`; the list de-dupes
185
+ case-insensitively, promotes a repeat to the front, and caps at `recentMax` (default 10). On native /
186
+ SSR / when storage is disabled it is a silent no-op (recents are always `[]`), and every storage
187
+ access is wrapped so a quota or privacy-mode failure can never throw into render.
188
+
189
+ **Additive and backward-compatible.** Leave `recentKey` unset — the default — and the field behaves
190
+ exactly as before: nothing rendered, no state/refs/effects, no storage touched. NEVER set it on a
191
+ password / secure field. The engine is also exported standalone as `useRecentValues(key, max?)` for
192
+ bespoke recents surfaces, and `AnchoredMenu` gained an optional `accessibilityLabel` for naming the menu.
193
+
194
+ ## 1.13.3
195
+
196
+ **Placeholder text was too dark — it read like an already-filled value.**
197
+
198
+ `useThemedInput` painted the placeholder with the theme's `textSecondary` — a deliberately
199
+ dark, accessible grey (design-tokens UX-11) that also renders readable secondary *copy*. At
200
+ full strength a placeholder (e.g. `follower` in a "Dance role" box) was hard to tell apart
201
+ from entered text. It is now `textSecondary` composited toward the field background at 0.6
202
+ alpha, so a hint reads clearly lighter than the solid entered text (`colors.text`) while
203
+ keeping the theme hue — and it works in dark mode too (it composites toward whatever the
204
+ field background is). The field's visible label still carries the accessible name, so this
205
+ is a usability win, not an a11y regression. Affects every `@dloizides/ui-forms`-driven input
206
+ (`FormField`, `Field`, `ThemedTextInput`, the `ui-tables` `Filters` search box) across all
207
+ seven portals.
208
+
209
+ ## 1.12.0
210
+
211
+ **`FormField` gained `labelHidden` — hide the visible label, keep the accessible name.**
212
+
213
+ A field whose placeholder already names it (a toolbar search box, an inline filter) does
214
+ not want a stacked visible label: the label wastes a row and, worse, pushes the input a
215
+ label-row lower than a bare button beside it, so the two misalign. Until now the only way
216
+ to drop the visible label was to blank `label` — which ALSO blanked the input's
217
+ `accessibilityLabel`, silently stripping the accessible name.
218
+
219
+ `labelHidden` removes ONLY the visible `<label>` row: `label` stays required and the input
220
+ keeps `accessibilityLabel={label}`, so a screen reader reads the same name and the field
221
+ still resolves by role + name. Additive and backward-compatible — default `false`, every
222
+ existing call renders unchanged.
223
+
224
+ ## 1.11.1
225
+
226
+ **`ThemedTextInput` shipped no metrics, so every direct caller got a raw 19px input.**
227
+
228
+ It documented itself as "the ONE source of truth for the input look" while shipping
229
+ only **colours** — no border, radius, padding or height. `FormField` quietly passed its
230
+ own private duplicate of those metrics, so anything reached *through* `FormField` looked
231
+ correct and the gap was invisible. Every **direct** caller — the documented, blessed
232
+ usage — got a raw browser input.
233
+
234
+ Measured live in the Digital Kin CMS before: **10/10 inputs below the 48px floor**, text
235
+ inputs 19px, textareas 38px. After: **0/10**, at 48/96px.
236
+
237
+ **Label association was absent entirely** (0 `label[for]`, 0 ids). Two defects only a
238
+ real browser could find, both fixed here:
239
+
240
+ - **`htmlFor` is silently dropped by react-native-web** — it is not on the prop
241
+ allowlist, the same family as the dropped `accessibilityHint`. A prop-level assertion
242
+ passes against the broken build; only a DOM-level test catches it, so that is what the
243
+ new tests assert.
244
+ - **Dangling `for`.** `Field` assumed render-function children place the id they are
245
+ handed, but `SelectControl` uses `aria-labelledby` instead — so the difficulty label
246
+ shipped `for="field-control-3"` pointing at **nothing**, passing every structural check
247
+ while focusing no field. `useHtmlFor` now sets `for` only when the target is genuinely
248
+ in the document.
249
+
250
+ > ⚠️ **Cross-fleet visual change.** `controlStyles.input` gaining `minHeight: 48` lifts
251
+ > dense filter inputs and select triggers in `aml-v2`/`agora-web` from ~38-41px to 48px.
252
+ > This cannot be avoided: the input floor is what fixes the 19px defect, and nothing
253
+ > fixes that without also lifting inputs that already had padding. Owner-approved.
254
+
255
+
256
+ ## 1.9.0
257
+
258
+ **Campaign F3 — `Field`'s spacing model, and the layout primitives.** `Field` hard-coded a 16px
259
+ bottom margin on its container. That is the pre-flexbox model — the CHILD owns the space after
260
+ itself — and in a `gap`-laid-out parent, which is how every modern form row in this fleet is
261
+ written, the margin STACKS on the parent's gap. So consumers cancelled it by hand: **16
262
+ `containerStyle={{ marginBottom: 0 }}` sites across the fleet**, 13 of them in aml-v2, each with an
263
+ apologetic comment. AML v1 got this right in CSS years ago (`.ui-field { display: flex;
264
+ flex-direction: column; gap: 6px; }`) and wrote the contract down in `shared/FORMS.md`.
265
+
266
+ **This release moves NO pixels for any existing consumer.** The fix is opt-in, not a 2.0.0 — see
267
+ "Why not a major bump" below.
268
+
269
+ - **Add `FormGrid` + `FormCell`** — the wrapping form row, extracted from the copy the fleet
270
+ re-declares verbatim (`{ flexDirection: 'row', flexWrap: 'wrap', gap: 12 }` +
271
+ `{ minWidth: 220, flexGrow: 1, flexBasis: 260 }`), with the min-width/basis parameterised. Cell
272
+ metrics live on the GRID, so the common call site is a bare `<FormCell>` and only the genuine
273
+ one-offs (`<FormCell basis={160} grow={false} minWidth={140}>`) carry props.
274
+ - **Add `FormSection`** — the fieldset/legend grouping only v1 had. react-native-web has no
275
+ `fieldset` mapping, so this is the ARIA equivalent: `role="group"` + `aria-labelledby` pointing
276
+ at the legend. The legend reuses `resolveLabelVariantStyle` — the SAME function `Field` uses — so
277
+ a section heading cannot drift into a third label voice.
278
+ - **Add `Field.spacing` (`'stack' | 'gap'`)** — the two spacing models. `stack` is the historical
279
+ 16px margin + 4px child margins, byte-identical to 1.8.0, and remains the default. `gap` is the
280
+ FORMS.md contract: no bottom margin, one uniform 6px internal gap, parent owns the rhythm.
281
+ - **`Field` inside a `FormGrid` or `FormSection` resolves to `gap` automatically.** Adopting the
282
+ shared grid IS the opt-in: a consumer deletes its hand-rolled `grid`/`field` styles AND its
283
+ `marginBottom: 0` cancel in the same edit. An explicit `spacing` prop beats the context in both
284
+ directions.
285
+ - **`ChipSelector`**: the chip row now spaces with `gap: 8` instead of per-chip margins plus a
286
+ compensating `marginBottom: -8`. Rendered box is byte-identical. Also gains a `spacing`
287
+ passthrough, and `containerStyle` widens to `StyleProp<ViewStyle>` to match `Field`'s.
288
+
289
+ ### Why not a major bump
290
+
291
+ The brief for this work allowed a breaking 2.0.0. It was rejected. Switching every `Field` to the
292
+ gap model in one publish moves pixels on every form in seven portals simultaneously — which is
293
+ precisely the change you cannot visually QA, because no app remains on the old behaviour to compare
294
+ against, and a regression surfaces as "some form somewhere looks slightly wrong" with seven
295
+ suspects. The context-aware opt-in gives the identical end state via a per-app rollout, each step
296
+ behind visual QA, with `git revert` scoped to one app. The cost is that both models live in the
297
+ code until the fleet has migrated; that is a smaller price than an un-QA-able fleet-wide pixel
298
+ change.
299
+
300
+ ### Correction to the campaign premise
301
+
302
+ `ChipSelector`'s `marginBottom: -CHIP_GUTTER` was documented — and briefed — as compensation for
303
+ `Field`'s 16px margin, load-bearing enough that changing one without the other would break chip
304
+ spacing in 7+ sites. **That was wrong.** The -8 cancelled the chips' OWN bottom gutter hanging off
305
+ the last wrapped row; it behaved identically whatever `Field` contributed. It has been replaced with
306
+ `gap` regardless, because a margin/negative-margin pair is fragile and leaks a negative margin onto
307
+ the block's box. `fieldSpacing.test.tsx` now pins `Field` and `ChipSelector` to the same box in both
308
+ models, so the relationship is checkable rather than folkloric.
309
+
310
+
311
+ ## 1.8.0
312
+
313
+ **Campaign F2 — the dense CONTROLS arrive.** `@dloizides/ui-tables` shipped a complete, themed,
314
+ a11y-wired set of form controls inside its `Filters` bar and exported NONE of them: its
315
+ `src/index.ts` exposed only `Filters`, `useFilterDraft`, `suggestOptions`, `isUnmatched` and
316
+ types. Six portals could SEE those controls working and none could import them, so the fleet
317
+ reimplemented them — **6 independent select implementations, 5 date fields, 2 typeaheads**. Same
318
+ shape as `MultiTenancy.EntityFrameworkCore` shipping no EF Core. This release makes them public.
319
+
320
+ Nothing here moves a pixel for an existing consumer: the metrics are the promoted originals,
321
+ unchanged. `CONTAINER_MARGIN_BOTTOM` and `ChipSelector`'s compensating `marginBottom:
322
+ -CHIP_GUTTER` remain deliberately untouched.
323
+
324
+ - **Add `SelectControl`** — single-select enum/status dropdown. Bordered trigger + chevron opening
325
+ the shared `AnchoredMenu`.
326
+ - **Add `TypeaheadControl`** — search-as-you-type combobox (aml-v2's CountryPicker, generalized).
327
+ Free typing is preserved (the value is raw text the caller normalises at query time); picking a
328
+ suggestion fills the canonical LABEL, not the value.
329
+ - **Add `DateRangeControl`** — inclusive from/to pair. Editing one side patches ONLY that side.
330
+ - **Add `AnchoredMenu`** — the floating option list both of the above compose. Kept in-tree with
331
+ NO `ui-layout` dependency; that was a considered choice in `ui-tables` and it still holds, since
332
+ depending on the higher-level `ModalDropdown` would invert the graph for every consumer.
333
+ - **Add `controlStyles`** — the tuned metrics, promoted verbatim. `ui-tables`' `Filters/styles.ts`
334
+ said the quiet part out loud in its own header: it "reconcile[d] the per-field styles that were
335
+ copy-pasted across aml-v2's filter files into one shared source" — and then locked the
336
+ reconciliation inside one bar where no other surface could reach it.
337
+ - **Add `suggestOptions` / `isUnmatched`** — the ranked substring matcher behind the typeahead.
338
+ - **Add `ControlOption` / `DateRangeValue`** types. `ui-tables` now ALIASES its long-standing
339
+ public `FilterOption` / `DateRangeValue` onto these, so there is one definition rather than two
340
+ structurally-compatible twins free to drift.
341
+
342
+ ### The controls are LABEL-FREE, on purpose
343
+
344
+ They render the control only. Compose them inside `Field` — with `labelVariant="control"` on a
345
+ dense surface — to get the label, hint and error slots. That is what retires `ui-tables`' private
346
+ `FieldShell` fork (see `@dloizides/ui-tables` 1.14.0) and leaves ONE label implementation for
347
+ every control instead of one per control.
348
+
349
+ ### i18n: this package still never calls `t`
350
+
351
+ Every string — `accessibilityLabel`, `placeholder`, `optionHint`, `error`, `fromLabel`/`toLabel`
352
+ — is a PRE-LOCALIZED prop. This is load-bearing, not stylistic: aml-v2 localizes through
353
+ `@dloizides/i18n` with positional `{0}` while the other six portals use i18next `{{p1}}`, so a
354
+ component that localized internally could not serve both. `SelectControl`'s `accessibilityLabel`
355
+ is therefore composed BY THE CALLER — it must carry the selection ("Status: Active", not
356
+ "Status"), and building that string needs a `t` call this package must not make.
357
+
358
+ ### Fixed — a WCAG defect carried in by the promoted code
359
+
360
+ `AnchoredMenu` marked the current option with `accessibilityState={{ selected }}` alone.
361
+ **react-native-web does not read `accessibilityState` at all** (verified against
362
+ `react-native-web@0.21`'s `createDOMProps`, which enumerates `aria-selected` /
363
+ `accessibilitySelected` and never `accessibilityState`), so on web the selected option was
364
+ distinguished by colour and font-weight ONLY — no screen reader could tell which option was
365
+ current (WCAG 1.4.1, use of colour). `aria-selected` is now passed alongside, so each platform
366
+ gets the channel it honours. The trigger already paired `aria-expanded` with `accessibilityState`;
367
+ the option row was simply missed when that was done. A test asserts it, and that test FAILED
368
+ before the fix.
369
+
370
+ ## 1.7.0
371
+
372
+ Additive wave implementing the shared cross-stack forms contract now written down at
373
+ `PROOViD/AMLService/AMLService/wwwroot/shared/FORMS.md`. **Nothing in this release moves a pixel
374
+ for an existing consumer**: every addition is opt-in and every default is the previous behaviour.
375
+ `CONTAINER_MARGIN_BOTTOM` and `ChipSelector`'s compensating `marginBottom: -CHIP_GUTTER` are
376
+ deliberately untouched — they are load-bearing and move together in a later, visual-QA-gated wave.
377
+
378
+ - **Add `FormActions` — the submit/cancel row.** Promoted from the BYTE-IDENTICAL
379
+ `erevna-web/src/components/Forms/FormActions.tsx` and `katalogos-web/.../FormActions.tsx`
380
+ (68 lines each; `diff` returns nothing). All seven portals hand-roll this row; aml-v2, agora,
381
+ kefi, ichnos and zygos each inline their own variant. The primary action is LAST in DOM order so
382
+ tab reaches Cancel before Save, and `saving` drives the primary button's spinner rather than
383
+ disabling-and-relabelling it. `saveDisabled` blocks Save WITHOUT blocking Cancel — an invalid
384
+ form stays escapable. testIDs default to the twins' `save-button` / `cancel-button`, so existing
385
+ Playwright selectors keep matching.
386
+ - **`Field` gains `hint`.** ~21 hand-rolled copies of `{fontSize:12, marginTop:4, color:
387
+ textSecondary}` exist across the fleet; aml-v2 alone declares a local `hint` style in 8 files.
388
+ Because `Field` had no hint slot, consumers rendered the hint as a SIBLING, where it lands past
389
+ the container's 16px bottom margin and detaches from the control it explains (see the apologetic
390
+ comment in `aml-v2/src/screens/screening/CoverageSelector.tsx`). The hint renders UNDER the
391
+ control and ABOVE the error, and hint and error COEXIST — both are reachable from the control via
392
+ a composed `aria-describedby` (hint id then error id, in reading order). Only the error is a
393
+ `role="alert"` live region; a hint that announced itself would interrupt on every focus.
394
+ - **`Field` gains `optional` + `optionalLabel`.** Mutually exclusive with `required`; when a caller
395
+ sets both, `required` WINS — the safe direction, since an under-marked required field sends the
396
+ user into a failed submit. Enforced at runtime in `resolveFieldMarker` rather than in the type
397
+ system, so a caller spreading a computed props object still gets a defined single-marker result
398
+ instead of a compile error it cannot act on. Like the asterisk, the optional text is decorative
399
+ (`aria-hidden`) — "optional" is the ABSENCE of `aria-required`, which assistive tech already
400
+ conveys.
401
+ - **`Field` gains `labelVariant` (+ `labelStyle` as the escape hatch).** `Field` hard-coded
402
+ 13/600/sentence-case, which is exactly why kefi-web refused it and why `@dloizides/ui-tables`'
403
+ private `FieldShell` forked to 11/700/uppercase. `labelVariant` makes the contract's TWO
404
+ legitimate voices first-class and named: `field` (13/600 sentence case — a label that is READ)
405
+ and `control` (11/700 UPPERCASE + letter-spacing — a label that is SCANNED, for dense filter bars
406
+ and toolbars). An absent variant resolves to `field`, so every existing consumer renders
407
+ byte-identically. `labelStyle` applies AFTER the variant for the genuine one-off.
408
+ - **`Field`'s `containerStyle` widens `ViewStyle` -> `StyleProp<ViewStyle>`.** The narrow type was a
409
+ documented pain: `aml-v2/src/screens/leaders/CountryPicker.tsx` has to build a COMPLETE style per
410
+ variant because it cannot compose an array.
411
+ - **`useThemedInput`: a focused errored field now keeps a RED focus ring.** It previously computed
412
+ `isFocused && !hasError`, so an errored field got NO focus ring at all — removing the focus
413
+ indicator (WCAG 2.4.7) from precisely the field the user was sent back to fix, at the moment they
414
+ are most likely navigating by keyboard. It now always rings on focus and only changes the ring's
415
+ COLOUR, matching v1's `input.invalid:focus { box-shadow: 0 0 0 3px var(--danger-tint) }`.
416
+ One pre-existing test necessarily changed: it asserted `boxShadow === 'none'` for this state,
417
+ i.e. it encoded the defect as intended behaviour.
418
+ - **New peer dependency `@dloizides/ui-buttons >= 1.4.0`**, required by `FormActions` so the estate
419
+ keeps exactly one button implementation rather than forking one here.
420
+ - No i18n runtime is introduced: all user-visible copy (`saveLabel`, `cancelLabel`, `optionalLabel`,
421
+ `hint`, `error`) arrives pre-localized. aml-v2 localizes via `@dloizides/i18n` with positional
422
+ `{0}` params while the other six apps use i18next `{{p1}}`, and nothing bridges them, so a
423
+ component that localized internally could not serve both.
424
+ - Also shipping in this tarball, from a CONCURRENT workstream (commit `13bd281`, not part of this
425
+ wave): `ChipSelector` gains `chipTestIDPrefix`, `optionAccessibilityHint` and `multiple`
426
+ toggle semantics, and reads its on-primary ink from the theme's `onBrand` scale instead of a
427
+ hardcoded `#fff`. All opt-in; the `chip-selector-chip-<value>` testID default is frozen.
428
+
429
+ ## 1.6.0
430
+
431
+ - **`ChipSelector` now composes `Field` internally — its label was drifting.** It rendered its OWN
432
+ `<Text>` label whose metrics differed from `Field`'s on three of four axes: `marginBottom: 8`
433
+ (vs 4), NO `fontSize` at all so it fell back to RN's ~14 (vs 13), and `colors.text`
434
+ (vs `textSecondary`). A `ChipSelector` next to a `FormField` in a row/grid therefore started a
435
+ different distance down the column and read as a different weight of text. Found at 4 sites in
436
+ aml-v2 (`TenantWatchlistsEditor`, `CoverageSelector`, `CustomCoverageFields`,
437
+ `AdvancedMatching`); fixing it in the package fixes every consumer with zero app churn.
438
+ The local label styles are deleted — there is now exactly one label implementation in the kit.
439
+ - **`ChipSelectorProps` is unchanged and fully backward-compatible** — every existing prop keeps
440
+ its name, type and default, and `label` stays OPTIONAL. With no label (or an empty one) NO label
441
+ row is rendered, so composing `Field` cannot introduce a phantom gap above the chips.
442
+ - **`ChipSelector` gains `required`, `error` and `testID`** (all optional, all additive) now that
443
+ `Field` provides them for free. `error` renders the same `role="alert"` line as `FormField` and
444
+ is tied to the chip group via `aria-describedby` + `aria-invalid` (web only; no-op on native).
445
+ - **Spacing:** a `ChipSelector` now carries `Field`'s `marginBottom: 16` like every other field
446
+ (it previously had none). The chips' own 8px trailing gutter is cancelled on the group so the
447
+ block's total bottom spacing is exactly 16 — the same as a `FormField`, not 24. Pass
448
+ `containerStyle` to override, as before.
449
+ - **`Field`'s `label` is now optional** (widened from `label: string`, so existing callers are
450
+ unaffected). An absent or empty label renders no label row, letting a control whose label lives
451
+ elsewhere still use the shared shell for its error line and spacing.
452
+ - `FormSwitch` / `FormCheckbox` are deliberately NOT changed — see `src/labelRoles.test.tsx`.
453
+ Their labels are INLINE control labels (beside the control in a row, the row's primary text),
454
+ not field headers stacked above a control, so they have no alignment defect to fix and `Field`'s
455
+ smaller/dimmer header treatment would be a regression. They were already identical to each
456
+ other; a new test now enforces that they stay so.
457
+
458
+ ## 1.5.0
459
+
460
+ - **Add `Field` — the generic label-over-control wrapper.** `FormField` is hard-wired to a text
461
+ input (`FormFieldProps extends Omit<TextInputProps,'style'>`), so any NON-text control (a
462
+ dropdown, a date picker, a chip selector) had no shared way to get a label — and ended up
463
+ visually misaligned next to its `FormField` siblings: the control's box started ~21px higher
464
+ (no label row) and it missed `FormField`'s `marginBottom: 16`, so wrapped rows lost their
465
+ vertical rhythm. This was hand-rolled in 5 places across zygos-web and aml-v2.
466
+ `Field` takes `{ label, required?, error?, children, containerStyle?, testID? }` and renders the
467
+ same label row / required mark / error line / spacing.
468
+ - **`FormField` now composes `Field` internally**, so the two can never drift apart — the metrics
469
+ live in exactly one place. `FormFieldProps` and every rendered attribute (`form-field-input`
470
+ testID, `aria-invalid` / `aria-describedby` / `aria-required`, the `role="alert"` error line)
471
+ are unchanged: fully backward-compatible.
472
+ - `Field`'s `children` may be a plain node (the common case) or a render function receiving
473
+ `{ describedById, hasError }`, so a custom control can wire the error line into its own
474
+ `aria-describedby` / invalid state exactly the way `FormField` does.
475
+
476
+ ## 1.4.0
477
+
478
+ - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
479
+ - `FormField`: the error message is now programmatically tied to the input — the input gets
480
+ `aria-invalid` when errored and `aria-describedby` pointing at the error line (which is a
481
+ `role="alert"` live region), and `aria-required` when `required`. The required `*` is marked
482
+ decorative (`aria-hidden` / `accessibilityElementsHidden`) so a screen reader hears "required"
483
+ (via `aria-required`) instead of "star".
484
+ - `ThemedTextInput`: new optional `describedById` + `requiredField` props forward
485
+ `aria-describedby` / `aria-required`, and it emits `aria-invalid` from `hasError` (web only;
486
+ no-ops on native). Existing callers are unaffected.
487
+ - `FormCheckbox`: now keyboard-operable — the `role="checkbox"` Pressable renders a `<div>`
488
+ (no free Enter/Space), so an explicit web-only Enter/Space handler toggles it (WCAG 2.1.1).
489
+ - `ChipSelector`: chips gain a `hitSlop` so the touch target reaches ~44px WITHOUT changing the
490
+ rendered pill size, and expose `accessibilityState.disabled` when the selector is disabled.
491
+ - `useThemedInput`: the focus/hover CSS transition now collapses to instant when the user
492
+ requests `prefers-reduced-motion: reduce` (WCAG 2.3.3, web only).
493
+
494
+ ## 1.3.0
495
+
496
+ - `ChipSelector` gains a `variant` prop (`'solid' | 'outline'`, default `'solid'`). `solid` is the
497
+ original filled-pill look (selected = solid brand fill, white ink) — existing consumers
498
+ (erevna / katalogos / kefi) render **identically**, no change. `outline` is the AML v1 console
499
+ look: an outlined pill on a muted fill where the **selected** state is a subtle tinted-outline
500
+ (brand border + brand ink + a low-alpha brand wash), NOT a solid fill; on web, hover lifts the
501
+ border + ink to the brand colour. Fully theme-driven (brand colour + alpha, border/text from the
502
+ theme), so it re-themes per tenant. Additive + backward-compatible.
503
+
504
+ ## 1.2.0
505
+
506
+ - Add `ThemedTextInput` + `useThemedInput` — the shared "readable + lively" text-input treatment,
507
+ driven entirely by the active theme (re-themes per tenant, no hard-coded hex). At rest: dark
508
+ readable text on a subtle off-white surface with a soft border. On hover (web): the border
509
+ strengthens a touch. On focus: the border becomes the brand primary, the background brightens to
510
+ the plain surface (white), and a soft 3px brand-tinted focus ring fades in. The animation is a
511
+ pure GPU-cheap CSS transition on `border-color`/`background-color`/`box-shadow` (the ring is a
512
+ `box-shadow`, so no layout/reflow) — NO `Animated`/`LayoutAnimation`/JS timers. Web-only style
513
+ keys and the mouse-hover handlers are guarded behind `Platform.OS === 'web'`, so it stays
514
+ native-safe (native applies the state-driven colours instantly).
515
+ - `FormField` now renders `ThemedTextInput`, so every field gets the treatment for free; its label
516
+ uses `textSecondary` at 13px/600 for readability. Props/behaviour (label, hint, error, testID,
517
+ a11y, `onFocus`/`onBlur` pass-through) are backward-compatible.
518
+
519
+ ## 1.1.0
520
+
521
+ - Add `FormCheckbox` — a native-safe (`Pressable`-based, RN-web + native) themed checkbox: a rounded
522
+ square that fills with the brand colour and shows a check glyph when on, with a label and optional
523
+ hint. Mirrors `FormSwitch`'s prop shape (`value`, `onValueChange`/`onChange`, `label`, `hint`,
524
+ `disabled`, `testID`, a11y) so it is a drop-in for boolean toggles that should read as checkboxes.
525
+ Exposes `role="checkbox"` + `aria-checked` / `accessibilityState={{ checked }}`.
526
+
527
+ ## 1.0.0
528
+
529
+ Initial release. Extracted the proven duplicated form components from erevna-web ↔ katalogos-web
530
+ (Capability Wave C1, batch 2).
531
+
532
+ - `FormField`, `ChipSelector`, `FormSwitch` — share the `@dloizides/ui-feedback` UI context (`useUi`).
533
+ - `FormActions` deferred (depends on a not-yet-shared `core/Button`).