@usableapp/cardds 0.7.162 → 0.7.164
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 +20 -0
- package/css/actions.css +9 -2
- package/css/card.css +8 -0
- package/css/tokens.css +1 -0
- package/dist/actions/Btn.d.ts +11 -3
- package/dist/actions/Btn.js +8 -4
- package/dist/cardds.css +18 -2
- package/dist/cards/Card.d.ts +10 -1
- package/dist/cards/Card.js +16 -4
- package/dist/cards/CardFeed.d.ts +1 -1
- package/dist/cards/CardFeed.js +2 -1
- package/dist/cards/FeedEnd.d.ts +12 -0
- package/dist/cards/FeedEnd.js +10 -0
- package/dist/catalog.json +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/scaffold/AppBar.d.ts +3 -1
- package/dist/scaffold/AppBar.js +2 -2
- package/docs/reference.md +22 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
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.
|
|
4
4
|
|
|
5
|
+
## 0.7.164 — 2026-10-29
|
|
6
|
+
|
|
7
|
+
`FeedEnd` (the end of a feed), `Card onPress` (a card pressed whole with links and buttons inside), `AppBar lead`.
|
|
8
|
+
|
|
9
|
+
Components: AppBar, Card, CardFeed, FeedEnd
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`FeedEnd`** (timebank, 2026-10-29): a drawn cat sitting, tail wagging forever (still under reduced motion), quiet muted ink, and an optional one-line caption (`children`; `label` is the spoken name without one). Before → after: `<CardFeed end="That is all">` (words only) → `<CardFeed end={<FeedEnd>That is all</FeedEnd>}>`; or place `<FeedEnd />` after the cards. Knobs `--feed-end-size` (default 96) · `--feed-end-ink` · `--feed-end-wag`; token `--motion-wag`. Story `CardFeed · EndCat`.
|
|
13
|
+
- **`Card onPress` + `pressLabel`** (timebank, 2026-10-29): the whole card is pressed anywhere off a control, while links, buttons and a `LinkBlock` inside keep their own press and the card never hears it. One unseen button, named by `pressLabel` (required), serves the keyboard and a screen reader. Before → after: a card with a link and a button inside was only read (no whole press) → `<Card onPress={open} pressLabel="Open the meetup">`. Not with `back` or `stack`. Story `Card · PressedWithControls`.
|
|
14
|
+
- **`AppBar lead`** (timebank, 2026-10-29): the bar's leading slot, left-most, before the mark and the words, a button of its own outside `brandButton`. Before → after: no place for a button before the member's name → `<AppBar lead={<Btn tone="primary" size="sm">…</Btn>} brandButton={…} …>`. Bar height and other slots unchanged. Story `AppBar · Lead`.
|
|
15
|
+
|
|
16
|
+
## 0.7.163 — 2026-10-29
|
|
17
|
+
|
|
18
|
+
`Btn busy`: a button whose press is being carried out.
|
|
19
|
+
|
|
20
|
+
Components: Btn
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **`Btn busy`** (timebank, 2026-10-29): a turning ring stands where the icon would be (a pill: before its words), the button is `disabled` (it fades like one) and `aria-busy`; under reduced motion the ring stands still. A round keeps its `label` as its spoken name and needs no `icon` while busy. Before → after: `<Btn shape="round" size="xl" label="…" disabled><Spinner size="xs"/></Btn>` (no longer type-checks since 0.7.162) → `<Btn shape="round" size="xl" busy label="…" />`; a pill `<Btn disabled><Spinner …/> Sending…</Btn>` → `<Btn busy>Sending…</Btn>`. Story `Btn · Busy`.
|
|
24
|
+
|
|
5
25
|
## 0.7.162 — 2026-10-29
|
|
6
26
|
|
|
7
27
|
One `Btn` for every button; a led line's title and meta flow round its ends; `TileGrid cols`; tokens only.
|
package/css/actions.css
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
there, from the same header-h token. The breathing under it is published:
|
|
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
|
+
.appbar__lead { flex: none; display: flex; align-items: center; } /* AppBar lead: its own button, left-most, outside the brand button */
|
|
54
55
|
.appbar__text { display: grid; min-width: 0; flex: 1; } /* pushes trailing button to the right edge */
|
|
55
56
|
/* 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 */
|
|
56
57
|
.appbar__who {
|
|
@@ -178,6 +179,9 @@
|
|
|
178
179
|
:is(.btn, .icon-btn).is-sending { animation: send-out var(--motion-send) var(--ease-out); }
|
|
179
180
|
:is(.btn, .icon-btn).is-sending > .icon { animation: send-out-call var(--motion-send) ease-in-out; }
|
|
180
181
|
}
|
|
182
|
+
/* BUSY (Btn busy, 2026-10-29): the press is being carried out — a ring turns where the icon stands (a pill: before its words); the button is
|
|
183
|
+
disabled meanwhile, so it fades like one. Under reduced motion the ring stands still */
|
|
184
|
+
@media (prefers-reduced-motion: no-preference) { :is(.btn, .icon-btn).is-busy > .btn__busy { --icon-spin: turn var(--motion-spin) var(--ease-linear) infinite; } } /* `turn`: tokens.css */
|
|
181
185
|
@keyframes send-out {
|
|
182
186
|
from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
183
187
|
60% { box-shadow: 0 0 0 var(--sp-3) transparent, 0 0 0 var(--sp-1) color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
@@ -479,6 +483,8 @@
|
|
|
479
483
|
.card--go (Lh 2026-10-09) = a card pressed whole: `Card` renders it while its ONE control is its foot's button or a row card's end
|
|
480
484
|
button (src/cards/cardGo.ts). It is in the DIM pointer and :active lists only — the focus ring and the disabled look stay the
|
|
481
485
|
button's, the card itself is never focused or disabled.
|
|
486
|
+
.card--press (Lh 2026-10-29) = a card with `onPress`: pressed whole while links and buttons inside keep their own press — the card
|
|
487
|
+
dims only when the finger is on the card itself, never while it is on one of those.
|
|
482
488
|
.t-expand--more (Lh 2026-10-25) = a `Text expand` that does not fit: the whole box opens or folds. It is WORDS, so it neither
|
|
483
489
|
dims nor gives: its ink never changes under the finger (Lh 2026-10-25), the opening is the answer. Pointer only (below).
|
|
484
490
|
.bubble--press (Lh 2026-10-28) = a chat `Bubble` that is a link (`href`) or pressed (`onClick`): a message is as wide as a row, so it DIMS.
|
|
@@ -490,7 +496,7 @@
|
|
|
490
496
|
touch-action: manipulation;
|
|
491
497
|
transition: scale var(--motion-press) var(--ease-out);
|
|
492
498
|
}
|
|
493
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
499
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
494
500
|
cursor: pointer;
|
|
495
501
|
touch-action: manipulation;
|
|
496
502
|
transition: opacity var(--motion-press) var(--ease-out);
|
|
@@ -506,7 +512,8 @@
|
|
|
506
512
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
|
|
507
513
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
508
514
|
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
|
|
509
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
515
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
516
|
+
.card--press:active:has(:is(a[href], button, [role=button], input, select, textarea, summary):active) { opacity: 1; } /* the finger is on a link or a button inside: that one answers, the card stays */
|
|
510
517
|
/* SHADE — what has something BEHIND it (a peeked sheet over the pile, a postcard's face over its back, a post letter's sheet over the other) must not turn see-through:
|
|
511
518
|
it darkens a touch instead (--press-shade) */
|
|
512
519
|
:where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))) { cursor: pointer; touch-action: manipulation; transition: filter var(--motion-press) var(--ease-out); }
|
package/css/card.css
CHANGED
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
.card__middle--full > :is(.pin, .field, .composer, .form-note) { align-self: stretch; } /* a thing to type in keeps the card's width (centred, a Pin's cells would shrink to nothing) */
|
|
97
97
|
.card__middle--full > .bullets { align-self: stretch; text-align: start; } /* a list of steps keeps the card's width and reads from the start edge (centred, each line's pic would float with its words) */
|
|
98
98
|
.card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
|
|
99
|
+
.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 */
|
|
100
|
+
.card--press:has(> .card__press:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
99
101
|
.card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
100
102
|
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
|
|
101
103
|
|
|
@@ -313,6 +315,12 @@
|
|
|
313
315
|
.feed-card { row-gap: 0; }
|
|
314
316
|
.feed-card > .head:has(> .t-caption) > .feed-card__lead { grid-row: span 2; }
|
|
315
317
|
.feed-card__lead { display: grid; } /* placed by the head's align-items: top with a caption, middle without (parts.css) */ /* a Stamp here is the small one, 48 × 60 (stamp.css) */
|
|
318
|
+
/* FeedEnd (Lh 2026-10-29): the end of a feed — a drawn cat, its tail wagging, and a caption. Quiet: the ground's muted ink. */
|
|
319
|
+
.feed-end { display: grid; justify-items: center; gap: var(--sp-2); padding-block: var(--sp-4); color: var(--feed-end-ink, var(--on-surface-muted)); text-align: center; }
|
|
320
|
+
.feed-end__cat { width: var(--feed-end-size, var(--stamp)); height: auto; }
|
|
321
|
+
.feed-end__tail { transform-box: view-box; transform-origin: 59.4% 84.7%; } /* the tail's root (57, 61) on the 96 × 72 drawing */
|
|
322
|
+
@keyframes feed-end-wag { 0%, 100% { rotate: calc(var(--feed-end-wag, 14deg) * -1); } 50% { rotate: var(--feed-end-wag, 14deg); } }
|
|
323
|
+
@media (prefers-reduced-motion: no-preference) { .feed-end__tail { animation: feed-end-wag var(--motion-wag) var(--ease-in-out) infinite; } }
|
|
316
324
|
.card-feed__end { text-align: center; }
|
|
317
325
|
.feed-card__more { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
|
|
318
326
|
.feed-card--small > .feed-card__more { grid-template-rows: 0fr; }
|
package/css/tokens.css
CHANGED
|
@@ -150,6 +150,7 @@
|
|
|
150
150
|
--motion-slide: 0.22s; /* a centred card sliding out and the next in (card.css) — quick, a page turn (Lh, 2026-09-12) */
|
|
151
151
|
--motion-flip: 0.45s; /* a postcard turning over (media.css) — slow enough to read as a card in the hand */
|
|
152
152
|
--motion-spin: 0.9s; /* a busy ring's one turn (Spinner, a busy FormNote) */
|
|
153
|
+
--motion-wag: 0.7s; /* a cat's tail, one sweep across (FeedEnd) */
|
|
153
154
|
--motion-blink: 1.1s; /* a code cell's caret, on and off once */
|
|
154
155
|
--motion-flash: 0.5s; /* a secret code's digit seen before its dot takes it */
|
|
155
156
|
--motion-shake: 0.4s; /* a wrong code shaking once */
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ interface BtnBase extends Omit<ComponentProps<'button'>, 'form' | 'children'> {
|
|
|
21
21
|
sending?: boolean;
|
|
22
22
|
/** the send-out has ended (once per `sending`; at once where motion is off): the app does what follows */
|
|
23
23
|
onSent?: () => void;
|
|
24
|
+
/** BUSY: the press is being carried out — a turning ring stands where the icon would be (a pill: before its words), and the button cannot
|
|
25
|
+
* be pressed (it is `disabled`, so it fades like one; `aria-busy`). CONTROLLED: the app turns it on at the press and off when the work is
|
|
26
|
+
* done. A round keeps its `label` as its spoken name and needs no `icon` while busy. Under reduced motion the ring stands still */
|
|
27
|
+
busy?: boolean;
|
|
24
28
|
}
|
|
25
29
|
export interface PillBtnProps extends BtnBase {
|
|
26
30
|
/** `pill` (default): the worded button, as wide as its words */
|
|
@@ -52,6 +56,10 @@ export type RoundBtnProps = RoundBase & ({
|
|
|
52
56
|
} | {
|
|
53
57
|
icon?: never;
|
|
54
58
|
children: string;
|
|
59
|
+
} | {
|
|
60
|
+
busy: true;
|
|
61
|
+
icon?: IconName;
|
|
62
|
+
children?: ReactNode;
|
|
55
63
|
});
|
|
56
64
|
export type BtnProps = PillBtnProps | RoundBtnProps;
|
|
57
65
|
/**
|
|
@@ -82,7 +90,7 @@ export declare function Btn(props: BtnProps): import("react").DetailedReactHTMLE
|
|
|
82
90
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
83
91
|
"aria-braillelabel"?: string | undefined | undefined;
|
|
84
92
|
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
85
|
-
"aria-busy"
|
|
93
|
+
"aria-busy": (boolean | "true" | "false") | undefined;
|
|
86
94
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
87
95
|
"aria-colcount"?: number | undefined | undefined;
|
|
88
96
|
"aria-colindex"?: number | undefined | undefined;
|
|
@@ -93,7 +101,7 @@ export declare function Btn(props: BtnProps): import("react").DetailedReactHTMLE
|
|
|
93
101
|
"aria-describedby"?: string | undefined | undefined;
|
|
94
102
|
"aria-description"?: string | undefined | undefined;
|
|
95
103
|
"aria-details"?: string | undefined | undefined;
|
|
96
|
-
"aria-disabled"
|
|
104
|
+
"aria-disabled": (boolean | "true" | "false") | undefined;
|
|
97
105
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
98
106
|
"aria-errormessage"?: string | undefined | undefined;
|
|
99
107
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
@@ -343,7 +351,6 @@ export declare function Btn(props: BtnProps): import("react").DetailedReactHTMLE
|
|
|
343
351
|
is?: string | undefined | undefined;
|
|
344
352
|
exportparts?: string | undefined | undefined;
|
|
345
353
|
value?: string | number | readonly string[] | undefined;
|
|
346
|
-
disabled?: boolean | undefined | undefined;
|
|
347
354
|
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
348
355
|
formEncType?: string | undefined | undefined;
|
|
349
356
|
formMethod?: string | undefined | undefined;
|
|
@@ -352,6 +359,7 @@ export declare function Btn(props: BtnProps): import("react").DetailedReactHTMLE
|
|
|
352
359
|
onAnimationEnd: (e: import("react").AnimationEvent<HTMLButtonElement>) => void;
|
|
353
360
|
href: string | undefined;
|
|
354
361
|
type: "button" | "reset" | "submit" | undefined;
|
|
362
|
+
disabled: boolean | undefined;
|
|
355
363
|
className: string;
|
|
356
364
|
}, HTMLButtonElement>;
|
|
357
365
|
export {};
|
package/dist/actions/Btn.js
CHANGED
|
@@ -11,19 +11,23 @@ import { Icon } from '../type/Icon.js';
|
|
|
11
11
|
* 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
12
|
*/
|
|
13
13
|
export function Btn(props) {
|
|
14
|
-
const { shape, size, tone, href, sending, onSent, onAnimationEnd, className, type, children, block, form, label, icon, ...rest } = props;
|
|
14
|
+
const { shape, size, tone, href, sending, onSent, busy, disabled, onAnimationEnd, className, type, children, block, form, label, icon, ...rest } = props;
|
|
15
15
|
const ended = useSendOut(sending, onSent, onAnimationEnd);
|
|
16
16
|
const round = shape === 'round';
|
|
17
17
|
const base = round ? 'icon-btn' : 'btn';
|
|
18
18
|
const step = size && size !== 'md' ? `${base}--${size}` : undefined;
|
|
19
19
|
const look = tone && tone !== 'default' ? `${base}--${tone}` : undefined;
|
|
20
|
+
const ring = busy && _jsx(Icon, { name: "loader-circle", className: "btn__busy", size: round ? (size === 'sm' ? 'sm' : 'md') : 'xs' });
|
|
20
21
|
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
|
|
21
22
|
return createElement(href ? 'a' : 'button', {
|
|
22
23
|
onAnimationEnd: ended,
|
|
23
|
-
href,
|
|
24
|
+
href: busy ? undefined : href, // a busy link goes nowhere
|
|
24
25
|
type: href ? undefined : type ?? 'button',
|
|
26
|
+
disabled: href ? disabled : disabled || busy,
|
|
27
|
+
'aria-disabled': href && busy ? true : undefined,
|
|
28
|
+
'aria-busy': busy || undefined,
|
|
25
29
|
'aria-label': round ? label : undefined,
|
|
26
|
-
className: cx(base, step, look, invert, block && 'btn--block', form && 'btn--form', sending && 'is-sending', className),
|
|
30
|
+
className: cx(base, step, look, invert, block && 'btn--block', form && 'btn--form', sending && 'is-sending', busy && 'is-busy', className),
|
|
27
31
|
...rest,
|
|
28
|
-
}, round
|
|
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] }));
|
|
29
33
|
}
|
package/dist/cardds.css
CHANGED
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
--motion-slide: 0.22s; /* a centred card sliding out and the next in (card.css) — quick, a page turn (Lh, 2026-09-12) */
|
|
192
192
|
--motion-flip: 0.45s; /* a postcard turning over (media.css) — slow enough to read as a card in the hand */
|
|
193
193
|
--motion-spin: 0.9s; /* a busy ring's one turn (Spinner, a busy FormNote) */
|
|
194
|
+
--motion-wag: 0.7s; /* a cat's tail, one sweep across (FeedEnd) */
|
|
194
195
|
--motion-blink: 1.1s; /* a code cell's caret, on and off once */
|
|
195
196
|
--motion-flash: 0.5s; /* a secret code's digit seen before its dot takes it */
|
|
196
197
|
--motion-shake: 0.4s; /* a wrong code shaking once */
|
|
@@ -1118,6 +1119,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
1118
1119
|
.card__middle--full > :is(.pin, .field, .composer, .form-note) { align-self: stretch; } /* a thing to type in keeps the card's width (centred, a Pin's cells would shrink to nothing) */
|
|
1119
1120
|
.card__middle--full > .bullets { align-self: stretch; text-align: start; } /* a list of steps keeps the card's width and reads from the start edge (centred, each line's pic would float with its words) */
|
|
1120
1121
|
.card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
|
|
1122
|
+
.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 */
|
|
1123
|
+
.card--press:has(> .card__press:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
1121
1124
|
.card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
1122
1125
|
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: middle; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
|
|
1123
1126
|
|
|
@@ -1335,6 +1338,12 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
1335
1338
|
.feed-card { row-gap: 0; }
|
|
1336
1339
|
.feed-card > .head:has(> .t-caption) > .feed-card__lead { grid-row: span 2; }
|
|
1337
1340
|
.feed-card__lead { display: grid; } /* placed by the head's align-items: top with a caption, middle without (parts.css) */ /* a Stamp here is the small one, 48 × 60 (stamp.css) */
|
|
1341
|
+
/* FeedEnd (Lh 2026-10-29): the end of a feed — a drawn cat, its tail wagging, and a caption. Quiet: the ground's muted ink. */
|
|
1342
|
+
.feed-end { display: grid; justify-items: center; gap: var(--sp-2); padding-block: var(--sp-4); color: var(--feed-end-ink, var(--on-surface-muted)); text-align: center; }
|
|
1343
|
+
.feed-end__cat { width: var(--feed-end-size, var(--stamp)); height: auto; }
|
|
1344
|
+
.feed-end__tail { transform-box: view-box; transform-origin: 59.4% 84.7%; } /* the tail's root (57, 61) on the 96 × 72 drawing */
|
|
1345
|
+
@keyframes feed-end-wag { 0%, 100% { rotate: calc(var(--feed-end-wag, 14deg) * -1); } 50% { rotate: var(--feed-end-wag, 14deg); } }
|
|
1346
|
+
@media (prefers-reduced-motion: no-preference) { .feed-end__tail { animation: feed-end-wag var(--motion-wag) var(--ease-in-out) infinite; } }
|
|
1338
1347
|
.card-feed__end { text-align: center; }
|
|
1339
1348
|
.feed-card__more { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
|
|
1340
1349
|
.feed-card--small > .feed-card__more { grid-template-rows: 0fr; }
|
|
@@ -2976,6 +2985,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2976
2985
|
there, from the same header-h token. The breathing under it is published:
|
|
2977
2986
|
a .step cancels it to touch the bar. */
|
|
2978
2987
|
.appbar__brand { flex: 1; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
|
|
2988
|
+
.appbar__lead { flex: none; display: flex; align-items: center; } /* AppBar lead: its own button, left-most, outside the brand button */
|
|
2979
2989
|
.appbar__text { display: grid; min-width: 0; flex: 1; } /* pushes trailing button to the right edge */
|
|
2980
2990
|
/* 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 */
|
|
2981
2991
|
.appbar__who {
|
|
@@ -3103,6 +3113,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3103
3113
|
:is(.btn, .icon-btn).is-sending { animation: send-out var(--motion-send) var(--ease-out); }
|
|
3104
3114
|
:is(.btn, .icon-btn).is-sending > .icon { animation: send-out-call var(--motion-send) ease-in-out; }
|
|
3105
3115
|
}
|
|
3116
|
+
/* BUSY (Btn busy, 2026-10-29): the press is being carried out — a ring turns where the icon stands (a pill: before its words); the button is
|
|
3117
|
+
disabled meanwhile, so it fades like one. Under reduced motion the ring stands still */
|
|
3118
|
+
@media (prefers-reduced-motion: no-preference) { :is(.btn, .icon-btn).is-busy > .btn__busy { --icon-spin: turn var(--motion-spin) var(--ease-linear) infinite; } } /* `turn`: tokens.css */
|
|
3106
3119
|
@keyframes send-out {
|
|
3107
3120
|
from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
3108
3121
|
60% { box-shadow: 0 0 0 var(--sp-3) transparent, 0 0 0 var(--sp-1) color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
@@ -3404,6 +3417,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3404
3417
|
.card--go (Lh 2026-10-09) = a card pressed whole: `Card` renders it while its ONE control is its foot's button or a row card's end
|
|
3405
3418
|
button (src/cards/cardGo.ts). It is in the DIM pointer and :active lists only — the focus ring and the disabled look stay the
|
|
3406
3419
|
button's, the card itself is never focused or disabled.
|
|
3420
|
+
.card--press (Lh 2026-10-29) = a card with `onPress`: pressed whole while links and buttons inside keep their own press — the card
|
|
3421
|
+
dims only when the finger is on the card itself, never while it is on one of those.
|
|
3407
3422
|
.t-expand--more (Lh 2026-10-25) = a `Text expand` that does not fit: the whole box opens or folds. It is WORDS, so it neither
|
|
3408
3423
|
dims nor gives: its ink never changes under the finger (Lh 2026-10-25), the opening is the answer. Pointer only (below).
|
|
3409
3424
|
.bubble--press (Lh 2026-10-28) = a chat `Bubble` that is a link (`href`) or pressed (`onClick`): a message is as wide as a row, so it DIMS.
|
|
@@ -3415,7 +3430,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3415
3430
|
touch-action: manipulation;
|
|
3416
3431
|
transition: scale var(--motion-press) var(--ease-out);
|
|
3417
3432
|
}
|
|
3418
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
3433
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
3419
3434
|
cursor: pointer;
|
|
3420
3435
|
touch-action: manipulation;
|
|
3421
3436
|
transition: opacity var(--motion-press) var(--ease-out);
|
|
@@ -3431,7 +3446,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3431
3446
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
|
|
3432
3447
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
3433
3448
|
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
|
|
3434
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
3449
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
3450
|
+
.card--press:active:has(:is(a[href], button, [role=button], input, select, textarea, summary):active) { opacity: 1; } /* the finger is on a link or a button inside: that one answers, the card stays */
|
|
3435
3451
|
/* SHADE — what has something BEHIND it (a peeked sheet over the pile, a postcard's face over its back, a post letter's sheet over the other) must not turn see-through:
|
|
3436
3452
|
it darkens a touch instead (--press-shade) */
|
|
3437
3453
|
:where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))) { cursor: pointer; touch-action: manipulation; transition: filter var(--motion-press) var(--ease-out); }
|
package/dist/cards/Card.d.ts
CHANGED
|
@@ -70,6 +70,14 @@ export interface CardProps extends ComponentProps<'article'> {
|
|
|
70
70
|
toFrontLabel?: string;
|
|
71
71
|
/** the card brings itself into view in its scroller ONCE, when it mounts (no motion, `block: 'nearest'`): a screen drawn again lands on the card the member left from, with no ref or id of the app's. Set later, it does nothing */
|
|
72
72
|
startInView?: boolean;
|
|
73
|
+
/** THE WHOLE CARD IS PRESSED, and links and buttons inside it still work on their own: a touch anywhere on the card that is not on a control calls this; a touch on a link, a button
|
|
74
|
+
* or any other control in it is that control's and never reaches the card. The card dims under the finger (not while it is on an inner control). The keyboard and a screen reader meet ONE
|
|
75
|
+
* extra button, unseen, named by `pressLabel` (Enter and Space call this; it takes the card's focus ring), after the card's own controls. Use it where the card's one move is
|
|
76
|
+
* more than its foot's button (a meetup opened by a touch, with a map link and a "join" button inside). Not on a card with `back` or `stack`. Replaces the
|
|
77
|
+
* automatic press-whole rule for this card */
|
|
78
|
+
onPress?: () => void;
|
|
79
|
+
/** the spoken name of the unseen press button — REQUIRED with `onPress`: say what the touch does ("Open the meetup") */
|
|
80
|
+
pressLabel?: string;
|
|
73
81
|
/** the cross's spoken name (default: the words' `remove`) — name what goes: "Remove 'buy medicine'" */
|
|
74
82
|
removeLabel?: string;
|
|
75
83
|
}
|
|
@@ -81,10 +89,11 @@ export interface CardProps extends ComponentProps<'article'> {
|
|
|
81
89
|
* A page with one feature and one CTA may be a single card. Keep everything big.
|
|
82
90
|
* PRESSED WHOLE: a card whose ONLY control is its foot's button, or a row card's end button, is pressed anywhere — a touch off the
|
|
83
91
|
* button runs that button's own action once, and the card dims under the finger. The app writes nothing; any other card is only read.
|
|
92
|
+
* PRESSED WHOLE WITH CONTROLS INSIDE (`onPress` + `pressLabel`): the card is pressed anywhere off its own links and buttons, which keep their own press; one unseen button serves the keyboard.
|
|
84
93
|
* TWO FACES (`back`): the whole card turns over on a tap off a control (the flip mechanic it shares with Postcard); the head and the foot
|
|
85
94
|
* read the same on both faces, the middle is one fixed height; `backFull` gives the back the whole card, centred, with neither. `paper="bands"`: paper head and foot bands edge to edge, the tint between.
|
|
86
95
|
*/
|
|
87
|
-
export declare function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as, stack, leave, onLeft, onRemove, removeLabel, back, backFull, face, defaultFace, onFaceChange, toBackLabel, toFrontLabel, startInView, className, style, children, onClick, ref, ...rest }: CardProps): import("react").DetailedReactHTMLElement<{
|
|
96
|
+
export declare function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as, stack, leave, onLeft, onPress, pressLabel, onRemove, removeLabel, back, backFull, face, defaultFace, onFaceChange, toBackLabel, toFrontLabel, startInView, className, style, children, onClick, ref, ...rest }: CardProps): import("react").DetailedReactHTMLElement<{
|
|
88
97
|
onClick: (e: MouseEvent<HTMLElement>) => void;
|
|
89
98
|
inert?: boolean | undefined;
|
|
90
99
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
package/dist/cards/Card.js
CHANGED
|
@@ -16,17 +16,23 @@ import { StackHeadCtx, StackPullCtx, ownHead, stackPaint, useStackCard } from '.
|
|
|
16
16
|
* A page with one feature and one CTA may be a single card. Keep everything big.
|
|
17
17
|
* PRESSED WHOLE: a card whose ONLY control is its foot's button, or a row card's end button, is pressed anywhere — a touch off the
|
|
18
18
|
* button runs that button's own action once, and the card dims under the finger. The app writes nothing; any other card is only read.
|
|
19
|
+
* PRESSED WHOLE WITH CONTROLS INSIDE (`onPress` + `pressLabel`): the card is pressed anywhere off its own links and buttons, which keep their own press; one unseen button serves the keyboard.
|
|
19
20
|
* TWO FACES (`back`): the whole card turns over on a tap off a control (the flip mechanic it shares with Postcard); the head and the foot
|
|
20
21
|
* read the same on both faces, the middle is one fixed height; `backFull` gives the back the whole card, centred, with neither. `paper="bands"`: paper head and foot bands edge to edge, the tint between.
|
|
21
22
|
*/
|
|
22
|
-
export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as = 'article', stack, leave, onLeft, onRemove, removeLabel, back, backFull, face, defaultFace = 'front', onFaceChange, toBackLabel, toFrontLabel, startInView, className, style, children, onClick, ref, ...rest }) {
|
|
23
|
+
export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as = 'article', stack, leave, onLeft, onPress, pressLabel, onRemove, removeLabel, back, backFull, face, defaultFace = 'front', onFaceChange, toBackLabel, toFrontLabel, startInView, className, style, children, onClick, ref, ...rest }) {
|
|
23
24
|
if (onRemove && !row)
|
|
24
25
|
warnOnce('card-remove-row', 'cardds Card: `onRemove` draws its cross on a `row` card only');
|
|
25
26
|
if (back != null && (row || sm || stack))
|
|
26
27
|
warnOnce('card-back-kind', 'cardds Card: `back` turns a whole card — not a `row`, `sm` or `stack` card; the back is ignored');
|
|
28
|
+
if (onPress && (back != null || stack))
|
|
29
|
+
warnOnce('card-press-kind', 'cardds Card: `onPress` presses a plain card — not one with `back` or `stack`; it is ignored');
|
|
30
|
+
if (onPress && !pressLabel)
|
|
31
|
+
warnOnce('card-press-label', 'cardds Card: `onPress` needs a `pressLabel` — the unseen button needs a spoken name');
|
|
27
32
|
const turns = back != null && !row && !sm && !stack;
|
|
28
33
|
const [shown, ask] = useControlled(face, defaultFace, onFaceChange);
|
|
29
34
|
const flipped = turns && shown === 'back';
|
|
35
|
+
const pressed = onPress != null && back == null && !stack;
|
|
30
36
|
const own = useRef(null);
|
|
31
37
|
const swallow = useRef(false);
|
|
32
38
|
const pulling = useStackCard(own, stack, swallow);
|
|
@@ -61,7 +67,7 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
|
|
|
61
67
|
return () => { live = false; };
|
|
62
68
|
}, [away]);
|
|
63
69
|
const [go, setGo] = useState(false);
|
|
64
|
-
const findGo = useLatest(() => setGo(!turns && own.current != null && goControl(own.current) != null));
|
|
70
|
+
const findGo = useLatest(() => setGo(!turns && !pressed && own.current != null && goControl(own.current) != null));
|
|
65
71
|
useLayoutEffect(() => findGo.current()); // every render: what the card holds is its children's
|
|
66
72
|
useEffect(() => {
|
|
67
73
|
const card = own.current;
|
|
@@ -83,6 +89,11 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
|
|
|
83
89
|
ask(flipped ? 'front' : 'back');
|
|
84
90
|
return;
|
|
85
91
|
}
|
|
92
|
+
if (pressed) {
|
|
93
|
+
if (!e.defaultPrevented && card && !onControl(card, target))
|
|
94
|
+
onPress?.();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
86
97
|
if (!e.defaultPrevented && card?.contains(target)) {
|
|
87
98
|
const control = goControl(card);
|
|
88
99
|
if (control && !control.contains(target)) {
|
|
@@ -114,13 +125,14 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
|
|
|
114
125
|
const props = {
|
|
115
126
|
...rest,
|
|
116
127
|
ref: setRef,
|
|
117
|
-
className: cx('card', tone && tone !== 1 && `card--${tone}`, paper === true && 'sheet--paper', paper === 'bands' && 'card--bands', turns && 'card--turns flip', flipped && 'is-flipped', sm && 'card--sm', row && 'card--row', cover && 'card--cover', fold && 'card--fold', centre && 'card--centre', wide && 'card--wide', band && 'card--band', go && 'card--go', leaver && 'card--leaver', away && 'card--away', painted.className, className),
|
|
128
|
+
className: cx('card', tone && tone !== 1 && `card--${tone}`, paper === true && 'sheet--paper', paper === 'bands' && 'card--bands', turns && 'card--turns flip', flipped && 'is-flipped', sm && 'card--sm', row && 'card--row', cover && 'card--cover', fold && 'card--fold', centre && 'card--centre', wide && 'card--wide', band && 'card--band', go && 'card--go', pressed && 'card--press', leaver && 'card--leaver', away && 'card--away', painted.className, className),
|
|
118
129
|
style: painted.style || style ? { ...painted.style, ...style } : undefined,
|
|
119
130
|
...(stack ? { 'aria-busy': painted.busy } : {}),
|
|
120
131
|
...(away ? { inert: true } : {}),
|
|
121
132
|
onClick: click,
|
|
122
133
|
};
|
|
123
134
|
const cross = row && onRemove ? (_jsx("button", { type: "button", className: "card__remove", "aria-label": removeLabel ?? word('remove'), onClick: (e) => { e.preventDefault(); e.stopPropagation(); onRemove(); }, children: _jsx(Icon, { name: "x" }) }, "remove")) : null;
|
|
135
|
+
const press = pressed ? (_jsx("button", { type: "button", className: "card__press", "aria-label": pressLabel, onClick: (e) => { e.stopPropagation(); onPress?.(); } }, "press")) : null;
|
|
124
136
|
if (turns) {
|
|
125
137
|
const kids = Children.toArray(children);
|
|
126
138
|
const ownHeadKid = kids.find((c) => isValidElement(c) && c.type === Head);
|
|
@@ -129,5 +141,5 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
|
|
|
129
141
|
const side = (which, middle, bare = false) => (_jsxs("div", { className: cx('card__face flip__face', `flip__face--${which}`), ...((which === 'back') !== flipped ? { inert: true } : {}), children: [_jsx("button", { type: "button", className: "card__turn", "aria-label": which === 'front' ? toBackLabel ?? word('turnToBack') : toFrontLabel ?? word('turnToFront'), onClick: () => ask(which === 'front' ? 'back' : 'front') }), bare ? null : ownHeadKid, _jsx("div", { className: cx('card__middle', bare && 'card__middle--full'), children: which === 'front' ? front : middle }), bare ? null : ownFootKid] }, which));
|
|
130
142
|
return createElement(as, props, inner(_jsxs(_Fragment, { children: [side('front', null), side('back', back, backFull)] })));
|
|
131
143
|
}
|
|
132
|
-
return createElement(as, props, inner(_jsxs(_Fragment, { children: [children, cross] })));
|
|
144
|
+
return createElement(as, props, inner(_jsxs(_Fragment, { children: [children, cross, press] })));
|
|
133
145
|
}
|
package/dist/cards/CardFeed.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface CardFeedProps extends ComponentProps<'div'> {
|
|
|
14
14
|
onMore?: () => void;
|
|
15
15
|
/** how many cards are still under the one that asks (default 2): with 5 cards the 3rd asks, with 10 the 8th */
|
|
16
16
|
ahead?: number;
|
|
17
|
-
/** the words drawn after the last card, when the app says the queue is complete — they stop `onMore`. No card, nothing is drawn, these words too */
|
|
17
|
+
/** the words drawn after the last card, when the app says the queue is complete — they stop `onMore`. A `<FeedEnd>` here is drawn as it is (the cat). No card, nothing is drawn, these words too */
|
|
18
18
|
end?: ReactNode;
|
|
19
19
|
/** the WHOLE queue, in the app's order: one `FeedCard` each, as direct children. The feed draws every one of them */
|
|
20
20
|
children?: ReactNode;
|
package/dist/cards/CardFeed.js
CHANGED
|
@@ -8,6 +8,7 @@ import { Foot } from '../parts/Foot.js';
|
|
|
8
8
|
import { Lead } from '../parts/Lead.js';
|
|
9
9
|
import { Icon } from '../type/Icon.js';
|
|
10
10
|
import { Text } from '../type/Text.js';
|
|
11
|
+
import { FeedEnd } from './FeedEnd.js';
|
|
11
12
|
const FeedCtx = createContext(null);
|
|
12
13
|
/**
|
|
13
14
|
* CardFeed — a QUEUE of cards the system hands the member one after another, all of them on the screen: one BIG (heading, content, its
|
|
@@ -78,7 +79,7 @@ export function CardFeed({ big: bigProp, defaultBig, onBigChange, onMore, ahead
|
|
|
78
79
|
}, [key, feed.asker, canAsk]);
|
|
79
80
|
if (!cards.length)
|
|
80
81
|
return null;
|
|
81
|
-
return (_jsx(FeedCtx.Provider, { value: { big: feed.big, grow: (id) => request(id, 'tap') }, children: _jsxs("div", { ref: setRefs(own, ref), className: cx('card-feed', className), ...rest, children: [cards, end ? _jsx(Text, { level: "caption", muted: true, as: "p", role: "note", className: "card-feed__end", children: end }) : null] }) }));
|
|
82
|
+
return (_jsx(FeedCtx.Provider, { value: { big: feed.big, grow: (id) => request(id, 'tap') }, children: _jsxs("div", { ref: setRefs(own, ref), className: cx('card-feed', className), ...rest, children: [cards, end ? (isValidElement(end) && end.type === FeedEnd ? end : _jsx(Text, { level: "caption", muted: true, as: "p", role: "note", className: "card-feed__end", children: end })) : null] }) }));
|
|
82
83
|
}
|
|
83
84
|
const onSmallKey = (e) => {
|
|
84
85
|
if (e.target !== e.currentTarget || (e.key !== 'Enter' && e.key !== ' '))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface FeedEndProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
3
|
+
/** the one line under the cat, in the app's own words ("you've seen it all") — omit it for the cat alone */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** the cat's spoken name when there is no caption to read out */
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
/** FeedEnd — "this is the end of the feed": a small drawn cat sitting with its tail wagging, quiet (the muted ink of the ground), and an optional
|
|
9
|
+
* one-line caption under it. Stands under the LAST card of a scrolling feed: pass it as a `CardFeed`'s `end` (the feed then asks for no more), or put it
|
|
10
|
+
* after the cards yourself. It keeps the card's width and centres, so a short feed ends on it as a long one does. The tail wags forever; under
|
|
11
|
+
* reduced motion the cat sits still. Knobs `--feed-end-size` · `--feed-end-ink` · `--feed-end-wag`. */
|
|
12
|
+
export declare function FeedEnd({ children, label, className, ...rest }: FeedEndProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
|
+
import { Text } from '../type/Text.js';
|
|
4
|
+
/** FeedEnd — "this is the end of the feed": a small drawn cat sitting with its tail wagging, quiet (the muted ink of the ground), and an optional
|
|
5
|
+
* one-line caption under it. Stands under the LAST card of a scrolling feed: pass it as a `CardFeed`'s `end` (the feed then asks for no more), or put it
|
|
6
|
+
* after the cards yourself. It keeps the card's width and centres, so a short feed ends on it as a long one does. The tail wags forever; under
|
|
7
|
+
* reduced motion the cat sits still. Knobs `--feed-end-size` · `--feed-end-ink` · `--feed-end-wag`. */
|
|
8
|
+
export function FeedEnd({ children, label, className, ...rest }) {
|
|
9
|
+
return (_jsxs("div", { className: cx('feed-end', className), role: "note", "aria-label": children == null ? label : undefined, ...rest, children: [_jsxs("svg", { className: "feed-end__cat", viewBox: "0 0 96 72", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("path", { className: "feed-end__tail", d: "M57 61C70 61 74 52 72 40" }), _jsx("path", { d: "M30 65C21 65 19 52 23 43C26 36 31 33 36 33C46 33 55 40 57 50C59 59 56 65 50 65Z" }), _jsx("path", { d: "M23 23C23 15 28 12 34 12C40 12 45 15 45 23C45 30 40 34 34 34C28 34 23 30 23 23Z" }), _jsx("path", { d: "M25 16L24 5L32 12M43 16L44 5L36 12M30 22V24M38 22V24M32 28H36" })] }), children != null && _jsx(Text, { level: "caption", muted: true, as: "p", children: children })] }));
|
|
10
|
+
}
|