@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/dist/index.d.ts CHANGED
@@ -107,6 +107,7 @@ export * from './media/MapPick.js';
107
107
  export * from './media/Tile.js';
108
108
  export * from './media/Mosaic.js';
109
109
  export * from './layover/Banner.js';
110
+ export * from './layover/Popup.js';
110
111
  export * from './layover/Callout.js';
111
112
  export * from './layover/CountIn.js';
112
113
  export * from './layover/Snackbar.js';
package/dist/index.js CHANGED
@@ -109,6 +109,7 @@ export * from './media/MapPick.js';
109
109
  export * from './media/Tile.js';
110
110
  export * from './media/Mosaic.js';
111
111
  export * from './layover/Banner.js';
112
+ export * from './layover/Popup.js';
112
113
  export * from './layover/Callout.js';
113
114
  export * from './layover/CountIn.js';
114
115
  export * from './layover/Snackbar.js';
@@ -6,3 +6,11 @@ export interface NoteRowProps extends ComponentProps<'div'> {
6
6
  }
7
7
  /** NoteRow — icon + caption: transit hints, fine print. */
8
8
  export declare function NoteRow({ icon, className, children, ...rest }: NoteRowProps): import("react").JSX.Element;
9
+ export interface NoteRowsProps extends ComponentProps<'div'> {
10
+ }
11
+ /** NoteRows — two or more `NoteRow`s as ONE group in a card (a place, a person): the lines stand `--note-rows-gap` apart (default `--sp-1`, the lines of one thing), not the card's gap (which parts one thing from the next). */
12
+ export declare function NoteRows({ className, ...rest }: NoteRowsProps): import("react").JSX.Element;
13
+ export interface WasProps extends ComponentProps<'del'> {
14
+ }
15
+ /** Was — the value that was REPLACED (the old place, the old day, the helper who withdrew), struck through in the line's own words, in the muted ink of its ground, after the new value: `<NoteRow>Village hall <Was>Old pavilion</Was></NoteRow>`. A screen reader hears it as "was" (in the page's language) before the old value. In a `NoteRow`, a `Text` or a `Words` meta. */
16
+ export declare function Was({ className, children, ...rest }: WasProps): import("react").JSX.Element;
@@ -1,7 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from '../cx.js';
3
3
  import { Icon } from '../type/Icon.js';
4
+ import { word } from '../words.js';
4
5
  /** NoteRow — icon + caption: transit hints, fine print. */
5
6
  export function NoteRow({ icon = 'clock', className, children, ...rest }) {
6
- return (_jsxs("div", { className: cx('note-row', className), ...rest, children: [_jsx(Icon, { name: icon, size: "sm" }), " ", children] }));
7
+ return (_jsxs("div", { className: cx('note-row', className), ...rest, children: [_jsx(Icon, { name: icon, size: "sm" }), _jsx("span", { children: children })] }));
8
+ }
9
+ /** NoteRows — two or more `NoteRow`s as ONE group in a card (a place, a person): the lines stand `--note-rows-gap` apart (default `--sp-1`, the lines of one thing), not the card's gap (which parts one thing from the next). */
10
+ export function NoteRows({ className, ...rest }) {
11
+ return _jsx("div", { className: cx('note-rows', className), ...rest });
12
+ }
13
+ /** Was — the value that was REPLACED (the old place, the old day, the helper who withdrew), struck through in the line's own words, in the muted ink of its ground, after the new value: `<NoteRow>Village hall <Was>Old pavilion</Was></NoteRow>`. A screen reader hears it as "was" (in the page's language) before the old value. In a `NoteRow`, a `Text` or a `Words` meta. */
14
+ export function Was({ className, children, ...rest }) {
15
+ return _jsxs("del", { className: cx('was-value', className), ...rest, children: [_jsxs("span", { className: "t-sr", children: [word('was'), " "] }), children] });
7
16
  }
