@usableapp/cardds 0.7.176 → 0.7.177

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,6 +1,25 @@
1
1
  # Changelog
2
2
 
3
- > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
3
+ > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
4
+ >
5
+ > `## ยังไม่ปล่อย` (stock) is the work that is in `main` and not in any version on npm yet. Every piece of work that changes what a consumer sees writes its own before → after entry here (under `### Added` / `### Changed` / `### Fixed` / `### Removed`, as the sections below do) in the same change, and does not touch the version number. Do not write a `Components:` line in it. `npm run release:prepare` turns the stock into the next version (+0.0.1, the date, the entries copied as they are, the `Components:` line from `scripts/components-changed.mjs`) and opens an empty stock; `npm run release:prepare -- --check` only says whether there is stock (exit 0) or not (exit 1) and what the next version is. The stock is not a version: the publish checks never read it.
6
+
7
+ ## ยังไม่ปล่อย
8
+
9
+ ## 0.7.177 — 2026-11-17
10
+
11
+ `AppBar` holds two buttons and a round `Btn` shows a count, `Chip` takes a signal `tone`, `Head variant="date"` takes two chip rows, `NoteRows` and `Was` (a struck-through old value) are new, and a `Modal` mounted closed draws nothing.
12
+
13
+ Components: AddRow, AppBar, Avatar, AvatarPick, AvatarPickItem, AvatarStack, Banner, Btn, BtnGroup, BtnGroupItem, Bubble, Calendar, CalendarWeeks, CallSheet, Card, CardArt, CardFeed, CardGrid, CardList, CardMedia, Chip, ChipChoice, ChipGrid, ChipPick, ChipRow, Composer, ComposerArea, CountIn, Countdown, Dropdown, EmptyState, Fab, FeedCard, FeedEnd, Field, FileBtn, FloatBar, FloatBarItem, Head, Home, Icon, IconRow, JourneyBadge, Kv, KvCell, KvGrid, KvRow, Lead, Link, LinkBlock, MapArea, MapPick, MediaBeside, Menu, MenuItem, MessageBar, Modal, ModalAsk, Mood, Mosaic, NoteRow, NoteRows, NumberBand, NumberBandStack, Pin, Placeholder, PostDesk, PostDeskLine, PostLetter, Postcard, Ring, Route, Row, Rows, Sheet, SheetStack, SheetStep, SheetSteps, Snackbar, Spinner, StackBack, StackSheet, Stamp, StampBook, StampCell, StampOn, StampPlace, Sticky, StickyAnswer, StickyPost, StickyThread, Text, Thread, Tile, TileGrid, Timeline, TimelineItem, TopBar, Track, TrackStep, Walkthrough, Was, Wave, Words
14
+
15
+ ### Added
16
+ - **`NoteRows` and `Was`** (cardds#218): before, several `NoteRow`s in a card stood the card's gap apart (they read as separate things), and cardds had no struck-through text for a replaced value (a project used `<s>`). After, `<NoteRows><NoteRow …/><NoteRow …/></NoteRows>` is one group, its lines `--note-rows-gap` (default `--sp-1`) apart; `<Was>old value</Was>` is the replaced value struck through in the muted ink of its ground (knob `--was-ink`), read aloud as "was" (th: "เดิม") before it, for a `NoteRow`, a `Text` or a `Words` meta. A lone `NoteRow` is unchanged. Stories `NoteRow · Group`, `NoteRow · WasInWords`.
17
+ - **`Head variant="date"` with two chip rows** (cardds#217): before, the date's chips stood in one `ChipRow`, one gap (`--head-lead-gap`) stood under the date row and between the title and its meta, and a project wrapped its own rows and margins. After, `chipsBelow` is a second slot: `<Head variant="date" lead={<JourneyBadge stretch … />} chips={<ChipRow>warning</ChipRow>} chipsBelow={<ChipRow>day · time</ChipRow>} title meta />` — `chips` is the upper row, `chipsBelow` the lower, which stays at the foot of the date's height when the upper has no chip; the date is as tall as the two rows and the gap between them (`--head-chips-gap`, default the column gap `--sp-3`). With two rows the title stands `--head-group-gap` (default `--sp-5`) under the date row and the meta `--head-words-gap` (`--sp-1`) under the title; one row (no `chipsBelow`) keeps `--head-lead-gap` for both, as before. Existing heads unchanged. Story `Head · WithDateTwoRows`.
18
+ - **`Chip tone`** (cardds#216): before, a chip could not be coloured by a signal (only `on`, `soft`, `muted`, and a small `dot`); a project set `--chip-on-bg` itself. After, `<Chip tone="error|warn|ok|info">` is a solid fill of the palette's own signal shade (`--signal-<tone>-onlight`; `-ondark` where a project makes its controls' paper dark) with the ink that holds 4.5:1 on it, in every palette; works with `sm` and `xs`; with `on`, `soft`, `muted` or `dot` the `tone` is kept and a warning says so. Chips without `tone` unchanged. Knobs `--chip-tone-bg`, `--chip-tone-ink`. Story `Chip · Tones`.
19
+ - **`AppBar action` with two controls and `Btn count`** (cardds#215): before, `AppBar` had one `action` with no rule for how two buttons stand, and a round `Btn` could not show a count. After, `action` takes two controls in a fragment: they stand together at the right edge, `--appbar-action-gap` apart (default `--sp-2`), the title is cut with "…" and the buttons never wrap (`<AppBar … action={<><Btn size="sm" tone="primary"><Icon name="megaphone" size="xs" /> …</Btn><Btn shape="round" size="sm" icon="bell" label="Alerts" count={3} /></>} />`). A round `Btn` takes `count`: a `Badge` on its top-right corner; 0 or none draws nothing, over 99 reads "99+", the spoken name is `label` plus the count. Stories `AppBar · Pair`, `Btn · RoundCount`; existing stories unchanged.
20
+
21
+ ### Fixed
22
+ - **`Modal` mounted with `open={false}`** (cardds#7): before, it was drawn in the middle of the screen for about 350ms, left, and called `onClosed` at about 700ms (under React StrictMode `onClosed` was never called at all). After, it draws nothing and does not call `onClosed`, the same in production and StrictMode; it appears when `open` turns `true`, and every close after that plays the leave and calls `onClosed` once, as before. The "mount it only when it is to show" warning is gone from the doc comment.
4
23
 
5
24
  ## 0.7.176 — 2026-11-15
6
25
 
package/css/actions.css CHANGED
@@ -52,6 +52,7 @@
52
52
  a .step cancels it to touch the bar. */
53
53
  .appbar__brand { flex: 1; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
54
54
  .appbar__lead { flex: none; display: flex; align-items: center; } /* AppBar lead: its own button, left-most, outside the brand button */
55
+ .appbar__action { flex: none; display: flex; align-items: center; gap: var(--appbar-action-gap, var(--sp-2)); } /* AppBar action: one or two controls at the right edge, the title (flex 1, min-width 0) takes the rest and ellipsises */
55
56
  .appbar__text { display: grid; min-width: 0; flex: 1; } /* pushes trailing button to the right edge */
56
57
  /* the mark + the words as ONE button (AppBar brandButton — the member's name opens their menu, Lh 2026-09-23): the same row, a tap target */
57
58
  .appbar__who {
@@ -87,6 +88,9 @@
87
88
  /* a round's primary tone (Btn shape="round" tone="primary" carries both names; `invert` was its name until Lh 2026-10-29): the round's own
88
89
  invert knobs first — the themes' contract — then the pill's primary, so by default both shapes fill alike */
89
90
  :is(.icon-btn--invert, .icon-btn--primary) { background: var(--icon-btn-invert-bg, var(--btn-primary-bg, var(--accent))); color: var(--icon-btn-invert-ink, var(--btn-primary-ink, var(--on-accent))); border-color: transparent; }
91
+ /* a count on a round (Btn count): the Badge sits on the top-right corner, half out; the button is positioned only when it carries one */
92
+ .icon-btn--count { position: relative; }
93
+ .icon-btn__count { position: absolute; inset: 0 0 auto auto; translate: 30% -30%; pointer-events: none; }
90
94
  .icon-btn--sm { width: var(--icon-btn-sm-size, var(--tap-sm)); height: var(--icon-btn-sm-size, var(--tap-sm)); font-size: var(--fs-title); }
91
95
  /* the bigger round sizes (`Btn shape="round" size`): lg is the hero control's size (--tap-lg), xl the biggest (--tap-xl), both on --tap-base like every size.
92
96
  What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (1/2, below), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
@@ -264,6 +268,13 @@
264
268
  .chip--on { background: var(--chip-on-bg, var(--accent)); --dark: var(--accent-dark); color: var(--chip-on-ink, var(--card-ink)); border-color: transparent; }
265
269
  /* muted: an untouched default — the words wash out, the edge stays; emphasis is the difference from the neighbours (docs/reference.md 13) */
266
270
  .chip--muted { color: var(--chip-muted-ink, var(--card-muted)); } /* the chip's own fill's muted words: a muted chip on the dark card is still a light chip */
271
+ /* tone: a signal as the chip's fill (Chip tone, cardds#216) — the palette's own shade for the paper's side (--action-dark, as the chip's own paper: --signal-*-onlight at rest, -ondark where a project makes its controls' paper dark), and the ink of the OTHER side so it holds 4.5:1 on it:
272
+ the fill's side is the opposite of the paper's, so --dark flips and --card-ink follows it. Knobs --chip-tone-bg / --chip-tone-ink retune every tone at once */
273
+ .chip--error { --_tone: color-mix(in srgb, var(--signal-error-ondark) calc(var(--action-dark) * 100%), var(--signal-error-onlight)); }
274
+ .chip--warn { --_tone: color-mix(in srgb, var(--signal-warn-ondark) calc(var(--action-dark) * 100%), var(--signal-warn-onlight)); }
275
+ .chip--ok { --_tone: color-mix(in srgb, var(--signal-ok-ondark) calc(var(--action-dark) * 100%), var(--signal-ok-onlight)); }
276
+ .chip--info { --_tone: color-mix(in srgb, var(--signal-info-ondark) calc(var(--action-dark) * 100%), var(--signal-info-onlight)); }
277
+ :is(.chip--error, .chip--warn, .chip--ok, .chip--info) { --dark: calc(1 - var(--action-dark)); background: var(--chip-tone-bg, var(--_tone)); color: var(--chip-tone-ink, var(--card-ink)); border-color: transparent; }
267
278
 
268
279
  .chip-row { display: flex; gap: var(--sp-2); }
269
280
  /* the words that lead the chips (ChipRow `lead`, "นัดที่" before a place, Lh 2026-10-21): the chips' own type and size, at the middle of their height */
@@ -563,6 +574,7 @@
563
574
  .head > .chip-row { flex: 1 1 100%; order: 2; max-height: calc(2 * (round(down, calc(var(--fs-sm) * var(--chip-sm-line, var(--lh-body))), 1px) + 2 * var(--chip-sm-pad-y, var(--sp-0)) + 2 * var(--border-w)) + var(--sp-2)); overflow: hidden; }
564
575
  /* …beside a date that leads the head (card.css) they stand in the date's row, every chip in sight: the meeting place may take a line of its own */
565
576
  .head:has(> .tile-badge:first-child + .chip-row) > .chip-row { grid-column: 2; grid-row: 1; max-height: none; }
577
+ .head__chips .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* two rows beside the date (parts.css): a chip is cut at the column's width */
566
578
  .head > .chip-row > .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
567
579
  .foot > .btn { flex: 1 1 0; min-width: 0; }
568
580
  /* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
package/css/card.css CHANGED
@@ -103,7 +103,7 @@
103
103
  .card__press { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); } /* Card onPress: the unseen button the keyboard and a screen reader press */
104
104
  .card--press:has(> .card__press:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
105
105
  .card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
106
- .head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
106
+ .head > .chip-row > .chip > .icon, .head__chips .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
107
107
 
108
108
  /* ---- bleed: a scrolling track that runs to the container's edges ----
109
109
  For a horizontal strip inside a padded container — .avatar-pick, .chip-row,
package/css/journey.css CHANGED
@@ -78,7 +78,7 @@
78
78
  .tile-badge--stretch.tile-badge--sub-beside > :not(:first-child) { grid-column: auto; } /* the number and the month share the second line */
79
79
 
80
80
  /* where it sits in a head that leads with the date (card.css): the first cell, as tall as the chips beside it however many rows, so no cap */
81
- .head:has(> .tile-badge:first-child + .chip-row) > .tile-badge--stretch:first-child { grid-column: 1; grid-row: 1; max-block-size: none; }
81
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) > .tile-badge--stretch:first-child { grid-column: 1; grid-row: 1; max-block-size: none; }
82
82
 
83
83
  /* corner badge: pin a tile badge on media (rating, price) — .card__media is relative */
84
84
  .tile-badge--corner { position: absolute; right: var(--sp-3); bottom: var(--sp-3); }
@@ -95,3 +95,7 @@
95
95
  font: var(--note-row-font, var(--type-caption));
96
96
  color: var(--note-row-ink, var(--card-muted));
97
97
  }
98
+ /* NoteRows: the lines of ONE thing (a place, a person) stand close, a step apart — not the card's gap, which parts one thing from the next */
99
+ .note-rows { display: grid; gap: var(--note-rows-gap, var(--sp-1)); }
100
+ /* Was: the replaced value, struck through after the new one, in the muted ink of its ground */
101
+ .was-value { text-decoration: line-through; color: var(--was-ink, var(--card-muted)); }
package/css/parts.css CHANGED
@@ -163,16 +163,24 @@
163
163
 
164
164
  /* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
165
165
  ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
166
- width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
166
+ width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row and the gap between the heading and its caption are --head-lead-gap (one chip row) or, with two rows, --head-group-gap and --head-words-gap; the date and the chips place themselves (journey.css, actions.css).
167
167
  Everything after the chips stands on rows of its own under them, in the order given.
168
168
  <div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
169
- .head:has(> .tile-badge:first-child + .chip-row) {
169
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) {
170
170
  display: grid;
171
171
  grid-template-columns: auto minmax(0, 1fr);
172
172
  align-items: center;
173
173
  row-gap: var(--head-lead-gap, var(--sp-3));
174
174
  }
175
- .head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
175
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
176
+ /* TWO chip rows beside the date (Head `chips` over `chipsBelow`): a column as tall as the date, the upper row at its top (it keeps one small chip's height
177
+ when it has no chip), the lower row at its foot, the gap between them the column gap's. The rows under it are --head-words-gap (--sp-1) apart (the title and
178
+ its meta) and the title stands a GROUP gap (--head-group-gap, --sp-5) under the date row: the date and its chip column each keep a margin below that makes up the difference (the stretched date is still as tall as the chips), so the date
179
+ and its chips read as one group and the words as another. One chip row keeps --head-lead-gap everywhere, untouched */
180
+ .head:has(> .tile-badge:first-child + .head__chips) { row-gap: var(--head-words-gap, var(--sp-1)); }
181
+ .head:has(> .tile-badge:first-child + .head__chips) > :is(.tile-badge:first-child, .head__chips) { margin-block-end: max(0rem, calc(var(--head-group-gap, var(--sp-5)) - var(--head-words-gap, var(--sp-1)))); } /* the date and its chips both keep it, so the stretched date stays as tall as the chips */
182
+ .head__chips { grid-column: 2; grid-row: 1; align-self: stretch; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--head-chips-gap, var(--head-col-gap, var(--sp-3))); }
183
+ .head__chips-top { min-height: calc(round(down, calc(var(--fs-sm) * var(--chip-sm-line, var(--lh-body))), 1px) + 2 * var(--chip-sm-pad-y, var(--sp-0)) + 2 * var(--border-w)); } /* one small chip tall (actions.css: a head's chips) */
176
184
 
177
185
  /* a head that LEADS with a person or a thing (Lh 2026-10-28, timebank's welcome card; re-laid for a phone's width the same day): a `Head` whose
178
186
  first child is a `Lead`, an `Avatar` or an `AvatarStack` (a stamp in one) and whose second is the `Words` title. The lead at the left, as tall
package/css/sticky.css CHANGED
@@ -103,7 +103,7 @@
103
103
  .sticky__head:has(> .sticky-date) { align-items: start; }
104
104
  .sticky__body { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: clip; /* words past the note's room are cut, the foot keeps its place */ font: var(--sticky-font, var(--type-title)); overflow-wrap: anywhere; }
105
105
  .sticky--small .sticky__body { font: var(--sticky-small-font, var(--type-label)); } /* the note measured its words and they did not fit at its size (src/sticky/fit.ts) */
106
- .sticky__paper > :not(.sticky__body) > .chip { --chip-border: transparent; --chip-bg: var(--sticky-chip-bg, color-mix(in srgb, var(--stamp-paper) 85%, transparent)); --dark: inherit; --chip-ink: var(--sticky-ink, var(--card-ink)); } /* a chip on a note is a label ON the paper (whose note it is): a pale ground nearly opaque (it may lie over words), no edge, the note's ink */
106
+ .sticky__paper > :not(.sticky__body) > .chip:not(.chip--error, .chip--warn, .chip--ok, .chip--info) { --chip-border: transparent; --chip-bg: var(--sticky-chip-bg, color-mix(in srgb, var(--stamp-paper) 85%, transparent)); --dark: inherit; --chip-ink: var(--sticky-ink, var(--card-ink)); } /* a chip on a note is a label ON the paper (whose note it is): a pale ground nearly opaque (it may lie over words), no edge, the note's ink; a toned chip (Chip tone) keeps its own fill and ink */
107
107
  .sticky__foot { flex: none; font: var(--sticky-foot-font, var(--type-caption)); color: var(--sticky-muted-ink, var(--_muted)); padding-inline-end: var(--_fold); } /* the line stops before the fold */
108
108
  /* the flap: a square in the corner — the paper's cut takes its outer half, what is left is the triangle lying on the note */
109
109
  .sticky__fold {
@@ -39,6 +39,7 @@ export interface PillBtnProps extends BtnBase {
39
39
  form?: boolean;
40
40
  icon?: never;
41
41
  label?: never;
42
+ count?: never;
42
43
  }
43
44
  interface RoundBase extends BtnBase {
44
45
  /** `round`: the round button, as wide as it is tall */
@@ -47,6 +48,8 @@ interface RoundBase extends BtnBase {
47
48
  label: string;
48
49
  block?: never;
49
50
  form?: never;
51
+ /** a COUNT on the button's top-right corner, drawn as a `Badge` (unread alerts): 0 or none draws nothing, over 99 reads "99+". The spoken name is `label` plus the count ("Alerts 3") */
52
+ count?: number;
50
53
  }
51
54
  /** a round button shows its `icon` (sized to the button; anything else it holds — a Badge, a word in a `BtnGroup` frame — follows the icon),
52
55
  * or, with no icon, a short WORD (`lg` / `xl`: it grows with the member's text size up to the circle's share) */
@@ -3,6 +3,7 @@ import { createElement } from 'react';
3
3
  import { useSendOut } from './useSendOut.js';
4
4
  import { cx } from '../cx.js';
5
5
  import { Icon } from '../type/Icon.js';
6
+ import { Badge } from '../numbers/Badge.js';
6
7
  /**
7
8
  * Btn — THE button (Lh 2026-10-29: one component, so any button swaps for another). `shape`: a `pill` of words (default) or a `round` of an
8
9
  * icon; `size` one ladder for both (`sm` 44 · `md` 48 · `lg` 56, a pill and a round one height; `xl` each shape its own, not swap-equal); `tone` `primary` for the one move, `quiet` on tinted cards, `warn`.
@@ -11,13 +12,14 @@ import { Icon } from '../type/Icon.js';
11
12
  * and render that `<Menu popover actions id>` wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`.
12
13
  */
13
14
  export function Btn(props) {
14
- const { shape, size, tone, href, sending, onSent, busy, disabled, onAnimationEnd, className, type, children, block, form, label, icon, ...rest } = props;
15
+ const { shape, size, tone, href, sending, onSent, busy, disabled, onAnimationEnd, className, type, children, block, form, label, icon, count, ...rest } = props;
15
16
  const ended = useSendOut(sending, onSent, onAnimationEnd);
16
17
  const round = shape === 'round';
17
18
  const base = round ? 'icon-btn' : 'btn';
18
19
  const step = size && size !== 'md' ? `${base}--${size}` : undefined;
19
20
  const look = tone && tone !== 'default' ? `${base}--${tone}` : undefined;
20
21
  const ring = busy && _jsx(Icon, { name: "loader-circle", className: "btn__busy", size: round ? (size === 'sm' ? 'sm' : 'md') : 'xs' });
22
+ const shown = round && count != null && count > 0 ? (count > 99 ? '99+' : String(count)) : undefined;
21
23
  const invert = round && tone === 'primary' && 'icon-btn--invert'; // the round primary's old class name too: a theme's `.icon-btn--invert` rule still hits it
22
24
  return createElement(href ? 'a' : 'button', {
23
25
  onAnimationEnd: ended,
@@ -26,8 +28,8 @@ export function Btn(props) {
26
28
  disabled: href ? disabled : disabled || busy,
27
29
  'aria-disabled': href && busy ? true : undefined,
28
30
  'aria-busy': busy || undefined,
29
- 'aria-label': round ? label : undefined,
30
- className: cx(base, step, look, invert, block && 'btn--block', form && 'btn--form', sending && 'is-sending', busy && 'is-busy', className),
31
+ 'aria-label': round ? (shown ? `${label} ${shown}` : label) : undefined,
32
+ className: cx(base, step, look, invert, shown && 'icon-btn--count', block && 'btn--block', form && 'btn--form', sending && 'is-sending', busy && 'is-busy', className),
31
33
  ...rest,
32
- }, round ? (ring ? _jsxs(_Fragment, { children: [ring, icon ? children : null] }) : icon ? _jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: size === 'sm' ? 'sm' : 'md' }), children] }) : children) : _jsxs(_Fragment, { children: [ring, children] }));
34
+ }, round ? _jsxs(_Fragment, { children: [ring ? _jsxs(_Fragment, { children: [ring, icon ? children : null] }) : icon ? _jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: size === 'sm' ? 'sm' : 'md' }), children] }) : children, shown && _jsx(Badge, { className: "icon-btn__count", "aria-hidden": "true", children: shown })] }) : _jsxs(_Fragment, { children: [ring, children] }));
33
35
  }
