@usableapp/cardds 0.7.157 → 0.7.159

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 (54) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/css/actions.css +37 -4
  3. package/css/base.css +14 -3
  4. package/css/card.css +5 -0
  5. package/css/forms.css +38 -1
  6. package/css/lists.css +4 -0
  7. package/css/parts.css +5 -1
  8. package/css/sheet.css +5 -2
  9. package/css/stamp.css +21 -17
  10. package/css/tokens.css +1 -0
  11. package/dist/actions/Btn.d.ts +12 -3
  12. package/dist/actions/Btn.js +6 -3
  13. package/dist/actions/BtnGroup.d.ts +3 -2
  14. package/dist/actions/BtnGroup.js +3 -3
  15. package/dist/actions/BtnRow.d.ts +6 -2
  16. package/dist/actions/BtnRow.js +3 -3
  17. package/dist/actions/IconBtn.d.ts +8 -2
  18. package/dist/actions/IconBtn.js +4 -2
  19. package/dist/actions/LinkBlock.d.ts +9 -0
  20. package/dist/actions/LinkBlock.js +8 -0
  21. package/dist/actions/useSendOut.d.ts +4 -0
  22. package/dist/actions/useSendOut.js +15 -0
  23. package/dist/cardds.css +130 -28
  24. package/dist/cards/Card.d.ts +8 -1
  25. package/dist/cards/CardParts.d.ts +8 -0
  26. package/dist/cards/CardParts.js +5 -0
  27. package/dist/catalog.json +1 -1
  28. package/dist/forms/Field.d.ts +13 -1
  29. package/dist/forms/Field.js +55 -6
  30. package/dist/forms/MessageBar.d.ts +9 -2
  31. package/dist/forms/MessageBar.js +6 -4
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +1 -0
  34. package/dist/lists/Bubble.d.ts +859 -4
  35. package/dist/lists/Bubble.js +18 -4
  36. package/dist/lists/Row.d.ts +4 -0
  37. package/dist/media/MapArea.d.ts +7 -1
  38. package/dist/media/MapArea.js +5 -3
  39. package/dist/parts/Foot.d.ts +8 -2
  40. package/dist/parts/Foot.js +4 -3
  41. package/dist/scaffold/Page.d.ts +3 -1
  42. package/dist/scaffold/Page.js +3 -1
  43. package/dist/sheets/SheetSteps.js +3 -3
  44. package/dist/stamp/Stamp.d.ts +3 -1
  45. package/dist/stamp/Stamp.js +4 -2
  46. package/dist/state.d.ts +2 -2
  47. package/dist/state.js +4 -4
  48. package/dist/type/Text.d.ts +5 -1
  49. package/dist/type/Text.js +3 -2
  50. package/dist/type/icons.d.ts +1 -1
  51. package/dist/type/icons.js +2 -2
  52. package/docs/reference.md +52 -8
  53. package/icons.svg +1 -0
  54. package/package.json +1 -1
package/docs/reference.md CHANGED
@@ -377,6 +377,14 @@ of `Screen`:
377
377
  however tall it grows. The sheet's `topRow` is its pinned row under the head (the request the chat is about), as the
378
378
  Screen's. In the sticky look the sheet's last child is a `StickyAnswer` in place of the Foot. Opening at, and following,
379
379
  the last words is the app's (`scrollIntoView({ block: 'end' })` on the thread). Stories: `Bubble/ChatSheet`, `StickyScreens/ChatSheet`.
