@lotics/ui 17.0.1 → 17.0.2

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/docs/templates.md CHANGED
@@ -355,9 +355,11 @@ billing, and quick-capture templates. Top → bottom:
355
355
  HOME stays their DATA section (the colocation law) with descriptions naming their
356
356
  consumers ("printed on the delivery note"). The picker rows ride `TaskList`/`TaskItem`
357
357
  (`controlWidth={24}` for the `CheckboxInput` in `TaskStatus`) — the compound owns the row
358
- geometry and the indent; hand-rolling the anatomy is how alignment drifts. Warning and fix are CO-LOCATED on the row. The mark NAMES what's missing (the
359
- `TaskFields` line: 13px `circle-alert` + "Needs: …" the actual field labels — muted at rest so
360
- gaps show WITHOUT checking, warning once checked because it now blocks). The FIX sits
358
+ geometry and the indent; hand-rolling the anatomy is how alignment drifts. Warning and fix are CO-LOCATED on the row. The mark NAMES what's missing — a
359
+ **`TaskCaption`**, not a field cell: 13px `circle-alert` + "Needs: …" the actual field labels,
360
+ muted at rest so gaps show WITHOUT checking, warning once checked because it now blocks. It is
361
+ a SENTENCE about the row, and `TaskFields` is the column the reader edits and scans down, so
362
+ prose put there lines up with nothing and reads as a control it is not. The FIX sits
361
363
  right under it in the row's `TaskDetail` — an `Inset` (a FORM surface, NEVER a `Callout`:
362
364
  a warning Callout is an ARIA `alert`, wrong around a form) with a `FormTextInput` per gap
363
365
  (label + the consumer hint as `description`) and a "Save fields" (secondary — the section
@@ -32,7 +32,7 @@ import { CheckCircle } from "@lotics/ui/check_circle";
32
32
  import { ProgressBar } from "@lotics/ui/progress_bar";
33
33
  import { FilterChip } from "@lotics/ui/filter_chip";
34
34
  import { CaptureRow } from "@lotics/ui/capture_row";
35
- import { TaskActions, TaskDetail, TaskFields, TaskItem, TaskList, TaskStatus, TaskTitle } from "@lotics/ui/task";
35
+ import { TaskActions, TaskCaption, TaskDetail, TaskFields, TaskItem, TaskList, TaskStatus, TaskTitle, TASK_TEXT_INSET } from "@lotics/ui/task";
36
36
  import { ActionMenu, type ActionMenuItem } from "@lotics/ui/action_menu";
37
37
  import { SuggestionChip } from "@lotics/ui/suggestion_chip";
38
38
  import { OptionList } from "@lotics/ui/option_list";
@@ -1900,7 +1900,10 @@ export function TplRecord() {
1900
1900
  <CheckCircle state={sub.done ? "done" : "none"} onChange={(on) => toggleSubtask(t.id, sub.key, on)} accessibilityLabel={sub.label} />
1901
1901
  </TaskStatus>
1902
1902
  <TaskTitle>
1903
- <Text size="sm" color={sub.done ? "muted" : "default"} decoration={sub.done ? "lineThrough" : undefined}>{sub.label}</Text>
1903
+ {/* The parent's title is an inline editor, which insets its
1904
+ own text; a plain `Text` child must add the same or the
1905
+ two columns of titles do not line up. */}
1906
+ <Text size="sm" color={sub.done ? "muted" : "default"} decoration={sub.done ? "lineThrough" : undefined} style={{ paddingHorizontal: TASK_TEXT_INSET }}>{sub.label}</Text>
1904
1907
  </TaskTitle>
1905
1908
  </TaskItem>
1906
1909
  ))}
@@ -2261,15 +2264,23 @@ export function TplRecord() {
2261
2264
  <CheckboxInput accessibilityLabel={f.label} checked={checked} onChange={(on) => toggleForm(f.id, on)} />
2262
2265
  </TaskStatus>
2263
2266
  <TaskTitle>
2264
- <Text size="sm" style={{ flexShrink: 1 }}>{f.label}</Text>
2267
+ {/* A plain-`Text` title carries the cell inset itself, or it sits
2268
+ out of line with the editable titles elsewhere on the page and
2269
+ with its own caption below. */}
2270
+ <Text size="sm" style={{ flexShrink: 1, paddingHorizontal: TASK_TEXT_INSET }}>{f.label}</Text>
2265
2271
  </TaskTitle>
2272
+ {/* "Needs: Tax ID, Delivery address" is a SENTENCE about this row, so it
2273
+ is a `TaskCaption` — its own line under the title. It was a
2274
+ `TaskFields` cell, which is the column the reader EDITS and scans
2275
+ down: prose there lines up with nothing, squeezes the cells beside
2276
+ it, and reads as a control it is not. */}
2266
2277
  {missing.length > 0 ? (
2267
- <TaskFields>
2268
- <View style={{ flexDirection: "row", alignItems: "flex-start", gap: 5 }}>
2269
- <Icon name="circle-alert" size={13} color={checked ? colors.amber[500] : colors.zinc[400]} />
2270
- <Text size="xs" color={checked ? "warning" : "muted"} style={{ flexShrink: 1 }}>{`Needs: ${missing.map((k) => NEEDS[k].label).join(", ")}`}</Text>
2271
- </View>
2272
- </TaskFields>
2278
+ <TaskCaption>
2279
+ <View style={{ flexDirection: "row", alignItems: "flex-start", gap: 5 }}>
2280
+ <Icon name="circle-alert" size={13} color={checked ? colors.amber[500] : colors.zinc[400]} />
2281
+ <Text size="xs" color={checked ? "warning" : "muted"} style={{ flexShrink: 1 }}>{`Needs: ${missing.map((k) => NEEDS[k].label).join(", ")}`}</Text>
2282
+ </View>
2283
+ </TaskCaption>
2273
2284
  ) : null}
2274
2285
  {checked && missing.length > 0 ? (
2275
2286
  <TaskDetail>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "17.0.1",
3
+ "version": "17.0.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {