@lotics/ui 28.0.0 → 28.1.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/MIGRATION.md CHANGED
@@ -4,6 +4,20 @@ Breaking changes, newest first — normally per major, plus the rare minor that
4
4
  anyway (recorded under its exact version). The current contract lives in `AGENTS.md` + `docs/`;
5
5
  this file exists only to move an app from one release to the next.
6
6
 
7
+ ## 28.1.0 — `ChecklistItem` can announce more than its title
8
+
9
+ Additive; nothing to change. `accessibilityLabel` overrides the row's accessible name, which
10
+ still defaults to `title`. It exists for a surface carrying one checklist PER person, party or
11
+ period, where the same row labels repeat and only the headings between them tell the copies
12
+ apart — a reader moving control to control does not get those headings. Put the distinguishing
13
+ noun in the accessible name, not in `title`, so the visible rows stay free of what the heading
14
+ above already says.
15
+
16
+ Also fixed here: **`TASK_TEXT_INSET` was cut in 28.0.0 without a replacement named.** It is
17
+ `CONTROL_TEXT_INSET` from `@lotics/ui/control_surface` — the same 9 (1px border + 8px padding),
18
+ and always about a CONTROL's text rather than a step's, which is why it did not follow the rest
19
+ of `task` into `checklist`.
20
+
7
21
  ## 28.0.0 — `task` and `pipeline` merge into `checklist`
8
22
 
9
23
  Two families had converged on one anatomy: a ring, a title, a value beside it, a muted note, a
package/docs/catalog.md CHANGED
@@ -399,7 +399,8 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
399
399
  - **`spacing`** — the `SPACE` scale + `SpaceToken`.
400
400
  - **`control_surface`** — `CONTROL_HEIGHT` (40), `CONTROL_RADIUS` (10), `CONTROL_TEXT_INSET`
401
401
  (9 — how far a control insets its OWN text: 1px border + 8px padding; anything that must line
402
- up with a control's WORDS rather than its box carries it, and `TASK_TEXT_INSET` IS it),
402
+ up with a control's WORDS rather than its box carries it a caption under an inline editor,
403
+ a note under a figure — rather than a hand-measured 8),
403
404
  `FOCUS_RING` (a 2px OUTSET ring, so a container that CLIPS — any `ScrollView` — has to
404
405
  keep padding on an edge a focusable child sits against, or the ring shears off on the
405
406
  one interaction it signals; the padding still comes off the 8-grid, the ring is only
@@ -1295,8 +1296,12 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
1295
1296
  today, so a run filled in after the fact needs the correction in reach — and `ChecklistField`
1296
1297
  for a value with NO other home (a portal login created at that step, unreachable otherwise).
1297
1298
  `ChecklistItem.meta` is two words on the title's row; prose that grows is a `ChecklistNote`,
1298
- which owns its line. Worked screens: `tpl_record` § Progress (connected, grouped) and its
1299
- document desk (unconnected set).
1299
+ which owns its line. A row ANNOUNCES its `title`; `ChecklistItem.accessibilityLabel` overrides
1300
+ that for the one case the title cannot carry alone — a surface with one checklist PER person,
1301
+ party or period, where the same labels repeat and only the headings between them separate the
1302
+ copies, which a reader moving control to control never hears. The distinguishing noun goes in
1303
+ the accessible name, never the title, or every visible row repeats its own heading. Worked
1304
+ screens: `tpl_record` § Progress (connected, grouped) and its document desk (unconnected set).
1300
1305
  - **`stepper`** — `Stepper` + `Step` — done/current/upcoming/warning/complete progress on a
1301
1306
  track (horizontal) or spine (vertical); compound `<Step status>children` OR data
1302
1307
  `steps[]`+`current`; **navigable** via `Step.onPress` (both orientations — the whole step
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "28.0.0",
3
+ "version": "28.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {
package/src/checklist.tsx CHANGED
@@ -190,6 +190,19 @@ export interface ChecklistItemProps extends StepPositional {
190
190
  /** The row's name. Doubles as the ring's accessible name — the ring carries no
191
191
  * visible label of its own, so the text rides beside it. */
192
192
  title: string;
193
+ /**
194
+ * Override that accessible name. Defaults to `title`, which is right whenever
195
+ * the title identifies the row on its own.
196
+ *
197
+ * Reach for it when the SAME titles repeat down a surface and only their
198
+ * surroundings tell them apart — one checklist per person, per party, per
199
+ * period, each listing the same rows. A reader moving control to control gets
200
+ * the names without the headings between them, so three rows all announcing
201
+ * "Đơn đăng ký" are three controls they cannot tell apart. Put the
202
+ * distinguishing noun in here, NOT in `title`: the heading above already says
203
+ * it, and repeating it in every visible row is noise for everyone else.
204
+ */
205
+ accessibilityLabel?: string;
193
206
  /** Ticked. */
194
207
  done?: boolean;
195
208
  /** The row the reader is waiting on — medium weight, so a run full of ticks
@@ -222,6 +235,7 @@ export interface ChecklistItemProps extends StepPositional {
222
235
  /** ONE ROW — the level that carries the ticks. */
223
236
  export function ChecklistItem({
224
237
  title,
238
+ accessibilityLabel,
225
239
  done,
226
240
  current,
227
241
  onToggle,
@@ -235,7 +249,7 @@ export function ChecklistItem({
235
249
  <Step
236
250
  status={done ? "done" : current ? "current" : "upcoming"}
237
251
  onToggle={onToggle}
238
- accessibilityLabel={title}
252
+ accessibilityLabel={accessibilityLabel ?? title}
239
253
  {...positional}
240
254
  >
241
255
  <View style={{ gap: 6 }}>