@@ -7,6 +7,8 @@ export interface ChipProps extends ComponentProps<'span'> {
7
7
  soft?: boolean;
8
8
  /** quiet: an untouched default value — muted words, the thin edge, nothing to find the eye (docs/reference.md rule 13) */
9
9
  muted?: boolean;
10
+ /** a solid fill in a SIGNAL's colour, for a status that must be read at once: `error` red (what was agreed changed, or the request ended) · `warn` yellow (an answer is needed) · `ok` green (good news) · `info` blue (for your information). The palette's own signal shade (`--signal-<tone>-onlight`; `-ondark` where a project makes its controls' paper dark, `--action-dark`) with the ink that holds 4.5:1 on it. Not with `on`, `soft`, `muted` or `dot` — `tone` is kept, the others ignored. Works with `sm` and `xs` */
11
+ tone?: DotTone;
10
12
  /** a leading signal dot: `a` (the accent signal), `b` (the secondary), or one of the signal set — ok · warn · error · info */
11
13
  dot?: 'a' | 'b' | DotTone;
12
14
  /** a small label: low and tight (a name on a note). Never with `as="button"` or `href` — it is under tap size */
@@ -21,7 +23,7 @@ export interface ChipProps extends ComponentProps<'span'> {
21
23
  children?: ReactNode;
22
24
  }
23
25
  /** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only, `xs` the smallest (a count in a status row); `soft` for a status that should be seen, `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
24
- export declare function Chip({ on, soft, muted, dot, sm, xs, as, href, className, children, ...rest }: ChipProps): import("react").DetailedReactHTMLElement<{
26
+ export declare function Chip({ on, soft, muted, tone, dot, sm, xs, as, href, className, children, ...rest }: ChipProps): import("react").DetailedReactHTMLElement<{
25
27
  ref?: import("react").Ref<HTMLSpanElement> | undefined;
26
28
  key?: import("react").Key | null | undefined;
27
29
  defaultChecked?: boolean | undefined;
@@ -2,12 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement, useId } from 'react';
3
3
  import { cx } from '../cx.js';
4
4
  import { tagged } from '../pressable.js';
5
- import { useControlled } from '../state.js';
5
+ import { useControlled, warnOnce } from '../state.js';
6
6
  import { Dot } from './Dot.js';
7
7
  /** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only, `xs` the smallest (a count in a status row); `soft` for a status that should be seen, `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
8
- export function Chip({ on, soft, muted, dot, sm, xs, as, href, className, children, ...rest }) {
8
+ export function Chip({ on, soft, muted, tone, dot, sm, xs, as, href, className, children, ...rest }) {
9
9
  const { el, props } = tagged(as, href);
10
- return createElement(el, { ...props, className: cx('chip', on && 'chip--on', soft && !on && 'chip--soft', muted && 'chip--muted', sm && 'chip--sm', xs && 'chip--xs', className), ...rest }, dot && _jsx(Dot, { b: dot === 'b', tone: dot === 'a' || dot === 'b' ? undefined : dot }), children);
10
+ if (tone && (on || soft || muted || dot))
11
+ warnOnce('chip-tone-kind', 'cardds Chip: `tone` is a signal fill of its own — with `on`, `soft`, `muted` or `dot` the `tone` is kept and they are ignored');
12
+ return createElement(el, { ...props, className: cx('chip', tone && `chip--${tone}`, !tone && on && 'chip--on', !tone && soft && !on && 'chip--soft', !tone && muted && 'chip--muted', sm && 'chip--sm', xs && 'chip--xs', className), ...rest }, dot && !tone && _jsx(Dot, { b: dot === 'b', tone: dot === 'a' || dot === 'b' ? undefined : dot }), children);
11
13
  }
12
14
  /** ChipPick — a chip that is a choice, on a sheet and never in a Card (the sheet is the paper the member fills in, Lh 2026-10-18): full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
13
15
  * interest picker); the picked one fills with accent. A native radio/checkbox inside the label carries the state. */
package/dist/cardds.css CHANGED
@@ -1163,7 +1163,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1163
1163
  .card__press { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); } /* Card onPress: the unseen button the keyboard and a screen reader press */
