@usableapp/cardds 0.7.110 → 0.7.112
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 +22 -0
- package/css/actions.css +4 -1
- package/css/base.css +1 -1
- package/css/journey.css +6 -2
- package/css/parts.css +7 -1
- package/dist/actions/BtnRow.d.ts +5 -2
- package/dist/actions/BtnRow.js +3 -3
- package/dist/cardds.css +18 -5
- package/dist/catalog.json +1 -1
- package/dist/journey/JourneyBadge.d.ts +1 -1
- package/dist/journey/JourneyBadge.js +3 -2
- package/dist/type/Text.d.ts +2 -1
- package/docs/reference.md +2 -1
- package/lib/catalog.mjs +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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.112 — 2026-10-24
|
|
6
|
+
|
|
7
|
+
A `Text scroll` box can keep one height whatever it holds, and a card's content can hold a group of round buttons so its `Foot` stays the status line (timebank, 2026-10-24: the request card's reason and the helper's answers). A stamp in a head that leads with a date no longer lies over the date.
|
|
8
|
+
|
|
9
|
+
Components: all
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`--text-scroll-size`: a `Text scroll` box of one height.** Before → after: `<Text level="body" scroll>` was at most `--text-scroll-lines` lines tall (a `max-height`), so a short text made a short box and the cards of one list stood at different heights → set the knob to a length (`--text-scroll-size: 11.55rem`) and the box is ALWAYS that tall: a short text keeps the room, a long one scrolls in it. Unset, nothing changes. The length is the theme's; no division of lengths is needed. Story `Card/ReasonFixedHeight`.
|
|
13
|
+
- **`BtnRow round`: round buttons as one group in a card's content.** Before → after: the group of big round `IconBtn`s, centred a fixed gap apart, was only `Foot round`, and a card has one foot, so the round answers and a status line could not both stand on it → `<BtnRow round><IconBtn size="xl" primary …/><IconBtn size="xl" …/></BtnRow>` in the card's content draws the same group (gap `--sp-6`), and the card's `<Foot>` stays its status line (a small stamp, the words, an `IconBtn` at its end). Knob `--btn-row-gap` sets the gap of a BtnRow (default `--sp-2`, `--sp-6` when round). A BtnRow without `round` is unchanged. Story `Btn/BtnRowRound`.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **A stamp in a head that leads with a date no longer lies over the date.** Before → after: `<Head><JourneyBadge stretch …/><ChipRow>…</ChipRow><Stamp …/>…</Head>` pinned the stamp to the first row across two rows (the place a stamp takes in a head of words alone, stamp.css), so it lay over the date badge → in a head that leads with a date, every child after the chips stands on a row of its own under them, in the order given, the stamp too. A head of words with a stamp, and a date-led head with no stamp, are unchanged. Nothing to change in a consumer. Story `Card/DateSpanStamp` (new).
|
|
17
|
+
|
|
18
|
+
## 0.7.111 — 2026-10-23
|
|
19
|
+
|
|
20
|
+
`StampOn under` shows on a `Card paper="bands"` (timebank, 2026-10-23: the asker's stamp lay under the head's paper band and could not be seen).
|
|
21
|
+
|
|
22
|
+
Components: CallSheet, Card, CardFeed, FeedCard, Head, Home, NumberBand, NumberBandStack, Sheet, SheetStack, StackSheet, StampOn, Walkthrough
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **The under stamp is seen over a bands card's head paper.** Before → after: on `<Card paper="bands">` the head's paper background painted over the stamp lying at `--z-under`, so a `StampOn under` there was hidden whole → when the card holds an under stamp, the head's paper is drawn by the head's `::before` one step lower (`--z-under-2`): the stamp shows over the band, the head's badge, chips and words stay over the stamp. A card with no under stamp, and a card with no bands, is unchanged. Nothing to change in a consumer. Story `Card/StampUnderHeadBands` (new); test `StampOn under on a bands card: the stamp is seen over the head paper` (tests/stamp-under.spec.js).
|
|
26
|
+
|
|
5
27
|
## 0.7.110 — 2026-10-23
|
|
6
28
|
|
|
7
29
|
A `SheetStage` whose sheet is away gives its hero the whole stage, a card in a hero is never cut short, and on a dim stage the hero is not dimmed (timebank, 2026-10-22: the request card the neighbours get, shown on the stage after the last step). A `StampOn` can lie under a card's words, a body `Text` can scroll its long rest inside itself, and a round play `IconBtn` stands at a card head's end (timebank, 2026-10-23: the ask by a range of days and hours, by text or by voice).
|
package/css/actions.css
CHANGED
|
@@ -161,7 +161,10 @@
|
|
|
161
161
|
and a pager whose "previous" disappeared on page one would shift the bar
|
|
162
162
|
under the thumb on every page */
|
|
163
163
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
164
|
-
.btn-row { display: flex; gap: var(--sp-2); }
|
|
164
|
+
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
165
|
+
/* round (BtnRow round, Lh 2026-10-24): a few round IconBtns as one group in the middle of a card's content, a fixed gap apart — Foot round's look,
|
|
166
|
+
so a card's foot stays its status line */
|
|
167
|
+
.btn-row--round { justify-content: center; align-items: center; gap: var(--btn-row-gap, var(--sp-6)); }
|
|
165
168
|
.btn-row > .btn { flex: 1; min-width: 0; }
|
|
166
169
|
|
|
167
170
|
/* ---- chip: status/attribute tag, optional signal dot ---- */
|
package/css/base.css
CHANGED
|
@@ -138,7 +138,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
138
138
|
.t-h2 { font: var(--type-h2); letter-spacing: var(--track-h2); margin: 0; --fs-self: var(--fs-h2); }
|
|
139
139
|
.t-title { font: var(--type-title); margin: 0; --fs-self: var(--fs-title); }
|
|
140
140
|
.t-body { font: var(--type-body); margin: 0; }
|
|
141
|
-
.t-scroll { max
|
|
141
|
+
.t-scroll { --_t-scroll-max: calc(var(--text-scroll-lines, 3) * 1lh); height: var(--text-scroll-size, auto); max-height: var(--text-scroll-size, var(--_t-scroll-max)); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
|
|
142
142
|
.t-label { font: var(--type-label); }
|
|
143
143
|
.t-caption { font: var(--type-caption); color: var(--t-caption-ink, inherit); }
|
|
144
144
|
.t-stat { font: var(--type-stat); letter-spacing: var(--track-display); margin: 0; font-variant-numeric: tabular-nums; }
|
package/css/journey.css
CHANGED
|
@@ -56,16 +56,20 @@
|
|
|
56
56
|
.tile-badge--stretch {
|
|
57
57
|
line-height: var(--tile-badge-line, var(--lh-badge)); /* the knob's own property; the cap below reads it too */
|
|
58
58
|
align-self: stretch;
|
|
59
|
+
min-block-size: calc((var(--fs-caption) + var(--fs-lg)) * var(--tile-badge-line, var(--lh-badge)) + 2 * var(--sp-3)); /* size containment hides the lines from the box, so it asks for the shortest form's height itself: a head whose chips are shorter (one chip) no longer leaves the lines hanging out of the fill */
|
|
59
60
|
max-block-size: calc((2 * var(--fs-caption) + var(--fs-lg)) * var(--tile-badge-line, var(--lh-badge)) + 2 * var(--sp-3));
|
|
60
61
|
container-type: size;
|
|
61
|
-
|
|
62
|
+
/* size containment hides the words' width from the box, so the component passes their count (--_badge-chars: the value, plus half of the sub that stands beside it)
|
|
63
|
+
and the box is the wider of a two-digit date and that many digits; the app's knob still wins */
|
|
64
|
+
--_stretch-w: max(calc(var(--fs-lg) * 3.25), calc(var(--fs-lg) * var(--_badge-chars, 0) * 0.55 + 2 * var(--sp-3)));
|
|
65
|
+
inline-size: var(--tile-badge-stretch-w, var(--_stretch-w));
|
|
62
66
|
grid-template-columns: auto auto;
|
|
63
67
|
align-content: center;
|
|
64
68
|
justify-content: center;
|
|
65
69
|
align-items: baseline;
|
|
66
70
|
column-gap: var(--sp-1);
|
|
67
71
|
row-gap: 0;
|
|
68
|
-
padding
|
|
72
|
+
padding: var(--sp-3); /* the same room on all four sides; the box's min height and width count it */
|
|
69
73
|
}
|
|
70
74
|
.tile-badge--stretch > * { line-height: inherit; white-space: nowrap; } /* a value never breaks at its dash */
|
|
71
75
|
.tile-badge--stretch > :first-child { grid-column: 1 / -1; }
|
package/css/parts.css
CHANGED
|
@@ -121,6 +121,8 @@
|
|
|
121
121
|
/* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
|
|
122
122
|
ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
|
|
123
123
|
width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
|
|
124
|
+
Everything after the chips stands on rows of its own under them, in the order given: a Stamp here too, which in a head of words alone is
|
|
125
|
+
pinned at the right beside both lines (stamp.css) and so lay over the date (Lh 2026-10-23).
|
|
124
126
|
<div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
|
|
125
127
|
.head:has(> .tile-badge:first-child + .chip-row) {
|
|
126
128
|
display: grid;
|
|
@@ -128,7 +130,7 @@
|
|
|
128
130
|
align-items: center;
|
|
129
131
|
row-gap: var(--head-lead-gap, var(--sp-3));
|
|
130
132
|
}
|
|
131
|
-
.head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; }
|
|
133
|
+
.head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
|
|
132
134
|
|
|
133
135
|
/* in a card with paper bands: the head and the foot are paper bands edge to edge, one look */
|
|
134
136
|
:is(.card--bands, .card--bands > .card__face) > :is(.head, .foot) {
|
|
@@ -144,6 +146,10 @@
|
|
|
144
146
|
/* the seam: the heading and the words under it read as ONE paragraph that changes colour at the band's edge (Lh 2026-10-21), so the room on
|
|
145
147
|
each side of the head band's lower edge is --card-band-seam, not the card's padding and gap */
|
|
146
148
|
:is(.card--bands, .card--bands > .card__face) > .head + * { margin-block-start: calc(var(--card-band-seam, var(--sp-2)) - var(--card-gap)); }
|
|
149
|
+
/* an under stamp (`StampOn under`) lies at --z-under, below the words but above the card's paper; the head's paper background would paint over it, so the band moves
|
|
150
|
+
onto a pseudo-element one step lower (--z-under-2): the stamp shows on the band and the head's words stay over the stamp */
|
|
151
|
+
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { position: relative; background: none; }
|
|
152
|
+
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head::before { content: ""; position: absolute; inset: 0; z-index: var(--z-under-2); background: var(--card-bg); }
|
|
147
153
|
|
|
148
154
|
/* in a sheet stack */
|
|
149
155
|
/* stack headers: uniform — [back?] title left, icons right, one height,
|
package/dist/actions/BtnRow.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
export interface BtnRowProps extends ComponentProps<'div'> {
|
|
3
|
+
/** a few big round `IconBtn`s (`size="xl"`), each its own size, as ONE group in the middle a fixed gap apart — the look of `Foot round`, in a card's
|
|
4
|
+
* content, so the card's `Foot` stays free for its status line. Knob `--btn-row-gap` (default `--sp-6` here, `--sp-2` for Btns) */
|
|
5
|
+
round?: boolean;
|
|
3
6
|
}
|
|
4
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use Foot instead. */
|
|
5
|
-
export declare function BtnRow({ className, ...rest }: BtnRowProps): import("react").JSX.Element;
|
|
7
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round IconBtns there. In a foot use Foot instead. */
|
|
8
|
+
export declare function BtnRow({ round, className, ...rest }: BtnRowProps): import("react").JSX.Element;
|
package/dist/actions/BtnRow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use Foot instead. */
|
|
4
|
-
export function BtnRow({ className, ...rest }) {
|
|
5
|
-
return _jsx("div", { className: cx('btn-row', className), ...rest });
|
|
3
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round IconBtns there. In a foot use Foot instead. */
|
|
4
|
+
export function BtnRow({ round, className, ...rest }) {
|
|
5
|
+
return _jsx("div", { className: cx('btn-row', round && 'btn-row--round', className), ...rest });
|
|
6
6
|
}
|
package/dist/cardds.css
CHANGED
|
@@ -707,7 +707,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
707
707
|
.t-h2 { font: var(--type-h2); letter-spacing: var(--track-h2); margin: 0; --fs-self: var(--fs-h2); }
|
|
708
708
|
.t-title { font: var(--type-title); margin: 0; --fs-self: var(--fs-title); }
|
|
709
709
|
.t-body { font: var(--type-body); margin: 0; }
|
|
710
|
-
.t-scroll { max
|
|
710
|
+
.t-scroll { --_t-scroll-max: calc(var(--text-scroll-lines, 3) * 1lh); height: var(--text-scroll-size, auto); max-height: var(--text-scroll-size, var(--_t-scroll-max)); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
|
|
711
711
|
.t-label { font: var(--type-label); }
|
|
712
712
|
.t-caption { font: var(--type-caption); color: var(--t-caption-ink, inherit); }
|
|
713
713
|
.t-stat { font: var(--type-stat); letter-spacing: var(--track-display); margin: 0; font-variant-numeric: tabular-nums; }
|
|
@@ -2581,16 +2581,20 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2581
2581
|
.tile-badge--stretch {
|
|
2582
2582
|
line-height: var(--tile-badge-line, var(--lh-badge)); /* the knob's own property; the cap below reads it too */
|
|
2583
2583
|
align-self: stretch;
|
|
2584
|
+
min-block-size: calc((var(--fs-caption) + var(--fs-lg)) * var(--tile-badge-line, var(--lh-badge)) + 2 * var(--sp-3)); /* size containment hides the lines from the box, so it asks for the shortest form's height itself: a head whose chips are shorter (one chip) no longer leaves the lines hanging out of the fill */
|
|
2584
2585
|
max-block-size: calc((2 * var(--fs-caption) + var(--fs-lg)) * var(--tile-badge-line, var(--lh-badge)) + 2 * var(--sp-3));
|
|
2585
2586
|
container-type: size;
|
|
2586
|
-
|
|
2587
|
+
/* size containment hides the words' width from the box, so the component passes their count (--_badge-chars: the value, plus half of the sub that stands beside it)
|
|
2588
|
+
and the box is the wider of a two-digit date and that many digits; the app's knob still wins */
|
|
2589
|
+
--_stretch-w: max(calc(var(--fs-lg) * 3.25), calc(var(--fs-lg) * var(--_badge-chars, 0) * 0.55 + 2 * var(--sp-3)));
|
|
2590
|
+
inline-size: var(--tile-badge-stretch-w, var(--_stretch-w));
|
|
2587
2591
|
grid-template-columns: auto auto;
|
|
2588
2592
|
align-content: center;
|
|
2589
2593
|
justify-content: center;
|
|
2590
2594
|
align-items: baseline;
|
|
2591
2595
|
column-gap: var(--sp-1);
|
|
2592
2596
|
row-gap: 0;
|
|
2593
|
-
padding
|
|
2597
|
+
padding: var(--sp-3); /* the same room on all four sides; the box's min height and width count it */
|
|
2594
2598
|
}
|
|
2595
2599
|
.tile-badge--stretch > * { line-height: inherit; white-space: nowrap; } /* a value never breaks at its dash */
|
|
2596
2600
|
.tile-badge--stretch > :first-child { grid-column: 1 / -1; }
|
|
@@ -2781,7 +2785,10 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2781
2785
|
and a pager whose "previous" disappeared on page one would shift the bar
|
|
2782
2786
|
under the thumb on every page */
|
|
2783
2787
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
2784
|
-
.btn-row { display: flex; gap: var(--sp-2); }
|
|
2788
|
+
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
2789
|
+
/* round (BtnRow round, Lh 2026-10-24): a few round IconBtns as one group in the middle of a card's content, a fixed gap apart — Foot round's look,
|
|
2790
|
+
so a card's foot stays its status line */
|
|
2791
|
+
.btn-row--round { justify-content: center; align-items: center; gap: var(--btn-row-gap, var(--sp-6)); }
|
|
2785
2792
|
.btn-row > .btn { flex: 1; min-width: 0; }
|
|
2786
2793
|
|
|
2787
2794
|
/* ---- chip: status/attribute tag, optional signal dot ---- */
|
|
@@ -4216,6 +4223,8 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4216
4223
|
/* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
|
|
4217
4224
|
ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
|
|
4218
4225
|
width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
|
|
4226
|
+
Everything after the chips stands on rows of its own under them, in the order given: a Stamp here too, which in a head of words alone is
|
|
4227
|
+
pinned at the right beside both lines (stamp.css) and so lay over the date (Lh 2026-10-23).
|
|
4219
4228
|
<div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
|
|
4220
4229
|
.head:has(> .tile-badge:first-child + .chip-row) {
|
|
4221
4230
|
display: grid;
|
|
@@ -4223,7 +4232,7 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4223
4232
|
align-items: center;
|
|
4224
4233
|
row-gap: var(--head-lead-gap, var(--sp-3));
|
|
4225
4234
|
}
|
|
4226
|
-
.head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; }
|
|
4235
|
+
.head:has(> .tile-badge:first-child + .chip-row) > :nth-child(n + 3) { grid-column: 1 / -1; grid-row: auto; }
|
|
4227
4236
|
|
|
4228
4237
|
/* in a card with paper bands: the head and the foot are paper bands edge to edge, one look */
|
|
4229
4238
|
:is(.card--bands, .card--bands > .card__face) > :is(.head, .foot) {
|
|
@@ -4239,6 +4248,10 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4239
4248
|
/* the seam: the heading and the words under it read as ONE paragraph that changes colour at the band's edge (Lh 2026-10-21), so the room on
|
|
4240
4249
|
each side of the head band's lower edge is --card-band-seam, not the card's padding and gap */
|
|
4241
4250
|
:is(.card--bands, .card--bands > .card__face) > .head + * { margin-block-start: calc(var(--card-band-seam, var(--sp-2)) - var(--card-gap)); }
|
|
4251
|
+
/* an under stamp (`StampOn under`) lies at --z-under, below the words but above the card's paper; the head's paper background would paint over it, so the band moves
|
|
4252
|
+
onto a pseudo-element one step lower (--z-under-2): the stamp shows on the band and the head's words stay over the stamp */
|
|
4253
|
+
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { position: relative; background: none; }
|
|
4254
|
+
:is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head::before { content: ""; position: absolute; inset: 0; z-index: var(--z-under-2); background: var(--card-bg); }
|
|
4242
4255
|
|
|
4243
4256
|
/* in a sheet stack */
|
|
4244
4257
|
/* stack headers: uniform — [back?] title left, icons right, one height,
|