@usableapp/cardds 0.7.105 → 0.7.107

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/bin/cardds.mjs +6 -2
  3. package/cardds.css +1 -0
  4. package/css/actions.css +16 -9
  5. package/css/base.css +6 -9
  6. package/css/card.css +21 -173
  7. package/css/finish.css +4 -4
  8. package/css/journey.css +4 -1
  9. package/css/layover.css +4 -14
  10. package/css/lists.css +3 -18
  11. package/css/media.css +1 -7
  12. package/css/parts.css +380 -0
  13. package/css/sheet.css +21 -140
  14. package/css/stack.css +15 -26
  15. package/css/stamp.css +1 -1
  16. package/css/step.css +3 -3
  17. package/css/theme.template.css +1 -1
  18. package/css/tokens.css +5 -4
  19. package/dist/actions/BarNote.d.ts +2 -2
  20. package/dist/actions/BarNote.js +2 -2
  21. package/dist/actions/Btn.d.ts +2 -2
  22. package/dist/actions/Btn.js +1 -1
  23. package/dist/actions/BtnRow.d.ts +1 -1
  24. package/dist/actions/BtnRow.js +1 -1
  25. package/dist/actions/Chip.d.ts +7 -3
  26. package/dist/actions/Chip.js +5 -5
  27. package/dist/actions/IconBtn.d.ts +1 -1
  28. package/dist/actions/IconBtn.js +1 -1
  29. package/dist/actions/IconBtnGroup.d.ts +1 -1
  30. package/dist/cardds.css +486 -410
  31. package/dist/cards/Card.d.ts +6 -22
  32. package/dist/cards/Card.js +11 -22
  33. package/dist/cards/CardFeed.d.ts +1 -1
  34. package/dist/cards/CardFeed.js +5 -5
  35. package/dist/cards/CardParts.d.ts +0 -12
  36. package/dist/cards/CardParts.js +0 -12
  37. package/dist/cards/cardGo.js +1 -1
  38. package/dist/cards/cardGrounds.js +2 -2
  39. package/dist/catalog.json +1 -1
  40. package/dist/forms/Field.d.ts +1 -1
  41. package/dist/forms/Field.js +1 -1
  42. package/dist/index.d.ts +6 -5
  43. package/dist/index.js +6 -5
  44. package/dist/lists/Row.d.ts +7 -22
  45. package/dist/lists/Row.js +6 -4
  46. package/dist/media/MapArea.d.ts +7 -3
  47. package/dist/media/MapArea.js +4 -3
  48. package/dist/media/Tile.d.ts +3 -7
  49. package/dist/media/Tile.js +5 -5
  50. package/dist/numbers/Spinner.d.ts +1 -1
  51. package/dist/numbers/Spinner.js +1 -1
  52. package/dist/parts/Body.d.ts +7 -0
  53. package/dist/parts/Body.js +11 -0
  54. package/dist/parts/End.d.ts +10 -0
  55. package/dist/parts/End.js +7 -0
  56. package/dist/parts/Foot.d.ts +17 -0
  57. package/dist/parts/Foot.js +11 -0
  58. package/dist/parts/Head.d.ts +15 -0
  59. package/dist/parts/Head.js +34 -0
  60. package/dist/parts/Lead.d.ts +10 -0
  61. package/dist/parts/Lead.js +9 -0
  62. package/dist/parts/Words.d.ts +13 -0
  63. package/dist/parts/Words.js +20 -0
  64. package/dist/parts/headCtx.d.ts +7 -0
  65. package/dist/parts/headCtx.js +9 -0
  66. package/dist/scaffold/EmptyState.d.ts +1 -1
  67. package/dist/scaffold/EmptyState.js +1 -1
  68. package/dist/scaffold/Screen.js +1 -1
  69. package/dist/sheets/Modal.d.ts +3 -7
  70. package/dist/sheets/Modal.js +3 -7
  71. package/dist/sheets/Sheet.d.ts +2 -2
  72. package/dist/sheets/Sheet.js +8 -9
  73. package/dist/sheets/SheetStack.d.ts +3 -3
  74. package/dist/sheets/SheetStack.js +4 -4
  75. package/dist/sheets/SheetSteps.d.ts +1 -1
  76. package/dist/sheets/SheetSteps.js +2 -2
  77. package/dist/sheets/StackBack.d.ts +1 -1
  78. package/dist/sheets/StackBack.js +1 -1
  79. package/dist/sheets/StackSheet.js +7 -7
  80. package/dist/sheets/sheetMeasure.js +3 -3
  81. package/dist/sheets/sheetStepsPile.js +2 -2
  82. package/dist/sheets/stackCard.js +6 -6
  83. package/dist/templates/CallSheet.js +6 -5
  84. package/dist/templates/Walkthrough.js +3 -2
  85. package/docs/reference.md +75 -36
  86. package/lib/catalog.mjs +2 -0
  87. package/lib/mcp.mjs +1 -1
  88. package/lint/rules.mjs +22 -8
  89. package/package.json +2 -1
  90. package/scripts/codemod-parts.mjs +324 -0
  91. package/dist/cards/CardFoot.d.ts +0 -15
  92. package/dist/cards/CardFoot.js +0 -9
  93. package/dist/cards/CardHead.d.ts +0 -21
  94. package/dist/cards/CardHead.js +0 -39
  95. package/dist/cards/Stat.d.ts +0 -19
  96. package/dist/cards/Stat.js +0 -14
  97. package/dist/sheets/SheetBody.d.ts +0 -5
  98. package/dist/sheets/SheetBody.js +0 -9
  99. package/dist/sheets/SheetHead.d.ts +0 -15
  100. package/dist/sheets/SheetHead.js +0 -6
