@usableapp/cardds 0.7.176 → 0.7.178

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,39 @@
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.178 — 2026-11-17
10
+
11
+ `Popup` (a panel under a button) is new, a `Row` can be `unread`, `Rows` can be `joined`, and a `Lead` takes a `tone`.
12
+
13
+ Components: all
14
+
15
+ ### Added
16
+ - **`Popup`, `Row unread`, `Rows joined`, `Lead tone`** (cardds#219): before, a list read from a bell (notifications) could not be built from cardds: a `Menu popover` takes only `MenuItem`s (no head, no `Rows`, no scrolling head), a `Row` had no unread fill, `Rows` drew a gap and a hairline only BETWEEN rows, and a `Lead` was an outline in one colour. After, all four are opt-in and every existing screen is unchanged:
17
+ - `<Popup id="inbox" end title meta action={<Btn size="sm">…</Btn>}>` is a native popover panel under the button carrying `popoverTarget="inbox"` (tap outside or Esc closes): a head (title, a second line, ONE Btn at the right, sticky) over its children, flush to its left and right edges (`Rows joined`). `end` (a button at the screen's right) makes its right edge the button's and it grows leftwards; it is never wider than the room it has less `--popup-margin` each side, at most `--popup-w`, and scrolls inside itself when the room under the button is short (`--popup-max-h`). Knobs `--popup-margin`, `--popup-w`, `--popup-max-h`, `--popup-bg`, `--popup-border`, `--popup-radius`, `--popup-shadow`, `--popup-pad-x`, `--popup-pad-y`, `--popup-head-gap`.
18
+ - `<Row unread>`: a very light grey fill over the whole row, the new token `--unread-bg` (4% of the ink over any ground; knob `--row-unread-bg`); a screen reader hears "unread" (`unreadLabel`).
19
+ - `<Rows joined>`: no gap, every row a band edge to edge with its own padding and a border under it, so rows with a fill join. Knobs `--rows-joined-pad-x`, `--rows-joined-pad-y`, `--rows-joined-border`.
20
+ - `<Lead icon tone="blue|green|amber|red|pink|violet">`: a filled box, a white icon on a colour of cardds's set (new tokens `--tone-blue` … `--tone-violet`; in the wireframe six greys). The icon holds 4.5:1 or more in every shipped palette (lowest 4.74, blue on clay). Knobs `--lead-bg`, `--lead-ink`.
21
+ Stories `Popup · UnderABell`, `Popup · AtTheStart`, `Popup · LongList`, `Lead · Tones`, `Row · Unread`; the Palette page lists the tones and `--unread-bg`.
22
+
23
+ ## 0.7.177 — 2026-11-17
24
+
25
+ `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.
26
+
27
+ 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
28
+
29
+ ### Added
30
+ - **`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`.
31
+ - **`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`.
32
+ - **`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`.
33
+ - **`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.
34
+
35
+ ### Fixed
36
+ - **`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
37
 
5
38
  ## 0.7.176 — 2026-11-15
6
39
 
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/layover.css CHANGED
@@ -163,6 +163,74 @@
163
163
  @starting-style { .menu:popover-open { opacity: 0; translate: 0 calc(-1 * var(--sp-2)); } }
164
164
  }
165
165
 
166
+ /* ---- popup: a panel hung under the button that opens it — a head and `Rows joined` flush to its edges (cardds#219) ----
167
+ <button class="btn" popovertarget="inbox">…</button>
168
+ <div class="popup popup--end" id="inbox" popover role="group"><div class="popup__head"><span class="words">…</span><button class="btn">Read all</button></div>
169
+ <div class="rows rows--joined"><a class="row">…</a>…</div></div>
170
+ Native popover, as .menu: light dismiss, Esc, top layer, anchored to its invoker where anchor positioning exists. It is a paper of its own (the card-1 ground, so
171
+ the words on it follow that side), never wider than the screen less a margin each side, and scrolls inside itself when the room under the button is short: the head
172
+ is sticky, opaque, so a row's fill passes under it. Without anchor positioning (iOS before 26) it hangs under the top bar: the margin from the screen's start edge,
173
+ or from its end edge (a margin in) with .popup--end. .popup--end = the button is at the screen's right: the popup's right edge is the button's, it grows leftwards (as .menu--end), its left margin kept by max-width. */
174
+ .popup {
175
+ --card-bg: var(--card-1-bg); /* the paper's own slot (a ring, a fold reads it); its side, the inks follow (tokens.css) */
176
+ --dark: var(--card-1-dark);
177
+ --_popup-w: calc(var(--tap-base) * 8); /* 384: the widest it grows */
178
+ --_popup-max-h: calc(var(--tap-base) * 12); /* 576: the tallest it grows, short screens aside */
179
+ --_popup-room: calc(100dvh - var(--safe-top) - var(--header-h) - var(--sp-2) - var(--popup-margin, var(--sp-3))); /* the room under the top bar; anchored, what is under the button (below) */
180
+ display: none; /* explicit closed state — never display on the base rule */
181
+ margin: 0;
182
+ padding: 0;
183
+ inset: auto;
184
+ inset-block-start: calc(var(--safe-top) + var(--header-h) + var(--sp-2));
185
+ inset-inline-start: var(--popup-margin, var(--sp-3));
186
+ width: var(--popup-w, var(--_popup-w));
187
+ max-width: calc(100% - 2 * var(--popup-margin, var(--sp-3)));
188
+ max-height: min(var(--popup-max-h, var(--_popup-max-h)), var(--_popup-room));
189
+ overflow-y: auto;
190
+ overscroll-behavior: contain;
191
+ background: var(--popup-bg, var(--card-bg));
192
+ color: var(--card-ink);
193
+ border: var(--border-w) solid var(--popup-border, var(--card-border));
194
+ border-radius: var(--popup-radius, var(--r-card));
195
+ box-shadow: var(--popup-shadow, var(--shadow-float));
196
+ }
197
+ .popup:popover-open { display: block; }
198
+ .popup.\:popover-open { display: block; } /* the polyfill's open (iOS 16.4), its own rule as .menu's */
199
+ .popup--end { inset-inline-start: auto; inset-inline-end: var(--popup-margin, var(--sp-3)); }
200
+ .popup__head {
201
+ position: sticky;
202
+ inset-block-start: 0;
203
+ z-index: var(--z-over);
204
+ display: flex;
205
+ align-items: center;
206
+ gap: var(--popup-head-gap, var(--sp-3));
207
+ padding: var(--popup-pad-y, var(--sp-3)) var(--popup-pad-x, var(--sp-4));
208
+ background: var(--popup-bg, var(--card-bg)); /* opaque: what scrolls under it is hidden, a row's fill too */
209
+ border-bottom: var(--border-w) solid var(--hairline);
210
+ }
211
+ .popup__head > .words { flex: 1; min-width: 0; }
212
+ .popup__head > :not(.words) { flex: none; }
213
+ @supports (anchor-name: --a) {
214
+ .popup[popover] {
215
+ position-area: block-end span-inline-end; /* from the button's start edge, rightwards */
216
+ inset: auto;
217
+ margin-block: var(--sp-2) var(--popup-margin, var(--sp-3));
218
+ --_popup-room: calc(100% - var(--sp-2) - var(--popup-margin, var(--sp-3))); /* % of the area under the button */
219
+ position-try-fallbacks: flip-block;
220
+ }
221
+ .popup--end[popover] { position-area: block-end span-inline-start; } /* the button's right edge, leftwards (as .menu--end): the bar's own inset is the margin */
222
+ }
223
+ @media (prefers-reduced-motion: no-preference) {
224
+ .popup[popover] {
225
+ opacity: 0;
226
+ translate: 0 calc(-1 * var(--sp-2));
227
+ transition: display var(--motion-quick) allow-discrete, overlay var(--motion-quick) allow-discrete, opacity var(--motion-quick), translate var(--motion-quick);
228
+ }
229
+ .popup:popover-open { opacity: 1; translate: 0 0; }
230
+ .popup.\:popover-open { opacity: 1; translate: 0 0; }
231
+ @starting-style { .popup:popover-open { opacity: 0; translate: 0 calc(-1 * var(--sp-2)); } }
232
+ }
233
+
166
234
  /* ---- banner: ONE band — the line that opens it and the body share one ground (Lh 2026-09-24: "ปุ่มกับเนื้อหาใช้พื้นที่เดียวกัน") ----
167
235
  <details class="banner"><summary class="banner__summary">Save 2 h… <svg class="icon icon--xs"/></summary>
168
236
  <div class="banner__body">…</div></details>
package/css/lists.css CHANGED
@@ -63,6 +63,18 @@
63
63
  border-top: var(--border-w) solid var(--hairline);
64
64
  }
65
65
 
66
+ /* a row not yet seen (`Row unread`, cardds#219): the whole row takes a very light grey fill, the token --unread-bg (4% of the ink over any ground) */
67
+ .row--unread { background: var(--row-unread-bg, var(--unread-bg)); }
68
+
69
+ /* joined rows (`Rows joined`, cardds#219): no gap, every row a band edge to edge with its padding and a border under it (the last too), so a row with a fill
70
+ touches the next and reads as a band. The between-rows hairline is not drawn (the border is the line); a list for a holder that fills its width (a Popup) */
71
+ .rows.rows--joined { --rows-gap: 0rem; }
72
+ .rows--joined > .row + .row::before { display: none; }
73
+ .rows--joined > :is(.row, .row-expand) { border-bottom: var(--border-w) solid var(--rows-joined-border, var(--hairline)); }
74
+ .rows--joined > .row, .rows--joined > .row-expand > summary { padding: var(--rows-joined-pad-y, var(--sp-3)) var(--rows-joined-pad-x, var(--sp-4)); }
75
+ .rows--joined > .row-expand > .row-expand__more { padding: 0 var(--rows-joined-pad-x, var(--sp-4)) var(--rows-joined-pad-y, var(--sp-3)); }
76
+ .rows--joined > .rows__head { padding: var(--rows-joined-pad-y, var(--sp-3)) var(--rows-joined-pad-x, var(--sp-4)) 0; }
77
+
66
78
  /* ---- kv: label left, value right ----
67
79
  <dl class="kv"><div class="kv__row"><dt class="kv__key">Pay with</dt><dd class="kv__val">GHO</dd></div>…</dl> */
68
80
  .kv { margin: 0; display: grid; }
package/css/palette.css CHANGED
@@ -123,6 +123,13 @@
123
123
  --dot-a: #dd9787; --dot-b: #b08a5a;
124
124
  }
125
125
 
126
+ /* TONES (cardds#219): the six fills of a `Lead tone`, a white icon on a colour to tell kinds of thing apart — in coloured mode, whatever the palette (a project's own
127
+ `data-palette` too). Each holds the ondark ink at 4.5:1 or more on every palette cardds ships, the dimmest ink (clay's #f4efe4) included; the lowest is blue on clay, 4.74.
128
+ A project whose own ondark ink is dimmer than that retunes the tone it fails (inkGrounds() names it), or sets it in its theme.css. The wireframe's are greys (tokens.css) */
129
+ [data-palette] {
130
+ --tone-blue: #2a6f9e; --tone-green: #52613d; --tone-amber: #8a5a12; --tone-red: #c22d12; --tone-pink: #b8285e; --tone-violet: #5b4a8a;
131
+ }
132
+
126
133
  /* Colored palettes trade wireframe outlines for soft elevation. */
127
134
  [data-palette] :is(.card, .band-stack) { box-shadow: var(--shadow-card); }
128
135
  /* COLOURED MODE is the attribute, whatever its value: a project with colours of its own (the five
package/css/parts.css CHANGED
@@ -26,6 +26,17 @@
26
26
  }
27
27
  .feed-card > .head:has(> .t-caption) > .lead { grid-row: span 2; }
28
28
 
29
+ /* a filled lead (`Lead tone`, cardds#219): one colour of the set (tokens.css greys, palette.css colours), no outline (its border colour is clear, in a row card too), the ondark ink on it. It declares its side (dark)
30
+ so inkGrounds() reads it as a dark ground, and names the ink itself: its ground is its own fill, not the card's */
31
+ .lead--tone, :is(.card--row, .feed-card > .head) > .lead--tone { border-color: transparent; }
32
+ .lead--tone { --dark: 1; background: var(--lead-bg, var(--_lead-fill)); color: var(--lead-ink, var(--ink-ondark)); }
33
+ .lead--blue { --_lead-fill: var(--tone-blue); }
34
+ .lead--green { --_lead-fill: var(--tone-green); }
35
+ .lead--amber { --_lead-fill: var(--tone-amber); }
36
+ .lead--red { --_lead-fill: var(--tone-red); }
37
+ .lead--pink { --_lead-fill: var(--tone-pink); }
38
+ .lead--violet { --_lead-fill: var(--tone-violet); }
39
+
29
40
  /* ---- words: the title over its meta, taking the room between the lead and the end ---- */
30
41
  .words { flex: 1; display: grid; gap: var(--words-gap, var(--sp-0)); }
31
42
  .row > .words { min-width: 0; }
@@ -163,16 +174,24 @@
163
174
 
164
175
  /* 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
176
  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).
177
+ 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
178
  Everything after the chips stands on rows of its own under them, in the order given.
168
179
  <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) {
180
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) {
170
181
  display: grid;
171
182
  grid-template-columns: auto minmax(0, 1fr);
172
183
  align-items: center;
173
184
  row-gap: var(--head-lead-gap, var(--sp-3));
174
185
  }
175
- .head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
186
+ .head:has(> .tile-badge:first-child + :is(.chip-row, .head__chips)) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
187
+ /* 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
188
+ 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
189
+ 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
190
+ and its chips read as one group and the words as another. One chip row keeps --head-lead-gap everywhere, untouched */
191
+ .head:has(> .tile-badge:first-child + .head__chips) { row-gap: var(--head-words-gap, var(--sp-1)); }
192
+ .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 */
193
+ .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))); }
194
+ .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
195
 
177
196
  /* 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
197
  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 {
package/css/tokens.css CHANGED
@@ -334,6 +334,9 @@
334
334
  --signal-info-onlight: #2e5c98;
335
335
  /* highlights (Lh 2026-09-25): four atmosphere colours a palette may set for decoration — a count, a mark, a chart dot; the wireframe keeps them grey */
336
336
  --highlight-1: #3d3d3d; --highlight-2: #8a8a8a; --highlight-3: #5f5f5f; --highlight-4: #b0b0b0;
337
+ /* tones (cardds#219): six fills for a small box that carries the ondark ink (a `Lead tone`), to tell kinds of thing apart. Colour lives in palette.css only, so the
338
+ wireframe keeps six greys — darkened so white holds 4.5:1 on each (a project's theme may set them) */
339
+ --tone-blue: #111111; --tone-green: #2b2b2b; --tone-amber: #444444; --tone-red: #595959; --tone-pink: #666666; --tone-violet: #737373;
337
340
  --signal-error-onlight: #af2525; /* something went wrong — a field's edge, the words that say what */
338
341
  /* on a dark ground no shade of one hue holds 4.5:1 on every palette's dark fill and stays itself: a signal there is the ondark ink,
339
342
  and the icon and the words carry the meaning. A palette may give its own (orchard) */
@@ -343,6 +346,7 @@
343
346
  --outline: var(--action-border); /* control edges (palette.css softens) */
344
347
  --hairline: color-mix(in srgb, currentColor 18%, transparent); /* dividers inside cards */
345
348
  --ink-tint: color-mix(in srgb, currentColor 12%, transparent); /* hover, rails, rests */
349
+ --unread-bg: color-mix(in srgb, currentColor 4%, transparent); /* a very light grey over any ground: a row never read (Row unread) */
346
350
  --ink-rail: color-mix(in srgb, currentColor 30%, transparent); /* todo steps, ghost edges */
347
351
  --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent); /* calendar marks */
348
352
  --accent-wash: color-mix(in srgb, var(--accent) 22%, var(--action-bg)); /* the same wash laid on the paper of fields and buttons, opaque: a soft chip reads the same on any card (Chip soft) */
@@ -413,7 +417,7 @@
413
417
  tile) takes its ground's side: `--dark: inherit`. inkGrounds() measures it; docs/reference.md "Ink follows its ground" */
414
418
  :where(body, [data-palette], [data-mode], .card, .tile, .modal__drawer, .postcard__front, .postcard__back, .sticky, .post-paper,
415
419
  .float-bar__pill, .snackbar__body, .track, .tile-badge, .avatar, .bubble__body, .map__hint, .map__pin, .sheet--paper > :is(.body, .foot),
416
- .postcard__band, .track__step, .toggle, .chip, .btn--warn, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
420
+ .postcard__band, .track__step, .toggle, .chip, .btn--warn, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot), .popup) {
417
421
  --card-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--ink-onlight));
418
422
  --card-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--dark) * 100%), var(--ink-onlight-muted));
419
423
  --on-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--accent-dark) * 100%), var(--ink-onlight));
@@ -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. */