@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.
- package/CHANGELOG.md +37 -0
- package/css/actions.css +37 -4
- package/css/base.css +14 -3
- package/css/card.css +5 -0
- package/css/forms.css +38 -1
- package/css/lists.css +4 -0
- package/css/parts.css +5 -1
- package/css/sheet.css +5 -2
- package/css/stamp.css +21 -17
- package/css/tokens.css +1 -0
- package/dist/actions/Btn.d.ts +12 -3
- package/dist/actions/Btn.js +6 -3
- package/dist/actions/BtnGroup.d.ts +3 -2
- package/dist/actions/BtnGroup.js +3 -3
- package/dist/actions/BtnRow.d.ts +6 -2
- package/dist/actions/BtnRow.js +3 -3
- package/dist/actions/IconBtn.d.ts +8 -2
- package/dist/actions/IconBtn.js +4 -2
- package/dist/actions/LinkBlock.d.ts +9 -0
- package/dist/actions/LinkBlock.js +8 -0
- package/dist/actions/useSendOut.d.ts +4 -0
- package/dist/actions/useSendOut.js +15 -0
- package/dist/cardds.css +130 -28
- package/dist/cards/Card.d.ts +8 -1
- package/dist/cards/CardParts.d.ts +8 -0
- package/dist/cards/CardParts.js +5 -0
- package/dist/catalog.json +1 -1
- package/dist/forms/Field.d.ts +13 -1
- package/dist/forms/Field.js +55 -6
- package/dist/forms/MessageBar.d.ts +9 -2
- package/dist/forms/MessageBar.js +6 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lists/Bubble.d.ts +859 -4
- package/dist/lists/Bubble.js +18 -4
- package/dist/lists/Row.d.ts +4 -0
- package/dist/media/MapArea.d.ts +7 -1
- package/dist/media/MapArea.js +5 -3
- package/dist/parts/Foot.d.ts +8 -2
- package/dist/parts/Foot.js +4 -3
- package/dist/scaffold/Page.d.ts +3 -1
- package/dist/scaffold/Page.js +3 -1
- package/dist/sheets/SheetSteps.js +3 -3
- package/dist/stamp/Stamp.d.ts +3 -1
- package/dist/stamp/Stamp.js +4 -2
- package/dist/state.d.ts +2 -2
- package/dist/state.js +4 -4
- package/dist/type/Text.d.ts +5 -1
- package/dist/type/Text.js +3 -2
- package/dist/type/icons.d.ts +1 -1
- package/dist/type/icons.js +2 -2
- package/docs/reference.md +52 -8
- package/icons.svg +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
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.159 — 2026-10-28
|
|
6
|
+
|
|
7
|
+
A pick and a search on ONE line in a sheet step: a `Field` folds into a button and opens out of it, a `BtnGroup look="choice"` can be as wide as its words, and a `CtaPack` holds them both outside a `Page`.
|
|
8
|
+
|
|
9
|
+
Components: Field, BtnGroup, CtaPack, SheetStep
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`Field fold`** (timebank, Lh 2026-10-28: the place step lost a line to a full-width search field). `fold="ค้นหาสถานที่"` = the words of the button the field stands as; its `icon` leads them. A tap opens the field out of the button (the cursor in it, the keyboard up, inside the same tap); Escape, or leaving it empty, asks to fold it back. Controlled like an input: `open` + `onOpenChange`, or `defaultOpen`. In a `CtaPack` the button stands at the line's end, square with the icon alone when the words have no room (the words stay its spoken name), and the open field covers the whole line. Rows of offers under it (`Rows`) are the app's, as before. One line only (ignored with `rows`). Before → after: `<Field action={search}/>` on its own line → `<CtaPack><BtnGroup look="choice" form …/><Field fold="…" icon="search" open={open} onOpenChange={setOpen} action={search}/></CtaPack>`.
|
|
13
|
+
- **`BtnGroup look="choice" form`** — each word as wide as it is, the frame as wide as them all (centred alone in a step, the line's first piece in a `CtaPack`). Before → after: `form` was the icon frame's only; a choice always filled its width.
|
|
14
|
+
- **`CtaPack` outside a `Page`** — the line of controls (each its own width, wrapping) now works anywhere, a `SheetStep` included. Knob `--cta-pack-gap`. In a Page nothing moves.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- **`SheetStep`'s Enter**: Enter in a field whose own `onKeyDown` called `preventDefault()` (a search) no longer also presses the step's button, and a button with `aria-expanded` (a folded Field's) is never taken for the step's button.
|
|
18
|
+
|
|
19
|
+
## 0.7.158 — 2026-10-28
|
|
20
|
+
|
|
21
|
+
The home-feed cards without hand CSS: wrap buttons, a small Btn, words cut at N lines, a picture beside words, a pressed and a highlighted Bubble, a reply-to quote, a send-out on a button, a link block, a still map's media corner, a stamp place at a lead's size.
|
|
22
|
+
|
|
23
|
+
Components: all
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **`Foot wrap` / `BtnRow wrap`, with `end`** (timebank, Lh 2026-10-28). Before → after: a foot's Btns shared the line → `<Foot wrap end>`: each Btn as wide as its words, its own side padding, wrapping, at the end. Stories `Foot · Wrap`, `BtnRow · Wrap`.
|
|
27
|
+
- **`--foot-crowd-pad-x`**: the side padding a foot of three or more Btns narrows to (was fixed at `--sp-2`, still the default; a `wrap` foot never narrows).
|
|
28
|
+
- **`Btn sm`**: one small tap tall (44, the floor), the small words — a worded move at a head's end. Knobs `--btn-sm-size`, `--btn-sm-pad-x`, `--btn-sm-font-size`. Story `Btn · Small`.
|
|
29
|
+
- **`Text lines={1…6}`**: words cut at N lines, no chevron, no tap. Story `Text · Lines`.
|
|
30
|
+
- **`MediaBeside`**: words with a small square picture at their end (`media`). Knobs `--media-beside-size`, `--media-beside-gap`. Story `MediaBeside · Default`.
|
|
31
|
+
- **`Bubble href` / `onClick`** (a link, or role=button with Enter/Space; both dim under the finger) and **`Bubble highlighted`** (a ring round the message looked at, knob `--bubble-highlighted-ink`). Story `Bubble · Pressed`.
|
|
32
|
+
- **Icon `reply`** (Lucide's).
|
|
33
|
+
- **`MessageBar quote` + `onQuoteClose` + `quoteCloseLabel`**: a reply-to line over the box with a ✕, controlled. Knobs `--message-bar-quote-ink`, `--message-bar-quote-rule-ink`. Story `MessageBar · ReplyTo`.
|
|
34
|
+
- **`Btn sending` / `IconBtn sending` + `onSent`**: something goes out from the button (icon tips forward, two rings spread; token `--motion-send` 0.7s, knob `--btn-sending-ink`); `onSent` once at the end, at once under reduced motion. Stories `IconBtn · Sending`, `Btn · Sending`.
|
|
35
|
+
- **`LinkBlock`**: a few pieces of a card's content as one link (a still map and its place row) — not a card, not a row; the card's gap, no frame, dims under the finger. Knob `--link-block-gap`. Story `LinkBlock · PlaceInCard`.
|
|
36
|
+
- **`MapArea still`**: a still preview of one point — no gesture owned, no touch taken; the mark centred and named. `Card` and `Row` take `target` / `rel` beside `href`. Story `MapArea · Still`.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- **`MapArea inline`'s corner**: `--map-radius` falls back to `--r-media` (was the pill's `--r-chip`). A theme that wants the pill sets `--map-radius: var(--r-chip)`.
|
|
40
|
+
- **`StampPlace` at a lead's place** (in an `AvatarStack`, a FeedCard's `lead`) is the small stamp's size, 48 × 60 (was the full 96). Story `Stamp · PlaceAsLead`.
|
|
41
|
+
|
|
5
42
|
## 0.7.157 — 2026-10-28
|
|
6
43
|
|
|
7
44
|
A `Head` that leads with a `Lead`, an `Avatar` or an `AvatarStack`, then `Words`, draws as a FeedCard's head.
|
package/css/actions.css
CHANGED
|
@@ -156,17 +156,44 @@
|
|
|
156
156
|
.btn--warn { --dark: var(--action-dark); color: var(--btn-warn-ink, var(--signal-warn)); } /* a move to think twice about ("cancel the request"): the signal set's warning, on the button's own paper — its side, not the card's */
|
|
157
157
|
.btn--block { width: 100%; }
|
|
158
158
|
.btn--form { justify-self: center; align-self: center; margin-inline: auto; padding-inline: var(--btn-form-pad-x, calc(var(--sp-base) * 14.5)); /* 58px: "ส่งรหัส OTP" at 213px, 20% longer than at 40px sides (Lh 2026-09-25) */ } /* a form's button: its words + wide sides, centred in a grid (a step) or a block (Lh 2026-09-25) */
|
|
159
|
+
/* sm (Btn sm, Lh 2026-10-28): one small tap tall (the touch floor, 44), the small words, closer sides — a worded move at a card head's end */
|
|
160
|
+
.btn--sm { min-height: var(--btn-sm-size, var(--form-tap-sm)); padding-block: var(--sp-1); padding-inline: var(--btn-sm-pad-x, var(--sp-4)); font-size: var(--btn-sm-font-size, var(--fs-sm)); }
|
|
159
161
|
/* xl: the one giant call to action in a tinted card ("Taxi!") */
|
|
160
162
|
.btn--xl { min-height: var(--btn-xl-h); font: var(--fw-heavy) var(--fs-3xl) / var(--lh-solid) var(--font-display); letter-spacing: var(--track-h1); border-radius: var(--r-card); padding-inline: var(--sp-8); }
|
|
161
163
|
/* disabled keeps the slot — a control that vanishes moves everything else,
|
|
162
164
|
and a pager whose "previous" disappeared on page one would shift the bar
|
|
163
165
|
under the thumb on every page */
|
|
166
|
+
/* SENDING (Btn / IconBtn sending, Lh 2026-10-28): something goes OUT from the button — for --motion-send its icon swells and tips forward,
|
|
167
|
+
and two rings spread from its edge one after the other (--btn-sending-ink, the accent); then the app swaps the icon or puts the sent thing in.
|
|
168
|
+
Under reduced motion nothing moves (the app is told at once) */
|
|
169
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
170
|
+
:is(.btn, .icon-btn).is-sending { animation: send-out var(--motion-send) var(--ease-out); }
|
|
171
|
+
:is(.btn, .icon-btn).is-sending > .icon { animation: send-out-call var(--motion-send) ease-in-out; }
|
|
172
|
+
}
|
|
173
|
+
@keyframes send-out {
|
|
174
|
+
from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
175
|
+
60% { box-shadow: 0 0 0 var(--sp-3) transparent, 0 0 0 var(--sp-1) color-mix(in srgb, var(--btn-sending-ink, var(--accent)) 30%, transparent); }
|
|
176
|
+
to { box-shadow: 0 0 0 var(--sp-5) transparent, 0 0 0 var(--sp-4) transparent; }
|
|
177
|
+
}
|
|
178
|
+
@keyframes send-out-call {
|
|
179
|
+
0% { transform: none; }
|
|
180
|
+
30% { transform: scale(1.35) rotate(-14deg); }
|
|
181
|
+
55% { transform: translateX(var(--sp-1)) scale(1.15) rotate(-8deg); opacity: 0.5; }
|
|
182
|
+
100% { transform: none; opacity: 1; }
|
|
183
|
+
}
|
|
184
|
+
/* link block (LinkBlock, Lh 2026-10-28): a few pieces of a card's content as one link — stacked with the card's gap, the holder's ink, no underline,
|
|
185
|
+
no frame, no padding; the DIM press answer (below) */
|
|
186
|
+
.link-block { display: grid; gap: var(--link-block-gap, var(--card-gap)); color: inherit; text-decoration: none; }
|
|
164
187
|
/* a row of buttons sharing the width (twin CTAs inside a card) */
|
|
165
188
|
.btn-row { display: flex; gap: var(--btn-row-gap, var(--sp-2)); }
|
|
166
189
|
/* 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,
|
|
167
190
|
so a card's foot stays its status line */
|
|
168
191
|
.btn-row--round { justify-content: center; align-items: center; gap: var(--btn-row-gap, var(--sp-6)); }
|
|
169
192
|
.btn-row > .btn { flex: 1; min-width: 0; }
|
|
193
|
+
/* wrap (BtnRow wrap): each Btn as wide as its words, wrapping; end: they stand at the row's end */
|
|
194
|
+
.btn-row--wrap { flex-wrap: wrap; }
|
|
195
|
+
.btn-row--wrap > .btn { flex: 0 0 auto; }
|
|
196
|
+
.btn-row--end { justify-content: flex-end; }
|
|
170
197
|
/* joined (BtnRow round joined, Foot round joined — Lh 2026-10-24, was BtnTrio): a dotted link between each two round buttons, a closer gap */
|
|
171
198
|
.btn-row--joined { gap: var(--btn-trio-gap, var(--sp-3)); }
|
|
172
199
|
.btn-trio__dots {
|
|
@@ -297,6 +324,10 @@
|
|
|
297
324
|
background: var(--btngroup-choice-on-bg, var(--accent));
|
|
298
325
|
color: var(--btngroup-choice-on-ink, var(--on-accent));
|
|
299
326
|
}
|
|
327
|
+
/* --form (Lh 2026-10-28): each word as wide as it is, the frame as wide as them all, in the middle of a grid column (a step) as a
|
|
328
|
+
`.btn--form`; in a .cta-pack it is just the line's first piece */
|
|
329
|
+
.segment--choice.segment--form { justify-self: center; max-width: 100%; }
|
|
330
|
+
.segment--choice.segment--form > .segment__item { flex: 0 1 auto; white-space: nowrap; padding-inline: var(--btngroup-choice-form-pad-x, var(--sp-4)); }
|
|
300
331
|
.segment--choice > .segment__item:active:not(:disabled) { scale: 1; opacity: var(--press-dim); } /* a part of one frame DIMS, it never shrinks inside it */
|
|
301
332
|
|
|
302
333
|
/* ---- bottom CTA pack: the screen's bottom (Screen `bottom`) ----
|
|
@@ -436,7 +467,9 @@
|
|
|
436
467
|
button (src/cards/cardGo.ts). It is in the DIM pointer and :active lists only — the focus ring and the disabled look stay the
|
|
437
468
|
button's, the card itself is never focused or disabled.
|
|
438
469
|
.t-expand--more (Lh 2026-10-25) = a `Text expand` that does not fit: the whole box opens or folds. It is WORDS, so it neither
|
|
439
|
-
dims nor gives: its ink never changes under the finger (Lh 2026-10-25), the opening is the answer. Pointer only (below).
|
|
470
|
+
dims nor gives: its ink never changes under the finger (Lh 2026-10-25), the opening is the answer. Pointer only (below).
|
|
471
|
+
.bubble--press (Lh 2026-10-28) = a chat `Bubble` that is a link (`href`) or pressed (`onClick`): a message is as wide as a row, so it DIMS.
|
|
472
|
+
.link-block (Lh 2026-10-28) = a `LinkBlock`, a few pieces of a card's content as one link: as wide as the card, it DIMS. */
|
|
440
473
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
|
|
441
474
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
442
475
|
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .count-in__cancel) {
|
|
@@ -444,7 +477,7 @@
|
|
|
444
477
|
touch-action: manipulation;
|
|
445
478
|
transition: scale var(--motion-press) var(--ease-out);
|
|
446
479
|
}
|
|
447
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge) {
|
|
480
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block) {
|
|
448
481
|
cursor: pointer;
|
|
449
482
|
touch-action: manipulation;
|
|
450
483
|
transition: opacity var(--motion-press) var(--ease-out);
|
|
@@ -460,7 +493,7 @@
|
|
|
460
493
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
|
|
461
494
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
462
495
|
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
|
|
463
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
496
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .feed-card--small, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
|
|
464
497
|
/* SHADE — what has something BEHIND it (a peeked sheet over the pile, a postcard's face over its back, a post letter's sheet over the other) must not turn see-through:
|
|
465
498
|
it darkens a touch instead (--press-shade) */
|
|
466
499
|
:where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))) { cursor: pointer; touch-action: manipulation; transition: filter var(--motion-press) var(--ease-out); }
|
|
@@ -470,7 +503,7 @@
|
|
|
470
503
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
|
471
504
|
a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):focus-visible,
|
|
472
505
|
:where(.chip--pick, .tile--pick, label.btn, label.row, .toggle-field):has(:focus-visible), :where(label.card:has(> input[type="radio"]:focus-visible)) { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
473
|
-
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .feed-card--small, .toggle-field, .post-box__edge, .t-expand--more):not(label, .toggle-field):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
506
|
+
:where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .feed-card--small, .toggle-field, .post-box__edge, .t-expand--more, .bubble--press, .link-block):not(label, .toggle-field):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
474
507
|
/* disabled: no pointer anywhere; a control fades (a link and a row keep their own muted look) */
|
|
475
508
|
:where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
|
|
476
509
|
.float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
|
package/css/base.css
CHANGED
|
@@ -164,6 +164,14 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
164
164
|
.t-title { font: var(--type-title); margin: 0; --fs-self: var(--fs-title); }
|
|
165
165
|
.t-body { font: var(--type-body); margin: 0; }
|
|
166
166
|
.t-scroll { --_t-scroll-max: calc(var(--text-scroll-lines, 3.6) * 1lh); height: var(--text-scroll-size, auto); max-height: var(--text-scroll-size, var(--_t-scroll-max)); overflow: hidden; } /* the cut box of `Text expand`: plain, no border, no ground, no scroll; lh = the body's own line */
|
|
167
|
+
/* cut at N lines (Text lines, Lh 2026-10-28): no chevron, no tap, the words stop at the last line's end */
|
|
168
|
+
.t-lines { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
|
|
169
|
+
.t-lines--1 { -webkit-line-clamp: 1; line-clamp: 1; }
|
|
170
|
+
.t-lines--2 { -webkit-line-clamp: 2; line-clamp: 2; }
|
|
171
|
+
.t-lines--3 { -webkit-line-clamp: 3; line-clamp: 3; }
|
|
172
|
+
.t-lines--4 { -webkit-line-clamp: 4; line-clamp: 4; }
|
|
173
|
+
.t-lines--5 { -webkit-line-clamp: 5; line-clamp: 5; }
|
|
174
|
+
.t-lines--6 { -webkit-line-clamp: 6; line-clamp: 6; }
|
|
167
175
|
.t-expand { display: grid; } /* the box, and under it the chevron when the text does not fit */
|
|
168
176
|
.t-expand.is-open > .t-scroll { height: auto; max-height: none; } /* open: the whole text in place */
|
|
169
177
|
.t-expand__sign { justify-self: center; } /* the chevron: down = there is more, up = fold it */
|
|
@@ -221,13 +229,16 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
221
229
|
.page > .t-body { color: var(--page-body-ink, var(--on-surface)); max-width: 34ch; } /* full ink: a sentence is read, muted is for meta (Lh 2026-09-22 — the words on the base were grey and hard to read) */
|
|
222
230
|
/* an illustration among the words (Lh 2026-09-22): capped, so a tall picture never pushes the words under the bar;
|
|
223
231
|
(the walk's dots are NOT here — they are the Step's, after its Pages: step.css, Lh 2026-09-22) */
|
|
224
|
-
|
|
232
|
+
/* a cta-pack: controls on one line, each its own width, wrapping — under a Page's words, or in a sheet step (a pick beside a folded
|
|
233
|
+
Field, Lh 2026-10-28). It is the box an open .field-fold covers (forms.css), so it is positioned */
|
|
234
|
+
.cta-pack {
|
|
235
|
+
position: relative;
|
|
225
236
|
display: flex;
|
|
226
237
|
align-items: start; /* buttons keep their own height, never the row's */
|
|
227
|
-
gap: var(--sp-2);
|
|
228
|
-
margin-top: var(--sp-2);
|
|
238
|
+
gap: var(--cta-pack-gap, var(--sp-2));
|
|
229
239
|
flex-wrap: wrap;
|
|
230
240
|
}
|
|
241
|
+
.page .cta-pack { margin-top: var(--sp-2); }
|
|
231
242
|
|
|
232
243
|
/* ---- empty state: on-surface, centered, optional CTA below ---- */
|
|
233
244
|
.empty-state {
|
package/css/card.css
CHANGED
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
|
|
46
46
|
.card__media { border-radius: var(--card-media-radius, var(--r-media)); overflow: hidden; position: relative; } /* relative: corner badges */
|
|
47
47
|
.card__media > img { width: 100%; height: auto; object-fit: cover; }
|
|
48
|
+
/* media beside (MediaBeside, Lh 2026-10-28): the words, and at their end a small square picture, the media's corner, cropped to fill it */
|
|
49
|
+
.media-beside { display: grid; grid-template-columns: minmax(0, 1fr) var(--media-beside-size, calc(var(--tap) * 3 / 2)); gap: var(--media-beside-gap, var(--sp-3)); align-items: start; }
|
|
50
|
+
.media-beside__words { display: grid; gap: var(--sp-1); min-width: 0; }
|
|
51
|
+
.media-beside__pic { aspect-ratio: 1; border-radius: var(--r-media); overflow: hidden; }
|
|
52
|
+
.media-beside__pic > * { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
|
|
48
53
|
|
|
49
54
|
/* a JourneyBadge at the edge of the card's own first head (the date box in the top-left or top-right corner) keeps its corner concentric
|
|
50
55
|
with the card's: the card's corner (--r-card) less the room the padding leaves round it. journey.css reads it behind the theme's --tile-badge-radius,
|
package/css/forms.css
CHANGED
|
@@ -48,6 +48,30 @@
|
|
|
48
48
|
/* field with its action inside: date pick, send, go — the button sits flush right */
|
|
49
49
|
.field--action { padding-right: var(--sp-1); min-height: var(--field-action-min-h, var(--form-tap-lg)); }
|
|
50
50
|
|
|
51
|
+
/* ---- field-fold (Field fold, Lh 2026-10-28): the field folded into a button; opened, it grows out of the button's box to the whole width
|
|
52
|
+
of what it stands in, the button gone under it. Field measures the button (--_fold-w) and, in a .cta-pack, the line it stands on
|
|
53
|
+
(--_fold-y). Folded, the field is there but unseen and inert, so the tap can put the cursor in it inside the finger's own event ---- */
|
|
54
|
+
.field-fold { position: relative; display: grid; justify-items: start; }
|
|
55
|
+
.field-fold > .field {
|
|
56
|
+
position: absolute; inset-block-start: 0; inset-inline-start: 0;
|
|
57
|
+
width: var(--_fold-w, 100%); height: 100%; min-height: 0;
|
|
58
|
+
opacity: 0; pointer-events: none;
|
|
59
|
+
transition: width var(--motion-quick) var(--ease), opacity var(--motion-quick) var(--ease);
|
|
60
|
+
}
|
|
61
|
+
.field-fold--open > .field { width: 100%; opacity: 1; pointer-events: auto; }
|
|
62
|
+
.field-fold__btn { white-space: nowrap; } /* its words on one line, so Field reads the width they need */
|
|
63
|
+
.field-fold--open > .field-fold__btn { visibility: hidden; }
|
|
64
|
+
/* in a .cta-pack: the button at the line's end; open, the field covers the whole line it stands on, growing leftwards out of the button */
|
|
65
|
+
/* the fold takes the rest of the line, its button at the end and as tall as the line; with no room for the words beside the other
|
|
66
|
+
controls (Field's measure: --tight) the button is the icon alone, square, the words still its spoken name */
|
|
67
|
+
.cta-pack > .field-fold { position: static; flex: 1 1 0; min-width: var(--form-tap); justify-items: end; align-self: stretch; }
|
|
68
|
+
.cta-pack > .field-fold > .field-fold__btn { min-height: var(--form-tap); padding-block: 0; padding-inline: var(--field-fold-pad-x, var(--sp-4)); }
|
|
69
|
+
.cta-pack > .field-fold > .field { inset-block-start: var(--_fold-y, 0); inset-inline: auto 0; height: var(--_fold-h, auto); }
|
|
70
|
+
.field-fold--tight > .field-fold__btn { padding-inline: calc((var(--form-tap) - var(--icon-xs)) / 2); } /* square on the line: a tap wide round its icon */
|
|
71
|
+
.field-fold--tight .field-fold__words { position: absolute; width: var(--px); height: var(--px); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
72
|
+
.cta-pack:has(> .field-fold--open) > :not(.field-fold) { visibility: hidden; transition: visibility 0s var(--ease-linear) var(--motion-quick); }
|
|
73
|
+
@media (prefers-reduced-motion: reduce) { .field-fold > .field { transition: none; } }
|
|
74
|
+
|
|
51
75
|
/* colored palettes drop the visible outline elsewhere — fields keep one */
|
|
52
76
|
[data-palette] .field:not(:has(:focus)) { border-color: color-mix(in srgb, currentColor 25%, transparent); }
|
|
53
77
|
|
|
@@ -139,7 +163,20 @@
|
|
|
139
163
|
it rides with the bar above the keyboard. A written name is one piece: .mention-under is a copy of the words in the textarea's
|
|
140
164
|
own cell and class (same font, padding, wrap), its ink clear, drawn BEHIND the transparent textarea; only the names' marks show. */
|
|
141
165
|
.mention-list { flex: 0 0 100%; order: -1; max-height: calc(var(--tap) * 4.5); /* the fifth name shows half: the list scrolls */ }
|
|
142
|
-
.message-bar:has(> .mention-list) { flex-wrap: wrap; }
|
|
166
|
+
.message-bar:has(> :is(.mention-list, .message-bar__quote)) { flex-wrap: wrap; }
|
|
167
|
+
/* the reply-to quote (MessageBar quote, Lh 2026-10-28): a line of its own over the box, a rule at its start, cut at one line, its ✕ at the end */
|
|
168
|
+
.message-bar__quote {
|
|
169
|
+
flex: 0 0 100%;
|
|
170
|
+
order: -1;
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: var(--sp-2);
|
|
174
|
+
padding-inline-start: var(--sp-3);
|
|
175
|
+
border-inline-start: var(--sp-1) solid var(--message-bar-quote-rule-ink, var(--accent));
|
|
176
|
+
font: var(--type-caption);
|
|
177
|
+
color: var(--message-bar-quote-ink, var(--card-muted)); /* the muted words of whatever it stands on, as .t-muted */
|
|
178
|
+
}
|
|
179
|
+
.message-bar__quote-words { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
143
180
|
.mention-box { display: grid; }
|
|
144
181
|
.mention-box > * { grid-area: 1 / 1; }
|
|
145
182
|
.mention-under {
|
package/css/lists.css
CHANGED
|
@@ -125,6 +125,10 @@
|
|
|
125
125
|
.bubble__meta { display: flex; align-items: center; gap: var(--bubble-meta-gap, var(--sp-1)); font: var(--bubble-meta-font, var(--type-caption)); color: var(--bubble-meta-ink, var(--card-muted)); }
|
|
126
126
|
.bubble--right > .bubble__meta { justify-self: end; }
|
|
127
127
|
.bubble__meta > .icon { --icon-ink: var(--bubble-meta-icon-ink, var(--accent-ink)); }
|
|
128
|
+
/* a bubble that is a link or is pressed (Bubble href / onClick, Lh 2026-10-28): the press answer is the DIM (actions.css), no underline */
|
|
129
|
+
a.bubble { color: inherit; text-decoration: none; }
|
|
130
|
+
/* highlighted (Bubble highlighted): the message the member is looking at, a ring a hair outside its body */
|
|
131
|
+
.bubble--highlighted > .bubble__body { outline: var(--sp-0) solid var(--bubble-highlighted-ink, var(--accent)); outline-offset: var(--sp-0); }
|
|
128
132
|
|
|
129
133
|
/* ---- timeline: a hairline with date chips, entries to the right ----
|
|
130
134
|
<ol class="timeline"><li class="timeline__item"><span class="timeline__mark">Wed 14</span><p class="t-body">…</p></li>…</ol> */
|
package/css/parts.css
CHANGED
|
@@ -422,7 +422,11 @@
|
|
|
422
422
|
Knobs --foot-gap, --foot-ink, --foot-link-gap. An outer governs a foot through those knobs or a selector naming both, written
|
|
423
423
|
below under the outer's name (Lh 2026-10-21). ---- */
|
|
424
424
|
.foot { display: flex; gap: var(--foot-gap, var(--sp-2)); align-items: center; color: var(--foot-ink, inherit); }
|
|
425
|
-
.foot:has(> :nth-child(3)) > .btn { --btn-pad-x: var(--sp-2); }
|
|
425
|
+
.foot:not(.foot--wrap):has(> :nth-child(3)) > .btn { --btn-pad-x: var(--foot-crowd-pad-x, var(--sp-2)); } /* knob: a theme that keeps one pill shape sets it to the Btn's own side padding */
|
|
426
|
+
/* wrap (Foot wrap): each Btn as wide as its words, its own side padding, from the start, wrapping; end (Foot end): they stand at the foot's end */
|
|
427
|
+
.foot--wrap { flex-wrap: wrap; justify-content: flex-start; row-gap: var(--foot-gap, var(--sp-2)); }
|
|
428
|
+
.foot--wrap > .btn { flex: 0 0 auto; }
|
|
429
|
+
.foot--end { justify-content: flex-end; }
|
|
426
430
|
/* a small link under the buttons (Foot link — Lh 2026-09-23, as the ActionBar's ctaLink): the row wraps, the link takes a
|
|
427
431
|
whole short row of its own, centred — it never shares the buttons' line */
|
|
428
432
|
.foot--link { flex-wrap: wrap; align-content: end; row-gap: var(--foot-link-gap, var(--sp-1)); }
|
package/css/sheet.css
CHANGED
|
@@ -354,14 +354,17 @@
|
|
|
354
354
|
--_band-centre: 50%;
|
|
355
355
|
position: relative;
|
|
356
356
|
min-height: var(--map-inline-h, calc(var(--map-ring) * 3 / 2));
|
|
357
|
-
/* a thin grey frame, the joined BtnGroup look="choice"'s edge (actions.css .segment--choice): its width, its ink
|
|
357
|
+
/* a thin grey frame, the joined BtnGroup look="choice"'s edge (actions.css .segment--choice): its width, its ink; the media's corner; the map clipped to it */
|
|
358
358
|
border: var(--border-w) solid var(--map-area-edge-ink, var(--outline));
|
|
359
|
-
border-radius: var(--map-radius, var(--r-
|
|
359
|
+
border-radius: var(--map-radius, var(--r-media)); /* the media corner, as a picture in a card (Lh 2026-10-28: was the pill's) */
|
|
360
360
|
overflow: clip;
|
|
361
361
|
}
|
|
362
362
|
.map--bleed { margin-inline: calc(-1 * var(--card-pad, 0rem)); border-radius: 0; border-inline: 0; } /* edge to edge is a band, and a band has no corner; --map-radius is for the box in the inset */
|
|
363
363
|
/* a map that is a body's only child fills it; the body turns to a column for it (parts.css) */
|
|
364
364
|
.body > .map--inline:only-child { flex: 1 0 auto; }
|
|
365
|
+
/* a STILL map (`.map--still`): a preview of one point, not a place to choose — it owns no gesture (no data-gestures="own", so the page's
|
|
366
|
+
own touch-action) and takes no touch: a finger on it scrolls the page, a tap is a tap on what holds it (a card that links out). The mark keeps its name */
|
|
367
|
+
.map--still, .map--still * { pointer-events: none; }
|
|
365
368
|
|
|
366
369
|
/* ---- map pick: a place on the map the member taps to choose it (Lh 2026-10-17) ----
|
|
367
370
|
<label class="map-pick" style="top: 30%; left: 40%"><input type="radio" name="meet" value="library">
|
package/css/stamp.css
CHANGED
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
display: block;
|
|
36
36
|
container-type: inline-size;
|
|
37
37
|
color: var(--stamp-ink, var(--ink-onlight));
|
|
38
|
-
/* the contact shadow every stamp has (Lh 2026-10-26: contact only
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
/* the contact shadow every stamp has, framed or not (Lh 2026-10-26: contact only; Lh 2026-10-28: darker, sharper — a quarter of the blur, about
|
|
39
|
+
twice the opacity, it was 0 0 var(--border-w) rgb(0 0 0 / 0.28); a sliver of blur stays, a 0-offset drop-shadow with none draws nothing):
|
|
40
|
+
its edge on any ground, a white one too; black as the scrim, no color-mix (iOS 16.4) */
|
|
41
|
+
--_contact: 0 0 calc(var(--border-w) / 4) rgb(0 0 0 / 0.6);
|
|
42
|
+
filter: drop-shadow(var(--stamp-shadow, var(--_contact))) drop-shadow(var(--stamp-drop, 0 0 0 transparent)); /* drop-shadow follows the teeth; a box-shadow would draw the rectangle. The first is the contact shadow every stamp keeps, the second a lift a theme may add (--stamp-drop; none by default, Lh 2026-10-26 — it was --shadow-paper) */
|
|
42
43
|
rotate: var(--stamp-turn, none);
|
|
43
44
|
animation: var(--stamp-arrive, none);
|
|
44
45
|
}
|
|
@@ -55,14 +56,15 @@
|
|
|
55
56
|
/* the white frame: the paper's own colour round the picture. --frameless (`frame={false}`): the paper takes the picture's tone class instead,
|
|
56
57
|
so the tone runs out to the teeth — the teeth, 4:5, shadow, pictures and words unchanged (Lh 2026-10-26: a stamp is always perforated) */
|
|
57
58
|
.stamp:not(.stamp--frameless) > .stamp__paper { background-color: var(--stamp-paper-bg, var(--stamp-paper)); }
|
|
58
|
-
/* a frameless stamp
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.stamp
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
59
|
+
/* no rim round a frameless stamp's teeth (Lh 2026-10-28: the paper-coloured rim of 0.7.149 read as a white edge round a full-colour stamp):
|
|
60
|
+
the tone runs out to the teeth. Its contact shadow is its own tone made dusky, not black (Lh 2026-10-28): a second punched paper under
|
|
61
|
+
the first (.stamp__shade, drawn only when frameless) wears the tone class, a grey painted OVER the tone as a background layer (a real
|
|
62
|
+
overlay, no color-mix — iOS 16.4), blurred as the black one is so its fringe shows round the teeth. Knob --stamp-tone-shadow-bg: the grey
|
|
63
|
+
laid over the tone (a darker or lighter shade; transparent = the bare tone). The black contact shadow is off here, unless a theme sets
|
|
64
|
+
--stamp-shadow */
|
|
65
|
+
.stamp--frameless { --_contact: 0 0 0 transparent; --_tone-shade: rgb(0 0 0 / 0.5); }
|
|
66
|
+
.stamp__shade { position: absolute; inset: 0; filter: blur(calc(var(--border-w) / 4)); }
|
|
67
|
+
.stamp__shade > .stamp__paper { background-image: linear-gradient(var(--stamp-tone-shadow-bg, var(--_tone-shade)) 0 0); }
|
|
66
68
|
.stamp__pic { position: absolute; inset: var(--stamp-frame, 8cqw); overflow: hidden; } /* the paper's frame round the picture; the ground is the tone class's */
|
|
67
69
|
|
|
68
70
|
/* the pictures, placed by COUNT: where, how wide, how far turned — the layout is the stamp's look, never the app's.
|
|
@@ -101,7 +103,7 @@
|
|
|
101
103
|
Too small for words: it is bare whatever it is handed. Only the contact shadow (--stamp-shadow): it lies flat in the line, its edge still seen. The teeth are every stamp's (8 across,
|
|
102
104
|
10 down), and the frame round the picture wider to clear them. Several, lapped, with a "+8": AvatarStack (below).
|
|
103
105
|
<span class="stamp stamp--1 stamp--xs">…</span> */
|
|
104
|
-
.stamp--xs { width: var(--stamp-xs-size, var(--stamp-xs)); flex: none; margin-inline: 0; filter:
|
|
106
|
+
.stamp--xs { width: var(--stamp-xs-size, var(--stamp-xs)); flex: none; margin-inline: 0; filter: drop-shadow(var(--stamp-shadow, var(--_contact))); }
|
|
105
107
|
.stamp--xs .stamp__pic { inset: var(--stamp-frame, 12cqw); }
|
|
106
108
|
/* held: the stamp keeps its box and draws nothing (visibility, never display or a size of its own) — shown later in the same box, nothing beside it moves */
|
|
107
109
|
.stamp--held { visibility: hidden; }
|
|
@@ -247,12 +249,14 @@
|
|
|
247
249
|
/* the SMALL stamp, 48 × 60 whatever its holder's size, in the three places that hold it: stuck on a surface (a note), lapped in an avatar stack,
|
|
248
250
|
leading a feed card's head. The stamp carries the size and the `.stamp-on` box is as wide as its stamp */
|
|
249
251
|
.stamp-on > .stamp, .avatar-stack > .stamp, .feed-card__lead > .stamp { width: var(--stamp-sm-size, var(--tap)); }
|
|
252
|
+
/* the empty PLACE for a stamp at a lead's size (Lh 2026-10-28): in an avatar stack or a feed card's lead it is the small stamp's size too, an Icon inside */
|
|
253
|
+
.avatar-stack > .stamp-place, .feed-card__lead > .stamp-place { width: var(--stamp-sm-size, var(--tap)); flex: none; margin-inline: 0; }
|
|
250
254
|
.stamp-on > .stamp { max-width: none; }
|
|
251
255
|
/* --main: the same stuck stamp at the stamp's MAIN size, 96 × 120 (--stamp-size), to cover what it lies on (the owner's call, 2026-10-11: the home's note).
|
|
252
256
|
After the rule above, at the same weight: `main` is the one place a stuck stamp reads --stamp-size. */
|
|
253
257
|
.stamp-on--main > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); }
|
|
254
258
|
.stamp-on--under { top: var(--card-pad, 0); right: var(--card-pad, 0); left: auto; translate: none; z-index: var(--z-under); pointer-events: none; } /* the card's top right corner, below everything the card holds */
|
|
255
|
-
.stamp-on--under > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); filter:
|
|
259
|
+
.stamp-on--under > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); filter: drop-shadow(var(--stamp-shadow, var(--_contact))); }
|
|
256
260
|
.stamp-on--move { will-change: transform; } /* its own layer: Safari left the stamp's shadow behind as a trail along the drag when it was painted with the note (seen on the simulator, 2026-10-07) */
|
|
257
261
|
.stamp-on--move { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: scale var(--motion-press) var(--ease-out); }
|
|
258
262
|
.stamp-on--move:focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
@@ -312,7 +316,7 @@
|
|
|
312
316
|
width: var(--appbar-stamp-size, var(--_fit));
|
|
313
317
|
flex: none;
|
|
314
318
|
margin-inline: 0;
|
|
315
|
-
filter:
|
|
319
|
+
filter: drop-shadow(var(--stamp-shadow, var(--_contact)));
|
|
316
320
|
}
|
|
317
321
|
:is(.appbar__brand, .appbar__who) > .stamp .stamp__cap { display: none; }
|
|
318
322
|
:is(.appbar__brand, .appbar__who) > .stamp .stamp__art { top: calc(var(--_y) + 9%); }
|
|
@@ -320,10 +324,10 @@
|
|
|
320
324
|
/* a stamp ON a card lies flat: only the contact shadow (--stamp-shadow), at every size (Lh 2026-10-24; the contact shadow 2026-10-26) — a feed card's lead, a foot row's, xs.
|
|
321
325
|
A sheet is a `.card` too, but what it holds stands off its paper: the album, the tray, a start screen's stamp keep their shadow, and so
|
|
322
326
|
does a stamp in an album's cell wherever the album lies */
|
|
323
|
-
.card:not(.sheet) .stamp:not(.stamp-cell > .stamp) { filter:
|
|
327
|
+
.card:not(.sheet) .stamp:not(.stamp-cell > .stamp) { filter: drop-shadow(var(--stamp-shadow, var(--_contact))); }
|
|
324
328
|
/* ONE exception (Lh 2026-10-25): a stamp in the head is glued down — plain, `under` or `sm`, a hair of shadow at its teeth, flat paper, never a lifted sticker.
|
|
325
329
|
A bare or xs stamp stays flat, its contact shadow only. Knob: --stamp-under-drop (the name it was born with: `under` had it first) */
|
|
326
|
-
.card:not(.sheet) .head > .stamp:not(.stamp--bare, .stamp--xs) { filter:
|
|
330
|
+
.card:not(.sheet) .head > .stamp:not(.stamp--bare, .stamp--xs) { filter: drop-shadow(var(--stamp-shadow, var(--_contact))) drop-shadow(var(--stamp-under-drop, var(--shadow-glued))); }
|
|
327
331
|
.head > .stamp { grid-column: 2; grid-row: 1 / span 2; margin-inline: 0; }
|
|
328
332
|
.head > .stamp--under { grid-column: 1; justify-self: end; } /* `under`: in the words' own column, at its end, the words over it (parts.css) */
|
|
329
333
|
/* ---- where it sits in what people.css draws (docs/reference.md rule 15) ---- */
|
package/css/tokens.css
CHANGED
|
@@ -142,6 +142,7 @@
|
|
|
142
142
|
--ease-linear: linear;
|
|
143
143
|
--ease-settle: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
144
144
|
--ease-step: steps(1); /* on or off with nothing between: a code cell's caret blinking, a secret digit before its dot */
|
|
145
|
+
--motion-send: 0.7s; /* something going OUT from a button (Btn / IconBtn sending, actions.css): the icon tips forward, two rings spread */
|
|
145
146
|
--motion-press: 0.12s; /* a control giving under the finger and springing back (actions.css PRESS) */
|
|
146
147
|
--press-scale: 0.96; /* how far a finger-sized control gives — a share of its size */
|
|
147
148
|
--scale-lift: 1.06; /* a stamp lifted off the paper while the finger holds it */
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -14,14 +14,23 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
14
14
|
form?: boolean;
|
|
15
15
|
/** the one giant call to action in a tinted card ("Taxi!") */
|
|
16
16
|
xl?: boolean;
|
|
17
|
+
/** SMALL: one small tap tall (`--form-tap-sm`, 44 — the touch floor; knob `--btn-sm-size`), the small words (`--fs-sm`, knob `--btn-sm-font-size`),
|
|
18
|
+
* closer sides (knob `--btn-sm-pad-x`) — a worded move at a card head's end, beside the title, where an `IconBtn sm` would stand */
|
|
19
|
+
sm?: boolean;
|
|
17
20
|
/** a link styled as a button */
|
|
18
21
|
href?: string;
|
|
22
|
+
/** SENDING: something goes OUT from the button — its icon swells and tips forward, two rings spread from it (`--motion-send`, 0.7 s; knob
|
|
23
|
+
* `--btn-sending-ink`, default the accent). CONTROLLED: the app turns it on at the press and off after `onSent` (and swaps the icon for a check,
|
|
24
|
+
* or puts the sent thing in). Under reduced motion nothing moves */
|
|
25
|
+
sending?: boolean;
|
|
26
|
+
/** the send-out has ended (once per `sending`; at once where motion is off): the app does what follows */
|
|
27
|
+
onSent?: () => void;
|
|
19
28
|
}
|
|
20
29
|
/**
|
|
21
|
-
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
30
|
+
* Btn — the pill button (48px+ tall; `sm` 44, for a head's end). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
22
31
|
* In a Foot up to four share the line; in an ActionBar it takes the width. An Icon xs may lead or trail the label.
|
|
23
32
|
*/
|
|
24
|
-
export declare function Btn({ primary, quiet, warn, block, form, xl, href, className, type, ...rest }: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
33
|
+
export declare function Btn({ primary, quiet, warn, block, form, xl, sm, href, sending, onSent, onAnimationEnd, className, type, ...rest }: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
25
34
|
translate?: "yes" | "no" | undefined | undefined;
|
|
26
35
|
onChange?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
27
36
|
slot?: string | undefined | undefined;
|
|
@@ -247,7 +256,6 @@ export declare function Btn({ primary, quiet, warn, block, form, xl, href, class
|
|
|
247
256
|
onWheelCapture?: import("react").WheelEventHandler<HTMLButtonElement> | undefined;
|
|
248
257
|
onAnimationStart?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
249
258
|
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
250
|
-
onAnimationEnd?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
251
259
|
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
252
260
|
onAnimationIteration?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
253
261
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -311,6 +319,7 @@ export declare function Btn({ primary, quiet, warn, block, form, xl, href, class
|
|
|
311
319
|
formMethod?: string | undefined | undefined;
|
|
312
320
|
formNoValidate?: boolean | undefined | undefined;
|
|
313
321
|
formTarget?: string | undefined | undefined;
|
|
322
|
+
onAnimationEnd: (e: import("react").AnimationEvent<HTMLButtonElement>) => void;
|
|
314
323
|
href: string | undefined;
|
|
315
324
|
type: "reset" | "submit" | "button" | undefined;
|
|
316
325
|
className: string;
|
package/dist/actions/Btn.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
+
import { useSendOut } from './useSendOut.js';
|
|
2
3
|
import { cx } from '../cx.js';
|
|
3
4
|
/**
|
|
4
|
-
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
5
|
+
* Btn — the pill button (48px+ tall; `sm` 44, for a head's end). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
5
6
|
* In a Foot up to four share the line; in an ActionBar it takes the width. An Icon xs may lead or trail the label.
|
|
6
7
|
*/
|
|
7
|
-
export function Btn({ primary, quiet, warn, block, form, xl, href, className, type, ...rest }) {
|
|
8
|
+
export function Btn({ primary, quiet, warn, block, form, xl, sm, href, sending, onSent, onAnimationEnd, className, type, ...rest }) {
|
|
9
|
+
const ended = useSendOut(sending, onSent, onAnimationEnd);
|
|
8
10
|
return createElement(href ? 'a' : 'button', {
|
|
11
|
+
onAnimationEnd: ended,
|
|
9
12
|
href,
|
|
10
13
|
type: href ? undefined : type ?? 'button',
|
|
11
|
-
className: cx('btn', primary && 'btn--primary', quiet && 'btn--quiet', warn && 'btn--warn', block && 'btn--block', form && 'btn--form', xl && 'btn--xl', className),
|
|
14
|
+
className: cx('btn', primary && 'btn--primary', quiet && 'btn--quiet', warn && 'btn--warn', block && 'btn--block', form && 'btn--form', xl && 'btn--xl', sm && 'btn--sm', sending && 'is-sending', className),
|
|
12
15
|
...rest,
|
|
13
16
|
});
|
|
14
17
|
}
|
|
@@ -22,10 +22,11 @@ export interface BtnGroupProps extends Omit<ComponentProps<'div'>, 'onChange' |
|
|
|
22
22
|
/** `frame` only: the buttons one OVER the other, the panel one button wide — at a `Row`'s end, where a panel across would take the
|
|
23
23
|
* words' room */
|
|
24
24
|
vertical?: boolean;
|
|
25
|
-
/** `frame`
|
|
25
|
+
/** `frame` and `choice`: the panel as wide as its buttons (each one tap wide, or as wide as its word), in the middle of its column the way a
|
|
26
26
|
* `Btn form` is — in a `Page`, a `Centre`, a `CtaPack`, and in a card's or a sheet's foot, where it keeps that width instead of filling
|
|
27
27
|
* the row. Without it the panel is the width of what it stands in. Not with `vertical`: that is already one button wide, at a row's
|
|
28
|
-
* end — `form` wins and warns
|
|
28
|
+
* end — `form` wins and warns. `choice` (Lh 2026-10-28): the joined words each as wide as its word, the frame as wide as them all — on
|
|
29
|
+
* its own in the middle of a step, in a `CtaPack` beside another control on the same line */
|
|
29
30
|
form?: boolean;
|
|
30
31
|
/** with `form`: SHOW the `label` as words at the panel's left, on one line, the two centred together — plain ink in the label's type,
|
|
31
32
|
* outside the frame, and the words are the group's name (`aria-labelledby`). Where the line is too narrow (a big text size on a small
|
package/dist/actions/BtnGroup.js
CHANGED
|
@@ -15,8 +15,8 @@ export function BtnGroup({ look = 'frame', label, labelled, form, select, value,
|
|
|
15
15
|
const strip = look !== 'frame'; // `choice` is a strip of words in a button's look
|
|
16
16
|
if (!strip && Children.count(children) > 4)
|
|
17
17
|
warnOnce('icon-btn-group', 'cardds BtnGroup: more than 4 buttons in a frame — keep 4, put the rest in a Menu behind one of them');
|
|
18
|
-
if (strip && (
|
|
19
|
-
warnOnce('btn-group-strip-frame', 'cardds BtnGroup: `
|
|
18
|
+
if (strip && (vertical || labelled || (form && look !== 'choice')))
|
|
19
|
+
warnOnce('btn-group-strip-frame', 'cardds BtnGroup: `vertical` and `labelled` are the frame\'s, `form` the frame\'s and the choice\'s — a strip always shares the width it stands in; they are ignored');
|
|
20
20
|
if (!strip && form && vertical)
|
|
21
21
|
warnOnce('icon-btn-group-form-vertical', 'cardds BtnGroup: `form` and `vertical` together — `vertical` is already one button wide at a row\'s end, `form` is the panel in the middle of its column; `form` is kept, `vertical` ignored');
|
|
22
22
|
if (!strip && labelled && !form)
|
|
@@ -48,7 +48,7 @@ export function BtnGroup({ look = 'frame', label, labelled, form, select, value,
|
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
if (strip)
|
|
51
|
-
return _jsx("div", { role: "tablist", "aria-label": label, className: cx('segment', look === 'choice' && 'segment--choice', className), ...rest, children: items });
|
|
51
|
+
return _jsx("div", { role: "tablist", "aria-label": label, className: cx('segment', look === 'choice' && 'segment--choice', look === 'choice' && form && 'segment--form', className), ...rest, children: items });
|
|
52
52
|
const panel = (_jsx("div", { role: "group", "aria-label": line ? undefined : label, "aria-labelledby": line ? words : undefined, className: cx('icon-btn-group', form && 'icon-btn-group--form', vertical && !form && 'icon-btn-group--vertical', !line && className), ...(line ? {} : rest), children: items }));
|
|
53
53
|
if (!line)
|
|
54
54
|
return panel;
|
package/dist/actions/BtnRow.d.ts
CHANGED
|
@@ -6,7 +6,11 @@ export interface BtnRowProps extends ComponentProps<'div'> {
|
|
|
6
6
|
/** with `round`: a dotted link between each two buttons and a closer gap (× · ? · ✓ — the answers of a `ModalAsk`; was `BtnTrio`).
|
|
7
7
|
* Knobs `--btn-trio-gap`, `--btn-trio-dots-w`, `--btn-trio-dots-h` */
|
|
8
8
|
joined?: boolean;
|
|
9
|
+
/** WRAP: each `Btn` as wide as its words, from the start, wrapping to a new line when they do not fit — instead of sharing the width */
|
|
10
|
+
wrap?: boolean;
|
|
11
|
+
/** the buttons stand at the END of the row (the right, in a left-to-right script) — with `wrap` */
|
|
12
|
+
end?: boolean;
|
|
9
13
|
}
|
|
10
14
|
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round IconBtns there
|
|
11
|
-
* (`round joined`: linked by dots, the answers of a `ModalAsk`). In a foot use Foot instead. */
|
|
12
|
-
export declare function BtnRow({ round, joined, className, children, ...rest }: BtnRowProps): import("react").JSX.Element;
|
|
15
|
+
* (`round joined`: linked by dots, the answers of a `ModalAsk`); `wrap` (`wrap end`) each Btn as wide as its words, wrapping (at the end). In a foot use Foot instead. */
|
|
16
|
+
export declare function BtnRow({ round, joined, wrap, end, className, children, ...rest }: BtnRowProps): import("react").JSX.Element;
|
package/dist/actions/BtnRow.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
3
|
import { joinDots } from './joined.js';
|
|
4
4
|
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round IconBtns there
|
|
5
|
-
* (`round joined`: linked by dots, the answers of a `ModalAsk`). In a foot use Foot instead. */
|
|
6
|
-
export function BtnRow({ round, joined, className, children, ...rest }) {
|
|
7
|
-
return _jsx("div", { className: cx('btn-row', round && 'btn-row--round', joined && 'btn-row--joined', className), ...rest, children: joined ? joinDots(children) : children });
|
|
5
|
+
* (`round joined`: linked by dots, the answers of a `ModalAsk`); `wrap` (`wrap end`) each Btn as wide as its words, wrapping (at the end). In a foot use Foot instead. */
|
|
6
|
+
export function BtnRow({ round, joined, wrap, end, className, children, ...rest }) {
|
|
7
|
+
return _jsx("div", { className: cx('btn-row', round && 'btn-row--round', joined && 'btn-row--joined', wrap && 'btn-row--wrap', end && 'btn-row--end', className), ...rest, children: joined ? joinDots(children) : children });
|
|
8
8
|
}
|
|
@@ -18,13 +18,19 @@ export interface IconBtnProps extends ComponentProps<'button'> {
|
|
|
18
18
|
primary?: boolean;
|
|
19
19
|
/** a link styled as a round button */
|
|
20
20
|
href?: string;
|
|
21
|
+
/** SENDING: something goes OUT from the button — its icon swells and tips forward, two rings spread from it (`--motion-send`, 0.7 s; knob
|
|
22
|
+
* `--btn-sending-ink`, default the accent). CONTROLLED: the app turns it on at the press and off after `onSent` (and swaps the icon for a check,
|
|
23
|
+
* or puts the sent thing in). Under reduced motion nothing moves */
|
|
24
|
+
sending?: boolean;
|
|
25
|
+
/** the send-out has ended (once per `sending`; at once where motion is off): the app does what follows */
|
|
26
|
+
onSent?: () => void;
|
|
21
27
|
}
|
|
22
28
|
/** IconBtn — the round icon button: `sm` in heads and bars, full size in rows and composers, `invert` for the one filled move, `primary` for the
|
|
23
29
|
* primary fill. `size="lg"` / `"xl"` are the big rounds (the foot of a few round answers: `<Foot round>`); a short WORD may stand in one
|
|
24
30
|
* as its child (`<IconBtn size="xl" primary label="ช่วยเหลือ">ช่วย</IconBtn>`): it grows with the member's text size up to the circle's share.
|
|
25
31
|
* It is a button and nothing more: to open a Menu, give it the platform's `popoverTarget={the Menu's id}` and render that `<Menu popover actions id>`
|
|
26
32
|
* wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`. */
|
|
27
|
-
export declare function IconBtn({ label, icon, sm, size, invert, primary, href, className, type, children, ...rest }: IconBtnProps): import("react").DetailedReactHTMLElement<{
|
|
33
|
+
export declare function IconBtn({ label, icon, sm, size, invert, primary, href, sending, onSent, onAnimationEnd, className, type, children, ...rest }: IconBtnProps): import("react").DetailedReactHTMLElement<{
|
|
28
34
|
ref?: import("react").Ref<HTMLButtonElement> | undefined;
|
|
29
35
|
key?: import("react").Key | null | undefined;
|
|
30
36
|
disabled?: boolean | undefined;
|
|
@@ -300,7 +306,6 @@ export declare function IconBtn({ label, icon, sm, size, invert, primary, href,
|
|
|
300
306
|
onWheelCapture?: import("react").WheelEventHandler<HTMLButtonElement> | undefined;
|
|
301
307
|
onAnimationStart?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
302
308
|
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
303
|
-
onAnimationEnd?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
304
309
|
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
305
310
|
onAnimationIteration?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
306
311
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -316,5 +321,6 @@ export declare function IconBtn({ label, icon, sm, size, invert, primary, href,
|
|
|
316
321
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
317
322
|
href: string | undefined;
|
|
318
323
|
type: "reset" | "submit" | "button" | undefined;
|
|
324
|
+
onAnimationEnd: (e: import("react").AnimationEvent<HTMLButtonElement>) => void;
|
|
319
325
|
className: string;
|
|
320
326
|
}, HTMLButtonElement>;
|
package/dist/actions/IconBtn.js
CHANGED
|
@@ -3,15 +3,17 @@ import { createElement } from 'react';
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { warnOnce } from '../state.js';
|
|
5
5
|
import { Icon } from '../type/Icon.js';
|
|
6
|
+
import { useSendOut } from './useSendOut.js';
|
|
6
7
|
/** IconBtn — the round icon button: `sm` in heads and bars, full size in rows and composers, `invert` for the one filled move, `primary` for the
|
|
7
8
|
* primary fill. `size="lg"` / `"xl"` are the big rounds (the foot of a few round answers: `<Foot round>`); a short WORD may stand in one
|
|
8
9
|
* as its child (`<IconBtn size="xl" primary label="ช่วยเหลือ">ช่วย</IconBtn>`): it grows with the member's text size up to the circle's share.
|
|
9
10
|
* It is a button and nothing more: to open a Menu, give it the platform's `popoverTarget={the Menu's id}` and render that `<Menu popover actions id>`
|
|
10
11
|
* wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`. */
|
|
11
|
-
export function IconBtn({ label, icon, sm, size, invert, primary, href, className, type, children, ...rest }) {
|
|
12
|
+
export function IconBtn({ label, icon, sm, size, invert, primary, href, sending, onSent, onAnimationEnd, className, type, children, ...rest }) {
|
|
13
|
+
const ended = useSendOut(sending, onSent, onAnimationEnd);
|
|
12
14
|
if (invert && primary)
|
|
13
15
|
warnOnce('icon-btn-fill', 'cardds IconBtn: `invert` and `primary` together — two fills for one button; `primary` is drawn');
|
|
14
16
|
const step = size ?? (sm ? 'sm' : undefined);
|
|
15
|
-
const btn = createElement(href ? 'a' : 'button', { href, type: href ? undefined : type ?? 'button', 'aria-label': label, className: cx('icon-btn', step && `icon-btn--${step}`, invert && 'icon-btn--invert', primary && 'icon-btn--primary', className), ...rest }, icon ? _jsx(Icon, { name: icon, size: step === 'sm' ? 'sm' : 'md' }) : children);
|
|
17
|
+
const btn = createElement(href ? 'a' : 'button', { href, type: href ? undefined : type ?? 'button', 'aria-label': label, onAnimationEnd: ended, className: cx('icon-btn', step && `icon-btn--${step}`, invert && 'icon-btn--invert', primary && 'icon-btn--primary', sending && 'is-sending', className), ...rest }, icon ? _jsx(Icon, { name: icon, size: step === 'sm' ? 'sm' : 'md' }) : children);
|
|
16
18
|
return btn;
|
|
17
19
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface LinkBlockProps extends ComponentProps<'a'> {
|
|
3
|
+
/** where it goes — a link block is always a link */
|
|
4
|
+
href: string;
|
|
5
|
+
}
|
|
6
|
+
/** LinkBlock — a link that is neither a card nor a row: a few pieces of a card's content (a still `MapArea` and the `Row` naming the place) as ONE
|
|
7
|
+
* `<a>`, stacked with the card's gap, in the ink of what holds it, no underline, no frame and no padding of its own; it dims under the finger.
|
|
8
|
+
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`. */
|
|
9
|
+
export declare function LinkBlock({ className, ...rest }: LinkBlockProps): import("react").JSX.Element;
|