@@ -1,5 +1,4 @@
1
1
  import { type ComponentProps, type MouseEvent, type ReactNode } from 'react';
2
- import { type CardHeadProps } from './CardHead.js';
3
2
  import { type StackPlace } from '../sheets/stackCard.js';
4
3
  export type { StackPlace };
5
4
  /** which side of a two-faced card shows */
@@ -15,7 +14,7 @@ export interface CardProps extends ComponentProps<'article'> {
15
14
  paper?: boolean | 'bands';
16
15
  /** compact: a small card inside a card or a sheet body (a note, a promo) */
17
16
  sm?: boolean;
18
- /** a list row that is its own card: thumb · body · end, in a CardList. Its corner is the big card's PROPORTION, not its size (`--r-card-row`, 13; knob `--card-row-radius`).
17
+ /** a list row that is its own card: the line itself, `Lead` · `Words` · `End` (or a control) as its children, in a CardList. Its corner is the big card's PROPORTION, not its size (`--r-card-row`, 13; knob `--card-row-radius`).
19
18
  * Pickable: `as="label"` round a radio (`<input type="radio">`, unseen, over the whole card) and the app gives the picked one its `tone` */
20
19
  row?: boolean;
21
20
  /** the image IS the card: a Placeholder or img first, text over a scrim */
@@ -30,21 +29,6 @@ export interface CardProps extends ComponentProps<'article'> {
30
29
  as?: 'article' | 'div' | 'a' | 'label' | 'section' | 'li';
31
30
  /** the link's target, for `as="a"` */
32
31
  href?: string;
33
- /** THE HEAD, filled in place: the heading (wraps freely) — the card writes its CardHead first. For a head of your own shape
34
- * (a chip before the words, a tile badge) write `<CardHead>` as the first child instead, and leave these out */
35
- heading?: ReactNode;
36
- /** the muted line under the heading */
37
- caption?: ReactNode;
38
- /** the head's far-right thing: a Chip, an IconBtn, a Badge, a small Ring */
39
- end?: ReactNode;
40
- /** the heading's level (h2 default; h1 for the one-feature page) */
41
- level?: CardHeadProps['level'];
42
- /** THE FOOT, filled in place: its Btns (≤4, one line) — the card writes its CardFoot last */
43
- foot?: ReactNode;
44
- /** the small Link under the foot's buttons (CardFoot `link`) */
45
- footLink?: ReactNode;
46
- /** the foot is a few big ROUND buttons (CardFoot `round`): `foot` holds `IconBtn`s, stood as one centred group a fixed gap apart */
47
- footRound?: boolean;
48
32
  /** set by `SheetStack` from the app's `open` and `refreshing`. The card renders its place, its grip and its pull. Leave it unset on any other card */
49
33
  stack?: StackPlace;
50
34
  /** THE CARD LEAVES — the card floats away: up and out with a small turn, as one piece with all it holds (a stamp that has just landed on it goes with it).
@@ -60,7 +44,7 @@ export interface CardProps extends ComponentProps<'article'> {
60
44
  * `--card-remove-size` · `--card-remove-inset` · `--card-remove-ink` · `--card-remove-bg` */
61
45
  onRemove?: () => void;
62
46
  /** THE BACK — the card has two faces and the member turns the WHOLE card over: a tap anywhere on it that is not on a control asks for the other
63
- * face. The head and the foot (`heading`/`caption`/`end` or a CardHead child, `foot`) are given once and drawn on BOTH faces, so they read the same
47
+ * face. The head and the foot (a `Head` child, a `Foot` child) are given once and drawn on BOTH faces, so they read the same
64
48
  * either way; the children are the front's middle, `back` the back's. The card is as tall as its taller face and each face fills it, the middle taking
65
49
  * what is left, so the card never changes height when it turns (knob `--card-middle-h` fixes the middle's height instead). The hidden face is `inert`; an `id` in the head or the foot would be drawn twice, so give it none.
66
50
  * Not on a `row`, `sm` or `stack` card */
@@ -80,16 +64,16 @@ export interface CardProps extends ComponentProps<'article'> {
80
64
  }
81
65
  /**
82
66
  * Card — ONE boundary: head · content · foot. Cards are content the system offers (the words, the thing to read).
83
- * The head and the foot are SLOTS: `heading` · `caption` · `end` (the card writes its CardHead first) and `foot` · `footLink`
84
- * (its CardFoot last); the children are the content between them (frameless rows, kv, a ring, a paragraph — never a second card
85
- * boundary). The order is the card's, never the writer's. A head of its own shape: write `<CardHead>` as the first child instead.
67
+ * The head is the first child, a `Head`; the foot is the last, a `Foot`. The children between them are the content
68
+ * (frameless rows, kv, a ring, a paragraph — never a second card boundary). The card finds its `Head` and its `Foot` by their type, so a component
69
+ * of your own that wraps one is not found: write the `Head` and the `Foot` in the card.
86
70
  * A page with one feature and one CTA may be a single card. Keep everything big.
87
71
  * PRESSED WHOLE: a card whose ONLY control is its foot's button, or a row card's end button, is pressed anywhere — a touch off the
88
72
  * button runs that button's own action once, and the card dims under the finger. The app writes nothing; any other card is only read.
89
73
  * 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
90
74
  * read the same on both faces, the middle is one fixed height. `paper="bands"`: paper head and foot bands edge to edge, the tint between.
91
75
  */
92
- export declare function Card({ tone, paper, sm, row, cover, fold, centre, band, as, heading, caption, end, level, foot, footLink, footRound, stack, leave, onLeft, onRemove, removeLabel, back, face, defaultFace, onFaceChange, toBackLabel, toFrontLabel, className, style, children, onClick, ref, ...rest }: CardProps): import("react").DetailedReactHTMLElement<{
76
+ export declare function Card({ tone, paper, sm, row, cover, fold, centre, band, as, stack, leave, onLeft, onRemove, removeLabel, back, face, defaultFace, onFaceChange, toBackLabel, toFrontLabel, className, style, children, onClick, ref, ...rest }: CardProps): import("react").DetailedReactHTMLElement<{
93
77
  onClick: (e: MouseEvent<HTMLElement>) => void;
94
78
  inert?: boolean | undefined;
95
79
  "aria-busy"?: (boolean | "true" | "false") | undefined;
@@ -2,24 +2,24 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { Children, createElement, isValidElement, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import { cx } from '../cx.js';
4
4
  import { useControlled, useLatest, warnOnce } from '../state.js';
5
- import { CardHead } from './CardHead.js';
6
- import { CardFoot } from './CardFoot.js';
5
+ import { Head } from '../parts/Head.js';
6
+ import { Foot } from '../parts/Foot.js';
7
7
  import { goControl, onControl } from './cardGo.js';
8
8
  import { Icon } from '../type/Icon.js';
9
9
  import { word } from '../words.js';
10
10
  import { StackHeadCtx, StackPullCtx, ownHead, stackPaint, useStackCard } from '../sheets/stackCard.js';
11
11
  /**
12
12
  * Card — ONE boundary: head · content · foot. Cards are content the system offers (the words, the thing to read).
13
- * The head and the foot are SLOTS: `heading` · `caption` · `end` (the card writes its CardHead first) and `foot` · `footLink`
14
- * (its CardFoot last); the children are the content between them (frameless rows, kv, a ring, a paragraph — never a second card
15
- * boundary). The order is the card's, never the writer's. A head of its own shape: write `<CardHead>` as the first child instead.
13
+ * The head is the first child, a `Head`; the foot is the last, a `Foot`. The children between them are the content
14
+ * (frameless rows, kv, a ring, a paragraph — never a second card boundary). The card finds its `Head` and its `Foot` by their type, so a component
15
+ * of your own that wraps one is not found: write the `Head` and the `Foot` in the card.
16
16
  * A page with one feature and one CTA may be a single card. Keep everything big.
17
17
  * PRESSED WHOLE: a card whose ONLY control is its foot's button, or a row card's end button, is pressed anywhere — a touch off the
18
18
  * button runs that button's own action once, and the card dims under the finger. The app writes nothing; any other card is only read.
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. `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', heading, caption, end, level, foot, footLink, footRound, stack, leave, onLeft, onRemove, removeLabel, back, face, defaultFace = 'front', onFaceChange, toBackLabel, toFrontLabel, className, style, children, onClick, ref, ...rest }) {
22
+ export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'article', stack, leave, onLeft, onRemove, removeLabel, back, face, defaultFace = 'front', onFaceChange, toBackLabel, toFrontLabel, 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))
@@ -27,15 +27,6 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'ar
27
27
  const turns = back != null && !row && !sm && !stack;
28
28
  const [shown, ask] = useControlled(face, defaultFace, onFaceChange);
29
29
  const flipped = turns && shown === 'back';
30
- const head = heading != null || caption != null || end != null;
31
- const tail = foot != null || footLink != null;
32
- if (head || tail) {
33
- const parts = Children.toArray(children).filter(isValidElement); // dev hint only
34
- if (head && parts.some((c) => c.type === CardHead))
35
- warnOnce('card-head-twice', 'cardds Card: `heading`/`caption`/`end` AND a <CardHead> child — one head per card; use one way');
36
- if (tail && parts.some((c) => c.type === CardFoot))
37
- warnOnce('card-foot-twice', 'cardds Card: `foot`/`footLink` AND a <CardFoot> child — one foot per card; use one way');
38
- }
39
30
  const own = useRef(null);
40
31
  const swallow = useRef(false);
41
32
  const pulling = useStackCard(own, stack, swallow);
@@ -95,7 +86,7 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'ar
95
86
  stack.onClose();
96
87
  return;
97
88
  }
98
- if (head && stack.open && target.closest('.card__head > :is(h1, h2, h3)')) {
89
+ if (head && stack.open && target.closest('.head > :is(h1, h2, h3)')) {
99
90
  stack.onClose();
100
91
  return;
101
92
  } // the title folds it; the back stays the keyboard's way
@@ -115,13 +106,11 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, band, as = 'ar
115
106
  const cross = row && onRemove ? (_jsx("button", { type: "button", className: "card__remove", "aria-label": removeLabel ?? word('remove'), onClick: (e) => { e.preventDefault(); e.stopPropagation(); onRemove(); }, children: _jsx(Icon, { name: "x" }) }, "remove")) : null;
116
107
  if (turns) {
117
108
  const kids = Children.toArray(children);
118
- const ownHeadKid = kids.find((c) => isValidElement(c) && c.type === CardHead);
119
- const ownFootKid = kids.find((c) => isValidElement(c) && c.type === CardFoot);
109
+ const ownHeadKid = kids.find((c) => isValidElement(c) && c.type === Head);
110
+ const ownFootKid = kids.find((c) => isValidElement(c) && c.type === Foot);
120
111
  const front = kids.filter((c) => c !== ownHeadKid && c !== ownFootKid);
121
- const side = (which, middle) => (_jsxs("div", { className: cx('card__face flip__face', `flip__face--${which}`), ...((which === 'back') !== flipped ? { inert: true } : {}), children: [_jsx("button", { type: "button", className: "card__turn", "aria-label": which === 'front' ? toBackLabel ?? word('turnToBack') : toFrontLabel ?? word('turnToFront'), onClick: () => ask(which === 'front' ? 'back' : 'front') }), head ? _jsx(CardHead, { heading: heading, caption: caption, end: end, level: level }) : ownHeadKid, _jsx("div", { className: "card__middle", children: which === 'front' ? front : middle }), tail ? _jsx(CardFoot, { link: footLink, round: footRound, children: foot }) : ownFootKid] }, which));
112
+ const side = (which, middle) => (_jsxs("div", { className: cx('card__face flip__face', `flip__face--${which}`), ...((which === 'back') !== flipped ? { inert: true } : {}), children: [_jsx("button", { type: "button", className: "card__turn", "aria-label": which === 'front' ? toBackLabel ?? word('turnToBack') : toFrontLabel ?? word('turnToFront'), onClick: () => ask(which === 'front' ? 'back' : 'front') }), ownHeadKid, _jsx("div", { className: "card__middle", children: which === 'front' ? front : middle }), ownFootKid] }, which));
122
113
  return createElement(as, props, inner(_jsxs(_Fragment, { children: [side('front', null), side('back', back)] })));
123
114
  }
124
- if (!head && !tail)
125
- return createElement(as, props, inner(_jsxs(_Fragment, { children: [children, cross] })));
126
- return createElement(as, props, inner(_jsxs(_Fragment, { children: [head && _jsx(CardHead, { heading: heading, caption: caption, end: end, level: level }, "head"), Children.toArray(children), tail && _jsx(CardFoot, { link: footLink, round: footRound, children: foot }, "foot"), cross] })));
115
+ return createElement(as, props, inner(_jsxs(_Fragment, { children: [children, cross] })));
127
116
  }
@@ -36,7 +36,7 @@ export interface FeedCardProps extends Omit<ComponentProps<'article'>, 'id' | 'r
36
36
  heading: ReactNode;
37
37
  /** the muted line under the heading, shown in both sizes */
38
38
  caption?: ReactNode;
39
- /** the card's thumb at the head's start: an icon by name in the outlined square, drawn in both sizes. Ignored when `lead` is given */
39
+ /** the card's lead at the head's start: an icon by name in the outlined square (a `Lead`), drawn in both sizes. Ignored when `lead` is given */
40
40
  icon?: IconName;
41
41
  /** anything at the head's start in place of the icon, drawn in both sizes: a `Stamp` (the small one, 48 × 60, the icon's square is not drawn), an `Avatar`. Wins over `icon` */
42
42
  lead?: ReactNode;
@@ -3,9 +3,9 @@ import { Children, createContext, isValidElement, useContext, useEffect, useId,
3
3
  import { cx } from '../cx.js';
4
4
  import { glide, reducedMotion, setRefs, sheetMs, stopMoves, useControlled, warnOnce } from '../state.js';
5
5
  import { Card } from './Card.js';
6
- import { CardHead } from './CardHead.js';
7
- import { CardFoot } from './CardFoot.js';
8
- import { CardThumb } from './CardParts.js';
6
+ import { Head } from '../parts/Head.js';
7
+ import { Foot } from '../parts/Foot.js';
8
+ import { Lead } from '../parts/Lead.js';
9
9
  import { Icon } from '../type/Icon.js';
10
10
  import { Text } from '../type/Text.js';
11
11
  const FeedCtx = createContext(null);
@@ -105,7 +105,7 @@ export function FeedCard({ id, heading, caption, icon, lead, tone, foot, classNa
105
105
  useLayoutEffect(() => {
106
106
  // grown from the keyboard: the card stopped being a control under the cursor, so the cursor goes on to its button
107
107
  if (!small && byKey.current)
108
- own.current?.querySelector('.card__foot :is(button, a[href])')?.focus({ preventScroll: true });
108
+ own.current?.querySelector('.foot :is(button, a[href])')?.focus({ preventScroll: true });
109
109
  byKey.current = false;
110
110
  }, [small]);
111
111
  const setRef = (node) => {
@@ -119,5 +119,5 @@ export function FeedCard({ id, heading, caption, icon, lead, tone, foot, classNa
119
119
  byKey.current = e.detail === 0;
120
120
  feed.grow(id);
121
121
  } }, onKeyDown: (e) => { onKeyDown?.(e); if (small && !e.defaultPrevented)
122
- onSmallKey(e); }, children: [_jsxs(CardHead, { className: "feed-card__head", children: [lead != null ? _jsx("span", { className: "feed-card__lead", children: lead }) : icon && _jsx(CardThumb, { children: _jsx(Icon, { name: icon, size: "sm" }) }), _jsx(Text, { level: "h2", id: name, children: heading }), caption != null && _jsx(Text, { level: "caption", muted: true, children: caption })] }), _jsx("div", { className: "feed-card__more", inert: small, children: _jsxs("div", { className: "feed-card__rest", children: [children, foot != null && _jsx(CardFoot, { children: foot })] }) })] }));
122
+ onSmallKey(e); }, children: [_jsxs(Head, { children: [lead != null ? _jsx("span", { className: "feed-card__lead", children: lead }) : icon && _jsx(Lead, { children: _jsx(Icon, { name: icon, size: "sm" }) }), _jsx(Text, { level: "h2", id: name, children: heading }), caption != null && _jsx(Text, { level: "caption", muted: true, children: caption })] }), _jsx("div", { className: "feed-card__more", inert: small, children: _jsxs("div", { className: "feed-card__rest", children: [children, foot != null && _jsx(Foot, { children: foot })] }) })] }));
123
123
  }
@@ -3,18 +3,6 @@ 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. */
5
5
  export declare function CardMedia({ className, ...rest }: CardMediaProps): import("react").JSX.Element;
6
- export interface CardBodyProps extends ComponentProps<'div'> {
7
- }
8
- /** CardBody — the flexible middle of a `Card row`: a title over a caption. */
9
- export declare function CardBody({ className, ...rest }: CardBodyProps): import("react").JSX.Element;
10
- export interface CardThumbProps extends ComponentProps<'span'> {
11
- }
12
- /** CardThumb — the small outlined square leading a `Card row` (a number, an initial, an icon). */
13
- export declare function CardThumb({ className, ...rest }: CardThumbProps): import("react").JSX.Element;
14
- export interface CardEndProps extends ComponentProps<'div'> {
15
- }
16
- /** CardEnd — the trailing value + caption, right-aligned (in a head or a row card). */
17
- export declare function CardEnd({ className, ...rest }: CardEndProps): import("react").JSX.Element;
18
6
  export interface CardListProps extends ComponentProps<'div'> {
19
7
  /** how many rows show before the list scrolls IN ITSELF, counted in rows, not a height: `2.5` = two whole rows and half of the third, the cut row
20
8
  * saying there is more. The list measures its own rows (they wrap to any height) and keeps the window right when they change. Leave it out and the
@@ -5,18 +5,6 @@ import { cx } from '../cx.js';
5
5
  export function CardMedia({ className, ...rest }) {
6
6
  return _jsx("div", { className: cx('card__media', className), ...rest });
7
7
  }
8
- /** CardBody — the flexible middle of a `Card row`: a title over a caption. */
9
- export function CardBody({ className, ...rest }) {
10
- return _jsx("div", { className: cx('card__body', className), ...rest });
11
- }
12
- /** CardThumb — the small outlined square leading a `Card row` (a number, an initial, an icon). */
13
- export function CardThumb({ className, ...rest }) {
14
- return _jsx("span", { className: cx('card__thumb', className), ...rest });
15
- }
16
- /** CardEnd — the trailing value + caption, right-aligned (in a head or a row card). */
17
- export function CardEnd({ className, ...rest }) {
18
- return _jsx("div", { className: cx('card__end', className), ...rest });
19
- }
20
8
  /** CardList — a stack of `Card row`s, each its own boundary: a list of things to open or to pick (past requests to reuse). It stands on the base or straight in a sheet's
21
9
  * body and scrolls with it; never inside a card (a card never wraps a card — `cardds check` rule `card-in-card`). Rows inside a card are `Rows`.
22
10
  * A SHORT WINDOW of past entries under a form (`show={2.5}`): the list scrolls in itself, a few rows in sight; each row a `Card row as="label"` round a radio
@@ -23,7 +23,7 @@ export function goControl(card) {
23
23
  if (control.matches(':disabled, [aria-disabled="true"]'))
24
24
  return null;
25
25
  const foot = control.parentElement;
26
- const inFoot = foot?.matches('.card__foot') && foot.parentElement?.closest('.card') === card; // the card's OWN foot, also when a part of the card holds it (a FeedCard's region)
26
+ const inFoot = foot?.matches('.foot') && foot.parentElement?.closest('.card') === card; // the card's OWN foot, also when a part of the card holds it (a FeedCard's region)
27
27
  const atRowEnd = card.matches('.card--row') && card.lastElementChild === control && !control.matches('.card__remove'); // a row's cross takes it off its list: never pressed by a touch elsewhere
28
28
  return inFoot || atRowEnd ? control : null;
29
29
  }
@@ -58,8 +58,8 @@ export function cardGrounds(root = document.body) {
58
58
  probe.style.cssText = 'position:absolute;inset-inline-start:-200vw;inset-block-start:0;inline-size:20rem;';
59
59
  const grounds = [
60
60
  { ground: 'screen', html: '', end: '', token: '--surface' },
61
- { ground: 'sheet', html: '<article class="card sheet"><div class="sheet__body">', end: '</div></article>', token: '--card-1-bg' },
62
- { ground: 'paper sheet', html: '<article class="card sheet sheet--paper"><div class="sheet__body">', end: '</div></article>', token: '--color-paper' },
61
+ { ground: 'sheet', html: '<article class="card sheet"><div class="body">', end: '</div></article>', token: '--card-1-bg' },
62
+ { ground: 'paper sheet', html: '<article class="card sheet sheet--paper"><div class="body">', end: '</div></article>', token: '--color-paper' },
63
63
  ];
64
64
  const tones = [1, 2, 3, 4, 5];
65
65
  probe.innerHTML = grounds.map((g) => `<div>${g.html}${tones.map((t) => `<div class="card${t > 1 ? ` card--${t}` : ''}"></div>`).join('')}${g.end}</div>`).join('');