@lotics/ui 45.6.0 → 45.6.1

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/catalog.md CHANGED
@@ -1477,6 +1477,15 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
1477
1477
  when a slot is passed: `right` is routinely conditional, and an anatomy that flipped on that
1478
1478
  would make two rows in one list press differently. Nothing to opt into — a decorative
1479
1479
  `right` simply stops being part of the press target.
1480
+ **The row OWNS its `title`/`description` pair, so do not hand-roll one beside it.** Both
1481
+ lines are `sm`, `leading="tight"`, no gap between them — the stacked-pair law in
1482
+ [composition.md](./composition.md), applied by the component rather than restated at each
1483
+ call site. It shipped rendering that pair as PROSE (two 24px boxes plus a 2px gap = 12px
1484
+ between the lines, against the 6px the rule prescribes), and the height was sized around
1485
+ that mistake at 64, which left a correctly-sized `md` mark adrift in it; the row is 56 now.
1486
+ A `description` passed as a NODE keeps its own leading — the component only sets it on the
1487
+ string branch, because forcing a line box on somebody else's subtree re-spaces content that
1488
+ may not be a line of text at all.
1480
1489
  - **`table`** — `Table` + `TableRow` + `TableCell`: the paginated high-volume register
1481
1490
  (columns defined once, `sortLabels` localizable; rows are `PressableRow`-based).
1482
1491
  CONTAINER-RESPONSIVE with no prop (measures itself, like `Breakdown`/`DetailTable`): when
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "45.6.0",
3
+ "version": "45.6.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {
package/src/list_item.tsx CHANGED
@@ -57,15 +57,29 @@ export function ListItem(props: ListItemProps) {
57
57
  const body = (
58
58
  <>
59
59
  {left}
60
+ {/* A STACKED PAIR, and it was rendered as prose. Both lines are `sm`, so
61
+ the rungs were never the problem — the LEADING was: two 24px prose line
62
+ boxes around 14px glyphs leave 5px of empty box above and below each,
63
+ which is 10px between them, and a `gap: 2` on the container made 12. The
64
+ composition rule this surface is supposed to follow puts a pair at 6:
65
+ `leading="tight"` on both body-rung lines and NO gap, because each tight
66
+ box already contributes 3px a side. Twice the intended distance is what
67
+ makes a name and its role read as two separate lines rather than one
68
+ object, which is how the defect gets reported — as "too far apart",
69
+ never as its cause.
70
+
71
+ `tight` goes on the string branch only. A caller passing a NODE owns its
72
+ own leading, and forcing one on somebody else's subtree would silently
73
+ re-space a description that is not a line of text at all. */}
60
74
  <View style={styles.textContainer}>
61
75
  {!!title && (
62
- <Text weight="medium" numberOfLines={1} userSelect="none">
76
+ <Text weight="medium" leading="tight" numberOfLines={1} userSelect="none">
63
77
  {title}
64
78
  </Text>
65
79
  )}
66
80
  {!!description &&
67
81
  (typeof description === "string" ? (
68
- <Text size="sm" color="zinc-500" numberOfLines={1} userSelect="none">
82
+ <Text size="sm" color="zinc-500" leading="tight" numberOfLines={1} userSelect="none">
69
83
  {description}
70
84
  </Text>
71
85
  ) : (
@@ -157,18 +171,27 @@ function PressRow(props: {
157
171
  }
158
172
 
159
173
  const styles = StyleSheet.create({
174
+ // 56, not 64. The height was sized around a pair rendered as prose — two 24px
175
+ // boxes plus a 2px gap is 50, and 64 left 14px of slack the row did not ask
176
+ // for, which is what made a correctly-sized `md` mark (28px, the documented
177
+ // rung for a person in a list) look adrift in it. A tight pair is 40, so 56
178
+ // gives it the same 8-a-side the rest of the kit's rows carry. A title-only
179
+ // row keeps one 20px line centred in the same box, so the two shapes still
180
+ // share a beat.
160
181
  container: {
161
182
  flexDirection: "row",
162
183
  alignItems: "center",
163
184
  gap: 8,
164
- height: 64,
185
+ height: 56,
165
186
  paddingHorizontal: 8,
166
187
  marginHorizontal: -8,
167
188
  borderRadius: 12,
168
189
  },
190
+ // NO GAP. Each tight line box already contributes 3px above and below its
191
+ // glyphs, so the pair reads at 6px — a gap here is a third source of space
192
+ // between two lines meant to read as one object.
169
193
  textContainer: {
170
194
  flex: 1,
171
- gap: 2,
172
195
  alignItems: "flex-start",
173
196
  },
174
197
  selected: {