380
+ - **A pressed message, and the one looked at** (Lh 2026-10-28). A `Bubble` with `href` is a link (an `<a>`, `target`/`rel`
381
+ beside it), with `onClick` a pressed one (`role="button"`, Enter and Space); both dim under the finger (the PRESS list's DIM)
382
+ and take the focus ring. `highlighted` rings the message the member is looking at — the one a reply points at, the one a
383
+ link opened the chat at (knob `--bubble-highlighted-ink`, default the accent). Story `Bubble · Pressed`.
384
+ - **A reply to one message** (Lh 2026-10-28): `MessageBar quote` is the line being answered, over the box, cut at one line, a
385
+ rule at its start (knobs `--message-bar-quote-ink`, `--message-bar-quote-rule-ink`); `onQuoteClose` + `quoteCloseLabel` give it
386
+ a ✕. Controlled: shown while the app passes it, dropped by the app (after a send, or on the ✕); the message it answers is a
387
+ `Bubble highlighted`. The reply button beside a message is an `IconBtn icon="reply"` (story `MessageBar · ReplyTo`).
380
388
  - **A screen with a `Sheet` has no bottom.** The sheet finishes on its own `Foot`; `Screen` warns once when both
381
389
  are there.
382
390
  - **Templates** are `Screen`s with the three parts filled (`Walkthrough` = top `lead` · content `Pages` · bottom
@@ -627,7 +635,9 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
627
635
  `<Head><AvatarStack><Stamp bare …/></AvatarStack><Words title meta /><End caption="5 min" /></Head>`
628
636
  (story `Head · HeadLeadWords`). No `Row` inside the card for it.
629
637
  - **Content**: whatever the card frames — rows, key-values, a gauge, a
630
- paragraph. Frameless, per rule 9.
638
+ paragraph. Frameless, per rule 9. Words with a small square picture at their end (a post's photo beside its
639
+ words) are a `MediaBeside`: `<MediaBeside media={<img …/>}><Text level="body" lines={3}>…</Text></MediaBeside>`
640
+ — the words take the room, the picture a square of `--media-beside-size` (72) at the media's corner (story `MediaBeside · Default`).
631
641
  - **Foot** (`.foot`): the card's action buttons on one line. One
632
642
  button takes the width; up to four share it in even parts; from three
633
643
  on they drop their side padding so the labels keep the room. A panel of
@@ -635,7 +645,11 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
635
645
  `form` it is as wide as its buttons (one tap each) and stands in the middle,
636
646
  as `Btn form` does — in a foot, a `Page`, a `Centre` or a `CtaPack` — and
637
647
  with `form labelled` its `label` is SHOWN as words at its left, the two
638
- centred as one line (Lh 2026-10-10).
648
+ centred as one line (Lh 2026-10-10). The narrowing from three on is the knob `--foot-crowd-pad-x` (default
649
+ `--sp-2`): a theme that wants one pill shape for worded and icon-only Btns sets it to the Btn's own side padding.
650
+ - **Wrap buttons** (`Foot wrap`, `BtnRow wrap`, Lh 2026-10-28): each `Btn` as wide as its words, with its own side
651
+ padding (never narrowed), from the start, wrapping to a new line when they do not fit. `end` stands them at the
652
+ foot's (the row's) end: `<Foot wrap end><Btn>Reply</Btn><Btn>Open the chat</Btn></Foot>` (stories `Foot · Wrap`, `BtnRow · Wrap`).
639
653
  - **The member's own item: the foot split in half** (Lh 2026-10-25). On a card of something the member owns (their
640
654
  request, post, booking), the foot is `Foot split`: two halves that ARE the foot, each half the card's width, edge
641
655
  to edge and flush with its bottom edge (the card's corners round them), a `--rule-w` rule between them and over
@@ -755,8 +769,23 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
755
769
  `touchmove` for iOS) and a stack's pull or a walk's swipe stays out of it.
756
770
  The engine still gets every touch; the app adds nothing. Any region can
757
771
  take the same attribute (gallery `MapArea/OwnsGestures`).
772
+ - **A map to look at, not to choose with: `MapArea still`.** A still preview
773
+ of one point — a meeting place on a feed card that opens a maps app. It owns
774
+ no gesture (no `data-gestures="own"`, no held `touchmove`) and takes no touch
775
+ (`.map--still`, `pointer-events: none` on the box and all it holds): a finger
776
+ that lands on it scrolls the page, a tap on it is a tap on what holds it.
777
+ The mark stays at the centre and keeps its name (`ringLabel`) for screen
778
+ readers. Give it no `hint`, no `MapPick`, no `ringRef`. The link is the
779
+ holder's: `<Card sm as="a" href target="_blank" rel="noopener">` round the
780
+ map and a `Row` naming the place (`Card` and `Row` take `target` and `rel`
781
+ beside `href`) (gallery `MapArea/Still`, `LinkBlock/PlaceInCard`). INSIDE a card (a card never wraps a card) the link is a `LinkBlock`
782
+ (Lh 2026-10-28): the map and the row as one `<a>`, stacked with the card's gap, the card's ink, no frame, no padding,
783
+ dimming under the finger (knob `--link-block-gap`): `<LinkBlock href target="_blank" rel="noopener noreferrer"
784
+ aria-label="Open … in Maps"><MapArea inline still mark="pin" ringLabel="…"><div /></MapArea><Row><Lead icon="map-pin" />
785
+ <Words title meta /><Icon name="arrow-up-right" /></Row></LinkBlock>` (gallery `MapArea/Still`, `LinkBlock/PlaceInCard`).
758
786
  - **An inline map sits in a thin frame**, the joined `BtnGroup look="choice"`'s
