@usableapp/cardds 0.7.111 → 0.7.113

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 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.113 — 2026-10-24
6
+
7
+ A `Text scroll` box shows three lines and a half, at every text size (Lh 2026-10-24: at three whole lines nobody knew there was more).
8
+
9
+ Components: all
10
+
11
+ ### Changed
12
+ - **A `Text scroll` box shows three lines and a half.** Before → after: the box showed 3 whole lines (`--text-scroll-lines` default 3), so the member could not tell a fourth line was there → it shows 3.5 (default 3.5): the half line shows there is more to scroll. The box counts in the text's own lines, so at a bigger text size it grows and still shows 3.5 lines. For a box that is always that tall, short text too, set `--text-scroll-size: 3.5lh` (a length in the text's own lines, so it follows the text size); a theme that wants another count still sets `--text-scroll-lines`. Story `Card/ReasonFixedHeight` (now 3.5lh), `Card/ReasonScrolls`.
13
+
14
+ ## 0.7.112 — 2026-10-24
15
+
16
+ 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.
17
+
18
+ Components: all
19
+
20
+ ### Added
21
+ - **`--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`.
22
+ - **`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`.
23
+
24
+ ### Fixed
25
+ - **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).
26
+
5
27
  ## 0.7.111 — 2026-10-23
6
28
 
7
29
  `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).
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-height: calc(var(--text-scroll-lines, 3) * 1lh); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
141
+ .t-scroll { --_t-scroll-max: calc(var(--text-scroll-lines, 3.5) * 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
- inline-size: var(--tile-badge-stretch-w, calc(var(--fs-lg) * 3.25)); /* a run of days ("18–21") needs more: the app sets the knob on that badge */
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-block: var(--sp-3);
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) {
@@ -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;
@@ -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-height: calc(var(--text-scroll-lines, 3) * 1lh); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
710
+ .t-scroll { --_t-scroll-max: calc(var(--text-scroll-lines, 3.5) * 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
- inline-size: var(--tile-badge-stretch-w, calc(var(--fs-lg) * 3.25)); /* a run of days ("18–21") needs more: the app sets the knob on that badge */
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-block: var(--sp-3);
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) {