@@ -0,0 +1,23 @@
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ export interface PopupProps extends Omit<ComponentProps<'div'>, 'popover' | 'title'> {
3
+ /** unique id: the popup's id the opening button targets with the platform's `popoverTarget={id}` */
4
+ id: string;
5
+ /** the head's title: what the list is (Notifications) */
6
+ title: ReactNode;
7
+ /** the head's second line under the title (the span of time it covers, a count) */
8
+ meta?: ReactNode;
9
+ /** the ONE `Btn` at the head's right (read all). Give a small one (`size="sm"`); the head holds no second control */
10
+ action?: ReactNode;
11
+ /** the opening button sits at the screen's right: the popup's right edge is the button's and it grows leftwards (default: it starts at the button's left edge and grows rightwards). Never wider than the room it has, less a margin */
12
+ end?: boolean;
13
+ /** what the popup lists: `Rows joined`, flush to its left and right edges. They scroll under the head */
14
+ children?: ReactNode;
15
+ }
16
+ /**
17
+ * Popup — a panel hung under the button that opens it: a head (a `title`, a `meta` line, one `action` Btn at the right) and a list of `Rows joined` flush to
18
+ * its edges. A NATIVE popover like a `Menu popover`: any button with `popoverTarget={its id}` opens it, a tap outside or Esc closes it, and it knows nothing of
19
+ * the button. It is never wider than the screen less a margin on each side (`--popup-w` caps it); too tall for the room under the button, the list scrolls
20
+ * inside it and the head stays at the top. Where the browser cannot anchor it to the button (iOS before 26) it hangs under the top bar instead.
21
+ * For a list read and then left (notifications), not a value to pick (that is a `Menu`) and not a page or a sheet of its own.
22
+ */
23
+ export declare function Popup({ id, title, meta, action, end, className, children, ...rest }: PopupProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from 'react';
3
+ import { cx } from '../cx.js';
4
+ import { Words } from '../parts/Words.js';
5
+ /**
6
+ * Popup — a panel hung under the button that opens it: a head (a `title`, a `meta` line, one `action` Btn at the right) and a list of `Rows joined` flush to
7
+ * its edges. A NATIVE popover like a `Menu popover`: any button with `popoverTarget={its id}` opens it, a tap outside or Esc closes it, and it knows nothing of
8
+ * the button. It is never wider than the screen less a margin on each side (`--popup-w` caps it); too tall for the room under the button, the list scrolls
9
+ * inside it and the head stays at the top. Where the browser cannot anchor it to the button (iOS before 26) it hangs under the top bar instead.
10
+ * For a list read and then left (notifications), not a value to pick (that is a `Menu`) and not a page or a sheet of its own.
11
+ */
12
+ export function Popup({ id, title, meta, action, end, className, children, ...rest }) {
13
+ const head = useId();
14
+ return (_jsxs("div", { id: id, popover: "auto", role: "group", "aria-labelledby": head, className: cx('popup', end && 'popup--end', className), ...rest, children: [_jsxs("div", { className: "popup__head", children: [_jsx(Words, { id: head, title: title, meta: meta }), action] }), children] }));
15
+ }
@@ -4,6 +4,10 @@ export interface RowProps extends Omit<ComponentProps<'div'>, 'title'> {
4
4
  lg?: boolean;
5
5
  /** a finished checklist item: muted words, a filled tick at the end, no longer a tap target (aria-disabled) — give it no control at the end */
6
6
  done?: boolean;
7
+ /** not yet seen (a notification never tapped): the whole row takes a very light grey fill (`--row-unread-bg`, default the token `--unread-bg`), so it reads apart from the ground it stands on; a screen reader hears "unread" (`unreadLabel` says it another way). Drop it once the member has read it */
8
+ unread?: boolean;
9
+ /** the words a screen reader hears for an `unread` row; default cardds's own, in the page's language */
10
+ unreadLabel?: string;
7
11
  /** div (default), a link, a label wrapping a Check/Toggle, li */
8
12
  as?: 'div' | 'a' | 'label' | 'li';
9
13
  /** with `as="label"`: the `id` of the control the row presses (its `Check`). Needed when a button stands BEFORE the check (a picked row's own move, "open the map"): a label presses the first control inside it, so without this a touch on the row's words would press that button */
@@ -28,17 +32,19 @@ export interface RowProps extends Omit<ComponentProps<'div'>, 'title'> {
28
32
  * The lead is a `Lead` box, or a bare Avatar / AvatarStack; the words are a `Words`; the end is an `End` (a value and its caption)
29
33
  * or a bare control (two side by side).
30
34
  * Several go in Rows (hairlines between). A row that IS a card is `Card row`.
31
- * `done` is the checklist's finished line: ticked, muted, not tappable any more.
35
+ * `done` is the checklist's finished line: ticked, muted, not tappable any more. `unread` is its opposite for a notification: a very light grey fill over the whole row (it is never tapped yet).
32
36
  * `more` makes it expand: the row is the summary of a `<details class="row-expand">`, `more` comes out under it; `open` + `onOpenChange`, or `defaultOpen`.
33
37
  * A chevron at the end turns when it is open — the app fetches whatever `more` lists; the row only shows it.
34
38
  */
35
- export declare function Row({ lg, done, as, href, more, open, defaultOpen, onOpenChange, className, children, ...rest }: RowProps): import("react").JSX.Element;
39
+ export declare function Row({ lg, done, unread, unreadLabel, as, href, more, open, defaultOpen, onOpenChange, className, children, ...rest }: RowProps): import("react").JSX.Element;
36
40
  export interface RowsProps extends ComponentProps<'div'> {
37
41
  /** the group's name, above its rows (Today · Tomorrow · Later): a long list is GROUPED, not spaced out — several Rows one after another.
38
42
  * Words = the small label; an ELEMENT (`<Text level="title" as="h3">`) is used as the heading itself — the group is labelled by it. */
39
43
  heading?: ReactNode;
44
+ /** the rows JOIN: no gap between them, each row a band edge to edge of the list with its own padding and a line under it (the last too), so a row with a fill (`Row unread`) reads as a band touching the next. For a list that fills its holder's width (a `Popup`), not one inside a card's padding */
45
+ joined?: boolean;
40
46
  }
41
- /** Rows — a list of Rows separated by hairlines; `heading` names the group (a `role="group"` labelled by it).
47
+ /** Rows — a list of Rows separated by hairlines (`joined`: bands that touch, a border under each); `heading` names the group (a `role="group"` labelled by it).
42
48
  * REORDERED (the app renders the same keyed rows in another order): each row SLIDES to its new place — the one going up passes
43
49
  * over the others — instead of jumping (Lh 2026-10-01). The order is the app's; the move is the list's. */
44
- export declare function Rows({ heading, className, children, ref, ...rest }: RowsProps): import("react").JSX.Element;
50
+ export declare function Rows({ heading, joined, className, children, ref, ...rest }: RowsProps): import("react").JSX.Element;
package/dist/lists/Row.js CHANGED
@@ -5,28 +5,29 @@ import { Icon } from '../type/Icon.js';
5
5
  import { glide, reducedMotion, setRefs, stopMoves, useDisclosure } from '../state.js';
6
6
  import { RowEndRoomCtx, withEndRoom } from '../parts/endRoom.js';
7
7
  import { Words } from '../parts/Words.js';
8
+ import { word } from '../words.js';
8
9
  /**
9
10
  * Row — a frameless row inside a card: lead · words · end, its children in that order. 48px+ tall, a tap target.
10
11
  * The lead is a `Lead` box, or a bare Avatar / AvatarStack; the words are a `Words`; the end is an `End` (a value and its caption)
11
12
  * or a bare control (two side by side).
12
13
  * Several go in Rows (hairlines between). A row that IS a card is `Card row`.
13
- * `done` is the checklist's finished line: ticked, muted, not tappable any more.
14
+ * `done` is the checklist's finished line: ticked, muted, not tappable any more. `unread` is its opposite for a notification: a very light grey fill over the whole row (it is never tapped yet).
14
15
  * `more` makes it expand: the row is the summary of a `<details class="row-expand">`, `more` comes out under it; `open` + `onOpenChange`, or `defaultOpen`.
15
16
  * A chevron at the end turns when it is open — the app fetches whatever `more` lists; the row only shows it.
16
17
  */
17
- export function Row({ lg, done, as, href, more, open, defaultOpen, onOpenChange, className, children, ...rest }) {
18
+ export function Row({ lg, done, unread, unreadLabel, as, href, more, open, defaultOpen, onOpenChange, className, children, ...rest }) {
18
19
  const disclosure = useDisclosure(open, defaultOpen, onOpenChange);
19
20
  const kids = (useContext(RowEndRoomCtx) && withEndRoom(children, Words)) || children; // in a LinkBlock: the title's later lines run under the ends
20
21
  const el = more !== undefined ? 'summary' : as ?? (href ? 'a' : 'div');
21
- const row = createElement(el, { href, className: cx('row', lg && 'row--lg', done && 'row--done', className), 'aria-disabled': done || undefined, ...(more === undefined ? rest : {}) }, kids, done && _jsx("span", { className: "row__done", children: _jsx(Icon, { name: "check", size: "sm" }) }));
22
+ const row = createElement(el, { href, className: cx('row', lg && 'row--lg', done && 'row--done', unread && 'row--unread', className), 'aria-disabled': done || undefined, ...(more === undefined ? rest : {}) }, unread && _jsx("span", { className: "t-sr", children: unreadLabel ?? word('unread') }), kids, done && _jsx("span", { className: "row__done", children: _jsx(Icon, { name: "check", size: "sm" }) }));
22
23
  if (more === undefined)
23
24
  return row;
24
25
  return (_jsxs("details", { className: "row-expand", ...rest, ...disclosure, children: [row, _jsx("div", { className: "row-expand__more", children: more })] }));
25
26
  }
26
- /** Rows — a list of Rows separated by hairlines; `heading` names the group (a `role="group"` labelled by it).
27
+ /** Rows — a list of Rows separated by hairlines (`joined`: bands that touch, a border under each); `heading` names the group (a `role="group"` labelled by it).
27
28
  * REORDERED (the app renders the same keyed rows in another order): each row SLIDES to its new place — the one going up passes
28
29
  * over the others — instead of jumping (Lh 2026-10-01). The order is the app's; the move is the list's. */
29
- export function Rows({ heading, className, children, ref, ...rest }) {
30
+ export function Rows({ heading, joined, className, children, ref, ...rest }) {
30
31
  const id = useId();
31
32
  const named = heading != null;
32
33
  const own = useRef(null);
@@ -59,5 +60,5 @@ export function Rows({ heading, className, children, ref, ...rest }) {
59
60
  was.current = at;
60
61
  order.current = rows;
61
62
  });
62
- return (_jsxs("div", { ref: setRefs(own, ref), className: cx('rows', className), role: named ? 'group' : undefined, "aria-labelledby": named ? id : undefined, ...rest, children: [named && (isValidElement(heading) ? cloneElement(heading, { id }) : _jsx("span", { className: "rows__head", id: id, children: heading })), children] }));
63
+ return (_jsxs("div", { ref: setRefs(own, ref), className: cx('rows', joined && 'rows--joined', className), role: named ? 'group' : undefined, "aria-labelledby": named ? id : undefined, ...rest, children: [named && (isValidElement(heading) ? cloneElement(heading, { id }) : _jsx("span", { className: "rows__head", id: id, children: heading })), children] }));
63
64
  }
@@ -1,7 +1,7 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
2
  /** the closed set of heads. The variant lays its slots out; the order they are written in decides nothing:
3
3
  * `plain` the title over its meta, the `end` at the far right · `lead` a `Lead`, an `Avatar` or an `AvatarStack` at the left, the title over
4
- * its meta beside it, the `end` at the top right · `date` a `JourneyBadge stretch` (`lead`) with a `ChipRow` (`chips`) beside it, the title
4
+ * its meta beside it, the `end` at the top right · `date` a `JourneyBadge stretch` (`lead`) with a `ChipRow` (`chips`, or two: `chips` over `chipsBelow`) beside it, the title
5
5
  * over its meta under both, the `end` under them · `centre` a stage sheet's head: a round `Btn` (`lead`) · the centred title over
6
6
  * its meta · a round `Btn` (`end`) · `sheet` a sheet's head: the title over its meta (after a `lead`), its `actions` and the close at the far
7
7
  * right · `status` a `tag` chip and an `end` badge on the first row, the status words (`meta`, a line of text, never a heading) under them · `stack` a stack sheet's head: the `back` button, the title, its tabs or an icon (`end`) on one line */
@@ -23,8 +23,10 @@ export interface HeadProps extends Omit<ComponentProps<'div'>, 'title' | 'onClos
23
23
  lead?: ReactNode;
24
24
  /** `status` only: the tag at the left of the first row, a `Chip` (what this is a status of); the status words are `meta`, the `end` stands at the far right */
25
25
  tag?: ReactNode;
26
- /** `date` only: a `ChipRow` beside the date, as tall as it */
26
+ /** `date` only: a `ChipRow` beside the date, as tall as it. With `chipsBelow` it is the UPPER of two rows (a warning chip) */
27
27
  chips?: ReactNode;
28
+ /** `date` only: the LOWER `ChipRow` of two beside the date (the day and the time): it stands at the foot of the date's height, whether or not `chips` (the upper row) has any chip, and the date is as tall as the two rows and the gap between them (`--head-col-gap`). The title and the meta then stand under the date, a group gap (`--head-group-gap`, default `--sp-5`) away, and a `--head-words-gap` (`--sp-1`) apart */
29
+ chipsBelow?: ReactNode;
28
30
  /** the one thing beside the title: a `Chip`, an `End`, a `Stamp`, a round `Btn size="sm"` (or two, as a fragment) — never a button that
29
31
  * finishes the card (that goes in its `Foot`). In `date` it stands on a row under the date, the chips and the title; in `centre` it is the right round `Btn`;
30
32
  * in `stack` the sheet's tabs or an icon. Not in `sheet`: there the buttons are `actions` */
@@ -59,4 +61,4 @@ export interface HeadProps extends Omit<ComponentProps<'div'>, 'title' | 'onClos
59
61
  * Never put buttons here that finish the card: they go in the foot. A head takes no children. A `Card` finds its `Head` by type, so a consumer's
60
62
  * own component that wraps a `Head` is not found.
61
63
  */
62
- export declare function Head({ variant, title, meta, over, level, tag, lead, chips, end, actions, onClose, closeLabel, back, backLabel, top, long, className, children, ...rest }: HeadProps): import("react").JSX.Element;
64
+ export declare function Head({ variant, title, meta, over, level, tag, lead, chips, chipsBelow, end, actions, onClose, closeLabel, back, backLabel, top, long, className, children, ...rest }: HeadProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Children, Fragment, cloneElement, isValidElement, useContext } from 'react';
3
3
  import { cx } from '../cx.js';
4
4
  import { warnOnce } from '../state.js';
@@ -36,7 +36,7 @@ function slotted(variant, given, words, close) {
36
36
  switch (variant) {
37
37
  case 'status': return [given.tag, words, ...pieces(end)];
38
38
  case 'lead': return [lead, words, ...pieces(end)];
39
- case 'date': return [lead, given.chips, words, ...pieces(end)];
39
+ case 'date': return [lead, given.chipsBelow ? _jsxs("div", { className: "head__chips", children: [_jsx("div", { className: "head__chips-top", children: given.chips }), given.chipsBelow] }, "chips") : given.chips, words, ...pieces(end)];
40
40
  case 'centre': return [lead, words, end];
41
41
  case 'sheet': {
42
42
  const acts = pieces(given.actions);
@@ -65,12 +65,12 @@ function slotted(variant, given, words, close) {
65
65
  * Never put buttons here that finish the card: they go in the foot. A head takes no children. A `Card` finds its `Head` by type, so a consumer's
66
66
  * own component that wraps a `Head` is not found.
67
67
  */
68
- export function Head({ variant = 'plain', title, meta, over, level, tag, lead, chips, end, actions, onClose, closeLabel, back, backLabel, top, long, className, children, ...rest }) {
68
+ export function Head({ variant = 'plain', title, meta, over, level, tag, lead, chips, chipsBelow, end, actions, onClose, closeLabel, back, backLabel, top, long, className, children, ...rest }) {
69
69
  const tab = useContext(StackHeadCtx);
70
70
  const sheetClose = useContext(HeadCloseCtx);
71
71
  if (children != null)
72
72
  warnOnce('head-children', 'cardds Head: a head takes no children, they are left out — write its variant and slots (title, meta, lead, end…); `npx cardds codemod-head <files>` rewrites them.');
73
- const given = { tag, lead, chips, over, end, actions, onClose, closeLabel, back, backLabel };
73
+ const given = { tag, lead, chips, chipsBelow, over, end, actions, onClose, closeLabel, back, backLabel };
74
74
  // the title's words: its keyboard way in on a stack sheet and its run when long are the Words' (HeadCtx)
75
75
  if (variant === 'status' && title != null)
76
76
  warnOnce('head-status-title', 'cardds Head variant="status": the status words are `meta` (a line of text, never a heading) — `title` is left out.');
@@ -1,10 +1,16 @@
1
1
  import type { ComponentProps } from 'react';
2
2
  import { type IconName } from '../type/Icon.js';
3
+ /** the fills a `Lead` takes — cardds's set of six colours, each one that holds the ondark ink (the white icon) at 4.5:1 in every palette cardds ships.
4
+ * The names are the colours', never a meaning: the app decides which kind of thing wears which. In the wireframe they are six greys */
5
+ export type LeadTone = 'blue' | 'green' | 'amber' | 'red' | 'pink' | 'violet';
3
6
  export interface LeadProps extends ComponentProps<'span'> {
4
7
  /** an icon drawn in the box; without it, the box holds its children (a number, an initial) */
5
8
  icon?: IconName;
9
+ /** a FILL: the box takes one colour of cardds's set with no outline, and its icon (or words) turn to the ondark ink, white on the colour. Tells kinds apart (a bank's, a point's, a reminder's lead). A person's lead is never toned: it is a stamp or an avatar */
10
+ tone?: LeadTone;
6
11
  }
7
12
  /** Lead — the thing at the start of a line: the outlined box holding an `icon` or its children. In a `Row` it is the 48 box of a menu row;
8
13
  * in a `Card row` (and a FeedCard's head) the 44 box in the card's own ink, a number or an initial in label type (`.card--row > .lead`, css/parts.css).
14
+ * With a `tone` the box is filled with one colour of cardds's six (`--tone-blue` … `--tone-violet`) and its icon is the ondark ink on it.
9
15
  * A person's or a group's lead takes no box: an Avatar or an AvatarStack goes straight in the line as its first child. */
10
- export declare function Lead({ icon, className, children, ...rest }: LeadProps): import("react").JSX.Element;
16
+ export declare function Lead({ icon, tone, className, children, ...rest }: LeadProps): import("react").JSX.Element;
@@ -3,7 +3,8 @@ import { cx } from '../cx.js';
3
3
  import { Icon } from '../type/Icon.js';
4
4
  /** Lead — the thing at the start of a line: the outlined box holding an `icon` or its children. In a `Row` it is the 48 box of a menu row;
5
5
  * in a `Card row` (and a FeedCard's head) the 44 box in the card's own ink, a number or an initial in label type (`.card--row > .lead`, css/parts.css).
6
+ * With a `tone` the box is filled with one colour of cardds's six (`--tone-blue` … `--tone-violet`) and its icon is the ondark ink on it.
6
7
  * A person's or a group's lead takes no box: an Avatar or an AvatarStack goes straight in the line as its first child. */
7
- export function Lead({ icon, className, children, ...rest }) {
8
- return _jsx("span", { className: cx('lead', className), ...rest, children: icon ? _jsx(Icon, { name: icon }) : children });
8
+ export function Lead({ icon, tone, className, children, ...rest }) {
9
+ return _jsx("span", { className: cx('lead', tone && 'lead--tone', tone && `lead--${tone}`, className), ...rest, children: icon ? _jsx(Icon, { name: icon }) : children });
9
10
  }
@@ -9,7 +9,8 @@ export interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
9
9
  /** the second line under the title */
10
10
  sub?: ReactNode;
11
11
  /** the trailing control(s) — a round Btn with a chevron-down to switch context; on the home bar a labelled
12
- * switch chip (ChipPick sign, --tap tall here) and the wallet Btn, side by side (Lh 2026-09-13) */
12
+ * switch chip (ChipPick sign, --tap tall here) and the wallet Btn, side by side (Lh 2026-09-13). Up to TWO controls (two in a fragment):
13
+ * they stand together at the right edge, `--appbar-action-gap` apart (default `--sp-2`), and the title keeps the rest of the line, its words cut with "…" */
13
14
  action?: ReactNode;
14
15
  /** makes the mark + the words ONE button (the member's own name → their menu): its props — `popoverTarget` to open a `Menu`
15
16
  * (the app places the Menu), or an `onClick`. Needs an accessible name when the words don't say what it opens: `aria-label`. */
@@ -7,5 +7,5 @@ import { cx } from '../cx.js';
7
7
  */
8
8
  export function AppBar({ lead, icon, title, sub, action, brandButton, className, children, ...rest }) {
9
9
  const who = (_jsxs(_Fragment, { children: [icon, _jsxs("span", { className: "appbar__text", children: [_jsx("span", { className: "appbar__title", children: title }), sub != null && _jsx("span", { className: "appbar__sub", children: sub })] })] }));
10
- return (_jsxs("header", { className: cx('appbar', className), ...rest, children: [_jsxs("div", { className: "appbar__brand", children: [lead != null && _jsx("span", { className: "appbar__lead", children: lead }), brandButton ? (_jsx("button", { type: "button", ...brandButton, className: cx('appbar__who', brandButton.className), children: who })) : who, action] }), children] }));
10
+ return (_jsxs("header", { className: cx('appbar', className), ...rest, children: [_jsxs("div", { className: "appbar__brand", children: [lead != null && _jsx("span", { className: "appbar__lead", children: lead }), brandButton ? (_jsx("button", { type: "button", ...brandButton, className: cx('appbar__who', brandButton.className), children: who })) : who, action ? _jsx("span", { className: "appbar__action", children: action }) : null] }), children] }));
11
11
  }
@@ -16,11 +16,10 @@ export interface ModalProps extends ComponentProps<'article'> {
16
16
  * A COMPONENT, not a wiring: it does not know its buttons. They are plain round `Btn`s / `Btn`s with the app's `onClick` — the app
17
17
  * records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
18
18
  * the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
19
- * MOUNT IT ONLY WHEN IT IS TO SHOW. First mounted with `open={false}` it is drawn in place, then leaves, and calls `onClosed` after about 700ms
20
- * (measured at 375, 2026-10-11). KNOWN FAULT, not fixed: under React StrictMode `onClosed` is never called for a Modal mounted that way — the
21
- * effect's first run sets `shown` to false, its cleanup drops the wait, and the second run returns early.
19
+ * Mounted with `open={false}` it draws nothing and never calls `onClosed` (it was never shown, so it has nothing to finish leaving) — the same
20
+ * in production and under React StrictMode. It appears when `open` turns `true`; from then on every close plays the leave and calls `onClosed` once.
22
21
  */
23
- export declare function Modal({ open, onClosed, onDismiss, className, children, ...rest }: ModalProps): import("react").JSX.Element;
22
+ export declare function Modal({ open, onClosed, onDismiss, className, children, ...rest }: ModalProps): import("react").JSX.Element | null;
24
23
  export interface ModalAskProps extends Omit<ComponentProps<'div'>, 'title'> {
25
24
  /** the question */
26
25
  title: ReactNode;
@@ -10,14 +10,16 @@ import { HeadCloseCtx } from '../parts/headCtx.js';
10
10
  * A COMPONENT, not a wiring: it does not know its buttons. They are plain round `Btn`s / `Btn`s with the app's `onClick` — the app
11
11
  * records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
12
12
  * the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
13
- * MOUNT IT ONLY WHEN IT IS TO SHOW. First mounted with `open={false}` it is drawn in place, then leaves, and calls `onClosed` after about 700ms
14
- * (measured at 375, 2026-10-11). KNOWN FAULT, not fixed: under React StrictMode `onClosed` is never called for a Modal mounted that way — the
15
- * effect's first run sets `shown` to false, its cleanup drops the wait, and the second run returns early.
13
+ * Mounted with `open={false}` it draws nothing and never calls `onClosed` (it was never shown, so it has nothing to finish leaving) — the same
14
+ * in production and under React StrictMode. It appears when `open` turns `true`; from then on every close plays the leave and calls `onClosed` once.
16
15
  */
17
16
  export function Modal({ open = true, onClosed, onDismiss, className, children, ...rest }) {
18
17
  const ref = useRef(null);
19
18
  const closed = useLatest(onClosed);
20
19
  const shown = useRef(true); // the animations stand played forwards
20
+ const seen = useRef(open); // has it ever been on the screen: a Modal mounted closed draws nothing
21
+ if (open)
22
+ seen.current = true;
21
23
  useEffect(() => {
22
24
  const el = ref.current;
23
25
  if (!el || open === shown.current)
@@ -56,6 +58,8 @@ export function Modal({ open = true, onClosed, onDismiss, className, children, .
56
58
  document.addEventListener('keydown', key);
57
59
  return () => { stage.removeEventListener('click', tap); document.removeEventListener('keydown', key); };
58
60
  }, [has, open]);
61
+ if (!seen.current)
62
+ return null;
59
63
  // a head in a modal never closes the Sheet the modal is drawn inside of (context passes through React): no close unless the app gives onClose
60
64
  return _jsx("article", { ref: ref, className: cx('card modal', className), ...rest, children: _jsx(HeadCloseCtx.Provider, { value: null, children: children }) });
61
65
  }
package/dist/words.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type WordKey = 'resize' | 'back' | 'next' | 'previous' | 'skip' | 'digit' | 'progress' | 'image' | 'mood' | 'photos' | 'voiceNote' | 'play' | 'pause' | 'to' | 'turnToBack' | 'turnToPicture' | 'turnToFront' | 'message' | 'address' | 'toMessage' | 'toAddress' | 'stampOn' | 'stampOff' | 'stamps' | 'unread' | 'remove' | 'cancel' | 'toLatest' | 'close';
1
+ export type WordKey = 'resize' | 'back' | 'next' | 'previous' | 'skip' | 'digit' | 'progress' | 'image' | 'mood' | 'photos' | 'voiceNote' | 'play' | 'pause' | 'to' | 'turnToBack' | 'turnToPicture' | 'turnToFront' | 'message' | 'address' | 'toMessage' | 'toAddress' | 'stampOn' | 'stampOff' | 'stamps' | 'unread' | 'remove' | 'cancel' | 'toLatest' | 'close' | 'was';
2
2
  type Words = Record<WordKey, string>;
3
3
  /** add or retune the words for a language (`'lo'`, or `'th'` to change one) — once, at app start. Missing words fall back to English. */
4
4
  export declare function setWords(lang: string, words: Partial<Words>): void;
package/dist/words.js CHANGED
@@ -1,8 +1,8 @@
1
1
  const sets = {
2
2
  en: { resize: 'Resize', back: 'Back', next: 'Next', previous: 'Previous', skip: 'Skip', digit: 'Digit', progress: 'Progress', image: 'Image', mood: 'Mood', photos: 'Photos', voiceNote: 'Voice note',
3
- play: 'Play', pause: 'Pause', to: 'To', turnToBack: 'See the back', turnToPicture: 'See the picture', turnToFront: 'See the front', message: 'Message', address: 'Address', toMessage: 'Back to the message', toAddress: 'On to the address', stampOn: 'Stick a stamp', stampOff: 'Take the stamp off', stamps: 'Choose a stamp', unread: 'Unread', remove: 'Remove', cancel: 'Cancel', toLatest: 'Latest messages', close: 'Close' },
3
+ play: 'Play', pause: 'Pause', to: 'To', turnToBack: 'See the back', turnToPicture: 'See the picture', turnToFront: 'See the front', message: 'Message', address: 'Address', toMessage: 'Back to the message', toAddress: 'On to the address', stampOn: 'Stick a stamp', stampOff: 'Take the stamp off', stamps: 'Choose a stamp', unread: 'Unread', remove: 'Remove', cancel: 'Cancel', toLatest: 'Latest messages', close: 'Close', was: 'was' },
4
4
  th: { resize: 'ปรับความสูง', back: 'กลับ', next: 'ถัดไป', previous: 'ก่อนหน้า', skip: 'ข้าม', digit: 'หลักที่', progress: 'ความคืบหน้า', image: 'รูปภาพ', mood: 'อารมณ์', photos: 'รูปภาพ', voiceNote: 'ข้อความเสียง',
5
- play: 'ฟังเสียง', pause: 'หยุดเสียง', to: 'ถึง', turnToBack: 'พลิกดูด้านหลัง', turnToPicture: 'พลิกดูรูป', turnToFront: 'พลิกดูด้านหน้า', message: 'ข้อความ', address: 'จ่าหน้า', toMessage: 'เลื่อนกลับไปข้อความ', toAddress: 'เลื่อนไปจ่าหน้า', stampOn: 'ติดแสตมป์', stampOff: 'แกะแสตมป์ออก', stamps: 'เลือกแสตมป์', unread: 'ยังไม่ได้อ่าน', remove: 'เอาออก', cancel: 'ยกเลิก', toLatest: 'ไปข้อความล่าสุด', close: 'ปิด' },
5
+ play: 'ฟังเสียง', pause: 'หยุดเสียง', to: 'ถึง', turnToBack: 'พลิกดูด้านหลัง', turnToPicture: 'พลิกดูรูป', turnToFront: 'พลิกดูด้านหน้า', message: 'ข้อความ', address: 'จ่าหน้า', toMessage: 'เลื่อนกลับไปข้อความ', toAddress: 'เลื่อนไปจ่าหน้า', stampOn: 'ติดแสตมป์', stampOff: 'แกะแสตมป์ออก', stamps: 'เลือกแสตมป์', unread: 'ยังไม่ได้อ่าน', remove: 'เอาออก', cancel: 'ยกเลิก', toLatest: 'ไปข้อความล่าสุด', close: 'ปิด', was: 'เดิม' },
6
6
  };
7
7
  /** add or retune the words for a language (`'lo'`, or `'th'` to change one) — once, at app start. Missing words fall back to English. */
8
8
  export function setWords(lang, words) {
package/docs/reference.md CHANGED
@@ -262,6 +262,30 @@ later and stands clear of it. `Card` forwards `ref` to its root for anything els
262
262
  - **`TileGrid cols={2}`** — always two across at every phone width: four picks stand 2×2. A `wide` tile still takes a row.
263
263
  - **`TileGrid cols={4}`** — four small square tiles across: the icon over a short label, a sheet's row of actions.
264
264
 
265
+ ### Notes in a card, and a replaced value
266
+
267
+ (cardds#218) `NoteRows` holds two or more `NoteRow`s as ONE group — the lines stand `--note-rows-gap` apart (default `--sp-1`), not the card's gap (which parts one thing from the next); a single `NoteRow` is unchanged. `Was` is the value that was replaced (the old place, the old day, the helper who withdrew): struck through, in the muted ink of its ground (knob `--was-ink`), after the new value — `<NoteRow icon="map-pin">Coffee shop <Was>Village hall</Was></NoteRow>`; it stands in a `NoteRow`, a `Text` or a `Words` meta, and a screen reader hears "was" (the page's language, `word('was')`) before the old value. Stories `NoteRow · Group`, `NoteRow · WasInWords`.
268
+ In a `NoteRow` the words are one flowing line, so the old value follows the new one in the same sentence; in a `Row`'s `Words` meta (a flex line) it stands a small gap beside it. `--note-rows-gap` is the gap BETWEEN lines (`--note-row-gap` is the icon's, inside one line).
269
+
270
+ ### A popup under a button, unread rows, joined rows, a lead with a colour
271
+
272
+ (cardds#219) A list read and then left — the notifications under a bell — is four pieces, each opt-in; a screen written before them is unchanged.
273
+
274
+ - **`Popup`** is a panel hung under the button that opens it: a head (`title`, a second line `meta`, ONE `Btn` as `action` at the right) and the list as its children. It is a native popover like `Menu popover`: any button with `popoverTarget={id}` opens it (the popup knows no button), a tap outside or Esc closes it. It is never wider than the screen less `--popup-margin` (default `--sp-3`) each side, and at most `--popup-w` (default 384) wide; too tall for the room under the button (at most `--popup-max-h`, default 576), the list scrolls inside it and the head stays at the top, opaque, so a row's fill passes under it. A button at the screen's right: with `end` the popup's right edge is the button's and it grows leftwards (the bar's own inset is its right margin; `--popup-margin` keeps the left one); without `end` it starts at the button's left edge and grows rightwards. Where the browser cannot anchor to the button (iOS before 26) it hangs under the top bar. The paper is the card-1 ground (`--popup-bg`, `--popup-border`, `--popup-radius`, `--popup-shadow`); head knobs `--popup-pad-x`, `--popup-pad-y`, `--popup-head-gap`. The unread count on the button is the app's: `<Btn shape="round" icon="bell" label="Notifications" count={n} popoverTarget="inbox" />`. Story `Popup · UnderABell`.
275
+ - **`Rows joined`**: the rows touch (no `--rows-gap`), each is a band edge to edge of the list with its own padding (`--rows-joined-pad-x` 16, `--rows-joined-pad-y` 12) and a border under it, the last too (`--rows-joined-border`, default the hairline), so a row with a fill reads as a band joined to the next. The between-rows hairline is not drawn. For a holder with no padding of its own (a `Popup`); in a `Card` the rows would stand inside its padding. `Rows` without `joined` is unchanged.
276
+ - **`Row unread`**: a row never opened has a very light grey fill over the whole row, the token `--unread-bg` (4% of the row's ink over whatever ground it stands on, so it is a light grey on paper and a light lift on a dark ground; knob `--row-unread-bg`). A screen reader hears "unread" (`unreadLabel` for another word). Drop `unread` once it is read; the fill is only the state, the app owns it.
277
+ - **`Lead tone`**: the box takes a FILL, one of six colours — `blue`, `green`, `amber`, `red`, `pink`, `violet` (`--tone-blue` … `--tone-violet`) — with no outline, and its icon is the ondark ink on it (white). It tells kinds of thing apart (the bank, a reminder, points); the names are colours, never a meaning: the app picks which kind wears which, and a person's lead is still a stamp or an avatar. Each colour holds the icon at 4.5:1 or more in every palette cardds ships ([Ink follows its ground](#ink-follows-its-ground)): the lowest is blue on clay, 4.74; green 5.84, amber 5.16, red 4.98, pink 5.23, violet 6.56 on clay, the dimmest ink. Colour is in `palette.css` and every coloured mode has them (a project's own `data-palette` too); the wireframe keeps six greys. A project whose ondark ink is dimmer retunes the tone `inkGrounds()` names (`--tone-<name>`), in its theme. Knobs `--lead-bg`, `--lead-ink`. Story `Lead · Tones`.
278
+
279
+ ```tsx
280
+ <Btn shape="round" icon="bell" label="Notifications" count={2} popoverTarget="inbox" />
281
+ <Popup id="inbox" end title="Notifications" meta="Last 7 days" action={<Btn size="sm" onClick={readAll}>Read all</Btn>}>
282
+ <Rows joined>
283
+ <Row unread href="#a"><AvatarStack><Stamp bare … /></AvatarStack><Words title="Sri sent a message" meta="5 min" /></Row>
284
+ <Row href="#b"><Lead icon="wallet" tone="blue" /><Words title="Paid out 30 hours" meta="Yesterday" /></Row>
285
+ </Rows>
286
+ </Popup>
287
+ ```
288
+
265
289
  ## Sheet stack markup
266
290
 
267
291
  The sheet stack (`.sheet-stack`, `stack.css` — the menu, see *Anatomy*) is the
@@ -509,6 +533,7 @@ whose markup has rules, because the sheet's box is the step itself:
509
533
  The wireframe has them too. A theme may retune a shade, never a meaning. Each is dark enough for words and edges;
510
534
  `--signal-*-soft` is its light ground (the signal washed 14% into the surface). Never the colour alone: an icon or
511
535
  words say it too. Read by: `Field`/`Pin`/`FormNote` error, `Dot tone` / `Chip dot="ok|warn|error|info"`, `Snackbar` (ok).
536
+ - **`Chip tone`** (cardds#216): 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 fill is the palette's own shade for the chip's paper (`--signal-<tone>-onlight`; `-ondark` where a project makes its controls' paper dark, `--action-dark`), its words the ink of the other side, 4.5:1 on it in every palette cardds ships (a chip is a surface of its own, so it reads the same on any card and on a sticky note). Works with `sm` and `xs`; not with `on`, `soft`, `muted` or `dot` (`tone` is kept, a warning says so). Pick the colour by the meaning, never by taste: red only for a change or an end, yellow only where the member must answer. Knobs `--chip-tone-bg`, `--chip-tone-ink` retune every tone at once. Story `Chip · Tones`.
512
537
  - **Good news is a `Snackbar`, a warning or a question is a `Modal`** (Lh 2026-10-02): a `Snackbar` is a quick line over the
513
538
  screen — something went well, said in passing. A child of the `Screen`; it slides in from the top (or `bottom`, above the
514
539
  bottom layer), stays `duration` (4 s), slides out, never takes the cursor, never stops the member. `open` +
@@ -519,10 +544,8 @@ whose markup has rules, because the sheet's box is the step itself:
519
544
  component has none). A tap anywhere stops it: `onCancel`. A child of the `Screen`. `open` + `onOpenChange(open, reason)`
520
545
  (`done` | `cancel`) or `defaultOpen`; unmount it in `onClosed`. The number is `--fs-giant` and grows with the text scale;
521
546
  bigger through `--count-in-size`. A screen reader hears each number (`aria-live`). Not `Countdown`, which is a small link that waits.
522
- - **Mount a `Modal` only when it is to show.** A `Modal` first mounted with `open={false}` is drawn in place, then leaves,
523
- and calls `onClosed` after about 700ms. Known fault, not fixed: under React StrictMode (any dev build) `onClosed` is
524
- never called for a `Modal` mounted that way. Keep the app's own `mounted` flag: set it when the question is asked,
525
- clear it in `onClosed`.
547
+ - **A `Modal` mounted with `open={false}` draws nothing and never calls `onClosed`** (it was never shown), the same in production and
548
+ under React StrictMode. It appears when `open` turns `true`; each close after that plays the leave and calls `onClosed` once.
526
549
  - **cardds names its own controls, in the page's language** (Lh 2026-09-29): a handle, a back button, a Pin's cells… read
527
550
  their name from `src/words.ts` by `<html lang>` (en, th ship; `setWords(lang, {…})` adds one). An app passes no label that
528
551
  only repeats these words; a prop still wins.
@@ -631,13 +654,14 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
631
654
  |---|---|---|
632
655
  | `plain` (default) | `over` · `end` | the title over its meta; the `end` at the far right: a `Chip`, an `End`, a `Link`, a round `Btn size="sm"`, a `Btn size="sm"`, a `Stamp` (beside both lines) |
633
656
  | `lead` | `lead` · `over` · `end` | a person or a thing at the left (`Lead`, `Avatar`, `AvatarStack` with a `Stamp bare` in it), the title over its meta as one block beside it, the `end` (one or two, a fragment) at the top right — a FeedCard's head |
634
- | `date` | `lead` · `chips` · `over` · `end` | a date (`JourneyBadge stretch`) with a `ChipRow` beside it, as tall as each other; the title (who asks over it, `over`) under both at the full width; the `end`, if any, on a row of its own under them |
657
+ | `date` | `lead` · `chips` · `chipsBelow` · `over` · `end` | a date (`JourneyBadge stretch`) with a `ChipRow` beside it, as tall as each other; the title (who asks over it, `over`) under both at the full width; the `end`, if any, on a row of its own under them. TWO rows: `chips` (upper, e.g. a warning) over `chipsBelow` (lower, the day and time) — the lower stays at the foot of the date's height when the upper has no chip, the date is as tall as both rows and the gap between them (`--head-col-gap`, `--sp-3`); see below |
635
658
  | `status` | `tag` · `end` (+ `meta`) | a `Chip` (`tag`) at the left and a badge or tile (`end`) at the far right on the first row, the status words under both in the caption look (muted, the font's real weight): the `meta`, a plain line of text, NEVER a heading (this head has no `title`: a status is read in the card's content, the card's own heading is elsewhere) |
636
659
  | `centre` | `lead` · `end` | a stage sheet's head: a round `Btn` · the centred title over its meta · a round `Btn` |
637
660
  | `sheet` | `lead` · `actions` · `onClose` · `closeLabel` | a sheet's or a modal's head: the title over its meta (after a `lead`), up to two round `Btn`s (`actions`, drawn at the close's size) and the CLOSE at the far right — drawn, named in the page's language and wired by cardds |
638
661
  | `stack` | `back` · `backLabel` · `end` | a stack sheet's head on one line: the back (`back="start"` chevron left, `"end"` chevron down after the icons; hidden until the sheet is open), the title (the keyboard's way in), its tabs or icons (`end`) |
639
662
 
640
663
  `<Head title="Sunday market" meta="Saturday · 07:00" end={<Chip>3 new</Chip>} />` ·
664
+ `<Head variant="date" lead={<JourneyBadge stretch …/>} chips={<ChipRow>…a warning…</ChipRow>} chipsBelow={<ChipRow>…day, time…</ChipRow>} title meta />` — two chip rows (story `Head · WithDateTwoRows`): with `chipsBelow` the gaps are two sizes, `--head-group-gap` (the date and its chips → the title, default `--sp-5`) and `--head-words-gap` (the title → its meta, default `--sp-1`), so the date group and the words group read apart; with one chip row (no `chipsBelow`) both stay `--head-lead-gap` (`--sp-3`) as before and the two knobs do nothing. Set either knob on the head to move it (`--head-chips-gap` the gap between the two chip rows). An `end` in a two-row head stands under the words at `--head-words-gap` too: keep a two-row head to the date, the chips and the words.
641
665
  `<Head variant="lead" lead={<AvatarStack><Stamp bare …/></AvatarStack>} title meta end={<End caption="5 min" />} />` ·
642
666
  `<Head variant="sheet" title="Ask for help" onClose={close} actions={<Btn shape="round" icon="share" label="Share" />} />`.
643
667
  THE CLOSE only asks: `onClose` is the app's (it sets the sheet `away`, the modal `open={false}`); a `Head variant="sheet"` given
@@ -1016,6 +1040,7 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
1016
1040
  stamp in an `AvatarStack` are `--stamp-sm-size` wide (one tap: 48 × 60), on any surface and in any row. And the inline
1017
1041
  one: `Stamp xs` stands beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one
1018
1042
  `Chip xs` tall, `--stamp-xs-size` (18.7 × 23.4, on `--fs-base`); always bare, flat but for the contact shadow, its teeth fewer and larger.
1043
+ `AppBar action` takes one or TWO controls (two in a fragment, e.g. a worded `Btn size="sm"` with an `Icon xs` and a round `Btn size="sm"`): they stand together at the right edge, `--appbar-action-gap` apart (knob; default `--sp-2`), the title keeps the rest of the line and is cut with "…", the buttons never wrap. A third is not a cardds pattern. Story `AppBar · Pair`.
1019
1044
  `AppBar lead` (2026-10-29) is the bar's leading slot: left-most, before the mark and the words, a button of its own (a primary `Btn`) outside the `brandButton`; the bar keeps its height. Story `AppBar · Lead`.
1020
1045
  A `Stamp` as an `AppBar`'s `icon` is the bar's inner height tall (`--header-h` less the bar's block padding: 35 × 44), so it reads
1021
1046
  bigger than the title and its second line and the fixed bar never grows; bare and flat whatever it is handed. Knob `--appbar-stamp-size`.
@@ -1544,6 +1569,7 @@ outgrow it (a second line, a very large text) make a pill taller. `sm` also take
1544
1569
  (knobs `--btn-sm-pad-x`, `--btn-sm-font-size`) — a worded move at a card head's end
1545
1570
  (`<Head title meta end={<Btn size="sm" tone="primary">Keep</Btn>} />`, story `Btn · Small`). Every size in every tone, both
1546
1571
  shapes side by side: story `Btn · Ladder`.
1572
+ A round `Btn` takes `count` (unread alerts): a `Badge` on its top-right corner, half out of the circle; 0 or none draws nothing, over 99 reads "99+", and the spoken name is `label` plus the count ("Alerts 3"). A pill takes no `count`. Story `Btn · RoundCount`.
1547
1573
 
1548
1574
  **Something sent out from a button** (`Btn sending`, `Btn shape="round" sending`, Lh 2026-10-28): for `--motion-send` (0.7 s) the
1549
1575
  button's icon swells and tips forward and two rings spread from its edge (knob `--btn-sending-ink`, default the accent).
package/lib/catalog.mjs CHANGED
@@ -201,7 +201,7 @@ export function find(cat, query, axes = {}) {
201
201
  }
202
202
 
203
203
  // the parts that put themselves where they belong by JS at runtime — over the content, open, at the edge: the static html shows them in the wrong place
204
- const PLACED_BY_JS = ['Sheet', 'SheetStack', 'SheetSteps', 'SheetStage', 'Step', 'Modal', 'Menu', 'Dropdown', 'Snackbar', 'FloatBar'];
204
+ const PLACED_BY_JS = ['Sheet', 'SheetStack', 'SheetSteps', 'SheetStage', 'Step', 'Modal', 'Menu', 'Dropdown', 'Popup', 'Snackbar', 'FloatBar'];
205
205
 
206
206
  /** a story names cardds's own controls by hand where the gallery's page is not in the story's language (`backLabel="กลับ"` on an
207
207
  * lang="en" page). In an app that is noise — and a session copies what it is handed (two prototypes did, 2026-10-08): the starting file
@@ -4,7 +4,7 @@
4
4
  export const HEAD_SLOTS = {
5
5
  plain: ['over', 'end'],
6
6
  lead: ['lead', 'over', 'end'],
7
- date: ['lead', 'chips', 'over', 'end'],
7
+ date: ['lead', 'chips', 'chipsBelow', 'over', 'end'],
8
8
  status: ['tag', 'end'],
9
9
  centre: ['lead', 'end'],
10
10
  sheet: ['lead', 'actions', 'onClose', 'closeLabel'],
package/lint/rules.mjs CHANGED
@@ -333,7 +333,7 @@ export function checkSource(source, file, { classes = carddsClasses() } = {}) {
333
333
  if (!variant) continue; // a variant the code picks at runtime: the component warns
334
334
  const takes = HEAD_SLOTS[variant];
335
335
  if (!takes) { add('head-slot', 'error', m.index, `<Head variant="${variant}">: no such head — the variants are ${Object.keys(HEAD_SLOTS).join(' · ')}.`); continue; }
336
- for (const s of own.matchAll(/\s(tag|lead|chips|over|end|actions|onClose|closeLabel|back|backLabel)\s*=/g)) {
336
+ for (const s of own.matchAll(/\s(tag|lead|chips|chipsBelow|over|end|actions|onClose|closeLabel|back|backLabel)\s*=/g)) {
337
337
  if (!takes.includes(s[1])) add('head-slot', 'error', m.index + s.index + 1, `${s[1]} on <Head variant="${variant}">: that head takes no ${s[1]} (it is left out). The slots beside title · meta · level: ${headSlotsText()}.`);
338
338
  }
339
339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.176",
3
+ "version": "0.7.178",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev).",
@@ -13,6 +13,7 @@
13
13
  "build": "node scripts/build-icons.mjs && tsc -p tsconfig.json && node scripts/flatten-css.mjs && node scripts/build-catalog.mjs",
14
14
  "release": "node scripts/publish.mjs",
15
15
  "release:check": "node scripts/publish.mjs --check",
16
+ "release:prepare": "node scripts/prepare-release.mjs",
16
17
  "prepack": "npm run build",
17
18
  "knobs": "node scripts/knobs.mjs"
18
19
  },