759
- edge (`--border-w`, `--outline`, `--r-chip`), the map clipped to its corner.
787
+ edge (`--border-w`, `--outline`), at the media's corner (`--r-media`, as a picture in a card; Lh 2026-10-28,
788
+ was the pill's `--r-chip`), the map clipped to it.
760
789
  Knobs `--map-area-edge-ink`, `--map-radius`; `bleed` keeps only the top and
761
790
  bottom rules.
762
791
  - **Days on CalendarWeeks: one, a span, or several ranges.** `selected` is one
@@ -897,7 +926,7 @@ ground of my own stamp.
897
926
  A stamp is a small paper picture a member keeps and sticks on a note or a postcard for a neighbour. Sending never uses
898
927
  it up. cardds draws the paper; the pictures, their words and which stamp a member owns are the app's.
899
928
 
900
- - **`Stamp`** — a perforated 4:5 stamp, always with teeth; `frame={false}` drops the white paper frame round the picture, so the tone runs out to the teeth (the same size, shadow and words), wherever a stamp goes (`xs`, `tilt`, `arrive`, `onClick`, a `StampOn`, a `StampBook`, an `AvatarStack`). `pictures` is one to four nodes, the app's own art (an svg, an img), in placement
929
+ - **`Stamp`** — a perforated 4:5 stamp, always with teeth; `frame={false}` drops the white paper frame round the picture, so the tone runs out to the teeth (the same size and words), no rim round the teeth (Lh 2026-10-28: a paper-coloured rim read as a white edge), and its contact shadow its own tone made dusky rather than black (Lh 2026-10-28: a grey laid over the tone, knob `--stamp-tone-shadow-bg`), wherever a stamp goes (`xs`, `tilt`, `arrive`, `onClick`, a `StampOn`, a `StampBook`, an `AvatarStack`). `pictures` is one to four nodes, the app's own art (an svg, an img), in placement
901
930
  order: the stamp places, sizes and turns them by how many there are. `tone` is the ground, one of `STICKY_TONES` (the
902
931
  same list and the same `--sticky-<tone>-bg` knobs as a note's paper). `name` is the big line on the picture's foot,
903
932
  `words` the small line above it. `tilt` turns it, `onClick` makes the whole stamp a button. Every inner length follows
@@ -917,8 +946,8 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
917
946
  a `PostDesk`'s tray are the standard size. One exception, by the owner's decision: the stamp at a postcard's corner is
918
947
  the postcard's own size, 72 × 90 (`--post-corner-stamp-w`), in neither. `words` is not drawn on a stamp 96 wide or
919
948
  narrower, so at the standard size only `name` shows, and it is larger.
920
- - **Every stamp has a thin contact shadow** (2026-10-26): at every size, `xs` and a `StampOn` too, on a card or off it — paper a hair off
921
- its ground, so its edge shows on any ground, a white one included (knob `--stamp-shadow`, a hair lighter than `--shadow-contact`). By default it is
949
+ - **Every stamp has a thin contact shadow** (2026-10-26; darker and sharper, Lh 2026-10-28): at every size, `xs` and a `StampOn` too, on a card or off it — paper a hair off
950
+ its ground, so its edge shows on any ground, a white one included (knob `--stamp-shadow`; sharper and darker than `--shadow-contact`). A framed stamp's is black; a `frame={false}` stamp's is its own tone under a grey (`--stamp-tone-shadow-bg`), and black only if a theme sets `--stamp-shadow`. By default it is
922
951
  the only shadow a stamp has (Lh 2026-10-26: contact only); `--stamp-drop` adds a lift off a card, none by default. What follows is where a stamp gets more.
923
952
  - **A stamp on a card lies flat** (Lh 2026-10-24): no lift, only the contact shadow, at every size — a `FeedCard`'s lead, a
924
953
  `Foot` row's, `xs`. A stamp in a card's head is glued down (Lh 2026-10-25): plain, `under` or `sm`, a hair of shadow
@@ -930,6 +959,9 @@ it up. cardds draws the paper; the pictures, their words and which stamp a membe
930
959
  is how wide each is (default `--rule-w`), `--stamp-place-gap` the distance from one dot's centre to the next
931
960
  (default three `--sp-0`), and a `--stamp-place-dash` above 0 stretches each dot into a round-ended dash. Its corner is
932
961
  `--stamp-place-radius`. The dots' outer edge is the box's edge whatever their width.
962
+ At a LEAD's place it is the small stamp's size (`--stamp-sm-size`, 48 × 60; Lh 2026-10-28), an Icon inside: in an
963
+ `AvatarStack` leading a `Head` or a `Row` (`<Row><AvatarStack><StampPlace><Icon name="stamp" /></StampPlace></AvatarStack><Words
964
+ title meta /></Row>`), or as a `FeedCard`'s `lead` (story `Stamp · PlaceAsLead`).
933
965
  - **`StampBook`** + **`StampCell`** — the album page: cells three across on an album ground, a `label` under each stamp,
934
966
  the free places drawn up to `places`. A cell with `onClick` is a button; `on` marks it pressed. Each stamp stands in
935
967
  the middle of its third. `bare` is the page with no ground, no padding and no round. `strip` is one line of stamps
@@ -1401,10 +1433,18 @@ Icons come from `icons.svg` (Lucide, ISC — monochrome stroke, currentColor):
1401
1433
  `.icon` = `--icon` (1.75rem / 28px), `.icon--xs` = 1rem inside captions and chips,
1402
1434
  `.icon--lg` = 2rem for empty states. Never raw emoji/unicode glyphs — they
1403
1435
  render as colored emoji on phones. Add icons by appending `<symbol>`s
1404
- (grab from lucide.dev, paste path data).
1436
+ (grab from lucide.dev, paste path data). Among the stock names: `reply` (Lucide's, Lh 2026-10-28: answer this message),
1437
+ beside `megaphone`, `message-circle`, `heart` (story `Icon · All` shows every name).
1405
1438
 
1406
1439
  Touch targets: `--tap` 3rem (`.icon-btn`), `--tap-sm` 2.75rem floor (`.icon-btn--sm`,
1407
- selects, add-row), `--tap-lg` 3.5rem for hero controls. `.btn` ≥ `--btn-h` (3.25rem).
1440
+ selects, add-row), `--tap-lg` 3.5rem for hero controls. `.btn` ≥ `--btn-h` (3.25rem); `Btn sm` (`.btn--sm`) is one
1441
+ small tap tall (`--form-tap-sm`, 2.75rem, the floor; knobs `--btn-sm-size`, `--btn-sm-pad-x`, `--btn-sm-font-size`), the small
1442
+ words — a worded move at a card head's end (`<Head><Words title meta /><Btn sm primary>Keep</Btn></Head>`, story `Btn · Small`).
1443
+
1444
+ **Something sent out from a button** (`Btn sending`, `IconBtn sending`, Lh 2026-10-28): for `--motion-send` (0.7 s) the
1445
+ button's icon swells and tips forward and two rings spread from its edge (knob `--btn-sending-ink`, default the accent).
1446
+ Controlled: the app sets `sending` at the press, and on `onSent` (once, when it ends; at once under reduced motion,
1447
+ where nothing moves) turns it off and swaps the icon for a check or puts the sent thing in. Stories `IconBtn · Sending`, `Btn · Sending`.
1408
1448
  Everything thumb-first.
1409
1449
 
1410
1450
  The two bars across the top of a screen — `.topbar` (screen title) and
@@ -1427,3 +1467,7 @@ or the chevron opens the whole text there (the chevron turns up), a tap folds it
1427
1467
  Only a text that does not fit is a control (`role="button"`, `aria-expanded`, Enter/Space): so it never turns
1428
1468
  a turning card, and a card holding it beside one foot button is no longer pressed whole. A text that fits is
1429
1469
  only read. `open` + `onOpenChange`, or `defaultOpen`. `--text-scroll-size` (a length) fixes the closed box.
1470
+
1471
+ **Words cut at N lines, nothing to open** (`Text lines={1…6}`, Lh 2026-10-28): any level, the words stop at the
1472
+ last line's end, no chevron, no tap — a note's, a message's or a post's words in a feed, the whole text a tap away
1473
+ elsewhere. In a `Bubble`: `<Bubble><Text level="body" as="span" lines={3}>…</Text></Bubble>` (story `Text · Lines`).
package/icons.svg CHANGED
@@ -41,6 +41,7 @@
41
41
  <symbol id="upload" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/></symbol>
42
42
  <symbol id="star" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></symbol>
43
43
  <symbol id="pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></symbol>
44
+ <symbol id="reply" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 18v-2a4 4 0 0 0-4-4H4"/><path d="m9 17-5-5 5-5"/></symbol>
44
45
  <symbol id="trash" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></symbol>
45
46
  <symbol id="search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></symbol>
46
47
  <symbol id="image" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></symbol>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.157",
3
+ "version": "0.7.159",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev).",