1164
1164
  .card--press:has(> .card__press:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
1165
1165
  .card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
1166
- .head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
1166
+ .head > .chip-row > .chip > .icon, .head__chips .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
1167
1167
 
1168
1168
  /* ---- bleed: a scrolling track that runs to the container's edges ----
1169
1169
  For a horizontal strip inside a padded container — .avatar-pick, .chip-row,
@@ -2976,7 +2976,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
2976
2976
  .tile-badge--stretch.tile-badge--sub-beside > :not(:first-child) { grid-column: auto; } /* the number and the month share the second line */
2977
2977
 
2978
2978
  /* where it sits in a head that leads with the date (card.css): the first cell, as tall as the chips beside it however many rows, so no cap */
2979
- .head:has(> .tile-badge:first-child + .chip-row) > .tile-badge--stretch:first-child { grid-column: 1; grid-row: 1; max-block-size: none; }
2979
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) > .tile-badge--stretch:first-child { grid-column: 1; grid-row: 1; max-block-size: none; }
2980
2980
 
2981
2981
  /* corner badge: pin a tile badge on media (rating, price) — .card__media is relative */
2982
2982
  .tile-badge--corner { position: absolute; right: var(--sp-3); bottom: var(--sp-3); }
@@ -2993,6 +2993,10 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
2993
2993
  font: var(--note-row-font, var(--type-caption));
