@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/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './cards/cardGrounds.js';
|
|
|
25
25
|
export * from './cards/inkGrounds.js';
|
|
26
26
|
export * from './cards/CardParts.js';
|
|
27
27
|
export * from './cards/CardFeed.js';
|
|
28
|
+
export * from './cards/FeedEnd.js';
|
|
28
29
|
export * from './cards/Placeholder.js';
|
|
29
30
|
export * from './sheets/SheetStack.js';
|
|
30
31
|
export * from './sheets/StackBack.js';
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export * from './cards/cardGrounds.js';
|
|
|
29
29
|
export * from './cards/inkGrounds.js';
|
|
30
30
|
export * from './cards/CardParts.js';
|
|
31
31
|
export * from './cards/CardFeed.js';
|
|
32
|
+
export * from './cards/FeedEnd.js';
|
|
32
33
|
export * from './cards/Placeholder.js';
|
|
33
34
|
export * from './sheets/SheetStack.js';
|
|
34
35
|
export * from './sheets/StackBack.js';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
export interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
|
|
3
|
+
/** the bar's LEADING slot: left-most, before the mark and the words — a button of its own (a primary `Btn`) that stands outside the `brandButton`, so no button nests in a button. The bar keeps its height */
|
|
4
|
+
lead?: ReactNode;
|
|
3
5
|
/** the app or brand mark on the left (an Icon, an Avatar, or a `Stamp`: a stamp here is the bar's inner height tall, `--appbar-stamp-size`) */
|
|
4
6
|
icon?: ReactNode;
|
|
5
7
|
/** the context: which app, which place, which account */
|
|
@@ -18,4 +20,4 @@ export interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
|
|
|
18
20
|
* It is fixed, so the Screen it sits in reserves its height (`--header-h`, 60px) automatically.
|
|
19
21
|
* Use a TopBar for a screen title; use both when the app context matters (home).
|
|
20
22
|
*/
|
|
21
|
-
export declare function AppBar({ icon, title, sub, action, brandButton, className, children, ...rest }: AppBarProps): import("react").JSX.Element;
|
|
23
|
+
export declare function AppBar({ lead, icon, title, sub, action, brandButton, className, children, ...rest }: AppBarProps): import("react").JSX.Element;
|
package/dist/scaffold/AppBar.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cx } from '../cx.js';
|
|
|
5
5
|
* It is fixed, so the Screen it sits in reserves its height (`--header-h`, 60px) automatically.
|
|
6
6
|
* Use a TopBar for a screen title; use both when the app context matters (home).
|
|
7
7
|
*/
|
|
8
|
-
export function AppBar({ icon, title, sub, action, brandButton, className, children, ...rest }) {
|
|
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: [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] }), children] }));
|
|
11
11
|
}
|
package/docs/reference.md
CHANGED
|
@@ -715,6 +715,23 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
|
|
|
715
715
|
never a prop. Knobs `--card-feed-gap`, `--feed-card-head-h`. Reduced
|
|
716
716
|
motion: nothing slides or fades. Stories `CardFeed · Default`, `More`,
|
|
717
717
|
`StampLead`, `Home · Feed`.
|
|
718
|
+
- **`FeedEnd`** (Lh 2026-10-29): the end of a feed — a drawn cat sitting, its
|
|
719
|
+
tail wagging (looping; still under reduced motion), in the ground's muted
|
|
720
|
+
ink, and an optional one-line caption (`children`, the app's words; `label`
|
|
721
|
+
is the spoken name without one). Pass it as `CardFeed end={<FeedEnd>…</FeedEnd>}`
|
|
722
|
+
(the feed draws it as it is, and asks for no more) or place it after the
|
|
723
|
+
cards. It centres in the feed's width, so a short feed ends on it as a long
|
|
724
|
+
one does. Knobs `--feed-end-size` (default `--stamp`, 96) · `--feed-end-ink` ·
|
|
725
|
+
`--feed-end-wag` (the tail's sweep, 14deg); token `--motion-wag`. Story
|
|
726
|
+
`CardFeed · EndCat`.
|
|
727
|
+
- **A card pressed whole with controls inside** (timebank, 2026-10-29): `Card
|
|
728
|
+
onPress` + `pressLabel`. A touch anywhere on the card off a control calls
|
|
729
|
+
`onPress`; a link, a button, a `LinkBlock` or any control inside keeps its
|
|
730
|
+
own press and the card never hears it. The card dims under the finger (not
|
|
731
|
+
while it is on an inner control). The keyboard and a screen reader meet one
|
|
732
|
+
extra unseen button, named by `pressLabel` (required), that carries the focus
|
|
733
|
+
ring; no control is nested in another. It replaces the automatic rule above
|
|
734
|
+
for that card. Not with `back` or `stack`. Story `Card · PressedWithControls`.
|
|
718
735
|
- A page with **one feature and one CTA** (an install page, a single
|
|
719
736
|
decision) may be contained in one card: head, the pitch, foot.
|
|
720
737
|
- **A bottom sheet holds what the member acts on** — controls, or small
|
|
@@ -940,6 +957,7 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
|
|
|
940
957
|
stamp in an `AvatarStack` are `--stamp-sm-size` wide (one tap: 48 × 60), on any surface and in any row. And the inline
|
|
941
958
|
one: `Stamp xs` stands beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one
|
|
942
959
|
`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.
|
|
960
|
+
`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`.
|
|
943
961
|
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
|
|
944
962
|
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`.
|
|
945
963
|
Several lap in an `AvatarStack` with `more` ("+8"), the count then at the chip's scale. In a card's head band the stamp keeps the head's padding below it as well as above (`--card-pad`, not the seam), so the head is never shorter
|
|
@@ -1470,6 +1488,10 @@ shapes side by side: story `Btn · Ladder`.
|
|
|
1470
1488
|
button's icon swells and tips forward and two rings spread from its edge (knob `--btn-sending-ink`, default the accent).
|
|
1471
1489
|
Controlled: the app sets `sending` at the press, and on `onSent` (once, when it ends; at once under reduced motion,
|
|
1472
1490
|
where nothing moves) turns it off and swaps the icon for a check or puts the sent thing in. Story `Btn · Controlled`.
|
|
1491
|
+
**A button whose press is being carried out** (`Btn busy`, `Btn shape="round" busy`, 2026-10-29): a turning ring stands where the icon
|
|
1492
|
+
would be (a pill: before its words) and the button is `disabled` (it fades like one, `aria-busy`); a round keeps its `label` as its spoken
|
|
1493
|
+
name and needs no `icon` while busy (`<Btn shape="round" size="xl" busy label="Sending" />`). Controlled: the app sets `busy` at the press
|
|
1494
|
+
and clears it when the work is done. Under reduced motion the ring stands still. Never a `Spinner` inside a Btn. Story `Btn · Busy`.
|
|
1473
1495
|
Everything thumb-first.
|
|
1474
1496
|
|
|
1475
1497
|
The two bars across the top of a screen — `.topbar` (screen title) and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.164",
|
|
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).",
|