@usableapp/cardds 0.7.151 → 0.7.153
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 +25 -0
- package/css/actions.css +5 -0
- package/css/card.css +24 -0
- package/css/media.css +4 -0
- package/css/sticky.css +20 -0
- package/dist/actions/Chip.d.ts +31 -0
- package/dist/actions/Chip.js +11 -1
- package/dist/cardds.css +53 -0
- package/dist/cards/Card.d.ts +3 -1
- package/dist/cards/Card.js +2 -2
- package/dist/cards/CardParts.d.ts +17 -1
- package/dist/cards/CardParts.js +11 -1
- package/dist/catalog.json +1 -1
- package/dist/media/Tile.d.ts +3 -1
- package/dist/media/Tile.js +2 -2
- package/dist/sticky/Sticky.d.ts +3 -1
- package/dist/sticky/Sticky.js +3 -2
- package/dist/sticky/StickyPick.d.ts +6 -4
- package/dist/sticky/StickyPick.js +5 -3
- package/docs/reference.md +22 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
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.153 — 2026-10-27
|
|
6
|
+
|
|
7
|
+
`Sticky cut`'s white band moves inside the note, half as thick, with smaller corners; nothing spills past the note.
|
|
8
|
+
|
|
9
|
+
Components: Sticky
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **`Sticky cut` band inside the box** (Lh 2026-10-27). Before → after: the band was drawn outside the note (`--sticky-cut-size` default `--sp-2`) and the note kept a margin for it → the band is the note's own edge (`padding: var(--sticky-cut-size, var(--sp-1))`, half as thick), and the note grows by it on every side (176 at the default size); the toned paper inside stays `--sticky-size` with the same padding, so the writing room and the `--small` switch are a plain note's. No margin, nothing spills: a holder spaces for it as for any note. Corners: `--sticky-radius` on a cut note defaults to `--r-card-row` (was `--r-media`); the band's outer corner is the paper's + the cut. Knobs unchanged in name.
|
|
13
|
+
|
|
14
|
+
## 0.7.152 — 2026-10-27
|
|
15
|
+
|
|
16
|
+
A straight die-cut sticker note, cards two across with a cut-out picture, and the pickers of a make-a-note sheet.
|
|
17
|
+
|
|
18
|
+
Components: Sticky, StickyPick, Card, CardGrid, CardArt, ChipChoice, TileGrid
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **`Sticky cut`** — a die-cut sticker note: a band of plain paper all round it, round corners, a soft lifted shadow, no fold (it says nothing of read or unread). Straight; `tilt` still turns it. Knobs `--sticky-cut-size`, `--sticky-cut-bg` (default the stamp paper), `--sticky-radius`. Before → after: a note being written was a plain `Sticky` with a fold → `Sticky cut` round a `StickyField`. Story `StickyScreens · MakeNote`.
|
|
22
|
+
- **`CardGrid`** — cards two across, each its own boundary, the two of a row as tall as each other; **`Card wide`** takes the whole row. Knobs `--card-grid-gap`, `--card-grid-pad`. On the base or in a sheet's body, never in a card.
|
|
23
|
+
- **`CardArt`** — a card's last row: a cut-out picture (`art`) in the bottom-right corner out to the card's edge, a `count` on it as a `Badge`, a small control at the row's start (children). Knob `--card-art-size`. A note among items is a toned `Card` with the same row.
|
|
24
|
+
- **`ChipChoice`** — one choice made of `ChipPick`s, controlled as a whole: `value` + `onValueChange` (a list; one at most without `many`) or `defaultValue`. An option's `lead` (a small `Avatar`, an `Icon`) leads its words; `add` stands a "+" first; a one-line strip by default, `wrap` wraps. On a sheet. Knob `--chip-avatar-size`.
|
|
25
|
+
- **`TileGrid cols4`** — four small square tiles across: the icon over a short label, a sheet's row of actions.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **`StickyPick` takes `defaultValue`**: `value` is now optional; without it the chooser keeps its own (default the first of `tones`). Controlled use is unchanged.
|
|
29
|
+
|
|
5
30
|
## 0.7.151 — 2026-10-27
|
|
6
31
|
|
|
7
32
|
The caption over a `Words` title gets its own knob, `--words-over-font`, so a low bar can set all its words smaller from outside.
|
package/css/actions.css
CHANGED
|
@@ -223,6 +223,11 @@
|
|
|
223
223
|
/* the words that lead the chips (ChipRow `lead`, "นัดที่" before a place, Lh 2026-10-21): the chips' own type and size, at the middle of their height */
|
|
224
224
|
.chip-row__lead { align-self: center; font: var(--type-label); font-size: var(--chip-font-size, var(--fs-sm)); color: var(--chip-row-lead-ink, inherit); }
|
|
225
225
|
.chip-row:not(.bleed) { flex-wrap: wrap; } /* a strip (.bleed, card.css) stays one line */
|
|
226
|
+
.chip-row > .icon-btn { flex: none; align-self: center; } /* a ChipChoice's `add`: the "+" first in the row, at the chips' middle */
|
|
227
|
+
/* a person in a chip (a ChipChoice of people): a small round face leads the name, inside the chip's height, the chip's start padding taken back */
|
|
228
|
+
/* the lead is a picture of the name beside it: unseen by a screen reader, laid out as the chip's own child */
|
|
229
|
+
.chip__lead { display: contents; }
|
|
230
|
+
.chip__lead > .avatar { --_size: var(--chip-avatar-size, var(--sp-6)); margin-inline-start: calc(-1 * var(--sp-2)); font-size: calc(var(--_size) * 0.4); }
|
|
226
231
|
.chip-row.bleed > .chip { flex: none; white-space: nowrap; } /* a chip of the strip keeps its words on one line at its own width: the strip scrolls, a chip never shrinks to fit it */
|
|
227
232
|
|
|
228
233
|
/* ---- dropdown: the standard for every select — a pill trigger + .menu popover ----
|
package/css/card.css
CHANGED
|
@@ -574,3 +574,27 @@
|
|
|
574
574
|
overflow-y: auto;
|
|
575
575
|
overscroll-behavior: contain;
|
|
576
576
|
}
|
|
577
|
+
|
|
578
|
+
/* ---- card grid: cards two across, each its own boundary; a --wide card takes the whole row ----
|
|
579
|
+
<div class="card-grid"><article class="card">…</article><article class="card">…</article><article class="card card--wide">…</article></div> */
|
|
580
|
+
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-grid-gap, var(--sp-3)); }
|
|
581
|
+
.card-grid > .card--wide { grid-column: 1 / -1; }
|
|
582
|
+
.card-grid > .card:has(> .card-art) { --card-pad: var(--card-grid-pad, var(--sp-4)); } /* half a phone wide: the padding of a small card */
|
|
583
|
+
|
|
584
|
+
/* ---- card art: a card's last row — a small control at the start, a cut-out picture in the bottom-right corner, out to the card's edge ----
|
|
585
|
+
<div class="card-art"><span class="card-art__start"><button class="icon-btn icon-btn--sm">…</button></span>
|
|
586
|
+
<span class="card-art__pic"><span class="card-art__img"><img alt=""></span><span class="badge card-art__count">2</span></span></div>
|
|
587
|
+
The card's rows spread: the words stay at the top, this row sits at the foot whatever the card's height (the taller card of a grid row). */
|
|
588
|
+
.card:has(> .card-art) { align-content: space-between; }
|
|
589
|
+
.card-art {
|
|
590
|
+
display: flex;
|
|
591
|
+
align-items: end;
|
|
592
|
+
justify-content: space-between;
|
|
593
|
+
gap: var(--sp-2);
|
|
594
|
+
margin: 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0; /* the picture runs to the card's right and bottom edges */
|
|
595
|
+
}
|
|
596
|
+
.card-art__start { display: flex; gap: var(--sp-2); padding-block-end: var(--card-pad); }
|
|
597
|
+
.card-art__pic { position: relative; flex: none; display: grid; width: var(--card-art-size, var(--avatar-xl)); aspect-ratio: 3 / 4; }
|
|
598
|
+
.card-art__img { display: grid; min-width: 0; min-height: 0; padding: 0 var(--sp-2) var(--sp-2) 0; }
|
|
599
|
+
.card-art__img > :is(img, svg, .ph) { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: bottom right; }
|
|
600
|
+
.card-art__count { position: absolute; inset-inline-start: 0; inset-block-end: var(--sp-3); translate: -30% 0; }
|
package/css/media.css
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
gap: var(--tile-grid-gap, var(--sp-3));
|
|
26
26
|
}
|
|
27
27
|
.tile-grid--3 { --tile-min: calc(var(--tap-base) * 2); } /* three across on a phone (attachments, upload kinds) */
|
|
28
|
+
/* four across on a phone: small square actions — the icon over a short label, centred (copy · share · draw · save on a sheet) */
|
|
29
|
+
.tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--tile-grid-gap, var(--sp-2)); }
|
|
30
|
+
.tile-grid--4 > .tile { aspect-ratio: 1; min-height: var(--tap); align-content: center; justify-items: center; gap: var(--tile-sm-gap, var(--sp-1)); padding: var(--tile-sm-pad, var(--sp-2)); text-align: center; }
|
|
31
|
+
.tile-grid--4 .tile__label { font: var(--tile-sm-label-font, var(--type-caption)); }
|
|
28
32
|
.tile {
|
|
29
33
|
display: grid;
|
|
30
34
|
align-content: space-between;
|
package/css/sticky.css
CHANGED
|
@@ -52,6 +52,26 @@
|
|
|
52
52
|
filter: blur(var(--sticky-shadow-blur, var(--sp-0)));
|
|
53
53
|
}
|
|
54
54
|
.sticky--flat::before, .sticky--flat::after { background: var(--_ink); }
|
|
55
|
+
/* --cut: a die-cut sticker note — a band of plain paper left all round the print (--sticky-cut-size), small round corners (--sticky-radius,
|
|
56
|
+
the small card's corner), a soft lifted shadow; no fold (a sticker says nothing of read or unread). STRAIGHT (Lh 2026-10-27: the sample's turn
|
|
57
|
+
is not taken); `tilt` still turns it. THE BAND IS INSIDE THE BOX (Lh 2026-10-27): the note GROWS by the band on every side, the toned paper
|
|
58
|
+
inside stays --sticky-size square with its own padding, so the writing room (and the --small switch, which measures the words in it) is a
|
|
59
|
+
plain note's. Nothing spills: a holder spaces for it as for any note. The band is ::after laid over the whole box, under the paper; the outer
|
|
60
|
+
box's own tone stops at its content box (background-clip, above), so the band shows round the paper. */
|
|
61
|
+
.sticky--cut {
|
|
62
|
+
padding: var(--sticky-cut-size, var(--sp-1)); /* the knob, read by a real property first; --_cut hands it to the width and the corner */
|
|
63
|
+
--_cut: var(--sticky-cut-size, var(--sp-1));
|
|
64
|
+
width: calc(var(--sticky-size, calc(var(--sp-12) * 3.5)) + 2 * var(--_cut));
|
|
65
|
+
border-radius: calc(var(--sticky-radius, var(--r-card-row)) + var(--_cut));
|
|
66
|
+
}
|
|
67
|
+
.sticky--cut::before { content: none; }
|
|
68
|
+
.sticky--cut::after {
|
|
69
|
+
inset: 0;
|
|
70
|
+
border-radius: inherit; /* the paper's corner + the band: concentric */
|
|
71
|
+
background: var(--sticky-cut-bg, var(--stamp-paper));
|
|
72
|
+
box-shadow: var(--shadow-card), var(--shadow-contact);
|
|
73
|
+
}
|
|
74
|
+
.sticky--cut > .sticky__paper { margin: 0; border-radius: var(--sticky-radius, var(--r-card-row)); }
|
|
55
75
|
/* the tones — the names in src/sticky/tones.ts. A swatch of the chooser wears the same class. */
|
|
56
76
|
.sticky--cotton { background-color: var(--sticky-cotton-bg, var(--pastel-cotton)); }
|
|
57
77
|
.sticky--blush { background-color: var(--sticky-blush-bg, var(--pastel-blush)); }
|
package/dist/actions/Chip.d.ts
CHANGED
|
@@ -337,3 +337,34 @@ export interface ChipGridProps extends ComponentProps<'div'> {
|
|
|
337
337
|
}
|
|
338
338
|
/** ChipGrid — equal-width ChipPicks in a grid (time slots, skills). */
|
|
339
339
|
export declare function ChipGrid({ className, ...rest }: ChipGridProps): import("react").JSX.Element;
|
|
340
|
+
/** one choice of a ChipChoice */
|
|
341
|
+
export interface ChipChoiceOption {
|
|
342
|
+
/** what the choice reports when picked — unique in its ChipChoice */
|
|
343
|
+
value: string;
|
|
344
|
+
/** the chip's words */
|
|
345
|
+
label: ReactNode;
|
|
346
|
+
/** what leads the words inside the chip: a small `Avatar` (a person), an `Icon` */
|
|
347
|
+
lead?: ReactNode;
|
|
348
|
+
}
|
|
349
|
+
export interface ChipChoiceProps extends Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange'> {
|
|
350
|
+
/** the choices, in order */
|
|
351
|
+
options: readonly ChipChoiceOption[];
|
|
352
|
+
/** pick many (checkboxes); without it the choice is ONE (radios) and the value holds at most one */
|
|
353
|
+
many?: boolean;
|
|
354
|
+
/** CONTROLLED: the picked values (one at most without `many`) — with `onValueChange`. The app owns it */
|
|
355
|
+
value?: readonly string[];
|
|
356
|
+
/** UNCONTROLLED: picked on arrival (default none); the choice then keeps its own */
|
|
357
|
+
defaultValue?: readonly string[];
|
|
358
|
+
/** the member picked (or, with `many`, dropped) a chip: the whole new list of picked values */
|
|
359
|
+
onValueChange?: (value: string[]) => void;
|
|
360
|
+
/** the group's accessible name (it has no visible label of its own: the heading above it is the app's) */
|
|
361
|
+
label: string;
|
|
362
|
+
/** a control standing FIRST in the row, before the chips — the "+" that adds a choice (`<IconBtn sm icon="plus" …>`); what it does is the app's */
|
|
363
|
+
add?: ReactNode;
|
|
364
|
+
/** a wrapping row instead of the one-line strip that runs to its holder's edges and scrolls sideways (the default) */
|
|
365
|
+
wrap?: boolean;
|
|
366
|
+
}
|
|
367
|
+
/** ChipChoice — a row of ChipPicks that is ONE choice, controlled as a whole (`value` + `onValueChange`, or `defaultValue`): pick one, or `many`.
|
|
368
|
+
* A chip may lead with a small Avatar (people) or an Icon; `add` stands a "+" first. A one-line strip to the holder's edges by default (`wrap` wraps).
|
|
369
|
+
* On a sheet, never in a Card: the sheet is the paper the member fills in. */
|
|
370
|
+
export declare function ChipChoice({ options, many, value, defaultValue, onValueChange, label, add, wrap, className, ...rest }: ChipChoiceProps): import("react").JSX.Element;
|
package/dist/actions/Chip.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createElement } from 'react';
|
|
2
|
+
import { createElement, useId } from 'react';
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { tagged } from '../pressable.js';
|
|
5
|
+
import { useControlled } from '../state.js';
|
|
5
6
|
import { Dot } from './Dot.js';
|
|
6
7
|
/** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only, `xs` the smallest (a count in a status row); `soft` for a status that should be seen, `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
|
|
7
8
|
export function Chip({ on, soft, muted, dot, sm, xs, as, href, className, children, ...rest }) {
|
|
@@ -21,3 +22,12 @@ export function ChipRow({ bleed, lead, className, children, ...rest }) {
|
|
|
21
22
|
export function ChipGrid({ className, ...rest }) {
|
|
22
23
|
return _jsx("div", { className: cx('chip-grid', className), ...rest });
|
|
23
24
|
}
|
|
25
|
+
/** ChipChoice — a row of ChipPicks that is ONE choice, controlled as a whole (`value` + `onValueChange`, or `defaultValue`): pick one, or `many`.
|
|
26
|
+
* A chip may lead with a small Avatar (people) or an Icon; `add` stands a "+" first. A one-line strip to the holder's edges by default (`wrap` wraps).
|
|
27
|
+
* On a sheet, never in a Card: the sheet is the paper the member fills in. */
|
|
28
|
+
export function ChipChoice({ options, many, value, defaultValue, onValueChange, label, add, wrap, className, ...rest }) {
|
|
29
|
+
const name = useId();
|
|
30
|
+
const [shown, request] = useControlled(value, defaultValue ?? [], onValueChange);
|
|
31
|
+
const toggle = (v) => request(many ? (shown.includes(v) ? shown.filter((x) => x !== v) : [...shown, v]) : [v]);
|
|
32
|
+
return (_jsxs("div", { className: cx('chip-row', !wrap && 'bleed', className), role: "group", "aria-label": label, ...rest, children: [add, options.map((o) => (_jsxs(ChipPick, { type: many ? 'checkbox' : 'radio', name: name, value: o.value, checked: shown.includes(o.value), onChange: () => toggle(o.value), children: [o.lead != null && _jsx("span", { className: "chip__lead", "aria-hidden": "true", children: o.lead }), o.label] }, o.value)))] }));
|
|
33
|
+
}
|
package/dist/cardds.css
CHANGED
|
@@ -1548,6 +1548,30 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
1548
1548
|
overscroll-behavior: contain;
|
|
1549
1549
|
}
|
|
1550
1550
|
|
|
1551
|
+
/* ---- card grid: cards two across, each its own boundary; a --wide card takes the whole row ----
|
|
1552
|
+
<div class="card-grid"><article class="card">…</article><article class="card">…</article><article class="card card--wide">…</article></div> */
|
|
1553
|
+
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-grid-gap, var(--sp-3)); }
|
|
1554
|
+
.card-grid > .card--wide { grid-column: 1 / -1; }
|
|
1555
|
+
.card-grid > .card:has(> .card-art) { --card-pad: var(--card-grid-pad, var(--sp-4)); } /* half a phone wide: the padding of a small card */
|
|
1556
|
+
|
|
1557
|
+
/* ---- card art: a card's last row — a small control at the start, a cut-out picture in the bottom-right corner, out to the card's edge ----
|
|
1558
|
+
<div class="card-art"><span class="card-art__start"><button class="icon-btn icon-btn--sm">…</button></span>
|
|
1559
|
+
<span class="card-art__pic"><span class="card-art__img"><img alt=""></span><span class="badge card-art__count">2</span></span></div>
|
|
1560
|
+
The card's rows spread: the words stay at the top, this row sits at the foot whatever the card's height (the taller card of a grid row). */
|
|
1561
|
+
.card:has(> .card-art) { align-content: space-between; }
|
|
1562
|
+
.card-art {
|
|
1563
|
+
display: flex;
|
|
1564
|
+
align-items: end;
|
|
1565
|
+
justify-content: space-between;
|
|
1566
|
+
gap: var(--sp-2);
|
|
1567
|
+
margin: 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0; /* the picture runs to the card's right and bottom edges */
|
|
1568
|
+
}
|
|
1569
|
+
.card-art__start { display: flex; gap: var(--sp-2); padding-block-end: var(--card-pad); }
|
|
1570
|
+
.card-art__pic { position: relative; flex: none; display: grid; width: var(--card-art-size, var(--avatar-xl)); aspect-ratio: 3 / 4; }
|
|
1571
|
+
.card-art__img { display: grid; min-width: 0; min-height: 0; padding: 0 var(--sp-2) var(--sp-2) 0; }
|
|
1572
|
+
.card-art__img > :is(img, svg, .ph) { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: bottom right; }
|
|
1573
|
+
.card-art__count { position: absolute; inset-inline-start: 0; inset-block-end: var(--sp-3); translate: -30% 0; }
|
|
1574
|
+
|
|
1551
1575
|
/* ---- css/stack.css — sheet stack: .sheet-stack — the menu, sheets stacked, heads peek, tap opens ---- */
|
|
1552
1576
|
/* ============================================================
|
|
1553
1577
|
cardds/stack.css — .sheet-stack: the menu.
|
|
@@ -3019,6 +3043,11 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3019
3043
|
/* the words that lead the chips (ChipRow `lead`, "นัดที่" before a place, Lh 2026-10-21): the chips' own type and size, at the middle of their height */
|
|
3020
3044
|
.chip-row__lead { align-self: center; font: var(--type-label); font-size: var(--chip-font-size, var(--fs-sm)); color: var(--chip-row-lead-ink, inherit); }
|
|
3021
3045
|
.chip-row:not(.bleed) { flex-wrap: wrap; } /* a strip (.bleed, card.css) stays one line */
|
|
3046
|
+
.chip-row > .icon-btn { flex: none; align-self: center; } /* a ChipChoice's `add`: the "+" first in the row, at the chips' middle */
|
|
3047
|
+
/* a person in a chip (a ChipChoice of people): a small round face leads the name, inside the chip's height, the chip's start padding taken back */
|
|
3048
|
+
/* the lead is a picture of the name beside it: unseen by a screen reader, laid out as the chip's own child */
|
|
3049
|
+
.chip__lead { display: contents; }
|
|
3050
|
+
.chip__lead > .avatar { --_size: var(--chip-avatar-size, var(--sp-6)); margin-inline-start: calc(-1 * var(--sp-2)); font-size: calc(var(--_size) * 0.4); }
|
|
3022
3051
|
.chip-row.bleed > .chip { flex: none; white-space: nowrap; } /* a chip of the strip keeps its words on one line at its own width: the strip scrolls, a chip never shrinks to fit it */
|
|
3023
3052
|
|
|
3024
3053
|
/* ---- dropdown: the standard for every select — a pill trigger + .menu popover ----
|
|
@@ -4874,6 +4903,26 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4874
4903
|
filter: blur(var(--sticky-shadow-blur, var(--sp-0)));
|
|
4875
4904
|
}
|
|
4876
4905
|
.sticky--flat::before, .sticky--flat::after { background: var(--_ink); }
|
|
4906
|
+
/* --cut: a die-cut sticker note — a band of plain paper left all round the print (--sticky-cut-size), small round corners (--sticky-radius,
|
|
4907
|
+
the small card's corner), a soft lifted shadow; no fold (a sticker says nothing of read or unread). STRAIGHT (Lh 2026-10-27: the sample's turn
|
|
4908
|
+
is not taken); `tilt` still turns it. THE BAND IS INSIDE THE BOX (Lh 2026-10-27): the note GROWS by the band on every side, the toned paper
|
|
4909
|
+
inside stays --sticky-size square with its own padding, so the writing room (and the --small switch, which measures the words in it) is a
|
|
4910
|
+
plain note's. Nothing spills: a holder spaces for it as for any note. The band is ::after laid over the whole box, under the paper; the outer
|
|
4911
|
+
box's own tone stops at its content box (background-clip, above), so the band shows round the paper. */
|
|
4912
|
+
.sticky--cut {
|
|
4913
|
+
padding: var(--sticky-cut-size, var(--sp-1)); /* the knob, read by a real property first; --_cut hands it to the width and the corner */
|
|
4914
|
+
--_cut: var(--sticky-cut-size, var(--sp-1));
|
|
4915
|
+
width: calc(var(--sticky-size, calc(var(--sp-12) * 3.5)) + 2 * var(--_cut));
|
|
4916
|
+
border-radius: calc(var(--sticky-radius, var(--r-card-row)) + var(--_cut));
|
|
4917
|
+
}
|
|
4918
|
+
.sticky--cut::before { content: none; }
|
|
4919
|
+
.sticky--cut::after {
|
|
4920
|
+
inset: 0;
|
|
4921
|
+
border-radius: inherit; /* the paper's corner + the band: concentric */
|
|
4922
|
+
background: var(--sticky-cut-bg, var(--stamp-paper));
|
|
4923
|
+
box-shadow: var(--shadow-card), var(--shadow-contact);
|
|
4924
|
+
}
|
|
4925
|
+
.sticky--cut > .sticky__paper { margin: 0; border-radius: var(--sticky-radius, var(--r-card-row)); }
|
|
4877
4926
|
/* the tones — the names in src/sticky/tones.ts. A swatch of the chooser wears the same class. */
|
|
4878
4927
|
.sticky--cotton { background-color: var(--sticky-cotton-bg, var(--pastel-cotton)); }
|
|
4879
4928
|
.sticky--blush { background-color: var(--sticky-blush-bg, var(--pastel-blush)); }
|
|
@@ -5943,6 +5992,10 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
5943
5992
|
gap: var(--tile-grid-gap, var(--sp-3));
|
|
5944
5993
|
}
|
|
5945
5994
|
.tile-grid--3 { --tile-min: calc(var(--tap-base) * 2); } /* three across on a phone (attachments, upload kinds) */
|
|
5995
|
+
/* four across on a phone: small square actions — the icon over a short label, centred (copy · share · draw · save on a sheet) */
|
|
5996
|
+
.tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--tile-grid-gap, var(--sp-2)); }
|
|
5997
|
+
.tile-grid--4 > .tile { aspect-ratio: 1; min-height: var(--tap); align-content: center; justify-items: center; gap: var(--tile-sm-gap, var(--sp-1)); padding: var(--tile-sm-pad, var(--sp-2)); text-align: center; }
|
|
5998
|
+
.tile-grid--4 .tile__label { font: var(--tile-sm-label-font, var(--type-caption)); }
|
|
5946
5999
|
.tile {
|
|
5947
6000
|
display: grid;
|
|
5948
6001
|
align-content: space-between;
|
package/dist/cards/Card.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface CardProps extends ComponentProps<'article'> {
|
|
|
23
23
|
fold?: boolean;
|
|
24
24
|
/** one card at the human centre of a `Screen fill` (the introduction screens) */
|
|
25
25
|
centre?: boolean;
|
|
26
|
+
/** in a `CardGrid`: the card takes the grid's whole row, both columns (a card of rows among half-width cards) */
|
|
27
|
+
wide?: boolean;
|
|
26
28
|
/** a data band: label · giant number · footnote — see NumberBand */
|
|
27
29
|
band?: boolean;
|
|
28
30
|
/** the element: article (default), a when it links, label when it wraps an input, div/section */
|
|
@@ -78,7 +80,7 @@ export interface CardProps extends ComponentProps<'article'> {
|
|
|
78
80
|
* 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
|
|
79
81
|
* 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.
|
|
80
82
|
*/
|
|
81
|
-
export declare function Card({ tone, paper, sm, row, cover, fold, centre, 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<{
|
|
83
|
+
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<{
|
|
82
84
|
onClick: (e: MouseEvent<HTMLElement>) => void;
|
|
83
85
|
inert?: boolean | undefined;
|
|
84
86
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
package/dist/cards/Card.js
CHANGED
|
@@ -19,7 +19,7 @@ import { StackHeadCtx, StackPullCtx, ownHead, stackPaint, useStackCard } from '.
|
|
|
19
19
|
* 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
20
|
* 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
21
|
*/
|
|
22
|
-
export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'article', stack, leave, onLeft, onRemove, removeLabel, back, backFull, face, defaultFace = 'front', onFaceChange, toBackLabel, toFrontLabel, startInView, className, style, children, onClick, ref, ...rest }) {
|
|
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
23
|
if (onRemove && !row)
|
|
24
24
|
warnOnce('card-remove-row', 'cardds Card: `onRemove` draws its cross on a `row` card only');
|
|
25
25
|
if (back != null && (row || sm || stack))
|
|
@@ -114,7 +114,7 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'ar
|
|
|
114
114
|
const props = {
|
|
115
115
|
...rest,
|
|
116
116
|
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', band && 'card--band', go && 'card--go', leaver && 'card--leaver', away && 'card--away', painted.className, className),
|
|
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),
|
|
118
118
|
style: painted.style || style ? { ...painted.style, ...style } : undefined,
|
|
119
119
|
...(stack ? { 'aria-busy': painted.busy } : {}),
|
|
120
120
|
...(away ? { inert: true } : {}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
2
|
export interface CardMediaProps extends ComponentProps<'div'> {
|
|
3
3
|
}
|
|
4
4
|
/** CardMedia — rounded media inside a card (a Placeholder or img); a corner JourneyBadge pins to it: the badge on the corner of a picture is the paper,
|
|
@@ -19,3 +19,19 @@ export interface IconRowProps extends ComponentProps<'span'> {
|
|
|
19
19
|
}
|
|
20
20
|
/** IconRow — a trailing cluster of Icons in a card or stack head. */
|
|
21
21
|
export declare function IconRow({ className, ...rest }: IconRowProps): import("react").JSX.Element;
|
|
22
|
+
export interface CardGridProps extends ComponentProps<'div'> {
|
|
23
|
+
}
|
|
24
|
+
/** CardGrid — cards two across, each its own boundary: things to glance at side by side (items of a list, notes); a `Card wide` takes the whole row.
|
|
25
|
+
* The two cards of a row stand as tall as each other. On the base or in a sheet's body; never inside a card (`card-in-card`). */
|
|
26
|
+
export declare function CardGrid({ className, ...rest }: CardGridProps): import("react").JSX.Element;
|
|
27
|
+
export interface CardArtProps extends ComponentProps<'div'> {
|
|
28
|
+
/** the picture: a cut-out (a product shot, a drawing) as an `img` or a `Placeholder` — it stands in the card's bottom-right corner, out to the card's edge */
|
|
29
|
+
art: ReactNode;
|
|
30
|
+
/** a count on the picture's bottom-left corner (how many) — a `Badge` is drawn for it */
|
|
31
|
+
count?: ReactNode;
|
|
32
|
+
/** the picture's accessible name when it says something the words do not; leave it out for a picture that only shows the title */
|
|
33
|
+
label?: string;
|
|
34
|
+
}
|
|
35
|
+
/** CardArt — a card's LAST row: a cut-out picture standing in its bottom-right corner, running past the card's padding to its edge, and a small
|
|
36
|
+
* control at the row's start (the children: an `IconBtn sm`, "got it"). The card's words stay at its top, the row at its foot. Knob `--card-art-size`. */
|
|
37
|
+
export declare function CardArt({ art, count, label, className, children, ...rest }: CardArtProps): import("react").JSX.Element;
|
package/dist/cards/CardParts.js
CHANGED
|
@@ -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 { useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
/** CardMedia — rounded media inside a card (a Placeholder or img); a corner JourneyBadge pins to it: the badge on the corner of a picture is the paper,
|
|
@@ -52,3 +52,13 @@ export function CardList({ show, className, style, ref, ...rest }) {
|
|
|
52
52
|
export function IconRow({ className, ...rest }) {
|
|
53
53
|
return _jsx("span", { className: cx('icon-row', className), ...rest });
|
|
54
54
|
}
|
|
55
|
+
/** CardGrid — cards two across, each its own boundary: things to glance at side by side (items of a list, notes); a `Card wide` takes the whole row.
|
|
56
|
+
* The two cards of a row stand as tall as each other. On the base or in a sheet's body; never inside a card (`card-in-card`). */
|
|
57
|
+
export function CardGrid({ className, ...rest }) {
|
|
58
|
+
return _jsx("div", { className: cx('card-grid', className), ...rest });
|
|
59
|
+
}
|
|
60
|
+
/** CardArt — a card's LAST row: a cut-out picture standing in its bottom-right corner, running past the card's padding to its edge, and a small
|
|
61
|
+
* control at the row's start (the children: an `IconBtn sm`, "got it"). The card's words stay at its top, the row at its foot. Knob `--card-art-size`. */
|
|
62
|
+
export function CardArt({ art, count, label, className, children, ...rest }) {
|
|
63
|
+
return (_jsxs("div", { className: cx('card-art', className), ...rest, children: [_jsx("span", { className: "card-art__start", children: children }), _jsxs("span", { className: "card-art__pic", children: [_jsx("span", { className: "card-art__img", role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, children: art }), count != null && _jsx("span", { className: "badge card-art__count", children: count })] })] }));
|
|
64
|
+
}
|