@usableapp/cardds 0.7.172 → 0.7.174

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,25 @@
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.174 — 2026-10-30
6
+
7
+ A foldable `Card`'s chevron stands on the middle of the whole head.
8
+
9
+ Components: Card
10
+
11
+ ### Changed
12
+ - **`Card fold` chevron** (Lh 2026-10-30): before, the chevron down was a head end like the others, so in a head of more than one line it stood on the title's first line, above the head's middle. After, it is centred on the vertical middle of the whole head, one line or many, with or without a circle around it; it turns up around the same centre while open. The other ends (pins, buttons) keep the title's first line. No new knob.
13
+
14
+ ## 0.7.173 — 2026-10-29
15
+
16
+ A round button's icon is 15% smaller, and a StackSheet's tabs stand further in from the edge with more room between them.
17
+
18
+ Components: all
19
+
20
+ ### Changed
21
+ - **Round `Btn` icon** (Lh 2026-10-29): before, the icon in a md or sm round was the Icon's own 28px (7/12 of `--tap-base`), and in lg / xl 7/12 of the circle. After, half: 24px in md and sm (`--tap-base` × 1/2), half the circle in lg and xl. `--icon-btn-icon` (now `1 / 2`) retunes every size; `7 / 12` is the old size. An `IconBtnGroup`'s buttons and a sheet's back chevron keep their own.
22
+ - **`StackSheet` tabs** (Lh 2026-10-29): before, the last tab reached `--sp-2` into the card's padding, and the sheet's round corner and the next sheet cut its icon; the tabs stood `--sp-2` apart. After, the row ends `--sp-2` short of the inset (new knob `--stack-sheet-tabs-end`; `calc(-1 * var(--sp-2))` is the old place) and the tabs stand `--sp-4` apart (`--stack-sheet-tabs-gap`).
23
+
5
24
  ## 0.7.172 — 2026-10-29
6
25
 
7
26
  `NumberBand` reads its type from the tokens: the label is a label, the number is the one number on a sheet.
package/css/actions.css CHANGED
@@ -89,13 +89,15 @@
89
89
  :is(.icon-btn--invert, .icon-btn--primary) { background: var(--icon-btn-invert-bg, var(--btn-primary-bg, var(--accent))); color: var(--icon-btn-invert-ink, var(--btn-primary-ink, var(--on-accent))); border-color: transparent; }
90
90
  .icon-btn--sm { width: var(--icon-btn-sm-size, var(--tap-sm)); height: var(--icon-btn-sm-size, var(--tap-sm)); font-size: var(--fs-title); }
91
91
  /* the bigger round sizes (`Btn shape="round" size`): lg is the hero control's size (--tap-lg), xl the biggest (--tap-xl), both on --tap-base like every size.
92
- What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (7/12, the share of the default 48px
93
- button's 28px icon), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
94
- grows with the member's text size, to that ceiling and no further. The default and the sm button keep their icon tokens and their word as before. */
92
+ What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (1/2, below), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
93
+ grows with the member's text size, to that ceiling and no further. The default and the sm button keep their word as before. */
95
94
  .icon-btn--lg { --_ib: var(--icon-btn-lg-size, var(--tap-lg)); width: var(--_ib); height: var(--_ib); }
96
95
  .icon-btn--xl { --_ib: var(--icon-btn-xl-size, var(--tap-xl)); width: var(--_ib); height: var(--_ib); }
97
96
  :is(.icon-btn--lg, .icon-btn--xl) { font-size: min(var(--fs-lg), calc(var(--_ib) * var(--icon-btn-word-max, 0.45))); }
98
- :is(.icon-btn--lg, .icon-btn--xl) > .icon { --icon-size: calc(var(--_ib) * var(--icon-btn-icon, 7 / 12)); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); } /* the Icon's own knobs */
97
+ /* the icon in a round is HALF its side (Lh 2026-10-29: 15% smaller than the 7/12 it was — the glyph filled the disc): md and sm on --tap-base
98
+ (24 at the default bases, in a 48 and a 44), lg and xl on their own side. A group's buttons are a frame's parts, not rounds: they keep the Icon's own. :where: any rule naming the icon (a back chevron) outranks this one */
99
+ :where(.icon-btn:not(.icon-btn-group > .icon-btn)) > .icon { --icon-size: calc(var(--tap-base) * var(--icon-btn-icon, 1 / 2)); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); } /* the Icon's own knobs */
100
+ :is(.icon-btn--lg, .icon-btn--xl) > .icon { --icon-size: calc(var(--_ib) * var(--icon-btn-icon, 1 / 2)); }
99
101
  /* ---- icon button group: up to four icon-only commands in ONE frame (Lh 2026-09-29) ----
100
102
  <div class="icon-btn-group" role="group"><button class="icon-btn" aria-label="…">…</button>…</div>
101
103
  One pill as tall as a button, the buttons share its width, a hairline between them; in a foot it takes the row. */