2994
2994
  color: var(--note-row-ink, var(--card-muted));
2995
2995
  }
2996
+ /* NoteRows: the lines of ONE thing (a place, a person) stand close, a step apart — not the card's gap, which parts one thing from the next */
2997
+ .note-rows { display: grid; gap: var(--note-rows-gap, var(--sp-1)); }
2998
+ /* Was: the replaced value, struck through after the new one, in the muted ink of its ground */
2999
+ .was-value { text-decoration: line-through; color: var(--was-ink, var(--card-muted)); }
2996
3000
 
2997
3001
  /* ---- css/actions.css — topbar, chips, buttons, CTA pack ---- */
2998
3002
  /* ============================================================
@@ -3049,6 +3053,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3049
3053
  a .step cancels it to touch the bar. */
3050
3054
  .appbar__brand { flex: 1; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
3051
3055
  .appbar__lead { flex: none; display: flex; align-items: center; } /* AppBar lead: its own button, left-most, outside the brand button */
3056
+ .appbar__action { flex: none; display: flex; align-items: center; gap: var(--appbar-action-gap, var(--sp-2)); } /* AppBar action: one or two controls at the right edge, the title (flex 1, min-width 0) takes the rest and ellipsises */
3052
3057
  .appbar__text { display: grid; min-width: 0; flex: 1; } /* pushes trailing button to the right edge */
3053
3058
  /* the mark + the words as ONE button (AppBar brandButton — the member's name opens their menu, Lh 2026-09-23): the same row, a tap target */
3054
3059
  .appbar__who {
@@ -3084,6 +3089,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3084
3089
  /* a round's primary tone (Btn shape="round" tone="primary" carries both names; `invert` was its name until Lh 2026-10-29): the round's own
3085
3090
  invert knobs first — the themes' contract — then the pill's primary, so by default both shapes fill alike */
3086
3091
  :is(.icon-btn--invert, .icon-btn--primary) { background: var(--icon-btn-invert-bg, var(--btn-primary-bg, var(--accent))); color: var(--icon-btn-invert-ink, var(--btn-primary-ink, var(--on-accent))); border-color: transparent; }
3092
+ /* a count on a round (Btn count): the Badge sits on the top-right corner, half out; the button is positioned only when it carries one */
3093
+ .icon-btn--count { position: relative; }
3094
+ .icon-btn__count { position: absolute; inset: 0 0 auto auto; translate: 30% -30%; pointer-events: none; }
3087
3095
  .icon-btn--sm { width: var(--icon-btn-sm-size, var(--tap-sm)); height: var(--icon-btn-sm-size, var(--tap-sm)); font-size: var(--fs-title); }
3088
3096
  /* the bigger round sizes (`Btn shape="round" size`): lg is the hero control's size (--tap-lg), xl the biggest (--tap-xl), both on --tap-base like every size.
3089
3097
  What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (1/2, below), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
@@ -3261,6 +3269,13 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3261
3269
  .chip--on { background: var(--chip-on-bg, var(--accent)); --dark: var(--accent-dark); color: var(--chip-on-ink, var(--card-ink)); border-color: transparent; }
3262
3270
  /* muted: an untouched default — the words wash out, the edge stays; emphasis is the difference from the neighbours (docs/reference.md 13) */
3263
3271
  .chip--muted { color: var(--chip-muted-ink, var(--card-muted)); } /* the chip's own fill's muted words: a muted chip on the dark card is still a light chip */
3272
+ /* tone: a signal as the chip's fill (Chip tone, cardds#216) — the palette's own shade for the paper's side (--action-dark, as the chip's own paper: --signal-*-onlight at rest, -ondark where a project makes its controls' paper dark), and the ink of the OTHER side so it holds 4.5:1 on it:
3273
+ the fill's side is the opposite of the paper's, so --dark flips and --card-ink follows it. Knobs --chip-tone-bg / --chip-tone-ink retune every tone at once */
3274
+ .chip--error { --_tone: color-mix(in srgb, var(--signal-error-ondark) calc(var(--action-dark) * 100%), var(--signal-error-onlight)); }
3275
+ .chip--warn { --_tone: color-mix(in srgb, var(--signal-warn-ondark) calc(var(--action-dark) * 100%), var(--signal-warn-onlight)); }
3276
+ .chip--ok { --_tone: color-mix(in srgb, var(--signal-ok-ondark) calc(var(--action-dark) * 100%), var(--signal-ok-onlight)); }
3277
+ .chip--info { --_tone: color-mix(in srgb, var(--signal-info-ondark) calc(var(--action-dark) * 100%), var(--signal-info-onlight)); }
3278
+ :is(.chip--error, .chip--warn, .chip--ok, .chip--info) { --dark: calc(1 - var(--action-dark)); background: var(--chip-tone-bg, var(--_tone)); color: var(--chip-tone-ink, var(--card-ink)); border-color: transparent; }
3264
3279
 
3265
3280
  .chip-row { display: flex; gap: var(--sp-2); }
3266
3281
  /* the words that lead the chips (ChipRow `lead`, "นัดที่" before a place, Lh 2026-10-21): the chips' own type and size, at the middle of their height */
@@ -3560,6 +3575,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3560
3575
  .head > .chip-row { flex: 1 1 100%; order: 2; max-height: calc(2 * (round(down, calc(var(--fs-sm) * var(--chip-sm-line, var(--lh-body))), 1px) + 2 * var(--chip-sm-pad-y, var(--sp-0)) + 2 * var(--border-w)) + var(--sp-2)); overflow: hidden; }
3561
3576
  /* …beside a date that leads the head (card.css) they stand in the date's row, every chip in sight: the meeting place may take a line of its own */
3562
3577
  .head:has(> .tile-badge:first-child + .chip-row) > .chip-row { grid-column: 2; grid-row: 1; max-height: none; }
3578
+ .head__chips .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* two rows beside the date (parts.css): a chip is cut at the column's width */
3563
3579
  .head > .chip-row > .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3564
3580
  .foot > .btn { flex: 1 1 0; min-width: 0; }
3565
3581
  /* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
@@ -4770,16 +4786,24 @@ a.bubble { color: inherit; text-decoration: none; }
4770
4786
 
4771
4787
  /* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
4772
4788
  ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
4773
- width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
4789
+ width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row and the gap between the heading and its caption are --head-lead-gap (one chip row) or, with two rows, --head-group-gap and --head-words-gap; the date and the chips place themselves (journey.css, actions.css).
4774
4790
  Everything after the chips stands on rows of its own under them, in the order given.
4775
4791
  <div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
4776
- .head:has(> .tile-badge:first-child + .chip-row) {
4792
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) {
4777
4793
  display: grid;
4778
4794
  grid-template-columns: auto minmax(0, 1fr);
4779
4795
  align-items: center;
4780
4796
  row-gap: var(--head-lead-gap, var(--sp-3));
4781
4797
  }
4782
- .head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
4798
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
4799
+ /* TWO chip rows beside the date (Head `chips` over `chipsBelow`): a column as tall as the date, the upper row at its top (it keeps one small chip's height
4800
+ when it has no chip), the lower row at its foot, the gap between them the column gap's. The rows under it are --head-words-gap (--sp-1) apart (the title and
4801
+ its meta) and the title stands a GROUP gap (--head-group-gap, --sp-5) under the date row: the date and its chip column each keep a margin below that makes up the difference (the stretched date is still as tall as the chips), so the date
4802
+ and its chips read as one group and the words as another. One chip row keeps --head-lead-gap everywhere, untouched */
4803
+ .head:has(> .tile-badge:first-child + .head__chips) { row-gap: var(--head-words-gap, var(--sp-1)); }
4804
+ .head:has(> .tile-badge:first-child + .head__chips) > :is(.tile-badge:first-child, .head__chips) { margin-block-end: max(0rem, calc(var(--head-group-gap, var(--sp-5)) - var(--head-words-gap, var(--sp-1)))); } /* the date and its chips both keep it, so the stretched date stays as tall as the chips */
4805
+ .head__chips { grid-column: 2; grid-row: 1; align-self: stretch; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: var(--head-chips-gap, var(--head-col-gap, var(--sp-3))); }
4806
+ .head__chips-top { min-height: calc(round(down, calc(var(--fs-sm) * var(--chip-sm-line, var(--lh-body))), 1px) + 2 * var(--chip-sm-pad-y, var(--sp-0)) + 2 * var(--border-w)); } /* one small chip tall (actions.css: a head's chips) */
4783
4807
 
4784
4808
  /* a head that LEADS with a person or a thing (Lh 2026-10-28, timebank's welcome card; re-laid for a phone's width the same day): a `Head` whose
4785
4809
  first child is a `Lead`, an `Avatar` or an `AvatarStack` (a stamp in one) and whose second is the `Words` title. The lead at the left, as tall
@@ -5317,7 +5341,7 @@ a.bubble { color: inherit; text-decoration: none; }
5317
5341
  .sticky__head:has(> .sticky-date) { align-items: start; }
5318
5342
  .sticky__body { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: clip; /* words past the note's room are cut, the foot keeps its place */ font: var(--sticky-font, var(--type-title)); overflow-wrap: anywhere; }
5319
5343
  .sticky--small .sticky__body { font: var(--sticky-small-font, var(--type-label)); } /* the note measured its words and they did not fit at its size (src/sticky/fit.ts) */
5320
- .sticky__paper > :not(.sticky__body) > .chip { --chip-border: transparent; --chip-bg: var(--sticky-chip-bg, color-mix(in srgb, var(--stamp-paper) 85%, transparent)); --dark: inherit; --chip-ink: var(--sticky-ink, var(--card-ink)); } /* a chip on a note is a label ON the paper (whose note it is): a pale ground nearly opaque (it may lie over words), no edge, the note's ink */
5344
+ .sticky__paper > :not(.sticky__body) > .chip:not(.chip--error, .chip--warn, .chip--ok, .chip--info) { --chip-border: transparent; --chip-bg: var(--sticky-chip-bg, color-mix(in srgb, var(--stamp-paper) 85%, transparent)); --dark: inherit; --chip-ink: var(--sticky-ink, var(--card-ink)); } /* a chip on a note is a label ON the paper (whose note it is): a pale ground nearly opaque (it may lie over words), no edge, the note's ink; a toned chip (Chip tone) keeps its own fill and ink */
5321
5345
  .sticky__foot { flex: none; font: var(--sticky-foot-font, var(--type-caption)); color: var(--sticky-muted-ink, var(--_muted)); padding-inline-end: var(--_fold); } /* the line stops before the fold */
5322
5346
  /* the flap: a square in the corner — the paper's cut takes its outer half, what is left is the triangle lying on the note */
5323
5347
  .sticky__fold {