@usableapp/cardds 0.7.170 → 0.7.172
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 +27 -0
- package/css/actions.css +6 -3
- package/css/base.css +2 -2
- package/css/card.css +17 -7
- package/css/numbers.css +3 -2
- package/css/sheet.css +2 -1
- package/css/tokens.css +7 -0
- package/dist/cardds.css +37 -15
- package/dist/cards/Card.d.ts +17 -1
- package/dist/cards/Card.js +26 -6
- package/dist/catalog.json +1 -1
- package/dist/numbers/NumberBand.d.ts +1 -1
- package/dist/numbers/NumberBand.js +1 -1
- package/docs/reference.md +17 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export interface NumberBandProps extends ComponentProps<'article'> {
|
|
|
10
10
|
/** the paper — see `Tone` */
|
|
11
11
|
tone?: Tone;
|
|
12
12
|
}
|
|
13
|
-
/** NumberBand — a data card: 2-line label ·
|
|
13
|
+
/** NumberBand — a data card: 2-line label (the label type) · the one number on a sheet (the stat type at the hero size, knobs `--band-num-font` · `--band-num-font-size`) · footnote. Stack several in a NumberBandStack for one boundary with hairlines. */
|
|
14
14
|
export declare function NumberBand({ label, num, foot, tone, className, ...rest }: NumberBandProps): import("react").JSX.Element;
|
|
15
15
|
export interface NumberBandStackProps extends ComponentProps<'div'> {
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
/** NumberBand — a data card: 2-line label ·
|
|
3
|
+
/** NumberBand — a data card: 2-line label (the label type) · the one number on a sheet (the stat type at the hero size, knobs `--band-num-font` · `--band-num-font-size`) · footnote. Stack several in a NumberBandStack for one boundary with hairlines. */
|
|
4
4
|
export function NumberBand({ label, num, foot, tone, className, ...rest }) {
|
|
5
5
|
return (_jsxs("article", { className: cx('card card--band', tone && tone !== 1 && `card--${tone}`, className), ...rest, children: [_jsx("span", { className: "band__label", children: label }), _jsx("span", { className: "band__num", children: num }), foot != null && _jsx("span", { className: "band__foot", children: foot })] }));
|
|
6
6
|
}
|
package/docs/reference.md
CHANGED
|
@@ -765,6 +765,19 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
|
|
|
765
765
|
extra unseen button, named by `pressLabel` (required), that carries the focus
|
|
766
766
|
ring; no control is nested in another. It replaces the automatic rule above
|
|
767
767
|
for that card. Not with `back` or `stack`. Story `Card · PressedWithControls`.
|
|
768
|
+
- **A card that folds to its head** (timebank, 2026-10-29): `Card folds`.
|
|
769
|
+
Folded, only the card's `Head` shows; a tap on the head (off a control in
|
|
770
|
+
it) opens the rest, the content and the `Foot`, and another folds it. It is
|
|
771
|
+
controlled like every stateful part: `open` + `onOpenChange`, or
|
|
772
|
+
`defaultOpen` (default folded). The rest opens and folds as a grid row
|
|
773
|
+
(the small `FeedCard`'s own fold, one rule); folded it is `inert`. The head
|
|
774
|
+
dims under the finger; a control in it keeps its own press. The keyboard and
|
|
775
|
+
a screen reader meet one unseen button after the head, named by the head's
|
|
776
|
+
words (or `openLabel`), with `aria-expanded`; it carries the card's focus
|
|
777
|
+
ring. A folding card is never pressed whole. Not on a `row`, `sm`, `stack`
|
|
778
|
+
or `paper="bands"` card, nor with `back` or `onPress` (it is ignored there,
|
|
779
|
+
with a warning). The card draws its own chevron down as the head's last
|
|
780
|
+
end (after the app's ends), turned up while open, as a `Banner`'s. Stories `Card · Folds`, `FoldsControlled`.
|
|
768
781
|
- A page with **one feature and one CTA** (an install page, a single
|
|
769
782
|
decision) may be contained in one card: head, the pitch, foot.
|
|
770
783
|
- **A bottom sheet holds what the member acts on** — controls, or small
|
|
@@ -1479,7 +1492,10 @@ reads every value from a token in `css/tokens.css` (or a palette, a finish, a pr
|
|
|
1479
1492
|
mark over the first line, a lower vowel under the last — in the em of the type it is read in (a font metric, so it follows the size). A
|
|
1480
1493
|
line that clips its words (a head's title and meta cut by a line count, a top bar's title cut by an ellipsis) pads its box by them inside
|
|
1481
1494
|
the clip and gives them back outside (`padding-block: var(--glyph-rise) var(--glyph-drop)` with the same negative margin), so no mark is
|
|
1482
|
-
cut and nothing moves. A
|
|
1495
|
+
cut and nothing moves. A box that SCROLLS clips whatever rises out of it, and a child's padding cannot reach past it: a scroller
|
|
1496
|
+
whose first line touches its top edge (a lone `Page` in a `Step`) pads its top by `--glyph-rise-room` (the rise at the display size,
|
|
1497
|
+
`calc(var(--fs-display) * 0.2)`, so it grows with a member's text size) and takes it back from its margin, so the words stand where
|
|
1498
|
+
they stood. A small icon set in a line of words (an End's arrow, a chip's icon in a head) is a letter of it: `vertical-align:
|
|
1483
1499
|
middle`, its middle on the words' x-height middle, never a hand-set em offset.
|
|
1484
1500
|
|
|
1485
1501
|
A knob's default is one of these too, so a knob read from nowhere still shows the theme. No value is written in place in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.172",
|
|
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).",
|