package/css/card.css CHANGED
@@ -334,6 +334,10 @@
334
334
  <article class="card card--folds is-folded"><div class="head" id="…">…</div><button class="card__open" aria-expanded="false" aria-controls="…r"></button>
335
335
  <div class="card__more" id="…r" inert><div class="card__rest">content · <div class="foot">…</div></div></div></article> */
336
336
  .card--folds { row-gap: 0; }
337
+ .card--folds > .head { position: relative; }
338
+ .card--folds > .head.head:has(> .line-ends) > .line-ends { position: static; } /* (.head twice: to outrank parts.css's led-line rule) so the chevron below measures the head, not the ends' box */
339
+ .card__fold { display: block; flex: none; width: var(--icon-sm-size, var(--icon-sm)); height: var(--icon-sm-size, var(--icon-sm)); } /* the chevron's room in the ends (and in their unseen copy); the glyph itself stands on the head's middle, its box centred on the whole head's vertical centre, one line or many, with or without a circle (Lh 2026-10-30) */
340
+ .card__fold > .icon { position: absolute; inset-inline-end: 0; top: 50%; --icon-shift: 0 -50%; }
337
341
  .card__chevron { --icon-motion: rotate var(--motion-quick) var(--ease); } /* the card's own chevron, the head's last end: down while folded, turned up while open (as a Banner's) */
338
342
  .card--folds:not(.is-folded) .card__chevron { --icon-turn: 180deg; }
339
343
  .card__open { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
package/css/stack.css CHANGED
@@ -279,7 +279,7 @@
279
279
 
280
280
  /* ---- StackSheet's tabs (Lh 2026-09-23): the head's end is a row of small icon buttons, the sheet's pages — the chosen one
281
281
  filled (.icon-btn--invert) only while the sheet is open; a count is a small circle over the icon's top right corner ---- */
282
- .stack-sheet__tabs { display: flex; gap: var(--stack-sheet-tabs-gap, var(--sp-2)); flex: none; } /* room between the tabs: with none, the chosen tab's disc touched its neighbour's (Lh 2026-09-24) */
282
+ .stack-sheet__tabs { display: flex; gap: var(--stack-sheet-tabs-gap, var(--sp-4)); flex: none; } /* room between the tabs: with none, the chosen tab's disc touched its neighbour's (Lh 2026-09-24); sp-4 since Lh 2026-10-29: a finger's room between two tabs */
283
283
  /* the title's run (the title's own rules are parts.css's, in a stack sheet) */
284
284
  .stack-sheet__run { display: inline-block; }
285
285
  .stack-sheet > .head > .words__title.is-long > .stack-sheet__run {
@@ -324,9 +324,9 @@
324
324
  .sheet-stack--tap > .card:not(.is-open) > .head .stack-sheet__tab.icon-btn--invert {
325
325
  border-color: transparent; background-color: transparent; box-shadow: none; color: inherit;
326
326
  }
327
- /* the last tab's ICON lines up with the inset, not its button's edge: an unchosen tab shows the glyph only, so the button's own
328
- margin around it reaches into the card's padding — and an open head (back · title · three tabs) keeps one line (Lh 2026-09-23) */
329
- .head > .stack-sheet__tabs { margin-right: calc(-1 * var(--sp-2)); }
327
+ /* the tabs stand IN from the inset (Lh 2026-10-29): the last one reached into the card's padding (Lh 2026-09-23) and the sheet's round
328
+ corner, and the next sheet's, cut its icon — now the row ends --stack-sheet-tabs-end short of the inset */
329
+ .head > .stack-sheet__tabs { margin-right: var(--stack-sheet-tabs-end, var(--sp-2)); }
330
330
 
331
331
  /* AT THE END (Lh 2026-09-29, the home): after the tabs, chevron down — the open sheet folds down. The head's end gives it its room
332
332
  while open; the last tab then sits on the inset (no reach into the padding) */
package/dist/cardds.css CHANGED
@@ -1394,6 +1394,10 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1394
1394
  <article class="card card--folds is-folded"><div class="head" id="…">…</div><button class="card__open" aria-expanded="false" aria-controls="…r"></button>
1395
1395
  <div class="card__more" id="…r" inert><div class="card__rest">content · <div class="foot">…</div></div></div></article> */
1396
1396
  .card--folds { row-gap: 0; }
1397
+ .card--folds > .head { position: relative; }
1398
+ .card--folds > .head.head:has(> .line-ends) > .line-ends { position: static; } /* (.head twice: to outrank parts.css's led-line rule) so the chevron below measures the head, not the ends' box */
1399
+ .card__fold { display: block; flex: none; width: var(--icon-sm-size, var(--icon-sm)); height: var(--icon-sm-size, var(--icon-sm)); } /* the chevron's room in the ends (and in their unseen copy); the glyph itself stands on the head's middle, its box centred on the whole head's vertical centre, one line or many, with or without a circle (Lh 2026-10-30) */
1400
+ .card__fold > .icon { position: absolute; inset-inline-end: 0; top: 50%; --icon-shift: 0 -50%; }
1397
1401
  .card__chevron { --icon-motion: rotate var(--motion-quick) var(--ease); } /* the card's own chevron, the head's last end: down while folded, turned up while open (as a Banner's) */
1398
1402
  .card--folds:not(.is-folded) .card__chevron { --icon-turn: 180deg; }
1399
1403
  .card__open { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
@@ -1970,7 +1974,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1970
1974
 
1971
1975
  /* ---- StackSheet's tabs (Lh 2026-09-23): the head's end is a row of small icon buttons, the sheet's pages — the chosen one
1972
1976
  filled (.icon-btn--invert) only while the sheet is open; a count is a small circle over the icon's top right corner ---- */
1973
- .stack-sheet__tabs { display: flex; gap: var(--stack-sheet-tabs-gap, var(--sp-2)); flex: none; } /* room between the tabs: with none, the chosen tab's disc touched its neighbour's (Lh 2026-09-24) */
1977
+ .stack-sheet__tabs { display: flex; gap: var(--stack-sheet-tabs-gap, var(--sp-4)); flex: none; } /* room between the tabs: with none, the chosen tab's disc touched its neighbour's (Lh 2026-09-24); sp-4 since Lh 2026-10-29: a finger's room between two tabs */
1974
1978
  /* the title's run (the title's own rules are parts.css's, in a stack sheet) */
1975
1979
  .stack-sheet__run { display: inline-block; }
1976
1980
  .stack-sheet > .head > .words__title.is-long > .stack-sheet__run {
@@ -2015,9 +2019,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
2015
2019
  .sheet-stack--tap > .card:not(.is-open) > .head .stack-sheet__tab.icon-btn--invert {
2016
2020
  border-color: transparent; background-color: transparent; box-shadow: none; color: inherit;
2017
2021
  }
2018
- /* the last tab's ICON lines up with the inset, not its button's edge: an unchosen tab shows the glyph only, so the button's own
2019
- margin around it reaches into the card's padding — and an open head (back · title · three tabs) keeps one line (Lh 2026-09-23) */
2020
- .head > .stack-sheet__tabs { margin-right: calc(-1 * var(--sp-2)); }
2022
+ /* the tabs stand IN from the inset (Lh 2026-10-29): the last one reached into the card's padding (Lh 2026-09-23) and the sheet's round
2023
+ corner, and the next sheet's, cut its icon — now the row ends --stack-sheet-tabs-end short of the inset */
2024
+ .head > .stack-sheet__tabs { margin-right: var(--stack-sheet-tabs-end, var(--sp-2)); }
2021
2025
 
2022
2026
  /* AT THE END (Lh 2026-09-29, the home): after the tabs, chevron down — the open sheet folds down. The head's end gives it its room
2023
2027
  while open; the last tab then sits on the inset (no reach into the padding) */
@@ -3081,13 +3085,15 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3081
3085
  :is(.icon-btn--invert, .icon-btn--primary) { background: var(--icon-btn-invert-bg, var(--btn-primary-bg, var(--accent))); color: var(--icon-btn-invert-ink, var(--btn-primary-ink, var(--on-accent))); border-color: transparent; }
3082
3086
  .icon-btn--sm { width: var(--icon-btn-sm-size, var(--tap-sm)); height: var(--icon-btn-sm-size, var(--tap-sm)); font-size: var(--fs-title); }
3083
3087
  /* the bigger round sizes (`Btn shape="round" size`): lg is the hero control's size (--tap-lg), xl the biggest (--tap-xl), both on --tap-base like every size.
3084
- What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (7/12, the share of the default 48px
3085
- button's 28px icon), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
3086
- grows with the member's text size, to that ceiling and no further. The default and the sm button keep their icon tokens and their word as before. */
3088
+ What stands inside is a share of the circle (`--_ib`, its side), so it grows with it: the ICON is --icon-btn-icon of the side (1/2, below), and a WORD (a string child) keeps to --icon-btn-word-max of the side (0.45: a word of four letters stays inside) — it still
3089
+ grows with the member's text size, to that ceiling and no further. The default and the sm button keep their word as before. */
3087
3090
  .icon-btn--lg { --_ib: var(--icon-btn-lg-size, var(--tap-lg)); width: var(--_ib); height: var(--_ib); }
3088
3091
  .icon-btn--xl { --_ib: var(--icon-btn-xl-size, var(--tap-xl)); width: var(--_ib); height: var(--_ib); }
3089
3092
  :is(.icon-btn--lg, .icon-btn--xl) { font-size: min(var(--fs-lg), calc(var(--_ib) * var(--icon-btn-word-max, 0.45))); }
3090
- :is(.icon-btn--lg, .icon-btn--xl) > .icon { --icon-size: calc(var(--_ib) * var(--icon-btn-icon, 7 / 12)); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); } /* the Icon's own knobs */
3093
+ /* the icon in a round is HALF its side (Lh 2026-10-29: 15% smaller than the 7/12 it was — the glyph filled the disc): md and sm on --tap-base
3094
+ (24 at the default bases, in a 48 and a 44), lg and xl on their own side. A group's buttons are a frame's parts, not rounds: they keep the Icon's own. :where: any rule naming the icon (a back chevron) outranks this one */
3095
+ :where(.icon-btn:not(.icon-btn-group > .icon-btn)) > .icon { --icon-size: calc(var(--tap-base) * var(--icon-btn-icon, 1 / 2)); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); } /* the Icon's own knobs */
3096
+ :is(.icon-btn--lg, .icon-btn--xl) > .icon { --icon-size: calc(var(--_ib) * var(--icon-btn-icon, 1 / 2)); }
3091
3097
  /* ---- icon button group: up to four icon-only commands in ONE frame (Lh 2026-09-29) ----
3092
3098
  <div class="icon-btn-group" role="group"><button class="icon-btn" aria-label="…">…</button>…</div>
3093
3099
  One pill as tall as a button, the buttons share its width, a hairline between them; in a foot it takes the row. */
@@ -82,7 +82,7 @@ export interface CardProps extends ComponentProps<'article'> {
82
82
  removeLabel?: string;
83
83
  /** THE FOLD — the card can fold to its head: folded, only its `Head` shows; a tap on the head (not on a control in it) opens the rest
84
84
  * (the content and the `Foot`), another folds it again. The rest opens and folds as a grid row, nothing jumps; folded it is `inert`.
85
- * The card draws its own chevron down as the head's last `end` (after the app's own ends), turned up while open, as a Banner's.
85
+ * The card draws its own chevron down as the head's last `end` (after the app's own ends), turned up while open, as a Banner's; it stands on the middle of the WHOLE head, not on the title's first line as the other ends do.
86
86
  * The keyboard and a screen reader meet ONE unseen button after the head, named by the head (or `openLabel`), that says open or folded.
87
87
  * The card finds its `Head` by type, as a two-faced card does. Not on a `row`, `sm`, `stack`, `paper="bands"` card, nor with `back` or `onPress`:
88
88
  * there it is ignored. A folding card is never pressed whole (the head is its press). Knob: none — the motion is the sheet's (`--motion-sheet`) */
@@ -153,7 +153,7 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
153
153
  if (folding) {
154
154
  const headId = headKid.props.id ?? `${foldId}h`;
155
155
  const rest = kids.filter((c) => c !== headKid);
156
- return createElement(as, props, inner(_jsxs(_Fragment, { children: [cloneElement(headKid, { id: headId, end: _jsxs(_Fragment, { children: [headKid.props.end, _jsx(Icon, { name: "chevron-down", size: "sm", className: "card__chevron" })] }) }), _jsx("button", { type: "button", className: "card__open", "aria-expanded": opened, "aria-controls": `${foldId}r`, ...(openLabel ? { 'aria-label': openLabel } : { 'aria-labelledby': headId }), onClick: () => askOpen(!opened) }), _jsx("div", { className: "card__more", id: `${foldId}r`, inert: folded, children: _jsx("div", { className: "card__rest", children: rest }) })] })));
156
+ return createElement(as, props, inner(_jsxs(_Fragment, { children: [cloneElement(headKid, { id: headId, end: _jsxs(_Fragment, { children: [headKid.props.end, _jsx("span", { className: "card__fold", children: _jsx(Icon, { name: "chevron-down", size: "sm", className: "card__chevron" }) })] }) }), _jsx("button", { type: "button", className: "card__open", "aria-expanded": opened, "aria-controls": `${foldId}r`, ...(openLabel ? { 'aria-label': openLabel } : { 'aria-labelledby': headId }), onClick: () => askOpen(!opened) }), _jsx("div", { className: "card__more", id: `${foldId}r`, inert: folded, children: _jsx("div", { className: "card__rest", children: rest }) })] })));
157
157
  }
158
158
  if (turns) {
159
159
  const ownHeadKid = kids.find((c) => isValidElement(c) && c.type === Head);